>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r 1) t1.pop();
+ if (t2.length > 1) t2.pop();
+ n1 = parseInt(t1.join('.'));
+ n2 = parseInt(t2.join('.'));
+ if (!isNaN(n1) && !isNaN(n2)) {
+ if (n1 === n2) return 0;
+ return n1 > n2 ? 1 : -1;
+ }
}
- this._maxListeners = n;
- return this;
+ if (f1 === f2) return 0;
+ return f1 > f2 ? 1 : -1;
+}
+module.exports = {
+ smartSortImages: smartSortImages
};
-function $getMaxListeners(that) {
- if (that._maxListeners === undefined)
- return EventEmitter.defaultMaxListeners;
- return that._maxListeners;
-}
+/***/ }),
+/* 94 */
+/***/ (function(module, exports, __webpack_require__) {
-EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
- return $getMaxListeners(this);
+var isObject = __webpack_require__(6);
+var document = __webpack_require__(4).document;
+// typeof document.createElement is 'object' in old IE
+var is = isObject(document) && isObject(document.createElement);
+module.exports = function (it) {
+ return is ? document.createElement(it) : {};
};
-EventEmitter.prototype.emit = function emit(type) {
- var args = [];
- for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
- var doError = (type === 'error');
-
- var events = this._events;
- if (events !== undefined)
- doError = (doError && events.error === undefined);
- else if (!doError)
- return false;
- // If there is no 'error' event listener then throw.
- if (doError) {
- var er;
- if (args.length > 0)
- er = args[0];
- if (er instanceof Error) {
- // Note: The comments on the `throw` lines are intentional, they show
- // up in Node's output if this results in an unhandled exception.
- throw er; // Unhandled 'error' event
- }
- // At least give some kind of context to the user
- var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
- err.context = er;
- throw err; // Unhandled 'error' event
- }
+/***/ }),
+/* 95 */
+/***/ (function(module, exports, __webpack_require__) {
- var handler = events[type];
+var global = __webpack_require__(4);
+var core = __webpack_require__(25);
+var LIBRARY = __webpack_require__(39);
+var wksExt = __webpack_require__(157);
+var defineProperty = __webpack_require__(11).f;
+module.exports = function (name) {
+ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
+ if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
+};
- if (handler === undefined)
- return false;
- if (typeof handler === 'function') {
- ReflectApply(handler, this, args);
- } else {
- var len = handler.length;
- var listeners = arrayClone(handler, len);
- for (var i = 0; i < len; ++i)
- ReflectApply(listeners[i], this, args);
- }
+/***/ }),
+/* 96 */
+/***/ (function(module, exports, __webpack_require__) {
- return true;
+var shared = __webpack_require__(62)('keys');
+var uid = __webpack_require__(43);
+module.exports = function (key) {
+ return shared[key] || (shared[key] = uid(key));
};
-function _addListener(target, type, listener, prepend) {
- var m;
- var events;
- var existing;
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
+/***/ }),
+/* 97 */
+/***/ (function(module, exports) {
- events = target._events;
- if (events === undefined) {
- events = target._events = Object.create(null);
- target._eventsCount = 0;
- } else {
- // To avoid recursion in the case that type === "newListener"! Before
- // adding it to the listeners, first emit "newListener".
- if (events.newListener !== undefined) {
- target.emit('newListener', type,
- listener.listener ? listener.listener : listener);
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+).split(',');
- // Re-assign `events` because a newListener handler could have caused the
- // this._events to be assigned to a new object
- events = target._events;
- }
- existing = events[type];
- }
- if (existing === undefined) {
- // Optimize the case of one listener. Don't need the extra array object.
- existing = events[type] = listener;
- ++target._eventsCount;
- } else {
- if (typeof existing === 'function') {
- // Adding the second element, need to change to array.
- existing = events[type] =
- prepend ? [listener, existing] : [existing, listener];
- // If we've already got an array, just append.
- } else if (prepend) {
- existing.unshift(listener);
- } else {
- existing.push(listener);
- }
+/***/ }),
+/* 98 */
+/***/ (function(module, exports, __webpack_require__) {
- // Check for listener leak
- m = $getMaxListeners(target);
- if (m > 0 && existing.length > m && !existing.warned) {
- existing.warned = true;
- // No error code for this since it is a Warning
- // eslint-disable-next-line no-restricted-syntax
- var w = new Error('Possible EventEmitter memory leak detected. ' +
- existing.length + ' ' + String(type) + ' listeners ' +
- 'added. Use emitter.setMaxListeners() to ' +
- 'increase limit');
- w.name = 'MaxListenersExceededWarning';
- w.emitter = target;
- w.type = type;
- w.count = existing.length;
- ProcessEmitWarning(w);
- }
- }
+var document = __webpack_require__(4).document;
+module.exports = document && document.documentElement;
- return target;
-}
-EventEmitter.prototype.addListener = function addListener(type, listener) {
- return _addListener(this, type, listener, false);
+/***/ }),
+/* 99 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var isObject = __webpack_require__(6);
+var anObject = __webpack_require__(3);
+var check = function (O, proto) {
+ anObject(O);
+ if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
+};
+module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function (test, buggy, set) {
+ try {
+ set = __webpack_require__(26)(Function.call, __webpack_require__(21).f(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch (e) { buggy = true; }
+ return function setPrototypeOf(O, proto) {
+ check(O, proto);
+ if (buggy) O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
};
-EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-EventEmitter.prototype.prependListener =
- function prependListener(type, listener) {
- return _addListener(this, type, listener, true);
- };
+/***/ }),
+/* 100 */
+/***/ (function(module, exports) {
-function onceWrapper() {
- var args = [];
- for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
- if (!this.fired) {
- this.target.removeListener(this.type, this.wrapFn);
- this.fired = true;
- ReflectApply(this.listener, this.target, args);
- }
-}
+module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-function _onceWrap(target, type, listener) {
- var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
- var wrapped = onceWrapper.bind(state);
- wrapped.listener = listener;
- state.wrapFn = wrapped;
- return wrapped;
-}
-EventEmitter.prototype.once = function once(type, listener) {
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- this.on(type, _onceWrap(this, type, listener));
- return this;
-};
+/***/ }),
+/* 101 */
+/***/ (function(module, exports, __webpack_require__) {
-EventEmitter.prototype.prependOnceListener =
- function prependOnceListener(type, listener) {
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
- this.prependListener(type, _onceWrap(this, type, listener));
- return this;
- };
+var isObject = __webpack_require__(6);
+var setPrototypeOf = __webpack_require__(99).set;
+module.exports = function (that, target, C) {
+ var S = target.constructor;
+ var P;
+ if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
+ setPrototypeOf(that, P);
+ } return that;
+};
-// Emits a 'removeListener' event if and only if the listener was removed.
-EventEmitter.prototype.removeListener =
- function removeListener(type, listener) {
- var list, events, position, i, originalListener;
- if (typeof listener !== 'function') {
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
- }
+/***/ }),
+/* 102 */
+/***/ (function(module, exports, __webpack_require__) {
- events = this._events;
- if (events === undefined)
- return this;
+"use strict";
- list = events[type];
- if (list === undefined)
- return this;
+var toInteger = __webpack_require__(28);
+var defined = __webpack_require__(32);
- if (list === listener || list.listener === listener) {
- if (--this._eventsCount === 0)
- this._events = Object.create(null);
- else {
- delete events[type];
- if (events.removeListener)
- this.emit('removeListener', type, list.listener || listener);
- }
- } else if (typeof list !== 'function') {
- position = -1;
+module.exports = function repeat(count) {
+ var str = String(defined(this));
+ var res = '';
+ var n = toInteger(count);
+ if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
+ for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
+ return res;
+};
- for (i = list.length - 1; i >= 0; i--) {
- if (list[i] === listener || list[i].listener === listener) {
- originalListener = list[i].listener;
- position = i;
- break;
- }
- }
- if (position < 0)
- return this;
+/***/ }),
+/* 103 */
+/***/ (function(module, exports) {
- if (position === 0)
- list.shift();
- else {
- spliceOne(list, position);
- }
+// 20.2.2.28 Math.sign(x)
+module.exports = Math.sign || function sign(x) {
+ // eslint-disable-next-line no-self-compare
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+};
- if (list.length === 1)
- events[type] = list[0];
- if (events.removeListener !== undefined)
- this.emit('removeListener', type, originalListener || listener);
- }
+/***/ }),
+/* 104 */
+/***/ (function(module, exports) {
- return this;
- };
+// 20.2.2.14 Math.expm1(x)
+var $expm1 = Math.expm1;
+module.exports = (!$expm1
+ // Old FF bug
+ || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
+ // Tor Browser bug
+ || $expm1(-2e-17) != -2e-17
+) ? function expm1(x) {
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+} : $expm1;
-EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
-EventEmitter.prototype.removeAllListeners =
- function removeAllListeners(type) {
- var listeners, events, i;
+/***/ }),
+/* 105 */
+/***/ (function(module, exports, __webpack_require__) {
- events = this._events;
- if (events === undefined)
- return this;
+"use strict";
- // not listening for removeListener, no need to emit
- if (events.removeListener === undefined) {
- if (arguments.length === 0) {
- this._events = Object.create(null);
- this._eventsCount = 0;
- } else if (events[type] !== undefined) {
- if (--this._eventsCount === 0)
- this._events = Object.create(null);
- else
- delete events[type];
- }
- return this;
- }
-
- // emit removeListener for all listeners on all events
- if (arguments.length === 0) {
- var keys = Object.keys(events);
- var key;
- for (i = 0; i < keys.length; ++i) {
- key = keys[i];
- if (key === 'removeListener') continue;
- this.removeAllListeners(key);
- }
- this.removeAllListeners('removeListener');
- this._events = Object.create(null);
- this._eventsCount = 0;
- return this;
- }
-
- listeners = events[type];
+var LIBRARY = __webpack_require__(39);
+var $export = __webpack_require__(1);
+var redefine = __webpack_require__(17);
+var hide = __webpack_require__(16);
+var Iterators = __webpack_require__(58);
+var $iterCreate = __webpack_require__(106);
+var setToStringTag = __webpack_require__(55);
+var getPrototypeOf = __webpack_require__(22);
+var ITERATOR = __webpack_require__(7)('iterator');
+var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
+var FF_ITERATOR = '@@iterator';
+var KEYS = 'keys';
+var VALUES = 'values';
- if (typeof listeners === 'function') {
- this.removeListener(type, listeners);
- } else if (listeners !== undefined) {
- // LIFO order
- for (i = listeners.length - 1; i >= 0; i--) {
- this.removeListener(type, listeners[i]);
- }
- }
+var returnThis = function () { return this; };
- return this;
+module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function (kind) {
+ if (!BUGGY && kind in proto) return proto[kind];
+ switch (kind) {
+ case KEYS: return function keys() { return new Constructor(this, kind); };
+ case VALUES: return function values() { return new Constructor(this, kind); };
+ } return function entries() { return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator';
+ var DEF_VALUES = DEFAULT == VALUES;
+ var VALUES_BUG = false;
+ var proto = Base.prototype;
+ var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
+ var $default = $native || getMethod(DEFAULT);
+ var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
+ var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
+ var methods, key, IteratorPrototype;
+ // Fix native
+ if ($anyNative) {
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
+ if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
+ VALUES_BUG = true;
+ $default = function values() { return $native.call(this); };
+ }
+ // Define iterator
+ if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if (DEFAULT) {
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
};
+ if (FORCED) for (key in methods) {
+ if (!(key in proto)) redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+};
-function _listeners(target, type, unwrap) {
- var events = target._events;
- if (events === undefined)
- return [];
+/***/ }),
+/* 106 */
+/***/ (function(module, exports, __webpack_require__) {
- var evlistener = events[type];
- if (evlistener === undefined)
- return [];
+"use strict";
- if (typeof evlistener === 'function')
- return unwrap ? [evlistener.listener || evlistener] : [evlistener];
+var create = __webpack_require__(46);
+var descriptor = __webpack_require__(42);
+var setToStringTag = __webpack_require__(55);
+var IteratorPrototype = {};
- return unwrap ?
- unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
-}
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+__webpack_require__(16)(IteratorPrototype, __webpack_require__(7)('iterator'), function () { return this; });
-EventEmitter.prototype.listeners = function listeners(type) {
- return _listeners(this, type, true);
+module.exports = function (Constructor, NAME, next) {
+ Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
+ setToStringTag(Constructor, NAME + ' Iterator');
};
-EventEmitter.prototype.rawListeners = function rawListeners(type) {
- return _listeners(this, type, false);
-};
-EventEmitter.listenerCount = function(emitter, type) {
- if (typeof emitter.listenerCount === 'function') {
- return emitter.listenerCount(type);
- } else {
- return listenerCount.call(emitter, type);
- }
-};
+/***/ }),
+/* 107 */
+/***/ (function(module, exports, __webpack_require__) {
-EventEmitter.prototype.listenerCount = listenerCount;
-function listenerCount(type) {
- var events = this._events;
+// helper for String#{startsWith, endsWith, includes}
+var isRegExp = __webpack_require__(74);
+var defined = __webpack_require__(32);
- if (events !== undefined) {
- var evlistener = events[type];
+module.exports = function (that, searchString, NAME) {
+ if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
+ return String(defined(that));
+};
- if (typeof evlistener === 'function') {
- return 1;
- } else if (evlistener !== undefined) {
- return evlistener.length;
- }
- }
- return 0;
-}
+/***/ }),
+/* 108 */
+/***/ (function(module, exports, __webpack_require__) {
-EventEmitter.prototype.eventNames = function eventNames() {
- return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
+var MATCH = __webpack_require__(7)('match');
+module.exports = function (KEY) {
+ var re = /./;
+ try {
+ '/./'[KEY](re);
+ } catch (e) {
+ try {
+ re[MATCH] = false;
+ return !'/./'[KEY](re);
+ } catch (f) { /* empty */ }
+ } return true;
};
-function arrayClone(arr, n) {
- var copy = new Array(n);
- for (var i = 0; i < n; ++i)
- copy[i] = arr[i];
- return copy;
-}
-function spliceOne(list, index) {
- for (; index + 1 < list.length; index++)
- list[index] = list[index + 1];
- list.pop();
-}
+/***/ }),
+/* 109 */
+/***/ (function(module, exports, __webpack_require__) {
-function unwrapListeners(arr) {
- var ret = new Array(arr.length);
- for (var i = 0; i < ret.length; ++i) {
- ret[i] = arr[i].listener || arr[i];
- }
- return ret;
-}
+// check on default Array iterator
+var Iterators = __webpack_require__(58);
+var ITERATOR = __webpack_require__(7)('iterator');
+var ArrayProto = Array.prototype;
+
+module.exports = function (it) {
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+};
/***/ }),
-/* 92 */
+/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {
-
-if (typeof process === 'undefined' ||
- !process.version ||
- process.version.indexOf('v0.') === 0 ||
- process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
- module.exports = { nextTick: nextTick };
-} else {
- module.exports = process
-}
-function nextTick(fn, arg1, arg2, arg3) {
- if (typeof fn !== 'function') {
- throw new TypeError('"callback" argument must be a function');
- }
- var len = arguments.length;
- var args, i;
- switch (len) {
- case 0:
- case 1:
- return process.nextTick(fn);
- case 2:
- return process.nextTick(function afterTickOne() {
- fn.call(null, arg1);
- });
- case 3:
- return process.nextTick(function afterTickTwo() {
- fn.call(null, arg1, arg2);
- });
- case 4:
- return process.nextTick(function afterTickThree() {
- fn.call(null, arg1, arg2, arg3);
- });
- default:
- args = new Array(len - 1);
- i = 0;
- while (i < args.length) {
- args[i++] = arguments[i];
- }
- return process.nextTick(function afterTick() {
- fn.apply(null, args);
- });
- }
-}
+var $defineProperty = __webpack_require__(11);
+var createDesc = __webpack_require__(42);
+module.exports = function (object, index, value) {
+ if (index in object) $defineProperty.f(object, index, createDesc(0, value));
+ else object[index] = value;
+};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(73)))
/***/ }),
-/* 93 */
+/* 111 */
/***/ (function(module, exports, __webpack_require__) {
-/* eslint-disable node/no-deprecated-api */
-var buffer = __webpack_require__(44)
-var Buffer = buffer.Buffer
-
-// alternative to using Object.keys for old browsers
-function copyProps (src, dst) {
- for (var key in src) {
- dst[key] = src[key]
- }
-}
-if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
- module.exports = buffer
-} else {
- // Copy properties from require('buffer')
- copyProps(buffer, exports)
- exports.Buffer = SafeBuffer
-}
-
-function SafeBuffer (arg, encodingOrOffset, length) {
- return Buffer(arg, encodingOrOffset, length)
-}
-
-// Copy static methods from Buffer
-copyProps(Buffer, SafeBuffer)
+var classof = __webpack_require__(56);
+var ITERATOR = __webpack_require__(7)('iterator');
+var Iterators = __webpack_require__(58);
+module.exports = __webpack_require__(25).getIteratorMethod = function (it) {
+ if (it != undefined) return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+};
-SafeBuffer.from = function (arg, encodingOrOffset, length) {
- if (typeof arg === 'number') {
- throw new TypeError('Argument must not be a number')
- }
- return Buffer(arg, encodingOrOffset, length)
-}
-SafeBuffer.alloc = function (size, fill, encoding) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- var buf = Buffer(size)
- if (fill !== undefined) {
- if (typeof encoding === 'string') {
- buf.fill(fill, encoding)
- } else {
- buf.fill(fill)
- }
- } else {
- buf.fill(0)
- }
- return buf
-}
+/***/ }),
+/* 112 */
+/***/ (function(module, exports, __webpack_require__) {
-SafeBuffer.allocUnsafe = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return Buffer(size)
-}
+// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+var speciesConstructor = __webpack_require__(310);
-SafeBuffer.allocUnsafeSlow = function (size) {
- if (typeof size !== 'number') {
- throw new TypeError('Argument must be a number')
- }
- return buffer.SlowBuffer(size)
-}
+module.exports = function (original, length) {
+ return new (speciesConstructor(original))(length);
+};
/***/ }),
-/* 94 */
+/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(Buffer) {
-
-module.exports = {
- /**
- * True if this is running in Nodejs, will be undefined in a browser.
- * In a browser, browserify won't include this file and the whole module
- * will be resolved an empty object.
- */
- isNode : typeof Buffer !== "undefined",
- /**
- * Create a new nodejs Buffer from an existing content.
- * @param {Object} data the data to pass to the constructor.
- * @param {String} encoding the encoding to use.
- * @return {Buffer} a new Buffer.
- */
- newBufferFrom: function(data, encoding) {
- if (Buffer.from && Buffer.from !== Uint8Array.from) {
- return Buffer.from(data, encoding);
- } else {
- if (typeof data === "number") {
- // Safeguard for old Node.js versions. On newer versions,
- // Buffer.from(number) / Buffer(number, encoding) already throw.
- throw new Error("The \"data\" argument must not be a number");
- }
- return new Buffer(data, encoding);
- }
- },
- /**
- * Create a new nodejs Buffer with the specified size.
- * @param {Integer} size the size of the buffer.
- * @return {Buffer} a new Buffer.
- */
- allocBuffer: function (size) {
- if (Buffer.alloc) {
- return Buffer.alloc(size);
- } else {
- var buf = new Buffer(size);
- buf.fill(0);
- return buf;
- }
- },
- /**
- * Find out if an object is a Buffer.
- * @param {Object} b the object to test.
- * @return {Boolean} true if the object is a Buffer, false otherwise.
- */
- isBuffer : function(b){
- return Buffer.isBuffer(b);
- },
+// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
- isStream : function (obj) {
- return obj &&
- typeof obj.on === "function" &&
- typeof obj.pause === "function" &&
- typeof obj.resume === "function";
- }
+var toObject = __webpack_require__(12);
+var toAbsoluteIndex = __webpack_require__(45);
+var toLength = __webpack_require__(8);
+module.exports = function fill(value /* , start = 0, end = @length */) {
+ var O = toObject(this);
+ var length = toLength(O.length);
+ var aLen = arguments.length;
+ var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
+ var end = aLen > 2 ? arguments[2] : undefined;
+ var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
+ while (endPos > index) O[index++] = value;
+ return O;
};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44).Buffer))
/***/ }),
-/* 95 */
+/* 114 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLCharacterData, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+"use strict";
- XMLNode = __webpack_require__(26);
+var addToUnscopables = __webpack_require__(41);
+var step = __webpack_require__(174);
+var Iterators = __webpack_require__(58);
+var toIObject = __webpack_require__(20);
- module.exports = XMLCharacterData = (function(superClass) {
- extend(XMLCharacterData, superClass);
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+module.exports = __webpack_require__(105)(Array, 'Array', function (iterated, kind) {
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function () {
+ var O = this._t;
+ var kind = this._k;
+ var index = this._i++;
+ if (!O || index >= O.length) {
+ this._t = undefined;
+ return step(1);
+ }
+ if (kind == 'keys') return step(0, index);
+ if (kind == 'values') return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
- function XMLCharacterData(parent) {
- XMLCharacterData.__super__.constructor.call(this, parent);
- this.value = '';
- }
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
- Object.defineProperty(XMLCharacterData.prototype, 'data', {
- get: function() {
- return this.value;
- },
- set: function(value) {
- return this.value = value || '';
- }
- });
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
- Object.defineProperty(XMLCharacterData.prototype, 'length', {
- get: function() {
- return this.value.length;
- }
- });
- Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
- get: function() {
- return this.value;
- },
- set: function(value) {
- return this.value = value || '';
- }
- });
+/***/ }),
+/* 115 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLCharacterData.prototype.clone = function() {
- return Object.create(this);
- };
+"use strict";
- XMLCharacterData.prototype.substringData = function(offset, count) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
- XMLCharacterData.prototype.appendData = function(arg) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+var regexpFlags = __webpack_require__(65);
- XMLCharacterData.prototype.insertData = function(offset, arg) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+var nativeExec = RegExp.prototype.exec;
+// This always refers to the native implementation, because the
+// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
+// which loads this file before patching the method.
+var nativeReplace = String.prototype.replace;
- XMLCharacterData.prototype.deleteData = function(offset, count) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+var patchedExec = nativeExec;
- XMLCharacterData.prototype.replaceData = function(offset, count, arg) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+var LAST_INDEX = 'lastIndex';
- XMLCharacterData.prototype.isEqualNode = function(node) {
- if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
- return false;
- }
- if (node.data !== this.data) {
- return false;
- }
- return true;
- };
+var UPDATES_LAST_INDEX_WRONG = (function () {
+ var re1 = /a/,
+ re2 = /b*/g;
+ nativeExec.call(re1, 'a');
+ nativeExec.call(re2, 'a');
+ return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
+})();
- return XMLCharacterData;
+// nonparticipating capturing group, copied from es5-shim's String#split patch.
+var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
- })(XMLNode);
+var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
-}).call(this);
+if (PATCH) {
+ patchedExec = function exec(str) {
+ var re = this;
+ var lastIndex, reCopy, match, i;
+ if (NPCG_INCLUDED) {
+ reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
+ }
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
-/***/ }),
-/* 96 */
-/***/ (function(module, exports) {
+ match = nativeExec.call(re, str);
-// Generated by CoffeeScript 1.12.7
-(function() {
- module.exports = {
- None: 0,
- OpenTag: 1,
- InsideTag: 2,
- CloseTag: 3
+ if (UPDATES_LAST_INDEX_WRONG && match) {
+ re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
+ }
+ if (NPCG_INCLUDED && match && match.length > 1) {
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
+ // eslint-disable-next-line no-loop-func
+ nativeReplace.call(match[0], reCopy, function () {
+ for (i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined) match[i] = undefined;
+ }
+ });
+ }
+
+ return match;
};
+}
-}).call(this);
+module.exports = patchedExec;
/***/ }),
-/* 97 */
+/* 116 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {
-var origSymbol = global.Symbol;
-var hasSymbolSham = __webpack_require__(532);
+var at = __webpack_require__(73)(true);
-module.exports = function hasNativeSymbols() {
- if (typeof origSymbol !== 'function') { return false; }
- if (typeof Symbol !== 'function') { return false; }
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
- if (typeof Symbol('bar') !== 'symbol') { return false; }
-
- return hasSymbolSham();
+ // `AdvanceStringIndex` abstract operation
+// https://tc39.github.io/ecma262/#sec-advancestringindex
+module.exports = function (S, index, unicode) {
+ return index + (unicode ? at(S, index).length : 1);
};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)))
/***/ }),
-/* 98 */
+/* 117 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLAttribute, XMLElement, XMLNode, isFunction, isObject, ref,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- ref = __webpack_require__(46), isObject = ref.isObject, isFunction = ref.isFunction;
-
- XMLNode = __webpack_require__(20);
-
- XMLAttribute = __webpack_require__(258);
-
- module.exports = XMLElement = (function(superClass) {
- extend(XMLElement, superClass);
-
- function XMLElement(parent, name, attributes) {
- XMLElement.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing element name");
- }
- this.name = this.stringify.eleName(name);
- this.attributes = {};
- if (attributes != null) {
- this.attribute(attributes);
- }
- if (parent.isDocument) {
- this.isRoot = true;
- this.documentObject = parent;
- parent.rootObject = this;
- }
- }
-
- XMLElement.prototype.clone = function() {
- var att, attName, clonedSelf, ref1;
- clonedSelf = Object.create(this);
- if (clonedSelf.isRoot) {
- clonedSelf.documentObject = null;
- }
- clonedSelf.attributes = {};
- ref1 = this.attributes;
- for (attName in ref1) {
- if (!hasProp.call(ref1, attName)) continue;
- att = ref1[attName];
- clonedSelf.attributes[attName] = att.clone();
- }
- clonedSelf.children = [];
- this.children.forEach(function(child) {
- var clonedChild;
- clonedChild = child.clone();
- clonedChild.parent = clonedSelf;
- return clonedSelf.children.push(clonedChild);
- });
- return clonedSelf;
+var ctx = __webpack_require__(26);
+var invoke = __webpack_require__(164);
+var html = __webpack_require__(98);
+var cel = __webpack_require__(94);
+var global = __webpack_require__(4);
+var process = global.process;
+var setTask = global.setImmediate;
+var clearTask = global.clearImmediate;
+var MessageChannel = global.MessageChannel;
+var Dispatch = global.Dispatch;
+var counter = 0;
+var queue = {};
+var ONREADYSTATECHANGE = 'onreadystatechange';
+var defer, channel, port;
+var run = function () {
+ var id = +this;
+ // eslint-disable-next-line no-prototype-builtins
+ if (queue.hasOwnProperty(id)) {
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+};
+var listener = function (event) {
+ run.call(event.data);
+};
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if (!setTask || !clearTask) {
+ setTask = function setImmediate(fn) {
+ var args = [];
+ var i = 1;
+ while (arguments.length > i) args.push(arguments[i++]);
+ queue[++counter] = function () {
+ // eslint-disable-next-line no-new-func
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
-
- XMLElement.prototype.attribute = function(name, value) {
- var attName, attValue;
- if (name != null) {
- name = name.valueOf();
- }
- if (isObject(name)) {
- for (attName in name) {
- if (!hasProp.call(name, attName)) continue;
- attValue = name[attName];
- this.attribute(attName, attValue);
- }
- } else {
- if (isFunction(value)) {
- value = value.apply();
- }
- if (!this.options.skipNullAttributes || (value != null)) {
- this.attributes[name] = new XMLAttribute(this, name, value);
- }
- }
- return this;
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id) {
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if (__webpack_require__(27)(process) == 'process') {
+ defer = function (id) {
+ process.nextTick(ctx(run, id, 1));
};
-
- XMLElement.prototype.removeAttribute = function(name) {
- var attName, i, len;
- if (name == null) {
- throw new Error("Missing attribute name");
- }
- name = name.valueOf();
- if (Array.isArray(name)) {
- for (i = 0, len = name.length; i < len; i++) {
- attName = name[i];
- delete this.attributes[attName];
- }
- } else {
- delete this.attributes[name];
- }
- return this;
+ // Sphere (JS game engine) Dispatch API
+ } else if (Dispatch && Dispatch.now) {
+ defer = function (id) {
+ Dispatch.now(ctx(run, id, 1));
};
-
- XMLElement.prototype.toString = function(options) {
- return this.options.writer.set(options).element(this);
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if (MessageChannel) {
+ channel = new MessageChannel();
+ port = channel.port2;
+ channel.port1.onmessage = listener;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
+ defer = function (id) {
+ global.postMessage(id + '', '*');
};
-
- XMLElement.prototype.att = function(name, value) {
- return this.attribute(name, value);
+ global.addEventListener('message', listener, false);
+ // IE8-
+ } else if (ONREADYSTATECHANGE in cel('script')) {
+ defer = function (id) {
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
+ html.removeChild(this);
+ run.call(id);
+ };
};
-
- XMLElement.prototype.a = function(name, value) {
- return this.attribute(name, value);
+ // Rest old browsers
+ } else {
+ defer = function (id) {
+ setTimeout(ctx(run, id, 1), 0);
};
-
- return XMLElement;
-
- })(XMLNode);
-
-}).call(this);
+ }
+}
+module.exports = {
+ set: setTask,
+ clear: clearTask
+};
/***/ }),
-/* 99 */
+/* 118 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLCData, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLNode = __webpack_require__(20);
+var global = __webpack_require__(4);
+var macrotask = __webpack_require__(117).set;
+var Observer = global.MutationObserver || global.WebKitMutationObserver;
+var process = global.process;
+var Promise = global.Promise;
+var isNode = __webpack_require__(27)(process) == 'process';
- module.exports = XMLCData = (function(superClass) {
- extend(XMLCData, superClass);
+module.exports = function () {
+ var head, last, notify;
- function XMLCData(parent, text) {
- XMLCData.__super__.constructor.call(this, parent);
- if (text == null) {
- throw new Error("Missing CDATA text");
+ var flush = function () {
+ var parent, fn;
+ if (isNode && (parent = process.domain)) parent.exit();
+ while (head) {
+ fn = head.fn;
+ head = head.next;
+ try {
+ fn();
+ } catch (e) {
+ if (head) notify();
+ else last = undefined;
+ throw e;
}
- this.text = this.stringify.cdata(text);
- }
+ } last = undefined;
+ if (parent) parent.enter();
+ };
- XMLCData.prototype.clone = function() {
- return Object.create(this);
+ // Node.js
+ if (isNode) {
+ notify = function () {
+ process.nextTick(flush);
};
-
- XMLCData.prototype.toString = function(options) {
- return this.options.writer.set(options).cdata(this);
+ // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
+ } else if (Observer && !(global.navigator && global.navigator.standalone)) {
+ var toggle = true;
+ var node = document.createTextNode('');
+ new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
+ notify = function () {
+ node.data = toggle = !toggle;
};
-
- return XMLCData;
-
- })(XMLNode);
-
-}).call(this);
-
-
-/***/ }),
-/* 100 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLComment, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLNode = __webpack_require__(20);
-
- module.exports = XMLComment = (function(superClass) {
- extend(XMLComment, superClass);
-
- function XMLComment(parent, text) {
- XMLComment.__super__.constructor.call(this, parent);
- if (text == null) {
- throw new Error("Missing comment text");
- }
- this.text = this.stringify.comment(text);
- }
-
- XMLComment.prototype.clone = function() {
- return Object.create(this);
+ // environments with maybe non-completely correct, but existent Promise
+ } else if (Promise && Promise.resolve) {
+ // Promise.resolve without an argument throws an error in LG WebOS 2
+ var promise = Promise.resolve(undefined);
+ notify = function () {
+ promise.then(flush);
};
-
- XMLComment.prototype.toString = function(options) {
- return this.options.writer.set(options).comment(this);
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function () {
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
};
+ }
- return XMLComment;
-
- })(XMLNode);
-
-}).call(this);
+ return function (fn) {
+ var task = { fn: fn, next: undefined };
+ if (last) last.next = task;
+ if (!head) {
+ head = task;
+ notify();
+ } last = task;
+ };
+};
/***/ }),
-/* 101 */
+/* 119 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLDeclaration, XMLNode, isObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- isObject = __webpack_require__(46).isObject;
-
- XMLNode = __webpack_require__(20);
-
- module.exports = XMLDeclaration = (function(superClass) {
- extend(XMLDeclaration, superClass);
-
- function XMLDeclaration(parent, version, encoding, standalone) {
- var ref;
- XMLDeclaration.__super__.constructor.call(this, parent);
- if (isObject(version)) {
- ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;
- }
- if (!version) {
- version = '1.0';
- }
- this.version = this.stringify.xmlVersion(version);
- if (encoding != null) {
- this.encoding = this.stringify.xmlEncoding(encoding);
- }
- if (standalone != null) {
- this.standalone = this.stringify.xmlStandalone(standalone);
- }
- }
-
- XMLDeclaration.prototype.toString = function(options) {
- return this.options.writer.set(options).declaration(this);
- };
+"use strict";
- return XMLDeclaration;
+// 25.4.1.5 NewPromiseCapability(C)
+var aFunction = __webpack_require__(15);
- })(XMLNode);
+function PromiseCapability(C) {
+ var resolve, reject;
+ this.promise = new C(function ($$resolve, $$reject) {
+ if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+}
-}).call(this);
+module.exports.f = function (C) {
+ return new PromiseCapability(C);
+};
/***/ }),
-/* 102 */
+/* 120 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNode, isObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- isObject = __webpack_require__(46).isObject;
-
- XMLNode = __webpack_require__(20);
+"use strict";
- XMLDTDAttList = __webpack_require__(103);
+var global = __webpack_require__(4);
+var DESCRIPTORS = __webpack_require__(9);
+var LIBRARY = __webpack_require__(39);
+var $typed = __webpack_require__(80);
+var hide = __webpack_require__(16);
+var redefineAll = __webpack_require__(51);
+var fails = __webpack_require__(5);
+var anInstance = __webpack_require__(49);
+var toInteger = __webpack_require__(28);
+var toLength = __webpack_require__(8);
+var toIndex = __webpack_require__(184);
+var gOPN = __webpack_require__(47).f;
+var dP = __webpack_require__(11).f;
+var arrayFill = __webpack_require__(113);
+var setToStringTag = __webpack_require__(55);
+var ARRAY_BUFFER = 'ArrayBuffer';
+var DATA_VIEW = 'DataView';
+var PROTOTYPE = 'prototype';
+var WRONG_LENGTH = 'Wrong length!';
+var WRONG_INDEX = 'Wrong index!';
+var $ArrayBuffer = global[ARRAY_BUFFER];
+var $DataView = global[DATA_VIEW];
+var Math = global.Math;
+var RangeError = global.RangeError;
+// eslint-disable-next-line no-shadow-restricted-names
+var Infinity = global.Infinity;
+var BaseBuffer = $ArrayBuffer;
+var abs = Math.abs;
+var pow = Math.pow;
+var floor = Math.floor;
+var log = Math.log;
+var LN2 = Math.LN2;
+var BUFFER = 'buffer';
+var BYTE_LENGTH = 'byteLength';
+var BYTE_OFFSET = 'byteOffset';
+var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
+var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
+var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
- XMLDTDEntity = __webpack_require__(104);
+// IEEE754 conversions based on https://github.com/feross/ieee754
+function packIEEE754(value, mLen, nBytes) {
+ var buffer = new Array(nBytes);
+ var eLen = nBytes * 8 - mLen - 1;
+ var eMax = (1 << eLen) - 1;
+ var eBias = eMax >> 1;
+ var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
+ var i = 0;
+ var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
+ var e, m, c;
+ value = abs(value);
+ // eslint-disable-next-line no-self-compare
+ if (value != value || value === Infinity) {
+ // eslint-disable-next-line no-self-compare
+ m = value != value ? 1 : 0;
+ e = eMax;
+ } else {
+ e = floor(log(value) / LN2);
+ if (value * (c = pow(2, -e)) < 1) {
+ e--;
+ c *= 2;
+ }
+ if (e + eBias >= 1) {
+ value += rt / c;
+ } else {
+ value += rt * pow(2, 1 - eBias);
+ }
+ if (value * c >= 2) {
+ e++;
+ c /= 2;
+ }
+ if (e + eBias >= eMax) {
+ m = 0;
+ e = eMax;
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * pow(2, eBias - 1) * pow(2, mLen);
+ e = 0;
+ }
+ }
+ for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
+ e = e << mLen | m;
+ eLen += mLen;
+ for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
+ buffer[--i] |= s * 128;
+ return buffer;
+}
+function unpackIEEE754(buffer, mLen, nBytes) {
+ var eLen = nBytes * 8 - mLen - 1;
+ var eMax = (1 << eLen) - 1;
+ var eBias = eMax >> 1;
+ var nBits = eLen - 7;
+ var i = nBytes - 1;
+ var s = buffer[i--];
+ var e = s & 127;
+ var m;
+ s >>= 7;
+ for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+ for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
+ if (e === 0) {
+ e = 1 - eBias;
+ } else if (e === eMax) {
+ return m ? NaN : s ? -Infinity : Infinity;
+ } else {
+ m = m + pow(2, mLen);
+ e = e - eBias;
+ } return (s ? -1 : 1) * m * pow(2, e - mLen);
+}
- XMLDTDElement = __webpack_require__(105);
+function unpackI32(bytes) {
+ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
+}
+function packI8(it) {
+ return [it & 0xff];
+}
+function packI16(it) {
+ return [it & 0xff, it >> 8 & 0xff];
+}
+function packI32(it) {
+ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
+}
+function packF64(it) {
+ return packIEEE754(it, 52, 8);
+}
+function packF32(it) {
+ return packIEEE754(it, 23, 4);
+}
- XMLDTDNotation = __webpack_require__(106);
+function addGetter(C, key, internal) {
+ dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
+}
- module.exports = XMLDocType = (function(superClass) {
- extend(XMLDocType, superClass);
+function get(view, bytes, index, isLittleEndian) {
+ var numIndex = +index;
+ var intIndex = toIndex(numIndex);
+ if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b;
+ var start = intIndex + view[$OFFSET];
+ var pack = store.slice(start, start + bytes);
+ return isLittleEndian ? pack : pack.reverse();
+}
+function set(view, bytes, index, conversion, value, isLittleEndian) {
+ var numIndex = +index;
+ var intIndex = toIndex(numIndex);
+ if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b;
+ var start = intIndex + view[$OFFSET];
+ var pack = conversion(+value);
+ for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
+}
- function XMLDocType(parent, pubID, sysID) {
- var ref, ref1;
- XMLDocType.__super__.constructor.call(this, parent);
- this.documentObject = parent;
- if (isObject(pubID)) {
- ref = pubID, pubID = ref.pubID, sysID = ref.sysID;
- }
- if (sysID == null) {
- ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1];
- }
- if (pubID != null) {
- this.pubID = this.stringify.dtdPubID(pubID);
- }
- if (sysID != null) {
- this.sysID = this.stringify.dtdSysID(sysID);
- }
- }
+if (!$typed.ABV) {
+ $ArrayBuffer = function ArrayBuffer(length) {
+ anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
+ var byteLength = toIndex(length);
+ this._b = arrayFill.call(new Array(byteLength), 0);
+ this[$LENGTH] = byteLength;
+ };
- XMLDocType.prototype.element = function(name, value) {
- var child;
- child = new XMLDTDElement(this, name, value);
- this.children.push(child);
- return this;
- };
+ $DataView = function DataView(buffer, byteOffset, byteLength) {
+ anInstance(this, $DataView, DATA_VIEW);
+ anInstance(buffer, $ArrayBuffer, DATA_VIEW);
+ var bufferLength = buffer[$LENGTH];
+ var offset = toInteger(byteOffset);
+ if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
+ byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
+ if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
+ this[$BUFFER] = buffer;
+ this[$OFFSET] = offset;
+ this[$LENGTH] = byteLength;
+ };
- XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- var child;
- child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
- this.children.push(child);
- return this;
- };
+ if (DESCRIPTORS) {
+ addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
+ addGetter($DataView, BUFFER, '_b');
+ addGetter($DataView, BYTE_LENGTH, '_l');
+ addGetter($DataView, BYTE_OFFSET, '_o');
+ }
- XMLDocType.prototype.entity = function(name, value) {
- var child;
- child = new XMLDTDEntity(this, false, name, value);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.pEntity = function(name, value) {
- var child;
- child = new XMLDTDEntity(this, true, name, value);
- this.children.push(child);
- return this;
+ redefineAll($DataView[PROTOTYPE], {
+ getInt8: function getInt8(byteOffset) {
+ return get(this, 1, byteOffset)[0] << 24 >> 24;
+ },
+ getUint8: function getUint8(byteOffset) {
+ return get(this, 1, byteOffset)[0];
+ },
+ getInt16: function getInt16(byteOffset /* , littleEndian */) {
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
+ },
+ getUint16: function getUint16(byteOffset /* , littleEndian */) {
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return bytes[1] << 8 | bytes[0];
+ },
+ getInt32: function getInt32(byteOffset /* , littleEndian */) {
+ return unpackI32(get(this, 4, byteOffset, arguments[1]));
+ },
+ getUint32: function getUint32(byteOffset /* , littleEndian */) {
+ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
+ },
+ getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
+ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
+ },
+ getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
+ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
+ },
+ setInt8: function setInt8(byteOffset, value) {
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setUint8: function setUint8(byteOffset, value) {
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
+ set(this, 4, byteOffset, packF32, value, arguments[2]);
+ },
+ setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
+ set(this, 8, byteOffset, packF64, value, arguments[2]);
+ }
+ });
+} else {
+ if (!fails(function () {
+ $ArrayBuffer(1);
+ }) || !fails(function () {
+ new $ArrayBuffer(-1); // eslint-disable-line no-new
+ }) || fails(function () {
+ new $ArrayBuffer(); // eslint-disable-line no-new
+ new $ArrayBuffer(1.5); // eslint-disable-line no-new
+ new $ArrayBuffer(NaN); // eslint-disable-line no-new
+ return $ArrayBuffer.name != ARRAY_BUFFER;
+ })) {
+ $ArrayBuffer = function ArrayBuffer(length) {
+ anInstance(this, $ArrayBuffer);
+ return new BaseBuffer(toIndex(length));
};
+ var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
+ for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
+ if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
+ }
+ if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
+ }
+ // iOS Safari 7.x bug
+ var view = new $DataView(new $ArrayBuffer(2));
+ var $setInt8 = $DataView[PROTOTYPE].setInt8;
+ view.setInt8(0, 2147483648);
+ view.setInt8(1, 2147483649);
+ if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
+ setInt8: function setInt8(byteOffset, value) {
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ },
+ setUint8: function setUint8(byteOffset, value) {
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ }
+ }, true);
+}
+setToStringTag($ArrayBuffer, ARRAY_BUFFER);
+setToStringTag($DataView, DATA_VIEW);
+hide($DataView[PROTOTYPE], $typed.VIEW, true);
+exports[ARRAY_BUFFER] = $ArrayBuffer;
+exports[DATA_VIEW] = $DataView;
- XMLDocType.prototype.notation = function(name, value) {
- var child;
- child = new XMLDTDNotation(this, name, value);
- this.children.push(child);
- return this;
- };
- XMLDocType.prototype.toString = function(options) {
- return this.options.writer.set(options).docType(this);
- };
+/***/ }),
+/* 121 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLDocType.prototype.ele = function(name, value) {
- return this.element(name, value);
- };
+/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
+ (typeof self !== "undefined" && self) ||
+ window;
+var apply = Function.prototype.apply;
- XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
- };
+// DOM APIs, for completeness
- XMLDocType.prototype.ent = function(name, value) {
- return this.entity(name, value);
- };
+exports.setTimeout = function() {
+ return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
+};
+exports.setInterval = function() {
+ return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
+};
+exports.clearTimeout =
+exports.clearInterval = function(timeout) {
+ if (timeout) {
+ timeout.close();
+ }
+};
- XMLDocType.prototype.pent = function(name, value) {
- return this.pEntity(name, value);
- };
+function Timeout(id, clearFn) {
+ this._id = id;
+ this._clearFn = clearFn;
+}
+Timeout.prototype.unref = Timeout.prototype.ref = function() {};
+Timeout.prototype.close = function() {
+ this._clearFn.call(scope, this._id);
+};
- XMLDocType.prototype.not = function(name, value) {
- return this.notation(name, value);
- };
+// Does not start the time, just sets up the members needed.
+exports.enroll = function(item, msecs) {
+ clearTimeout(item._idleTimeoutId);
+ item._idleTimeout = msecs;
+};
- XMLDocType.prototype.up = function() {
- return this.root() || this.documentObject;
- };
+exports.unenroll = function(item) {
+ clearTimeout(item._idleTimeoutId);
+ item._idleTimeout = -1;
+};
- return XMLDocType;
+exports._unrefActive = exports.active = function(item) {
+ clearTimeout(item._idleTimeoutId);
- })(XMLNode);
+ var msecs = item._idleTimeout;
+ if (msecs >= 0) {
+ item._idleTimeoutId = setTimeout(function onTimeout() {
+ if (item._onTimeout)
+ item._onTimeout();
+ }, msecs);
+ }
+};
-}).call(this);
+// setimmediate attaches itself to the global object
+__webpack_require__(425);
+// On some exotic environments, it's not clear which object `setimmediate` was
+// able to install onto. Search each possibility in the same order as the
+// `setimmediate` library.
+exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
+ (typeof global !== "undefined" && global.setImmediate) ||
+ (this && this.setImmediate);
+exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
+ (typeof global !== "undefined" && global.clearImmediate) ||
+ (this && this.clearImmediate);
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(30)))
/***/ }),
-/* 103 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 122 */
+/***/ (function(module, exports) {
// Generated by CoffeeScript 1.12.7
(function() {
- var XMLDTDAttList, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLNode = __webpack_require__(20);
-
- module.exports = XMLDTDAttList = (function(superClass) {
- extend(XMLDTDAttList, superClass);
-
- function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- XMLDTDAttList.__super__.constructor.call(this, parent);
- if (elementName == null) {
- throw new Error("Missing DTD element name");
- }
- if (attributeName == null) {
- throw new Error("Missing DTD attribute name");
- }
- if (!attributeType) {
- throw new Error("Missing DTD attribute type");
- }
- if (!defaultValueType) {
- throw new Error("Missing DTD attribute default");
- }
- if (defaultValueType.indexOf('#') !== 0) {
- defaultValueType = '#' + defaultValueType;
- }
- if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
- throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");
- }
- if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
- throw new Error("Default value only applies to #FIXED or #DEFAULT");
- }
- this.elementName = this.stringify.eleName(elementName);
- this.attributeName = this.stringify.attName(attributeName);
- this.attributeType = this.stringify.dtdAttType(attributeType);
- this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
- this.defaultValueType = defaultValueType;
+ exports.defaults = {
+ "0.1": {
+ explicitCharkey: false,
+ trim: true,
+ normalize: true,
+ normalizeTags: false,
+ attrkey: "@",
+ charkey: "#",
+ explicitArray: false,
+ ignoreAttrs: false,
+ mergeAttrs: false,
+ explicitRoot: false,
+ validator: null,
+ xmlns: false,
+ explicitChildren: false,
+ childkey: '@@',
+ charsAsChildren: false,
+ includeWhiteChars: false,
+ async: false,
+ strict: true,
+ attrNameProcessors: null,
+ attrValueProcessors: null,
+ tagNameProcessors: null,
+ valueProcessors: null,
+ emptyTag: ''
+ },
+ "0.2": {
+ explicitCharkey: false,
+ trim: false,
+ normalize: false,
+ normalizeTags: false,
+ attrkey: "$",
+ charkey: "_",
+ explicitArray: true,
+ ignoreAttrs: false,
+ mergeAttrs: false,
+ explicitRoot: true,
+ validator: null,
+ xmlns: false,
+ explicitChildren: false,
+ preserveChildrenOrder: false,
+ childkey: '$$',
+ charsAsChildren: false,
+ includeWhiteChars: false,
+ async: false,
+ strict: true,
+ attrNameProcessors: null,
+ attrValueProcessors: null,
+ tagNameProcessors: null,
+ valueProcessors: null,
+ rootName: 'root',
+ xmldec: {
+ 'version': '1.0',
+ 'encoding': 'UTF-8',
+ 'standalone': true
+ },
+ doctype: null,
+ renderOpts: {
+ 'pretty': true,
+ 'indent': ' ',
+ 'newline': '\n'
+ },
+ headless: false,
+ chunkSize: 10000,
+ emptyTag: '',
+ cdata: false
}
-
- XMLDTDAttList.prototype.toString = function(options) {
- return this.options.writer.set(options).dtdAttList(this);
- };
-
- return XMLDTDAttList;
-
- })(XMLNode);
+ };
}).call(this);
/***/ }),
-/* 104 */
+/* 123 */
/***/ (function(module, exports, __webpack_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
- var XMLDTDEntity, XMLNode, isObject,
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- isObject = __webpack_require__(46).isObject;
+ ref = __webpack_require__(37), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
- XMLNode = __webpack_require__(20);
+ XMLNode = __webpack_require__(23);
- module.exports = XMLDTDEntity = (function(superClass) {
- extend(XMLDTDEntity, superClass);
+ NodeType = __webpack_require__(13);
- function XMLDTDEntity(parent, pe, name, value) {
- XMLDTDEntity.__super__.constructor.call(this, parent);
+ XMLAttribute = __webpack_require__(198);
+
+ XMLNamedNodeMap = __webpack_require__(124);
+
+ module.exports = XMLElement = (function(superClass) {
+ extend(XMLElement, superClass);
+
+ function XMLElement(parent, name, attributes) {
+ var child, j, len, ref1;
+ XMLElement.__super__.constructor.call(this, parent);
if (name == null) {
- throw new Error("Missing entity name");
+ throw new Error("Missing element name. " + this.debugInfo());
}
- if (value == null) {
- throw new Error("Missing entity value");
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
}
- this.pe = !!pe;
- this.name = this.stringify.eleName(name);
- if (!isObject(value)) {
- this.value = this.stringify.dtdEntityValue(value);
- } else {
- if (!value.pubID && !value.sysID) {
- throw new Error("Public and/or system identifiers are required for an external entity");
- }
- if (value.pubID && !value.sysID) {
- throw new Error("System identifier is required for a public external entity");
- }
- if (value.pubID != null) {
- this.pubID = this.stringify.dtdPubID(value.pubID);
- }
- if (value.sysID != null) {
- this.sysID = this.stringify.dtdSysID(value.sysID);
- }
- if (value.nData != null) {
- this.nData = this.stringify.dtdNData(value.nData);
- }
- if (this.pe && this.nData) {
- throw new Error("Notation declaration is not allowed in a parameter entity");
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ if (parent.children) {
+ ref1 = parent.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
+ }
}
}
}
- XMLDTDEntity.prototype.toString = function(options) {
- return this.options.writer.set(options).dtdEntity(this);
- };
-
- return XMLDTDEntity;
-
- })(XMLNode);
+ Object.defineProperty(XMLElement.prototype, 'tagName', {
+ get: function() {
+ return this.name;
+ }
+ });
-}).call(this);
+ Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+ Object.defineProperty(XMLElement.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
-/***/ }),
-/* 105 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.defineProperty(XMLElement.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLDTDElement, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ Object.defineProperty(XMLElement.prototype, 'id', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
- XMLNode = __webpack_require__(20);
+ Object.defineProperty(XMLElement.prototype, 'className', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
- module.exports = XMLDTDElement = (function(superClass) {
- extend(XMLDTDElement, superClass);
+ Object.defineProperty(XMLElement.prototype, 'classList', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
- function XMLDTDElement(parent, name, value) {
- XMLDTDElement.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing DTD element name");
+ Object.defineProperty(XMLElement.prototype, 'attributes', {
+ get: function() {
+ if (!this.attributeMap || !this.attributeMap.nodes) {
+ this.attributeMap = new XMLNamedNodeMap(this.attribs);
+ }
+ return this.attributeMap;
}
- if (!value) {
- value = '(#PCDATA)';
+ });
+
+ XMLElement.prototype.clone = function() {
+ var att, attName, clonedSelf, ref1;
+ clonedSelf = Object.create(this);
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
}
- if (Array.isArray(value)) {
- value = '(' + value.join(',') + ')';
+ clonedSelf.attribs = {};
+ ref1 = this.attribs;
+ for (attName in ref1) {
+ if (!hasProp.call(ref1, attName)) continue;
+ att = ref1[attName];
+ clonedSelf.attribs[attName] = att.clone();
}
- this.name = this.stringify.eleName(name);
- this.value = this.stringify.dtdElementValue(value);
- }
-
- XMLDTDElement.prototype.toString = function(options) {
- return this.options.writer.set(options).dtdElement(this);
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
};
- return XMLDTDElement;
-
- })(XMLNode);
-
-}).call(this);
-
-
-/***/ }),
-/* 106 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLDTDNotation, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLNode = __webpack_require__(20);
-
- module.exports = XMLDTDNotation = (function(superClass) {
- extend(XMLDTDNotation, superClass);
-
- function XMLDTDNotation(parent, name, value) {
- XMLDTDNotation.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing notation name");
+ XMLElement.prototype.attribute = function(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
}
- if (!value.pubID && !value.sysID) {
- throw new Error("Public or system identifiers are required for an external entity");
+ if (isObject(name)) {
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
}
- this.name = this.stringify.eleName(name);
- if (value.pubID != null) {
- this.pubID = this.stringify.dtdPubID(value.pubID);
+ return this;
+ };
+
+ XMLElement.prototype.removeAttribute = function(name) {
+ var attName, j, len;
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
}
- if (value.sysID != null) {
- this.sysID = this.stringify.dtdSysID(value.sysID);
+ name = getValue(name);
+ if (Array.isArray(name)) {
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
}
- }
+ return this;
+ };
- XMLDTDNotation.prototype.toString = function(options) {
- return this.options.writer.set(options).dtdNotation(this);
+ XMLElement.prototype.toString = function(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
};
- return XMLDTDNotation;
+ XMLElement.prototype.att = function(name, value) {
+ return this.attribute(name, value);
+ };
- })(XMLNode);
+ XMLElement.prototype.a = function(name, value) {
+ return this.attribute(name, value);
+ };
-}).call(this);
+ XMLElement.prototype.getAttribute = function(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ };
+
+ XMLElement.prototype.setAttribute = function(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getAttributeNode = function(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ };
+
+ XMLElement.prototype.setAttributeNode = function(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.removeAttributeNode = function(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getElementsByTagName = function(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.setAttributeNodeNS = function(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.hasAttribute = function(name) {
+ return this.attribs.hasOwnProperty(name);
+ };
+
+ XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.setIdAttribute = function(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ };
+
+ XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getElementsByTagName = function(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.getElementsByClassName = function(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+
+ XMLElement.prototype.isEqualNode = function(node) {
+ var i, j, ref1;
+ if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ return XMLElement;
+
+ })(XMLNode);
+
+}).call(this);
/***/ }),
-/* 107 */
+/* 124 */
+/***/ (function(module, exports) {
+
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var XMLNamedNodeMap;
+
+ module.exports = XMLNamedNodeMap = (function() {
+ function XMLNamedNodeMap(nodes) {
+ this.nodes = nodes;
+ }
+
+ Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
+ get: function() {
+ return Object.keys(this.nodes).length || 0;
+ }
+ });
+
+ XMLNamedNodeMap.prototype.clone = function() {
+ return this.nodes = null;
+ };
+
+ XMLNamedNodeMap.prototype.getNamedItem = function(name) {
+ return this.nodes[name];
+ };
+
+ XMLNamedNodeMap.prototype.setNamedItem = function(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ };
+
+ XMLNamedNodeMap.prototype.removeNamedItem = function(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ };
+
+ XMLNamedNodeMap.prototype.item = function(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ };
+
+ XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ };
+
+ XMLNamedNodeMap.prototype.setNamedItemNS = function(node) {
+ throw new Error("This DOM method is not implemented.");
+ };
+
+ XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ };
+
+ return XMLNamedNodeMap;
+
+ })();
+
+}).call(this);
+
+
+/***/ }),
+/* 125 */
/***/ (function(module, exports, __webpack_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
- var XMLNode, XMLRaw,
+ var NodeType, XMLCData, XMLCharacterData,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __webpack_require__(20);
+ NodeType = __webpack_require__(13);
- module.exports = XMLRaw = (function(superClass) {
- extend(XMLRaw, superClass);
+ XMLCharacterData = __webpack_require__(84);
- function XMLRaw(parent, text) {
- XMLRaw.__super__.constructor.call(this, parent);
+ module.exports = XMLCData = (function(superClass) {
+ extend(XMLCData, superClass);
+
+ function XMLCData(parent, text) {
+ XMLCData.__super__.constructor.call(this, parent);
if (text == null) {
- throw new Error("Missing raw text");
+ throw new Error("Missing CDATA text. " + this.debugInfo());
}
- this.value = this.stringify.raw(text);
+ this.name = "#cdata-section";
+ this.type = NodeType.CData;
+ this.value = this.stringify.cdata(text);
}
- XMLRaw.prototype.clone = function() {
+ XMLCData.prototype.clone = function() {
return Object.create(this);
};
- XMLRaw.prototype.toString = function(options) {
- return this.options.writer.set(options).raw(this);
+ XMLCData.prototype.toString = function(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
};
- return XMLRaw;
+ return XMLCData;
- })(XMLNode);
+ })(XMLCharacterData);
}).call(this);
/***/ }),
-/* 108 */
+/* 126 */
/***/ (function(module, exports, __webpack_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
- var XMLNode, XMLText,
+ var NodeType, XMLCharacterData, XMLComment,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __webpack_require__(20);
+ NodeType = __webpack_require__(13);
- module.exports = XMLText = (function(superClass) {
- extend(XMLText, superClass);
+ XMLCharacterData = __webpack_require__(84);
- function XMLText(parent, text) {
- XMLText.__super__.constructor.call(this, parent);
+ module.exports = XMLComment = (function(superClass) {
+ extend(XMLComment, superClass);
+
+ function XMLComment(parent, text) {
+ XMLComment.__super__.constructor.call(this, parent);
if (text == null) {
- throw new Error("Missing element text");
+ throw new Error("Missing comment text. " + this.debugInfo());
}
- this.value = this.stringify.eleText(text);
+ this.name = "#comment";
+ this.type = NodeType.Comment;
+ this.value = this.stringify.comment(text);
}
- XMLText.prototype.clone = function() {
+ XMLComment.prototype.clone = function() {
return Object.create(this);
};
- XMLText.prototype.toString = function(options) {
- return this.options.writer.set(options).text(this);
+ XMLComment.prototype.toString = function(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
};
- return XMLText;
+ return XMLComment;
- })(XMLNode);
+ })(XMLCharacterData);
}).call(this);
/***/ }),
-/* 109 */
+/* 127 */
/***/ (function(module, exports, __webpack_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
- var XMLNode, XMLProcessingInstruction,
+ var NodeType, XMLDeclaration, XMLNode, isObject,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __webpack_require__(20);
+ isObject = __webpack_require__(37).isObject;
- module.exports = XMLProcessingInstruction = (function(superClass) {
- extend(XMLProcessingInstruction, superClass);
+ XMLNode = __webpack_require__(23);
- function XMLProcessingInstruction(parent, target, value) {
- XMLProcessingInstruction.__super__.constructor.call(this, parent);
- if (target == null) {
- throw new Error("Missing instruction target");
+ NodeType = __webpack_require__(13);
+
+ module.exports = XMLDeclaration = (function(superClass) {
+ extend(XMLDeclaration, superClass);
+
+ function XMLDeclaration(parent, version, encoding, standalone) {
+ var ref;
+ XMLDeclaration.__super__.constructor.call(this, parent);
+ if (isObject(version)) {
+ ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;
}
- this.target = this.stringify.insTarget(target);
- if (value) {
- this.value = this.stringify.insValue(value);
+ if (!version) {
+ version = '1.0';
+ }
+ this.type = NodeType.Declaration;
+ this.version = this.stringify.xmlVersion(version);
+ if (encoding != null) {
+ this.encoding = this.stringify.xmlEncoding(encoding);
+ }
+ if (standalone != null) {
+ this.standalone = this.stringify.xmlStandalone(standalone);
}
}
- XMLProcessingInstruction.prototype.clone = function() {
- return Object.create(this);
- };
-
- XMLProcessingInstruction.prototype.toString = function(options) {
- return this.options.writer.set(options).processingInstruction(this);
+ XMLDeclaration.prototype.toString = function(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
};
- return XMLProcessingInstruction;
+ return XMLDeclaration;
})(XMLNode);
@@ -9404,769 +9833,686 @@ module.exports = function hasNativeSymbols() {
/***/ }),
-/* 110 */
+/* 128 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+ isObject = __webpack_require__(37).isObject;
-/**
- * Representation a of zip file in js
- * @constructor
- */
-function JSZip() {
- // if this constructor is used without `new`, it adds `new` before itself:
- if(!(this instanceof JSZip)) {
- return new JSZip();
- }
+ XMLNode = __webpack_require__(23);
- if(arguments.length) {
- throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
- }
+ NodeType = __webpack_require__(13);
- // object containing the files :
- // {
- // "folder/" : {...},
- // "folder/data.txt" : {...}
- // }
- this.files = {};
+ XMLDTDAttList = __webpack_require__(129);
- this.comment = null;
+ XMLDTDEntity = __webpack_require__(130);
- // Where we are in the hierarchy
- this.root = "";
- this.clone = function() {
- var newObj = new JSZip();
- for (var i in this) {
- if (typeof this[i] !== "function") {
- newObj[i] = this[i];
- }
+ XMLDTDElement = __webpack_require__(131);
+
+ XMLDTDNotation = __webpack_require__(132);
+
+ XMLNamedNodeMap = __webpack_require__(124);
+
+ module.exports = XMLDocType = (function(superClass) {
+ extend(XMLDocType, superClass);
+
+ function XMLDocType(parent, pubID, sysID) {
+ var child, i, len, ref, ref1, ref2;
+ XMLDocType.__super__.constructor.call(this, parent);
+ this.type = NodeType.DocType;
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
}
- return newObj;
- };
-}
-JSZip.prototype = __webpack_require__(471);
-JSZip.prototype.loadAsync = __webpack_require__(502);
-JSZip.support = __webpack_require__(43);
-JSZip.defaults = __webpack_require__(217);
+ }
+ this.documentObject = parent;
+ if (isObject(pubID)) {
+ ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID;
+ }
+ if (sysID == null) {
+ ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
+ }
-// TODO find a better way to handle this version,
-// a require('package.json').version doesn't work with webpack, see #327
-JSZip.version = "3.2.0";
+ Object.defineProperty(XMLDocType.prototype, 'entities', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if ((child.type === NodeType.EntityDeclaration) && !child.pe) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
-JSZip.loadAsync = function (content, options) {
- return new JSZip().loadAsync(content, options);
-};
+ Object.defineProperty(XMLDocType.prototype, 'notations', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.NotationDeclaration) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
-JSZip.external = __webpack_require__(75);
-module.exports = JSZip;
+ Object.defineProperty(XMLDocType.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+ Object.defineProperty(XMLDocType.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
-/***/ }),
-/* 111 */
-/***/ (function(module, exports) {
+ Object.defineProperty(XMLDocType.prototype, 'internalSubset', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
-function smartSortImages(f1, f2) {
- var t1 = f1.split('/');
- var t2 = f2.split('/');
- var n1 = t1.pop();
- var n2 = t2.pop();
- var p1 = t1.join('/');
- var p2 = t2.join('/');
+ XMLDocType.prototype.element = function(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
+ };
- if (p1 === p2) {
- t1 = n1.split('.');
- t2 = n2.split('.');
- if (t1.length > 1) t1.pop();
- if (t2.length > 1) t2.pop();
- n1 = parseInt(t1.join('.'));
- n2 = parseInt(t2.join('.'));
+ XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
+ };
- if (!isNaN(n1) && !isNaN(n2)) {
- if (n1 === n2) return 0;
- return n1 > n2 ? 1 : -1;
- }
- }
+ XMLDocType.prototype.entity = function(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
+ };
- if (f1 === f2) return 0;
- return f1 > f2 ? 1 : -1;
-}
+ XMLDocType.prototype.pEntity = function(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
+ };
-module.exports = {
- smartSortImages: smartSortImages
-};
+ XMLDocType.prototype.notation = function(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ };
-/***/ }),
-/* 112 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocType.prototype.toString = function(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ };
-var isObject = __webpack_require__(6);
-var document = __webpack_require__(4).document;
-// typeof document.createElement is 'object' in old IE
-var is = isObject(document) && isObject(document.createElement);
-module.exports = function (it) {
- return is ? document.createElement(it) : {};
-};
+ XMLDocType.prototype.ele = function(name, value) {
+ return this.element(name, value);
+ };
+ XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ };
-/***/ }),
-/* 113 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocType.prototype.ent = function(name, value) {
+ return this.entity(name, value);
+ };
-var global = __webpack_require__(4);
-var core = __webpack_require__(28);
-var LIBRARY = __webpack_require__(40);
-var wksExt = __webpack_require__(170);
-var defineProperty = __webpack_require__(12).f;
-module.exports = function (name) {
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
-};
+ XMLDocType.prototype.pent = function(name, value) {
+ return this.pEntity(name, value);
+ };
+ XMLDocType.prototype.not = function(name, value) {
+ return this.notation(name, value);
+ };
-/***/ }),
-/* 114 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocType.prototype.up = function() {
+ return this.root() || this.documentObject;
+ };
-var shared = __webpack_require__(68)('keys');
-var uid = __webpack_require__(48);
-module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
-};
+ XMLDocType.prototype.isEqualNode = function(node) {
+ if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ };
+ return XMLDocType;
-/***/ }),
-/* 115 */
-/***/ (function(module, exports) {
+ })(XMLNode);
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
-).split(',');
+}).call(this);
/***/ }),
-/* 116 */
+/* 129 */
/***/ (function(module, exports, __webpack_require__) {
-var document = __webpack_require__(4).document;
-module.exports = document && document.documentElement;
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDTDAttList, XMLNode,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+ XMLNode = __webpack_require__(23);
-/***/ }),
-/* 117 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var isObject = __webpack_require__(6);
-var anObject = __webpack_require__(3);
-var check = function (O, proto) {
- anObject(O);
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
-};
-module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function (test, buggy, set) {
- try {
- set = __webpack_require__(29)(Function.call, __webpack_require__(23).f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch (e) { buggy = true; }
- return function setPrototypeOf(O, proto) {
- check(O, proto);
- if (buggy) O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
-};
+ NodeType = __webpack_require__(13);
+ module.exports = XMLDTDAttList = (function(superClass) {
+ extend(XMLDTDAttList, superClass);
-/***/ }),
-/* 118 */
-/***/ (function(module, exports) {
+ function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ XMLDTDAttList.__super__.constructor.call(this, parent);
+ if (elementName == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (attributeName == null) {
+ throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName));
+ }
+ if (!attributeType) {
+ throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName));
+ }
+ if (!defaultValueType) {
+ throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName));
+ }
+ if (defaultValueType.indexOf('#') !== 0) {
+ defaultValueType = '#' + defaultValueType;
+ }
+ if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
+ throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
+ throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ this.elementName = this.stringify.name(elementName);
+ this.type = NodeType.AttributeDeclaration;
+ this.attributeName = this.stringify.name(attributeName);
+ this.attributeType = this.stringify.dtdAttType(attributeType);
+ if (defaultValue) {
+ this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
+ }
+ this.defaultValueType = defaultValueType;
+ }
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+ XMLDTDAttList.prototype.toString = function(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ };
+ return XMLDTDAttList;
-/***/ }),
-/* 119 */
-/***/ (function(module, exports, __webpack_require__) {
+ })(XMLNode);
-var isObject = __webpack_require__(6);
-var setPrototypeOf = __webpack_require__(117).set;
-module.exports = function (that, target, C) {
- var S = target.constructor;
- var P;
- if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
- setPrototypeOf(that, P);
- } return that;
-};
+}).call(this);
/***/ }),
-/* 120 */
+/* 130 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-var toInteger = __webpack_require__(31);
-var defined = __webpack_require__(34);
-
-module.exports = function repeat(count) {
- var str = String(defined(this));
- var res = '';
- var n = toInteger(count);
- if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
- for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
- return res;
-};
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDTDEntity, XMLNode, isObject,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+ isObject = __webpack_require__(37).isObject;
-/***/ }),
-/* 121 */
-/***/ (function(module, exports) {
+ XMLNode = __webpack_require__(23);
-// 20.2.2.28 Math.sign(x)
-module.exports = Math.sign || function sign(x) {
- // eslint-disable-next-line no-self-compare
- return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
-};
+ NodeType = __webpack_require__(13);
+ module.exports = XMLDTDEntity = (function(superClass) {
+ extend(XMLDTDEntity, superClass);
-/***/ }),
-/* 122 */
-/***/ (function(module, exports) {
+ function XMLDTDEntity(parent, pe, name, value) {
+ XMLDTDEntity.__super__.constructor.call(this, parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
-// 20.2.2.14 Math.expm1(x)
-var $expm1 = Math.expm1;
-module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
-) ? function expm1(x) {
- return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
-} : $expm1;
+ Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+ Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
-/***/ }),
-/* 123 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
+ get: function() {
+ return this.nData || null;
+ }
+ });
-"use strict";
+ Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
-var LIBRARY = __webpack_require__(40);
-var $export = __webpack_require__(1);
-var redefine = __webpack_require__(18);
-var hide = __webpack_require__(17);
-var Iterators = __webpack_require__(62);
-var $iterCreate = __webpack_require__(124);
-var setToStringTag = __webpack_require__(59);
-var getPrototypeOf = __webpack_require__(24);
-var ITERATOR = __webpack_require__(7)('iterator');
-var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
-var FF_ITERATOR = '@@iterator';
-var KEYS = 'keys';
-var VALUES = 'values';
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
+ get: function() {
+ return null;
+ }
+ });
-var returnThis = function () { return this; };
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
+ get: function() {
+ return null;
+ }
+ });
-module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
+ XMLDTDEntity.prototype.toString = function(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
};
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
-};
-
-
-/***/ }),
-/* 124 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-var create = __webpack_require__(51);
-var descriptor = __webpack_require__(47);
-var setToStringTag = __webpack_require__(59);
-var IteratorPrototype = {};
+ return XMLDTDEntity;
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-__webpack_require__(17)(IteratorPrototype, __webpack_require__(7)('iterator'), function () { return this; });
+ })(XMLNode);
-module.exports = function (Constructor, NAME, next) {
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
- setToStringTag(Constructor, NAME + ' Iterator');
-};
+}).call(this);
/***/ }),
-/* 125 */
+/* 131 */
/***/ (function(module, exports, __webpack_require__) {
-// helper for String#{startsWith, endsWith, includes}
-var isRegExp = __webpack_require__(81);
-var defined = __webpack_require__(34);
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDTDElement, XMLNode,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-module.exports = function (that, searchString, NAME) {
- if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
- return String(defined(that));
-};
+ XMLNode = __webpack_require__(23);
+ NodeType = __webpack_require__(13);
-/***/ }),
-/* 126 */
-/***/ (function(module, exports, __webpack_require__) {
+ module.exports = XMLDTDElement = (function(superClass) {
+ extend(XMLDTDElement, superClass);
-var MATCH = __webpack_require__(7)('match');
-module.exports = function (KEY) {
- var re = /./;
- try {
- '/./'[KEY](re);
- } catch (e) {
- try {
- re[MATCH] = false;
- return !'/./'[KEY](re);
- } catch (f) { /* empty */ }
- } return true;
-};
+ function XMLDTDElement(parent, name, value) {
+ XMLDTDElement.__super__.constructor.call(this, parent);
+ if (name == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (!value) {
+ value = '(#PCDATA)';
+ }
+ if (Array.isArray(value)) {
+ value = '(' + value.join(',') + ')';
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.ElementDeclaration;
+ this.value = this.stringify.dtdElementValue(value);
+ }
+ XMLDTDElement.prototype.toString = function(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ };
-/***/ }),
-/* 127 */
-/***/ (function(module, exports, __webpack_require__) {
+ return XMLDTDElement;
-// check on default Array iterator
-var Iterators = __webpack_require__(62);
-var ITERATOR = __webpack_require__(7)('iterator');
-var ArrayProto = Array.prototype;
+ })(XMLNode);
-module.exports = function (it) {
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
-};
+}).call(this);
/***/ }),
-/* 128 */
+/* 132 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-var $defineProperty = __webpack_require__(12);
-var createDesc = __webpack_require__(47);
-
-module.exports = function (object, index, value) {
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
-};
-
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDTDNotation, XMLNode,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-/***/ }),
-/* 129 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLNode = __webpack_require__(23);
-var classof = __webpack_require__(60);
-var ITERATOR = __webpack_require__(7)('iterator');
-var Iterators = __webpack_require__(62);
-module.exports = __webpack_require__(28).getIteratorMethod = function (it) {
- if (it != undefined) return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
-};
+ NodeType = __webpack_require__(13);
+ module.exports = XMLDTDNotation = (function(superClass) {
+ extend(XMLDTDNotation, superClass);
-/***/ }),
-/* 130 */
-/***/ (function(module, exports, __webpack_require__) {
+ function XMLDTDNotation(parent, name, value) {
+ XMLDTDNotation.__super__.constructor.call(this, parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ }
-// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
-var speciesConstructor = __webpack_require__(357);
+ Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
-module.exports = function (original, length) {
- return new (speciesConstructor(original))(length);
-};
+ Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+ XMLDTDNotation.prototype.toString = function(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
+ };
-/***/ }),
-/* 131 */
-/***/ (function(module, exports, __webpack_require__) {
+ return XMLDTDNotation;
-"use strict";
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ })(XMLNode);
-var toObject = __webpack_require__(13);
-var toAbsoluteIndex = __webpack_require__(50);
-var toLength = __webpack_require__(8);
-module.exports = function fill(value /* , start = 0, end = @length */) {
- var O = toObject(this);
- var length = toLength(O.length);
- var aLen = arguments.length;
- var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
- var end = aLen > 2 ? arguments[2] : undefined;
- var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
- while (endPos > index) O[index++] = value;
- return O;
-};
+}).call(this);
/***/ }),
-/* 132 */
+/* 133 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-var addToUnscopables = __webpack_require__(42);
-var step = __webpack_require__(187);
-var Iterators = __webpack_require__(62);
-var toIObject = __webpack_require__(22);
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLNode, XMLRaw,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-// 22.1.3.4 Array.prototype.entries()
-// 22.1.3.13 Array.prototype.keys()
-// 22.1.3.29 Array.prototype.values()
-// 22.1.3.30 Array.prototype[@@iterator]()
-module.exports = __webpack_require__(123)(Array, 'Array', function (iterated, kind) {
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
-// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var kind = this._k;
- var index = this._i++;
- if (!O || index >= O.length) {
- this._t = undefined;
- return step(1);
- }
- if (kind == 'keys') return step(0, index);
- if (kind == 'values') return step(0, O[index]);
- return step(0, [index, O[index]]);
-}, 'values');
+ NodeType = __webpack_require__(13);
-// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
-Iterators.Arguments = Iterators.Array;
+ XMLNode = __webpack_require__(23);
-addToUnscopables('keys');
-addToUnscopables('values');
-addToUnscopables('entries');
+ module.exports = XMLRaw = (function(superClass) {
+ extend(XMLRaw, superClass);
+ function XMLRaw(parent, text) {
+ XMLRaw.__super__.constructor.call(this, parent);
+ if (text == null) {
+ throw new Error("Missing raw text. " + this.debugInfo());
+ }
+ this.type = NodeType.Raw;
+ this.value = this.stringify.raw(text);
+ }
-/***/ }),
-/* 133 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLRaw.prototype.clone = function() {
+ return Object.create(this);
+ };
-"use strict";
+ XMLRaw.prototype.toString = function(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ };
+ return XMLRaw;
-var regexpFlags = __webpack_require__(71);
+ })(XMLNode);
-var nativeExec = RegExp.prototype.exec;
-// This always refers to the native implementation, because the
-// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
-// which loads this file before patching the method.
-var nativeReplace = String.prototype.replace;
+}).call(this);
-var patchedExec = nativeExec;
-var LAST_INDEX = 'lastIndex';
+/***/ }),
+/* 134 */
+/***/ (function(module, exports, __webpack_require__) {
-var UPDATES_LAST_INDEX_WRONG = (function () {
- var re1 = /a/,
- re2 = /b*/g;
- nativeExec.call(re1, 'a');
- nativeExec.call(re2, 'a');
- return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
-})();
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLCharacterData, XMLText,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-// nonparticipating capturing group, copied from es5-shim's String#split patch.
-var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
+ NodeType = __webpack_require__(13);
-var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
+ XMLCharacterData = __webpack_require__(84);
-if (PATCH) {
- patchedExec = function exec(str) {
- var re = this;
- var lastIndex, reCopy, match, i;
+ module.exports = XMLText = (function(superClass) {
+ extend(XMLText, superClass);
- if (NPCG_INCLUDED) {
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
+ function XMLText(parent, text) {
+ XMLText.__super__.constructor.call(this, parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
}
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
- match = nativeExec.call(re, str);
+ Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
- if (UPDATES_LAST_INDEX_WRONG && match) {
- re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
- }
- if (NPCG_INCLUDED && match && match.length > 1) {
- // Fix browsers whose `exec` methods don't consistently return `undefined`
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
- // eslint-disable-next-line no-loop-func
- nativeReplace.call(match[0], reCopy, function () {
- for (i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === undefined) match[i] = undefined;
+ Object.defineProperty(XMLText.prototype, 'wholeText', {
+ get: function() {
+ var next, prev, str;
+ str = '';
+ prev = this.previousSibling;
+ while (prev) {
+ str = prev.data + str;
+ prev = prev.previousSibling;
}
- });
- }
+ str += this.data;
+ next = this.nextSibling;
+ while (next) {
+ str = str + next.data;
+ next = next.nextSibling;
+ }
+ return str;
+ }
+ });
- return match;
- };
-}
+ XMLText.prototype.clone = function() {
+ return Object.create(this);
+ };
-module.exports = patchedExec;
+ XMLText.prototype.toString = function(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ };
+ XMLText.prototype.splitText = function(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 134 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLText.prototype.replaceWholeText = function(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-"use strict";
+ return XMLText;
-var at = __webpack_require__(80)(true);
+ })(XMLCharacterData);
- // `AdvanceStringIndex` abstract operation
-// https://tc39.github.io/ecma262/#sec-advancestringindex
-module.exports = function (S, index, unicode) {
- return index + (unicode ? at(S, index).length : 1);
-};
+}).call(this);
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
-var ctx = __webpack_require__(29);
-var invoke = __webpack_require__(177);
-var html = __webpack_require__(116);
-var cel = __webpack_require__(112);
-var global = __webpack_require__(4);
-var process = global.process;
-var setTask = global.setImmediate;
-var clearTask = global.clearImmediate;
-var MessageChannel = global.MessageChannel;
-var Dispatch = global.Dispatch;
-var counter = 0;
-var queue = {};
-var ONREADYSTATECHANGE = 'onreadystatechange';
-var defer, channel, port;
-var run = function () {
- var id = +this;
- // eslint-disable-next-line no-prototype-builtins
- if (queue.hasOwnProperty(id)) {
- var fn = queue[id];
- delete queue[id];
- fn();
- }
-};
-var listener = function (event) {
- run.call(event.data);
-};
-// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-if (!setTask || !clearTask) {
- setTask = function setImmediate(fn) {
- var args = [];
- var i = 1;
- while (arguments.length > i) args.push(arguments[i++]);
- queue[++counter] = function () {
- // eslint-disable-next-line no-new-func
- invoke(typeof fn == 'function' ? fn : Function(fn), args);
- };
- defer(counter);
- return counter;
- };
- clearTask = function clearImmediate(id) {
- delete queue[id];
- };
- // Node.js 0.8-
- if (__webpack_require__(30)(process) == 'process') {
- defer = function (id) {
- process.nextTick(ctx(run, id, 1));
- };
- // Sphere (JS game engine) Dispatch API
- } else if (Dispatch && Dispatch.now) {
- defer = function (id) {
- Dispatch.now(ctx(run, id, 1));
- };
- // Browsers with MessageChannel, includes WebWorkers
- } else if (MessageChannel) {
- channel = new MessageChannel();
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = ctx(port.postMessage, port, 1);
- // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
- defer = function (id) {
- global.postMessage(id + '', '*');
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLCharacterData, XMLProcessingInstruction,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+
+ NodeType = __webpack_require__(13);
+
+ XMLCharacterData = __webpack_require__(84);
+
+ module.exports = XMLProcessingInstruction = (function(superClass) {
+ extend(XMLProcessingInstruction, superClass);
+
+ function XMLProcessingInstruction(parent, target, value) {
+ XMLProcessingInstruction.__super__.constructor.call(this, parent);
+ if (target == null) {
+ throw new Error("Missing instruction target. " + this.debugInfo());
+ }
+ this.type = NodeType.ProcessingInstruction;
+ this.target = this.stringify.insTarget(target);
+ this.name = this.target;
+ if (value) {
+ this.value = this.stringify.insValue(value);
+ }
+ }
+
+ XMLProcessingInstruction.prototype.clone = function() {
+ return Object.create(this);
};
- global.addEventListener('message', listener, false);
- // IE8-
- } else if (ONREADYSTATECHANGE in cel('script')) {
- defer = function (id) {
- html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
- html.removeChild(this);
- run.call(id);
- };
+
+ XMLProcessingInstruction.prototype.toString = function(options) {
+ return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
};
- // Rest old browsers
- } else {
- defer = function (id) {
- setTimeout(ctx(run, id, 1), 0);
+
+ XMLProcessingInstruction.prototype.isEqualNode = function(node) {
+ if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
+ return false;
+ }
+ if (node.target !== this.target) {
+ return false;
+ }
+ return true;
};
- }
-}
-module.exports = {
- set: setTask,
- clear: clearTask
-};
+
+ return XMLProcessingInstruction;
+
+ })(XMLCharacterData);
+
+}).call(this);
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
-var global = __webpack_require__(4);
-var macrotask = __webpack_require__(135).set;
-var Observer = global.MutationObserver || global.WebKitMutationObserver;
-var process = global.process;
-var Promise = global.Promise;
-var isNode = __webpack_require__(30)(process) == 'process';
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var XMLStringWriter, XMLWriterBase,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-module.exports = function () {
- var head, last, notify;
+ XMLWriterBase = __webpack_require__(201);
- var flush = function () {
- var parent, fn;
- if (isNode && (parent = process.domain)) parent.exit();
- while (head) {
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch (e) {
- if (head) notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if (parent) parent.enter();
- };
+ module.exports = XMLStringWriter = (function(superClass) {
+ extend(XMLStringWriter, superClass);
- // Node.js
- if (isNode) {
- notify = function () {
- process.nextTick(flush);
- };
- // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
- } else if (Observer && !(global.navigator && global.navigator.standalone)) {
- var toggle = true;
- var node = document.createTextNode('');
- new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
- notify = function () {
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if (Promise && Promise.resolve) {
- // Promise.resolve without an argument throws an error in LG WebOS 2
- var promise = Promise.resolve(undefined);
- notify = function () {
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function () {
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
+ function XMLStringWriter(options) {
+ XMLStringWriter.__super__.constructor.call(this, options);
+ }
+
+ XMLStringWriter.prototype.document = function(doc, options) {
+ var child, i, len, r, ref;
+ options = this.filterOptions(options);
+ r = '';
+ ref = doc.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, 0);
+ }
+ if (options.pretty && r.slice(-options.newline.length) === options.newline) {
+ r = r.slice(0, -options.newline.length);
+ }
+ return r;
};
- }
- return function (fn) {
- var task = { fn: fn, next: undefined };
- if (last) last.next = task;
- if (!head) {
- head = task;
- notify();
- } last = task;
- };
-};
+ return XMLStringWriter;
+
+ })(XMLWriterBase);
+
+}).call(this);
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-// 25.4.1.5 NewPromiseCapability(C)
-var aFunction = __webpack_require__(15);
-
-function PromiseCapability(C) {
- var resolve, reject;
- this.promise = new C(function ($$resolve, $$reject) {
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
- resolve = $$resolve;
- reject = $$reject;
- });
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
-}
-
-module.exports.f = function (C) {
- return new PromiseCapability(C);
-};
+exports = module.exports = __webpack_require__(202);
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = __webpack_require__(138);
+exports.Duplex = __webpack_require__(53);
+exports.Transform = __webpack_require__(205);
+exports.PassThrough = __webpack_require__(442);
/***/ }),
@@ -10174,360 +10520,64 @@ module.exports.f = function (C) {
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
-var global = __webpack_require__(4);
-var DESCRIPTORS = __webpack_require__(9);
-var LIBRARY = __webpack_require__(40);
-var $typed = __webpack_require__(87);
-var hide = __webpack_require__(17);
-var redefineAll = __webpack_require__(56);
-var fails = __webpack_require__(5);
-var anInstance = __webpack_require__(54);
-var toInteger = __webpack_require__(31);
-var toLength = __webpack_require__(8);
-var toIndex = __webpack_require__(197);
-var gOPN = __webpack_require__(52).f;
-var dP = __webpack_require__(12).f;
-var arrayFill = __webpack_require__(131);
-var setToStringTag = __webpack_require__(59);
-var ARRAY_BUFFER = 'ArrayBuffer';
-var DATA_VIEW = 'DataView';
-var PROTOTYPE = 'prototype';
-var WRONG_LENGTH = 'Wrong length!';
-var WRONG_INDEX = 'Wrong index!';
-var $ArrayBuffer = global[ARRAY_BUFFER];
-var $DataView = global[DATA_VIEW];
-var Math = global.Math;
-var RangeError = global.RangeError;
-// eslint-disable-next-line no-shadow-restricted-names
-var Infinity = global.Infinity;
-var BaseBuffer = $ArrayBuffer;
-var abs = Math.abs;
-var pow = Math.pow;
-var floor = Math.floor;
-var log = Math.log;
-var LN2 = Math.LN2;
-var BUFFER = 'buffer';
-var BYTE_LENGTH = 'byteLength';
-var BYTE_OFFSET = 'byteOffset';
-var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
-var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
-var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
-// IEEE754 conversions based on https://github.com/feross/ieee754
-function packIEEE754(value, mLen, nBytes) {
- var buffer = new Array(nBytes);
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
- var i = 0;
- var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
- var e, m, c;
- value = abs(value);
- // eslint-disable-next-line no-self-compare
- if (value != value || value === Infinity) {
- // eslint-disable-next-line no-self-compare
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if (value * (c = pow(2, -e)) < 1) {
- e--;
- c *= 2;
- }
- if (e + eBias >= 1) {
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if (value * c >= 2) {
- e++;
- c /= 2;
- }
- if (e + eBias >= eMax) {
- m = 0;
- e = eMax;
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
-}
-function unpackIEEE754(buffer, mLen, nBytes) {
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var nBits = eLen - 7;
- var i = nBytes - 1;
- var s = buffer[i--];
- var e = s & 127;
- var m;
- s >>= 7;
- for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if (e === 0) {
- e = 1 - eBias;
- } else if (e === eMax) {
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
-}
-function unpackI32(bytes) {
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
-}
-function packI8(it) {
- return [it & 0xff];
-}
-function packI16(it) {
- return [it & 0xff, it >> 8 & 0xff];
-}
-function packI32(it) {
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
-}
-function packF64(it) {
- return packIEEE754(it, 52, 8);
-}
-function packF32(it) {
- return packIEEE754(it, 23, 4);
-}
-function addGetter(C, key, internal) {
- dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
-}
+/**/
-function get(view, bytes, index, isLittleEndian) {
- var numIndex = +index;
- var intIndex = toIndex(numIndex);
- if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b;
- var start = intIndex + view[$OFFSET];
- var pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
-}
-function set(view, bytes, index, conversion, value, isLittleEndian) {
- var numIndex = +index;
- var intIndex = toIndex(numIndex);
- if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b;
- var start = intIndex + view[$OFFSET];
- var pack = conversion(+value);
- for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
+var pna = __webpack_require__(87);
+/**/
+
+module.exports = Writable;
+
+/* */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
}
-if (!$typed.ABV) {
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
- var byteLength = toIndex(length);
- this._b = arrayFill.call(new Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
- $DataView = function DataView(buffer, byteOffset, byteLength) {
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH];
- var offset = toInteger(byteOffset);
- if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
};
+}
+/* */
- if (DESCRIPTORS) {
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset) {
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset) {
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /* , littleEndian */) {
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /* , littleEndian */) {
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /* , littleEndian */) {
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /* , littleEndian */) {
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value) {
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value) {
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
-} else {
- if (!fails(function () {
- $ArrayBuffer(1);
- }) || !fails(function () {
- new $ArrayBuffer(-1); // eslint-disable-line no-new
- }) || fails(function () {
- new $ArrayBuffer(); // eslint-disable-line no-new
- new $ArrayBuffer(1.5); // eslint-disable-line no-new
- new $ArrayBuffer(NaN); // eslint-disable-line no-new
- return $ArrayBuffer.name != ARRAY_BUFFER;
- })) {
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, $ArrayBuffer);
- return new BaseBuffer(toIndex(length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
- if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
- }
- if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2));
- var $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value) {
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value) {
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
-}
-setToStringTag($ArrayBuffer, ARRAY_BUFFER);
-setToStringTag($DataView, DATA_VIEW);
-hide($DataView[PROTOTYPE], $typed.VIEW, true);
-exports[ARRAY_BUFFER] = $ArrayBuffer;
-exports[DATA_VIEW] = $DataView;
-
-
-/***/ }),
-/* 139 */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(211);
-exports.Stream = exports;
-exports.Readable = exports;
-exports.Writable = __webpack_require__(140);
-exports.Duplex = __webpack_require__(58);
-exports.Transform = __webpack_require__(214);
-exports.PassThrough = __webpack_require__(478);
-
-
-/***/ }),
-/* 140 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, encoding, cb), and it'll handle all
-// the drain event emission and buffering.
-
-
-
-/**/
-
-var pna = __webpack_require__(92);
-/**/
-
-module.exports = Writable;
-
-/* */
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
-}
-
-// It seems a linked list but it is not
-// there will be only 2 of these for each stream
-function CorkedRequest(state) {
- var _this = this;
-
- this.next = null;
- this.entry = null;
- this.finish = function () {
- onCorkedFinish(_this, state);
- };
-}
-/* */
-
-/**/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
-/**/
+/**/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/**/
/**/
var Duplex;
@@ -10536,24 +10586,24 @@ var Duplex;
Writable.WritableState = WritableState;
/**/
-var util = __webpack_require__(74);
-util.inherits = __webpack_require__(64);
+var util = Object.create(__webpack_require__(68));
+util.inherits = __webpack_require__(60);
/**/
/**/
var internalUtil = {
- deprecate: __webpack_require__(477)
+ deprecate: __webpack_require__(441)
};
/**/
/**/
-var Stream = __webpack_require__(212);
+var Stream = __webpack_require__(203);
/**/
/**/
-var Buffer = __webpack_require__(93).Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
+var Buffer = __webpack_require__(88).Buffer;
+var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
@@ -10563,14 +10613,14 @@ function _isUint8Array(obj) {
/**/
-var destroyImpl = __webpack_require__(213);
+var destroyImpl = __webpack_require__(204);
util.inherits(Writable, Stream);
function nop() {}
function WritableState(options, stream) {
- Duplex = Duplex || __webpack_require__(58);
+ Duplex = Duplex || __webpack_require__(53);
options = options || {};
@@ -10720,7 +10770,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
}
function Writable(options) {
- Duplex = Duplex || __webpack_require__(58);
+ Duplex = Duplex || __webpack_require__(53);
// Writable ctor is applied to Duplexes, too.
// `realHasInstance` is necessary because using plain `instanceof`
@@ -10821,7 +10871,7 @@ Writable.prototype.uncork = function () {
if (state.corked) {
state.corked--;
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
}
};
@@ -11063,7 +11113,7 @@ Writable.prototype.end = function (chunk, encoding, cb) {
}
// ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
+ if (!state.ending) endWritable(this, state, cb);
};
function needFinish(state) {
@@ -11124,11 +11174,9 @@ function onCorkedFinish(corkReq, state, err) {
cb(err);
entry = entry.next;
}
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = corkReq;
- } else {
- state.corkedRequestsFree = corkReq;
- }
+
+ // reuse the free corkReq.
+ state.corkedRequestsFree.next = corkReq;
}
Object.defineProperty(Writable.prototype, 'destroyed', {
@@ -11157,80 +11205,10 @@ Writable.prototype._destroy = function (err, cb) {
this.end();
cb(err);
};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(73), __webpack_require__(141).setImmediate, __webpack_require__(27)))
-
-/***/ }),
-/* 141 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
- (typeof self !== "undefined" && self) ||
- window;
-var apply = Function.prototype.apply;
-
-// DOM APIs, for completeness
-
-exports.setTimeout = function() {
- return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
-};
-exports.setInterval = function() {
- return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
-};
-exports.clearTimeout =
-exports.clearInterval = function(timeout) {
- if (timeout) {
- timeout.close();
- }
-};
-
-function Timeout(id, clearFn) {
- this._id = id;
- this._clearFn = clearFn;
-}
-Timeout.prototype.unref = Timeout.prototype.ref = function() {};
-Timeout.prototype.close = function() {
- this._clearFn.call(scope, this._id);
-};
-
-// Does not start the time, just sets up the members needed.
-exports.enroll = function(item, msecs) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = msecs;
-};
-
-exports.unenroll = function(item) {
- clearTimeout(item._idleTimeoutId);
- item._idleTimeout = -1;
-};
-
-exports._unrefActive = exports.active = function(item) {
- clearTimeout(item._idleTimeoutId);
-
- var msecs = item._idleTimeout;
- if (msecs >= 0) {
- item._idleTimeoutId = setTimeout(function onTimeout() {
- if (item._onTimeout)
- item._onTimeout();
- }, msecs);
- }
-};
-
-// setimmediate attaches itself to the global object
-__webpack_require__(476);
-// On some exotic environments, it's not clear which object `setimmediate` was
-// able to install onto. Search each possibility in the same order as the
-// `setimmediate` library.
-exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
- (typeof global !== "undefined" && global.setImmediate) ||
- (this && this.setImmediate);
-exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
- (typeof global !== "undefined" && global.clearImmediate) ||
- (this && this.clearImmediate);
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(67), __webpack_require__(121).setImmediate, __webpack_require__(30)))
/***/ }),
-/* 142 */
+/* 139 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11259,7 +11237,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
/**/
-var Buffer = __webpack_require__(93).Buffer;
+var Buffer = __webpack_require__(88).Buffer;
/**/
var isEncoding = Buffer.isEncoding || function (encoding) {
@@ -11532,347 +11510,293 @@ function simpleEnd(buf) {
}
/***/ }),
-/* 143 */
+/* 140 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,
+ hasProp = {}.hasOwnProperty;
+ ({isObject, isFunction, getValue} = __webpack_require__(38));
-var external = __webpack_require__(75);
-var DataWorker = __webpack_require__(218);
-var DataLengthProbe = __webpack_require__(219);
-var Crc32Probe = __webpack_require__(220);
-var DataLengthProbe = __webpack_require__(219);
+ XMLNode = __webpack_require__(24);
-/**
- * Represent a compressed object, with everything needed to decompress it.
- * @constructor
- * @param {number} compressedSize the size of the data compressed.
- * @param {number} uncompressedSize the size of the data after decompression.
- * @param {number} crc32 the crc32 of the decompressed file.
- * @param {object} compression the type of compression, see lib/compressions.js.
- * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.
- */
-function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {
- this.compressedSize = compressedSize;
- this.uncompressedSize = uncompressedSize;
- this.crc32 = crc32;
- this.compression = compression;
- this.compressedContent = data;
-}
+ NodeType = __webpack_require__(14);
-CompressedObject.prototype = {
- /**
- * Create a worker to get the uncompressed content.
- * @return {GenericWorker} the worker.
- */
- getContentWorker : function () {
- var worker = new DataWorker(external.Promise.resolve(this.compressedContent))
- .pipe(this.compression.uncompressWorker())
- .pipe(new DataLengthProbe("data_length"));
-
- var that = this;
- worker.on("end", function () {
- if(this.streamInfo['data_length'] !== that.uncompressedSize) {
- throw new Error("Bug : uncompressed data size mismatch");
+ XMLAttribute = __webpack_require__(210);
+
+ XMLNamedNodeMap = __webpack_require__(141);
+
+ // Represents an element of the XML document
+ module.exports = XMLElement = (function() {
+ class XMLElement extends XMLNode {
+ // Initializes a new instance of `XMLElement`
+
+ // `parent` the parent node
+ // `name` element name
+ // `attributes` an object containing name/value pairs of attributes
+ constructor(parent, name, attributes) {
+ var child, j, len, ref;
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing element name. " + this.debugInfo());
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
+ }
+ // set properties if this is the root node
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ // set dtd name
+ if (parent.children) {
+ ref = parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
}
- });
- return worker;
- },
- /**
- * Create a worker to get the compressed content.
- * @return {GenericWorker} the worker.
- */
- getCompressedWorker : function () {
- return new DataWorker(external.Promise.resolve(this.compressedContent))
- .withStreamInfo("compressedSize", this.compressedSize)
- .withStreamInfo("uncompressedSize", this.uncompressedSize)
- .withStreamInfo("crc32", this.crc32)
- .withStreamInfo("compression", this.compression)
- ;
- }
-};
-
-/**
- * Chain the given worker with other workers to compress the content with the
- * given compresion.
- * @param {GenericWorker} uncompressedWorker the worker to pipe.
- * @param {Object} compression the compression object.
- * @param {Object} compressionOptions the options to use when compressing.
- * @return {GenericWorker} the new worker compressing the content.
- */
-CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {
- return uncompressedWorker
- .pipe(new Crc32Probe())
- .pipe(new DataLengthProbe("uncompressedSize"))
- .pipe(compression.compressWorker(compressionOptions))
- .pipe(new DataLengthProbe("compressedSize"))
- .withStreamInfo("compression", compression);
-};
-
-module.exports = CompressedObject;
-
-
-/***/ }),
-/* 144 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var utils = __webpack_require__(10);
-
-/**
- * The following functions come from pako, from pako/lib/zlib/crc32.js
- * released under the MIT license, see pako https://github.com/nodeca/pako/
- */
-
-// Use ordinary array, since untyped makes no boost here
-function makeTable() {
- var c, table = [];
-
- for(var n =0; n < 256; n++){
- c = n;
- for(var k =0; k < 8; k++){
- c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+ }
}
- table[n] = c;
- }
-
- return table;
-}
-
-// Create table on load. Just 255 signed longs. Not a problem.
-var crcTable = makeTable();
-
-
-function crc32(crc, buf, len, pos) {
- var t = crcTable, end = pos + len;
-
- crc = crc ^ (-1);
-
- for (var i = pos; i < end; i++ ) {
- crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
- }
+ }
- return (crc ^ (-1)); // >>> 0;
-}
+ // Creates and returns a deep clone of `this`
-// That's all for the pako functions.
+ clone() {
+ var att, attName, clonedSelf, ref;
+ clonedSelf = Object.create(this);
+ // remove document element
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
+ }
+ // clone attributes
+ clonedSelf.attribs = {};
+ ref = this.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ clonedSelf.attribs[attName] = att.clone();
+ }
+ // clone child nodes
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
+ }
-/**
- * Compute the crc32 of a string.
- * This is almost the same as the function crc32, but for strings. Using the
- * same function for the two use cases leads to horrible performances.
- * @param {Number} crc the starting value of the crc.
- * @param {String} str the string to use.
- * @param {Number} len the length of the string.
- * @param {Number} pos the starting position for the crc32 computation.
- * @return {Number} the computed crc32.
- */
-function crc32str(crc, str, len, pos) {
- var t = crcTable, end = pos + len;
+ // Adds or modifies an attribute
- crc = crc ^ (-1);
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
- for (var i = pos; i < end; i++ ) {
- crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];
- }
+ // Removes an attribute
- return (crc ^ (-1)); // >>> 0;
-}
+ // `name` attribute name
+ removeAttribute(name) {
+ var attName, j, len;
+ // Also defined in DOM level 1
+ // removeAttribute(name) removes an attribute by name.
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
+ }
+ name = getValue(name);
+ if (Array.isArray(name)) { // expand if array
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
+ }
+ return this;
+ }
-module.exports = function crc32wrapper(input, crc) {
- if (typeof input === "undefined" || !input.length) {
- return 0;
- }
+ // Converts the XML fragment to string
- var isArray = utils.getTypeOf(input) !== "string";
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ // `options.allowEmpty` do not self close empty element tags
+ toString(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
+ }
- if(isArray) {
- return crc32(crc|0, input, input.length, 0);
- } else {
- return crc32str(crc|0, input, input.length, 0);
- }
-};
+ // Aliases
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+ a(name, value) {
+ return this.attribute(name, value);
+ }
-/***/ }),
-/* 145 */
-/***/ (function(module, exports, __webpack_require__) {
+ // DOM Level 1
+ getAttribute(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ }
-"use strict";
+ setAttribute(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ getAttributeNode(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ }
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
+ setAttributeNode(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-module.exports = {
- 2: 'need dictionary', /* Z_NEED_DICT 2 */
- 1: 'stream end', /* Z_STREAM_END 1 */
- 0: '', /* Z_OK 0 */
- '-1': 'file error', /* Z_ERRNO (-1) */
- '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
- '-3': 'data error', /* Z_DATA_ERROR (-3) */
- '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
- '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
- '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
-};
+ removeAttributeNode(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ getElementsByTagName(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-/***/ }),
-/* 146 */
-/***/ (function(module, exports) {
+ // DOM Level 2
+ getAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-// Generated by CoffeeScript 1.12.7
-(function() {
- exports.defaults = {
- "0.1": {
- explicitCharkey: false,
- trim: true,
- normalize: true,
- normalizeTags: false,
- attrkey: "@",
- charkey: "#",
- explicitArray: false,
- ignoreAttrs: false,
- mergeAttrs: false,
- explicitRoot: false,
- validator: null,
- xmlns: false,
- explicitChildren: false,
- childkey: '@@',
- charsAsChildren: false,
- includeWhiteChars: false,
- async: false,
- strict: true,
- attrNameProcessors: null,
- attrValueProcessors: null,
- tagNameProcessors: null,
- valueProcessors: null,
- emptyTag: ''
- },
- "0.2": {
- explicitCharkey: false,
- trim: false,
- normalize: false,
- normalizeTags: false,
- attrkey: "$",
- charkey: "_",
- explicitArray: true,
- ignoreAttrs: false,
- mergeAttrs: false,
- explicitRoot: true,
- validator: null,
- xmlns: false,
- explicitChildren: false,
- preserveChildrenOrder: false,
- childkey: '$$',
- charsAsChildren: false,
- includeWhiteChars: false,
- async: false,
- strict: true,
- attrNameProcessors: null,
- attrValueProcessors: null,
- tagNameProcessors: null,
- valueProcessors: null,
- rootName: 'root',
- xmldec: {
- 'version': '1.0',
- 'encoding': 'UTF-8',
- 'standalone': true
- },
- doctype: null,
- renderOpts: {
- 'pretty': true,
- 'indent': ' ',
- 'newline': '\n'
- },
- headless: false,
- chunkSize: 10000,
- emptyTag: '',
- cdata: false
- }
- };
+ setAttributeNS(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-}).call(this);
+ removeAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ getAttributeNodeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-/***/ }),
-/* 147 */
-/***/ (function(module, exports, __webpack_require__) {
+ setAttributeNodeNS(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
-// Generated by CoffeeScript 1.12.7
-(function() {
- var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
- ref = __webpack_require__(39), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
+ hasAttribute(name) {
+ return this.attribs.hasOwnProperty(name);
+ }
- XMLNode = __webpack_require__(26);
+ hasAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
- NodeType = __webpack_require__(14);
+ // DOM Level 3
+ setIdAttribute(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ }
- XMLAttribute = __webpack_require__(234);
+ setIdAttributeNS(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
- XMLNamedNodeMap = __webpack_require__(148);
+ setIdAttributeNode(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
- module.exports = XMLElement = (function(superClass) {
- extend(XMLElement, superClass);
+ // DOM Level 4
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
- function XMLElement(parent, name, attributes) {
- var child, j, len, ref1;
- XMLElement.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing element name. " + this.debugInfo());
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
}
- this.name = this.stringify.name(name);
- this.type = NodeType.Element;
- this.attribs = {};
- this.schemaTypeInfo = null;
- if (attributes != null) {
- this.attribute(attributes);
+
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
}
- if (parent.type === NodeType.Document) {
- this.isRoot = true;
- this.documentObject = parent;
- parent.rootObject = this;
- if (parent.children) {
- ref1 = parent.children;
- for (j = 0, len = ref1.length; j < len; j++) {
- child = ref1[j];
- if (child.type === NodeType.DocType) {
- child.name = this.name;
- break;
- }
+
+ isEqualNode(node) {
+ var i, j, ref;
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
}
}
+ return true;
}
- }
+ };
+
+ // DOM level 1
Object.defineProperty(XMLElement.prototype, 'tagName', {
get: function() {
return this.name;
}
});
+ // DOM level 4
Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
get: function() {
return '';
@@ -11918,289 +11842,115 @@ module.exports = {
}
});
- XMLElement.prototype.clone = function() {
- var att, attName, clonedSelf, ref1;
- clonedSelf = Object.create(this);
- if (clonedSelf.isRoot) {
- clonedSelf.documentObject = null;
- }
- clonedSelf.attribs = {};
- ref1 = this.attribs;
- for (attName in ref1) {
- if (!hasProp.call(ref1, attName)) continue;
- att = ref1[attName];
- clonedSelf.attribs[attName] = att.clone();
- }
- clonedSelf.children = [];
- this.children.forEach(function(child) {
- var clonedChild;
- clonedChild = child.clone();
- clonedChild.parent = clonedSelf;
- return clonedSelf.children.push(clonedChild);
- });
- return clonedSelf;
- };
-
- XMLElement.prototype.attribute = function(name, value) {
- var attName, attValue;
- if (name != null) {
- name = getValue(name);
- }
- if (isObject(name)) {
- for (attName in name) {
- if (!hasProp.call(name, attName)) continue;
- attValue = name[attName];
- this.attribute(attName, attValue);
- }
- } else {
- if (isFunction(value)) {
- value = value.apply();
- }
- if (this.options.keepNullAttributes && (value == null)) {
- this.attribs[name] = new XMLAttribute(this, name, "");
- } else if (value != null) {
- this.attribs[name] = new XMLAttribute(this, name, value);
- }
- }
- return this;
- };
+ return XMLElement;
- XMLElement.prototype.removeAttribute = function(name) {
- var attName, j, len;
- if (name == null) {
- throw new Error("Missing attribute name. " + this.debugInfo());
- }
- name = getValue(name);
- if (Array.isArray(name)) {
- for (j = 0, len = name.length; j < len; j++) {
- attName = name[j];
- delete this.attribs[attName];
- }
- } else {
- delete this.attribs[name];
- }
- return this;
- };
+ }).call(this);
- XMLElement.prototype.toString = function(options) {
- return this.options.writer.element(this, this.options.writer.filterOptions(options));
- };
+}).call(this);
- XMLElement.prototype.att = function(name, value) {
- return this.attribute(name, value);
- };
- XMLElement.prototype.a = function(name, value) {
- return this.attribute(name, value);
- };
+/***/ }),
+/* 141 */
+/***/ (function(module, exports) {
- XMLElement.prototype.getAttribute = function(name) {
- if (this.attribs.hasOwnProperty(name)) {
- return this.attribs[name].value;
- } else {
- return null;
- }
- };
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a map of nodes accessed by a string key
+ var XMLNamedNodeMap;
- XMLElement.prototype.setAttribute = function(name, value) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+ module.exports = XMLNamedNodeMap = (function() {
+ class XMLNamedNodeMap {
+ // Initializes a new instance of `XMLNamedNodeMap`
+ // This is just a wrapper around an ordinary
+ // JS object.
- XMLElement.prototype.getAttributeNode = function(name) {
- if (this.attribs.hasOwnProperty(name)) {
- return this.attribs[name];
- } else {
- return null;
+ // `nodes` the object containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
}
- };
-
- XMLElement.prototype.setAttributeNode = function(newAttr) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.removeAttributeNode = function(oldAttr) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getElementsByTagName = function(name) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.setAttributeNodeNS = function(newAttr) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.hasAttribute = function(name) {
- return this.attribs.hasOwnProperty(name);
- };
- XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
+ // Creates and returns a deep clone of `this`
- XMLElement.prototype.setIdAttribute = function(name, isId) {
- if (this.attribs.hasOwnProperty(name)) {
- return this.attribs[name].isId;
- } else {
- return isId;
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given object. The calling function should check
+ // whether the wrapped object is null and supply a new object
+ // (from the clone).
+ return this.nodes = null;
}
- };
-
- XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getElementsByTagName = function(tagname) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
- XMLElement.prototype.getElementsByClassName = function(classNames) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLElement.prototype.isEqualNode = function(node) {
- var i, j, ref1;
- if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
- return false;
- }
- if (node.namespaceURI !== this.namespaceURI) {
- return false;
- }
- if (node.prefix !== this.prefix) {
- return false;
- }
- if (node.localName !== this.localName) {
- return false;
- }
- if (node.attribs.length !== this.attribs.length) {
- return false;
- }
- for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) {
- if (!this.attribs[i].isEqualNode(node.attribs[i])) {
- return false;
- }
+ // DOM Level 1
+ getNamedItem(name) {
+ return this.nodes[name];
}
- return true;
- };
- return XMLElement;
+ setNamedItem(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ }
- })(XMLNode);
+ removeNamedItem(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ }
-}).call(this);
+ item(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ }
+ // DOM level 2 functions to be implemented later
+ getNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
-/***/ }),
-/* 148 */
-/***/ (function(module, exports) {
+ setNamedItemNS(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLNamedNodeMap;
+ removeNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
- module.exports = XMLNamedNodeMap = (function() {
- function XMLNamedNodeMap(nodes) {
- this.nodes = nodes;
- }
+ };
+
+ // DOM level 1
Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
get: function() {
return Object.keys(this.nodes).length || 0;
}
});
- XMLNamedNodeMap.prototype.clone = function() {
- return this.nodes = null;
- };
-
- XMLNamedNodeMap.prototype.getNamedItem = function(name) {
- return this.nodes[name];
- };
-
- XMLNamedNodeMap.prototype.setNamedItem = function(node) {
- var oldNode;
- oldNode = this.nodes[node.nodeName];
- this.nodes[node.nodeName] = node;
- return oldNode || null;
- };
-
- XMLNamedNodeMap.prototype.removeNamedItem = function(name) {
- var oldNode;
- oldNode = this.nodes[name];
- delete this.nodes[name];
- return oldNode || null;
- };
-
- XMLNamedNodeMap.prototype.item = function(index) {
- return this.nodes[Object.keys(this.nodes)[index]] || null;
- };
-
- XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented.");
- };
-
- XMLNamedNodeMap.prototype.setNamedItemNS = function(node) {
- throw new Error("This DOM method is not implemented.");
- };
-
- XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented.");
- };
-
return XMLNamedNodeMap;
- })();
+ }).call(this);
}).call(this);
/***/ }),
-/* 149 */
+/* 142 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLCData, XMLCharacterData,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLCData, XMLCharacterData;
NodeType = __webpack_require__(14);
- XMLCharacterData = __webpack_require__(95);
+ XMLCharacterData = __webpack_require__(90);
- module.exports = XMLCData = (function(superClass) {
- extend(XMLCData, superClass);
+ // Represents a CDATA node
+ module.exports = XMLCData = class XMLCData extends XMLCharacterData {
+ // Initializes a new instance of `XMLCData`
- function XMLCData(parent, text) {
- XMLCData.__super__.constructor.call(this, parent);
+ // `text` CDATA text
+ constructor(parent, text) {
+ super(parent);
if (text == null) {
throw new Error("Missing CDATA text. " + this.debugInfo());
}
@@ -12209,40 +11959,45 @@ module.exports = {
this.value = this.stringify.cdata(text);
}
- XMLCData.prototype.clone = function() {
+ // Creates and returns a deep clone of `this`
+ clone() {
return Object.create(this);
- };
+ }
- XMLCData.prototype.toString = function(options) {
- return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
- };
+ // Converts the XML fragment to string
- return XMLCData;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
+ }
- })(XMLCharacterData);
+ };
}).call(this);
/***/ }),
-/* 150 */
+/* 143 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLCharacterData, XMLComment,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLCharacterData, XMLComment;
NodeType = __webpack_require__(14);
- XMLCharacterData = __webpack_require__(95);
+ XMLCharacterData = __webpack_require__(90);
- module.exports = XMLComment = (function(superClass) {
- extend(XMLComment, superClass);
+ // Represents a comment node
+ module.exports = XMLComment = class XMLComment extends XMLCharacterData {
+ // Initializes a new instance of `XMLComment`
- function XMLComment(parent, text) {
- XMLComment.__super__.constructor.call(this, parent);
+ // `text` comment text
+ constructor(parent, text) {
+ super(parent);
if (text == null) {
throw new Error("Missing comment text. " + this.debugInfo());
}
@@ -12251,45 +12006,54 @@ module.exports = {
this.value = this.stringify.comment(text);
}
- XMLComment.prototype.clone = function() {
+ // Creates and returns a deep clone of `this`
+ clone() {
return Object.create(this);
- };
+ }
- XMLComment.prototype.toString = function(options) {
- return this.options.writer.comment(this, this.options.writer.filterOptions(options));
- };
+ // Converts the XML fragment to string
- return XMLComment;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
+ }
- })(XMLCharacterData);
+ };
}).call(this);
/***/ }),
-/* 151 */
+/* 144 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDeclaration, XMLNode, isObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDeclaration, XMLNode, isObject;
- isObject = __webpack_require__(39).isObject;
+ ({isObject} = __webpack_require__(38));
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- module.exports = XMLDeclaration = (function(superClass) {
- extend(XMLDeclaration, superClass);
+ // Represents the XML declaration
+ module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {
+ // Initializes a new instance of `XMLDeclaration`
- function XMLDeclaration(parent, version, encoding, standalone) {
- var ref;
- XMLDeclaration.__super__.constructor.call(this, parent);
+ // `parent` the document object
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ constructor(parent, version, encoding, standalone) {
+ super(parent);
+ // arguments may also be passed as an object
if (isObject(version)) {
- ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;
+ ({version, encoding, standalone} = version);
}
if (!version) {
version = '1.0';
@@ -12304,75 +12068,206 @@ module.exports = {
}
}
- XMLDeclaration.prototype.toString = function(options) {
- return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
- };
+ // Converts to string
- return XMLDeclaration;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
+ }
- })(XMLNode);
+ };
}).call(this);
/***/ }),
-/* 152 */
+/* 145 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;
- isObject = __webpack_require__(39).isObject;
+ ({isObject} = __webpack_require__(38));
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- XMLDTDAttList = __webpack_require__(153);
+ XMLDTDAttList = __webpack_require__(146);
- XMLDTDEntity = __webpack_require__(154);
+ XMLDTDEntity = __webpack_require__(147);
- XMLDTDElement = __webpack_require__(155);
+ XMLDTDElement = __webpack_require__(148);
- XMLDTDNotation = __webpack_require__(156);
+ XMLDTDNotation = __webpack_require__(149);
- XMLNamedNodeMap = __webpack_require__(148);
+ XMLNamedNodeMap = __webpack_require__(141);
- module.exports = XMLDocType = (function(superClass) {
- extend(XMLDocType, superClass);
+ // Represents doctype declaration
+ module.exports = XMLDocType = (function() {
+ class XMLDocType extends XMLNode {
+ // Initializes a new instance of `XMLDocType`
- function XMLDocType(parent, pubID, sysID) {
- var child, i, len, ref, ref1, ref2;
- XMLDocType.__super__.constructor.call(this, parent);
- this.type = NodeType.DocType;
- if (parent.children) {
- ref = parent.children;
- for (i = 0, len = ref.length; i < len; i++) {
- child = ref[i];
- if (child.type === NodeType.Element) {
- this.name = child.name;
- break;
+ // `parent` the document object
+
+ // `pubID` public identifier of the external subset
+ // `sysID` system identifier of the external subset
+ constructor(parent, pubID, sysID) {
+ var child, i, len, ref;
+ super(parent);
+ this.type = NodeType.DocType;
+ // set DTD name to the name of the root node
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
}
}
+ this.documentObject = parent;
+ // arguments may also be passed as an object
+ if (isObject(pubID)) {
+ ({pubID, sysID} = pubID);
+ }
+ if (sysID == null) {
+ [sysID, pubID] = [pubID, sysID];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
}
- this.documentObject = parent;
- if (isObject(pubID)) {
- ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID;
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ element(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
}
- if (sysID == null) {
- ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1];
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
}
- if (pubID != null) {
- this.pubID = this.stringify.dtdPubID(pubID);
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
}
- if (sysID != null) {
- this.sysID = this.stringify.dtdSysID(sysID);
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
}
- }
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ ele(name, value) {
+ return this.element(name, value);
+ }
+
+ att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ }
+
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ up() {
+ return this.root() || this.documentObject;
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
Object.defineProperty(XMLDocType.prototype, 'entities', {
get: function() {
var child, i, len, nodes, ref;
@@ -12403,6 +12298,7 @@ module.exports = {
}
});
+ // DOM level 2
Object.defineProperty(XMLDocType.prototype, 'publicId', {
get: function() {
return this.pubID;
@@ -12421,111 +12317,39 @@ module.exports = {
}
});
- XMLDocType.prototype.element = function(name, value) {
- var child;
- child = new XMLDTDElement(this, name, value);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- var child;
- child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.entity = function(name, value) {
- var child;
- child = new XMLDTDEntity(this, false, name, value);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.pEntity = function(name, value) {
- var child;
- child = new XMLDTDEntity(this, true, name, value);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.notation = function(name, value) {
- var child;
- child = new XMLDTDNotation(this, name, value);
- this.children.push(child);
- return this;
- };
-
- XMLDocType.prototype.toString = function(options) {
- return this.options.writer.docType(this, this.options.writer.filterOptions(options));
- };
-
- XMLDocType.prototype.ele = function(name, value) {
- return this.element(name, value);
- };
-
- XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
- };
-
- XMLDocType.prototype.ent = function(name, value) {
- return this.entity(name, value);
- };
-
- XMLDocType.prototype.pent = function(name, value) {
- return this.pEntity(name, value);
- };
-
- XMLDocType.prototype.not = function(name, value) {
- return this.notation(name, value);
- };
-
- XMLDocType.prototype.up = function() {
- return this.root() || this.documentObject;
- };
-
- XMLDocType.prototype.isEqualNode = function(node) {
- if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
- return false;
- }
- if (node.name !== this.name) {
- return false;
- }
- if (node.publicId !== this.publicId) {
- return false;
- }
- if (node.systemId !== this.systemId) {
- return false;
- }
- return true;
- };
-
return XMLDocType;
- })(XMLNode);
+ }).call(this);
}).call(this);
/***/ }),
-/* 153 */
+/* 146 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDTDAttList, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDTDAttList, XMLNode;
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- module.exports = XMLDTDAttList = (function(superClass) {
- extend(XMLDTDAttList, superClass);
-
- function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
- XMLDTDAttList.__super__.constructor.call(this, parent);
+ // Represents an attribute list
+ module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {
+ // Initializes a new instance of `XMLDTDAttList`
+
+ // `parent` the parent `XMLDocType` element
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,
+ // #FIXED or #DEFAULT)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ super(parent);
if (elementName == null) {
throw new Error("Missing DTD element name. " + this.debugInfo());
}
@@ -12557,73 +12381,98 @@ module.exports = {
this.defaultValueType = defaultValueType;
}
- XMLDTDAttList.prototype.toString = function(options) {
- return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
- };
+ // Converts the XML fragment to string
- return XMLDTDAttList;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ }
- })(XMLNode);
+ };
}).call(this);
/***/ }),
-/* 154 */
+/* 147 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDTDEntity, XMLNode, isObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDTDEntity, XMLNode, isObject;
- isObject = __webpack_require__(39).isObject;
+ ({isObject} = __webpack_require__(38));
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- module.exports = XMLDTDEntity = (function(superClass) {
- extend(XMLDTDEntity, superClass);
+ // Represents an entity declaration in the DTD
+ module.exports = XMLDTDEntity = (function() {
+ class XMLDTDEntity extends XMLNode {
+ // Initializes a new instance of `XMLDTDEntity`
+
+ // `parent` the parent `XMLDocType` element
+ // `pe` whether this is a parameter entity or a general entity
+ // defaults to `false` (general entity)
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ constructor(parent, pe, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
- function XMLDTDEntity(parent, pe, name, value) {
- XMLDTDEntity.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing DTD entity name. " + this.debugInfo(name));
- }
- if (value == null) {
- throw new Error("Missing DTD entity value. " + this.debugInfo(name));
- }
- this.pe = !!pe;
- this.name = this.stringify.name(name);
- this.type = NodeType.EntityDeclaration;
- if (!isObject(value)) {
- this.value = this.stringify.dtdEntityValue(value);
- this.internal = true;
- } else {
- if (!value.pubID && !value.sysID) {
- throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
- }
- if (value.pubID && !value.sysID) {
- throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
- }
- this.internal = false;
- if (value.pubID != null) {
- this.pubID = this.stringify.dtdPubID(value.pubID);
- }
- if (value.sysID != null) {
- this.sysID = this.stringify.dtdSysID(value.sysID);
- }
- if (value.nData != null) {
- this.nData = this.stringify.dtdNData(value.nData);
- }
- if (this.pe && this.nData) {
- throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
- }
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
}
- }
+ };
+
+ // DOM level 1
Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
get: function() {
return this.pubID;
@@ -12642,6 +12491,7 @@ module.exports = {
}
});
+ // DOM level 3
Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
get: function() {
return null;
@@ -12660,36 +12510,34 @@ module.exports = {
}
});
- XMLDTDEntity.prototype.toString = function(options) {
- return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
- };
-
return XMLDTDEntity;
- })(XMLNode);
+ }).call(this);
}).call(this);
/***/ }),
-/* 155 */
+/* 148 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDTDElement, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDTDElement, XMLNode;
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- module.exports = XMLDTDElement = (function(superClass) {
- extend(XMLDTDElement, superClass);
+ // Represents an attribute
+ module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {
+ // Initializes a new instance of `XMLDTDElement`
- function XMLDTDElement(parent, name, value) {
- XMLDTDElement.__super__.constructor.call(this, parent);
+ // `parent` the parent `XMLDocType` element
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ constructor(parent, name, value) {
+ super(parent);
if (name == null) {
throw new Error("Missing DTD element name. " + this.debugInfo());
}
@@ -12704,52 +12552,74 @@ module.exports = {
this.value = this.stringify.dtdElementValue(value);
}
- XMLDTDElement.prototype.toString = function(options) {
- return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
- };
+ // Converts the XML fragment to string
- return XMLDTDElement;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ }
- })(XMLNode);
+ };
}).call(this);
/***/ }),
-/* 156 */
+/* 149 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLDTDNotation, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLDTDNotation, XMLNode;
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
NodeType = __webpack_require__(14);
- module.exports = XMLDTDNotation = (function(superClass) {
- extend(XMLDTDNotation, superClass);
-
- function XMLDTDNotation(parent, name, value) {
- XMLDTDNotation.__super__.constructor.call(this, parent);
- if (name == null) {
- throw new Error("Missing DTD notation name. " + this.debugInfo(name));
- }
- if (!value.pubID && !value.sysID) {
- throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
- }
- this.name = this.stringify.name(name);
- this.type = NodeType.NotationDeclaration;
- if (value.pubID != null) {
- this.pubID = this.stringify.dtdPubID(value.pubID);
+ // Represents a NOTATION entry in the DTD
+ module.exports = XMLDTDNotation = (function() {
+ class XMLDTDNotation extends XMLNode {
+ // Initializes a new instance of `XMLDTDNotation`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
}
- if (value.sysID != null) {
- this.sysID = this.stringify.dtdSysID(value.sysID);
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
}
- }
+ };
+
+ // DOM level 1
Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
get: function() {
return this.pubID;
@@ -12762,36 +12632,32 @@ module.exports = {
}
});
- XMLDTDNotation.prototype.toString = function(options) {
- return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
- };
-
return XMLDTDNotation;
- })(XMLNode);
+ }).call(this);
}).call(this);
/***/ }),
-/* 157 */
+/* 150 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLNode, XMLRaw,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLNode, XMLRaw;
NodeType = __webpack_require__(14);
- XMLNode = __webpack_require__(26);
+ XMLNode = __webpack_require__(24);
- module.exports = XMLRaw = (function(superClass) {
- extend(XMLRaw, superClass);
+ // Represents a raw node
+ module.exports = XMLRaw = class XMLRaw extends XMLNode {
+ // Initializes a new instance of `XMLRaw`
- function XMLRaw(parent, text) {
- XMLRaw.__super__.constructor.call(this, parent);
+ // `text` raw text
+ constructor(parent, text) {
+ super(parent);
if (text == null) {
throw new Error("Missing raw text. " + this.debugInfo());
}
@@ -12799,48 +12665,82 @@ module.exports = {
this.value = this.stringify.raw(text);
}
- XMLRaw.prototype.clone = function() {
+ // Creates and returns a deep clone of `this`
+ clone() {
return Object.create(this);
- };
+ }
- XMLRaw.prototype.toString = function(options) {
- return this.options.writer.raw(this, this.options.writer.filterOptions(options));
- };
+ // Converts the XML fragment to string
- return XMLRaw;
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ }
- })(XMLNode);
+ };
}).call(this);
/***/ }),
-/* 158 */
+/* 151 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLCharacterData, XMLText,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLCharacterData, XMLText;
NodeType = __webpack_require__(14);
- XMLCharacterData = __webpack_require__(95);
+ XMLCharacterData = __webpack_require__(90);
- module.exports = XMLText = (function(superClass) {
- extend(XMLText, superClass);
+ // Represents a text node
+ module.exports = XMLText = (function() {
+ class XMLText extends XMLCharacterData {
+ // Initializes a new instance of `XMLText`
- function XMLText(parent, text) {
- XMLText.__super__.constructor.call(this, parent);
- if (text == null) {
- throw new Error("Missing element text. " + this.debugInfo());
+ // `text` element text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
}
- this.name = "#text";
- this.type = NodeType.Text;
- this.value = this.stringify.text(text);
- }
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ splitText(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ replaceWholeText(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 3
Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
get: function() {
throw new Error("This DOM method is not implemented." + this.debugInfo());
@@ -12866,48 +12766,34 @@ module.exports = {
}
});
- XMLText.prototype.clone = function() {
- return Object.create(this);
- };
-
- XMLText.prototype.toString = function(options) {
- return this.options.writer.text(this, this.options.writer.filterOptions(options));
- };
-
- XMLText.prototype.splitText = function(offset) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLText.prototype.replaceWholeText = function(content) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
return XMLText;
- })(XMLCharacterData);
+ }).call(this);
}).call(this);
/***/ }),
-/* 159 */
+/* 152 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var NodeType, XMLCharacterData, XMLProcessingInstruction,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var NodeType, XMLCharacterData, XMLProcessingInstruction;
NodeType = __webpack_require__(14);
- XMLCharacterData = __webpack_require__(95);
+ XMLCharacterData = __webpack_require__(90);
- module.exports = XMLProcessingInstruction = (function(superClass) {
- extend(XMLProcessingInstruction, superClass);
+ // Represents a processing instruction
+ module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {
+ // Initializes a new instance of `XMLProcessingInstruction`
- function XMLProcessingInstruction(parent, target, value) {
- XMLProcessingInstruction.__super__.constructor.call(this, parent);
+ // `parent` the parent node
+ // `target` instruction target
+ // `value` instruction value
+ constructor(parent, target, value) {
+ super(parent);
if (target == null) {
throw new Error("Missing instruction target. " + this.debugInfo());
}
@@ -12919,51 +12805,62 @@ module.exports = {
}
}
- XMLProcessingInstruction.prototype.clone = function() {
+ // Creates and returns a deep clone of `this`
+ clone() {
return Object.create(this);
- };
+ }
- XMLProcessingInstruction.prototype.toString = function(options) {
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
- };
+ }
- XMLProcessingInstruction.prototype.isEqualNode = function(node) {
- if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
return false;
}
if (node.target !== this.target) {
return false;
}
return true;
- };
-
- return XMLProcessingInstruction;
+ }
- })(XMLCharacterData);
+ };
}).call(this);
/***/ }),
-/* 160 */
+/* 153 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
+// Generated by CoffeeScript 2.4.1
(function() {
- var XMLStringWriter, XMLWriterBase,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var XMLStringWriter, XMLWriterBase;
- XMLWriterBase = __webpack_require__(237);
+ XMLWriterBase = __webpack_require__(213);
- module.exports = XMLStringWriter = (function(superClass) {
- extend(XMLStringWriter, superClass);
+ // Prints XML nodes as plain text
+ module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStringWriter`
- function XMLStringWriter(options) {
- XMLStringWriter.__super__.constructor.call(this, options);
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ super(options);
}
- XMLStringWriter.prototype.document = function(doc, options) {
+ document(doc, options) {
var child, i, len, r, ref;
options = this.filterOptions(options);
r = '';
@@ -12972,2606 +12869,1415 @@ module.exports = {
child = ref[i];
r += this.writeChildNode(child, options, 0);
}
+ // remove trailing newline
if (options.pretty && r.slice(-options.newline.length) === options.newline) {
r = r.slice(0, -options.newline.length);
}
return r;
- };
-
- return XMLStringWriter;
+ }
- })(XMLWriterBase);
+ };
}).call(this);
/***/ }),
-/* 161 */
+/* 154 */
+/***/ (function(module) {
+
+module.exports = JSON.parse("[{\"type\":\"cocos2d(PLIST)\",\"description\":\"cocos2d format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Cocos2d.mst\",\"fileExt\":\"plist\"},{\"type\":\"Spine(atlas)\",\"description\":\"Spine atlas\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Spine.mst\",\"fileExt\":\"atlas\"},{\"type\":\"DBJson(龙骨)\",\"description\":\"DBJson json\",\"allowTrim\":true,\"allowRotation\":false,\"removeFileExtension\":true,\"template\":\"DBJson.mst\",\"fileExt\":\"json\"},{\"type\":\"JSON (hash)\",\"description\":\"Json hash\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"JSON (array)\",\"description\":\"Json array\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonArray.mst\",\"fileExt\":\"json\"},{\"type\":\"XML\",\"description\":\"Plain XML format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"XML.mst\",\"fileExt\":\"xml\"},{\"type\":\"css (modern)\",\"description\":\"css format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Css.mst\",\"fileExt\":\"css\"},{\"type\":\"css (old)\",\"description\":\"old css format\",\"allowTrim\":false,\"allowRotation\":false,\"template\":\"OldCss.mst\",\"fileExt\":\"css\"},{\"type\":\"pixi.js\",\"description\":\"pixi.js format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"Godot (atlas)\",\"description\":\"Godot Atlas format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"GodotAtlas.mst\",\"fileExt\":\"tpsheet\"},{\"type\":\"Godot (tileset)\",\"description\":\"Godot Tileset format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"GodotTileset.mst\",\"fileExt\":\"tpset\"},{\"type\":\"Phaser (hash)\",\"description\":\"Phaser (json hash)\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"Phaser (array)\",\"description\":\"Phaser (json array)\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonArray.mst\",\"fileExt\":\"json\"},{\"type\":\"Phaser 3\",\"description\":\"Phaser 3\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Phaser3.mst\",\"fileExt\":\"json\"},{\"type\":\"UnrealEngine\",\"description\":\"UnrealEngine - Paper2d\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Unreal.mst\",\"fileExt\":\"paper2dsprites\"},{\"type\":\"Starling\",\"description\":\"Starling format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Starling.mst\",\"fileExt\":\"xml\"},{\"type\":\"UIKit\",\"description\":\"UIKit sprite sheet\",\"allowTrim\":true,\"allowRotation\":false,\"template\":\"UIKit.mst\",\"fileExt\":\"plist\",\"predefined\":true},{\"type\":\"Unity3D\",\"description\":\"Unity3D sprite sheet\",\"allowTrim\":true,\"allowRotation\":false,\"template\":\"Unity3D.mst\",\"fileExt\":\"tpsheet\",\"predefined\":true},{\"type\":\"Egret2D\",\"description\":\"Egret2D sprite sheet\",\"allowTrim\":false,\"allowRotation\":false,\"template\":\"Egret2D.mst\",\"fileExt\":\"json\",\"predefined\":true},{\"type\":\"custom\",\"description\":\"Custom format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"\",\"fileExt\":\"\"}]");
+
+/***/ }),
+/* 155 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+// Generated by CoffeeScript 1.12.7
+(function() {
+ "use strict";
+ var builder, defaults, parser, processors,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+ defaults = __webpack_require__(122);
-var keys = __webpack_require__(239);
-var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
+ builder = __webpack_require__(426);
-var toStr = Object.prototype.toString;
-var concat = Array.prototype.concat;
-var origDefineProperty = Object.defineProperty;
+ parser = __webpack_require__(435);
-var isFunction = function (fn) {
- return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
-};
+ processors = __webpack_require__(206);
-var arePropertyDescriptorsSupported = function () {
- var obj = {};
- try {
- origDefineProperty(obj, 'x', { enumerable: false, value: obj });
- // eslint-disable-next-line no-unused-vars, no-restricted-syntax
- for (var _ in obj) { // jscs:ignore disallowUnusedVariables
- return false;
- }
- return obj.x === obj;
- } catch (e) { /* this is IE 8. */
- return false;
- }
-};
-var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
+ exports.defaults = defaults.defaults;
-var defineProperty = function (object, name, value, predicate) {
- if (name in object && (!isFunction(predicate) || !predicate())) {
- return;
- }
- if (supportsDescriptors) {
- origDefineProperty(object, name, {
- configurable: true,
- enumerable: false,
- value: value,
- writable: true
- });
- } else {
- object[name] = value;
- }
-};
+ exports.processors = processors;
-var defineProperties = function (object, map) {
- var predicates = arguments.length > 2 ? arguments[2] : {};
- var props = keys(map);
- if (hasSymbols) {
- props = concat.call(props, Object.getOwnPropertySymbols(map));
- }
- for (var i = 0; i < props.length; i += 1) {
- defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
- }
-};
+ exports.ValidationError = (function(superClass) {
+ extend(ValidationError, superClass);
-defineProperties.supportsDescriptors = !!supportsDescriptors;
+ function ValidationError(message) {
+ this.message = message;
+ }
-module.exports = defineProperties;
+ return ValidationError;
+ })(Error);
-/***/ }),
-/* 162 */
-/***/ (function(module, exports, __webpack_require__) {
+ exports.Builder = builder.Builder;
-/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+ exports.Parser = parser.Parser;
-var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
- function getOwnPropertyDescriptors(obj) {
- var keys = Object.keys(obj);
- var descriptors = {};
- for (var i = 0; i < keys.length; i++) {
- descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
- }
- return descriptors;
- };
+ exports.parseString = parser.parseString;
-var formatRegExp = /%[sdj%]/g;
-exports.format = function(f) {
- if (!isString(f)) {
- var objects = [];
- for (var i = 0; i < arguments.length; i++) {
- objects.push(inspect(arguments[i]));
- }
- return objects.join(' ');
- }
-
- var i = 1;
- var args = arguments;
- var len = args.length;
- var str = String(f).replace(formatRegExp, function(x) {
- if (x === '%%') return '%';
- if (i >= len) return x;
- switch (x) {
- case '%s': return String(args[i++]);
- case '%d': return Number(args[i++]);
- case '%j':
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return '[Circular]';
- }
- default:
- return x;
- }
- });
- for (var x = args[i]; i < len; x = args[++i]) {
- if (isNull(x) || !isObject(x)) {
- str += ' ' + x;
- } else {
- str += ' ' + inspect(x);
- }
- }
- return str;
-};
+ exports.parseStringPromise = parser.parseStringPromise;
+}).call(this);
-// Mark that a method should not be used.
-// Returns a modified function which warns once by default.
-// If --no-deprecation is set, then it is a no-op.
-exports.deprecate = function(fn, msg) {
- if (typeof process !== 'undefined' && process.noDeprecation === true) {
- return fn;
- }
- // Allow for deprecating things in the process of starting up.
- if (typeof process === 'undefined') {
- return function() {
- return exports.deprecate(fn, msg).apply(this, arguments);
- };
- }
+/***/ }),
+/* 156 */
+/***/ (function(module, exports, __webpack_require__) {
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (process.throwDeprecation) {
- throw new Error(msg);
- } else if (process.traceDeprecation) {
- console.trace(msg);
- } else {
- console.error(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
+module.exports = !__webpack_require__(9) && !__webpack_require__(5)(function () {
+ return Object.defineProperty(__webpack_require__(94)('div'), 'a', { get: function () { return 7; } }).a != 7;
+});
- return deprecated;
-};
+/***/ }),
+/* 157 */
+/***/ (function(module, exports, __webpack_require__) {
-var debugs = {};
-var debugEnviron;
-exports.debuglog = function(set) {
- if (isUndefined(debugEnviron))
- debugEnviron = process.env.NODE_DEBUG || '';
- set = set.toUpperCase();
- if (!debugs[set]) {
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
- var pid = process.pid;
- debugs[set] = function() {
- var msg = exports.format.apply(exports, arguments);
- console.error('%s %d: %s', set, pid, msg);
- };
- } else {
- debugs[set] = function() {};
- }
- }
- return debugs[set];
-};
+exports.f = __webpack_require__(7);
-/**
- * Echos the value of a value. Trys to print the value out
- * in the best way possible given the different types.
- *
- * @param {Object} obj The object to print out.
- * @param {Object} opts Optional options object that alters the output.
- */
-/* legacy: obj, showHidden, depth, colors*/
-function inspect(obj, opts) {
- // default options
- var ctx = {
- seen: [],
- stylize: stylizeNoColor
- };
- // legacy...
- if (arguments.length >= 3) ctx.depth = arguments[2];
- if (arguments.length >= 4) ctx.colors = arguments[3];
- if (isBoolean(opts)) {
- // legacy...
- ctx.showHidden = opts;
- } else if (opts) {
- // got an "options" object
- exports._extend(ctx, opts);
- }
- // set default options
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
- if (isUndefined(ctx.depth)) ctx.depth = 2;
- if (isUndefined(ctx.colors)) ctx.colors = false;
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
- if (ctx.colors) ctx.stylize = stylizeWithColor;
- return formatValue(ctx, obj, ctx.depth);
-}
-exports.inspect = inspect;
-
-
-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
-inspect.colors = {
- 'bold' : [1, 22],
- 'italic' : [3, 23],
- 'underline' : [4, 24],
- 'inverse' : [7, 27],
- 'white' : [37, 39],
- 'grey' : [90, 39],
- 'black' : [30, 39],
- 'blue' : [34, 39],
- 'cyan' : [36, 39],
- 'green' : [32, 39],
- 'magenta' : [35, 39],
- 'red' : [31, 39],
- 'yellow' : [33, 39]
-};
-
-// Don't use 'blue' not visible on cmd.exe
-inspect.styles = {
- 'special': 'cyan',
- 'number': 'yellow',
- 'boolean': 'yellow',
- 'undefined': 'grey',
- 'null': 'bold',
- 'string': 'green',
- 'date': 'magenta',
- // "name": intentionally not styling
- 'regexp': 'red'
-};
-
-
-function stylizeWithColor(str, styleType) {
- var style = inspect.styles[styleType];
-
- if (style) {
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
- '\u001b[' + inspect.colors[style][1] + 'm';
- } else {
- return str;
+/***/ }),
+/* 158 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var has = __webpack_require__(19);
+var toIObject = __webpack_require__(20);
+var arrayIndexOf = __webpack_require__(70)(false);
+var IE_PROTO = __webpack_require__(96)('IE_PROTO');
+
+module.exports = function (object, names) {
+ var O = toIObject(object);
+ var i = 0;
+ var result = [];
+ var key;
+ for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while (names.length > i) if (has(O, key = names[i++])) {
+ ~arrayIndexOf(result, key) || result.push(key);
}
-}
+ return result;
+};
-function stylizeNoColor(str, styleType) {
- return str;
-}
+/***/ }),
+/* 159 */
+/***/ (function(module, exports, __webpack_require__) {
+var dP = __webpack_require__(11);
+var anObject = __webpack_require__(3);
+var getKeys = __webpack_require__(44);
-function arrayToHash(array) {
- var hash = {};
+module.exports = __webpack_require__(9) ? Object.defineProperties : function defineProperties(O, Properties) {
+ anObject(O);
+ var keys = getKeys(Properties);
+ var length = keys.length;
+ var i = 0;
+ var P;
+ while (length > i) dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+};
- array.forEach(function(val, idx) {
- hash[val] = true;
- });
- return hash;
-}
+/***/ }),
+/* 160 */
+/***/ (function(module, exports, __webpack_require__) {
+// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+var toIObject = __webpack_require__(20);
+var gOPN = __webpack_require__(47).f;
+var toString = {}.toString;
-function formatValue(ctx, value, recurseTimes) {
- // Provide a hook for user-specified inspect functions.
- // Check that value is an object with an inspect function on it
- if (ctx.customInspect &&
- value &&
- isFunction(value.inspect) &&
- // Filter out the util module, it's inspect function is special
- value.inspect !== exports.inspect &&
- // Also filter out any prototype objects using the circular check.
- !(value.constructor && value.constructor.prototype === value)) {
- var ret = value.inspect(recurseTimes, ctx);
- if (!isString(ret)) {
- ret = formatValue(ctx, ret, recurseTimes);
- }
- return ret;
- }
+var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
- // Primitive types cannot have properties
- var primitive = formatPrimitive(ctx, value);
- if (primitive) {
- return primitive;
+var getWindowNames = function (it) {
+ try {
+ return gOPN(it);
+ } catch (e) {
+ return windowNames.slice();
}
+};
- // Look up the keys of the object.
- var keys = Object.keys(value);
- var visibleKeys = arrayToHash(keys);
+module.exports.f = function getOwnPropertyNames(it) {
+ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+};
- if (ctx.showHidden) {
- keys = Object.getOwnPropertyNames(value);
- }
- // IE doesn't make error fields non-enumerable
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
- if (isError(value)
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
- return formatError(value);
- }
+/***/ }),
+/* 161 */
+/***/ (function(module, exports, __webpack_require__) {
- // Some type of object without properties can be shortcutted.
- if (keys.length === 0) {
- if (isFunction(value)) {
- var name = value.name ? ': ' + value.name : '';
- return ctx.stylize('[Function' + name + ']', 'special');
- }
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- }
- if (isDate(value)) {
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
- }
- if (isError(value)) {
- return formatError(value);
+"use strict";
+
+// 19.1.2.1 Object.assign(target, source, ...)
+var DESCRIPTORS = __webpack_require__(9);
+var getKeys = __webpack_require__(44);
+var gOPS = __webpack_require__(71);
+var pIE = __webpack_require__(64);
+var toObject = __webpack_require__(12);
+var IObject = __webpack_require__(63);
+var $assign = Object.assign;
+
+// should work with symbols and should have deterministic property order (V8 bug)
+module.exports = !$assign || __webpack_require__(5)(function () {
+ var A = {};
+ var B = {};
+ // eslint-disable-next-line no-undef
+ var S = Symbol();
+ var K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function (k) { B[k] = k; });
+ return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
+ var T = toObject(target);
+ var aLen = arguments.length;
+ var index = 1;
+ var getSymbols = gOPS.f;
+ var isEnum = pIE.f;
+ while (aLen > index) {
+ var S = IObject(arguments[index++]);
+ var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
+ var length = keys.length;
+ var j = 0;
+ var key;
+ while (length > j) {
+ key = keys[j++];
+ if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
}
- }
+ } return T;
+} : $assign;
- var base = '', array = false, braces = ['{', '}'];
- // Make Array say that they are Array
- if (isArray(value)) {
- array = true;
- braces = ['[', ']'];
- }
+/***/ }),
+/* 162 */
+/***/ (function(module, exports) {
- // Make functions say that they are functions
- if (isFunction(value)) {
- var n = value.name ? ': ' + value.name : '';
- base = ' [Function' + n + ']';
- }
+// 7.2.9 SameValue(x, y)
+module.exports = Object.is || function is(x, y) {
+ // eslint-disable-next-line no-self-compare
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+};
- // Make RegExps say that they are RegExps
- if (isRegExp(value)) {
- base = ' ' + RegExp.prototype.toString.call(value);
- }
- // Make dates with properties first say the date
- if (isDate(value)) {
- base = ' ' + Date.prototype.toUTCString.call(value);
- }
+/***/ }),
+/* 163 */
+/***/ (function(module, exports, __webpack_require__) {
- // Make error with message first say the error
- if (isError(value)) {
- base = ' ' + formatError(value);
- }
+"use strict";
- if (keys.length === 0 && (!array || value.length == 0)) {
- return braces[0] + base + braces[1];
- }
+var aFunction = __webpack_require__(15);
+var isObject = __webpack_require__(6);
+var invoke = __webpack_require__(164);
+var arraySlice = [].slice;
+var factories = {};
- if (recurseTimes < 0) {
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- } else {
- return ctx.stylize('[Object]', 'special');
- }
- }
+var construct = function (F, len, args) {
+ if (!(len in factories)) {
+ for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
+ // eslint-disable-next-line no-new-func
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ } return factories[len](F, args);
+};
- ctx.seen.push(value);
+module.exports = Function.bind || function bind(that /* , ...args */) {
+ var fn = aFunction(this);
+ var partArgs = arraySlice.call(arguments, 1);
+ var bound = function (/* args... */) {
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if (isObject(fn.prototype)) bound.prototype = fn.prototype;
+ return bound;
+};
- var output;
- if (array) {
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
- } else {
- output = keys.map(function(key) {
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
- });
- }
- ctx.seen.pop();
+/***/ }),
+/* 164 */
+/***/ (function(module, exports) {
- return reduceToSingleString(output, base, braces);
-}
+// fast apply, http://jsperf.lnkit.com/fast-apply/5
+module.exports = function (fn, args, that) {
+ var un = that === undefined;
+ switch (args.length) {
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+};
-function formatPrimitive(ctx, value) {
- if (isUndefined(value))
- return ctx.stylize('undefined', 'undefined');
- if (isString(value)) {
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"') + '\'';
- return ctx.stylize(simple, 'string');
- }
- if (isNumber(value))
- return ctx.stylize('' + value, 'number');
- if (isBoolean(value))
- return ctx.stylize('' + value, 'boolean');
- // For some reason typeof null is "object", so special case here.
- if (isNull(value))
- return ctx.stylize('null', 'null');
-}
+/***/ }),
+/* 165 */
+/***/ (function(module, exports, __webpack_require__) {
+var $parseInt = __webpack_require__(4).parseInt;
+var $trim = __webpack_require__(57).trim;
+var ws = __webpack_require__(100);
+var hex = /^[-+]?0[xX]/;
-function formatError(value) {
- return '[' + Error.prototype.toString.call(value) + ']';
-}
+module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
+ var string = $trim(String(str), 3);
+ return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
+} : $parseInt;
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
- var output = [];
- for (var i = 0, l = value.length; i < l; ++i) {
- if (hasOwnProperty(value, String(i))) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- String(i), true));
- } else {
- output.push('');
- }
- }
- keys.forEach(function(key) {
- if (!key.match(/^\d+$/)) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- key, true));
- }
- });
- return output;
-}
+/***/ }),
+/* 166 */
+/***/ (function(module, exports, __webpack_require__) {
+var $parseFloat = __webpack_require__(4).parseFloat;
+var $trim = __webpack_require__(57).trim;
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
- var name, str, desc;
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
- if (desc.get) {
- if (desc.set) {
- str = ctx.stylize('[Getter/Setter]', 'special');
- } else {
- str = ctx.stylize('[Getter]', 'special');
- }
- } else {
- if (desc.set) {
- str = ctx.stylize('[Setter]', 'special');
- }
- }
- if (!hasOwnProperty(visibleKeys, key)) {
- name = '[' + key + ']';
- }
- if (!str) {
- if (ctx.seen.indexOf(desc.value) < 0) {
- if (isNull(recurseTimes)) {
- str = formatValue(ctx, desc.value, null);
- } else {
- str = formatValue(ctx, desc.value, recurseTimes - 1);
- }
- if (str.indexOf('\n') > -1) {
- if (array) {
- str = str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n').substr(2);
- } else {
- str = '\n' + str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n');
- }
- }
- } else {
- str = ctx.stylize('[Circular]', 'special');
- }
- }
- if (isUndefined(name)) {
- if (array && key.match(/^\d+$/)) {
- return str;
- }
- name = JSON.stringify('' + key);
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
- name = name.substr(1, name.length - 2);
- name = ctx.stylize(name, 'name');
- } else {
- name = name.replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- .replace(/(^"|"$)/g, "'");
- name = ctx.stylize(name, 'string');
- }
- }
-
- return name + ': ' + str;
-}
-
-
-function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
- var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
- }, 0);
+module.exports = 1 / $parseFloat(__webpack_require__(100) + '-0') !== -Infinity ? function parseFloat(str) {
+ var string = $trim(String(str), 3);
+ var result = $parseFloat(string);
+ return result === 0 && string.charAt(0) == '-' ? -0 : result;
+} : $parseFloat;
- if (length > 60) {
- return braces[0] +
- (base === '' ? '' : base + '\n ') +
- ' ' +
- output.join(',\n ') +
- ' ' +
- braces[1];
- }
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-}
+/***/ }),
+/* 167 */
+/***/ (function(module, exports, __webpack_require__) {
+var cof = __webpack_require__(27);
+module.exports = function (it, msg) {
+ if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
+ return +it;
+};
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-function isArray(ar) {
- return Array.isArray(ar);
-}
-exports.isArray = isArray;
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
+/***/ }),
+/* 168 */
+/***/ (function(module, exports, __webpack_require__) {
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
+// 20.1.2.3 Number.isInteger(number)
+var isObject = __webpack_require__(6);
+var floor = Math.floor;
+module.exports = function isInteger(it) {
+ return !isObject(it) && isFinite(it) && floor(it) === it;
+};
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
+/***/ }),
+/* 169 */
+/***/ (function(module, exports) {
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
+// 20.2.2.20 Math.log1p(x)
+module.exports = Math.log1p || function log1p(x) {
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
+};
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
+/***/ }),
+/* 170 */
+/***/ (function(module, exports, __webpack_require__) {
-function isRegExp(re) {
- return isObject(re) && objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
+// 20.2.2.16 Math.fround(x)
+var sign = __webpack_require__(103);
+var pow = Math.pow;
+var EPSILON = pow(2, -52);
+var EPSILON32 = pow(2, -23);
+var MAX32 = pow(2, 127) * (2 - EPSILON32);
+var MIN32 = pow(2, -126);
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
+var roundTiesToEven = function (n) {
+ return n + 1 / EPSILON - 1 / EPSILON;
+};
-function isDate(d) {
- return isObject(d) && objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
+module.exports = Math.fround || function fround(x) {
+ var $abs = Math.abs(x);
+ var $sign = sign(x);
+ var a, result;
+ if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ // eslint-disable-next-line no-self-compare
+ if (result > MAX32 || result != result) return $sign * Infinity;
+ return $sign * result;
+};
-function isError(e) {
- return isObject(e) &&
- (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
+/***/ }),
+/* 171 */
+/***/ (function(module, exports, __webpack_require__) {
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
+// call something on iterator step with safe closing on error
+var anObject = __webpack_require__(3);
+module.exports = function (iterator, fn, value, entries) {
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch (e) {
+ var ret = iterator['return'];
+ if (ret !== undefined) anObject(ret.call(iterator));
+ throw e;
+ }
+};
-exports.isBuffer = __webpack_require__(521);
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
+/***/ }),
+/* 172 */
+/***/ (function(module, exports, __webpack_require__) {
+var aFunction = __webpack_require__(15);
+var toObject = __webpack_require__(12);
+var IObject = __webpack_require__(63);
+var toLength = __webpack_require__(8);
-function pad(n) {
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
-}
+module.exports = function (that, callbackfn, aLen, memo, isRight) {
+ aFunction(callbackfn);
+ var O = toObject(that);
+ var self = IObject(O);
+ var length = toLength(O.length);
+ var index = isRight ? length - 1 : 0;
+ var i = isRight ? -1 : 1;
+ if (aLen < 2) for (;;) {
+ if (index in self) {
+ memo = self[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if (isRight ? index < 0 : length <= index) {
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
+ memo = callbackfn(memo, self[index], index, O);
+ }
+ return memo;
+};
-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
- 'Oct', 'Nov', 'Dec'];
+/***/ }),
+/* 173 */
+/***/ (function(module, exports, __webpack_require__) {
-// 26 Feb 16:19:34
-function timestamp() {
- var d = new Date();
- var time = [pad(d.getHours()),
- pad(d.getMinutes()),
- pad(d.getSeconds())].join(':');
- return [d.getDate(), months[d.getMonth()], time].join(' ');
-}
+"use strict";
+// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+var toObject = __webpack_require__(12);
+var toAbsoluteIndex = __webpack_require__(45);
+var toLength = __webpack_require__(8);
-// log is just a thin wrapper to console.log that prepends a timestamp
-exports.log = function() {
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
+ var O = toObject(this);
+ var len = toLength(O.length);
+ var to = toAbsoluteIndex(target, len);
+ var from = toAbsoluteIndex(start, len);
+ var end = arguments.length > 2 ? arguments[2] : undefined;
+ var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
+ var inc = 1;
+ if (from < to && to < from + count) {
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while (count-- > 0) {
+ if (from in O) O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
};
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * The Function.prototype.inherits from lang.js rewritten as a standalone
- * function (not on Function.prototype). NOTE: If this file is to be loaded
- * during bootstrapping this function needs to be rewritten using some native
- * functions as prototype setup using normal JavaScript does not work as
- * expected during bootstrapping (see mirror.js in r114903).
- *
- * @param {function} ctor Constructor function which needs to inherit the
- * prototype.
- * @param {function} superCtor Constructor function to inherit prototype from.
- */
-exports.inherits = __webpack_require__(522);
-
-exports._extend = function(origin, add) {
- // Don't do anything if add isn't an object
- if (!add || !isObject(add)) return origin;
+/***/ }),
+/* 174 */
+/***/ (function(module, exports) {
- var keys = Object.keys(add);
- var i = keys.length;
- while (i--) {
- origin[keys[i]] = add[keys[i]];
- }
- return origin;
+module.exports = function (done, value) {
+ return { value: value, done: !!done };
};
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
-exports.promisify = function promisify(original) {
- if (typeof original !== 'function')
- throw new TypeError('The "original" argument must be of type Function');
-
- if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
- var fn = original[kCustomPromisifiedSymbol];
- if (typeof fn !== 'function') {
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
- }
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
- value: fn, enumerable: false, writable: false, configurable: true
- });
- return fn;
- }
+/***/ }),
+/* 175 */
+/***/ (function(module, exports, __webpack_require__) {
- function fn() {
- var promiseResolve, promiseReject;
- var promise = new Promise(function (resolve, reject) {
- promiseResolve = resolve;
- promiseReject = reject;
- });
+"use strict";
- var args = [];
- for (var i = 0; i < arguments.length; i++) {
- args.push(arguments[i]);
- }
- args.push(function (err, value) {
- if (err) {
- promiseReject(err);
- } else {
- promiseResolve(value);
- }
- });
+var regexpExec = __webpack_require__(115);
+__webpack_require__(1)({
+ target: 'RegExp',
+ proto: true,
+ forced: regexpExec !== /./.exec
+}, {
+ exec: regexpExec
+});
- try {
- original.apply(this, args);
- } catch (err) {
- promiseReject(err);
- }
- return promise;
- }
+/***/ }),
+/* 176 */
+/***/ (function(module, exports, __webpack_require__) {
- Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
+// 21.2.5.3 get RegExp.prototype.flags()
+if (__webpack_require__(9) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', {
+ configurable: true,
+ get: __webpack_require__(65)
+});
- if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
- value: fn, enumerable: false, writable: false, configurable: true
- });
- return Object.defineProperties(
- fn,
- getOwnPropertyDescriptors(original)
- );
-}
-exports.promisify.custom = kCustomPromisifiedSymbol
+/***/ }),
+/* 177 */
+/***/ (function(module, exports) {
-function callbackifyOnRejected(reason, cb) {
- // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
- // Because `null` is a special error value in callbacks which means "no error
- // occurred", we error-wrap so the callback consumer can distinguish between
- // "the promise rejected with null" or "the promise fulfilled with undefined".
- if (!reason) {
- var newReason = new Error('Promise was rejected with a falsy value');
- newReason.reason = reason;
- reason = newReason;
+module.exports = function (exec) {
+ try {
+ return { e: false, v: exec() };
+ } catch (e) {
+ return { e: true, v: e };
}
- return cb(reason);
-}
+};
-function callbackify(original) {
- if (typeof original !== 'function') {
- throw new TypeError('The "original" argument must be of type Function');
- }
- // We DO NOT return the promise as it gives the user a false sense that
- // the promise is actually somehow related to the callback's execution
- // and that the callback throwing will reject the promise.
- function callbackified() {
- var args = [];
- for (var i = 0; i < arguments.length; i++) {
- args.push(arguments[i]);
- }
+/***/ }),
+/* 178 */
+/***/ (function(module, exports, __webpack_require__) {
- var maybeCb = args.pop();
- if (typeof maybeCb !== 'function') {
- throw new TypeError('The last argument must be of type Function');
- }
- var self = this;
- var cb = function() {
- return maybeCb.apply(self, arguments);
- };
- // In true node style we process the callback on `nextTick` with all the
- // implications (stack, `uncaughtException`, `async_hooks`)
- original.apply(this, args)
- .then(function(ret) { process.nextTick(cb, null, ret) },
- function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
- }
+var anObject = __webpack_require__(3);
+var isObject = __webpack_require__(6);
+var newPromiseCapability = __webpack_require__(119);
- Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
- Object.defineProperties(callbackified,
- getOwnPropertyDescriptors(original));
- return callbackified;
-}
-exports.callbackify = callbackify;
+module.exports = function (C, x) {
+ anObject(C);
+ if (isObject(x) && x.constructor === C) return x;
+ var promiseCapability = newPromiseCapability.f(C);
+ var resolve = promiseCapability.resolve;
+ resolve(x);
+ return promiseCapability.promise;
+};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(73)))
/***/ }),
-/* 163 */
+/* 179 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+var strong = __webpack_require__(180);
+var validate = __webpack_require__(52);
+var MAP = 'Map';
-var implementation = __webpack_require__(527);
-
-module.exports = Function.prototype.bind || implementation;
+// 23.1 Map Objects
+module.exports = __webpack_require__(79)(MAP, function (get) {
+ return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key) {
+ var entry = strong.getEntry(validate(this, MAP), key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value) {
+ return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
+ }
+}, strong, true);
/***/ }),
-/* 164 */
+/* 180 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+var dP = __webpack_require__(11).f;
+var create = __webpack_require__(46);
+var redefineAll = __webpack_require__(51);
+var ctx = __webpack_require__(26);
+var anInstance = __webpack_require__(49);
+var forOf = __webpack_require__(50);
+var $iterDefine = __webpack_require__(105);
+var step = __webpack_require__(174);
+var setSpecies = __webpack_require__(48);
+var DESCRIPTORS = __webpack_require__(9);
+var fastKey = __webpack_require__(40).fastKey;
+var validate = __webpack_require__(52);
+var SIZE = DESCRIPTORS ? '_s' : 'size';
-var fnToStr = Function.prototype.toString;
-
-var constructorRegex = /^\s*class\b/;
-var isES6ClassFn = function isES6ClassFunction(value) {
- try {
- var fnStr = fnToStr.call(value);
- return constructorRegex.test(fnStr);
- } catch (e) {
- return false; // not a function
- }
+var getEntry = function (that, key) {
+ // fast case
+ var index = fastKey(key);
+ var entry;
+ if (index !== 'F') return that._i[index];
+ // frozen object case
+ for (entry = that._f; entry; entry = entry.n) {
+ if (entry.k == key) return entry;
+ }
};
-var tryFunctionObject = function tryFunctionToStr(value) {
- try {
- if (isES6ClassFn(value)) { return false; }
- fnToStr.call(value);
- return true;
- } catch (e) {
- return false;
- }
-};
-var toStr = Object.prototype.toString;
-var fnClass = '[object Function]';
-var genClass = '[object GeneratorFunction]';
-var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
+module.exports = {
+ getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
+ var C = wrapper(function (that, iterable) {
+ anInstance(that, C, NAME, '_i');
+ that._t = NAME; // collection type
+ that._i = create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
+ if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear() {
+ for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
+ entry.r = true;
+ if (entry.p) entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that._f = that._l = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function (key) {
+ var that = validate(this, NAME);
+ var entry = getEntry(that, key);
+ if (entry) {
+ var next = entry.n;
+ var prev = entry.p;
+ delete that._i[entry.i];
+ entry.r = true;
+ if (prev) prev.n = next;
+ if (next) next.p = prev;
+ if (that._f == entry) that._f = next;
+ if (that._l == entry) that._l = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /* , that = undefined */) {
+ validate(this, NAME);
+ var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
+ var entry;
+ while (entry = entry ? entry.n : this._f) {
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while (entry && entry.r) entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key) {
+ return !!getEntry(validate(this, NAME), key);
+ }
+ });
+ if (DESCRIPTORS) dP(C.prototype, 'size', {
+ get: function () {
+ return validate(this, NAME)[SIZE];
+ }
+ });
+ return C;
+ },
+ def: function (that, key, value) {
+ var entry = getEntry(that, key);
+ var prev, index;
+ // change existing entry
+ if (entry) {
+ entry.v = value;
+ // create new entry
+ } else {
+ that._l = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that._l, // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if (!that._f) that._f = entry;
+ if (prev) prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if (index !== 'F') that._i[index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ setStrong: function (C, NAME, IS_MAP) {
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ $iterDefine(C, NAME, function (iterated, kind) {
+ this._t = validate(iterated, NAME); // target
+ this._k = kind; // kind
+ this._l = undefined; // previous
+ }, function () {
+ var that = this;
+ var kind = that._k;
+ var entry = that._l;
+ // revert to the last existing entry
+ while (entry && entry.r) entry = entry.p;
+ // get next entry
+ if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
+ // or finish the iteration
+ that._t = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if (kind == 'keys') return step(0, entry.k);
+ if (kind == 'values') return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
-module.exports = function isCallable(value) {
- if (!value) { return false; }
- if (typeof value !== 'function' && typeof value !== 'object') { return false; }
- if (typeof value === 'function' && !value.prototype) { return true; }
- if (hasToStringTag) { return tryFunctionObject(value); }
- if (isES6ClassFn(value)) { return false; }
- var strClass = toStr.call(value);
- return strClass === fnClass || strClass === genClass;
+ // add [@@species], 23.1.2.2, 23.2.2.2
+ setSpecies(NAME);
+ }
};
/***/ }),
-/* 165 */
+/* 181 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLText, XMLWriterBase,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLDeclaration = __webpack_require__(101);
+"use strict";
- XMLDocType = __webpack_require__(102);
+var strong = __webpack_require__(180);
+var validate = __webpack_require__(52);
+var SET = 'Set';
- XMLCData = __webpack_require__(99);
+// 23.2 Set Objects
+module.exports = __webpack_require__(79)(SET, function (get) {
+ return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value) {
+ return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
+ }
+}, strong);
- XMLComment = __webpack_require__(100);
- XMLElement = __webpack_require__(98);
+/***/ }),
+/* 182 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLRaw = __webpack_require__(107);
+"use strict";
- XMLText = __webpack_require__(108);
+var global = __webpack_require__(4);
+var each = __webpack_require__(34)(0);
+var redefine = __webpack_require__(17);
+var meta = __webpack_require__(40);
+var assign = __webpack_require__(161);
+var weak = __webpack_require__(183);
+var isObject = __webpack_require__(6);
+var validate = __webpack_require__(52);
+var NATIVE_WEAK_MAP = __webpack_require__(52);
+var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
+var WEAK_MAP = 'WeakMap';
+var getWeak = meta.getWeak;
+var isExtensible = Object.isExtensible;
+var uncaughtFrozenStore = weak.ufstore;
+var InternalMap;
- XMLProcessingInstruction = __webpack_require__(109);
+var wrapper = function (get) {
+ return function WeakMap() {
+ return get(this, arguments.length > 0 ? arguments[0] : undefined);
+ };
+};
- XMLDTDAttList = __webpack_require__(103);
+var methods = {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key) {
+ if (isObject(key)) {
+ var data = getWeak(key);
+ if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
+ return data ? data[this._i] : undefined;
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value) {
+ return weak.def(validate(this, WEAK_MAP), key, value);
+ }
+};
- XMLDTDElement = __webpack_require__(105);
+// 23.3 WeakMap Objects
+var $WeakMap = module.exports = __webpack_require__(79)(WEAK_MAP, wrapper, methods, weak, true, true);
- XMLDTDEntity = __webpack_require__(104);
+// IE11 WeakMap frozen keys fix
+if (NATIVE_WEAK_MAP && IS_IE11) {
+ InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
+ assign(InternalMap.prototype, methods);
+ meta.NEED = true;
+ each(['delete', 'has', 'get', 'set'], function (key) {
+ var proto = $WeakMap.prototype;
+ var method = proto[key];
+ redefine(proto, key, function (a, b) {
+ // store frozen objects on internal weakmap shim
+ if (isObject(a) && !isExtensible(a)) {
+ if (!this._f) this._f = new InternalMap();
+ var result = this._f[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ });
+ });
+}
- XMLDTDNotation = __webpack_require__(106);
- XMLWriterBase = __webpack_require__(260);
+/***/ }),
+/* 183 */
+/***/ (function(module, exports, __webpack_require__) {
- module.exports = XMLStringWriter = (function(superClass) {
- extend(XMLStringWriter, superClass);
+"use strict";
- function XMLStringWriter(options) {
- XMLStringWriter.__super__.constructor.call(this, options);
- }
+var redefineAll = __webpack_require__(51);
+var getWeak = __webpack_require__(40).getWeak;
+var anObject = __webpack_require__(3);
+var isObject = __webpack_require__(6);
+var anInstance = __webpack_require__(49);
+var forOf = __webpack_require__(50);
+var createArrayMethod = __webpack_require__(34);
+var $has = __webpack_require__(19);
+var validate = __webpack_require__(52);
+var arrayFind = createArrayMethod(5);
+var arrayFindIndex = createArrayMethod(6);
+var id = 0;
- XMLStringWriter.prototype.document = function(doc) {
- var child, i, len, r, ref;
- this.textispresent = false;
- r = '';
- ref = doc.children;
- for (i = 0, len = ref.length; i < len; i++) {
- child = ref[i];
- r += (function() {
- switch (false) {
- case !(child instanceof XMLDeclaration):
- return this.declaration(child);
- case !(child instanceof XMLDocType):
- return this.docType(child);
- case !(child instanceof XMLComment):
- return this.comment(child);
- case !(child instanceof XMLProcessingInstruction):
- return this.processingInstruction(child);
- default:
- return this.element(child, 0);
- }
- }).call(this);
- }
- if (this.pretty && r.slice(-this.newline.length) === this.newline) {
- r = r.slice(0, -this.newline.length);
+// fallback for uncaught frozen keys
+var uncaughtFrozenStore = function (that) {
+ return that._l || (that._l = new UncaughtFrozenStore());
+};
+var UncaughtFrozenStore = function () {
+ this.a = [];
+};
+var findUncaughtFrozen = function (store, key) {
+ return arrayFind(store.a, function (it) {
+ return it[0] === key;
+ });
+};
+UncaughtFrozenStore.prototype = {
+ get: function (key) {
+ var entry = findUncaughtFrozen(this, key);
+ if (entry) return entry[1];
+ },
+ has: function (key) {
+ return !!findUncaughtFrozen(this, key);
+ },
+ set: function (key, value) {
+ var entry = findUncaughtFrozen(this, key);
+ if (entry) entry[1] = value;
+ else this.a.push([key, value]);
+ },
+ 'delete': function (key) {
+ var index = arrayFindIndex(this.a, function (it) {
+ return it[0] === key;
+ });
+ if (~index) this.a.splice(index, 1);
+ return !!~index;
+ }
+};
+
+module.exports = {
+ getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
+ var C = wrapper(function (that, iterable) {
+ anInstance(that, C, NAME, '_i');
+ that._t = NAME; // collection type
+ that._i = id++; // collection id
+ that._l = undefined; // leak store for uncaught frozen objects
+ if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function (key) {
+ if (!isObject(key)) return false;
+ var data = getWeak(key);
+ if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
+ return data && $has(data, this._i) && delete data[this._i];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key) {
+ if (!isObject(key)) return false;
+ var data = getWeak(key);
+ if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
+ return data && $has(data, this._i);
}
- return r;
- };
+ });
+ return C;
+ },
+ def: function (that, key, value) {
+ var data = getWeak(anObject(key), true);
+ if (data === true) uncaughtFrozenStore(that).set(key, value);
+ else data[that._i] = value;
+ return that;
+ },
+ ufstore: uncaughtFrozenStore
+};
- XMLStringWriter.prototype.attribute = function(att) {
- return ' ' + att.name + '="' + att.value + '"';
- };
- XMLStringWriter.prototype.cdata = function(node, level) {
- return this.space(level) + '' + this.newline;
- };
+/***/ }),
+/* 184 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLStringWriter.prototype.comment = function(node, level) {
- return this.space(level) + '' + this.newline;
- };
+// https://tc39.github.io/ecma262/#sec-toindex
+var toInteger = __webpack_require__(28);
+var toLength = __webpack_require__(8);
+module.exports = function (it) {
+ if (it === undefined) return 0;
+ var number = toInteger(it);
+ var length = toLength(number);
+ if (number !== length) throw RangeError('Wrong length!');
+ return length;
+};
- XMLStringWriter.prototype.declaration = function(node, level) {
- var r;
- r = this.space(level);
- r += '';
- r += this.newline;
- return r;
- };
- XMLStringWriter.prototype.docType = function(node, level) {
- var child, i, len, r, ref;
- level || (level = 0);
- r = this.space(level);
- r += ' 0) {
- r += ' [';
- r += this.newline;
- ref = node.children;
- for (i = 0, len = ref.length; i < len; i++) {
- child = ref[i];
- r += (function() {
- switch (false) {
- case !(child instanceof XMLDTDAttList):
- return this.dtdAttList(child, level + 1);
- case !(child instanceof XMLDTDElement):
- return this.dtdElement(child, level + 1);
- case !(child instanceof XMLDTDEntity):
- return this.dtdEntity(child, level + 1);
- case !(child instanceof XMLDTDNotation):
- return this.dtdNotation(child, level + 1);
- case !(child instanceof XMLCData):
- return this.cdata(child, level + 1);
- case !(child instanceof XMLComment):
- return this.comment(child, level + 1);
- case !(child instanceof XMLProcessingInstruction):
- return this.processingInstruction(child, level + 1);
- default:
- throw new Error("Unknown DTD node type: " + child.constructor.name);
- }
- }).call(this);
- }
- r += ']';
- }
- r += this.spacebeforeslash + '>';
- r += this.newline;
- return r;
- };
+/***/ }),
+/* 185 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLStringWriter.prototype.element = function(node, level) {
- var att, child, i, j, len, len1, name, r, ref, ref1, ref2, space, textispresentwasset;
- level || (level = 0);
- textispresentwasset = false;
- if (this.textispresent) {
- this.newline = '';
- this.pretty = false;
- } else {
- this.newline = this.newlinedefault;
- this.pretty = this.prettydefault;
- }
- space = this.space(level);
- r = '';
- r += space + '<' + node.name;
- ref = node.attributes;
- for (name in ref) {
- if (!hasProp.call(ref, name)) continue;
- att = ref[name];
- r += this.attribute(att);
- }
- if (node.children.length === 0 || node.children.every(function(e) {
- return e.value === '';
- })) {
- if (this.allowEmpty) {
- r += '>' + node.name + '>' + this.newline;
- } else {
- r += this.spacebeforeslash + '/>' + this.newline;
- }
- } else if (this.pretty && node.children.length === 1 && (node.children[0].value != null)) {
- r += '>';
- r += node.children[0].value;
- r += '' + node.name + '>' + this.newline;
- } else {
- if (this.dontprettytextnodes) {
- ref1 = node.children;
- for (i = 0, len = ref1.length; i < len; i++) {
- child = ref1[i];
- if (child.value != null) {
- this.textispresent++;
- textispresentwasset = true;
- break;
- }
- }
- }
- if (this.textispresent) {
- this.newline = '';
- this.pretty = false;
- space = this.space(level);
- }
- r += '>' + this.newline;
- ref2 = node.children;
- for (j = 0, len1 = ref2.length; j < len1; j++) {
- child = ref2[j];
- r += (function() {
- switch (false) {
- case !(child instanceof XMLCData):
- return this.cdata(child, level + 1);
- case !(child instanceof XMLComment):
- return this.comment(child, level + 1);
- case !(child instanceof XMLElement):
- return this.element(child, level + 1);
- case !(child instanceof XMLRaw):
- return this.raw(child, level + 1);
- case !(child instanceof XMLText):
- return this.text(child, level + 1);
- case !(child instanceof XMLProcessingInstruction):
- return this.processingInstruction(child, level + 1);
- default:
- throw new Error("Unknown XML node type: " + child.constructor.name);
- }
- }).call(this);
- }
- if (textispresentwasset) {
- this.textispresent--;
- }
- if (!this.textispresent) {
- this.newline = this.newlinedefault;
- this.pretty = this.prettydefault;
- }
- r += space + '' + node.name + '>' + this.newline;
- }
- return r;
- };
+// all object keys, includes non-enumerable and symbols
+var gOPN = __webpack_require__(47);
+var gOPS = __webpack_require__(71);
+var anObject = __webpack_require__(3);
+var Reflect = __webpack_require__(4).Reflect;
+module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
+ var keys = gOPN.f(anObject(it));
+ var getSymbols = gOPS.f;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+};
- XMLStringWriter.prototype.processingInstruction = function(node, level) {
- var r;
- r = this.space(level) + '' + node.target;
- if (node.value) {
- r += ' ' + node.value;
- }
- r += this.spacebeforeslash + '?>' + this.newline;
- return r;
- };
- XMLStringWriter.prototype.raw = function(node, level) {
- return this.space(level) + node.value + this.newline;
- };
+/***/ }),
+/* 186 */
+/***/ (function(module, exports, __webpack_require__) {
- XMLStringWriter.prototype.text = function(node, level) {
- return this.space(level) + node.value + this.newline;
- };
+"use strict";
- XMLStringWriter.prototype.dtdAttList = function(node, level) {
- var r;
- r = this.space(level) + '' + this.newline;
- return r;
- };
+// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
+var isArray = __webpack_require__(72);
+var isObject = __webpack_require__(6);
+var toLength = __webpack_require__(8);
+var ctx = __webpack_require__(26);
+var IS_CONCAT_SPREADABLE = __webpack_require__(7)('isConcatSpreadable');
- XMLStringWriter.prototype.dtdElement = function(node, level) {
- return this.space(level) + '' + this.newline;
- };
+function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
+ var targetIndex = start;
+ var sourceIndex = 0;
+ var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
+ var element, spreadable;
- XMLStringWriter.prototype.dtdEntity = function(node, level) {
- var r;
- r = this.space(level) + '' + this.newline;
- return r;
- };
+ while (sourceIndex < sourceLen) {
+ if (sourceIndex in source) {
+ element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
- XMLStringWriter.prototype.dtdNotation = function(node, level) {
- var r;
- r = this.space(level) + '' + this.newline;
- return r;
- };
- XMLStringWriter.prototype.openNode = function(node, level) {
- var att, name, r, ref;
- level || (level = 0);
- if (node instanceof XMLElement) {
- r = this.space(level) + '<' + node.name;
- ref = node.attributes;
- for (name in ref) {
- if (!hasProp.call(ref, name)) continue;
- att = ref[name];
- r += this.attribute(att);
- }
- r += (node.children ? '>' : '/>') + this.newline;
- return r;
+ if (spreadable && depth > 0) {
+ targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
} else {
- r = this.space(level) + '') + this.newline;
- return r;
- }
- };
-
- XMLStringWriter.prototype.closeNode = function(node, level) {
- level || (level = 0);
- switch (false) {
- case !(node instanceof XMLElement):
- return this.space(level) + '' + node.name + '>' + this.newline;
- case !(node instanceof XMLDocType):
- return this.space(level) + ']>' + this.newline;
+ if (targetIndex >= 0x1fffffffffffff) throw TypeError();
+ target[targetIndex] = element;
}
- };
-
- return XMLStringWriter;
-
- })(XMLWriterBase);
-
-}).call(this);
+ targetIndex++;
+ }
+ sourceIndex++;
+ }
+ return targetIndex;
+}
-/***/ }),
-/* 166 */
-/***/ (function(module) {
+module.exports = flattenIntoArray;
-module.exports = JSON.parse("[{\"type\":\"JSON (hash)\",\"description\":\"Json hash\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"JSON (array)\",\"description\":\"Json array\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonArray.mst\",\"fileExt\":\"json\"},{\"type\":\"XML\",\"description\":\"Plain XML format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"XML.mst\",\"fileExt\":\"xml\"},{\"type\":\"css (modern)\",\"description\":\"css format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Css.mst\",\"fileExt\":\"css\"},{\"type\":\"css (old)\",\"description\":\"old css format\",\"allowTrim\":false,\"allowRotation\":false,\"template\":\"OldCss.mst\",\"fileExt\":\"css\"},{\"type\":\"pixi.js\",\"description\":\"pixi.js format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"Godot (atlas)\",\"description\":\"Godot Atlas format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"GodotAtlas.mst\",\"fileExt\":\"tpsheet\"},{\"type\":\"Godot (tileset)\",\"description\":\"Godot Tileset format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"GodotTileset.mst\",\"fileExt\":\"tpset\"},{\"type\":\"Phaser (hash)\",\"description\":\"Phaser (json hash)\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonHash.mst\",\"fileExt\":\"json\"},{\"type\":\"Phaser (array)\",\"description\":\"Phaser (json array)\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"JsonArray.mst\",\"fileExt\":\"json\"},{\"type\":\"Phaser 3\",\"description\":\"Phaser 3\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Phaser3.mst\",\"fileExt\":\"json\"},{\"type\":\"Spine\",\"description\":\"Spine atlas\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Spine.mst\",\"fileExt\":\"atlas\"},{\"type\":\"cocos2d\",\"description\":\"cocos2d format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Cocos2d.mst\",\"fileExt\":\"plist\"},{\"type\":\"UnrealEngine\",\"description\":\"UnrealEngine - Paper2d\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Unreal.mst\",\"fileExt\":\"paper2dsprites\"},{\"type\":\"Starling\",\"description\":\"Starling format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"Starling.mst\",\"fileExt\":\"xml\"},{\"type\":\"UIKit\",\"description\":\"UIKit sprite sheet\",\"allowTrim\":true,\"allowRotation\":false,\"template\":\"UIKit.mst\",\"fileExt\":\"plist\",\"predefined\":true},{\"type\":\"Unity3D\",\"description\":\"Unity3D sprite sheet\",\"allowTrim\":true,\"allowRotation\":false,\"template\":\"Unity3D.mst\",\"fileExt\":\"tpsheet\",\"predefined\":true},{\"type\":\"Egret2D\",\"description\":\"Egret2D sprite sheet\",\"allowTrim\":false,\"allowRotation\":false,\"template\":\"Egret2D.mst\",\"fileExt\":\"json\",\"predefined\":true},{\"type\":\"custom\",\"description\":\"Custom format\",\"allowTrim\":true,\"allowRotation\":true,\"template\":\"\",\"fileExt\":\"\"}]");
/***/ }),
-/* 167 */
+/* 187 */
/***/ (function(module, exports, __webpack_require__) {
-// Generated by CoffeeScript 1.12.7
-(function() {
- "use strict";
- var builder, defaults, parser, processors,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- defaults = __webpack_require__(146);
-
- builder = __webpack_require__(507);
-
- parser = __webpack_require__(516);
-
- processors = __webpack_require__(238);
+// https://github.com/tc39/proposal-string-pad-start-end
+var toLength = __webpack_require__(8);
+var repeat = __webpack_require__(102);
+var defined = __webpack_require__(32);
- exports.defaults = defaults.defaults;
+module.exports = function (that, maxLength, fillString, left) {
+ var S = String(defined(that));
+ var stringLength = S.length;
+ var fillStr = fillString === undefined ? ' ' : String(fillString);
+ var intMaxLength = toLength(maxLength);
+ if (intMaxLength <= stringLength || fillStr == '') return S;
+ var fillLen = intMaxLength - stringLength;
+ var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
+ if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
+ return left ? stringFiller + S : S + stringFiller;
+};
- exports.processors = processors;
- exports.ValidationError = (function(superClass) {
- extend(ValidationError, superClass);
+/***/ }),
+/* 188 */
+/***/ (function(module, exports, __webpack_require__) {
- function ValidationError(message) {
- this.message = message;
+var DESCRIPTORS = __webpack_require__(9);
+var getKeys = __webpack_require__(44);
+var toIObject = __webpack_require__(20);
+var isEnum = __webpack_require__(64).f;
+module.exports = function (isEntries) {
+ return function (it) {
+ var O = toIObject(it);
+ var keys = getKeys(O);
+ var length = keys.length;
+ var i = 0;
+ var result = [];
+ var key;
+ while (length > i) {
+ key = keys[i++];
+ if (!DESCRIPTORS || isEnum.call(O, key)) {
+ result.push(isEntries ? [key, O[key]] : O[key]);
+ }
}
+ return result;
+ };
+};
- return ValidationError;
-
- })(Error);
-
- exports.Builder = builder.Builder;
-
- exports.Parser = parser.Parser;
-
- exports.parseString = parser.parseString;
- exports.parseStringPromise = parser.parseStringPromise;
+/***/ }),
+/* 189 */
+/***/ (function(module, exports, __webpack_require__) {
-}).call(this);
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var classof = __webpack_require__(56);
+var from = __webpack_require__(190);
+module.exports = function (NAME) {
+ return function toJSON() {
+ if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
+ return from(this);
+ };
+};
/***/ }),
-/* 168 */
+/* 190 */
/***/ (function(module, exports, __webpack_require__) {
-/**
- * Parser functions.
- */
-
-var parserFunctions = __webpack_require__(549);
-Object.keys(parserFunctions).forEach(function (k) { exports[k] = parserFunctions[k]; });
-
-/**
- * Builder functions.
- */
+var forOf = __webpack_require__(50);
-var builderFunctions = __webpack_require__(552);
-Object.keys(builderFunctions).forEach(function (k) { exports[k] = builderFunctions[k]; });
+module.exports = function (iter, ITERATOR) {
+ var result = [];
+ forOf(iter, false, result.push, result, ITERATOR);
+ return result;
+};
/***/ }),
-/* 169 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 191 */
+/***/ (function(module, exports) {
-module.exports = !__webpack_require__(9) && !__webpack_require__(5)(function () {
- return Object.defineProperty(__webpack_require__(112)('div'), 'a', { get: function () { return 7; } }).a != 7;
-});
+// https://rwaldron.github.io/proposal-math-extensions/
+module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
+ if (
+ arguments.length === 0
+ // eslint-disable-next-line no-self-compare
+ || x != x
+ // eslint-disable-next-line no-self-compare
+ || inLow != inLow
+ // eslint-disable-next-line no-self-compare
+ || inHigh != inHigh
+ // eslint-disable-next-line no-self-compare
+ || outLow != outLow
+ // eslint-disable-next-line no-self-compare
+ || outHigh != outHigh
+ ) return NaN;
+ if (x === Infinity || x === -Infinity) return x;
+ return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
+};
/***/ }),
-/* 170 */
+/* 192 */
/***/ (function(module, exports, __webpack_require__) {
-exports.f = __webpack_require__(7);
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
-/***/ }),
-/* 171 */
-/***/ (function(module, exports, __webpack_require__) {
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-var has = __webpack_require__(21);
-var toIObject = __webpack_require__(22);
-var arrayIndexOf = __webpack_require__(77)(false);
-var IE_PROTO = __webpack_require__(114)('IE_PROTO');
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
-module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
-};
+ return Object(val);
+}
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
-/***/ }),
-/* 172 */
-/***/ (function(module, exports, __webpack_require__) {
+ // Detect buggy property enumeration order in older V8 versions.
-var dP = __webpack_require__(12);
-var anObject = __webpack_require__(3);
-var getKeys = __webpack_require__(49);
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
-module.exports = __webpack_require__(9) ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
-};
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
-/***/ }),
-/* 173 */
-/***/ (function(module, exports, __webpack_require__) {
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
-// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var toIObject = __webpack_require__(22);
-var gOPN = __webpack_require__(52).f;
-var toString = {}.toString;
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
-var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
-var getWindowNames = function (it) {
- try {
- return gOPN(it);
- } catch (e) {
- return windowNames.slice();
- }
-};
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
-module.exports.f = function getOwnPropertyNames(it) {
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
};
/***/ }),
-/* 174 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 193 */
+/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
"use strict";
-
-// 19.1.2.1 Object.assign(target, source, ...)
-var DESCRIPTORS = __webpack_require__(9);
-var getKeys = __webpack_require__(49);
-var gOPS = __webpack_require__(78);
-var pIE = __webpack_require__(70);
-var toObject = __webpack_require__(13);
-var IObject = __webpack_require__(69);
-var $assign = Object.assign;
-
-// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || __webpack_require__(5)(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
-}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) {
- key = keys[j++];
- if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bin", function() { return Bin; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaxRectsBin", function() { return MaxRectsBin; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaxRectsPacker", function() { return MaxRectsPacker; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OversizedElementBin", function() { return OversizedElementBin; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKING_LOGIC", function() { return PACKING_LOGIC; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return Rectangle; });
+class Rectangle {
+ /**
+ * Creates an instance of Rectangle.
+ *
+ * @param {number} [width=0]
+ * @param {number} [height=0]
+ * @param {number} [x=0]
+ * @param {number} [y=0]
+ * @param {boolean} [rot=false]
+ * @param {boolean} [allowRotation=false]
+ * @memberof Rectangle
+ */
+ constructor(width = 0, height = 0, x = 0, y = 0, rot = false, allowRotation = undefined) {
+ /**
+ * Oversized tag on rectangle which is bigger than packer itself.
+ *
+ * @type {boolean}
+ * @memberof Rectangle
+ */
+ this.oversized = false;
+ this._rot = false;
+ this._allowRotation = undefined;
+ this._dirty = 0;
+ this._width = width;
+ this._height = height;
+ this._x = x;
+ this._y = y;
+ this._data = {};
+ this._rot = rot;
+ this._allowRotation = allowRotation;
}
- } return T;
-} : $assign;
-
-
-/***/ }),
-/* 175 */
-/***/ (function(module, exports) {
-
-// 7.2.9 SameValue(x, y)
-module.exports = Object.is || function is(x, y) {
- // eslint-disable-next-line no-self-compare
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
-};
-
-
-/***/ }),
-/* 176 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var aFunction = __webpack_require__(15);
-var isObject = __webpack_require__(6);
-var invoke = __webpack_require__(177);
-var arraySlice = [].slice;
-var factories = {};
-
-var construct = function (F, len, args) {
- if (!(len in factories)) {
- for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
- // eslint-disable-next-line no-new-func
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
-};
-
-module.exports = Function.bind || function bind(that /* , ...args */) {
- var fn = aFunction(this);
- var partArgs = arraySlice.call(arguments, 1);
- var bound = function (/* args... */) {
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
- };
- if (isObject(fn.prototype)) bound.prototype = fn.prototype;
- return bound;
-};
-
-
-/***/ }),
-/* 177 */
-/***/ (function(module, exports) {
-
-// fast apply, http://jsperf.lnkit.com/fast-apply/5
-module.exports = function (fn, args, that) {
- var un = that === undefined;
- switch (args.length) {
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
-};
-
-
-/***/ }),
-/* 178 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $parseInt = __webpack_require__(4).parseInt;
-var $trim = __webpack_require__(61).trim;
-var ws = __webpack_require__(118);
-var hex = /^[-+]?0[xX]/;
-
-module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
-} : $parseInt;
-
-
-/***/ }),
-/* 179 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $parseFloat = __webpack_require__(4).parseFloat;
-var $trim = __webpack_require__(61).trim;
-
-module.exports = 1 / $parseFloat(__webpack_require__(118) + '-0') !== -Infinity ? function parseFloat(str) {
- var string = $trim(String(str), 3);
- var result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
-} : $parseFloat;
-
-
-/***/ }),
-/* 180 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var cof = __webpack_require__(30);
-module.exports = function (it, msg) {
- if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
- return +it;
-};
-
-
-/***/ }),
-/* 181 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.3 Number.isInteger(number)
-var isObject = __webpack_require__(6);
-var floor = Math.floor;
-module.exports = function isInteger(it) {
- return !isObject(it) && isFinite(it) && floor(it) === it;
-};
-
-
-/***/ }),
-/* 182 */
-/***/ (function(module, exports) {
-
-// 20.2.2.20 Math.log1p(x)
-module.exports = Math.log1p || function log1p(x) {
- return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
-};
-
-
-/***/ }),
-/* 183 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.16 Math.fround(x)
-var sign = __webpack_require__(121);
-var pow = Math.pow;
-var EPSILON = pow(2, -52);
-var EPSILON32 = pow(2, -23);
-var MAX32 = pow(2, 127) * (2 - EPSILON32);
-var MIN32 = pow(2, -126);
-
-var roundTiesToEven = function (n) {
- return n + 1 / EPSILON - 1 / EPSILON;
-};
-
-module.exports = Math.fround || function fround(x) {
- var $abs = Math.abs(x);
- var $sign = sign(x);
- var a, result;
- if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
- a = (1 + EPSILON32 / EPSILON) * $abs;
- result = a - (a - $abs);
- // eslint-disable-next-line no-self-compare
- if (result > MAX32 || result != result) return $sign * Infinity;
- return $sign * result;
-};
-
-
-/***/ }),
-/* 184 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// call something on iterator step with safe closing on error
-var anObject = __webpack_require__(3);
-module.exports = function (iterator, fn, value, entries) {
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch (e) {
- var ret = iterator['return'];
- if (ret !== undefined) anObject(ret.call(iterator));
- throw e;
- }
-};
-
-
-/***/ }),
-/* 185 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var aFunction = __webpack_require__(15);
-var toObject = __webpack_require__(13);
-var IObject = __webpack_require__(69);
-var toLength = __webpack_require__(8);
-
-module.exports = function (that, callbackfn, aLen, memo, isRight) {
- aFunction(callbackfn);
- var O = toObject(that);
- var self = IObject(O);
- var length = toLength(O.length);
- var index = isRight ? length - 1 : 0;
- var i = isRight ? -1 : 1;
- if (aLen < 2) for (;;) {
- if (index in self) {
- memo = self[index];
- index += i;
- break;
+ /**
+ * Test if two given rectangle collide each other
+ *
+ * @static
+ * @param {IRectangle} first
+ * @param {IRectangle} second
+ * @returns
+ * @memberof Rectangle
+ */
+ static Collide(first, second) { return first.collide(second); }
+ /**
+ * Test if the first rectangle contains the second one
+ *
+ * @static
+ * @param {IRectangle} first
+ * @param {IRectangle} second
+ * @returns
+ * @memberof Rectangle
+ */
+ static Contain(first, second) { return first.contain(second); }
+ /**
+ * Get the area (w * h) of the rectangle
+ *
+ * @returns {number}
+ * @memberof Rectangle
+ */
+ area() { return this.width * this.height; }
+ /**
+ * Test if the given rectangle collide with this rectangle.
+ *
+ * @param {IRectangle} rect
+ * @returns {boolean}
+ * @memberof Rectangle
+ */
+ collide(rect) {
+ return (rect.x < this.x + this.width &&
+ rect.x + rect.width > this.x &&
+ rect.y < this.y + this.height &&
+ rect.y + rect.height > this.y);
}
- index += i;
- if (isRight ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
+ /**
+ * Test if this rectangle contains the given rectangle.
+ *
+ * @param {IRectangle} rect
+ * @returns {boolean}
+ * @memberof Rectangle
+ */
+ contain(rect) {
+ return (rect.x >= this.x && rect.y >= this.y &&
+ rect.x + rect.width <= this.x + this.width && rect.y + rect.height <= this.y + this.height);
}
- }
- for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
-};
-
-
-/***/ }),
-/* 186 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-
-var toObject = __webpack_require__(13);
-var toAbsoluteIndex = __webpack_require__(50);
-var toLength = __webpack_require__(8);
-
-module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
- var O = toObject(this);
- var len = toLength(O.length);
- var to = toAbsoluteIndex(target, len);
- var from = toAbsoluteIndex(start, len);
- var end = arguments.length > 2 ? arguments[2] : undefined;
- var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
- var inc = 1;
- if (from < to && to < from + count) {
- inc = -1;
- from += count - 1;
- to += count - 1;
- }
- while (count-- > 0) {
- if (from in O) O[to] = O[from];
- else delete O[to];
- to += inc;
- from += inc;
- } return O;
-};
-
-
-/***/ }),
-/* 187 */
-/***/ (function(module, exports) {
-
-module.exports = function (done, value) {
- return { value: value, done: !!done };
-};
-
-
-/***/ }),
-/* 188 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var regexpExec = __webpack_require__(133);
-__webpack_require__(1)({
- target: 'RegExp',
- proto: true,
- forced: regexpExec !== /./.exec
-}, {
- exec: regexpExec
-});
-
-
-/***/ }),
-/* 189 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 21.2.5.3 get RegExp.prototype.flags()
-if (__webpack_require__(9) && /./g.flags != 'g') __webpack_require__(12).f(RegExp.prototype, 'flags', {
- configurable: true,
- get: __webpack_require__(71)
-});
-
-
-/***/ }),
-/* 190 */
-/***/ (function(module, exports) {
-
-module.exports = function (exec) {
- try {
- return { e: false, v: exec() };
- } catch (e) {
- return { e: true, v: e };
- }
-};
-
-
-/***/ }),
-/* 191 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var anObject = __webpack_require__(3);
-var isObject = __webpack_require__(6);
-var newPromiseCapability = __webpack_require__(137);
+ get width() { return this._width; }
+ set width(value) {
+ if (value === this._width)
+ return;
+ this._width = value;
+ this._dirty++;
+ }
+ get height() { return this._height; }
+ set height(value) {
+ if (value === this._height)
+ return;
+ this._height = value;
+ this._dirty++;
+ }
+ get x() { return this._x; }
+ set x(value) {
+ if (value === this._x)
+ return;
+ this._x = value;
+ this._dirty++;
+ }
+ get y() { return this._y; }
+ set y(value) {
+ if (value === this._y)
+ return;
+ this._y = value;
+ this._dirty++;
+ }
+ /**
+ * If the rectangle is rotated
+ *
+ * @type {boolean}
+ * @memberof Rectangle
+ */
+ get rot() { return this._rot; }
+ /**
+ * Set the rotate tag of the rectangle.
+ *
+ * note: after `rot` is set, `width/height` of this rectangle is swaped.
+ *
+ * @memberof Rectangle
+ */
+ set rot(value) {
+ if (this._allowRotation === false)
+ return;
+ if (this._rot !== value) {
+ const tmp = this.width;
+ this.width = this.height;
+ this.height = tmp;
+ this._rot = value;
+ this._dirty++;
+ }
+ }
+ /**
+ * If the rectangle allow rotation
+ *
+ * @type {boolean}
+ * @memberof Rectangle
+ */
+ get allowRotation() { return this._allowRotation; }
+ /**
+ * Set the allowRotation tag of the rectangle.
+ *
+ * @memberof Rectangle
+ */
+ set allowRotation(value) {
+ if (this._allowRotation !== value) {
+ this._allowRotation = value;
+ this._dirty++;
+ }
+ }
+ get data() { return this._data; }
+ set data(value) {
+ if (value === null || value === this._data)
+ return;
+ this._data = value;
+ // extract allowRotation settings
+ if (typeof value === "object" && value.hasOwnProperty("allowRotation")) {
+ this._allowRotation = value.allowRotation;
+ }
+ this._dirty++;
+ }
+ get dirty() { return this._dirty > 0; }
+ setDirty(value = true) { this._dirty = value ? this._dirty + 1 : 0; }
+}
-module.exports = function (C, x) {
- anObject(C);
- if (isObject(x) && x.constructor === C) return x;
- var promiseCapability = newPromiseCapability.f(C);
- var resolve = promiseCapability.resolve;
- resolve(x);
- return promiseCapability.promise;
-};
+class Bin {
+ constructor() {
+ this._dirty = 0;
+ }
+ get dirty() { return this._dirty > 0 || this.rects.some(rect => rect.dirty); }
+ /**
+ * Set bin dirty status
+ *
+ * @memberof Bin
+ */
+ setDirty(value = true) {
+ this._dirty = value ? this._dirty + 1 : 0;
+ if (!value) {
+ for (let rect of this.rects) {
+ if (rect.setDirty)
+ rect.setDirty(false);
+ }
+ }
+ }
+}
-
-/***/ }),
-/* 192 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var strong = __webpack_require__(193);
-var validate = __webpack_require__(57);
-var MAP = 'Map';
-
-// 23.1 Map Objects
-module.exports = __webpack_require__(86)(MAP, function (get) {
- return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
-}, {
- // 23.1.3.6 Map.prototype.get(key)
- get: function get(key) {
- var entry = strong.getEntry(validate(this, MAP), key);
- return entry && entry.v;
- },
- // 23.1.3.9 Map.prototype.set(key, value)
- set: function set(key, value) {
- return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
- }
-}, strong, true);
-
-
-/***/ }),
-/* 193 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var dP = __webpack_require__(12).f;
-var create = __webpack_require__(51);
-var redefineAll = __webpack_require__(56);
-var ctx = __webpack_require__(29);
-var anInstance = __webpack_require__(54);
-var forOf = __webpack_require__(55);
-var $iterDefine = __webpack_require__(123);
-var step = __webpack_require__(187);
-var setSpecies = __webpack_require__(53);
-var DESCRIPTORS = __webpack_require__(9);
-var fastKey = __webpack_require__(41).fastKey;
-var validate = __webpack_require__(57);
-var SIZE = DESCRIPTORS ? '_s' : 'size';
-
-var getEntry = function (that, key) {
- // fast case
- var index = fastKey(key);
- var entry;
- if (index !== 'F') return that._i[index];
- // frozen object case
- for (entry = that._f; entry; entry = entry.n) {
- if (entry.k == key) return entry;
- }
-};
-
-module.exports = {
- getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, NAME, '_i');
- that._t = NAME; // collection type
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
- if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.1.3.1 Map.prototype.clear()
- // 23.2.3.2 Set.prototype.clear()
- clear: function clear() {
- for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
- entry.r = true;
- if (entry.p) entry.p = entry.p.n = undefined;
- delete data[entry.i];
+class MaxRectsBin extends Bin {
+ constructor(maxWidth = EDGE_MAX_VALUE, maxHeight = EDGE_MAX_VALUE, padding = 0, options = {}) {
+ super();
+ this.maxWidth = maxWidth;
+ this.maxHeight = maxHeight;
+ this.padding = padding;
+ this.freeRects = [];
+ this.rects = [];
+ this.verticalExpand = false;
+ this.options = {
+ smart: true,
+ pot: true,
+ square: true,
+ allowRotation: false,
+ tag: false,
+ exclusiveTag: true,
+ border: 0,
+ logic: PACKING_LOGIC.MAX_EDGE
+ };
+ this.options = Object.assign(Object.assign({}, this.options), options);
+ this.width = this.options.smart ? 0 : maxWidth;
+ this.height = this.options.smart ? 0 : maxHeight;
+ this.border = this.options.border ? this.options.border : 0;
+ this.freeRects.push(new Rectangle(this.maxWidth + this.padding - this.border * 2, this.maxHeight + this.padding - this.border * 2, this.border, this.border));
+ this.stage = new Rectangle(this.width, this.height);
+ }
+ add(...args) {
+ let data;
+ let rect;
+ if (args.length === 1) {
+ if (typeof args[0] !== 'object')
+ throw new Error("MacrectsBin.add(): Wrong parameters");
+ rect = args[0];
+ // Check if rect.tag match bin.tag, if bin.tag not defined, it will accept any rect
+ let tag = (rect.data && rect.data.tag) ? rect.data.tag : rect.tag ? rect.tag : undefined;
+ if (this.options.tag && this.options.exclusiveTag && this.tag !== tag)
+ return undefined;
}
- that._f = that._l = undefined;
- that[SIZE] = 0;
- },
- // 23.1.3.3 Map.prototype.delete(key)
- // 23.2.3.4 Set.prototype.delete(value)
- 'delete': function (key) {
- var that = validate(this, NAME);
- var entry = getEntry(that, key);
- if (entry) {
- var next = entry.n;
- var prev = entry.p;
- delete that._i[entry.i];
- entry.r = true;
- if (prev) prev.n = next;
- if (next) next.p = prev;
- if (that._f == entry) that._f = next;
- if (that._l == entry) that._l = prev;
- that[SIZE]--;
- } return !!entry;
- },
- // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
- // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
- forEach: function forEach(callbackfn /* , that = undefined */) {
- validate(this, NAME);
- var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
- var entry;
- while (entry = entry ? entry.n : this._f) {
- f(entry.v, entry.k, this);
- // revert to the last existing entry
- while (entry && entry.r) entry = entry.p;
+ else {
+ data = args.length > 2 ? args[2] : null;
+ // Check if data.tag match bin.tag, if bin.tag not defined, it will accept any rect
+ if (this.options.tag && this.options.exclusiveTag) {
+ if (data && this.tag !== data.tag)
+ return undefined;
+ if (!data && this.tag)
+ return undefined;
+ }
+ rect = new Rectangle(args[0], args[1]);
+ rect.data = data;
+ rect.setDirty(false);
}
- },
- // 23.1.3.7 Map.prototype.has(key)
- // 23.2.3.7 Set.prototype.has(value)
- has: function has(key) {
- return !!getEntry(validate(this, NAME), key);
- }
- });
- if (DESCRIPTORS) dP(C.prototype, 'size', {
- get: function () {
- return validate(this, NAME)[SIZE];
- }
- });
- return C;
- },
- def: function (that, key, value) {
- var entry = getEntry(that, key);
- var prev, index;
- // change existing entry
- if (entry) {
- entry.v = value;
- // create new entry
- } else {
- that._l = entry = {
- i: index = fastKey(key, true), // <- index
- k: key, // <- key
- v: value, // <- value
- p: prev = that._l, // <- previous entry
- n: undefined, // <- next entry
- r: false // <- removed
- };
- if (!that._f) that._f = entry;
- if (prev) prev.n = entry;
- that[SIZE]++;
- // add to index
- if (index !== 'F') that._i[index] = entry;
- } return that;
- },
- getEntry: getEntry,
- setStrong: function (C, NAME, IS_MAP) {
- // add .keys, .values, .entries, [@@iterator]
- // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
- $iterDefine(C, NAME, function (iterated, kind) {
- this._t = validate(iterated, NAME); // target
- this._k = kind; // kind
- this._l = undefined; // previous
- }, function () {
- var that = this;
- var kind = that._k;
- var entry = that._l;
- // revert to the last existing entry
- while (entry && entry.r) entry = entry.p;
- // get next entry
- if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
- // or finish the iteration
- that._t = undefined;
- return step(1);
- }
- // return step by kind
- if (kind == 'keys') return step(0, entry.k);
- if (kind == 'values') return step(0, entry.v);
- return step(0, [entry.k, entry.v]);
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
-
- // add [@@species], 23.1.2.2, 23.2.2.2
- setSpecies(NAME);
- }
-};
-
-
-/***/ }),
-/* 194 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var strong = __webpack_require__(193);
-var validate = __webpack_require__(57);
-var SET = 'Set';
-
-// 23.2 Set Objects
-module.exports = __webpack_require__(86)(SET, function (get) {
- return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
-}, {
- // 23.2.3.1 Set.prototype.add(value)
- add: function add(value) {
- return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
- }
-}, strong);
-
-
-/***/ }),
-/* 195 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var global = __webpack_require__(4);
-var each = __webpack_require__(36)(0);
-var redefine = __webpack_require__(18);
-var meta = __webpack_require__(41);
-var assign = __webpack_require__(174);
-var weak = __webpack_require__(196);
-var isObject = __webpack_require__(6);
-var validate = __webpack_require__(57);
-var NATIVE_WEAK_MAP = __webpack_require__(57);
-var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
-var WEAK_MAP = 'WeakMap';
-var getWeak = meta.getWeak;
-var isExtensible = Object.isExtensible;
-var uncaughtFrozenStore = weak.ufstore;
-var InternalMap;
-
-var wrapper = function (get) {
- return function WeakMap() {
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
-};
-
-var methods = {
- // 23.3.3.3 WeakMap.prototype.get(key)
- get: function get(key) {
- if (isObject(key)) {
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
- return data ? data[this._i] : undefined;
- }
- },
- // 23.3.3.5 WeakMap.prototype.set(key, value)
- set: function set(key, value) {
- return weak.def(validate(this, WEAK_MAP), key, value);
- }
-};
-
-// 23.3 WeakMap Objects
-var $WeakMap = module.exports = __webpack_require__(86)(WEAK_MAP, wrapper, methods, weak, true, true);
-
-// IE11 WeakMap frozen keys fix
-if (NATIVE_WEAK_MAP && IS_IE11) {
- InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function (key) {
- var proto = $WeakMap.prototype;
- var method = proto[key];
- redefine(proto, key, function (a, b) {
- // store frozen objects on internal weakmap shim
- if (isObject(a) && !isExtensible(a)) {
- if (!this._f) this._f = new InternalMap();
- var result = this._f[key](a, b);
- return key == 'set' ? this : result;
- // store all the rest on native weakmap
- } return method.call(this, a, b);
- });
- });
-}
-
-
-/***/ }),
-/* 196 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var redefineAll = __webpack_require__(56);
-var getWeak = __webpack_require__(41).getWeak;
-var anObject = __webpack_require__(3);
-var isObject = __webpack_require__(6);
-var anInstance = __webpack_require__(54);
-var forOf = __webpack_require__(55);
-var createArrayMethod = __webpack_require__(36);
-var $has = __webpack_require__(21);
-var validate = __webpack_require__(57);
-var arrayFind = createArrayMethod(5);
-var arrayFindIndex = createArrayMethod(6);
-var id = 0;
-
-// fallback for uncaught frozen keys
-var uncaughtFrozenStore = function (that) {
- return that._l || (that._l = new UncaughtFrozenStore());
-};
-var UncaughtFrozenStore = function () {
- this.a = [];
-};
-var findUncaughtFrozen = function (store, key) {
- return arrayFind(store.a, function (it) {
- return it[0] === key;
- });
-};
-UncaughtFrozenStore.prototype = {
- get: function (key) {
- var entry = findUncaughtFrozen(this, key);
- if (entry) return entry[1];
- },
- has: function (key) {
- return !!findUncaughtFrozen(this, key);
- },
- set: function (key, value) {
- var entry = findUncaughtFrozen(this, key);
- if (entry) entry[1] = value;
- else this.a.push([key, value]);
- },
- 'delete': function (key) {
- var index = arrayFindIndex(this.a, function (it) {
- return it[0] === key;
- });
- if (~index) this.a.splice(index, 1);
- return !!~index;
- }
-};
-
-module.exports = {
- getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, NAME, '_i');
- that._t = NAME; // collection type
- that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
- if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.3.3.2 WeakMap.prototype.delete(key)
- // 23.4.3.3 WeakSet.prototype.delete(value)
- 'delete': function (key) {
- if (!isObject(key)) return false;
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
- },
- // 23.3.3.4 WeakMap.prototype.has(key)
- // 23.4.3.4 WeakSet.prototype.has(value)
- has: function has(key) {
- if (!isObject(key)) return false;
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
- return data && $has(data, this._i);
- }
- });
- return C;
- },
- def: function (that, key, value) {
- var data = getWeak(anObject(key), true);
- if (data === true) uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
- },
- ufstore: uncaughtFrozenStore
-};
-
-
-/***/ }),
-/* 197 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// https://tc39.github.io/ecma262/#sec-toindex
-var toInteger = __webpack_require__(31);
-var toLength = __webpack_require__(8);
-module.exports = function (it) {
- if (it === undefined) return 0;
- var number = toInteger(it);
- var length = toLength(number);
- if (number !== length) throw RangeError('Wrong length!');
- return length;
-};
-
-
-/***/ }),
-/* 198 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// all object keys, includes non-enumerable and symbols
-var gOPN = __webpack_require__(52);
-var gOPS = __webpack_require__(78);
-var anObject = __webpack_require__(3);
-var Reflect = __webpack_require__(4).Reflect;
-module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
- var keys = gOPN.f(anObject(it));
- var getSymbols = gOPS.f;
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
-};
-
-
-/***/ }),
-/* 199 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
-var isArray = __webpack_require__(79);
-var isObject = __webpack_require__(6);
-var toLength = __webpack_require__(8);
-var ctx = __webpack_require__(29);
-var IS_CONCAT_SPREADABLE = __webpack_require__(7)('isConcatSpreadable');
-
-function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
- var targetIndex = start;
- var sourceIndex = 0;
- var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
- var element, spreadable;
-
- while (sourceIndex < sourceLen) {
- if (sourceIndex in source) {
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
-
- spreadable = false;
- if (isObject(element)) {
- spreadable = element[IS_CONCAT_SPREADABLE];
- spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
- }
-
- if (spreadable && depth > 0) {
- targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
- } else {
- if (targetIndex >= 0x1fffffffffffff) throw TypeError();
- target[targetIndex] = element;
- }
-
- targetIndex++;
+ const result = this.place(rect);
+ if (result)
+ this.rects.push(result);
+ return result;
}
- sourceIndex++;
- }
- return targetIndex;
-}
-
-module.exports = flattenIntoArray;
-
-
-/***/ }),
-/* 200 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// https://github.com/tc39/proposal-string-pad-start-end
-var toLength = __webpack_require__(8);
-var repeat = __webpack_require__(120);
-var defined = __webpack_require__(34);
-
-module.exports = function (that, maxLength, fillString, left) {
- var S = String(defined(that));
- var stringLength = S.length;
- var fillStr = fillString === undefined ? ' ' : String(fillString);
- var intMaxLength = toLength(maxLength);
- if (intMaxLength <= stringLength || fillStr == '') return S;
- var fillLen = intMaxLength - stringLength;
- var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
- if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
- return left ? stringFiller + S : S + stringFiller;
-};
-
-
-/***/ }),
-/* 201 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var DESCRIPTORS = __webpack_require__(9);
-var getKeys = __webpack_require__(49);
-var toIObject = __webpack_require__(22);
-var isEnum = __webpack_require__(70).f;
-module.exports = function (isEntries) {
- return function (it) {
- var O = toIObject(it);
- var keys = getKeys(O);
- var length = keys.length;
- var i = 0;
- var result = [];
- var key;
- while (length > i) {
- key = keys[i++];
- if (!DESCRIPTORS || isEnum.call(O, key)) {
- result.push(isEntries ? [key, O[key]] : O[key]);
- }
- }
- return result;
- };
-};
-
-
-/***/ }),
-/* 202 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var classof = __webpack_require__(60);
-var from = __webpack_require__(203);
-module.exports = function (NAME) {
- return function toJSON() {
- if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
- };
-};
-
-
-/***/ }),
-/* 203 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var forOf = __webpack_require__(55);
-
-module.exports = function (iter, ITERATOR) {
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
-};
-
-
-/***/ }),
-/* 204 */
-/***/ (function(module, exports) {
-
-// https://rwaldron.github.io/proposal-math-extensions/
-module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
- if (
- arguments.length === 0
- // eslint-disable-next-line no-self-compare
- || x != x
- // eslint-disable-next-line no-self-compare
- || inLow != inLow
- // eslint-disable-next-line no-self-compare
- || inHigh != inHigh
- // eslint-disable-next-line no-self-compare
- || outLow != outLow
- // eslint-disable-next-line no-self-compare
- || outHigh != outHigh
- ) return NaN;
- if (x === Infinity || x === -Infinity) return x;
- return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
-};
-
-
-/***/ }),
-/* 205 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
-
-
-/***/ }),
-/* 206 */
-/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bin", function() { return Bin; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaxRectsBin", function() { return MaxRectsBin; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaxRectsPacker", function() { return MaxRectsPacker; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OversizedElementBin", function() { return OversizedElementBin; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKING_LOGIC", function() { return PACKING_LOGIC; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return Rectangle; });
-class Rectangle {
- /**
- * Creates an instance of Rectangle.
- *
- * @param {number} [width=0]
- * @param {number} [height=0]
- * @param {number} [x=0]
- * @param {number} [y=0]
- * @param {boolean} [rot=false]
- * @param {boolean} [allowRotation=false]
- * @memberof Rectangle
- */
- constructor(width = 0, height = 0, x = 0, y = 0, rot = false, allowRotation = undefined) {
- /**
- * Oversized tag on rectangle which is bigger than packer itself.
- *
- * @type {boolean}
- * @memberof Rectangle
- */
- this.oversized = false;
- this._rot = false;
- this._allowRotation = undefined;
- this._dirty = 0;
- this._width = width;
- this._height = height;
- this._x = x;
- this._y = y;
- this._data = {};
- this._rot = rot;
- this._allowRotation = allowRotation;
- }
- /**
- * Test if two given rectangle collide each other
- *
- * @static
- * @param {IRectangle} first
- * @param {IRectangle} second
- * @returns
- * @memberof Rectangle
- */
- static Collide(first, second) { return first.collide(second); }
- /**
- * Test if the first rectangle contains the second one
- *
- * @static
- * @param {IRectangle} first
- * @param {IRectangle} second
- * @returns
- * @memberof Rectangle
- */
- static Contain(first, second) { return first.contain(second); }
- /**
- * Get the area (w * h) of the rectangle
- *
- * @returns {number}
- * @memberof Rectangle
- */
- area() { return this.width * this.height; }
- /**
- * Test if the given rectangle collide with this rectangle.
- *
- * @param {IRectangle} rect
- * @returns {boolean}
- * @memberof Rectangle
- */
- collide(rect) {
- return (rect.x < this.x + this.width &&
- rect.x + rect.width > this.x &&
- rect.y < this.y + this.height &&
- rect.y + rect.height > this.y);
- }
- /**
- * Test if this rectangle contains the given rectangle.
- *
- * @param {IRectangle} rect
- * @returns {boolean}
- * @memberof Rectangle
- */
- contain(rect) {
- return (rect.x >= this.x && rect.y >= this.y &&
- rect.x + rect.width <= this.x + this.width && rect.y + rect.height <= this.y + this.height);
- }
- get width() { return this._width; }
- set width(value) {
- if (value === this._width)
- return;
- this._width = value;
- this._dirty++;
- }
- get height() { return this._height; }
- set height(value) {
- if (value === this._height)
- return;
- this._height = value;
- this._dirty++;
- }
- get x() { return this._x; }
- set x(value) {
- if (value === this._x)
- return;
- this._x = value;
- this._dirty++;
- }
- get y() { return this._y; }
- set y(value) {
- if (value === this._y)
- return;
- this._y = value;
- this._dirty++;
- }
- /**
- * If the rectangle is rotated
- *
- * @type {boolean}
- * @memberof Rectangle
- */
- get rot() { return this._rot; }
- /**
- * Set the rotate tag of the rectangle.
- *
- * note: after `rot` is set, `width/height` of this rectangle is swaped.
- *
- * @memberof Rectangle
- */
- set rot(value) {
- if (this._allowRotation === false)
- return;
- if (this._rot !== value) {
- const tmp = this.width;
- this.width = this.height;
- this.height = tmp;
- this._rot = value;
- this._dirty++;
- }
- }
- /**
- * If the rectangle allow rotation
- *
- * @type {boolean}
- * @memberof Rectangle
- */
- get allowRotation() { return this._allowRotation; }
- /**
- * Set the allowRotation tag of the rectangle.
- *
- * @memberof Rectangle
- */
- set allowRotation(value) {
- if (this._allowRotation !== value) {
- this._allowRotation = value;
- this._dirty++;
- }
- }
- get data() { return this._data; }
- set data(value) {
- if (value === null || value === this._data)
- return;
- this._data = value;
- // extract allowRotation settings
- if (typeof value === "object" && value.hasOwnProperty("allowRotation")) {
- this._allowRotation = value.allowRotation;
- }
- this._dirty++;
- }
- get dirty() { return this._dirty > 0; }
- setDirty(value = true) { this._dirty = value ? this._dirty + 1 : 0; }
-}
-
-class Bin {
- constructor() {
- this._dirty = 0;
- }
- get dirty() { return this._dirty > 0 || this.rects.some(rect => rect.dirty); }
- /**
- * Set bin dirty status
- *
- * @memberof Bin
- */
- setDirty(value = true) {
- this._dirty = value ? this._dirty + 1 : 0;
- if (!value) {
- for (let rect of this.rects) {
- if (rect.setDirty)
- rect.setDirty(false);
- }
- }
- }
-}
-
-class MaxRectsBin extends Bin {
- constructor(maxWidth = EDGE_MAX_VALUE, maxHeight = EDGE_MAX_VALUE, padding = 0, options = {}) {
- super();
- this.maxWidth = maxWidth;
- this.maxHeight = maxHeight;
- this.padding = padding;
- this.freeRects = [];
- this.rects = [];
- this.verticalExpand = false;
- this.options = {
- smart: true,
- pot: true,
- square: true,
- allowRotation: false,
- tag: false,
- exclusiveTag: true,
- border: 0,
- logic: PACKING_LOGIC.MAX_EDGE
- };
- this.options = Object.assign(Object.assign({}, this.options), options);
- this.width = this.options.smart ? 0 : maxWidth;
- this.height = this.options.smart ? 0 : maxHeight;
- this.border = this.options.border ? this.options.border : 0;
- this.freeRects.push(new Rectangle(this.maxWidth + this.padding - this.border * 2, this.maxHeight + this.padding - this.border * 2, this.border, this.border));
- this.stage = new Rectangle(this.width, this.height);
- }
- add(...args) {
- let data;
- let rect;
- if (args.length === 1) {
- if (typeof args[0] !== 'object')
- throw new Error("MacrectsBin.add(): Wrong parameters");
- rect = args[0];
- // Check if rect.tag match bin.tag, if bin.tag not defined, it will accept any rect
- let tag = (rect.data && rect.data.tag) ? rect.data.tag : rect.tag ? rect.tag : undefined;
- if (this.options.tag && this.options.exclusiveTag && this.tag !== tag)
- return undefined;
- }
- else {
- data = args.length > 2 ? args[2] : null;
- // Check if data.tag match bin.tag, if bin.tag not defined, it will accept any rect
- if (this.options.tag && this.options.exclusiveTag) {
- if (data && this.tag !== data.tag)
- return undefined;
- if (!data && this.tag)
- return undefined;
- }
- rect = new Rectangle(args[0], args[1]);
- rect.data = data;
- rect.setDirty(false);
- }
- const result = this.place(rect);
- if (result)
- this.rects.push(result);
- return result;
- }
- repack() {
- let unpacked = [];
- this.reset();
- // re-sort rects from big to small
- this.rects.sort((a, b) => {
- const result = Math.max(b.width, b.height) - Math.max(a.width, a.height);
- if (result === 0 && a.hash && b.hash) {
- return a.hash > b.hash ? -1 : 1;
- }
- else
- return result;
- });
- for (let rect of this.rects) {
- if (!this.place(rect)) {
- unpacked.push(rect);
- }
- }
- for (let rect of unpacked)
- this.rects.splice(this.rects.indexOf(rect), 1);
- return unpacked.length > 0 ? unpacked : undefined;
+ repack() {
+ let unpacked = [];
+ this.reset();
+ // re-sort rects from big to small
+ this.rects.sort((a, b) => {
+ const result = Math.max(b.width, b.height) - Math.max(a.width, a.height);
+ if (result === 0 && a.hash && b.hash) {
+ return a.hash > b.hash ? -1 : 1;
+ }
+ else
+ return result;
+ });
+ for (let rect of this.rects) {
+ if (!this.place(rect)) {
+ unpacked.push(rect);
+ }
+ }
+ for (let rect of unpacked)
+ this.rects.splice(this.rects.indexOf(rect), 1);
+ return unpacked.length > 0 ? unpacked : undefined;
}
reset(deepReset = false, resetOption = false) {
if (deepReset) {
@@ -15949,7 +14655,7 @@ class MaxRectsPacker {
//
let currentTag;
let currentIdx = 0;
- let targetBin = this.bins.slice(this._currentBinIndex).find(bin => {
+ let targetBin = this.bins.slice(this._currentBinIndex).find((bin, binIndex) => {
let testBin = bin.clone();
for (let i = currentIdx; i < rects.length; i++) {
const rect = rects[i];
@@ -15977,6 +14683,10 @@ class MaxRectsPacker {
}
// still in the same tag group
if (testBin.add(rect) === undefined) {
+ // add the rects that could fit into the bins already
+ // do addArray()
+ this.sort(rects.slice(currentIdx, i), this.options.logic).forEach(r => bin.add(r));
+ currentIdx = i;
// current bin cannot contain all tag members
// procceed to test next bin
return false;
@@ -15995,6 +14705,9 @@ class MaxRectsPacker {
if (this.options.tag && this.options.exclusiveTag && tag)
bin.tag = tag;
this.bins.push(bin);
+ // Add the rect to the newly created bin
+ bin.add(rect);
+ currentIdx++;
this.addArray(rects.slice(currentIdx));
}
}
@@ -16025,28287 +14738,16059 @@ class MaxRectsPacker {
unpack.push(...up);
}
}
- this.addArray(unpack);
- return;
- }
- if (!this.dirty)
- return;
- const allRects = this.rects;
- this.reset();
- this.addArray(allRects);
- }
- /**
- * Stop adding new element to the current bin and return a new bin.
- *
- * note: After calling `next()` all elements will no longer added to previous bins.
- *
- * @returns {Bin}
- * @memberof MaxRectsPacker
- */
- next() {
- this._currentBinIndex = this.bins.length;
- return this._currentBinIndex;
- }
- /**
- * Load bins to the packer, overwrite exist bins
- * @param {MaxRectsBin[]} bins MaxRectsBin objects
- * @memberof MaxRectsPacker
- */
- load(bins) {
- bins.forEach((bin, index) => {
- if (bin.maxWidth > this.width || bin.maxHeight > this.height) {
- this.bins.push(new OversizedElementBin(bin.width, bin.height, {}));
- }
- else {
- let newBin = new MaxRectsBin(this.width, this.height, this.padding, bin.options);
- newBin.freeRects.splice(0);
- bin.freeRects.forEach((r, i) => {
- newBin.freeRects.push(new Rectangle(r.width, r.height, r.x, r.y));
- });
- newBin.width = bin.width;
- newBin.height = bin.height;
- if (bin.tag)
- newBin.tag = bin.tag;
- this.bins[index] = newBin;
- }
- }, this);
- }
- /**
- * Output current bins to save
- * @memberof MaxRectsPacker
- */
- save() {
- let saveBins = [];
- this.bins.forEach((bin => {
- let saveBin = {
- width: bin.width,
- height: bin.height,
- maxWidth: bin.maxWidth,
- maxHeight: bin.maxHeight,
- freeRects: [],
- rects: [],
- options: bin.options
- };
- if (bin.tag)
- saveBin = Object.assign(Object.assign({}, saveBin), { tag: bin.tag });
- bin.freeRects.forEach(r => {
- saveBin.freeRects.push({
- x: r.x,
- y: r.y,
- width: r.width,
- height: r.height
- });
- });
- saveBins.push(saveBin);
- }));
- return saveBins;
- }
- /**
- * Sort the given rects based on longest edge or surface area.
- *
- * If rects have the same sort value, will sort by second key `hash` if presented.
- *
- * @private
- * @param {T[]} rects
- * @param {PACKING_LOGIC} [logic=PACKING_LOGIC.MAX_EDGE] sorting logic, "area" or "edge"
- * @returns
- * @memberof MaxRectsPacker
- */
- sort(rects, logic = PACKING_LOGIC.MAX_EDGE) {
- return rects.slice().sort((a, b) => {
- const result = (logic === PACKING_LOGIC.MAX_EDGE) ?
- Math.max(b.width, b.height) - Math.max(a.width, a.height) :
- b.width * b.height - a.width * a.height;
- if (result === 0 && a.hash && b.hash) {
- return a.hash > b.hash ? -1 : 1;
- }
- else
- return result;
- });
- }
- /**
- * Return current functioning bin index, perior to this wont accept any new elements
- *
- * @readonly
- * @type {number}
- * @memberof MaxRectsPacker
- */
- get currentBinIndex() { return this._currentBinIndex; }
- /**
- * Returns dirty status of all child bins
- *
- * @readonly
- * @type {boolean}
- * @memberof MaxRectsPacker
- */
- get dirty() { return this.bins.some(bin => bin.dirty); }
- /**
- * Return all rectangles in this packer
- *
- * @readonly
- * @type {T[]}
- * @memberof MaxRectsPacker
- */
- get rects() {
- let allRects = [];
- for (let bin of this.bins) {
- allRects.push(...bin.rects);
- }
- return allRects;
- }
-}
-
-
-//# sourceMappingURL=maxrects-packer.mjs.map
-
-
-/***/ }),
-/* 207 */
-/***/ (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('')
-}
-
-
-/***/ }),
-/* 208 */
-/***/ (function(module, exports) {
-
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
-
-
-/***/ }),
-/* 209 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/*
- * This file is used by module bundlers (browserify/webpack/etc) when
- * including a stream implementation. We use "readable-stream" to get a
- * consistent behavior between nodejs versions but bundlers often have a shim
- * for "stream". Using this shim greatly improve the compatibility and greatly
- * reduce the final size of the bundle (only one stream implementation, not
- * two).
- */
-module.exports = __webpack_require__(210);
-
-
-/***/ }),
-/* 210 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-module.exports = Stream;
-
-var EE = __webpack_require__(91).EventEmitter;
-var inherits = __webpack_require__(64);
-
-inherits(Stream, EE);
-Stream.Readable = __webpack_require__(139);
-Stream.Writable = __webpack_require__(479);
-Stream.Duplex = __webpack_require__(480);
-Stream.Transform = __webpack_require__(481);
-Stream.PassThrough = __webpack_require__(482);
-
-// Backwards-compat with node 0.4.x
-Stream.Stream = Stream;
-
-
-
-// old-style streams. Note that the pipe method (the only relevant
-// part of this class) is overridden in the Readable class.
-
-function Stream() {
- EE.call(this);
-}
-
-Stream.prototype.pipe = function(dest, options) {
- var source = this;
-
- function ondata(chunk) {
- if (dest.writable) {
- if (false === dest.write(chunk) && source.pause) {
- source.pause();
- }
- }
- }
-
- source.on('data', ondata);
-
- function ondrain() {
- if (source.readable && source.resume) {
- source.resume();
- }
- }
-
- dest.on('drain', ondrain);
-
- // If the 'end' option is not supplied, dest.end() will be called when
- // source gets the 'end' or 'close' events. Only dest.end() once.
- if (!dest._isStdio && (!options || options.end !== false)) {
- source.on('end', onend);
- source.on('close', onclose);
- }
-
- var didOnEnd = false;
- function onend() {
- if (didOnEnd) return;
- didOnEnd = true;
-
- dest.end();
- }
-
-
- function onclose() {
- if (didOnEnd) return;
- didOnEnd = true;
-
- if (typeof dest.destroy === 'function') dest.destroy();
- }
-
- // don't leave dangling pipes when there are errors.
- function onerror(er) {
- cleanup();
- if (EE.listenerCount(this, 'error') === 0) {
- throw er; // Unhandled stream error in pipe.
- }
- }
-
- source.on('error', onerror);
- dest.on('error', onerror);
-
- // remove all the event listeners that were added.
- function cleanup() {
- source.removeListener('data', ondata);
- dest.removeListener('drain', ondrain);
-
- source.removeListener('end', onend);
- source.removeListener('close', onclose);
-
- source.removeListener('error', onerror);
- dest.removeListener('error', onerror);
-
- source.removeListener('end', cleanup);
- source.removeListener('close', cleanup);
-
- dest.removeListener('close', cleanup);
- }
-
- source.on('end', cleanup);
- source.on('close', cleanup);
-
- dest.on('close', cleanup);
-
- dest.emit('pipe', source);
-
- // Allow for unix-like usage: A.pipe(B).pipe(C)
- return dest;
-};
-
-
-/***/ }),
-/* 211 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-/**/
-
-var pna = __webpack_require__(92);
-/**/
-
-module.exports = Readable;
-
-/**/
-var isArray = __webpack_require__(208);
-/**/
-
-/**/
-var Duplex;
-/**/
-
-Readable.ReadableState = ReadableState;
-
-/**/
-var EE = __webpack_require__(91).EventEmitter;
-
-var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
-};
-/**/
-
-/**/
-var Stream = __webpack_require__(212);
-/**/
-
-/**/
-
-var Buffer = __webpack_require__(93).Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
-function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
-}
-function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
-}
-
-/**/
-
-/**/
-var util = __webpack_require__(74);
-util.inherits = __webpack_require__(64);
-/**/
-
-/**/
-var debugUtil = __webpack_require__(473);
-var debug = void 0;
-if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
-} else {
- debug = function () {};
-}
-/**/
-
-var BufferList = __webpack_require__(474);
-var destroyImpl = __webpack_require__(213);
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
-
-function prependListener(emitter, event, fn) {
- // Sadly this is not cacheable as some libraries bundle their own
- // event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
-
- // This is a hack to make sure that our error handler is attached before any
- // userland ones. NEVER DO THIS. This is here only because this code needs
- // to continue to work with older versions of Node.js that do not include
- // the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
-}
-
-function ReadableState(options, stream) {
- Duplex = Duplex || __webpack_require__(58);
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var readableHwm = options.readableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
-
- // A linked list is used to store data chunks instead of an array because the
- // linked list can remove elements from the beginning faster than
- // array.shift()
- this.buffer = new BufferList();
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the event 'readable'/'data' is emitted
- // immediately, or on a later tick. We set this to true at first, because
- // any actions that shouldn't happen until "later" should generally also
- // not happen before the first read call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
- this.resumeScheduled = false;
-
- // has it been destroyed
- this.destroyed = false;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder) StringDecoder = __webpack_require__(142).StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- Duplex = Duplex || __webpack_require__(58);
-
- if (!(this instanceof Readable)) return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- if (options) {
- if (typeof options.read === 'function') this._read = options.read;
-
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
- }
-
- Stream.call(this);
-}
-
-Object.defineProperty(Readable.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined) {
- return false;
- }
- return this._readableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._readableState) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- }
-});
-
-Readable.prototype.destroy = destroyImpl.destroy;
-Readable.prototype._undestroy = destroyImpl.undestroy;
-Readable.prototype._destroy = function (err, cb) {
- this.push(null);
- cb(err);
-};
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function (chunk, encoding) {
- var state = this._readableState;
- var skipChunkCheck;
-
- if (!state.objectMode) {
- if (typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = Buffer.from(chunk, encoding);
- encoding = '';
- }
- skipChunkCheck = true;
- }
- } else {
- skipChunkCheck = true;
- }
-
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function (chunk) {
- return readableAddChunk(this, chunk, null, true, false);
-};
-
-function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
- var state = stream._readableState;
- if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else {
- var er;
- if (!skipChunkCheck) er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
-
- if (addToFront) {
- if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
- } else if (state.ended) {
- stream.emit('error', new Error('stream.push() after EOF'));
- } else {
- state.reading = false;
- if (state.decoder && !encoding) {
- chunk = state.decoder.write(chunk);
- if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
- } else {
- addChunk(stream, state, chunk, false);
- }
- }
- } else if (!addToFront) {
- state.reading = false;
- }
- }
-
- return needMoreData(state);
-}
-
-function addChunk(stream, state, chunk, addToFront) {
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-
- if (state.needReadable) emitReadable(stream);
- }
- maybeReadMore(stream, state);
-}
-
-function chunkInvalid(state, chunk) {
- var er;
- if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
-}
-
-Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
-};
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function (enc) {
- if (!StringDecoder) StringDecoder = __webpack_require__(142).StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
-};
-
-// Don't raise the hwm > 8MB
-var MAX_HWM = 0x800000;
-function computeNewHighWaterMark(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2 to prevent increasing hwm excessively in
- // tiny amounts
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
-}
-
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function howMuchToRead(n, state) {
- if (n <= 0 || state.length === 0 && state.ended) return 0;
- if (state.objectMode) return 1;
- if (n !== n) {
- // Only flow one buffer at a time
- if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
- }
- // If we're asking for more than the current hwm, then raise the hwm.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
- if (n <= state.length) return n;
- // Don't have enough
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- }
- return state.length;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function (n) {
- debug('read', n);
- n = parseInt(n, 10);
- var state = this._readableState;
- var nOrig = n;
-
- if (n !== 0) state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0) endReadable(this);
- return null;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- } else if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (!state.reading) n = howMuchToRead(nOrig, state);
- }
-
- var ret;
- if (n > 0) ret = fromList(n, state);else ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- } else {
- state.length -= n;
- }
-
- if (state.length === 0) {
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (!state.ended) state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended) endReadable(this);
- }
-
- if (ret !== null) this.emit('data', ret);
-
- return ret;
-};
-
-function onEofChunk(stream, state) {
- if (state.ended) return;
- if (state.decoder) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
- }
-}
-
-function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- pna.nextTick(maybeReadMore_, stream, state);
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;else len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function (n) {
- this.emit('error', new Error('_read() is not implemented'));
-};
-
-Readable.prototype.pipe = function (dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-
- var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable, unpipeInfo) {
- debug('onunpipe');
- if (readable === src) {
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
- unpipeInfo.hasUnpiped = true;
- cleanup();
- }
- }
- }
-
- function onend() {
- debug('onend');
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- var cleanedUp = false;
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', unpipe);
- src.removeListener('data', ondata);
-
- cleanedUp = true;
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
- }
-
- // If the user pushes more data while we're writing to dest then we'll end up
- // in ondata again. However, we only want to increase awaitDrain once because
- // dest will only emit one 'drain' event for the multiple writes.
- // => Introduce a guard on increasing awaitDrain.
- var increasedAwaitDrain = false;
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- increasedAwaitDrain = false;
- var ret = dest.write(chunk);
- if (false === ret && !increasedAwaitDrain) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- // => Check whether `dest` is still a piping destination.
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- increasedAwaitDrain = true;
- }
- src.pause();
- }
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
-
- // Make sure our error handler is attached before userland ones.
- prependListener(dest, 'error', onerror);
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function () {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain) state.awaitDrain--;
- if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
-}
-
-Readable.prototype.unpipe = function (dest) {
- var state = this._readableState;
- var unpipeInfo = { hasUnpiped: false };
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes) return this;
-
- if (!dest) dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest) dest.emit('unpipe', this, unpipeInfo);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
-
- for (var i = 0; i < len; i++) {
- dests[i].emit('unpipe', this, unpipeInfo);
- }return this;
- }
-
- // try to find the right one.
- var index = indexOf(state.pipes, dest);
- if (index === -1) return this;
-
- state.pipes.splice(index, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this, unpipeInfo);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function (ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- if (ev === 'data') {
- // Start flowing on next tick if stream isn't explicitly paused
- if (this._readableState.flowing !== false) this.resume();
- } else if (ev === 'readable') {
- var state = this._readableState;
- if (!state.endEmitted && !state.readableListening) {
- state.readableListening = state.needReadable = true;
- state.emittedReadable = false;
- if (!state.reading) {
- pna.nextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-function nReadingNextTick(self) {
- debug('readable nexttick read 0');
- self.read(0);
-}
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function () {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- resume(this, state);
- }
- return this;
-};
-
-function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- pna.nextTick(resume_, stream, state);
- }
-}
-
-function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
-
- state.resumeScheduled = false;
- state.awaitDrain = 0;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading) stream.read(0);
-}
-
-Readable.prototype.pause = function () {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
-};
-
-function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- while (state.flowing && stream.read() !== null) {}
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function (stream) {
- var _this = this;
-
- var state = this._readableState;
- var paused = false;
-
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) _this.push(chunk);
- }
-
- _this.push(null);
- });
-
- stream.on('data', function (chunk) {
- debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
-
- var ret = _this.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
- return stream[method].apply(stream, arguments);
- };
- }(i);
- }
- }
-
- // proxy certain important events.
- for (var n = 0; n < kProxyEvents.length; n++) {
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
- }
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- this._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return this;
-};
-
-Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._readableState.highWaterMark;
- }
-});
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromList(n, state) {
- // nothing buffered
- if (state.length === 0) return null;
-
- var ret;
- if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
- // read it all, truncate the list
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
- state.buffer.clear();
- } else {
- // read part of list
- ret = fromListPartial(n, state.buffer, state.decoder);
- }
-
- return ret;
-}
-
-// Extracts only enough buffered data to satisfy the amount requested.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromListPartial(n, list, hasStrings) {
- var ret;
- if (n < list.head.data.length) {
- // slice is the same for buffers and strings
- ret = list.head.data.slice(0, n);
- list.head.data = list.head.data.slice(n);
- } else if (n === list.head.data.length) {
- // first chunk is a perfect match
- ret = list.shift();
- } else {
- // result spans more than one buffer
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
- }
- return ret;
-}
-
-// Copies a specified amount of characters from the list of buffered data
-// chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBufferString(n, list) {
- var p = list.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = str.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-// Copies a specified amount of bytes from the list of buffered data chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBuffer(n, list) {
- var ret = Buffer.allocUnsafe(n);
- var p = list.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = buf.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
-
- if (!state.endEmitted) {
- state.ended = true;
- pna.nextTick(endReadableNT, state, stream);
- }
-}
-
-function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
-}
-
-function indexOf(xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-}
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27), __webpack_require__(73)))
-
-/***/ }),
-/* 212 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(91).EventEmitter;
-
-
-/***/ }),
-/* 213 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/**/
-
-var pna = __webpack_require__(92);
-/**/
-
-// undocumented cb() API, needed for core, not for public API
-function destroy(err, cb) {
- var _this = this;
-
- var readableDestroyed = this._readableState && this._readableState.destroyed;
- var writableDestroyed = this._writableState && this._writableState.destroyed;
-
- if (readableDestroyed || writableDestroyed) {
- if (cb) {
- cb(err);
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- pna.nextTick(emitErrorNT, this, err);
- }
- return this;
- }
-
- // we set destroyed to true before firing error callbacks in order
- // to make it re-entrance safe in case destroy() is called within callbacks
-
- if (this._readableState) {
- this._readableState.destroyed = true;
- }
-
- // if this is a duplex stream mark the writable part as destroyed as well
- if (this._writableState) {
- this._writableState.destroyed = true;
- }
-
- this._destroy(err || null, function (err) {
- if (!cb && err) {
- pna.nextTick(emitErrorNT, _this, err);
- if (_this._writableState) {
- _this._writableState.errorEmitted = true;
- }
- } else if (cb) {
- cb(err);
- }
- });
-
- return this;
-}
-
-function undestroy() {
- if (this._readableState) {
- this._readableState.destroyed = false;
- this._readableState.reading = false;
- this._readableState.ended = false;
- this._readableState.endEmitted = false;
- }
-
- if (this._writableState) {
- this._writableState.destroyed = false;
- this._writableState.ended = false;
- this._writableState.ending = false;
- this._writableState.finished = false;
- this._writableState.errorEmitted = false;
- }
-}
-
-function emitErrorNT(self, err) {
- self.emit('error', err);
-}
-
-module.exports = {
- destroy: destroy,
- undestroy: undestroy
-};
-
-/***/ }),
-/* 214 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-
-
-module.exports = Transform;
-
-var Duplex = __webpack_require__(58);
-
-/**/
-var util = __webpack_require__(74);
-util.inherits = __webpack_require__(64);
-/**/
-
-util.inherits(Transform, Duplex);
-
-function afterTransform(er, data) {
- var ts = this._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb) {
- return this.emit('error', new Error('write callback called multiple times'));
- }
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data != null) // single equals check for both `null` and `undefined`
- this.push(data);
-
- cb(er);
-
- var rs = this._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- this._read(rs.highWaterMark);
- }
-}
-
-function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = {
- afterTransform: afterTransform.bind(this),
- needTransform: false,
- transforming: false,
- writecb: null,
- writechunk: null,
- writeencoding: null
- };
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- if (options) {
- if (typeof options.transform === 'function') this._transform = options.transform;
-
- if (typeof options.flush === 'function') this._flush = options.flush;
- }
-
- // When the writable side finishes, then flush out anything remaining.
- this.on('prefinish', prefinish);
-}
-
-function prefinish() {
- var _this = this;
-
- if (typeof this._flush === 'function') {
- this._flush(function (er, data) {
- done(_this, er, data);
- });
- } else {
- done(this, null, null);
- }
-}
-
-Transform.prototype.push = function (chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('_transform() is not implemented');
-};
-
-Transform.prototype._write = function (chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function (n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-Transform.prototype._destroy = function (err, cb) {
- var _this2 = this;
-
- Duplex.prototype._destroy.call(this, err, function (err2) {
- cb(err2);
- _this2.emit('close');
- });
-};
-
-function done(stream, er, data) {
- if (er) return stream.emit('error', er);
-
- if (data != null) // single equals check for both `null` and `undefined`
- stream.push(data);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
-
- if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
-
- return stream.push(null);
-}
-
-/***/ }),
-/* 215 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var utils = __webpack_require__(10);
-var support = __webpack_require__(43);
-// private property
-var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-
-
-// public method for encoding
-exports.encode = function(input) {
- var output = [];
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
- var i = 0, len = input.length, remainingBytes = len;
-
- var isArray = utils.getTypeOf(input) !== "string";
- while (i < input.length) {
- remainingBytes = len - i;
-
- if (!isArray) {
- chr1 = input.charCodeAt(i++);
- chr2 = i < len ? input.charCodeAt(i++) : 0;
- chr3 = i < len ? input.charCodeAt(i++) : 0;
- } else {
- chr1 = input[i++];
- chr2 = i < len ? input[i++] : 0;
- chr3 = i < len ? input[i++] : 0;
- }
-
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;
- enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;
-
- output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));
-
- }
-
- return output.join("");
-};
-
-// public method for decoding
-exports.decode = function(input) {
- var chr1, chr2, chr3;
- var enc1, enc2, enc3, enc4;
- var i = 0, resultIndex = 0;
-
- var dataUrlPrefix = "data:";
-
- if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {
- // This is a common error: people give a data url
- // (data:image/png;base64,iVBOR...) with a {base64: true} and
- // wonders why things don't work.
- // We can detect that the string input looks like a data url but we
- // *can't* be sure it is one: removing everything up to the comma would
- // be too dangerous.
- throw new Error("Invalid base64 input, it looks like a data url.");
- }
-
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
-
- var totalLength = input.length * 3 / 4;
- if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {
- totalLength--;
- }
- if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {
- totalLength--;
- }
- if (totalLength % 1 !== 0) {
- // totalLength is not an integer, the length does not match a valid
- // base64 content. That can happen if:
- // - the input is not a base64 content
- // - the input is *almost* a base64 content, with a extra chars at the
- // beginning or at the end
- // - the input uses a base64 variant (base64url for example)
- throw new Error("Invalid base64 input, bad content length.");
- }
- var output;
- if (support.uint8array) {
- output = new Uint8Array(totalLength|0);
- } else {
- output = new Array(totalLength|0);
- }
-
- while (i < input.length) {
-
- enc1 = _keyStr.indexOf(input.charAt(i++));
- enc2 = _keyStr.indexOf(input.charAt(i++));
- enc3 = _keyStr.indexOf(input.charAt(i++));
- enc4 = _keyStr.indexOf(input.charAt(i++));
-
- chr1 = (enc1 << 2) | (enc2 >> 4);
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
- chr3 = ((enc3 & 3) << 6) | enc4;
-
- output[resultIndex++] = chr1;
-
- if (enc3 !== 64) {
- output[resultIndex++] = chr2;
- }
- if (enc4 !== 64) {
- output[resultIndex++] = chr3;
- }
-
- }
-
- return output;
-};
-
-
-/***/ }),
-/* 216 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(Buffer) {
-
-var utils = __webpack_require__(10);
-var ConvertWorker = __webpack_require__(486);
-var GenericWorker = __webpack_require__(25);
-var base64 = __webpack_require__(215);
-var support = __webpack_require__(43);
-var external = __webpack_require__(75);
-
-var NodejsStreamOutputAdapter = null;
-if (support.nodestream) {
- try {
- NodejsStreamOutputAdapter = __webpack_require__(487);
- } catch(e) {}
-}
-
-/**
- * Apply the final transformation of the data. If the user wants a Blob for
- * example, it's easier to work with an U8intArray and finally do the
- * ArrayBuffer/Blob conversion.
- * @param {String} type the name of the final type
- * @param {String|Uint8Array|Buffer} content the content to transform
- * @param {String} mimeType the mime type of the content, if applicable.
- * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.
- */
-function transformZipOutput(type, content, mimeType) {
- switch(type) {
- case "blob" :
- return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType);
- case "base64" :
- return base64.encode(content);
- default :
- return utils.transformTo(type, content);
- }
-}
-
-/**
- * Concatenate an array of data of the given type.
- * @param {String} type the type of the data in the given array.
- * @param {Array} dataArray the array containing the data chunks to concatenate
- * @return {String|Uint8Array|Buffer} the concatenated data
- * @throws Error if the asked type is unsupported
- */
-function concat (type, dataArray) {
- var i, index = 0, res = null, totalLength = 0;
- for(i = 0; i < dataArray.length; i++) {
- totalLength += dataArray[i].length;
- }
- switch(type) {
- case "string":
- return dataArray.join("");
- case "array":
- return Array.prototype.concat.apply([], dataArray);
- case "uint8array":
- res = new Uint8Array(totalLength);
- for(i = 0; i < dataArray.length; i++) {
- res.set(dataArray[i], index);
- index += dataArray[i].length;
- }
- return res;
- case "nodebuffer":
- return Buffer.concat(dataArray);
- default:
- throw new Error("concat : unsupported type '" + type + "'");
- }
-}
-
-/**
- * Listen a StreamHelper, accumulate its content and concatenate it into a
- * complete block.
- * @param {StreamHelper} helper the helper to use.
- * @param {Function} updateCallback a callback called on each update. Called
- * with one arg :
- * - the metadata linked to the update received.
- * @return Promise the promise for the accumulation.
- */
-function accumulate(helper, updateCallback) {
- return new external.Promise(function (resolve, reject){
- var dataArray = [];
- var chunkType = helper._internalType,
- resultType = helper._outputType,
- mimeType = helper._mimeType;
- helper
- .on('data', function (data, meta) {
- dataArray.push(data);
- if(updateCallback) {
- updateCallback(meta);
- }
- })
- .on('error', function(err) {
- dataArray = [];
- reject(err);
- })
- .on('end', function (){
- try {
- var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);
- resolve(result);
- } catch (e) {
- reject(e);
- }
- dataArray = [];
- })
- .resume();
- });
-}
-
-/**
- * An helper to easily use workers outside of JSZip.
- * @constructor
- * @param {Worker} worker the worker to wrap
- * @param {String} outputType the type of data expected by the use
- * @param {String} mimeType the mime type of the content, if applicable.
- */
-function StreamHelper(worker, outputType, mimeType) {
- var internalType = outputType;
- switch(outputType) {
- case "blob":
- case "arraybuffer":
- internalType = "uint8array";
- break;
- case "base64":
- internalType = "string";
- break;
- }
-
- try {
- // the type used internally
- this._internalType = internalType;
- // the type used to output results
- this._outputType = outputType;
- // the mime type
- this._mimeType = mimeType;
- utils.checkSupport(internalType);
- this._worker = worker.pipe(new ConvertWorker(internalType));
- // the last workers can be rewired without issues but we need to
- // prevent any updates on previous workers.
- worker.lock();
- } catch(e) {
- this._worker = new GenericWorker("error");
- this._worker.error(e);
- }
-}
-
-StreamHelper.prototype = {
- /**
- * Listen a StreamHelper, accumulate its content and concatenate it into a
- * complete block.
- * @param {Function} updateCb the update callback.
- * @return Promise the promise for the accumulation.
- */
- accumulate : function (updateCb) {
- return accumulate(this, updateCb);
- },
- /**
- * Add a listener on an event triggered on a stream.
- * @param {String} evt the name of the event
- * @param {Function} fn the listener
- * @return {StreamHelper} the current helper.
- */
- on : function (evt, fn) {
- var self = this;
-
- if(evt === "data") {
- this._worker.on(evt, function (chunk) {
- fn.call(self, chunk.data, chunk.meta);
- });
- } else {
- this._worker.on(evt, function () {
- utils.delay(fn, arguments, self);
- });
- }
- return this;
- },
- /**
- * Resume the flow of chunks.
- * @return {StreamHelper} the current helper.
- */
- resume : function () {
- utils.delay(this._worker.resume, [], this._worker);
- return this;
- },
- /**
- * Pause the flow of chunks.
- * @return {StreamHelper} the current helper.
- */
- pause : function () {
- this._worker.pause();
- return this;
- },
- /**
- * Return a nodejs stream for this helper.
- * @param {Function} updateCb the update callback.
- * @return {NodejsStreamOutputAdapter} the nodejs stream.
- */
- toNodejsStream : function (updateCb) {
- utils.checkSupport("nodestream");
- if (this._outputType !== "nodebuffer") {
- // an object stream containing blob/arraybuffer/uint8array/string
- // is strange and I don't know if it would be useful.
- // I you find this comment and have a good usecase, please open a
- // bug report !
- throw new Error(this._outputType + " is not supported by this method");
- }
-
- return new NodejsStreamOutputAdapter(this, {
- objectMode : this._outputType !== "nodebuffer"
- }, updateCb);
- }
-};
-
-
-module.exports = StreamHelper;
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44).Buffer))
-
-/***/ }),
-/* 217 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-exports.base64 = false;
-exports.binary = false;
-exports.dir = false;
-exports.createFolders = true;
-exports.date = null;
-exports.compression = null;
-exports.compressionOptions = null;
-exports.comment = null;
-exports.unixPermissions = null;
-exports.dosPermissions = null;
-
-
-/***/ }),
-/* 218 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var utils = __webpack_require__(10);
-var GenericWorker = __webpack_require__(25);
-
-// the size of the generated chunks
-// TODO expose this as a public variable
-var DEFAULT_BLOCK_SIZE = 16 * 1024;
-
-/**
- * A worker that reads a content and emits chunks.
- * @constructor
- * @param {Promise} dataP the promise of the data to split
- */
-function DataWorker(dataP) {
- GenericWorker.call(this, "DataWorker");
- var self = this;
- this.dataIsReady = false;
- this.index = 0;
- this.max = 0;
- this.data = null;
- this.type = "";
-
- this._tickScheduled = false;
-
- dataP.then(function (data) {
- self.dataIsReady = true;
- self.data = data;
- self.max = data && data.length || 0;
- self.type = utils.getTypeOf(data);
- if(!self.isPaused) {
- self._tickAndRepeat();
- }
- }, function (e) {
- self.error(e);
- });
-}
-
-utils.inherits(DataWorker, GenericWorker);
-
-/**
- * @see GenericWorker.cleanUp
- */
-DataWorker.prototype.cleanUp = function () {
- GenericWorker.prototype.cleanUp.call(this);
- this.data = null;
-};
-
-/**
- * @see GenericWorker.resume
- */
-DataWorker.prototype.resume = function () {
- if(!GenericWorker.prototype.resume.call(this)) {
- return false;
- }
-
- if (!this._tickScheduled && this.dataIsReady) {
- this._tickScheduled = true;
- utils.delay(this._tickAndRepeat, [], this);
- }
- return true;
-};
-
-/**
- * Trigger a tick a schedule an other call to this function.
- */
-DataWorker.prototype._tickAndRepeat = function() {
- this._tickScheduled = false;
- if(this.isPaused || this.isFinished) {
- return;
- }
- this._tick();
- if(!this.isFinished) {
- utils.delay(this._tickAndRepeat, [], this);
- this._tickScheduled = true;
- }
-};
-
-/**
- * Read and push a chunk.
- */
-DataWorker.prototype._tick = function() {
-
- if(this.isPaused || this.isFinished) {
- return false;
- }
-
- var size = DEFAULT_BLOCK_SIZE;
- var data = null, nextIndex = Math.min(this.max, this.index + size);
- if (this.index >= this.max) {
- // EOF
- return this.end();
- } else {
- switch(this.type) {
- case "string":
- data = this.data.substring(this.index, nextIndex);
- break;
- case "uint8array":
- data = this.data.subarray(this.index, nextIndex);
- break;
- case "array":
- case "nodebuffer":
- data = this.data.slice(this.index, nextIndex);
- break;
- }
- this.index = nextIndex;
- return this.push({
- data : data,
- meta : {
- percent : this.max ? this.index / this.max * 100 : 0
- }
- });
- }
-};
-
-module.exports = DataWorker;
-
-
-/***/ }),
-/* 219 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var utils = __webpack_require__(10);
-var GenericWorker = __webpack_require__(25);
-
-/**
- * A worker which calculate the total length of the data flowing through.
- * @constructor
- * @param {String} propName the name used to expose the length
- */
-function DataLengthProbe(propName) {
- GenericWorker.call(this, "DataLengthProbe for " + propName);
- this.propName = propName;
- this.withStreamInfo(propName, 0);
-}
-utils.inherits(DataLengthProbe, GenericWorker);
-
-/**
- * @see GenericWorker.processChunk
- */
-DataLengthProbe.prototype.processChunk = function (chunk) {
- if(chunk) {
- var length = this.streamInfo[this.propName] || 0;
- this.streamInfo[this.propName] = length + chunk.data.length;
- }
- GenericWorker.prototype.processChunk.call(this, chunk);
-};
-module.exports = DataLengthProbe;
-
-
-
-/***/ }),
-/* 220 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GenericWorker = __webpack_require__(25);
-var crc32 = __webpack_require__(144);
-var utils = __webpack_require__(10);
-
-/**
- * A worker which calculate the crc32 of the data flowing through.
- * @constructor
- */
-function Crc32Probe() {
- GenericWorker.call(this, "Crc32Probe");
- this.withStreamInfo("crc32", 0);
-}
-utils.inherits(Crc32Probe, GenericWorker);
-
-/**
- * @see GenericWorker.processChunk
- */
-Crc32Probe.prototype.processChunk = function (chunk) {
- this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);
- this.push(chunk);
-};
-module.exports = Crc32Probe;
-
-
-/***/ }),
-/* 221 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GenericWorker = __webpack_require__(25);
-
-exports.STORE = {
- magic: "\x00\x00",
- compressWorker : function (compressionOptions) {
- return new GenericWorker("STORE compression");
- },
- uncompressWorker : function () {
- return new GenericWorker("STORE decompression");
- }
-};
-exports.DEFLATE = __webpack_require__(490);
-
-
-/***/ }),
-/* 222 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-// Note: adler32 takes 12% for level 0 and 2% for level 6.
-// It isn't worth it to make additional optimizations as in original.
-// Small size is preferable.
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-function adler32(adler, buf, len, pos) {
- var s1 = (adler & 0xffff) |0,
- s2 = ((adler >>> 16) & 0xffff) |0,
- n = 0;
-
- while (len !== 0) {
- // Set limit ~ twice less than 5552, to keep
- // s2 in 31-bits, because we force signed ints.
- // in other case %= will fail.
- n = len > 2000 ? 2000 : len;
- len -= n;
-
- do {
- s1 = (s1 + buf[pos++]) |0;
- s2 = (s2 + s1) |0;
- } while (--n);
-
- s1 %= 65521;
- s2 %= 65521;
- }
-
- return (s1 | (s2 << 16)) |0;
-}
-
-
-module.exports = adler32;
-
-
-/***/ }),
-/* 223 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-// Note: we can't get significant speed boost here.
-// So write code to minimize size - no pregenerated tables
-// and array tools dependencies.
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-// Use ordinary array, since untyped makes no boost here
-function makeTable() {
- var c, table = [];
-
- for (var n = 0; n < 256; n++) {
- c = n;
- for (var k = 0; k < 8; k++) {
- c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
- }
- table[n] = c;
- }
-
- return table;
-}
-
-// Create table on load. Just 255 signed longs. Not a problem.
-var crcTable = makeTable();
-
-
-function crc32(crc, buf, len, pos) {
- var t = crcTable,
- end = pos + len;
-
- crc ^= -1;
-
- for (var i = pos; i < end; i++) {
- crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
- }
-
- return (crc ^ (-1)); // >>> 0;
-}
-
-
-module.exports = crc32;
-
-
-/***/ }),
-/* 224 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// String encode/decode helpers
-
-
-
-var utils = __webpack_require__(45);
-
-
-// Quick check if we can use fast array to bin string conversion
-//
-// - apply(Array) can fail on Android 2.2
-// - apply(Uint8Array) can fail on iOS 5.1 Safari
-//
-var STR_APPLY_OK = true;
-var STR_APPLY_UIA_OK = true;
-
-try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }
-try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }
-
-
-// Table with utf8 lengths (calculated by first byte of sequence)
-// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
-// because max possible codepoint is 0x10ffff
-var _utf8len = new utils.Buf8(256);
-for (var q = 0; q < 256; q++) {
- _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
-}
-_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
-
-
-// convert string to array (typed, when possible)
-exports.string2buf = function (str) {
- var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
-
- // count binary size
- for (m_pos = 0; m_pos < str_len; m_pos++) {
- c = str.charCodeAt(m_pos);
- if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
- c2 = str.charCodeAt(m_pos + 1);
- if ((c2 & 0xfc00) === 0xdc00) {
- c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
- m_pos++;
- }
- }
- buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
- }
-
- // allocate buffer
- buf = new utils.Buf8(buf_len);
-
- // convert
- for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
- c = str.charCodeAt(m_pos);
- if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
- c2 = str.charCodeAt(m_pos + 1);
- if ((c2 & 0xfc00) === 0xdc00) {
- c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
- m_pos++;
- }
- }
- if (c < 0x80) {
- /* one byte */
- buf[i++] = c;
- } else if (c < 0x800) {
- /* two bytes */
- buf[i++] = 0xC0 | (c >>> 6);
- buf[i++] = 0x80 | (c & 0x3f);
- } else if (c < 0x10000) {
- /* three bytes */
- buf[i++] = 0xE0 | (c >>> 12);
- buf[i++] = 0x80 | (c >>> 6 & 0x3f);
- buf[i++] = 0x80 | (c & 0x3f);
- } else {
- /* four bytes */
- buf[i++] = 0xf0 | (c >>> 18);
- buf[i++] = 0x80 | (c >>> 12 & 0x3f);
- buf[i++] = 0x80 | (c >>> 6 & 0x3f);
- buf[i++] = 0x80 | (c & 0x3f);
- }
- }
-
- return buf;
-};
-
-// Helper (used in 2 places)
-function buf2binstring(buf, len) {
- // On Chrome, the arguments in a function call that are allowed is `65534`.
- // If the length of the buffer is smaller than that, we can use this optimization,
- // otherwise we will take a slower path.
- if (len < 65534) {
- if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
- return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
- }
- }
-
- var result = '';
- for (var i = 0; i < len; i++) {
- result += String.fromCharCode(buf[i]);
- }
- return result;
-}
-
-
-// Convert byte array to binary string
-exports.buf2binstring = function (buf) {
- return buf2binstring(buf, buf.length);
-};
-
-
-// Convert binary string (typed, when possible)
-exports.binstring2buf = function (str) {
- var buf = new utils.Buf8(str.length);
- for (var i = 0, len = buf.length; i < len; i++) {
- buf[i] = str.charCodeAt(i);
- }
- return buf;
-};
-
-
-// convert array to string
-exports.buf2string = function (buf, max) {
- var i, out, c, c_len;
- var len = max || buf.length;
-
- // Reserve max possible length (2 words per char)
- // NB: by unknown reasons, Array is significantly faster for
- // String.fromCharCode.apply than Uint16Array.
- var utf16buf = new Array(len * 2);
-
- for (out = 0, i = 0; i < len;) {
- c = buf[i++];
- // quick process ascii
- if (c < 0x80) { utf16buf[out++] = c; continue; }
-
- c_len = _utf8len[c];
- // skip 5 & 6 byte codes
- if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }
-
- // apply mask on first byte
- c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
- // join the rest
- while (c_len > 1 && i < len) {
- c = (c << 6) | (buf[i++] & 0x3f);
- c_len--;
- }
-
- // terminated by end of string?
- if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
-
- if (c < 0x10000) {
- utf16buf[out++] = c;
- } else {
- c -= 0x10000;
- utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
- utf16buf[out++] = 0xdc00 | (c & 0x3ff);
- }
- }
-
- return buf2binstring(utf16buf, out);
-};
-
-
-// Calculate max possible position in utf8 buffer,
-// that will not break sequence. If that's not possible
-// - (very small limits) return max size as is.
-//
-// buf[] - utf8 bytes array
-// max - length limit (mandatory);
-exports.utf8border = function (buf, max) {
- var pos;
-
- max = max || buf.length;
- if (max > buf.length) { max = buf.length; }
-
- // go back from last position, until start of sequence found
- pos = max - 1;
- while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
-
- // Very small and broken sequence,
- // return max, because we should return something anyway.
- if (pos < 0) { return max; }
-
- // If we came to start of buffer - that means buffer is too small,
- // return max too.
- if (pos === 0) { return max; }
-
- return (pos + _utf8len[buf[pos]] > max) ? pos : max;
-};
-
-
-/***/ }),
-/* 225 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-function ZStream() {
- /* next input byte */
- this.input = null; // JS specific, because we have no pointers
- this.next_in = 0;
- /* number of bytes available at input */
- this.avail_in = 0;
- /* total number of input bytes read so far */
- this.total_in = 0;
- /* next output byte should be put there */
- this.output = null; // JS specific, because we have no pointers
- this.next_out = 0;
- /* remaining free space at output */
- this.avail_out = 0;
- /* total number of bytes output so far */
- this.total_out = 0;
- /* last error message, NULL if no error */
- this.msg = ''/*Z_NULL*/;
- /* not visible by applications */
- this.state = null;
- /* best guess about the data type: binary or text */
- this.data_type = 2/*Z_UNKNOWN*/;
- /* adler32 value of the uncompressed data */
- this.adler = 0;
-}
-
-module.exports = ZStream;
-
-
-/***/ }),
-/* 226 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-// (C) 1995-2013 Jean-loup Gailly and Mark Adler
-// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-
-module.exports = {
-
- /* Allowed flush values; see deflate() and inflate() below for details */
- Z_NO_FLUSH: 0,
- Z_PARTIAL_FLUSH: 1,
- Z_SYNC_FLUSH: 2,
- Z_FULL_FLUSH: 3,
- Z_FINISH: 4,
- Z_BLOCK: 5,
- Z_TREES: 6,
-
- /* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
- Z_OK: 0,
- Z_STREAM_END: 1,
- Z_NEED_DICT: 2,
- Z_ERRNO: -1,
- Z_STREAM_ERROR: -2,
- Z_DATA_ERROR: -3,
- //Z_MEM_ERROR: -4,
- Z_BUF_ERROR: -5,
- //Z_VERSION_ERROR: -6,
-
- /* compression levels */
- Z_NO_COMPRESSION: 0,
- Z_BEST_SPEED: 1,
- Z_BEST_COMPRESSION: 9,
- Z_DEFAULT_COMPRESSION: -1,
-
-
- Z_FILTERED: 1,
- Z_HUFFMAN_ONLY: 2,
- Z_RLE: 3,
- Z_FIXED: 4,
- Z_DEFAULT_STRATEGY: 0,
-
- /* Possible values of the data_type field (though see inflate()) */
- Z_BINARY: 0,
- Z_TEXT: 1,
- //Z_ASCII: 1, // = Z_TEXT (deprecated)
- Z_UNKNOWN: 2,
-
- /* The deflate compression method */
- Z_DEFLATED: 8
- //Z_NULL: null // Use -1 or null inline, depending on var type
-};
-
-
-/***/ }),
-/* 227 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-exports.LOCAL_FILE_HEADER = "PK\x03\x04";
-exports.CENTRAL_FILE_HEADER = "PK\x01\x02";
-exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";
-exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
-exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
-exports.DATA_DESCRIPTOR = "PK\x07\x08";
-
-
-/***/ }),
-/* 228 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var utils = __webpack_require__(10);
-var support = __webpack_require__(43);
-var ArrayReader = __webpack_require__(229);
-var StringReader = __webpack_require__(504);
-var NodeBufferReader = __webpack_require__(505);
-var Uint8ArrayReader = __webpack_require__(231);
-
-/**
- * Create a reader adapted to the data.
- * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.
- * @return {DataReader} the data reader.
- */
-module.exports = function (data) {
- var type = utils.getTypeOf(data);
- utils.checkSupport(type);
- if (type === "string" && !support.uint8array) {
- return new StringReader(data);
- }
- if (type === "nodebuffer") {
- return new NodeBufferReader(data);
- }
- if (support.uint8array) {
- return new Uint8ArrayReader(utils.transformTo("uint8array", data));
- }
- return new ArrayReader(utils.transformTo("array", data));
-};
-
-
-/***/ }),
-/* 229 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var DataReader = __webpack_require__(230);
-var utils = __webpack_require__(10);
-
-function ArrayReader(data) {
- DataReader.call(this, data);
- for(var i = 0; i < this.data.length; i++) {
- data[i] = data[i] & 0xFF;
- }
-}
-utils.inherits(ArrayReader, DataReader);
-/**
- * @see DataReader.byteAt
- */
-ArrayReader.prototype.byteAt = function(i) {
- return this.data[this.zero + i];
-};
-/**
- * @see DataReader.lastIndexOfSignature
- */
-ArrayReader.prototype.lastIndexOfSignature = function(sig) {
- var sig0 = sig.charCodeAt(0),
- sig1 = sig.charCodeAt(1),
- sig2 = sig.charCodeAt(2),
- sig3 = sig.charCodeAt(3);
- for (var i = this.length - 4; i >= 0; --i) {
- if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {
- return i - this.zero;
- }
- }
-
- return -1;
-};
-/**
- * @see DataReader.readAndCheckSignature
- */
-ArrayReader.prototype.readAndCheckSignature = function (sig) {
- var sig0 = sig.charCodeAt(0),
- sig1 = sig.charCodeAt(1),
- sig2 = sig.charCodeAt(2),
- sig3 = sig.charCodeAt(3),
- data = this.readData(4);
- return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];
-};
-/**
- * @see DataReader.readData
- */
-ArrayReader.prototype.readData = function(size) {
- this.checkOffset(size);
- if(size === 0) {
- return [];
- }
- var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
- this.index += size;
- return result;
-};
-module.exports = ArrayReader;
-
-
-/***/ }),
-/* 230 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var utils = __webpack_require__(10);
-
-function DataReader(data) {
- this.data = data; // type : see implementation
- this.length = data.length;
- this.index = 0;
- this.zero = 0;
-}
-DataReader.prototype = {
- /**
- * Check that the offset will not go too far.
- * @param {string} offset the additional offset to check.
- * @throws {Error} an Error if the offset is out of bounds.
- */
- checkOffset: function(offset) {
- this.checkIndex(this.index + offset);
- },
- /**
- * Check that the specified index will not be too far.
- * @param {string} newIndex the index to check.
- * @throws {Error} an Error if the index is out of bounds.
- */
- checkIndex: function(newIndex) {
- if (this.length < this.zero + newIndex || newIndex < 0) {
- throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
- }
- },
- /**
- * Change the index.
- * @param {number} newIndex The new index.
- * @throws {Error} if the new index is out of the data.
- */
- setIndex: function(newIndex) {
- this.checkIndex(newIndex);
- this.index = newIndex;
- },
- /**
- * Skip the next n bytes.
- * @param {number} n the number of bytes to skip.
- * @throws {Error} if the new index is out of the data.
- */
- skip: function(n) {
- this.setIndex(this.index + n);
- },
- /**
- * Get the byte at the specified index.
- * @param {number} i the index to use.
- * @return {number} a byte.
- */
- byteAt: function(i) {
- // see implementations
- },
- /**
- * Get the next number with a given byte size.
- * @param {number} size the number of bytes to read.
- * @return {number} the corresponding number.
- */
- readInt: function(size) {
- var result = 0,
- i;
- this.checkOffset(size);
- for (i = this.index + size - 1; i >= this.index; i--) {
- result = (result << 8) + this.byteAt(i);
- }
- this.index += size;
- return result;
- },
- /**
- * Get the next string with a given byte size.
- * @param {number} size the number of bytes to read.
- * @return {string} the corresponding string.
- */
- readString: function(size) {
- return utils.transformTo("string", this.readData(size));
- },
- /**
- * Get raw data without conversion, bytes.
- * @param {number} size the number of bytes to read.
- * @return {Object} the raw data, implementation specific.
- */
- readData: function(size) {
- // see implementations
- },
- /**
- * Find the last occurence of a zip signature (4 bytes).
- * @param {string} sig the signature to find.
- * @return {number} the index of the last occurence, -1 if not found.
- */
- lastIndexOfSignature: function(sig) {
- // see implementations
- },
- /**
- * Read the signature (4 bytes) at the current position and compare it with sig.
- * @param {string} sig the expected signature
- * @return {boolean} true if the signature matches, false otherwise.
- */
- readAndCheckSignature: function(sig) {
- // see implementations
- },
- /**
- * Get the next date.
- * @return {Date} the date.
- */
- readDate: function() {
- var dostime = this.readInt(4);
- return new Date(Date.UTC(
- ((dostime >> 25) & 0x7f) + 1980, // year
- ((dostime >> 21) & 0x0f) - 1, // month
- (dostime >> 16) & 0x1f, // day
- (dostime >> 11) & 0x1f, // hour
- (dostime >> 5) & 0x3f, // minute
- (dostime & 0x1f) << 1)); // second
- }
-};
-module.exports = DataReader;
-
-
-/***/ }),
-/* 231 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var ArrayReader = __webpack_require__(229);
-var utils = __webpack_require__(10);
-
-function Uint8ArrayReader(data) {
- ArrayReader.call(this, data);
-}
-utils.inherits(Uint8ArrayReader, ArrayReader);
-/**
- * @see DataReader.readData
- */
-Uint8ArrayReader.prototype.readData = function(size) {
- this.checkOffset(size);
- if(size === 0) {
- // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].
- return new Uint8Array(0);
- }
- var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);
- this.index += size;
- return result;
-};
-module.exports = Uint8ArrayReader;
-
-
-/***/ }),
-/* 232 */
-/***/ (function(module, exports) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLDOMImplementation;
-
- module.exports = XMLDOMImplementation = (function() {
- function XMLDOMImplementation() {}
-
- XMLDOMImplementation.prototype.hasFeature = function(feature, version) {
- return true;
- };
-
- XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {
- throw new Error("This DOM method is not implemented.");
- };
-
- XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) {
- throw new Error("This DOM method is not implemented.");
- };
-
- XMLDOMImplementation.prototype.createHTMLDocument = function(title) {
- throw new Error("This DOM method is not implemented.");
- };
-
- XMLDOMImplementation.prototype.getFeature = function(feature, version) {
- throw new Error("This DOM method is not implemented.");
- };
-
- return XMLDOMImplementation;
-
- })();
-
-}).call(this);
-
-
-/***/ }),
-/* 233 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- isPlainObject = __webpack_require__(39).isPlainObject;
-
- XMLDOMImplementation = __webpack_require__(232);
-
- XMLDOMConfiguration = __webpack_require__(509);
-
- XMLNode = __webpack_require__(26);
-
- NodeType = __webpack_require__(14);
-
- XMLStringifier = __webpack_require__(236);
-
- XMLStringWriter = __webpack_require__(160);
-
- module.exports = XMLDocument = (function(superClass) {
- extend(XMLDocument, superClass);
-
- function XMLDocument(options) {
- XMLDocument.__super__.constructor.call(this, null);
- this.name = "#document";
- this.type = NodeType.Document;
- this.documentURI = null;
- this.domConfig = new XMLDOMConfiguration();
- options || (options = {});
- if (!options.writer) {
- options.writer = new XMLStringWriter();
- }
- this.options = options;
- this.stringify = new XMLStringifier(options);
- }
-
- Object.defineProperty(XMLDocument.prototype, 'implementation', {
- value: new XMLDOMImplementation()
- });
-
- Object.defineProperty(XMLDocument.prototype, 'doctype', {
- get: function() {
- var child, i, len, ref;
- ref = this.children;
- for (i = 0, len = ref.length; i < len; i++) {
- child = ref[i];
- if (child.type === NodeType.DocType) {
- return child;
- }
- }
- return null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'documentElement', {
- get: function() {
- return this.rootObject || null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
- get: function() {
- return null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
- get: function() {
- return false;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
- get: function() {
- if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
- return this.children[0].encoding;
- } else {
- return null;
- }
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
- get: function() {
- if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
- return this.children[0].standalone === 'yes';
- } else {
- return false;
- }
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
- get: function() {
- if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
- return this.children[0].version;
- } else {
- return "1.0";
- }
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'URL', {
- get: function() {
- return this.documentURI;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'origin', {
- get: function() {
- return null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'compatMode', {
- get: function() {
- return null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'characterSet', {
- get: function() {
- return null;
- }
- });
-
- Object.defineProperty(XMLDocument.prototype, 'contentType', {
- get: function() {
- return null;
- }
- });
-
- XMLDocument.prototype.end = function(writer) {
- var writerOptions;
- writerOptions = {};
- if (!writer) {
- writer = this.options.writer;
- } else if (isPlainObject(writer)) {
- writerOptions = writer;
- writer = this.options.writer;
- }
- return writer.document(this, writer.filterOptions(writerOptions));
- };
-
- XMLDocument.prototype.toString = function(options) {
- return this.options.writer.document(this, this.options.writer.filterOptions(options));
- };
-
- XMLDocument.prototype.createElement = function(tagName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createDocumentFragment = function() {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createTextNode = function(data) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createComment = function(data) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createCDATASection = function(data) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createProcessingInstruction = function(target, data) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createAttribute = function(name) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createEntityReference = function(name) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.getElementsByTagName = function(tagname) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.importNode = function(importedNode, deep) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.getElementById = function(elementId) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.adoptNode = function(source) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.normalizeDocument = function() {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.getElementsByClassName = function(classNames) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createEvent = function(eventInterface) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createRange = function() {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) {
- throw new Error("This DOM method is not implemented." + this.debugInfo());
- };
-
- return XMLDocument;
-
- })(XMLNode);
-
-}).call(this);
-
-
-/***/ }),
-/* 234 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var NodeType, XMLAttribute, XMLNode;
-
- NodeType = __webpack_require__(14);
-
- XMLNode = __webpack_require__(26);
-
- module.exports = XMLAttribute = (function() {
- function XMLAttribute(parent, name, value) {
- this.parent = parent;
- if (this.parent) {
- this.options = this.parent.options;
- this.stringify = this.parent.stringify;
- }
- if (name == null) {
- throw new Error("Missing attribute name. " + this.debugInfo(name));
- }
- this.name = this.stringify.name(name);
- this.value = this.stringify.attValue(value);
- this.type = NodeType.Attribute;
- this.isId = false;
- this.schemaTypeInfo = null;
- }
-
- Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
- get: function() {
- return this.type;
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
- get: function() {
- return this.parent;
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'textContent', {
- get: function() {
- return this.value;
- },
- set: function(value) {
- return this.value = value || '';
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
- get: function() {
- return '';
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'prefix', {
- get: function() {
- return '';
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'localName', {
- get: function() {
- return this.name;
- }
- });
-
- Object.defineProperty(XMLAttribute.prototype, 'specified', {
- get: function() {
- return true;
- }
- });
-
- XMLAttribute.prototype.clone = function() {
- return Object.create(this);
- };
-
- XMLAttribute.prototype.toString = function(options) {
- return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
- };
-
- XMLAttribute.prototype.debugInfo = function(name) {
- name = name || this.name;
- if (name == null) {
- return "parent: <" + this.parent.name + ">";
- } else {
- return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
- }
- };
-
- XMLAttribute.prototype.isEqualNode = function(node) {
- if (node.namespaceURI !== this.namespaceURI) {
- return false;
- }
- if (node.prefix !== this.prefix) {
- return false;
- }
- if (node.localName !== this.localName) {
- return false;
- }
- if (node.value !== this.value) {
- return false;
- }
- return true;
- };
-
- return XMLAttribute;
-
- })();
-
-}).call(this);
-
-
-/***/ }),
-/* 235 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var NodeType, XMLDummy, XMLNode,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
-
- XMLNode = __webpack_require__(26);
-
- NodeType = __webpack_require__(14);
-
- module.exports = XMLDummy = (function(superClass) {
- extend(XMLDummy, superClass);
-
- function XMLDummy(parent) {
- XMLDummy.__super__.constructor.call(this, parent);
- this.type = NodeType.Dummy;
- }
-
- XMLDummy.prototype.clone = function() {
- return Object.create(this);
- };
-
- XMLDummy.prototype.toString = function(options) {
- return '';
- };
-
- return XMLDummy;
-
- })(XMLNode);
-
-}).call(this);
-
-
-/***/ }),
-/* 236 */
-/***/ (function(module, exports) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- var XMLStringifier,
- bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- hasProp = {}.hasOwnProperty;
-
- module.exports = XMLStringifier = (function() {
- function XMLStringifier(options) {
- this.assertLegalName = bind(this.assertLegalName, this);
- this.assertLegalChar = bind(this.assertLegalChar, this);
- var key, ref, value;
- options || (options = {});
- this.options = options;
- if (!this.options.version) {
- this.options.version = '1.0';
- }
- ref = options.stringify || {};
- for (key in ref) {
- if (!hasProp.call(ref, key)) continue;
- value = ref[key];
- this[key] = value;
- }
- }
-
- XMLStringifier.prototype.name = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalName('' + val || '');
- };
-
- XMLStringifier.prototype.text = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar(this.textEscape('' + val || ''));
- };
-
- XMLStringifier.prototype.cdata = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- val = '' + val || '';
- val = val.replace(']]>', ']]]]>');
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.comment = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- val = '' + val || '';
- if (val.match(/--/)) {
- throw new Error("Comment text cannot contain double-hypen: " + val);
- }
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.raw = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return '' + val || '';
- };
-
- XMLStringifier.prototype.attValue = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar(this.attEscape(val = '' + val || ''));
- };
-
- XMLStringifier.prototype.insTarget = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.insValue = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- val = '' + val || '';
- if (val.match(/\?>/)) {
- throw new Error("Invalid processing instruction value: " + val);
- }
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.xmlVersion = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- val = '' + val || '';
- if (!val.match(/1\.[0-9]+/)) {
- throw new Error("Invalid version number: " + val);
- }
- return val;
- };
-
- XMLStringifier.prototype.xmlEncoding = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- val = '' + val || '';
- if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
- throw new Error("Invalid encoding: " + val);
- }
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.xmlStandalone = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- if (val) {
- return "yes";
- } else {
- return "no";
- }
- };
-
- XMLStringifier.prototype.dtdPubID = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdSysID = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdElementValue = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdAttType = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdAttDefault = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdEntityValue = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.dtdNData = function(val) {
- if (this.options.noValidation) {
- return val;
- }
- return this.assertLegalChar('' + val || '');
- };
-
- XMLStringifier.prototype.convertAttKey = '@';
-
- XMLStringifier.prototype.convertPIKey = '?';
-
- XMLStringifier.prototype.convertTextKey = '#text';
-
- XMLStringifier.prototype.convertCDataKey = '#cdata';
-
- XMLStringifier.prototype.convertCommentKey = '#comment';
-
- XMLStringifier.prototype.convertRawKey = '#raw';
-
- XMLStringifier.prototype.assertLegalChar = function(str) {
- var regex, res;
- if (this.options.noValidation) {
- return str;
- }
- regex = '';
- if (this.options.version === '1.0') {
- regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
- if (res = str.match(regex)) {
- throw new Error("Invalid character in string: " + str + " at index " + res.index);
- }
- } else if (this.options.version === '1.1') {
- regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
- if (res = str.match(regex)) {
- throw new Error("Invalid character in string: " + str + " at index " + res.index);
- }
- }
- return str;
- };
-
- XMLStringifier.prototype.assertLegalName = function(str) {
- var regex;
- if (this.options.noValidation) {
- return str;
- }
- this.assertLegalChar(str);
- regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
- if (!str.match(regex)) {
- throw new Error("Invalid character in name");
- }
- return str;
- };
-
- XMLStringifier.prototype.textEscape = function(str) {
- var ampregex;
- if (this.options.noValidation) {
- return str;
- }
- ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
- return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, '
');
- };
-
- XMLStringifier.prototype.attEscape = function(str) {
- var ampregex;
- if (this.options.noValidation) {
- return str;
- }
- ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
- return str.replace(ampregex, '&').replace(/ 0) {
- return new Array(indentLevel).join(options.indent);
- }
- }
- return '';
- };
-
- XMLWriterBase.prototype.endline = function(node, options, level) {
- if (!options.pretty || options.suppressPrettyCount) {
- return '';
- } else {
- return options.newline;
- }
- };
-
- XMLWriterBase.prototype.attribute = function(att, options, level) {
- var r;
- this.openAttribute(att, options, level);
- r = ' ' + att.name + '="' + att.value + '"';
- this.closeAttribute(att, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.cdata = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.comment = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.declaration = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '';
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.docType = function(node, options, level) {
- var child, i, len, r, ref;
- level || (level = 0);
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level);
- r += ' 0) {
- r += ' [';
- r += this.endline(node, options, level);
- options.state = WriterState.InsideTag;
- ref = node.children;
- for (i = 0, len = ref.length; i < len; i++) {
- child = ref[i];
- r += this.writeChildNode(child, options, level + 1);
- }
- options.state = WriterState.CloseTag;
- r += ']';
- }
- options.state = WriterState.CloseTag;
- r += options.spaceBeforeSlash + '>';
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.element = function(node, options, level) {
- var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;
- level || (level = 0);
- prettySuppressed = false;
- r = '';
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r += this.indent(node, options, level) + '<' + node.name;
- ref = node.attribs;
- for (name in ref) {
- if (!hasProp.call(ref, name)) continue;
- att = ref[name];
- r += this.attribute(att, options, level);
- }
- childNodeCount = node.children.length;
- firstChildNode = childNodeCount === 0 ? null : node.children[0];
- if (childNodeCount === 0 || node.children.every(function(e) {
- return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';
- })) {
- if (options.allowEmpty) {
- r += '>';
- options.state = WriterState.CloseTag;
- r += '' + node.name + '>' + this.endline(node, options, level);
- } else {
- options.state = WriterState.CloseTag;
- r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
- }
- } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {
- r += '>';
- options.state = WriterState.InsideTag;
- options.suppressPrettyCount++;
- prettySuppressed = true;
- r += this.writeChildNode(firstChildNode, options, level + 1);
- options.suppressPrettyCount--;
- prettySuppressed = false;
- options.state = WriterState.CloseTag;
- r += '' + node.name + '>' + this.endline(node, options, level);
- } else {
- if (options.dontPrettyTextNodes) {
- ref1 = node.children;
- for (i = 0, len = ref1.length; i < len; i++) {
- child = ref1[i];
- if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {
- options.suppressPrettyCount++;
- prettySuppressed = true;
- break;
- }
- }
- }
- r += '>' + this.endline(node, options, level);
- options.state = WriterState.InsideTag;
- ref2 = node.children;
- for (j = 0, len1 = ref2.length; j < len1; j++) {
- child = ref2[j];
- r += this.writeChildNode(child, options, level + 1);
- }
- options.state = WriterState.CloseTag;
- r += this.indent(node, options, level) + '' + node.name + '>';
- if (prettySuppressed) {
- options.suppressPrettyCount--;
- }
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- }
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.writeChildNode = function(node, options, level) {
- switch (node.type) {
- case NodeType.CData:
- return this.cdata(node, options, level);
- case NodeType.Comment:
- return this.comment(node, options, level);
- case NodeType.Element:
- return this.element(node, options, level);
- case NodeType.Raw:
- return this.raw(node, options, level);
- case NodeType.Text:
- return this.text(node, options, level);
- case NodeType.ProcessingInstruction:
- return this.processingInstruction(node, options, level);
- case NodeType.Dummy:
- return '';
- case NodeType.Declaration:
- return this.declaration(node, options, level);
- case NodeType.DocType:
- return this.docType(node, options, level);
- case NodeType.AttributeDeclaration:
- return this.dtdAttList(node, options, level);
- case NodeType.ElementDeclaration:
- return this.dtdElement(node, options, level);
- case NodeType.EntityDeclaration:
- return this.dtdEntity(node, options, level);
- case NodeType.NotationDeclaration:
- return this.dtdNotation(node, options, level);
- default:
- throw new Error("Unknown XML node type: " + node.constructor.name);
- }
- };
-
- XMLWriterBase.prototype.processingInstruction = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '';
- options.state = WriterState.InsideTag;
- r += node.target;
- if (node.value) {
- r += ' ' + node.value;
- }
- options.state = WriterState.CloseTag;
- r += options.spaceBeforeSlash + '?>';
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.raw = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level);
- options.state = WriterState.InsideTag;
- r += node.value;
- options.state = WriterState.CloseTag;
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.text = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level);
- options.state = WriterState.InsideTag;
- r += node.value;
- options.state = WriterState.CloseTag;
- r += this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.dtdAttList = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.dtdElement = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.dtdEntity = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.dtdNotation = function(node, options, level) {
- var r;
- this.openNode(node, options, level);
- options.state = WriterState.OpenTag;
- r = this.indent(node, options, level) + '' + this.endline(node, options, level);
- options.state = WriterState.None;
- this.closeNode(node, options, level);
- return r;
- };
-
- XMLWriterBase.prototype.openNode = function(node, options, level) {};
-
- XMLWriterBase.prototype.closeNode = function(node, options, level) {};
-
- XMLWriterBase.prototype.openAttribute = function(att, options, level) {};
-
- XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};
-
- return XMLWriterBase;
-
- })();
-
-}).call(this);
-
-
-/***/ }),
-/* 238 */
-/***/ (function(module, exports) {
-
-// Generated by CoffeeScript 1.12.7
-(function() {
- "use strict";
- var prefixMatch;
-
- prefixMatch = new RegExp(/(?!xmlns)^.*:/);
-
- exports.normalize = function(str) {
- return str.toLowerCase();
- };
-
- exports.firstCharLowerCase = function(str) {
- return str.charAt(0).toLowerCase() + str.slice(1);
- };
-
- exports.stripPrefix = function(str) {
- return str.replace(prefixMatch, '');
- };
-
- exports.parseNumbers = function(str) {
- if (!isNaN(str)) {
- str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);
- }
- return str;
- };
-
- exports.parseBooleans = function(str) {
- if (/^(?:true|false)$/i.test(str)) {
- str = str.toLowerCase() === 'true';
- }
- return str;
- };
-
-}).call(this);
-
-
-/***/ }),
-/* 239 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var slice = Array.prototype.slice;
-var isArgs = __webpack_require__(240);
-
-var origKeys = Object.keys;
-var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(520);
-
-var originalKeys = Object.keys;
-
-keysShim.shim = function shimObjectKeys() {
- if (Object.keys) {
- var keysWorksWithArguments = (function () {
- // Safari 5.0 bug
- var args = Object.keys(arguments);
- return args && args.length === arguments.length;
- }(1, 2));
- if (!keysWorksWithArguments) {
- Object.keys = function keys(object) { // eslint-disable-line func-name-matching
- if (isArgs(object)) {
- return originalKeys(slice.call(object));
- }
- return originalKeys(object);
- };
- }
- } else {
- Object.keys = keysShim;
- }
- return Object.keys || keysShim;
-};
-
-module.exports = keysShim;
-
-
-/***/ }),
-/* 240 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var toStr = Object.prototype.toString;
-
-module.exports = function isArguments(value) {
- var str = toStr.call(value);
- var isArgs = str === '[object Arguments]';
- if (!isArgs) {
- isArgs = str !== '[object Array]' &&
- value !== null &&
- typeof value === 'object' &&
- typeof value.length === 'number' &&
- value.length >= 0 &&
- toStr.call(value.callee) === '[object Function]';
- }
- return isArgs;
-};
-
-
-/***/ }),
-/* 241 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var isES5 = typeof Object.defineProperty === 'function'
- && typeof Object.defineProperties === 'function'
- && typeof Object.getPrototypeOf === 'function'
- && typeof Object.setPrototypeOf === 'function';
-
-if (!isES5) {
- throw new TypeError('util.promisify requires a true ES5 environment');
-}
-
-var getOwnPropertyDescriptors = __webpack_require__(523);
-
-if (typeof Promise !== 'function') {
- throw new TypeError('`Promise` must be globally available for util.promisify to work.');
-}
-
-var slice = Function.call.bind(Array.prototype.slice);
-var concat = Function.call.bind(Array.prototype.concat);
-var forEach = Function.call.bind(Array.prototype.forEach);
-
-var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol';
-
-var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
-var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
-
-module.exports = function promisify(orig) {
- if (typeof orig !== 'function') {
- var error = new TypeError('The "original" argument must be of type function');
- error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
- error.code = 'ERR_INVALID_ARG_TYPE';
- throw error;
- }
-
- if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
- var customFunction = orig[kCustomPromisifiedSymbol];
- if (typeof customFunction !== 'function') {
- throw new TypeError('The [util.promisify.custom] property must be a function');
- }
- Object.defineProperty(customFunction, kCustomPromisifiedSymbol, {
- configurable: true,
- enumerable: false,
- value: customFunction,
- writable: false
- });
- return customFunction;
- }
-
- // Names to create an object from in case the callback receives multiple
- // arguments, e.g. ['stdout', 'stderr'] for child_process.exec.
- var argumentNames = orig[kCustomPromisifyArgsSymbol];
-
- var promisified = function fn() {
- var args = slice(arguments);
- var self = this; // eslint-disable-line no-invalid-this
- return new Promise(function (resolve, reject) {
- orig.apply(self, concat(args, function (err) {
- var values = arguments.length > 1 ? slice(arguments, 1) : [];
- if (err) {
- reject(err);
- } else if (typeof argumentNames !== 'undefined' && values.length > 1) {
- var obj = {};
- forEach(argumentNames, function (name, index) {
- obj[name] = values[index];
- });
- resolve(obj);
- } else {
- resolve(values[0]);
- }
- }));
- });
- };
-
- Object.setPrototypeOf(promisified, Object.getPrototypeOf(orig));
-
- Object.defineProperty(promisified, kCustomPromisifiedSymbol, {
- configurable: true,
- enumerable: false,
- value: promisified,
- writable: false
- });
- return Object.defineProperties(promisified, getOwnPropertyDescriptors(orig));
-};
-
-module.exports.custom = kCustomPromisifiedSymbol;
-module.exports.customPromisifyArgs = kCustomPromisifyArgsSymbol;
-
-
-/***/ }),
-/* 242 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var ES = __webpack_require__(524);
-
-var defineProperty = Object.defineProperty;
-var getDescriptor = Object.getOwnPropertyDescriptor;
-var getOwnNames = Object.getOwnPropertyNames;
-var getSymbols = Object.getOwnPropertySymbols;
-var concat = Function.call.bind(Array.prototype.concat);
-var reduce = Function.call.bind(Array.prototype.reduce);
-var getAll = getSymbols ? function (obj) {
- return concat(getOwnNames(obj), getSymbols(obj));
-} : getOwnNames;
-
-var isES5 = ES.IsCallable(getDescriptor) && ES.IsCallable(getOwnNames);
-
-var safePut = function put(obj, prop, val) { // eslint-disable-line max-params
- if (defineProperty && prop in obj) {
- defineProperty(obj, prop, {
- configurable: true,
- enumerable: true,
- value: val,
- writable: true
- });
- } else {
- obj[prop] = val;
- }
-};
-
-module.exports = function getOwnPropertyDescriptors(value) {
- ES.RequireObjectCoercible(value);
- if (!isES5) {
- throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
- }
-
- var O = ES.ToObject(value);
- return reduce(getAll(O), function (acc, key) {
- var descriptor = getDescriptor(O, key);
- if (typeof descriptor !== 'undefined') {
- safePut(acc, key, descriptor);
- }
- return acc;
- }, {});
-};
-
-
-/***/ }),
-/* 243 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = function isPrimitive(value) {
- return value === null || (typeof value !== 'function' && typeof value !== 'object');
-};
-
-
-/***/ }),
-/* 244 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GetIntrinsic = __webpack_require__(16);
-
-var $TypeError = GetIntrinsic('%TypeError%');
-var $SyntaxError = GetIntrinsic('%SyntaxError%');
-
-var has = __webpack_require__(65);
-
-var predicates = {
- // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
- 'Property Descriptor': function isPropertyDescriptor(ES, Desc) {
- if (ES.Type(Desc) !== 'Object') {
- return false;
- }
- var allowed = {
- '[[Configurable]]': true,
- '[[Enumerable]]': true,
- '[[Get]]': true,
- '[[Set]]': true,
- '[[Value]]': true,
- '[[Writable]]': true
- };
-
- for (var key in Desc) { // eslint-disable-line
- if (has(Desc, key) && !allowed[key]) {
- return false;
- }
- }
-
- var isData = has(Desc, '[[Value]]');
- var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');
- if (isData && IsAccessor) {
- throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
- }
- return true;
- }
-};
-
-module.exports = function assertRecord(ES, recordType, argumentName, value) {
- var predicate = predicates[recordType];
- if (typeof predicate !== 'function') {
- throw new $SyntaxError('unknown record type: ' + recordType);
- }
- if (!predicate(ES, value)) {
- throw new $TypeError(argumentName + ' must be a ' + recordType);
- }
-};
-
-
-/***/ }),
-/* 245 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = Number.isNaN || function isNaN(a) {
- return a !== a;
-};
-
-
-/***/ }),
-/* 246 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var $isNaN = Number.isNaN || function (a) { return a !== a; };
-
-module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
-
-
-/***/ }),
-/* 247 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GetIntrinsic = __webpack_require__(16);
-
-var has = __webpack_require__(65);
-
-var $assign = GetIntrinsic('%Object%').assign;
-
-module.exports = function assign(target, source) {
- if ($assign) {
- return $assign(target, source);
- }
-
- // eslint-disable-next-line no-restricted-syntax
- for (var key in source) {
- if (has(source, key)) {
- // eslint-disable-next-line no-param-reassign
- target[key] = source[key];
- }
- }
- return target;
-};
-
-
-/***/ }),
-/* 248 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = function sign(number) {
- return number >= 0 ? 1 : -1;
-};
-
-
-/***/ }),
-/* 249 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = function mod(number, modulo) {
- var remain = number % modulo;
- return Math.floor(remain >= 0 ? remain : remain + modulo);
-};
-
-
-/***/ }),
-/* 250 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-module.exports = function every(array, predicate) {
- for (var i = 0; i < array.length; i += 1) {
- if (!predicate(array[i], i, array)) {
- return false;
- }
- }
- return true;
-};
-
-
-/***/ }),
-/* 251 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GetIntrinsic = __webpack_require__(16);
-
-var has = __webpack_require__(65);
-var $TypeError = GetIntrinsic('%TypeError%');
-
-module.exports = function IsPropertyDescriptor(ES, Desc) {
- if (ES.Type(Desc) !== 'Object') {
- return false;
- }
- var allowed = {
- '[[Configurable]]': true,
- '[[Enumerable]]': true,
- '[[Get]]': true,
- '[[Set]]': true,
- '[[Value]]': true,
- '[[Writable]]': true
- };
-
- for (var key in Desc) { // eslint-disable-line
- if (has(Desc, key) && !allowed[key]) {
- return false;
- }
- }
-
- if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {
- throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
- }
- return true;
-};
-
-
-/***/ }),
-/* 252 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var bind = __webpack_require__(163);
-
-var GetIntrinsic = __webpack_require__(16);
-
-var $Function = GetIntrinsic('%Function%');
-var $apply = $Function.apply;
-var $call = $Function.call;
-
-module.exports = function callBind() {
- return bind.apply($call, arguments);
-};
-
-module.exports.apply = function applyBind() {
- return bind.apply($apply, arguments);
-};
-
-
-/***/ }),
-/* 253 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var hasSymbols = __webpack_require__(97)();
-var GetIntrinsic = __webpack_require__(16);
-var callBound = __webpack_require__(66);
-
-var $iterator = GetIntrinsic('%Symbol.iterator%', true);
-var $stringSlice = callBound('String.prototype.slice');
-
-module.exports = function getIteratorMethod(ES, iterable) {
- var usingIterator;
- if (hasSymbols) {
- usingIterator = ES.GetMethod(iterable, $iterator);
- } else if (ES.IsArray(iterable)) {
- usingIterator = function () {
- var i = -1;
- var arr = this; // eslint-disable-line no-invalid-this
- return {
- next: function () {
- i += 1;
- return {
- done: i >= arr.length,
- value: arr[i]
- };
- }
- };
- };
- } else if (ES.Type(iterable) === 'String') {
- usingIterator = function () {
- var i = 0;
- return {
- next: function () {
- var nextIndex = ES.AdvanceStringIndex(iterable, i, true);
- var value = $stringSlice(iterable, i, nextIndex);
- i = nextIndex;
- return {
- done: nextIndex > iterable.length,
- value: value
- };
- }
- };
- };
- }
- return usingIterator;
-};
-
-
-/***/ }),
-/* 254 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var GetIntrinsic = __webpack_require__(16);
-
-var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true);
-var $ArrayProto = GetIntrinsic('%Array.prototype%');
-
-module.exports = originalSetProto || (
- // eslint-disable-next-line no-proto, no-negated-condition
- [].__proto__ !== $ArrayProto
- ? null
- : function (O, proto) {
- O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign
- return O;
- }
-);
-
-
-/***/ }),
-/* 255 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var implementation = __webpack_require__(242);
-
-module.exports = function getPolyfill() {
- return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation;
-};
-
-
-/***/ }),
-/* 256 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var util = __webpack_require__(162);
-var implementation = __webpack_require__(241);
-
-module.exports = function getPolyfill() {
- if (typeof util.promisify === 'function') {
- return util.promisify;
- }
- return implementation;
-};
-
-
-/***/ }),
-/* 257 */
-/***/ (function(module, exports) {
-
-/*
- * DOM Level 2
- * Object DOMException
- * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
- * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
- */
-
-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(Object.create){
- var ppt = Object.create(Super.prototype)
- pt.__proto__ = ppt;
- }
- 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("unknow Class:"+Class)
- }
- pt.constructor = Class
- }
-}
-var htmlns = 'http://www.w3.org/1999/xhtml' ;
-// 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);
-
-
-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;
- }
-};
-/**
- * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
- */
-function DOMImplementation(/* Object */ features) {
- this._features = {};
- if (features) {
- for (var feature in features) {
- this._features = features[feature];
- }
- }
-};
-
-DOMImplementation.prototype = {
- hasFeature: function(/* string */ feature, /* string */ version) {
- var versions = this._features[feature.toLowerCase()];
- if (versions && (!version || version in versions)) {
- return true;
- } else {
- return false;
- }
- },
- // Introduced in DOM Level 2:
- createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
- var doc = new Document();
- doc.implementation = this;
- doc.childNodes = new NodeList();
- doc.doctype = doctype;
- if(doctype){
- doc.appendChild(doctype);
- }
- if(qualifiedName){
- var root = doc.createElementNS(namespaceURI,qualifiedName);
- doc.appendChild(root);
- }
- return doc;
- },
- // Introduced in DOM Level 2:
- createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
- var node = new DocumentType();
- node.name = qualifiedName;
- node.nodeName = qualifiedName;
- node.publicId = publicId;
- node.systemId = systemId;
- // Introduced in DOM Level 2:
- //readonly attribute DOMString internalSubset;
-
- //TODO:..
- // readonly attribute NamedNodeMap entities;
- // readonly attribute NamedNodeMap notations;
- 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;
- },
- 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 == 'http://www.w3.org/2000/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 == 'http://www.w3.org/2000/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,
- 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;
- },
-
- //document factory method:
- createElement : function(tagName){
- var node = new Element();
- node.ownerDocument = this;
- node.nodeName = tagName;
- node.tagName = 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;
- if (!prefix && !uri){
- return false;
- }
- if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace"
- || uri == 'http://www.w3.org/2000/xmlns/'){
- return false;
- }
-
- var i = visibleNamespaces.length
- //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)
- while (i--) {
- var ns = visibleNamespaces[i];
- // get namespace prefix
- //console.log(node.nodeType,node.tagName,ns.prefix,prefix)
- if (ns.prefix == prefix){
- return ns.namespace != uri;
- }
- }
- //console.log(isHTML,uri,prefix=='')
- //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){
- // return false;
- //}
- //node.flag = '11111'
- //console.error(3,true,node.flag,node.prefix,node.namespaceURI)
- return true;
-}
-function serializeToString(node,buf,isHTML,nodeFilter,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:
- if (!visibleNamespaces) visibleNamespaces = [];
- var startVisibleNamespaces = visibleNamespaces.length;
- var attrs = node.attributes;
- var len = attrs.length;
- var child = node.firstChild;
- var nodeName = node.tagName;
-
- isHTML = (htmlns === node.namespaceURI) ||isHTML
- buf.push('<',nodeName);
-
-
-
- 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);
- }
- child = child.nextSibling;
- }
- }else
- {
- while(child){
- serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
- child = child.nextSibling;
- }
- }
- buf.push('',nodeName,'>');
- }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);
- child = child.nextSibling;
- }
- return;
- case ATTRIBUTE_NODE:
- return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
- case TEXT_NODE:
- return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
- 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( "",node.target," ",node.data,"?>");
- 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', ']]]]>');
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.comment = function(val) {
- val = '' + val || '';
- if (val.match(/--/)) {
- throw new Error("Comment text cannot contain double-hypen: " + val);
- }
- return this.assertLegalChar(val);
- };
-
- XMLStringifier.prototype.raw = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.attName = function(val) {
- return val = '' + val || '';
- };
-
- XMLStringifier.prototype.attValue = function(val) {
- val = '' + val || '';
- return this.attEscape(val);
- };
-
- XMLStringifier.prototype.insTarget = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.insValue = function(val) {
- val = '' + val || '';
- if (val.match(/\?>/)) {
- throw new Error("Invalid processing instruction value: " + val);
- }
- return val;
- };
-
- XMLStringifier.prototype.xmlVersion = function(val) {
- val = '' + val || '';
- if (!val.match(/1\.[0-9]+/)) {
- throw new Error("Invalid version number: " + val);
- }
- return val;
- };
-
- XMLStringifier.prototype.xmlEncoding = function(val) {
- val = '' + val || '';
- if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
- throw new Error("Invalid encoding: " + val);
- }
- return val;
- };
-
- XMLStringifier.prototype.xmlStandalone = function(val) {
- if (val) {
- return "yes";
- } else {
- return "no";
- }
- };
-
- XMLStringifier.prototype.dtdPubID = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.dtdSysID = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.dtdElementValue = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.dtdAttType = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.dtdAttDefault = function(val) {
- if (val != null) {
- return '' + val || '';
- } else {
- return val;
- }
- };
-
- XMLStringifier.prototype.dtdEntityValue = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.dtdNData = function(val) {
- return '' + val || '';
- };
-
- XMLStringifier.prototype.convertAttKey = '@';
-
- XMLStringifier.prototype.convertPIKey = '?';
-
- XMLStringifier.prototype.convertTextKey = '#text';
-
- XMLStringifier.prototype.convertCDataKey = '#cdata';
-
- XMLStringifier.prototype.convertCommentKey = '#comment';
-
- XMLStringifier.prototype.convertRawKey = '#raw';
-
- XMLStringifier.prototype.assertLegalChar = function(str) {
- var res;
- res = str.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/);
- if (res) {
- throw new Error("Invalid character in string: " + str + " at index " + res.index);
- }
- return str;
- };
-
- XMLStringifier.prototype.elEscape = function(str) {
- var ampregex;
- ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
- return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, '
');
- };
-
- XMLStringifier.prototype.attEscape = function(str) {
- var ampregex;
- ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
- return str.replace(ampregex, '&').replace(/ 0) {
- return new Array(indent).join(this.indent);
- } else {
- return '';
- }
- } else {
- return '';
- }
- };
-
- return XMLWriterBase;
-
- })();
-
-}).call(this);
-
-
-/***/ }),
-/* 261 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var has = Object.prototype.hasOwnProperty
- , prefix = '~';
-
-/**
- * Constructor to create a storage for our `EE` objects.
- * An `Events` instance is a plain object whose properties are event names.
- *
- * @constructor
- * @private
- */
-function Events() {}
-
-//
-// We try to not inherit from `Object.prototype`. In some engines creating an
-// instance in this way is faster than calling `Object.create(null)` directly.
-// If `Object.create(null)` is not supported we prefix the event names with a
-// character to make sure that the built-in object properties are not
-// overridden or used as an attack vector.
-//
-if (Object.create) {
- Events.prototype = Object.create(null);
-
- //
- // This hack is needed because the `__proto__` property is still inherited in
- // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
- //
- if (!new Events().__proto__) prefix = false;
-}
-
-/**
- * Representation of a single event listener.
- *
- * @param {Function} fn The listener function.
- * @param {*} context The context to invoke the listener with.
- * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
- * @constructor
- * @private
- */
-function EE(fn, context, once) {
- this.fn = fn;
- this.context = context;
- this.once = once || false;
-}
-
-/**
- * Add a listener for a given event.
- *
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} context The context to invoke the listener with.
- * @param {Boolean} once Specify if the listener is a one-time listener.
- * @returns {EventEmitter}
- * @private
- */
-function addListener(emitter, event, fn, context, once) {
- if (typeof fn !== 'function') {
- throw new TypeError('The listener must be a function');
- }
-
- var listener = new EE(fn, context || emitter, once)
- , evt = prefix ? prefix + event : event;
-
- if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
- else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
- else emitter._events[evt] = [emitter._events[evt], listener];
-
- return emitter;
-}
-
-/**
- * Clear event by name.
- *
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
- * @param {(String|Symbol)} evt The Event name.
- * @private
- */
-function clearEvent(emitter, evt) {
- if (--emitter._eventsCount === 0) emitter._events = new Events();
- else delete emitter._events[evt];
-}
-
-/**
- * Minimal `EventEmitter` interface that is molded against the Node.js
- * `EventEmitter` interface.
- *
- * @constructor
- * @public
- */
-function EventEmitter() {
- this._events = new Events();
- this._eventsCount = 0;
-}
-
-/**
- * Return an array listing the events for which the emitter has registered
- * listeners.
- *
- * @returns {Array}
- * @public
- */
-EventEmitter.prototype.eventNames = function eventNames() {
- var names = []
- , events
- , name;
-
- if (this._eventsCount === 0) return names;
-
- for (name in (events = this._events)) {
- if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
- }
-
- if (Object.getOwnPropertySymbols) {
- return names.concat(Object.getOwnPropertySymbols(events));
- }
-
- return names;
-};
-
-/**
- * Return the listeners registered for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Array} The registered listeners.
- * @public
- */
-EventEmitter.prototype.listeners = function listeners(event) {
- var evt = prefix ? prefix + event : event
- , handlers = this._events[evt];
-
- if (!handlers) return [];
- if (handlers.fn) return [handlers.fn];
-
- for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
- ee[i] = handlers[i].fn;
- }
-
- return ee;
-};
-
-/**
- * Return the number of listeners listening to a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Number} The number of listeners.
- * @public
- */
-EventEmitter.prototype.listenerCount = function listenerCount(event) {
- var evt = prefix ? prefix + event : event
- , listeners = this._events[evt];
-
- if (!listeners) return 0;
- if (listeners.fn) return 1;
- return listeners.length;
-};
-
-/**
- * Calls each of the listeners registered for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @returns {Boolean} `true` if the event had listeners, else `false`.
- * @public
- */
-EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
- var evt = prefix ? prefix + event : event;
-
- if (!this._events[evt]) return false;
-
- var listeners = this._events[evt]
- , len = arguments.length
- , args
- , i;
-
- if (listeners.fn) {
- if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
-
- switch (len) {
- case 1: return listeners.fn.call(listeners.context), true;
- case 2: return listeners.fn.call(listeners.context, a1), true;
- case 3: return listeners.fn.call(listeners.context, a1, a2), true;
- case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
- case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
- case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
- }
-
- for (i = 1, args = new Array(len -1); i < len; i++) {
- args[i - 1] = arguments[i];
- }
-
- listeners.fn.apply(listeners.context, args);
- } else {
- var length = listeners.length
- , j;
-
- for (i = 0; i < length; i++) {
- if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
-
- switch (len) {
- case 1: listeners[i].fn.call(listeners[i].context); break;
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
- case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
- default:
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
- args[j - 1] = arguments[j];
- }
-
- listeners[i].fn.apply(listeners[i].context, args);
- }
- }
- }
-
- return true;
-};
-
-/**
- * Add a listener for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} [context=this] The context to invoke the listener with.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.on = function on(event, fn, context) {
- return addListener(this, event, fn, context, false);
-};
-
-/**
- * Add a one-time listener for a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn The listener function.
- * @param {*} [context=this] The context to invoke the listener with.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.once = function once(event, fn, context) {
- return addListener(this, event, fn, context, true);
-};
-
-/**
- * Remove the listeners of a given event.
- *
- * @param {(String|Symbol)} event The event name.
- * @param {Function} fn Only remove the listeners that match this function.
- * @param {*} context Only remove the listeners that have this context.
- * @param {Boolean} once Only remove one-time listeners.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
- var evt = prefix ? prefix + event : event;
-
- if (!this._events[evt]) return this;
- if (!fn) {
- clearEvent(this, evt);
- return this;
- }
-
- var listeners = this._events[evt];
-
- if (listeners.fn) {
- if (
- listeners.fn === fn &&
- (!once || listeners.once) &&
- (!context || listeners.context === context)
- ) {
- clearEvent(this, evt);
- }
- } else {
- for (var i = 0, events = [], length = listeners.length; i < length; i++) {
- if (
- listeners[i].fn !== fn ||
- (once && !listeners[i].once) ||
- (context && listeners[i].context !== context)
- ) {
- events.push(listeners[i]);
- }
- }
-
- //
- // Reset the array, or remove it completely if we have no more listeners.
- //
- if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
- else clearEvent(this, evt);
- }
-
- return this;
-};
-
-/**
- * Remove all listeners, or those of the specified event.
- *
- * @param {(String|Symbol)} [event] The event name.
- * @returns {EventEmitter} `this`.
- * @public
- */
-EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
- var evt;
-
- if (event) {
- evt = prefix ? prefix + event : event;
- if (this._events[evt]) clearEvent(this, evt);
- } else {
- this._events = new Events();
- this._eventsCount = 0;
- }
-
- return this;
-};
-
-//
-// Alias methods names because people roll like that.
-//
-EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
-EventEmitter.prototype.addListener = EventEmitter.prototype.on;
-
-//
-// Expose the prefix.
-//
-EventEmitter.prefixed = prefix;
-
-//
-// Allow `EventEmitter` to be imported as module namespace.
-//
-EventEmitter.EventEmitter = EventEmitter;
-
-//
-// Expose the module.
-//
-if (true) {
- module.exports = EventEmitter;
-}
-
-
-/***/ }),
-/* 262 */
-/***/ (function(module, exports, __webpack_require__) {
-
-!function(t,e){ true?module.exports=e():undefined}(this,function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e){function r(t,e={}){function r(t,e){var r,o,n;return o=/^[+-]?\d+$/g,n=/^[+-]?\d*\.\d+$/g,(r=/^[\'\"](.*)[\'\"]$/g).test(t)?t.replace(r,"$1"):o.test(t)?parseInt(t,10):n.test(t)?parseFloat(t):e(t)}function o(e,o,n){var u,i,c,f=[e];for(u=/\:\s*([\'][^\']*[\']|[\"][^\"]*[\"]|[^\:]+)\s*/g,c=(i=/^\s*([^\:]+)/g.exec(o))[1].trim();i=u.exec(o);)f.push(r(i[1].trim(),n));return t.Formatters.hasOwnProperty(c)?(o=t.Formatters[c]).apply(o,f):e}t.Formatters=e;const n=t.Context.prototype.lookup;return t.Context.prototype.lookup=function(t){const e=t.split("|");let r=e.shift().trim();r=n.call(this,r);for(let t=0,n=e.length;t=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof a)return c(a,b,d);var g="application/octet-stream"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||g&&h)&&"object"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a, true&&(module.exports=a)});
-
-//# sourceMappingURL=FileSaver.min.js.map
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)))
-
-/***/ }),
-/* 264 */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(265);
-module.exports = __webpack_require__(557);
-
-
-/***/ }),
-/* 265 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {
-
-__webpack_require__(266);
-
-__webpack_require__(463);
-
-__webpack_require__(464);
-
-if (global._babelPolyfill) {
- throw new Error("only one instance of babel-polyfill is allowed");
-}
-global._babelPolyfill = true;
-
-var DEFINE_PROPERTY = "defineProperty";
-function define(O, key, value) {
- O[key] || Object[DEFINE_PROPERTY](O, key, {
- writable: true,
- configurable: true,
- value: value
- });
-}
-
-define(String.prototype, "padLeft", "".padStart);
-define(String.prototype, "padRight", "".padEnd);
-
-"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
- [][key] && define(Array, key, Function.call.bind([][key]));
-});
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)))
-
-/***/ }),
-/* 266 */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(267);
-__webpack_require__(270);
-__webpack_require__(271);
-__webpack_require__(272);
-__webpack_require__(273);
-__webpack_require__(274);
-__webpack_require__(275);
-__webpack_require__(276);
-__webpack_require__(277);
-__webpack_require__(278);
-__webpack_require__(279);
-__webpack_require__(280);
-__webpack_require__(281);
-__webpack_require__(282);
-__webpack_require__(283);
-__webpack_require__(284);
-__webpack_require__(285);
-__webpack_require__(286);
-__webpack_require__(287);
-__webpack_require__(288);
-__webpack_require__(289);
-__webpack_require__(290);
-__webpack_require__(291);
-__webpack_require__(292);
-__webpack_require__(293);
-__webpack_require__(294);
-__webpack_require__(295);
-__webpack_require__(296);
-__webpack_require__(297);
-__webpack_require__(298);
-__webpack_require__(299);
-__webpack_require__(300);
-__webpack_require__(301);
-__webpack_require__(302);
-__webpack_require__(303);
-__webpack_require__(304);
-__webpack_require__(305);
-__webpack_require__(306);
-__webpack_require__(307);
-__webpack_require__(308);
-__webpack_require__(309);
-__webpack_require__(310);
-__webpack_require__(311);
-__webpack_require__(312);
-__webpack_require__(313);
-__webpack_require__(314);
-__webpack_require__(315);
-__webpack_require__(316);
-__webpack_require__(317);
-__webpack_require__(318);
-__webpack_require__(319);
-__webpack_require__(320);
-__webpack_require__(321);
-__webpack_require__(322);
-__webpack_require__(323);
-__webpack_require__(324);
-__webpack_require__(325);
-__webpack_require__(326);
-__webpack_require__(327);
-__webpack_require__(328);
-__webpack_require__(329);
-__webpack_require__(330);
-__webpack_require__(331);
-__webpack_require__(332);
-__webpack_require__(333);
-__webpack_require__(334);
-__webpack_require__(335);
-__webpack_require__(336);
-__webpack_require__(337);
-__webpack_require__(338);
-__webpack_require__(339);
-__webpack_require__(340);
-__webpack_require__(341);
-__webpack_require__(342);
-__webpack_require__(343);
-__webpack_require__(344);
-__webpack_require__(345);
-__webpack_require__(347);
-__webpack_require__(348);
-__webpack_require__(350);
-__webpack_require__(351);
-__webpack_require__(352);
-__webpack_require__(353);
-__webpack_require__(354);
-__webpack_require__(355);
-__webpack_require__(356);
-__webpack_require__(358);
-__webpack_require__(359);
-__webpack_require__(360);
-__webpack_require__(361);
-__webpack_require__(362);
-__webpack_require__(363);
-__webpack_require__(364);
-__webpack_require__(365);
-__webpack_require__(366);
-__webpack_require__(367);
-__webpack_require__(368);
-__webpack_require__(369);
-__webpack_require__(370);
-__webpack_require__(132);
-__webpack_require__(371);
-__webpack_require__(188);
-__webpack_require__(372);
-__webpack_require__(189);
-__webpack_require__(373);
-__webpack_require__(374);
-__webpack_require__(375);
-__webpack_require__(376);
-__webpack_require__(377);
-__webpack_require__(192);
-__webpack_require__(194);
-__webpack_require__(195);
-__webpack_require__(378);
-__webpack_require__(379);
-__webpack_require__(380);
-__webpack_require__(381);
-__webpack_require__(382);
-__webpack_require__(383);
-__webpack_require__(384);
-__webpack_require__(385);
-__webpack_require__(386);
-__webpack_require__(387);
-__webpack_require__(388);
-__webpack_require__(389);
-__webpack_require__(390);
-__webpack_require__(391);
-__webpack_require__(392);
-__webpack_require__(393);
-__webpack_require__(394);
-__webpack_require__(395);
-__webpack_require__(396);
-__webpack_require__(397);
-__webpack_require__(398);
-__webpack_require__(399);
-__webpack_require__(400);
-__webpack_require__(401);
-__webpack_require__(402);
-__webpack_require__(403);
-__webpack_require__(404);
-__webpack_require__(405);
-__webpack_require__(406);
-__webpack_require__(407);
-__webpack_require__(408);
-__webpack_require__(409);
-__webpack_require__(410);
-__webpack_require__(411);
-__webpack_require__(412);
-__webpack_require__(413);
-__webpack_require__(414);
-__webpack_require__(415);
-__webpack_require__(416);
-__webpack_require__(417);
-__webpack_require__(418);
-__webpack_require__(419);
-__webpack_require__(420);
-__webpack_require__(421);
-__webpack_require__(422);
-__webpack_require__(423);
-__webpack_require__(424);
-__webpack_require__(425);
-__webpack_require__(426);
-__webpack_require__(427);
-__webpack_require__(428);
-__webpack_require__(429);
-__webpack_require__(430);
-__webpack_require__(431);
-__webpack_require__(432);
-__webpack_require__(433);
-__webpack_require__(434);
-__webpack_require__(435);
-__webpack_require__(436);
-__webpack_require__(437);
-__webpack_require__(438);
-__webpack_require__(439);
-__webpack_require__(440);
-__webpack_require__(441);
-__webpack_require__(442);
-__webpack_require__(443);
-__webpack_require__(444);
-__webpack_require__(445);
-__webpack_require__(446);
-__webpack_require__(447);
-__webpack_require__(448);
-__webpack_require__(449);
-__webpack_require__(450);
-__webpack_require__(451);
-__webpack_require__(452);
-__webpack_require__(453);
-__webpack_require__(454);
-__webpack_require__(455);
-__webpack_require__(456);
-__webpack_require__(457);
-__webpack_require__(458);
-__webpack_require__(459);
-__webpack_require__(460);
-__webpack_require__(461);
-__webpack_require__(462);
-module.exports = __webpack_require__(28);
-
-
-/***/ }),
-/* 267 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// ECMAScript 6 symbols shim
-var global = __webpack_require__(4);
-var has = __webpack_require__(21);
-var DESCRIPTORS = __webpack_require__(9);
-var $export = __webpack_require__(1);
-var redefine = __webpack_require__(18);
-var META = __webpack_require__(41).KEY;
-var $fails = __webpack_require__(5);
-var shared = __webpack_require__(68);
-var setToStringTag = __webpack_require__(59);
-var uid = __webpack_require__(48);
-var wks = __webpack_require__(7);
-var wksExt = __webpack_require__(170);
-var wksDefine = __webpack_require__(113);
-var enumKeys = __webpack_require__(269);
-var isArray = __webpack_require__(79);
-var anObject = __webpack_require__(3);
-var isObject = __webpack_require__(6);
-var toObject = __webpack_require__(13);
-var toIObject = __webpack_require__(22);
-var toPrimitive = __webpack_require__(33);
-var createDesc = __webpack_require__(47);
-var _create = __webpack_require__(51);
-var gOPNExt = __webpack_require__(173);
-var $GOPD = __webpack_require__(23);
-var $GOPS = __webpack_require__(78);
-var $DP = __webpack_require__(12);
-var $keys = __webpack_require__(49);
-var gOPD = $GOPD.f;
-var dP = $DP.f;
-var gOPN = gOPNExt.f;
-var $Symbol = global.Symbol;
-var $JSON = global.JSON;
-var _stringify = $JSON && $JSON.stringify;
-var PROTOTYPE = 'prototype';
-var HIDDEN = wks('_hidden');
-var TO_PRIMITIVE = wks('toPrimitive');
-var isEnum = {}.propertyIsEnumerable;
-var SymbolRegistry = shared('symbol-registry');
-var AllSymbols = shared('symbols');
-var OPSymbols = shared('op-symbols');
-var ObjectProto = Object[PROTOTYPE];
-var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
-var QObject = global.QObject;
-// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
-// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
-var setSymbolDesc = DESCRIPTORS && $fails(function () {
- return _create(dP({}, 'a', {
- get: function () { return dP(this, 'a', { value: 7 }).a; }
- })).a != 7;
-}) ? function (it, key, D) {
- var protoDesc = gOPD(ObjectProto, key);
- if (protoDesc) delete ObjectProto[key];
- dP(it, key, D);
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
-} : dP;
-
-var wrap = function (tag) {
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
-};
-
-var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
- return typeof it == 'symbol';
-} : function (it) {
- return it instanceof $Symbol;
-};
-
-var $defineProperty = function defineProperty(it, key, D) {
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if (has(AllSymbols, key)) {
- if (!D.enumerable) {
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
- D = _create(D, { enumerable: createDesc(0, false) });
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
-};
-var $defineProperties = function defineProperties(it, P) {
- anObject(it);
- var keys = enumKeys(P = toIObject(P));
- var i = 0;
- var l = keys.length;
- var key;
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
- return it;
-};
-var $create = function create(it, P) {
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
-};
-var $propertyIsEnumerable = function propertyIsEnumerable(key) {
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
-};
-var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
- it = toIObject(it);
- key = toPrimitive(key, true);
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
- var D = gOPD(it, key);
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
- return D;
-};
-var $getOwnPropertyNames = function getOwnPropertyNames(it) {
- var names = gOPN(toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
- } return result;
-};
-var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
- var IS_OP = it === ObjectProto;
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
- } return result;
-};
-
-// 19.4.1.1 Symbol([description])
-if (!USE_NATIVE) {
- $Symbol = function Symbol() {
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function (value) {
- if (this === ObjectProto) $set.call(OPSymbols, value);
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(52).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(70).f = $propertyIsEnumerable;
- $GOPS.f = $getOwnPropertySymbols;
-
- if (DESCRIPTORS && !__webpack_require__(40)) {
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function (name) {
- return wrap(wks(name));
- };
-}
-
-$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
-
-for (var es6Symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
-).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
-
-for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
-
-$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function (key) {
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(sym) {
- if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
- for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
- },
- useSetter: function () { setter = true; },
- useSimple: function () { setter = false; }
-});
-
-$export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
-});
-
-// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
-// https://bugs.chromium.org/p/v8/issues/detail?id=3443
-var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
-
-$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
- return $GOPS.f(toObject(it));
- }
-});
-
-// 24.3.2 JSON.stringify(value [, replacer [, space]])
-$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
-})), 'JSON', {
- stringify: function stringify(it) {
- var args = [it];
- var i = 1;
- var replacer, $replacer;
- while (arguments.length > i) args.push(arguments[i++]);
- $replacer = replacer = args[1];
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
- if (!isArray(replacer)) replacer = function (key, value) {
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
-});
-
-// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
-$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(17)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
-// 19.4.3.5 Symbol.prototype[@@toStringTag]
-setToStringTag($Symbol, 'Symbol');
-// 20.2.1.9 Math[@@toStringTag]
-setToStringTag(Math, 'Math', true);
-// 24.3.3 JSON[@@toStringTag]
-setToStringTag(global.JSON, 'JSON', true);
-
-
-/***/ }),
-/* 268 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(68)('native-function-to-string', Function.toString);
-
-
-/***/ }),
-/* 269 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// all enumerable object keys, includes symbols
-var getKeys = __webpack_require__(49);
-var gOPS = __webpack_require__(78);
-var pIE = __webpack_require__(70);
-module.exports = function (it) {
- var result = getKeys(it);
- var getSymbols = gOPS.f;
- if (getSymbols) {
- var symbols = getSymbols(it);
- var isEnum = pIE.f;
- var i = 0;
- var key;
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
- } return result;
-};
-
-
-/***/ }),
-/* 270 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-$export($export.S, 'Object', { create: __webpack_require__(51) });
-
-
-/***/ }),
-/* 271 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
-$export($export.S + $export.F * !__webpack_require__(9), 'Object', { defineProperty: __webpack_require__(12).f });
-
-
-/***/ }),
-/* 272 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
-$export($export.S + $export.F * !__webpack_require__(9), 'Object', { defineProperties: __webpack_require__(172) });
-
-
-/***/ }),
-/* 273 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
-var toIObject = __webpack_require__(22);
-var $getOwnPropertyDescriptor = __webpack_require__(23).f;
-
-__webpack_require__(35)('getOwnPropertyDescriptor', function () {
- return function getOwnPropertyDescriptor(it, key) {
- return $getOwnPropertyDescriptor(toIObject(it), key);
- };
-});
-
-
-/***/ }),
-/* 274 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.9 Object.getPrototypeOf(O)
-var toObject = __webpack_require__(13);
-var $getPrototypeOf = __webpack_require__(24);
-
-__webpack_require__(35)('getPrototypeOf', function () {
- return function getPrototypeOf(it) {
- return $getPrototypeOf(toObject(it));
- };
-});
-
-
-/***/ }),
-/* 275 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.14 Object.keys(O)
-var toObject = __webpack_require__(13);
-var $keys = __webpack_require__(49);
-
-__webpack_require__(35)('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
-});
-
-
-/***/ }),
-/* 276 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.7 Object.getOwnPropertyNames(O)
-__webpack_require__(35)('getOwnPropertyNames', function () {
- return __webpack_require__(173).f;
-});
-
-
-/***/ }),
-/* 277 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.5 Object.freeze(O)
-var isObject = __webpack_require__(6);
-var meta = __webpack_require__(41).onFreeze;
-
-__webpack_require__(35)('freeze', function ($freeze) {
- return function freeze(it) {
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
- };
-});
-
-
-/***/ }),
-/* 278 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.17 Object.seal(O)
-var isObject = __webpack_require__(6);
-var meta = __webpack_require__(41).onFreeze;
-
-__webpack_require__(35)('seal', function ($seal) {
- return function seal(it) {
- return $seal && isObject(it) ? $seal(meta(it)) : it;
- };
-});
-
-
-/***/ }),
-/* 279 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.15 Object.preventExtensions(O)
-var isObject = __webpack_require__(6);
-var meta = __webpack_require__(41).onFreeze;
-
-__webpack_require__(35)('preventExtensions', function ($preventExtensions) {
- return function preventExtensions(it) {
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
- };
-});
-
-
-/***/ }),
-/* 280 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.12 Object.isFrozen(O)
-var isObject = __webpack_require__(6);
-
-__webpack_require__(35)('isFrozen', function ($isFrozen) {
- return function isFrozen(it) {
- return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
- };
-});
-
-
-/***/ }),
-/* 281 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.13 Object.isSealed(O)
-var isObject = __webpack_require__(6);
-
-__webpack_require__(35)('isSealed', function ($isSealed) {
- return function isSealed(it) {
- return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
- };
-});
-
-
-/***/ }),
-/* 282 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.11 Object.isExtensible(O)
-var isObject = __webpack_require__(6);
-
-__webpack_require__(35)('isExtensible', function ($isExtensible) {
- return function isExtensible(it) {
- return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
- };
-});
-
-
-/***/ }),
-/* 283 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.3.1 Object.assign(target, source)
-var $export = __webpack_require__(1);
-
-$export($export.S + $export.F, 'Object', { assign: __webpack_require__(174) });
-
-
-/***/ }),
-/* 284 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.3.10 Object.is(value1, value2)
-var $export = __webpack_require__(1);
-$export($export.S, 'Object', { is: __webpack_require__(175) });
-
-
-/***/ }),
-/* 285 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.3.19 Object.setPrototypeOf(O, proto)
-var $export = __webpack_require__(1);
-$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(117).set });
-
-
-/***/ }),
-/* 286 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 19.1.3.6 Object.prototype.toString()
-var classof = __webpack_require__(60);
-var test = {};
-test[__webpack_require__(7)('toStringTag')] = 'z';
-if (test + '' != '[object z]') {
- __webpack_require__(18)(Object.prototype, 'toString', function toString() {
- return '[object ' + classof(this) + ']';
- }, true);
-}
-
-
-/***/ }),
-/* 287 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = __webpack_require__(1);
-
-$export($export.P, 'Function', { bind: __webpack_require__(176) });
-
-
-/***/ }),
-/* 288 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var dP = __webpack_require__(12).f;
-var FProto = Function.prototype;
-var nameRE = /^\s*function ([^ (]*)/;
-var NAME = 'name';
-
-// 19.2.4.2 name
-NAME in FProto || __webpack_require__(9) && dP(FProto, NAME, {
- configurable: true,
- get: function () {
- try {
- return ('' + this).match(nameRE)[1];
- } catch (e) {
- return '';
- }
- }
-});
-
-
-/***/ }),
-/* 289 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var isObject = __webpack_require__(6);
-var getPrototypeOf = __webpack_require__(24);
-var HAS_INSTANCE = __webpack_require__(7)('hasInstance');
-var FunctionProto = Function.prototype;
-// 19.2.3.6 Function.prototype[@@hasInstance](V)
-if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(12).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
- if (typeof this != 'function' || !isObject(O)) return false;
- if (!isObject(this.prototype)) return O instanceof this;
- // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
- return false;
-} });
-
-
-/***/ }),
-/* 290 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var $parseInt = __webpack_require__(178);
-// 18.2.5 parseInt(string, radix)
-$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
-
-
-/***/ }),
-/* 291 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var $parseFloat = __webpack_require__(179);
-// 18.2.4 parseFloat(string)
-$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
-
-
-/***/ }),
-/* 292 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var global = __webpack_require__(4);
-var has = __webpack_require__(21);
-var cof = __webpack_require__(30);
-var inheritIfRequired = __webpack_require__(119);
-var toPrimitive = __webpack_require__(33);
-var fails = __webpack_require__(5);
-var gOPN = __webpack_require__(52).f;
-var gOPD = __webpack_require__(23).f;
-var dP = __webpack_require__(12).f;
-var $trim = __webpack_require__(61).trim;
-var NUMBER = 'Number';
-var $Number = global[NUMBER];
-var Base = $Number;
-var proto = $Number.prototype;
-// Opera ~12 has broken Object#toString
-var BROKEN_COF = cof(__webpack_require__(51)(proto)) == NUMBER;
-var TRIM = 'trim' in String.prototype;
-
-// 7.1.3 ToNumber(argument)
-var toNumber = function (argument) {
- var it = toPrimitive(argument, false);
- if (typeof it == 'string' && it.length > 2) {
- it = TRIM ? it.trim() : $trim(it, 3);
- var first = it.charCodeAt(0);
- var third, radix, maxCode;
- if (first === 43 || first === 45) {
- third = it.charCodeAt(2);
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
- } else if (first === 48) {
- switch (it.charCodeAt(1)) {
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
- default: return +it;
- }
- for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
- code = digits.charCodeAt(i);
- // parseInt parses a string to a first unavailable symbol
- // but ToNumber should return NaN if a string contains unavailable symbols
- if (code < 48 || code > maxCode) return NaN;
- } return parseInt(digits, radix);
- }
- } return +it;
-};
-
-if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
- $Number = function Number(value) {
- var it = arguments.length < 1 ? 0 : value;
- var that = this;
- return that instanceof $Number
- // check on 1..constructor(foo) case
- && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
- };
- for (var keys = __webpack_require__(9) ? gOPN(Base) : (
- // ES3:
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
- // ES6 (in case, if modules with ES6 Number statics required before):
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++) {
- if (has(Base, key = keys[j]) && !has($Number, key)) {
- dP($Number, key, gOPD(Base, key));
- }
- }
- $Number.prototype = proto;
- proto.constructor = $Number;
- __webpack_require__(18)(global, NUMBER, $Number);
-}
-
-
-/***/ }),
-/* 293 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $export = __webpack_require__(1);
-var toInteger = __webpack_require__(31);
-var aNumberValue = __webpack_require__(180);
-var repeat = __webpack_require__(120);
-var $toFixed = 1.0.toFixed;
-var floor = Math.floor;
-var data = [0, 0, 0, 0, 0, 0];
-var ERROR = 'Number.toFixed: incorrect invocation!';
-var ZERO = '0';
-
-var multiply = function (n, c) {
- var i = -1;
- var c2 = c;
- while (++i < 6) {
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
-};
-var divide = function (n) {
- var i = 6;
- var c = 0;
- while (--i >= 0) {
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
-};
-var numToString = function () {
- var i = 6;
- var s = '';
- while (--i >= 0) {
- if (s !== '' || i === 0 || data[i] !== 0) {
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
-};
-var pow = function (x, n, acc) {
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
-};
-var log = function (x) {
- var n = 0;
- var x2 = x;
- while (x2 >= 4096) {
- n += 12;
- x2 /= 4096;
- }
- while (x2 >= 2) {
- n += 1;
- x2 /= 2;
- } return n;
-};
-
-$export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128.0.toFixed(0) !== '1000000000000000128'
-) || !__webpack_require__(5)(function () {
- // V8 ~ Android 4.3-
- $toFixed.call({});
-})), 'Number', {
- toFixed: function toFixed(fractionDigits) {
- var x = aNumberValue(this, ERROR);
- var f = toInteger(fractionDigits);
- var s = '';
- var m = ZERO;
- var e, z, j, k;
- if (f < 0 || f > 20) throw RangeError(ERROR);
- // eslint-disable-next-line no-self-compare
- if (x != x) return 'NaN';
- if (x <= -1e21 || x >= 1e21) return String(x);
- if (x < 0) {
- s = '-';
- x = -x;
- }
- if (x > 1e-21) {
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if (e > 0) {
- multiply(0, z);
- j = f;
- while (j >= 7) {
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while (j >= 23) {
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if (f > 0) {
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
-});
-
-
-/***/ }),
-/* 294 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $export = __webpack_require__(1);
-var $fails = __webpack_require__(5);
-var aNumberValue = __webpack_require__(180);
-var $toPrecision = 1.0.toPrecision;
-
-$export($export.P + $export.F * ($fails(function () {
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
-}) || !$fails(function () {
- // V8 ~ Android 4.3-
- $toPrecision.call({});
-})), 'Number', {
- toPrecision: function toPrecision(precision) {
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
-});
-
-
-/***/ }),
-/* 295 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.1 Number.EPSILON
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
-
-
-/***/ }),
-/* 296 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.2 Number.isFinite(number)
-var $export = __webpack_require__(1);
-var _isFinite = __webpack_require__(4).isFinite;
-
-$export($export.S, 'Number', {
- isFinite: function isFinite(it) {
- return typeof it == 'number' && _isFinite(it);
- }
-});
-
-
-/***/ }),
-/* 297 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.3 Number.isInteger(number)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Number', { isInteger: __webpack_require__(181) });
-
-
-/***/ }),
-/* 298 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.4 Number.isNaN(number)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Number', {
- isNaN: function isNaN(number) {
- // eslint-disable-next-line no-self-compare
- return number != number;
- }
-});
-
-
-/***/ }),
-/* 299 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.5 Number.isSafeInteger(number)
-var $export = __webpack_require__(1);
-var isInteger = __webpack_require__(181);
-var abs = Math.abs;
-
-$export($export.S, 'Number', {
- isSafeInteger: function isSafeInteger(number) {
- return isInteger(number) && abs(number) <= 0x1fffffffffffff;
- }
-});
-
-
-/***/ }),
-/* 300 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.6 Number.MAX_SAFE_INTEGER
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
-
-
-/***/ }),
-/* 301 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.1.2.10 Number.MIN_SAFE_INTEGER
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
-
-
-/***/ }),
-/* 302 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var $parseFloat = __webpack_require__(179);
-// 20.1.2.12 Number.parseFloat(string)
-$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
-
-
-/***/ }),
-/* 303 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var $parseInt = __webpack_require__(178);
-// 20.1.2.13 Number.parseInt(string, radix)
-$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
-
-
-/***/ }),
-/* 304 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.3 Math.acosh(x)
-var $export = __webpack_require__(1);
-var log1p = __webpack_require__(182);
-var sqrt = Math.sqrt;
-var $acosh = Math.acosh;
-
-$export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
-), 'Math', {
- acosh: function acosh(x) {
- return (x = +x) < 1 ? NaN : x > 94906265.62425156
- ? Math.log(x) + Math.LN2
- : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
- }
-});
-
-
-/***/ }),
-/* 305 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.5 Math.asinh(x)
-var $export = __webpack_require__(1);
-var $asinh = Math.asinh;
-
-function asinh(x) {
- return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
-}
-
-// Tor Browser bug: Math.asinh(0) -> -0
-$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
-
-
-/***/ }),
-/* 306 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.7 Math.atanh(x)
-var $export = __webpack_require__(1);
-var $atanh = Math.atanh;
-
-// Tor Browser bug: Math.atanh(-0) -> 0
-$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
- atanh: function atanh(x) {
- return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
- }
-});
-
-
-/***/ }),
-/* 307 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.9 Math.cbrt(x)
-var $export = __webpack_require__(1);
-var sign = __webpack_require__(121);
-
-$export($export.S, 'Math', {
- cbrt: function cbrt(x) {
- return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
- }
-});
-
-
-/***/ }),
-/* 308 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.11 Math.clz32(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', {
- clz32: function clz32(x) {
- return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
- }
-});
-
-
-/***/ }),
-/* 309 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.12 Math.cosh(x)
-var $export = __webpack_require__(1);
-var exp = Math.exp;
-
-$export($export.S, 'Math', {
- cosh: function cosh(x) {
- return (exp(x = +x) + exp(-x)) / 2;
- }
-});
-
-
-/***/ }),
-/* 310 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.14 Math.expm1(x)
-var $export = __webpack_require__(1);
-var $expm1 = __webpack_require__(122);
-
-$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
-
-
-/***/ }),
-/* 311 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.16 Math.fround(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', { fround: __webpack_require__(183) });
-
-
-/***/ }),
-/* 312 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
-var $export = __webpack_require__(1);
-var abs = Math.abs;
-
-$export($export.S, 'Math', {
- hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
- var sum = 0;
- var i = 0;
- var aLen = arguments.length;
- var larg = 0;
- var arg, div;
- while (i < aLen) {
- arg = abs(arguments[i++]);
- if (larg < arg) {
- div = larg / arg;
- sum = sum * div * div + 1;
- larg = arg;
- } else if (arg > 0) {
- div = arg / larg;
- sum += div * div;
- } else sum += arg;
- }
- return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
- }
-});
-
-
-/***/ }),
-/* 313 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.18 Math.imul(x, y)
-var $export = __webpack_require__(1);
-var $imul = Math.imul;
-
-// some WebKit versions fails with big numbers, some has wrong arity
-$export($export.S + $export.F * __webpack_require__(5)(function () {
- return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
-}), 'Math', {
- imul: function imul(x, y) {
- var UINT16 = 0xffff;
- var xn = +x;
- var yn = +y;
- var xl = UINT16 & xn;
- var yl = UINT16 & yn;
- return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
- }
-});
-
-
-/***/ }),
-/* 314 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.21 Math.log10(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', {
- log10: function log10(x) {
- return Math.log(x) * Math.LOG10E;
- }
-});
-
-
-/***/ }),
-/* 315 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.20 Math.log1p(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', { log1p: __webpack_require__(182) });
-
-
-/***/ }),
-/* 316 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.22 Math.log2(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', {
- log2: function log2(x) {
- return Math.log(x) / Math.LN2;
- }
-});
-
-
-/***/ }),
-/* 317 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.28 Math.sign(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', { sign: __webpack_require__(121) });
-
-
-/***/ }),
-/* 318 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.30 Math.sinh(x)
-var $export = __webpack_require__(1);
-var expm1 = __webpack_require__(122);
-var exp = Math.exp;
-
-// V8 near Chromium 38 has a problem with very small numbers
-$export($export.S + $export.F * __webpack_require__(5)(function () {
- return !Math.sinh(-2e-17) != -2e-17;
-}), 'Math', {
- sinh: function sinh(x) {
- return Math.abs(x = +x) < 1
- ? (expm1(x) - expm1(-x)) / 2
- : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
- }
-});
-
-
-/***/ }),
-/* 319 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.33 Math.tanh(x)
-var $export = __webpack_require__(1);
-var expm1 = __webpack_require__(122);
-var exp = Math.exp;
-
-$export($export.S, 'Math', {
- tanh: function tanh(x) {
- var a = expm1(x = +x);
- var b = expm1(-x);
- return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
- }
-});
-
-
-/***/ }),
-/* 320 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.2.2.34 Math.trunc(x)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', {
- trunc: function trunc(it) {
- return (it > 0 ? Math.floor : Math.ceil)(it);
- }
-});
-
-
-/***/ }),
-/* 321 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var toAbsoluteIndex = __webpack_require__(50);
-var fromCharCode = String.fromCharCode;
-var $fromCodePoint = String.fromCodePoint;
-
-// length should be 1, old FF problem
-$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
- // 21.1.2.2 String.fromCodePoint(...codePoints)
- fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
- var res = [];
- var aLen = arguments.length;
- var i = 0;
- var code;
- while (aLen > i) {
- code = +arguments[i++];
- if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
- res.push(code < 0x10000
- ? fromCharCode(code)
- : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
- );
- } return res.join('');
- }
-});
-
-
-/***/ }),
-/* 322 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-var toIObject = __webpack_require__(22);
-var toLength = __webpack_require__(8);
-
-$export($export.S, 'String', {
- // 21.1.2.4 String.raw(callSite, ...substitutions)
- raw: function raw(callSite) {
- var tpl = toIObject(callSite.raw);
- var len = toLength(tpl.length);
- var aLen = arguments.length;
- var res = [];
- var i = 0;
- while (len > i) {
- res.push(String(tpl[i++]));
- if (i < aLen) res.push(String(arguments[i]));
- } return res.join('');
- }
-});
-
-
-/***/ }),
-/* 323 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 21.1.3.25 String.prototype.trim()
-__webpack_require__(61)('trim', function ($trim) {
- return function trim() {
- return $trim(this, 3);
- };
-});
-
-
-/***/ }),
-/* 324 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $at = __webpack_require__(80)(true);
-
-// 21.1.3.27 String.prototype[@@iterator]()
-__webpack_require__(123)(String, 'String', function (iterated) {
- this._t = String(iterated); // target
- this._i = 0; // next index
-// 21.1.5.2.1 %StringIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var index = this._i;
- var point;
- if (index >= O.length) return { value: undefined, done: true };
- point = $at(O, index);
- this._i += point.length;
- return { value: point, done: false };
-});
-
-
-/***/ }),
-/* 325 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $export = __webpack_require__(1);
-var $at = __webpack_require__(80)(false);
-$export($export.P, 'String', {
- // 21.1.3.3 String.prototype.codePointAt(pos)
- codePointAt: function codePointAt(pos) {
- return $at(this, pos);
- }
-});
-
-
-/***/ }),
-/* 326 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
-
-var $export = __webpack_require__(1);
-var toLength = __webpack_require__(8);
-var context = __webpack_require__(125);
-var ENDS_WITH = 'endsWith';
-var $endsWith = ''[ENDS_WITH];
-
-$export($export.P + $export.F * __webpack_require__(126)(ENDS_WITH), 'String', {
- endsWith: function endsWith(searchString /* , endPosition = @length */) {
- var that = context(this, searchString, ENDS_WITH);
- var endPosition = arguments.length > 1 ? arguments[1] : undefined;
- var len = toLength(that.length);
- var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
- var search = String(searchString);
- return $endsWith
- ? $endsWith.call(that, search, end)
- : that.slice(end - search.length, end) === search;
- }
-});
-
-
-/***/ }),
-/* 327 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// 21.1.3.7 String.prototype.includes(searchString, position = 0)
-
-var $export = __webpack_require__(1);
-var context = __webpack_require__(125);
-var INCLUDES = 'includes';
-
-$export($export.P + $export.F * __webpack_require__(126)(INCLUDES), 'String', {
- includes: function includes(searchString /* , position = 0 */) {
- return !!~context(this, searchString, INCLUDES)
- .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-
-
-/***/ }),
-/* 328 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var $export = __webpack_require__(1);
-
-$export($export.P, 'String', {
- // 21.1.3.13 String.prototype.repeat(count)
- repeat: __webpack_require__(120)
-});
-
-
-/***/ }),
-/* 329 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
-
-var $export = __webpack_require__(1);
-var toLength = __webpack_require__(8);
-var context = __webpack_require__(125);
-var STARTS_WITH = 'startsWith';
-var $startsWith = ''[STARTS_WITH];
-
-$export($export.P + $export.F * __webpack_require__(126)(STARTS_WITH), 'String', {
- startsWith: function startsWith(searchString /* , position = 0 */) {
- var that = context(this, searchString, STARTS_WITH);
- var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
- var search = String(searchString);
- return $startsWith
- ? $startsWith.call(that, search, index)
- : that.slice(index, index + search.length) === search;
- }
-});
-
-
-/***/ }),
-/* 330 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.2 String.prototype.anchor(name)
-__webpack_require__(19)('anchor', function (createHTML) {
- return function anchor(name) {
- return createHTML(this, 'a', 'name', name);
- };
-});
-
-
-/***/ }),
-/* 331 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.3 String.prototype.big()
-__webpack_require__(19)('big', function (createHTML) {
- return function big() {
- return createHTML(this, 'big', '', '');
- };
-});
-
-
-/***/ }),
-/* 332 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.4 String.prototype.blink()
-__webpack_require__(19)('blink', function (createHTML) {
- return function blink() {
- return createHTML(this, 'blink', '', '');
- };
-});
-
-
-/***/ }),
-/* 333 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.5 String.prototype.bold()
-__webpack_require__(19)('bold', function (createHTML) {
- return function bold() {
- return createHTML(this, 'b', '', '');
- };
-});
-
-
-/***/ }),
-/* 334 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.6 String.prototype.fixed()
-__webpack_require__(19)('fixed', function (createHTML) {
- return function fixed() {
- return createHTML(this, 'tt', '', '');
- };
-});
-
-
-/***/ }),
-/* 335 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.7 String.prototype.fontcolor(color)
-__webpack_require__(19)('fontcolor', function (createHTML) {
- return function fontcolor(color) {
- return createHTML(this, 'font', 'color', color);
- };
-});
-
-
-/***/ }),
-/* 336 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.8 String.prototype.fontsize(size)
-__webpack_require__(19)('fontsize', function (createHTML) {
- return function fontsize(size) {
- return createHTML(this, 'font', 'size', size);
- };
-});
-
-
-/***/ }),
-/* 337 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.9 String.prototype.italics()
-__webpack_require__(19)('italics', function (createHTML) {
- return function italics() {
- return createHTML(this, 'i', '', '');
- };
-});
-
-
-/***/ }),
-/* 338 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.10 String.prototype.link(url)
-__webpack_require__(19)('link', function (createHTML) {
- return function link(url) {
- return createHTML(this, 'a', 'href', url);
- };
-});
-
-
-/***/ }),
-/* 339 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.11 String.prototype.small()
-__webpack_require__(19)('small', function (createHTML) {
- return function small() {
- return createHTML(this, 'small', '', '');
- };
-});
-
-
-/***/ }),
-/* 340 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// B.2.3.12 String.prototype.strike()
-__webpack_require__(19)('strike', function (createHTML) {
- return function strike() {
- return createHTML(this, 'strike', '', '');
- };
-});
-
-
-/***/ }),
-/* 341 */
-/***/ (function(module, exports, __webpack_require__) {
+ this.addArray(unpack);
+ return;
+ }
+ if (!this.dirty)
+ return;
+ const allRects = this.rects;
+ this.reset();
+ this.addArray(allRects);
+ }
+ /**
+ * Stop adding new element to the current bin and return a new bin.
+ *
+ * note: After calling `next()` all elements will no longer added to previous bins.
+ *
+ * @returns {Bin}
+ * @memberof MaxRectsPacker
+ */
+ next() {
+ this._currentBinIndex = this.bins.length;
+ return this._currentBinIndex;
+ }
+ /**
+ * Load bins to the packer, overwrite exist bins
+ * @param {MaxRectsBin[]} bins MaxRectsBin objects
+ * @memberof MaxRectsPacker
+ */
+ load(bins) {
+ bins.forEach((bin, index) => {
+ if (bin.maxWidth > this.width || bin.maxHeight > this.height) {
+ this.bins.push(new OversizedElementBin(bin.width, bin.height, {}));
+ }
+ else {
+ let newBin = new MaxRectsBin(this.width, this.height, this.padding, bin.options);
+ newBin.freeRects.splice(0);
+ bin.freeRects.forEach((r, i) => {
+ newBin.freeRects.push(new Rectangle(r.width, r.height, r.x, r.y));
+ });
+ newBin.width = bin.width;
+ newBin.height = bin.height;
+ if (bin.tag)
+ newBin.tag = bin.tag;
+ this.bins[index] = newBin;
+ }
+ }, this);
+ }
+ /**
+ * Output current bins to save
+ * @memberof MaxRectsPacker
+ */
+ save() {
+ let saveBins = [];
+ this.bins.forEach((bin => {
+ let saveBin = {
+ width: bin.width,
+ height: bin.height,
+ maxWidth: bin.maxWidth,
+ maxHeight: bin.maxHeight,
+ freeRects: [],
+ rects: [],
+ options: bin.options
+ };
+ if (bin.tag)
+ saveBin = Object.assign(Object.assign({}, saveBin), { tag: bin.tag });
+ bin.freeRects.forEach(r => {
+ saveBin.freeRects.push({
+ x: r.x,
+ y: r.y,
+ width: r.width,
+ height: r.height
+ });
+ });
+ saveBins.push(saveBin);
+ }));
+ return saveBins;
+ }
+ /**
+ * Sort the given rects based on longest edge or surface area.
+ *
+ * If rects have the same sort value, will sort by second key `hash` if presented.
+ *
+ * @private
+ * @param {T[]} rects
+ * @param {PACKING_LOGIC} [logic=PACKING_LOGIC.MAX_EDGE] sorting logic, "area" or "edge"
+ * @returns
+ * @memberof MaxRectsPacker
+ */
+ sort(rects, logic = PACKING_LOGIC.MAX_EDGE) {
+ return rects.slice().sort((a, b) => {
+ const result = (logic === PACKING_LOGIC.MAX_EDGE) ?
+ Math.max(b.width, b.height) - Math.max(a.width, a.height) :
+ b.width * b.height - a.width * a.height;
+ if (result === 0 && a.hash && b.hash) {
+ return a.hash > b.hash ? -1 : 1;
+ }
+ else
+ return result;
+ });
+ }
+ /**
+ * Return current functioning bin index, perior to this wont accept any new elements
+ *
+ * @readonly
+ * @type {number}
+ * @memberof MaxRectsPacker
+ */
+ get currentBinIndex() { return this._currentBinIndex; }
+ /**
+ * Returns dirty status of all child bins
+ *
+ * @readonly
+ * @type {boolean}
+ * @memberof MaxRectsPacker
+ */
+ get dirty() { return this.bins.some(bin => bin.dirty); }
+ /**
+ * Return all rectangles in this packer
+ *
+ * @readonly
+ * @type {T[]}
+ * @memberof MaxRectsPacker
+ */
+ get rects() {
+ let allRects = [];
+ for (let bin of this.bins) {
+ allRects.push(...bin.rects);
+ }
+ return allRects;
+ }
+}
-"use strict";
-// B.2.3.13 String.prototype.sub()
-__webpack_require__(19)('sub', function (createHTML) {
- return function sub() {
- return createHTML(this, 'sub', '', '');
- };
-});
+//# sourceMappingURL=maxrects-packer.mjs.map
/***/ }),
-/* 342 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-// B.2.3.14 String.prototype.sup()
-__webpack_require__(19)('sup', function (createHTML) {
- return function sup() {
- return createHTML(this, 'sup', '', '');
- };
-});
-
-/***/ }),
-/* 343 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
-/***/ }),
-/* 344 */
-/***/ (function(module, exports, __webpack_require__) {
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
-"use strict";
+// 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
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var toPrimitive = __webpack_require__(33);
+function getLens (b64) {
+ var len = b64.length
-$export($export.P + $export.F * __webpack_require__(5)(function () {
- return new Date(NaN).toJSON() !== null
- || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
-}), 'Date', {
- // eslint-disable-next-line no-unused-vars
- toJSON: function toJSON(key) {
- var O = toObject(this);
- var pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
}
-});
-
-
-/***/ }),
-/* 345 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var $export = __webpack_require__(1);
-var toISOString = __webpack_require__(346);
-
-// PhantomJS / old WebKit has a broken implementations
-$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
- toISOString: toISOString
-});
-
-
-/***/ }),
-/* 346 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var fails = __webpack_require__(5);
-var getTime = Date.prototype.getTime;
-var $toISOString = Date.prototype.toISOString;
-
-var lz = function (num) {
- return num > 9 ? num : '0' + num;
-};
-
-// PhantomJS / old WebKit has a broken implementations
-module.exports = (fails(function () {
- return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
-}) || !fails(function () {
- $toISOString.call(new Date(NaN));
-})) ? function toISOString() {
- if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
- var d = this;
- var y = d.getUTCFullYear();
- var m = d.getUTCMilliseconds();
- var s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
-} : $toISOString;
+ // 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
-/***/ }),
-/* 347 */
-/***/ (function(module, exports, __webpack_require__) {
+ var placeHoldersLen = validLen === len
+ ? 0
+ : 4 - (validLen % 4)
-var DateProto = Date.prototype;
-var INVALID_DATE = 'Invalid Date';
-var TO_STRING = 'toString';
-var $toString = DateProto[TO_STRING];
-var getTime = DateProto.getTime;
-if (new Date(NaN) + '' != INVALID_DATE) {
- __webpack_require__(18)(DateProto, TO_STRING, function toString() {
- var value = getTime.call(this);
- // eslint-disable-next-line no-self-compare
- return value === value ? $toString.call(this) : INVALID_DATE;
- });
+ 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
+}
-/***/ }),
-/* 348 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var TO_PRIMITIVE = __webpack_require__(7)('toPrimitive');
-var proto = Date.prototype;
-
-if (!(TO_PRIMITIVE in proto)) __webpack_require__(17)(proto, TO_PRIMITIVE, __webpack_require__(349));
-
-
-/***/ }),
-/* 349 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var anObject = __webpack_require__(3);
-var toPrimitive = __webpack_require__(33);
-var NUMBER = 'number';
-
-module.exports = function (hint) {
- if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
-};
-
-
-/***/ }),
-/* 350 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Array', { isArray: __webpack_require__(79) });
+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]
-/***/ }),
-/* 351 */
-/***/ (function(module, exports, __webpack_require__) {
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
-"use strict";
+ var curByte = 0
-var ctx = __webpack_require__(29);
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var call = __webpack_require__(184);
-var isArrayIter = __webpack_require__(127);
-var toLength = __webpack_require__(8);
-var createProperty = __webpack_require__(128);
-var getIterFn = __webpack_require__(129);
+ // if there are placeholders, only get up to the last complete 4 chars
+ var len = placeHoldersLen > 0
+ ? validLen - 4
+ : validLen
-$export($export.S + $export.F * !__webpack_require__(82)(function (iter) { Array.from(iter); }), 'Array', {
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
- from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var aLen = arguments.length;
- var mapfn = aLen > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var index = 0;
- var iterFn = getIterFn(O);
- var length, result, step, iterator;
- if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
- // if object isn't iterable or it's array with default iterator - use simple case
- if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
- for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
- }
- } else {
- length = toLength(O.length);
- for (result = new C(length); length > index; index++) {
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
- }
- }
- result.length = index;
- return result;
+ 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
}
-});
-
-
-/***/ }),
-/* 352 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $export = __webpack_require__(1);
-var createProperty = __webpack_require__(128);
-// WebKit Array.of isn't generic
-$export($export.S + $export.F * __webpack_require__(5)(function () {
- function F() { /* empty */ }
- return !(Array.of.call(F) instanceof F);
-}), 'Array', {
- // 22.1.2.3 Array.of( ...items)
- of: function of(/* ...args */) {
- var index = 0;
- var aLen = arguments.length;
- var result = new (typeof this == 'function' ? this : Array)(aLen);
- while (aLen > index) createProperty(result, index, arguments[index++]);
- result.length = aLen;
- return result;
+ if (placeHoldersLen === 2) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 2) |
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[curByte++] = tmp & 0xFF
}
-});
-
-
-/***/ }),
-/* 353 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 22.1.3.13 Array.prototype.join(separator)
-var $export = __webpack_require__(1);
-var toIObject = __webpack_require__(22);
-var arrayJoin = [].join;
-// fallback for not array-like strings
-$export($export.P + $export.F * (__webpack_require__(69) != Object || !__webpack_require__(32)(arrayJoin)), 'Array', {
- join: function join(separator) {
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
+ 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
}
-});
-
-
-/***/ }),
-/* 354 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+ return arr
+}
-var $export = __webpack_require__(1);
-var html = __webpack_require__(116);
-var cof = __webpack_require__(30);
-var toAbsoluteIndex = __webpack_require__(50);
-var toLength = __webpack_require__(8);
-var arraySlice = [].slice;
+function tripletToBase64 (num) {
+ return lookup[num >> 18 & 0x3F] +
+ lookup[num >> 12 & 0x3F] +
+ lookup[num >> 6 & 0x3F] +
+ lookup[num & 0x3F]
+}
-// fallback for not array-like ES3 strings and DOM objects
-$export($export.P + $export.F * __webpack_require__(5)(function () {
- if (html) arraySlice.call(html);
-}), 'Array', {
- slice: function slice(begin, end) {
- var len = toLength(this.length);
- var klass = cof(this);
- end = end === undefined ? len : end;
- if (klass == 'Array') return arraySlice.call(this, begin, end);
- var start = toAbsoluteIndex(begin, len);
- var upTo = toAbsoluteIndex(end, len);
- var size = toLength(upTo - start);
- var cloned = new Array(size);
- var i = 0;
- for (; i < size; i++) cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
+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))
}
-});
-
-
-/***/ }),
-/* 355 */
-/***/ (function(module, exports, __webpack_require__) {
+ return output.join('')
+}
-"use strict";
+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
-var $export = __webpack_require__(1);
-var aFunction = __webpack_require__(15);
-var toObject = __webpack_require__(13);
-var fails = __webpack_require__(5);
-var $sort = [].sort;
-var test = [1, 2, 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)))
+ }
-$export($export.P + $export.F * (fails(function () {
- // IE8-
- test.sort(undefined);
-}) || !fails(function () {
- // V8 bug
- test.sort(null);
- // Old WebKit
-}) || !__webpack_require__(32)($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn) {
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
+ // 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('')
+}
-/***/ }),
-/* 356 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+/***/ }),
+/* 195 */
+/***/ (function(module, exports) {
-var $export = __webpack_require__(1);
-var $forEach = __webpack_require__(36)(0);
-var STRICT = __webpack_require__(32)([].forEach, true);
+var toString = {}.toString;
-$export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */) {
- return $forEach(this, callbackfn, arguments[1]);
- }
-});
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
/***/ }),
-/* 357 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 196 */
+/***/ (function(module, exports) {
-var isObject = __webpack_require__(6);
-var isArray = __webpack_require__(79);
-var SPECIES = __webpack_require__(7)('species');
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var XMLDOMImplementation;
-module.exports = function (original) {
- var C;
- if (isArray(original)) {
- C = original.constructor;
- // cross-realm fallback
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
- if (isObject(C)) {
- C = C[SPECIES];
- if (C === null) C = undefined;
- }
- } return C === undefined ? Array : C;
-};
+ module.exports = XMLDOMImplementation = (function() {
+ function XMLDOMImplementation() {}
+ XMLDOMImplementation.prototype.hasFeature = function(feature, version) {
+ return true;
+ };
-/***/ }),
-/* 358 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {
+ throw new Error("This DOM method is not implemented.");
+ };
-"use strict";
+ XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) {
+ throw new Error("This DOM method is not implemented.");
+ };
-var $export = __webpack_require__(1);
-var $map = __webpack_require__(36)(1);
+ XMLDOMImplementation.prototype.createHTMLDocument = function(title) {
+ throw new Error("This DOM method is not implemented.");
+ };
-$export($export.P + $export.F * !__webpack_require__(32)([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */) {
- return $map(this, callbackfn, arguments[1]);
- }
-});
+ XMLDOMImplementation.prototype.getFeature = function(feature, version) {
+ throw new Error("This DOM method is not implemented.");
+ };
+
+ return XMLDOMImplementation;
+
+ })();
+
+}).call(this);
/***/ }),
-/* 359 */
+/* 197 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-var $export = __webpack_require__(1);
-var $filter = __webpack_require__(36)(2);
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-$export($export.P + $export.F * !__webpack_require__(32)([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */) {
- return $filter(this, callbackfn, arguments[1]);
- }
-});
+ isPlainObject = __webpack_require__(37).isPlainObject;
+ XMLDOMImplementation = __webpack_require__(196);
-/***/ }),
-/* 360 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDOMConfiguration = __webpack_require__(428);
-"use strict";
+ XMLNode = __webpack_require__(23);
-var $export = __webpack_require__(1);
-var $some = __webpack_require__(36)(3);
+ NodeType = __webpack_require__(13);
-$export($export.P + $export.F * !__webpack_require__(32)([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */) {
- return $some(this, callbackfn, arguments[1]);
- }
-});
+ XMLStringifier = __webpack_require__(200);
+ XMLStringWriter = __webpack_require__(136);
-/***/ }),
-/* 361 */
-/***/ (function(module, exports, __webpack_require__) {
+ module.exports = XMLDocument = (function(superClass) {
+ extend(XMLDocument, superClass);
-"use strict";
+ function XMLDocument(options) {
+ XMLDocument.__super__.constructor.call(this, null);
+ this.name = "#document";
+ this.type = NodeType.Document;
+ this.documentURI = null;
+ this.domConfig = new XMLDOMConfiguration();
+ options || (options = {});
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.stringify = new XMLStringifier(options);
+ }
-var $export = __webpack_require__(1);
-var $every = __webpack_require__(36)(4);
+ Object.defineProperty(XMLDocument.prototype, 'implementation', {
+ value: new XMLDOMImplementation()
+ });
-$export($export.P + $export.F * !__webpack_require__(32)([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */) {
- return $every(this, callbackfn, arguments[1]);
- }
-});
+ Object.defineProperty(XMLDocument.prototype, 'doctype', {
+ get: function() {
+ var child, i, len, ref;
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.DocType) {
+ return child;
+ }
+ }
+ return null;
+ }
+ });
+ Object.defineProperty(XMLDocument.prototype, 'documentElement', {
+ get: function() {
+ return this.rootObject || null;
+ }
+ });
-/***/ }),
-/* 362 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
-"use strict";
+ Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
+ get: function() {
+ return false;
+ }
+ });
-var $export = __webpack_require__(1);
-var $reduce = __webpack_require__(185);
+ Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].encoding;
+ } else {
+ return null;
+ }
+ }
+ });
-$export($export.P + $export.F * !__webpack_require__(32)([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
-});
+ Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].standalone === 'yes';
+ } else {
+ return false;
+ }
+ }
+ });
+ Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].version;
+ } else {
+ return "1.0";
+ }
+ }
+ });
-/***/ }),
-/* 363 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.defineProperty(XMLDocument.prototype, 'URL', {
+ get: function() {
+ return this.documentURI;
+ }
+ });
-"use strict";
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
-var $export = __webpack_require__(1);
-var $reduce = __webpack_require__(185);
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
-$export($export.P + $export.F * !__webpack_require__(32)([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
-});
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
-/***/ }),
-/* 364 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocument.prototype.end = function(writer) {
+ var writerOptions;
+ writerOptions = {};
+ if (!writer) {
+ writer = this.options.writer;
+ } else if (isPlainObject(writer)) {
+ writerOptions = writer;
+ writer = this.options.writer;
+ }
+ return writer.document(this, writer.filterOptions(writerOptions));
+ };
-"use strict";
+ XMLDocument.prototype.toString = function(options) {
+ return this.options.writer.document(this, this.options.writer.filterOptions(options));
+ };
-var $export = __webpack_require__(1);
-var $indexOf = __webpack_require__(77)(false);
-var $native = [].indexOf;
-var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
+ XMLDocument.prototype.createElement = function(tagName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(32)($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
-});
+ XMLDocument.prototype.createDocumentFragment = function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+ XMLDocument.prototype.createTextNode = function(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 365 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocument.prototype.createComment = function(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-"use strict";
+ XMLDocument.prototype.createCDATASection = function(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-var $export = __webpack_require__(1);
-var toIObject = __webpack_require__(22);
-var toInteger = __webpack_require__(31);
-var toLength = __webpack_require__(8);
-var $native = [].lastIndexOf;
-var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
+ XMLDocument.prototype.createProcessingInstruction = function(target, data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(32)($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
- // convert -0 to +0
- if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
- var O = toIObject(this);
- var length = toLength(O.length);
- var index = length - 1;
- if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
- if (index < 0) index = length + index;
- for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
- return -1;
- }
-});
+ XMLDocument.prototype.createAttribute = function(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+ XMLDocument.prototype.createEntityReference = function(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 366 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocument.prototype.getElementsByTagName = function(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-var $export = __webpack_require__(1);
+ XMLDocument.prototype.importNode = function(importedNode, deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-$export($export.P, 'Array', { copyWithin: __webpack_require__(186) });
+ XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-__webpack_require__(42)('copyWithin');
+ XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+ XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 367 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocument.prototype.getElementById = function(elementId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-var $export = __webpack_require__(1);
+ XMLDocument.prototype.adoptNode = function(source) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-$export($export.P, 'Array', { fill: __webpack_require__(131) });
+ XMLDocument.prototype.normalizeDocument = function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-__webpack_require__(42)('fill');
+ XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+ XMLDocument.prototype.getElementsByClassName = function(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 368 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDocument.prototype.createEvent = function(eventInterface) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-"use strict";
+ XMLDocument.prototype.createRange = function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
-var $export = __webpack_require__(1);
-var $find = __webpack_require__(36)(5);
-var KEY = 'find';
-var forced = true;
-// Shouldn't skip holes
-if (KEY in []) Array(1)[KEY](function () { forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- find: function find(callbackfn /* , that = undefined */) {
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-__webpack_require__(42)(KEY);
+ XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
+ XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ };
-/***/ }),
-/* 369 */
-/***/ (function(module, exports, __webpack_require__) {
+ return XMLDocument;
-"use strict";
+ })(XMLNode);
-// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
-var $export = __webpack_require__(1);
-var $find = __webpack_require__(36)(6);
-var KEY = 'findIndex';
-var forced = true;
-// Shouldn't skip holes
-if (KEY in []) Array(1)[KEY](function () { forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- findIndex: function findIndex(callbackfn /* , that = undefined */) {
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-__webpack_require__(42)(KEY);
+}).call(this);
/***/ }),
-/* 370 */
+/* 198 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(53)('Array');
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+ NodeType = __webpack_require__(13);
-/***/ }),
-/* 371 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLNode = __webpack_require__(23);
-var global = __webpack_require__(4);
-var inheritIfRequired = __webpack_require__(119);
-var dP = __webpack_require__(12).f;
-var gOPN = __webpack_require__(52).f;
-var isRegExp = __webpack_require__(81);
-var $flags = __webpack_require__(71);
-var $RegExp = global.RegExp;
-var Base = $RegExp;
-var proto = $RegExp.prototype;
-var re1 = /a/g;
-var re2 = /a/g;
-// "new" creates a new object, old webkit buggy here
-var CORRECT_NEW = new $RegExp(re1) !== re1;
+ module.exports = XMLAttribute = (function() {
+ function XMLAttribute(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
-if (__webpack_require__(9) && (!CORRECT_NEW || __webpack_require__(5)(function () {
- re2[__webpack_require__(7)('match')] = false;
- // RegExp constructor can alter flags and IsRegExp works correct with @@match
- return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
-}))) {
- $RegExp = function RegExp(p, f) {
- var tiRE = this instanceof $RegExp;
- var piRE = isRegExp(p);
- var fiU = f === undefined;
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
- : inheritIfRequired(CORRECT_NEW
- ? new Base(piRE && !fiU ? p.source : p, f)
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
- , tiRE ? this : proto, $RegExp);
- };
- var proxy = function (key) {
- key in $RegExp || dP($RegExp, key, {
- configurable: true,
- get: function () { return Base[key]; },
- set: function (it) { Base[key] = it; }
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
});
- };
- for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
- proto.constructor = $RegExp;
- $RegExp.prototype = proto;
- __webpack_require__(18)(global, 'RegExp', $RegExp);
-}
-__webpack_require__(53)('RegExp');
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
+ }
+ });
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
-/***/ }),
-/* 372 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
-"use strict";
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
-__webpack_require__(189);
-var anObject = __webpack_require__(3);
-var $flags = __webpack_require__(71);
-var DESCRIPTORS = __webpack_require__(9);
-var TO_STRING = 'toString';
-var $toString = /./[TO_STRING];
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
-var define = function (fn) {
- __webpack_require__(18)(RegExp.prototype, TO_STRING, fn, true);
-};
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
-// 21.2.5.14 RegExp.prototype.toString()
-if (__webpack_require__(5)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
- define(function toString() {
- var R = anObject(this);
- return '/'.concat(R.source, '/',
- 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
- });
-// FF44- RegExp#toString has a wrong name
-} else if ($toString.name != TO_STRING) {
- define(function toString() {
- return $toString.call(this);
- });
-}
+ XMLAttribute.prototype.clone = function() {
+ return Object.create(this);
+ };
+
+ XMLAttribute.prototype.toString = function(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ };
+
+ XMLAttribute.prototype.debugInfo = function(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
+ }
+ };
+
+ XMLAttribute.prototype.isEqualNode = function(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
+ };
+
+ return XMLAttribute;
+
+ })();
+
+}).call(this);
/***/ }),
-/* 373 */
+/* 199 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, XMLDummy, XMLNode,
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
+ XMLNode = __webpack_require__(23);
-var anObject = __webpack_require__(3);
-var toLength = __webpack_require__(8);
-var advanceStringIndex = __webpack_require__(134);
-var regExpExec = __webpack_require__(83);
+ NodeType = __webpack_require__(13);
-// @@match logic
-__webpack_require__(84)('match', 1, function (defined, MATCH, $match, maybeCallNative) {
- return [
- // `String.prototype.match` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.match
- function match(regexp) {
- var O = defined(this);
- var fn = regexp == undefined ? undefined : regexp[MATCH];
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- },
- // `RegExp.prototype[@@match]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
- function (regexp) {
- var res = maybeCallNative($match, regexp, this);
- if (res.done) return res.value;
- var rx = anObject(regexp);
- var S = String(this);
- if (!rx.global) return regExpExec(rx, S);
- var fullUnicode = rx.unicode;
- rx.lastIndex = 0;
- var A = [];
- var n = 0;
- var result;
- while ((result = regExpExec(rx, S)) !== null) {
- var matchStr = String(result[0]);
- A[n] = matchStr;
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
- n++;
- }
- return n === 0 ? null : A;
+ module.exports = XMLDummy = (function(superClass) {
+ extend(XMLDummy, superClass);
+
+ function XMLDummy(parent) {
+ XMLDummy.__super__.constructor.call(this, parent);
+ this.type = NodeType.Dummy;
}
- ];
-});
+ XMLDummy.prototype.clone = function() {
+ return Object.create(this);
+ };
-/***/ }),
-/* 374 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDummy.prototype.toString = function(options) {
+ return '';
+ };
-"use strict";
+ return XMLDummy;
+ })(XMLNode);
-var anObject = __webpack_require__(3);
-var toObject = __webpack_require__(13);
-var toLength = __webpack_require__(8);
-var toInteger = __webpack_require__(31);
-var advanceStringIndex = __webpack_require__(134);
-var regExpExec = __webpack_require__(83);
-var max = Math.max;
-var min = Math.min;
-var floor = Math.floor;
-var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
-var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
+}).call(this);
-var maybeToString = function (it) {
- return it === undefined ? it : String(it);
-};
-// @@replace logic
-__webpack_require__(84)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
- return [
- // `String.prototype.replace` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
- function replace(searchValue, replaceValue) {
- var O = defined(this);
- var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
- return fn !== undefined
- ? fn.call(searchValue, O, replaceValue)
- : $replace.call(String(O), searchValue, replaceValue);
- },
- // `RegExp.prototype[@@replace]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
- function (regexp, replaceValue) {
- var res = maybeCallNative($replace, regexp, this, replaceValue);
- if (res.done) return res.value;
+/***/ }),
+/* 200 */
+/***/ (function(module, exports) {
- var rx = anObject(regexp);
- var S = String(this);
- var functionalReplace = typeof replaceValue === 'function';
- if (!functionalReplace) replaceValue = String(replaceValue);
- var global = rx.global;
- if (global) {
- var fullUnicode = rx.unicode;
- rx.lastIndex = 0;
- }
- var results = [];
- while (true) {
- var result = regExpExec(rx, S);
- if (result === null) break;
- results.push(result);
- if (!global) break;
- var matchStr = String(result[0]);
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var XMLStringifier,
+ bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ hasProp = {}.hasOwnProperty;
+
+ module.exports = XMLStringifier = (function() {
+ function XMLStringifier(options) {
+ this.assertLegalName = bind(this.assertLegalName, this);
+ this.assertLegalChar = bind(this.assertLegalChar, this);
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ if (!this.options.version) {
+ this.options.version = '1.0';
}
- var accumulatedResult = '';
- var nextSourcePosition = 0;
- for (var i = 0; i < results.length; i++) {
- result = results[i];
- var matched = String(result[0]);
- var position = max(min(toInteger(result.index), S.length), 0);
- var captures = [];
- // NOTE: This is equivalent to
- // captures = result.slice(1).map(maybeToString)
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
- var namedCaptures = result.groups;
- if (functionalReplace) {
- var replacerArgs = [matched].concat(captures, position, S);
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
- } else {
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
- }
- if (position >= nextSourcePosition) {
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
- nextSourcePosition = position + matched.length;
- }
+ ref = options.stringify || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this[key] = value;
}
- return accumulatedResult + S.slice(nextSourcePosition);
}
- ];
- // https://tc39.github.io/ecma262/#sec-getsubstitution
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
- var tailPos = position + matched.length;
- var m = captures.length;
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
- if (namedCaptures !== undefined) {
- namedCaptures = toObject(namedCaptures);
- symbols = SUBSTITUTION_SYMBOLS;
- }
- return $replace.call(replacement, symbols, function (match, ch) {
- var capture;
- switch (ch.charAt(0)) {
- case '$': return '$';
- case '&': return matched;
- case '`': return str.slice(0, position);
- case "'": return str.slice(tailPos);
- case '<':
- capture = namedCaptures[ch.slice(1, -1)];
- break;
- default: // \d\d?
- var n = +ch;
- if (n === 0) return match;
- if (n > m) {
- var f = floor(n / 10);
- if (f === 0) return match;
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
- return match;
- }
- capture = captures[n - 1];
+ XMLStringifier.prototype.name = function(val) {
+ if (this.options.noValidation) {
+ return val;
}
- return capture === undefined ? '' : capture;
- });
- }
-});
-
+ return this.assertLegalName('' + val || '');
+ };
-/***/ }),
-/* 375 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLStringifier.prototype.text = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.textEscape('' + val || ''));
+ };
-"use strict";
+ XMLStringifier.prototype.cdata = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ val = val.replace(']]>', ']]]]>');
+ return this.assertLegalChar(val);
+ };
+ XMLStringifier.prototype.comment = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ };
-var anObject = __webpack_require__(3);
-var sameValue = __webpack_require__(175);
-var regExpExec = __webpack_require__(83);
+ XMLStringifier.prototype.raw = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ };
-// @@search logic
-__webpack_require__(84)('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
- return [
- // `String.prototype.search` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.search
- function search(regexp) {
- var O = defined(this);
- var fn = regexp == undefined ? undefined : regexp[SEARCH];
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
- },
- // `RegExp.prototype[@@search]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
- function (regexp) {
- var res = maybeCallNative($search, regexp, this);
- if (res.done) return res.value;
- var rx = anObject(regexp);
- var S = String(this);
- var previousLastIndex = rx.lastIndex;
- if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
- var result = regExpExec(rx, S);
- if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
- return result === null ? -1 : result.index;
- }
- ];
-});
+ XMLStringifier.prototype.attValue = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ };
+ XMLStringifier.prototype.insTarget = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ };
-/***/ }),
-/* 376 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLStringifier.prototype.insValue = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/\?>/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ };
-"use strict";
+ XMLStringifier.prototype.xmlVersion = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ };
+ XMLStringifier.prototype.xmlEncoding = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ };
-var isRegExp = __webpack_require__(81);
-var anObject = __webpack_require__(3);
-var speciesConstructor = __webpack_require__(72);
-var advanceStringIndex = __webpack_require__(134);
-var toLength = __webpack_require__(8);
-var callRegExpExec = __webpack_require__(83);
-var regexpExec = __webpack_require__(133);
-var fails = __webpack_require__(5);
-var $min = Math.min;
-var $push = [].push;
-var $SPLIT = 'split';
-var LENGTH = 'length';
-var LAST_INDEX = 'lastIndex';
-var MAX_UINT32 = 0xffffffff;
+ XMLStringifier.prototype.xmlStandalone = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ };
-// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
-var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
+ XMLStringifier.prototype.dtdPubID = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ };
-// @@split logic
-__webpack_require__(84)('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
- var internalSplit;
- if (
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
- ''[$SPLIT](/.?/)[LENGTH]
- ) {
- // based on es5-shim implementation, need to rework it
- internalSplit = function (separator, limit) {
- var string = String(this);
- if (separator === undefined && limit === 0) return [];
- // If `separator` is not a regex, use native split
- if (!isRegExp(separator)) return $split.call(string, separator, limit);
- var output = [];
- var flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.unicode ? 'u' : '') +
- (separator.sticky ? 'y' : '');
- var lastLastIndex = 0;
- var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
- // Make `global` and avoid `lastIndex` issues by working with a copy
- var separatorCopy = new RegExp(separator.source, flags + 'g');
- var match, lastIndex, lastLength;
- while (match = regexpExec.call(separatorCopy, string)) {
- lastIndex = separatorCopy[LAST_INDEX];
- if (lastIndex > lastLastIndex) {
- output.push(string.slice(lastLastIndex, match.index));
- if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
- lastLength = match[0][LENGTH];
- lastLastIndex = lastIndex;
- if (output[LENGTH] >= splitLimit) break;
- }
- if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
+ XMLStringifier.prototype.dtdSysID = function(val) {
+ if (this.options.noValidation) {
+ return val;
}
- if (lastLastIndex === string[LENGTH]) {
- if (lastLength || !separatorCopy.test('')) output.push('');
- } else output.push(string.slice(lastLastIndex));
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
+ return this.assertLegalChar('' + val || '');
};
- // Chakra, V8
- } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
- internalSplit = function (separator, limit) {
- return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
+
+ XMLStringifier.prototype.dtdElementValue = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
};
- } else {
- internalSplit = $split;
- }
- return [
- // `String.prototype.split` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.split
- function split(separator, limit) {
- var O = defined(this);
- var splitter = separator == undefined ? undefined : separator[SPLIT];
- return splitter !== undefined
- ? splitter.call(separator, O, limit)
- : internalSplit.call(String(O), separator, limit);
- },
- // `RegExp.prototype[@@split]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
- //
- // NOTE: This cannot be properly polyfilled in engines that don't support
- // the 'y' flag.
- function (regexp, limit) {
- var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
- if (res.done) return res.value;
+ XMLStringifier.prototype.dtdAttType = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ };
- var rx = anObject(regexp);
- var S = String(this);
- var C = speciesConstructor(rx, RegExp);
+ XMLStringifier.prototype.dtdAttDefault = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ };
- var unicodeMatching = rx.unicode;
- var flags = (rx.ignoreCase ? 'i' : '') +
- (rx.multiline ? 'm' : '') +
- (rx.unicode ? 'u' : '') +
- (SUPPORTS_Y ? 'y' : 'g');
+ XMLStringifier.prototype.dtdEntityValue = function(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ };
- // ^(? + rx + ) is needed, in combination with some S slicing, to
- // simulate the 'y' flag.
- var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
- if (lim === 0) return [];
- if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
- var p = 0;
- var q = 0;
- var A = [];
- while (q < S.length) {
- splitter.lastIndex = SUPPORTS_Y ? q : 0;
- var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
- var e;
- if (
- z === null ||
- (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
- ) {
- q = advanceStringIndex(S, q, unicodeMatching);
- } else {
- A.push(S.slice(p, q));
- if (A.length === lim) return A;
- for (var i = 1; i <= z.length - 1; i++) {
- A.push(z[i]);
- if (A.length === lim) return A;
- }
- q = p = e;
- }
+ XMLStringifier.prototype.dtdNData = function(val) {
+ if (this.options.noValidation) {
+ return val;
}
- A.push(S.slice(p));
- return A;
- }
- ];
-});
+ return this.assertLegalChar('' + val || '');
+ };
+ XMLStringifier.prototype.convertAttKey = '@';
-/***/ }),
-/* 377 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLStringifier.prototype.convertPIKey = '?';
-"use strict";
+ XMLStringifier.prototype.convertTextKey = '#text';
-var LIBRARY = __webpack_require__(40);
-var global = __webpack_require__(4);
-var ctx = __webpack_require__(29);
-var classof = __webpack_require__(60);
-var $export = __webpack_require__(1);
-var isObject = __webpack_require__(6);
-var aFunction = __webpack_require__(15);
-var anInstance = __webpack_require__(54);
-var forOf = __webpack_require__(55);
-var speciesConstructor = __webpack_require__(72);
-var task = __webpack_require__(135).set;
-var microtask = __webpack_require__(136)();
-var newPromiseCapabilityModule = __webpack_require__(137);
-var perform = __webpack_require__(190);
-var userAgent = __webpack_require__(85);
-var promiseResolve = __webpack_require__(191);
-var PROMISE = 'Promise';
-var TypeError = global.TypeError;
-var process = global.process;
-var versions = process && process.versions;
-var v8 = versions && versions.v8 || '';
-var $Promise = global[PROMISE];
-var isNode = classof(process) == 'process';
-var empty = function () { /* empty */ };
-var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
-var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
+ XMLStringifier.prototype.convertCDataKey = '#cdata';
+
+ XMLStringifier.prototype.convertCommentKey = '#comment';
+
+ XMLStringifier.prototype.convertRawKey = '#raw';
+
+ XMLStringifier.prototype.assertLegalChar = function(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ regex = '';
+ if (this.options.version === '1.0') {
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+ if (res = str.match(regex)) {
+ throw new Error("Invalid character in string: " + str + " at index " + res.index);
+ }
+ } else if (this.options.version === '1.1') {
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+ if (res = str.match(regex)) {
+ throw new Error("Invalid character in string: " + str + " at index " + res.index);
+ }
+ }
+ return str;
+ };
-var USE_NATIVE = !!function () {
- try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1);
- var FakePromise = (promise.constructor = {})[__webpack_require__(7)('species')] = function (exec) {
- exec(empty, empty);
+ XMLStringifier.prototype.assertLegalName = function(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error("Invalid character in name");
+ }
+ return str;
};
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function')
- && promise.then(empty) instanceof FakePromise
- // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
- // we can't detect it synchronously, so just check versions
- && v8.indexOf('6.6') !== 0
- && userAgent.indexOf('Chrome/66') === -1;
- } catch (e) { /* empty */ }
-}();
-// helpers
-var isThenable = function (it) {
- var then;
- return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
-};
-var notify = function (promise, isReject) {
- if (promise._n) return;
- promise._n = true;
- var chain = promise._c;
- microtask(function () {
- var value = promise._v;
- var ok = promise._s == 1;
- var i = 0;
- var run = function (reaction) {
- var handler = ok ? reaction.ok : reaction.fail;
- var resolve = reaction.resolve;
- var reject = reaction.reject;
- var domain = reaction.domain;
- var result, then, exited;
- try {
- if (handler) {
- if (!ok) {
- if (promise._h == 2) onHandleUnhandled(promise);
- promise._h = 1;
- }
- if (handler === true) result = value;
- else {
- if (domain) domain.enter();
- result = handler(value); // may throw
- if (domain) {
- domain.exit();
- exited = true;
- }
- }
- if (result === reaction.promise) {
- reject(TypeError('Promise-chain cycle'));
- } else if (then = isThenable(result)) {
- then.call(result, resolve, reject);
- } else resolve(result);
- } else reject(value);
- } catch (e) {
- if (domain && !exited) domain.exit();
- reject(e);
+ XMLStringifier.prototype.textEscape = function(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
}
+ ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
+ return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, '
');
};
- while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if (isReject && !promise._h) onUnhandled(promise);
- });
-};
-var onUnhandled = function (promise) {
- task.call(global, function () {
- var value = promise._v;
- var unhandled = isUnhandled(promise);
- var result, handler, console;
- if (unhandled) {
- result = perform(function () {
- if (isNode) {
- process.emit('unhandledRejection', value, promise);
- } else if (handler = global.onunhandledrejection) {
- handler({ promise: promise, reason: value });
- } else if ((console = global.console) && console.error) {
- console.error('Unhandled promise rejection', value);
- }
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if (unhandled && result.e) throw result.v;
- });
-};
-var isUnhandled = function (promise) {
- return promise._h !== 1 && (promise._a || promise._c).length === 0;
-};
-var onHandleUnhandled = function (promise) {
- task.call(global, function () {
- var handler;
- if (isNode) {
- process.emit('rejectionHandled', promise);
- } else if (handler = global.onrejectionhandled) {
- handler({ promise: promise, reason: promise._v });
- }
- });
-};
-var $reject = function (value) {
- var promise = this;
- if (promise._d) return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if (!promise._a) promise._a = promise._c.slice();
- notify(promise, true);
-};
-var $resolve = function (value) {
- var promise = this;
- var then;
- if (promise._d) return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- try {
- if (promise === value) throw TypeError("Promise can't be resolved itself");
- if (then = isThenable(value)) {
- microtask(function () {
- var wrapper = { _w: promise, _d: false }; // wrap
- try {
- then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
- } catch (e) {
- $reject.call(wrapper, e);
- }
- });
- } else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
- }
- } catch (e) {
- $reject.call({ _w: promise, _d: false }, e); // wrap
- }
-};
-// constructor polyfill
-if (!USE_NATIVE) {
- // 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor) {
- anInstance(this, $Promise, PROMISE, '_h');
- aFunction(executor);
- Internal.call(this);
- try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
- } catch (err) {
- $reject.call(this, err);
- }
- };
- // eslint-disable-next-line no-unused-vars
- Internal = function Promise(executor) {
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = __webpack_require__(56)($Promise.prototype, {
- // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
- then: function then(onFulfilled, onRejected) {
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if (this._a) this._a.push(reaction);
- if (this._s) notify(this, false);
- return reaction.promise;
- },
- // 25.4.5.1 Promise.prototype.catch(onRejected)
- 'catch': function (onRejected) {
- return this.then(undefined, onRejected);
- }
- });
- OwnPromiseCapability = function () {
- var promise = new Internal();
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
- return C === $Promise || C === Wrapper
- ? new OwnPromiseCapability(C)
- : newGenericPromiseCapability(C);
- };
-}
+ XMLStringifier.prototype.attEscape = function(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
+ return str.replace(ampregex, '&').replace(/ 0 ? arguments[0] : undefined); };
-}, {
- // 23.4.3.1 WeakSet.prototype.add(value)
- add: function add(value) {
- return weak.def(validate(this, WEAK_SET), value, true);
- }
-}, weak, false, true);
+// Generated by CoffeeScript 1.12.7
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
+ assign = __webpack_require__(37).assign;
-/***/ }),
-/* 379 */
-/***/ (function(module, exports, __webpack_require__) {
+ NodeType = __webpack_require__(13);
-"use strict";
+ XMLDeclaration = __webpack_require__(127);
-var $export = __webpack_require__(1);
-var $typed = __webpack_require__(87);
-var buffer = __webpack_require__(138);
-var anObject = __webpack_require__(3);
-var toAbsoluteIndex = __webpack_require__(50);
-var toLength = __webpack_require__(8);
-var isObject = __webpack_require__(6);
-var ArrayBuffer = __webpack_require__(4).ArrayBuffer;
-var speciesConstructor = __webpack_require__(72);
-var $ArrayBuffer = buffer.ArrayBuffer;
-var $DataView = buffer.DataView;
-var $isView = $typed.ABV && ArrayBuffer.isView;
-var $slice = $ArrayBuffer.prototype.slice;
-var VIEW = $typed.VIEW;
-var ARRAY_BUFFER = 'ArrayBuffer';
+ XMLDocType = __webpack_require__(128);
-$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
+ XMLCData = __webpack_require__(125);
-$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it) {
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
-});
+ XMLComment = __webpack_require__(126);
-$export($export.P + $export.U + $export.F * __webpack_require__(5)(function () {
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
-}), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end) {
- if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength;
- var first = toAbsoluteIndex(start, len);
- var fin = toAbsoluteIndex(end === undefined ? len : end, len);
- var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
- var viewS = new $DataView(this);
- var viewT = new $DataView(result);
- var index = 0;
- while (first < fin) {
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
-});
+ XMLElement = __webpack_require__(123);
-__webpack_require__(53)(ARRAY_BUFFER);
+ XMLRaw = __webpack_require__(133);
+ XMLText = __webpack_require__(134);
-/***/ }),
-/* 380 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLProcessingInstruction = __webpack_require__(135);
-var $export = __webpack_require__(1);
-$export($export.G + $export.W + $export.F * !__webpack_require__(87).ABV, {
- DataView: __webpack_require__(138).DataView
-});
+ XMLDummy = __webpack_require__(199);
+ XMLDTDAttList = __webpack_require__(129);
-/***/ }),
-/* 381 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLDTDElement = __webpack_require__(131);
-__webpack_require__(37)('Int8', 1, function (init) {
- return function Int8Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLDTDEntity = __webpack_require__(130);
+ XMLDTDNotation = __webpack_require__(132);
-/***/ }),
-/* 382 */
-/***/ (function(module, exports, __webpack_require__) {
+ WriterState = __webpack_require__(85);
-__webpack_require__(37)('Uint8', 1, function (init) {
- return function Uint8Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ module.exports = XMLWriterBase = (function() {
+ function XMLWriterBase(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
+ XMLWriterBase.prototype.filterOptions = function(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref3 = (ref4 = options.dontPrettyTextNodes) != null ? ref4 : options.dontprettytextnodes) != null ? ref3 : 0;
+ filteredOptions.spaceBeforeSlash = (ref5 = (ref6 = options.spaceBeforeSlash) != null ? ref6 : options.spacebeforeslash) != null ? ref5 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ };
-/***/ }),
-/* 383 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.indent = function(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ };
-__webpack_require__(37)('Uint8', 1, function (init) {
- return function Uint8ClampedArray(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-}, true);
+ XMLWriterBase.prototype.endline = function(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ };
+ XMLWriterBase.prototype.attribute = function(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ r = ' ' + att.name + '="' + att.value + '"';
+ this.closeAttribute(att, options, level);
+ return r;
+ };
-/***/ }),
-/* 384 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.cdata = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-__webpack_require__(37)('Int16', 2, function (init) {
- return function Int16Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.comment = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
+ XMLWriterBase.prototype.declaration = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-/***/ }),
-/* 385 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.docType = function(node, options, level) {
+ var child, i, len, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += ' 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-__webpack_require__(37)('Uint16', 2, function (init) {
- return function Uint16Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.element = function(node, options, level) {
+ var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;
+ level || (level = 0);
+ prettySuppressed = false;
+ r = '';
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r += this.indent(node, options, level) + '<' + node.name;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ r += this.attribute(att, options, level);
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';
+ })) {
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ if (options.dontPrettyTextNodes) {
+ ref1 = node.children;
+ for (i = 0, len = ref1.length; i < len; i++) {
+ child = ref1[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref2 = node.children;
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
+ child = ref2[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ };
+ XMLWriterBase.prototype.writeChildNode = function(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ };
-/***/ }),
-/* 386 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.processingInstruction = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-__webpack_require__(37)('Int32', 4, function (init) {
- return function Int32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.raw = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
+ XMLWriterBase.prototype.text = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-/***/ }),
-/* 387 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.dtdAttList = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-__webpack_require__(37)('Uint32', 4, function (init) {
- return function Uint32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.dtdElement = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
+ XMLWriterBase.prototype.dtdEntity = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-/***/ }),
-/* 388 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.dtdNotation = function(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ };
-__webpack_require__(37)('Float32', 4, function (init) {
- return function Float32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.openNode = function(node, options, level) {};
+ XMLWriterBase.prototype.closeNode = function(node, options, level) {};
-/***/ }),
-/* 389 */
-/***/ (function(module, exports, __webpack_require__) {
+ XMLWriterBase.prototype.openAttribute = function(att, options, level) {};
-__webpack_require__(37)('Float64', 8, function (init) {
- return function Float64Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
+ XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};
+ return XMLWriterBase;
-/***/ }),
-/* 390 */
-/***/ (function(module, exports, __webpack_require__) {
+ })();
-// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
-var $export = __webpack_require__(1);
-var aFunction = __webpack_require__(15);
-var anObject = __webpack_require__(3);
-var rApply = (__webpack_require__(4).Reflect || {}).apply;
-var fApply = Function.apply;
-// MS Edge argumentsList argument is optional
-$export($export.S + $export.F * !__webpack_require__(5)(function () {
- rApply(function () { /* empty */ });
-}), 'Reflect', {
- apply: function apply(target, thisArgument, argumentsList) {
- var T = aFunction(target);
- var L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
- }
-});
+}).call(this);
/***/ }),
-/* 391 */
+/* 202 */
/***/ (function(module, exports, __webpack_require__) {
-// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
-var $export = __webpack_require__(1);
-var create = __webpack_require__(51);
-var aFunction = __webpack_require__(15);
-var anObject = __webpack_require__(3);
-var isObject = __webpack_require__(6);
-var fails = __webpack_require__(5);
-var bind = __webpack_require__(176);
-var rConstruct = (__webpack_require__(4).Reflect || {}).construct;
-
-// MS Edge supports only 2 arguments and argumentsList argument is optional
-// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function () {
- function F() { /* empty */ }
- return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
-});
-var ARGS_BUG = !fails(function () {
- rConstruct(function () { /* empty */ });
-});
-
-$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
- construct: function construct(Target, args /* , newTarget */) {
- aFunction(Target);
- anObject(args);
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
- if (Target == newTarget) {
- // w/o altered newTarget, optimization for 0-4 arguments
- switch (args.length) {
- case 0: return new Target();
- case 1: return new Target(args[0]);
- case 2: return new Target(args[0], args[1]);
- case 3: return new Target(args[0], args[1], args[2]);
- case 4: return new Target(args[0], args[1], args[2], args[3]);
- }
- // w/o altered newTarget, lot of arguments case
- var $args = [null];
- $args.push.apply($args, args);
- return new (bind.apply(Target, $args))();
- }
- // with altered newTarget, not support built-in constructors
- var proto = newTarget.prototype;
- var instance = create(isObject(proto) ? proto : Object.prototype);
- var result = Function.apply.call(Target, instance, args);
- return isObject(result) ? result : instance;
- }
-});
-
-
-/***/ }),
-/* 392 */
-/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
-// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
-var dP = __webpack_require__(12);
-var $export = __webpack_require__(1);
-var anObject = __webpack_require__(3);
-var toPrimitive = __webpack_require__(33);
-// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
-$export($export.S + $export.F * __webpack_require__(5)(function () {
- // eslint-disable-next-line no-undef
- Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
-}), 'Reflect', {
- defineProperty: function defineProperty(target, propertyKey, attributes) {
- anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
- try {
- dP.f(target, propertyKey, attributes);
- return true;
- } catch (e) {
- return false;
- }
- }
-});
+/**/
-/***/ }),
-/* 393 */
-/***/ (function(module, exports, __webpack_require__) {
+var pna = __webpack_require__(87);
+/**/
-// 26.1.4 Reflect.deleteProperty(target, propertyKey)
-var $export = __webpack_require__(1);
-var gOPD = __webpack_require__(23).f;
-var anObject = __webpack_require__(3);
+module.exports = Readable;
-$export($export.S, 'Reflect', {
- deleteProperty: function deleteProperty(target, propertyKey) {
- var desc = gOPD(anObject(target), propertyKey);
- return desc && !desc.configurable ? false : delete target[propertyKey];
- }
-});
+/**/
+var isArray = __webpack_require__(195);
+/**/
+/**/
+var Duplex;
+/**/
-/***/ }),
-/* 394 */
-/***/ (function(module, exports, __webpack_require__) {
+Readable.ReadableState = ReadableState;
-"use strict";
+/**/
+var EE = __webpack_require__(86).EventEmitter;
-// 26.1.5 Reflect.enumerate(target)
-var $export = __webpack_require__(1);
-var anObject = __webpack_require__(3);
-var Enumerate = function (iterated) {
- this._t = anObject(iterated); // target
- this._i = 0; // next index
- var keys = this._k = []; // keys
- var key;
- for (key in iterated) keys.push(key);
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
};
-__webpack_require__(124)(Enumerate, 'Object', function () {
- var that = this;
- var keys = that._k;
- var key;
- do {
- if (that._i >= keys.length) return { value: undefined, done: true };
- } while (!((key = keys[that._i++]) in that._t));
- return { value: key, done: false };
-});
-
-$export($export.S, 'Reflect', {
- enumerate: function enumerate(target) {
- return new Enumerate(target);
- }
-});
-
+/**/
-/***/ }),
-/* 395 */
-/***/ (function(module, exports, __webpack_require__) {
+/**/
+var Stream = __webpack_require__(203);
+/**/
-// 26.1.6 Reflect.get(target, propertyKey [, receiver])
-var gOPD = __webpack_require__(23);
-var getPrototypeOf = __webpack_require__(24);
-var has = __webpack_require__(21);
-var $export = __webpack_require__(1);
-var isObject = __webpack_require__(6);
-var anObject = __webpack_require__(3);
+/**/
-function get(target, propertyKey /* , receiver */) {
- var receiver = arguments.length < 3 ? target : arguments[2];
- var desc, proto;
- if (anObject(target) === receiver) return target[propertyKey];
- if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
- ? desc.value
- : desc.get !== undefined
- ? desc.get.call(receiver)
- : undefined;
- if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
+var Buffer = __webpack_require__(88).Buffer;
+var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
-$export($export.S, 'Reflect', { get: get });
-
+/**/
-/***/ }),
-/* 396 */
-/***/ (function(module, exports, __webpack_require__) {
+/**/
+var util = Object.create(__webpack_require__(68));
+util.inherits = __webpack_require__(60);
+/**/
-// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
-var gOPD = __webpack_require__(23);
-var $export = __webpack_require__(1);
-var anObject = __webpack_require__(3);
+/**/
+var debugUtil = __webpack_require__(438);
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/**/
-$export($export.S, 'Reflect', {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
- return gOPD.f(anObject(target), propertyKey);
- }
-});
+var BufferList = __webpack_require__(439);
+var destroyImpl = __webpack_require__(204);
+var StringDecoder;
+util.inherits(Readable, Stream);
-/***/ }),
-/* 397 */
-/***/ (function(module, exports, __webpack_require__) {
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
-// 26.1.8 Reflect.getPrototypeOf(target)
-var $export = __webpack_require__(1);
-var getProto = __webpack_require__(24);
-var anObject = __webpack_require__(3);
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
-$export($export.S, 'Reflect', {
- getPrototypeOf: function getPrototypeOf(target) {
- return getProto(anObject(target));
- }
-});
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+function ReadableState(options, stream) {
+ Duplex = Duplex || __webpack_require__(53);
-/***/ }),
-/* 398 */
-/***/ (function(module, exports, __webpack_require__) {
+ options = options || {};
-// 26.1.9 Reflect.has(target, propertyKey)
-var $export = __webpack_require__(1);
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
-$export($export.S, 'Reflect', {
- has: function has(target, propertyKey) {
- return propertyKey in target;
- }
-});
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
-/***/ }),
-/* 399 */
-/***/ (function(module, exports, __webpack_require__) {
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-// 26.1.10 Reflect.isExtensible(target)
-var $export = __webpack_require__(1);
-var anObject = __webpack_require__(3);
-var $isExtensible = Object.isExtensible;
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
-$export($export.S, 'Reflect', {
- isExtensible: function isExtensible(target) {
- anObject(target);
- return $isExtensible ? $isExtensible(target) : true;
- }
-});
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
-/***/ }),
-/* 400 */
-/***/ (function(module, exports, __webpack_require__) {
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
-// 26.1.11 Reflect.ownKeys(target)
-var $export = __webpack_require__(1);
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
-$export($export.S, 'Reflect', { ownKeys: __webpack_require__(198) });
+ // has it been destroyed
+ this.destroyed = false;
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
-/***/ }),
-/* 401 */
-/***/ (function(module, exports, __webpack_require__) {
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
-// 26.1.12 Reflect.preventExtensions(target)
-var $export = __webpack_require__(1);
-var anObject = __webpack_require__(3);
-var $preventExtensions = Object.preventExtensions;
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
-$export($export.S, 'Reflect', {
- preventExtensions: function preventExtensions(target) {
- anObject(target);
- try {
- if ($preventExtensions) $preventExtensions(target);
- return true;
- } catch (e) {
- return false;
- }
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = __webpack_require__(139).StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
}
-});
-
+}
-/***/ }),
-/* 402 */
-/***/ (function(module, exports, __webpack_require__) {
+function Readable(options) {
+ Duplex = Duplex || __webpack_require__(53);
-// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
-var dP = __webpack_require__(12);
-var gOPD = __webpack_require__(23);
-var getPrototypeOf = __webpack_require__(24);
-var has = __webpack_require__(21);
-var $export = __webpack_require__(1);
-var createDesc = __webpack_require__(47);
-var anObject = __webpack_require__(3);
-var isObject = __webpack_require__(6);
+ if (!(this instanceof Readable)) return new Readable(options);
-function set(target, propertyKey, V /* , receiver */) {
- var receiver = arguments.length < 4 ? target : arguments[3];
- var ownDesc = gOPD.f(anObject(target), propertyKey);
- var existingDescriptor, proto;
- if (!ownDesc) {
- if (isObject(proto = getPrototypeOf(target))) {
- return set(proto, propertyKey, V, receiver);
- }
- ownDesc = createDesc(0);
- }
- if (has(ownDesc, 'value')) {
- if (ownDesc.writable === false || !isObject(receiver)) return false;
- if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
- if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
- existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
- } else dP.f(receiver, propertyKey, createDesc(0, V));
- return true;
- }
- return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
-}
+ this._readableState = new ReadableState(options, this);
-$export($export.S, 'Reflect', { set: set });
+ // legacy
+ this.readable = true;
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
-/***/ }),
-/* 403 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
-// 26.1.14 Reflect.setPrototypeOf(target, proto)
-var $export = __webpack_require__(1);
-var setProto = __webpack_require__(117);
+ Stream.call(this);
+}
-if (setProto) $export($export.S, 'Reflect', {
- setPrototypeOf: function setPrototypeOf(target, proto) {
- setProto.check(target, proto);
- try {
- setProto.set(target, proto);
- return true;
- } catch (e) {
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
return false;
}
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
}
});
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
-/***/ }),
-/* 404 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// https://github.com/tc39/Array.prototype.includes
-var $export = __webpack_require__(1);
-var $includes = __webpack_require__(77)(true);
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
-$export($export.P, 'Array', {
- includes: function includes(el /* , fromIndex = 0 */) {
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
}
-});
-
-__webpack_require__(42)('includes');
-
-/***/ }),
-/* 405 */
-/***/ (function(module, exports, __webpack_require__) {
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
-"use strict";
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
-// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
-var $export = __webpack_require__(1);
-var flattenIntoArray = __webpack_require__(199);
-var toObject = __webpack_require__(13);
-var toLength = __webpack_require__(8);
-var aFunction = __webpack_require__(15);
-var arraySpeciesCreate = __webpack_require__(130);
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
-$export($export.P, 'Array', {
- flatMap: function flatMap(callbackfn /* , thisArg */) {
- var O = toObject(this);
- var sourceLen, A;
- aFunction(callbackfn);
- sourceLen = toLength(O.length);
- A = arraySpeciesCreate(O, 0);
- flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
- return A;
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
}
-});
-
-__webpack_require__(42)('flatMap');
-
-
-/***/ }),
-/* 406 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+ return needMoreData(state);
+}
-// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
-var $export = __webpack_require__(1);
-var flattenIntoArray = __webpack_require__(199);
-var toObject = __webpack_require__(13);
-var toLength = __webpack_require__(8);
-var toInteger = __webpack_require__(31);
-var arraySpeciesCreate = __webpack_require__(130);
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-$export($export.P, 'Array', {
- flatten: function flatten(/* depthArg = 1 */) {
- var depthArg = arguments[0];
- var O = toObject(this);
- var sourceLen = toLength(O.length);
- var A = arraySpeciesCreate(O, 0);
- flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
- return A;
+ if (state.needReadable) emitReadable(stream);
}
-});
-
-__webpack_require__(42)('flatten');
+ maybeReadMore(stream, state);
+}
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
-/***/ }),
-/* 407 */
-/***/ (function(module, exports, __webpack_require__) {
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
-"use strict";
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
-// https://github.com/mathiasbynens/String.prototype.at
-var $export = __webpack_require__(1);
-var $at = __webpack_require__(80)(true);
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = __webpack_require__(139).StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
-$export($export.P, 'String', {
- at: function at(pos) {
- return $at(this, pos);
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
}
-});
-
-
-/***/ }),
-/* 408 */
-/***/ (function(module, exports, __webpack_require__) {
+ return n;
+}
-"use strict";
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = __webpack_require__(1);
-var $pad = __webpack_require__(200);
-var userAgent = __webpack_require__(85);
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
-// https://github.com/zloirock/core-js/issues/280
-var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
+ if (n !== 0) state.emittedReadable = false;
-$export($export.P + $export.F * WEBKIT_BUG, 'String', {
- padStart: function padStart(maxLength /* , fillString = ' ' */) {
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
}
-});
+ n = howMuchToRead(n, state);
-/***/ }),
-/* 409 */
-/***/ (function(module, exports, __webpack_require__) {
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
-"use strict";
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = __webpack_require__(1);
-var $pad = __webpack_require__(200);
-var userAgent = __webpack_require__(85);
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
-// https://github.com/zloirock/core-js/issues/280
-var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
-$export($export.P + $export.F * WEBKIT_BUG, 'String', {
- padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
}
-});
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
-/***/ }),
-/* 410 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
-"use strict";
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
-// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-__webpack_require__(61)('trimLeft', function ($trim) {
- return function trimLeft() {
- return $trim(this, 1);
- };
-}, 'trimStart');
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+ if (ret !== null) this.emit('data', ret);
-/***/ }),
-/* 411 */
-/***/ (function(module, exports, __webpack_require__) {
+ return ret;
+};
-"use strict";
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
-// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-__webpack_require__(61)('trimRight', function ($trim) {
- return function trimRight() {
- return $trim(this, 2);
- };
-}, 'trimEnd');
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
-/***/ }),
-/* 412 */
-/***/ (function(module, exports, __webpack_require__) {
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
-"use strict";
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
-// https://tc39.github.io/String.prototype.matchAll/
-var $export = __webpack_require__(1);
-var defined = __webpack_require__(34);
-var toLength = __webpack_require__(8);
-var isRegExp = __webpack_require__(81);
-var getFlags = __webpack_require__(71);
-var RegExpProto = RegExp.prototype;
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
-var $RegExpStringIterator = function (regexp, string) {
- this._r = regexp;
- this._s = string;
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
};
-__webpack_require__(124)($RegExpStringIterator, 'RegExp String', function next() {
- var match = this._r.exec(this._s);
- return { value: match, done: match === null };
-});
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
-$export($export.P, 'String', {
- matchAll: function matchAll(regexp) {
- defined(this);
- if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
- var S = String(this);
- var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
- var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
}
-});
-
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-/***/ }),
-/* 413 */
-/***/ (function(module, exports, __webpack_require__) {
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-__webpack_require__(113)('asyncIterator');
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
-/***/ }),
-/* 414 */
-/***/ (function(module, exports, __webpack_require__) {
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
-__webpack_require__(113)('observable');
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
-/***/ }),
-/* 415 */
-/***/ (function(module, exports, __webpack_require__) {
+ cleanedUp = true;
-// https://github.com/tc39/proposal-object-getownpropertydescriptors
-var $export = __webpack_require__(1);
-var ownKeys = __webpack_require__(198);
-var toIObject = __webpack_require__(22);
-var gOPD = __webpack_require__(23);
-var createProperty = __webpack_require__(128);
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
-$export($export.S, 'Object', {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIObject(object);
- var getDesc = gOPD.f;
- var keys = ownKeys(O);
- var result = {};
- var i = 0;
- var key, desc;
- while (keys.length > i) {
- desc = getDesc(O, key = keys[i++]);
- if (desc !== undefined) createProperty(result, key, desc);
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', state.awaitDrain);
+ state.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
}
- return result;
}
-});
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
-/***/ }),
-/* 416 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// https://github.com/tc39/proposal-object-values-entries
-var $export = __webpack_require__(1);
-var $values = __webpack_require__(201)(false);
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
-$export($export.S, 'Object', {
- values: function values(it) {
- return $values(it);
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
}
-});
-
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
-/***/ }),
-/* 417 */
-/***/ (function(module, exports, __webpack_require__) {
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
-// https://github.com/tc39/proposal-object-values-entries
-var $export = __webpack_require__(1);
-var $entries = __webpack_require__(201)(true);
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
-$export($export.S, 'Object', {
- entries: function entries(it) {
- return $entries(it);
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
}
-});
+ return dest;
+};
-/***/ }),
-/* 418 */
-/***/ (function(module, exports, __webpack_require__) {
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
-"use strict";
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var aFunction = __webpack_require__(15);
-var $defineProperty = __webpack_require__(12);
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
-// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
-__webpack_require__(9) && $export($export.P + __webpack_require__(88), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter) {
- $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
- }
-});
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+ if (!dest) dest = state.pipes;
-/***/ }),
-/* 419 */
-/***/ (function(module, exports, __webpack_require__) {
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
-"use strict";
+ // slow case. multiple pipe destinations.
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var aFunction = __webpack_require__(15);
-var $defineProperty = __webpack_require__(12);
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
-// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
-__webpack_require__(9) && $export($export.P + __webpack_require__(88), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter) {
- $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, { hasUnpiped: false });
+ }return this;
}
-});
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
-/***/ }),
-/* 420 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var toPrimitive = __webpack_require__(33);
-var getPrototypeOf = __webpack_require__(24);
-var getOwnPropertyDescriptor = __webpack_require__(23).f;
+ dest.emit('unpipe', this, unpipeInfo);
-// B.2.2.4 Object.prototype.__lookupGetter__(P)
-__webpack_require__(9) && $export($export.P + __webpack_require__(88), 'Object', {
- __lookupGetter__: function __lookupGetter__(P) {
- var O = toObject(this);
- var K = toPrimitive(P, true);
- var D;
- do {
- if (D = getOwnPropertyDescriptor(O, K)) return D.get;
- } while (O = getPrototypeOf(O));
- }
-});
+ return this;
+};
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
-/***/ }),
-/* 421 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
-"use strict";
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
-var $export = __webpack_require__(1);
-var toObject = __webpack_require__(13);
-var toPrimitive = __webpack_require__(33);
-var getPrototypeOf = __webpack_require__(24);
-var getOwnPropertyDescriptor = __webpack_require__(23).f;
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
-// B.2.2.5 Object.prototype.__lookupSetter__(P)
-__webpack_require__(9) && $export($export.P + __webpack_require__(88), 'Object', {
- __lookupSetter__: function __lookupSetter__(P) {
- var O = toObject(this);
- var K = toPrimitive(P, true);
- var D;
- do {
- if (D = getOwnPropertyDescriptor(O, K)) return D.set;
- } while (O = getPrototypeOf(O));
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
}
-});
-
+ return this;
+};
-/***/ }),
-/* 422 */
-/***/ (function(module, exports, __webpack_require__) {
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = __webpack_require__(1);
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
-$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(202)('Map') });
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
-/***/ }),
-/* 423 */
-/***/ (function(module, exports, __webpack_require__) {
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = __webpack_require__(1);
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
-$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(202)('Set') });
+ var state = this._readableState;
+ var paused = false;
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
-/***/ }),
-/* 424 */
-/***/ (function(module, exports, __webpack_require__) {
+ _this.push(null);
+ });
-// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
-__webpack_require__(89)('Map');
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
-/***/ }),
-/* 425 */
-/***/ (function(module, exports, __webpack_require__) {
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
-// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
-__webpack_require__(89)('Set');
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
-/***/ }),
-/* 426 */
-/***/ (function(module, exports, __webpack_require__) {
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
-__webpack_require__(89)('WeakMap');
+ return this;
+};
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
-/***/ }),
-/* 427 */
-/***/ (function(module, exports, __webpack_require__) {
+// exposed for testing purposes only.
+Readable._fromList = fromList;
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
-__webpack_require__(89)('WeakSet');
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
-/***/ }),
-/* 428 */
-/***/ (function(module, exports, __webpack_require__) {
+ return ret;
+}
-// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
-__webpack_require__(90)('Map');
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
-/***/ }),
-/* 429 */
-/***/ (function(module, exports, __webpack_require__) {
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
-// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
-__webpack_require__(90)('Set');
+function endReadable(stream) {
+ var state = stream._readableState;
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
-/***/ }),
-/* 430 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
-__webpack_require__(90)('WeakMap');
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(30), __webpack_require__(67)))
/***/ }),
-/* 431 */
+/* 203 */
/***/ (function(module, exports, __webpack_require__) {
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
-__webpack_require__(90)('WeakSet');
+module.exports = __webpack_require__(86).EventEmitter;
/***/ }),
-/* 432 */
+/* 204 */
/***/ (function(module, exports, __webpack_require__) {
-// https://github.com/tc39/proposal-global
-var $export = __webpack_require__(1);
+"use strict";
-$export($export.G, { global: __webpack_require__(4) });
+/**/
-/***/ }),
-/* 433 */
-/***/ (function(module, exports, __webpack_require__) {
+var pna = __webpack_require__(87);
+/**/
-// https://github.com/tc39/proposal-global
-var $export = __webpack_require__(1);
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
-$export($export.S, 'System', { global: __webpack_require__(4) });
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err) {
+ if (!this._writableState) {
+ pna.nextTick(emitErrorNT, this, err);
+ } else if (!this._writableState.errorEmitted) {
+ this._writableState.errorEmitted = true;
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ }
-/***/ }),
-/* 434 */
-/***/ (function(module, exports, __webpack_require__) {
+ return this;
+ }
-// https://github.com/ljharb/proposal-is-error
-var $export = __webpack_require__(1);
-var cof = __webpack_require__(30);
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
-$export($export.S, 'Error', {
- isError: function isError(it) {
- return cof(it) === 'Error';
+ if (this._readableState) {
+ this._readableState.destroyed = true;
}
-});
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
-/***/ }),
-/* 435 */
-/***/ (function(module, exports, __webpack_require__) {
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ if (!_this._writableState) {
+ pna.nextTick(emitErrorNT, _this, err);
+ } else if (!_this._writableState.errorEmitted) {
+ _this._writableState.errorEmitted = true;
+ pna.nextTick(emitErrorNT, _this, err);
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
+ return this;
+}
-$export($export.S, 'Math', {
- clamp: function clamp(x, lower, upper) {
- return Math.min(upper, Math.max(lower, x));
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
}
-});
-
-
-/***/ }),
-/* 436 */
-/***/ (function(module, exports, __webpack_require__) {
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finalCalled = false;
+ this._writableState.prefinished = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
-$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+};
/***/ }),
-/* 437 */
+/* 205 */
/***/ (function(module, exports, __webpack_require__) {
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
-var RAD_PER_DEG = 180 / Math.PI;
-
-$export($export.S, 'Math', {
- degrees: function degrees(radians) {
- return radians * RAD_PER_DEG;
- }
-});
-
-
-/***/ }),
-/* 438 */
-/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
-var scale = __webpack_require__(204);
-var fround = __webpack_require__(183);
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
-$export($export.S, 'Math', {
- fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
- return fround(scale(x, inLow, inHigh, outLow, outHigh));
- }
-});
-/***/ }),
-/* 439 */
-/***/ (function(module, exports, __webpack_require__) {
+module.exports = Transform;
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = __webpack_require__(1);
+var Duplex = __webpack_require__(53);
-$export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1) {
- var $x0 = x0 >>> 0;
- var $x1 = x1 >>> 0;
- var $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
-});
+/**/
+var util = Object.create(__webpack_require__(68));
+util.inherits = __webpack_require__(60);
+/**/
+util.inherits(Transform, Duplex);
-/***/ }),
-/* 440 */
-/***/ (function(module, exports, __webpack_require__) {
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = __webpack_require__(1);
+ var cb = ts.writecb;
-$export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1) {
- var $x0 = x0 >>> 0;
- var $x1 = x1 >>> 0;
- var $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
}
-});
+ ts.writechunk = null;
+ ts.writecb = null;
-/***/ }),
-/* 441 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = __webpack_require__(1);
+ cb(er);
-$export($export.S, 'Math', {
- imulh: function imulh(u, v) {
- var UINT16 = 0xffff;
- var $u = +u;
- var $v = +v;
- var u0 = $u & UINT16;
- var v0 = $v & UINT16;
- var u1 = $u >> 16;
- var v1 = $v >> 16;
- var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
}
-});
-
+}
-/***/ }),
-/* 442 */
-/***/ (function(module, exports, __webpack_require__) {
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
+ Duplex.call(this, options);
-$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
-/***/ }),
-/* 443 */
-/***/ (function(module, exports, __webpack_require__) {
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
-var DEG_PER_RAD = Math.PI / 180;
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
-$export($export.S, 'Math', {
- radians: function radians(degrees) {
- return degrees * DEG_PER_RAD;
+ if (typeof options.flush === 'function') this._flush = options.flush;
}
-});
-
-
-/***/ }),
-/* 444 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = __webpack_require__(1);
-$export($export.S, 'Math', { scale: __webpack_require__(204) });
-
-
-/***/ }),
-/* 445 */
-/***/ (function(module, exports, __webpack_require__) {
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = __webpack_require__(1);
+function prefinish() {
+ var _this = this;
-$export($export.S, 'Math', {
- umulh: function umulh(u, v) {
- var UINT16 = 0xffff;
- var $u = +u;
- var $v = +v;
- var u0 = $u & UINT16;
- var v0 = $v & UINT16;
- var u1 = $u >>> 16;
- var v1 = $v >>> 16;
- var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
}
-});
-
-
-/***/ }),
-/* 446 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// http://jfbastien.github.io/papers/Math.signbit.html
-var $export = __webpack_require__(1);
-
-$export($export.S, 'Math', { signbit: function signbit(x) {
- // eslint-disable-next-line no-self-compare
- return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
-} });
-
-
-/***/ }),
-/* 447 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// https://github.com/tc39/proposal-promise-finally
+}
-var $export = __webpack_require__(1);
-var core = __webpack_require__(28);
-var global = __webpack_require__(4);
-var speciesConstructor = __webpack_require__(72);
-var promiseResolve = __webpack_require__(191);
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
-$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
- var C = speciesConstructor(this, core.Promise || global.Promise);
- var isFunction = typeof onFinally == 'function';
- return this.then(
- isFunction ? function (x) {
- return promiseResolve(C, onFinally()).then(function () { return x; });
- } : onFinally,
- isFunction ? function (e) {
- return promiseResolve(C, onFinally()).then(function () { throw e; });
- } : onFinally
- );
-} });
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
-/***/ }),
-/* 448 */
-/***/ (function(module, exports, __webpack_require__) {
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
-"use strict";
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
-// https://github.com/tc39/proposal-promise-try
-var $export = __webpack_require__(1);
-var newPromiseCapability = __webpack_require__(137);
-var perform = __webpack_require__(190);
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
-$export($export.S, 'Promise', { 'try': function (callbackfn) {
- var promiseCapability = newPromiseCapability.f(this);
- var result = perform(callbackfn);
- (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
- return promiseCapability.promise;
-} });
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
-/***/ }),
-/* 449 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var toMetaKey = metadata.key;
-var ordinaryDefineOwnMetadata = metadata.set;
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
-metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
-} });
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+ return stream.push(null);
+}
/***/ }),
-/* 450 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 206 */
+/***/ (function(module, exports) {
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var toMetaKey = metadata.key;
-var getOrCreateMetadataMap = metadata.map;
-var store = metadata.store;
+// Generated by CoffeeScript 1.12.7
+(function() {
+ "use strict";
+ var prefixMatch;
-metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
- var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
- if (metadataMap.size) return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
-} });
+ prefixMatch = new RegExp(/(?!xmlns)^.*:/);
+ exports.normalize = function(str) {
+ return str.toLowerCase();
+ };
-/***/ }),
-/* 451 */
-/***/ (function(module, exports, __webpack_require__) {
+ exports.firstCharLowerCase = function(str) {
+ return str.charAt(0).toLowerCase() + str.slice(1);
+ };
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var getPrototypeOf = __webpack_require__(24);
-var ordinaryHasOwnMetadata = metadata.has;
-var ordinaryGetOwnMetadata = metadata.get;
-var toMetaKey = metadata.key;
+ exports.stripPrefix = function(str) {
+ return str.replace(prefixMatch, '');
+ };
-var ordinaryGetMetadata = function (MetadataKey, O, P) {
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
-};
+ exports.parseNumbers = function(str) {
+ if (!isNaN(str)) {
+ str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);
+ }
+ return str;
+ };
-metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
+ exports.parseBooleans = function(str) {
+ if (/^(?:true|false)$/i.test(str)) {
+ str = str.toLowerCase() === 'true';
+ }
+ return str;
+ };
+
+}).call(this);
/***/ }),
-/* 452 */
+/* 207 */
/***/ (function(module, exports, __webpack_require__) {
-var Set = __webpack_require__(194);
-var from = __webpack_require__(203);
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var getPrototypeOf = __webpack_require__(24);
-var ordinaryOwnMetadataKeys = metadata.keys;
-var toMetaKey = metadata.key;
+var conventions = __webpack_require__(89);
-var ordinaryMetadataKeys = function (O, P) {
- var oKeys = ordinaryOwnMetadataKeys(O, P);
- var parent = getPrototypeOf(O);
- if (parent === null) return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
-};
+var find = conventions.find;
+var NAMESPACE = conventions.NAMESPACE;
-metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-} });
+/**
+ * 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;
+}
-/***/ }),
-/* 453 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @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, {}))
+}
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var ordinaryGetOwnMetadata = metadata.get;
-var toMetaKey = metadata.key;
+/**
+ * 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;
+ }
+}
-metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
+function copy(src,dest){
+ for(var p in src){
+ if (Object.prototype.hasOwnProperty.call(src, p)) {
+ 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
+ }
+}
-/***/ }),
-/* 454 */
-/***/ (function(module, exports, __webpack_require__) {
+// 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;
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var ordinaryOwnMetadataKeys = metadata.keys;
-var toMetaKey = metadata.key;
+// 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);
-metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-} });
+/**
+ * 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 index >= 0 && index < this.length ? 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;
+ },
-/***/ }),
-/* 456 */
-/***/ (function(module, exports, __webpack_require__) {
+ /* returns Node */
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
-var metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var ordinaryHasOwnMetadata = metadata.has;
-var toMetaKey = metadata.key;
-metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
+ },// 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;
+ }
+};
-/***/ }),
-/* 457 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * 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() {
+}
-var $metadata = __webpack_require__(38);
-var anObject = __webpack_require__(3);
-var aFunction = __webpack_require__(15);
-var toMetaKey = $metadata.key;
-var ordinaryDefineOwnMetadata = $metadata.set;
+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 || '';
-$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
- return function decorator(target, targetKey) {
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
-} });
+ return node;
+ }
+};
-/***/ }),
-/* 458 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
+ */
-// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
-var $export = __webpack_require__(1);
-var microtask = __webpack_require__(136)();
-var process = __webpack_require__(4).process;
-var isNode = __webpack_require__(30)(process) == 'process';
+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
+ _insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);
+ 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 (Object.prototype.hasOwnProperty.call(map, n) && 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(Object.prototype.hasOwnProperty.call(map, prefix)){
+ 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;
+ }
+};
-$export($export.G, {
- asap: function asap(fn) {
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
-});
+function _xmlEncoder(c){
+ return c == '<' && '<' ||
+ c == '>' && '>' ||
+ c == '&' && '&' ||
+ c == '"' && '"' ||
+ ''+c.charCodeAt()+';'
+}
-/***/ }),
-/* 459 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
-// https://github.com/zenparsing/es-observable
-var $export = __webpack_require__(1);
-var global = __webpack_require__(4);
-var core = __webpack_require__(28);
-var microtask = __webpack_require__(136)();
-var OBSERVABLE = __webpack_require__(7)('observable');
-var aFunction = __webpack_require__(15);
-var anObject = __webpack_require__(3);
-var anInstance = __webpack_require__(54);
-var redefineAll = __webpack_require__(56);
-var hide = __webpack_require__(17);
-var forOf = __webpack_require__(55);
-var RETURN = forOf.RETURN;
+/**
+ * @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)
+ }
+}
-var getMethod = function (fn) {
- return fn == null ? undefined : aFunction(fn);
-};
-var cleanupSubscription = function (subscription) {
- var cleanup = subscription._c;
- if (cleanup) {
- subscription._c = undefined;
- cleanup();
- }
-};
-var subscriptionClosed = function (subscription) {
- return subscription._o === undefined;
-};
+function Document(){
+ this.ownerDocument = this;
+}
-var closeSubscription = function (subscription) {
- if (!subscriptionClosed(subscription)) {
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
-};
+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
+ }
+}
-var Subscription = function (observer, subscriber) {
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer);
- var subscription = cleanup;
- if (cleanup != null) {
- if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch (e) {
- observer.error(e);
- return;
- } if (subscriptionClosed(this)) cleanupSubscription(this);
-};
+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:'']
+ }
+}
-Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe() { closeSubscription(this); }
-});
+/**
+ * Updates `el.childNodes`, updating the indexed items and it's `length`.
+ * Passing `newChild` means it will be appended.
+ * Otherwise it's assumed that an item has been removed,
+ * and `el.firstNode` and it's `.nextSibling` are used
+ * to walk the current list of child nodes.
+ *
+ * @param {Document} doc
+ * @param {Node} el
+ * @param {Node} [newChild]
+ * @private
+ */
+function _onUpdateChild (doc, el, newChild) {
+ if(doc && doc._inc){
+ doc._inc++;
+ //update childNodes
+ var cs = el.childNodes;
+ if (newChild) {
+ cs[cs.length++] = newChild;
+ } else {
+ var child = el.firstChild;
+ var i = 0;
+ while (child) {
+ cs[i++] = child;
+ child = child.nextSibling;
+ }
+ cs.length = i;
+ delete cs[cs.length];
+ }
+ }
+}
-var SubscriptionObserver = function (subscription) {
- this._s = subscription;
-};
+/**
+ * Removes the connections between `parentNode` and `child`
+ * and any existing `child.previousSibling` or `child.nextSibling`.
+ *
+ * @see https://github.com/xmldom/xmldom/issues/135
+ * @see https://github.com/xmldom/xmldom/issues/145
+ *
+ * @param {Node} parentNode
+ * @param {Node} child
+ * @returns {Node} the child that was removed.
+ * @private
+ */
+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;
+ }
+ child.parentNode = null;
+ child.previousSibling = null;
+ child.nextSibling = null;
+ _onUpdateChild(parentNode.ownerDocument, parentNode);
+ return child;
+}
-SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value) {
- var subscription = this._s;
- if (!subscriptionClosed(subscription)) {
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if (m) return m.call(observer, value);
- } catch (e) {
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value) {
- var subscription = this._s;
- if (subscriptionClosed(subscription)) throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if (!m) throw value;
- value = m.call(observer, value);
- } catch (e) {
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value) {
- var subscription = this._s;
- if (!subscriptionClosed(subscription)) {
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch (e) {
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
-});
+/**
+ * Returns `true` if `node` can be a parent for insertion.
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function hasValidParentNodeType(node) {
+ return (
+ node &&
+ (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)
+ );
+}
-var $Observable = function Observable(subscriber) {
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
-};
+/**
+ * Returns `true` if `node` can be inserted according to it's `nodeType`.
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function hasInsertableNodeType(node) {
+ return (
+ node &&
+ (isElementNode(node) ||
+ isTextNode(node) ||
+ isDocTypeNode(node) ||
+ node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||
+ node.nodeType === Node.COMMENT_NODE ||
+ node.nodeType === Node.PROCESSING_INSTRUCTION_NODE)
+ );
+}
-redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer) {
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn) {
- var that = this;
- return new (core.Promise || global.Promise)(function (resolve, reject) {
- aFunction(fn);
- var subscription = that.subscribe({
- next: function (value) {
- try {
- return fn(value);
- } catch (e) {
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
-});
+/**
+ * Returns true if `node` is a DOCTYPE node
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function isDocTypeNode(node) {
+ return node && node.nodeType === Node.DOCUMENT_TYPE_NODE;
+}
-redefineAll($Observable, {
- from: function from(x) {
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if (method) {
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function (observer) {
- return observable.subscribe(observer);
- });
- }
- return new C(function (observer) {
- var done = false;
- microtask(function () {
- if (!done) {
- try {
- if (forOf(x, false, function (it) {
- observer.next(it);
- if (done) return RETURN;
- }) === RETURN) return;
- } catch (e) {
- if (done) throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function () { done = true; };
- });
- },
- of: function of() {
- for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function (observer) {
- var done = false;
- microtask(function () {
- if (!done) {
- for (var j = 0; j < items.length; ++j) {
- observer.next(items[j]);
- if (done) return;
- } observer.complete();
- }
- });
- return function () { done = true; };
- });
- }
-});
+/**
+ * Returns true if the node is an element
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function isElementNode(node) {
+ return node && node.nodeType === Node.ELEMENT_NODE;
+}
+/**
+ * Returns true if `node` is a text node
+ * @param {Node} node
+ * @returns {boolean}
+ */
+function isTextNode(node) {
+ return node && node.nodeType === Node.TEXT_NODE;
+}
-hide($Observable.prototype, OBSERVABLE, function () { return this; });
+/**
+ * Check if en element node can be inserted before `child`, or at the end if child is falsy,
+ * according to the presence and position of a doctype node on the same level.
+ *
+ * @param {Document} doc The document node
+ * @param {Node} child the node that would become the nextSibling if the element would be inserted
+ * @returns {boolean} `true` if an element can be inserted before child
+ * @private
+ * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ */
+function isElementInsertionPossible(doc, child) {
+ var parentChildNodes = doc.childNodes || [];
+ if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {
+ return false;
+ }
+ var docTypeNode = find(parentChildNodes, isDocTypeNode);
+ return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
+}
-$export($export.G, { Observable: $Observable });
+/**
+ * Check if en element node can be inserted before `child`, or at the end if child is falsy,
+ * according to the presence and position of a doctype node on the same level.
+ *
+ * @param {Node} doc The document node
+ * @param {Node} child the node that would become the nextSibling if the element would be inserted
+ * @returns {boolean} `true` if an element can be inserted before child
+ * @private
+ * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ */
+function isElementReplacementPossible(doc, child) {
+ var parentChildNodes = doc.childNodes || [];
-__webpack_require__(53)('Observable');
+ function hasElementChildThatIsNotChild(node) {
+ return isElementNode(node) && node !== child;
+ }
+ if (find(parentChildNodes, hasElementChildThatIsNotChild)) {
+ return false;
+ }
+ var docTypeNode = find(parentChildNodes, isDocTypeNode);
+ return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
+}
-/***/ }),
-/* 460 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * @private
+ * Steps 1-5 of the checks before inserting and before replacing a child are the same.
+ *
+ * @param {Node} parent the parent node to insert `node` into
+ * @param {Node} node the node to insert
+ * @param {Node=} child the node that should become the `nextSibling` of `node`
+ * @returns {Node}
+ * @throws DOMException for several node combinations that would create a DOM that is not well-formed.
+ * @throws DOMException if `child` is provided but is not a child of `parent`.
+ * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ * @see https://dom.spec.whatwg.org/#concept-node-replace
+ */
+function assertPreInsertionValidity1to5(parent, node, child) {
+ // 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException.
+ if (!hasValidParentNodeType(parent)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);
+ }
+ // 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException.
+ // not implemented!
+ // 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException.
+ if (child && child.parentNode !== parent) {
+ throw new DOMException(NOT_FOUND_ERR, 'child not in parent');
+ }
+ if (
+ // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException.
+ !hasInsertableNodeType(node) ||
+ // 5. If either `node` is a Text node and `parent` is a document,
+ // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0
+ // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)
+ // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException.
+ (isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)
+ ) {
+ throw new DOMException(
+ HIERARCHY_REQUEST_ERR,
+ 'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType
+ );
+ }
+}
-// ie9- setTimeout & setInterval additional parameters fix
-var global = __webpack_require__(4);
-var $export = __webpack_require__(1);
-var userAgent = __webpack_require__(85);
-var slice = [].slice;
-var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
-var wrap = function (set) {
- return function (fn, time /* , ...args */) {
- var boundArgs = arguments.length > 2;
- var args = boundArgs ? slice.call(arguments, 2) : false;
- return set(boundArgs ? function () {
- // eslint-disable-next-line no-new-func
- (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
- } : fn, time);
- };
-};
-$export($export.G + $export.B + $export.F * MSIE, {
- setTimeout: wrap(global.setTimeout),
- setInterval: wrap(global.setInterval)
-});
+/**
+ * @private
+ * Step 6 of the checks before inserting and before replacing a child are different.
+ *
+ * @param {Document} parent the parent node to insert `node` into
+ * @param {Node} node the node to insert
+ * @param {Node | undefined} child the node that should become the `nextSibling` of `node`
+ * @returns {Node}
+ * @throws DOMException for several node combinations that would create a DOM that is not well-formed.
+ * @throws DOMException if `child` is provided but is not a child of `parent`.
+ * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ * @see https://dom.spec.whatwg.org/#concept-node-replace
+ */
+function assertPreInsertionValidityInDocument(parent, node, child) {
+ var parentChildNodes = parent.childNodes || [];
+ var nodeChildNodes = node.childNodes || [];
+
+ // DocumentFragment
+ if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ var nodeChildElements = nodeChildNodes.filter(isElementNode);
+ // If node has more than one element child or has a Text node child.
+ if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
+ }
+ // Otherwise, if `node` has one element child and either `parent` has an element child,
+ // `child` is a doctype, or `child` is non-null and a doctype is following `child`.
+ if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
+ }
+ }
+ // Element
+ if (isElementNode(node)) {
+ // `parent` has an element child, `child` is a doctype,
+ // or `child` is non-null and a doctype is following `child`.
+ if (!isElementInsertionPossible(parent, child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
+ }
+ }
+ // DocumentType
+ if (isDocTypeNode(node)) {
+ // `parent` has a doctype child,
+ if (find(parentChildNodes, isDocTypeNode)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
+ }
+ var parentElementChild = find(parentChildNodes, isElementNode);
+ // `child` is non-null and an element is preceding `child`,
+ if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
+ }
+ // or `child` is null and `parent` has an element child.
+ if (!child && parentElementChild) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');
+ }
+ }
+}
+/**
+ * @private
+ * Step 6 of the checks before inserting and before replacing a child are different.
+ *
+ * @param {Document} parent the parent node to insert `node` into
+ * @param {Node} node the node to insert
+ * @param {Node | undefined} child the node that should become the `nextSibling` of `node`
+ * @returns {Node}
+ * @throws DOMException for several node combinations that would create a DOM that is not well-formed.
+ * @throws DOMException if `child` is provided but is not a child of `parent`.
+ * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ * @see https://dom.spec.whatwg.org/#concept-node-replace
+ */
+function assertPreReplacementValidityInDocument(parent, node, child) {
+ var parentChildNodes = parent.childNodes || [];
+ var nodeChildNodes = node.childNodes || [];
-/***/ }),
-/* 461 */
-/***/ (function(module, exports, __webpack_require__) {
+ // DocumentFragment
+ if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ var nodeChildElements = nodeChildNodes.filter(isElementNode);
+ // If `node` has more than one element child or has a Text node child.
+ if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
+ }
+ // Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.
+ if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
+ }
+ }
+ // Element
+ if (isElementNode(node)) {
+ // `parent` has an element child that is not `child` or a doctype is following `child`.
+ if (!isElementReplacementPossible(parent, child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
+ }
+ }
+ // DocumentType
+ if (isDocTypeNode(node)) {
+ function hasDoctypeChildThatIsNotChild(node) {
+ return isDocTypeNode(node) && node !== child;
+ }
-var $export = __webpack_require__(1);
-var $task = __webpack_require__(135);
-$export($export.G + $export.B, {
- setImmediate: $task.set,
- clearImmediate: $task.clear
-});
+ // `parent` has a doctype child that is not `child`,
+ if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
+ }
+ var parentElementChild = find(parentChildNodes, isElementNode);
+ // or an element is preceding `child`.
+ if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
+ throw new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
+ }
+ }
+}
+/**
+ * @private
+ * @param {Node} parent the parent node to insert `node` into
+ * @param {Node} node the node to insert
+ * @param {Node=} child the node that should become the `nextSibling` of `node`
+ * @returns {Node}
+ * @throws DOMException for several node combinations that would create a DOM that is not well-formed.
+ * @throws DOMException if `child` is provided but is not a child of `parent`.
+ * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
+ */
+function _insertBefore(parent, node, child, _inDocumentAssertion) {
+ // To ensure pre-insertion validity of a node into a parent before a child, run these steps:
+ assertPreInsertionValidity1to5(parent, node, child);
+
+ // If parent is a document, and any of the statements below, switched on the interface node implements,
+ // are true, then throw a "HierarchyRequestError" DOMException.
+ if (parent.nodeType === Node.DOCUMENT_NODE) {
+ (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);
+ }
-/***/ }),
-/* 462 */
-/***/ (function(module, exports, __webpack_require__) {
+ var cp = node.parentNode;
+ if(cp){
+ cp.removeChild(node);//remove and update
+ }
+ if(node.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = node.firstChild;
+ if (newFirst == null) {
+ return node;
+ }
+ var newLast = node.lastChild;
+ }else{
+ newFirst = newLast = node;
+ }
+ var pre = child ? child.previousSibling : parent.lastChild;
-var $iterators = __webpack_require__(132);
-var getKeys = __webpack_require__(49);
-var redefine = __webpack_require__(18);
-var global = __webpack_require__(4);
-var hide = __webpack_require__(17);
-var Iterators = __webpack_require__(62);
-var wks = __webpack_require__(7);
-var ITERATOR = wks('iterator');
-var TO_STRING_TAG = wks('toStringTag');
-var ArrayValues = Iterators.Array;
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = child;
-var DOMIterables = {
- CSSRuleList: true, // TODO: Not spec compliant, should be false.
- CSSStyleDeclaration: false,
- CSSValueList: false,
- ClientRectList: false,
- DOMRectList: false,
- DOMStringList: false,
- DOMTokenList: true,
- DataTransferItemList: false,
- FileList: false,
- HTMLAllCollection: false,
- HTMLCollection: false,
- HTMLFormElement: false,
- HTMLSelectElement: false,
- MediaList: true, // TODO: Not spec compliant, should be false.
- MimeTypeArray: false,
- NamedNodeMap: false,
- NodeList: true,
- PaintRequestList: false,
- Plugin: false,
- PluginArray: false,
- SVGLengthList: false,
- SVGNumberList: false,
- SVGPathSegList: false,
- SVGPointList: false,
- SVGStringList: false,
- SVGTransformList: false,
- SourceBufferList: false,
- StyleSheetList: true, // TODO: Not spec compliant, should be false.
- TextTrackCueList: false,
- TextTrackList: false,
- TouchList: false
-};
-for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
- var NAME = collections[i];
- var explicit = DOMIterables[NAME];
- var Collection = global[NAME];
- var proto = Collection && Collection.prototype;
- var key;
- if (proto) {
- if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
- if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
- }
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parent.firstChild = newFirst;
+ }
+ if(child == null){
+ parent.lastChild = newLast;
+ }else{
+ child.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parent;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parent.ownerDocument||parent, parent);
+ //console.log(parent.lastChild.nextSibling == null)
+ if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ node.firstChild = node.lastChild = null;
+ }
+ return node;
}
-
-/***/ }),
-/* 463 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global) {/**
- * Copyright (c) 2014, Facebook, Inc.
- * All rights reserved.
+/**
+ * Appends `newChild` to `parentNode`.
+ * If `newChild` is already connected to a `parentNode` it is first removed from it.
*
- * This source code is licensed under the BSD-style license found in the
- * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
- * additional grant of patent rights can be found in the PATENTS file in
- * the same directory.
+ * @see https://github.com/xmldom/xmldom/issues/135
+ * @see https://github.com/xmldom/xmldom/issues/145
+ * @param {Node} parentNode
+ * @param {Node} newChild
+ * @returns {Node}
+ * @private
*/
+function _appendSingleChild (parentNode, newChild) {
+ if (newChild.parentNode) {
+ newChild.parentNode.removeChild(newChild);
+ }
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = parentNode.lastChild;
+ newChild.nextSibling = null;
+ if (newChild.previousSibling) {
+ newChild.previousSibling.nextSibling = newChild;
+ } else {
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
+ return newChild;
+}
-!(function(global) {
- "use strict";
+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;
+ }
+ _insertBefore(this, newChild, refChild);
+ newChild.ownerDocument = this;
+ if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
+ this.documentElement = newChild;
+ }
+
+ return newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ replaceChild: function (newChild, oldChild) {
+ //raises
+ _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
+ newChild.ownerDocument = this;
+ if (oldChild) {
+ this.removeChild(oldChild);
+ }
+ if (isElementNode(newChild)) {
+ this.documentElement = newChild;
+ }
+ },
+ // 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;
+ },
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+ /**
+ * 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;
+ });
+ },
- var inModule = typeof module === "object";
- var runtime = global.regeneratorRuntime;
- if (runtime) {
- if (inModule) {
- // If regeneratorRuntime is defined globally and we're in a module,
- // make the exports object identical to regeneratorRuntime.
- module.exports = runtime;
- }
- // Don't bother evaluating the rest of this file if the runtime was
- // already defined globally.
- return;
- }
+ //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.nodeName = 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);
- // Define the runtime globally (as expected by generated code) as either
- // module.exports (if we're in a module) or a new, empty object.
- runtime = global.regeneratorRuntime = inModule ? module.exports : {};
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
+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);
+ },
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
+ //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);
+ },
- return generator;
- }
- runtime.wrap = wrap;
+ 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);
+ },
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
+ 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;
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
+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);
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
+ },
+ 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);
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
- runtime.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
- runtime.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- runtime.awrap = function(arg) {
- return { __await: arg };
- };
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
- function AsyncIterator(generator) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return Promise.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
- return Promise.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration. If the Promise is rejected, however, the
- // result for this iteration will be rejected with the same
- // reason. Note that rejections of yielded Promises are not
- // thrown back into the generator function, as is the case
- // when an awaited Promise is rejected. This difference in
- // behavior between yield and await is important, because it
- // allows the consumer to decide what to do with the yielded
- // rejection (swallow it and continue, manually .throw it back
- // into the generator, abandon iteration, whatever). With
- // await, by contrast, there is no opportunity to examine the
- // rejection reason outside the generator function, so the
- // only option is to throw it from the await expression, and
- // let the generator function handle the exception.
- result.value = unwrapped;
- resolve(result);
- }, reject);
- }
- }
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
- if (typeof global.process === "object" && global.process.domain) {
- invoke = global.process.domain.bind(invoke);
- }
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
- var previousPromise;
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new Promise(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
+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;
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
+ 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('');
+}
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
+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;
+ }
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- runtime.AsyncIterator = AsyncIterator;
+ 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/xml11/#CleanAttrVals
+ * @see https://www.w3.org/TR/xml11/#NT-AttValue
+ *
+ * Literal whitespace other than space that appear in attribute values
+ * are serialized as their entity references, so they will be preserved.
+ * (In contrast to whitespace literals in the input which are normalized to spaces)
+ * @see https://www.w3.org/TR/xml11/#AVNormalize
+ * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
+ */
+function addSerializedAttribute(buf, qualifiedName, value) {
+ buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"')
+}
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- runtime.async = function(innerFn, outerFn, self, tryLocsList) {
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList)
- );
+function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
+ if (!visibleNamespaces) {
+ visibleNamespaces = [];
+ }
- return runtime.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
+ if(nodeFilter){
+ node = nodeFilter(node);
+ if(node){
+ if(typeof node == 'string'){
+ buf.push(node);
+ return;
+ }
+ }else{
+ return;
+ }
+ //buf.sort.apply(attrs, attributeSorter);
+ }
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
+ isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
+ 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
+ }
+ }
+ }
+ }
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
+ buf.push('<', prefixedNodeName);
- context.method = method;
- context.arg = arg;
+ 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('',prefixedNodeName,'>');
+ }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
+ * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
+ */
+ return buf.push(node.data
+ .replace(/[<&>]/g,_xmlEncoder)
+ );
+ 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( "",node.target," ",node.data,"?>");
+ 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= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
+ return XMLDocument;
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
+ }).call(this);
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
+}).call(this);
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
+
+/***/ }),
+/* 210 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+
+ NodeType = __webpack_require__(14);
+
+ XMLNode = __webpack_require__(24);
+
+ // Represents an attribute
+ module.exports = XMLAttribute = (function() {
+ class XMLAttribute {
+ // Initializes a new instance of `XMLAttribute`
+
+ // `parent` the parent node
+ // `name` attribute target
+ // `value` attribute value
+ constructor(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ // DOM level 3
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
}
}
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
+ isEqualNode(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
}
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
+ };
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
+ // DOM level 1
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
}
+ });
- return this.complete(record);
- },
-
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
}
+ });
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
+ // DOM level 3
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
}
+ });
- return ContinueSentinel;
- },
+ // DOM level 4
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
}
- },
+ });
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
}
+ });
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
+ return XMLAttribute;
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
+ }).call(this);
- return ContinueSentinel;
- }
- };
-})(
- // Among the various tricks for obtaining a reference to the global
- // object, this seems to be the most reliable technique that does not
- // use indirect eval (which violates Content Security Policy).
- typeof global === "object" ? global :
- typeof window === "object" ? window :
- typeof self === "object" ? self : this
-);
+}).call(this);
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)))
/***/ }),
-/* 464 */
+/* 211 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(465);
-module.exports = __webpack_require__(28).RegExp.escape;
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDummy, XMLNode;
+ XMLNode = __webpack_require__(24);
-/***/ }),
-/* 465 */
-/***/ (function(module, exports, __webpack_require__) {
+ NodeType = __webpack_require__(14);
-// https://github.com/benjamingr/RexExp.escape
-var $export = __webpack_require__(1);
-var $re = __webpack_require__(466)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+ // Represents a raw node
+ module.exports = XMLDummy = class XMLDummy extends XMLNode {
+ // Initializes a new instance of `XMLDummy`
-$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
+ // `XMLDummy` is a special node representing a node with
+ // a null value. Dummy nodes are created while recursively
+ // building the XML tree. Simply skipping null values doesn't
+ // work because that would break the recursive chain.
+ constructor(parent) {
+ super(parent);
+ this.type = NodeType.Dummy;
+ }
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
-/***/ }),
-/* 466 */
-/***/ (function(module, exports) {
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return '';
+ }
-module.exports = function (regExp, replace) {
- var replacer = replace === Object(replace) ? function (part) {
- return replace[part];
- } : replace;
- return function (it) {
- return String(it).replace(regExp, replacer);
};
-};
+
+}).call(this);
/***/ }),
-/* 467 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 212 */
+/***/ (function(module, exports) {
-"use strict";
-/** @license React v16.12.0
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Converts values to strings
+ var XMLStringifier,
+ hasProp = {}.hasOwnProperty;
-var h=__webpack_require__(205),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113;n&&Symbol.for("react.suspense_list");
-var z=n?Symbol.for("react.memo"):60115,aa=n?Symbol.for("react.lazy"):60116;n&&Symbol.for("react.fundamental");n&&Symbol.for("react.responder");n&&Symbol.for("react.scope");var A="function"===typeof Symbol&&Symbol.iterator;
-function B(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cP.length&&P.push(a)}
-function S(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var l=0;lb}return!1}function B(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var D={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1)});var sb=/[\-:]([a-z])/g;function tb(a){return a[1].toUpperCase()}
-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(sb,
-tb);D[b]=new B(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(sb,tb);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(sb,tb);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1)});
-D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0)});function ub(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}
-function vb(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2=b.length))throw Error(u(93));b=b[0]}c=b}null==c&&(c="")}a._wrapperState={initialValue:ub(c)}}
-function Mb(a,b){var c=ub(b.value),d=ub(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Nb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Ob={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function Pb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Pb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
-var Rb,Sb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ob.svg||"innerHTML"in a)a.innerHTML=b;else{Rb=Rb||document.createElement("div");Rb.innerHTML="";for(b=Rb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
-function Tb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Ub(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Vb={animationend:Ub("Animation","AnimationEnd"),animationiteration:Ub("Animation","AnimationIteration"),animationstart:Ub("Animation","AnimationStart"),transitionend:Ub("Transition","TransitionEnd")},Wb={},Xb={};
-Ya&&(Xb=document.createElement("div").style,"AnimationEvent"in window||(delete Vb.animationend.animation,delete Vb.animationiteration.animation,delete Vb.animationstart.animation),"TransitionEvent"in window||delete Vb.transitionend.transition);function Yb(a){if(Wb[a])return Wb[a];if(!Vb[a])return a;var b=Vb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Xb)return Wb[a]=b[c];return a}var Zb=Yb("animationend"),$b=Yb("animationiteration"),ac=Yb("animationstart"),bc=Yb("transitionend"),cc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");
-function ec(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function fc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function gc(a){if(ec(a)!==a)throw Error(u(188));}
-function hc(a){var b=a.alternate;if(!b){b=ec(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return gc(e),a;if(f===d)return gc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function ic(a){a=hc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
-var jc,kc,lc,mc=!1,nc=[],oc=null,pc=null,qc=null,rc=new Map,sc=new Map,tc=[],uc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),vc="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
-function wc(a){var b=xc(a);uc.forEach(function(c){yc(c,a,b)});vc.forEach(function(c){yc(c,a,b)})}function zc(a,b,c,d){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:d}}function Ac(a,b){switch(a){case "focus":case "blur":oc=null;break;case "dragenter":case "dragleave":pc=null;break;case "mouseover":case "mouseout":qc=null;break;case "pointerover":case "pointerout":rc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":sc.delete(b.pointerId)}}
-function Bc(a,b,c,d,e){if(null===a||a.nativeEvent!==e)return a=zc(b,c,d,e),null!==b&&(b=Cc(b),null!==b&&kc(b)),a;a.eventSystemFlags|=d;return a}function Dc(a,b,c,d){switch(b){case "focus":return oc=Bc(oc,a,b,c,d),!0;case "dragenter":return pc=Bc(pc,a,b,c,d),!0;case "mouseover":return qc=Bc(qc,a,b,c,d),!0;case "pointerover":var e=d.pointerId;rc.set(e,Bc(rc.get(e)||null,a,b,c,d));return!0;case "gotpointercapture":return e=d.pointerId,sc.set(e,Bc(sc.get(e)||null,a,b,c,d)),!0}return!1}
-function Ec(a){var b=Fc(a.target);if(null!==b){var c=ec(b);if(null!==c)if(b=c.tag,13===b){if(b=fc(c),null!==b){a.blockedOn=b;q.unstable_runWithPriority(a.priority,function(){lc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Gc(a){if(null!==a.blockedOn)return!1;var b=Hc(a.topLevelType,a.eventSystemFlags,a.nativeEvent);if(null!==b){var c=Cc(b);null!==c&&kc(c);a.blockedOn=b;return!1}return!0}
-function Ic(a,b,c){Gc(a)&&c.delete(b)}function Jc(){for(mc=!1;0this.eventPool.length&&this.eventPool.push(a)}function Vc(a){a.eventPool=[];a.getPooled=Wc;a.release=Xc}var Yc=E.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zc=E.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),$c=E.extend({view:null,detail:null}),ad=$c.extend({relatedTarget:null});
-function bd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
-var cd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
-116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ed={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ed[a])?!!b[a]:!1}function hd(){return gd}
-var id=$c.extend({key:function(a){if(a.key){var b=cd[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=bd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?dd[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:hd,charCode:function(a){return"keypress"===a.type?bd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?bd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),jd=0,kd=0,ld=!1,md=!1,nd=$c.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:hd,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=jd;jd=a.screenX;return ld?"mousemove"===a.type?a.screenX-
-b:0:(ld=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=kd;kd=a.screenY;return md?"mousemove"===a.type?a.screenY-b:0:(md=!0,0)}}),od=nd.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),pd=nd.extend({dataTransfer:null}),qd=$c.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:hd}),rd=E.extend({propertyName:null,
-elapsedTime:null,pseudoElement:null}),sd=nd.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),td=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",
-0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",
-0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",
-2],[Zb,"animationEnd",2],[$b,"animationIteration",2],[ac,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress",
-"progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[bc,"transitionEnd",2],["waiting","waiting",2]],ud={},vd={},wd=0;for(;wd=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ce(c)}}
-function ee(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?ee(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function fe(){for(var a=window,b=be();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=be(a.document)}return b}
-function ge(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var he="$",ie="/$",je="$?",ke="$!",le=null,me=null;function ne(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
-function oe(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var pe="function"===typeof setTimeout?setTimeout:void 0,qe="function"===typeof clearTimeout?clearTimeout:void 0;function re(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
-function se(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===he||c===ke||c===je){if(0===b)return a;b--}else c===ie&&b++}a=a.previousSibling}return null}var te=Math.random().toString(36).slice(2),ue="__reactInternalInstance$"+te,ve="__reactEventHandlers$"+te,we="__reactContainere$"+te;
-function Fc(a){var b=a[ue];if(b)return b;for(var c=a.parentNode;c;){if(b=c[we]||c[ue]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=se(a);null!==a;){if(c=a[ue])return c;a=se(a)}return b}a=c;c=a.parentNode}return null}function Cc(a){a=a[ue]||a[we];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function xe(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function ye(a){return a[ve]||null}var ze=null,Ae=null,Be=null;
-function Ce(){if(Be)return Be;var a,b=Ae,c=b.length,d,e="value"in ze?ze.value:ze.textContent,f=e.length;for(a=0;a=He),Ke=String.fromCharCode(32),Le={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
-captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Me=!1;
-function Ne(a,b){switch(a){case "keyup":return-1!==Fe.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Oe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Pe=!1;function Qe(a,b){switch(a){case "compositionend":return Oe(b);case "keypress":if(32!==b.which)return null;Me=!0;return Ke;case "textInput":return a=b.data,a===Ke&&Me?null:a;default:return null}}
-function Re(a,b){if(Pe)return"compositionend"===a||!Ge&&Ne(a,b)?(a=Ce(),Be=Ae=ze=null,Pe=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,sf={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},tf=null,uf=null,vf=null,wf=!1;
-function xf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(wf||null==tf||tf!==be(c))return null;c=tf;"selectionStart"in c&&ge(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return vf&&qf(vf,c)?null:(vf=c,a=E.getPooled(sf.select,uf,a,b),a.type="select",a.target=tf,Sc(a),a)}
-var yf={eventTypes:sf,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=xc(e);f=ja.onSelect;for(var g=0;gBf||(a.current=Af[Bf],Af[Bf]=null,Bf--)}
-function I(a,b){Bf++;Af[Bf]=a.current;a.current=b}var Cf={},J={current:Cf},K={current:!1},Df=Cf;function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}
-function Ff(a){G(K,a);G(J,a)}function Gf(a){G(K,a);G(J,a)}function Hf(a,b,c){if(J.current!==Cf)throw Error(u(168));I(J,b,a);I(K,c,a)}function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,Wa(b)||"Unknown",e));return n({},c,{},d)}function Jf(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||Cf;Df=J.current;I(J,b,a);I(K,K.current,a);return!0}
-function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(b=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=b,G(K,a),G(J,a),I(J,b,a)):G(K,a);I(K,c,a)}
-var Lf=q.unstable_runWithPriority,Mf=q.unstable_scheduleCallback,Nf=q.unstable_cancelCallback,Of=q.unstable_shouldYield,Pf=q.unstable_requestPaint,Qf=q.unstable_now,Rf=q.unstable_getCurrentPriorityLevel,Sf=q.unstable_ImmediatePriority,Tf=q.unstable_UserBlockingPriority,Uf=q.unstable_NormalPriority,Vf=q.unstable_LowPriority,Wf=q.unstable_IdlePriority,Xf={},Yf=void 0!==Pf?Pf:function(){},Zf=null,$f=null,ag=!1,bg=Qf(),cg=1E4>bg?Qf:function(){return Qf()-bg};
-function dg(){switch(Rf()){case Sf:return 99;case Tf:return 98;case Uf:return 97;case Vf:return 96;case Wf:return 95;default:throw Error(u(332));}}function eg(a){switch(a){case 99:return Sf;case 98:return Tf;case 97:return Uf;case 96:return Vf;case 95:return Wf;default:throw Error(u(332));}}function fg(a,b){a=eg(a);return Lf(a,b)}function gg(a,b,c){a=eg(a);return Mf(a,b,c)}function hg(a){null===Zf?(Zf=[a],$f=Mf(Sf,ig)):Zf.push(a);return Xf}function jg(){if(null!==$f){var a=$f;$f=null;Nf(a)}ig()}
-function ig(){if(!ag&&null!==Zf){ag=!0;var a=0;try{var b=Zf;fg(99,function(){for(;a=b&&(wg=!0),a.firstContext=null)}function xg(a,b){if(qg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)qg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===pg){if(null===og)throw Error(u(308));pg=b;og.dependencies={expirationTime:0,firstContext:b,responders:null}}else pg=pg.next=b}return a._currentValue}var yg=!1;
-function zg(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ag(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}
-function Bg(a,b){return{expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Cg(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}
-function Dg(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=zg(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=zg(a.memoizedState),e=c.updateQueue=zg(c.memoizedState)):d=a.updateQueue=Ag(e):null===e&&(e=c.updateQueue=Ag(d));null===e||d===e?Cg(d,b):null===d.lastUpdate||null===e.lastUpdate?(Cg(d,b),Cg(e,b)):(Cg(d,b),e.lastUpdate=b)}
-function Eg(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=zg(a.memoizedState):Fg(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function Fg(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Ag(b));return b}
-function Gg(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-4097|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case 2:yg=!0}return d}
-function Hg(a,b,c,d,e){yg=!1;b=Fg(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,l=f;null!==k;){var m=k.expirationTime;mx?(A=r,r=null):A=r.sibling;var p=y(e,r,h[x],k);if(null===p){null===r&&(r=A);break}a&&
-r&&null===p.alternate&&b(e,r);g=f(p,g,x);null===m?l=p:m.sibling=p;m=p;r=A}if(x===h.length)return c(e,r),l;if(null===r){for(;xx?(A=r,r=null):A=r.sibling;var z=y(e,r,p.value,k);if(null===z){null===r&&(r=A);break}a&&r&&null===z.alternate&&b(e,r);g=f(z,g,x);null===m?l=z:m.sibling=z;m=z;r=A}if(p.done)return c(e,r),l;if(null===r){for(;!p.done;x++,p=h.next())p=C(e,p.value,k),null!==p&&(g=f(p,g,x),null===m?l=p:m.sibling=p,m=p);return l}for(r=d(e,r);!p.done;x++,p=h.next())p=H(r,e,x,p.value,k),null!==p&&(a&&null!==
-p.alternate&&r.delete(null===p.key?x:p.key),g=f(p,g,x),null===m?l=p:m.sibling=p,m=p);a&&r.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===Ia&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Ga:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===Ia:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===Ia?f.props.children:f.props,h);d.ref=Yg(a,k,f);d.return=a;a=d;break a}else{c(a,
-k);break}else b(a,k);k=k.sibling}f.type===Ia?(d=eh(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ch(f.type,f.key,f.props,null,a.mode,h),h.ref=Yg(a,d,f),h.return=a,a=h)}return g(a);case Ha:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=dh(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===
-typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=bh(f,a.mode,h),d.return=a,a=d),g(a);if(Xg(f))return z(a,d,f,h);if(Ua(f))return ta(a,d,f,h);l&&Zg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var fh=$g(!0),gh=$g(!1),hh={},ih={current:hh},jh={current:hh},kh={current:hh};function lh(a){if(a===hh)throw Error(u(174));return a}
-function mh(a,b){I(kh,b,a);I(jh,a,a);I(ih,hh,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Qb(null,"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Qb(b,c)}G(ih,a);I(ih,b,a)}function nh(a){G(ih,a);G(jh,a);G(kh,a)}function oh(a){lh(kh.current);var b=lh(ih.current);var c=Qb(b,a.type);b!==c&&(I(jh,a,a),I(ih,c,a))}function ph(a){jh.current===a&&(G(ih,a),G(jh,a))}var M={current:0};
-function qh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===je||c.data===ke))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function rh(a,b){return{responder:a,props:b}}
-var sh=Ea.ReactCurrentDispatcher,N=Ea.ReactCurrentBatchConfig,th=0,uh=null,O=null,vh=null,wh=null,P=null,xh=null,yh=0,zh=null,Ah=0,Bh=!1,Ch=null,Gh=0;function Q(){throw Error(u(321));}function Hh(a,b){if(null===b)return!1;for(var c=0;cyh&&(yh=m,Jg(yh))):(Ig(m,k.suspenseConfig),f=k.eagerReducer===a?k.eagerState:a(f,k.action));g=k;k=k.next}while(null!==k&&k!==d);l||(h=g,e=f);of(f,b.memoizedState)||(wg=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.lastRenderedState=f}return[b.memoizedState,c.dispatch]}
-function Rh(a){var b=Nh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,dispatch:null,lastRenderedReducer:Ph,lastRenderedState:a};a=a.dispatch=Sh.bind(null,uh,a);return[b.memoizedState,a]}function Th(a){return Qh(Ph,a)}function Uh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===zh?(zh={lastEffect:null},zh.lastEffect=a.next=a):(b=zh.lastEffect,null===b?zh.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,zh.lastEffect=a));return a}
-function Vh(a,b,c,d){var e=Nh();Ah|=a;e.memoizedState=Uh(b,c,void 0,void 0===d?null:d)}function Wh(a,b,c,d){var e=Oh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Hh(d,g.deps)){Uh(0,c,f,d);return}}Ah|=a;e.memoizedState=Uh(b,c,f,d)}function Xh(a,b){return Vh(516,192,a,b)}function Yh(a,b){return Wh(516,192,a,b)}
-function Zh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function $h(){}function ai(a,b){Nh().memoizedState=[a,void 0===b?null:b];return a}function bi(a,b){var c=Oh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Hh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
-function Sh(a,b,c){if(!(25>Gh))throw Error(u(301));var d=a.alternate;if(a===uh||null!==d&&d===uh)if(Bh=!0,a={expirationTime:th,suspenseConfig:null,action:c,eagerReducer:null,eagerState:null,next:null},null===Ch&&(Ch=new Map),c=Ch.get(b),void 0===c)Ch.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{var e=Pg(),f=Mg.suspense;e=Qg(e,a,f);f={expirationTime:e,suspenseConfig:f,action:c,eagerReducer:null,eagerState:null,next:null};var g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&
-(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===d||0===d.expirationTime)&&(d=b.lastRenderedReducer,null!==d))try{var k=b.lastRenderedState,l=d(k,c);f.eagerReducer=d;f.eagerState=l;if(of(l,k))return}catch(m){}finally{}Rg(a,e)}}
-var Lh={readContext:xg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},Jh={readContext:xg,useCallback:ai,useContext:xg,useEffect:Xh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,36,Zh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Vh(4,36,a,b)},useMemo:function(a,b){var c=Nh();b=void 0===b?null:b;a=a();c.memoizedState=
-[a,b];return a},useReducer:function(a,b,c){var d=Nh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Sh.bind(null,uh,a);return[d.memoizedState,a]},useRef:function(a){var b=Nh();a={current:a};return b.memoizedState=a},useState:Rh,useDebugValue:$h,useResponder:rh,useDeferredValue:function(a,b){var c=Rh(a),d=c[0],e=c[1];Xh(function(){q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===b?null:b;try{e(a)}finally{N.suspense=
-c}})},[a,b]);return d},useTransition:function(a){var b=Rh(!1),c=b[0],d=b[1];return[ai(function(b){d(!0);q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===a?null:a;try{d(!1),b()}finally{N.suspense=c}})},[a,c]),c]}},Kh={readContext:xg,useCallback:bi,useContext:xg,useEffect:Yh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Wh(4,36,Zh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Wh(4,36,a,b)},useMemo:function(a,b){var c=Oh();b=void 0===b?
-null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Hh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:Qh,useRef:function(){return Oh().memoizedState},useState:Th,useDebugValue:$h,useResponder:rh,useDeferredValue:function(a,b){var c=Th(a),d=c[0],e=c[1];Yh(function(){q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===b?null:b;try{e(a)}finally{N.suspense=c}})},[a,b]);return d},useTransition:function(a){var b=Th(!1),c=b[0],d=b[1];return[bi(function(b){d(!0);q.unstable_next(function(){var c=
-N.suspense;N.suspense=void 0===a?null:a;try{d(!1),b()}finally{N.suspense=c}})},[a,c]),c]}},ci=null,di=null,ei=!1;function fi(a,b){var c=gi(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
-function hi(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
-function ii(a){if(ei){var b=di;if(b){var c=b;if(!hi(a,b)){b=re(c.nextSibling);if(!b||!hi(a,b)){a.effectTag=a.effectTag&-1025|2;ei=!1;ci=a;return}fi(ci,c)}ci=a;di=re(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,ei=!1,ci=a}}function ji(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ci=a}
-function ki(a){if(a!==ci)return!1;if(!ei)return ji(a),ei=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!oe(b,a.memoizedProps))for(b=di;b;)fi(a,b),b=re(b.nextSibling);ji(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===ie){if(0===b){di=re(a.nextSibling);break a}b--}else c!==he&&c!==ke&&c!==je||b++}a=a.nextSibling}di=null}}else di=ci?re(a.stateNode.nextSibling):null;return!0}
-function li(){di=ci=null;ei=!1}var mi=Ea.ReactCurrentOwner,wg=!1;function R(a,b,c,d){b.child=null===a?gh(b,null,c,d):fh(b,a.child,c,d)}function ni(a,b,c,d,e){c=c.render;var f=b.ref;vg(b,e);d=Ih(a,b,c,d,f,e);if(null!==a&&!wg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),oi(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
-function pi(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!qi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ri(a,b,g,d,e,f);a=ch(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(eb)&&Gj.set(a,b)))}}
-function Kj(a,b){a.expirationTimea?b:a}
-function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=hg(Lj.bind(null,a));else{var b=Oj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Pg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Xf&&Nf(c)}a.callbackExpirationTime=
-b;a.callbackPriority=d;b=1073741823===b?hg(Lj.bind(null,a)):gg(d,Qj.bind(null,a),{timeout:10*(1073741821-b)-cg()});a.callbackNode=b}}}
-function Qj(a,b){Jj=0;if(b)return b=Pg(),Rj(a,b),Z(a),null;var c=Oj(a);if(0!==c){b=a.callbackNode;if((T&(oj|pj))!==S)throw Error(u(327));Sj();a===U&&c===W||Tj(a,c);if(null!==V){var d=T;T|=oj;var e=Uj(a);do try{Vj();break}catch(h){Wj(a,h)}while(1);rg();T=d;lj.current=e;if(X===rj)throw b=wj,Tj(a,c),Mj(a,c),Z(a),b;if(null===V)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=X,U=null,d){case qj:case rj:throw Error(u(345));case sj:Rj(a,2=c){a.lastPingedTime=c;Tj(a,c);break}}f=Oj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=pe(Yj.bind(null,a),e);break}Yj(a);break;case uj:Mj(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Xj(e));if(Bj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Tj(a,c);break}e=Oj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=
-d;break}1073741823!==yj?d=10*(1073741821-yj)-cg():1073741823===xj?d=0:(d=10*(1073741821-xj)-5E3,e=cg(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*kj(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=cg()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display."+Xa(e))}X!==vj&&(X=sj);f=Ni(f,e);k=d;do{switch(k.tag){case 3:g=f;k.effectTag|=4096;k.expirationTime=b;var x=fj(k,g,b);Eg(k,x);break a;case 1:g=f;var A=k.type,p=k.stateNode;if(0===(k.effectTag&64)&&("function"===typeof A.getDerivedStateFromError||null!==p&&"function"===typeof p.componentDidCatch&&
-(null===jj||!jj.has(p)))){k.effectTag|=4096;k.expirationTime=b;var t=ij(k,g,b);Eg(k,t);break a}}k=k.return}while(null!==k)}V=ek(V)}catch(v){b=v;continue}break}while(1)}function Uj(){var a=lj.current;lj.current=Lh;return null===a?Lh:a}function Ig(a,b){aAj&&(Aj=a)}function Zj(){for(;null!==V;)V=fk(V)}function Vj(){for(;null!==V&&!Of();)V=fk(V)}
-function fk(a){var b=gk(a.alternate,a,W);a.memoizedProps=a.pendingProps;null===b&&(b=ek(a));mj.current=null;return b}
-function ek(a){V=a;do{var b=V.alternate;a=V.return;if(0===(V.effectTag&2048)){a:{var c=b;b=V;var d=W;var e=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:L(b.type)&&Ff(b);break;case 3:nh(b);Gf(b);e=b.stateNode;e.pendingContext&&(e.context=e.pendingContext,e.pendingContext=null);(null===c||null===c.child)&&ki(b)&&Ci(b);Ii(b);break;case 5:ph(b);d=lh(kh.current);var f=b.type;if(null!==c&&null!=b.stateNode)Ji(c,b,f,e,d),c.ref!==b.ref&&(b.effectTag|=128);else if(e){var g=
-lh(ih.current);if(ki(b)){e=b;var h=e.stateNode;c=e.type;var k=e.memoizedProps,l=d;h[ue]=e;h[ve]=k;f=void 0;d=h;switch(c){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(h=0;h\x3c/script>",h=k.removeChild(k.firstChild)):"string"===typeof k.is?h=h.createElement(l,{is:k.is}):(h=h.createElement(l),"select"===l&&(l=h,k.multiple?l.multiple=!0:k.size&&(l.size=k.size))):h=h.createElementNS(g,l);k=h;k[ue]=c;k[ve]=e;Hi(k,b,!1,!1);b.stateNode=k;l=f;c=e;var m=d,C=Zd(l,c);switch(l){case "iframe":case "object":case "embed":F("load",
-k);d=c;break;case "video":case "audio":for(d=0;de.tailExpiration&&1f&&(f=c),k>f&&(f=k),d=d.sibling;e.childExpirationTime=f}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=V.firstEffect),null!==V.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=
-V.firstEffect),a.lastEffect=V.lastEffect),1a?b:a}function Yj(a){var b=dg();fg(99,ik.bind(null,a,b));return null}
-function ik(a,b){do Sj();while(null!==Ej);if((T&(oj|pj))!==S)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Xj(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
-d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(V=U=null,W=0);1h&&(l=h,h=g,g=l),l=de(p,g),m=de(p,h),l&&m&&(1!==v.rangeCount||v.anchorNode!==l.node||v.anchorOffset!==l.offset||v.focusNode!==m.node||v.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),v.removeAllRanges(),g>h?(v.addRange(t),v.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),v.addRange(t))))));t=[];for(v=p;v=v.parentNode;)1===v.nodeType&&t.push({element:v,left:v.scrollLeft,top:v.scrollTop});
-"function"===typeof p.focus&&p.focus();for(p=0;p=c)return yi(a,b,c);I(M,M.current&
-1,b);b=oi(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1,b);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return Bi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current,b);if(!d)return null}return oi(a,b,c)}wg=!1}}else wg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Ef(b,J.current);vg(b,c);e=Ih(null,b,d,a,e,c);b.effectTag|=1;if("object"===
-typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;Mh();if(L(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&Og(b,d,g,a);e.updater=Sg;b.stateNode=e;e._reactInternalFiber=b;Wg(b,d,a,c);b=vi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;Va(e);if(1!==e._status)throw e._result;
-e=e._result;b.type=e;f=b.tag=nk(e);a=mg(e,a);switch(f){case 0:b=si(null,b,e,a,c);break;case 1:b=ui(null,b,e,a,c);break;case 11:b=ni(null,b,e,a,c);break;case 14:b=pi(null,b,e,mg(e.type,a),d,c);break;default:throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),si(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),ui(a,b,d,e,c);case 3:wi(b);d=b.updateQueue;if(null===d)throw Error(u(282));e=b.memoizedState;e=null!==e?e.element:
-null;Hg(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)li(),b=oi(a,b,c);else{if(e=b.stateNode.hydrate)di=re(b.stateNode.containerInfo.firstChild),ci=b,e=ei=!0;if(e)for(c=gh(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),li();b=b.child}return b;case 5:return oh(b),null===a&&ii(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,oe(d,e)?g=null:null!==f&&oe(d,f)&&(b.effectTag|=16),ti(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=
-b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&ii(b),null;case 13:return yi(a,b,c);case 4:return mh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=fh(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),ni(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;
-e=b.pendingProps;g=b.memoizedProps;f=e.value;sg(b,f);if(null!==g){var h=g.value;f=of(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!K.current){b=oi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Bg(c,null),l.tag=2,Dg(h,l));h.expirationTime=b&&a<=b}function Mj(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
-function Nj(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Rj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
-function rk(a,b,c,d){var e=b.current,f=Pg(),g=Mg.suspense;f=Qg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(ec(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=Bg(f,g);b.payload={element:a};d=void 0===
-d?null:d;null!==d&&(b.callback=d);Dg(e,b);Rg(e,f);return f}function sk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function tk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime', ']]]]>');
+ return this.assertLegalChar(val);
+ }
-if (true) {
- module.exports = __webpack_require__(470);
-} else {}
+ comment(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+ raw(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ }
-/***/ }),
-/* 470 */
-/***/ (function(module, exports, __webpack_require__) {
+ attValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ }
-"use strict";
-/** @license React v0.18.0
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
+ insTarget(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
-Object.defineProperty(exports,"__esModule",{value:!0});var f,g,h,k,l;
-if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
-y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
-typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
-function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
-function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}
-function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};
-exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};
-exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
-exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+ xmlVersion(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ }
-/***/ }),
-/* 471 */
-/***/ (function(module, exports, __webpack_require__) {
+ xmlEncoding(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
-"use strict";
+ xmlStandalone(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ }
-var utf8 = __webpack_require__(63);
-var utils = __webpack_require__(10);
-var GenericWorker = __webpack_require__(25);
-var StreamHelper = __webpack_require__(216);
-var defaults = __webpack_require__(217);
-var CompressedObject = __webpack_require__(143);
-var ZipObject = __webpack_require__(488);
-var generate = __webpack_require__(489);
-var nodejsUtils = __webpack_require__(94);
-var NodejsStreamInputAdapter = __webpack_require__(501);
+ dtdPubID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+ dtdSysID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
-/**
- * Add a file in the current folder.
- * @private
- * @param {string} name the name of the file
- * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
- * @param {Object} originalOptions the options of the file
- * @return {Object} the new file.
- */
-var fileAdd = function(name, data, originalOptions) {
- // be sure sub folders exist
- var dataType = utils.getTypeOf(data),
- parent;
+ dtdElementValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttType(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttDefault(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdEntityValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdNData(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ assertLegalChar(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ if (this.options.version === '1.0') {
+ // Valid characters from https://www.w3.org/TR/xml/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_10_InvalidChars = regenerate()
+ // .addRange(0x0000, 0x0008)
+ // .add(0x000B, 0x000C)
+ // .addRange(0x000E, 0x001F)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ } else if (this.options.version === '1.1') {
+ // Valid characters from https://www.w3.org/TR/xml11/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_11_InvalidChars = regenerate()
+ // .add(0x0000)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ }
+ return str;
+ }
+
+ assertLegalName(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ str = this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error(`Invalid character in name: ${str}`);
+ }
+ return str;
+ }
+
+ // Escapes special characters in text
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ textEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, '
');
+ }
+ // Escapes special characters in attribute values
- /*
- * Correct options.
- */
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
- var o = utils.extend(originalOptions || {}, defaults);
- o.date = o.date || new Date();
- if (o.compression !== null) {
- o.compression = o.compression.toUpperCase();
- }
+ // `str` the string to escape
+ attEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&').replace(/ 0) ? path.substring(0, lastSlash) : "";
-};
+/***/ }),
+/* 213 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Returns the path with a slash at the end.
- * @private
- * @param {String} path the path to check.
- * @return {String} the path with a trailing slash.
- */
-var forceTrailingSlash = function(path) {
- // Check the name ends with a /
- if (path.slice(-1) !== "/") {
- path += "/"; // IE doesn't like substr(-1)
- }
- return path;
-};
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
-/**
- * Add a (sub) folder in the current folder.
- * @private
- * @param {string} name the folder's name
- * @param {boolean=} [createFolders] If true, automatically create sub
- * folders. Defaults to false.
- * @return {Object} the new folder.
- */
-var folderAdd = function(name, createFolders) {
- createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;
+ ({assign} = __webpack_require__(38));
- name = forceTrailingSlash(name);
+ NodeType = __webpack_require__(14);
- // Does this folder already exist?
- if (!this.files[name]) {
- fileAdd.call(this, name, null, {
- dir: true,
- createFolders: createFolders
- });
- }
- return this.files[name];
-};
+ XMLDeclaration = __webpack_require__(144);
-/**
-* Cross-window, cross-Node-context regular expression detection
-* @param {Object} object Anything
-* @return {Boolean} true if the object is a regular expression,
-* false otherwise
-*/
-function isRegExp(object) {
- return Object.prototype.toString.call(object) === "[object RegExp]";
-}
+ XMLDocType = __webpack_require__(145);
-// return the actual prototype of JSZip
-var out = {
- /**
- * @see loadAsync
- */
- load: function() {
- throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
- },
+ XMLCData = __webpack_require__(142);
+ XMLComment = __webpack_require__(143);
- /**
- * Call a callback function for each entry at this folder level.
- * @param {Function} cb the callback function:
- * function (relativePath, file) {...}
- * It takes 2 arguments : the relative path and the file.
- */
- forEach: function(cb) {
- var filename, relativePath, file;
- for (filename in this.files) {
- if (!this.files.hasOwnProperty(filename)) {
- continue;
- }
- file = this.files[filename];
- relativePath = filename.slice(this.root.length, filename.length);
- if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
- cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
- }
- }
- },
+ XMLElement = __webpack_require__(140);
- /**
- * Filter nested files/folders with the specified function.
- * @param {Function} search the predicate to use :
- * function (relativePath, file) {...}
- * It takes 2 arguments : the relative path and the file.
- * @return {Array} An array of matching elements.
- */
- filter: function(search) {
- var result = [];
- this.forEach(function (relativePath, entry) {
- if (search(relativePath, entry)) { // the file matches the function
- result.push(entry);
- }
+ XMLRaw = __webpack_require__(150);
- });
- return result;
- },
+ XMLText = __webpack_require__(151);
- /**
- * Add a file to the zip file, or search a file.
- * @param {string|RegExp} name The name of the file to add (if data is defined),
- * the name of the file to find (if no data) or a regex to match files.
- * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded
- * @param {Object} o File options
- * @return {JSZip|Object|Array} this JSZip object (when adding a file),
- * a file (when searching by string) or an array of files (when searching by regex).
- */
- file: function(name, data, o) {
- if (arguments.length === 1) {
- if (isRegExp(name)) {
- var regexp = name;
- return this.filter(function(relativePath, file) {
- return !file.dir && regexp.test(relativePath);
- });
- }
- else { // text
- var obj = this.files[this.root + name];
- if (obj && !obj.dir) {
- return obj;
- } else {
- return null;
- }
- }
- }
- else { // more than one argument : we have data !
- name = this.root + name;
- fileAdd.call(this, name, data, o);
- }
- return this;
- },
+ XMLProcessingInstruction = __webpack_require__(152);
- /**
- * Add a directory to the zip file, or search.
- * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.
- * @return {JSZip} an object with the new directory as the root, or an array containing matching folders.
- */
- folder: function(arg) {
- if (!arg) {
- return this;
- }
+ XMLDummy = __webpack_require__(211);
- if (isRegExp(arg)) {
- return this.filter(function(relativePath, file) {
- return file.dir && arg.test(relativePath);
- });
- }
+ XMLDTDAttList = __webpack_require__(146);
- // else, name is a new folder
- var name = this.root + arg;
- var newFolder = folderAdd.call(this, name);
+ XMLDTDElement = __webpack_require__(148);
- // Allow chaining by returning a new object with this folder as the root
- var ret = this.clone();
- ret.root = newFolder.name;
- return ret;
- },
+ XMLDTDEntity = __webpack_require__(147);
- /**
- * Delete a file, or a directory and all sub-files, from the zip
- * @param {string} name the name of the file to delete
- * @return {JSZip} this JSZip object
- */
- remove: function(name) {
- name = this.root + name;
- var file = this.files[name];
- if (!file) {
- // Look for any folders
- if (name.slice(-1) !== "/") {
- name += "/";
- }
- file = this.files[name];
- }
+ XMLDTDNotation = __webpack_require__(149);
- if (file && !file.dir) {
- // file
- delete this.files[name];
- } else {
- // maybe a folder, delete recursively
- var kids = this.filter(function(relativePath, file) {
- return file.name.slice(0, name.length) === name;
- });
- for (var i = 0; i < kids.length; i++) {
- delete this.files[kids[i].name];
- }
- }
+ WriterState = __webpack_require__(91);
- return this;
- },
+ // Base class for XML writers
+ module.exports = XMLWriterBase = class XMLWriterBase {
+ // Initializes a new instance of `XMLWriterBase`
- /**
- * Generate the complete zip file
- * @param {Object} options the options to generate the zip file :
- * - compression, "STORE" by default.
- * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
- * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file
- */
- generate: function(options) {
- throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
- },
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.width` maximum column width
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
- /**
- * Generate the complete zip file as an internal stream.
- * @param {Object} options the options to generate the zip file :
- * - compression, "STORE" by default.
- * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
- * @return {StreamHelper} the streamed zip file.
- */
- generateInternalStream: function(options) {
- var worker, opts = {};
- try {
- opts = utils.extend(options || {}, {
- streamFiles: false,
- compression: "STORE",
- compressionOptions : null,
- type: "",
- platform: "DOS",
- comment: null,
- mimeType: 'application/zip',
- encodeFileName: utf8.utf8encode
- });
+ // Filters writer options and provides defaults
- opts.type = opts.type.toLowerCase();
- opts.compression = opts.compression.toUpperCase();
+ // `options` writer options
+ filterOptions(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.width = (ref3 = options.width) != null ? ref3 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref4 = (ref5 = options.dontPrettyTextNodes) != null ? ref5 : options.dontprettytextnodes) != null ? ref4 : 0;
+ filteredOptions.spaceBeforeSlash = (ref6 = (ref7 = options.spaceBeforeSlash) != null ? ref7 : options.spacebeforeslash) != null ? ref6 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ }
- // "binarystring" is prefered but the internals use "string".
- if(opts.type === "binarystring") {
- opts.type = "string";
- }
+ // Returns the indentation string for the current level
- if (!opts.type) {
- throw new Error("No output type specified.");
- }
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ indent(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ }
- utils.checkSupport(opts.type);
+ // Returns the newline string
- // accept nodejs `process.platform`
- if(
- opts.platform === 'darwin' ||
- opts.platform === 'freebsd' ||
- opts.platform === 'linux' ||
- opts.platform === 'sunos'
- ) {
- opts.platform = "UNIX";
- }
- if (opts.platform === 'win32') {
- opts.platform = "DOS";
- }
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ endline(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ }
- var comment = opts.comment || this.comment || "";
- worker = generate.generateWorker(this, opts, comment);
- } catch (e) {
- worker = new GenericWorker("error");
- worker.error(e);
+ attribute(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ if (options.pretty && options.width > 0) {
+ r = att.name + '="' + att.value + '"';
+ } else {
+ r = ' ' + att.name + '="' + att.value + '"';
}
- return new StreamHelper(worker, opts.type || "string", opts.mimeType);
- },
- /**
- * Generate the complete zip file asynchronously.
- * @see generateInternalStream
- */
- generateAsync: function(options, onUpdate) {
- return this.generateInternalStream(options).accumulate(onUpdate);
- },
- /**
- * Generate the complete zip file asynchronously.
- * @see generateInternalStream
- */
- generateNodeStream: function(options, onUpdate) {
- options = options || {};
- if (!options.type) {
- options.type = "nodebuffer";
- }
- return this.generateInternalStream(options).toNodejsStream(onUpdate);
+ this.closeAttribute(att, options, level);
+ return r;
}
-};
-module.exports = out;
+ cdata(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
-/***/ }),
-/* 472 */
-/***/ (function(module, exports) {
+ comment(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
-exports.read = function (buffer, offset, isLE, mLen, nBytes) {
- var e, m
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
+ declaration(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
- i += d
+ docType(node, options, level) {
+ var child, i, len1, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += ' 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len1 = ref.length; i < len1; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;
+ level || (level = 0);
+ prettySuppressed = false;
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ // if ANY are a text node, then suppress pretty now
+ if (options.dontPrettyTextNodes) {
+ ref2 = node.children;
+ for (i = 0, len1 = ref2.length; i < len1; i++) {
+ child = ref2[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ // close the opening tag, after dealing with newline
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref3 = node.children;
+ // inner tags
+ for (j = 0, len2 = ref3.length; j < len2; j++) {
+ child = ref3[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ }
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+ writeChildNode(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ }
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-}
+ processingInstruction(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
-exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = (nBytes * 8) - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+ raw(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
- value = Math.abs(value)
+ text(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
+ dtdAttList(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
}
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
+
+ dtdElement(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
}
- if (value * c >= 2) {
- e++
- c /= 2
+
+ dtdEntity(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
}
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = ((value * c) - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
+ dtdNotation(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
}
- }
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+ openNode(node, options, level) {}
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+ closeNode(node, options, level) {}
- buffer[offset + i - d] |= s * 128
-}
+ openAttribute(att, options, level) {}
+
+ closeAttribute(att, options, level) {}
+ };
-/***/ }),
-/* 473 */
-/***/ (function(module, exports) {
+}).call(this);
-/* (ignored) */
/***/ }),
-/* 474 */
+/* 214 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+var has = Object.prototype.hasOwnProperty
+ , prefix = '~';
+
+/**
+ * Constructor to create a storage for our `EE` objects.
+ * An `Events` instance is a plain object whose properties are event names.
+ *
+ * @constructor
+ * @private
+ */
+function Events() {}
-var Buffer = __webpack_require__(93).Buffer;
-var util = __webpack_require__(475);
+//
+// We try to not inherit from `Object.prototype`. In some engines creating an
+// instance in this way is faster than calling `Object.create(null)` directly.
+// If `Object.create(null)` is not supported we prefix the event names with a
+// character to make sure that the built-in object properties are not
+// overridden or used as an attack vector.
+//
+if (Object.create) {
+ Events.prototype = Object.create(null);
-function copyBuffer(src, target, offset) {
- src.copy(target, offset);
+ //
+ // This hack is needed because the `__proto__` property is still inherited in
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
+ //
+ if (!new Events().__proto__) prefix = false;
}
-module.exports = function () {
- function BufferList() {
- _classCallCheck(this, BufferList);
+/**
+ * Representation of a single event listener.
+ *
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
+ * @constructor
+ * @private
+ */
+function EE(fn, context, once) {
+ this.fn = fn;
+ this.context = context;
+ this.once = once || false;
+}
- this.head = null;
- this.tail = null;
- this.length = 0;
+/**
+ * Add a listener for a given event.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} event The event name.
+ * @param {Function} fn The listener function.
+ * @param {*} context The context to invoke the listener with.
+ * @param {Boolean} once Specify if the listener is a one-time listener.
+ * @returns {EventEmitter}
+ * @private
+ */
+function addListener(emitter, event, fn, context, once) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('The listener must be a function');
}
- BufferList.prototype.push = function push(v) {
- var entry = { data: v, next: null };
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- ++this.length;
- };
-
- BufferList.prototype.unshift = function unshift(v) {
- var entry = { data: v, next: this.head };
- if (this.length === 0) this.tail = entry;
- this.head = entry;
- ++this.length;
- };
-
- BufferList.prototype.shift = function shift() {
- if (this.length === 0) return;
- var ret = this.head.data;
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
- --this.length;
- return ret;
- };
-
- BufferList.prototype.clear = function clear() {
- this.head = this.tail = null;
- this.length = 0;
- };
-
- BufferList.prototype.join = function join(s) {
- if (this.length === 0) return '';
- var p = this.head;
- var ret = '' + p.data;
- while (p = p.next) {
- ret += s + p.data;
- }return ret;
- };
-
- BufferList.prototype.concat = function concat(n) {
- if (this.length === 0) return Buffer.alloc(0);
- if (this.length === 1) return this.head.data;
- var ret = Buffer.allocUnsafe(n >>> 0);
- var p = this.head;
- var i = 0;
- while (p) {
- copyBuffer(p.data, ret, i);
- i += p.data.length;
- p = p.next;
- }
- return ret;
- };
+ var listener = new EE(fn, context || emitter, once)
+ , evt = prefix ? prefix + event : event;
- return BufferList;
-}();
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
+ else emitter._events[evt] = [emitter._events[evt], listener];
-if (util && util.inspect && util.inspect.custom) {
- module.exports.prototype[util.inspect.custom] = function () {
- var obj = util.inspect({ length: this.length });
- return this.constructor.name + ' ' + obj;
- };
+ return emitter;
}
-/***/ }),
-/* 475 */
-/***/ (function(module, exports) {
-
-/* (ignored) */
+/**
+ * Clear event by name.
+ *
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
+ * @param {(String|Symbol)} evt The Event name.
+ * @private
+ */
+function clearEvent(emitter, evt) {
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
+ else delete emitter._events[evt];
+}
-/***/ }),
-/* 476 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Minimal `EventEmitter` interface that is molded against the Node.js
+ * `EventEmitter` interface.
+ *
+ * @constructor
+ * @public
+ */
+function EventEmitter() {
+ this._events = new Events();
+ this._eventsCount = 0;
+}
-/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
- "use strict";
+/**
+ * Return an array listing the events for which the emitter has registered
+ * listeners.
+ *
+ * @returns {Array}
+ * @public
+ */
+EventEmitter.prototype.eventNames = function eventNames() {
+ var names = []
+ , events
+ , name;
- if (global.setImmediate) {
- return;
- }
+ if (this._eventsCount === 0) return names;
- var nextHandle = 1; // Spec says greater than zero
- var tasksByHandle = {};
- var currentlyRunningATask = false;
- var doc = global.document;
- var registerImmediate;
+ for (name in (events = this._events)) {
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
+ }
- function setImmediate(callback) {
- // Callback can either be a function or a string
- if (typeof callback !== "function") {
- callback = new Function("" + callback);
- }
- // Copy function arguments
- var args = new Array(arguments.length - 1);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i + 1];
- }
- // Store and register the task
- var task = { callback: callback, args: args };
- tasksByHandle[nextHandle] = task;
- registerImmediate(nextHandle);
- return nextHandle++;
- }
+ if (Object.getOwnPropertySymbols) {
+ return names.concat(Object.getOwnPropertySymbols(events));
+ }
- function clearImmediate(handle) {
- delete tasksByHandle[handle];
- }
+ return names;
+};
- function run(task) {
- var callback = task.callback;
- var args = task.args;
- switch (args.length) {
- case 0:
- callback();
- break;
- case 1:
- callback(args[0]);
- break;
- case 2:
- callback(args[0], args[1]);
- break;
- case 3:
- callback(args[0], args[1], args[2]);
- break;
- default:
- callback.apply(undefined, args);
- break;
- }
- }
+/**
+ * Return the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Array} The registered listeners.
+ * @public
+ */
+EventEmitter.prototype.listeners = function listeners(event) {
+ var evt = prefix ? prefix + event : event
+ , handlers = this._events[evt];
- function runIfPresent(handle) {
- // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
- // So if we're currently running a task, we'll need to delay this invocation.
- if (currentlyRunningATask) {
- // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
- // "too much recursion" error.
- setTimeout(runIfPresent, 0, handle);
- } else {
- var task = tasksByHandle[handle];
- if (task) {
- currentlyRunningATask = true;
- try {
- run(task);
- } finally {
- clearImmediate(handle);
- currentlyRunningATask = false;
- }
- }
- }
- }
+ if (!handlers) return [];
+ if (handlers.fn) return [handlers.fn];
- function installNextTickImplementation() {
- registerImmediate = function(handle) {
- process.nextTick(function () { runIfPresent(handle); });
- };
- }
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
+ ee[i] = handlers[i].fn;
+ }
- function canUsePostMessage() {
- // The test against `importScripts` prevents this implementation from being installed inside a web worker,
- // where `global.postMessage` means something completely different and can't be used for this purpose.
- if (global.postMessage && !global.importScripts) {
- var postMessageIsAsynchronous = true;
- var oldOnMessage = global.onmessage;
- global.onmessage = function() {
- postMessageIsAsynchronous = false;
- };
- global.postMessage("", "*");
- global.onmessage = oldOnMessage;
- return postMessageIsAsynchronous;
- }
- }
+ return ee;
+};
- function installPostMessageImplementation() {
- // Installs an event handler on `global` for the `message` event: see
- // * https://developer.mozilla.org/en/DOM/window.postMessage
- // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
+/**
+ * Return the number of listeners listening to a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Number} The number of listeners.
+ * @public
+ */
+EventEmitter.prototype.listenerCount = function listenerCount(event) {
+ var evt = prefix ? prefix + event : event
+ , listeners = this._events[evt];
- var messagePrefix = "setImmediate$" + Math.random() + "$";
- var onGlobalMessage = function(event) {
- if (event.source === global &&
- typeof event.data === "string" &&
- event.data.indexOf(messagePrefix) === 0) {
- runIfPresent(+event.data.slice(messagePrefix.length));
- }
- };
+ if (!listeners) return 0;
+ if (listeners.fn) return 1;
+ return listeners.length;
+};
- if (global.addEventListener) {
- global.addEventListener("message", onGlobalMessage, false);
- } else {
- global.attachEvent("onmessage", onGlobalMessage);
- }
+/**
+ * Calls each of the listeners registered for a given event.
+ *
+ * @param {(String|Symbol)} event The event name.
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
+ * @public
+ */
+EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
+ var evt = prefix ? prefix + event : event;
- registerImmediate = function(handle) {
- global.postMessage(messagePrefix + handle, "*");
- };
- }
+ if (!this._events[evt]) return false;
- function installMessageChannelImplementation() {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(event) {
- var handle = event.data;
- runIfPresent(handle);
- };
+ var listeners = this._events[evt]
+ , len = arguments.length
+ , args
+ , i;
- registerImmediate = function(handle) {
- channel.port2.postMessage(handle);
- };
- }
+ if (listeners.fn) {
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
- function installReadyStateChangeImplementation() {
- var html = doc.documentElement;
- registerImmediate = function(handle) {
- // Create a