(window["webpackjsonp"] = window["webpackjsonp"] || []).push([[66],{ /***/ 0: /***/ (function(module, exports, __webpack_require__) { /* webpack var injection */(function(global) {var win; if (typeof window !== "undefined") { win = window; } else if (typeof global !== "undefined") { win = global; } else if (typeof self !== "undefined"){ win = self; } else { win = {}; } module.exports = win; /* webpack var injection */}.call(this, __webpack_require__(15))) /***/ }), /***/ 1: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export countbits */ /* unused harmony export countbytes */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return padstart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isarraybufferview; }); /* unused harmony export istypedarray */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return touint8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return tohexstring; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return tobinarystring; }); /* unused harmony export endianness */ /* unused harmony export is_big_endian */ /* unused harmony export is_little_endian */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bytestonumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return numbertobytes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return bytestostring; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return stringtobytes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return concattypedarrays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bytesmatch; }); /* unused harmony export slicebytes */ /* unused harmony export reversebytes */ /* harmony import */ var global_window__webpack_imported_module_0__ = __webpack_require__(0); /* harmony import */ var global_window__webpack_imported_module_0___default = /*#__pure__*/__webpack_require__.n(global_window__webpack_imported_module_0__); // const log2 = math.log2 ? math.log2 : (x) => (math.log(x) / math.log(2)); var repeat = function repeat(str, len) { var acc = ''; while (len--) { acc += str; } return acc; }; // count the number of bits it would take to represent a number // we used to do this with log2 but bigint does not support builtin math // math.ceil(log2(x)); var countbits = function countbits(x) { return x.tostring(2).length; }; // count the number of whole bytes it would take to represent a number var countbytes = function countbytes(x) { return math.ceil(countbits(x) / 8); }; var padstart = function padstart(b, len, str) { if (str === void 0) { str = ' '; } return (repeat(str, len) + b.tostring()).slice(-len); }; var isarraybufferview = function isarraybufferview(obj) { if (arraybuffer.isview === 'function') { return arraybuffer.isview(obj); } return obj && obj.buffer instanceof arraybuffer; }; var istypedarray = function istypedarray(obj) { return isarraybufferview(obj); }; var touint8 = function touint8(bytes) { if (bytes instanceof uint8array) { return bytes; } if (!array.isarray(bytes) && !istypedarray(bytes) && !(bytes instanceof arraybuffer)) { // any non-number or nan leads to empty uint8array // eslint-disable-next-line if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) { bytes = 0; } else { bytes = [bytes]; } } return new uint8array(bytes && bytes.buffer || bytes, bytes && bytes.byteoffset || 0, bytes && bytes.bytelength || 0); }; var tohexstring = function tohexstring(bytes) { bytes = touint8(bytes); var str = ''; for (var i = 0; i < bytes.length; i++) { str += padstart(bytes[i].tostring(16), 2, '0'); } return str; }; var tobinarystring = function tobinarystring(bytes) { bytes = touint8(bytes); var str = ''; for (var i = 0; i < bytes.length; i++) { str += padstart(bytes[i].tostring(2), 8, '0'); } return str; }; var bigint = global_window__webpack_imported_module_0___default.a.bigint || number; var byte_table = [bigint('0x1'), bigint('0x100'), bigint('0x10000'), bigint('0x1000000'), bigint('0x100000000'), bigint('0x10000000000'), bigint('0x1000000000000'), bigint('0x100000000000000'), bigint('0x10000000000000000')]; var endianness = function () { var a = new uint16array([0xffcc]); var b = new uint8array(a.buffer, a.byteoffset, a.bytelength); if (b[0] === 0xff) { return 'big'; } if (b[0] === 0xcc) { return 'little'; } return 'unknown'; }(); var is_big_endian = endianness === 'big'; var is_little_endian = endianness === 'little'; var bytestonumber = function bytestonumber(bytes, _temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$signed = _ref.signed, signed = _ref$signed === void 0 ? false : _ref$signed, _ref$le = _ref.le, le = _ref$le === void 0 ? false : _ref$le; bytes = touint8(bytes); var fn = le ? 'reduce' : 'reduceright'; var obj = bytes[fn] ? bytes[fn] : array.prototype[fn]; var number = obj.call(bytes, function (total, byte, i) { var exponent = le ? i : math.abs(i + 1 - bytes.length); return total + bigint(byte) * byte_table[exponent]; }, bigint(0)); if (signed) { var max = byte_table[bytes.length] / bigint(2) - bigint(1); number = bigint(number); if (number > max) { number -= max; number -= max; number -= bigint(2); } } return number(number); }; var numbertobytes = function numbertobytes(number, _temp2) { var _ref2 = _temp2 === void 0 ? {} : _temp2, _ref2$le = _ref2.le, le = _ref2$le === void 0 ? false : _ref2$le; // eslint-disable-next-line if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) { number = 0; } number = bigint(number); var bytecount = countbytes(number); var bytes = new uint8array(new arraybuffer(bytecount)); for (var i = 0; i < bytecount; i++) { var byteindex = le ? i : math.abs(i + 1 - bytes.length); bytes[byteindex] = number(number / byte_table[i] & bigint(0xff)); if (number < 0) { bytes[byteindex] = math.abs(~bytes[byteindex]); bytes[byteindex] -= i === 0 ? 1 : 2; } } return bytes; }; var bytestostring = function bytestostring(bytes) { if (!bytes) { return ''; } // todo: should touint8 handle cases where we only have 8 bytes // but report more since this is a uint16+ array? bytes = array.prototype.slice.call(bytes); var string = string.fromcharcode.apply(null, touint8(bytes)); try { return decodeuricomponent(escape(string)); } catch (e) {// if decodeuricomponent/escape fails, we are dealing with partial // or full non string data. just return the potentially garbled string. } return string; }; var stringtobytes = function stringtobytes(string, stringisbytes) { if (typeof string !== 'string' && string && typeof string.tostring === 'function') { string = string.tostring(); } if (typeof string !== 'string') { return new uint8array(); } // if the string already is bytes, we don't have to do this // otherwise we do this so that we split multi length characters // into individual bytes if (!stringisbytes) { string = unescape(encodeuricomponent(string)); } var view = new uint8array(string.length); for (var i = 0; i < string.length; i++) { view[i] = string.charcodeat(i); } return view; }; var concattypedarrays = function concattypedarrays() { for (var _len = arguments.length, buffers = new array(_len), _key = 0; _key < _len; _key++) { buffers[_key] = arguments[_key]; } buffers = buffers.filter(function (b) { return b && (b.bytelength || b.length) && typeof b !== 'string'; }); if (buffers.length <= 1) { // for 0 length we will return empty uint8 // for 1 length we return the first uint8 return touint8(buffers[0]); } var totallen = buffers.reduce(function (total, buf, i) { return total + (buf.bytelength || buf.length); }, 0); var tempbuffer = new uint8array(totallen); var offset = 0; buffers.foreach(function (buf) { buf = touint8(buf); tempbuffer.set(buf, offset); offset += buf.bytelength; }); return tempbuffer; }; /** * check if the bytes "b" are contained within bytes "a". * * @param {uint8array|array} a * bytes to check in * * @param {uint8array|array} b * bytes to check for * * @param {object} options * options * * @param {array|uint8array} [offset=0] * offset to use when looking at bytes in a * * @param {array|uint8array} [mask=[]] * mask to use on bytes before comparison. * * @return {boolean} * if all bytes in b are inside of a, taking into account * bit masks. */ var bytesmatch = function bytesmatch(a, b, _temp3) { var _ref3 = _temp3 === void 0 ? {} : _temp3, _ref3$offset = _ref3.offset, offset = _ref3$offset === void 0 ? 0 : _ref3$offset, _ref3$mask = _ref3.mask, mask = _ref3$mask === void 0 ? [] : _ref3$mask; a = touint8(a); b = touint8(b); // ie 11 does not support uint8 every var fn = b.every ? b.every : array.prototype.every; return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8 fn.call(b, function (bbyte, i) { var abyte = mask[i] ? mask[i] & a[offset + i] : a[offset + i]; return bbyte === abyte; }); }; var slicebytes = function slicebytes(src, start, end) { if (uint8array.prototype.slice) { return uint8array.prototype.slice.call(src, start, end); } return new uint8array(array.prototype.slice.call(src, start, end)); }; var reversebytes = function reversebytes(src) { if (src.reverse) { return src.reverse(); } return array.prototype.reverse.call(src); }; /***/ }), /***/ 109: /***/ (function(module, exports) { function _setprototypeof(o, p) { module.exports = _setprototypeof = object.setprototypeof ? object.setprototypeof.bind() : function _setprototypeof(o, p) { o.__proto__ = p; return o; }, module.exports.__esmodule = true, module.exports["default"] = module.exports; return _setprototypeof(o, p); } module.exports = _setprototypeof, module.exports.__esmodule = true, module.exports["default"] = module.exports; /***/ }), /***/ 110: /***/ (function(module, exports, __webpack_require__) { "use strict"; var undefined; var $syntaxerror = syntaxerror; var $function = function; var $typeerror = typeerror; // eslint-disable-next-line consistent-return var getevalledconstructor = function (expressionsyntax) { try { return $function('"use strict"; return (' + expressionsyntax + ').constructor;')(); } catch (e) {} }; var $gopd = object.getownpropertydescriptor; if ($gopd) { try { $gopd({}, ''); } catch (e) { $gopd = null; // this is ie 8, which has a broken gopd } } var throwtypeerror = function () { throw new $typeerror(); }; var throwtypeerror = $gopd ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // ie 8 does not throw here return throwtypeerror; } catch (calleethrows) { try { // ie 8 throws on object.getownpropertydescriptor(arguments, '') return $gopd(arguments, 'callee').get; } catch (gopdthrows) { return throwtypeerror; } } }()) : throwtypeerror; var hassymbols = __webpack_require__(329)(); var getproto = object.getprototypeof || function (x) { return x.__proto__; }; // eslint-disable-line no-proto var needseval = {}; var typedarray = typeof uint8array === 'undefined' ? undefined : getproto(uint8array); var intrinsics = { '%aggregateerror%': typeof aggregateerror === 'undefined' ? undefined : aggregateerror, '%array%': array, '%arraybuffer%': typeof arraybuffer === 'undefined' ? undefined : arraybuffer, '%arrayiteratorprototype%': hassymbols ? getproto([][symbol.iterator]()) : undefined, '%asyncfromsynciteratorprototype%': undefined, '%asyncfunction%': needseval, '%asyncgenerator%': needseval, '%asyncgeneratorfunction%': needseval, '%asynciteratorprototype%': needseval, '%atomics%': typeof atomics === 'undefined' ? undefined : atomics, '%bigint%': typeof bigint === 'undefined' ? undefined : bigint, '%boolean%': boolean, '%dataview%': typeof dataview === 'undefined' ? undefined : dataview, '%date%': date, '%decodeuri%': decodeuri, '%decodeuricomponent%': decodeuricomponent, '%encodeuri%': encodeuri, '%encodeuricomponent%': encodeuricomponent, '%error%': error, '%eval%': eval, // eslint-disable-line no-eval '%evalerror%': evalerror, '%float32array%': typeof float32array === 'undefined' ? undefined : float32array, '%float64array%': typeof float64array === 'undefined' ? undefined : float64array, '%finalizationregistry%': typeof finalizationregistry === 'undefined' ? undefined : finalizationregistry, '%function%': $function, '%generatorfunction%': needseval, '%int8array%': typeof int8array === 'undefined' ? undefined : int8array, '%int16array%': typeof int16array === 'undefined' ? undefined : int16array, '%int32array%': typeof int32array === 'undefined' ? undefined : int32array, '%isfinite%': isfinite, '%isnan%': isnan, '%iteratorprototype%': hassymbols ? getproto(getproto([][symbol.iterator]())) : undefined, '%json%': typeof json === 'object' ? json : undefined, '%map%': typeof map === 'undefined' ? undefined : map, '%mapiteratorprototype%': typeof map === 'undefined' || !hassymbols ? undefined : getproto(new map()[symbol.iterator]()), '%math%': math, '%number%': number, '%object%': object, '%parsefloat%': parsefloat, '%parseint%': parseint, '%promise%': typeof promise === 'undefined' ? undefined : promise, '%proxy%': typeof proxy === 'undefined' ? undefined : proxy, '%rangeerror%': rangeerror, '%referenceerror%': referenceerror, '%reflect%': typeof reflect === 'undefined' ? undefined : reflect, '%regexp%': regexp, '%set%': typeof set === 'undefined' ? undefined : set, '%setiteratorprototype%': typeof set === 'undefined' || !hassymbols ? undefined : getproto(new set()[symbol.iterator]()), '%sharedarraybuffer%': typeof sharedarraybuffer === 'undefined' ? undefined : sharedarraybuffer, '%string%': string, '%stringiteratorprototype%': hassymbols ? getproto(''[symbol.iterator]()) : undefined, '%symbol%': hassymbols ? symbol : undefined, '%syntaxerror%': $syntaxerror, '%throwtypeerror%': throwtypeerror, '%typedarray%': typedarray, '%typeerror%': $typeerror, '%uint8array%': typeof uint8array === 'undefined' ? undefined : uint8array, '%uint8clampedarray%': typeof uint8clampedarray === 'undefined' ? undefined : uint8clampedarray, '%uint16array%': typeof uint16array === 'undefined' ? undefined : uint16array, '%uint32array%': typeof uint32array === 'undefined' ? undefined : uint32array, '%urierror%': urierror, '%weakmap%': typeof weakmap === 'undefined' ? undefined : weakmap, '%weakref%': typeof weakref === 'undefined' ? undefined : weakref, '%weakset%': typeof weakset === 'undefined' ? undefined : weakset }; var doeval = function doeval(name) { var value; if (name === '%asyncfunction%') { value = getevalledconstructor('async function () {}'); } else if (name === '%generatorfunction%') { value = getevalledconstructor('function* () {}'); } else if (name === '%asyncgeneratorfunction%') { value = getevalledconstructor('async function* () {}'); } else if (name === '%asyncgenerator%') { var fn = doeval('%asyncgeneratorfunction%'); if (fn) { value = fn.prototype; } } else if (name === '%asynciteratorprototype%') { var gen = doeval('%asyncgenerator%'); if (gen) { value = getproto(gen.prototype); } } intrinsics[name] = value; return value; }; var legacy_aliases = { '%arraybufferprototype%': ['arraybuffer', 'prototype'], '%arrayprototype%': ['array', 'prototype'], '%arrayproto_entries%': ['array', 'prototype', 'entries'], '%arrayproto_foreach%': ['array', 'prototype', 'foreach'], '%arrayproto_keys%': ['array', 'prototype', 'keys'], '%arrayproto_values%': ['array', 'prototype', 'values'], '%asyncfunctionprototype%': ['asyncfunction', 'prototype'], '%asyncgenerator%': ['asyncgeneratorfunction', 'prototype'], '%asyncgeneratorprototype%': ['asyncgeneratorfunction', 'prototype', 'prototype'], '%booleanprototype%': ['boolean', 'prototype'], '%dataviewprototype%': ['dataview', 'prototype'], '%dateprototype%': ['date', 'prototype'], '%errorprototype%': ['error', 'prototype'], '%evalerrorprototype%': ['evalerror', 'prototype'], '%float32arrayprototype%': ['float32array', 'prototype'], '%float64arrayprototype%': ['float64array', 'prototype'], '%functionprototype%': ['function', 'prototype'], '%generator%': ['generatorfunction', 'prototype'], '%generatorprototype%': ['generatorfunction', 'prototype', 'prototype'], '%int8arrayprototype%': ['int8array', 'prototype'], '%int16arrayprototype%': ['int16array', 'prototype'], '%int32arrayprototype%': ['int32array', 'prototype'], '%jsonparse%': ['json', 'parse'], '%jsonstringify%': ['json', 'stringify'], '%mapprototype%': ['map', 'prototype'], '%numberprototype%': ['number', 'prototype'], '%objectprototype%': ['object', 'prototype'], '%objproto_tostring%': ['object', 'prototype', 'tostring'], '%objproto_valueof%': ['object', 'prototype', 'valueof'], '%promiseprototype%': ['promise', 'prototype'], '%promiseproto_then%': ['promise', 'prototype', 'then'], '%promise_all%': ['promise', 'all'], '%promise_reject%': ['promise', 'reject'], '%promise_resolve%': ['promise', 'resolve'], '%rangeerrorprototype%': ['rangeerror', 'prototype'], '%referenceerrorprototype%': ['referenceerror', 'prototype'], '%regexpprototype%': ['regexp', 'prototype'], '%setprototype%': ['set', 'prototype'], '%sharedarraybufferprototype%': ['sharedarraybuffer', 'prototype'], '%stringprototype%': ['string', 'prototype'], '%symbolprototype%': ['symbol', 'prototype'], '%syntaxerrorprototype%': ['syntaxerror', 'prototype'], '%typedarrayprototype%': ['typedarray', 'prototype'], '%typeerrorprototype%': ['typeerror', 'prototype'], '%uint8arrayprototype%': ['uint8array', 'prototype'], '%uint8clampedarrayprototype%': ['uint8clampedarray', 'prototype'], '%uint16arrayprototype%': ['uint16array', 'prototype'], '%uint32arrayprototype%': ['uint32array', 'prototype'], '%urierrorprototype%': ['urierror', 'prototype'], '%weakmapprototype%': ['weakmap', 'prototype'], '%weaksetprototype%': ['weakset', 'prototype'] }; var bind = __webpack_require__(111); var hasown = __webpack_require__(332); var $concat = bind.call(function.call, array.prototype.concat); var $spliceapply = bind.call(function.apply, array.prototype.splice); var $replace = bind.call(function.call, string.prototype.replace); var $strslice = bind.call(function.call, string.prototype.slice); var $exec = bind.call(function.call, regexp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#l6735-l6744 */ var repropname = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reescapechar = /\\(\\)?/g; /** used to match backslashes in property paths. */ var stringtopath = function stringtopath(string) { var first = $strslice(string, 0, 1); var last = $strslice(string, -1); if (first === '%' && last !== '%') { throw new $syntaxerror('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $syntaxerror('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, repropname, function (match, number, quote, substring) { result[result.length] = quote ? $replace(substring, reescapechar, '$1') : number || match; }); return result; }; /* end adaptation */ var getbaseintrinsic = function getbaseintrinsic(name, allowmissing) { var intrinsicname = name; var alias; if (hasown(legacy_aliases, intrinsicname)) { alias = legacy_aliases[intrinsicname]; intrinsicname = '%' + alias[0] + '%'; } if (hasown(intrinsics, intrinsicname)) { var value = intrinsics[intrinsicname]; if (value === needseval) { value = doeval(intrinsicname); } if (typeof value === 'undefined' && !allowmissing) { throw new $typeerror('intrinsic ' + name + ' exists, but is not available. please file an issue!'); } return { alias: alias, name: intrinsicname, value: value }; } throw new $syntaxerror('intrinsic ' + name + ' does not exist!'); }; module.exports = function getintrinsic(name, allowmissing) { if (typeof name !== 'string' || name.length === 0) { throw new $typeerror('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowmissing !== 'boolean') { throw new $typeerror('"allowmissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/g, name) === null) { throw new $syntaxerror('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); } var parts = stringtopath(name); var intrinsicbasename = parts.length > 0 ? parts[0] : ''; var intrinsic = getbaseintrinsic('%' + intrinsicbasename + '%', allowmissing); var intrinsicrealname = intrinsic.name; var value = intrinsic.value; var skipfurthercaching = false; var alias = intrinsic.alias; if (alias) { intrinsicbasename = alias[0]; $spliceapply(parts, $concat([0, 1], alias)); } for (var i = 1, isown = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strslice(part, 0, 1); var last = $strslice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $syntaxerror('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isown) { skipfurthercaching = true; } intrinsicbasename += '.' + part; intrinsicrealname = '%' + intrinsicbasename + '%'; if (hasown(intrinsics, intrinsicrealname)) { value = intrinsics[intrinsicrealname]; } else if (value != null) { if (!(part in value)) { if (!allowmissing) { throw new $typeerror('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gopd && (i + 1) >= parts.length) { var desc = $gopd(value, part); isown = !!desc; // by convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalvalue` property. here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isown && 'get' in desc && !('originalvalue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isown = hasown(value, part); value = value[part]; } if (isown && !skipfurthercaching) { intrinsics[intrinsicrealname] = value; } } } return value; }; /***/ }), /***/ 111: /***/ (function(module, exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(331); module.exports = function.prototype.bind || implementation; /***/ }), /***/ 113: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayliketoarray; }); function _arrayliketoarray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /***/ }), /***/ 115: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toarray; }); /* harmony import */ var _arraywithholes_js__webpack_imported_module_0__ = __webpack_require__(87); /* harmony import */ var _iterabletoarray_js__webpack_imported_module_1__ = __webpack_require__(156); /* harmony import */ var _unsupportediterabletoarray_js__webpack_imported_module_2__ = __webpack_require__(86); /* harmony import */ var _noniterablerest_js__webpack_imported_module_3__ = __webpack_require__(88); function _toarray(arr) { return object(_arraywithholes_js__webpack_imported_module_0__[/* default */ "a"])(arr) || object(_iterabletoarray_js__webpack_imported_module_1__[/* default */ "a"])(arr) || object(_unsupportediterabletoarray_js__webpack_imported_module_2__[/* default */ "a"])(arr) || object(_noniterablerest_js__webpack_imported_module_3__[/* default */ "a"])(); } /***/ }), /***/ 120: /***/ (function(module, exports, __webpack_require__) { "use strict"; var window = __webpack_require__(0); var _extends = __webpack_require__(21); var isfunction = __webpack_require__(311); createxhr.httphandler = __webpack_require__(312); /** * @license * slighly modified parse-headers 2.0.2 * copyright (c) 2014 david björklund * available under the mit license * */ var parseheaders = function parseheaders(headers) { var result = {}; if (!headers) { return result; } headers.trim().split('\n').foreach(function (row) { var index = row.indexof(':'); var key = row.slice(0, index).trim().tolowercase(); var value = row.slice(index + 1).trim(); if (typeof result[key] === 'undefined') { result[key] = value; } else if (array.isarray(result[key])) { result[key].push(value); } else { result[key] = [result[key], value]; } }); return result; }; module.exports = createxhr; // allow use of default import syntax in typescript module.exports.default = createxhr; createxhr.xmlhttprequest = window.xmlhttprequest || noop; createxhr.xdomainrequest = "withcredentials" in new createxhr.xmlhttprequest() ? createxhr.xmlhttprequest : window.xdomainrequest; foreacharray(["get", "put", "post", "patch", "head", "delete"], function (method) { createxhr[method === "delete" ? "del" : method] = function (uri, options, callback) { options = initparams(uri, options, callback); options.method = method.touppercase(); return _createxhr(options); }; }); function foreacharray(array, iterator) { for (var i = 0; i < array.length; i++) { iterator(array[i]); } } function isempty(obj) { for (var i in obj) { if (obj.hasownproperty(i)) return false; } return true; } function initparams(uri, options, callback) { var params = uri; if (isfunction(options)) { callback = options; if (typeof uri === "string") { params = { uri: uri }; } } else { params = _extends({}, options, { uri: uri }); } params.callback = callback; return params; } function createxhr(uri, options, callback) { options = initparams(uri, options, callback); return _createxhr(options); } function _createxhr(options) { if (typeof options.callback === "undefined") { throw new error("callback argument missing"); } var called = false; var callback = function cbonce(err, response, body) { if (!called) { called = true; options.callback(err, response, body); } }; function readystatechange() { if (xhr.readystate === 4) { settimeout(loadfunc, 0); } } function getbody() { // chrome with requesttype=blob throws errors arround when even testing access to responsetext var body = undefined; if (xhr.response) { body = xhr.response; } else { body = xhr.responsetext || getxml(xhr); } if (isjson) { try { body = json.parse(body); } catch (e) {} } return body; } function errorfunc(evt) { cleartimeout(timeouttimer); if (!(evt instanceof error)) { evt = new error("" + (evt || "unknown xmlhttprequest error")); } evt.statuscode = 0; return callback(evt, failureresponse); } // will load the data & process the response in a special response object function loadfunc() { if (aborted) return; var status; cleartimeout(timeouttimer); if (options.usexdr && xhr.status === undefined) { //ie8 cors get successful response doesn't have a status field, but body is fine status = 200; } else { status = xhr.status === 1223 ? 204 : xhr.status; } var response = failureresponse; var err = null; if (status !== 0) { response = { body: getbody(), statuscode: status, method: method, headers: {}, url: uri, rawrequest: xhr }; if (xhr.getallresponseheaders) { //remember xhr can in fact be xdr for cors in ie response.headers = parseheaders(xhr.getallresponseheaders()); } } else { err = new error("internal xmlhttprequest error"); } return callback(err, response, response.body); } var xhr = options.xhr || null; if (!xhr) { if (options.cors || options.usexdr) { xhr = new createxhr.xdomainrequest(); } else { xhr = new createxhr.xmlhttprequest(); } } var key; var aborted; var uri = xhr.url = options.uri || options.url; var method = xhr.method = options.method || "get"; var body = options.body || options.data; var headers = xhr.headers = options.headers || {}; var sync = !!options.sync; var isjson = false; var timeouttimer; var failureresponse = { body: undefined, headers: {}, statuscode: 0, method: method, url: uri, rawrequest: xhr }; if ("json" in options && options.json !== false) { isjson = true; headers["accept"] || headers["accept"] || (headers["accept"] = "application/json"); //don't override existing accept header declared by user if (method !== "get" && method !== "head") { headers["content-type"] || headers["content-type"] || (headers["content-type"] = "application/json"); //don't override existing accept header declared by user body = json.stringify(options.json === true ? body : options.json); } } xhr.onreadystatechange = readystatechange; xhr.onload = loadfunc; xhr.onerror = errorfunc; // ie9 must have onprogress be set to a unique function. xhr.onprogress = function () {// ie must die }; xhr.onabort = function () { aborted = true; }; xhr.ontimeout = errorfunc; xhr.open(method, uri, !sync, options.username, options.password); //has to be after open if (!sync) { xhr.withcredentials = !!options.withcredentials; } // cannot set timeout with sync request // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent if (!sync && options.timeout > 0) { timeouttimer = settimeout(function () { if (aborted) return; aborted = true; //ie9 may still call readystatechange xhr.abort("timeout"); var e = new error("xmlhttprequest timeout"); e.code = "etimedout"; errorfunc(e); }, options.timeout); } if (xhr.setrequestheader) { for (key in headers) { if (headers.hasownproperty(key)) { xhr.setrequestheader(key, headers[key]); } } } else if (options.headers && !isempty(options.headers)) { throw new error("headers cannot be set on an xdomainrequest object"); } if ("responsetype" in options) { xhr.responsetype = options.responsetype; } if ("beforesend" in options && typeof options.beforesend === "function") { options.beforesend(xhr); } // microsoft edge browser sends "undefined" when send is called with undefined value. // xmlhttprequest spec says to pass null as body to indicate no body // see https://github.com/naugtur/xhr/issues/100. xhr.send(body || null); return xhr; } function getxml(xhr) { // xhr.responsexml will throw exception "invalidstateerror" or "domexception" // see https://developer.mozilla.org/en-us/docs/web/api/xmlhttprequest/responsexml. try { if (xhr.responsetype === "document") { return xhr.responsexml; } var firefoxbugtakeneffect = xhr.responsexml && xhr.responsexml.documentelement.nodename === "parsererror"; if (xhr.responsetype === "" && !firefoxbugtakeneffect) { return xhr.responsexml; } } catch (e) {} return null; } function noop() {} /***/ }), /***/ 123: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return simpletypefromsourcetype; }); var mpegurl_regex = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i; var dash_regex = /^application\/dash\+xml/i; /** * returns a string that describes the type of source based on a video source object's * media type. * * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|source type} * * @param {string} type * video source object media type * @return {('hls'|'dash'|'vhs-json'|null)} * vhs source type string */ var simpletypefromsourcetype = function simpletypefromsourcetype(type) { if (mpegurl_regex.test(type)) { return 'hls'; } if (dash_regex.test(type)) { return 'dash'; } // denotes the special case of a manifest object passed to http-streaming instead of a // source url. // // see https://en.wikipedia.org/wiki/media_type for details on specifying media types. // // in this case, vnd stands for vendor, video.js for the organization, vhs for this // project, and the +json suffix identifies the structure of the media type. if (type === 'application/vnd.videojs.vhs+json') { return 'vhs-json'; } return null; }; /***/ }), /***/ 156: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterabletoarray; }); function _iterabletoarray(iter) { if (typeof symbol !== "undefined" && iter[symbol.iterator] != null || iter["@@iterator"] != null) return array.from(iter); } /***/ }), /***/ 177: /***/ (function(module, exports, __webpack_require__) { var conventions = __webpack_require__(85); var namespace = conventions.namespace; /** * a prerequisite for `[].filter`, to drop elements that are empty * @param {string} input * @returns {boolean} */ function notemptystring (input) { return input !== '' } /** * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace * @see https://infra.spec.whatwg.org/#ascii-whitespace * * @param {string} input * @returns {string[]} (can be empty) */ function splitonasciiwhitespace(input) { // u+0009 tab, u+000a lf, u+000c ff, u+000d cr, u+0020 space return input ? input.split(/[\t\n\f\r ]+/).filter(notemptystring) : [] } /** * adds element as a key to current if it is not already present. * * @param {record} current * @param {string} element * @returns {record} */ function orderedsetreducer (current, element) { if (!current.hasownproperty(element)) { current[element] = true; } return current; } /** * @see https://infra.spec.whatwg.org/#ordered-set * @param {string} input * @returns {string[]} */ function toorderedset(input) { if (!input) return []; var list = splitonasciiwhitespace(input); return object.keys(list.reduce(orderedsetreducer, {})) } /** * uses `list.indexof` to implement something like `array.prototype.includes`, * which we can not rely on being available. * * @param {any[]} list * @returns {function(any): boolean} */ function arrayincludes (list) { return function(element) { return list && list.indexof(element) !== -1; } } function copy(src,dest){ for(var p in src){ dest[p] = src[p]; } } /** ^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\s]*?^})|\s.*?(?=[;\r\n]));? ^\w+\.prototype\.([_\w]+)\s*=\s*(\s.*?(?=[;\r\n]));? */ function _extends(class,super){ var pt = class.prototype; if(!(pt instanceof super)){ function t(){}; t.prototype = super.prototype; t = new t(); copy(pt,t); class.prototype = pt = t; } if(pt.constructor != class){ if(typeof class != 'function'){ console.error("unknown class:"+class) } pt.constructor = class } } // node types var nodetype = {} var element_node = nodetype.element_node = 1; var attribute_node = nodetype.attribute_node = 2; var text_node = nodetype.text_node = 3; var cdata_section_node = nodetype.cdata_section_node = 4; var entity_reference_node = nodetype.entity_reference_node = 5; var entity_node = nodetype.entity_node = 6; var processing_instruction_node = nodetype.processing_instruction_node = 7; var comment_node = nodetype.comment_node = 8; var document_node = nodetype.document_node = 9; var document_type_node = nodetype.document_type_node = 10; var document_fragment_node = nodetype.document_fragment_node = 11; var notation_node = nodetype.notation_node = 12; // exceptioncode var exceptioncode = {} var exceptionmessage = {}; var index_size_err = exceptioncode.index_size_err = ((exceptionmessage[1]="index size error"),1); var domstring_size_err = exceptioncode.domstring_size_err = ((exceptionmessage[2]="domstring size error"),2); var hierarchy_request_err = exceptioncode.hierarchy_request_err = ((exceptionmessage[3]="hierarchy request error"),3); var wrong_document_err = exceptioncode.wrong_document_err = ((exceptionmessage[4]="wrong document"),4); var invalid_character_err = exceptioncode.invalid_character_err = ((exceptionmessage[5]="invalid character"),5); var no_data_allowed_err = exceptioncode.no_data_allowed_err = ((exceptionmessage[6]="no data allowed"),6); var no_modification_allowed_err = exceptioncode.no_modification_allowed_err = ((exceptionmessage[7]="no modification allowed"),7); var not_found_err = exceptioncode.not_found_err = ((exceptionmessage[8]="not found"),8); var not_supported_err = exceptioncode.not_supported_err = ((exceptionmessage[9]="not supported"),9); var inuse_attribute_err = exceptioncode.inuse_attribute_err = ((exceptionmessage[10]="attribute in use"),10); //level2 var invalid_state_err = exceptioncode.invalid_state_err = ((exceptionmessage[11]="invalid state"),11); var syntax_err = exceptioncode.syntax_err = ((exceptionmessage[12]="syntax error"),12); var invalid_modification_err = exceptioncode.invalid_modification_err = ((exceptionmessage[13]="invalid modification"),13); var namespace_err = exceptioncode.namespace_err = ((exceptionmessage[14]="invalid namespace"),14); var invalid_access_err = exceptioncode.invalid_access_err = ((exceptionmessage[15]="invalid access"),15); /** * dom level 2 * object domexception * @see http://www.w3.org/tr/2000/rec-dom-level-2-core-20001113/ecma-script-binding.html * @see http://www.w3.org/tr/rec-dom-level-1/ecma-script-language-binding.html */ function domexception(code, message) { if(message instanceof error){ var error = message; }else{ error = this; error.call(this, exceptionmessage[code]); this.message = exceptionmessage[code]; if(error.capturestacktrace) error.capturestacktrace(this, domexception); } error.code = code; if(message) this.message = this.message + ": " + message; return error; }; domexception.prototype = error.prototype; copy(exceptioncode,domexception) /** * @see http://www.w3.org/tr/2000/rec-dom-level-2-core-20001113/core.html#id-536297177 * the nodelist interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. nodelist objects in the dom are live. * the items in the nodelist are accessible via an integral index, starting from 0. */ function nodelist() { }; nodelist.prototype = { /** * the number of nodes in the list. the range of valid child node indices is 0 to length-1 inclusive. * @standard level1 */ length:0, /** * returns the indexth item in the collection. if index is greater than or equal to the number of nodes in the list, this returns null. * @standard level1 * @param index unsigned long * index into the collection. * @return node * the node at the indexth position in the nodelist, or null if that is not a valid index. */ item: function(index) { return this[index] || null; }, tostring:function(ishtml,nodefilter){ for(var buf = [], i = 0;i=0){ var lastindex = list.length-1 while(i0 || key == 'xmlns'){ // return null; // } //console.log() var i = this.length; while(i--){ var attr = this[i]; //console.log(attr.nodename,key) if(attr.nodename == key){ return attr; } } }, setnameditem: function(attr) { var el = attr.ownerelement; if(el && el!=this._ownerelement){ throw new domexception(inuse_attribute_err); } var oldattr = this.getnameditem(attr.nodename); _addnamednode(this._ownerelement,this,attr,oldattr); return oldattr; }, /* returns node */ setnameditemns: function(attr) {// raises: wrong_document_err,no_modification_allowed_err,inuse_attribute_err var el = attr.ownerelement, oldattr; if(el && el!=this._ownerelement){ throw new domexception(inuse_attribute_err); } oldattr = this.getnameditemns(attr.namespaceuri,attr.localname); _addnamednode(this._ownerelement,this,attr,oldattr); return oldattr; }, /* returns node */ removenameditem: function(key) { var attr = this.getnameditem(key); _removenamednode(this._ownerelement,this,attr); return attr; },// raises: not_found_err,no_modification_allowed_err //for level2 removenameditemns:function(namespaceuri,localname){ var attr = this.getnameditemns(namespaceuri,localname); _removenamednode(this._ownerelement,this,attr); return attr; }, getnameditemns: function(namespaceuri, localname) { var i = this.length; while(i--){ var node = this[i]; if(node.localname == localname && node.namespaceuri == namespaceuri){ return node; } } return null; } }; /** * the domimplementation interface represents an object providing methods * which are not dependent on any particular document. * such an object is returned by the `document.implementation` property. * * __the individual methods describe the differences compared to the specs.__ * * @constructor * * @see https://developer.mozilla.org/en-us/docs/web/api/domimplementation mdn * @see https://www.w3.org/tr/rec-dom-level-1/level-one-core.html#id-102161490 dom level 1 core (initial) * @see https://www.w3.org/tr/dom-level-2-core/core.html#id-102161490 dom level 2 core * @see https://www.w3.org/tr/dom-level-3-core/core.html#id-102161490 dom level 3 core * @see https://dom.spec.whatwg.org/#domimplementation dom living standard */ function domimplementation() { } domimplementation.prototype = { /** * the domimplementation.hasfeature() method returns a boolean flag indicating if a given feature is supported. * the different implementations fairly diverged in what kind of features were reported. * the latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. * * @deprecated it is deprecated and modern browsers return true in all cases. * * @param {string} feature * @param {string} [version] * @returns {boolean} always true * * @see https://developer.mozilla.org/en-us/docs/web/api/domimplementation/hasfeature mdn * @see https://www.w3.org/tr/rec-dom-level-1/level-one-core.html#id-5ced94d7 dom level 1 core * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature dom living standard */ hasfeature: function(feature, version) { return true; }, /** * creates an xml document object of the specified type with its document element. * * __it behaves slightly different from the description in the living standard__: * - there is no interface/class `xmldocument`, it returns a `document` instance. * - `contenttype`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. * - this implementation is not validating names or qualified names * (when parsing xml strings, the sax parser takes care of that) * * @param {string|null} namespaceuri * @param {string} qualifiedname * @param {documenttype=null} doctype * @returns {document} * * @see https://developer.mozilla.org/en-us/docs/web/api/domimplementation/createdocument mdn * @see https://www.w3.org/tr/dom-level-2-core/core.html#level-2-core-dom-createdocument dom level 2 core (initial) * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument dom level 2 core * * @see https://dom.spec.whatwg.org/#validate-and-extract dom: validate and extract * @see https://www.w3.org/tr/xml/#nt-namestartchar xml spec: names * @see https://www.w3.org/tr/xml-names/#ns-qualnames xml namespaces: qualified names */ createdocument: function(namespaceuri, qualifiedname, doctype){ var doc = new document(); doc.implementation = this; doc.childnodes = new nodelist(); doc.doctype = doctype || null; if (doctype){ doc.appendchild(doctype); } if (qualifiedname){ var root = doc.createelementns(namespaceuri, qualifiedname); doc.appendchild(root); } return doc; }, /** * returns a doctype, with the given `qualifiedname`, `publicid`, and `systemid`. * * __this behavior is slightly different from the in the specs__: * - this implementation is not validating names or qualified names * (when parsing xml strings, the sax parser takes care of that) * * @param {string} qualifiedname * @param {string} [publicid] * @param {string} [systemid] * @returns {documenttype} which can either be used with `domimplementation.createdocument` upon document creation * or can be put into the document via methods like `node.insertbefore()` or `node.replacechild()` * * @see https://developer.mozilla.org/en-us/docs/web/api/domimplementation/createdocumenttype mdn * @see https://www.w3.org/tr/dom-level-2-core/core.html#level-2-core-dom-createdoctype dom level 2 core * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype dom living standard * * @see https://dom.spec.whatwg.org/#validate-and-extract dom: validate and extract * @see https://www.w3.org/tr/xml/#nt-namestartchar xml spec: names * @see https://www.w3.org/tr/xml-names/#ns-qualnames xml namespaces: qualified names */ createdocumenttype: function(qualifiedname, publicid, systemid){ var node = new documenttype(); node.name = qualifiedname; node.nodename = qualifiedname; node.publicid = publicid || ''; node.systemid = systemid || ''; return node; } }; /** * @see http://www.w3.org/tr/2000/rec-dom-level-2-core-20001113/core.html#id-1950641247 */ function node() { }; node.prototype = { firstchild : null, lastchild : null, previoussibling : null, nextsibling : null, attributes : null, parentnode : null, childnodes : null, ownerdocument : null, nodevalue : null, namespaceuri : null, prefix : null, localname : null, // modified in dom level 2: insertbefore:function(newchild, refchild){//raises return _insertbefore(this,newchild,refchild); }, replacechild:function(newchild, oldchild){//raises this.insertbefore(newchild,oldchild); if(oldchild){ this.removechild(oldchild); } }, removechild:function(oldchild){ return _removechild(this,oldchild); }, appendchild:function(newchild){ return this.insertbefore(newchild,null); }, haschildnodes:function(){ return this.firstchild != null; }, clonenode:function(deep){ return clonenode(this.ownerdocument||this,this,deep); }, // modified in dom level 2: normalize:function(){ var child = this.firstchild; while(child){ var next = child.nextsibling; if(next && next.nodetype == text_node && child.nodetype == text_node){ this.removechild(next); child.appenddata(next.data); }else{ child.normalize(); child = next; } } }, // introduced in dom level 2: issupported:function(feature, version){ return this.ownerdocument.implementation.hasfeature(feature,version); }, // introduced in dom level 2: hasattributes:function(){ return this.attributes.length>0; }, /** * look up the prefix associated to the given namespace uri, starting from this node. * **the default namespace declarations are ignored by this method.** * see namespace prefix lookup for details on the algorithm used by this method. * * _note: the implementation seems to be incomplete when compared to the algorithm described in the specs._ * * @param {string | null} namespaceuri * @returns {string | null} * @see https://www.w3.org/tr/dom-level-3-core/core.html#node3-lookupnamespaceprefix * @see https://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceprefixalgo * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix * @see https://github.com/xmldom/xmldom/issues/322 */ lookupprefix:function(namespaceuri){ var el = this; while(el){ var map = el._nsmap; //console.dir(map) if(map){ for(var n in map){ if(map[n] == namespaceuri){ return n; } } } el = el.nodetype == attribute_node?el.ownerdocument : el.parentnode; } return null; }, // introduced in dom level 3: lookupnamespaceuri:function(prefix){ var el = this; while(el){ var map = el._nsmap; //console.dir(map) if(map){ if(prefix in map){ return map[prefix] ; } } el = el.nodetype == attribute_node?el.ownerdocument : el.parentnode; } return null; }, // introduced in dom level 3: isdefaultnamespace:function(namespaceuri){ var prefix = this.lookupprefix(namespaceuri); return prefix == null; } }; function _xmlencoder(c){ return c == '<' && '<' || c == '>' && '>' || c == '&' && '&' || c == '"' && '"' || '&#'+c.charcodeat()+';' } copy(nodetype,node); copy(nodetype,node.prototype); /** * @param callback return true for continue,false for break * @return boolean true: break visit; */ function _visitnode(node,callback){ if(callback(node)){ return true; } if(node = node.firstchild){ do{ if(_visitnode(node,callback)){return true} }while(node=node.nextsibling) } } function document(){ } function _onaddattribute(doc,el,newattr){ doc && doc._inc++; var ns = newattr.namespaceuri ; if(ns === namespace.xmlns){ //update namespace el._nsmap[newattr.prefix?newattr.localname:''] = newattr.value } } function _onremoveattribute(doc,el,newattr,remove){ doc && doc._inc++; var ns = newattr.namespaceuri ; if(ns === namespace.xmlns){ //update namespace delete el._nsmap[newattr.prefix?newattr.localname:''] } } function _onupdatechild(doc,el,newchild){ if(doc && doc._inc){ doc._inc++; //update childnodes var cs = el.childnodes; if(newchild){ cs[cs.length++] = newchild; }else{ //console.log(1) var child = el.firstchild; var i = 0; while(child){ cs[i++] = child; child =child.nextsibling; } cs.length = i; } } } /** * attributes; * children; * * writeable properties: * nodevalue,attr:value,characterdata:data * prefix */ function _removechild(parentnode,child){ var previous = child.previoussibling; var next = child.nextsibling; if(previous){ previous.nextsibling = next; }else{ parentnode.firstchild = next } if(next){ next.previoussibling = previous; }else{ parentnode.lastchild = previous; } _onupdatechild(parentnode.ownerdocument,parentnode); return child; } /** * preformance key(refchild == null) */ function _insertbefore(parentnode,newchild,nextchild){ var cp = newchild.parentnode; if(cp){ cp.removechild(newchild);//remove and update } if(newchild.nodetype === document_fragment_node){ var newfirst = newchild.firstchild; if (newfirst == null) { return newchild; } var newlast = newchild.lastchild; }else{ newfirst = newlast = newchild; } var pre = nextchild ? nextchild.previoussibling : parentnode.lastchild; newfirst.previoussibling = pre; newlast.nextsibling = nextchild; if(pre){ pre.nextsibling = newfirst; }else{ parentnode.firstchild = newfirst; } if(nextchild == null){ parentnode.lastchild = newlast; }else{ nextchild.previoussibling = newlast; } do{ newfirst.parentnode = parentnode; }while(newfirst !== newlast && (newfirst= newfirst.nextsibling)) _onupdatechild(parentnode.ownerdocument||parentnode,parentnode); //console.log(parentnode.lastchild.nextsibling == null) if (newchild.nodetype == document_fragment_node) { newchild.firstchild = newchild.lastchild = null; } return newchild; } function _appendsinglechild(parentnode,newchild){ var cp = newchild.parentnode; if(cp){ var pre = parentnode.lastchild; cp.removechild(newchild);//remove and update var pre = parentnode.lastchild; } var pre = parentnode.lastchild; newchild.parentnode = parentnode; newchild.previoussibling = pre; newchild.nextsibling = null; if(pre){ pre.nextsibling = newchild; }else{ parentnode.firstchild = newchild; } parentnode.lastchild = newchild; _onupdatechild(parentnode.ownerdocument,parentnode,newchild); return newchild; //console.log("__aa",parentnode.lastchild.nextsibling == null) } document.prototype = { //implementation : null, nodename : '#document', nodetype : document_node, /** * the documenttype node of the document. * * @readonly * @type documenttype */ doctype : null, documentelement : null, _inc : 1, insertbefore : function(newchild, refchild){//raises if(newchild.nodetype == document_fragment_node){ var child = newchild.firstchild; while(child){ var next = child.nextsibling; this.insertbefore(child,refchild); child = next; } return newchild; } if(this.documentelement == null && newchild.nodetype == element_node){ this.documentelement = newchild; } return _insertbefore(this,newchild,refchild),(newchild.ownerdocument = this),newchild; }, removechild : function(oldchild){ if(this.documentelement == oldchild){ this.documentelement = null; } return _removechild(this,oldchild); }, // introduced in dom level 2: importnode : function(importednode,deep){ return importnode(this,importednode,deep); }, // introduced in dom level 2: getelementbyid : function(id){ var rtv = null; _visitnode(this.documentelement,function(node){ if(node.nodetype == element_node){ if(node.getattribute('id') == id){ rtv = node; return true; } } }) return rtv; }, /** * the `getelementsbyclassname` method of `document` interface returns an array-like object * of all child elements which have **all** of the given class name(s). * * returns an empty list if `classenames` is an empty string or only contains html white space characters. * * * warning: this is a live livenodelist. * changes in the dom will reflect in the array as the changes occur. * if an element selected by this array no longer qualifies for the selector, * it will automatically be removed. be aware of this for iteration purposes. * * @param {string} classnames is a string representing the class name(s) to match; multiple class names are separated by (ascii-)whitespace * * @see https://developer.mozilla.org/en-us/docs/web/api/document/getelementsbyclassname * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname */ getelementsbyclassname: function(classnames) { var classnamesset = toorderedset(classnames) return new livenodelist(this, function(base) { var ls = []; if (classnamesset.length > 0) { _visitnode(base.documentelement, function(node) { if(node !== base && node.nodetype === element_node) { var nodeclassnames = node.getattribute('class') // can be null if the attribute does not exist if (nodeclassnames) { // before splitting and iterating just compare them for the most common case var matches = classnames === nodeclassnames; if (!matches) { var nodeclassnamesset = toorderedset(nodeclassnames) matches = classnamesset.every(arrayincludes(nodeclassnamesset)) } if(matches) { ls.push(node); } } } }); } return ls; }); }, //document factory method: createelement : function(tagname){ var node = new element(); node.ownerdocument = this; node.nodename = tagname; node.tagname = tagname; node.localname = tagname; node.childnodes = new nodelist(); var attrs = node.attributes = new namednodemap(); attrs._ownerelement = node; return node; }, createdocumentfragment : function(){ var node = new documentfragment(); node.ownerdocument = this; node.childnodes = new nodelist(); return node; }, createtextnode : function(data){ var node = new text(); node.ownerdocument = this; node.appenddata(data) return node; }, createcomment : function(data){ var node = new comment(); node.ownerdocument = this; node.appenddata(data) return node; }, createcdatasection : function(data){ var node = new cdatasection(); node.ownerdocument = this; node.appenddata(data) return node; }, createprocessinginstruction : function(target,data){ var node = new processinginstruction(); node.ownerdocument = this; node.tagname = node.target = target; node.nodevalue= node.data = data; return node; }, createattribute : function(name){ var node = new attr(); node.ownerdocument = this; node.name = name; node.nodename = name; node.localname = name; node.specified = true; return node; }, createentityreference : function(name){ var node = new entityreference(); node.ownerdocument = this; node.nodename = name; return node; }, // introduced in dom level 2: createelementns : function(namespaceuri,qualifiedname){ var node = new element(); var pl = qualifiedname.split(':'); var attrs = node.attributes = new namednodemap(); node.childnodes = new nodelist(); node.ownerdocument = this; node.nodename = qualifiedname; node.tagname = qualifiedname; node.namespaceuri = namespaceuri; if(pl.length == 2){ node.prefix = pl[0]; node.localname = pl[1]; }else{ //el.prefix = null; node.localname = qualifiedname; } attrs._ownerelement = node; return node; }, // introduced in dom level 2: createattributens : function(namespaceuri,qualifiedname){ var node = new attr(); var pl = qualifiedname.split(':'); node.ownerdocument = this; node.nodename = qualifiedname; node.name = qualifiedname; node.namespaceuri = namespaceuri; node.specified = true; if(pl.length == 2){ node.prefix = pl[0]; node.localname = pl[1]; }else{ //el.prefix = null; node.localname = qualifiedname; } return node; } }; _extends(document,node); function element() { this._nsmap = {}; }; element.prototype = { nodetype : element_node, hasattribute : function(name){ return this.getattributenode(name)!=null; }, getattribute : function(name){ var attr = this.getattributenode(name); return attr && attr.value || ''; }, getattributenode : function(name){ return this.attributes.getnameditem(name); }, setattribute : function(name, value){ var attr = this.ownerdocument.createattribute(name); attr.value = attr.nodevalue = "" + value; this.setattributenode(attr) }, removeattribute : function(name){ var attr = this.getattributenode(name) attr && this.removeattributenode(attr); }, //four real opeartion method appendchild:function(newchild){ if(newchild.nodetype === document_fragment_node){ return this.insertbefore(newchild,null); }else{ return _appendsinglechild(this,newchild); } }, setattributenode : function(newattr){ return this.attributes.setnameditem(newattr); }, setattributenodens : function(newattr){ return this.attributes.setnameditemns(newattr); }, removeattributenode : function(oldattr){ //console.log(this == oldattr.ownerelement) return this.attributes.removenameditem(oldattr.nodename); }, //get real attribute name,and remove it by removeattributenode removeattributens : function(namespaceuri, localname){ var old = this.getattributenodens(namespaceuri, localname); old && this.removeattributenode(old); }, hasattributens : function(namespaceuri, localname){ return this.getattributenodens(namespaceuri, localname)!=null; }, getattributens : function(namespaceuri, localname){ var attr = this.getattributenodens(namespaceuri, localname); return attr && attr.value || ''; }, setattributens : function(namespaceuri, qualifiedname, value){ var attr = this.ownerdocument.createattributens(namespaceuri, qualifiedname); attr.value = attr.nodevalue = "" + value; this.setattributenode(attr) }, getattributenodens : function(namespaceuri, localname){ return this.attributes.getnameditemns(namespaceuri, localname); }, getelementsbytagname : function(tagname){ return new livenodelist(this,function(base){ var ls = []; _visitnode(base,function(node){ if(node !== base && node.nodetype == element_node && (tagname === '*' || node.tagname == tagname)){ ls.push(node); } }); return ls; }); }, getelementsbytagnamens : function(namespaceuri, localname){ return new livenodelist(this,function(base){ var ls = []; _visitnode(base,function(node){ if(node !== base && node.nodetype === element_node && (namespaceuri === '*' || node.namespaceuri === namespaceuri) && (localname === '*' || node.localname == localname)){ ls.push(node); } }); return ls; }); } }; document.prototype.getelementsbytagname = element.prototype.getelementsbytagname; document.prototype.getelementsbytagnamens = element.prototype.getelementsbytagnamens; _extends(element,node); function attr() { }; attr.prototype.nodetype = attribute_node; _extends(attr,node); function characterdata() { }; characterdata.prototype = { data : '', substringdata : function(offset, count) { return this.data.substring(offset, offset+count); }, appenddata: function(text) { text = this.data+text; this.nodevalue = this.data = text; this.length = text.length; }, insertdata: function(offset,text) { this.replacedata(offset,0,text); }, appendchild:function(newchild){ throw new error(exceptionmessage[hierarchy_request_err]) }, deletedata: function(offset, count) { this.replacedata(offset,count,""); }, replacedata: function(offset, count, text) { var start = this.data.substring(0,offset); var end = this.data.substring(offset+count); text = start + text + end; this.nodevalue = this.data = text; this.length = text.length; } } _extends(characterdata,node); function text() { }; text.prototype = { nodename : "#text", nodetype : text_node, splittext : function(offset) { var text = this.data; var newtext = text.substring(offset); text = text.substring(0, offset); this.data = this.nodevalue = text; this.length = text.length; var newnode = this.ownerdocument.createtextnode(newtext); if(this.parentnode){ this.parentnode.insertbefore(newnode, this.nextsibling); } return newnode; } } _extends(text,characterdata); function comment() { }; comment.prototype = { nodename : "#comment", nodetype : comment_node } _extends(comment,characterdata); function cdatasection() { }; cdatasection.prototype = { nodename : "#cdata-section", nodetype : cdata_section_node } _extends(cdatasection,characterdata); function documenttype() { }; documenttype.prototype.nodetype = document_type_node; _extends(documenttype,node); function notation() { }; notation.prototype.nodetype = notation_node; _extends(notation,node); function entity() { }; entity.prototype.nodetype = entity_node; _extends(entity,node); function entityreference() { }; entityreference.prototype.nodetype = entity_reference_node; _extends(entityreference,node); function documentfragment() { }; documentfragment.prototype.nodename = "#document-fragment"; documentfragment.prototype.nodetype = document_fragment_node; _extends(documentfragment,node); function processinginstruction() { } processinginstruction.prototype.nodetype = processing_instruction_node; _extends(processinginstruction,node); function xmlserializer(){} xmlserializer.prototype.serializetostring = function(node,ishtml,nodefilter){ return nodeserializetostring.call(node,ishtml,nodefilter); } node.prototype.tostring = nodeserializetostring; function nodeserializetostring(ishtml,nodefilter){ var buf = []; var refnode = this.nodetype == 9 && this.documentelement || this; var prefix = refnode.prefix; var uri = refnode.namespaceuri; if(uri && prefix == null){ //console.log(prefix) var prefix = refnode.lookupprefix(uri); if(prefix == null){ //ishtml = true; var visiblenamespaces=[ {namespace:uri,prefix:null} //{namespace:uri,prefix:''} ] } } serializetostring(this,buf,ishtml,nodefilter,visiblenamespaces); //console.log('###',this.nodetype,uri,prefix,buf.join('')) return buf.join(''); } function neednamespacedefine(node, ishtml, visiblenamespaces) { var prefix = node.prefix || ''; var uri = node.namespaceuri; // according to [namespaces in xml 1.0](https://www.w3.org/tr/rec-xml-names/#ns-using) , // and more specifically https://www.w3.org/tr/rec-xml-names/#nsc-noprefixundecl : // > in a namespace declaration for a prefix [...], the attribute value must not be empty. // in a similar manner [namespaces in xml 1.1](https://www.w3.org/tr/xml-names11/#ns-using) // and more specifically https://www.w3.org/tr/xml-names11/#nsc-nsdeclared : // > [...] furthermore, the attribute value [...] must not be an empty string. // so serializing empty namespace value like xmlns:ds="" would produce an invalid xml document. if (!uri) { return false; } if (prefix === "xml" && uri === namespace.xml || uri === namespace.xmlns) { return false; } var i = visiblenamespaces.length while (i--) { var ns = visiblenamespaces[i]; // get namespace prefix if (ns.prefix === prefix) { return ns.namespace !== uri; } } return true; } /** * well-formed constraint: no < in attribute values * the replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <. * @see https://www.w3.org/tr/xml/#cleanattrvals * @see https://www.w3.org/tr/xml/#nt-attvalue */ function addserializedattribute(buf, qualifiedname, value) { buf.push(' ', qualifiedname, '="', value.replace(/[<&"]/g,_xmlencoder), '"') } function serializetostring(node,buf,ishtml,nodefilter,visiblenamespaces){ if (!visiblenamespaces) { visiblenamespaces = []; } if(nodefilter){ node = nodefilter(node); if(node){ if(typeof node == 'string'){ buf.push(node); return; } }else{ return; } //buf.sort.apply(attrs, attributesorter); } switch(node.nodetype){ case element_node: var attrs = node.attributes; var len = attrs.length; var child = node.firstchild; var nodename = node.tagname; ishtml = namespace.ishtml(node.namespaceuri) || ishtml var prefixednodename = nodename if (!ishtml && !node.prefix && node.namespaceuri) { var defaultns // lookup current default ns from `xmlns` attribute for (var ai = 0; ai < attrs.length; ai++) { if (attrs.item(ai).name === 'xmlns') { defaultns = attrs.item(ai).value break } } if (!defaultns) { // lookup current default ns in visiblenamespaces for (var nsi = visiblenamespaces.length - 1; nsi >= 0; nsi--) { var namespace = visiblenamespaces[nsi] if (namespace.prefix === '' && namespace.namespace === node.namespaceuri) { defaultns = namespace.namespace break } } } if (defaultns !== node.namespaceuri) { for (var nsi = visiblenamespaces.length - 1; nsi >= 0; nsi--) { var namespace = visiblenamespaces[nsi] if (namespace.namespace === node.namespaceuri) { if (namespace.prefix) { prefixednodename = namespace.prefix + ':' + nodename } break } } } } buf.push('<', prefixednodename); for(var i=0;i'); //if is cdata child node if(ishtml && /^script$/i.test(nodename)){ while(child){ if(child.data){ buf.push(child.data); }else{ serializetostring(child, buf, ishtml, nodefilter, visiblenamespaces.slice()); } child = child.nextsibling; } }else { while(child){ serializetostring(child, buf, ishtml, nodefilter, visiblenamespaces.slice()); child = child.nextsibling; } } buf.push(''); }else{ buf.push('/>'); } // remove added visible namespaces //visiblenamespaces.length = startvisiblenamespaces; return; case document_node: case document_fragment_node: var child = node.firstchild; while(child){ serializetostring(child, buf, ishtml, nodefilter, visiblenamespaces.slice()); child = child.nextsibling; } return; case attribute_node: return addserializedattribute(buf, node.name, node.value); case text_node: /** * the ampersand character (&) and the left angle bracket (<) must not appear in their literal form, * except when used as markup delimiters, or within a comment, a processing instruction, or a cdata section. * if they are needed elsewhere, they must be escaped using either numeric character references or the strings * `&` and `<` respectively. * the right angle bracket (>) may be represented using the string " > ", and must, for compatibility, * be escaped using either `>` or a character reference when it appears in the string `]]>` in content, * when that string is not marking the end of a cdata section. * * in the content of elements, character data is any string of characters * which does not contain the start-delimiter of any markup * and does not include the cdata-section-close delimiter, `]]>`. * * @see https://www.w3.org/tr/xml/#nt-chardata */ return buf.push(node.data .replace(/[<&]/g,_xmlencoder) .replace(/]]>/g, ']]>') ); case cdata_section_node: return buf.push( ''); case comment_node: return buf.push( ""); case document_type_node: var pubid = node.publicid; var sysid = node.systemid; buf.push(''); }else if(sysid && sysid!='.'){ buf.push(' system ', sysid, '>'); }else{ var sub = node.internalsubset; if(sub){ buf.push(" [",sub,"]"); } buf.push(">"); } return; case processing_instruction_node: return buf.push( ""); case entity_reference_node: return buf.push( '&',node.nodename,';'); //case entity_node: //case notation_node: default: buf.push('??',node.nodename); } } function importnode(doc,node,deep){ var node2; switch (node.nodetype) { case element_node: node2 = node.clonenode(false); node2.ownerdocument = doc; //var attrs = node2.attributes; //var len = attrs.length; //for(var i=0;i 2 && arguments[2] !== undefined ? arguments[2] : "."; var merger = arguments.length > 3 ? arguments[3] : undefined; if (!isobject(defaults)) { return _defu(baseobj, {}, namespace, merger); } var obj = object.assign({}, defaults); for (var key in baseobj) { if (key === "__proto__" || key === "constructor") { continue; } var val = baseobj[key]; if (val === null || val === void 0) { continue; } if (merger && merger(obj, key, val, namespace)) { continue; } if (array.isarray(val) && array.isarray(obj[key])) { obj[key] = obj[key].concat(val); } else if (isobject(val) && isobject(obj[key])) { obj[key] = _defu(val, obj[key], (namespace ? "".concat(namespace, ".") : "") + key.tostring(), merger); } else { obj[key] = val; } } return obj; } function extend(merger) { return function () { for (var _len = arguments.length, args = new array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args.reduce(function (p, c) { return _defu(p, c, "", merger); }, {}); }; } var defu = extend(); defu.fn = extend(function (obj, key, currentvalue, _namespace) { if (typeof obj[key] !== "undefined" && typeof currentvalue === "function") { obj[key] = currentvalue(obj[key]); return true; } }); defu.arrayfn = extend(function (obj, key, currentvalue, _namespace) { if (array.isarray(obj[key]) && typeof currentvalue === "function") { obj[key] = currentvalue(obj[key]); return true; } }); defu.extend = extend; /***/ }), /***/ 185: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export isnetworkerror */ /* unused harmony export isretryableerror */ /* unused harmony export issaferequesterror */ /* unused harmony export isidempotentrequesterror */ /* unused harmony export isnetworkoridempotentrequesterror */ /* unused harmony export exponentialdelay */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return axiosretry; }); /* harmony import */ var is_retry_allowed__webpack_imported_module_0__ = __webpack_require__(186); /* harmony import */ var is_retry_allowed__webpack_imported_module_0___default = /*#__pure__*/__webpack_require__.n(is_retry_allowed__webpack_imported_module_0__); function asyncgeneratorstep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { promise.resolve(value).then(_next, _throw); } } function _asynctogenerator(fn) { return function () { var self = this, args = arguments; return new promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncgeneratorstep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncgeneratorstep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function ownkeys(object, enumerableonly) { var keys = object.keys(object); if (object.getownpropertysymbols) { var symbols = object.getownpropertysymbols(object); if (enumerableonly) { symbols = symbols.filter(function (sym) { return object.getownpropertydescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectspread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownkeys(object(source), true).foreach(function (key) { _defineproperty(target, key, source[key]); }); } else if (object.getownpropertydescriptors) { object.defineproperties(target, object.getownpropertydescriptors(source)); } else { ownkeys(object(source)).foreach(function (key) { object.defineproperty(target, key, object.getownpropertydescriptor(source, key)); }); } } return target; } function _defineproperty(obj, key, value) { if (key in obj) { object.defineproperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var namespace = 'axios-retry'; /** * @param {error} error * @return {boolean} */ function isnetworkerror(error) { return !error.response && boolean(error.code) && // prevents retrying cancelled requests error.code !== 'econnaborted' && // prevents retrying timed out requests is_retry_allowed__webpack_imported_module_0___default()(error); // prevents retrying unsafe errors } var safe_http_methods = ['get', 'head', 'options']; var idempotent_http_methods = safe_http_methods.concat(['put', 'delete']); /** * @param {error} error * @return {boolean} */ function isretryableerror(error) { return error.code !== 'econnaborted' && (!error.response || error.response.status >= 500 && error.response.status <= 599); } /** * @param {error} error * @return {boolean} */ function issaferequesterror(error) { if (!error.config) { // cannot determine if the request can be retried return false; } return isretryableerror(error) && safe_http_methods.indexof(error.config.method) !== -1; } /** * @param {error} error * @return {boolean} */ function isidempotentrequesterror(error) { if (!error.config) { // cannot determine if the request can be retried return false; } return isretryableerror(error) && idempotent_http_methods.indexof(error.config.method) !== -1; } /** * @param {error} error * @return {boolean} */ function isnetworkoridempotentrequesterror(error) { return isnetworkerror(error) || isidempotentrequesterror(error); } /** * @return {number} - delay in milliseconds, always 0 */ function nodelay() { return 0; } /** * @param {number} [retrynumber=0] * @return {number} - delay in milliseconds */ function exponentialdelay() { var retrynumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var delay = math.pow(2, retrynumber) * 100; var randomsum = delay * 0.2 * math.random(); // 0-20% of the delay return delay + randomsum; } /** * initializes and returns the retry state for the given request/config * @param {axiosrequestconfig} config * @return {object} */ function getcurrentstate(config) { var currentstate = config[namespace] || {}; currentstate.retrycount = currentstate.retrycount || 0; config[namespace] = currentstate; return currentstate; } /** * returns the axios-retry options for the current request * @param {axiosrequestconfig} config * @param {axiosretryconfig} defaultoptions * @return {axiosretryconfig} */ function getrequestoptions(config, defaultoptions) { return _objectspread(_objectspread({}, defaultoptions), config[namespace]); } /** * @param {axios} axios * @param {axiosrequestconfig} config */ function fixconfig(axios, config) { if (axios.defaults.agent === config.agent) { delete config.agent; } if (axios.defaults.httpagent === config.httpagent) { delete config.httpagent; } if (axios.defaults.httpsagent === config.httpsagent) { delete config.httpsagent; } } /** * checks retrycondition if request can be retried. handles it's retruning value or promise. * @param {number} retries * @param {function} retrycondition * @param {object} currentstate * @param {error} error * @return {boolean} */ function shouldretry(_x, _x2, _x3, _x4) { return _shouldretry.apply(this, arguments); } /** * adds response interceptors to an axios instance to retry requests failed due to network issues * * @example * * import axios from 'axios'; * * axiosretry(axios, { retries: 3 }); * * axios.get('http://example.com/test') // the first request fails and the second returns 'ok' * .then(result => { * result.data; // 'ok' * }); * * // exponential back-off retry delay between requests * axiosretry(axios, { retrydelay : axiosretry.exponentialdelay}); * * // custom retry delay * axiosretry(axios, { retrydelay : (retrycount) => { * return retrycount * 1000; * }}); * * // also works with custom axios instances * const client = axios.create({ baseurl: 'http://example.com' }); * axiosretry(client, { retries: 3 }); * * client.get('/test') // the first request fails and the second returns 'ok' * .then(result => { * result.data; // 'ok' * }); * * // allows request-specific configuration * client * .get('/test', { * 'axios-retry': { * retries: 0 * } * }) * .catch(error => { // the first request fails * error !== undefined * }); * * @param {axios} axios an axios instance (the axios object or one created from axios.create) * @param {object} [defaultoptions] * @param {number} [defaultoptions.retries=3] number of retries * @param {boolean} [defaultoptions.shouldresettimeout=false] * defines if the timeout should be reset between retries * @param {function} [defaultoptions.retrycondition=isnetworkoridempotentrequesterror] * a function to determine if the error can be retried * @param {function} [defaultoptions.retrydelay=nodelay] * a function to determine the delay between retry requests */ function _shouldretry() { _shouldretry = _asynctogenerator(function* (retries, retrycondition, currentstate, error) { var shouldretryorpromise = currentstate.retrycount < retries && retrycondition(error); // this could be a promise if (typeof shouldretryorpromise === 'object') { try { var shouldretrypromiseresult = yield shouldretryorpromise; // keep return true unless shouldretrypromiseresult return false for compatibility return shouldretrypromiseresult !== false; } catch (_err) { return false; } } return shouldretryorpromise; }); return _shouldretry.apply(this, arguments); } function axiosretry(axios, defaultoptions) { axios.interceptors.request.use(config => { var currentstate = getcurrentstate(config); currentstate.lastrequesttime = date.now(); return config; }); axios.interceptors.response.use(null, /*#__pure__*/function () { var _ref = _asynctogenerator(function* (error) { var { config } = error; // if we have no information to retry the request if (!config) { return promise.reject(error); } var { retries = 3, retrycondition = isnetworkoridempotentrequesterror, retrydelay = nodelay, shouldresettimeout = false } = getrequestoptions(config, defaultoptions); var currentstate = getcurrentstate(config); if (yield shouldretry(retries, retrycondition, currentstate, error)) { currentstate.retrycount += 1; var delay = retrydelay(currentstate.retrycount, error); // axios fails merging this configuration to the default configuration because it has an issue // with circular structures: https://github.com/mzabriskie/axios/issues/370 fixconfig(axios, config); if (!shouldresettimeout && config.timeout && currentstate.lastrequesttime) { var lastrequestduration = date.now() - currentstate.lastrequesttime; // minimum 1ms timeout (passing 0 or less to xhr means no timeout) config.timeout = math.max(config.timeout - lastrequestduration - delay, 1); } config.transformrequest = [data => data]; return new promise(resolve => settimeout(() => resolve(axios(config)), delay)); } return promise.reject(error); }); return function (_x5) { return _ref.apply(this, arguments); }; }()); } // compatibility with commonjs axiosretry.isnetworkerror = isnetworkerror; axiosretry.issaferequesterror = issaferequesterror; axiosretry.isidempotentrequesterror = isidempotentrequesterror; axiosretry.isnetworkoridempotentrequesterror = isnetworkoridempotentrequesterror; axiosretry.exponentialdelay = exponentialdelay; axiosretry.isretryableerror = isretryableerror; //# sourcemappingurl=index.js.map /***/ }), /***/ 191: /***/ (function(module, exports, __webpack_require__) { var setprototypeof = __webpack_require__(109); var isnativereflectconstruct = __webpack_require__(316); function _construct(parent, args, class) { if (isnativereflectconstruct()) { module.exports = _construct = reflect.construct.bind(), module.exports.__esmodule = true, module.exports["default"] = module.exports; } else { module.exports = _construct = function _construct(parent, args, class) { var a = [null]; a.push.apply(a, args); var constructor = function.bind.apply(parent, a); var instance = new constructor(); if (class) setprototypeof(instance, class.prototype); return instance; }, module.exports.__esmodule = true, module.exports["default"] = module.exports; } return _construct.apply(null, arguments); } module.exports = _construct, module.exports.__esmodule = true, module.exports["default"] = module.exports; /***/ }), /***/ 192: /***/ (function(module, exports, __webpack_require__) { var setprototypeof = __webpack_require__(109); function _inherits(subclass, superclass) { if (typeof superclass !== "function" && superclass !== null) { throw new typeerror("super expression must either be null or a function"); } subclass.prototype = object.create(superclass && superclass.prototype, { constructor: { value: subclass, writable: true, configurable: true } }); object.defineproperty(subclass, "prototype", { writable: false }); if (superclass) setprototypeof(subclass, superclass); } module.exports = _inherits, module.exports.__esmodule = true, module.exports["default"] = module.exports; /***/ }), /***/ 194: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return foreachmediagroup; }); /** * loops through all supported media groups in master and calls the provided * callback for each group * * @param {object} master * the parsed master manifest object * @param {string[]} groups * the media groups to call the callback for * @param {function} callback * callback to call for each media group */ var foreachmediagroup = function foreachmediagroup(master, groups, callback) { groups.foreach(function (mediatype) { for (var groupkey in master.mediagroups[mediatype]) { for (var labelkey in master.mediagroups[mediatype][groupkey]) { var mediaproperties = master.mediagroups[mediatype][groupkey][labelkey]; callback(mediaproperties, mediatype, groupkey, labelkey); } } }); }; /***/ }), /***/ 195: /***/ (function(module, exports, __webpack_require__) { var dom = __webpack_require__(177) exports.domimplementation = dom.domimplementation exports.xmlserializer = dom.xmlserializer exports.domparser = __webpack_require__(321).domparser /***/ }), /***/ 20: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineproperty; }); function _defineproperty(obj, key, value) { if (key in obj) { object.defineproperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /***/ 21: /***/ (function(module, exports) { function _extends() { module.exports = _extends = object.assign ? object.assign.bind() : 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; }, module.exports.__esmodule = true, module.exports["default"] = module.exports; return _extends.apply(this, arguments); } module.exports = _extends, module.exports.__esmodule = true, module.exports["default"] = module.exports; /***/ }), /***/ 22: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // exports __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedtoarray; }); // external module: ./node_modules/@babel/runtime/helpers/esm/arraywithholes.js var arraywithholes = __webpack_require__(87); // concatenated module: ./node_modules/@babel/runtime/helpers/esm/iterabletoarraylimit.js function _iterabletoarraylimit(arr, i) { var _i = arr == null ? null : typeof symbol !== "undefined" && arr[symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } // external module: ./node_modules/@babel/runtime/helpers/esm/unsupportediterabletoarray.js var unsupportediterabletoarray = __webpack_require__(86); // external module: ./node_modules/@babel/runtime/helpers/esm/noniterablerest.js var noniterablerest = __webpack_require__(88); // concatenated module: ./node_modules/@babel/runtime/helpers/esm/slicedtoarray.js function _slicedtoarray(arr, i) { return object(arraywithholes["a" /* default */])(arr) || _iterabletoarraylimit(arr, i) || object(unsupportediterabletoarray["a" /* default */])(arr, i) || object(noniterablerest["a" /* default */])(); } /***/ }), /***/ 28: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof symbol && "symbol" == typeof symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof symbol && obj.constructor === symbol && obj !== symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } /***/ }), /***/ 3: /***/ (function(module, exports, __webpack_require__) { /* webpack var injection */(function(global) {var toplevel = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {} var mindoc = __webpack_require__(310); var doccy; if (typeof document !== 'undefined') { doccy = document; } else { doccy = toplevel['__global_document_cache@4']; if (!doccy) { doccy = toplevel['__global_document_cache@4'] = mindoc; } } module.exports = doccy; /* webpack var injection */}.call(this, __webpack_require__(15))) /***/ }), /***/ 312: /***/ (function(module, exports, __webpack_require__) { "use strict"; var window = __webpack_require__(0); var httpresponsehandler = function httpresponsehandler(callback, decoderesponsebody) { if (decoderesponsebody === void 0) { decoderesponsebody = false; } return function (err, response, responsebody) { // if the xhr failed, return that error if (err) { callback(err); return; } // if the http status code is 4xx or 5xx, the request also failed if (response.statuscode >= 400 && response.statuscode <= 599) { var cause = responsebody; if (decoderesponsebody) { if (window.textdecoder) { var charset = getcharset(response.headers && response.headers['content-type']); try { cause = new textdecoder(charset).decode(responsebody); } catch (e) {} } else { cause = string.fromcharcode.apply(null, new uint8array(responsebody)); } } callback({ cause: cause }); return; } // otherwise, request succeeded callback(null, responsebody); }; }; function getcharset(contenttypeheader) { if (contenttypeheader === void 0) { contenttypeheader = ''; } return contenttypeheader.tolowercase().split(';').reduce(function (charset, contenttype) { var _contenttype$split = contenttype.split('='), type = _contenttype$split[0], value = _contenttype$split[1]; if (type.trim() === 'charset') { return value.trim(); } return charset; }, 'utf-8'); } module.exports = httpresponsehandler; /***/ }), /***/ 316: /***/ (function(module, exports) { function _isnativereflectconstruct() { if (typeof reflect === "undefined" || !reflect.construct) return false; if (reflect.construct.sham) return false; if (typeof proxy === "function") return true; try { boolean.prototype.valueof.call(reflect.construct(boolean, [], function () {})); return true; } catch (e) { return false; } } module.exports = _isnativereflectconstruct, module.exports.__esmodule = true, module.exports["default"] = module.exports; /***/ }), /***/ 318: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.bytelength = bytelength exports.tobytearray = tobytearray exports.frombytearray = frombytearray var lookup = [] var revlookup = [] var arr = typeof uint8array !== 'undefined' ? uint8array : array var code = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revlookup[code.charcodeat(i)] = i } // support decoding url-safe base64 strings, as node.js does. // see: https://en.wikipedia.org/wiki/base64#url_applications revlookup['-'.charcodeat(0)] = 62 revlookup['_'.charcodeat(0)] = 63 function getlens (b64) { var len = b64.length if (len % 4 > 0) { throw new error('invalid string. length must be a multiple of 4') } // trim off extra bytes after placeholder bytes are found // see: https://github.com/beatgammit/base64-js/issues/42 var validlen = b64.indexof('=') if (validlen === -1) validlen = len var placeholderslen = validlen === len ? 0 : 4 - (validlen % 4) return [validlen, placeholderslen] } // base64 is 4/3 + up to two characters of the original data function bytelength (b64) { var lens = getlens(b64) var validlen = lens[0] var placeholderslen = lens[1] return ((validlen + placeholderslen) * 3 / 4) - placeholderslen } function _bytelength (b64, validlen, placeholderslen) { return ((validlen + placeholderslen) * 3 / 4) - placeholderslen } function tobytearray (b64) { var tmp var lens = getlens(b64) var validlen = lens[0] var placeholderslen = lens[1] var arr = new arr(_bytelength(b64, validlen, placeholderslen)) var curbyte = 0 // if there are placeholders, only get up to the last complete 4 chars var len = placeholderslen > 0 ? validlen - 4 : validlen var i for (i = 0; i < len; i += 4) { tmp = (revlookup[b64.charcodeat(i)] << 18) | (revlookup[b64.charcodeat(i + 1)] << 12) | (revlookup[b64.charcodeat(i + 2)] << 6) | revlookup[b64.charcodeat(i + 3)] arr[curbyte++] = (tmp >> 16) & 0xff arr[curbyte++] = (tmp >> 8) & 0xff arr[curbyte++] = tmp & 0xff } if (placeholderslen === 2) { tmp = (revlookup[b64.charcodeat(i)] << 2) | (revlookup[b64.charcodeat(i + 1)] >> 4) arr[curbyte++] = tmp & 0xff } if (placeholderslen === 1) { tmp = (revlookup[b64.charcodeat(i)] << 10) | (revlookup[b64.charcodeat(i + 1)] << 4) | (revlookup[b64.charcodeat(i + 2)] >> 2) arr[curbyte++] = (tmp >> 8) & 0xff arr[curbyte++] = tmp & 0xff } return arr } function triplettobase64 (num) { return lookup[num >> 18 & 0x3f] + lookup[num >> 12 & 0x3f] + lookup[num >> 6 & 0x3f] + lookup[num & 0x3f] } function encodechunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = ((uint8[i] << 16) & 0xff0000) + ((uint8[i + 1] << 8) & 0xff00) + (uint8[i + 2] & 0xff) output.push(triplettobase64(tmp)) } return output.join('') } function frombytearray (uint8) { var tmp var len = uint8.length var extrabytes = len % 3 // if we have 1 byte left, pad 2 bytes var parts = [] var maxchunklength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extrabytes; i < len2; i += maxchunklength) { parts.push(encodechunk(uint8, i, (i + maxchunklength) > len2 ? len2 : (i + maxchunklength))) } // pad the end with zeros, but make sure to not forget the extra bytes if (extrabytes === 1) { tmp = uint8[len - 1] parts.push( lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3f] + '==' ) } else if (extrabytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] parts.push( lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3f] + lookup[(tmp << 2) & 0x3f] + '=' ) } return parts.join('') } /***/ }), /***/ 321: /***/ (function(module, exports, __webpack_require__) { var conventions = __webpack_require__(85); var dom = __webpack_require__(177) var entities = __webpack_require__(322); var sax = __webpack_require__(323); var domimplementation = dom.domimplementation; var namespace = conventions.namespace; var parseerror = sax.parseerror; var xmlreader = sax.xmlreader; function domparser(options){ this.options = options ||{locator:{}}; } domparser.prototype.parsefromstring = function(source,mimetype){ var options = this.options; var sax = new xmlreader(); var dombuilder = options.dombuilder || new domhandler();//contenthandler and lexicalhandler var errorhandler = options.errorhandler; var locator = options.locator; var defaultnsmap = options.xmlns||{}; var ishtml = /\/x?html?$/.test(mimetype);//mimetype.tolowercase().indexof('html') > -1; var entitymap = ishtml ? entities.html_entities : entities.xml_entities; if(locator){ dombuilder.setdocumentlocator(locator) } sax.errorhandler = builderrorhandler(errorhandler,dombuilder,locator); sax.dombuilder = options.dombuilder || dombuilder; if(ishtml){ defaultnsmap[''] = namespace.html; } defaultnsmap.xml = defaultnsmap.xml || namespace.xml; if(source && typeof source === 'string'){ sax.parse(source,defaultnsmap,entitymap); }else{ sax.errorhandler.error("invalid doc source"); } return dombuilder.doc; } function builderrorhandler(errorimpl,dombuilder,locator){ if(!errorimpl){ if(dombuilder instanceof domhandler){ return dombuilder; } errorimpl = dombuilder ; } var errorhandler = {} var iscallback = errorimpl instanceof function; locator = locator||{} function build(key){ var fn = errorimpl[key]; if(!fn && iscallback){ fn = errorimpl.length == 2?function(msg){errorimpl(key,msg)}:errorimpl; } errorhandler[key] = fn && function(msg){ fn('[xmldom '+key+']\t'+msg+_locator(locator)); }||function(){}; } build('warning'); build('error'); build('fatalerror'); return errorhandler; } //console.log('#\n\n\n\n\n\n\n####') /** * +contenthandler+errorhandler * +lexicalhandler+entityresolver2 * -declhandler-dtdhandler * * defaulthandler:entityresolver, dtdhandler, contenthandler, errorhandler * defaulthandler2:defaulthandler,lexicalhandler, declhandler, entityresolver2 * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/defaulthandler.html */ function domhandler() { this.cdata = false; } function position(locator,node){ node.linenumber = locator.linenumber; node.columnnumber = locator.columnnumber; } /** * @see org.xml.sax.contenthandler#startdocument * @link http://www.saxproject.org/apidoc/org/xml/sax/contenthandler.html */ domhandler.prototype = { startdocument : function() { this.doc = new domimplementation().createdocument(null, null, null); if (this.locator) { this.doc.documenturi = this.locator.systemid; } }, startelement:function(namespaceuri, localname, qname, attrs) { var doc = this.doc; var el = doc.createelementns(namespaceuri, qname||localname); var len = attrs.length; appendelement(this, el); this.currentelement = el; this.locator && position(this.locator,el) for (var i = 0 ; i < len; i++) { var namespaceuri = attrs.geturi(i); var value = attrs.getvalue(i); var qname = attrs.getqname(i); var attr = doc.createattributens(namespaceuri, qname); this.locator &&position(attrs.getlocator(i),attr); attr.value = attr.nodevalue = value; el.setattributenode(attr) } }, endelement:function(namespaceuri, localname, qname) { var current = this.currentelement var tagname = current.tagname; this.currentelement = current.parentnode; }, startprefixmapping:function(prefix, uri) { }, endprefixmapping:function(prefix) { }, processinginstruction:function(target, data) { var ins = this.doc.createprocessinginstruction(target, data); this.locator && position(this.locator,ins) appendelement(this, ins); }, ignorablewhitespace:function(ch, start, length) { }, characters:function(chars, start, length) { chars = _tostring.apply(this,arguments) //console.log(chars) if(chars){ if (this.cdata) { var charnode = this.doc.createcdatasection(chars); } else { var charnode = this.doc.createtextnode(chars); } if(this.currentelement){ this.currentelement.appendchild(charnode); }else if(/^\s*$/.test(chars)){ this.doc.appendchild(charnode); //process xml } this.locator && position(this.locator,charnode) } }, skippedentity:function(name) { }, enddocument:function() { this.doc.normalize(); }, setdocumentlocator:function (locator) { if(this.locator = locator){// && !('linenumber' in locator)){ locator.linenumber = 0; } }, //lexicalhandler comment:function(chars, start, length) { chars = _tostring.apply(this,arguments) var comm = this.doc.createcomment(chars); this.locator && position(this.locator,comm) appendelement(this, comm); }, startcdata:function() { //used in characters() methods this.cdata = true; }, endcdata:function() { this.cdata = false; }, startdtd:function(name, publicid, systemid) { var impl = this.doc.implementation; if (impl && impl.createdocumenttype) { var dt = impl.createdocumenttype(name, publicid, systemid); this.locator && position(this.locator,dt) appendelement(this, dt); this.doc.doctype = dt; } }, /** * @see org.xml.sax.errorhandler * @link http://www.saxproject.org/apidoc/org/xml/sax/errorhandler.html */ warning:function(error) { console.warn('[xmldom warning]\t'+error,_locator(this.locator)); }, error:function(error) { console.error('[xmldom error]\t'+error,_locator(this.locator)); }, fatalerror:function(error) { throw new parseerror(error, this.locator); } } function _locator(l){ if(l){ return '\n@'+(l.systemid ||'')+'#[line:'+l.linenumber+',col:'+l.columnnumber+']' } } function _tostring(chars,start,length){ if(typeof chars == 'string'){ return chars.substr(start,length) }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof string)") if(chars.length >= start+length || start){ return new java.lang.string(chars,start,length)+''; } return chars; } } /* * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/lexicalhandler.html * used method of org.xml.sax.ext.lexicalhandler: * #comment(chars, start, length) * #startcdata() * #endcdata() * #startdtd(name, publicid, systemid) * * * ignored method of org.xml.sax.ext.lexicalhandler: * #enddtd() * #startentity(name) * #endentity(name) * * * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/declhandler.html * ignored method of org.xml.sax.ext.declhandler * #attributedecl(ename, aname, type, mode, value) * #elementdecl(name, model) * #externalentitydecl(name, publicid, systemid) * #internalentitydecl(name, value) * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/entityresolver2.html * ignored method of org.xml.sax.entityresolver2 * #resolveentity(string name,string publicid,string baseuri,string systemid) * #resolveentity(publicid, systemid) * #getexternalsubset(name, baseuri) * @link http://www.saxproject.org/apidoc/org/xml/sax/dtdhandler.html * ignored method of org.xml.sax.dtdhandler * #notationdecl(name, publicid, systemid) {}; * #unparsedentitydecl(name, publicid, systemid, notationname) {}; */ "enddtd,startentity,endentity,attributedecl,elementdecl,externalentitydecl,internalentitydecl,resolveentity,getexternalsubset,notationdecl,unparsedentitydecl".replace(/\w+/g,function(key){ domhandler.prototype[key] = function(){return null} }) /* private static helpers treated below as private instance methods, so don't need to add these to the public api; we might use a relator to also get rid of non-standard public properties */ function appendelement (hander,node) { if (!hander.currentelement) { hander.doc.appendchild(node); } else { hander.currentelement.appendchild(node); } }//appendchild and setattributens are preformance key exports.__domhandler = domhandler; exports.domparser = domparser; /** * @deprecated import/require from main entry point instead */ exports.domimplementation = dom.domimplementation; /** * @deprecated import/require from main entry point instead */ exports.xmlserializer = dom.xmlserializer; /***/ }), /***/ 322: /***/ (function(module, exports, __webpack_require__) { var freeze = __webpack_require__(85).freeze; /** * the entities that are predefined in every xml document. * * @see https://www.w3.org/tr/2006/rec-xml11-20060816/#sec-predefined-ent w3c xml 1.1 * @see https://www.w3.org/tr/2008/rec-xml-20081126/#sec-predefined-ent w3c xml 1.0 * @see https://en.wikipedia.org/wiki/list_of_xml_and_html_character_entity_references#predefined_entities_in_xml wikipedia */ exports.xml_entities = freeze({amp:'&', apos:"'", gt:'>', lt:'<', quot:'"'}) /** * a map of currently 241 entities that are detected in an html document. * they contain all entries from `xml_entities`. * * @see xml_entities * @see domparser.parsefromstring * @see domimplementation.prototype.createhtmldocument * @see https://html.spec.whatwg.org/#named-character-references whatwg html(5) spec * @see https://www.w3.org/tr/xml-entity-names/ w3c xml entity names * @see https://www.w3.org/tr/html4/sgml/entities.html w3c html4/sgml * @see https://en.wikipedia.org/wiki/list_of_xml_and_html_character_entity_references#character_entity_references_in_html wikipedia (html) * @see https://en.wikipedia.org/wiki/list_of_xml_and_html_character_entity_references#entities_representing_special_characters_in_xhtml wikpedia (xhtml) */ exports.html_entities = freeze({ lt: '<', gt: '>', amp: '&', quot: '"', apos: "'", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", nbsp: "\u00a0", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "­­", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", times: "×", divide: "÷", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", 'int': "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "υ", piv: "ϖ", oelig: "œ", oelig: "œ", scaron: "š", scaron: "š", yuml: "ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", ensp: " ", emsp: " ", thinsp: " ", zwnj: "‌", zwj: "‍", lrm: "‎", rlm: "‏", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", euro: "€", trade: "™", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }); /** * @deprecated use `html_entities` instead * @see html_entities */ exports.entitymap = exports.html_entities /***/ }), /***/ 323: /***/ (function(module, exports, __webpack_require__) { var namespace = __webpack_require__(85).namespace; //[4] namestartchar ::= ":" | [a-z] | "_" | [a-z] | [#xc0-#xd6] | [#xd8-#xf6] | [#xf8-#x2ff] | [#x370-#x37d] | [#x37f-#x1fff] | [#x200c-#x200d] | [#x2070-#x218f] | [#x2c00-#x2fef] | [#x3001-#xd7ff] | [#xf900-#xfdcf] | [#xfdf0-#xfffd] | [#x10000-#xeffff] //[4a] namechar ::= namestartchar | "-" | "." | [0-9] | #xb7 | [#x0300-#x036f] | [#x203f-#x2040] //[5] name ::= namestartchar (namechar)* var namestartchar = /[a-z_a-z\xc0-\xd6\xd8-\xf6\u00f8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]///\u10000-\ueffff var namechar = new regexp("[\\-\\.0-9"+namestartchar.source.slice(1,-1)+"\\u00b7\\u0300-\\u036f\\u203f-\\u2040]"); var tagnamepattern = new regexp('^'+namestartchar.source+namechar.source+'*(?:\:'+namestartchar.source+namechar.source+'*)?$'); //var tagnamepattern = /^[a-za-z_][\w\-\.]*(?:\:[a-za-z_][\w\-\.]*)?$/ //var handlers = 'resolveentity,getexternalsubset,characters,enddocument,endelement,endprefixmapping,ignorablewhitespace,processinginstruction,setdocumentlocator,skippedentity,startdocument,startelement,startprefixmapping,notationdecl,unparsedentitydecl,error,fatalerror,warning,attributedecl,elementdecl,externalentitydecl,internalentitydecl,comment,endcdata,enddtd,endentity,startcdata,startdtd,startentity'.split(',') //s_tag, s_attr, s_eq, s_attr_noquot_value //s_attr_space, s_attr_end, s_tag_space, s_tag_close var s_tag = 0;//tag name offerring var s_attr = 1;//attr name offerring var s_attr_space=2;//attr name end and space offer var s_eq = 3;//=space? var s_attr_noquot_value = 4;//attr value(no quot value only) var s_attr_end = 5;//attr value end and no space(quot end) var s_tag_space = 6;//(attr value end || tag end ) && (space offer) var s_tag_close = 7;//closed el /** * creates an error that will not be caught by xmlreader aka the sax parser. * * @param {string} message * @param {any?} locator optional, can provide details about the location in the source * @constructor */ function parseerror(message, locator) { this.message = message this.locator = locator if(error.capturestacktrace) error.capturestacktrace(this, parseerror); } parseerror.prototype = new error(); parseerror.prototype.name = parseerror.name function xmlreader(){ } xmlreader.prototype = { parse:function(source,defaultnsmap,entitymap){ var dombuilder = this.dombuilder; dombuilder.startdocument(); _copy(defaultnsmap ,defaultnsmap = {}) parse(source,defaultnsmap,entitymap, dombuilder,this.errorhandler); dombuilder.enddocument(); } } function parse(source,defaultnsmapcopy,entitymap,dombuilder,errorhandler){ function fixedfromcharcode(code) { // string.prototype.fromcharcode does not supports // > 2 bytes unicode chars directly if (code > 0xffff) { code -= 0x10000; var surrogate1 = 0xd800 + (code >> 10) , surrogate2 = 0xdc00 + (code & 0x3ff); return string.fromcharcode(surrogate1, surrogate2); } else { return string.fromcharcode(code); } } function entityreplacer(a){ var k = a.slice(1,-1); if(k in entitymap){ return entitymap[k]; }else if(k.charat(0) === '#'){ return fixedfromcharcode(parseint(k.substr(1).replace('x','0x'))) }else{ errorhandler.error('entity not found:'+a); return a; } } function appendtext(end){//has some bugs if(end>start){ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityreplacer); locator&&position(start); dombuilder.characters(xt,0,end-start); start = end } } function position(p,m){ while(p>=lineend && (m = linepattern.exec(source))){ linestart = m.index; lineend = linestart + m[0].length; locator.linenumber++; //console.log('line++:',locator,startpos,endpos) } locator.columnnumber = p-linestart+1; } var linestart = 0; var lineend = 0; var linepattern = /.*(?:\r\n?|\n)|.*$/g var locator = dombuilder.locator; var parsestack = [{currentnsmap:defaultnsmapcopy}] var closemap = {}; var start = 0; while(true){ try{ var tagstart = source.indexof('<',start); if(tagstart<0){ if(!source.substr(start).match(/^\s*$/)){ var doc = dombuilder.doc; var text = doc.createtextnode(source.substr(start)); doc.appendchild(text); dombuilder.currentelement = text; } return; } if(tagstart>start){ appendtext(tagstart); } switch(source.charat(tagstart+1)){ case '/': var end = source.indexof('>',tagstart+3); var tagname = source.substring(tagstart + 2, end).replace(/[ \t\n\r]+$/g, ''); var config = parsestack.pop(); if(end<0){ tagname = source.substring(tagstart+2).replace(/[\s<].*/,''); errorhandler.error("end tag name: "+tagname+' is not complete:'+config.tagname); end = tagstart+1+tagname.length; }else if(tagname.match(/\s locator&&position(tagstart); end = parseinstruction(source,tagstart,dombuilder); break; case '!':// start){ start = end; }else{ //todo: 这里有可能sax回退,有位置错误风险 appendtext(math.max(tagstart,start)+1); } } } function copylocator(f,t){ t.linenumber = f.linenumber; t.columnnumber = f.columnnumber; return t; } /** * @see #appendelement(source,elstartend,el,selfclosed,entityreplacer,dombuilder,parsestack); * @return end of the elementstartpart(end of elementendpart for selfclosed el) */ function parseelementstartpart(source,start,el,currentnsmap,entityreplacer,errorhandler){ /** * @param {string} qname * @param {string} value * @param {number} startindex */ function addattribute(qname, value, startindex) { if (el.attributenames.hasownproperty(qname)) { errorhandler.fatalerror('attribute ' + qname + ' redefined') } el.addvalue(qname, value, startindex) } var attrname; var value; var p = ++start; var s = s_tag;//status while(true){ var c = source.charat(p); switch(c){ case '=': if(s === s_attr){//attrname attrname = source.slice(start,p); s = s_eq; }else if(s === s_attr_space){ s = s_eq; }else{ //fatalerror: equal must after attrname or space after attrname throw new error('attribute equal must after attrname'); // no known test case } break; case '\'': case '"': if(s === s_eq || s === s_attr //|| s == s_attr_space ){//equal if(s === s_attr){ errorhandler.warning('attribute value must after "="') attrname = source.slice(start,p) } start = p+1; p = source.indexof(c,start) if(p>0){ value = source.slice(start,p).replace(/&#?\w+;/g,entityreplacer); addattribute(attrname, value, start-1); s = s_attr_end; }else{ //fatalerror: no end quot match throw new error('attribute value no end \''+c+'\' match'); } }else if(s == s_attr_noquot_value){ value = source.slice(start,p).replace(/&#?\w+;/g,entityreplacer); //console.log(attrname,value,start,p) addattribute(attrname, value, start); //console.dir(el) errorhandler.warning('attribute "'+attrname+'" missed start quot('+c+')!!'); start = p+1; s = s_attr_end }else{ //fatalerror: no equal before throw new error('attribute value must after "="'); // no known test case } break; case '/': switch(s){ case s_tag: el.settagname(source.slice(start,p)); case s_attr_end: case s_tag_space: case s_tag_close: s =s_tag_close; el.closed = true; case s_attr_noquot_value: case s_attr: case s_attr_space: break; //case s_eq: default: throw new error("attribute invalid close char('/')") // no known test case } break; case ''://end document errorhandler.error('unexpected end of input'); if(s == s_tag){ el.settagname(source.slice(start,p)); } return p; case '>': switch(s){ case s_tag: el.settagname(source.slice(start,p)); case s_attr_end: case s_tag_space: case s_tag_close: break;//normal case s_attr_noquot_value://compatible state case s_attr: value = source.slice(start,p); if(value.slice(-1) === '/'){ el.closed = true; value = value.slice(0,-1) } case s_attr_space: if(s === s_attr_space){ value = attrname; } if(s == s_attr_noquot_value){ errorhandler.warning('attribute "'+value+'" missed quot(")!'); addattribute(attrname, value.replace(/&#?\w+;/g,entityreplacer), start) }else{ if(!namespace.ishtml(currentnsmap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){ errorhandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') } addattribute(value, value, start) } break; case s_eq: throw new error('attribute value missed!!'); } // console.log(tagname,tagnamepattern,tagnamepattern.test(tagname)) return p; /*xml space '\x20' | #x9 | #xd | #xa; */ case '\u0080': c = ' '; default: if(c<= ' '){//space switch(s){ case s_tag: el.settagname(source.slice(start,p));//tagname s = s_tag_space; break; case s_attr: attrname = source.slice(start,p) s = s_attr_space; break; case s_attr_noquot_value: var value = source.slice(start,p).replace(/&#?\w+;/g,entityreplacer); errorhandler.warning('attribute "'+value+'" missed quot(")!!'); addattribute(attrname, value, start) case s_attr_end: s = s_tag_space; break; //case s_tag_space: //case s_eq: //case s_attr_space: // void();break; //case s_tag_close: //ignore warning } }else{//not space //s_tag, s_attr, s_eq, s_attr_noquot_value //s_attr_space, s_attr_end, s_tag_space, s_tag_close switch(s){ //case s_tag:void();break; //case s_attr:void();break; //case s_attr_noquot_value:void();break; case s_attr_space: var tagname = el.tagname; if (!namespace.ishtml(currentnsmap['']) || !attrname.match(/^(?:disabled|checked|selected)$/i)) { errorhandler.warning('attribute "'+attrname+'" missed value!! "'+attrname+'" instead2!!') } addattribute(attrname, attrname, start); start = p; s = s_attr; break; case s_attr_end: errorhandler.warning('attribute space is required"'+attrname+'"!!') case s_tag_space: s = s_attr; start = p; break; case s_eq: s = s_attr_noquot_value; start = p; break; case s_tag_close: throw new error("elements closed character '/' and '>' must be connected to"); } } }//end outer switch //console.log('p++',p) p++; } } /** * @return true if has new namespace define */ function appendelement(el,dombuilder,currentnsmap){ var tagname = el.tagname; var localnsmap = null; //var currentnsmap = parsestack[parsestack.length-1].currentnsmap; var i = el.length; while(i--){ var a = el[i]; var qname = a.qname; var value = a.value; var nsp = qname.indexof(':'); if(nsp>0){ var prefix = a.prefix = qname.slice(0,nsp); var localname = qname.slice(nsp+1); var nsprefix = prefix === 'xmlns' && localname }else{ localname = qname; prefix = null nsprefix = qname === 'xmlns' && '' } //can not set prefix,because prefix !== '' a.localname = localname ; //prefix == null for no ns prefix attribute if(nsprefix !== false){//hack!! if(localnsmap == null){ localnsmap = {} //console.log(currentnsmap,0) _copy(currentnsmap,currentnsmap={}) //console.log(currentnsmap,1) } currentnsmap[nsprefix] = localnsmap[nsprefix] = value; a.uri = namespace.xmlns dombuilder.startprefixmapping(nsprefix, value) } } var i = el.length; while(i--){ a = el[i]; var prefix = a.prefix; if(prefix){//no prefix attribute has no namespace if(prefix === 'xml'){ a.uri = namespace.xml; }if(prefix !== 'xmlns'){ a.uri = currentnsmap[prefix || ''] //{console.log('###'+a.qname,dombuilder.locator.systemid+'',currentnsmap,a.uri)} } } } var nsp = tagname.indexof(':'); if(nsp>0){ prefix = el.prefix = tagname.slice(0,nsp); localname = el.localname = tagname.slice(nsp+1); }else{ prefix = null;//important!! localname = el.localname = tagname; } //no prefix element has default namespace var ns = el.uri = currentnsmap[prefix || '']; dombuilder.startelement(ns,localname,tagname,el); //endprefixmapping and startprefixmapping have not any help for dom builder //localnsmap = null if(el.closed){ dombuilder.endelement(ns,localname,tagname); if(localnsmap){ for(prefix in localnsmap){ dombuilder.endprefixmapping(prefix) } } }else{ el.currentnsmap = currentnsmap; el.localnsmap = localnsmap; //parsestack.push(el); return true; } } function parsehtmlspecialcontent(source,elstartend,tagname,entityreplacer,dombuilder){ if(/^(?:script|textarea)$/i.test(tagname)){ var elendstart = source.indexof('',elstartend); var text = source.substring(elstartend+1,elendstart); if(/[&<]/.test(text)){ if(/^script$/i.test(tagname)){ //if(!/\]\]>/.test(text)){ //lexhandler.startcdata(); dombuilder.characters(text,0,text.length); //lexhandler.endcdata(); return elendstart; //} }//}else{//text area text = text.replace(/&#?\w+;/g,entityreplacer); dombuilder.characters(text,0,text.length); return elendstart; //} } } return elstartend+1; } function fixselfclosed(source,elstartend,tagname,closemap){ //if(tagname in closemap){ var pos = closemap[tagname]; if(pos == null){ //console.log(tagname) pos = source.lastindexof('') if(pos',start+4); //append comment source.substring(4,end)//