(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t(require('xmldom'),function(){try{return require('jszip')}catch(t){}}()):'function'==typeof define&&define.amd?define(['xmldom','jszip'],t):'object'==typeof exports?exports.ePub=t(require('xmldom'),function(){try{return require('jszip')}catch(t){}}()):e.ePub=t(e.xmldom,e.jszip)})(this,function(e,t){var n=Math.PI,a=String.fromCharCode,o=Math.sqrt,r=String.prototype,i=Math.LN2,l=Math.log,s=Math.pow,c=Math.abs,d=Math.exp,p=Math.expm1,u=Math.round,g=Math.ceil,h=Math.min,m=Math.max,y=Math.floor;return function(e){function t(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='/dist/',t(t.s=148)}([function(e,t,n){var a=n(2),i=n(23),o=n(13),r=n(14),l=n(19),s='prototype',d=function(e,t,n){var c=e&d.F,p=e&d.G,u=e&d.S,g=e&d.P,h=e&d.B,m=p?a:u?a[t]||(a[t]={}):(a[t]||{})[s],f=p?i:i[t]||(i[t]={}),y=f[s]||(f[s]={}),v,b,x,E;for(v in p&&(n=t),n)b=!c&&m&&void 0!==m[v],x=(b?m:n)[v],E=h&&b?l(x,a):g&&'function'==typeof x?l(Function.call,x):x,m&&r(m,v,x,e&d.U),f[v]!=x&&o(f,v,E),g&&y[v]!=x&&(y[v]=x)};a.core=i,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,t,n){var a=n(4);e.exports=function(e){if(!a(e))throw TypeError(e+' is not an object!');return e}},function(e){var t=e.exports='undefined'!=typeof window&&window.Math==Math?window:'undefined'!=typeof self&&self.Math==Math?self:Function('return this')();'number'==typeof __g&&(__g=t)},function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e){e.exports=function(e){return'object'==typeof e?null!==e:'function'==typeof e}},function(e,t,n){var a=n(55)('wks'),i=n(37),o=n(2).Symbol,r='function'==typeof o,l=e.exports=function(e){return a[e]||(a[e]=r&&o[e]||(r?o:i)('Symbol.'+e))};l.store=a},function(e,t,n){'use strict';function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}function i(){var e=new Date().getTime(),t='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(t){var n=0|(e+16*Math.random())%16;return e=y(e/16),('x'==t?n:8|7&n).toString(16)});return t}function o(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t,n,a,i){var o=a||0,l=i||t.length,s=parseInt(o+(l-o)/2),d;return(n||(n=function(e,t){return e>t?1:e=l-o)?s:(d=n(t[s],e),1==l-o?0<=d?s:s+1:0===d?s:-1===d?r(e,t,n,s,l):r(e,t,n,o,s))}function l(e,t,n,a,i){var o=a||0,r=i||t.length,s=parseInt(o+(r-o)/2),d;return(n||(n=function(e,t){return e>t?1:e=r-o)?-1:(d=n(t[s],e),1==r-o?0===d?s:-1:0===d?s:-1===d?l(e,t,n,s,r):l(e,t,n,o,s))}function s(e,t){for(var n=e.parentNode,a=n.childNodes,o=-1,r=0,i;r'+i+''};e.exports=function(e,t){var n={};n[e]=t(l),a(a.P+a.F*i(function(){var t=''[e]('"');return t!==t.toLowerCase()||3n.spinePos)return 1;if(t.spinePoso[d].index)return 1;if(a[d].indexl.offset?1:r.offset')}},{key:'textNodes',value:function(e,t){return Array.prototype.slice.call(e.childNodes).filter(function(e){return e.nodeType===s||t&&e.classList.contains(t)})}},{key:'walkToNode',value:function(e,t,n){var a=t||document,o=a.documentElement,l=e.length,s,d,c;for(c=0;cp)t-=p;else{i=c.nodeType===l?c.childNodes[0]:c;break}}return{container:i,offset:t}}},{key:'toRange',value:function(e,t){var n=e||document,a=this,i=!!t&&null!=n.querySelector('.'+t),o,l,s,d,c,p,u,g;if(o='undefined'==typeof n.createRange?new r.RangeObject:n.createRange(),a.range?(l=a.start,p=a.path.steps.concat(l.steps),d=this.findNode(p,n,i?t:null),s=a.end,u=a.path.steps.concat(s.steps),c=this.findNode(u,n,i?t:null)):(l=a.path,p=a.path.steps,d=this.findNode(a.path.steps,n,i?t:null)),d)try{null==l.terminal.offset?o.setStart(d,0):o.setStart(d,l.terminal.offset)}catch(a){g=this.fixMiss(p,l.terminal.offset,n,i?t:null),o.setStart(g.container,g.offset)}else return console.log('No startContainer found for',this.toString()),null;if(c)try{null==s.terminal.offset?o.setEnd(c,0):o.setEnd(c,s.terminal.offset)}catch(r){g=this.fixMiss(u,a.end.terminal.offset,n,i?t:null),o.setEnd(g.container,g.offset)}return o}},{key:'isCfiString',value:function(e){return'string'==typeof e&&0===e.indexOf('epubcfi(')&&')'===e[e.length-1]}},{key:'generateChapterComponent',value:function(e,t,n){var a=parseInt(t),i='/'+2*(e+1)+'/';return i+=2*(a+1),n&&(i+='['+n+']'),i}},{key:'collapse',value:function(e){this.range&&(this.range=!1,e?(this.path.steps=this.path.steps.concat(this.start.steps),this.path.terminal=this.start.terminal):(this.path.steps=this.path.steps.concat(this.end.steps),this.path.terminal=this.end.terminal))}}]),e}();t.default=d,e.exports=t['default']},function(e){var t=e.exports={version:'2.5.0'};'number'==typeof __e&&(__e=t)},function(e,t,n){var a=n(4);e.exports=function(e,t){if(!a(e))return e;var n,i;if(t&&'function'==typeof(n=e.toString)&&!a(i=n.call(e)))return i;if('function'==typeof(n=e.valueOf)&&!a(i=n.call(e)))return i;if(!t&&'function'==typeof(n=e.toString)&&!a(i=n.call(e)))return i;throw TypeError('Can\'t convert object to primitive value')}},function(e){e.exports=function(e){if(e==void 0)throw TypeError('Can\'t call method on '+e);return e}},function(e){e.exports=function(e){return isNaN(e=+e)?0:(0f;f++)if((5==e||d||f in g)&&(v=g[f],b=h(v,f,u),e))if(n)y[f]=b;else if(b)switch(e){case 3:return!0;case 5:return v;case 6:return f;case 2:y.push(v);}else if(s)return!1;return d?-1:3==e||s?s:y}}},function(e,t,n){'use strict';if(n(7)){var a=n(38),i=n(2),o=n(3),r=n(0),l=n(66),s=n(98),d=n(19),c=n(43),p=n(36),g=n(13),h=n(45),m=n(26),f=n(9),v=n(131),b=n(39),x=n(24),E=n(12),k=n(54),_=n(4),S=n(10),N=n(89),w=n(40),T=n(18),C=n(41).f,R=n(91),P=n(37),O=n(5),A=n(28),I=n(56),L=n(64),D=n(94),M=n(48),B=n(61),F=n(42),z=n(93),j=n(121),q=n(8),U=n(17),V=q.f,W=U.f,H=i.RangeError,G=i.TypeError,Y=i.Uint8Array,K='ArrayBuffer',X='Shared'+K,$='BYTES_PER_ELEMENT',Z='prototype',J=Array[Z],Q=s.ArrayBuffer,ee=s.DataView,te=A(0),ne=A(2),ae=A(3),ie=A(4),oe=A(5),re=A(6),le=I(!0),se=I(!1),de=D.values,ce=D.keys,pe=D.entries,ue=J.lastIndexOf,ge=J.reduce,he=J.reduceRight,me=J.join,fe=J.sort,ye=J.slice,ve=J.toString,be=J.toLocaleString,xe=O('iterator'),Ee=O('toStringTag'),ke=P('typed_constructor'),_e=P('def_constructor'),Se=l.CONSTR,Ne=l.TYPED,we=l.VIEW,Te='Wrong length!',Ce=A(1,function(e,t){return Ie(L(e,e[_e]),t)}),Re=o(function(){return 1===new Y(new Uint16Array([1]).buffer)[0]}),Pe=!!Y&&!!Y[Z].set&&o(function(){new Y(1).set({})}),Oe=function(e,t){var n=m(e);if(0>n||n%t)throw H('Wrong offset!');return n},Ae=function(e){if(_(e)&&Ne in e)return e;throw G(e+' is not a typed array!')},Ie=function(e,t){if(!(_(e)&&ke in e))throw G('It is not a typed array constructor!');return new e(t)},Le=function(e,t){return De(L(e,e[_e]),t)},De=function(e,t){for(var n=0,a=t.length,i=Ie(e,a);a>n;)i[n]=t[n++];return i},Me=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Be=function(e){var t=S(e),n=arguments.length,a=1l;l++)c[l]=o?a(t[l],l):t[l];return c},Fe=function(){for(var e=0,t=arguments.length,n=Ie(this,t);t>e;)n[e]=arguments[e++];return n},ze=!!Y&&o(function(){be.call(new Y(1))}),je=function(){return be.apply(ze?ye.call(Ae(this)):Ae(this),arguments)},qe={copyWithin:function(e,t){return j.call(Ae(this),e,t,2n)throw H(Te);for(;o(i=u(i))?0:255s)throw H(Te)}else if(s=f(i)*t,s+r>m)throw H(Te);u=s/t}else return Ne in n?De(p,n):Be.call(p,n);for(g(e,'_d',{b:l,o:r,l:s,e:u,v:new ee(l)});oe?m(e+t,0):h(e,t)}},function(e,t,n){var a=n(1),i=n(109),o=n(76),r=n(75)('IE_PROTO'),l=function(){},s='prototype',d=function(){var e=n(73)('iframe'),t=o.length,a='<',i='>',r;for(e.style.display='none',n(77).appendChild(e),e.src='javascript:',r=e.contentWindow.document,r.open(),r.write(a+'script'+i+'document.F=Object'+a+'/script'+i),r.close(),d=r.F;t--;)delete d[s][o[t]];return d()};e.exports=Object.create||function(e,t){var n;return null===e?n=d():(l[s]=a(e),n=new l,l[s]=null,n[r]=e),void 0===t?n:i(n,t)}},function(e,t,n){var a=n(108),i=n(76).concat('length','prototype');t.f=Object.getOwnPropertyNames||function(e){return a(e,i)}},function(e,t,n){'use strict';var a=n(2),i=n(8),o=n(7),r=n(5)('species');e.exports=function(e){var t=a[e];o&&t&&!t[r]&&i.f(t,r,{configurable:!0,get:function(){return this}})}},function(e){e.exports=function(e,t,n,a){if(!(e instanceof t)||a!==void 0&&a in e)throw TypeError(n+': incorrect invocation!');return e}},function(e,t,n){var a=n(19),i=n(119),o=n(89),r=n(1),l=n(9),s=n(91),d={},c={},t=e.exports=function(e,t,n,p,u){var g=u?function(){return e}:s(e),h=a(n,p,t?2:1),m=0,f,y,v,b;if('function'!=typeof g)throw TypeError(e+' is not iterable!');if(o(g)){for(f=l(e.length);f>m;m++)if(b=t?h(r(y=e[m])[0],y[1]):h(e[m]),b===d||b===c)return b;}else for(v=g.call(e);!(y=v.next()).done;)if(b=i(v,h,y.value,t),b===d||b===c)return b};t.BREAK=d,t.RETURN=c},function(e,t,n){var a=n(14);e.exports=function(e,t,n){for(var i in t)a(e,i,t[i],n);return e}},function(e,t,n){var a=n(8).f,i=n(12),o=n(5)('toStringTag');e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&a(e,o,{configurable:!0,value:t})}},function(e,t,n){var a=n(0),i=n(25),o=n(3),r=n(79),l='['+r+']',s='\u200B\x85',d=RegExp('^'+l+l+'*'),c=RegExp(l+l+'*$'),p=function(e,t,n){var i={},l=o(function(){return!!r[e]()||s[e]()!=s}),d=i[e]=l?t(u):r[e];n&&(i[n]=d),a(a.P+a.F*l,'String',i)},u=p.trim=function(e,t){return e=i(e)+'',1&t&&(e=e.replace(d,'')),2&t&&(e=e.replace(c,'')),e};e.exports=p},function(e){e.exports={}},function(e,t,n){var a=n(4);e.exports=function(e,t){if(!a(e)||e._t!==t)throw TypeError('Incompatible receiver, '+t+' required!');return e}},function(e,t,n){'use strict';function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(t,'__esModule',{value:!0});var i=function(){function e(e,t){for(var n=0,a;nd;)if(c=l[d++],c!=c)return!0;}else for(;s>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var a=n(20);e.exports=Array.isArray||function(e){return'Array'==a(e)}},function(e){e.exports=function(e,t,n){var a=n===void 0;switch(t.length){case 0:return a?e():e.call(n);case 1:return a?e(t[0]):e.call(n,t[0]);case 2:return a?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return a?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return a?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);}return e.apply(n,t)}},function(e,t,n){var a=n(4),i=n(20),o=n(5)('match');e.exports=function(e){var t;return a(e)&&((t=e[o])===void 0?'RegExp'==i(e):!!t)}},function(e,t,n){var a=n(5)('iterator'),i=!1;try{var o=[7][a]();o['return']=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],r=o[a]();r.next=function(){return{done:n=!0}},o[a]=function(){return r},e(o)}catch(t){}return n}},function(e,t,n){'use strict';var a=n(1);e.exports=function(){var e=a(this),t='';return e.global&&(t+='g'),e.ignoreCase&&(t+='i'),e.multiline&&(t+='m'),e.unicode&&(t+='u'),e.sticky&&(t+='y'),t}},function(e,t,n){'use strict';var a=n(13),i=n(14),o=n(3),r=n(25),l=n(5);e.exports=function(e,t,n){var s=l(e),d=n(r,s,''[e]),c=d[0],p=d[1];o(function(){var t={};return t[s]=function(){return 7},7!=''[e](t)})&&(i(String.prototype,e,c),a(RegExp.prototype,s,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){var a=n(1),i=n(11),o=n(5)('species');e.exports=function(e,t){var n=a(e).constructor,r;return n===void 0||(r=a(n)[o])==void 0?t:i(r)}},function(e,t,n){'use strict';var a=n(2),i=n(0),o=n(14),r=n(45),l=n(32),s=n(44),d=n(43),c=n(4),p=n(3),u=n(61),g=n(46),h=n(80);e.exports=function(e,t,n,m,f,y){var v=a[e],b=v,x=f?'set':'add',E=b&&b.prototype,k={},_=function(e){var t=E[e];o(E,e,'delete'==e?function(e){return y&&!c(e)?!1:t.call(this,0===e?0:e)}:'has'==e?function(e){return y&&!c(e)?!1:t.call(this,0===e?0:e)}:'get'==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:'add'==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if('function'!=typeof b||!(y||E.forEach&&!p(function(){new b().entries().next()})))b=m.getConstructor(t,e,f,x),r(b.prototype,n),l.NEED=!0;else{var S=new b,N=S[x](y?{}:-0,1)!=S,w=p(function(){S.has(1)}),T=u(function(e){new b(e)}),R=!y&&p(function(){for(var e=new b,t=5;t--;)e[x](t,t);return!e.has(-0)});T||(b=t(function(t,n){d(t,b,e);var a=h(new v,t,b);return void 0!=n&&s(n,f,a[x],a),a}),b.prototype=E,E.constructor=b),(w||R)&&(_('delete'),_('has'),f&&_('get')),(R||N)&&_(x),y&&E.clear&&delete E.clear}return g(b,e),k[e]=b,i(i.G+i.W+i.F*(b!=v),k),y||m.setStrong(b,e,f),b}},function(e,t,n){for(var a=n(2),o=n(13),r=n(37),l=r('typed_array'),s=r('view'),d=!!(a.ArrayBuffer&&a.DataView),c=d,p=0,i=['Int8Array','Uint8Array','Uint8ClampedArray','Int16Array','Uint16Array','Int32Array','Uint32Array','Float32Array','Float64Array'],u;p<9;)(u=a[i[p++]])?(o(u.prototype,l,!0),o(u.prototype,s,!0)):c=!1;e.exports={ABV:d,CONSTR:c,TYPED:l,VIEW:s}},function(e,t,n){'use strict';e.exports=n(38)||!n(3)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(2)[e]})},function(e,t,n){'use strict';var a=n(0);e.exports=function(e){a(a.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){'use strict';var a=n(0),i=n(11),o=n(19),r=n(44);e.exports=function(e){a(a.S,e,{from:function(e){var t=arguments[1],a,l,s,n;return(i(this),a=void 0!==t,a&&i(t),void 0==e)?new this:(l=[],a?(s=0,n=o(t,arguments[2],2),r(e,!1,function(e){l.push(n(e,s++))})):r(e,!1,l.push,l),new this(l))}})}},function(e,t,n){'use strict';function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(t,'__esModule',{value:!0});var o=function(){function e(e,t){for(var n=0,a;nn.length||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2p){if(47===n.charCodeAt(s+g))return n.slice(s+g+1);if(0==g)return n.slice(s+g)}else l>p&&(47===e.charCodeAt(a+g)?u=g:0==g&&(u=0));break}var i=e.charCodeAt(a+g),h=n.charCodeAt(s+g);if(i!==h)break;else 47===i&&(u=g)}var m='';for(g=a+u+1;g<=o;++g)(g===o||47===e.charCodeAt(g))&&(m+=0===m.length?'..':'/..');return 0=r;--p){if(a=e.charCodeAt(p),47===a){if(!c){s=p+1;break}continue}-1==d&&(c=!1,d=p+1),46===a?-1==l?l=p:1!=i&&(i=1):-1!=l&&(i=-1)}return-1==l||-1==d||0==i||1==i&&l==d-1&&l==s+1?-1!=d&&(0==s&&o?n.base=n.name=e.slice(1,d):n.base=n.name=e.slice(s,d)):(0==s&&o?(n.name=e.slice(1,l),n.base=e.slice(1,d)):(n.name=e.slice(s,l),n.base=e.slice(s,d)),n.ext=e.slice(l,d)),0r||r==Infinity)throw RangeError('Count can\'t be negative');for(;0>>=1)&&(t+=t))1&r&&(o+=t);return o}},function(e){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},function(e){var t=p;e.exports=!t||22025.465794806718t(10)||-2e-17!=t(-2e-17)?function(e){return 0==(e=+e)?e:-1e-6e?e+e*e/2:d(e)-1}:t},function(e,t,n){var o=n(26),r=n(25);e.exports=function(e){return function(t,n){var d=r(t)+'',s=o(n),i=d.length,l,a;return 0>s||s>=i?e?'':void 0:(l=d.charCodeAt(s),55296>l||56319(a=d.charCodeAt(s+1))||57343l;)t[l++]=e;return t}},function(e,t,n){'use strict';var a=n(34),i=n(122),o=n(48),r=n(15);e.exports=n(85)(Array,'Array',function(e,t){this._t=r(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):'keys'==t?i(0,n):'values'==t?i(0,e[n]):i(0,[n,e[n]])},'values'),o.Arguments=o.Array,a('keys'),a('values'),a('entries')},function(e,t,n){var a=n(19),i=n(59),o=n(77),r=n(73),l=n(2),s=l.process,d=l.setImmediate,c=l.clearImmediate,p=l.MessageChannel,u=l.Dispatch,g=0,h={},m='onreadystatechange',f=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},y=function(e){f.call(e.data)},v,b,x;d&&c||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++g]=function(){i('function'==typeof e?e:Function(e),t)},v(g),g},c=function(e){delete h[e]},'process'==n(20)(s)?v=function(e){s.nextTick(a(f,e,1))}:u&&u.now?v=function(e){u.now(a(f,e,1))}:p?(b=new p,x=b.port2,b.port1.onmessage=y,v=a(x.postMessage,x,1)):l.addEventListener&&'function'==typeof postMessage&&!l.importScripts?(v=function(e){l.postMessage(e+'','*')},l.addEventListener('message',y,!1)):m in r('script')?v=function(e){o.appendChild(r('script'))[m]=function(){o.removeChild(this),f.call(e)}}:v=function(e){setTimeout(a(f,e,1),0)}),e.exports={set:d,clear:c}},function(e,t,n){var a=n(2),i=n(95).set,o=a.MutationObserver||a.WebKitMutationObserver,r=a.process,l=a.Promise,s='process'==n(20)(r);e.exports=function(){var e=function(){var e,a;for(s&&(e=r.domain)&&e.exit();t;){a=t.fn,t=t.next;try{a()}catch(a){throw t?d():n=void 0,a}}n=void 0,e&&e.enter()},t,n,d;if(s)d=function(){r.nextTick(e)};else if(o){var c=!0,p=document.createTextNode('');new o(e).observe(p,{characterData:!0}),d=function(){p.data=c=!c}}else if(l&&l.resolve){var u=l.resolve();d=function(){u.then(e)}}else d=function(){i.call(a,e)};return function(e){var a={fn:e,next:void 0};n&&(n.next=a),t||(t=a,d()),n=a}}},function(e,t,n){'use strict';function a(e){var t,n;this.promise=new e(function(e,a){if(t!=void 0||n!=void 0)throw TypeError('Bad Promise constructor');t=e,n=a}),this.resolve=i(t),this.reject=i(n)}var i=n(11);e.exports.f=function(e){return new a(e)}},function(e,t,n){'use strict';function a(t,n,a){var o=Array(a),r=8*a-n-1,l=(1<>1,p=23===n?G(2,-24)-G(2,-77):0,u=0,i=0>t||0===t&&0>1/t?1:0,s,g,h;for(t=H(t),t!=t||t===V?(g=t==t?0:1,s=l):(s=Y(K(t)/X),1>t*(h=G(2,-s))&&(s--,h*=2),t+=1<=s+d?p/h:p*G(2,1-d),2<=t*h&&(s++,h/=2),s+d>=l?(g=0,s=l):1<=s+d?(g=(t*h-1)*G(2,n),s+=d):(g=t*G(2,d-1)*G(2,n),s=0));8<=n;o[u++]=255&g,g/=256,n-=8);for(s=s<>1,d=o-7,c=a-1,i=t[c--],s=127&i,e;for(i>>=7;0>=-d,d+=n;0>8]}function u(e){return[255&e,255&e>>8,255&e>>16,255&e>>24]}function g(e){return a(e,52,8)}function h(e){return a(e,23,4)}function m(e,t,n){O(e[M],t,{get:function(){return this[n]}})}function f(e,t,n,a){var i=R(+n);if(i+t>e[ee])throw U(B);var o=e[Q]._b,r=i+e[te],l=o.slice(r,r+t);return a?l:l.reverse()}function v(e,t,n,a,o,r){var l=R(+n);if(l+t>e[ee])throw U(B);for(var s=e[Q]._b,d=l+e[te],c=a(+o),p=0;pi||i>a)throw U('Wrong offset!');if(n=void 0===n?a-i:C(n),i+n>a)throw U('Wrong length!');this[Q]=e,this[te]=i,this[ee]=n},x&&(m(F,Z,'_l'),m(z,$,'_b'),m(z,Z,'_l'),m(z,J,'_o')),S(z[M],{getInt8:function(e){return f(this,1,e)[0]<<24>>24},getUint8:function(e){return f(this,1,e)[0]},getInt16:function(e){var t=f(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=f(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return r(f(this,4,e,arguments[1]))},getUint32:function(e){return r(f(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return o(f(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return o(f(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){v(this,1,e,d,t)},setUint8:function(e,t){v(this,1,e,d,t)},setInt16:function(e,t){v(this,2,e,p,t,arguments[2])},setUint16:function(e,t){v(this,2,e,p,t,arguments[2])},setInt32:function(e,t){v(this,4,e,u,t,arguments[2])},setUint32:function(e,t){v(this,4,e,u,t,arguments[2])},setFloat32:function(e,t){v(this,4,e,h,t,arguments[2])},setFloat64:function(e,t){v(this,8,e,g,t,arguments[2])}});else{if(!N(function(){F(1)})||!N(function(){new F(-1)})||N(function(){return new F,new F(1.5),new F(NaN),F.name!=L})){F=function(e){return w(this,F),new W(R(e))};for(var ne=F[M]=W[M],ae=P(W),ie=0,j;ae.length>ie;)(j=ae[ie++])in F||_(F,j,W[j]);E||(ne.constructor=F)}var oe=new z(new F(2)),re=z[M].setInt8;oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),(oe.getInt8(0)||!oe.getInt8(1))&&S(z[M],{setInt8:function(e,t){re.call(this,e,t<<24>>24)},setUint8:function(e,t){re.call(this,e,t<<24>>24)}},!0)}I(F,L),I(z,D),_(z[M],k.VIEW,!0),t[L]=F,t[D]=z},function(e,t,n){'use strict';var a=n(363)();e.exports=function(e){return e!==a&&null!==e}},function(e,t){'use strict';function n(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(t,'__esModule',{value:!0});var a=function(){function e(e,t){for(var n=0,a;nthis.container.scrollWidth&&(t=this.container.scrollWidth-this.layout.delta)):n=e.top,this.scrollTo(t,n,!0)}},{key:'add',value:function(e){var t=this,n=this.createView(e);return this.views.append(n),n.onDisplayed=this.afterDisplayed.bind(this),n.onResize=this.afterResized.bind(this),n.on(b.EVENTS.VIEWS.AXIS,function(e){t.updateAxis(e)}),n.display(this.request)}},{key:'append',value:function(e){var t=this,n=this.createView(e);return this.views.append(n),n.onDisplayed=this.afterDisplayed.bind(this),n.onResize=this.afterResized.bind(this),n.on(b.EVENTS.VIEWS.AXIS,function(e){t.updateAxis(e)}),n.display(this.request)}},{key:'prepend',value:function(e){var t=this,n=this.createView(e);return n.on(b.EVENTS.VIEWS.RESIZED,function(e){t.counter(e)}),this.views.prepend(n),n.onDisplayed=this.afterDisplayed.bind(this),n.onResize=this.afterResized.bind(this),n.on(b.EVENTS.VIEWS.AXIS,function(e){t.updateAxis(e)}),n.display(this.request)}},{key:'counter',value:function(e){'vertical'===this.settings.axis?this.scrollBy(0,e.heightDelta,!0):this.scrollBy(e.widthDelta,0,!0)}},{key:'next',value:function(){var e=this.settings.direction,t,n;if(this.views.length){if(this.isPaginated&&'horizontal'===this.settings.axis&&(!e||'ltr'===e))this.scrollLeft=this.container.scrollLeft,n=this.container.scrollLeft+this.container.offsetWidth+this.layout.delta,n<=this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next();else if(this.isPaginated&&'horizontal'===this.settings.axis&&'rtl'===e)this.scrollLeft=this.container.scrollLeft,n=this.container.scrollLeft,0p&&(h=p,r=h-u);var m=e.layout.count(p,a).pages,f=g(u/a),y=[],v=g(h/a);y=[];for(var b=f,i;b<=v;b++)i=b+1,y.push(i);var x=e.mapping.page(t.contents,t.section.cfiBase,u,h);return{index:s,href:d,pages:y,totalPages:m,mapping:x}});return i}},{key:'paginatedLocation',value:function(){var e=this,t=this.visible(),n=this.container.getBoundingClientRect(),a=0,o=0;this.settings.fullsize&&(a=window.scrollX);var i=t.map(function(t){var r=t.section,l=r.index,s=r.href,d=t.offset().left,c=t.position().left,p=t.width(),u=a+n.left-c+o,g=u+e.layout.width-o,h=e.mapping.page(t.contents,t.section.cfiBase,u,g),m=e.layout.count(p).pages,f=y(u/e.layout.pageWidth),v=[],b=y(g/e.layout.pageWidth);if(0>f&&(f=0,++b),'rtl'===e.settings.direction){var x=f;f=m-b,b=m-x}for(var E=f+1,i;E<=b;E++)i=E,v.push(i);return{index:l,href:s,pages:v,totalPages:m,mapping:h}});return i}},{key:'isVisible',value:function(e,t,n,a){var i=e.position(),o=a||this.bounds();return'horizontal'===this.settings.axis&&i.right>o.left-t&&i.lefto.top-t&&i.topl;)a(n,d=t[l++])&&(~r(s,d)||s.push(d));return s}},function(e,t,n){var a=n(8),o=n(1),r=n(33);e.exports=n(7)?Object.defineProperties:function(e,t){o(e);for(var n=r(t),l=n.length,s=0,i;l>s;)a.f(e,i=n[s++],t[i]);return e}},function(e,t,n){var a=n(15),i=n(41).f,o={}.toString,r='object'==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return i(e)}catch(t){return r.slice()}};e.exports.f=function(e){return r&&'[object Window]'==o.call(e)?l(e):i(a(e))}},function(e,t,n){'use strict';var a=n(33),i=n(57),o=n(53),r=n(10),l=n(52),s=Object.assign;e.exports=!s||n(3)(function(){var e={},t={},n=Symbol(),a='abcdefghijklmnopqrst';return e[n]=7,a.split('').forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join('')!=a})?function(e){for(var t=r(e),n=arguments.length,s=1,d=i.f,c=o.f;n>s;)for(var p=l(arguments[s++]),u=d?a(p).concat(d(p)):a(p),g=u.length,h=0,m;g>h;)c.call(p,m=u[h++])&&(t[m]=p[m]);return t}:s},function(e,t,n){'use strict';var a=n(11),i=n(4),o=n(59),r=[].slice,l={},s=function(e,t,a){if(!(t in l)){for(var o=[],n=0;n>>0||(r.test(n)?16:10))}:a},function(e,t,n){var a=n(2).parseFloat,i=n(47).trim;e.exports=1/a(n(79)+'-0')==-Infinity?a:function(e){var t=i(e+'',3),n=a(t);return 0===n&&'-'==t.charAt(0)?-0:n}},function(e,t,n){var a=n(20);e.exports=function(e,t){if('number'!=typeof e&&'Number'!=a(e))throw TypeError(t);return+e}},function(e,t,n){var a=n(4);e.exports=function(e){return!a(e)&&isFinite(e)&&y(e)===e}},function(e){e.exports=Math.log1p||function(e){return-1e-8<(e=+e)&&1e-8>e?e-e*e/2:l(1+e)}},function(e,t,n){var i=n(82),a=s,o=a(2,-52),r=a(2,-23),l=a(2,127)*(2-r),d=a(2,-126),p=function(e){return e+1/o-1/o};e.exports=Math.fround||function(e){var t=c(e),n=i(e),s,a;return tl||a!=a?n*Infinity:n*a)}},function(e,t,n){var a=n(1);e.exports=function(t,e,n,i){try{return i?e(a(n)[0],n[1]):e(n)}catch(n){var o=t['return'];throw void 0!==o&&a(o.call(t)),n}}},function(e,t,n){var a=n(11),o=n(10),r=n(52),l=n(9);e.exports=function(e,t,n,s,d){a(t);var c=o(e),p=r(c),u=l(c.length),g=d?u-1:0,h=d?-1:1;if(2>n)for(;;){if(g in p){s=p[g],g+=h;break}if(g+=h,d?0>g:u<=g)throw TypeError('Reduce of empty array with no initial value')}for(;d?0<=g:u>g;g+=h)g in p&&(s=t(s,p[g],g,c));return s}},function(e,t,n){'use strict';var a=n(10),i=n(39),o=n(9);e.exports=[].copyWithin||function(e,t){var n=a(this),r=o(n.length),l=i(e,r),s=i(t,r),d=2p&&(u=u.slice(0,p)),r?u+l:l+u}},function(e,t,n){var a=n(33),o=n(15),r=n(53).f;e.exports=function(e){return function(t){for(var n=o(t),l=a(n),s=l.length,d=0,i=[],c;s>d;)r.call(n,c=l[d++])&&i.push(e?[c,n[c]]:n[c]);return i}}},function(e,t,n){var a=n(54),i=n(137);e.exports=function(e){return function(){if(a(this)!=e)throw TypeError(e+'#toJSON isn\'t generic');return i(this)}}},function(e,t,n){var a=n(44);e.exports=function(e,t){var n=[];return a(e,!1,n.push,n,t),n}},function(e){e.exports=Math.scale||function(e,t,n,a,i){return 0===arguments.length||e!=e||t!=t||n!=n||a!=a||i!=i?NaN:e===Infinity||e===-Infinity?e:(e-t)*(i-a)/(n-t)+a}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function a(e,a){var i=e.prototype;if(Object.create){var t=Object.create(a.prototype);i.__proto__=t}if(!(i instanceof a)){function o(){}o.prototype=a.prototype,o=new o,n(i,o),e.prototype=i=o}i.constructor!=e&&('function'!=typeof e&&console.error('unknow Class:'+e),i.constructor=e)}function o(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ae[e]),this.message=ae[e],Error.captureStackTrace&&Error.captureStackTrace(this,o);return n.code=e,t&&(this.message=this.message+': '+t),n}function r(){}function i(e,t){this._node=e,this._refresh=t,l(this)}function l(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var a=e._refresh(e._node);q(e,'length',a.length),n(a,e),e._inc=t}}function s(){}function d(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function c(e,t,n,a){if(a?t[d(t,a)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(a&&v(i,e,a),y(i,e,n))}}function p(e,t,n){var a=d(t,n);if(0<=a){for(var i=t.length-1;a'==e&&'>'||'&'==e&&'&'||'"'==e&&'"'||'&#'+e.charCodeAt()+';'}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do if(m(e,t))return!0;while(e=e.nextSibling)}function f(){}function y(e,t,n){e&&e._inc++;var a=n.namespaceURI;'http://www.w3.org/2000/xmlns/'==a&&(t._nsMap[n.prefix?n.localName:'']=n.value)}function v(e,t,n){e&&e._inc++;var a=n.namespaceURI;'http://www.w3.org/2000/xmlns/'==a&&delete t._nsMap[n.prefix?n.localName:'']}function b(e,t,n){if(e&&e._inc){e._inc++;var a=t.childNodes;if(n)a[a.length++]=n;else{for(var o=t.firstChild,r=0;o;)a[r++]=o,o=o.nextSibling;a.length=r}}}function x(e,t){var n=t.previousSibling,a=t.nextSibling;return n?n.nextSibling=a:e.firstChild=a,a?a.previousSibling=n:e.lastChild=n,b(e.ownerDocument,e),t}function E(e,t,n){var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ee){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var r=n?n.previousSibling:e.lastChild;i.previousSibling=r,o.nextSibling=n,r?r.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do i.parentNode=e;while(i!==o&&(i=i.nextSibling));return b(e.ownerDocument||e,e),t.nodeType==ee&&(t.firstChild=t.lastChild=null),t}function k(e,t){var n=t.parentNode;if(n){var a=e.lastChild;n.removeChild(t);var a=e.lastChild}var a=e.lastChild;return t.parentNode=e,t.previousSibling=a,t.nextSibling=null,a?a.nextSibling=t:e.firstChild=t,e.lastChild=t,b(e.ownerDocument,e,t),t}function _(){this._nsMap={}}function S(){}function N(){}function w(){}function T(){}function C(){}function R(){}function P(){}function O(){}function A(){}function I(){}function L(){}function D(){}function M(e,t){var n=[],a=9==this.nodeType?this.documentElement:this,i=a.prefix,o=a.namespaceURI;if(o&&null==i){var i=a.lookupPrefix(o);if(null==i)var r=[{namespace:o,prefix:null}]}return F(this,n,e,t,r),n.join('')}function B(e,t,n){var a=e.prefix||'',o=e.namespaceURI;if(!a&&!o)return!1;if('xml'===a&&'http://www.w3.org/XML/1998/namespace'===o||'http://www.w3.org/2000/xmlns/'==o)return!1;for(var r=n.length;r--;){var i=n[r];if(i.prefix==a)return i.namespace!=o}return!0}function F(e,t,n,a,o){if(a){if(e=a(e),!e)return;if('string'==typeof e)return void t.push(e)}switch(e.nodeType){case W:o||(o=[]);var r=o.length,l=e.attributes,s=l.length,d=e.firstChild,c=e.tagName;n=U===e.namespaceURI||n,t.push('<',c);for(var p=0,i;p'),n&&/^script$/i.test(c))for(;d;)d.data?t.push(d.data):F(d,t,n,a,o),d=d.nextSibling;else for(;d;)F(d,t,n,a,o),d=d.nextSibling;t.push('')}else t.push('/>');return;case J:case ee:for(var d=e.firstChild;d;)F(d,t,n,a,o),d=d.nextSibling;return;case H:return t.push(' ',e.name,'="',e.value.replace(/[<&"]/g,h),'"');case G:return t.push(e.data.replace(/[<&]/g,h));case Y:return t.push('');case Z:return t.push('');case Q:var f=e.publicId,y=e.systemId;if(t.push('');else if(y&&'.'!=y)t.push(' SYSTEM "',y,'">');else{var v=e.internalSubset;v&&t.push(' [',v,']'),t.push('>')}return;case $:return t.push('');case K:return t.push('&',e.nodeName,';');default:t.push('??',e.nodeName);}}function z(e,t,n){var a;switch(t.nodeType){case W:a=t.cloneNode(!1),a.ownerDocument=e;case ee:break;case H:n=!0;}if(a||(a=t.cloneNode(!1)),a.ownerDocument=e,a.parentNode=null,n)for(var i=t.firstChild;i;)a.appendChild(z(e,i,n)),i=i.nextSibling;return a}function j(e,t,a){var o=new t.constructor;for(var l in t){var n=t[l];'object'!=typeof n&&n!=o[l]&&(o[l]=n)}switch(t.childNodes&&(o.childNodes=new r),o.ownerDocument=e,o.nodeType){case W:var d=t.attributes,c=o.attributes=new s,p=d.length;c._ownerElement=o;for(var u=0;u=a.end.displayed.total&&(a.atEnd=!0),t.index===this.book.spine.first().index&&1===a.start.displayed.page&&(a.atStart=!0),a}},{key:'destroy',value:function(){this.manager&&this.manager.destroy(),this.book=void 0}},{key:'passEvents',value:function(t){var n=this,e=E.default.listenedEvents;e.forEach(function(a){t.on(a,function(e){return n.triggerViewEvent(e,t)})}),t.on(S.EVENTS.CONTENTS.SELECTED,function(a){return n.triggerSelectedEvent(a,t)})}},{key:'triggerViewEvent',value:function(t,e){this.emit(t.type,t,e)}},{key:'triggerSelectedEvent',value:function(e,t){this.emit(S.EVENTS.RENDITION.SELECTED,e,t)}},{key:'triggerMarkEvent',value:function(e,t,n){this.emit(S.EVENTS.RENDITION.MARK_CLICKED,e,t,n)}},{key:'getRange',value:function(e,t){var n=new g.default(e),a=this.manager.visible().filter(function(e){if(n.spinePos===e.index)return!0});if(a.length)return a[0].contents.range(n,t)}},{key:'adjustImages',value:function(e){if('pre-paginated'===this._layout.name)return new Promise(function(e){e()});var t=e.window.getComputedStyle(e.content,null),n=e.content.offsetHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom));return e.addStylesheetRules({img:{"max-width":(this._layout.columnWidth?this._layout.columnWidth+'px':'100%')+'!important',"max-height":n+'px!important',"object-fit":'contain',"page-break-inside":'avoid',"break-inside":'avoid'},svg:{"max-width":(this._layout.columnWidth?this._layout.columnWidth+'px':'100%')+'!important',"max-height":n+'px!important',"page-break-inside":'avoid',"break-inside":'avoid'}}),new Promise(function(e){setTimeout(function(){e()},1)})}},{key:'getContents',value:function(){return this.manager?this.manager.getContents():[]}},{key:'views',value:function(){var e=this.manager?this.manager.views:void 0;return e||[]}},{key:'handleLinks',value:function(e){var t=this;e&&e.on(S.EVENTS.CONTENTS.LINK_CLICKED,function(e){var n=t.book.path.relative(e);t.display(n)})}},{key:'injectStylesheet',value:function(e){var t=e.createElement('link');t.setAttribute('type','text/css'),t.setAttribute('rel','stylesheet'),t.setAttribute('href',this.settings.stylesheet),e.getElementsByTagName('head')[0].appendChild(t)}},{key:'injectScript',value:function(e){var t=e.createElement('script');t.setAttribute('type','text/javascript'),t.setAttribute('src',this.settings.script),t.textContent=' ',e.getElementsByTagName('head')[0].appendChild(t)}},{key:'injectIdentifier',value:function(e){var t=this.book.package.metadata.identifier,n=e.createElement('meta');n.setAttribute('name','dc.relation.ispartof'),t&&n.setAttribute('content',t),e.getElementsByTagName('head')[0].appendChild(n)}}]),e}();(0,s.default)(O.prototype),t.default=O,e.exports=t['default']},function(e,t,n){'use strict';function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(t,'__esModule',{value:!0});var i=function(){function e(e,t){for(var n=0,a;n=t&&l<=n)return e;if(s>t)return e;o=e,i.push(e)}else if(a.horizontal&&'rtl'===a.direction){if(l=p.left,s=p.right,s<=n&&s>=t)return e;if(l=t&&d<=n)return e;if(c>t)return e;o=e,i.push(e)}}),s)return this.findTextStartRange(s,t,n);return this.findTextStartRange(o,t,n)}},{key:'findEnd',value:function(e,t,n){for(var a=this,i=[e],o=e,l,s;i.length;)if(l=i.shift(),s=this.walk(l,function(e){var l,s,d,c,p;if(p=(0,r.nodeBounds)(e),a.horizontal&&'ltr'===a.direction){if(l=u(p.left),s=u(p.right),l>n&&o)return o;if(s>n)return e;o=e,i.push(e)}else if(a.horizontal&&'rtl'===a.direction){if(l=u(a.horizontal?p.left:p.top),s=u(a.horizontal?p.right:p.bottom),sn&&o)return o;if(c>n)return e;o=e,i.push(e)}}),s)return this.findTextEndRange(s,t,n);return this.findTextEndRange(o,t,n)}},{key:'findTextStartRange',value:function(e,t,n){for(var a=this.splitTextNodeIntoRanges(e),o=0,i,r,l,s,d;o=t)return i;}else if(this.horizontal&&'rtl'===this.direction){if(d=r.right,d<=n)return i;}else if(s=r.top,s>=t)return i;return a[0]}},{key:'findTextEndRange',value:function(e,t,n){for(var a=this.splitTextNodeIntoRanges(e),o=0,i,r,l,s,d,c,p;on&&i)return i;if(d>n)return r}else if(this.horizontal&&'rtl'===this.direction){if(s=l.left,d=l.right,dn&&i)return i;if(p>n)return r}i=r}return a[a.length-1]}},{key:'splitTextNodeIntoRanges',value:function(e,t){var n=[],a=e.textContent||'',i=a.trim(),o=e.ownerDocument,r=t||' ',l=i.indexOf(r),s;if(-1===l||e.nodeType!=Node.TEXT_NODE)return s=o.createRange(),s.selectNodeContents(e),[s];for(s=o.createRange(),s.setStart(e,0),s.setEnd(e,l),n.push(s),s=!1;-1!=l;)l=i.indexOf(r,l+1),0=t||0>n||y&&a>=E}function c(){var e=i();return d(e)?p(e):void(_=setTimeout(c,s(e)))}function p(e){return(_=void 0,v&&b)?r(e):(b=x=void 0,k)}function u(){var e=i(),n=d(e);if(b=arguments,x=this,S=e,n){if(void 0===_)return l(S);if(y)return _=setTimeout(c,t),r(S)}return void 0===_&&(_=setTimeout(c,t)),k}var g=0,f=!1,y=!1,v=!0,b,x,E,k,_,S;if('function'!=typeof e)throw new TypeError('Expected a function');return t=o(t)||0,a(n)&&(f=!!n.leading,y='maxWait'in n,E=y?m(o(n.maxWait)||0,t):E,v='trailing'in n?!!n.trailing:v),u.cancel=function(){void 0!==_&&clearTimeout(_),g=0,b=S=x=_=void 0},u.flush=function(){return void 0===_?k:p(i())},u}},function(e,t,n){var a=n(391),i='object'==typeof self&&self&&self.Object===Object&&self,o=a||i||Function('return this')();e.exports=o},function(e,t,n){var a=n(145),i=a.Symbol;e.exports=i},function(e,t,n){'use strict';function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}function o(e,t){if(!e)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return t&&('object'==typeof t||'function'==typeof t)?t:e}function r(e,t){if('function'!=typeof t&&null!==t)throw new TypeError('Super expression must either be null or a function, not '+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,'__esModule',{value:!0});var l=function(){function e(e,t){for(var n=0,a;n=g&&(o&&d?h():m()),0>p-r&&(o&&d?m():h());var f=i.map(function(e){return e.displayed});return i.length?Promise.all(f).then(function(){if('pre-paginated'===n.layout.name&&n.layout.props.spread)return n.check()}).then(function(){return n.update(r)},function(e){return e}):(this.q.enqueue(function(){this.update()}.bind(this)),a.resolve(!1),a.promise)}},{key:'trim',value:function(){for(var e=new s.defer,t=this.views.displayed(),n=t[0],a=t[t.length-1],o=this.views.indexOf(n),r=this.views.indexOf(a),l=this.views.slice(0,o),d=this.views.slice(r+1),c=0;ca;)$(e,o=n[a++],t[o]);return e},J=function(e){var t=F.call(this,e=_(e,!0));return this===V&&o(q,e)&&!o(U,e)?!1:t||!o(this,e)||!o(q,e)||o(this,M)&&this[M][e]?t:!0},Q=function(e,t){if(e=x(e),t=_(t,!0),e!==V||!o(q,t)||o(U,t)){var n=R(e,t);return n&&o(q,t)&&!(o(e,M)&&e[M][t])&&(n.enumerable=!0),n}},ee=function(e){for(var t=O(x(e)),n=[],a=0,i;t.length>a;)o(q,i=t[a++])||i==M||i==s||n.push(i);return n},te=function(e){for(var t=e===V,n=O(t?U:x(e)),a=[],r=0,i;n.length>r;)o(q,i=n[r++])&&(!t||o(V,i))&&a.push(q[i]);return a};W||(A=function(){if(this instanceof A)throw TypeError('Symbol is not a constructor!');var e=u(0ae;)g(ne[ae++]);for(var j=C(g.store),ie=0;j.length>ie;)m(j[ie++]);r(r.S+r.F*!W,'Symbol',{for:function(e){return o(z,e+='')?z[e]:z[e]=A(e)},keyFor:function(e){if(X(e))return f(z,e);throw TypeError(e+' is not a symbol!')},useSetter:function(){G=!0},useSimple:function(){G=!1}}),r(r.S+r.F*!W,'Object',{create:function(e,t){return t===void 0?S(e):Z(S(e),t)},defineProperty:$,defineProperties:Z,getOwnPropertyDescriptor:Q,getOwnPropertyNames:ee,getOwnPropertySymbols:te}),I&&r(r.S+r.F*(!W||d(function(){var e=A();return'[null]'!=L([e])||'{}'!=L({a:e})||'{}'!=L(Object(e))})),'JSON',{stringify:function(e){if(!(void 0===e||X(e))){for(var t=[e],n=1,a,i;arguments.length>n;)t.push(arguments[n++]);return a=t[1],'function'==typeof a&&(i=a),(i||!v(a))&&(a=function(e,t){if(i&&(t=i.call(this,e,t)),!X(t))return t}),t[1]=a,L.apply(I,t)}}}),A[D][B]||n(13)(A[D],B,A[D].valueOf),p(A,'Symbol'),p(Math,'Math',!0),p(a.JSON,'JSON',!0)},function(e,t,n){var a=n(33),i=n(15);e.exports=function(e,t){for(var n=i(e),o=a(n),r=o.length,l=0,s;r>l;)if(n[s=o[l++]]===t)return s}},function(e,t,n){var a=n(33),o=n(57),r=n(53);e.exports=function(e){var t=a(e),n=o.f;if(n)for(var l=n(e),s=r.f,d=0,i;l.length>d;)s.call(e,i=l[d++])&&t.push(i);return t}},function(e,t,n){var a=n(0);a(a.S,'Object',{create:n(40)})},function(e,t,n){var a=n(0);a(a.S+a.F*!n(7),'Object',{defineProperty:n(8).f})},function(e,t,n){var a=n(0);a(a.S+a.F*!n(7),'Object',{defineProperties:n(109)})},function(e,t,n){var a=n(15),i=n(17).f;n(27)('getOwnPropertyDescriptor',function(){return function(e,t){return i(a(e),t)}})},function(e,t,n){var a=n(10),i=n(18);n(27)('getPrototypeOf',function(){return function(e){return i(a(e))}})},function(e,t,n){var a=n(10),i=n(33);n(27)('keys',function(){return function(e){return i(a(e))}})},function(e,t,n){n(27)('getOwnPropertyNames',function(){return n(110).f})},function(e,t,n){var a=n(4),i=n(32).onFreeze;n(27)('freeze',function(e){return function(t){return e&&a(t)?e(i(t)):t}})},function(e,t,n){var a=n(4),i=n(32).onFreeze;n(27)('seal',function(e){return function(t){return e&&a(t)?e(i(t)):t}})},function(e,t,n){var a=n(4),i=n(32).onFreeze;n(27)('preventExtensions',function(e){return function(t){return e&&a(t)?e(i(t)):t}})},function(e,t,n){var a=n(4);n(27)('isFrozen',function(e){return function(t){return!a(t)||!!e&&e(t)}})},function(e,t,n){var a=n(4);n(27)('isSealed',function(e){return function(t){return!a(t)||!!e&&e(t)}})},function(e,t,n){var a=n(4);n(27)('isExtensible',function(e){return function(t){return!!a(t)&&(!e||e(t))}})},function(e,t,n){var a=n(0);a(a.S+a.F,'Object',{assign:n(111)})},function(e,t,n){var a=n(0);a(a.S,'Object',{is:n(169)})},function(e){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var a=n(0);a(a.S,'Object',{setPrototypeOf:n(78).set})},function(e,t,n){'use strict';var a=n(54);({})[n(5)('toStringTag')]='z',n(14)(Object.prototype,'toString',function(){return'[object '+a(this)+']'},!0)},function(e,t,n){var a=n(0);a(a.P,'Function',{bind:n(112)})},function(e,t,n){var a=n(8).f,i=Function.prototype,o=/^\s*function ([^ (]*)/,r='name';r in i||n(7)&&a(i,r,{configurable:!0,get:function(){try{return(''+this).match(o)[1]}catch(t){return''}}})},function(e,t,n){'use strict';var a=n(4),i=n(18),o=n(5)('hasInstance'),r=Function.prototype;o in r||n(8).f(r,o,{value:function(e){if('function'!=typeof this||!a(e))return!1;if(!a(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var a=n(0),i=n(113);a(a.G+a.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var a=n(0),i=n(114);a(a.G+a.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){'use strict';var a=n(2),i=n(12),o=n(20),l=n(80),s=n(24),d=n(3),c=n(41).f,p=n(17).f,u=n(8).f,g=n(47).trim,h='Number',m=a[h],f=m,y=m.prototype,v=o(n(40)(y))==h,b=function(e){var t=s(e,!1);if('string'==typeof t&&2l||l>d)return NaN;return parseInt(c,o)}}return+t};if(!m(' 0o1')||!m('0b1')||m('+0x1')){m=function(e){var t=1>arguments.length?0:e,n=this;return n instanceof m&&(v?d(function(){y.valueOf.call(n)}):o(n)!=h)?l(new f(b(t)),n,m):b(t)};for(var x=n(7)?c(f):'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'.split(','),E=0,k;x.length>E;E++)i(f,k=x[E])&&!i(m,k)&&u(m,k,p(f,k));m.prototype=y,y.constructor=m,n(14)(a,h,m)}},function(e,t,n){'use strict';var a=n(0),i=n(26),o=n(115),r=n(81),l=1 .toFixed,s=y,d=[0,0,0,0,0,0],c='Number.toFixed: incorrect invocation!',p='0',u=function(e,t){for(var n=-1,a=t;6>++n;)a+=e*d[n],d[n]=a%1e7,a=s(a/1e7)},g=function(e){for(var t=6,n=0;0<=--t;)n+=d[t],d[t]=s(n/e),n=1e7*(n%e)},h=function(){for(var e=6,n='';0<=--e;)if(''!=n||0==e||0!==d[e]){var a=d[e]+'';n=''==n?a:n+r.call(p,7-a.length)+a}return n},v=function(e,t,n){return 0===t?n:1==t%2?v(e,t-1,n*e):v(e*e,t/2,n)},b=function(e){for(var t=0,n=e;4096<=n;)t+=12,n/=4096;for(;2<=n;)t+=1,n/=2;return t};a(a.P+a.F*('0.000'!==8e-5.toFixed(3)||'1'!==0.9.toFixed(0)||'1.25'!==1.255.toFixed(2)||'1000000000000000128'!==1000000000000000100 .toFixed(0)||!n(3)(function(){l.call({})})),'Number',{toFixed:function(t){var n=o(this,c),a=i(t),l='',s=p,d,m,f,y;if(0>a||20=n||1e21<=n)return n+'';if(0>n&&(l='-',n=-n),1e-21d?n*v(2,-d,1):n/v(2,d,1),m*=4503599627370496,d=52-d,0=c(e)}})},function(e,t,n){var a=n(0);a(a.S,'Number',{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var a=n(0);a(a.S,'Number',{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var a=n(0),i=n(114);a(a.S+a.F*(Number.parseFloat!=i),'Number',{parseFloat:i})},function(e,t,n){var a=n(0),i=n(113);a(a.S+a.F*(Number.parseInt!=i),'Number',{parseInt:i})},function(e,t,n){var a=n(0),r=n(117),s=o,d=Math.acosh;a(a.S+a.F*!(d&&710==y(d(Number.MAX_VALUE))&&d(Infinity)==Infinity),'Math',{acosh:function(e){return 1>(e=+e)?NaN:94906265.62425156e?-a(-e):l(e+o(e*e+1)):e}var i=n(0),r=Math.asinh;i(i.S+i.F*!(r&&0<1/r(0)),'Math',{asinh:a})},function(e,t,n){var a=n(0),i=Math.atanh;a(a.S+a.F*!(i&&0>1/i(-0)),'Math',{atanh:function(e){return 0==(e=+e)?e:l((1+e)/(1-e))/2}})},function(e,t,n){var a=n(0),i=n(82);a(a.S,'Math',{cbrt:function(e){return i(e=+e)*s(c(e),1/3)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{clz32:function(e){return(e>>>=0)?31-y(l(e+0.5)*Math.LOG2E):32}})},function(e,t,n){var a=n(0),i=d;a(a.S,'Math',{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var a=n(0),i=n(83);a(a.S+a.F*(i!=p),'Math',{expm1:i})},function(e,t,n){var a=n(0);a(a.S,'Math',{fround:n(118)})},function(e,t,n){var a=n(0);a(a.S,'Math',{hypot:function(){for(var e=0,t=0,n=arguments.length,a=0,i,r;t>>16)*r+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{log10:function(e){return l(e)*Math.LOG10E}})},function(e,t,n){var a=n(0);a(a.S,'Math',{log1p:n(117)})},function(e,t,n){var a=n(0);a(a.S,'Math',{log2:function(e){return l(e)/i}})},function(e,t,n){var a=n(0);a(a.S,'Math',{sign:n(82)})},function(e,t,n){var a=n(0),i=n(83),o=d;a(a.S+a.F*n(3)(function(){return!0}),'Math',{sinh:function(e){return 1>c(e=+e)?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var a=n(0),i=n(83),o=d;a(a.S,'Math',{tanh:function(e){var t=i(e=+e),n=i(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var a=n(0);a(a.S,'Math',{trunc:function(e){return(0n;){if(a=+arguments[n++],o(a,1114111)!==a)throw RangeError(a+' is not a valid code point');e.push(65536>a?r(a):r(((a-=65536)>>10)+55296,a%1024+56320))}return e.join('')}})},function(e,t,n){var a=n(0),o=n(15),r=n(9);a(a.S,'String',{raw:function(e){for(var t=o(e.raw),n=r(t.length),a=arguments.length,l=[],s=0;n>s;)l.push(t[s++]+''),s=e.length?{value:void 0,done:!0}:(n=a(e,t),this._i+=n.length,{value:n,done:!1})})},function(e,t,n){'use strict';var a=n(0),i=n(84)(!1);a(a.P,'String',{codePointAt:function(e){return i(this,e)}})},function(e,t,n){'use strict';var a=n(0),i=n(9),o=n(87),r='endsWith',l=''[r];a(a.P+a.F*n(88)(r),'String',{endsWith:function(e){var t=o(this,e,r),n=1t?'-':9999g;g++)d(f,g,u?p(t[g],g):t[g]);return f.length=g,f}})},function(e,t,n){'use strict';var a=n(0),i=n(90);a(a.S+a.F*n(3)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),'Array',{of:function(){for(var e=0,t=arguments.length,n=new('function'==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){'use strict';var a=n(0),i=n(15),o=[].join;a(a.P+a.F*(n(52)!=Object||!n(21)(o)),'Array',{join:function(e){return o.call(i(this),e===void 0?',':e)}})},function(e,t,n){'use strict';var a=n(0),i=n(77),o=n(20),r=n(39),l=n(9),s=[].slice;a(a.P+a.F*n(3)(function(){i&&s.call(i)}),'Array',{slice:function(e,t){var n=l(this.length),a=o(this);if(t=void 0===t?n:t,'Array'==a)return s.call(this,e,t);for(var d=r(e,n),c=r(t,n),p=l(c-d),u=Array(p),g=0;g1/[1].indexOf(1,-0);a(a.P+a.F*(r||!n(21)(o)),'Array',{indexOf:function(e){return r?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){'use strict';var a=n(0),i=n(15),o=n(26),r=n(9),l=[].lastIndexOf,s=!!l&&0>1/[1].lastIndexOf(1,-0);a(a.P+a.F*(s||!n(21)(l)),'Array',{lastIndexOf:function(e){if(s)return l.apply(this,arguments)||0;var t=i(this),n=r(t.length),a=n-1;for(1a&&(a=n+a);0<=a;a--)if(a in t&&t[a]===e)return a||0;return-1}})},function(e,t,n){var a=n(0);a(a.P,'Array',{copyWithin:n(121)}),n(34)('copyWithin')},function(e,t,n){var a=n(0);a(a.P,'Array',{fill:n(93)}),n(34)('fill')},function(e,t,n){'use strict';var a=n(0),i=n(28)(5),o='find',r=!0;o in[]&&[,][o](function(){r=!1}),a(a.P+a.F*r,'Array',{find:function(e){return i(this,e,1v;)f(y[v++]);g.constructor=c,c.prototype=g,n(14)(a,'RegExp',c)}n(42)('RegExp')},function(e,t,n){'use strict';n(123);var a=n(1),i=n(62),o=n(7),r='toString',l=/./[r],s=function(e){n(14)(RegExp.prototype,r,e,!0)};n(3)(function(){return'/a/b'!=l.call({source:'a',flags:'b'})})?s(function(){var e=a(this);return'/'.concat(e.source,'/','flags'in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):l.name!=r&&s(function(){return l.call(this)})},function(e,t,n){n(63)('match',1,function(e,t,n){return[function(n){'use strict';var a=e(this),i=n==void 0?void 0:n[t];return i===void 0?new RegExp(n)[t](a+''):i.call(n,a)},n]})},function(e,t,n){n(63)('replace',2,function(e,t,n){return[function(a,i){'use strict';var o=e(this),r=a==void 0?void 0:a[t];return r===void 0?n.call(o+'',a,i):r.call(a,o,i)},n]})},function(e,t,n){n(63)('search',1,function(e,t,n){return[function(n){'use strict';var a=e(this),i=n==void 0?void 0:n[t];return i===void 0?new RegExp(n)[t](a+''):i.call(n,a)},n]})},function(e,t,n){n(63)('split',2,function(e,t,a){'use strict';var o=n(60),r=a,l=[].push,i='split',s='length',d='lastIndex';if('c'=='abbc'[i](/(b)*/)[1]||4!='test'[i](/(?:)/,-1)[s]||2!='ab'[i](/(?:ab)*/)[s]||4!='.'[i](/(.?)(.?)/)[s]||1<'.'[i](/()()/)[s]||''[i](/.?/)[s]){var c=/()??/.exec('')[1]===void 0;a=function(e,t){var n=this+'';if(void 0===e&&0===t)return[];if(!o(e))return r.call(n,e,t);var a=[],p=(e.ignoreCase?'i':'')+(e.multiline?'m':'')+(e.unicode?'u':'')+(e.sticky?'y':''),u=0,g=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,p+'g'),m,f,y,v,b;for(c||(m=new RegExp('^'+h.source+'$(?!\\s)',p));(f=h.exec(n))&&(y=f.index+f[0][s],!(y>u&&(a.push(n.slice(u,f.index)),!c&&1=g)));)h[d]===f.index&&h[d]++;return u===n[s]?(v||!h.test(''))&&a.push(''):a.push(n.slice(u)),a[s]>g?a.slice(0,g):a}}else'0'[i](void 0,0)[s]&&(a=function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)});return[function(n,i){var o=e(this),r=n==void 0?void 0:n[t];return r===void 0?a.call(o+'',n,i):r.call(n,o,i)},a]})},function(e,t,n){'use strict';var a=n(38),i=n(2),o=n(19),r=n(54),l=n(0),s=n(4),d=n(11),c=n(43),p=n(44),u=n(64),g=n(95).set,h=n(96)(),m=n(97),f=n(124),y=n(125),v='Promise',b=i.TypeError,x=i.process,E=i[v],k='process'==r(x),_=function(){},S=D=m.f,N=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(5)('species')]=function(e){e(_,_)};return(k||'function'==typeof PromiseRejectionEvent)&&e.then(_)instanceof t}catch(t){}}(),w=a?function(e,t){return e===t||e===E&&t===B}:function(e,t){return e===t},T=function(e){var t;return s(e)&&'function'==typeof(t=e.then)&&t},C=function(e,t){if(!e._n){e._n=!0;var n=e._c;h(function(){for(var a=e._v,o=1==e._s,r=0,i=function(t){var n=o?t.ok:t.fail,i=t.resolve,r=t.reject,l=t.domain,s,d;try{n?(!o&&(2==e._h&&O(e),e._h=1),!0===n?s=a:(l&&l.enter(),s=n(a),l&&l.exit()),s===t.promise?r(b('Promise-chain cycle')):(d=T(s))?d.call(s,i,r):i(s)):r(a)}catch(t){r(t)}};n.length>r;)i(n[r++]);e._c=[],e._n=!1,t&&!e._h&&R(e)})}},R=function(e){g.call(i,function(){var t=e._v,n=P(e),a,o,r;if(n&&(a=f(function(){k?x.emit('unhandledRejection',t,e):(o=i.onunhandledrejection)?o({promise:e,reason:t}):(r=i.console)&&r.error&&r.error('Unhandled promise rejection',t)}),e._h=k||P(e)?2:1),e._a=void 0,n&&a.e)throw a.v})},P=function(e){if(1==e._h)return!1;for(var t=e._a||e._c,n=0,a;t.length>n;)if(a=t[n++],a.fail||!P(a.promise))return!1;return!0},O=function(e){g.call(i,function(){var t;k?x.emit('rejectionHandled',e):(t=i.onrejectionhandled)&&t({promise:e,reason:e._v})})},A=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,!t._a&&(t._a=t._c.slice()),C(t,!0))},I=function(e){var t=this,n;if(!t._d){t._d=!0,t=t._w||t;try{if(t===e)throw b('Promise can\'t be resolved itself');(n=T(e))?h(function(){var a={_w:t,_d:!1};try{n.call(e,o(I,a,1),o(A,a,1))}catch(t){A.call(a,t)}}):(t._v=e,t._s=1,C(t,!1))}catch(n){A.call({_w:t,_d:!1},n)}}},L,D,M,B;N||(E=function(e){c(this,E,v,'_h'),d(e),L.call(this);try{e(o(I,this,1),o(A,this,1))}catch(e){A.call(this,e)}},L=function(){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},L.prototype=n(45)(E.prototype,{then:function(e,t){var n=S(u(this,E));return n.ok='function'!=typeof e||e,n.fail='function'==typeof t&&t,n.domain=k?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&C(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),M=function(){var e=new L;this.promise=e,this.resolve=o(I,e,1),this.reject=o(A,e,1)},m.f=S=function(e){return w(E,e)?new M(e):D(e)}),l(l.G+l.W+l.F*!N,{Promise:E}),n(46)(E,v),n(42)(v),B=n(23)[v],l(l.S+l.F*!N,v,{reject:function(e){var t=S(this),n=t.reject;return n(e),t.promise}}),l(l.S+l.F*(a||!N),v,{resolve:function(e){return e instanceof E&&w(e.constructor,this)?e:y(this,e)}}),l(l.S+l.F*!(N&&n(61)(function(e){E.all(e)['catch'](_)})),v,{all:function(e){var t=this,n=S(t),a=n.resolve,i=n.reject,o=f(function(){var n=[],o=0,r=1;p(e,!1,function(e){var l=o++,s=!1;n.push(void 0),r++,t.resolve(e).then(function(e){s||(s=!0,n[l]=e,--r||a(n))},i)}),--r||a(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=S(t),a=n.reject,i=f(function(){p(e,!1,function(e){t.resolve(e).then(n.resolve,a)})});return i.e&&a(i.v),n.promise}})},function(e,t,n){'use strict';var a=n(130),i=n(49),o='WeakSet';n(65)(o,function(e){return function(){return e(this,0arguments.length?e:o(arguments[2]);if(u&&!p)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);}var a=[null];return a.push.apply(a,t),new(d.apply(e,a))}var s=n.prototype,g=i(l(s)?s:Object.prototype),h=Function.apply.call(e,g,t);return l(h)?h:g}})},function(e,t,n){var a=n(8),i=n(0),o=n(1),r=n(24);i(i.S+i.F*n(3)(function(){Reflect.defineProperty(a.f({},1,{value:1}),1,{value:2})}),'Reflect',{defineProperty:function(e,t,n){o(e),t=r(t,!0),o(n);try{return a.f(e,t,n),!0}catch(t){return!1}}})},function(e,t,n){var a=n(0),i=n(17).f,o=n(1);a(a.S,'Reflect',{deleteProperty:function(e,t){var n=i(o(e),t);return n&&!n.configurable?!1:delete e[t]}})},function(e,t,n){'use strict';var a=n(0),i=n(1),o=function(e){this._t=i(e),this._i=0;var t=this._k=[],n;for(n in e)t.push(n)};n(86)(o,'Object',function(){var e=this,t=e._k,n;do if(e._i>=t.length)return{value:void 0,done:!0};while(!((n=t[e._i++])in e._t));return{value:n,done:!1}}),a(a.S,'Reflect',{enumerate:function(e){return new o(e)}})},function(e,t,n){function a(e,t){var n=3>arguments.length?e:arguments[2],l,c;return d(e)===n?e[t]:(l=i.f(e,t))?r(l,'value')?l.value:void 0===l.get?void 0:l.get.call(n):s(c=o(e))?a(c,t,n):void 0}var i=n(17),o=n(18),r=n(12),l=n(0),s=n(4),d=n(1);l(l.S,'Reflect',{get:a})},function(e,t,n){var a=n(17),i=n(0),o=n(1);i(i.S,'Reflect',{getOwnPropertyDescriptor:function(e,t){return a.f(o(e),t)}})},function(e,t,n){var a=n(0),i=n(18),o=n(1);a(a.S,'Reflect',{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var a=n(0);a(a.S,'Reflect',{has:function(e,t){return t in e}})},function(e,t,n){var a=n(0),i=n(1),o=Object.isExtensible;a(a.S,'Reflect',{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var a=n(0);a(a.S,'Reflect',{ownKeys:n(132)})},function(e,t,n){var a=n(0),i=n(1),o=Object.preventExtensions;a(a.S,'Reflect',{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(t){return!1}}})},function(e,t,n){function a(e,t,n){var s=4>arguments.length?e:arguments[3],u=o.f(c(e),t),g,h;if(!u){if(p(h=r(e)))return a(h,t,n,s);u=d(0)}return l(u,'value')?!1!==u.writable&&p(s)&&(g=o.f(s,t)||d(0),g.value=n,i.f(s,t,g),!0):void 0!==u.set&&(u.set.call(s,n),!0)}var i=n(8),o=n(17),r=n(18),l=n(12),s=n(0),d=n(36),c=n(1),p=n(4);s(s.S,'Reflect',{set:a})},function(e,t,n){var a=n(0),i=n(78);i&&a(a.S,'Reflect',{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(t){return!1}}})},function(e,t,n){'use strict';var a=n(0),i=n(56)(!0);a(a.P,'Array',{includes:function(e){return i(this,e,1c;)p=n(t,i=a[c++]),void 0!==p&&s(d,i,p);return d}})},function(e,t,n){var a=n(0),i=n(135)(!1);a(a.S,'Object',{values:function(e){return i(e)}})},function(e,t,n){var a=n(0),i=n(135)(!0);a(a.S,'Object',{entries:function(e){return i(e)}})},function(e,t,n){'use strict';var a=n(0),i=n(10),o=n(11),r=n(8);n(7)&&a(a.P+n(67),'Object',{__defineGetter__:function(e,t){r.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){'use strict';var a=n(0),i=n(10),o=n(11),r=n(8);n(7)&&a(a.P+n(67),'Object',{__defineSetter__:function(e,t){r.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){'use strict';var a=n(0),i=n(10),o=n(24),r=n(18),l=n(17).f;n(7)&&a(a.P+n(67),'Object',{__lookupGetter__:function(e){var t=i(this),n=o(e,!0),a;do if(a=l(t,n))return a.get;while(t=r(t))}})},function(e,t,n){'use strict';var a=n(0),i=n(10),o=n(24),r=n(18),l=n(17).f;n(7)&&a(a.P+n(67),'Object',{__lookupSetter__:function(e){var t=i(this),n=o(e,!0),a;do if(a=l(t,n))return a.set;while(t=r(t))}})},function(e,t,n){var a=n(0);a(a.P+a.R,'Map',{toJSON:n(136)('Map')})},function(e,t,n){var a=n(0);a(a.P+a.R,'Set',{toJSON:n(136)('Set')})},function(e,t,n){n(68)('Map')},function(e,t,n){n(68)('Set')},function(e,t,n){n(68)('WeakMap')},function(e,t,n){n(68)('WeakSet')},function(e,t,n){n(69)('Map')},function(e,t,n){n(69)('Set')},function(e,t,n){n(69)('WeakMap')},function(e,t,n){n(69)('WeakSet')},function(e,t,n){var a=n(0);a(a.G,{global:n(2)})},function(e,t,n){var a=n(0);a(a.S,'System',{global:n(2)})},function(e,t,n){var a=n(0),i=n(20);a(a.S,'Error',{isError:function(e){return'Error'===i(e)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{clamp:function(e,t,n){return h(n,m(t,e))}})},function(e,t,a){var i=a(0);i(i.S,'Math',{DEG_PER_RAD:n/180})},function(e,t,a){var i=a(0);i(i.S,'Math',{degrees:function(e){return e*(180/n)}})},function(e,t,n){var a=n(0),i=n(138),o=n(118);a(a.S,'Math',{fscale:function(e,t,n,a,r){return o(i(e,t,n,a,r))}})},function(e,t,n){var a=n(0);a(a.S,'Math',{iaddh:function(e,t,n,a){var i=e>>>0,o=n>>>0;return 0|(t>>>0)+(a>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{isubh:function(e,t,n,a){var i=e>>>0,o=n>>>0;return 0|(t>>>0)-(a>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{imulh:function(e,n){var a=65535,i=+e,o=+n,r=i&a,l=o&a,s=i>>16,d=o>>16,c=(s*l>>>0)+(r*l>>>16);return s*d+(c>>16)+((r*d>>>0)+(c&a)>>16)}})},function(e,t,a){var i=a(0);i(i.S,'Math',{RAD_PER_DEG:180/n})},function(e,t,a){var i=a(0);i(i.S,'Math',{radians:function(e){return e*(n/180)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{scale:n(138)})},function(e,t,n){var a=n(0);a(a.S,'Math',{umulh:function(e,n){var a=65535,i=+e,o=+n,r=i&a,l=o&a,s=i>>>16,d=o>>>16,c=(s*l>>>0)+(r*l>>>16);return s*d+(c>>>16)+((r*d>>>0)+(c&a)>>>16)}})},function(e,t,n){var a=n(0);a(a.S,'Math',{signbit:function(e){return(e=+e)==e?0==e?1/e==Infinity:0arguments.length?void 0:o(arguments[2]),a=r(i(t),n,!1);if(void 0===a||!a['delete'](e))return!1;if(a.size)return!0;var s=l.get(t);return s['delete'](n),!!s.size||l['delete'](t)}})},function(e,t,n){var a=n(30),i=n(1),o=n(18),r=a.has,l=a.get,s=a.key,d=function(e,t,n){var a=r(e,t,n);if(a)return l(e,t,n);var i=o(t);return null===i?void 0:d(e,i,n)};a.exp({getMetadata:function(e,t){return d(e,i(t),3>arguments.length?void 0:s(arguments[2]))}})},function(e,t,n){var a=n(128),i=n(137),o=n(30),r=n(1),l=n(18),s=o.keys,d=o.key,c=function(e,t){var n=s(e,t),o=l(e);if(null===o)return n;var r=c(o,t);return r.length?n.length?i(new a(n.concat(r))):r:n};o.exp({getMetadataKeys:function(e){return c(r(e),2>arguments.length?void 0:d(arguments[1]))}})},function(e,t,n){var a=n(30),i=n(1),o=a.get,r=a.key;a.exp({getOwnMetadata:function(e,t){return o(e,i(t),3>arguments.length?void 0:r(arguments[2]))}})},function(e,t,n){var a=n(30),i=n(1),o=a.keys,r=a.key;a.exp({getOwnMetadataKeys:function(e){return o(i(e),2>arguments.length?void 0:r(arguments[1]))}})},function(e,t,n){var a=n(30),i=n(1),o=n(18),r=a.has,l=a.key,s=function(e,t,n){var a=r(e,t,n);if(a)return!0;var i=o(t);return null!==i&&s(e,i,n)};a.exp({hasMetadata:function(e,t){return s(e,i(t),3>arguments.length?void 0:l(arguments[2]))}})},function(e,t,n){var a=n(30),i=n(1),o=a.has,r=a.key;a.exp({hasOwnMetadata:function(e,t){return o(e,i(t),3>arguments.length?void 0:r(arguments[2]))}})},function(e,t,n){var a=n(30),i=n(1),o=n(11),r=a.key,l=a.set;a.exp({metadata:function(e,t){return function(n,a){l(e,t,(a===void 0?o:i)(n),r(a))}}})},function(e,t,n){var a=n(0),i=n(96)(),o=n(2).process,r='process'==n(20)(o);a(a.G,{asap:function(e){var t=r&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){'use strict';var a=n(0),i=n(2),o=n(23),r=n(96)(),l=n(5)('observable'),s=n(11),d=n(1),c=n(43),p=n(45),u=n(13),g=n(44),h=g.RETURN,f=function(e){return null==e?void 0:s(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return e._o===void 0},m=function(e){v(e)||(e._o=void 0,y(e))},b=function(t,e){d(t),this._c=void 0,this._o=t,t=new x(this);try{var n=e(t),a=n;null!=n&&('function'==typeof n.unsubscribe?n=function(){a.unsubscribe()}:s(n),this._c=n)}catch(n){return void t.error(n)}v(this)&&y(this)};b.prototype=p({},{unsubscribe:function(){m(this)}});var x=function(e){this._s=e};x.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var a=f(n.next);if(a)return a.call(n,e)}catch(n){try{m(t)}finally{throw n}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var a=f(n.error);if(!a)throw e;e=a.call(n,e)}catch(n){try{y(t)}finally{throw n}}return y(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var a=f(n.complete);e=a?a.call(n,e):void 0}catch(n){try{y(t)}finally{throw n}}return y(t),e}}});var E=function(e){c(this,E,'Observable','_f')._f=s(e)};p(E.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,a){s(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(t){a(t),i.unsubscribe()}},error:a,complete:n})})}}),p(E,{from:function(e){var t='function'==typeof this?this:E,n=f(d(e)[l]);if(n){var a=d(n.call(e));return a.constructor===t?a:new t(function(e){return a.subscribe(e)})}return new t(function(t){var n=!1;return r(function(){if(!n){try{if(g(e,!1,function(e){if(t.next(e),n)return h})===h)return}catch(a){if(n)throw a;return void t.error(a)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);er;)(n[r]=arguments[r++])===l&&(s=!0);return function(){var a=this,o=arguments.length,r=0,d=0,c;if(!s&&!o)return i(e,n,a);if(c=n.slice(),s)for(;t>r;r++)c[r]===l&&(c[r]=arguments[d++]);for(;o>d;)c.push(arguments[d++]);return i(e,c,a)}}},function(e,t,n){e.exports=n(2)},function(e,t,n){var a=n(0),i=n(95);a(a.G+a.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var a=n(94),o=n(33),r=n(14),l=n(2),s=n(13),d=n(48),c=n(5),p=c('iterator'),u=c('toStringTag'),g=d.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=o(h),f=0;farguments.length||'string'!=typeof t?(d=n,n=t,t=null):d=arguments[2],null==t?(o=s=!0,l=!1):(o=r.call(t,'c'),l=r.call(t,'e'),s=r.call(t,'w')),p={value:n,configurable:o,enumerable:l,writable:s},d?a(i(d),p):p},l.gs=function(t,n,l){var s,d,p,u;return'string'==typeof t?p=arguments[3]:(p=l,l=n,n=t,t=null),null==n?n=void 0:o(n)?null==l?l=void 0:!o(l)&&(p=l,l=void 0):(p=n,n=l=void 0),null==t?(s=!0,d=!1):(s=r.call(t,'c'),d=r.call(t,'e')),u={get:n,set:l,configurable:s,enumerable:d},p?a(i(p),u):u}},function(e,t,n){'use strict';e.exports=n(358)()?Object.assign:n(359)},function(e){'use strict';e.exports=function(){var e=Object.assign,t;return!('function'!=typeof e)&&(t={foo:'raz'},e(t,{bar:'dwa'},{trzy:'trzy'}),'razdwatrzy'===t.foo+t.bar+t.trzy)}},function(e,t,n){'use strict';var a=n(360),o=n(364);e.exports=function(e,t){var n=m(arguments.length,2),r,l,i;for(e=Object(o(e)),i=function(n){try{e[n]=t[n]}catch(t){r||(r=t)}},l=1;l=t+n||t?new java.lang.String(e,t,n)+'':e}function d(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}a.prototype.parseFromString=function(e,t){var n=this.options,a=new c,r=n.domBuilder||new o,l=n.errorHandler,s=n.locator,d=n.xmlns||{},p={lt:'<',gt:'>',amp:'&',quot:'"',apos:'\''};return s&&r.setDocumentLocator(s),a.errorHandler=i(l,r,s),a.domBuilder=n.domBuilder||r,/\/x?html?$/.test(t)&&(p.nbsp='\xA0',p.copy='\xA9',d['']='http://www.w3.org/1999/xhtml'),d.xml=d.xml||'http://www.w3.org/XML/1998/namespace',e?a.parse(e,d,p):a.errorHandler.error('invalid doc source'),r.doc},o.prototype={startDocument:function(){this.doc=new p().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,a){var o=this.doc,l=o.createElementNS(e,n||t),s=a.length;d(this,l),this.currentElement=l,this.locator&&r(this.locator,l);for(var c=0;c>10),n=56320+(1023&e);return a(t,n)}return a(e)}function y(e){var t=e.slice(1,-1);return t in n?n[t]:'#'===t.charAt(0)?f(parseInt(t.substr(1).replace('x','0x'))):(h.error('entity not found:'+e),e)}function v(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,y);_&&b(w),c.characters(n,0,t-w),w=t}}function b(t,n){for(;t>=E&&(n=k.exec(e));)x=n.index,E=x+n[0].length,_.lineNumber++;_.columnNumber=t-x+1}for(var x=0,E=0,k=/.*(?:\r\n?|\n)|.*$/g,_=c.locator,S=[{currentNSMap:t}],N={},w=0;;){try{var T=e.indexOf('<',w);if(0>T){if(!e.substr(w).match(/^\s*$/)){var C=c.doc,R=C.createTextNode(e.substr(w));C.appendChild(R),c.currentElement=R}return}switch(T>w&&v(T),e.charAt(T+1)){case'/':var P=e.indexOf('>',T+3),O=e.substring(T+2,P),A=S.pop();0>P?(O=e.substring(T+2).replace(/[\s<].*/,''),h.error('end tag name: '+O+' is not complete:'+A.tagName),P=T+1+O.length):O.match(/\sw?w=P:v(m(T,w)+1)}}function o(e,n){return n.lineNumber=e.lineNumber,n.columnNumber=e.columnNumber,n}function r(e,t,n,a,i,o){for(var r=++t,l=x,s,d;;){var p=e.charAt(r);switch(p){case'=':if(l==E)s=e.slice(t,r),l=_;else if(l==k)l=_;else throw new Error('attribute equal must after attrName');break;case'\'':case'"':if(l==_||l==E){if(l==E&&(o.warning('attribute value must after "="'),s=e.slice(t,r)),t=r+1,r=e.indexOf(p,t),0=p)switch(l){case x:n.setTagName(e.slice(t,r)),l=w;break;case E:s=e.slice(t,r),l=k;break;case S:var d=e.slice(t,r).replace(/&#?\w+;/g,i);o.warning('attribute "'+d+'" missed quot(")!!'),n.add(s,d,t);case N:l=w;}else switch(l){case k:n.tagName;'http://www.w3.org/1999/xhtml'===a['']&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),n.add(s,s,t),t=r,l=E;break;case N:o.warning('attribute space is required"'+s+'"!!');case w:l=E,t=r;break;case _:l=S,t=r;break;case T:throw new Error('elements closed character \'/\' and \'>\' must be connected to');}}r++}}function l(e,t,n){for(var o=e.tagName,r=null,l=e.length;l--;){var i=e[l],a=i.qName,s=i.value,d=a.indexOf(':');if(0',t),r=e.substring(t+1,o);if(/[&<]/.test(r))return /^script$/i.test(n)?(i.characters(r,0,r.length),o):(r=r.replace(/&#?\w+;/g,a),i.characters(r,0,r.length),o)}return t+1}function d(e,t,n,a){var i=a[n];return null==i&&(i=e.lastIndexOf(''),i',t+4);return o>t?(n.comment(e,t+4,o-t-4),o+3):(a.error('Unclosed comment'),-1)}return-1;default:if('CDATA['==e.substr(t+3,6)){var o=e.indexOf(']]>',t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var r=f(e,t),l=r.length;if(1',t);if(a){var i=e.substring(t,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),a+2}return-1}return-1}function g(){}function h(e,t){return e.__proto__=t,e}function f(e,t){var n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g,i;for(a.lastIndex=t,a.exec(e);i=a.exec(e);)if(n.push(i),i[1])return n}var y=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=new RegExp('[\\-\\.0-9'+y.source.slice(1,-1)+'\\u00B7\\u0300-\\u036F\\u203F-\\u2040]'),b=new RegExp('^'+y.source+v.source+'*(?::'+y.source+v.source+'*)?$'),x=0,E=1,k=2,_=3,S=4,N=5,w=6,T=7;n.prototype={parse:function(e,t,n){var a=this.domBuilder;a.startDocument(),c(t,t={}),i(e,t,n,a,this.errorHandler),a.endDocument()}},g.prototype={setTagName:function(e){if(!b.test(e))throw new Error('invalid tagName:'+e);this.tagName=e},add:function(e,t,n){if(!b.test(e))throw new Error('invalid attribute:'+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},h({},h.prototype)instanceof h||(h=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t,n){'use strict';function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(t,'__esModule',{value:!0});var o=function(){function e(e,t){for(var n=0,a;nn&&(l+=n,i=n);i=n)l+=n-i,i=n;else{i+=o,d.endContainer=e,d.endOffset=i;var r=new c.default(d,t).toString();a.push(r),l=0}p=e}.bind(this)),d&&d.startContainer&&p){d.endContainer=p,d.endOffset=p.length;var u=new c.default(d,t).toString();a.push(u),l=0}return a}},{key:'locationFromCfi',value:function(e){var t;return(c.default.prototype.isCfiString(e)&&(e=new c.default(e)),0===this._locations.length)?-1:(t=(0,r.locationOf)(e,this._locations,this.epubcfi.compare),t>this.total?this.total:t)}},{key:'percentageFromCfi',value:function(e){if(0===this._locations.length)return null;var t=this.locationFromCfi(e);return this.percentageFromLocation(t)}},{key:'percentageFromLocation',value:function(e){return e&&this.total?e/this.total:0}},{key:'cfiFromLocation',value:function(e){var t=-1;return'number'!=typeof e&&(e=parseInt(e)),0<=e&&e=this._minSpreadWidth?2:1,'reflowable'!==this.name||'paginated'!==this._flow||0<=n||(i=0==l%2?l:l-1),'pre-paginated'===this.name&&(i=0),1=e.left&&t.top>=e.top&&t.bottom<=e.bottom}var c='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&'function'==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?'symbol':typeof e};Object.defineProperty(t,'__esModule',{value:!0}),t.Underline=t.Highlight=t.Mark=t.Pane=void 0;var p=function e(t,n,a){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,a)}if('value'in i)return i.value;var r=i.get;return void 0===r?void 0:r.call(a)},u=function(){function e(e,t){for(var n=0,a;nn&&r>t}var l=t.getBoundingClientRect(),r=e.getBoundingClientRect();if(!o(r,n,a))return!1;for(var s=e.getClientRects(),d=0,i=s.length;dt&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function r(e){var t=e.charCodeAt(0);return 32t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function i(e,l,s){function d(e){E.push(e)}var f=l||'scheme start',y=0,v='',b=!1,x=!1,E=[];loop:for(;(e[y-1]!=m||0==y)&&!this._isInvalid;){var k=e[y];switch(f){case'scheme start':if(k&&g.test(k))v+=k.toLowerCase(),f='scheme';else if(!l){v='',f='no scheme';continue}else{d('Invalid scheme.');break loop}break;case'scheme':if(k&&h.test(k))v+=k.toLowerCase();else if(':'==k){if(this._scheme=v,v='',l)break loop;t(this._scheme)&&(this._isRelative=!0),f='file'==this._scheme?'relative':this._isRelative&&s&&s._scheme==this._scheme?'relative or authority':this._isRelative?'authority first slash':'scheme data'}else if(!l){v='',y=0,f='no scheme';continue}else if(m==k)break loop;else{d('Code point not allowed in scheme: '+k);break loop}break;case'scheme data':'?'==k?(this._query='?',f='query'):'#'==k?(this._fragment='#',f='fragment'):m!=k&&'\t'!=k&&'\n'!=k&&'\r'!=k&&(this._schemeData+=o(k));break;case'no scheme':if(!s||!t(s._scheme))d('Missing scheme.'),n.call(this);else{f='relative';continue}break;case'relative or authority':if('/'==k&&'/'==e[y+1])f='authority ignore slashes';else{d('Expected /, got: '+k),f='relative';continue}break;case'relative':if(this._isRelative=!0,'file'!=this._scheme&&(this._scheme=s._scheme),m==k){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break loop}else if('/'==k||'\\'==k)'\\'==k&&d('\\ is an invalid code point.'),f='relative slash';else if('?'==k)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query='?',this._username=s._username,this._password=s._password,f='query';else if('#'==k)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment='#',this._username=s._username,this._password=s._password,f='fragment';else{var c=e[y+1],_=e[y+2];'file'==this._scheme&&g.test(k)&&(':'==c||'|'==c)&&(m==_||'/'==_||'\\'==_||'?'==_||'#'==_)||(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),f='relative path';continue}break;case'relative slash':if('/'==k||'\\'==k)'\\'==k&&d('\\ is an invalid code point.'),f='file'==this._scheme?'file host':'authority ignore slashes';else{'file'!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),f='relative path';continue}break;case'authority first slash':if('/'==k)f='authority second slash';else{d('Expected \'/\', got: '+k),f='authority ignore slashes';continue}break;case'authority second slash':if(f='authority ignore slashes','/'!=k){d('Expected \'/\', got: '+k);continue}break;case'authority ignore slashes':if('/'!=k&&'\\'!=k){f='authority';continue}else d('Expected authority, got: '+k);break;case'authority':if('@'==k){b&&(d('@ already seen.'),v+='%40'),b=!0;for(var S=0,i;S