epubjs
Version:
Parse and Render Epubs
1 lines • 257 kB
JavaScript
(function(I,M){'object'==typeof exports&&'object'==typeof module?module.exports=M(require('xmldom'),function(){try{return require('JSZip')}catch(W){}}()):'function'==typeof define&&define.amd?define(['xmldom','JSZip'],M):'object'==typeof exports?exports.ePub=M(require('xmldom'),function(){try{return require('JSZip')}catch(W){}}()):I.ePub=M(I.xmldom,I.JSZip)})(this,function(N,I){return function(M){function U(H){if(W[H])return W[H].exports;var Y=W[H]={i:H,l:!1,exports:{}};return M[H].call(Y.exports,Y,Y.exports,U),Y.l=!0,Y.exports}var W={};return U.m=M,U.c=W,U.i=function(H){return H},U.d=function(H,Y,G){U.o(H,Y)||Object.defineProperty(H,Y,{configurable:!1,enumerable:!0,get:G})},U.n=function(H){var Y=H&&H.__esModule?function(){return H['default']}:function(){return H};return U.d(Y,'a',Y),Y},U.o=function(H,Y){return Object.prototype.hasOwnProperty.call(H,Y)},U.p='/dist/',U(U.s=351)}([function(M,U,W){var H=W(2),Y=W(26),G=W(13),X=W(14),$=W(27),J='prototype',Z=function(Q,ee,te){var ne=Q&Z.F,ae=Q&Z.G,ie=Q&Z.S,oe=Q&Z.P,se=Q&Z.B,le=ae?H:ie?H[ee]||(H[ee]={}):(H[ee]||{})[J],de=ae?Y:Y[ee]||(Y[ee]={}),ue=de[J]||(de[J]={}),ce,pe,he,fe;for(ce in ae&&(te=ee),te)pe=!ne&&le&&void 0!==le[ce],he=(pe?le:te)[ce],fe=se&&pe?$(he,H):oe&&'function'==typeof he?$(Function.call,he):he,le&&X(le,ce,he,Q&Z.U),de[ce]!=he&&G(de,ce,fe),oe&&ue[ce]!=he&&(ue[ce]=he)};H.core=Y,Z.F=1,Z.G=2,Z.S=4,Z.P=8,Z.B=16,Z.W=32,Z.U=64,Z.R=128,M.exports=Z},function(M,U,W){var H=W(4);M.exports=function(Y){if(!H(Y))throw TypeError(Y+' is not an object!');return Y}},function(M){var W=M.exports='undefined'!=typeof window&&window.Math==Math?window:'undefined'!=typeof self&&self.Math==Math?self:Function('return this')();'number'==typeof __g&&(__g=W)},function(M){M.exports=function(W){try{return!!W()}catch(H){return!0}}},function(M){M.exports=function(W){return'object'==typeof W?null!==W:'function'==typeof W}},function(M,U,W){var H=W(63)('wks'),Y=W(41),G=W(2).Symbol,X='function'==typeof G,$=M.exports=function(J){return H[J]||(H[J]=X&&G[J]||(X?G:Y)('Symbol.'+J))};$.store=H},function(M,U,W){M.exports=!W(3)(function(){return 7!=Object.defineProperty({},'a',{get:function(){return 7}}).a})},function(M,U,W){var H=W(1),Y=W(109),G=W(25),X=Object.defineProperty;U.f=W(6)?Object.defineProperty:function(J,Z,Q){if(H(J),Z=G(Z,!0),H(Q),Y)try{return X(J,Z,Q)}catch(ee){}if('get'in Q||'set'in Q)throw TypeError('Accessors not supported!');return'value'in Q&&(J[Z]=Q.value),J}},function(M,U,W){'use strict';function H(Me,ze){if(!(Me instanceof ze))throw new TypeError('Cannot call a class as a function')}function G(){var Me=new Date().getTime(),ze='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(je){var qe=0|(Me+16*Math.random())%16;return Me=Math.floor(Me/16),('x'==je?qe:8|7&qe).toString(16)});return ze}function $(Me){return!isNaN(parseFloat(Me))&&isFinite(Me)}function ne(Me,ze,je,qe,Be){var De=qe||0,Ue=Be||ze.length,We=parseInt(De+(Ue-De)/2),He;return(je||(je=function(Ve,Ge){return Ve>Ge?1:Ve<Ge?-1:Ve==Ge?0:void 0}),0>=Ue-De)?We:(He=je(ze[We],Me),1==Ue-De?0<=He?We:We+1:0===He?We:-1===He?ne(Me,ze,je,We,Ue):ne(Me,ze,je,De,We))}function ae(Me,ze,je,qe,Be){var De=qe||0,Ue=Be||ze.length,We=parseInt(De+(Ue-De)/2),He;return(je||(je=function(Ve,Ge){return Ve>Ge?1:Ve<Ge?-1:Ve==Ge?0:void 0}),0>=Ue-De)?-1:(He=je(ze[We],Me),1==Ue-De?0===He?We:-1:0===He?We:-1===He?ae(Me,ze,je,We,Ue):ae(Me,ze,je,De,We))}function de(Me,ze){for(var je=Me.parentNode,qe=je.childNodes,De=-1,Ue=0,Be;Ue<qe.length&&(Be=qe[Ue],Be.nodeType===ze&&De++,Be!=Me);Ue++);return De}function he(Me,ze){return new Blob([Me],{type:ze})}function be(Me,ze){return'undefined'==typeof Me.querySelector?Me.getElementsByTagName(ze):Me.querySelectorAll(ze)}function _e(Me,ze,je){for(var qe=document.createTreeWalker(Me,je,null,!1),Be;Be=qe.nextNode();)ze(Be)}function we(Me,ze){if(ze(Me))return!0;if(Me=Me.firstChild,Me)do{var je=we(Me,ze);if(je)return!0;Me=Me.nextSibling}while(Me)}function Ce(Me){for(var ze=[Me];Me;Me=Me.parentNode)ze.unshift(Me);return ze}Object.defineProperty(U,'__esModule',{value:!0});var Re=function(){function Me(ze,je){for(var qe=0,Be;qe<je.length;qe++)Be=je[qe],Be.enumerable=Be.enumerable||!1,Be.configurable=!0,'value'in Be&&(Be.writable=!0),Object.defineProperty(ze,Be.key,Be)}return function(ze,je,qe){return je&&Me(ze.prototype,je),qe&&Me(ze,qe),ze}}();U.isElement=function(Me){return!!(Me&&1==Me.nodeType)},U.uuid=G,U.documentHeight=function(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)},U.isNumber=$,U.isFloat=function(Me){return $(Me)&&Math.floor(Me)!==Me},U.prefixed=function(Me){var ze=['Webkit','webkit','Moz','O','ms'],je=['-webkit-','-webkit-','-moz-','-o-','-ms-'],qe=Me[0].toUpperCase()+Me.slice(1),Be=ze.length;if('undefined'==typeof document||'undefined'!=typeof document.body.style[Me])return Me;for(var De=0;De<Be;De++)if('undefined'!=typeof document.body.style[ze[De]+qe])return je[De]+Me;return Me},U.defaults=function(Me){for(var ze=1,je=arguments.length,qe;ze<je;ze++)for(var Be in qe=arguments[ze],qe)void 0===Me[Be]&&(Me[Be]=qe[Be]);return Me},U.extend=function(Me){var ze=[].slice.call(arguments,1);return ze.forEach(function(je){je&&Object.getOwnPropertyNames(je).forEach(function(qe){Object.defineProperty(Me,qe,Object.getOwnPropertyDescriptor(je,qe))})}),Me},U.insert=function(Me,ze,je){var qe=ne(Me,ze,je);return ze.splice(qe,0,Me),qe},U.locationOf=ne,U.indexOfSorted=ae,U.bounds=function(Me){var ze=window.getComputedStyle(Me),Be=0,De=0;return['width','paddingRight','paddingLeft','marginRight','marginLeft','borderRightWidth','borderLeftWidth'].forEach(function(Ue){Be+=parseFloat(ze[Ue])||0}),['height','paddingTop','paddingBottom','marginTop','marginBottom','borderTopWidth','borderBottomWidth'].forEach(function(Ue){De+=parseFloat(ze[Ue])||0}),{height:De,width:Be}},U.borders=function(Me){var ze=window.getComputedStyle(Me),Be=0,De=0;return['paddingRight','paddingLeft','marginRight','marginLeft','borderRightWidth','borderLeftWidth'].forEach(function(Ue){Be+=parseFloat(ze[Ue])||0}),['paddingTop','paddingBottom','marginTop','marginBottom','borderTopWidth','borderBottomWidth'].forEach(function(Ue){De+=parseFloat(ze[Ue])||0}),{height:De,width:Be}},U.windowBounds=function(){var Me=window.innerWidth,ze=window.innerHeight;return{top:0,left:0,right:Me,bottom:ze,width:Me,height:ze}},U.cleanStringForXpath=function(Me){var ze=Me.match(/[^'"]+|['"]/g);return ze=ze.map(function(je){return'\''===je?'"\'"':'"'===je?'\'"\'':'\''+je+'\''}),'concat(\'\','+ze.join(',')+')'},U.indexOfNode=de,U.indexOfTextNode=function(Me){return de(Me,Ne)},U.indexOfElementNode=function(Me){return de(Me,Le)},U.isXml=function(Me){return-1<['xml','opf','ncx'].indexOf(Me)},U.createBlob=he,U.createBlobUrl=function(Me,ze){var je=window.URL||window.webkitURL||window.mozURL,Be=he(Me,ze),qe;return qe=je.createObjectURL(Be),qe},U.createBase64Url=function(Me,ze){var je,qe;if('string'==typeof Me)return je=btoa(Me),qe='data:'+ze+';base64,'+je,qe},U.type=function(Me){return Object.prototype.toString.call(Me).slice(8,-1)},U.parse=function(Me,ze,je){var qe,Be;return Be='undefined'==typeof DOMParser||je?W(129).DOMParser:DOMParser,65279===Me.charCodeAt(0)&&(Me=Me.slice(1)),qe=new Be().parseFromString(Me,ze),qe},U.qs=function(Me,ze){var je;if(!Me)throw new Error('No Element Provided');return'undefined'==typeof Me.querySelector?(je=Me.getElementsByTagName(ze),je.length)?je[0]:void 0:Me.querySelector(ze)},U.qsa=be,U.qsp=function(Me,ze,je){var qe,Be;if('undefined'!=typeof Me.querySelector){for(var De in ze+='[',je)ze+=De+'=\''+je[De]+'\'';return ze+=']',Me.querySelector(ze)}return(qe=Me.getElementsByTagName(ze),Be=Array.prototype.slice.call(qe,0).filter(function(Ue){for(var We in je)if(Ue.getAttribute(We)===je[We])return!0;return!1}),Be)?Be[0]:void 0},U.sprint=function(Me,ze){var je=Me.ownerDocument||Me;'undefined'==typeof je.createTreeWalker?we(Me,function(qe){qe&&3===qe.nodeType&&ze(qe)},!0):_e(Me,ze,NodeFilter.SHOW_TEXT)},U.treeWalker=_e,U.walk=we,U.blob2base64=function(Me){return new Promise(function(ze){var qe=new FileReader;qe.readAsDataURL(Me),qe.onloadend=function(){ze(qe.result)}})},U.defer=function(){var Me=this;this.resolve=null,this.reject=null,this.id=G(),this.promise=new Promise(function(ze,je){Me.resolve=ze,Me.reject=je}),Object.freeze(this)},U.querySelectorByType=function(Me,ze,je){var qe;if('undefined'!=typeof Me.querySelector&&(qe=Me.querySelector(ze+'[*|type="'+je+'"]')),!qe||0===qe.length){qe=be(Me,ze);for(var Be=0;Be<qe.length;Be++)if(qe[Be].getAttributeNS('http://www.idpf.org/2007/ops','type')===je||qe[Be].getAttribute('epub:type')===je)return qe[Be]}else return qe},U.findChildren=function(Me){for(var ze=[],je=Me.childNodes,qe=0,Be;qe<je.length;qe++)Be=je[qe],1===Be.nodeType&&ze.push(Be);return ze},U.parents=Ce;var Oe=U.requestAnimationFrame='undefined'!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),Le=1,Ne=3,Fe=U.RangeObject=function(){function Me(){H(this,Me),this.collapsed=!1,this.commonAncestorContainer=void 0,this.endContainer=void 0,this.endOffset=void 0,this.startContainer=void 0,this.startOffset=void 0}return Re(Me,[{key:'setStart',value:function(je,qe){this.startContainer=je,this.startOffset=qe,this.endContainer?this.commonAncestorContainer=this._commonAncestorContainer():this.collapse(!0),this._checkCollapsed()}},{key:'setEnd',value:function(je,qe){this.endContainer=je,this.endOffset=qe,this.startContainer?(this.collapsed=!1,this.commonAncestorContainer=this._commonAncestorContainer()):this.collapse(!1),this._checkCollapsed()}},{key:'collapse',value:function(je){this.collapsed=!0,je?(this.endContainer=this.startContainer,this.endOffset=this.startOffset,this.commonAncestorContainer=this.startContainer.parentNode):(this.startContainer=this.endContainer,this.startOffset=this.endOffset,this.commonAncestorContainer=this.endOffset.parentNode)}},{key:'selectNode',value:function(je){var qe=je.parentNode,Be=Array.prototype.indexOf.call(qe.childNodes,je);this.setStart(qe,Be),this.setEnd(qe,Be+1)}},{key:'selectNodeContents',value:function(je){var qe=je.childNodes[je.childNodes-1],Be=3===je.nodeType?je.textContent.length:parent.childNodes.length;this.setStart(je,0),this.setEnd(je,Be)}},{key:'_commonAncestorContainer',value:function(je,qe){var Be=Ce(je||this.startContainer),De=Ce(qe||this.endContainer);if(Be[0]==De[0])for(var Ue=0;Ue<Be.length;Ue++)if(Be[Ue]!=De[Ue])return Be[Ue-1]}},{key:'_checkCollapsed',value:function(){this.collapsed=this.startContainer===this.endContainer&&this.startOffset===this.endOffset}},{key:'toString',value:function(){}}]),Me}()},function(M,U,W){var H=W(32),Y=Math.min;M.exports=function(G){return 0<G?Y(H(G),9007199254740991):0}},function(M,U,W){var H=W(21);M.exports=function(Y){return Object(H(Y))}},function(M){var W={}.hasOwnProperty;M.exports=function(H,Y){return W.call(H,Y)}},function(M){M.exports=function(W){if('function'!=typeof W)throw TypeError(W+' is not a function!');return W}},function(M,U,W){var H=W(7),Y=W(31);M.exports=W(6)?function(G,X,$){return H.f(G,X,Y(1,$))}:function(G,X,$){return G[X]=$,G}},function(M,U,W){var H=W(2),Y=W(13),G=W(11),X=W(41)('src'),$='toString',J=Function[$],Z=(''+J).split($);W(26).inspectSource=function(Q){return J.call(Q)},(M.exports=function(Q,ee,te,ne){var ae='function'==typeof te;ae&&(G(te,'name')||Y(te,'name',ee));Q[ee]===te||(ae&&(G(te,X)||Y(te,X,Q[ee]?''+Q[ee]:Z.join(ee+''))),Q===H?Q[ee]=te:ne?Q[ee]?Q[ee]=te:Y(Q,ee,te):(delete Q[ee],Y(Q,ee,te)))})(Function.prototype,$,function(){return'function'==typeof this&&this[X]||J.call(this)})},function(M,U,W){var H=W(0),Y=W(3),G=W(21),X=/"/g,$=function(J,Z,Q,ee){var te=G(J)+'',ne='<'+Z;return''!==Q&&(ne+=' '+Q+'="'+(ee+'').replace(X,'"')+'"'),ne+'>'+te+'</'+Z+'>'};M.exports=function(J,Z){var Q={};Q[J]=Z($),H(H.P+H.F*Y(function(){var ee=''[J]('"');return ee!==ee.toLowerCase()||3<ee.split('"').length}),'String',Q)}},function(M,U,W){var H=W(50),Y=W(21);M.exports=function(G){return H(Y(G))}},function(M,U,W){var H=W(51),Y=W(31),G=W(16),X=W(25),$=W(11),J=W(109),Z=Object.getOwnPropertyDescriptor;U.f=W(6)?Z:function(ee,te){if(ee=G(ee),te=X(te,!0),J)try{return Z(ee,te)}catch(ne){}return $(ee,te)?Y(!H.f.call(ee,te),ee[te]):void 0}},function(M,U,W){var H=W(11),Y=W(10),G=W(87)('IE_PROTO'),X=Object.prototype;M.exports=Object.getPrototypeOf||function($){return $=Y($),H($,G)?$[G]:'function'==typeof $.constructor&&$ instanceof $.constructor?$.constructor.prototype:$ instanceof Object?X:null}},function(M,U,W){'use strict';function H(ee,te){if(!(ee instanceof te))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(U,'__esModule',{value:!0});var Y='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(ee){return typeof ee}:function(ee){return ee&&'function'==typeof Symbol&&ee.constructor===Symbol&&ee!==Symbol.prototype?'symbol':typeof ee},G=function(){function ee(te,ne){for(var ae=0,ie;ae<ne.length;ae++)ie=ne[ae],ie.enumerable=ie.enumerable||!1,ie.configurable=!0,'value'in ie&&(ie.writable=!0),Object.defineProperty(te,ie.key,ie)}return function(te,ne,ae){return ne&&ee(te.prototype,ne),ae&&ee(te,ae),te}}(),X=W(8),$=1,J=3,Q=function(){function ee(te,ne,ae){H(this,ee);var ie;if(this.str='',this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof ee))return new ee(te,ne,ae);if('string'==typeof ne?this.base=this.parseComponent(ne):'object'===('undefined'==typeof ne?'undefined':Y(ne))&&ne.steps&&(this.base=ne),ie=this.checkType(te),'string'===ie)return this.str=te,(0,X.extend)(this,this.parse(te));if('range'===ie)return(0,X.extend)(this,this.fromRange(te,this.base,ae));if('node'===ie)return(0,X.extend)(this,this.fromNode(te,this.base,ae));if('EpubCFI'===ie&&te.path)return te;if(!te)return this;throw new TypeError('not a valid argument for EpubCFI')}return G(ee,[{key:'checkType',value:function(ne){return this.isCfiString(ne)?'string':'object'===('undefined'==typeof ne?'undefined':Y(ne))&&('Range'===(0,X.type)(ne)||'undefined'!=typeof ne.startContainer)?'range':'object'===('undefined'==typeof ne?'undefined':Y(ne))&&'undefined'!=typeof ne.nodeType?'node':'object'===('undefined'==typeof ne?'undefined':Y(ne))&&ne instanceof ee&&'EpubCFI'}},{key:'parse',value:function(ne){var ae={spinePos:-1,range:!1,base:{},path:{},start:null,end:null},ie,oe,se;return'string'==typeof ne?(0===ne.indexOf('epubcfi(')&&')'===ne[ne.length-1]&&(ne=ne.slice(8,ne.length-1)),ie=this.getChapterComponent(ne),!ie)?{spinePos:-1}:(ae.base=this.parseComponent(ie),oe=this.getPathComponent(ne),ae.path=this.parseComponent(oe),se=this.getRange(ne),se&&(ae.range=!0,ae.start=this.parseComponent(se[0]),ae.end=this.parseComponent(se[1])),ae.spinePos=ae.base.steps[1].index,ae):{spinePos:-1}}},{key:'parseComponent',value:function(ne){var ae={steps:[],terminal:{offset:null,assertion:null}},ie=ne.split(':'),oe=ie[0].split('/'),se;return 1<ie.length&&(se=ie[1],ae.terminal=this.parseTerminal(se)),''===oe[0]&&oe.shift(),ae.steps=oe.map(function(le){return this.parseStep(le)}.bind(this)),ae}},{key:'parseStep',value:function(ne){var ae,ie,oe,se,le;if(se=ne.match(/\[(.*)\]/),se&&se[1]&&(le=se[1]),ie=parseInt(ne),!isNaN(ie))return 0==ie%2?(ae='element',oe=ie/2-1):(ae='text',oe=(ie-1)/2),{type:ae,index:oe,id:le||null}}},{key:'parseTerminal',value:function(ne){var oe=ne.match(/\[(.*)\]/),ae,ie;return oe&&oe[1]?(ae=parseInt(ne.split('[')[0]),ie=oe[1]):ae=parseInt(ne),(0,X.isNumber)(ae)||(ae=null),{offset:ae,assertion:ie}}},{key:'getChapterComponent',value:function(ne){var ae=ne.split('!');return ae[0]}},{key:'getPathComponent',value:function(ne){var ae=ne.split('!');if(ae[1]){var ie=ae[1].split(',');return ie[0]}}},{key:'getRange',value:function(ne){var ae=ne.split(',');return 3===ae.length&&[ae[1],ae[2]]}},{key:'getCharecterOffsetComponent',value:function(ne){var ae=ne.split(':');return ae[1]||''}},{key:'joinSteps',value:function(ne){return ne?ne.map(function(ae){var ie='';return'element'===ae.type&&(ie+=2*(ae.index+1)),'text'===ae.type&&(ie+=1+2*ae.index),ae.id&&(ie+='['+ae.id+']'),ie}).join('/'):''}},{key:'segmentString',value:function(ne){var te='/';return te+=this.joinSteps(ne.steps),ne.terminal&&null!=ne.terminal.offset&&(te+=':'+ne.terminal.offset),ne.terminal&&null!=ne.terminal.assertion&&(te+='['+ne.terminal.assertion+']'),te}},{key:'toString',value:function(){var ne='epubcfi(';return ne+=this.segmentString(this.base),ne+='!',ne+=this.segmentString(this.path),this.range&&this.start&&(ne+=',',ne+=this.segmentString(this.start)),this.range&&this.end&&(ne+=',',ne+=this.segmentString(this.end)),ne+=')',ne}},{key:'compare',value:function(ne,ae){var ie,oe,se,le,ce,ce;if('string'==typeof ne&&(ne=new ee(ne)),'string'==typeof ae&&(ae=new ee(ae)),ne.spinePos>ae.spinePos)return 1;if(ne.spinePos<ae.spinePos)return-1;ne.range?(ie=ne.path.steps.concat(ne.start.steps),se=ne.start.terminal):(ie=ne.path.steps,se=ne.path.terminal),ae.range?(oe=ae.path.steps.concat(ae.start.steps),le=ae.start.terminal):(oe=ae.path.steps,le=ae.path.terminal);for(var me=0;me<ie.length;me++){if(!ie[me])return-1;if(!oe[me])return 1;if(ie[me].index>oe[me].index)return 1;if(ie[me].index<oe[me].index)return-1}return ie.length<oe.length?1:se.offset>le.offset?1:se.offset<le.offset?-1:0}},{key:'step',value:function(ne){var ae=ne.nodeType===J?'text':'element';return{id:ne.id,tagName:ne.tagName,type:ae,index:this.position(ne)}}},{key:'filteredStep',value:function(ne,ae){var ie=this.filter(ne,ae),oe;if(ie)return oe=ie.nodeType===J?'text':'element',{id:ie.id,tagName:ie.tagName,type:oe,index:this.filteredPosition(ie,ae)}}},{key:'pathTo',value:function(ne,ae,ie){for(var oe={steps:[],terminal:{offset:null,assertion:null}},se=ne,le;se&&se.parentNode&&se.parentNode.nodeType!=9;)le=ie?this.filteredStep(se,ie):this.step(se),le&&oe.steps.unshift(le),se=se.parentNode;return null!=ae&&0<=ae&&(oe.terminal.offset=ae,'text'!=oe.steps[oe.steps.length-1].type&&oe.steps.push({type:'text',index:0})),oe}},{key:'equalStep',value:function(ne,ae){return ne&&ae&&ne.index===ae.index&&ne.id===ae.id&&ne.type===ae.type}},{key:'fromRange',value:function(ne,ae,ie){var oe={range:!1,base:{},path:{},start:null,end:null},se=ne.startContainer,le=ne.endContainer,de=ne.startOffset,ue=ne.endOffset,ce=!1;if(ie&&(ce=null!=se.ownerDocument.querySelector('.'+ie)),'string'==typeof ae?(oe.base=this.parseComponent(ae),oe.spinePos=oe.base.steps[1].index):'object'===('undefined'==typeof ae?'undefined':Y(ae))&&(oe.base=ae),ne.collapsed)ce&&(de=this.patchOffset(se,de,ie)),oe.path=this.pathTo(se,de,ie);else{oe.range=!0,ce&&(de=this.patchOffset(se,de,ie)),oe.start=this.pathTo(se,de,ie),ce&&(ue=this.patchOffset(le,ue,ie)),oe.end=this.pathTo(le,ue,ie),oe.path={steps:[],terminal:null};var pe=oe.start.steps.length,he;for(he=0;he<pe&&this.equalStep(oe.start.steps[he],oe.end.steps[he]);he++)he===pe-1?oe.start.terminal===oe.end.terminal&&(oe.path.steps.push(oe.start.steps[he]),oe.range=!1):oe.path.steps.push(oe.start.steps[he]);oe.start.steps=oe.start.steps.slice(oe.path.steps.length),oe.end.steps=oe.end.steps.slice(oe.path.steps.length)}return oe}},{key:'fromNode',value:function(ne,ae,ie){var oe={range:!1,base:{},path:{},start:null,end:null};return'string'==typeof ae?(oe.base=this.parseComponent(ae),oe.spinePos=oe.base.steps[1].index):'object'===('undefined'==typeof ae?'undefined':Y(ae))&&(oe.base=ae),oe.path=this.pathTo(ne,null,ie),oe}},{key:'filter',value:function(ne,ae){var ue=!1,ie,oe,se,le,de;return ne.nodeType===J?(ue=!0,se=ne.parentNode,ie=ne.parentNode.classList.contains(ae)):(ue=!1,ie=ne.classList.contains(ae)),ie&&ue?(le=se.previousSibling,de=se.nextSibling,le&&le.nodeType===J?oe=le:de&&de.nodeType===J&&(oe=de),oe?oe:ne):ie&&!ue?!1:ne}},{key:'patchOffset',value:function(ne,ae,ie){if(ne.nodeType!=J)throw new Error('Anchor must be a text node');var oe=ne,se=ae;for(ne.parentNode.classList.contains(ie)&&(oe=ne.parentNode);oe.previousSibling;){if(oe.previousSibling.nodeType!==$)se+=oe.previousSibling.textContent.length;else if(oe.previousSibling.classList.contains(ie))se+=oe.previousSibling.textContent.length;else break;oe=oe.previousSibling}return se}},{key:'normalizedMap',value:function(ne,ae,ie){var oe={},se=-1,de=ne.length,le,ue,ce;for(le=0;le<de;le++)ue=ne[le].nodeType,ue===$&&ne[le].classList.contains(ie)&&(ue=J),0<le&&ue===J&&ce===J?oe[le]=se:ae===ue&&(++se,oe[le]=se),ce=ue;return oe}},{key:'position',value:function(ne){var ae,ie;return ne.nodeType===$?(ae=ne.parentNode.children,!ae&&(ae=(0,X.findChildren)(ne.parentNode)),ie=Array.prototype.indexOf.call(ae,ne)):(ae=this.textNodes(ne.parentNode),ie=ae.indexOf(ne)),ie}},{key:'filteredPosition',value:function(ne,ae){var ie,oe,se;return ne.nodeType===$?(ie=ne.parentNode.children,se=this.normalizedMap(ie,$,ae)):(ie=ne.parentNode.childNodes,ne.parentNode.classList.contains(ae)&&(ne=ne.parentNode,ie=ne.parentNode.childNodes),se=this.normalizedMap(ie,J,ae)),oe=Array.prototype.indexOf.call(ie,ne),se[oe]}},{key:'stepsToXpath',value:function(ne){var ae=['.','*'];return ne.forEach(function(ie){var oe=ie.index+1;ie.id?ae.push('*[position()='+oe+' and @id=\''+ie.id+'\']'):'text'===ie.type?ae.push('text()['+oe+']'):ae.push('*['+oe+']')}),ae.join('/')}},{key:'stepsToQuerySelector',value:function(ne){var ae=['html'];return ne.forEach(function(ie){var oe=ie.index+1;ie.id?ae.push('#'+ie.id):'text'===ie.type||ae.push('*:nth-child('+oe+')')}),ae.join('>')}},{key:'textNodes',value:function(ne,ae){return Array.prototype.slice.call(ne.childNodes).filter(function(ie){return ie.nodeType===J||ae&&ie.classList.contains(ae)})}},{key:'walkToNode',value:function(ne,ae,ie){var oe=ae||document,se=oe.documentElement,ue=ne.length,le,de,ce;for(ce=0;ce<ue&&(de=ne[ce],'element'===de.type?de.id?se=oe.getElementById(de.id):(le=se.children||(0,X.findChildren)(se),se=le[de.index]):'text'===de.type&&(se=this.textNodes(se,ie)[de.index]),!!se);ce++);return se}},{key:'findNode',value:function(ne,ae,ie){var oe=ae||document,se,le;return ie||'undefined'==typeof oe.evaluate?ie?se=this.walkToNode(ne,oe,ie):se=this.walkToNode(ne,oe):(le=this.stepsToXpath(ne),se=oe.evaluate(le,oe,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),se}},{key:'fixMiss',value:function(ne,ae,ie,oe){var se=this.findNode(ne.slice(0,-1),ie,oe),le=se.childNodes,de=this.normalizedMap(le,J,oe),pe=ne[ne.length-1].index,ue,ce;for(var he in de){if(!de.hasOwnProperty(he))return;if(de[he]===pe)if(ue=le[he],ce=ue.textContent.length,ae>ce)ae-=ce;else{se=ue.nodeType===$?ue.childNodes[0]:ue;break}}return{container:se,offset:ae}}},{key:'toRange',value:function(ne,ae){var ie=ne||document,ce=this,fe=!!ae&&null!=ie.querySelector('.'+ae),oe,se,le,de,ue,pe,he,ge;if(oe='undefined'==typeof ie.createRange?new X.RangeObject:ie.createRange(),ce.range?(se=ce.start,pe=ce.path.steps.concat(se.steps),de=this.findNode(pe,ie,fe?ae:null),le=ce.end,he=ce.path.steps.concat(le.steps),ue=this.findNode(he,ie,fe?ae:null)):(se=ce.path,pe=ce.path.steps,de=this.findNode(ce.path.steps,ie,fe?ae:null)),de)try{null==se.terminal.offset?oe.setStart(de,0):oe.setStart(de,se.terminal.offset)}catch(me){ge=this.fixMiss(pe,se.terminal.offset,ie,fe?ae:null),oe.setStart(ge.container,ge.offset)}else return console.log('NO START'),null;if(ue)try{null==le.terminal.offset?oe.setEnd(ue,0):oe.setEnd(ue,le.terminal.offset)}catch(me){ge=this.fixMiss(he,ce.end.terminal.offset,ie,fe?ae:null),oe.setEnd(ge.container,ge.offset)}return oe}},{key:'isCfiString',value:function(ne){return'string'==typeof ne&&0===ne.indexOf('epubcfi(')&&')'===ne[ne.length-1]}},{key:'generateChapterComponent',value:function(ne,ae,ie){var oe=parseInt(ae),le='/'+2*(ne+1)+'/';return le+=2*(oe+1),ie&&(le+='['+ie+']'),le}},{key:'collapse',value:function(ne){this.range&&(this.range=!1,ne?(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))}}]),ee}();U.default=Q,M.exports=U['default']},function(M){var W={}.toString;M.exports=function(H){return W.call(H).slice(8,-1)}},function(M){M.exports=function(W){if(W==void 0)throw TypeError('Can\'t call method on '+W);return W}},function(M,U,W){var H=W(3);M.exports=function(Y,G){return!!Y&&H(function(){G?Y.call(null,function(){},1):Y.call(null)})}},function(M,U,W){var H=W(27),Y=W(50),G=W(10),X=W(9),$=W(155);M.exports=function(J,Z){var Q=1==J,ne=4==J,ae=6==J,oe=Z||$;return function(se,le,de){for(var ue=G(se),ce=Y(ue),pe=H(le,de,3),he=X(ce.length),fe=0,ge=Q?oe(se,he):2==J?oe(se,0):void 0,me,ye;he>fe;fe++)if((5==J||ae||fe in ce)&&(me=ce[fe],ye=pe(me,fe,ue),J))if(Q)ge[fe]=ye;else if(ye)switch(J){case 3:return!0;case 5:return me;case 6:return fe;case 2:ge.push(me);}else if(ne)return!1;return ae?-1:3==J||ne?ne:ge}}},function(M,U,W){var H=W(0),Y=W(26),G=W(3);M.exports=function(X,$){var J=(Y.Object||{})[X]||Object[X],Z={};Z[X]=$(J),H(H.S+H.F*G(function(){J(1)}),'Object',Z)}},function(M,U,W){var H=W(4);M.exports=function(Y,G){if(!H(Y))return Y;var X,$;if(G&&'function'==typeof(X=Y.toString)&&!H($=X.call(Y)))return $;if('function'==typeof(X=Y.valueOf)&&!H($=X.call(Y)))return $;if(!G&&'function'==typeof(X=Y.toString)&&!H($=X.call(Y)))return $;throw TypeError('Can\'t convert object to primitive value')}},function(M){var W=M.exports={version:'2.4.0'};'number'==typeof __e&&(__e=W)},function(M,U,W){var H=W(12);M.exports=function(Y,G,X){return(H(Y),void 0===G)?Y:1===X?function($){return Y.call(G,$)}:2===X?function($,J){return Y.call(G,$,J)}:3===X?function($,J,Z){return Y.call(G,$,J,Z)}:function(){return Y.apply(G,arguments)}}},function(M,U,W){var H=W(125),Y=W(0),G=W(63)('metadata'),X=G.store||(G.store=new(W(128))),$=function(ae,ie,oe){var se=X.get(ae);if(!se){if(!oe)return;X.set(ae,se=new H)}var le=se.get(ie);if(!le){if(!oe)return;se.set(ie,le=new H)}return le};M.exports={store:X,map:$,has:function(ae,ie,oe){var se=$(ie,oe,!1);return se!==void 0&&se.has(ae)},get:function(ae,ie,oe){var se=$(ie,oe,!1);return se===void 0?void 0:se.get(ae)},set:function(ae,ie,oe,se){$(oe,se,!0).set(ae,ie)},keys:function(ae,ie){var oe=$(ae,ie,!1),se=[];return oe&&oe.forEach(function(le,de){se.push(de)}),se},key:function(ae){return ae===void 0||'symbol'==typeof ae?ae:ae+''},exp:function(ae){Y(Y.S,'Reflect',ae)}}},function(M,U,W){'use strict';if(W(6)){var H=W(34),Y=W(2),G=W(3),X=W(0),$=W(64),J=W(94),Z=W(27),Q=W(33),ee=W(31),te=W(13),ne=W(38),ae=W(32),ie=W(9),oe=W(40),se=W(25),le=W(11),de=W(122),ue=W(49),ce=W(4),pe=W(10),he=W(79),fe=W(35),ge=W(18),me=W(36).f,ye=W(96),ve=W(41),be=W(5),xe=W(23),ke=W(54),_e=W(88),we=W(97),Se=W(46),Ee=W(60),Pe=W(39),Te=W(72),Ce=W(102),Re=W(7),Oe=W(17),Le=Re.f,Ne=Oe.f,Ae=Y.RangeError,Ie=Y.TypeError,Fe=Y.Uint8Array,Me='ArrayBuffer',ze='Shared'+Me,je='BYTES_PER_ELEMENT',qe='prototype',Be=Array[qe],De=J.ArrayBuffer,Ue=J.DataView,We=xe(0),He=xe(2),Ye=xe(3),Ve=xe(4),Ge=xe(5),Xe=xe(6),Ke=ke(!0),$e=ke(!1),Je=we.values,Ze=we.keys,Qe=we.entries,et=Be.lastIndexOf,tt=Be.reduce,nt=Be.reduceRight,ot=Be.join,st=Be.sort,dt=Be.slice,ut=Be.toString,ct=Be.toLocaleString,pt=be('iterator'),ht=be('toStringTag'),ft=ve('typed_constructor'),mt=ve('def_constructor'),yt=$.CONSTR,vt=$.TYPED,bt=$.VIEW,xt='Wrong length!',kt=xe(1,function(Wt,Ht){return Tt(_e(Wt,Wt[mt]),Ht)}),_t=G(function(){return 1===new Fe(new Uint16Array([1]).buffer)[0]}),wt=!!Fe&&!!Fe[qe].set&&G(function(){new Fe(1).set({})}),St=function(Wt,Ht){if(Wt===void 0)throw Ie(xt);var Vt=ie(Wt);if(Ht&&!de(+Wt,Vt))throw Ae(xt);return Vt},Et=function(Wt,Ht){var Yt=ae(Wt);if(0>Yt||Yt%Ht)throw Ae('Wrong offset!');return Yt},Pt=function(Wt){if(ce(Wt)&&vt in Wt)return Wt;throw Ie(Wt+' is not a typed array!')},Tt=function(Wt,Ht){if(!(ce(Wt)&&ft in Wt))throw Ie('It is not a typed array constructor!');return new Wt(Ht)},Ct=function(Wt,Ht){return Rt(_e(Wt,Wt[mt]),Ht)},Rt=function(Wt,Ht){for(var Yt=0,Vt=Ht.length,Gt=Tt(Wt,Vt);Vt>Yt;)Gt[Yt]=Ht[Yt++];return Gt},Ot=function(Wt,Ht,Yt){Le(Wt,Ht,{get:function(){return this._d[Yt]}})},Lt=function(Ht){var Yt=pe(Ht),Vt=arguments.length,Gt=1<Vt?arguments[1]:void 0,Xt=Gt!==void 0,Kt=ye(Yt),$t,Jt,Zt,Qt,en,tn;if(Kt!=void 0&&!he(Kt)){for(tn=Kt.call(Yt),Zt=[],$t=0;!(en=tn.next()).done;$t++)Zt.push(en.value);Yt=Zt}for(Xt&&2<Vt&&(Gt=Z(Gt,arguments[2],2)),$t=0,Jt=ie(Yt.length),Qt=Tt(this,Jt);Jt>$t;$t++)Qt[$t]=Xt?Gt(Yt[$t],$t):Yt[$t];return Qt},Nt=function(){for(var Ht=0,Yt=arguments.length,Vt=Tt(this,Yt);Yt>Ht;)Vt[Ht]=arguments[Ht++];return Vt},At=!!Fe&&G(function(){ct.call(new Fe(1))}),It=function(){return ct.apply(At?dt.call(Pt(this)):Pt(this),arguments)},Ft={copyWithin:function(Ht,Yt){return Ce.call(Pt(this),Ht,Yt,2<arguments.length?arguments[2]:void 0)},every:function(Ht){return Ve(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},fill:function(){return Te.apply(Pt(this),arguments)},filter:function(Ht){return Ct(this,He(Pt(this),Ht,1<arguments.length?arguments[1]:void 0))},find:function(Ht){return Ge(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},findIndex:function(Ht){return Xe(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},forEach:function(Ht){We(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},indexOf:function(Ht){return $e(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},includes:function(Ht){return Ke(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},join:function(){return ot.apply(Pt(this),arguments)},lastIndexOf:function(){return et.apply(Pt(this),arguments)},map:function(Ht){return kt(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},reduce:function(){return tt.apply(Pt(this),arguments)},reduceRight:function(){return nt.apply(Pt(this),arguments)},reverse:function(){for(var Ht=this,Yt=Pt(Ht).length,Vt=Math.floor(Yt/2),Gt=0,Xt;Gt<Vt;)Xt=Ht[Gt],Ht[Gt++]=Ht[--Yt],Ht[Yt]=Xt;return Ht},some:function(Ht){return Ye(Pt(this),Ht,1<arguments.length?arguments[1]:void 0)},sort:function(Ht){return st.call(Pt(this),Ht)},subarray:function(Ht,Yt){var Vt=Pt(this),Gt=Vt.length,Xt=oe(Ht,Gt);return new(_e(Vt,Vt[mt]))(Vt.buffer,Vt.byteOffset+Xt*Vt.BYTES_PER_ELEMENT,ie((Yt===void 0?Gt:oe(Yt,Gt))-Xt))}},Mt=function(Ht,Yt){return Ct(this,dt.call(Pt(this),Ht,Yt))},zt=function(Ht){Pt(this);var Yt=Et(arguments[1],1),Vt=this.length,Gt=pe(Ht),Xt=ie(Gt.length),Kt=0;if(Xt+Yt>Vt)throw Ae(xt);for(;Kt<Xt;)this[Yt+Kt]=Gt[Kt++]},jt={entries:function(){return Qe.call(Pt(this))},keys:function(){return Ze.call(Pt(this))},values:function(){return Je.call(Pt(this))}},qt=function(Wt,Ht){return ce(Wt)&&Wt[vt]&&'symbol'!=typeof Ht&&Ht in Wt&&+Ht+''==Ht+''},Bt=function(Ht,Yt){return qt(Ht,Yt=se(Yt,!0))?ee(2,Ht[Yt]):Ne(Ht,Yt)},Dt=function(Ht,Yt,Vt){return qt(Ht,Yt=se(Yt,!0))&&ce(Vt)&&le(Vt,'value')&&!le(Vt,'get')&&!le(Vt,'set')&&!Vt.configurable&&(!le(Vt,'writable')||Vt.writable)&&(!le(Vt,'enumerable')||Vt.enumerable)?(Ht[Yt]=Vt.value,Ht):Le(Ht,Yt,Vt)};yt||(Oe.f=Bt,Re.f=Dt),X(X.S+X.F*!yt,'Object',{getOwnPropertyDescriptor:Bt,defineProperty:Dt}),G(function(){ut.call({})})&&(ut=ct=function(){return ot.call(this)});var Ut=ne({},Ft);ne(Ut,jt),te(Ut,pt,jt.values),ne(Ut,{slice:Mt,set:zt,constructor:function(){},toString:ut,toLocaleString:It}),Ot(Ut,'buffer','b'),Ot(Ut,'byteOffset','o'),Ot(Ut,'byteLength','l'),Ot(Ut,'length','e'),Le(Ut,ht,{get:function(){return this[vt]}}),M.exports=function(Wt,Ht,Yt,Vt){Vt=!!Vt;var Gt=Wt+(Vt?'Clamped':'')+'Array',Jt=Y[Gt],Zt=Jt||{},Qt=Jt&&ge(Jt),en=!Jt||!$.ABV,tn={},nn=Jt&&Jt[qe],an=function(pn,hn){var gn=pn._d;return gn.v['get'+Wt](hn*Ht+gn.o,_t)},rn=function(pn,hn,gn){var mn=pn._d;Vt&&(gn=0>(gn=Math.round(gn))?0:255<gn?255:255&gn),mn.v['set'+Wt](hn*Ht+mn.o,gn,_t)},sn=function(pn,hn){Le(pn,hn,{get:function(){return an(this,hn)},set:function(gn){return rn(this,hn,gn)},enumerable:!0})};en?(Jt=Yt(function(pn,hn,gn,mn){Q(pn,Jt,Gt,'_d');var vn=0,bn=0,kn,_n,wn,Sn;if(!ce(hn))wn=St(hn,!0),_n=wn*Ht,kn=new De(_n);else if(hn instanceof De||(Sn=ue(hn))==Me||Sn==ze){kn=hn,bn=Et(gn,Ht);var En=hn.byteLength;if(void 0===mn){if(En%Ht)throw Ae(xt);if(_n=En-bn,0>_n)throw Ae(xt)}else if(_n=ie(mn)*Ht,_n+bn>En)throw Ae(xt);wn=_n/Ht}else return vt in hn?Rt(Jt,hn):Lt.call(Jt,hn);for(te(pn,'_d',{b:kn,o:bn,l:_n,e:wn,v:new Ue(kn)});vn<wn;)sn(pn,vn++)}),nn=Jt[qe]=fe(Ut),te(nn,'constructor',Jt)):!Ee(function(pn){new Jt(null),new Jt(pn)},!0)&&(Jt=Yt(function(pn,hn,gn,mn){Q(pn,Jt,Gt);var vn;return ce(hn)?hn instanceof De||(vn=ue(hn))==Me||vn==ze?void 0===mn?void 0===gn?new Zt(hn):new Zt(hn,Et(gn,Ht)):new Zt(hn,Et(gn,Ht),mn):vt in hn?Rt(Jt,hn):Lt.call(Jt,hn):new Zt(St(hn,'Uint8Array'!=Gt))}),We(Qt===Function.prototype?me(Zt):me(Zt).concat(me(Qt)),function(pn){pn in Jt||te(Jt,pn,Zt[pn])}),Jt[qe]=nn,!H&&(nn.constructor=Jt));var ln=nn[pt],dn=!!ln&&('values'==ln.name||ln.name==void 0),cn=jt.values;te(Jt,ft,!0),te(nn,vt,Gt),te(nn,bt,!0),te(nn,mt,Jt),(Vt?new Jt(1)[ht]!=Gt:!(ht in nn))&&Le(nn,ht,{get:function(){return Gt}}),tn[Gt]=Jt,X(X.G+X.W+X.F*(Jt!=Zt),tn),X(X.S,Gt,{BYTES_PER_ELEMENT:Ht,from:Lt,of:Nt}),je in nn||te(nn,je,Ht),X(X.P,Gt,Ft),Pe(Gt),X(X.P+X.F*wt,Gt,{set:zt}),X(X.P+X.F*!dn,Gt,jt),X(X.P+X.F*(nn.toString!=ut),Gt,{toString:ut}),X(X.P+X.F*G(function(){new Jt(1).slice()}),Gt,{slice:Mt}),X(X.P+X.F*(G(function(){return[1,2].toLocaleString()!=new Jt([1,2]).toLocaleString()})||!G(function(){nn.toLocaleString.call([1,2])})),Gt,{toLocaleString:It}),Se[Gt]=dn?ln:cn,H||dn||te(nn,pt,cn)}}else M.exports=function(){}},function(M,U,W){var H=W(41)('meta'),Y=W(4),G=W(11),X=W(7).f,$=0,J=Object.isExtensible||function(){return!0},Z=!W(3)(function(){return J(Object.preventExtensions({}))}),Q=function(ie){X(ie,H,{value:{i:'O'+ ++$,w:{}}})},ae=M.exports={KEY:H,NEED:!1,fastKey:function(ie,oe){if(!Y(ie))return'symbol'==typeof ie?ie:('string'==typeof ie?'S':'P')+ie;if(!G(ie,H)){if(!J(ie))return'F';if(!oe)return'E';Q(ie)}return ie[H].i},getWeak:function(ie,oe){if(!G(ie,H)){if(!J(ie))return!0;if(!oe)return!1;Q(ie)}return ie[H].w},onFreeze:function(ie){return Z&&ae.NEED&&J(ie)&&!G(ie,H)&&Q(ie),ie}}},function(M){M.exports=function(W,H){return{enumerable:!(1&W),configurable:!(2&W),writable:!(4&W),value:H}}},function(M){var W=Math.ceil,H=Math.floor;M.exports=function(Y){return isNaN(Y=+Y)?0:(0<Y?H:W)(Y)}},function(M){M.exports=function(W,H,Y,G){if(!(W instanceof H)||G!==void 0&&G in W)throw TypeError(Y+': incorrect invocation!');return W}},function(M){M.exports=!1},function(M,U,W){var H=W(1),Y=W(115),G=W(75),X=W(87)('IE_PROTO'),$=function(){},J='prototype',Z=function(){var Q=W(74)('iframe'),ee=G.length,te='<',ne='>',ae;for(Q.style.display='none',W(77).appendChild(Q),Q.src='javascript:',ae=Q.contentWindow.document,ae.open(),ae.write(te+'script'+ne+'document.F=Object'+te+'/script'+ne),ae.close(),Z=ae.F;ee--;)delete Z[J][G[ee]];return Z()};M.exports=Object.create||function(ee,te){var ne;return null===ee?ne=Z():($[J]=H(ee),ne=new $,$[J]=null,ne[X]=ee),void 0===te?ne:Y(ne,te)}},function(M,U,W){var H=W(117),Y=W(75).concat('length','prototype');U.f=Object.getOwnPropertyNames||function(X){return H(X,Y)}},function(M,U,W){var H=W(117),Y=W(75);M.exports=Object.keys||function(X){return H(X,Y)}},function(M,U,W){var H=W(14);M.exports=function(Y,G,X){for(var $ in G)H(Y,$,G[$],X);return Y}},function(M,U,W){'use strict';var H=W(2),Y=W(7),G=W(6),X=W(5)('species');M.exports=function($){var J=H[$];G&&J&&!J[X]&&Y.f(J,X,{configurable:!0,get:function(){return this}})}},function(M,U,W){var H=W(32),Y=Math.max,G=Math.min;M.exports=function(X,$){return X=H(X),0>X?Y(X+$,0):G(X,$)}},function(M){var W=0,H=Math.random();M.exports=function(Y){return'Symbol('.concat(Y===void 0?'':Y,')_',(++W+H).toString(36))}},function(M,U,W){'use strict';var H=W(334),Y=W(343),G=Function.prototype.apply,X=Function.prototype.call,$=Object.create,J=Object.defineProperty,Z=Object.defineProperties,Q=Object.prototype.hasOwnProperty,ee={configurable:!0,enumerable:!1,writable:!0},te,ne,ae,ie,oe,se,le;te=function(de,ue){var ce;return Y(ue),Q.call(this,'__ee__')?ce=this.__ee__:(ce=ee.value=$(null),J(this,'__ee__',ee),ee.value=null),ce[de]?'object'==typeof ce[de]?ce[de].push(ue):ce[de]=[ce[de],ue]:ce[de]=ue,this},ne=function(de,ue){var ce,pe;return Y(ue),pe=this,te.call(this,de,ce=function(){ae.call(pe,de,ce),G.call(ue,this,arguments)}),ce.__eeOnceListener__=ue,this},ae=function(de,ue){var ce,pe,he,fe;if(Y(ue),!Q.call(this,'__ee__'))return this;if(ce=this.__ee__,!ce[de])return this;if(pe=ce[de],'object'==typeof pe)for(fe=0;he=pe[fe];++fe)(he===ue||he.__eeOnceListener__===ue)&&(2===pe.length?ce[de]=pe[fe?0:1]:pe.splice(fe,1));else(pe===ue||pe.__eeOnceListener__===ue)&&delete ce[de];return this},ie=function(de){var ue,ce,pe,he,fe;if(Q.call(this,'__ee__')&&(he=this.__ee__[de],!!he))if('object'==typeof he){for(ce=arguments.length,fe=Array(ce-1),ue=1;ue<ce;++ue)fe[ue-1]=arguments[ue];for(he=he.slice(),ue=0;pe=he[ue];++ue)G.call(pe,this,fe)}else switch(arguments.length){case 1:X.call(he,this);break;case 2:X.call(he,this,arguments[1]);break;case 3:X.call(he,this,arguments[1],arguments[2]);break;default:for(ce=arguments.length,fe=Array(ce-1),ue=1;ue<ce;++ue)fe[ue-1]=arguments[ue];G.call(he,this,fe);}},oe={on:te,once:ne,off:ae,emit:ie},se={on:H(te),once:H(ne),off:H(ae),emit:H(ie)},le=Z({},se),M.exports=U=function(de){return null==de?$(le):Z(Object(de),se)},U.methods=oe},function(M,U,W){'use strict';function Y(Z,Q){if(!(Z instanceof Q))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(U,'__esModule',{value:!0});var G=function(){function Z(Q,ee){for(var te=0,ne;te<ee.length;te++)ne=ee[te],ne.enumerable=ne.enumerable||!1,ne.configurable=!0,'value'in ne&&(ne.writable=!0),Object.defineProperty(Q,ne.key,ne)}return function(Q,ee,te){return ee&&Z(Q.prototype,ee),te&&Z(Q,te),Q}}(),X=W(65),$=function(Z){return Z&&Z.__esModule?Z:{default:Z}}(X),J=function(){function Z(Q){Y(this,Z);var ee,te;ee=Q.indexOf('://'),-1<ee&&(Q=new URL(Q).pathname),te=this.parse(Q),this.path=Q,this.directory=this.isDirectory(Q)?Q:te.dir+'/',this.filename=te.base,this.extension=te.ext.slice(1)}return G(Z,[{key:'parse',value:function(ee){return $.default.parse(ee)}},{key:'isAbsolute',value:function(ee){return $.default.isAbsolute(ee||this.path)}},{key:'isDirectory',value:function(ee){return'/'===ee.charAt(ee.length-1)}},{key:'resolve',value:function(ee){return $.default.resolve(this.directory,ee)}},{key:'relative',value:function(ee){return $.default.relative(this.directory,ee)}},{key:'splitPath',value:function(ee){return this.splitPathRe.exec(ee).slice(1)}},{key:'toString',value:function(){return this.path}}]),Z}();U.default=J,M.exports=U['default']},function(M,U,W){var H=W(5)('unscopables'),Y=Array.prototype;Y[H]==void 0&&W(13)(Y,H,{}),M.exports=function(G){Y[H][G]=!0}},function(M,U,W){var H=W(27),Y=W(111),G=W(79),X=W(1),$=W(9),J=W(96),Z={},Q={},U=M.exports=function(ee,te,ne,ae,ie){var oe=ie?function(){return ee}:J(ee),se=H(ne,ae,te?2:1),le=0,de,ue,ce,pe;if('function'!=typeof oe)throw TypeError(ee+' is not iterable!');if(G(oe)){for(de=$(ee.length);de>le;le++)if(pe=te?se(X(ue=ee[le])[0],ue[1]):se(ee[le]),pe===Z||pe===Q)return pe;}else for(ce=oe.call(ee);!(ue=ce.next()).done;)if(pe=Y(ce,se,ue.value,te),pe===Z||pe===Q)return pe};U.BREAK=Z,U.RETURN=Q},function(M){M.exports={}},function(M,U,W){var H=W(7).f,Y=W(11),G=W(5)('toStringTag');M.exports=function(X,$,J){X&&!Y(X=J?X:X.prototype,G)&&H(X,G,{configurable:!0,value:$})}},function(M,U,W){var H=W(0),Y=W(21),G=W(3),X=W(92),$='['+X+']',J='\u200B\x85',Z=RegExp('^'+$+$+'*'),Q=RegExp($+$+'*$'),ee=function(ne,ae,ie){var oe={},se=G(function(){return!!X[ne]()||J[ne]()!=J}),le=oe[ne]=se?ae(te):X[ne];ie&&(oe[ie]=le),H(H.P+H.F*se,'String',oe)},te=ee.trim=function(ne,ae){return ne=Y(ne)+'',1&ae&&(ne=ne.replace(Z,'')),2&ae&&(ne=ne.replace(Q,'')),ne};M.exports=ee},function(M,U,W){var H=W(20),Y=W(5)('toStringTag'),G='Arguments'==H(function(){return arguments}()),X=function($,J){try{return $[J]}catch(Z){}};M.exports=function($){var J,Z,Q;return $===void 0?'Undefined':null===$?'Null':'string'==typeof(Z=X(J=Object($),Y))?Z:G?H(J):'Object'==(Q=H(J))&&'function'==typeof J.callee?'Arguments':Q}},function(M,U,W){var H=W(20);M.exports=Object('z').propertyIsEnumerable(0)?Object:function(Y){return'String'==H(Y)?Y.split(''):Object(Y)}},function(M,U){U.f={}.propertyIsEnumerable},function(M,U,W){'use strict';function H(ae){return ae&&ae.__esModule?ae:{default:ae}}Object.defineProperty(U,'__esModule',{value:!0}),U.replaceBase=function(ae,ie){var oe,se;ae&&(se=(0,Z.qs)(ae,'head'),oe=(0,Z.qs)(se,'base'),!oe&&(oe=ae.createElement('base'),se.insertBefore(oe,se.firstChild)),oe.setAttribute('href',ie.url))},U.replaceCanonical=function(ae,ie){var oe,se,le=ie.url;ae&&(oe=(0,Z.qs)(ae,'head'),se=(0,Z.qs)(oe,'link[rel=\'canonical\']'),se?se.setAttribute('href',le):(se=ae.createElement('link'),se.setAttribute('rel','canonical'),se.setAttribute('href',le),oe.appendChild(se)))},U.replaceMeta=function(ae,ie){var oe,se,le=ie.idref;ae&&(oe=(0,Z.qs)(ae,'head'),se=(0,Z.qs)(oe,'link[property=\'dc:identifier\']'),se?se.setAttribute('content',le):(se=ae.createElement('meta'),se.setAttribute('property','dc:identifier'),se.setAttribute('content',le),oe.appendChild(se)))},U.replaceLinks=function(ae,ie){var oe=ae.querySelectorAll('a[href]');if(oe.length)for(var se=(0,Z.qs)(ae.ownerDocument,'base'),le=se?se.getAttribute('href'):void 0,de=function(ce){var pe=ce.getAttribute('href');if(0!==pe.indexOf('mailto:')){var he=-1<pe.indexOf('://'),fe=new ee.default(pe,le);he?ce.setAttribute('target','_blank'):ce.onclick=function(){return fe&&fe.hash?ie(fe.Path.path+fe.hash):fe?ie(fe.Path.path):ie(pe),!1}}}.bind(this),ue=0;ue<oe.length;ue++)de(oe[ue])},U.substitute=function(ae,ie,oe){return ie.forEach(function(se,le){se&&oe[le]&&(ae=ae.replace(new RegExp(se,'g'),oe[le]))}),ae};var Z=W(8),Q=W(53),ee=H(Q),te=W(43),ne=H(te)},function(M,U,W){'use strict';function H(ee){return ee&&ee.__esModule?ee:{default:ee}}function Y(ee,te){if(!(ee instanceof te))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(U,'__esModule',{value:!0});var G=function(){function ee(te,ne){for(var ae=0,ie;ae<ne.length;ae++)ie=ne[ae],ie.enumerable=ie.enumerable||!1,ie.configurable=!0,'value'in ie&&(ie.writable=!0),Object.defineProperty(te,ie.key,ie)}return function(te,ne,ae){return ne&&ee(te.prototype,ne),ae&&ee(te,ae),te}}(),X=W(43),$=H(X),J=W(65),Z=H(J),Q=function(){function ee(te,ne){Y(this,ee);var ae=-1<te.indexOf('://'),ie=te,oe;if(this.Url=void 0,this.href=te,this.protocol='',this.origin='',this.hash='',this.hash='',this.search='',this.base=ne,!ae&&!1!==ne&&'string'!=typeof ne&&window&&window.location&&(this.base=window.location.href),ae||this.base)try{this.Url=this.base?new URL(te,this.base):new URL(te),this.href=this.Url.href,this.protocol=this.Url.protocol,this.origin=this.Url.origin,this.hash=this.Url.hash,this.search=this.Url.search,ie=this.Url.pathname}catch(se){this.Url=void 0,this.base&&(oe=new $.default(this.base),ie=oe.resolve(ie))}this.Path=new $.default(ie),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}return G(ee,[{key:'path',value:function(){return this.Path}},{key:'resolve',value:function(ne){var ae=-1<ne.indexOf('://'),ie;return ae?ne:(ie=Z.default.resolve(this.directory,ne),this.origin+ie)}},{key:'relative',value:function(ne){return Z.default.relative(ne,this.directory)}},{key:'toString',value:function(){return this.href}}]),ee}();U.default=Q,M.exports=U['default']},function(M,U,W){var H=W(16),Y=W(9),G=W(40);M.exports=function(X){return function($,J,Z){var Q=H($),ee=Y(Q.length),te=G(Z,ee),ne;if(X&&J!=J){for(;ee>te;)if(ne=Q[te++],ne!=ne)return!0;}else for(;ee>te;te++)if((X||te in Q)&&Q[te]===J)return X||te||0;return!X&&-1}}},function(M,U,W){'use strict';var H=W(2),Y=W(0),G=W(14),X=W(38),$=W(30),J=W(45),Z=W(33),Q=W(4),ee=W(3),te=W(60),ne=W(47),ae=W(78);M.exports=function(ie,oe,se,le,de,ue){var ce=H[ie],pe=ce,he=de?'set':'add',fe=pe&&pe.prototype,ge={},me=function(_e){var we=fe[_e];G(fe,_e,'delete'==_e?function(Se){return ue&&!Q(Se)?!1:we.call(this,0===Se?0:Se)}:'has'==_e?function(Ee){return ue&&!Q(Ee)?!1:we.call(this,0===Ee?0:Ee)}:'get'==_e?function(Ee){return ue&&!Q(Ee)?void 0:we.call(this,0===Ee?0:Ee)}:'add'==_e?function(Ee){return we.call(this,0===Ee?0:Ee),this}:function(Ee,Pe){return we.call(this,0===Ee?0:Ee,Pe),this})};if('function'!=typeof pe||!(ue||fe.forEach&&!ee(function(){new pe().entries().next()})))pe=le.getConstructor(oe,ie,de,he),X(pe.prototype,se),$.NEED=!0;else{var ye=new pe,ve=ye[he](ue?{}:-0,1)!=ye,be=ee(function(){ye.has(1)}),xe=te(function(_e){new pe(_e)}),ke=!ue&&ee(function(){for(var _e=new pe,we=5;we--;)_e[he](we,we);return!_e.has(-0)});xe||(pe=oe(function(_e,we){Z(_e,pe,ie);var Se=ae(new ce,_e,pe);return void 0!=we&&J(we,de,Se[he],Se),Se}),pe.prototype=fe,fe.constructor=pe),(be||ke)&&(me('delete'),me('has'),de&&me('get')),(ke||ve)&&me(he),ue&&fe.clear&&delete fe.clear}return ne(pe,ie),ge[ie]=pe,Y(Y.G+Y.W+Y.F*(pe!=ce),ge),ue||le.setStrong(pe,ie,de),pe}},function(M,U,W){'use strict';var H=W(13),Y=W(14),G=W(3),X=W(21),$=W(5);M.exports=function(J,Z,Q){var ee=$(J),te=Q(X,ee,''[J]),ne=te[0],ae=te[1];G(function(){var ie={};return ie[ee]=function(){return 7},7!=''[J](ie)})&&(Y(String.prototype,J,ne),H(RegExp.prototype,ee,2==Z?function(ie,oe){return ae.call(ie,this,oe)}:function(ie){return ae.call(ie,this)}))}},function(M,U,W){'use strict';var H=W(1);M.exports=function(){var Y=H(this),G='';return Y.global&&(G+='g'),Y.ignoreCase&&(G+='i'),Y.multiline&&(G+='m'),Y.unicode&&(G+='u'),Y.sticky&&(G+='y'),G}},function(M){M.exports=function(W,H,Y){var G=Y===void 0;switch(H.length){case 0:return G?W():W.call(Y);case 1:return G?W(H[0]):W.call(Y,H[0]);case 2:return G?W(H[0],H[1]):W.call(Y,H[0],H[1]);case 3:return G?W(H[0],H[1],H[2]):W.call(Y,H[0],H[1],H[2]);case 4:return G?W(H[0],H[1],H[2],H[3]):W.call(Y,H[0],H[1],H[2],H[3]);}return W.apply(Y,H)}},function(M,U,W){var H=W(4),Y=W(20),G=W(5)('match');M.exports=function(X){var $;return H(X)&&(($=X[G])===void 0?'RegExp'==Y(X):!!$)}},function(M,U,W){var H=W(5)('iterator'),Y=!1;try{var G=[7][H]();G['return']=function(){Y=!0},Array.from(G,function(){throw 2})}catch(X){}M.exports=function(X,$){if(!$&&!Y)return!1;var J=!1;try{var Z=[7],Q=Z[H]();Q.next=function(){return{done:J=!0}},Z[H]=function(){return Q},X(Z)}catch(ee){}return J}},function(M,U,W){M.exports=W(34)||!W(3)(function(){var H=Math.random();__defineSetter__.call(null,H,function(){}),delete W(2)[H]})},function(M,U){U.f=Object.getOwnPropertySymbols},function(M,U,W){var H=W(2),Y='__core-js_shared__',G=H[Y]||(H[Y]={});M.exports=function(X){return G[X]||(G[X]={})}},function(M,U,W){for(var H=W(2),Y=W(13),G=W(41),X=G('typed_array'),$=G('view'),J=!!(H.ArrayBuffer&&H.DataView),Z=J,Q=0,ne='Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split(','),te;Q<9;)(te=H[ne[Q++]])?(Y(te.prototype,X,!0),Y(te.prototype,$,!0)):Z=!1;M.exports={ABV:J,CONSTR:Z,TYPED:X,VIEW:$}},function(M){'use strict';function H(J){if('string'!=typeof J)throw new TypeError('Path must be a string. Received '+J)}function Y(J,Z){for(var Q='',ee=-1,te=0,ae=0,ne;ae<=J.length;++ae){if(ae<J.length)ne=J.charCodeAt(ae);else if(47===ne)break;else ne=47;if(47===ne){if(ee==ae-1||1==te);else if(ee!=ae-1&&2==te){if(2>Q.length||46!==Q.charCodeAt(Q.length-1)||46!==Q.charCodeAt(Q.length-2))if(2<Q.length){for(var ie=Q.length-1,oe=ie;0<=oe&&47!==Q.charCodeAt(oe);--oe);if(oe!=ie){Q=-1==oe?'':Q.slice(0,oe),ee=ae,te=0;continue}}else if(2===Q.length||1===Q.length){Q='',ee=ae,te=0;continue}Z&&(0<Q.length?Q+='/..':Q='..')}else 0<Q.length?Q+='/'+J.slice(ee+1,ae):Q=J.slice(ee+1,ae);ee=ae,te=0}else 46===ne&&-1!=te?++te:te=-1}return Q}function G(J,Z){var Q=Z.dir||Z.root,ee=Z.base||(Z.name||'')+(Z.ext||'');return Q?Q===Z.root?Q+ee:Q+J+ee:ee}if(!X)var X={cwd:function(){return'/'}};var $={resolve:function(){for(var Z='',Q=!1,te=arguments.length-1,ee;-1<=te&&!Q;te--){var ne;(0<=te?ne=arguments[te]:(void 0==ee&&(ee=X.cwd()),ne=ee),H(ne),0!==ne.length)&&(Z=ne+'/'+Z,Q=47===ne.charCodeAt(0))}return Z=Y(Z,!Q),Q?0<Z.length?'/'+Z:'/':0<Z.length?Z:'.'},normalize:function(Z){if(H(Z),0===Z.length)return'.';var Q=47===Z.charCodeAt(0),ee=47===Z.charCodeAt(Z.length-1);return Z=Y(Z,!Q),0!==Z.length||Q||(Z='.'),0<Z.length&&ee&&(Z+='/'),Q?'/'+Z:Z},isAbsolute:function(Z){return H(Z),0<Z.length&&47===Z.charCodeAt(0)},join:function(){if(0===arguments.length)return'.';for(var Q=0,Z,ee;Q<arguments.length;++Q)ee=arguments[Q],H(ee),0<ee.length&&(void 0==Z?Z=ee:Z+='/'+ee);return void 0===Z?'.':$.normalize(Z)},relative:function(Z,Q){if(H(Z),H(Q),Z===Q)return'';if(Z=$.resolve(Z),Q=$.resolve(Q),Z===Q)return'';for(var ee=1;ee<Z.length&&47===Z.charCodeAt(ee);++ee);for(var te=Z.length,ne=te-ee,ae=1;ae<Q.length&&47===Q.charCodeAt(ae);++ae);for(var ie=Q.length,oe=ie-ae,se=ne<oe?ne:oe,le=-1,de=0;de<=se;++de){if(de==se){if(oe>se){if(47===Q.charCodeAt(ae+de))return Q.slice(ae+de+1);if(0==de)return Q.slice(ae+de)}else ne>se&&(47===Z.charCodeAt(ee+de)?le=de:0==de&&(le=0));break}var ue=Z.charCodeAt(ee+de),ce=Q.charCodeAt(ae+de);if(ue!==ce)break;else 47===ue&&(le=de)}var pe='';for(de=ee+le+1;de<=te;++de)(de===te||47===Z.charCodeAt(de))&&(pe+=0===pe.length?'..':'/..');return 0<pe.length?pe+Q.slice(ae+le):(ae+=le,47===Q.charCodeAt(ae)&&++ae,Q.slice(ae))},_makeLong:function(Z){return Z},dirname:function(Z){if(H(Z),0===Z.length)return'.';for(var Q=Z.charCodeAt(0),ee=47===Q,te=-1,ne=!0,ae=Z.length-1;1<=ae;--ae)if(Q=Z.charCodeAt(ae),47!==Q)ne=!1;else if(!ne){te=ae;break}return-1===te?ee?'/':'.':ee&&1===te?'//':Z.slice(0,te)},basename:function(Z,Q){if(Q!==void 0&&'string'!=typeof Q)throw new TypeError('"ext" argument must be a string');H(Z);var ee=0,te=-1,ne=!0,ae;if(void 0!==Q&&0<Q.length&&Q.length<=Z.length){if(Q.length===Z.length&&Q===Z)return'';var ie=Q.length-1,oe=-1;for(ae=Z.length-1;0<=ae;--ae){var se=Z.charCodeAt(ae);if(47!==se)-1==oe&&(ne=!1,oe=ae+1),0<=ie&&(se===Q.charCodeAt(ie)?-1==--ie&&(te=ae):(ie=-1,te=oe));else if(!ne){ee=ae+1;break}}return ee===te?te=oe:-1===te&&(te=Z.length),Z.slice(ee