You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2835 lines
507 KiB
2835 lines
507 KiB
1 year ago
|
/******/ (function(modules) { // webpackBootstrap
|
||
|
/******/ // The module cache
|
||
|
/******/ var installedModules = {};
|
||
|
|
||
|
/******/ // The require function
|
||
|
/******/ function __webpack_require__(moduleId) {
|
||
|
|
||
|
/******/ // Check if module is in cache
|
||
|
/******/ if(installedModules[moduleId])
|
||
|
/******/ return installedModules[moduleId].exports;
|
||
|
|
||
|
/******/ // Create a new module (and put it into the cache)
|
||
|
/******/ var module = installedModules[moduleId] = {
|
||
|
/******/ exports: {},
|
||
|
/******/ id: moduleId,
|
||
|
/******/ loaded: false
|
||
|
/******/ };
|
||
|
|
||
|
/******/ // Execute the module function
|
||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
|
|
||
|
/******/ // Flag the module as loaded
|
||
|
/******/ module.loaded = true;
|
||
|
|
||
|
/******/ // Return the exports of the module
|
||
|
/******/ return module.exports;
|
||
|
/******/ }
|
||
|
|
||
|
|
||
|
/******/ // expose the modules object (__webpack_modules__)
|
||
|
/******/ __webpack_require__.m = modules;
|
||
|
|
||
|
/******/ // expose the module cache
|
||
|
/******/ __webpack_require__.c = installedModules;
|
||
|
|
||
|
/******/ // __webpack_public_path__
|
||
|
/******/ __webpack_require__.p = "";
|
||
|
|
||
|
/******/ // Load entry module and return exports
|
||
|
/******/ return __webpack_require__(0);
|
||
|
/******/ })
|
||
|
/************************************************************************/
|
||
|
/******/ ([
|
||
|
/* 0 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = __webpack_require__(1);
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 1 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
var _from = __webpack_require__(70);
|
||
|
|
||
|
var _from2 = _interopRequireDefault(_from);
|
||
|
|
||
|
var _extends2 = __webpack_require__(79);
|
||
|
|
||
|
var _extends3 = _interopRequireDefault(_extends2);
|
||
|
|
||
|
var _classCallCheck2 = __webpack_require__(84);
|
||
|
|
||
|
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||
|
|
||
|
var _createClass2 = __webpack_require__(85);
|
||
|
|
||
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
||
|
|
||
|
__webpack_require__(89);
|
||
|
|
||
|
var _filesaver = __webpack_require__(92);
|
||
|
|
||
|
var _tableToData = __webpack_require__(95);
|
||
|
|
||
|
var _tableToData2 = _interopRequireDefault(_tableToData);
|
||
|
|
||
|
var _dataToWorksheet = __webpack_require__(96);
|
||
|
|
||
|
var _dataToWorksheet2 = _interopRequireDefault(_dataToWorksheet);
|
||
|
|
||
|
var _decodeCell = __webpack_require__(99);
|
||
|
|
||
|
var _encodeCell = __webpack_require__(97);
|
||
|
|
||
|
var _list = __webpack_require__(100);
|
||
|
|
||
|
var _list2 = _interopRequireDefault(_list);
|
||
|
|
||
|
var _number = __webpack_require__(101);
|
||
|
|
||
|
var _number2 = _interopRequireDefault(_number);
|
||
|
|
||
|
var _date = __webpack_require__(102);
|
||
|
|
||
|
var _date2 = _interopRequireDefault(_date);
|
||
|
|
||
|
var _input = __webpack_require__(103);
|
||
|
|
||
|
var _input2 = _interopRequireDefault(_input);
|
||
|
|
||
|
var _boolean = __webpack_require__(104);
|
||
|
|
||
|
var _boolean2 = _interopRequireDefault(_boolean);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
/**
|
||
|
* @param {string} defaultFileName - The file name if download
|
||
|
* doesn't provide a name. Default: 'file'.
|
||
|
* @ param {string} tableNameDataAttribute - The identifier of
|
||
|
* the name of the table as a data-attribute. Default: 'excel-name'
|
||
|
* results to `<table data-excel-name="Another table">...</table>`.
|
||
|
*/
|
||
|
var defaultOptions = {
|
||
|
defaultFileName: 'file',
|
||
|
tableNameDataAttribute: 'excel-name',
|
||
|
|
||
|
/**
|
||
|
* The event will be fired before add worksheet
|
||
|
* into workbook
|
||
|
*
|
||
|
* @param {object} worksheet
|
||
|
* @param {string} name - worksheet name
|
||
|
* @returns {object} worksheet
|
||
|
*/
|
||
|
beforeWorksheetAdded: function beforeWorksheetAdded(worksheet, name) {
|
||
|
return worksheet;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* The default type handlers: lists, numbers, dates, input fields and booleans.
|
||
|
*/
|
||
|
var typeHandlers = [_list2.default, _input2.default, _number2.default, _date2.default, _boolean2.default];
|
||
|
|
||
|
/**
|
||
|
* Creates a `Table2Excel` object to export HTMLTableElements
|
||
|
* to a xlsx-file via its function `export`.
|
||
|
*/
|
||
|
|
||
|
var Table2Excel = function () {
|
||
|
/**
|
||
|
* @param {object} options - Overrides the default options.
|
||
|
*/
|
||
|
function Table2Excel() {
|
||
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
|
(0, _classCallCheck3.default)(this, Table2Excel);
|
||
|
|
||
|
(0, _extends3.default)(this, defaultOptions, options);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Exports HTMLTableElements to a xlsx-file.
|
||
|
*
|
||
|
* @param {NodeList} tables - The tables to export.
|
||
|
* @param {string} fileName - The file name.
|
||
|
*/
|
||
|
|
||
|
|
||
|
(0, _createClass3.default)(Table2Excel, [{
|
||
|
key: 'export',
|
||
|
value: function _export(tables) {
|
||
|
var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.defaultFileName;
|
||
|
|
||
|
this.download(this.getWorkbook(tables), fileName);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the XLSX-Workbook object of an array of tables.
|
||
|
*
|
||
|
* @param {NodeList} tables - The tables.
|
||
|
* @returns {object} - The XLSX-Workbook object of the tables.
|
||
|
*/
|
||
|
|
||
|
}, {
|
||
|
key: 'getWorkbook',
|
||
|
value: function getWorkbook(tables) {
|
||
|
var _this = this;
|
||
|
|
||
|
return (0, _from2.default)(tables.length ? tables : [tables]).reduce(function (workbook, table, index) {
|
||
|
var dataName = '';
|
||
|
|
||
|
if (table.querySelector('caption')) {
|
||
|
dataName = table.querySelector('caption').innerText;
|
||
|
} else {
|
||
|
dataName = table.getAttribute('data-' + _this.tableNameDataAttribute);
|
||
|
}
|
||
|
|
||
|
var name = dataName || (index + 1).toString();
|
||
|
|
||
|
var worksheet = _this.getWorksheet(table);
|
||
|
|
||
|
if (typeof _this.beforeWorksheetAdded === 'function') {
|
||
|
worksheet = _this.beforeWorksheetAdded(worksheet, name);
|
||
|
}
|
||
|
|
||
|
workbook.SheetNames.push(name);
|
||
|
workbook.Sheets[name] = worksheet;
|
||
|
|
||
|
return workbook;
|
||
|
}, { SheetNames: [], Sheets: {} });
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the XLSX-Worksheet object of a table.
|
||
|
*
|
||
|
* @param {HTMLTableElement} table - The table.
|
||
|
* @returns {object} - The XLSX-Worksheet object of the table.
|
||
|
*/
|
||
|
|
||
|
}, {
|
||
|
key: 'getWorksheet',
|
||
|
value: function getWorksheet(table) {
|
||
|
if (!table || table.tagName !== 'TABLE') {
|
||
|
throw new Error('Element must be a table');
|
||
|
}
|
||
|
|
||
|
return (0, _dataToWorksheet2.default)((0, _tableToData2.default)(table), typeHandlers);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Change top-left table corner.
|
||
|
* At the same time there is a shift of all internal objects
|
||
|
*
|
||
|
* @param {object} WS - worksheet object
|
||
|
* @param {object} newPos - new top-left coordinate
|
||
|
* @returns {object}
|
||
|
*/
|
||
|
|
||
|
}, {
|
||
|
key: 'depositionWorksheetTable',
|
||
|
value: function depositionWorksheetTable() {
|
||
|
var WS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
|
var newPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { c: 0, r: 0 };
|
||
|
|
||
|
var decodeCellItem = {},
|
||
|
decodeRangeItem = {},
|
||
|
newWS = {
|
||
|
'!merges': [],
|
||
|
'!ref': ''
|
||
|
};
|
||
|
|
||
|
for (var key in WS) {
|
||
|
switch (key) {
|
||
|
case '!merges':
|
||
|
for (var mergeKey in WS[key]) {
|
||
|
newWS['!merges'].push({
|
||
|
e: {
|
||
|
c: WS[key][mergeKey].e.c + newPos.c,
|
||
|
r: WS[key][mergeKey].e.r + newPos.r
|
||
|
},
|
||
|
s: {
|
||
|
c: WS[key][mergeKey].s.c + newPos.c,
|
||
|
r: WS[key][mergeKey].s.r + newPos.r
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
break;
|
||
|
case '!ref':
|
||
|
decodeRangeItem = (0, _decodeCell.decodeRange)(WS[key]);
|
||
|
|
||
|
/**
|
||
|
* We don't move start range position (A1)
|
||
|
*/
|
||
|
decodeRangeItem.e.c += newPos.c;
|
||
|
decodeRangeItem.e.r += newPos.r;
|
||
|
|
||
|
newWS['!ref'] = (0, _encodeCell.encodeRange)(decodeRangeItem);
|
||
|
break;
|
||
|
case '!cols':
|
||
|
newWS['!cols'] = WS[key];
|
||
|
|
||
|
for (var i = 0; i < newPos.c; i++) {
|
||
|
newWS['!cols'].unshift(null);
|
||
|
}
|
||
|
|
||
|
break;
|
||
|
default:
|
||
|
decodeCellItem = (0, _decodeCell.decodeCell)(key);
|
||
|
decodeCellItem.c += newPos.c;
|
||
|
decodeCellItem.r += newPos.r;
|
||
|
|
||
|
newWS[(0, _encodeCell.encodeCell)(decodeCellItem)] = WS[key];
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return newWS;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Exports a XLSX-Workbook object to a xlsx-file.
|
||
|
*
|
||
|
* @param {object} workbook - The XLSX-Workbook.
|
||
|
* @param {string} fileName - The file name.
|
||
|
*/
|
||
|
|
||
|
}, {
|
||
|
key: 'download',
|
||
|
value: function download(workbook) {
|
||
|
var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.defaultFileName;
|
||
|
|
||
|
function convert(data) {
|
||
|
var buffer = new ArrayBuffer(data.length);
|
||
|
var view = new Uint8Array(buffer);
|
||
|
for (var i = 0; i <= data.length; i++) {
|
||
|
view[i] = data.charCodeAt(i) & 0xFF;
|
||
|
}
|
||
|
return buffer;
|
||
|
}
|
||
|
|
||
|
var data = window.XLSX.write(workbook, {
|
||
|
bookType: 'xlsx',
|
||
|
type: 'binary'
|
||
|
});
|
||
|
|
||
|
var blob = new Blob([convert(data)], { type: 'application/octet-stream' });
|
||
|
(0, _filesaver.saveAs)(blob, fileName + '.xlsx');
|
||
|
}
|
||
|
},{
|
||
|
/**
|
||
|
* 针对layui table的动态渲染方式做的手动往页面添加表格dom的处理
|
||
|
* 参数 table:表格对象 exceptColumns:下载的excel中排除掉的列的data-field的值的数组,可
|
||
|
* 不传,默认导出所有列
|
||
|
*/
|
||
|
key: 'append',
|
||
|
value: function append(table, exceptColumns) {
|
||
|
if (exceptColumns == undefined || exceptColumns == null || exceptColumns == ''){
|
||
|
exceptColumns = [];
|
||
|
}
|
||
|
let header_tr = $($(table).next().find(".layui-table-header")[0]).find("tr");
|
||
|
let body_tr = $($(table).next().find(".layui-table-body")[0]).find("tr");
|
||
|
let header_html = "";
|
||
|
let body_html = "";
|
||
|
// 获取表头html,包括单元格的合并
|
||
|
$.each(header_tr,function (i,tr) {
|
||
|
let header_th = $(tr).find("th");
|
||
|
header_html += "<tr>";
|
||
|
$.each(header_th,function (j,th) {
|
||
|
if (exceptColumns.indexOf($(th).attr("data-field")) == -1){
|
||
|
let rowspan_num = $(th).attr("rowspan");// 行合并数
|
||
|
let colspan_num = $(th).attr("colspan");// 列合并数
|
||
|
if (rowspan_num && !colspan_num){// 只有行合并时
|
||
|
header_html += '<th rowspan= "'+ rowspan_num +'">';
|
||
|
} else if (colspan_num && !rowspan_num){// 只有列合并时
|
||
|
header_html += '<th colspan= "'+ colspan_num +'">';
|
||
|
} else if (rowspan_num && colspan_num){// 行列合并均有时
|
||
|
header_html += '<th rowspan= "'+ rowspan_num +'" colspan="'+ colspan_num +'">';
|
||
|
} else {// 没有发生单元格合并
|
||
|
header_html += '<th>';
|
||
|
}
|
||
|
// 获取表头名称并拼接th标签
|
||
|
header_html += $(th).children().children().text() + '</th>';
|
||
|
}
|
||
|
})
|
||
|
header_html += '</tr>';
|
||
|
})
|
||
|
// 获取表格body数据
|
||
|
$.each(body_tr,function (i,tr) {
|
||
|
let body_td = $(tr).find("td");
|
||
|
body_html += '<tr>';
|
||
|
$.each(body_td,function (j,td) {
|
||
|
if (exceptColumns.indexOf($(td).attr("data-field")) == -1){
|
||
|
body_html += '<td>' + $(td).children().text() + '</td>';
|
||
|
}
|
||
|
})
|
||
|
body_html += '</tr>';
|
||
|
})
|
||
|
// 兼容开启了合计行的情况
|
||
|
let total_row_tr = $($(table).next().find(".layui-table-total")[0]).find("tr");
|
||
|
if (total_row_tr.length > 0){
|
||
|
$.each(total_row_tr,function (i,tr) {
|
||
|
let total_row_td = $(tr).find("td");
|
||
|
body_html += '<tr>';
|
||
|
$.each(total_row_td,function (j,td) {
|
||
|
body_html += '<td>' + $(td).children().text() + '</td>';
|
||
|
})
|
||
|
body_html += '</tr>';
|
||
|
})
|
||
|
}
|
||
|
$(table).find("tr").remove();// 清除之前的dom结构
|
||
|
$(table).append(header_html).append(body_html);
|
||
|
$(table).hide();
|
||
|
}
|
||
|
},{
|
||
|
/**
|
||
|
* 针对layui table动态渲染做的新的导出方式
|
||
|
*/
|
||
|
key: 'exportLayTable',
|
||
|
value: function exportLayTable(tables) {
|
||
|
var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.defaultFileName;
|
||
|
$(tables).show();
|
||
|
this.download(this.getWorkbook(tables), fileName);
|
||
|
$(tables).hide();
|
||
|
}
|
||
|
}]);
|
||
|
return Table2Excel;
|
||
|
}();
|
||
|
|
||
|
// add global reference to `window` if defined
|
||
|
|
||
|
|
||
|
exports.default = Table2Excel;
|
||
|
if (window) window.Table2Excel = Table2Excel;
|
||
|
|
||
|
/**
|
||
|
* Adds the type handler to the beginning of the list of type handlers.
|
||
|
* This way it can override general solutions provided by the default handlers
|
||
|
* with more specific ones.
|
||
|
*
|
||
|
* @param {function} typeHandler - Type handler that generates a cell
|
||
|
* object for a specific cell that fulfills specific criteria.
|
||
|
* *
|
||
|
* * @param {HTMLTableCellElement} cell - The cell that should be parsed to a cell object.
|
||
|
* * @param {string} text - The text of the cell.
|
||
|
* *
|
||
|
* * @returns {object} - Cell object (see: https://github.com/SheetJS/js-xlsx#cell-object)
|
||
|
* * or `null` iff the cell doesn't fulfill the criteria of the type handler.
|
||
|
*/
|
||
|
Table2Excel.extend = function extendCellTypes(typeHandler) {
|
||
|
typeHandlers.unshift(typeHandler);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 2 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
|
||
|
var _iterator = __webpack_require__(3);
|
||
|
|
||
|
var _iterator2 = _interopRequireDefault(_iterator);
|
||
|
|
||
|
var _symbol = __webpack_require__(54);
|
||
|
|
||
|
var _symbol2 = _interopRequireDefault(_symbol);
|
||
|
|
||
|
var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
||
|
return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
||
|
} : function (obj) {
|
||
|
return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 3 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = { "default": __webpack_require__(4), __esModule: true };
|
||
|
|
||
|
/***/ },
|
||
|
/* 4 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(5);
|
||
|
__webpack_require__(49);
|
||
|
module.exports = __webpack_require__(53).f('iterator');
|
||
|
|
||
|
/***/ },
|
||
|
/* 5 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var $at = __webpack_require__(6)(true);
|
||
|
|
||
|
// 21.1.3.27 String.prototype[@@iterator]()
|
||
|
__webpack_require__(9)(String, 'String', function(iterated){
|
||
|
this._t = String(iterated); // target
|
||
|
this._i = 0; // next index
|
||
|
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
||
|
}, function(){
|
||
|
var O = this._t
|
||
|
, index = this._i
|
||
|
, point;
|
||
|
if(index >= O.length)return {value: undefined, done: true};
|
||
|
point = $at(O, index);
|
||
|
this._i += point.length;
|
||
|
return {value: point, done: false};
|
||
|
});
|
||
|
|
||
|
/***/ },
|
||
|
/* 6 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var toInteger = __webpack_require__(7)
|
||
|
, defined = __webpack_require__(8);
|
||
|
// true -> String#at
|
||
|
// false -> String#codePointAt
|
||
|
module.exports = function(TO_STRING){
|
||
|
return function(that, pos){
|
||
|
var s = String(defined(that))
|
||
|
, i = toInteger(pos)
|
||
|
, l = s.length
|
||
|
, a, b;
|
||
|
if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
|
||
|
a = s.charCodeAt(i);
|
||
|
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
||
|
? TO_STRING ? s.charAt(i) : a
|
||
|
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 7 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
// 7.1.4 ToInteger
|
||
|
var ceil = Math.ceil
|
||
|
, floor = Math.floor;
|
||
|
module.exports = function(it){
|
||
|
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 8 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
// 7.2.1 RequireObjectCoercible(argument)
|
||
|
module.exports = function(it){
|
||
|
if(it == undefined)throw TypeError("Can't call method on " + it);
|
||
|
return it;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 9 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var LIBRARY = __webpack_require__(10)
|
||
|
, $export = __webpack_require__(11)
|
||
|
, redefine = __webpack_require__(26)
|
||
|
, hide = __webpack_require__(16)
|
||
|
, has = __webpack_require__(27)
|
||
|
, Iterators = __webpack_require__(28)
|
||
|
, $iterCreate = __webpack_require__(29)
|
||
|
, setToStringTag = __webpack_require__(45)
|
||
|
, getPrototypeOf = __webpack_require__(47)
|
||
|
, ITERATOR = __webpack_require__(46)('iterator')
|
||
|
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
|
||
|
, FF_ITERATOR = '@@iterator'
|
||
|
, KEYS = 'keys'
|
||
|
, VALUES = 'values';
|
||
|
|
||
|
var returnThis = function(){ return this; };
|
||
|
|
||
|
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
|
||
|
$iterCreate(Constructor, NAME, next);
|
||
|
var getMethod = function(kind){
|
||
|
if(!BUGGY && kind in proto)return proto[kind];
|
||
|
switch(kind){
|
||
|
case KEYS: return function keys(){ return new Constructor(this, kind); };
|
||
|
case VALUES: return function values(){ return new Constructor(this, kind); };
|
||
|
} return function entries(){ return new Constructor(this, kind); };
|
||
|
};
|
||
|
var TAG = NAME + ' Iterator'
|
||
|
, DEF_VALUES = DEFAULT == VALUES
|
||
|
, VALUES_BUG = false
|
||
|
, proto = Base.prototype
|
||
|
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
||
|
, $default = $native || getMethod(DEFAULT)
|
||
|
, $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
|
||
|
, $anyNative = NAME == 'Array' ? proto.entries || $native : $native
|
||
|
, methods, key, IteratorPrototype;
|
||
|
// Fix native
|
||
|
if($anyNative){
|
||
|
IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
|
||
|
if(IteratorPrototype !== Object.prototype){
|
||
|
// Set @@toStringTag to native iterators
|
||
|
setToStringTag(IteratorPrototype, TAG, true);
|
||
|
// fix for some old engines
|
||
|
if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
|
||
|
}
|
||
|
}
|
||
|
// fix Array#{values, @@iterator}.name in V8 / FF
|
||
|
if(DEF_VALUES && $native && $native.name !== VALUES){
|
||
|
VALUES_BUG = true;
|
||
|
$default = function values(){ return $native.call(this); };
|
||
|
}
|
||
|
// Define iterator
|
||
|
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
|
||
|
hide(proto, ITERATOR, $default);
|
||
|
}
|
||
|
// Plug for library
|
||
|
Iterators[NAME] = $default;
|
||
|
Iterators[TAG] = returnThis;
|
||
|
if(DEFAULT){
|
||
|
methods = {
|
||
|
values: DEF_VALUES ? $default : getMethod(VALUES),
|
||
|
keys: IS_SET ? $default : getMethod(KEYS),
|
||
|
entries: $entries
|
||
|
};
|
||
|
if(FORCED)for(key in methods){
|
||
|
if(!(key in proto))redefine(proto, key, methods[key]);
|
||
|
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
||
|
}
|
||
|
return methods;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 10 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = true;
|
||
|
|
||
|
/***/ },
|
||
|
/* 11 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var global = __webpack_require__(12)
|
||
|
, core = __webpack_require__(13)
|
||
|
, ctx = __webpack_require__(14)
|
||
|
, hide = __webpack_require__(16)
|
||
|
, PROTOTYPE = 'prototype';
|
||
|
|
||
|
var $export = function(type, name, source){
|
||
|
var IS_FORCED = type & $export.F
|
||
|
, IS_GLOBAL = type & $export.G
|
||
|
, IS_STATIC = type & $export.S
|
||
|
, IS_PROTO = type & $export.P
|
||
|
, IS_BIND = type & $export.B
|
||
|
, IS_WRAP = type & $export.W
|
||
|
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
||
|
, expProto = exports[PROTOTYPE]
|
||
|
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
||
|
, key, own, out;
|
||
|
if(IS_GLOBAL)source = name;
|
||
|
for(key in source){
|
||
|
// contains in native
|
||
|
own = !IS_FORCED && target && target[key] !== undefined;
|
||
|
if(own && key in exports)continue;
|
||
|
// export native or passed
|
||
|
out = own ? target[key] : source[key];
|
||
|
// prevent global pollution for namespaces
|
||
|
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
||
|
// bind timers to global for call from export context
|
||
|
: IS_BIND && own ? ctx(out, global)
|
||
|
// wrap global constructors for prevent change them in library
|
||
|
: IS_WRAP && target[key] == out ? (function(C){
|
||
|
var F = function(a, b, c){
|
||
|
if(this instanceof C){
|
||
|
switch(arguments.length){
|
||
|
case 0: return new C;
|
||
|
case 1: return new C(a);
|
||
|
case 2: return new C(a, b);
|
||
|
} return new C(a, b, c);
|
||
|
} return C.apply(this, arguments);
|
||
|
};
|
||
|
F[PROTOTYPE] = C[PROTOTYPE];
|
||
|
return F;
|
||
|
// make static versions for prototype methods
|
||
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||
|
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
||
|
if(IS_PROTO){
|
||
|
(exports.virtual || (exports.virtual = {}))[key] = out;
|
||
|
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
||
|
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
// type bitmap
|
||
|
$export.F = 1; // forced
|
||
|
$export.G = 2; // global
|
||
|
$export.S = 4; // static
|
||
|
$export.P = 8; // proto
|
||
|
$export.B = 16; // bind
|
||
|
$export.W = 32; // wrap
|
||
|
$export.U = 64; // safe
|
||
|
$export.R = 128; // real proto method for `library`
|
||
|
module.exports = $export;
|
||
|
|
||
|
/***/ },
|
||
|
/* 12 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||
|
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
||
|
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
||
|
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
|
||
|
|
||
|
/***/ },
|
||
|
/* 13 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
var core = module.exports = {version: '2.4.0'};
|
||
|
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
|
||
|
|
||
|
/***/ },
|
||
|
/* 14 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// optional / simple context binding
|
||
|
var aFunction = __webpack_require__(15);
|
||
|
module.exports = function(fn, that, length){
|
||
|
aFunction(fn);
|
||
|
if(that === undefined)return fn;
|
||
|
switch(length){
|
||
|
case 1: return function(a){
|
||
|
return fn.call(that, a);
|
||
|
};
|
||
|
case 2: return function(a, b){
|
||
|
return fn.call(that, a, b);
|
||
|
};
|
||
|
case 3: return function(a, b, c){
|
||
|
return fn.call(that, a, b, c);
|
||
|
};
|
||
|
}
|
||
|
return function(/* ...args */){
|
||
|
return fn.apply(that, arguments);
|
||
|
};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 15 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(it){
|
||
|
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
||
|
return it;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 16 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var dP = __webpack_require__(17)
|
||
|
, createDesc = __webpack_require__(25);
|
||
|
module.exports = __webpack_require__(21) ? function(object, key, value){
|
||
|
return dP.f(object, key, createDesc(1, value));
|
||
|
} : function(object, key, value){
|
||
|
object[key] = value;
|
||
|
return object;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 17 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var anObject = __webpack_require__(18)
|
||
|
, IE8_DOM_DEFINE = __webpack_require__(20)
|
||
|
, toPrimitive = __webpack_require__(24)
|
||
|
, dP = Object.defineProperty;
|
||
|
|
||
|
exports.f = __webpack_require__(21) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
||
|
anObject(O);
|
||
|
P = toPrimitive(P, true);
|
||
|
anObject(Attributes);
|
||
|
if(IE8_DOM_DEFINE)try {
|
||
|
return dP(O, P, Attributes);
|
||
|
} catch(e){ /* empty */ }
|
||
|
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
||
|
if('value' in Attributes)O[P] = Attributes.value;
|
||
|
return O;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 18 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var isObject = __webpack_require__(19);
|
||
|
module.exports = function(it){
|
||
|
if(!isObject(it))throw TypeError(it + ' is not an object!');
|
||
|
return it;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 19 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(it){
|
||
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 20 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = !__webpack_require__(21) && !__webpack_require__(22)(function(){
|
||
|
return Object.defineProperty(__webpack_require__(23)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
||
|
});
|
||
|
|
||
|
/***/ },
|
||
|
/* 21 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// Thank's IE8 for his funny defineProperty
|
||
|
module.exports = !__webpack_require__(22)(function(){
|
||
|
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
||
|
});
|
||
|
|
||
|
/***/ },
|
||
|
/* 22 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(exec){
|
||
|
try {
|
||
|
return !!exec();
|
||
|
} catch(e){
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 23 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var isObject = __webpack_require__(19)
|
||
|
, document = __webpack_require__(12).document
|
||
|
// in old IE typeof document.createElement is 'object'
|
||
|
, is = isObject(document) && isObject(document.createElement);
|
||
|
module.exports = function(it){
|
||
|
return is ? document.createElement(it) : {};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 24 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
||
|
var isObject = __webpack_require__(19);
|
||
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||
|
// and the second argument - flag - preferred type is a string
|
||
|
module.exports = function(it, S){
|
||
|
if(!isObject(it))return it;
|
||
|
var fn, val;
|
||
|
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||
|
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
||
|
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
||
|
throw TypeError("Can't convert object to primitive value");
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 25 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(bitmap, value){
|
||
|
return {
|
||
|
enumerable : !(bitmap & 1),
|
||
|
configurable: !(bitmap & 2),
|
||
|
writable : !(bitmap & 4),
|
||
|
value : value
|
||
|
};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 26 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = __webpack_require__(16);
|
||
|
|
||
|
/***/ },
|
||
|
/* 27 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
var hasOwnProperty = {}.hasOwnProperty;
|
||
|
module.exports = function(it, key){
|
||
|
return hasOwnProperty.call(it, key);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 28 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = {};
|
||
|
|
||
|
/***/ },
|
||
|
/* 29 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var create = __webpack_require__(30)
|
||
|
, descriptor = __webpack_require__(25)
|
||
|
, setToStringTag = __webpack_require__(45)
|
||
|
, IteratorPrototype = {};
|
||
|
|
||
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
||
|
__webpack_require__(16)(IteratorPrototype, __webpack_require__(46)('iterator'), function(){ return this; });
|
||
|
|
||
|
module.exports = function(Constructor, NAME, next){
|
||
|
Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
|
||
|
setToStringTag(Constructor, NAME + ' Iterator');
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 30 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
||
|
var anObject = __webpack_require__(18)
|
||
|
, dPs = __webpack_require__(31)
|
||
|
, enumBugKeys = __webpack_require__(43)
|
||
|
, IE_PROTO = __webpack_require__(40)('IE_PROTO')
|
||
|
, Empty = function(){ /* empty */ }
|
||
|
, PROTOTYPE = 'prototype';
|
||
|
|
||
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
||
|
var createDict = function(){
|
||
|
// Thrash, waste and sodomy: IE GC bug
|
||
|
var iframe = __webpack_require__(23)('iframe')
|
||
|
, i = enumBugKeys.length
|
||
|
, lt = '<'
|
||
|
, gt = '>'
|
||
|
, iframeDocument;
|
||
|
iframe.style.display = 'none';
|
||
|
__webpack_require__(44).appendChild(iframe);
|
||
|
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
||
|
// createDict = iframe.contentWindow.Object;
|
||
|
// html.removeChild(iframe);
|
||
|
iframeDocument = iframe.contentWindow.document;
|
||
|
iframeDocument.open();
|
||
|
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
||
|
iframeDocument.close();
|
||
|
createDict = iframeDocument.F;
|
||
|
while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
|
||
|
return createDict();
|
||
|
};
|
||
|
|
||
|
module.exports = Object.create || function create(O, Properties){
|
||
|
var result;
|
||
|
if(O !== null){
|
||
|
Empty[PROTOTYPE] = anObject(O);
|
||
|
result = new Empty;
|
||
|
Empty[PROTOTYPE] = null;
|
||
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
||
|
result[IE_PROTO] = O;
|
||
|
} else result = createDict();
|
||
|
return Properties === undefined ? result : dPs(result, Properties);
|
||
|
};
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 31 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var dP = __webpack_require__(17)
|
||
|
, anObject = __webpack_require__(18)
|
||
|
, getKeys = __webpack_require__(32);
|
||
|
|
||
|
module.exports = __webpack_require__(21) ? Object.defineProperties : function defineProperties(O, Properties){
|
||
|
anObject(O);
|
||
|
var keys = getKeys(Properties)
|
||
|
, length = keys.length
|
||
|
, i = 0
|
||
|
, P;
|
||
|
while(length > i)dP.f(O, P = keys[i++], Properties[P]);
|
||
|
return O;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 32 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||
|
var $keys = __webpack_require__(33)
|
||
|
, enumBugKeys = __webpack_require__(43);
|
||
|
|
||
|
module.exports = Object.keys || function keys(O){
|
||
|
return $keys(O, enumBugKeys);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 33 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var has = __webpack_require__(27)
|
||
|
, toIObject = __webpack_require__(34)
|
||
|
, arrayIndexOf = __webpack_require__(37)(false)
|
||
|
, IE_PROTO = __webpack_require__(40)('IE_PROTO');
|
||
|
|
||
|
module.exports = function(object, names){
|
||
|
var O = toIObject(object)
|
||
|
, i = 0
|
||
|
, result = []
|
||
|
, key;
|
||
|
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
||
|
// Don't enum bug & hidden keys
|
||
|
while(names.length > i)if(has(O, key = names[i++])){
|
||
|
~arrayIndexOf(result, key) || result.push(key);
|
||
|
}
|
||
|
return result;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 34 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||
|
var IObject = __webpack_require__(35)
|
||
|
, defined = __webpack_require__(8);
|
||
|
module.exports = function(it){
|
||
|
return IObject(defined(it));
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 35 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||
|
var cof = __webpack_require__(36);
|
||
|
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
||
|
return cof(it) == 'String' ? it.split('') : Object(it);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 36 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
var toString = {}.toString;
|
||
|
|
||
|
module.exports = function(it){
|
||
|
return toString.call(it).slice(8, -1);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 37 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// false -> Array#indexOf
|
||
|
// true -> Array#includes
|
||
|
var toIObject = __webpack_require__(34)
|
||
|
, toLength = __webpack_require__(38)
|
||
|
, toIndex = __webpack_require__(39);
|
||
|
module.exports = function(IS_INCLUDES){
|
||
|
return function($this, el, fromIndex){
|
||
|
var O = toIObject($this)
|
||
|
, length = toLength(O.length)
|
||
|
, index = toIndex(fromIndex, length)
|
||
|
, value;
|
||
|
// Array#includes uses SameValueZero equality algorithm
|
||
|
if(IS_INCLUDES && el != el)while(length > index){
|
||
|
value = O[index++];
|
||
|
if(value != value)return true;
|
||
|
// Array#toIndex ignores holes, Array#includes - not
|
||
|
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
||
|
if(O[index] === el)return IS_INCLUDES || index || 0;
|
||
|
} return !IS_INCLUDES && -1;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 38 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 7.1.15 ToLength
|
||
|
var toInteger = __webpack_require__(7)
|
||
|
, min = Math.min;
|
||
|
module.exports = function(it){
|
||
|
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 39 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var toInteger = __webpack_require__(7)
|
||
|
, max = Math.max
|
||
|
, min = Math.min;
|
||
|
module.exports = function(index, length){
|
||
|
index = toInteger(index);
|
||
|
return index < 0 ? max(index + length, 0) : min(index, length);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 40 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var shared = __webpack_require__(41)('keys')
|
||
|
, uid = __webpack_require__(42);
|
||
|
module.exports = function(key){
|
||
|
return shared[key] || (shared[key] = uid(key));
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 41 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var global = __webpack_require__(12)
|
||
|
, SHARED = '__core-js_shared__'
|
||
|
, store = global[SHARED] || (global[SHARED] = {});
|
||
|
module.exports = function(key){
|
||
|
return store[key] || (store[key] = {});
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 42 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
var id = 0
|
||
|
, px = Math.random();
|
||
|
module.exports = function(key){
|
||
|
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 43 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
// IE 8- don't enum bug keys
|
||
|
module.exports = (
|
||
|
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||
|
).split(',');
|
||
|
|
||
|
/***/ },
|
||
|
/* 44 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = __webpack_require__(12).document && document.documentElement;
|
||
|
|
||
|
/***/ },
|
||
|
/* 45 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var def = __webpack_require__(17).f
|
||
|
, has = __webpack_require__(27)
|
||
|
, TAG = __webpack_require__(46)('toStringTag');
|
||
|
|
||
|
module.exports = function(it, tag, stat){
|
||
|
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 46 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var store = __webpack_require__(41)('wks')
|
||
|
, uid = __webpack_require__(42)
|
||
|
, Symbol = __webpack_require__(12).Symbol
|
||
|
, USE_SYMBOL = typeof Symbol == 'function';
|
||
|
|
||
|
var $exports = module.exports = function(name){
|
||
|
return store[name] || (store[name] =
|
||
|
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
||
|
};
|
||
|
|
||
|
$exports.store = store;
|
||
|
|
||
|
/***/ },
|
||
|
/* 47 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
||
|
var has = __webpack_require__(27)
|
||
|
, toObject = __webpack_require__(48)
|
||
|
, IE_PROTO = __webpack_require__(40)('IE_PROTO')
|
||
|
, ObjectProto = Object.prototype;
|
||
|
|
||
|
module.exports = Object.getPrototypeOf || function(O){
|
||
|
O = toObject(O);
|
||
|
if(has(O, IE_PROTO))return O[IE_PROTO];
|
||
|
if(typeof O.constructor == 'function' && O instanceof O.constructor){
|
||
|
return O.constructor.prototype;
|
||
|
} return O instanceof Object ? ObjectProto : null;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 48 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 7.1.13 ToObject(argument)
|
||
|
var defined = __webpack_require__(8);
|
||
|
module.exports = function(it){
|
||
|
return Object(defined(it));
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 49 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(50);
|
||
|
var global = __webpack_require__(12)
|
||
|
, hide = __webpack_require__(16)
|
||
|
, Iterators = __webpack_require__(28)
|
||
|
, TO_STRING_TAG = __webpack_require__(46)('toStringTag');
|
||
|
|
||
|
for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
|
||
|
var NAME = collections[i]
|
||
|
, Collection = global[NAME]
|
||
|
, proto = Collection && Collection.prototype;
|
||
|
if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
|
||
|
Iterators[NAME] = Iterators.Array;
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 50 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var addToUnscopables = __webpack_require__(51)
|
||
|
, step = __webpack_require__(52)
|
||
|
, Iterators = __webpack_require__(28)
|
||
|
, toIObject = __webpack_require__(34);
|
||
|
|
||
|
// 22.1.3.4 Array.prototype.entries()
|
||
|
// 22.1.3.13 Array.prototype.keys()
|
||
|
// 22.1.3.29 Array.prototype.values()
|
||
|
// 22.1.3.30 Array.prototype[@@iterator]()
|
||
|
module.exports = __webpack_require__(9)(Array, 'Array', function(iterated, kind){
|
||
|
this._t = toIObject(iterated); // target
|
||
|
this._i = 0; // next index
|
||
|
this._k = kind; // kind
|
||
|
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
||
|
}, function(){
|
||
|
var O = this._t
|
||
|
, kind = this._k
|
||
|
, index = this._i++;
|
||
|
if(!O || index >= O.length){
|
||
|
this._t = undefined;
|
||
|
return step(1);
|
||
|
}
|
||
|
if(kind == 'keys' )return step(0, index);
|
||
|
if(kind == 'values')return step(0, O[index]);
|
||
|
return step(0, [index, O[index]]);
|
||
|
}, 'values');
|
||
|
|
||
|
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
||
|
Iterators.Arguments = Iterators.Array;
|
||
|
|
||
|
addToUnscopables('keys');
|
||
|
addToUnscopables('values');
|
||
|
addToUnscopables('entries');
|
||
|
|
||
|
/***/ },
|
||
|
/* 51 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(){ /* empty */ };
|
||
|
|
||
|
/***/ },
|
||
|
/* 52 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function(done, value){
|
||
|
return {value: value, done: !!done};
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 53 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
exports.f = __webpack_require__(46);
|
||
|
|
||
|
/***/ },
|
||
|
/* 54 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = { "default": __webpack_require__(55), __esModule: true };
|
||
|
|
||
|
/***/ },
|
||
|
/* 55 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(56);
|
||
|
__webpack_require__(67);
|
||
|
__webpack_require__(68);
|
||
|
__webpack_require__(69);
|
||
|
module.exports = __webpack_require__(13).Symbol;
|
||
|
|
||
|
/***/ },
|
||
|
/* 56 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
// ECMAScript 6 symbols shim
|
||
|
var global = __webpack_require__(12)
|
||
|
, has = __webpack_require__(27)
|
||
|
, DESCRIPTORS = __webpack_require__(21)
|
||
|
, $export = __webpack_require__(11)
|
||
|
, redefine = __webpack_require__(26)
|
||
|
, META = __webpack_require__(57).KEY
|
||
|
, $fails = __webpack_require__(22)
|
||
|
, shared = __webpack_require__(41)
|
||
|
, setToStringTag = __webpack_require__(45)
|
||
|
, uid = __webpack_require__(42)
|
||
|
, wks = __webpack_require__(46)
|
||
|
, wksExt = __webpack_require__(53)
|
||
|
, wksDefine = __webpack_require__(58)
|
||
|
, keyOf = __webpack_require__(59)
|
||
|
, enumKeys = __webpack_require__(60)
|
||
|
, isArray = __webpack_require__(63)
|
||
|
, anObject = __webpack_require__(18)
|
||
|
, toIObject = __webpack_require__(34)
|
||
|
, toPrimitive = __webpack_require__(24)
|
||
|
, createDesc = __webpack_require__(25)
|
||
|
, _create = __webpack_require__(30)
|
||
|
, gOPNExt = __webpack_require__(64)
|
||
|
, $GOPD = __webpack_require__(66)
|
||
|
, $DP = __webpack_require__(17)
|
||
|
, $keys = __webpack_require__(32)
|
||
|
, gOPD = $GOPD.f
|
||
|
, dP = $DP.f
|
||
|
, gOPN = gOPNExt.f
|
||
|
, $Symbol = global.Symbol
|
||
|
, $JSON = global.JSON
|
||
|
, _stringify = $JSON && $JSON.stringify
|
||
|
, PROTOTYPE = 'prototype'
|
||
|
, HIDDEN = wks('_hidden')
|
||
|
, TO_PRIMITIVE = wks('toPrimitive')
|
||
|
, isEnum = {}.propertyIsEnumerable
|
||
|
, SymbolRegistry = shared('symbol-registry')
|
||
|
, AllSymbols = shared('symbols')
|
||
|
, OPSymbols = shared('op-symbols')
|
||
|
, ObjectProto = Object[PROTOTYPE]
|
||
|
, USE_NATIVE = typeof $Symbol == 'function'
|
||
|
, QObject = global.QObject;
|
||
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
||
|
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
||
|
|
||
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
||
|
var setSymbolDesc = DESCRIPTORS && $fails(function(){
|
||
|
return _create(dP({}, 'a', {
|
||
|
get: function(){ return dP(this, 'a', {value: 7}).a; }
|
||
|
})).a != 7;
|
||
|
}) ? function(it, key, D){
|
||
|
var protoDesc = gOPD(ObjectProto, key);
|
||
|
if(protoDesc)delete ObjectProto[key];
|
||
|
dP(it, key, D);
|
||
|
if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
|
||
|
} : dP;
|
||
|
|
||
|
var wrap = function(tag){
|
||
|
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
||
|
sym._k = tag;
|
||
|
return sym;
|
||
|
};
|
||
|
|
||
|
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
|
||
|
return typeof it == 'symbol';
|
||
|
} : function(it){
|
||
|
return it instanceof $Symbol;
|
||
|
};
|
||
|
|
||
|
var $defineProperty = function defineProperty(it, key, D){
|
||
|
if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
|
||
|
anObject(it);
|
||
|
key = toPrimitive(key, true);
|
||
|
anObject(D);
|
||
|
if(has(AllSymbols, key)){
|
||
|
if(!D.enumerable){
|
||
|
if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
|
||
|
it[HIDDEN][key] = true;
|
||
|
} else {
|
||
|
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
|
||
|
D = _create(D, {enumerable: createDesc(0, false)});
|
||
|
} return setSymbolDesc(it, key, D);
|
||
|
} return dP(it, key, D);
|
||
|
};
|
||
|
var $defineProperties = function defineProperties(it, P){
|
||
|
anObject(it);
|
||
|
var keys = enumKeys(P = toIObject(P))
|
||
|
, i = 0
|
||
|
, l = keys.length
|
||
|
, key;
|
||
|
while(l > i)$defineProperty(it, key = keys[i++], P[key]);
|
||
|
return it;
|
||
|
};
|
||
|
var $create = function create(it, P){
|
||
|
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
||
|
};
|
||
|
var $propertyIsEnumerable = function propertyIsEnumerable(key){
|
||
|
var E = isEnum.call(this, key = toPrimitive(key, true));
|
||
|
if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
|
||
|
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
||
|
};
|
||
|
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
|
||
|
it = toIObject(it);
|
||
|
key = toPrimitive(key, true);
|
||
|
if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
|
||
|
var D = gOPD(it, key);
|
||
|
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
|
||
|
return D;
|
||
|
};
|
||
|
var $getOwnPropertyNames = function getOwnPropertyNames(it){
|
||
|
var names = gOPN(toIObject(it))
|
||
|
, result = []
|
||
|
, i = 0
|
||
|
, key;
|
||
|
while(names.length > i){
|
||
|
if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
|
||
|
} return result;
|
||
|
};
|
||
|
var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
|
||
|
var IS_OP = it === ObjectProto
|
||
|
, names = gOPN(IS_OP ? OPSymbols : toIObject(it))
|
||
|
, result = []
|
||
|
, i = 0
|
||
|
, key;
|
||
|
while(names.length > i){
|
||
|
if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
|
||
|
} return result;
|
||
|
};
|
||
|
|
||
|
// 19.4.1.1 Symbol([description])
|
||
|
if(!USE_NATIVE){
|
||
|
$Symbol = function Symbol(){
|
||
|
if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
|
||
|
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
||
|
var $set = function(value){
|
||
|
if(this === ObjectProto)$set.call(OPSymbols, value);
|
||
|
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
||
|
setSymbolDesc(this, tag, createDesc(1, value));
|
||
|
};
|
||
|
if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
|
||
|
return wrap(tag);
|
||
|
};
|
||
|
redefine($Symbol[PROTOTYPE], 'toString', function toString(){
|
||
|
return this._k;
|
||
|
});
|
||
|
|
||
|
$GOPD.f = $getOwnPropertyDescriptor;
|
||
|
$DP.f = $defineProperty;
|
||
|
__webpack_require__(65).f = gOPNExt.f = $getOwnPropertyNames;
|
||
|
__webpack_require__(62).f = $propertyIsEnumerable;
|
||
|
__webpack_require__(61).f = $getOwnPropertySymbols;
|
||
|
|
||
|
if(DESCRIPTORS && !__webpack_require__(10)){
|
||
|
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
||
|
}
|
||
|
|
||
|
wksExt.f = function(name){
|
||
|
return wrap(wks(name));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
|
||
|
|
||
|
for(var symbols = (
|
||
|
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
|
||
|
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
||
|
).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
|
||
|
|
||
|
for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
|
||
|
|
||
|
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
||
|
// 19.4.2.1 Symbol.for(key)
|
||
|
'for': function(key){
|
||
|
return has(SymbolRegistry, key += '')
|
||
|
? SymbolRegistry[key]
|
||
|
: SymbolRegistry[key] = $Symbol(key);
|
||
|
},
|
||
|
// 19.4.2.5 Symbol.keyFor(sym)
|
||
|
keyFor: function keyFor(key){
|
||
|
if(isSymbol(key))return keyOf(SymbolRegistry, key);
|
||
|
throw TypeError(key + ' is not a symbol!');
|
||
|
},
|
||
|
useSetter: function(){ setter = true; },
|
||
|
useSimple: function(){ setter = false; }
|
||
|
});
|
||
|
|
||
|
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
||
|
// 19.1.2.2 Object.create(O [, Properties])
|
||
|
create: $create,
|
||
|
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
||
|
defineProperty: $defineProperty,
|
||
|
// 19.1.2.3 Object.defineProperties(O, Properties)
|
||
|
defineProperties: $defineProperties,
|
||
|
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
||
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
||
|
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
||
|
getOwnPropertyNames: $getOwnPropertyNames,
|
||
|
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
||
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
||
|
});
|
||
|
|
||
|
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
||
|
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
|
||
|
var S = $Symbol();
|
||
|
// MS Edge converts symbol values to JSON as {}
|
||
|
// WebKit converts symbol values to JSON as null
|
||
|
// V8 throws on boxed symbols
|
||
|
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
|
||
|
})), 'JSON', {
|
||
|
stringify: function stringify(it){
|
||
|
if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
|
||
|
var args = [it]
|
||
|
, i = 1
|
||
|
, replacer, $replacer;
|
||
|
while(arguments.length > i)args.push(arguments[i++]);
|
||
|
replacer = args[1];
|
||
|
if(typeof replacer == 'function')$replacer = replacer;
|
||
|
if($replacer || !isArray(replacer))replacer = function(key, value){
|
||
|
if($replacer)value = $replacer.call(this, key, value);
|
||
|
if(!isSymbol(value))return value;
|
||
|
};
|
||
|
args[1] = replacer;
|
||
|
return _stringify.apply($JSON, args);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
|
||
|
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(16)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
||
|
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
||
|
setToStringTag($Symbol, 'Symbol');
|
||
|
// 20.2.1.9 Math[@@toStringTag]
|
||
|
setToStringTag(Math, 'Math', true);
|
||
|
// 24.3.3 JSON[@@toStringTag]
|
||
|
setToStringTag(global.JSON, 'JSON', true);
|
||
|
|
||
|
/***/ },
|
||
|
/* 57 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var META = __webpack_require__(42)('meta')
|
||
|
, isObject = __webpack_require__(19)
|
||
|
, has = __webpack_require__(27)
|
||
|
, setDesc = __webpack_require__(17).f
|
||
|
, id = 0;
|
||
|
var isExtensible = Object.isExtensible || function(){
|
||
|
return true;
|
||
|
};
|
||
|
var FREEZE = !__webpack_require__(22)(function(){
|
||
|
return isExtensible(Object.preventExtensions({}));
|
||
|
});
|
||
|
var setMeta = function(it){
|
||
|
setDesc(it, META, {value: {
|
||
|
i: 'O' + ++id, // object ID
|
||
|
w: {} // weak collections IDs
|
||
|
}});
|
||
|
};
|
||
|
var fastKey = function(it, create){
|
||
|
// return primitive with prefix
|
||
|
if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
||
|
if(!has(it, META)){
|
||
|
// can't set metadata to uncaught frozen object
|
||
|
if(!isExtensible(it))return 'F';
|
||
|
// not necessary to add metadata
|
||
|
if(!create)return 'E';
|
||
|
// add missing metadata
|
||
|
setMeta(it);
|
||
|
// return object ID
|
||
|
} return it[META].i;
|
||
|
};
|
||
|
var getWeak = function(it, create){
|
||
|
if(!has(it, META)){
|
||
|
// can't set metadata to uncaught frozen object
|
||
|
if(!isExtensible(it))return true;
|
||
|
// not necessary to add metadata
|
||
|
if(!create)return false;
|
||
|
// add missing metadata
|
||
|
setMeta(it);
|
||
|
// return hash weak collections IDs
|
||
|
} return it[META].w;
|
||
|
};
|
||
|
// add metadata on freeze-family methods calling
|
||
|
var onFreeze = function(it){
|
||
|
if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
|
||
|
return it;
|
||
|
};
|
||
|
var meta = module.exports = {
|
||
|
KEY: META,
|
||
|
NEED: false,
|
||
|
fastKey: fastKey,
|
||
|
getWeak: getWeak,
|
||
|
onFreeze: onFreeze
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 58 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var global = __webpack_require__(12)
|
||
|
, core = __webpack_require__(13)
|
||
|
, LIBRARY = __webpack_require__(10)
|
||
|
, wksExt = __webpack_require__(53)
|
||
|
, defineProperty = __webpack_require__(17).f;
|
||
|
module.exports = function(name){
|
||
|
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
||
|
if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 59 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var getKeys = __webpack_require__(32)
|
||
|
, toIObject = __webpack_require__(34);
|
||
|
module.exports = function(object, el){
|
||
|
var O = toIObject(object)
|
||
|
, keys = getKeys(O)
|
||
|
, length = keys.length
|
||
|
, index = 0
|
||
|
, key;
|
||
|
while(length > index)if(O[key = keys[index++]] === el)return key;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 60 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// all enumerable object keys, includes symbols
|
||
|
var getKeys = __webpack_require__(32)
|
||
|
, gOPS = __webpack_require__(61)
|
||
|
, pIE = __webpack_require__(62);
|
||
|
module.exports = function(it){
|
||
|
var result = getKeys(it)
|
||
|
, getSymbols = gOPS.f;
|
||
|
if(getSymbols){
|
||
|
var symbols = getSymbols(it)
|
||
|
, isEnum = pIE.f
|
||
|
, i = 0
|
||
|
, key;
|
||
|
while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
|
||
|
} return result;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 61 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
exports.f = Object.getOwnPropertySymbols;
|
||
|
|
||
|
/***/ },
|
||
|
/* 62 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
exports.f = {}.propertyIsEnumerable;
|
||
|
|
||
|
/***/ },
|
||
|
/* 63 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 7.2.2 IsArray(argument)
|
||
|
var cof = __webpack_require__(36);
|
||
|
module.exports = Array.isArray || function isArray(arg){
|
||
|
return cof(arg) == 'Array';
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 64 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
||
|
var toIObject = __webpack_require__(34)
|
||
|
, gOPN = __webpack_require__(65).f
|
||
|
, toString = {}.toString;
|
||
|
|
||
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
||
|
? Object.getOwnPropertyNames(window) : [];
|
||
|
|
||
|
var getWindowNames = function(it){
|
||
|
try {
|
||
|
return gOPN(it);
|
||
|
} catch(e){
|
||
|
return windowNames.slice();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports.f = function getOwnPropertyNames(it){
|
||
|
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
||
|
};
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 65 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
||
|
var $keys = __webpack_require__(33)
|
||
|
, hiddenKeys = __webpack_require__(43).concat('length', 'prototype');
|
||
|
|
||
|
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
|
||
|
return $keys(O, hiddenKeys);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 66 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var pIE = __webpack_require__(62)
|
||
|
, createDesc = __webpack_require__(25)
|
||
|
, toIObject = __webpack_require__(34)
|
||
|
, toPrimitive = __webpack_require__(24)
|
||
|
, has = __webpack_require__(27)
|
||
|
, IE8_DOM_DEFINE = __webpack_require__(20)
|
||
|
, gOPD = Object.getOwnPropertyDescriptor;
|
||
|
|
||
|
exports.f = __webpack_require__(21) ? gOPD : function getOwnPropertyDescriptor(O, P){
|
||
|
O = toIObject(O);
|
||
|
P = toPrimitive(P, true);
|
||
|
if(IE8_DOM_DEFINE)try {
|
||
|
return gOPD(O, P);
|
||
|
} catch(e){ /* empty */ }
|
||
|
if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 67 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 68 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(58)('asyncIterator');
|
||
|
|
||
|
/***/ },
|
||
|
/* 69 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(58)('observable');
|
||
|
|
||
|
/***/ },
|
||
|
/* 70 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = { "default": __webpack_require__(71), __esModule: true };
|
||
|
|
||
|
/***/ },
|
||
|
/* 71 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(5);
|
||
|
__webpack_require__(72);
|
||
|
module.exports = __webpack_require__(13).Array.from;
|
||
|
|
||
|
/***/ },
|
||
|
/* 72 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var ctx = __webpack_require__(14)
|
||
|
, $export = __webpack_require__(11)
|
||
|
, toObject = __webpack_require__(48)
|
||
|
, call = __webpack_require__(73)
|
||
|
, isArrayIter = __webpack_require__(74)
|
||
|
, toLength = __webpack_require__(38)
|
||
|
, createProperty = __webpack_require__(75)
|
||
|
, getIterFn = __webpack_require__(76);
|
||
|
|
||
|
$export($export.S + $export.F * !__webpack_require__(78)(function(iter){ Array.from(iter); }), 'Array', {
|
||
|
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
|
||
|
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
|
||
|
var O = toObject(arrayLike)
|
||
|
, C = typeof this == 'function' ? this : Array
|
||
|
, aLen = arguments.length
|
||
|
, mapfn = aLen > 1 ? arguments[1] : undefined
|
||
|
, mapping = mapfn !== undefined
|
||
|
, index = 0
|
||
|
, iterFn = getIterFn(O)
|
||
|
, length, result, step, iterator;
|
||
|
if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
|
||
|
// if object isn't iterable or it's array with default iterator - use simple case
|
||
|
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
|
||
|
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
|
||
|
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
|
||
|
}
|
||
|
} else {
|
||
|
length = toLength(O.length);
|
||
|
for(result = new C(length); length > index; index++){
|
||
|
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
|
||
|
}
|
||
|
}
|
||
|
result.length = index;
|
||
|
return result;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 73 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// call something on iterator step with safe closing on error
|
||
|
var anObject = __webpack_require__(18);
|
||
|
module.exports = function(iterator, fn, value, entries){
|
||
|
try {
|
||
|
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
|
||
|
// 7.4.6 IteratorClose(iterator, completion)
|
||
|
} catch(e){
|
||
|
var ret = iterator['return'];
|
||
|
if(ret !== undefined)anObject(ret.call(iterator));
|
||
|
throw e;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 74 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// check on default Array iterator
|
||
|
var Iterators = __webpack_require__(28)
|
||
|
, ITERATOR = __webpack_require__(46)('iterator')
|
||
|
, ArrayProto = Array.prototype;
|
||
|
|
||
|
module.exports = function(it){
|
||
|
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 75 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
var $defineProperty = __webpack_require__(17)
|
||
|
, createDesc = __webpack_require__(25);
|
||
|
|
||
|
module.exports = function(object, index, value){
|
||
|
if(index in object)$defineProperty.f(object, index, createDesc(0, value));
|
||
|
else object[index] = value;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 76 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var classof = __webpack_require__(77)
|
||
|
, ITERATOR = __webpack_require__(46)('iterator')
|
||
|
, Iterators = __webpack_require__(28);
|
||
|
module.exports = __webpack_require__(13).getIteratorMethod = function(it){
|
||
|
if(it != undefined)return it[ITERATOR]
|
||
|
|| it['@@iterator']
|
||
|
|| Iterators[classof(it)];
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 77 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// getting tag from 19.1.3.6 Object.prototype.toString()
|
||
|
var cof = __webpack_require__(36)
|
||
|
, TAG = __webpack_require__(46)('toStringTag')
|
||
|
// ES3 wrong here
|
||
|
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
|
||
|
|
||
|
// fallback for IE11 Script Access Denied error
|
||
|
var tryGet = function(it, key){
|
||
|
try {
|
||
|
return it[key];
|
||
|
} catch(e){ /* empty */ }
|
||
|
};
|
||
|
|
||
|
module.exports = function(it){
|
||
|
var O, T, B;
|
||
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
||
|
// @@toStringTag case
|
||
|
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
||
|
// builtinTag case
|
||
|
: ARG ? cof(O)
|
||
|
// ES3 arguments fallback
|
||
|
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 78 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var ITERATOR = __webpack_require__(46)('iterator')
|
||
|
, SAFE_CLOSING = false;
|
||
|
|
||
|
try {
|
||
|
var riter = [7][ITERATOR]();
|
||
|
riter['return'] = function(){ SAFE_CLOSING = true; };
|
||
|
Array.from(riter, function(){ throw 2; });
|
||
|
} catch(e){ /* empty */ }
|
||
|
|
||
|
module.exports = function(exec, skipClosing){
|
||
|
if(!skipClosing && !SAFE_CLOSING)return false;
|
||
|
var safe = false;
|
||
|
try {
|
||
|
var arr = [7]
|
||
|
, iter = arr[ITERATOR]();
|
||
|
iter.next = function(){ return {done: safe = true}; };
|
||
|
arr[ITERATOR] = function(){ return iter; };
|
||
|
exec(arr);
|
||
|
} catch(e){ /* empty */ }
|
||
|
return safe;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 79 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
|
||
|
var _assign = __webpack_require__(80);
|
||
|
|
||
|
var _assign2 = _interopRequireDefault(_assign);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
exports.default = _assign2.default || function (target) {
|
||
|
for (var i = 1; i < arguments.length; i++) {
|
||
|
var source = arguments[i];
|
||
|
|
||
|
for (var key in source) {
|
||
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||
|
target[key] = source[key];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return target;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 80 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = { "default": __webpack_require__(81), __esModule: true };
|
||
|
|
||
|
/***/ },
|
||
|
/* 81 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(82);
|
||
|
module.exports = __webpack_require__(13).Object.assign;
|
||
|
|
||
|
/***/ },
|
||
|
/* 82 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
// 19.1.3.1 Object.assign(target, source)
|
||
|
var $export = __webpack_require__(11);
|
||
|
|
||
|
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(83)});
|
||
|
|
||
|
/***/ },
|
||
|
/* 83 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
// 19.1.2.1 Object.assign(target, source, ...)
|
||
|
var getKeys = __webpack_require__(32)
|
||
|
, gOPS = __webpack_require__(61)
|
||
|
, pIE = __webpack_require__(62)
|
||
|
, toObject = __webpack_require__(48)
|
||
|
, IObject = __webpack_require__(35)
|
||
|
, $assign = Object.assign;
|
||
|
|
||
|
// should work with symbols and should have deterministic property order (V8 bug)
|
||
|
module.exports = !$assign || __webpack_require__(22)(function(){
|
||
|
var A = {}
|
||
|
, B = {}
|
||
|
, S = Symbol()
|
||
|
, K = 'abcdefghijklmnopqrst';
|
||
|
A[S] = 7;
|
||
|
K.split('').forEach(function(k){ B[k] = k; });
|
||
|
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
||
|
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
|
||
|
var T = toObject(target)
|
||
|
, aLen = arguments.length
|
||
|
, index = 1
|
||
|
, getSymbols = gOPS.f
|
||
|
, isEnum = pIE.f;
|
||
|
while(aLen > index){
|
||
|
var S = IObject(arguments[index++])
|
||
|
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
|
||
|
, length = keys.length
|
||
|
, j = 0
|
||
|
, key;
|
||
|
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
|
||
|
} return T;
|
||
|
} : $assign;
|
||
|
|
||
|
/***/ },
|
||
|
/* 84 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
|
||
|
exports.default = function (instance, Constructor) {
|
||
|
if (!(instance instanceof Constructor)) {
|
||
|
throw new TypeError("Cannot call a class as a function");
|
||
|
}
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 85 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
exports.__esModule = true;
|
||
|
|
||
|
var _defineProperty = __webpack_require__(86);
|
||
|
|
||
|
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
exports.default = function () {
|
||
|
function defineProperties(target, props) {
|
||
|
for (var i = 0; i < props.length; i++) {
|
||
|
var descriptor = props[i];
|
||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||
|
descriptor.configurable = true;
|
||
|
if ("value" in descriptor) descriptor.writable = true;
|
||
|
(0, _defineProperty2.default)(target, descriptor.key, descriptor);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return function (Constructor, protoProps, staticProps) {
|
||
|
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||
|
if (staticProps) defineProperties(Constructor, staticProps);
|
||
|
return Constructor;
|
||
|
};
|
||
|
}();
|
||
|
|
||
|
/***/ },
|
||
|
/* 86 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
module.exports = { "default": __webpack_require__(87), __esModule: true };
|
||
|
|
||
|
/***/ },
|
||
|
/* 87 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(88);
|
||
|
var $Object = __webpack_require__(13).Object;
|
||
|
module.exports = function defineProperty(it, key, desc){
|
||
|
return $Object.defineProperty(it, key, desc);
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 88 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var $export = __webpack_require__(11);
|
||
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
||
|
$export($export.S + $export.F * !__webpack_require__(21), 'Object', {defineProperty: __webpack_require__(17).f});
|
||
|
|
||
|
/***/ },
|
||
|
/* 89 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(90)(__webpack_require__(91))
|
||
|
|
||
|
/***/ },
|
||
|
/* 90 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
/*
|
||
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
|
Author Tobias Koppers @sokra
|
||
|
*/
|
||
|
module.exports = function(src) {
|
||
|
if (typeof execScript !== "undefined")
|
||
|
execScript(src);
|
||
|
else
|
||
|
eval.call(null, src);
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 91 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = "/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var f;\"undefined\"!=typeof window?f=window:\"undefined\"!=typeof global?f=global:\"undefined\"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){\"use strict\";var _keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";exports.encode=function(input,utf8){var output=\"\";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+_keyStr.charAt(enc1)+_keyStr.charAt(enc2)+_keyStr.charAt(enc3)+_keyStr.charAt(enc4)}return output};exports.decode=function(input,utf8){var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");while(i<input.length){enc1=_keyStr.indexOf(input.charAt(i++));enc2=_keyStr.indexOf(input.charAt(i++));enc3=_keyStr.indexOf(input.charAt(i++));enc4=_keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)}if(enc4!=64){output=output+String.fromCharCode(chr3)}}return output}},{}],2:[function(_dereq_,module,exports){\"use strict\";function CompressedObject(){this.compressedSize=0;this.uncompressedSize=0;this.crc32=0;this.compressionMethod=null;this.compressedContent=null}CompressedObject.prototype={getContent:function(){return null},getCompressedContent:function(){return null}};module.exports=CompressedObject},{}],3:[function(_dereq_,module,exports){\"use strict\";exports.STORE={magic:\"\\x00\\x00\",compress:function(content){return content},uncompress:function(content){return content},compressInputType:null,uncompressInputType:null};exports.DEFLATE=_dereq_(\"./flate\")},{\"./flate\":8}],4:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");var table=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068
|
||
|
|
||
|
/***/ },
|
||
|
/* 92 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
|
||
|
* A saveAs() FileSaver implementation.
|
||
|
* 1.1.20150716
|
||
|
*
|
||
|
* By Eli Grey, http://eligrey.com
|
||
|
* License: X11/MIT
|
||
|
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
|
||
|
*/
|
||
|
|
||
|
/*global self */
|
||
|
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
|
||
|
|
||
|
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
||
|
|
||
|
var saveAs = saveAs || (function(view) {
|
||
|
"use strict";
|
||
|
// IE <10 is explicitly unsupported
|
||
|
if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
|
||
|
return;
|
||
|
}
|
||
|
var
|
||
|
doc = view.document
|
||
|
// only get URL when necessary in case Blob.js hasn't overridden it yet
|
||
|
, get_URL = function() {
|
||
|
return view.URL || view.webkitURL || view;
|
||
|
}
|
||
|
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
|
||
|
, can_use_save_link = "download" in save_link
|
||
|
, click = function(node) {
|
||
|
var event = new MouseEvent("click");
|
||
|
node.dispatchEvent(event);
|
||
|
}
|
||
|
, webkit_req_fs = view.webkitRequestFileSystem
|
||
|
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
|
||
|
, throw_outside = function(ex) {
|
||
|
(view.setImmediate || view.setTimeout)(function() {
|
||
|
throw ex;
|
||
|
}, 0);
|
||
|
}
|
||
|
, force_saveable_type = "application/octet-stream"
|
||
|
, fs_min_size = 0
|
||
|
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
|
||
|
// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
|
||
|
// for the reasoning behind the timeout and revocation flow
|
||
|
, arbitrary_revoke_timeout = 500 // in ms
|
||
|
, revoke = function(file) {
|
||
|
var revoker = function() {
|
||
|
if (typeof file === "string") { // file is an object URL
|
||
|
get_URL().revokeObjectURL(file);
|
||
|
} else { // file is a File
|
||
|
file.remove();
|
||
|
}
|
||
|
};
|
||
|
if (view.chrome) {
|
||
|
revoker();
|
||
|
} else {
|
||
|
setTimeout(revoker, arbitrary_revoke_timeout);
|
||
|
}
|
||
|
}
|
||
|
, dispatch = function(filesaver, event_types, event) {
|
||
|
event_types = [].concat(event_types);
|
||
|
var i = event_types.length;
|
||
|
while (i--) {
|
||
|
var listener = filesaver["on" + event_types[i]];
|
||
|
if (typeof listener === "function") {
|
||
|
try {
|
||
|
listener.call(filesaver, event || filesaver);
|
||
|
} catch (ex) {
|
||
|
throw_outside(ex);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
, auto_bom = function(blob) {
|
||
|
// prepend BOM for UTF-8 XML and text/* types (including HTML)
|
||
|
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
|
||
|
return new Blob(["\ufeff", blob], {type: blob.type});
|
||
|
}
|
||
|
return blob;
|
||
|
}
|
||
|
, FileSaver = function(blob, name, no_auto_bom) {
|
||
|
if (!no_auto_bom) {
|
||
|
blob = auto_bom(blob);
|
||
|
}
|
||
|
// First try a.download, then web filesystem, then object URLs
|
||
|
var
|
||
|
filesaver = this
|
||
|
, type = blob.type
|
||
|
, blob_changed = false
|
||
|
, object_url
|
||
|
, target_view
|
||
|
, dispatch_all = function() {
|
||
|
dispatch(filesaver, "writestart progress write writeend".split(" "));
|
||
|
}
|
||
|
// on any filesys errors revert to saving with object URLs
|
||
|
, fs_error = function() {
|
||
|
// don't create more object URLs than needed
|
||
|
if (blob_changed || !object_url) {
|
||
|
object_url = get_URL().createObjectURL(blob);
|
||
|
}
|
||
|
if (target_view) {
|
||
|
target_view.location.href = object_url;
|
||
|
} else {
|
||
|
var new_tab = view.open(object_url, "_blank");
|
||
|
if (new_tab == undefined && typeof safari !== "undefined") {
|
||
|
//Apple do not allow window.open, see http://bit.ly/1kZffRI
|
||
|
view.location.href = object_url
|
||
|
}
|
||
|
}
|
||
|
filesaver.readyState = filesaver.DONE;
|
||
|
dispatch_all();
|
||
|
revoke(object_url);
|
||
|
}
|
||
|
, abortable = function(func) {
|
||
|
return function() {
|
||
|
if (filesaver.readyState !== filesaver.DONE) {
|
||
|
return func.apply(this, arguments);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
, create_if_not_found = {create: true, exclusive: false}
|
||
|
, slice
|
||
|
;
|
||
|
filesaver.readyState = filesaver.INIT;
|
||
|
if (!name) {
|
||
|
name = "download";
|
||
|
}
|
||
|
if (can_use_save_link) {
|
||
|
object_url = get_URL().createObjectURL(blob);
|
||
|
save_link.href = object_url;
|
||
|
save_link.download = name;
|
||
|
setTimeout(function() {
|
||
|
click(save_link);
|
||
|
dispatch_all();
|
||
|
revoke(object_url);
|
||
|
filesaver.readyState = filesaver.DONE;
|
||
|
});
|
||
|
return;
|
||
|
}
|
||
|
// Object and web filesystem URLs have a problem saving in Google Chrome when
|
||
|
// viewed in a tab, so I force save with application/octet-stream
|
||
|
// http://code.google.com/p/chromium/issues/detail?id=91158
|
||
|
// Update: Google errantly closed 91158, I submitted it again:
|
||
|
// https://code.google.com/p/chromium/issues/detail?id=389642
|
||
|
if (view.chrome && type && type !== force_saveable_type) {
|
||
|
slice = blob.slice || blob.webkitSlice;
|
||
|
blob = slice.call(blob, 0, blob.size, force_saveable_type);
|
||
|
blob_changed = true;
|
||
|
}
|
||
|
// Since I can't be sure that the guessed media type will trigger a download
|
||
|
// in WebKit, I append .download to the filename.
|
||
|
// https://bugs.webkit.org/show_bug.cgi?id=65440
|
||
|
if (webkit_req_fs && name !== "download") {
|
||
|
name += ".download";
|
||
|
}
|
||
|
if (type === force_saveable_type || webkit_req_fs) {
|
||
|
target_view = view;
|
||
|
}
|
||
|
if (!req_fs) {
|
||
|
fs_error();
|
||
|
return;
|
||
|
}
|
||
|
fs_min_size += blob.size;
|
||
|
req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
|
||
|
fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
|
||
|
var save = function() {
|
||
|
dir.getFile(name, create_if_not_found, abortable(function(file) {
|
||
|
file.createWriter(abortable(function(writer) {
|
||
|
writer.onwriteend = function(event) {
|
||
|
target_view.location.href = file.toURL();
|
||
|
filesaver.readyState = filesaver.DONE;
|
||
|
dispatch(filesaver, "writeend", event);
|
||
|
revoke(file);
|
||
|
};
|
||
|
writer.onerror = function() {
|
||
|
var error = writer.error;
|
||
|
if (error.code !== error.ABORT_ERR) {
|
||
|
fs_error();
|
||
|
}
|
||
|
};
|
||
|
"writestart progress write abort".split(" ").forEach(function(event) {
|
||
|
writer["on" + event] = filesaver["on" + event];
|
||
|
});
|
||
|
writer.write(blob);
|
||
|
filesaver.abort = function() {
|
||
|
writer.abort();
|
||
|
filesaver.readyState = filesaver.DONE;
|
||
|
};
|
||
|
filesaver.readyState = filesaver.WRITING;
|
||
|
}), fs_error);
|
||
|
}), fs_error);
|
||
|
};
|
||
|
dir.getFile(name, {create: false}, abortable(function(file) {
|
||
|
// delete file if it already exists
|
||
|
file.remove();
|
||
|
save();
|
||
|
}), abortable(function(ex) {
|
||
|
if (ex.code === ex.NOT_FOUND_ERR) {
|
||
|
save();
|
||
|
} else {
|
||
|
fs_error();
|
||
|
}
|
||
|
}));
|
||
|
}), fs_error);
|
||
|
}), fs_error);
|
||
|
}
|
||
|
, FS_proto = FileSaver.prototype
|
||
|
, saveAs = function(blob, name, no_auto_bom) {
|
||
|
return new FileSaver(blob, name, no_auto_bom);
|
||
|
}
|
||
|
;
|
||
|
// IE 10+ (native saveAs)
|
||
|
if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
|
||
|
return function(blob, name, no_auto_bom) {
|
||
|
if (!no_auto_bom) {
|
||
|
blob = auto_bom(blob);
|
||
|
}
|
||
|
return navigator.msSaveOrOpenBlob(blob, name || "download");
|
||
|
};
|
||
|
}
|
||
|
|
||
|
FS_proto.abort = function() {
|
||
|
var filesaver = this;
|
||
|
filesaver.readyState = filesaver.DONE;
|
||
|
dispatch(filesaver, "abort");
|
||
|
};
|
||
|
FS_proto.readyState = FS_proto.INIT = 0;
|
||
|
FS_proto.WRITING = 1;
|
||
|
FS_proto.DONE = 2;
|
||
|
|
||
|
FS_proto.error =
|
||
|
FS_proto.onwritestart =
|
||
|
FS_proto.onprogress =
|
||
|
FS_proto.onwrite =
|
||
|
FS_proto.onabort =
|
||
|
FS_proto.onerror =
|
||
|
FS_proto.onwriteend =
|
||
|
null;
|
||
|
|
||
|
return saveAs;
|
||
|
}(
|
||
|
typeof self !== "undefined" && self
|
||
|
|| typeof window !== "undefined" && window
|
||
|
|| this.content
|
||
|
));
|
||
|
// `self` is undefined in Firefox for Android content script context
|
||
|
// while `this` is nsIContentFrameMessageManager
|
||
|
// with an attribute `content` that corresponds to the window
|
||
|
|
||
|
if (typeof module !== "undefined" && module.exports) {
|
||
|
module.exports.saveAs = saveAs;
|
||
|
} else if (("function" !== "undefined" && __webpack_require__(93) !== null) && (__webpack_require__(94) != null)) {
|
||
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
|
||
|
return saveAs;
|
||
|
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 93 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
module.exports = function() { throw new Error("define cannot be used indirect"); };
|
||
|
|
||
|
|
||
|
/***/ },
|
||
|
/* 94 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
|
||
|
|
||
|
/* WEBPACK VAR INJECTION */}.call(exports, {}))
|
||
|
|
||
|
/***/ },
|
||
|
/* 95 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
var _from = __webpack_require__(70);
|
||
|
|
||
|
var _from2 = _interopRequireDefault(_from);
|
||
|
|
||
|
exports.default = tableToData;
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
/**
|
||
|
* Calculates the cells and its rowspans and colspans of a table.
|
||
|
*
|
||
|
* `cells` is a 2-d array containing the HTMLTableCellElement cells.
|
||
|
* Rowspans and Colspans are indicated as `null` values.
|
||
|
*
|
||
|
* Rowspans and Colspans are also saved in `ranges`.
|
||
|
* An element contains the start and end position of a rowspan or
|
||
|
* colspan like { s: { r: 1, c: 1 }, e: { r:1, c: 4} }.
|
||
|
*
|
||
|
* @param {HTMLTableElment} table - The table.
|
||
|
* @returns { { cells: Array, ranges: Array } } - The table object.
|
||
|
*/
|
||
|
function tableToData(table) {
|
||
|
var cells = [];
|
||
|
var ranges = [];
|
||
|
|
||
|
// iterate over all rows
|
||
|
(0, _from2.default)(table.querySelectorAll('tr')).forEach(function (row, rowIndex) {
|
||
|
cells.push([]);
|
||
|
|
||
|
// iterate over all cells in the row
|
||
|
(0, _from2.default)(row.querySelectorAll('td, th')).filter(function (cell) {
|
||
|
return cell.style.display !== 'none';
|
||
|
}).forEach(function (cell) {
|
||
|
ranges.forEach(function (range) {
|
||
|
if ( // we are in a rowspan (already saved in ranges)
|
||
|
rowIndex >= range.s.r && rowIndex <= range.e.r && cells[rowIndex].length >= range.s.c && cells[rowIndex].length <= range.e.c) {
|
||
|
// ... fill the cells with empty values
|
||
|
for (var i = range.s.c; i <= range.e.c; i++) {
|
||
|
cells[rowIndex].push(null);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// detect rowspan or colspan
|
||
|
var colspan = parseInt(cell.colSpan, 10) || 1;
|
||
|
var rowspan = parseInt(cell.rowSpan, 10) || 1;
|
||
|
|
||
|
if (rowspan > 1 || colspan > 1) {
|
||
|
ranges.push({
|
||
|
s: {
|
||
|
r: rowIndex,
|
||
|
c: cells[rowIndex].length
|
||
|
},
|
||
|
e: {
|
||
|
r: rowIndex + rowspan - 1,
|
||
|
c: cells[rowIndex].length + colspan - 1
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
cells[rowIndex].push(cell);
|
||
|
|
||
|
// if we are in a following colspan ...
|
||
|
if (colspan > 1) {
|
||
|
for (var i = 1; i < colspan; i++) {
|
||
|
cells[rowIndex].push(null);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//fill cell for common elements at the edges
|
||
|
cells.forEach(function (row, rowIndex) {
|
||
|
"use strict";
|
||
|
|
||
|
ranges.forEach(function (range) {
|
||
|
if (rowIndex >= range.s.r && rowIndex <= range.e.r && cells[rowIndex].length <= range.s.c) {
|
||
|
for (var i = range.s.c; i <= range.e.c; i++) {
|
||
|
cells[rowIndex].push(null);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
return { cells: cells, ranges: ranges };
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 96 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = dataToWorksheet;
|
||
|
|
||
|
var _encodeCell = __webpack_require__(97);
|
||
|
|
||
|
var _cellToObject = __webpack_require__(98);
|
||
|
|
||
|
var _cellToObject2 = _interopRequireDefault(_cellToObject);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
/**
|
||
|
* Returns the XLSX-Worksheet object given the data of a
|
||
|
* table calculated by `tableToData`.
|
||
|
*
|
||
|
* @param {object} data - The data calculated by `tableToData`.
|
||
|
* @param {array} typeHandlers - The registered cell type handlers.
|
||
|
*
|
||
|
* @returns {object} - XLSX-Worksheet object.
|
||
|
*/
|
||
|
function dataToWorksheet(data, typeHandlers) {
|
||
|
var cells = data.cells,
|
||
|
ranges = data.ranges;
|
||
|
|
||
|
|
||
|
var lastColumn = 0;
|
||
|
// convert cells array to an object by iterating over all rows
|
||
|
var worksheet = cells.reduce(function (sheet, row, rowIndex) {
|
||
|
// iterate over all row cells
|
||
|
row.forEach(function (cell, columnIndex) {
|
||
|
lastColumn = Math.max(lastColumn, columnIndex);
|
||
|
|
||
|
// convert the row and column indices to a XLSX index
|
||
|
var ref = (0, _encodeCell.encodeCell)({
|
||
|
c: columnIndex,
|
||
|
r: rowIndex
|
||
|
});
|
||
|
|
||
|
// only save actual cells and convert them to XLSX-Cell objects
|
||
|
if (cell) {
|
||
|
sheet[ref] = (0, _cellToObject2.default)(cell, typeHandlers);
|
||
|
} else {
|
||
|
sheet[ref] = { t: 's', v: '' };
|
||
|
}
|
||
|
});
|
||
|
|
||
|
return sheet;
|
||
|
}, {});
|
||
|
|
||
|
// calculate last table index (bottom right)
|
||
|
var lastRef = (0, _encodeCell.encodeCell)({
|
||
|
c: lastColumn,
|
||
|
r: cells.length - 1
|
||
|
});
|
||
|
|
||
|
// add last table index and ranges to the worksheet
|
||
|
worksheet['!ref'] = 'A1:' + lastRef;
|
||
|
worksheet['!merges'] = ranges;
|
||
|
worksheet['!cols'] = [];
|
||
|
|
||
|
var cols = {};
|
||
|
for (var i = 0; i <= cells[0].length; i++) {
|
||
|
cols['cell' + i] = false;
|
||
|
}
|
||
|
|
||
|
cells.reduce(function (sheet, row, rowIndex) {
|
||
|
// iterate over all row cells
|
||
|
row.forEach(function (cell, columnIndex) {
|
||
|
|
||
|
if (cell) {
|
||
|
var colspan = parseInt(cell.colSpan, 10) || 1;
|
||
|
if (colspan == 1 && !cols['cell' + columnIndex]) {
|
||
|
cols['cell' + columnIndex] = {
|
||
|
wpx: cell.offsetWidth
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}, {});
|
||
|
|
||
|
for (var key in cols) {
|
||
|
if (cols[key]) {
|
||
|
worksheet['!cols'].push(cols[key]);
|
||
|
} else {
|
||
|
worksheet['!cols'].push(null);
|
||
|
}
|
||
|
}
|
||
|
return worksheet;
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 97 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.encodeCell = encodeCell;
|
||
|
exports.encodeRange = encodeRange;
|
||
|
function encodeCol(col) {
|
||
|
var result = '';
|
||
|
var i = col + 1;
|
||
|
|
||
|
while (i > 0) {
|
||
|
result = String.fromCharCode((i - 1) % 26 + 65) + result;
|
||
|
i = Math.floor((i - 1) / 26);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
function encodeRow(row) {
|
||
|
return (row + 1).toString();
|
||
|
}
|
||
|
|
||
|
function encodeCell(cell) {
|
||
|
return encodeCol(cell.c) + encodeRow(cell.r);
|
||
|
}
|
||
|
|
||
|
function encodeRange(range) {
|
||
|
return encodeCell(range.s) + ':' + encodeCell(range.e);
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 98 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = cellToObject;
|
||
|
/**
|
||
|
* Converts a HTMLTableCellElement to an XLSX-Cell object.
|
||
|
* Output varies on detected content of the cell calculated by
|
||
|
* the `typeHandlers`.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
* @param {array} typeHandlers - The registered cell type handlers.
|
||
|
*
|
||
|
* @returns {object} - The cell object.
|
||
|
*/
|
||
|
function cellToObject(cell, typeHandlers) {
|
||
|
var cellObject = null;
|
||
|
var text = cell.textContent.trim() || '';
|
||
|
|
||
|
// custom handlers
|
||
|
typeHandlers.some(function (typeHandler) {
|
||
|
return cellObject = typeHandler(cell, text);
|
||
|
});
|
||
|
|
||
|
// default handler
|
||
|
if (!cellObject) cellObject = { t: 's', v: text };
|
||
|
|
||
|
// styling
|
||
|
if (cell.tagName === 'TH' && !cellObject.s) {
|
||
|
cellObject.s = { font: { bold: true } };
|
||
|
}
|
||
|
|
||
|
return cellObject;
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 99 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.decodeCell = decodeCell;
|
||
|
exports.decodeRange = decodeRange;
|
||
|
function decodeCol(col) {
|
||
|
var parseCol = col.match(/[a-zA-Z]+/)[0],
|
||
|
pow = 1,
|
||
|
res = 0;
|
||
|
|
||
|
for (var i = 0, len = parseCol.length; i < len; i++) {
|
||
|
res += (parseCol[i].charCodeAt(0) - 64) * pow;
|
||
|
pow *= 25;
|
||
|
}
|
||
|
return res - 1;
|
||
|
}
|
||
|
|
||
|
function decodeRow(row) {
|
||
|
return row.match(/[0-9]+/)[0];
|
||
|
}
|
||
|
|
||
|
function decodeCell(cell) {
|
||
|
return {
|
||
|
'c': decodeCol(cell),
|
||
|
'r': decodeRow(cell) - 1
|
||
|
};
|
||
|
}
|
||
|
|
||
|
function decodeRange(range) {
|
||
|
var arRange = range.split(new RegExp('\:'));
|
||
|
|
||
|
return {
|
||
|
s: {
|
||
|
'c': decodeCol(arRange[0]),
|
||
|
'r': decodeRow(arRange[0]) - 1
|
||
|
},
|
||
|
e: {
|
||
|
'c': decodeCol(arRange[1]),
|
||
|
'r': decodeRow(arRange[1]) - 1
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
/***/ },
|
||
|
/* 100 */
|
||
|
/***/ function(module, exports, __webpack_require__) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
var _typeof2 = __webpack_require__(2);
|
||
|
|
||
|
var _typeof3 = _interopRequireDefault(_typeof2);
|
||
|
|
||
|
var _from = __webpack_require__(70);
|
||
|
|
||
|
var _from2 = _interopRequireDefault(_from);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
/**
|
||
|
* Generates a cell object for a list cell.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
*
|
||
|
* @returns {object} - A cell object of the cell or `null` if the cell doesn't
|
||
|
* fulfill the criteria of an input field cell.
|
||
|
*/
|
||
|
exports.default = function (cell) {
|
||
|
var list = cell.querySelector('ul, ol');
|
||
|
|
||
|
if (list) {
|
||
|
var _ret = function () {
|
||
|
var string = '';
|
||
|
var items = (0, _from2.default)(list.querySelectorAll('li'));
|
||
|
|
||
|
items.forEach(function (item, index) {
|
||
|
string += item.textContent;
|
||
|
string += index < items.length - 1 ? ', ' : '';
|
||
|
});
|
||
|
|
||
|
return {
|
||
|
v: { t: 's', v: string }
|
||
|
};
|
||
|
}();
|
||
|
|
||
|
if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
|
||
|
}
|
||
|
|
||
|
return null;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 101 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* Generates a cell object for a number cell.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
* @param {string} text - The text of the cell.
|
||
|
*
|
||
|
* @returns {object} - A cell object of the cell or `null` if the cell doesn't
|
||
|
* fulfill the criteria of a number cell.
|
||
|
*/
|
||
|
exports.default = function (cell, text) {
|
||
|
if (text.length > 0 && !isNaN(text)) return { t: 'n', v: text };
|
||
|
|
||
|
return null;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 102 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* Generates a cell object for a date cell.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
* @param {string} text - The text of the cell.
|
||
|
*
|
||
|
* @returns {object} - A cell object of the cell or `null` if the cell doesn't
|
||
|
* fulfill the criteria of a date cell.
|
||
|
*/
|
||
|
exports.default = function (cell, text) {
|
||
|
function getValue(date) {
|
||
|
var offset = new Date().getTimezoneOffset() * 60000;
|
||
|
return new Date(date - offset).toISOString();
|
||
|
}
|
||
|
|
||
|
var timestamp = cell.getAttribute('data-timestamp');
|
||
|
if (timestamp) {
|
||
|
return { t: 'd', v: getValue(new Date(parseInt(timestamp, 10))) };
|
||
|
}
|
||
|
|
||
|
var date = new Date(text);
|
||
|
if (!isNaN(date)) return { t: 'd', v: getValue(date) };
|
||
|
|
||
|
return null;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 103 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* Generates a cell object for an input field cell.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
*
|
||
|
* @returns {object} - A cell object of the cell or `null` if the cell doesn't
|
||
|
* fulfill the criteria of an input field cell.
|
||
|
*/
|
||
|
exports.default = function (cell) {
|
||
|
var input = cell.querySelector('input[type="text"], textarea');
|
||
|
if (input) return { t: 's', v: input.value };
|
||
|
|
||
|
input = cell.querySelector('select');
|
||
|
if (input) return { t: 's', v: input.options[input.selectedIndex].textContent };
|
||
|
|
||
|
return null;
|
||
|
};
|
||
|
|
||
|
/***/ },
|
||
|
/* 104 */
|
||
|
/***/ function(module, exports) {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
/**
|
||
|
* Generates a cell object for a boolean cell.
|
||
|
*
|
||
|
* @param {HTMLTableCellElement} cell - The cell.
|
||
|
*
|
||
|
* @returns {object} - A cell object of the cell or `null` if the cell doesn't
|
||
|
* fulfill the criteria of an input field cell.
|
||
|
*/
|
||
|
exports.default = function (cell, text) {
|
||
|
if (text === 'true' || text === 'false') {
|
||
|
return { t: 'b', v: !!text };
|
||
|
}
|
||
|
|
||
|
var option = cell.querySelector('input[type="checkbox"], input[type="radio"]');
|
||
|
if (option && text === '') {
|
||
|
return { t: 'b', v: option.checked };
|
||
|
}
|
||
|
|
||
|
return null;
|
||
|
};
|
||
|
|
||
|
/***/ }
|
||
|
/******/ ]);
|