You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__AddOrEdit.b441...

1492 lines
1.7 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[191,5,6,7,8,10],{"+NIl":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.defineMode("stex",(function(t,e){function n(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function a(t,e){t.f=e}function s(t,e){var i;if(t.match(/^\\[a-zA-Z@]+/)){var s=t.current().slice(1);return n(e,i=new(i=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(e,c),i.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return a(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return a(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return a(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return a(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(e))?(i.closeBracket(u),a(e,c),"bracket"):"error":"{"==u||"["==u?(n(e,i=new(i=o.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(i=function(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(i.argument=t.current()),i.styleIdentifier())}function l(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return a(e,s),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function c(t,e){var n=t.peek();return"{"==n||"["==n?(r(e).openBracket(n),t.eat(n),a(e,s),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(a(e,s),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),s(t,e))}return o.importmodule=i("importmodule","tag",["string","builtin"]),o.documentclass=i("documentclass","tag",["","atom"]),o.usepackage=i("usepackage","tag",["atom"]),o.begin=i("begin","tag",["atom"]),o.end=i("end","tag",["atom"]),o.label=i("label","tag",["atom"]),o.ref=i("ref","tag",["atom"]),o.eqref=i("eqref","tag",["atom"]),o.cite=i("cite","tag",["atom"]),o.bibitem=i("bibitem","tag",["atom"]),o.Bibitem=i("Bibitem","tag",["atom"]),o.RBibitem=i("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:s}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=s,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"+ua5":
/*!************************************************!*\
!*** ./src/components/monaco-editor/index.css ***!
\************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},"/cxE":
/*!*****************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/errors.js ***!
\*****************************************************************/
/*! exports provided: ErrorHandler, errorHandler, onUnexpectedError, onUnexpectedExternalError, transformErrorForSerialization, isPromiseCanceledError, canceled, illegalArgument, illegalState */
/*! exports used: canceled, illegalArgument, illegalState, isPromiseCanceledError, onUnexpectedError, onUnexpectedExternalError, transformErrorForSerialization */function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u}));var r=new(function(){function t(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout((function(){if(t.stack)throw new Error(t.message+"\n\n"+t.stack);throw t}),0)}}return t.prototype.emit=function(t){this.listeners.forEach((function(e){e(t)}))},t.prototype.onUnexpectedError=function(t){this.unexpectedErrorHandler(t),this.emit(t)},t.prototype.onUnexpectedExternalError=function(t){this.unexpectedErrorHandler(t)},t}());function i(t){s(t)||r.onUnexpectedError(t)}function o(t){s(t)||r.onUnexpectedExternalError(t)}function a(t){return t instanceof Error?{$isError:!0,name:t.name,message:t.message,stack:t.stacktrace||t.stack}:t}function s(t){return t instanceof Error&&"Canceled"===t.name&&"Canceled"===t.message}function l(){var t=new Error("Canceled");return t.name=t.message,t}function c(t){return t?new Error("Illegal argument: "+t):new Error("Illegal argument")}function u(t){return t?new Error("Illegal state: "+t):new Error("Illegal state")}},"19Vz":
/*!**************************************************************!*\
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=t.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=t.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function r(t){o(t)&&n(t)}function i(t){var r=t.getWrapperElement(),i=o(t);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(t):e(t)}function o(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=t.Init;if(a&&!l)o.on("blur",r),o.on("change",i),o.on("swapDoc",i),t.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(t){setTimeout((function(){var r=!1,i=t.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==t.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(t):e(t)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",r),o.off("change",i),o.off("swapDoc",i),t.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),e(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&r(o)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1T2W":
/*!*******************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/CodePanel/index.less?modules ***!
\*******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=t(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(n,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n,r,i=t.next();if(">"==i||"/"==i&&t.eat(">"))return e.tokenize=h,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(e.tokenize=(n=i,(r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=h;break}n.next()}return t}}function p(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;m(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",S):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",S(t,0,n)):(a="error",y)}function b(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",w):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,n)):(a="error",x)}function w(t,e,n){return"endTag"!=t?(a="error",w):(m(n),v)}function x(t,e,n){return a="error",w(t,0,n)}function S(t,e,n){if("word"==t)return a="attribute",E;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return a="error",S}function E(t,e,n){return"equals"==t?C:(l.allowMissing||(a="error"),S(t,0,n))}function C(t,e,n){return"string"==t?k:"word"==t&&l.allowUnquoted?(a="string",S):(a="error",S(t,0,n))}function k(t,e,n){return"string"==t?k:S(t,0,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[i.tagName];if(!a||!a.hasOwnProperty(o[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==C&&(t.state=S)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1uat":
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha512.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var t=0;t<80;t++)c[t]=s()}();var u=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,w=a.low,x=s.high,S=s.low,E=u.high,C=u.low,k=h.high,_=h.low,T=d.high,O=d.low,A=f,L=p,D=m,I=g,R=v,M=y,N=b,j=w,P=x,F=S,B=E,U=C,H=k,z=_,G=T,V=O,W=0;W<80;W++){var K,q,X=c[W];if(W<16)q=X.high=0|t[e+2*W],K=X.low=0|t[e+2*W+1];else{var Y=c[W-15],$=Y.high,J=Y.low,Z=($>>>1|J<<31)^($>>>8|J<<24)^$>>>7,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^(J>>>7|$<<25),tt=c[W-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=c[W-7],at=ot.high,st=ot.low,lt=c[W-16],ct=lt.high,ut=lt.low;q=(q=(q=Z+at+((K=Q+st)>>>0<Q>>>0?1:0))+rt+((K+=it)>>>0<it>>>0?1:0))+ct+((K+=ut)>>>0<ut>>>0?1:0),X.high=q,X.low=K}var ht,dt=P&B^~P&H,ft=F&U^~F&z,pt=A&D^A&R^D&R,mt=L&I^L&M^I&M,gt=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),vt=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),yt=(P>>>14|F<<18)^(P>>>18|F<<14)^(P<<23|F>>>9),bt=(F>>>14|P<<18)^(F>>>18|P<<14)^(F<<23|P>>>9),wt=l[W],xt=wt.high,St=wt.low,Et=G+yt+((ht=V+bt)>>>0<V>>>0?1:0),Ct=vt+mt;G=H,V=z,H=B,z=U,B=P,U=F,P=N+(Et=(Et=(Et=Et+dt+((ht+=ft)>>>0<ft>>>0?1:0))+xt+((ht+=St)>>>0<St>>>0?1:0))+q+((ht+=K)>>>0<K>>>0?1:0))+((F=j+ht|0)>>>0<j>>>0?1:0)|0,N=R,j=M,R=D,M=I,D=A,I=L,A=Et+(gt+pt+(Ct>>>0<vt>>>0?1:0))+((L=ht+Ct|0)>>>0<ht>>>0?1:0)|0}p=r.low=p+L,r.high=f+A+(p>>>0<L>>>0?1:0),g=i.low=g+I,i.high=m+D+(g>>>0<I>>>0?1:0),y=o.low=y+M,o.high=v+R+(y>>>0<M>>>0?1:0),w=a.low=w+j,a.high=b+N+(w>>>0<j>>>0?1:0),S=s.low=S+F,s.high=x+P+(S>>>0<F>>>0?1:0),C=u.low=C+U,u.high=E+B+(C>>>0<U>>>0?1:0),_=h.low=_+z,h.high=k+H+(_>>>0<z>>>0?1:0),O=d.low=O+V,d.high=T+G+(O>>>0<V>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(u),t.HmacSHA512=e._createHmacHelper(u)}(),r.SHA512)},"24hK":
/*!*********************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js ***!
\*********************************************************************/
/*! exports provided: LinkedList */
/*! exports used: LinkedList */function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(/*! ./iterator.js */"JYp7"),i=function(){function t(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}return t.Undefined=new t(void 0),t}(),o=function(){function t(){this._first=i.Undefined,this._last=i.Undefined,this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return this._first===i.Undefined},t.prototype.clear=function(){this._first=i.Undefined,this._last=i.Undefined,this._size=0},t.prototype.unshift=function(t){return this._insert(t,!1)},t.prototype.push=function(t){return this._insert(t,!0)},t.prototype._insert=function(t,e){var n=this,r=new i(t);if(this._first===i.Undefined)this._first=r,this._last=r;else if(e){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var a=this._first;this._first=r,r.next=a,a.prev=r}this._size+=1;var s=!1;return function(){s||(s=!0,n._remove(r))}},t.prototype.shift=function(){if(this._first!==i.Undefined){var t=this._first.element;return this._remove(this._first),t}},t.prototype.pop=function(){if(this._last!==i.Undefined){var t=this._last.element;return this._remove(this._last),t}},t.prototype._remove=function(t){if(t.prev!==i.Undefined&&t.next!==i.Undefined){var e=t.prev;e.next=t.next,t.next.prev=e}else t.prev===i.Undefined&&t.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):t.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):t.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1},t.prototype.iterator=function(){var t,e=this._first;return{next:function(){return e===i.Undefined?r.c:(t?t.value=e.element:t={done:!1,value:e.element},e=e.next,t)}}},t.prototype.toArray=function(){for(var t=[],e=this._first;e!==i.Undefined;e=e.next)t.push(e.element);return t},t}()},"3y9D":
/*!****************************************!*\
!*** ./node_modules/crypto-js/sha1.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l,c,u;t.exports=(u=n(/*! ./core */"Ib8C"),i=(r=u).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|t[e+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var h=(r<<5|r>>>27)+s+l[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},4:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){},"5hvy":
/*!****************************************!*\
!*** ./node_modules/crypto-js/sha3.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.x64.Word,s=e.algo,l=[],c=[],u=[];!function(){for(var t=1,e=0,n=0;n<24;n++){l[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)c[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,h)}}();var h=[];!function(){for(var t=0;t<25;t++)h[t]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=t[e+2*i],a=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(O=n[d+5*m]).high,p^=O.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],b=y.high,w=y.low;for(f=v.high^(b<<1|w>>>31),p=v.low^(w<<1|b>>>31),m=0;m<5;m++)(O=n[d+5*m]).high^=f,O.low^=p}for(var x=1;x<25;x++){var S=(O=n[x]).high,E=O.low,C=l[x];C<32?(f=S<<C|E>>>32-C,p=E<<C|S>>>32-C):(f=E<<C-32|S>>>64-C,p=S<<C-32|E>>>64-C);var k=h[c[x]];k.high=f,k.low=p}var _=h[0],T=n[0];for(_.high=T.high,_.low=T.low,d=0;d<5;d++)for(m=0;m<5;m++){var O=n[x=d+5*m],A=h[x],L=h[(d+1)%5+5*m],D=h[(d+2)%5+5*m];O.high=A.high^~L.high&D.high,O.low=A.low^~L.low&D.low}O=n[0];var I=u[s];O.high^=I.high,O.low^=I.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var h=a[u],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},"5nXd":
/*!************************************************!*\
!*** ./node_modules/store/src/store-engine.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ./util */"MFOe"),i=r.slice,o=r.pluck,a=r.each,s=r.bind,l=r.create,c=r.isList,u=r.isFunction,h=r.isObject;t.exports={createStore:f};var d={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return f(this.storage,this.plugins,t)}};function f(t,e,n){n||(n=""),t&&!c(t)&&(t=[t]),e&&!c(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=l({_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(t,n){e[n]=t})),n.apply(r,e)}var s=[o].concat(e);return t.apply(r,s)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(c(t))a(t,(function(t){e._addPlugin(t)}));else if(!o(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!u(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!u(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)}))}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},d,{plugins:[]});return p.raw={},a(p,(function(t,e){u(t)&&(p.raw[e]=s(p,t))})),a(t,(function(t){p._addStorage(t)})),a(e,(function(t){p._addPlugin(t)})),p}},"6+eU":
/*!************************************************************!*\
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var r=n("wx14"),i=n("rePB"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(t){var e,n="".concat(t.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(t.page),(e={},Object(i.a)(e,"".concat(n,"-active"),t.active),Object(i.a)(e,t.className,!!t.className),Object(i.a)(e,"".concat(n,"-disabled"),!t.page),e));return h.a.createElement("li",{title:t.showTitle?t.page:null,className:r,onClick:function(){t.onClick(t.page)},onKeyPress:function(e){t.onKeyPress(e,t.onClick,t.page)},tabIndex:"0"},t.itemRender(t.page,"page",h.a.createElement("a",{rel:"nofollow"},t.page)))},m=13,g=38,v=40,y=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(){var t;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).state={goInputText:""},t.buildOptionText=function(e){return"".concat(e," ").concat(t.props.locale.items_per_page)},t.changeSize=function(e){t.props.changeSize(Number(e))},t.handleChange=function(e){t.setState({goInputText:e.target.value})},t.handleBlur=function(e){var n=t.props,r=n.goButton,i=n.quickGo,o=n.rootPrefixCls,a=t.state.goInputText;r||""===a||e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(o,"-prev"))>=0||e.relatedTarget.className.indexOf("".concat(o,"-next"))>=0)||(t.setState({goInputText:""}),i(t.getValidValue()))},t.go=function(e){""!==t.state.goInputText&&(e.keyCode!==m&&"click"!==e.type||(t.setState({goInputText:""}),t.props.quickGo(t.getValidValue())))},t}return Object(s.a)(n,[{key:"getValidValue",value:function(){var t=this.state,e=t.goInputText,n=t.current;return!e||isNaN(e)?n:Number(e)}},{key:"getPageSizeOptions",value:function(){var t=this.props,e=t.pageSize,n=t.pageSizeOptions;return n.some((function(t){return t.toString()===e.toString()}))?n:n.concat([e.toString()]).sort((function(t,e){return(isNaN(Number(t))?0:Number(t))-(isNaN(Number(e))?0:Number(e))}))}},{key:"render",value:function(){var t=this,e=this.props,n=e.pageSize,r=e.locale,i=e.rootPrefixCls,o=e.changeSize,a=e.quickGo,s=e.goButton,l=e.selectComponentClass,c=e.buildOptionText,u=e.selectPrefixCls,d=e.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!o&&!a)return null;var b=this.getPageSizeOptions();if(o&&m){var w=b.map((function(e,n){return h.a.createElement(m.Option,{key:n,value:e.toString()},(c||t.buildOptionText)(e))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(t){return t.parentNode}},w)}return a&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,w=n("N2Kk");function x(){}function S(t,e,n){var r=void 0===t?e.pageSize:t;return Math.floor((n.total-1)/r)+1}var E=function(t){Object(l.a)(n,t);var e=Object(c.a)(n);function n(t){var r;Object(a.a)(this,n),(r=e.call(this,t)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(S(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(t,e){var n=r.props.prefixCls,i=t||h.a.createElement("button",{type:"button","aria-label":e,className:"".concat(n,"-item-link")});return"function"==typeof t&&(i=h.a.createElement(t,Object(o.a)({},r.props))),i},r.savePaginationNode=function(t){r.paginationNode=t},r.isValid=function(t){return"number"==typeof(e=t)&&isFinite(e)&&Math.floor(e)===e&&t!==r.state.current;var e},r.shouldDisplayQuickJumper=function(){var t=r.props,e=t.showQuickJumper,n=t.pageSize;return!(t.total<=n)&&e},r.handleKeyDown=function(t){t.keyCode!==g&&t.keyCode!==v||t.preventDefault()},r.handleKeyUp=function(t){var e=r.getValidValue(t);e!==r.state.currentInputValue&&r.setState({currentInputValue:e}),t.keyCode===m?r.handleChange(e):t.keyCode===g?r.handleChange(e-1):t.keyCode===v&&r.handleChange(e+1)},r.changePageSize=function(t){var e=r.state.current,n=S(t,r.state,r.props);e=e>n?n:e,0===n&&(e=r.state.current),"number"==typeof t&&("pageSize"in r.props||r.setState({pageSize:t}),"current"in r.props||r.setState({current:e,currentInputValue:e})),r.props.onShowSizeChange(e,t),"onChange"in r.props&&r.props.onChange&&r.props.onChange(e,t)},r.handleChange=function(t){var e=r.props.disabled,n=t;if(r.isValid(n)&&!e){var i=S(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var o=r.state.pageSize;return r.props.onChange(n,o),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<S(void 0,r.state,r.props)},r.runIfEnter=function(t,e){if("Enter"===t.key||13===t.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];e.apply(void 0,r)}},r.runIfEnterPrev=function(t){r.runIfEnter(t,r.prev)},r.runIfEnterNext=function(t){r.runIfEnter(t,r.next)},r.runIfEnterJumpPrev=function(t){r.runIfEnter(t,r.jumpPrev)},r.runIfEnterJumpNext=function(t){r.runIfEnter(t,r.jumpNext)},r.handleGoTO=function(t){t.keyCode!==m&&"click"!==t.type||r.handleChange(r.state.currentInputValue)};var i=t.onChange!==x;"current"in t&&!i&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=t.defaultCurrent;"current"in t&&(s=t.current);var l=t.defaultPageSize;return"pageSize"in t&&(l=t.pageSize),s=Math.min(s,S(l,void 0,t)),r.state={current:s,currentInputValue:s,pageSize:l},r}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(t,e){var n=this.props.prefixCls;if(e.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(e.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(t){var e=t.target.value,n=S(void 0,this.state,this.props),r=this.state.currentInputValue;return""===e?e:isNaN(Number(e))?r:e>=n?n:Number(e)}},{key:"getShowSizeChanger",value:function(){var t=this.props,e=t.showSizeChanger,n=t.total,r=t.totalBoundaryShowSizeChanger;return void 0!==e?e:n>r}},{key:"renderPrev",value:function(t){var e=this.props,n=e.prevIcon,r=(0,e.itemRender)(t,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(t){var e=this.props,n=e.nextIcon,r=(0,e.itemRender)(t,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var t=this,e=this.props,n=e.prefixCls,o=e.className,a=e.style,s=e.disabled,l=e.hideOnSinglePage,c=e.total,d=e.locale,m=e.showQuickJumper,g=e.showLessItems,v=e.showTitle,y=e.showTotal,w=e.simple,x=e.itemRender,E=e.showPrevNextJumpers,C=e.jumpPrevIcon,k=e.jumpNextIcon,_=e.selectComponentClass,T=e.selectPrefixCls,O=e.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=D)return null;var R=S(void 0,this.state,this.props),M=[],N=null,j=null,P=null,F=null,B=null,U=m&&m.goButton,H=g?1:2,z=L-1>0?L-1:0,G=L+1<R?L+1:R,V=Object.keys(this.props).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t.props[n]),e}),{});if(w)return U&&(B="boolean"==typeof U?h.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},d.jump_to_confirm):h.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},U),B=h.a.createElement("li",{title:v?"".concat(d.jump_to).concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},B)),h.a.createElement("ul",Object(r.a)({className:f()(n,"".concat(n,"-simple"),Object(i.a)({},"".concat(n,"-disabled"),s),o),style:a,ref:this.savePaginationNode},V),h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(z)),h.a.createElement("li",{title:v?"".concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},h.a.createElement("input",{type:"text",value:I,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(n,"-slash")},"/"),R),h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(G)),B);if(R<=3+2*H){var W={locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:x};R||M.push(h.a.createElement(p,Object(r.a)({},W,{key:"noPager",page:R,className:"".concat(n,"-disabled")})));for(var K=1;K<=R;K+=1){var q=L===K;M.push(h.a.createElement(p,Object(r.a)({},W,{key:K,page:K,active:q})))}}else{var X=g?d.prev_3:d.prev_5,Y=g?d.next_3:d.next_5;E&&(N=h.a.createElement("li",{title:v?X:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(n,"-jump-prev"),Object(i.a)({},"".concat(n,"-jump-prev-custom-icon"),!!C))},x(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(C,"prev page"))),j=h.a.createElement("li",{title:v?Y:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(n,"-jump-next"),Object(i.a)({},"".concat(n,"-jump-next-custom-icon"),!!k))},x(this.getJumpNextPage(),"jump-next",this.getItemIcon(k,"next page")))),F=h.a.createElement(p,{locale:d,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:R,page:R,active:!1,showTitle:v,itemRender:x}),P=h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:x});var $=Math.max(1,L-H),J=Math.min(L+H,R);L-1<=H&&(J=1+2*H),R-L<=H&&($=R-2*H);for(var Z=$;Z<=J;Z+=1){var Q=L===Z;M.push(h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:Q,showTitle:v,itemRender:x}))}L-1>=2*H&&3!==L&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(N)),R-L>=2*H&&L!==R-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(j)),1!==$&&M.unshift(P),J!==R&&M.push(F)}var tt=null;y&&(tt=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var et=!this.hasPrev()||!R,nt=!this.hasNext()||!R;return h.a.createElement("ul",Object(r.a)({className:f()(n,o,Object(i.a)({},"".concat(n,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},V),tt,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:et?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),et)),"aria-disabled":et},this.renderPrev(z)),M,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:nt?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),nt)),"aria-disabled":nt},this.renderNext(G)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:_,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n={};if("current"in t&&(n.current=t.current,t.current!==e.current&&(n.currentInputValue=n.current)),"pageSize"in t&&t.pageSize!==e.pageSize){var r=e.current,i=S(t.pageSize,e,t);r=r>i?i:r,"current"in t||(n.current=r,n.currentInputValue=r),n.pageSize=t.pageSize}return n}}]),n}(h.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:x,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:x,locale:w.a,style:{},itemRender:function(t,e,n){return n},totalBoundaryShowSizeChanger:50};var C=E},"6RRn":
/*!*******************************************!*\
!*** ./node_modules/rc-table/es/index.js ***!
\*******************************************/
/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */
/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(t,e,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(e,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var o=n(/*! ./utils/legacyUtil */"hW8S");n.d(e,"a",(function(){return o.a})),e.c=r.b},"6eGT":
/*!*******************************************************!*\
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";e.a=function(t){return null}},"746U":
/*!****************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/types.js ***!
\****************************************************************/
/*! exports provided: isArray, isString, isObject, isNumber, isBoolean, isUndefined, isUndefinedOrNull, assertType, isEmptyObject, isFunction, validateConstraints, validateConstraint, getAllPropertyNames, getAllMethodNames, createProxyObject, withNullAsUndefined, withUndefinedAsNull */
/*! exports used: assertType, createProxyObject, getAllMethodNames, isArray, isBoolean, isEmptyObject, isFunction, isNumber, isObject, isString, isUndefined, isUndefinedOrNull, validateConstraints, withNullAsUndefined, withUndefinedAsNull */function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"j",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"h",(function(){return h})),n.d(e,"e",(function(){return d})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"a",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return y})),n.d(e,"m",(function(){return b})),n.d(e,"c",(function(){return x})),n.d(e,"b",(function(){return S})),n.d(e,"n",(function(){return E})),n.d(e,"o",(function(){return C}));var r="number",i="string",o="undefined",a="object",s="function";function l(t){return Array.isArray?Array.isArray(t):!(!t||typeof t.length!==r||t.constructor!==Array)}function c(t){return typeof t===i||t instanceof String}function u(t){return!(typeof t!==a||null===t||Array.isArray(t)||t instanceof RegExp||t instanceof Date)}function h(t){return(typeof t===r||t instanceof Number)&&!isNaN(t)}function d(t){return!0===t||!1===t}function f(t){return typeof t===o}function p(t){return f(t)||null===t}function m(t,e){if(!t)throw new Error(e?"Unexpected type, expected '"+e+"'":"Unexpected type")}var g=Object.prototype.hasOwnProperty;function v(t){if(!u(t))return!1;for(var e in t)if(g.call(t,e))return!1;return!0}function y(t){return typeof t===s}function b(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)w(t[r],e[r])}function w(t,e){if(c(e)){if(typeof t!==e)throw new Error("argument does not match constraint: typeof "+e)}else if(y(e)){try{if(t instanceof e)return}catch(t){}if(!p(t)&&t.constructor===e)return;if(1===e.length&&!0===e.call(void 0,t))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function x(t){for(var e=[],n=0,r=function(t){for(var e=[],n=Object.getPrototypeOf(t);Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}(t);n<r.length;n++){var i=r[n];"function"==typeof t[i]&&e.push(i)}return e}function S(t,e){for(var n=function(t){return function(){var n=Array.prototype.slice.call(arguments,0);return e(t,n)}},r={},i=0,o=t;i<o.length;i++){var a=o[i];r[a]=n(a)}return r}function E(t){return null===t?void 0:t}function C(t){return void 0===t?null:t}},"7Cbv":
/*!**************************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(t){return"string"==typeof t&&a.test(t)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};e.a=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return u(r)}},"7ahc":
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/*! exports provided: default, MyCodeMirror */
/*! exports used: MyCodeMirror, default */function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function g(t){var e=t.value,n=t.onChange,i=t.mode,o=t.options,a=void 0===o?{}:o,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();n&&n(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));m(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,n=t.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(a.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(a.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(m[t][1])}},Object.keys(m).map((function(t){return u.a.createElement(f,{key:t,value:t},m[t][0])})))),u.a.createElement(a.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(o.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(o.a,{type:"ghost",onClick:n},"取消")))}},"815F":
/*!***************************************************!*\
!*** ./node_modules/rc-tree/es/utils/treeUtil.js ***!
\***************************************************/
/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */
/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(t,e,n){"use strict";n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(t,e){return null!=t?t:e}function u(t){return function t(e){return Object(a.a)(e).map((function(e){if(!Object(l.i)(e))return Object(s.a)(!e,"Tree/TreeNode can only accept TreeNode as children."),null;var n=e.key,r=e.props,a=r.children,c=Object(o.a)(r,["children"]),u=Object(i.a)({key:n},c),h=t(a);return h.length&&(u.children=h),u})).filter((function(t){return t}))}(t)}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===e?[]:e),o=[];function a(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===t.length-1])});return o.push(p),!0===e||n.has(f)?p.children=a(u.children||[],p):p.children=[],p}))}return a(t),o}function d(t,e,n){var r;n?"string"==typeof n?r=function(t){return t[n]}:"function"==typeof n&&(r=function(t){return n(t)}):r=function(t,e){return c(t.key,e)},function n(i,o,a){var s=i?i.children:t,c=i?Object(l.h)(a.pos,o):"0";if(i){var u=r(i,c),h={node:i,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};e(h)}s&&s.forEach((function(t,e){n(t,e,{node:i,pos:c,level:a?a.level+1:-1})}))}(null)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.initWrapper,r=e.processEntity,i=e.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return n&&(l=n(l)||l),d(t,(function(t){var e=t.node,n=t.index,i=t.pos,o=t.key,u=t.parentPos,h={node:e,index:n,key:o,pos:i,level:t.level},d=c(o,i);a[i]=h,s[d]=h,h.parent=a[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),o),i&&i(l),l}function p(t,e){var n=e.expandedKeys,r=e.selectedKeys,i=e.loadedKeys,o=e.loadingKeys,a=e.checkedKeys,s=e.halfCheckedKeys,l=e.dragOverNodeKey,c=e.dropPosition,u=e.keyEntities[t];return{eventKey:t,expanded:-1!==n.indexOf(t),selected:-1!==r.indexOf(t),loaded:-1!==i.indexOf(t),loading:-1!==o.indexOf(t),checked:-1!==a.indexOf(t),halfChecked:-1!==s.indexOf(t),pos:String(u?u.pos:""),dragOver:l===t&&0===c,dragOverGapTop:l===t&&-1===c,dragOverGapBottom:l===t&&1===c}}function m(t){var e=t.data,n=t.expanded,r=t.selected,o=t.checked,a=t.loaded,l=t.loading,c=t.halfChecked,u=t.dragOver,h=t.dragOverGapTop,d=t.dragOverGapBottom,f=t.pos,p=t.active,m=Object(i.a)(Object(i.a)({},e),{},{expanded:n,selected:r,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),m}},"8EBN":
/*!**********************************************!*\
!*** ./node_modules/codemirror/mode/meta.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e<t.modeInfo.length;e++){var n=t.modeInfo[e];n.mimes&&(n.mime=n.mimes[0])}t.findModeByMIME=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var r=t.modeInfo[n];if(r.mime==e)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==e)return r}return/\+xml$/.test(e)?t.findModeByMIME("application/xml"):/\+json$/.test(e)?t.findModeByMIME("application/json"):void 0},t.findModeByExtension=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var r=t.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==e)return r}},t.findModeByFileName=function(e){for(var n=0;n<t.modeInfo.length;n++){var r=t.modeInfo[n];if(r.file&&r.file.test(e))return r}var i=e.lastIndexOf("."),o=i>-1&&e.substring(i+1,e.length);if(o)return t.findModeByExtension(o)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n<t.modeInfo.length;n++){var r=t.modeInfo[n];if(r.name.toLowerCase()==e)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==e)return r}}}(n(/*! ../lib/codemirror */"VrN/"))},"8HAY":
/*!******************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/actions.js ***!
\******************************************************************/
/*! exports provided: Action, ActionRunner */
/*! exports used: Action, ActionRunner */function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u}));var r,i=n(/*! ./lifecycle.js */"pmY6"),o=n(/*! ./event.js */"MI8n"),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))},l=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},c=function(t){function e(e,n,r,i,a){void 0===n&&(n=""),void 0===r&&(r=""),void 0===i&&(i=!0);var s=t.call(this)||this;return s._onDidChange=s._register(new o.a),s.onDidChange=s._onDidChange.event,s._enabled=!0,s._checked=!1,s._id=e,s._label=n,s._cssClass=r,s._enabled=i,s._actionCallback=a,s}return a(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._setLabel(t)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(t){this._label!==t&&(this._label=t,this._onDidChange.fire({label:t}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(t){this._setTooltip(t)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(t){this._tooltip!==t&&(this._tooltip=t,this._onDidChange.fire({tooltip:t}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(t){this._setClass(t)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(t){this._cssClass!==t&&(this._cssClass=t,this._onDidChange.fire({class:t}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._setEnabled(t)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(t){this._enabled!==t&&(this._enabled=t,this._onDidChange.fire({enabled:t}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){this._setChecked(t)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(t){this._checked!==t&&(this._checked=t,this._onDidChange.fire({checked:t}))},e.prototype.run=function(t,e){return this._actionCallback?this._actionCallback(t):Promise.resolve(!0)},e}(i.a),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._onDidBeforeRun=e._register(new o.a),e.onDidBeforeRun=e._onDidBeforeRun.event,e._onDidRun=e._register(new o.a),e.onDidRun=e._onDidRun.event,e}return a(e,t),e.prototype.run=function(t,e){return s(this,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:if(!t.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.runAction(t,e)];case 2:return n=i.sent(),this._onDidRun.fire({action:t,result:n}),[3,4];case 3:return r=i.sent(),this._onDidRun.fire({action:t,error:r}),[3,4];case 4:return[2]}}))}))},e.prototype.runAction=function(t,e){var n=e?t.run(e):t.run();return Promise.resolve(n)},e}(i.a)},"8hTe":
/*!******************************************************!*\
!*** ./src/components/RenderHtml/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={button:"button___1wy9m"}},"9Bee":
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 3 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n("DYRE");var r=n("zeV3"),i=(n("+L6B"),n("2/Rp")),o=n("k1fw"),a=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),f=n.n(d),p=n("rUJ1");var m=[],g=["<ul>"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(){return function t(e,n,r,i){if(n>=e.length||e[n].level<=r)return n;var o=e[n];i.push("<li><a href='#"+o.anchor+"'>"+o.text+"</a>");var a=[];return n=t(e,++n,o.level,a),a.length>0&&(i.push("<ul>"),a.forEach((function(t){i.push(t)})),i.push("</ul>")),i.push("</li>"),n=t(e,n,r,i)}(m,0,0,g),g.push("</ul>"),g.join("")}var S={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(s.a)(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||""),i=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(i)>=0){var o=k(),a=r;r=o,_[o]={type:"block",expression:a}}return{type:"code",raw:n,lang:i,text:r}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,k=function(){return"__special_katext_id_".concat(C++,"__")},_={};function T(){C=0,_={}}function O(t){return t=t.replace(E,(function(t,e){var n=k();return _[n]={type:"inline",expression:e},n}))}var A=v.listitem;v.listitem=function(t){return A(O(t))};var L=v.paragraph;v.paragraph=function(t){return L(O(t))};var D=v.tablecell;v.tablecell=function(t,e){return D(O(t),e)},v.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(t,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(e,'">').concat(n?t:Object(p.escape)(t,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?t:Object(p.escape)(t,!0))+"</code></pre>"},v.heading=function(t,e,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:e,text:t}),"<h"+e+' id="'+r+'">'+t+"</h"+e+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:S,renderer:v});var I=f.a,R=(n("SJMd"),n("ulZh")),M=n.n(R),N=n("m3rI"),j=n("Oy/b"),P=n("p5ED"),F=n("ErOA"),B=function(t,e){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function U(t,e){function n(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function H(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function z(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function G(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var V=function(){function t(){}return t.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},t.setAttributes=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],a=i[1];t.setAttribute(o,a)}},t.createRect=function(e,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",e.toString()),i.setAttribute("height",n.toString()),r&&t.setAttributes(i,r),i},t.createLine=function(e,n,r,i,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",e.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",r.toString()),a.setAttribute("y2",i.toString()),o&&t.setAttributes(a,o),a},t.createPolygon=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",e),n&&t.setAttributes(r,n),r},t.createCircle=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(e/2).toString()),r.setAttribute("r",e.toString()),n&&t.setAttributes(r,n),r},t.createEllipse=function(e,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(e/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(e/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&t.setAttributes(i,r),i},t.createGroup=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&t.setAttributes(n,e),n},t.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},t.createMarker=function(e,n,r,i,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return t.setAttributes(l,[["id",e],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},t.createText=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),e&&t.setAttributes(n,e),n},t.createTSpan=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=e,n&&t.setAttributes(r,n),r},t.createImage=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&t.setAttributes(n,e),n},t.createPoint=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=t,n.y=e,n},t.createPath=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",e),n&&t.setAttributes(r,n),r},t}(),W=function(){function t(){}return t.addKey=function(e){t.key=e},Object.defineProperty(t,"isLicensed",{get:function(){return!!t.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(t.key)},enumerable:!1,configurable:!0}),t}(),K=function(){function t(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return t.prototype.rasterize=function(t,e,n){var r=this;return new Promise((function(i){var o=void 0!==n?n:document.createElement("canvas");null===t&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",e.width.baseVal.valueAsString),a.setAttribute("height",e.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+e.viewBox.baseVal.width.toString()+" "+e.viewBox.baseVal.height.toString()),a.innerHTML=e.innerHTML,!0===r.naturalSize?(a.width.baseVal.value=t.naturalWidth,a.height.baseVal.value=t.naturalHeight):void 0!==r.width&&void 0!==r.height&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),o.width=a.width.baseVal.value,o.height=a.height.baseVal.value;var s=a.outerHTML,l=o.getContext("2d");!0!==r.markersOnly&&l.drawImage(t,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var h=new Blob([s],{type:"image/svg+xml"}),d=c.createObjectURL(h);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(d);var t=o.toDataURL(r.imageType,r.imageQuality);i(t)},u.src=d}))},t}(),q=function(){},X=function(){function t(t){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+t+"_"}return Object.defineProperty(t.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),t.prototype.addClass=function(t){return void 0===this.styleSheet&&this.addStyleSheet(),t.name=""+this.classNamePrefix+t.localName,this.classes.push(t),this.styleSheet.sheet.insertRule("."+t.name+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length),t},t.prototype.addRule=function(t){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(t),this.styleSheet.sheet.insertRule(t.selector+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length)},t.prototype.addStyleSheet=function(){var t;this.styleSheet=document.createElement("style"),(null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).appendChild(this.styleSheet),this.addRule(new Y("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new $("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new $("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},t.prototype.removeStyleSheet=function(){var t;this.styleSheet&&((null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},t}(),Y=function(t,e){this.selector=t,this.style=e},$=function(t,e){this.localName=t,this.style=e},J=function(){function t(t,e,n,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=t,this.displayMode=e,this.markerItems=n,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return t.prototype.show=function(t){var e=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var n=document.createElement("div");n.className=""+e.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",t.typeName),n.innerHTML=t.icon,n.addEventListener("click",(function(){e.markerToolbarButtonClicked(n,t)})),e.buttons.push(n),e.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e<this.markerButtons.length;e++)e<t||e===t&&this.markerButtons.length-1===t?this.markerButtonBlock.appendChild(this.markerButtons[e]):(e===t&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[e]))}},t.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},t.prototype.resetButtonStyles=function(){var t=this;this.buttons.forEach((function(e){e.className=e.className.replace(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name,"").trim(),e.className=e.className.replace(t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?t.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:t.toolbarActiveButtonStyleColorsClass.name,"").trim(),e.className+=" "+(t.uiStyleSettings.toolbarButtonStyleColorsClassName?t.uiStyleSettings.toolbarButtonStyleColorsClassName:t.toolbarButtonStyleColorsClass.name)}))},t.prototype.addActionButton=function(t,e,n){var r=this,i=document.createElement("div");switch(i.className=""+this.toolbarButtonStyleClass.name,i.innerHTML=e,i.setAttribute("data-action",n),i.addEventListener("click",(function(){r.actionToolbarButtonClicked(i,n)})),n){case"select":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":i.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":i.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":i.style.fill=this.uiStyleSettings.closeButtonColor}t.appendChild(i),this.buttons.push(i)},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new $("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new $("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new $("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new $("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new $("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new $("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new $("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},t.prototype.markerToolbarButtonClicked=function(t,e){this.setActiveButton(t),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Z=function(){function t(t,e,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,n,r=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(e=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:r.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){r.panelButtonClick(t)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,n=-1;if(t!==this.activePanel){n=this.panels.indexOf(t),this.panelRow.innerHTML="";var r=t.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,r){var i,o;t.className=e.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:e.toolboxButtonStyleColorsClass.name))}))},t}(),Q=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,n,r,i){var o=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=r,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=t.getColorBox(n);e.appendChild(r),t.colorBoxes.push(r)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentColor(t,i)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=r-2+"px",o.style.height=r-2+"px",o.style.backgroundColor=t,o.style.borderRadius=r/2+"px","transparent"===t&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),i.appendChild(o),i},e.prototype.setCurrentColor=function(t,e){var n=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(Q),et=function(){function t(t,e,n){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),nt=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),rt=function(){function t(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),it=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),ot=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=V.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(e);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+t.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),n=V.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var n=V.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var t=V.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=V.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=V.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new nt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,r=(this.width+this.CB_DISTANCE)/2-t/2,i=(this.height+this.CB_DISTANCE)/2-t/2,o=this.height+this.CB_DISTANCE-t/2,a=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,i),this.positionGrip(this.controlGrips.centerRight.visual,a,i),this.positionGrip(this.controlGrips.bottomLeft.visual,e,o),this.positionGrip(this.controlGrips.bottomCenter.visual,r,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*e,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(et),at=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=V.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.title="Rectangle marker",e}(ot),st=function(t){function e(e,n,r,i){var o=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=r,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentWidth(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),r.appendChild(o),t.widthBoxes.push(r)})),e},e.prototype.setCurrentWidth=function(t,e){var n=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(Q),lt=function(t){function e(e,n,r,i){var o=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=r,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.styles.length-5+"%",r.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentStyle(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";i.innerHTML=o,r.appendChild(i),t.styleBoxes.push(r)})),e},e.prototype.setCurrentStyle=function(t,e){var n=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(Q),ct=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="FrameMarker",e.title="Frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',e}(at),ut=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ht=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,n){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,n),t.transform.baseVal.replaceItem(r,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.x1=this.x1*e,this.y1=this.y1*n,this.x2=this.x2*e,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',e}(ht),ft=function(t){function e(e,n,r,i){var o=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=r,o.setCurrentFont=o.setCurrentFont.bind(o),o}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.fonts.length-5+"%",r.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentFont(n,r)})),e.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(o),r.appendChild(i),t.fontBoxes.push(r)})),e},e.prototype.setCurrentFont=function(t,e){var n=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(Q),pt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(n=!0)})),n},e.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(V.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,r=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,r)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,r=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,r=this.height/2-e.height*t/2),{x:n,y:r}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),n=this.getTextPosition(e);n.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*t,y:n.height*t};e.x-=r.x/2,e.y-=r.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&V.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&V.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',e}(ot),mt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var t=V.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=e[0],r=e[1],i=e[2],o=e[3],a=!1,s=0;s<this.canvasElement.height;s++)for(var l=0;l<this.canvasElement.width;l++)t.data[s*this.canvasElement.width*4+4*l+3]>0&&(a=!0,s<r&&(r=s),l<n&&(n=l),s>o&&(o=s),l>i&&(i=l));if(a){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(o-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=o-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,o-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',e}(ot),gt=function(t){function e(e,n,r){var i=t.call(this,e,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentType(i,o)})),e.appendChild(o),"both"===i||"start"===i){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}r.typeBoxes.push(o)},r=this,i=0;i<4;i++)n(i);return e},e.prototype.setCurrentType=function(t,e){var n=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(Q),vt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new gt("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+r/2)+" "+t+","+(e-r/2)+" "+(t+n/2)+","+(e+r/2)},e.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e}(dt),yt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new tt("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="CoverMarker",e.title="Cover marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e}(at),bt=function(t){function e(e,n,r,i){var o=t.call(this,e,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=r,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentOpacity(n,r)})),e.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),t.opacityBoxes.push(r)})),e},e.prototype.setCurrentOpacity=function(t,e){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(Q),wt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new tt("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e}(yt),xt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',St=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new tt("Text color",r.defaultColorSet,i.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new tt("Fill color",r.defaultColorSet,i.bgColor,xt),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new rt,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,n){"new"===this.state&&t.prototype.pointerDown.call(this,e,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var n="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(n),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var n=this.unrotatePoint(e);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",t]]),V.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:e+n/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:0},this.tipBase2Position={x:e+n,y:0}):(this.tipBase1Position={x:0,y:e},this.tipBase2Position={x:0,y:e+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-n,y:0},this.tipBase2Position={x:this.width-e,y:0}):(this.tipBase1Position={x:this.width,y:e},this.tipBase2Position={x:this.width,y:e+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?r<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-e-n,y:this.height},this.tipBase2Position={x:this.width-e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-e-n},this.tipBase2Position={x:this.width,y:this.height-e}):r<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,e=Math.min(this.width/2,15),this.tipBase1Position={x:e,y:this.height},this.tipBase2Position={x:e+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-e},this.tipBase2Position={x:0,y:this.height-e-n})},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.positionTip()},e.prototype.positionTip=function(){V.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),t.prototype.select.call(this)},e.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,t.prototype.restoreState.call(this,e),this.createTip(),this.setTipPoints()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.tipPosition={x:this.tipPosition.x*e,y:this.tipPosition.y*n},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e}(pt),Et=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new tt("Line color",G(r.defaultColorSet,["transparent"]),r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new tt("Fill color",G(r.defaultColorSet,["transparent"]),i.fillColor,xt),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=V.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),V.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e}(ot),Ct=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return U(e,t),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.tip1&&e!==this.tip2)},e.prototype.createTips=function(){this.tip1=V.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.tip1),this.tip2=V.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.tip2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(V.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e}(dt),kt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e}(Et),_t=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Tt=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new st("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,n){this.curveX=this.curveX*e,this.curveY=this.curveY*n,t.prototype.scale.call(this,e,n)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e}(ht),Ot=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),At=function(t){function e(e,n,r){var i=t.call(this,e,!1)||this;return i.dataUrl=n,i.state=r,i}return U(e,t),e}(Ot),Lt=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,r)||this;return i.marker=n,i}return U(e,t),e}(Ot),Dt=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var n=this[t].indexOf(e);n>-1&&this[t].splice(n,1)},t}(),It=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new _t,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Dt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new X(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,mt,vt,pt,kt,Et,wt,St,Ct,yt,dt,Tt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,mt,vt,pt,Et,wt,St]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,mt,vt,pt,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var n=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==n&&e._availableMarkerTypes.push(n)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new Ot(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return z(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var n=!1;t||this.eventListeners.beforeclose.forEach((function(t){var r=new Ot(e,!0);t(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new Ot(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this._availableMarkerTypes).push.apply(t,e)},t.prototype.addRenderEventListener=function(t){this.addEventListener("render",(function(e){t(e.dataUrl,e.state)}))},t.prototype.removeRenderEventListener=function(t){},t.prototype.addCloseEventListener=function(t){this.addEventListener("close",(function(){t()}))},t.prototype.removeCloseEventListener=function(t){},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return t.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupTargetResize=function(){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.editorCanvas.clientWidth/t>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/t;this.resize(e,n)},t.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},t.prototype.resize=function(t,e){this._isResizing=!0;var n=t/this.imageWidth,r=e/this.imageHeight;this.imageWidth=Math.round(t),this.imageHeight=Math.round(e),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,r),this._isResizing=!1},t.prototype.scaleMarkers=function(t,e){var n,r=this;this._currentMarker&&this._currentMarker instanceof pt?this._currentMarker.scale(t,e):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==r._currentMarker&&n.scale(t,e)})),void 0!==n&&this.setCurrentMarker(n)},t.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},t.prototype.setTopLeft=function(){var t=this.editingTarget.getBoundingClientRect(),e=this.editorCanvas.getBoundingClientRect();this.left=t.left-e.left,this.top=t.top-e.top},t.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},t.prototype.addDefs=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.defs=V.createDefs(),this.addDefsToImage(),(t=this.defs).append.apply(t,e)},t.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},t.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},t.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},t.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},t.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},t.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},t.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},t.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var t=document.createElement("a");t.href="https://markerjs.com/",t.target="_blank",t.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Z(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},t.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.removeMarker=function(t){this.markerImage.removeChild(t.container),this.markers.indexOf(t)>-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Lt(t,t._currentMarker,!0);n(r),r.defaultPrevented&&(e=!0)})),!e){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new Lt(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Lt(t,void 0,!0);n(r),r.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=r.markers[e];r.setCurrentMarker(r.markers[e]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(e){return e(new Lt(t,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===e.width&&n.height===e.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(e){return e(new Ot(t))}))}else this.undoRedoManager.replaceLastUndoStep(e),this.eventListeners.statechange.forEach((function(e){return e(new Ot(t))}))}},t.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},t.prototype.undoStep=function(){var t=this,e=this.undoRedoManager.undo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new Ot(t))})))},t.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},t.prototype.redoStep=function(){var t=this,e=this.undoRedoManager.redo();void 0!==e&&(this.restoreState(e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(e){return e(new Ot(t))})))},t.prototype.stepZoom=function(){var t=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=t<this.zoomSteps.length-1?this.zoomSteps[t+1]:this.zoomSteps[0]},t.prototype.panTo=function(t){this.contentDiv.scrollBy({left:this.prevPanPoint.x-t.x,top:this.prevPanPoint.y-t.y}),this.prevPanPoint=t},t.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var t,e,n=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return t=r.sent(),e=this.getState(),this.eventListeners.render.forEach((function(r){return r(new At(n,t,e))})),this.close(!0),[2]}}))}))},t.prototype.getState=function(t){!0===t&&this.setCurrentMarker();var e={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(t){return e.markers.push(t.getState())})),e},t.prototype.restoreState=function(t){var e=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);t.markers.forEach((function(t){var n=e._availableMarkerTypes.find((function(e){return e.typeName===t.typeName}));if(void 0!==n){var r=e.addNewMarker(n);r.restoreState(t),e.markers.push(r)}})),t.width&&t.height&&(t.width!==this.imageWidth||t.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/t.width,this.imageHeight/t.height),this.eventListeners.restorestate.forEach((function(t){return t(new Ot(e))}))},t.prototype.addNewMarker=function(t){var e=V.createGroup();return this.markerImage.appendChild(e),new t(e,this.overlayContainer,this.settings)},t.prototype.createNewMarker=function(t){var e,n=this;(e="string"==typeof t?this._availableMarkerTypes.find((function(e){return e.typeName===t})):t)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(e),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(e.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(t){return t(new Lt(n,n._currentMarker))})))},t.prototype.markerCreated=function(t){var e=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(t),this.setCurrentMarker(t),t instanceof mt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(mt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(t){return t(new Lt(e,e._currentMarker))}))},t.prototype.colorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=t,this.settings.defaultStrokeColor=t)},t.prototype.fillColorChanged=function(t){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=t)},t.prototype.markerStateChanged=function(t){var e=this;this.eventListeners.markerchange.forEach((function(n){return n(new Lt(e,t))}))},t.prototype.setCurrentMarker=function(t){var e=this;this._currentMarker!==t&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(t){return t(new Lt(e,e._currentMarker))}))),this._currentMarker=t,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(t){return t(new Lt(e,e._currentMarker))})))},t.prototype.onPointerDown=function(t){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==t.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e?(this.setCurrentMarker(e),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:t.clientX,y:t.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(t.clientX,t.clientY))},t.prototype.onDblClick=function(t){if(this._isFocused||this.focus(),"select"===this.mode){var e=this.markers.find((function(e){return e.ownsTarget(t.target)}));void 0!==e&&e!==this._currentMarker&&this.setCurrentMarker(e),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(t.clientX,t.clientY),t.target):this.setCurrentMarker()}},t.prototype.onPointerMove=function(t){1!==this.touchPoints&&"touch"===t.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||t.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(t.clientX,t.clientY)):this.zoomLevel>1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.markerImage.getBoundingClientRect();return{x:(t-n.left)/this.zoomLevel,y:(e-n.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){W.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new Ot(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new Ot(t))})))},t.instanceCounter=0,t}(),Rt=function(t,e){return(Rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};
/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Rt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Nt(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function jt(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var Pt=function(){function t(){}return t.addKey=function(e){t.key=e},Object.defineProperty(t,"isLicensed",{get:function(){return!!t.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(t.key)},enumerable:!1,configurable:!0}),t}(),Ft=function(){function t(){}return t.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},t.setAttributes=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],a=i[1];t.setAttribute(o,a)}},t.createRect=function(e,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",e.toString()),i.setAttribute("height",n.toString()),r&&t.setAttributes(i,r),i},t.createLine=function(e,n,r,i,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",e.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",r.toString()),a.setAttribute("y2",i.toString()),o&&t.setAttributes(a,o),a},t.createPolygon=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",e),n&&t.setAttributes(r,n),r},t.createCircle=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(e/2).toString()),r.setAttribute("r",e.toString()),n&&t.setAttributes(r,n),r},t.createEllipse=function(e,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(e/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(e/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&t.setAttributes(i,r),i},t.createGroup=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&t.setAttributes(n,e),n},t.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},t.createMarker=function(e,n,r,i,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return t.setAttributes(l,[["id",e],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},t.createText=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),e&&t.setAttributes(n,e),n},t.createTSpan=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=e,n&&t.setAttributes(r,n),r},t.createImage=function(e){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&t.setAttributes(n,e),n},t.createPoint=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=t,n.y=e,n},t.createPath=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",e),n&&t.setAttributes(r,n),r},t.createElement=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg",e);return n&&t.setAttributes(r,n),r},t.getHollowRectanglePath=function(t,e,n,r,i,o,a,s){return"M"+t+","+e+"V"+(e+r)+"H"+(t+n)+"V"+e+"H"+i+"V"+o+"H"+(i+a)+"V"+(o+s)+"H"+i+"V"+e+"Z"},t}(),Bt=function(){function t(t){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+t+"_"}return Object.defineProperty(t.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),t.prototype.addClass=function(t){return void 0===this.styleSheet&&this.addStyleSheet(),t.name=""+this.classNamePrefix+t.localName,this.classes.push(t),this.styleSheet.sheet.insertRule("."+t.name+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length),t},t.prototype.addRule=function(t){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(t),this.styleSheet.sheet.insertRule(t.selector+" {"+t.style+"}",this.styleSheet.sheet.cssRules.length)},t.prototype.addStyleSheet=function(){var t;this.styleSheet=document.createElement("style"),(null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).appendChild(this.styleSheet),this.addRule(new Ut("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ut("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Ut("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new Ht("_fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new Ht("_fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},t.prototype.removeStyleSheet=function(){var t;this.styleSheet&&((null!==(t=this.styleSheetRoot)&&void 0!==t?t:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},t}(),Ut=function(t,e){this.selector=t,this.style=e},Ht=function(t,e){this.localName=t,this.style=e},zt=function(){function t(){this.blocks=[],this.display=""}return t.prototype.addButtonBlock=function(t){t.className=this.blockClassName,t.buttonClassName=this.buttonClassName,t.buttonColorsClassName=this.buttonColorsClassName,t.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(t)},t.prototype.addElementBlock=function(t){void 0===t.className&&(t.className=this.blockClassName),this.blocks.push(t)},t.prototype.getUI=function(){var t=document.createElement("div");return t.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,t.style.display=this.display,this.blocks.forEach((function(e){return t.appendChild(e.getUI())})),t},t}(),Gt=function(){function t(){}return t.prototype.getUI=function(){var t=document.createElement("div");if(t.className=this.className,void 0!==this.minWidth&&(t.style.minWidth=this.minWidth),void 0!==this.contentAlign)switch(this.contentAlign){case"start":t.style.justifyContent="flex-start";break;case"center":t.style.justifyContent="center";break;case"end":t.style.justifyContent="flex-end"}return t.style.whiteSpace="nowrap",t},t}(),Vt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttons=[],e}return Mt(e,t),e.prototype.addButton=function(t){t.className=this.buttonClassName,t.colorsClassName=this.buttonColorsClassName,t.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(t)},e.prototype.getUI=function(){var e=t.prototype.getUI.call(this);return this.buttons.forEach((function(t){return e.appendChild(t.getUI())})),e},e}(Gt),Wt=function(){function t(t,e){this._isActive=!1,this._isHidden=!1,this._icon=t,this.title=e,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},set:function(t){this._isActive=t,this.adjustClassName()},enumerable:!1,configurable:!0}),t.prototype.getUI=function(){var t=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",(function(){return t.onClick()})),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},t.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},t.prototype.hide=function(){this._isHidden=!0},t}(),Kt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.elements=[],e}return Mt(e,t),e.prototype.addElement=function(t){this.elements.push(t)},e.prototype.getUI=function(){var e=t.prototype.getUI.call(this);return this.elements.forEach((function(t){return e.appendChild(t)})),e},e}(Gt),qt=function(){function t(t,e){this.horizontal=t,this.vertical=e}return Object.defineProperty(t.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),t.prototype.getVerticalLength=function(t){return t/this.ratio},t.prototype.getHorizontalLength=function(t){return t*this.ratio},t}(),Xt=function(){function t(){}return t.getIcon=function(t,e){if(t>0&&e>0){var n=new qt(t,e),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(o);var a=Ft.createDefs();o.appendChild(a);var s=Ft.createElement("clipPath",[["id","text-bg-clip"]]);a.appendChild(s);var l=Ft.createPath(Ft.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));o.appendChild(l);var c=Ft.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Ft.createTSpan(t+":"+e)),o.appendChild(c);var u=c.getBBox();Ft.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Ft.createPath(Ft.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),Ft.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(o),o.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},t}(),Yt=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Wt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Ft.createGroup(),this.visual.appendChild(Ft.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ft.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(n){return Ft.setAttributes(n,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Jt=function(){function t(t,e,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=n,this.container=r,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&Ft.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=Ft.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ft.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;e<this.numberOfGridLines;e++)this.horizontalGridLines.push(Ft.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Ft.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach((function(e){return t.gridContainer.appendChild(e)})),this.verticalGridLines.forEach((function(e){return t.gridContainer.appendChild(e)})),this.cropRectElement=Ft.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new $t(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new $t(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new $t(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new $t(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},t.prototype.setCropRectangle=function(t){this.cropRect=t;var e=Object.assign({},this.cropRect);1!==this.zoomFactor&&(e.width=this.cropRect.width*this.zoomFactor,e.height=this.cropRect.height*this.zoomFactor,e.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-e.width/2,e.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Ft.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var n=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,r){var i=e.y+n*(r+1);Ft.setAttributes(t,[["x1",""+e.x],["y1",""+i],["x2",""+(e.x+e.width)],["y2",""+i]])}));var r=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,n){var i=e.x+r*(n+1);Ft.setAttributes(t,[["x1",""+i],["y1",""+e.y],["x2",""+i],["y2",""+(e.y+e.height)]])})),Ft.setAttributes(this.cropShadeElement,[["d",Ft.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,e.x,e.y,e.width,e.height)]]),this.topLeftGrip.setCenter(e.x,e.y),this.topRightGrip.setCenter(e.x+e.width,e.y),this.bottomLeftGrip.setCenter(e.x,e.y+e.height),this.bottomRightGrip.setCenter(e.x+e.width,e.y+e.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},t.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.container.getBoundingClientRect();return{x:t-n.left+this.margin,y:e-n.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,n=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+e),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),n=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+n<this.margin&&(n=this.margin-e.x),e.x+=n,e.width=this.cropRect.x+this.cropRect.width-e.x;break;case this.bottomRightGrip:case this.topRightGrip:e.width+n>this.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-e.width),e.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(e.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=r,e.height=this.cropRect.y+this.cropRect.height-e.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?e.height=this.aspectRatio.getVerticalLength(e.width):e.height+=r}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,e.x>=this.margin&&e.y>=this.margin&&e.x-this.margin+e.width<=this.canvasWidth&&e.y-this.margin+e.height<=this.canvasHeight&&(this.cropRect=e,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/this.canvasWidth<r/this.canvasHeight?this.cropRect.width=n:this.cropRect.height=r,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=t-this.cropRect.width/2,this.cropRect.y=e-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},t.prototype.getRescaledRect=function(t,e,n,r,i,o){var a=n/t,s=r/e;return{x:(i.x-o)*a+o,y:(i.y-o)*s+o,width:i.width*a,height:i.height*s}},t.prototype.scaleCanvas=function(t,e){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},t}(),Zt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();Ft.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;e+="h4v"+-r+"h1v"+r}e+="v1H0Z",this.scaleShape=Ft.createPath(e);var i=Ft.createTransform();this.scaleShape.transform.baseVal.appendItem(i),t.appendChild(this.scaleShape),this.angleLabelElement=Ft.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ft.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var o=Ft.createTSpan("");return o.innerHTML="&deg;",this.angleLabelElement.appendChild(o),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Qt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,n,r,i,o,a){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*r,c.height=t.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/o,h=e.naturalHeight/(t.height.baseVal.value-2*r)/a,c.width=e.naturalWidth/o,c.height=e.naturalHeight/a):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(o,a),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},t}(),te=function(){function t(e){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=t.instanceCounter++,this.styles=new Bt(this.instanceNo),this.target=e,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=e+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/t;this.resize(e,n)}},t.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},t.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Ft.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},t.prototype.resize=function(t,e){this.imageWidth=Math.round(t),this.imageHeight=Math.round(e),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px","popup"!==this.displayMode?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},t.prototype.setEditingTarget=function(){var t=document.createElement("canvas");t.width=this.target.naturalWidth,t.height=this.target.naturalHeight,t.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var e=t.toDataURL();Ft.setAttributes(this.editingTarget,[["href",e]]),this.setEditingTargetSize()},t.prototype.setTopLeft=function(){var t=this.target.getBoundingClientRect(),e=this.editorCanvas.getBoundingClientRect();this.left=t.left-e.left-this.CANVAS_MARGIN,this.top=t.top-e.top-this.CANVAS_MARGIN},t.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Ft.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Ft.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Ft.createGroup(),this.editingTargetRotationScaleContainer=Ft.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var t=Ft.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(t);var e=Ft.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(e),this.editingTargetContainer=Ft.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},t.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},t.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Ft.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Jt(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},t.prototype.zoomToCrop=function(){if(this.cropRect){var t=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,e=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=t+"px "+e+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-t+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-e+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},t.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},t.prototype.cropRectChanged=function(t){this.cropRect=t,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},t.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch(this.addStyles(),"popup"===this.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,e=this.target.offsetTop>t+this.CANVAS_MARGIN?this.target.offsetTop-(t+this.CANVAS_MARGIN):0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.displayMode?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,"popup"===this.displayMode&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new zt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var e=new Vt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var n=[];this.aspectRatios.forEach((function(e){var r=new Wt(Xt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);r.onClick=function(){return t.ratioButtonClicked(e)},n.push(r)})),this.aspectRatioButton=new Yt(Xt.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,e.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Wt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var i=new Wt('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,i.isActive=t.zoomToCropEnabled},e.addButton(i),!Pt.isLicensed){var o=new Kt;this.topToolbar.addElementBlock(o);var a=document.createElement("div");a.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',a.appendChild(s),o.addElement(a)}var l=new Vt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Wt('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Wt('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new zt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var e=new Vt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var n=new Wt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");n.onClick=this.rotateLeftButtonClicked,e.addButton(n);var r=new Wt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");r.onClick=this.rotateRightButtonClicked,e.addButton(r);var i=new Kt;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Zt("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},i.addElement(this.straightener.getUI());var o=new Vt;o.minWidth=2*this.toolbarHeight+"px",o.contentAlign="end",this.bottomToolbar.addButtonBlock(o);var a=new Wt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");a.onClick=this.flipHorizontallyButtonClicked,o.addButton(a);var s=new Wt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,o.addButton(s)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Xt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.cropImage.getBoundingClientRect();return{x:t-n.left,y:e-n.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var e=this.editingTargetRotationContainer.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(e,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Nt(this,void 0,void 0,(function(){var t,e;return jt(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return t=n.sent(),e=this.getState(),this.renderEventListeners.forEach((function(n){return n(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Nt(this,void 0,void 0,(function(){var t;return jt(this,(function(e){switch(e.label){case 0:return(t=new Qt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),Ft.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return e.sent(),[4,t.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,e.sent()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=n("8hTe"),ne=n.n(ee),re=/<pre[^>]*>/g;e.a=function(t){var e=t.value,n=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,m=t.showLines,g=t.replaces,v=t.zoomImg,y=t.hasMask,S=t.style,E=void 0===S?{}:S,C=t.stylesPrev,k=void 0===C?{}:C,O=String(n),A=Object(u.useRef)(),L=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),B=R[0],U=R[1],H=Object(u.useState)("office"),z=Object(s.a)(H,2),G=z[0],V=z[1],W=Object(u.useMemo)((function(){try{O=(O=O.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+N.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+N.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+N.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?<!\\n)\\n(?!\\n)","g")," \n")}catch(t){}var t=I(O),e=_;if(O.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",x()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,n){var r=e[n],i=r.type,o=r.expression;return Object(j.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),T(),p){var n=document.createElement("div");return n.innerHTML=t,n.innerText}return setTimeout((function(){return X()}),500),t}),[O]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var n=e.getAttribute("src");U(n),V("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),V("html");else if(r.startsWith("#")){t.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}w.WebkitLineClamp=m,m&&(E=Object(o.a)(Object(o.a)({},E),w));var X=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),T(),b()}}),[W,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(o.a)({},E),className:"".concat(f||""," markdown-body ").concat(ne.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(A.current.style.display="flex",A.current.style.width=t.target.clientWidth+"px",A.current.style.height=t.target.clientHeight+"px",A.current.style.top=t.target.offsetTop+"px",A.current.style.left=t.target.offsetLeft+"px",L.current.src=t.target.getAttribute("src")):A.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:A,className:ne.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(t=new te(L.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(a.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A.current.style.display="none",t.next=3,Object(F.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(n=t.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(t=new It(L.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(a.a)(c.a.mark((function t(e){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.current.style.display="none",!L.current){t.next=6;break}return t.next=4,Object(F.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(n=t.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:L,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(P.a,{close:!0,data:B,hasMask:y,type:null!=B&&B.length?G:"",style:Object(o.a)({},k),onClose:function(){return U("")}}))}},"9OqN":
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ctr.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o;t.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)t[e+s]^=a[s]}}),r.Decryptor=i,r),o.mode.CTR)},"9VGf":
/*!****************************************!*\
!*** ./src/components/useInterval.tsx ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(t,e){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=t})),Object(r.useEffect)((function(){if(null!==e){var t=setInterval((function(){n.current()}),e);return function(){return clearInterval(t)}}}),[e])}},ALsQ:
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-cfb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)t[e+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i,r),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);e.call(this,t,n,i,r),this._prevBlock=o}}),t}(),r.mode.CFB)},B7Ph:
/*!**************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx ***!
\**************************************************************************************/
/*! exports provided: dealList, UploadTable, default */
/*! exports used: UploadTable, default */function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));n(/*! antd/es/input/style */"5NDa");var r=n(/*! antd/es/input */"5rEg"),i=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),a=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=(n(/*! antd/es/upload/style */"DZo9"),n(/*! antd/es/upload */"8z0m")),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),f=n.n(d),p=n(/*! react */"q1tI"),m=n.n(p),g=n(/*! ./index.less?modules */"Bvq2"),v=n.n(g),y=n(/*! ./nodata.svg */"nj2k"),b=n.n(y),w=n(/*! ali-oss */"mxV5"),x=n.n(w),S=n(/*! @/components/UploadFile */"KhGG"),E=n(/*! @/utils/fetch */"ErOA"),C=n(/*! uuid */"7Cbv"),k=n(/*! @/utils/util */"1vsH"),_=(h.a.Dragger,function(t){for(var e=function(t){return t?t.substring(0,t.lastIndexOf(".")):t},n=Object(u.a)(t),r=0,i=[],o=0;o<n.length;o++){for(var a="",s=0;s<i.length;s++)if(e(i[s][0].name)==e(n[o].name)){r=1,a=s;break}if(1==r)i[a].push(n[o]),r=0;else if(0==r){var l=new Array;l.push(n[o]),i.push(l)}}return i.map((function(t){return t[0].name.includes(".in")?2===t.length?t:[t[0],{}]:t[0].name.includes(".out")?2===t.length?t.reverse():[{},t[0]]:void 0}))}),T=function(t){var e=t.data,n=void 0===e?[]:e,i=t.onRemove,a=t.width,s=void 0===a?"auto":a,l=t.showScore,c=void 0!==l&&l,u=t.disabled,h=void 0!==u&&u,d=t.inputChange,f=function(t){var e=document.createElement("a");document.body.appendChild(e);var n=URL.createObjectURL(t.file);e.href=n,e.download=t.name,e.click(),URL.revokeObjectURL(n),document.body.removeChild(e)},p=function(t,e){Object(k.w)(t,e)};return n.length?m.a.createElement("div",{style:{width:s}},m.a.createElement("div",{className:v.a.head},m.a.createElement("div",{style:{width:"20%"}},"用例"),m.a.createElement("div",{style:{width:c?"25%":"35%"}},"输入"),m.a.createElement("div",{style:{width:c?"25%":"35%"}},"输出"),c&&m.a.createElement("div",{style:{width:"20%"}},"得分比例"),m.a.createElement("div",{style:{width:"10%"}},"操作")),n.map((function(t,e){var n,a,s,l;return m.a.createElement("div",{key:e,className:v.a.list},m.a.createElement("div",{style:{width:"20%"}},"测试用例",e+1),m.a.createElement("div",{className:v.a.info,style:{width:c?"25%":"35%"}},m.a.createElement("span",{title:t.input||(null===(n=t[0])||void 0===n?void 0:n.name),onClick:function(){t.input?t.input_file_url?p(t.input_file_url,t.input):f(t.in_file):f(t[0])}},t.input||(null===(a=t[0])||void 0===a?void 0:a.name))),m.a.createElement("div",{className:v.a.info,style:{width:c?"25%":"35%"}},m.a.createElement("span",{title:t.output||(null===(s=t[1])||void 0===s?void 0:s.name),onClick:function(){t.input?t.output_file_url?p(t.output_file_url,t.output):f(t.out_file):f(t[1])}},t.output||(null===(l=t[1])||void 0===l?void 0:l.name))),c&&m.a.createElement("div",{style:{width:"20%"}},m.a.createElement(r.a,{disabled:h,style:{width:"70%"},onChange:function(t){return d(t,e)},value:t.score}),m.a.createElement("span",null," %")),m.a.createElement("div",{onClick:function(){return function(t,e){o.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:m.a.createElement("div",{className:"tc font16"},"请确认是否删除该测试用例?"),onOk:function(){i(t,e)},onCancel:function(){}})}(t,e)},style:{width:"10%"}},m.a.createElement("span",{className:v.a.del},"删除")))}))):m.a.createElement(m.a.Fragment,null)};e.b=function(t){var e=t.onClose,n=t.onOK,r=t.visible,d=t.wrapClassName,g=t.rootIdentifier,y=Object(p.useState)([]),w=Object(c.a)(y,2),k=w[0],O=w[1],A=Object(p.useState)({}),L=Object(c.a)(A,2),D=L[0],I=L[1],R=Object(p.useState)(!1),M=Object(c.a)(R,2),N=M[0],j=M[1],P=Object(p.useRef)([]),F=Object(p.useRef)(0);Object(p.useEffect)((function(){B()}),[]),Object(p.useEffect)((function(){r&&(P.current=[],F.current=0,O([]))}),[r]);var B=function(){var t=Object(l.a)(f.a.mark((function t(){var e,n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(E.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:e=t.sent,n=JSON.parse(Object(S.a)(e.data)),I(n),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),U=function(t){return t?t.substring(0,t.lastIndexOf(".")):t},H=function(t){var r=new x.a({endpoint:D.end_point,region:D.region,accessKeyId:D.access_key_id,accessKeySecret:D.access_key_secret,bucket:D.bucket,stsToken:D.security_token}),i=t.name,o={container_type:"TestSet",file_name:i},a=Object(C.a)(),l="testsets/".concat(g,"/").concat(a).concat(i.indexOf(".")>-1?"."+i.split(".").pop():"");null===g&&(l="testsets/".concat(a).concat(i.indexOf(".")>-1?"."+i.split(".").pop():"")),r.multipartUpload(l,new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,callback:{customValue:{id:i+""},url:null==D?void 0:D.callback_url,host:null==D?void 0:D.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(E.e)(o)}}).then((function(r){if(0===r.data.status){F.current=F.current+1;var i=P.current.map((function(e){var n,i;if(e.name===(null===(n=r.data)||void 0===n||null===(i=n.data)||void 0===i?void 0:i.file_name)){var o,a,l,c,u,h,d,f,p,m,g,v,y,b,w,x=Object(s.a)({},e);if(null!==(o=r.data)&&void 0!==o&&null!==(a=o.data)&&void 0!==a&&null!==(l=a.file_name)&&void 0!==l&&l.includes(".in"))x.in_object_key=null===(c=r.data)||void 0===c||null===(u=c.data)||void 0===u?void 0:u.object,x.in_object_size=null===(h=r.data)||void 0===h||null===(d=h.data)||void 0===d?void 0:d.size,x.input=null===(f=r.data)||void 0===f||null===(p=f.data)||void 0===p?void 0:p.file_name,x.in_file=t;else x.out_object_key=null===(m=r.data)||void 0===m||null===(g=m.data)||void 0===g?void 0:g.object,x.out_object_size=null===(v=r.data)||void 0===v||null===(y=v.data)||void 0===y?void 0:y.size,x.output=null===(b=r.data)||void 0===b||null===(w=b.data)||void 0===w?void 0:w.file_name,x.out_file=t;return x}return e}));if(P.current=Object(u.a)(i),O(Object(u.a)(i)),F.current>0&&F.current===k.length){j(!1);var o=_(i);o=(o=o.filter((function(t){var e,n;return!(null===(e=t[0])||void 0===e||!e.name||null===(n=t[1])||void 0===n||!n.name)}))).map((function(t){return Object(s.a)(Object(s.a)(Object(s.a)({},t[0]),t[1]),{},{is_file:!0})})),n(o),e()}}}))},z={name:"file",fileList:k,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(t){if(null!=k&&k.some((function(e){return e.name===t.name})))return a.b.info("".concat(t.name,"文件已存在")),!1;if(t.size/1024/1024>100)return a.b.info("文件超过100M不符合上传要求"),!1;if(!/\.(in|out|IN|OUT)$/.test(t.name))return a.b.warn("输入文件只能上传.in和.out类型的文本文件"),!1;var e={name:t.name,uid:t.uid,file:t,percent:0};return k.push(e),P.current=Object(u.a)(k),O(Object(u.a)(k)),!1}},G=_(k);return console.log(k,G,"fileList"),m.a.createElement(o.a,{visible:r,wrapClassName:d,onOk:function(){var t;0!==k.length?(j(!0),_(k).some((function(t){var e,n;return!(null!==(e=t[0])&&void 0!==e&&e.name&&null!==(n=t[1])&&void 0!==n&&n.name)}))?o.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"上传的测试用例中存在未配对的文件,请确认是否仅保存已配对的测试用例?",onOk:(t=Object(l.a)(f.a.mark((function t(){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k.map(function(){var t=Object(l.a)(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:H(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),onCancel:function(){j(!1)}}):k.map(function(){var t=Object(l.a)(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:H(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):a.b.warn("请选择上传文件")},centered:!0,okText:"确认",cancelText:"取消",okButtonProps:{loading:N},onCancel:function(){e()},width:"1000px",title:"批量上传测试用例"},m.a.createElement("div",{className:v.a.wrap},k.length?m.a.createElement("div",null,m.a.createElement(h.a,z,m.a.createElement(i.a,{className:v.a.btnS},"上传文件")),m.a.createElement(T,{data:G,onRemove:function(t){var e,n,r=U(null===(e=t[0])||void 0===e?void 0:e.name)||U(null===(n=t[1])||void 0===n?void 0:n.name),i=k.filter((function(t){return U(t.name)!==r}));P.current=Object(u.a)(i),O(Object(u.a)(i))}})):m.a.createElement("div",{className:v.a.noData},m.a.createElement("img",{src:b.a,alt:""}),m.a.createElement(h.a,z,m.a.createElement(i.a,{className:v.a.btn},"上传文件"))),m.a.createElement("div",{className:v.a.text},"上传限制:",m.a.createElement("br",null),"1、文件必须上传.in和.out类型的文本文件。",m.a.createElement("br",null),"2、输入输出文件需文件名称一一对应未对应时将无法上传。",m.a.createElement("br",null),"3、单个上传文件不能超过100MB超过时可以分批次上传。")))}},BU3w:
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, updateCSS */
/*! exports used: updateCSS */function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var o,a=document.createElement("style");(null===(e=n.csp)||void 0===e?void 0:e.nonce)&&(a.nonce=null===(o=n.csp)||void 0===o?void 0:o.nonce);a.innerHTML=t;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(a):n.prepend&&l?s.insertBefore(a,l):s.appendChild(a),a}var a=new Map;function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!a.has(r)){var s=o("",n),l=s.parentNode;a.set(r,l),l.removeChild(s)}var c=Array.from(a.get(r).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=o(t,n);return f["rc-util-key"]=e,f}},Bd2K:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){t.defineOption("autoCloseTags",!1,(function(a,s,l){if(l!=t.Init&&l&&a.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:r(e,!0)}(e)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var a=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;c<a.length;c++){if(!a[c].empty())return t.Pass;var u=a[c].head,h=r.getTokenAt(u),d=t.innerMode(r.getMode(),h.state),f=d.state,p=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(f),m=p&&p.name;if(!m)return t.Pass;var g="html"==d.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&e,y="object"==typeof l&&l.indentTags||g&&n;h.end>u.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||o(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],m,u,!0))return t.Pass;var w="object"==typeof l&&l.emptyTags;if(w&&i(w,m)>-1)s[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var x=y&&i(y,b)>-1;s[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+m+">",newPos:x?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var S="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var E=s[c];r.replaceRange(E.text,a[c].head,a[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:E.newPos,anchor:E.newPos},r.setSelections(C),!S&&E.indent&&(r.indentLine(E.newPos.line,null,!0),r.indentLine(E.newPos.line+1,null,!0))}}(r)}),a.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(e,n){for(var r=e.listSelections(),i=[],a=n?"/":"</",s=e.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return t.Pass;var u=r[c].head,h=e.getTokenAt(u),d=t.innerMode(e.getMode(),h.state),f=d.state;if(n&&("string"==h.type||"<"!=h.string.charAt(0)||h.start!=u.ch-1))return t.Pass;var p,m="xml"!=d.mode.name&&"htmlmixed"==e.getMode().name;if(m&&"javascript"==d.mode.name)p=a+"script";else if(m&&"css"==d.mode.name)p=a+"style";else{var g=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f);if(!g||g.length&&o(e,g,g[g.length-1],u))return t.Pass;p=a+g[g.length-1]}">"!=e.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(e.replaceSelections(i),r=e.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&e.indentLine(r[c].head.line)}function i(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;++n)if(t[n]==e)return n;return-1}function o(e,n,r,i,o){if(!t.scanForClosingTag)return!1;var a=Math.min(e.lastLine()+1,i.line+500),s=t.scanForClosingTag(e,i,null,a);if(!s||s.tag!=r)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=t.scanForClosingTag(e,i,null,a);if(!u||u.tag!=r)return!1;i=u.to}return!0}t.commands.closeTag=function(t){return r(t)}}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../fold/xml-fold */"osHv"))},BjJ7:
/*!*********************************!*\
!*** ./src/pages/tasks/util.js ***!
\*********************************/
/*! exports provided: isCompileOk, getTreeData, processTreeData, debounce, isProd, apiPref */
/*! exports used: apiPref, debounce, getTreeData, isCompileOk, processTreeData */function(t,e,n){"use strict";function r(t){var e=!0;if(t.length>0){for(var n=0;n<t.length;n++)if(0==t[n].compile_success||!t[n].compile_success){e=!1;break}}else e=!1;return e}function i(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<t.length;r++){var i=t[r],o=e?"".concat(e,"/").concat(i.name):"".concat(i.name);n.push({title:i.name,isLeaf:"tree"!==i.type,key:o})}return n}function o(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];if(i.key===e){i.children=n;break}i.children&&o(i.children,e,n)}return t}function a(t,e,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||t.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,e),s&&t.apply(i,o)}}n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s}));var s=n(/*! @/utils/env */"m3rI").a.API_SERVER},Bvq2:
/*!***********************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.less?modules ***!
\***********************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":
/*!*********************************************************!*\
!*** ./src/components/markdown-editor/css/iconfont.css ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},"C/vA":
/*!*********************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/functional.js ***!
\*********************************************************************/
/*! exports provided: once */
/*! exports used: once */function(t,e,n){"use strict";function r(t){var e,n=this,r=!1;return function(){return r?e:(r=!0,e=t.apply(n,arguments))}}n.d(e,"a",(function(){return r}))},"Cg/j":
/*!******************************************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js ***!
\******************************************************************************************/
/*! exports provided: _util, IInstantiationService, createDecorator, optional */
/*! exports used: IInstantiationService, _util, createDecorator, optional */function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s})),function(t){t.serviceIds=new Map,t.DI_TARGET="$di$target",t.DI_DEPENDENCIES="$di$dependencies",t.getServiceDependencies=function(e){return e[t.DI_DEPENDENCIES]||[]}}(r||(r={}));var i=a("instantiationService");function o(t,e,n,i){e[r.DI_TARGET]===e?e[r.DI_DEPENDENCIES].push({id:t,index:n,optional:i}):(e[r.DI_DEPENDENCIES]=[{id:t,index:n,optional:i}],e[r.DI_TARGET]=e)}function a(t){if(r.serviceIds.has(t))return r.serviceIds.get(t);var e=function(t,n,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");o(e,t,r,!1)};return e.toString=function(){return t},r.serviceIds.set(t,e),e}function s(t){return function(e,n,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");o(t,e,r,!0)}}},CrYA:
/*!*******************************************************!*\
!*** ./node_modules/store/storages/sessionStorage.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe").Global;function i(){return r.sessionStorage}function o(t){return i().getItem(t)}t.exports={name:"sessionStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},DlQD:
/*!*******************************************!*\
!*** ./node_modules/marked/lib/marked.js ***!
\*******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function n(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}var r=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){m[" "+t]||(g.test(t)?m[" "+t]=t+"/":m[" "+t]=w(t,"/",!0));var n=-1===(t=m[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(y,"$1")+e:t+e}function w(t,e,n){var r=t.length;if(0===r)return"";for(var i=0;i<r;){var o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.substr(0,r-i)}var x=function(t,e){if(e){if(i.test(t))return t.replace(o,c)}else if(a.test(t))return t.replace(s,c);return t},S=h,E=function(t,e){t=t.source||t,e=e||"";var n={replace:function(e,r){return r=(r=r.source||r).replace(d,"$1"),t=t.replace(e,r),n},getRegex:function(){return new RegExp(t,e)}};return n},C=function(t,e,n){if(t){var r;try{r=decodeURIComponent(h(n)).replace(f,"").toLowerCase()}catch(t){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}e&&!p.test(n)&&(n=b(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},k={exec:function(){}},_=function(t){for(var e,n,r=1;r<arguments.length;r++)for(n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},T=function(t,e){var n=t.replace(/\|/g,(function(t,e,n){for(var r=!1,i=e;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},O=w,A=function(t,e){if(-1===t.indexOf(e[1]))return-1;for(var n=t.length,r=0,i=0;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&--r<0)return i;return-1},L=function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},D=r.defaults,I=O,R=T,M=x,N=A;function j(t,e,n){var r=e.href,i=e.title?M(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:o}:{type:"image",raw:n,href:r,title:i,text:M(o)}}var P=function(){function t(t){this.options=t||D}var e=t.prototype;return e.space=function(t){var e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var n=this.rules.block.code.exec(t);if(n){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:R(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r],n.header.length);return n}}},e.hr=function(t){var e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}},e.blockquote=function(t){var e=this.rules.block.blockquote.exec(t);if(e){var n=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var n,r,i,o,a,s,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v<g;v++)c=n=p[v],r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),v!==g-1&&(i=this.rules.block.bullet.exec(p[v+1])[0],(h?1===i.length||!d&&")"===i[i.length-1]:i.length>1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:R(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},e.lheading=function(t){var e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}},e.paragraph=function(t){var e=this.rules.block.paragraph.exec(t);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}},e.text=function(t,e){var n=this.rules.block.text.exec(t);if(n){var r=e[e.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},e.escape=function(t){var e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:M(e[1])}},e.tag=function(t,e,n){var r=this.rules.inline.tag.exec(t);if(r)return!e&&/^<a /i.test(r[0])?e=!0:e&&/^<\/a>/i.test(r[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=N(e[2],"()");if(n>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,r).trim(),e[3]=""}var i=e[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=e[3]?e[3].slice(1,-1):"";return j(e,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},e[0])}},e.reflink=function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j(n,r,n[0])}},e.strong=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}},e.em=function(t,e,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:e[0],text:n}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?e(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},e.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?e(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.inlineText=function(t,e,n){var r,i=this.rules.inline.text.exec(t);if(i)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},t}(),F=k,B=E,U=_,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:F,table:F,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=B(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=B(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=B(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/<!--(?!-?>)[\s\S]*?-->/,H.html=B(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=B(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=B(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=B(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=B(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:B(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};z.punctuation=B(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=B(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=B(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=B(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=B(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=B(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=B(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=B(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=B(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=B(z._blockSkip,"g").getRegex(),z.overlapSkip=B(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,z.autolink=B(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=B(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=B(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=B(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=B(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=U({},z),z.pedantic=U({},z.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:B(z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),z.gfm.url=B(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex(),z.breaks=U({},z.gfm,{br:B(z.br).replace("{2,}","*").getRegex(),text:B(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var G={block:H,inline:z},V=r.defaults,W=G.block,K=G.inline;function q(t){return t.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function X(t){var e,n,r="",i=t.length;for(e=0;e<i;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Y=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:W.normal,inline:K.normal};this.options.pedantic?(e.block=W.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=W.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,n){return new e(n).lex(t)};var n,r,i,o=e.prototype;return o.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(t,e,n){var r,i,o,a;for(void 0===e&&(e=[]),void 0===n&&(n=!0),t=t.replace(/^ +$/gm,"");t;)if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),r.type&&e.push(r);else if(r=this.tokenizer.code(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((a=e[e.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.nptable(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),e.push(r);else if(r=this.tokenizer.list(t)){for(t=t.substring(r.raw.length),o=r.items.length,i=0;i<o;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);e.push(r)}else if(r=this.tokenizer.html(t))t=t.substring(r.raw.length),e.push(r);else if(n&&(r=this.tokenizer.def(t)))t=t.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.lheading(t))t=t.substring(r.raw.length),e.push(r);else if(n&&(r=this.tokenizer.paragraph(t)))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.text(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((a=e[e.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(t){var s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return e},o.inline=function(t){var e,n,r,i,o,a,s=t.length;for(e=0;e<s;e++)switch((a=t[e]).type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},i=a.header.length,n=0;n<i;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(i=a.cells.length,n=0;n<i;n++)for(o=a.cells[n],a.tokens.cells[n]=[],r=0;r<o.length;r++)a.tokens.cells[n][r]=[],this.inlineTokens(o[r],a.tokens.cells[n][r]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,n=0;n<i;n++)this.inline(a.items[n].tokens)}return t},o.inlineTokens=function(t,e,n,r,i){var o;void 0===e&&(e=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i="");var a,s=t;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(o=this.tokenizer.escape(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.tag(t,n,r))t=t.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,e.push(o);else if(o=this.tokenizer.link(t))t=t.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),e.push(o);else if(o=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),e.push(o);else if(o=this.tokenizer.strong(t,s,i))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),e.push(o);else if(o=this.tokenizer.em(t,s,i))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),e.push(o);else if(o=this.tokenizer.codespan(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.br(t))t=t.substring(o.raw.length),e.push(o);else if(o=this.tokenizer.del(t))t=t.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),e.push(o);else if(o=this.tokenizer.autolink(t,X))t=t.substring(o.raw.length),e.push(o);else if(n||!(o=this.tokenizer.url(t,X))){if(o=this.tokenizer.inlineText(t,r,q))t=t.substring(o.raw.length),i=o.raw.slice(-1),e.push(o);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(o.raw.length),e.push(o);return e},n=e,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&t(n.prototype,r),i&&t(n,i),e}(),$=r.defaults,J=C,Z=x,Q=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return r?'<pre><code class="'+this.options.langPrefix+Z(r,!0)+'">'+(n?t:Z(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:Z(t,!0))+"</code></pre>\n"},e.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},e.html=function(t){return t},e.heading=function(t,e,n,r){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+r.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"},e.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},e.list=function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+r+">\n"},e.listitem=function(t){return"<li>"+t+"</li>\n"},e.checkbox=function(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},e.paragraph=function(t){return"<p>"+t+"</p>\n"},e.table=function(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"},e.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},e.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"},e.strong=function(t){return"<strong>"+t+"</strong>"},e.em=function(t){return"<em>"+t+"</em>"},e.codespan=function(t){return"<code>"+t+"</code>"},e.br=function(){return this.options.xhtml?"<br/>":"<br>"},e.del=function(t){return"<del>"+t+"</del>"},e.link=function(t,e,n){if(null===(t=J(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<a href="'+Z(t)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"},e.image=function(t,e,n){if(null===(t=J(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<img src="'+t+'" alt="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=this.options.xhtml?"/>":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,n){return""+n},e.image=function(t,e,n){return""+n},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var n=e;do{this.seen[n]++,e=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),nt=r.defaults,rt=S,it=function(){function t(t){this.options=t||nt,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,n){return new t(n).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,w="",x=t.length;for(n=0;n<x;n++)switch((h=t[n]).type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(h.tokens),h.depth,rt(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",l="",o=h.header.length,r=0;r<o;r++)l+=this.renderer.tablecell(this.parseInline(h.tokens.header[r]),{header:!0,align:h.align[r]});for(c+=this.renderer.tablerow(l),u="",o=h.cells.length,r=0;r<o;r++){for(l="",a=(s=h.tokens.cells[r]).length,i=0;i<a;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:h.align[i]});u+=this.renderer.tablerow(l)}w+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),w+=this.renderer.blockquote(u);continue;case"list":for(d=h.ordered,f=h.start,p=h.loose,o=h.items.length,u="",r=0;r<o;r++)v=(g=h.items[r]).checked,y=g.task,m="",g.task&&(b=this.renderer.checkbox(v),p?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,y,v);w+=this.renderer.list(u,d,f);continue;case"html":w+=this.renderer.html(h.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1<x&&"text"===t[n+1].type;)u+="\n"+((h=t[++n]).tokens?this.parseInline(h.tokens):h.text);w+=e?this.renderer.paragraph(u):u;continue;default:var S='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(S);throw new Error(S)}return w},e.parseInline=function(t,e){e=e||this.renderer;var n,r,i="",o=t.length;for(n=0;n<o;n++)switch((r=t[n]).type){case"escape":i+=e.text(r.text);break;case"html":i+=e.html(r.text);break;case"link":i+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":i+=e.image(r.href,r.title,r.text);break;case"strong":i+=e.strong(this.parseInline(r.tokens,e));break;case"em":i+=e.em(this.parseInline(r.tokens,e));break;case"codespan":i+=e.codespan(r.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(r.tokens,e));break;case"text":i+=e.text(r.text);break;default:var a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return i},t}(),ot=_,at=L,st=x,lt=r.getDefaults,ct=r.changeDefaults,ut=r.defaults;function ht(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),e=ot({},ht.defaults,e||{}),at(e),n){var r,i=e.highlight;try{r=Y.lex(t,e)}catch(t){return n(t)}var o=function(t){var o;if(!t)try{o=it.parse(r,e)}catch(e){t=e}return e.highlight=i,t?n(t):n(null,o)};if(!i||i.length<3)return o();if(delete e.highlight,!r.length)return o();var a=0;return ht.walkTokens(r,(function(t){"code"===t.type&&(a++,setTimeout((function(){i(t.text,t.lang,(function(e,n){if(e)return o(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),0==--a&&o()}))}),0))})),void(0===a&&o())}try{var s=Y.lex(t,e);return e.walkTokens&&ht.walkTokens(s,e.walkTokens),it.parse(s,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+st(t.message+"",!0)+"</pre>";throw t}}return ht.options=ht.setOptions=function(t){return ot(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=ot({},t);if(t.renderer&&function(){var n=ht.defaults.renderer||new Q,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=t.renderer[e].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}};for(var i in t.renderer)r(i);e.renderer=n}(),t.tokenizer&&function(){var n=ht.defaults.tokenizer||new P,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=t.tokenizer[e].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}};for(var i in t.tokenizer)r(i);e.tokenizer=n}(),t.walkTokens){var n=ht.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens(e),n&&n(e)}}ht.setOptions(e)},ht.walkTokens=function(t,e){for(var r,i=n(t);!(r=i()).done;){var o=r.value;switch(e(o),o.type){case"table":for(var a,s=n(o.tokens.header);!(a=s()).done;){var l=a.value;ht.walkTokens(l,e)}for(var c,u=n(o.tokens.cells);!(c=u()).done;)for(var h,d=n(c.value);!(h=d()).done;){var f=h.value;ht.walkTokens(f,e)}break;case"list":ht.walkTokens(o.items,e);break;default:o.tokens&&ht.walkTokens(o.tokens,e)}}},ht.Parser=it,ht.parser=it.parse,ht.Renderer=Q,ht.TextRenderer=tt,ht.Lexer=Y,ht.lexer=Y.lex,ht.Tokenizer=P,ht.Slugger=et,ht.parse=ht,ht}()},"DlR+":
/*!******************************************************!*\
!*** ./node_modules/store/storages/cookieStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!c(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){if(!t)return;a.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:l,clearAll:function(){s((function(t,e){l(e)}))}};var a=i.document;function s(t){for(var e=a.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(o(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function l(t){t&&c(t)&&(a.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},E4JC:
/*!******************************************!*\
!*** ./node_modules/crypto-js/rabbit.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(t,e){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},ELLl:
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=t.Pos;function r(t,n){return"pairs"==n&&"string"==typeof t?t:"object"==typeof t&&null!=t[n]?t[n]:e[n]}t.defineOption("autoCloseBrackets",!1,(function(e,n,a){a&&a!=t.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),n&&(o(r(n,"pairs")),e.state.closeBrackets=n,e.addKeyMap(i))}));var i={Backspace:function(e){var i=s(e);if(!i||e.getOption("disableInput"))return t.Pass;for(var o=r(i,"pairs"),a=e.listSelections(),c=0;c<a.length;c++){if(!a[c].empty())return t.Pass;var u=l(e,a[c].head);if(!u||o.indexOf(u)%2!=0)return t.Pass}for(c=a.length-1;c>=0;c--){var h=a[c].head;e.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(e){var n=s(e),i=n&&r(n,"explode");if(!i||e.getOption("disableInput"))return t.Pass;for(var o=e.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return t.Pass;var c=l(e,o[a].head);if(!c||i.indexOf(c)%2!=0)return t.Pass}e.operation((function(){var t=e.lineSeparator()||"\n";e.replaceSelection(t+t,null),e.execCommand("goCharLeft"),o=e.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;e.indentLine(r,null,!0),e.indentLine(r+1,null,!0)}}))}};function o(t){for(var e=0;e<t.length;e++){var n=t.charAt(e),r="'"+n+"'";i[r]||(i[r]=a(n))}}function a(e){return function(i){return function(e,i){var o=s(e);if(!o||e.getOption("disableInput"))return t.Pass;var a=r(o,"pairs"),l=a.indexOf(i);if(-1==l)return t.Pass;for(var u,h=r(o,"closeBefore"),d=r(o,"triples"),f=a.charAt(l+1)==i,p=e.listSelections(),m=l%2==0,g=0;g<p.length;g++){var v,y=p[g],b=y.head,w=e.getRange(b,n(b.line,b.ch+1));if(m&&!y.empty())v="surround";else if(!f&&m||w!=i)if(f&&b.ch>1&&d.indexOf(i)>=0&&e.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(n(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var x=0==b.ch?" ":e.getRange(n(b.line,b.ch-1),b);if(t.isWordChar(w)||x==i||t.isWordChar(x))return t.Pass;v="both"}else{if(!m||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(i)>=0&&e.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var S=l%2?a.charAt(l-1):i,E=l%2?i:a.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)e.execCommand("goCharRight");else if("surround"==u){var i=e.getSelections();for(r=0;r<i.length;r++)i[r]=S+i[r]+E;for(e.replaceSelections(i,"around"),i=e.listSelections().slice(),r=0;r<i.length;r++)i[r]=(o=i[r],a=void 0,a=t.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});e.setSelections(i)}else"both"==u?(e.replaceSelection(S+E,null),e.triggerElectric(S+E),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(S+S+S+S,"before"),e.execCommand("goCharRight"));var o,a}))}(i,e)}}function s(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var r=t.getRange(n(e.line,e.ch-1),n(e.line,e.ch+1));return 2==r.length?r:null}function c(t,e){var r=t.getTokenAt(n(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}o(e.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},ELcG:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/ripemd160.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,w,x,S,E,C,k,_,T,O=this._hash.words,A=h.words,L=d.words,D=s.words,I=l.words,R=c.words,M=u.words;for(S=o=O[0],E=a=O[1],C=f=O[2],k=w=O[3],_=x=O[4],n=0;n<80;n+=1)T=o+t[e+D[n]]|0,T+=n<16?p(a,f,w)+A[0]:n<32?m(a,f,w)+A[1]:n<48?g(a,f,w)+A[2]:n<64?v(a,f,w)+A[3]:y(a,f,w)+A[4],T=(T=b(T|=0,R[n]))+x|0,o=x,x=w,w=b(f,10),f=a,a=T,T=S+t[e+I[n]]|0,T+=n<16?y(E,C,k)+L[0]:n<32?v(E,C,k)+L[1]:n<48?g(E,C,k)+L[2]:n<64?m(E,C,k)+L[3]:p(E,C,k)+L[4],T=(T=b(T|=0,M[n]))+_|0,S=_,_=k,k=b(C,10),C=E,E=T;T=O[1]+f+k|0,O[1]=O[2]+w+_|0,O[2]=O[3]+x+S|0,O[3]=O[4]+o+E|0,O[4]=O[0]+a+C|0,O[0]=T},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function g(t,e,n){return(t|~e)^n}function v(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function b(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(f),e.HmacRIPEMD160=o._createHmacHelper(f)}(Math),r.RIPEMD160)},ETIr:
/*!**********************************************!*\
!*** ./node_modules/crypto-js/enc-base64.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o;t.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return function(t,e,n){for(var r=[],o=0,a=0;a<e;a++)if(a%4){var s=n[t.charCodeAt(a-1)]<<a%4*2,l=n[t.charCodeAt(a)]>>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"F+F2":
/*!***************************************************!*\
!*** ./node_modules/crypto-js/lib-typedarrays.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)}).prototype=t}}(),r.lib.WordArray)},GRuw:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha224.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l;t.exports=(l=n(/*! ./core */"Ib8C"),n(/*! ./sha256 */"lPiR"),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},GfqC:
/*!********************************************************!*\
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o);function s(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function l(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){n.append(e+"[]",t)})):n.append(e,t.data[e])})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot "+t.method+" "+t.action+" "+e.status+"'",r=new Error(n);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),s(e)):t.onSuccess(s(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(n),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=t.type||"",o=i.replace(/\/.*$/,"");return n.some((function(t){var e,n,a=t.trim();return"."===a.charAt(0)?(e=r.toLowerCase(),n=a.toLowerCase(),-1!==e.indexOf(n,e.length-n.length)):/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a}))}return!0};var f=function(t,e,n){var r=function t(r,i){i=i||"",r.isFile?r.file((function(t){n(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var n=t.createReader(),r=[];!function t(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?e(r):t()}))}()}(r,(function(e){e.forEach((function(e){t(e,""+i+r.name+"/")}))}))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},m=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var w=function(t){function e(){var t,n,r;y(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=b(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),r.state={uid:h()},r.reqs={},r.onChange=function(t){var e=t.target.files;r.uploadFiles(e),r.reset()},r.onClick=function(t){var e=r.fileInput;if(e){var n=r.props,i=n.children,o=n.onClick;i&&"button"===i.type&&(e.parentNode.focus(),e.parentNode.querySelector("button").blur()),e.click(),o&&o(t)}},r.onKeyDown=function(t){"Enter"===t.key&&r.onClick()},r.onFileDrop=function(t){var e=r.props.multiple;if(t.preventDefault(),"dragover"!==t.type)if(r.props.directory)f(Array.prototype.slice.call(t.dataTransfer.items),r.uploadFiles,(function(t){return d(t,r.props.accept)}));else{var n=Array.prototype.slice.call(t.dataTransfer.files).filter((function(t){return d(t,r.props.accept)}));!1===e&&(n=n.slice(0,1)),r.uploadFiles(n)}},r.uploadFiles=function(t){var e=Array.prototype.slice.call(t);e.map((function(t){return t.uid=h(),t})).forEach((function(t){r.upload(t,e)}))},r.saveFileInput=function(t){r.fileInput=t},b(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),g(e,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(t,e){var n=this,r=this.props;if(!r.beforeUpload)return setTimeout((function(){return n.post(t)}),0);var i=r.beforeUpload(t,e);i&&i.then?i.then((function(e){var r=Object.prototype.toString.call(e);return"[object File]"===r||"[object Blob]"===r?n.post(e):n.post(t)})).catch((function(t){console.log(t)})):!1!==i&&setTimeout((function(){return n.post(t)}),0)}},{key:"post",value:function(t){var e=this;if(this._isMounted){var n=this.props,r=n.onStart,i=n.onProgress,o=n.transformFile,a=void 0===o?function(t){return t}:o;new Promise((function(e){var r=n.action;return"function"==typeof r&&(r=r(t)),e(r)})).then((function(o){var s=t.uid,c=n.customRequest||l;Promise.resolve(a(t)).then((function(t){var e=n.data;return"function"==typeof e&&(e=e(t)),Promise.all([t,e])})).catch((function(t){console.error(t)})).then((function(a){var l=m(a,2),u=l[0],h=l[1],d={action:o,filename:n.name,data:h,file:u,headers:n.headers,withCredentials:n.withCredentials,method:n.method||"post",onProgress:i?function(e){i(e,t)}:null,onSuccess:function(r,i){delete e.reqs[s],n.onSuccess(r,t,i)},onError:function(r,i){delete e.reqs[s],n.onError(r,i,t)}};r(t),e.reqs[s]=c(d)}))}))}}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(t){var e=this.reqs;if(t){var n=t;t&&t.uid&&(n=t.uid),e[n]&&e[n].abort&&e[n].abort(),delete e[n]}else Object.keys(e).forEach((function(t){e[t]&&e[t].abort&&e[t].abort(),delete e[t]}))}},{key:"render",value:function(){var t,e,n=this.props,r=n.component,o=n.prefixCls,s=n.className,l=n.disabled,c=n.id,u=n.style,h=n.multiple,d=n.accept,f=n.children,m=n.directory,g=n.openFileDialogOnClick,y=n.onMouseEnter,b=n.onMouseLeave,w=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),x=a()((v(t={},o,!0),v(t,o+"-disabled",l),v(t,s,s),t)),S=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},S,{className:x,role:"button",style:u}),i.a.createElement("input",p({},(e=w,Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(r.Component),x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},S=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function k(){}var _=function(t){function e(){var t,n,r;E(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=C(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),r.saveUploader=function(t){r.uploader=t},C(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),S(e,[{key:"abort",value:function(t){this.uploader.abort(t)}},{key:"render",value:function(){return i.a.createElement(w,x({},this.props,{ref:this.saveUploader}))}}]),e}(r.Component);_.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:k,onError:k,onSuccess:k,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var T=_;e.a=T},HmJG:
/*!****************************************************************!*\
!*** ./src/components/markdown-editor/upload-image/index.less ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},IBYe:
/*!**************************************************!*\
!*** ./node_modules/rc-table/es/sugar/Column.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";e.a=function(t){return null}},Ib8C:
/*!****************************************!*\
!*** ./node_modules/crypto-js/core.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){(function(e){var r;t.exports=(r=r||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e&&e.crypto&&(i=e.crypto),!i)try{i=n(/*! crypto */4)}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},l=s.lib={},c=l.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=l.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new u.init(e,t)}}),h=s.enc={},d=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(n,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(n,e)}},p=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,c=t.min(4*l,o);if(l){for(var h=0;h<l;h+=a)this._doProcessBlock(i,h);n=i.splice(0,l),r.sigBytes-=c}return new u.init(n,c)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(l.Hasher=m.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},J66h:
/*!******************************************!*\
!*** ./node_modules/js-base64/base64.js ***!
\******************************************/
/*! no static exports found */
/*! exports used: Base64 */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){(function(n){var r;!function(n,i){t.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(t){for(var e={},n=0,r=t.length;n<r;n++)e[t.charAt(n)]=n;return e}(a),l=String.fromCharCode,c=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(t){return t.replace(u,c)},d=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),e>=2?"=":a.charAt(n>>>6&63),e>=1?"=":a.charAt(63&n)].join("")},f=n.btoa&&"function"==typeof n.btoa?function(t){return n.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,d)},p=function(t){return f(h(String(t)))},m=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},g=function(t,e){return e?m(p(t)):p(t)};n.Uint8Array&&(i=function(t,e){for(var n="",r=0,i=t.length;r<i;r+=3){var o=t[r],s=t[r+1],l=t[r+2],c=o<<16|s<<8|l;n+=a.charAt(c>>>18)+a.charAt(c>>>12&63)+(void 0!==s?a.charAt(c>>>6&63):"=")+(void 0!==l?a.charAt(63&c):"=")}return e?m(n):n});var v,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return l(55296+(e>>>10))+l(56320+(1023&e));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},w=function(t){return t.replace(y,b)},x=function(t){var e=t.length,n=e%4,r=(e>0?s[t.charAt(0)]<<18:0)|(e>1?s[t.charAt(1)]<<12:0)|(e>2?s[t.charAt(2)]<<6:0)|(e>3?s[t.charAt(3)]:0),i=[l(r>>>16),l(r>>>8&255),l(255&r)];return i.length-=[0,0,2,1][n],i.join("")},S=n.atob&&"function"==typeof n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/\S{1,4}/g,x)},E=function(t){return S(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},k=function(t){return function(t){return w(S(t))}(C(t))};n.Uint8Array&&(v=function(t){return Uint8Array.from(E(C(t)),(function(t){return t.charCodeAt(0)}))});var _=function(){var t=n.Base64;return n.Base64=o,t};if(n.Base64={VERSION:"2.6.4",atob:E,btoa:f,fromBase64:k,toBase64:g,utob:h,encode:g,encodeURI:function(t){return g(t,!0)},btou:w,decode:k,noConflict:_,fromUint8Array:i,toUint8Array:v},"function"==typeof Object.defineProperty){var T=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",T((function(){return k(this)}))),Object.defineProperty(String.prototype,"toBase64",T((function(t){return g(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",T((function(){return g(this,!0)})))}}n.Meteor&&(Base64=n.Base64);t.exports?t.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(e,[]))||(t.exports=r);return{Base64:n.Base64}}(n)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this)}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},JYp7:
/*!*******************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/iterator.js ***!
\*******************************************************************/
/*! exports provided: FIN, Iterator, ChainableIterator, getSequenceIterator, ArrayIterator, ArrayNavigator, MappedIterator */
/*! exports used: ArrayIterator, ArrayNavigator, FIN, Iterator, MappedIterator, getSequenceIterator */function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return i})),n.d(e,"f",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return h}));var r,i,o=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a={done:!0,value:void 0};!function(t){var e={next:function(){return a}};t.empty=function(){return e},t.single=function(t){var e=!1;return{next:function(){return e?a:(e=!0,{done:!1,value:t})}}},t.fromArray=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.length),{next:function(){return e>=n?a:{done:!1,value:t[e++]}}}},t.fromNativeIterator=function(t){return{next:function(){var e=t.next();return e.done?a:{done:!1,value:e.value}}}},t.from=function(e){return e?Array.isArray(e)?t.fromArray(e):e:t.empty()},t.map=function(t,e){return{next:function(){var n=t.next();return n.done?a:{done:!1,value:e(n.value)}}}},t.filter=function(t,e){return{next:function(){for(;;){var n=t.next();if(n.done)return a;if(e(n.value))return{done:!1,value:n.value}}}}},t.forEach=function(t,e){for(var n=t.next();!n.done;n=t.next())e(n.value)},t.collect=function(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY);var n=[];if(0===e)return n;for(var r=0,i=t.next();!i.done&&(n.push(i.value),!(++r>=e));i=t.next());return n},t.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=0;return{next:function(){if(n>=t.length)return a;var e=t[n].next();return e.done?(n++,this.next()):e}}},t.chain=function(t){return new s(t)}}(i||(i={}));var s=function(){function t(t){this.it=t}return t.prototype.next=function(){return this.it.next()},t}();function l(t){return Array.isArray(t)?i.fromArray(t):t||i.empty()}var c=function(){function t(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=e-1),this.items=t,this.start=e,this.end=n,this.index=r}return t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},t.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},t}(),u=function(t){function e(e,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=e.length),void 0===i&&(i=n-1),t.call(this,e,n,r,i)||this}return o(e,t),e.prototype.current=function(){return t.prototype.current.call(this)},e.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.last=function(){return this.index=this.end-1,this.current()},e.prototype.parent=function(){return null},e}(c),h=function(){function t(t,e){this.iterator=t,this.fn=e}return t.prototype.next=function(){return this.fn(this.iterator.next())},t}()},K3mO:
/*!******************************************!*\
!*** ./node_modules/crypto-js/evpkdf.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l,c,u;t.exports=(u=n(/*! ./core */"Ib8C"),n(/*! ./sha1 */"3y9D"),n(/*! ./hmac */"WYAk"),i=(r=u).lib,o=i.Base,a=i.WordArray,s=r.algo,l=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,l=r.keySize,c=r.iterations;s.length<l;){n&&i.update(n),n=i.update(t).finalize(e),i.reset();for(var u=1;u<c;u++)n=i.finalize(n),i.reset();o.concat(n)}return o.sigBytes=4*l,o}}),r.EvpKDF=function(t,e,n){return c.create(n).compute(t,e)},u.EvpKDF)},KhGG:
/*!*********************************************!*\
!*** ./src/components/UploadFile/index.tsx ***!
\*********************************************/
/*! exports provided: decrypt, uploadFile, UploadFile, default */
/*! exports used: decrypt, default, uploadFile */function(t,e,n){"use strict";n.d(e,"a",(function(){return E})),n.d(e,"c",(function(){return C}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),u=(n(/*! antd/es/upload/style */"DZo9"),n(/*! antd/es/upload */"8z0m")),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(h),f=n(/*! react */"q1tI"),p=n.n(f),m=n(/*! @/utils/fetch */"ErOA"),g=n(/*! crypto-js */"NFKh"),v=n.n(g),y=n(/*! uuid */"7Cbv"),b=n(/*! umi */"9kvl"),w=n(/*! ali-oss */"mxV5"),x=n.n(w),S=u.a.Dragger,E=function(t){var e=v.a.enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),n=v.a.enc.Utf8.parse("5183666c72eec9e4"),r=v.a.AES.decrypt(t,e,{iv:n,mode:v.a.mode.CBC});return r.toString(v.a.enc.Utf8)},C=function(){var t=Object(c.a)(d.a.mark((function t(e,n,r){var i,o,a,s,c,u,h,f,p;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.file_name=e.name,t.next=3,Object(m.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return h=t.sent,console.log("decrypt(res.data):",E(h.data)),h.data=JSON.parse(E(h.data)),f=Object(y.a)(),p=new x.a({endpoint:null==h||null===(i=h.data)||void 0===i?void 0:i.end_point,region:null==h||null===(o=h.data)||void 0===o?void 0:o.region,accessKeyId:null==h||null===(a=h.data)||void 0===a?void 0:a.access_key_id,accessKeySecret:null==h||null===(s=h.data)||void 0===s?void 0:s.access_key_secret,bucket:null==h||null===(c=h.data)||void 0===c?void 0:c.bucket,stsToken:null==h||null===(u=h.data)||void 0===u?void 0:u.security_token}),t.abrupt("return",new Promise((function(t,i){var o;p.multipartUpload("".concat(f),new Blob([e],{type:e.type}),Object(l.a)(Object(l.a)({timeout:2e5,partSize:102400},r),{},{callback:{url:null==h||null===(o=h.data)||void 0===o?void 0:o.callback_url,host:null==h?void 0:h.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}})).then((function(n){var r;e.response=null===(r=n.data)||void 0===r?void 0:r.data,t(null==n?void 0:n.data)})).catch((function(t){i(t),console.log("err:",t)}))})));case 9:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}();e.b=Object(b.a)((function(t){var e=t.loading,n=t.globalSetting,r=t.user;return{globalSetting:n,loading:e.models.competitions,user:r}}))((function(t){var e,n=t.user,l=t.cancelUpload,u=Object(s.a)(t,["user","cancelUpload"]),h=Object(f.useState)([]),g=Object(a.a)(h,2),v=g[0],b=g[1],w=Object(f.useState)(),C=Object(a.a)(w,2),k=C[0],_=C[1],T={onRemove:function(t){b(Object(o.a)(v.filter((function(e){return e.name!==t.name})))),u.onChange(v.filter((function(e){return e.name!==t.name})))},disabled:u.disabled,multiple:!0,fileList:null==v?void 0:v.map((function(t){return t.file})),customRequest:function(){},beforeUpload:(e=Object(c.a)(d.a.mark((function t(e){var n;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=u.maxSize||1073741824,!v.filter((function(t){return t.name===e.name})).length){t.next=4;break}return i.b.info("".concat(e.name,"已存在,请重新选择")),t.abrupt("return");case 4:if(!((null==e?void 0:e.size)>n)){t.next=7;break}return i.b.info("文件超过".concat(n/1024/1024/1024,"GB不符合上传要求")),t.abrupt("return",!1);case 7:return v.push({name:e.name,file:e}),b(Object(o.a)(v)),u.onChange(v),t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},O=function(){var t=Object(c.a)(d.a.mark((function t(e,n){var r,a,s,l,c,h,f,p,g;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.file_name=e.name,f=e.name,t.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((p=t.sent).data=JSON.parse(E(p.data)),0===(null==p?void 0:p.status)){t.next=12;break}return v[v.findIndex((function(t){return t.name===f}))].status="error",v[v.findIndex((function(t){return t.name===f}))].file.status="error",u.onChange(v),i.b.warn("上传失败,请重新尝试"),t.abrupt("return");case 12:return k=new x.a({endpoint:null==p||null===(r=p.data)||void 0===r?void 0:r.end_point,region:null==p||null===(a=p.data)||void 0===a?void 0:a.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(l=p.data)||void 0===l?void 0:l.access_key_secret,bucket:null==p||null===(c=p.data)||void 0===c?void 0:c.bucket,stsToken:null==p||null===(h=p.data)||void 0===h?void 0:h.security_token}),console.log(e,"file"),_(k),g=Object(y.a)(),t.abrupt("return",new Promise((function(t,r){try{var a;k.multipartUpload("".concat(u.identifier,"/").concat(g).concat(f.indexOf(".")>-1?"."+f.split(".").pop():""),new Blob([e.file],{type:e.file.type}),{timeout:36e5,partSize:1002400,progress:function(t,e,n){try{console.log("进度",t,e,n);var r=v.findIndex((function(t){return t.name===f}));v[r].file.percent=100*t,v[r].tempCheckpoint=e,b(Object(o.a)(v))}catch(t){}},checkpoint:v[v.findIndex((function(t){return t.name===f}))].tempCheckpoint,callback:{customValue:{id:f+""},url:null==p||null===(a=p.data)||void 0===a?void 0:a.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}}).then((function(n){var r,o=v.findIndex((function(t){return t.name===f})),a="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var s;e.response=null===(s=n.data)||void 0===s?void 0:s.data;var l=v.findIndex((function(t){return t.name===f}));v[l].status="done",v[l].file.status="done"}else{var c;i.b.warn(null===(c=n.data)||void 0===c?void 0:c.message),a="error"}v[o].status=a,v[o].file.status=a,u.onChange(v),t(null==n?void 0:n.data)})).catch((function(t){v[v.findIndex((function(t){return t.name===f}))].status="error",v[v.findIndex((function(t){return t.name===f}))].file.status="error",i.b.warn("上传失败,请重新尝试"),b(Object(o.a)(v)),u.onChange(v),r(t),console.log("err:",t)}))}catch(t){}})));case 17:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return Object(f.useEffect)((function(){v.every((function(t){return"done"===t||"error"===t}))&&u.onComplete(v)}),[v]),Object(f.useEffect)((function(){var t;l&&(null===(t=k)||void 0===t||t.cancel())}),[l]),Object(f.useEffect)((function(){u.uploading&&v.map(function(){var t=Object(c.a)(d.a.mark((function t(e){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.status&&"error"!==e.status||l){t.next=6;break}return e.status="uploading",e.file.status="uploading",t.next=5,O(e,{login:null==n||null===(r=n.userInfo)||void 0===r?void 0:r.login,container_type:u.container_type,container_id:u.container_id,description:u.description});case 5:t.sent;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}),[u.uploading]),p.a.createElement(S,Object(r.a)({},T,{height:u.height,className:u.className}),p.a.createElement("p",{className:"ant-upload-hint"},u.text||"拖拽文件或者点击上传"))}))},KmYQ:
/*!***************************************************!*\
!*** ./node_modules/crypto-js/pad-zeropadding.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},L9qf:
/*!*********************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/ManageModal/index.less?modules ***!
\*********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:
/*!********************************************************!*\
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: Option, OptGroup, default */
/*! exports used: OptGroup, Option, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"b",(function(){return x})),n.d(e,"a",(function(){return E}));var r=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(t,e){var n=t.prefixCls,r=t.id,i=t.flattenOptions,o=t.childrenAsData,a=t.values,p=t.searchValue,y=t.multiple,b=t.defaultActiveFirstOption,w=t.height,x=t.itemHeight,S=t.notFoundContent,E=t.open,C=t.menuItemSelectedIcon,k=t.virtual,_=t.onSelect,T=t.onToggleOpen,O=t.onActiveValue,A=t.onScroll,L=t.onMouseEnter,D="".concat(n,"-item"),I=Object(f.a)((function(){return i}),[E,i],(function(t,e){return e[0]&&t[1]!==e[1]})),R=s.useRef(null),M=function(t){t.preventDefault()},N=function(t){R.current&&R.current.scrollTo({index:t})},j=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r<n;r+=1){var i=(t+r*e+n)%n,o=I[i],a=o.group,s=o.data;if(!a&&!s.disabled)return i}return-1},P=s.useState((function(){return j(0)})),F=Object(u.a)(P,2),B=F[0],U=F[1],H=function(t){U(t);var e=I[t];e?O(e.data.value,t):O(null,-1)};s.useEffect((function(){H(!1!==b?j(0):-1)}),[I.length,p]),s.useEffect((function(){var t=setTimeout((function(){if(!y&&E&&1===a.size){var t=Array.from(a)[0],e=I.findIndex((function(e){return e.data.value===t}));H(e),N(e)}}));return function(){return clearTimeout(t)}}),[E]);var z=function(t){void 0!==t&&_(t,{selected:!a.has(t)}),y||T(!1)};if(s.useImperativeHandle(e,(function(){return{onKeyDown:function(t){var e=t.which;switch(e){case h.a.UP:case h.a.DOWN:var n=0;if(e===h.a.UP?n=-1:e===h.a.DOWN&&(n=1),0!==n){var r=j(B+n,n);N(r),H(r)}break;case h.a.ENTER:var i=I[B];i&&!i.data.disabled?z(i.data.value):z(void 0),E&&t.preventDefault();break;case h.a.ESC:T(!1)}},onKeyUp:function(){},scrollTo:function(t){N(t)}}})),0===I.length)return s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(D,"-empty"),onMouseDown:M},S);function G(t){var e=I[t];if(!e)return null;var n=e.data||{},i=n.value,l=n.label,c=n.children,u=Object(d.a)(n,!0),h=o?c:l;return e?s.createElement("div",Object.assign({"aria-label":"string"==typeof h?h:null},u,{key:t,role:"option",id:"".concat(r,"_list_").concat(t),"aria-selected":a.has(i)}),i):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},G(B-1),G(B),G(B+1)),s.createElement(g.a,{itemKey:"key",ref:R,data:I,height:w,itemHeight:x,fullHeight:!1,onMouseDown:M,onScroll:A,virtual:k,onMouseEnter:L},(function(t,e){var n,r=t.group,i=t.groupOption,u=t.data,h=u.label,d=u.key;if(r)return s.createElement("div",{className:m()(D,"".concat(D,"-group"))},void 0!==h?h:d);var f=u.disabled,p=u.value,g=u.title,y=u.children,b=u.style,w=u.className,x=Object(c.a)(u,["disabled","value","title","children","style","className"]),S=a.has(p),E="".concat(D,"-option"),k=m()(D,E,w,(n={},Object(l.a)(n,"".concat(E,"-grouped"),i),Object(l.a)(n,"".concat(E,"-active"),B===e&&!f),Object(l.a)(n,"".concat(E,"-disabled"),f),Object(l.a)(n,"".concat(E,"-selected"),S),n)),_=o?y:h,T=!C||"function"==typeof C||S;return s.createElement("div",Object.assign({},x,{"aria-selected":S,className:k,title:g,onMouseMove:function(){B===e||f||H(e)},onClick:function(){f||z(p)},style:b}),s.createElement("div",{className:"".concat(E,"-content")},_||p),s.isValidElement(C)||S,T&&s.createElement(v.a,{className:"".concat(D,"-option-state"),customizeIcon:C,customizeIconProps:{isSelected:S}},S?"✓":null))})))}));y.displayName="OptionList";var b=y,w=function(){return null};w.isSelectOption=!0;var x=w,S=function(){return null};S.isSelectOptGroup=!0;var E=S,C=n("VTBJ"),k=n("Zm9Q");function _(t){var e=t.key,n=t.props,r=n.children,i=n.value,o=Object(c.a)(n,["children","value"]);return Object(C.a)({key:e,value:void 0!==i?i:e,children:r},o)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(t).map((function(t,n){if(!s.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,i=t.key,o=t.props,a=o.children,l=Object(c.a)(o,["children"]);return e||!r?_(t):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(a)})})).filter((function(t){return t}))}var O=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),I=n("WKfj");var R=function(t){var e=t.mode,n=t.options,r=t.children,i=t.backfill,o=t.allowClear,a=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,m=t.inputValue,g=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=n||T(r);if(Object(D.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var w=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(D.a)(!w,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==e||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===e||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==e||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var x=Object(I.d)(p);Object(D.a)(!f||x.every((function(t){return"object"===Object(L.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var S=null;Object(k.a)(r).some((function(t){if(!s.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(k.a)(t.props.children).every((function(e){return!(s.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(S=e.type,!1)})):(S=e,!0))})),S&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(S.displayName||S.name||S,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:O.d,getLabeledValue:O.e,filterOptions:O.b,isValueDisabled:O.g,findValueOption:O.c,warningProps:R,fillOptionsWithMissingValue:O.a}),N=function(t){Object(o.a)(n,t);var e=Object(a.a)(n);function n(){var t;return Object(r.a)(this,n),(t=e.apply(this,arguments)).selectRef=s.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);N.Option=x,N.OptGroup=E;var j=N;e.c=j},M8RZ:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(t){Object(o.a)(n,t);var e=Object(a.a)(n);function n(t){var i;Object(r.a)(this,n),i=e.call(this,t);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MFOe:
/*!****************************************!*\
!*** ./node_modules/store/src/util.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){(function(e){var n=Object.assign?Object.assign:function(t,e,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(e,n){t[n]=e}));return t},r=function(){if(Object.create)return function(t,e,r,i){var o=a(arguments,1);return n.apply(this,[Object.create(t)].concat(o))};{function t(){}return function(e,r,i,o){var s=a(arguments,1);return t.prototype=e,n.apply(this,[new t].concat(s))}}}(),i=String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function a(t,e){return Array.prototype.slice.call(t,e||0)}function s(t,e){l(t,(function(t,n){return e(t,n),!1}))}function l(t,e){if(c(t)){for(var n=0;n<t.length;n++)if(e(t[n],n))return t[n]}else for(var r in t)if(t.hasOwnProperty(r)&&e(t[r],r))return t[r]}function c(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length}t.exports={assign:n,create:r,trim:i,bind:function(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(t,e){var n=c(t)?[]:{};return l(t,(function(t,r){return n[r]=e(t,r),!1})),n},pluck:l,isList:c,isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},isObject:function(t){return t&&"[object Object]"==={}.toString.call(t)},Global:o}}).call(this,n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},MI8n:
/*!****************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/event.js ***!
\****************************************************************/
/*! exports provided: Event, Emitter, PauseableEmitter, EventMultiplexer, EventBufferer, Relay */
/*! exports used: Emitter, Event, EventBufferer, EventMultiplexer, PauseableEmitter, Relay */function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return u})),n.d(e,"e",(function(){return h})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return f})),n.d(e,"f",(function(){return p}));var r,i,o=n(/*! ./errors.js */"/cxE"),a=n(/*! ./functional.js */"C/vA"),s=n(/*! ./lifecycle.js */"pmY6"),l=n(/*! ./linkedList.js */"24hK"),c=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});!function(t){function e(t){return function(e,n,r){void 0===n&&(n=null);var i,o=!1;return i=t((function(t){if(!o)return i?i.dispose():o=!0,e.call(n,t)}),null,r),o&&i.dispose(),i}}function n(t,e){return a((function(n,r,i){return void 0===r&&(r=null),t((function(t){return n.call(r,e(t))}),null,i)}))}function r(t,e){return a((function(n,r,i){return void 0===r&&(r=null),t((function(t){e(t),n.call(r,t)}),null,i)}))}function i(t,e){return a((function(n,r,i){return void 0===r&&(r=null),t((function(t){return e(t)&&n.call(r,t)}),null,i)}))}function o(t,e,r){var i=r;return n(t,(function(t){return i=e(i,t)}))}function a(t){var e,n=new u({onFirstListenerAdd:function(){e=t(n.fire,n)},onLastListenerRemove:function(){e.dispose()}});return n.event}function l(t,e,n,r,i){var o;void 0===n&&(n=100),void 0===r&&(r=!1);var a=void 0,s=void 0,l=0,c=new u({leakWarningThreshold:i,onFirstListenerAdd:function(){o=t((function(t){l++,a=e(a,t),r&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var t=a;a=void 0,s=void 0,(!r||l>1)&&c.fire(t),l=0}),n)}))},onLastListenerRemove:function(){o.dispose()}});return c.event}function c(t){var e,n=!0;return i(t,(function(t){var r=n||t!==e;return n=!1,e=t,r}))}t.None=function(){return s.a.None},t.once=e,t.map=n,t.forEach=r,t.filter=i,t.signal=function(t){return t},t.any=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n,r){return void 0===n&&(n=null),s.e.apply(void 0,t.map((function(t){return t((function(t){return e.call(n,t)}),null,r)})))}},t.reduce=o,t.snapshot=a,t.debounce=l,t.stopwatch=function(t){var r=(new Date).getTime();return n(e(t),(function(t){return(new Date).getTime()-r}))},t.latch=c,t.buffer=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[]);var r=n.slice(),i=t((function(t){r?r.push(t):a.fire(t)})),o=function(){r&&r.forEach((function(t){return a.fire(t)})),r=null},a=new u({onFirstListenerAdd:function(){i||(i=t((function(t){return a.fire(t)})))},onFirstListenerDidAdd:function(){r&&(e?setTimeout(o):o())},onLastListenerRemove:function(){i&&i.dispose(),i=null}});return a.event};var h=function(){function t(t){this.event=t}return t.prototype.map=function(e){return new t(n(this.event,e))},t.prototype.forEach=function(e){return new t(r(this.event,e))},t.prototype.filter=function(e){return new t(i(this.event,e))},t.prototype.reduce=function(e,n){return new t(o(this.event,e,n))},t.prototype.latch=function(){return new t(c(this.event))},t.prototype.debounce=function(e,n,r,i){return void 0===n&&(n=100),void 0===r&&(r=!1),new t(l(this.event,e,n,r,i))},t.prototype.on=function(t,e,n){return this.event(t,e,n)},t.prototype.once=function(t,n,r){return e(this.event)(t,n,r)},t}();t.chain=function(t){return new h(t)},t.fromNodeEventEmitter=function(t,e,n){void 0===n&&(n=function(t){return t});var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.fire(n.apply(void 0,t))},i=new u({onFirstListenerAdd:function(){return t.on(e,r)},onLastListenerRemove:function(){return t.removeListener(e,r)}});return i.event},t.fromDOMEventEmitter=function(t,e,n){void 0===n&&(n=function(t){return t});var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.fire(n.apply(void 0,t))},i=new u({onFirstListenerAdd:function(){return t.addEventListener(e,r)},onLastListenerRemove:function(){return t.removeEventListener(e,r)}});return i.event},t.fromPromise=function(t){var e=new u,n=!1;return t.then(void 0,(function(){return null})).then((function(){n?e.fire(void 0):setTimeout((function(){return e.fire(void 0)}),0)})),n=!0,e.event},t.toPromise=function(t){return new Promise((function(n){return e(t)(n)}))}}(i||(i={}));!function(){function t(t,e){void 0===e&&(e=Math.random().toString(18).slice(2,5)),this.customThreshold=t,this.name=e,this._warnCountdown=0}t.prototype.dispose=function(){this._stacks&&this._stacks.clear()},t.prototype.check=function(t){var e=this,n=-1;if("number"==typeof this.customThreshold&&(n=this.customThreshold),!(n<=0||t<n)){this._stacks||(this._stacks=new Map);var r=(new Error).stack.split("\n").slice(3).join("\n"),i=this._stacks.get(r)||0;if(this._stacks.set(r,i+1),this._warnCountdown-=1,this._warnCountdown<=0){var o;this._warnCountdown=.5*n;var a=0;this._stacks.forEach((function(t,e){(!o||a<t)&&(o=e,a=t)})),console.warn("["+this.name+"] potential listener LEAK detected, having "+t+" listeners already. MOST frequent listener ("+a+"):"),console.warn(o)}return function(){var t=e._stacks.get(r)||0;e._stacks.set(r,t-1)}}}}();var u=function(){function t(t){this._disposed=!1,this._options=t,this._leakageMon=void 0}return Object.defineProperty(t.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(n,r,i){e._listeners||(e._listeners=new l.a);var o=e._listeners.isEmpty();o&&e._options&&e._options.onFirstListenerAdd&&e._options.onFirstListenerAdd(e);var a,c,u=e._listeners.push(r?[n,r]:n);return o&&e._options&&e._options.onFirstListenerDidAdd&&e._options.onFirstListenerDidAdd(e),e._options&&e._options.onListenerDidAdd&&e._options.onListenerDidAdd(e,n,r),e._leakageMon&&(a=e._leakageMon.check(e._listeners.size)),c={dispose:function(){(a&&a(),c.dispose=t._noop,e._disposed)||(u(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}},i instanceof s.b?i.add(c):Array.isArray(i)&&i.push(c),c}),this._event},enumerable:!0,configurable:!0}),t.prototype.fire=function(t){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new l.a);for(var e=this._listeners.iterator(),n=e.next();!n.done;n=e.next())this._deliveryQueue.push([n.value,t]);for(;this._deliveryQueue.size>0;){var r=this._deliveryQueue.shift(),i=r[0],a=r[1];try{"function"==typeof i?i.call(void 0,a):i[0].call(i[1],a)}catch(n){Object(o.e)(n)}}}},t.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},t._noop=function(){},t}(),h=function(t){function e(e){var n=t.call(this,e)||this;return n._isPaused=0,n._eventQueue=new l.a,n._mergeFn=e&&e.merge,n}return c(e,t),e.prototype.pause=function(){this._isPaused++},e.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var e=this._eventQueue.toArray();this._eventQueue.clear(),t.prototype.fire.call(this,this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)t.prototype.fire.call(this,this._eventQueue.shift())},e.prototype.fire=function(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):t.prototype.fire.call(this,e))},e}(u),d=function(){function t(){var t=this;this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:function(){return t.onFirstListenerAdd()},onLastListenerRemove:function(){return t.onLastListenerRemove()}})}return Object.defineProperty(t.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this,n={event:t,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return Object(s.h)(Object(a.a)((function(){e.hasListeners&&e.unhook(n);var t=e.events.indexOf(n);e.events.splice(t,1)})))},t.prototype.onFirstListenerAdd=function(){var t=this;this.hasListeners=!0,this.events.forEach((function(e){return t.hook(e)}))},t.prototype.onLastListenerRemove=function(){var t=this;this.hasListeners=!1,this.events.forEach((function(e){return t.unhook(e)}))},t.prototype.hook=function(t){var e=this;t.listener=t.event((function(t){return e.emitter.fire(t)}))},t.prototype.unhook=function(t){t.listener&&t.listener.dispose(),t.listener=null},t.prototype.dispose=function(){this.emitter.dispose()},t}(),f=function(){function t(){this.buffers=[]}return t.prototype.wrapEvent=function(t){var e=this;return function(n,r,i){return t((function(t){var i=e.buffers[e.buffers.length-1];i?i.push((function(){return n.call(r,t)})):n.call(r,t)}),void 0,i)}},t.prototype.bufferEvents=function(t){var e=[];this.buffers.push(e);var n=t();return this.buffers.pop(),e.forEach((function(t){return t()})),n},t}(),p=function(){function t(){var t=this;this.listening=!1,this.inputEvent=i.None,this.inputEventListener=s.a.None,this.emitter=new u({onFirstListenerDidAdd:function(){t.listening=!0,t.inputEventListener=t.inputEvent(t.emitter.fire,t.emitter)},onLastListenerRemove:function(){t.listening=!1,t.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(t.prototype,"input",{set:function(t){this.inputEvent=t,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=t(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},t}()},MlIO:
/*!********************************************!*\
!*** ./node_modules/crypto-js/x64-core.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l;t.exports=(l=n(/*! ./core */"Ib8C"),i=(r=l).lib,o=i.Base,a=i.WordArray,(s=r.x64={}).Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var i=t[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var t=o.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;r<n;r++)e[r]=e[r].clone();return t}}),l)},N0LK:
/*!******************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/strings.js ***!
\******************************************************************/
/*! exports provided: isFalsyOrWhitespace, pad, format, escape, escapeRegExpCharacters, trim, ltrim, rtrim, convertSimple2RegExpPattern, startsWith, endsWith, createRegExp, regExpLeadsToEndlessLoop, regExpFlags, firstNonWhitespaceIndex, getLeadingWhitespace, lastNonWhitespaceIndex, compare, compareIgnoreCase, isLowerAsciiLetter, isUpperAsciiLetter, equalsIgnoreCase, startsWithIgnoreCase, commonPrefixLength, commonSuffixLength, isHighSurrogate, isLowSurrogate, getNextCodePoint, nextCharLength, prevCharLength, containsRTL, containsEmoji, isBasicASCII, containsFullWidthCharacter, isFullWidthCharacter, isEmojiImprecise, UTF8_BOM_CHARACTER, startsWithUTF8BOM, safeBtoa, repeat, containsUppercaseCharacter, singleLetterHash, getGraphemeBreakType, breakBetweenGraphemeBreakType */
/*! exports used: UTF8_BOM_CHARACTER, breakBetweenGraphemeBreakType, commonPrefixLength, commonSuffixLength, compare, compareIgnoreCase, containsEmoji, containsFullWidthCharacter, containsRTL, containsUppercaseCharacter, convertSimple2RegExpPattern, createRegExp, endsWith, equalsIgnoreCase, escape, escapeRegExpCharacters, firstNonWhitespaceIndex, format, getGraphemeBreakType, getLeadingWhitespace, getNextCodePoint, isBasicASCII, isEmojiImprecise, isFalsyOrWhitespace, isFullWidthCharacter, isHighSurrogate, isLowSurrogate, isLowerAsciiLetter, isUpperAsciiLetter, lastNonWhitespaceIndex, nextCharLength, pad, prevCharLength, regExpFlags, regExpLeadsToEndlessLoop, repeat, rtrim, safeBtoa, singleLetterHash, startsWith, startsWithIgnoreCase, startsWithUTF8BOM, trim */function(t,e,n){"use strict";function r(t){return!t||"string"!=typeof t||0===t.trim().length}function i(t,e,n){void 0===n&&(n="0");for(var r=""+t,i=[r],o=r.length;o<e;o++)i.push(n);return i.reverse().join("")}n.d(e,"x",(function(){return r})),n.d(e,"F",(function(){return i})),n.d(e,"r",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"p",(function(){return l})),n.d(e,"Q",(function(){return c})),n.d(e,"K",(function(){return u})),n.d(e,"k",(function(){return h})),n.d(e,"N",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"I",(function(){return m})),n.d(e,"H",(function(){return g})),n.d(e,"q",(function(){return v})),n.d(e,"t",(function(){return y})),n.d(e,"D",(function(){return b})),n.d(e,"e",(function(){return w})),n.d(e,"f",(function(){return x})),n.d(e,"B",(function(){return S})),n.d(e,"C",(function(){return E})),n.d(e,"n",(function(){return k})),n.d(e,"O",(function(){return T})),n.d(e,"c",(function(){return O})),n.d(e,"d",(function(){return A})),n.d(e,"z",(function(){return L})),n.d(e,"A",(function(){return D})),n.d(e,"u",(function(){return I})),n.d(e,"E",(function(){return M})),n.d(e,"G",(function(){return N})),n.d(e,"i",(function(){return P})),n.d(e,"g",(function(){return B})),n.d(e,"v",(function(){return H})),n.d(e,"h",(function(){return z})),n.d(e,"y",(function(){return G})),n.d(e,"w",(function(){return V})),n.d(e,"a",(function(){return W})),n.d(e,"P",(function(){return K})),n.d(e,"L",(function(){return q})),n.d(e,"J",(function(){return X})),n.d(e,"j",(function(){return Y})),n.d(e,"M",(function(){return $})),n.d(e,"s",(function(){return J})),n.d(e,"b",(function(){return Z}));var o=/{(\d+)}/g;function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return 0===e.length?t:t.replace(o,(function(t,n){var r=parseInt(n,10);return isNaN(r)||r<0||r>=e.length?t:e[r]}))}function s(t){return t.replace(/[<>&]/g,(function(t){switch(t){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return t}}))}function l(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function c(t,e){return void 0===e&&(e=" "),u(function(t,e){if(!t||!e)return t;var n=e.length;if(0===n||0===t.length)return t;var r=0;for(;t.indexOf(e,r)===r;)r+=n;return t.substring(r)}(t,e),e)}function u(t,e){if(!t||!e)return t;var n=e.length,r=t.length;if(0===n||0===r)return t;for(var i=r,o=-1;-1!==(o=t.lastIndexOf(e,i-1))&&o+n===i;){if(0===o)return"";i=o}return t.substring(0,i)}function h(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(t,e){if(t.length<e.length)return!1;if(t===e)return!0;for(var n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function f(t,e){var n=t.length-e.length;return n>0?t.indexOf(e,n)===n:0===n&&t===e}function p(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("Cannot create regex from empty string");e||(t=l(t)),n.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t+="\\b"));var r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),n.unicode&&(r+="u"),new RegExp(t,r)}function m(t){return"^"!==t.source&&"^$"!==t.source&&"$"!==t.source&&"^\\s*$"!==t.source&&!(!t.exec("")||0!==t.lastIndex)}function g(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")}function v(t){for(var e=0,n=t.length;e<n;e++){var r=t.charCodeAt(e);if(32!==r&&9!==r)return e}return-1}function y(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);for(var r=e;r<n;r++){var i=t.charCodeAt(r);if(32!==i&&9!==i)return t.substring(e,r)}return t.substring(e,n)}function b(t,e){void 0===e&&(e=t.length-1);for(var n=e;n>=0;n--){var r=t.charCodeAt(n);if(32!==r&&9!==r)return n}return-1}function w(t,e){return t<e?-1:t>e?1:0}function x(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.charCodeAt(r),o=e.charCodeAt(r);if(i!==o){E(i)&&(i+=32),E(o)&&(o+=32);var a=i-o;if(0!==a)return S(i)&&S(o)?a:w(t.toLowerCase(),e.toLowerCase())}}return t.length<e.length?-1:t.length>e.length?1:0}function S(t){return t>=97&&t<=122}function E(t){return t>=65&&t<=90}function C(t){return S(t)||E(t)}function k(t,e){return t.length===e.length&&_(t,e)}function _(t,e,n){void 0===n&&(n=t.length);for(var r=0;r<n;r++){var i=t.charCodeAt(r),o=e.charCodeAt(r);if(i!==o)if(C(i)&&C(o)){var a=Math.abs(i-o);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function T(t,e){var n=e.length;return!(e.length>t.length)&&_(t,e,n)}function O(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n++)if(t.charCodeAt(n)!==e.charCodeAt(n))return n;return r}function A(t,e){var n,r=Math.min(t.length,e.length),i=t.length-1,o=e.length-1;for(n=0;n<r;n++)if(t.charCodeAt(i-n)!==e.charCodeAt(o-n))return n;return r}function L(t){return 55296<=t&&t<=56319}function D(t){return 56320<=t&&t<=57343}function I(t,e,n){var r=t.charCodeAt(n);if(L(r)&&n+1<e){var i=t.charCodeAt(n+1);if(D(i))return i-56320+(r-55296<<10)+65536}return r}function R(t,e){var n=t.charCodeAt(e-1);if(D(n)&&e>1){var r=t.charCodeAt(e-2);if(L(r))return n-56320+(r-55296<<10)+65536}return n}function M(t,e){var n=Q.getInstance(),r=e,i=t.length,o=I(t,i,e);e+=o>=65536?2:1;for(var a=n.getGraphemeBreakType(o);e<i;){var s=I(t,i,e),l=n.getGraphemeBreakType(s);if(Z(a,l))break;e+=s>=65536?2:1,a=l}return e-r}function N(t,e){var n=Q.getInstance(),r=e,i=R(t,e);e-=i>=65536?2:1;for(var o=n.getGraphemeBreakType(i);e>0;){var a=R(t,e),s=n.getGraphemeBreakType(a);if(Z(s,o))break;e-=a>=65536?2:1,o=s}return r-e}var j=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function P(t){return j.test(t)}var F=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function B(t){return F.test(t)}var U=/^[\t\n\r\x20-\x7E]*$/;function H(t){return U.test(t)}function z(t){for(var e=0,n=t.length;e<n;e++)if(G(t.charCodeAt(e)))return!0;return!1}function G(t){return(t=+t)>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374}function V(t){return t>=127462&&t<=127487||t>=9728&&t<=10175||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129003||t>=129280&&t<=129535||t>=129648&&t<=129651||t>=129656&&t<=129666||t>=129680&&t<=129685}var W=String.fromCharCode(65279);function K(t){return!!(t&&t.length>0&&65279===t.charCodeAt(0))}function q(t){return btoa(encodeURIComponent(t))}function X(t,e){for(var n="",r=0;r<e;r++)n+=t;return n}function Y(t,e){return void 0===e&&(e=!1),!!t&&(e&&(t=t.replace(/\\./g,"")),t.toLowerCase()!==t)}function $(t){return(t%=52)<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}function J(t){return Q.getInstance().getGraphemeBreakType(t)}function Z(t,e){return 0===t?5!==e&&7!==e:(2!==t||3!==e)&&(4===t||2===t||3===t||(4===e||2===e||3===e||(8!==t||8!==e&&9!==e&&11!==e&&12!==e)&&((11!==t&&9!==t||9!==e&&10!==e)&&((12!==t&&10!==t||10!==e)&&(5!==e&&13!==e&&(7!==e&&(1!==t&&((13!==t||14!==e)&&(6!==t||6!==e)))))))))}var Q=function(){function t(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}return t.getInstance=function(){return t._INSTANCE||(t._INSTANCE=new t),t._INSTANCE},t.prototype.getGraphemeBreakType=function(t){if(t<32)return 10===t?3:13===t?2:4;if(t<127)return 0;for(var e=this._data,n=e.length/3,r=1;r<=n;)if(t<e[3*r])r*=2;else{if(!(t>e[3*r+1]))return e[3*r+2];r=2*r+1}return 0},t._INSTANCE=null,t}()},NFKh:
/*!*****************************************!*\
!*** ./node_modules/crypto-js/index.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),n(/*! ./lib-typedarrays */"F+F2"),n(/*! ./enc-utf16 */"qM6L"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./enc-base64url */"wbyO"),n(/*! ./md5 */"cv67"),n(/*! ./sha1 */"3y9D"),n(/*! ./sha256 */"lPiR"),n(/*! ./sha224 */"GRuw"),n(/*! ./sha512 */"1uat"),n(/*! ./sha384 */"uGsb"),n(/*! ./sha3 */"5hvy"),n(/*! ./ripemd160 */"ELcG"),n(/*! ./hmac */"WYAk"),n(/*! ./pbkdf2 */"e7zE"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),n(/*! ./mode-cfb */"ALsQ"),n(/*! ./mode-ctr */"9OqN"),n(/*! ./mode-ctr-gladman */"qu8F"),n(/*! ./mode-ofb */"S6kV"),n(/*! ./mode-ecb */"gb/T"),n(/*! ./pad-ansix923 */"qBft"),n(/*! ./pad-iso10126 */"oRuE"),n(/*! ./pad-iso97971 */"jO9C"),n(/*! ./pad-zeropadding */"KmYQ"),n(/*! ./pad-nopadding */"uGxW"),n(/*! ./format-hex */"bQjk"),n(/*! ./aes */"wZgz"),n(/*! ./tripledes */"pA7S"),n(/*! ./rc4 */"w7YG"),n(/*! ./rabbit */"E4JC"),n(/*! ./rabbit-legacy */"PVpz"),r)},NvD2:
/*!******************************************************!*\
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
\******************************************************/
/*! exports provided: isCheckDisabled, conductCheck */
/*! exports used: conductCheck */function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(t,e){var n=new Set;return t.forEach((function(t){e.has(t)||n.add(t)})),n}function o(t){var e=t||{},n=e.disabled,r=e.disableCheckbox,i=e.checkable;return!(!n&&!r)||!1===i}function a(t,e,n,a){var s,l=[];s=a||o;var c=new Set(t.filter((function(t){var e=!!n[t];return e||l.push(t),e}))),u=new Map,h=0;return Object.keys(n).forEach((function(t){var e=n[t],r=e.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(e),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(t){return"'".concat(t,"'")})).join(", "))),!0===e?function(t,e,n,r){for(var o=new Set(t),a=new Set,s=0;s<=n;s+=1){(e.get(s)||new Set).forEach((function(t){var e=t.key,n=t.node,i=t.children,a=void 0===i?[]:i;o.has(e)&&!r(n)&&a.filter((function(t){return!r(t.node)})).forEach((function(t){o.add(t.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(e.get(c)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!r(n)&&t.parent&&!l.has(t.parent.key))if(r(t.parent.node))l.add(e.key);else{var i=!0,s=!1;(e.children||[]).filter((function(t){return!r(t.node)})).forEach((function(t){var e=t.key,n=o.has(e);i&&!n&&(i=!1),s||!n&&!a.has(e)||(s=!0)})),i&&o.add(e.key),s&&a.add(e.key),l.add(e.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(a,o))}}(c,u,h,s):function(t,e,n,r,o){for(var a=new Set(t),s=new Set(e),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(t){var e=t.key,n=t.node,r=t.children,i=void 0===r?[]:r;a.has(e)||s.has(e)||o(n)||i.filter((function(t){return!o(t.node)})).forEach((function(t){a.delete(t.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(t){var e=t.parent,n=t.node;if(!o(n)&&t.parent&&!c.has(t.parent.key))if(o(t.parent.node))c.add(e.key);else{var r=!0,i=!1;(e.children||[]).filter((function(t){return!o(t.node)})).forEach((function(t){var e=t.key,n=a.has(e);r&&!n&&(r=!1),i||!n&&!s.has(e)||(i=!0)})),r||a.delete(e.key),i&&s.add(e.key),c.add(e.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(s,a))}}(c,e.halfCheckedKeys,u,h,s)}},OLod:
/*!***********************************************!*\
!*** ./node_modules/crypto-js/cipher-core.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./evpkdf */"K3mO"),void(r.lib.Cipher||function(t){var e=r,n=e.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=e.enc,l=(s.Utf8,s.Base64),c=e.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:v}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),h=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),d=n.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),f=h.CBC=function(){var t=d.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),t}(),p=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var l=o.create(a,r);t.concat(l)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},m=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var t;u.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(e):e).toString(l)},parse:function(t){var e,n=l.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:e})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),y=(e.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=o.random(8));var i=c.create({keySize:e+n}).compute(t,r),a=o.create(i.words.slice(e),4*n);return i.sigBytes=4*e,m.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,v.decrypt.call(this,t,e,i.key,r)}})}()))},OZM5:
/*!*****************************************!*\
!*** ./node_modules/rc-tree/es/util.js ***!
\*****************************************/
/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */
/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"g",(function(){return h})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function a(t,e){var n=t.slice(),r=n.indexOf(e);return r>=0&&n.splice(r,1),n}function s(t,e){var n=t.slice();return-1===n.indexOf(e)&&n.push(e),n}function l(t){return t.split("-")}function c(t,e){return"".concat(t,"-").concat(e)}function u(t){return t&&t.type&&t.type.isTreeNode}function h(t,e){var n=[t];return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){var r=e.key,i=e.children;n.push(r),t(i)}))}(e[t].children),n}function d(t,e){var n=t.clientY,r=e.selectHandle.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.height,s=Math.max(.25*a,2);return n<=i+s?-1:n>=o-s?1:0}function f(t,e){if(t)return e.multiple?t.slice():t.length?[t[0]]:t}function p(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(t))return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0}}return e}function m(t,e){var n=new Set;return(t||[]).forEach((function(t){!function t(r){if(!n.has(r)){var i=e[r];if(i){n.add(r);var o=i.parent;i.node.disabled||o&&t(o.key)}}}(t)})),Object(r.a)(n)}function g(t){var e={};return Object.keys(t).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(e[n]=t[n])})),e}},Ot1p:
/*!**************************************************************!*\
!*** ./src/components/markdown-editor/index.tsx + 6 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),o=(n("miYZ"),n("tsqr")),a=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(t){var e=t.value,n=void 0===e?"":e,r=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),w=n("m3rI"),x=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function S(t){var e=t.onActionCallback,n=t.title,r=t.icon,i=t.actionName,o=t.className,a=void 0===o?"":o,s=t.children;return d.a.createElement("a",{title:n,className:a,onClick:function(){e(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var E=function(t){var e=t.watch,n=t.showNullButton,r=t.onActionCallback,i=t.fullScreen,o=t.insertTemp,a=t.hidetoolBar,s=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(s,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var l=[].concat(x,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(S,Object(y.a)({},t,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(S,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&d.a.createElement("li",null,d.a.createElement(S,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(S,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},C=n("M8RZ"),k=(n("+L6B"),n("2/Rp")),_=(n("y8nQ"),n("Vl3Y")),T=(n("5NDa"),n("5rEg")),O={labelCol:{span:4},wrapperCol:{span:20}},A=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(_.a,Object(y.a)({},O,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(_.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(T.a,null)),d.a.createElement(_.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(T.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(k.a,{type:"ghost",onClick:n},"取消")))},L=n("7ahc"),D=n("k1fw"),I=(n("HmJG"),n("BjJ7")),R=_.a.useForm,M={width:280,marginRight:10},N={labelCol:{span:5},wrapperCol:{span:19}},j=function(t){var e=t.callback,n=t.onCancel,r=R(),i=Object(s.a)(r,1)[0],o=Object(h.useRef)();function a(t,e){i.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(_.a,Object(y.a)({form:i},N,{className:"upload-image-panel",onFinish:function(t){e(Object(D.a)(Object(D.a)({},t),{},{name:o.current}))}}),d.a.createElement(_.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(_.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(T.a,{style:M})),d.a.createElement(P,{onFileChange:function(t){var e=t.target.files[0];o.current=e.name,F(e,a)}}))),d.a.createElement(_.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(T.a,{style:{width:264}})),d.a.createElement(_.a.Item,{style:{textAlign:"right"}},d.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(k.a,{type:"ghost",onClick:n},"取消")))};function P(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function F(t,e){if(!t)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",t),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){e(JSON.parse(n.target.responseText),t)}),!1),r.addEventListener("error",(function(t){console.error(t)}),!1),r.open("POST","".concat(I.a,"/api/attachments.json")),r.send(n)}n("giR+");var B,U,H=n("fyUT"),z=(n("7Kak"),n("9yH6")),G=z.a.Group,V={margin:"0 8px"},W=function(t){var e=t.callback,n=t.onCancel;return d.a.createElement(_.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:V},"单元格数:"),d.a.createElement("span",{style:V},"行数"),d.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:V},"列数"),d.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:V},"对齐方式:"),d.a.createElement(_.a.Item,{name:"align"},d.a.createElement(G,null,d.a.createElement(z.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(z.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(z.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(z.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(k.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),q=n("7Cbv"),X="------------",Y={default:X,left:":".concat(X),center:":".concat(X,":"),right:"".concat(X,":")},$=n("9VGf");function J(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Z=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Q=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(B={},Object(l.a)(B,Z+"-B","bold"),Object(l.a)(B,Z+"-I","italic"),B),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,n=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,x=void 0===b?400:b,S=t.miniToolbar,k=void 0!==S&&S,_=t.isFocus,T=void 0!==_&&_,O=t.watch,D=t.insertTemp,I=t.mode,R=void 0===I?"markdown":I,M=t.id,N=void 0===M?"markdown-editor-id":M,P=t.showResizeBar,B=void 0!==P&&P,U=t.noStorage,H=void 0!==U&&U,z=t.showNullButton,G=void 0!==z&&z,V=t.hidetoolBar,X=void 0!==V&&V,Z=t.fullScreen,nt=void 0!==Z&&Z,rt=t.onBlur,it=t.onCMBeforeChange,ot=t.onFullScreen,at=t.className,st=void 0===at?"":at,lt=t.disablePaste,ct=void 0!==lt&&lt,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),mt=Object(s.a)(pt,2),gt=mt[0],vt=mt[1],yt=Object(h.useState)(n),bt=Object(s.a)(yt,2),wt=bt[0],xt=bt[1],St=Object(h.useState)(O),Et=Object(s.a)(St,2),Ct=Et[0],kt=Et[1],_t=Object(h.useState)(nt),Tt=Object(s.a)(_t,2),Ot=Tt[0],At=Tt[1],Lt=Object(h.useState)(""),Dt=Object(s.a)(Lt,2),It=Dt[0],Rt=Dt[1],Mt=Object(h.useState)(0),Nt=Object(s.a)(Mt,2),jt=Nt[0],Pt=Nt[1],Ft=Object(h.useState)(x),Bt=Object(s.a)(Ft,2),Ut=Bt[0],Ht=Bt[1],zt=Object(h.useState)(!1),Gt=Object(s.a)(zt,2),Vt=(Gt[0],Gt[1]),Wt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Xt=Object(h.useRef)(),Yt=Object(h.useRef)(),$t=Object(h.useRef)(),Jt=Object(h.useRef)(),Zt=function(){var t=Object(a.a)(u.a.mark((function t(){var e,n;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Wt.current}});case 2:null!=(n=t.sent)&&null!==(e=n.attachments)&&void 0!==e&&e.length&&(console.log("cm:",gt,Xt),n.attachments.map((function(t){t.content_type.indexOf("image")>-1?gt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?gt.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):t.content_type.indexOf("pdf")>-1?gt.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,'&disposition=inline" target="_blank">').concat(t.name,"</a>")):gt.replaceSelection("[".concat(t.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){xt(ft),null==gt||gt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==ot||ot(Ot)}),[Ot]),Object(h.useEffect)((function(){if(Xt.current){var t=p.a.fromTextArea(Xt.current,{mode:R,lineNumbers:!k,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,n){if(!ct){var r=n.clipboardData;if(r){var i=r.types.toString(),a=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==R)return;try{var s,l=a[1];"file"===(null===(s=a[0])||void 0===s?void 0:s.kind)&&(l=a[0]);var c=l.getAsFile(),u=c.name.split(".").pop();F(c,(function(e){var n,r,i;e.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):Q.includes(u)?t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):t.replaceSelection("[".concat(c.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return T&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Yt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Yt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,n){var r;if(Yt.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(e){var n=r[e],i=n.name.split(".").pop();F(n,(function(e){var r,o,a;e.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(n.type,'&disposition=inline" target="_blank">').concat(n.name,"</a>")):Q.includes(i)?t.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(n.name,"</a>")):t.replaceSelection("[".concat(n.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},o=0;o<r.length;o++)i(o)}})),vt(t),function(){t.off("paste",e)}}}),[]);var Qt=Object(h.useCallback)((function(){Yt.current}),[Ut,Yt,Ot]);Object(h.useEffect)((function(){if(gt){var t=function(){var t=new m.default((function(t){var e,n=Object(i.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(Qt(),gt.setSize("100%","100%"),gt.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe(Xt.current.parentElement),t}();return function(){t.unobserve(Xt.current.parentElement)}}}),[gt,Qt]),Object(h.useEffect)((function(){if(gt){for(var t=[],e=function(){var e=r[n],i=(o=Object(s.a)(e,2))[0],a=o[1],c=Object(l.a)({},i,(function(){te(a)}));t.push(c),gt.addKeyMap(c)},n=0,r=Object.entries(tt);n<r.length;n++){var o;e()}return qt.current=setInterval((function(){Kt.current&&Zt()}),4e3),function(){clearInterval(qt.current);var e,n=Object(i.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;gt.removeKeyMap(r)}}catch(t){n.e(t)}finally{n.f()}}}}),[gt]),Object(h.useEffect)((function(){nt!==Ot&&At(nt)}),[nt]),Object($.a)((function(){if(!H&&jt>0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(N);t>=jt+1e4&&(!e||e!==wt)&&(window.sessionStorage.setItem(N,wt),Vt(!0))}}),1e4),Object(h.useEffect)((function(){kt(O)}),[gt,O]),Object(h.useEffect)((function(){gt&&T&&gt.focus()}),[gt,T]),Object(h.useEffect)((function(){if(Ct&&gt){var t=gt.getScrollerElement();function e(t){var e=t.target;if(Jt.current){var n=e.scrollTop/e.scrollHeight;Jt.current.scrollTop=Jt.current.scrollHeight*n}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[gt,Ct]),Object(h.useEffect)((function(){if(gt&&it){function t(t,e){it(t,e)}return gt.on("beforeChange",t),function(){gt.off("beforeChange",t)}}}),[gt,it]),Object(h.useEffect)((function(){if(gt&&rt){function t(){rt(gt.getValue())}return gt.on("blur",t),function(){gt.off("blur",t)}}}),[gt,rt]),Object(h.useEffect)((function(){if(gt){function t(t){var e=t.getValue();xt(e),Pt((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return gt.on("change",t),function(){gt.off("change",t)}}}),[gt,c]),Object(h.useEffect)((function(){gt&&(null==n?(gt.setValue(""),xt("")):n!==gt.getValue()&&(gt.setValue(n),xt(n),gt.setCursor(gt.lineCount(),0)))}),[gt,n]);var te=Object(h.useCallback)((function(t){var e=gt.getCursor(),n=gt.getSelection(),r=n.split("\n");switch(t){case"bold":return gt.replaceSelection("**"+n+"**"),""===n&&gt.setCursor(e.line,e.ch+2),gt.focus();case"italic":return gt.replaceSelection("*"+n+"*"),""===n&&gt.setCursor(e.line,e.ch+1),gt.focus();case"code":return gt.replaceSelection("`"+n+"`"),""===n&&gt.setCursor(e.line,e.ch+1),gt.focus();case"inline-latex":return gt.replaceSelection("`$$"+n+"$$`"),""===n&&gt.setCursor(e.line,e.ch+3),gt.focus();case"latex":return gt.replaceSelection("```latex\n"+n+"\n```"),gt.setCursor(e.line+1,n.length+1),gt.focus();case"line-break":return gt.replaceSelection("<br/>\n"),gt.focus();case"list-ul":return""===n?gt.replaceSelection("- "+n):gt.replaceSelection(r.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),gt.focus();case"list-ol":return""===n?gt.replaceSelection("1. "+n):gt.replaceSelection(r.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),gt.focus();case"add-null-ch":return""===n&&gt.setCursor(e.line,e.ch+1),gt.replaceSelection("▁"),gt.focus();case"inster-template-1":return""===n&&gt.setCursor(e.line,e.ch),gt.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),gt.focus();case"eraser":return gt.setValue(""),gt.focus();case"trigger-watch":return kt(!Ct),gt.focus();case"trigger-full-screen":return At(!Ot),gt.focus();case"link":return void Rt("link");case"code-block":return void Rt("code-block");case"upload-image":return void Rt("upload-image");case"add-table":return void Rt("add-table");default:throw new Error}}),[gt,Ct,Ot]),ee=Object(h.useCallback)((function(t){switch(Rt(""),It){case"link":var e=t.title,n=t.link;return gt.replaceSelection("[".concat(e,"](").concat(n,")")),gt.focus();case"code-block":var r=t.language,i=t.content;return gt.replaceSelection(["```"+r,i,"```"].join("\n")),gt.focus();case"upload-image":var o=t.src,a=t.alt,s=t.name;return o.indexOf("type=image")>-1?gt.replaceSelection("![ ".concat(a||""," ]( ").concat(o,' "').concat(a||"",'" )')):o.indexOf("type=application/pdf")>-1?gt.replaceSelection('<a href="'.concat(o,'&disposition=inline" target="_blank">').concat(s,"</a>")):gt.replaceSelection('<a href="'.concat(o,'" target="_blank">').concat(s,"</a>")),gt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d<l;d++){for(var f=[],p=[],m=0;m<c;m++)1===d&&p.push(Y[u]),f.push(" ");1===d&&(h+="| ".concat(p.join(" | ")," |\n")),h+="| ".concat(f.join(1===c?"":" | ")," |\n")}return gt.replaceSelection(h+"\n"),gt.focus();default:throw new Error}}),[gt,It]),ne=Object(h.useMemo)((function(){switch(It){case"link":return d.a.createElement(A,{callback:ee,onCancel:re});case"code-block":return d.a.createElement(L.b,{callback:ee,onCancel:re});case"upload-image":return d.a.createElement(j,{callback:ee,onCancel:re});case"add-table":return d.a.createElement(W,{callback:ee,onCancel:re});default:return null}}),[It]);function re(){Rt("")}Object(h.useEffect)((function(){if($t.current){var t=$t.current,e=!1,n=0;function r(t){e=!0,n=t.pageY}function i(){e=!1}function o(t){if(e){var r=t.pageY-n;r<0&&(r=0),r>300&&(r=300),Ht(x+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",o),document.addEventListener("mouseup",i),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)}}}),[gt,$t]),Object(h.useEffect)((function(){Ht(x)}),[x]);var ie={width:J(y),height:J(Ut)};Object(h.useMemo)((function(){if(jt){var t=new Date(jt),e=t.getHours(),n=t.getMinutes(),r=t.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(r)}return 0}),[jt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Yt},d.a.createElement("div",{className:"markdown-editor-container ".concat(st," ").concat(Ct?"on-preview":""," ").concat(k?"mini":""," ").concat(Ot?"full-screen":""),style:ie},d.a.createElement(E,{insertTemp:D,watch:Ct,fullScreen:Ot,showNullButton:G,onActionCallback:te,hidetoolBar:X,uuid:Wt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Xt,placeholder:ht})),Ct?d.a.createElement("div",{ref:Jt,className:"preview-container"},"stex"===R&&d.a.createElement(v,{value:wt}),"stex"!==R&&d.a.createElement(g.a,{edit:!0,value:wt,replaces:function(t,e){var n=gt.getValue();n=n.replace(t,e),xt(n),null==gt||gt.setValue(n)}})):null))),B?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(C.a,null,et[It]?d.a.createElement(r.a,{centered:!0,title:et[It],visible:!0,onCancel:re,footer:null},ne):null))}},PD8m:
/*!******************************************************!*\
!*** ./node_modules/store/storages/memoryStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports={name:"memoryStorage",read:function(t){return n[t]},write:function(t,e){n[t]=e},each:function(t){for(var e in n)n.hasOwnProperty(e)&&t(n[e],e)},remove:function(t){delete n[t]},clearAll:function(t){n={}}};var n={}},PVpz:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/rabbit-legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=h,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=h,r[6]^=u,r[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(t,e){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},QDVR:
/*!**************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/map.js ***!
\**************************************************************/
/*! exports provided: values, keys, StringIterator, PathIterator, TernarySearchTree, ResourceMap, LinkedMap, LRUCache */
/*! exports used: LRUCache, ResourceMap, TernarySearchTree, keys, values */function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var r,i=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=[];return t.forEach((function(t){return e.push(t)})),e}function a(t){var e=[];return t.forEach((function(t,n){return e.push(n)})),e}var s=function(){function t(){this._value="",this._pos=0}return t.prototype.reset=function(t){return this._value=t,this._pos=0,this},t.prototype.next=function(){return this._pos+=1,this},t.prototype.hasNext=function(){return this._pos<this._value.length-1},t.prototype.cmp=function(t){return t.charCodeAt(0)-this._value.charCodeAt(this._pos)},t.prototype.value=function(){return this._value[this._pos]},t}(),l=function(){function t(t){void 0===t&&(t=!0),this._splitOnBackslash=t}return t.prototype.reset=function(t){return this._value=t.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},t.prototype.hasNext=function(){return this._to<this._value.length},t.prototype.next=function(){this._from=this._to;for(var t=!0;this._to<this._value.length;this._to++){var e=this._value.charCodeAt(this._to);if(47===e||this._splitOnBackslash&&92===e){if(!t)break;this._from++}else t=!1}return this},t.prototype.cmp=function(t){for(var e=0,n=t.length,r=this._from;e<n&&r<this._to;){var i=t.charCodeAt(e)-this._value.charCodeAt(r);if(0!==i)return i;e+=1,r+=1}return n===this._to-this._from?0:e<n?-1:1},t.prototype.value=function(){return this._value.substring(this._from,this._to)},t}(),c=function(){},u=function(){function t(t){this._iter=t}return t.forPaths=function(){return new t(new l)},t.forStrings=function(){return new t(new s)},t.prototype.clear=function(){this._root=void 0},t.prototype.set=function(t,e){var n,r=this._iter.reset(t);for(this._root||(this._root=new c,this._root.segment=r.value()),n=this._root;;){var i=r.cmp(n.segment);if(i>0)n.left||(n.left=new c,n.left.segment=r.value()),n=n.left;else if(i<0)n.right||(n.right=new c,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new c,n.mid.segment=r.value()),n=n.mid}}var o=n.value;return n.value=e,n.key=t,o},t.prototype.get=function(t){for(var e=this._iter.reset(t),n=this._root;n;){var r=e.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!e.hasNext())break;e.next(),n=n.mid}}return n?n.value:void 0},t.prototype.findSubstr=function(t){for(var e=this._iter.reset(t),n=this._root,r=void 0;n;){var i=e.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!e.hasNext())break;e.next(),r=n.value||r,n=n.mid}}return n&&n.value||r},t.prototype.forEach=function(t){this._forEach(this._root,t)},t.prototype._forEach=function(t,e){t&&(this._forEach(t.left,e),t.value&&e(t.value,t.key),this._forEach(t.mid,e),this._forEach(t.right,e))},t}(),h=function(){function t(){this.map=new Map,this.ignoreCase=!1}return t.prototype.set=function(t,e){this.map.set(this.toKey(t),e)},t.prototype.get=function(t){return this.map.get(this.toKey(t))},t.prototype.toKey=function(t){var e=t.toString();return this.ignoreCase&&(e=e.toLowerCase()),e},t}(),d=function(t){function e(e,n){void 0===n&&(n=1);var r=t.call(this)||this;return r._limit=e,r._ratio=Math.min(Math.max(0,n),1),r}return i(e,t),e.prototype.get=function(e){return t.prototype.get.call(this,e,2)},e.prototype.peek=function(e){return t.prototype.get.call(this,e,0)},e.prototype.set=function(e,n){t.prototype.set.call(this,e,n,2),this.checkTrim()},e.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},e}(function(){function t(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return t.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),t.prototype.get=function(t,e){void 0===e&&(e=0);var n=this._map.get(t);if(n)return 0!==e&&this.touch(n,e),n.value},t.prototype.set=function(t,e,n){void 0===n&&(n=0);var r=this._map.get(t);if(r)r.value=e,0!==n&&this.touch(r,n);else{switch(r={key:t,value:e,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:default:this.addItemLast(r)}this._map.set(t,r),this._size++}},t.prototype.delete=function(t){return!!this.remove(t)},t.prototype.remove=function(t){var e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value},t.prototype.forEach=function(t,e){for(var n=this._head;n;)e?t.bind(e)(n.value,n.key,this):t(n.value,n.key,this),n=n.next},t.prototype.trimOld=function(t){if(!(t>=this.size))if(0!==t){for(var e=this._head,n=this.size;e&&n>t;)this._map.delete(e.key),e=e.next,n--;this._head=e,this._size=n,e&&(e.previous=void 0)}else this.clear()},t.prototype.addItemFirst=function(t){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");t.next=this._head,this._head.previous=t}else this._tail=t;this._head=t},t.prototype.addItemLast=function(t){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");t.previous=this._tail,this._tail.next=t}else this._head=t;this._tail=t},t.prototype.removeItem=function(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{var e=t.next,n=t.previous;if(!e||!n)throw new Error("Invalid list");e.previous=n,n.next=e}t.next=void 0,t.previous=void 0},t.prototype.touch=function(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===e||2===e)if(1===e){if(t===this._head)return;var n=t.next,r=t.previous;t===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t}else if(2===e){if(t===this._tail)return;n=t.next,r=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t}},t.prototype.toJSON=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),t},t}())},RELg:
/*!**************************************************************!*\
!*** ./node_modules/store/storages/oldIE-userDataStorage.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe").Global;t.exports={name:"oldIE-userDataStorage",write:function(t,e){if(a)return;var n=l(t);o((function(t){t.setAttribute(n,e),t.save("storejs")}))},read:function(t){if(a)return;var e=l(t),n=null;return o((function(t){n=t.getAttribute(e)})),n},each:function(t){o((function(e){for(var n=e.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];t(e.getAttribute(i.name),i.name)}}))},remove:function(t){var e=l(t);o((function(t){t.removeAttribute(e),t.save("storejs")}))},clearAll:function(){o((function(t){var e=t.XMLDocument.documentElement.attributes;t.load("storejs");for(var n=e.length-1;n>=0;n--)t.removeAttribute(e[n].name);t.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var t,e,n;try{(e=new ActiveXObject("htmlfile")).open(),e.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),e.close(),t=e.w.frames[0].document,n=t.createElement("div")}catch(e){n=i.createElement("div"),t=i.body}return function(e){var r=[].slice.call(arguments,0);r.unshift(n),t.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),e.apply(this,r),t.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(t){return t.replace(/^\d/,"___$&").replace(s,"___")}},S6kV:
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ofb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o;t.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},"SA+Z":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
\********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),o=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),a=n(/*! ./nonIterableRest.js */"wkBT");t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},SJMd:
/*!****************************************************!*\
!*** ./node_modules/code-prettify/src/prettify.js ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],n=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,n,r,i){if(n){var o={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:e,decorations:null};r(o),i.push.apply(i,o.decorations)}}var f=/\S/;function p(t){for(var e=void 0,n=t.firstChild;n;n=n.nextSibling){var r=n.nodeType;e=1===r?e?t:n:3===r&&f.test(n.nodeValue)?t:e}return e===t?void 0:e}function m(t,e){var n,r={};!function(){for(var i=t.concat(e),o=[],a={},s=0,l=i.length;s<l;++s){var c=i[s],u=c[3];if(u)for(var h=u.length;--h>=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;a.hasOwnProperty(f)||(o.push(d),a[f]=null)}o.push(/[\0-\uffff]/),n=function(t){for(var e=0,n=!1,r=!1,i=0,o=t.length;i<o;++i){if((d=t[i]).ignoreCase)r=!0;else if(/[a-z]/i.test(d.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var a={b:8,t:9,n:10,v:11,f:12,r:13};function s(t){var e=t.charCodeAt(0);if(92!==e)return e;var n=t.charAt(1);return(e=a[n])||("0"<=n&&n<="7"?parseInt(t.substring(1),8):"u"===n||"x"===n?parseInt(t.substring(2),16):t.charCodeAt(1))}function l(t){if(t<32)return(t<16?"\\x0":"\\x")+t.toString(16);var e=String.fromCharCode(t);return"\\"===e||"-"===e||"]"===e||"^"===e?"\\"+e:e}function c(t){var e=t.substring(1,t.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r="^"===e[0],i=["["];r&&i.push("^");for(var o=r?1:0,a=e.length;o<a;++o){var c=e[o];if(/\\[bdsw]/i.test(c))i.push(c);else{var u,h=s(c);o+2<a&&"-"===e[o+1]?(u=s(e[o+2]),o+=2):u=h,n.push([h,u]),u<65||h>122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(o=0;o<n.length;++o){(p=n[o])[0]<=f[1]+1?f[1]=Math.max(f[1],p[1]):d.push(f=p)}for(o=0;o<d.length;++o){var p=d[o];i.push(l(p[0])),p[1]>p[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(t){for(var r=t.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,o=[],a=0,s=0;a<i;++a){if("("===(h=r[a]))++s;else if("\\"===h.charAt(0)){(u=+h.substring(1))&&(u<=s?o[u]=-1:r[a]=l(u))}}for(a=1;a<o.length;++a)-1===o[a]&&(o[a]=++e);for(a=0,s=0;a<i;++a){if("("===(h=r[a]))o[++s]||(r[a]="(?:");else if("\\"===h.charAt(0)){var u;(u=+h.substring(1))&&u<=s&&(r[a]="\\"+o[u])}}for(a=0;a<i;++a)"^"===r[a]&&"^"!==r[a+1]&&(r[a]="");if(t.ignoreCase&&n)for(a=0;a<i;++a){var h,d=(h=r[a]).charAt(0);h.length>=2&&"["===d?r[a]=c(h):"\\"!==d&&(r[a]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return r.join("")}var h=[];for(i=0,o=t.length;i<o;++i){var d;if((d=t[i]).global||d.multiline)throw new Error(""+d);h.push("(?:"+u(d)+")")}return new RegExp(h.join("|"),r?"gi":"g")}(o)}();var i=e.length,o=function(t){for(var a=t.sourceCode,s=t.basePos,l=t.sourceNode,c=[s,"pln"],u=0,h=a.match(n)||[],f={},p=0,m=h.length;p<m;++p){var g,v=h[p],y=f[v],b=void 0;if("string"==typeof y)g=!1;else{var w=r[v.charAt(0)];if(w)b=v.match(w[1]),y=w[0];else{for(var S=0;S<i;++S)if(w=e[S],b=v.match(w[1])){y=w[0];break}b||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var E=u;if(u+=v.length,g){var C=b[1],k=v.indexOf(C),_=k+C.length;b[2]&&(k=(_=v.length-b[2].length)-C.length);var T=y.substring(5);d(l,s+E,v.substring(0,k),o,c),d(l,s+E+k,C,x(T,C),c),d(l,s+E+_,v.substring(_),o,c)}else c.push(s+E,y)}t.decorations=c};return o}function g(t){var e=[],n=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=t.hashComments;r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=t.regexLiterals;if(i){var o=i>1?"":"\n\r",a=o?".":"[\\S\\s]",s="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+a+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=t.types;l&&n.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(e,n)}var v=g({keywords:[r,o,i,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=t.ownerDocument,a=o.createElement("li");t.firstChild;)a.appendChild(t.firstChild);var s=[a];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&n){var a=t.nodeValue,s=a.match(i);if(s){var u=a.substring(0,s.index);t.nodeValue=u;var h=a.substring(s.index+s[0].length);if(h)t.parentNode.insertBefore(o.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,n=function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var o=t(i,1),a=e.nextSibling;o.appendChild(r);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return r}(t.nextSibling,0);(e=n.parentNode)&&1===e.nodeType;)n=e;s.push(n)}for(var u=0;u<s.length;++u)l(s[u]);e===(0|e)&&s[0].setAttribute("value",e);var h=o.createElement("ol");h.className="linenums";for(var d=Math.max(0,e-1|0)||0,f=(u=0,s.length);u<f;++u)(a=s[u]).className="L"+(u+d)%10,a.firstChild||a.appendChild(o.createTextNode(" ")),h.appendChild(a);t.appendChild(h)}var b={};function w(e,n){for(var r=n.length;--r>=0;){var i=n[r];b.hasOwnProperty(i)?t.console&&console.warn("cannot override language handler %s",i):b[i]=e}}function x(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*</.test(e)?"default-markup":"default-code"),b[t]}function S(e){var n,r,i,o,a,s,l,c=e.langExtension;try{var u=(n=e.sourceNode,r=e.pre,i=/(?:^|\s)nocode(?:\s|$)/,o=[],a=0,s=[],l=0,function t(e){var n=e.nodeType;if(1==n){if(i.test(e.className))return;for(var c=e.firstChild;c;c=c.nextSibling)t(c);var u=e.nodeName.toLowerCase();"br"!==u&&"li"!==u||(o[l]="\n",s[l<<1]=a++,s[l++<<1|1]=e)}else if(3==n||4==n){var h=e.nodeValue;h.length&&(h=r?h.replace(/\r\n?/g,"\n"):h.replace(/[ \t\r\n]+/g," "),o[l]=h,s[l<<1]=a,a+=h.length,s[l++<<1|1]=e)}}(n),{sourceCode:o.join("").replace(/\n$/,""),spans:s}),h=u.sourceCode;e.sourceCode=h,e.spans=u.spans,e.basePos=0,x(c,h)(e),function(t){var e=/\bMSIE\s(\d+)/.exec(navigator.userAgent);e=e&&+e[1]<=8;var n,r,i=/\n/g,o=t.sourceCode,a=o.length,s=0,l=t.spans,c=l.length,u=0,h=t.decorations,d=h.length,f=0;for(h[d]=a,r=n=0;r<d;)h[r]!==h[r+2]?(h[n++]=h[r++],h[n++]=h[r++]):r+=2;for(d=n,r=n=0;r<d;){for(var p=h[r],m=h[r+1],g=r+2;g+2<=d&&h[g+1]===m;)g+=2;h[n++]=p,h[n++]=m,r=g}d=h.length=n;var v=t.sourceNode,y="";v&&(y=v.style.display,v.style.display="none");try{for(;u<c;){l[u];var b,w=l[u+2]||a,x=h[f+2]||a,S=(g=Math.min(w,x),l[u+1]);if(1!==S.nodeType&&(b=o.substring(s,g))){e&&(b=b.replace(i,"\r")),S.nodeValue=b;var E=S.ownerDocument,C=E.createElement("span");C.className=h[f+1];var k=S.parentNode;k.replaceChild(C,S),C.appendChild(S),s<w&&(l[u+1]=S=E.createTextNode(o.substring(g,w)),k.insertBefore(S,C.nextSibling))}(s=g)>=w&&(u+=2),s>=x&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function E(t,e,n){var r=n||!1,i=e||null,o=document.createElement("div");return o.innerHTML="<pre>"+t+"</pre>",o=o.firstChild,r&&y(o,r,!0),S({langExtension:i,numberLines:r,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function C(e,n){var r=n||document.body,i=r.ownerDocument||document;function o(t){return r.getElementsByTagName(t)}for(var a=[o("pre"),o("code"),o("xmp")],s=[],l=0;l<a.length;++l)for(var c=0,u=a[l].length;c<u;++c)s.push(a[l][c]);a=null;var h=Date;h.now||(h={now:function(){return+new Date}});var d=0,f=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,b=/^code$/i,w=/^(?:pre|code|xmp)$/i,x={};!function n(){for(var r=t.PR_SHOULD_USE_CONTINUATION?h.now()+250:1/0;d<s.length&&h.now()<r;d++){for(var o=s[d],a=x,l=o;l=l.previousSibling;){var c=l.nodeType,u=(7===c||8===c)&&l.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(l.nodeValue))break;if(u){a={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(t,e,n){a[e]=n}));break}}var E=o.className;if((a!==x||m.test(E))&&!g.test(E)){for(var C=!1,k=o.parentNode;k;k=k.parentNode){var _=k.tagName;if(w.test(_)&&k.className&&m.test(k.className)){C=!0;break}}if(!C){o.className+=" prettyprinted";var T,O,A=a.lang;if(!A)!(A=E.match(f))&&(T=p(o))&&b.test(T.tagName)&&(A=T.className.match(f)),A&&(A=A[1]);if(v.test(o.tagName))O=1;else{var L=o.currentStyle,D=i.defaultView,I=L?L.whiteSpace:D&&D.getComputedStyle?D.getComputedStyle(o,null).getPropertyValue("white-space"):0;O=I&&"pre"===I.substring(0,3)}var R=a.linenums;(R="true"===R||+R)||(R=!!(R=E.match(/\blinenums\b(?::(\d+))?/))&&(!R[1]||!R[1].length||+R[1])),R&&y(o,R,O),S({langExtension:A,sourceNode:o,numberLines:R,pre:O,sourceCode:null,basePos:null,spans:null,decorations:null})}}}d<s.length?t.setTimeout(n,250):"function"==typeof e&&e()}()}w(v,["default-code"]),w(m([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),w(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),w(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),w(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),w(g({keywords:"null,true,false"}),["json"]),w(g({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),w(g({keywords:i,cStyleComments:!0}),["java"]),w(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),w(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),w(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),w(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),w(g({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),w(g({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),w(m([],[["str",/^[\s\S]+/]]),["regex"]);var k=t.PR={createSimpleLexer:m,registerLangHandler:w,sourceDecorator:g,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:E,prettyPrint:C},_=t.define;"function"==typeof _&&_.amd&&_("google-code-prettify",[],(function(){return k}))}()},T8No:
/*!************************************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js ***!
\************************************************************************************/
/*! exports provided: ContextKeyExpr, ContextKeyDefinedExpr, ContextKeyEqualsExpr, ContextKeyNotEqualsExpr, ContextKeyNotExpr, ContextKeyRegexExpr, ContextKeyNotRegexExpr, ContextKeyAndExpr, ContextKeyOrExpr, RawContextKey, IContextKeyService, SET_CONTEXT_COMMAND_ID */
/*! exports used: ContextKeyExpr, ContextKeyOrExpr, IContextKeyService, RawContextKey, SET_CONTEXT_COMMAND_ID */function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return g})),n.d(e,"d",(function(){return v})),n.d(e,"c",(function(){return y})),n.d(e,"e",(function(){return b}));var r,i=n(/*! ../../../base/common/strings.js */"N0LK"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(){function t(){}return t.has=function(t){return c.create(t)},t.equals=function(t,e){return u.create(t,e)},t.regex=function(t,e){return f.create(t,e)},t.not=function(t){return d.create(t)},t.and=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return m.create(t)},t.or=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return g.create(t)},t.deserialize=function(t,e){if(void 0===e&&(e=!1),t)return this._deserializeOrExpression(t,e)},t._deserializeOrExpression=function(t,e){var n=this,r=t.split("||");return g.create(r.map((function(t){return n._deserializeAndExpression(t,e)})))},t._deserializeAndExpression=function(t,e){var n=this,r=t.split("&&");return m.create(r.map((function(t){return n._deserializeOne(t,e)})))},t._deserializeOne=function(t,e){if((t=t.trim()).indexOf("!=")>=0){var n=t.split("!=");return h.create(n[0].trim(),this._deserializeValue(n[1],e))}if(t.indexOf("==")>=0){n=t.split("==");return u.create(n[0].trim(),this._deserializeValue(n[1],e))}if(t.indexOf("=~")>=0){n=t.split("=~");return f.create(n[0].trim(),this._deserializeRegexValue(n[1],e))}return/^\!\s*/.test(t)?d.create(t.substr(1).trim()):c.create(t)},t._deserializeValue=function(t,e){if("true"===(t=t.trim()))return!0;if("false"===t)return!1;var n=/^'([^']*)'$/.exec(t);return n?n[1].trim():t},t._deserializeRegexValue=function(t,e){if(Object(i.x)(t)){if(e)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var n=t.indexOf("/"),r=t.lastIndexOf("/");if(n===r||n<0){if(e)throw new Error("bad regexp-value '"+t+"', missing /-enclosure");return console.warn("bad regexp-value '"+t+"', missing /-enclosure"),null}var o=t.slice(n+1,r),a="i"===t[r+1]?"i":"";try{return new RegExp(o,a)}catch(n){if(e)throw new Error("bad regexp-value '"+t+"', parse error: "+n);return console.warn("bad regexp-value '"+t+"', parse error: "+n),null}},t}();function l(t,e){var n=t.getType(),r=e.getType();if(n!==r)return n-r;switch(n){case 1:case 2:case 3:case 4:case 6:case 7:case 5:return t.cmp(e);default:throw new Error("Unknown ContextKeyExpr!")}}var c=function(){function t(t){this.key=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 1},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:0},t.prototype.equals=function(e){return e instanceof t&&this.key===e.key},t.prototype.evaluate=function(t){return!!t.getValue(this.key)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return d.create(this.key)},t}(),u=function(){function t(t,e){this.key=t,this.value=e}return t.create=function(e,n){return"boolean"==typeof n?n?c.create(e):d.create(e):new t(e,n)},t.prototype.getType=function(){return 3},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:this.value<t.value?-1:this.value>t.value?1:0},t.prototype.equals=function(e){return e instanceof t&&(this.key===e.key&&this.value===e.value)},t.prototype.evaluate=function(t){return t.getValue(this.key)==this.value},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return h.create(this.key,this.value)},t}(),h=function(){function t(t,e){this.key=t,this.value=e}return t.create=function(e,n){return"boolean"==typeof n?n?d.create(e):c.create(e):new t(e,n)},t.prototype.getType=function(){return 4},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:this.value<t.value?-1:this.value>t.value?1:0},t.prototype.equals=function(e){return e instanceof t&&(this.key===e.key&&this.value===e.value)},t.prototype.evaluate=function(t){return t.getValue(this.key)!=this.value},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return u.create(this.key,this.value)},t}(),d=function(){function t(t){this.key=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 2},t.prototype.cmp=function(t){return this.key<t.key?-1:this.key>t.key?1:0},t.prototype.equals=function(e){return e instanceof t&&this.key===e.key},t.prototype.evaluate=function(t){return!t.getValue(this.key)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return c.create(this.key)},t}(),f=function(){function t(t,e){this.key=t,this.regexp=e}return t.create=function(e,n){return new t(e,n)},t.prototype.getType=function(){return 6},t.prototype.cmp=function(t){if(this.key<t.key)return-1;if(this.key>t.key)return 1;var e=this.regexp?this.regexp.source:"",n=t.regexp?t.regexp.source:"";return e<n?-1:e>n?1:0},t.prototype.equals=function(e){if(e instanceof t){var n=this.regexp?this.regexp.source:"",r=e.regexp?e.regexp.source:"";return this.key===e.key&&n===r}return!1},t.prototype.evaluate=function(t){var e=t.getValue(this.key);return!!this.regexp&&this.regexp.test(e)},t.prototype.keys=function(){return[this.key]},t.prototype.negate=function(){return p.create(this)},t}(),p=function(){function t(t){this._actual=t}return t.create=function(e){return new t(e)},t.prototype.getType=function(){return 7},t.prototype.cmp=function(t){return this._actual.cmp(t._actual)},t.prototype.equals=function(e){return e instanceof t&&this._actual.equals(e._actual)},t.prototype.evaluate=function(t){return!this._actual.evaluate(t)},t.prototype.keys=function(){return this._actual.keys()},t.prototype.negate=function(){return this._actual},t}(),m=function(){function t(t){this.expr=t}return t.create=function(e){var n=t._normalizeArr(e);if(0!==n.length)return 1===n.length?n[0]:new t(n)},t.prototype.getType=function(){return 5},t.prototype.cmp=function(t){if(this.expr.length<t.expr.length)return-1;if(this.expr.length>t.expr.length)return 1;for(var e=0,n=this.expr.length;e<n;e++){var r=l(this.expr[e],t.expr[e]);if(0!==r)return r}return 0},t.prototype.equals=function(e){if(e instanceof t){if(this.expr.length!==e.expr.length)return!1;for(var n=0,r=this.expr.length;n<r;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1},t.prototype.evaluate=function(t){for(var e=0,n=this.expr.length;e<n;e++)if(!this.expr[e].evaluate(t))return!1;return!0},t._normalizeArr=function(e){var n=[];if(e){for(var r=0,i=e.length;r<i;r++){var o=e[r];if(o)if(o instanceof t)n=n.concat(o.expr);else{if(o instanceof g)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');n.push(o)}}n.sort(l)}return n},t.prototype.keys=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var r=n[e];t.push.apply(t,r.keys())}return t},t.prototype.negate=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var r=n[e];t.push(r.negate())}return g.create(t)},t}(),g=function(){function t(t){this.expr=t}return t.create=function(e){var n=t._normalizeArr(e);if(0!==n.length)return 1===n.length?n[0]:new t(n)},t.prototype.getType=function(){return 8},t.prototype.equals=function(e){if(e instanceof t){if(this.expr.length!==e.expr.length)return!1;for(var n=0,r=this.expr.length;n<r;n++)if(!this.expr[n].equals(e.expr[n]))return!1;return!0}return!1},t.prototype.evaluate=function(t){for(var e=0,n=this.expr.length;e<n;e++)if(this.expr[e].evaluate(t))return!0;return!1},t._normalizeArr=function(e){var n=[];if(e){for(var r=0,i=e.length;r<i;r++){var o=e[r];o&&(o instanceof t?n=n.concat(o.expr):n.push(o))}n.sort(l)}return n},t.prototype.keys=function(){for(var t=[],e=0,n=this.expr;e<n.length;e++){var r=n[e];t.push.apply(t,r.keys())}return t},t.prototype.negate=function(){for(var e=[],n=0,r=this.expr;n<r.length;n++){var i=r[n];e.push(i.negate())}for(var o=function(e){return e instanceof t?e.expr:[e]};e.length>1;){for(var a=e.shift(),l=e.shift(),c=[],u=0,h=o(a);u<h.length;u++)for(var d=h[u],f=0,p=o(l);f<p.length;f++){var m=p[f];c.push(s.and(d,m))}e.unshift(s.or.apply(s,c))}return e[0]},t}(),v=function(t){function e(e,n){var r=t.call(this,e)||this;return r._defaultValue=n,r}return a(e,t),e.prototype.bindTo=function(t){return t.createKey(this.key,this._defaultValue)},e.prototype.getValue=function(t){return t.getContextKeyValue(this.key)},e.prototype.toNegated=function(){return s.not(this.key)},e}(c),y=Object(o.c)("contextKeyService"),b="setContext"},"VrN/":
/*!***************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),w=/win/i.test(e),x=h&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,l=!0);var S=y&&(c||h&&(null==x||x<12.11)),E=n||a&&s>=9;function C(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,_=function(t,e){var n=t.className,r=C(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function O(t,e){return T(t).appendChild(e)}function A(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)i.appendChild(e[o]);return i}function L(t,e,n,r){var i=A(t,e,n,r);return i.setAttribute("role","presentation"),i}function D(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function I(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function R(t,e){var n=t.className;C(e).test(n)||(t.className+=(n?" ":"")+e)}function M(t,e){for(var n=t.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(e)&&(e+=" "+n[r]);return e}k=document.createRange?function(t,e,n,r){var i=document.createRange();return i.setEnd(r||t,n),i.setStart(t,e),i}:function(t,e,n){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(t){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r};var N=function(t){t.select()};function j(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function P(t,e,n){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===n&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function F(t,e,n,r,i){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=r||0,a=i||0;;){var s=t.indexOf("\t",o);if(s<0||s>=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?N=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(N=function(t){try{t.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function U(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}B.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},B.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function W(t,e,n){for(var r=0,i=0;;){var o=t.indexOf("\t",r);-1==o&&(o=t.length);var a=o-r;if(o==t.length||i+a>=e)return r+Math.min(a,e-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=e)return r}}var K=[""];function q(t){for(;K.length<=t;)K.push(X(K)+" ");return K[t]}function X(t){return t[t.length-1]}function Y(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=e(t[r],r);return n}function $(){}function J(t,e){var n;return Object.create?n=Object.create(t):($.prototype=t,n=new $),e&&P(e,n),n}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Z.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&nt.test(t)}function it(t,e,n){for(;(n<0?e>0:e<t.length)&&rt(t.charAt(e));)e+=n;return e}function ot(t,e,n){for(var r=e>n?-1:1;;){if(e==n)return e;var i=(e+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+r}}var at=null;function st(t,e,n){var r;at=null;for(var i=0;i<t.length;++i){var o=t[i];if(o.from<e&&o.to>e)return i;o.to==e&&(o.from!=o.to&&"before"==n?r=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=n?r=i:at=i)}return null!=r?r:at}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c,u=a.length,h=[],d=0;d<u;++d)h.push((c=a.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var f=0,p=l;f<u;++f){var m=h[f];"m"==m?h[f]=p:p=m}for(var g=0,v=l;g<u;++g){var y=h[g];"1"==y&&"r"==v?h[g]="n":n.test(y)&&(v=y,"r"==y&&(h[g]="R"))}for(var b=1,w=h[0];b<u-1;++b){var x=h[b];"+"==x&&"1"==w&&"1"==h[b+1]?h[b]="1":","!=x||w!=h[b+1]||"1"!=w&&"n"!=w||(h[b]=w),w=x}for(var S=0;S<u;++S){var E=h[S];if(","==E)h[S]="N";else if("%"==E){var C=void 0;for(C=S+1;C<u&&"%"==h[C];++C);for(var k=S&&"!"==h[S-1]||C<u&&"1"==h[C]?"1":"N",_=S;_<C;++_)h[_]=k;S=C-1}}for(var T=0,O=l;T<u;++T){var A=h[T];"L"==O&&"1"==A?h[T]="L":n.test(A)&&(O=A)}for(var L=0;L<u;++L)if(e.test(h[L])){var D=void 0;for(D=L+1;D<u&&e.test(h[D]);++D);for(var I="L"==(L?h[L-1]:l),R=I==("L"==(D<u?h[D]:l))?I?"L":"R":l,M=L;M<D;++M)h[M]=R;L=D-1}for(var N,j=[],P=0;P<u;)if(r.test(h[P])){var F=P;for(++P;P<u&&r.test(h[P]);++P);j.push(new o(0,F,P))}else{var B=P,U=j.length,H="rtl"==s?1:0;for(++P;P<u&&"L"!=h[P];++P);for(var z=B;z<P;)if(i.test(h[z])){B<z&&(j.splice(U,0,new o(1,B,z)),U+=H);var G=z;for(++z;z<P&&i.test(h[z]);++z);j.splice(U,0,new o(2,G,z)),U+=H,B=z}else++z;B<P&&j.splice(U,0,new o(1,B,P))}return"ltr"==s&&(1==j[0].level&&(N=a.match(/^\s+/))&&(j[0].from=N[0].length,j.unshift(new o(0,0,N[0].length))),1==X(j).level&&(N=a.match(/\s+$/))&&(X(j).to-=N[0].length,j.push(new o(0,u-N[0].length,u)))),"rtl"==s?j.reverse():j}}();function ct(t,e){var n=t.order;return null==n&&(n=t.order=lt(t.text,e)),n}var ut=[],ht=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||ut).concat(n)}};function dt(t,e){return t._handlers&&t._handlers[e]||ut}function ft(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var r=t._handlers,i=r&&r[e];if(i){var o=U(i,n);o>-1&&(r[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function pt(t,e){var n=dt(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function mt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),pt(t,n||e.type,t,e),xt(e)||e.codemirrorIgnore}function gt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),r=0;r<e.length;++r)-1==U(n,e[r])&&n.push(e[r])}function vt(t,e){return dt(t,e).length>0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function wt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function xt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function St(t){bt(t),wt(t)}function Et(t){return t.target||t.srcElement}function Ct(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var kt,_t,Tt=function(){if(a&&s<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}();function Ot(t){if(null==kt){var e=A("span","");O(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(kt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=kt?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function At(t){if(null!=_t)return _t;var e=O(t,document.createTextNode("AخA")),n=k(e,0,1).getBoundingClientRect(),r=k(e,1,2).getBoundingClientRect();return T(t),!(!n||n.left==n.right)&&(_t=r.right-n.right<3)}var Lt,Dt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},It=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Rt="oncopy"in(Lt=A("div"))||(Lt.setAttribute("oncopy","return;"),"function"==typeof Lt.oncopy),Mt=null,Nt={},jt={};function Pt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Nt[t]=e}function Ft(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=J(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ft("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ft("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Bt(t,e){e=Ft(e);var n=Nt[e.name];if(!n)return Bt(t,"text/plain");var r=n(t,e);if(Ut.hasOwnProperty(e.name)){var i=Ut[e.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Ut={};function Ht(t,e){P(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Vt(t,e,n){return!t.startState||t.startState(e,n)}var Wt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(e<o){n=i;break}e-=o}return n.lines[e]}function qt(t,e,n){var r=[],i=e.line;return t.iter(e.line,n.line+1,(function(t){var o=t.text;i==n.line&&(o=o.slice(0,n.ch)),i==e.line&&(o=o.slice(e.ch)),r.push(o),++i})),r}function Xt(t,e,n){var r=[];return t.iter(e,n,(function(t){r.push(t.text)})),r}function Yt(t,e){var n=e-t.height;if(n)for(var r=t;r;r=r.parent)r.height+=n}function $t(t){if(null==t.parent)return null;for(var e=t.parent,n=U(e.lines,t),r=e.parent;r;e=r,r=r.parent)for(var i=0;r.children[i]!=e;++i)n+=r.children[i].chunkSize();return n+e.first}function Jt(t,e){var n=t.first;t:do{for(var r=0;r<t.children.length;++r){var i=t.children[r],o=i.height;if(e<o){t=i;continue t}e-=o,n+=i.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function Zt(t,e){return e>=t.first&&e<t.first+t.size}function Qt(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function te(t,e,n){if(void 0===n&&(n=null),!(this instanceof te))return new te(t,e,n);this.line=t,this.ch=e,this.sticky=n}function ee(t,e){return t.line-e.line||t.ch-e.ch}function ne(t,e){return t.sticky==e.sticky&&0==ee(t,e)}function re(t){return te(t.line,t.ch)}function ie(t,e){return ee(t,e)<0?e:t}function oe(t,e){return ee(t,e)<0?t:e}function ae(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function se(t,e){if(e.line<t.first)return te(t.first,0);var n=t.first+t.size-1;return e.line>n?te(n,Kt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?te(t.line,e):n<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var n=[],r=0;r<e.length;r++)n[r]=se(t,e[r]);return n}Wt.prototype.eol=function(){return this.pos>=this.string.length},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Wt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Wt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Wt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Wt.prototype.backUp=function(t){this.pos-=t},Wt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Wt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Wt.prototype.match=function(t,e,n){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Wt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Wt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,n,r){var i=[t.state.modeGen],o={};we(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],l=1,c=0;n.state=!0,we(t,e.text,s.mode,n,(function(t,e){for(var n=l;c<t;){var r=i[l];r>t&&i.splice(l,1,t,i[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+e}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function de(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var r=fe(t,$t(e)),i=e.text.length>t.options.maxHighlightLength&&zt(t.doc.mode,r.state),o=he(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new ue(r,!0,e);var o=function(t,e,n){for(var r,i,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var l=Kt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ce?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(t,e,n),a=o>r.first&&Kt(r,o-1).stateAfter,s=a?ue.fromSaved(r,a,o):new ue(r,Vt(r.mode),o);return r.iter(o,e,(function(n){pe(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pe(t,e,n,r){var i=t.doc.mode,o=new Wt(e,t.options.tabSize,n);for(o.start=o.pos=r||0,""==e&&me(i,n.state);!o.eol();)ge(i,o,n.state),o.start=o.pos}function me(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Gt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function ge(t,e,n,r){for(var i=0;i<10;i++){r&&(r[0]=Gt(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,n){return e instanceof ce?new ue(t,zt(t.mode,e.state),n,e.lookAhead):new ue(t,zt(t.mode,e),n)},ue.prototype.save=function(t){var e=!1!==t?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function ye(t,e,n,r){var i,o,a=t.doc,s=a.mode,l=Kt(a,(e=se(a,e)).line),c=fe(t,e.line,n),u=new Wt(l.text,t.options.tabSize,c);for(r&&(o=[]);(r||u.pos<e.ch)&&!u.eol();)u.start=u.pos,i=ge(s,u,c.state),r&&o.push(new ve(u,i,zt(a.mode,c.state)));return r?o:new ve(u,i,c.state)}function be(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==e[r]?e[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[r])||(e[r]+=" "+n[2])}return t}function we(t,e,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,c=0,u=null,h=new Wt(e,t.options.tabSize,r),d=t.options.addModeClass&&[null];for(""==e&&be(me(n,r.state),o);!h.eol();){if(h.pos>t.options.maxHighlightLength?(s=!1,a&&pe(t,e,r,h.pos),h.pos=e.length,l=null):l=be(ge(n,h,r.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<h.start;)i(c=Math.min(h.start,c+5e3),u);u=l}h.start=h.pos}for(;c<h.pos;){var p=Math.min(h.pos,c+5e3);i(p,u),c=p}}var xe=!1,Se=!1;function Ee(t,e,n){this.marker=t,this.from=e,this.to=n}function Ce(t,e){if(t)for(var n=0;n<t.length;++n){var r=t[n];if(r.marker==e)return r}}function ke(t,e){for(var n,r=0;r<t.length;++r)t[r]!=e&&(n||(n=[])).push(t[r]);return n}function _e(t,e){if(e.full)return null;var n=Zt(t,e.from.line)&&Kt(t,e.from.line).markedSpans,r=Zt(t,e.to.line)&&Kt(t,e.to.line).markedSpans;if(!n&&!r)return null;var i=e.from.ch,o=e.to.ch,a=0==ee(e.from,e.to),s=function(t,e,n){var r;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(r||(r=[])).push(new Ee(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(t,e,n){var r;if(t)for(var i=0;i<t.length;++i){var o=t[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(r||(r=[])).push(new Ee(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return r}(r,o,a),c=1==e.text.length,u=X(e.text).length+(c?i:0);if(s)for(var h=0;h<s.length;++h){var d=s[h];if(null==d.to){var f=Ce(l,d.marker);f?c&&(d.to=null==f.to?null:f.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=u),null==m.from?Ce(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Te(s)),l&&l!=s&&(l=Te(l));var g=[s];if(!c){var v,y=e.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Ee(s[b].marker,null,null));for(var w=0;w<y;++w)g.push(v);g.push(l)}return g}function Te(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Oe(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function Ae(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function Le(t){return t.inclusiveLeft?-1:0}function De(t){return t.inclusiveRight?1:0}function Ie(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var r=t.find(),i=e.find(),o=ee(r.from,i.from)||Le(t)-Le(e);if(o)return-o;var a=ee(r.to,i.to)||De(t)-De(e);return a||e.id-t.id}function Re(t,e){var n,r=Se&&t.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(e?i.from:i.to)&&(!n||Ie(n,i.marker)<0)&&(n=i.marker);return n}function Me(t){return Re(t,!0)}function Ne(t){return Re(t,!1)}function je(t,e){var n,r=Se&&t.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Ie(n,o.marker)<0)&&(n=o.marker)}return n}function Pe(t,e,n,r,i){var o=Kt(t,e),a=Se&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ee(c.from,n)||Le(l.marker)-Le(i),h=ee(c.to,r)||De(l.marker)-De(i);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.to,n)>=0:ee(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Fe(t){for(var e;e=Me(t);)t=e.find(-1,!0).line;return t}function Be(t,e){var n=Kt(t,e),r=Fe(n);return n==r?e:$t(r)}function Ue(t,e){if(e>t.lastLine())return e;var n,r=Kt(t,e);if(!He(t,r))return e;for(;n=Ne(r);)r=n.find(1,!0).line;return $t(r)+1}function He(t,e){var n=Se&&e.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&ze(t,e,r))return!0}}function ze(t,e,n){if(null==n.to){var r=n.marker.find(1,!0);return ze(t,r.line,Ce(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var i=void 0,o=0;o<e.markedSpans.length;++o)if((i=e.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&ze(t,e,i))return!0}function Ge(t){for(var e=0,n=(t=Fe(t)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==t)break;e+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;e+=s.height}return e}function Ve(t){if(0==t.height)return 0;for(var e,n=t.text.length,r=t;e=Me(r);){var i=e.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=t;e=Ne(r);){var o=e.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function We(t){var e=t.display,n=t.doc;e.maxLine=Kt(n,n.first),e.maxLineLength=Ve(e.maxLine),e.maxLineChanged=!0,n.iter((function(t){var n=Ve(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var Ke=function(t,e,n){this.text=t,Ae(this,e),this.height=n?n(this):1};function qe(t){t.parent=null,Oe(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Xe={},Ye={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Ye:Xe;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Je(t,e){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;r.pos=0,r.addToken=Qe,At(t.display.measure)&&(a=ct(o,t.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],nn(o,r,de(t,o,e!=t.display.externalMeasured&&$t(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ot(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Ze(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,n,r,i,o,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;i<t.length;i++){var o=t.charAt(i);" "!=o||!n||i!=t.length-1&&32!=t.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(e,t.trailingSpace):e,h=t.cm.state.specialChars,d=!1;if(h.test(e)){c=document.createDocumentFragment();for(var f=0;;){h.lastIndex=f;var p=h.exec(e),m=p?p.index-f:e.length-f;if(m){var g=document.createTextNode(u.slice(f,f+m));a&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var y=t.cm.options.tabSize,b=y-t.col%y;(v=c.appendChild(A("span",q(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(A("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),a&&s<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||r||i||d||o||l){var w=n||"";r&&(w+=r),i&&(w+=i);var x=A("span",[c],w,o);if(l)for(var S in l)l.hasOwnProperty(S)&&"style"!=S&&"class"!=S&&x.setAttribute(S,l[S]);return t.content.appendChild(x)}t.content.appendChild(c)}}function tn(t,e){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var h=void 0,d=0;d<e.length&&!((h=e[d]).to>c&&h.from<=c);d++);if(h.to>=u)return t(n,r,i,o,a,s,l);t(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function en(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function nn(t,e,n){var r=t.markedSpans,i=t.text,o=0;if(r)for(var a,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var x=r[w],S=x.marker;if("bookmark"==S.type&&x.from==p&&S.widgetNode)y.push(S);else if(x.from<=p&&(null==x.to||x.to>p||S.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),S.className&&(l+=" "+S.className),S.css&&(s=(s?s+";":"")+S.css),S.startStyle&&x.from==p&&(u+=" "+S.startStyle),S.endStyle&&x.to==v&&(b||(b=[])).push(S.endStyle,x.to),S.title&&((d||(d={})).title=S.title),S.attributes)for(var E in S.attributes)(d||(d={}))[E]=S.attributes[E];S.collapsed&&(!h||Ie(h.marker,S)<0)&&(h=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!h||h.from==p)for(var k=0;k<y.length;++k)en(e,0,y[k]);if(h&&(h.from||0)==p){if(en(e,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=f)break;for(var _=Math.min(f,v);;){if(g){var T=p+g.length;if(!h){var O=T>_?g.slice(0,_-p):g;e.addToken(e,O,a?a+l:l,u,p+O.length==v?c:"",s,d)}if(T>=_){g=g.slice(_-p),p=_;break}p=T,u=""}g=i.slice(o,o=n[m++]),a=$e(n[m++],e.cm.options)}}else for(var A=1;A<n.length;A+=2)e.addToken(e,i.slice(o,o=n[A]),$e(n[A+1],e.cm.options))}function rn(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=Ne(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?$t(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=He(t,e)}function on(t,e,n){for(var r,i=[],o=e;o<n;o=r){var a=new rn(t.doc,Kt(t.doc,o),o);r=o+a.size,i.push(a)}return i}var an=null,sn=null;function ln(t,e){var n=dt(t,e);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var o=function(t){r.push((function(){return n[t].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function cn(){var t=sn;sn=null;for(var e=0;e<t.length;++e)t[e]()}function un(t,e,n,r){for(var i=0;i<e.changes.length;i++){var o=e.changes[i];"text"==o?fn(t,e):"gutter"==o?mn(t,e,n,r):"class"==o?pn(t,e):"widget"==o&&gn(t,e,r)}e.changes=null}function hn(t){return t.node==t.text&&(t.node=A("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),a&&s<8&&(t.node.style.zIndex=2)),t.node}function dn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Je(t,e)}function fn(t,e){var n=e.text.className,r=dn(t,e);e.text==e.node&&(e.node=r.pre),e.text.parentNode.replaceChild(r.pre,e.text),e.text=r.pre,r.bgClass!=e.bgClass||r.textClass!=e.textClass?(e.bgClass=r.bgClass,e.textClass=r.textClass,pn(t,e)):n&&(e.text.className=n)}function pn(t,e){!function(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var r=hn(e);e.background=r.insertBefore(A("div",null,n),r.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?hn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function mn(t,e,n,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var i=hn(e);e.gutterBackground=A("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),i.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var a=hn(e),s=e.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(A("div",Qt(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(t,e,n){e.alignable&&(e.alignable=null);for(var r=C("CodeMirror-linewidget"),i=e.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&e.node.removeChild(i);yn(t,e,n)}function vn(t,e,n,r){var i=dn(t,e);return e.text=e.node=i.pre,i.bgClass&&(e.bgClass=i.bgClass),i.textClass&&(e.textClass=i.textClass),pn(t,e),mn(t,e,n,r),yn(t,e,r),e.node}function yn(t,e,n){if(bn(t,e.line,e,n,!0),e.rest)for(var r=0;r<e.rest.length;r++)bn(t,e.rest[r],e,n,!1)}function bn(t,e,n,r,i){if(e.widgets)for(var o=hn(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],c=A("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),wn(l,c,n,r),t.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ln(l,"redraw")}}function wn(t,e,n,r){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var i=r.wrapperWidth;e.style.left=r.fixedPos+"px",t.coverGutter||(i-=r.gutterTotalWidth,e.style.paddingLeft=r.gutterTotalWidth+"px"),e.style.width=i+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-r.gutterTotalWidth+"px"))}function xn(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!D(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),O(e.display.measure,A("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function Sn(t,e){for(var n=Et(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function En(t){return t.lineSpace.offsetTop}function Cn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function kn(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=O(t.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function _n(t){return 50-t.display.nativeBarWidth}function Tn(t){return t.display.scroller.clientWidth-_n(t)-t.display.barWidth}function On(t){return t.display.scroller.clientHeight-_n(t)-t.display.barHeight}function An(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;r<t.rest.length;r++)if(t.rest[r]==e)return{map:t.measure.maps[r],cache:t.measure.caches[r]};for(var i=0;i<t.rest.length;i++)if($t(t.rest[i])>n)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Ln(t,e,n,r){return Rn(t,In(t,e),n,r)}function Dn(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[ur(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function In(t,e){var n=$t(e),r=Dn(t,n);r&&!r.text?r=null:r&&r.changes&&(un(t,r,n,or(t)),t.curOp.forceUpdate=!0),r||(r=function(t,e){var n=$t(e=Fe(e)),r=t.display.externalMeasured=new rn(t.doc,e,n);r.lineN=n;var i=r.built=Je(t,r);return r.text=i.pre,O(t.display.lineMeasure,i.pre),r}(t,e));var i=An(r,e,n);return{line:e,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Rn(t,e,n,r,i){e.before&&(n=-1);var o,l=n+(r||"");return e.cache.hasOwnProperty(l)?o=e.cache[l]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,n){var r=t.options.lineWrapping,i=r&&Tn(t);if(!e.measure.heights||r&&e.measure.width!=i){var o=e.measure.heights=[];if(r){e.measure.width=i;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,n,r){var i,o=jn(e.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&rt(e.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Pn(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,h="right"}a&&s<11&&(i=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Mt)return Mt;var e=O(t,A("span","x")),n=e.getBoundingClientRect(),r=k(e,0,1).getBoundingClientRect();return Mt=Math.abs(n.left-r.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else{var f;c>0&&(h=r="right"),i=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(t.display),top:p.top,bottom:p.bottom}:Nn}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],S={left:("right"==h?i.right:i.left)-e.rect.left,right:("left"==h?i.left:i.right)-e.rect.left,top:w,bottom:x};return i.left||i.right||(S.bogus=!0),t.options.singleCursorHeightPerLine||(S.rtop=m,S.rbottom=g),S}(t,e,n,r)).bogus||(e.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Mn,Nn={left:0,right:0,top:0,bottom:0};function jn(t,e,n){for(var r,i,o,a,s,l,c=0;c<t.length;c+=3)if(s=t[c],l=t[c+1],e<s?(i=0,o=1,a="left"):e<l?o=1+(i=e-s):(c==t.length-3||e==l&&t[c+3]>e)&&(i=(o=l-s)-1,e>=l&&(a="right")),null!=i){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)r=t[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Pn(t,e){var n=Nn;if("left"==e)for(var r=0;r<t.length&&(n=t[r]).left==n.right;r++);else for(var i=t.length-1;i>=0&&(n=t[i]).left==n.right;i--);return n}function Fn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function Bn(t){t.display.externalMeasure=null,T(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Fn(t.display.view[e])}function Un(t){Bn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gn(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=xn(t.widgets[n]));return e}function Vn(t,e,n,r,i){if(!i){var o=Gn(e);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=Ge(e);if("local"==r?a+=En(t.display):a-=t.display.viewOffset,"page"==r||"window"==r){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:zn());var l=s.left+("window"==r?0:Hn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Wn(t,e,n){if("div"==n)return e;var r=e.left,i=e.top;if("page"==n)r-=Hn(),i-=zn();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Kn(t,e,n,r,i){return r||(r=Kt(t.doc,e.line)),Vn(t,r,Ln(t,r,e.ch,i),n)}function qn(t,e,n,r,i,o){function a(e,a){var s=Rn(t,i,e,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Vn(t,r,s,n)}r=r||Kt(t.doc,e.line),i||(i=In(t,r));var s=ct(r,t.doc.direction),l=e.ch,c=e.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=st(s,l,c),d=at,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Xn(t,e){var n=0;e=se(t.doc,e),t.options.lineWrapping||(n=ir(t.display)*e.ch);var r=Kt(t.doc,e.line),i=Ge(r)+En(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(t,e,n,r,i){var o=te(t,e,n);return o.xRel=i,r&&(o.outside=r),o}function $n(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Jt(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Kt(r,o).text.length,null,1,1);e<0&&(e=0);for(var a=Kt(r,i);;){var s=tr(t,a,i,e,n),l=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Kt(r,i=c.line)}}function Jn(t,e,n,r){r-=Gn(e);var i=e.text.length,o=ot((function(e){return Rn(t,n,e-1).bottom<=r}),i,0);return{begin:o,end:i=ot((function(e){return Rn(t,n,e).top>r}),o,i)}}function Zn(t,e,n,r){return n||(n=In(t,e)),Jn(t,e,n,Vn(t,e,Rn(t,n,r),"line").top)}function Qn(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function tr(t,e,n,r,i){i-=Ge(e);var o=In(t,e),a=Gn(e),s=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?nr:er)(t,e,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=ot((function(e){var n=Rn(t,o,e);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=e,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=p+(b?0:1),f=b?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=s||g++,f=0==g?"after":g==e.text.length?"before":Rn(t,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var w=qn(t,te(n,g,f),"line",e,o);d=w.left,v=i<w.top?-1:i>=w.bottom?1:0}return Yn(n,g=it(e.text,g,1),f,v,r-d)}function er(t,e,n,r,i,o,a){var s=ot((function(s){var l=i[s],c=1!=l.level;return Qn(qn(t,te(n,c?l.to:l.from,c?"before":"after"),"line",e,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(t,te(n,c?l.from:l.to,c?"after":"before"),"line",e,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(t,e,n,r,i,o,a){var s=Jn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d<i.length;d++){var f=i[d];if(!(f.from>=c||f.to<=l)){var p=Rn(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=p<o?o-p+1e9:p-o;(!u||h>m)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Mn){Mn=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(A("br"));Mn.appendChild(document.createTextNode("x"))}O(t.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),T(t.measure),n||1}function ir(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");O(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function or(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(t){var e=rr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ir(t.display)-3);return function(i){if(He(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*e:o+e}}function lr(t){var e=t.doc,n=sr(t);e.iter((function(t){var e=n(t);e!=t.height&&Yt(t,e)}))}function cr(t,e,n,r){var i=t.display;if(!n&&"true"==Et(e).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(t){return null}var l,c=$n(t,o,a);if(r&&c.xRel>0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=F(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((o-kn(t.display).left)/ir(t.display))-u))}return c}function ur(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r<n.length;r++)if((e-=n[r].size)<0)return r}function hr(t,e,n,r){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),r||(r=0);var i=t.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>e)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Se&&Be(t.doc,e)<i.viewTo&&fr(t);else if(n<=i.viewFrom)Se&&Ue(t.doc,n+r)>i.viewFrom?fr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)fr(t);else if(e<=i.viewFrom){var o=pr(t,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(t)}else if(n>=i.viewTo){var a=pr(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(t)}else{var s=pr(t,e,e,-1),l=pr(t,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(t)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:e<c.lineN+c.size&&(i.externalMeasured=null))}function dr(t,e,n){t.curOp.viewChanged=!0;var r=t.display,i=t.display.externalMeasured;if(i&&e>=i.lineN&&e<i.lineN+i.size&&(r.externalMeasured=null),!(e<r.viewFrom||e>=r.viewTo)){var o=r.view[ur(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function pr(t,e,n,r){var i,o=ur(t,e),a=t.display.view;if(!Se||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=e){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,n+=i}for(;Be(t.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(t){for(var e=t.display.view,n=0,r=0;r<e.length;r++){var i=e[r];i.hidden||i.node&&!i.changes||++n}return n}function gr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function vr(t,e){void 0===e&&(e=!0);for(var n=t.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&yr(t,s.head,i),l||wr(t,s,o)}}return r}function yr(t,e,n){var r=qn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var o=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(t,e){return t.top-e.top||t.left-e.left}function wr(t,e,n){var r=t.display,i=t.doc,o=document.createDocumentFragment(),a=kn(t.display),s=a.left,l=Math.max(r.sizerWidth,Tn(t)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(t,e,n,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(r-e)+"px"))}function h(e,n,r){var o,a,h=Kt(i,e),d=h.text.length;function f(n,r){return Kn(t,te(e,n),"div",h,r)}function p(e,n,r){var i=Zn(t,h,null,e),o="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var m=ct(h,i.direction);return function(t,e,n,r){if(!t)return r(e,n,"ltr",0);for(var i=!1,o=0;o<t.length;++o){var a=t[o];(a.from<n&&a.to>e||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(e,n,"ltr")}(m,n||0,null==r?d:r,(function(t,e,i,h){var g="ltr"==i,v=f(t,g?"left":"right"),y=f(e-1,g?"right":"left"),b=null==n&&0==t,w=null==r&&e==d,x=0==h,S=!m||h==m.length-1;if(y.top-v.top<=3){var E=(c?w:b)&&S,C=(c?b:w)&&x?s:(g?v:y).left,k=E?l:(g?y:v).right;u(C,v.top,k-C,v.bottom)}else{var _,T,O,A;g?(_=c&&b&&x?s:v.left,T=c?l:p(t,i,"before"),O=c?s:p(e,i,"after"),A=c&&w&&S?l:y.right):(_=c?p(t,i,"before"):s,T=!c&&b&&x?l:v.right,O=!c&&w&&S?s:y.left,A=c?p(e,i,"after"):l),u(_,v.top,T-_,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(O,y.top,A-O,y.bottom)}(!o||br(v,o)<0)&&(o=v),br(y,o)<0&&(o=y),(!a||br(v,a)<0)&&(a=v),br(y,a)<0&&(a=y)})),{start:o,end:a}}var d=e.from(),f=e.to();if(d.line==f.line)h(d.line,d.ch,f.ch);else{var p=Kt(i,d.line),m=Kt(i,f.line),g=Fe(p)==Fe(m),v=h(d.line,d.ch,g?p.text.length+1:null).end,y=h(f.line,g?0:null,f.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function xr(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval((function(){t.hasFocus()||kr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.state.focused||(t.display.input.focus(),Cr(t))}function Er(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,kr(t))}),100)}function Cr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),xr(t))}function kr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,_(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function _r(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r<e.view.length;r++){var i=e.view[r],o=t.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(a&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var h=i.node.getBoundingClientRect();l=h.bottom-h.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-h.left-1)}var d=i.line.height-l;if((d>.005||d<-.005)&&(Yt(i.line,l),Tr(i.line),i.rest))for(var f=0;f<i.rest.length;f++)Tr(i.rest[f]);if(c>t.display.sizerWidth){var p=Math.ceil(c/ir(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Tr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Or(t,e,n){var r=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;r=Math.floor(r-En(t));var i=n&&null!=n.bottom?n.bottom:r+t.wrapper.clientHeight,o=Jt(e,r),a=Jt(e,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Jt(e,Ge(Kt(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(o=Jt(e,Ge(Kt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(t,e){var n=t.display,r=rr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=On(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+Cn(n),l=e.top<r,c=e.bottom>s-r;if(e.top<i)a.scrollTop=l?0:e.top;else if(e.bottom>i+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=i&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,f=Tn(t)-n.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?a.scrollLeft=0:e.left<d?a.scrollLeft=Math.max(0,e.left+h-(p?0:10)):e.right>f+d-3&&(a.scrollLeft=e.right+(p?0:10)-f),a}function Lr(t,e){null!=e&&(Rr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Dr(t){Rr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ir(t,e,n){null==e&&null==n||Rr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Rr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Mr(t,Xn(t,e.from),Xn(t,e.to),e.margin))}function Mr(t,e,n,r){var i=Ar(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Ir(t,i.scrollLeft,i.scrollTop)}function Nr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||li(t,{top:e}),jr(t,e,!0),n&&li(t),ri(t,100))}function jr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Pr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fr(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+Cn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+_n(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Br=function(t,e,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Br.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,(function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Br.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ur=function(){};function Hr(t,e){e||(e=Fr(t));var n=t.display.barWidth,r=t.display.barHeight;zr(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&_r(t),zr(t,Fr(t)),n=t.display.barWidth,r=t.display.barHeight}function zr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Br,null:Ur};function Vr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&_(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Pr(t,e):Nr(t,e)}),t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var Wr=0;function Kr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},e=t.curOp,an?an.ops.push(e):e.ownsGroup=an={ops:[e],delayedCallbacks:[]}}function qr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var r=0;r<t.ops.length;r++){var i=t.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<e.length)}(n)}finally{an=null,e(n)}}(e,(function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,n=0;n<e.length;n++)Xr(e[n]);for(var r=0;r<e.length;r++)Yr(e[r]);for(var i=0;i<e.length;i++)$r(e[i]);for(var o=0;o<e.length;o++)Jr(e[o]);for(var a=0;a<e.length;a++)Zr(e[a])}(t)}))}function Xr(t){var e=t.cm,n=e.display;!function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=_n(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=_n(t)+"px",e.scrollbarsClipped=!0)}(e),t.updateMaxLine&&We(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yr(t){t.updatedDisplay=t.mustUpdate&&ai(t.cm,t.update)}function $r(t){var e=t.cm,n=e.display;t.updatedDisplay&&_r(e),t.barMeasure=Fr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ln(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+_n(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Tn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Jr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Pr(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==I();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&Hr(e,t.barMeasure),t.updatedDisplay&&ui(e,t.barMeasure),t.selectionChanged&&xr(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&Sr(t.cm)}function Zr(t){var e=t.cm,n=e.display,r=e.doc;t.updatedDisplay&&si(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&jr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Pr(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!mt(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),i=null;if(e.top+r.top<0?i=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","",null,"position: absolute;\n top: "+(e.top-n.viewOffset-En(t.display))+"px;\n height: "+(e.bottom-e.top+_n(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=qn(t,e),l=n&&n!=e?qn(t,n):s,c=Ar(t,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Nr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(e,se(r,t.scrollToPos.from),se(r,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||pt(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&pt(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&pt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function Qr(t,e){if(t.curOp)return e();Kr(t);try{return e()}finally{qr(t)}}function ti(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Kr(t);try{return e.apply(t,arguments)}finally{qr(t)}}}function ei(t){return function(){if(this.curOp)return t.apply(this,arguments);Kr(this);try{return t.apply(this,arguments)}finally{qr(this)}}}function ni(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Kr(e);try{return t.apply(this,arguments)}finally{qr(e)}}}function ri(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,j(ii,t))}function ii(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,r=fe(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(r.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?zt(e.mode,r.state):null,l=he(t,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&d<a.length;++d)h=a[d]!=o.styles[d];h&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=t.options.maxHighlightLength&&pe(t,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Qr(t,(function(){for(var e=0;e<i.length;e++)dr(t,i[e],"text")}))}}var oi=function(t,e,n){var r=t.display;this.viewport=e,this.visible=Or(r,t.doc,e),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Tn(t),this.force=n,this.dims=or(t),this.events=[]};function ai(t,e){var n=t.display,r=t.doc;if(e.editorIsHidden)return fr(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(t))return!1;di(t)&&(fr(t),e.dims=or(t));var i=r.first+r.size,o=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Se&&(o=Be(t.doc,o),a=Ue(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;!function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=on(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=on(t,e,r.viewFrom).concat(r.view):r.viewFrom<e&&(r.view=r.view.slice(ur(t,e))),r.viewFrom=e,r.viewTo<n?r.view=r.view.concat(on(t,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(t,n)))),r.viewTo=n}(t,o,a),n.viewOffset=Ge(Kt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=mr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=I();if(!e||!D(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return c>4&&(n.lineDiv.style.display="none"),function(t,e,n){var r=t.display,i=t.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,h=0;h<c.length;h++){var d=c[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var f=i&&null!=e&&e<=u&&d.lineNumber;d.changes&&(U(d.changes,"gutter")>-1&&(f=!1),un(t,d,u,n)),f&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qt(t.options,u)))),a=d.node.nextSibling}else{var p=vn(t,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=I()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,ri(t,400)),n.updateLineNumbers=null,!0}function si(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Tn(t))r&&(e.visible=Or(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Cn(t.display)-On(t),n.top)}),e.visible=Or(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!ai(t,e))break;_r(t);var i=Fr(t);gr(t),Hr(t,i),ui(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function li(t,e){var n=new oi(t,e);if(ai(t,n)){_r(t),si(t,n);var r=Fr(t);gr(t),Hr(t,r),ui(t,r),n.finish()}}function ci(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function ui(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+_n(t)+"px"}function hi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=r+i+"px")}}function di(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=Qt(t.options,e.first+e.size-1),r=t.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(t.display),!0}return!1}function fi(t,e){for(var n=[],r=!1,i=0;i<t.length;i++){var o=t[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;r=!0}n.push({className:o,style:a})}return e&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(t){var e=t.gutters,n=t.gutterSpecs;T(e),t.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=e.appendChild(A("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(t.lineGutter=s,s.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",ci(t)}function mi(t){pi(t.display),hr(t),hi(t)}function gi(t,e,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=L("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=L("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=L("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=fi(i.gutters,i.lineNumbers),pi(o),r.init(o)}oi.prototype.signal=function(t,e){vt(t,e)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var t=0;t<this.events.length;t++)pt.apply(null,this.events[t])};var vi=0,yi=null;function bi(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function wi(t){var e=bi(t);return e.x*=yi,e.y*=yi,e}function xi(t,e){var r=bi(e),i=r.x,o=r.y,a=t.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,f=a.view;d!=s;d=d.parentNode)for(var p=0;p<f.length;p++)if(f[p].node==d){t.display.currentWheelTarget=d;break t}if(i&&!n&&!h&&null!=yi)return o&&u&&Nr(t,Math.max(0,s.scrollTop+o*yi)),Pr(t,Math.max(0,s.scrollLeft+i*yi)),(!o||o&&u)&&bt(e),void(a.wheelStartX=null);if(o&&null!=yi){var m=o*yi,g=t.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(t.doc.height,v+m+50),li(t,{top:g,bottom:v})}vi<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var t=s.scrollLeft-a.wheelStartX,e=s.scrollTop-a.wheelStartY,n=e&&a.wheelDY&&e/a.wheelDY||t&&a.wheelDX&&t/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(yi=(yi*vi+n)/(vi+1),++vi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?yi=-.53:n?yi=15:u?yi=-.7:d&&(yi=-1/3);var Si=function(t,e){this.ranges=t,this.primIndex=e};Si.prototype.primary=function(){return this.ranges[this.primIndex]},Si.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],r=t.ranges[e];if(!ne(n.anchor,r.anchor)||!ne(n.head,r.head))return!1}return!0},Si.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new Ei(re(this.ranges[e].anchor),re(this.ranges[e].head));return new Si(t,this.primIndex)},Si.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Si.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ee(e,r.from())>=0&&ee(t,r.to())<=0)return n}return-1};var Ei=function(t,e){this.anchor=t,this.head=e};function Ci(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return ee(t.from(),e.from())})),n=U(e,i);for(var o=1;o<e.length;o++){var a=e[o],s=e[o-1],l=ee(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=oe(s.from(),a.from()),u=ie(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new Ei(h?u:c,h?c:u))}}return new Si(e,n)}function ki(t,e){return new Si([new Ei(t,e||t)],0)}function _i(t){return t.text?te(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ti(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return _i(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=_i(e).ch-e.to.ch),te(n,r)}function Oi(t,e){for(var n=[],r=0;r<t.sel.ranges.length;r++){var i=t.sel.ranges[r];n.push(new Ei(Ti(i.anchor,e),Ti(i.head,e)))}return Ci(t.cm,n,t.sel.primIndex)}function Ai(t,e,n){return t.line==e.line?te(n.line,t.ch-e.ch+n.ch):te(n.line+(t.line-e.line),t.ch)}function Li(t){t.doc.mode=Bt(t.options,t.doc.modeOption),Di(t)}function Di(t){t.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,ri(t,100),t.state.modeGen++,t.curOp&&hr(t)}function Ii(t,e){return 0==e.from.ch&&0==e.to.ch&&""==X(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Ri(t,e,n,r){function i(t){return n?n[t]:null}function o(t,n,i){!function(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Oe(t),Ae(t,n);var i=r?r(t):1;i!=t.height&&Yt(t,i)}(t,n,i,r),ln(t,"change",t,e)}function a(t,e){for(var n=[],o=t;o<e;++o)n.push(new Ke(c[o],i(o),r));return n}var s=e.from,l=e.to,c=e.text,u=Kt(t,s.line),h=Kt(t,l.line),d=X(c),f=i(c.length-1),p=l.line-s.line;if(e.full)t.insert(0,a(0,c.length)),t.remove(c.length,t.size-c.length);else if(Ii(t,e)){var m=a(0,c.length-1);o(h,h.text,f),p&&t.remove(s.line,p),m.length&&t.insert(s.line,m)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),f);else{var g=a(1,c.length-1);g.push(new Ke(d+u.text.slice(l.ch),f,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),t.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+h.text.slice(l.ch),i(0)),t.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(h,d+h.text.slice(l.ch),f);var v=a(1,c.length-1);p>1&&t.remove(s.line+1,p-1),t.insert(s.line+1,v)}ln(t,"change",t,e)}function Mi(t,e,n){!function t(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(e(s.doc,l),t(s.doc,r,l))}}}(t,null,!0)}function Ni(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,lr(t),Li(t),ji(t),t.options.lineWrapping||We(t),t.options.mode=e.modeOption,hr(t)}function ji(t){("rtl"==t.doc.direction?R:_)(t.display.lineDiv,"CodeMirror-rtl")}function Pi(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function Fi(t,e){var n={from:re(e.from),to:_i(e),text:qt(t,e.from,e.to)};return Gi(t,n,e.from.line,e.to.line+1),Mi(t,(function(t){return Gi(t,n,e.from.line,e.to.line+1)}),!0),n}function Bi(t){for(;t.length&&X(t).ranges;)t.pop()}function Ui(t,e,n,r){var i=t.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&i.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Bi(t.done),X(t.done)):t.done.length&&!X(t.done).ranges?X(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}(i,i.lastOp==r)))a=X(o.changes),0==ee(e.from,e.to)&&0==ee(e.from,a.to)?a.to=_i(e):o.changes.push(Fi(t,e));else{var l=X(i.done);for(l&&l.ranges||zi(t.sel,i.done),o={changes:[Fi(t,e)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,a||pt(t,"historyAdded")}function Hi(t,e,n,r){var i=t.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,X(i.done),e))?i.done[i.done.length-1]=e:zi(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function zi(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Gi(t,e,n,r){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Vi(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function Wi(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var r=[],i=0;i<e.text.length;++i)r.push(Vi(n[i]));return r}(t,e),r=_e(t,e);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue t;o.push(l)}else a&&(n[i]=a)}return n}function Ki(t,e,n){for(var r=[],i=0;i<t.length;++i){var o=t[i];if(o.ranges)r.push(n?Si.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),e)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&U(e,Number(u[1]))>-1&&(X(s)[h]=c[h],delete c[h])}}}return r}function qi(t,e,n,r){if(r){var i=t.anchor;if(n){var o=ee(e,i)<0;o!=ee(n,i)<0?(i=e,e=n):o!=ee(e,n)<0&&(e=n)}return new Ei(i,e)}return new Ei(n||e,e)}function Xi(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Qi(t,new Si([qi(t.sel.primary(),e,n,i)],0),r)}function Yi(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)r[o]=qi(t.sel.ranges[o],e[o],null,i);Qi(t,Ci(t.cm,r,t.sel.primIndex),n)}function $i(t,e,n,r){var i=t.sel.ranges.slice(0);i[e]=n,Qi(t,Ci(t.cm,i,t.sel.primIndex),r)}function Ji(t,e,n,r){Qi(t,ki(e,n),r)}function Zi(t,e,n){var r=t.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=e,to(t,e,n)):Qi(t,e,n)}function Qi(t,e,n){to(t,e,n),Hi(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function to(t,e,n){(vt(t,"beforeSelectionChange")||t.cm&&vt(t.cm,"beforeSelectionChange"))&&(e=function(t,e,n){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new Ei(se(t,e[n].anchor),se(t,e[n].head))},origin:n&&n.origin};return pt(t,"beforeSelectionChange",t,r),t.cm&&pt(t.cm,"beforeSelectionChange",t.cm,r),r.ranges!=e.ranges?Ci(t.cm,r.ranges,r.ranges.length-1):e}(t,e,n));var r=n&&n.bias||(ee(e.primary().head,t.sel.primary().head)<0?-1:1);eo(t,ro(t,e,r,!0)),n&&!1===n.scroll||!t.cm||Dr(t.cm)}function eo(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,gt(t.cm)),ln(t,"cursorActivity",t))}function no(t){eo(t,ro(t,t.sel,null,!1))}function ro(t,e,n,r){for(var i,o=0;o<e.ranges.length;o++){var a=e.ranges[o],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=oo(t,a.anchor,s&&s.anchor,n,r),c=oo(t,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=e.ranges.slice(0,o)),i[o]=new Ei(l,c))}return i?Ci(t.cm,i,e.primIndex):e}function io(t,e,n,r,i){var o=Kt(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(u?s.to>=e.ch:s.to>e.ch))){if(i&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=ao(t,h,-r,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(d=ee(h,n))&&(r<0?d<0:d>0))return io(t,h,e,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ao(t,f,r,f.line==e.line?o:null)),f?io(t,f,e,r,i):null}}return e}function oo(t,e,n,r,i){var o=r||1,a=io(t,e,n,o,i)||!i&&io(t,e,n,o,!0)||io(t,e,n,-o,i)||!i&&io(t,e,n,-o,!0);return a||(t.cantEdit=!0,te(t.first,0))}function ao(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?se(t,te(e.line-1)):null:n>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line<t.first+t.size-1?te(e.line+1,0):null:new te(e.line,e.ch+n)}function so(t){t.setSelection(te(t.firstLine(),0),te(t.lastLine()),z)}function lo(t,e,n){var r={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(e,n,i,o){e&&(r.from=se(t,e)),n&&(r.to=se(t,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),pt(t,"beforeChange",t,r),t.cm&&pt(t.cm,"beforeChange",t.cm,r),r.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function co(t,e,n){if(t.cm){if(!t.cm.curOp)return ti(t.cm,co)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(vt(t,"beforeChange")||t.cm&&vt(t.cm,"beforeChange"))||(e=lo(t,e,!0))){var r=xe&&!n&&function(t,e,n){var r=null;if(t.iter(e.line,n.line+1,(function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:e,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ee(c.to,s.from)<0||ee(c.from,s.to)>0)){var u=[l,1],h=ee(c.from,s.from),d=ee(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(t,e.from,e.to);if(r)for(var i=r.length-1;i>=0;--i)uo(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else uo(t,e)}}function uo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var n=Oi(t,e);Ui(t,e,n,t.cm?t.cm.curOp.id:NaN),po(t,e,n,_e(t,e));var r=[];Mi(t,(function(t,n){n||-1!=U(r,t.history)||(yo(t.history,e),r.push(t.history)),po(t,e,null,_e(t,e))}))}}function ho(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(t.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,l),n&&!i.equals(t.sel))return void Qi(t,i,{clearRedo:!1});a=i}var u=[];zi(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var h=vt(t,"beforeChange")||t.cm&&vt(t.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=e,h&&!lo(t,r,!1))return s.length=0,{};u.push(Fi(t,r));var o=n?Oi(t,r):X(s);po(t,r,o,Wi(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:_i(r)});var a=[];Mi(t,(function(t,e){e||-1!=U(a,t.history)||(yo(t.history,r),a.push(t.history)),po(t,r,null,Wi(t,r))}))},f=i.changes.length-1;f>=0;--f){var p=d(f);if(p)return p.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new Si(Y(t.sel.ranges,(function(t){return new Ei(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){hr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(t.cm,r,"gutter")}}function po(t,e,n,r){if(t.cm&&!t.cm.curOp)return ti(t.cm,po)(t,e,n,r);if(e.to.line<t.first)fo(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var i=e.text.length-1-(t.first-e.from.line);fo(t,i),e={from:te(t.first,0),to:te(e.to.line+i,e.to.ch),text:[X(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:te(o,Kt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),n||(n=Oi(t,e)),t.cm?function(t,e,n){var r=t.doc,i=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=$t(Fe(Kt(r,o.line))),r.iter(l,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&gt(t),Ri(r,e,n,sr(t)),t.options.lineWrapping||(r.iter(l,o.line+e.text.length,(function(t){var e=Ve(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,r=e-1;r>n;r--){var i=Kt(t,r).stateAfter;if(i&&(!(i instanceof ce)||r+i.lookAhead<e)){n=r+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}(r,o.line),ri(t,400);var c=e.text.length-(a.line-o.line)-1;e.full?hr(t):o.line!=a.line||1!=e.text.length||Ii(t.doc,e)?hr(t,o.line,a.line+1,c):dr(t,o.line,"text");var u=vt(t,"changes"),h=vt(t,"change");if(h||u){var d={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};h&&ln(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}(t.cm,e,r):Ri(t,e,r),to(t,n,z),t.cantEdit&&oo(t,te(t.firstLine(),0))&&(t.cantEdit=!1)}}function mo(t,e,n,r,i){var o;r||(r=n),ee(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof e&&(e=t.splitLines(e)),co(t,{from:n,to:r,text:e,origin:i})}function go(t,e,n,r){n<t.line?t.line+=r:e<t.line&&(t.line=e,t.ch=0)}function vo(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i],a=!0;if(o.ranges){o.copied||((o=t[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)go(o.ranges[s].anchor,e,n,r),go(o.ranges[s].head,e,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=te(c.from.line+r,c.from.ch),c.to=te(c.to.line+r,c.to.ch);else if(e<=c.to.line){a=!1;break}}a||(t.splice(0,i+1),i=0)}}}function yo(t,e){var n=e.from.line,r=e.to.line,i=e.text.length-(r-n)-1;vo(t.done,n,r,i),vo(t.undone,n,r,i)}function bo(t,e,n,r){var i=e,o=e;return"number"==typeof e?o=Kt(t,ae(t,e)):i=$t(e),null==i?null:(r(o,i)&&t.cm&&dr(t.cm,i,n),o)}function wo(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function xo(t){this.children=t;for(var e=0,n=0,r=0;r<t.length;++r){var i=t[r];e+=i.chunkSize(),n+=i.height,i.parent=this}this.size=e,this.height=n,this.parent=null}Ei.prototype.from=function(){return oe(this.anchor,this.head)},Ei.prototype.to=function(){return ie(this.anchor,this.head)},Ei.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},wo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,r=t+e;n<r;++n){var i=this.lines[n];this.height-=i.height,qe(i),ln(i,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=this},iterN:function(t,e,n){for(var r=t+e;t<r;++t)if(n(this.lines[t]))return!0}},xo.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(t<i){var o=Math.min(e,i-t),a=r.height;if(r.removeInner(t,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(e-=o))break;t=0}else t-=i}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof wo))){var s=[];this.collapse(s),this.children=[new wo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(t<=o){if(i.insertInner(t,e,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new wo(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new xo(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=U(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var r=new xo(t.children);r.parent=t,t.children=[r,e],t=r}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(t<o){var a=Math.min(e,o-t);if(i.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=o}}};var So=function(t,e,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=t,this.node=e};function Eo(t,e,n){Ge(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Lr(t,n)}So.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,r=$t(n);if(null!=r&&e){for(var i=0;i<e.length;++i)e[i]==this&&e.splice(i--,1);e.length||(n.widgets=null);var o=xn(this);Yt(n,Math.max(0,n.height-o)),t&&(Qr(t,(function(){Eo(t,n,-o),dr(t,r,"widget")})),ln(t,"lineWidgetCleared",t,this,r))}},So.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=xn(this)-e;i&&(He(this.doc,r)||Yt(r,r.height+i),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,Eo(n,r,i),ln(n,"lineWidgetChanged",n,t,$t(r))})))},yt(So);var Co=0,ko=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Co};function _o(t,e,n,r,i){if(r&&r.shared)return function(t,e,n,r,i){(r=P(r)).shared=!1;var o=[_o(t,e,n,r,i)],a=o[0],s=r.widgetNode;return Mi(t,(function(t){s&&(r.widgetNode=s.cloneNode(!0)),o.push(_o(t,se(t,e),se(t,n),r,i));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;a=X(o)})),new To(o,a)}(t,e,n,r,i);if(t.cm&&!t.cm.curOp)return ti(t.cm,_o)(t,e,n,r,i);var o=new ko(t,i),a=ee(e,n);if(r&&P(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pe(t,e.line,e,n,o)||e.line!=n.line&&Pe(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Ui(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Fe(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&Yt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new Ee(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){He(t,e)&&Yt(e,0)})),o.clearOnEnter&&ht(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xe=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Co,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)dr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),vt(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Ce(a.markedSpans,this);t&&!this.collapsed?dr(t,$t(a),"text"):t&&(null!=s.to&&(i=$t(a)),null!=s.from&&(r=$t(a))),a.markedSpans=ke(a.markedSpans,s),null==s.from&&this.collapsed&&!He(this.doc,a)&&t&&Yt(a,rr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Fe(this.lines[l]),u=Ve(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&hr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&no(t.doc)),t&&ln(t,"markerCleared",t,this,r,i),e&&qr(t),this.parent&&this.parent.clear()}},ko.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Ce(o.markedSpans,this);if(null!=a.from&&(n=te(e?o:$t(o),a.from),-1==t))return n;if(null!=a.to&&(r=te(e?o:$t(o),a.to),1==t))return r}return n&&{from:n,to:r}},ko.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,r=this.doc.cm;e&&r&&Qr(r,(function(){var i=e.line,o=$t(e.line),a=Dn(r,o);if(a&&(Fn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!He(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=xn(n)-s;l&&Yt(i,i.height+l)}ln(r,"markerChanged",r,t)}))},ko.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=U(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},ko.prototype.detachLine=function(t){if(this.lines.splice(U(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},yt(ko);var To=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function Oo(t){return t.findMarks(te(t.first,0),t.clipPos(te(t.lastLine())),(function(t){return t.parent}))}function Ao(t){for(var e=function(e){var n=t[e],r=[n.primary.doc];Mi(n.primary.doc,(function(t){return r.push(t)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==U(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<t.length;n++)e(n)}To.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();ln(this,"clear")}},To.prototype.find=function(t,e){return this.primary.find(t,e)},yt(To);var Lo=0,Do=function(t,e,n,r,i){if(!(this instanceof Do))return new Do(t,e,n,r,i);null==n&&(n=0),xo.call(this,[new wo([new Ke("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=te(n,0);this.sel=ki(o),this.history=new Pi(null),this.id=++Lo,this.modeOption=e,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Ri(this,{from:o,to:o,text:t}),Qi(this,ki(o),z)};Do.prototype=J(xo.prototype,{constructor:Do,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,r=0;r<e.length;++r)n+=e[r].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Xt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:ni((function(t){var e=te(this.first,0),n=this.first+this.size-1;co(this,{from:e,to:te(n,Kt(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),Qi(this,ki(e),z)})),replaceRange:function(t,e,n,r){mo(this,t,e=se(this,e),n=n?se(this,n):e,r)},getRange:function(t,e,n){var r=qt(this,se(this,t),se(this,e));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(Zt(this,t))return Kt(this,t)},getLineNumber:function(t){return $t(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Kt(this,t)),Fe(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return se(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(t,e,n){Ji(this,se(this,"number"==typeof t?te(t,e||0):t),null,n)})),setSelection:ni((function(t,e,n){Ji(this,se(this,t),se(this,e||t),n)})),extendSelection:ni((function(t,e,n){Xi(this,se(this,t),e&&se(this,e),n)})),extendSelections:ni((function(t,e){Yi(this,le(this,t),e)})),extendSelectionsBy:ni((function(t,e){Yi(this,le(this,Y(this.sel.ranges,t)),e)})),setSelections:ni((function(t,e,n){if(t.length){for(var r=[],i=0;i<t.length;i++)r[i]=new Ei(se(this,t[i].anchor),se(this,t[i].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),Qi(this,Ci(this.cm,r,e),n)}})),addSelection:ni((function(t,e,n){var r=this.sel.ranges.slice(0);r.push(new Ei(se(this,t),se(this,e||t))),Qi(this,Ci(this.cm,r,r.length-1),n)})),getSelection:function(t){for(var e,n=this.sel.ranges,r=0;r<n.length;r++){var i=qt(this,n[r].from(),n[r].to());e=e?e.concat(i):i}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=qt(this,n[r].from(),n[r].to());!1!==t&&(i=i.join(t||this.lineSeparator())),e[r]=i}return e},replaceSelection:function(t,e,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=t;this.replaceSelections(r,e,n||"+input")},replaceSelections:ni((function(t,e,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(t[o]),origin:n}}for(var s=e&&"end"!=e&&function(t,e,n){for(var r=[],i=te(t.first,0),o=i,a=0;a<e.length;a++){var s=e[a],l=Ai(s.from,i,o),c=Ai(_i(s),i,o);if(i=s.to,o=c,"around"==n){var u=t.sel.ranges[a],h=ee(u.head,u.anchor)<0;r[a]=new Ei(h?c:l,h?l:c)}else r[a]=new Ei(l,l)}return new Si(r,t.sel.primIndex)}(this,r,e),l=r.length-1;l>=0;l--)co(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r<t.done.length;r++)t.done[r].ranges||++e;for(var i=0;i<t.undone.length;i++)t.undone[i].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new Pi(this.history.maxGeneration),Mi(this,(function(e){return e.history=t.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(t){var e=this.history=new Pi(this.history.maxGeneration);e.done=Ki(t.done.slice(0),null,!0),e.undone=Ki(t.undone.slice(0),null,!0)},setGutterMarker:ni((function(t,e,n){return bo(this,t,"gutter",(function(t){var r=t.gutterMarkers||(t.gutterMarkers={});return r[e]=n,!n&&et(r)&&(t.gutterMarkers=null),!0}))})),clearGutter:ni((function(t){var e=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[t]&&bo(e,n,"gutter",(function(){return n.gutterMarkers[t]=null,et(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(t){var e;if("number"==typeof t){if(!Zt(this,t))return null;if(e=t,!(t=Kt(this,t)))return null}else if(null==(e=$t(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:ni((function(t,e,n){return bo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[r]){if(C(n).test(t[r]))return!1;t[r]+=" "+n}else t[r]=n;return!0}))})),removeLineClass:ni((function(t,e,n){return bo(this,t,"gutter"==e?"gutter":"class",(function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",i=t[r];if(!i)return!1;if(null==n)t[r]=null;else{var o=i.match(C(n));if(!o)return!1;var a=o.index+o[0].length;t[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ni((function(t,e,n){return function(t,e,n,r){var i=new So(t,n,r),o=t.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),bo(t,e,"widget",(function(e){var n=e.widgets||(e.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=e,o&&!He(t,e)){var r=Ge(e)<t.scrollTop;Yt(e,e.height+xn(i)),r&&Lr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&ln(o,"lineWidgetAdded",o,i,"number"==typeof e?e:$t(e)),i}(this,t,e,n)})),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return _o(this,se(this,t),se(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return _o(this,t=se(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=Kt(this,(t=se(this,t)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=t.ch)&&(null==i.to||i.to>=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=se(this,t),e=se(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==t.line&&t.ch>=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&t.push(n[r].marker)})),t},posFromIndex:function(t){var e,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>t)return e=t,!0;t-=o,++n})),se(this,te(n,e))},indexFromPos:function(t){var e=(t=se(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,(function(t){e+=t.text.length+n})),e},copy:function(t){var e=new Do(Xt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var r=new Do(Xt(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:t.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=r.find(),o=t.clipPos(i.from),a=t.clipPos(i.to);if(ee(o,a)){var s=_o(t,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Oo(this)),r},unlinkDoc:function(t){if(t instanceof Ta&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),Ao(Oo(this));break}if(t.history==this.history){var n=[t.id];Mi(t,(function(t){return n.push(t.id)}),!0),t.history=new Pi(null),t.history.done=Ki(this.history.done,n),t.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(t){Mi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Dt(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(t){var e;"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter((function(t){return t.order=null})),this.cm&&Qr(e=this.cm,(function(){ji(e),hr(e)})))}))}),Do.prototype.eachLine=Do.prototype.iter;var Io=0;function Ro(t){var e=this;if(Mo(e),!mt(e,t)&&!Sn(e.display,t)){bt(t),a&&(Io=+new Date);var n=cr(e,t,!0),r=t.dataTransfer.files;if(n&&!e.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&ti(e,(function(){var t={from:n=se(e.doc,n),to:n,text:e.doc.splitLines(o.filter((function(t){return null!=t})).join(e.doc.lineSeparator())),origin:"paste"};co(e.doc,t),Zi(e.doc,ki(se(e.doc,n),se(e.doc,_i(t))))}))()},c=function(t,n){if(e.options.allowDropFileTypes&&-1==U(e.options.allowDropFileTypes,t.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var t=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(o[n]=t),l()},r.readAsText(t)}},u=0;u<r.length;u++)c(r[u],u);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),to(e.doc,ki(n,n)),d)for(var f=0;f<d.length;++f)mo(e.doc,"",d[f].anchor,d[f].head,"drag");e.replaceSelection(h,"around","paste"),e.display.input.focus()}}catch(t){}}}}function Mo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function No(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var i=e[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var e=0;e<n.length;e++)t(n[e])}))}}var jo=!1;function Po(){var t;jo||(ht(window,"resize",(function(){null==t&&(t=setTimeout((function(){t=null,No(Fo)}),100))})),ht(window,"blur",(function(){return No(kr)})),jo=!0)}function Fo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Bo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Uo=0;Uo<10;Uo++)Bo[Uo+48]=Bo[Uo+96]=String(Uo);for(var Ho=65;Ho<=90;Ho++)Bo[Ho]=String.fromCharCode(Ho);for(var zo=1;zo<=12;zo++)Bo[zo+111]=Bo[zo+63235]="F"+zo;var Go={};function Vo(t){var e,n,r,i,o=t.split(/-(?!$)/);t=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),i&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function Wo(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete t[n];continue}for(var i=Y(n.split(" "),Vo),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var c in e)t[c]=e[c];return t}function Ko(t,e,n,r){var i=(e=$o(e)).call?e.call(t,r):e[t];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Ko(t,e.fallthrough,n,r);for(var o=0;o<e.fallthrough.length;o++){var a=Ko(t,e.fallthrough[o],n,r);if(a)return a}}}function qo(t){var e="string"==typeof t?t:Bo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Xo(t,e,n){var r=t;return e.altKey&&"Alt"!=r&&(t="Alt-"+t),(S?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(t="Ctrl-"+t),(S?e.ctrlKey:e.metaKey)&&"Mod"!=r&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=r&&(t="Shift-"+t),t}function Yo(t,e){if(h&&34==t.keyCode&&t.char)return!1;var n=Bo[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),Xo(n,t,e))}function $o(t){return"string"==typeof t?Go[t]:t}function Jo(t,e){for(var n=t.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=e(n[i]);r.length&&ee(o.from,X(r).to)<=0;){var a=r.pop();if(ee(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Qr(t,(function(){for(var e=r.length-1;e>=0;e--)mo(t.doc,"",r[e].from,r[e].to,"+delete");Dr(t)}))}function Zo(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Qo(t,e,n){var r=Zo(t,e.ch,n);return null==r?null:new te(e.line,r,n<0?"after":"before")}function ta(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=ct(n,e.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=In(e,n);a=i<0?n.text.length-1:0;var u=Rn(e,c,a).top;a=ot((function(t){return Rn(e,c,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new te(r,a,l)}}return new te(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ea={selectAll:so,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),z)},killLine:function(t){return Jo(t,(function(e){if(e.empty()){var n=Kt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:te(e.head.line+1,0)}:{from:e.head,to:te(e.head.line,n)}}return{from:e.from(),to:e.to()}}))},deleteLine:function(t){return Jo(t,(function(e){return{from:te(e.from().line,0),to:se(t.doc,te(e.to().line+1,0))}}))},delLineLeft:function(t){return Jo(t,(function(t){return{from:te(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(t){return Jo(t,(function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}}))},delWrappedLineRight:function(t){return Jo(t,(function(e){var n=t.charCoords(e.head,"div").top+5,r=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:r}}))},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(te(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(te(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy((function(e){return na(t,e.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy((function(e){return ra(t,e.head)}),{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy((function(e){return function(t,e){var n=Kt(t.doc,e),r=function(t){for(var e;e=Ne(t);)t=e.find(1,!0).line;return t}(n);return r!=n&&(e=$t(r)),ta(!0,t,n,e,-1)}(t,e.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(t){return t.extendSelectionsBy((function(e){var n=t.cursorCoords(e.head,"div").top+5,r=t.coordsChar({left:0,top:n},"div");return r.ch<t.getLine(r.line).search(/\S/)?ra(t,e.head):r}),V)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),r=t.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=F(t.getLine(o.line),o.ch,r);e.push(q(r-a%r))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=[],r=0;r<e.length;r++)if(e[r].empty()){var i=e[r].head,o=Kt(t.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new te(i.line,i.ch-1)),i.ch>0)i=new te(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),te(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Kt(t.doc,i.line-1).text;a&&(i=new te(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),te(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ei(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r<e.length;r++)t.indentLine(e[r].from().line,null,!0);Dr(t)}))},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function na(t,e){var n=Kt(t.doc,e),r=Fe(n);return r!=n&&(e=$t(r)),ta(!0,t,r,e,1)}function ra(t,e){var n=na(t,e.line),r=Kt(t.doc,n.line),i=ct(r,t.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return te(n.line,a?0:o,n.sticky)}return n}function ia(t,e,n){if("string"==typeof e&&!(e=ea[e]))return!1;t.display.input.ensurePolled();var r=t.display.shift,i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),i=e(t)!=H}finally{t.display.shift=r,t.state.suppressEdits=!1}return i}var oa=new B;function aa(t,e,n,r){var i=t.state.keySeq;if(i){if(qo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:oa.set(50,(function(){t.state.keySeq==i&&(t.state.keySeq=null,t.display.input.reset())})),sa(t,i+" "+e,n,r))return!0}return sa(t,e,n,r)}function sa(t,e,n,r){var i=function(t,e,n){for(var r=0;r<t.state.keyMaps.length;r++){var i=Ko(e,t.state.keyMaps[r],n,t);if(i)return i}return t.options.extraKeys&&Ko(e,t.options.extraKeys,n,t)||Ko(e,t.options.keyMap,n,t)}(t,e,r);return"multi"==i&&(t.state.keySeq=e),"handled"==i&&ln(t,"keyHandled",t,e,n),"handled"!=i&&"multi"!=i||(bt(n),xr(t)),!!i}function la(t,e){var n=Yo(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?aa(t,"Shift-"+n,e,(function(e){return ia(t,e,!0)}))||aa(t,n,e,(function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return ia(t,e)})):aa(t,n,e,(function(e){return ia(t,e)})))}var ca=null;function ua(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=I(),mt(e,t)))){a&&s<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var i=la(e,t);h&&(ca=i?r:null,i||88!=r||Rt||!(y?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(_(e,"CodeMirror-crosshair"),ft(document,"keyup",n),ft(document,"mouseover",n))}R(e,"CodeMirror-crosshair"),ht(document,"keyup",n),ht(document,"mouseover",n)}(e)}}function ha(t){16==t.keyCode&&(this.doc.sel.shift=!1),mt(this,t)}function da(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||Sn(e.display,t)||mt(e,t)||t.ctrlKey&&!t.altKey||y&&t.metaKey)){var n=t.keyCode,r=t.charCode;if(h&&n==ca)return ca=null,void bt(t);if(!h||t.which&&!(t.which<10)||!la(e,t)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(t,e,n){return aa(t,"'"+n+"'",e,(function(e){return ia(t,e,!0)}))}(e,t,i)||e.display.input.onKeyPress(t))}}}var fa,pa,ma=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ga(t){var e=this,n=e.display;if(!(mt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,Sn(n,t))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ba(e,t)){var r=cr(e,t),i=Ct(t),o=r?function(t,e){var n=+new Date;return pa&&pa.compare(n,t,e)?(fa=pa=null,"triple"):fa&&fa.compare(n,t,e)?(pa=new ma(n,t,e),fa=null,"double"):(fa=new ma(n,t,e),pa=null,"single")}(r,i):"single";window.focus(),1==i&&e.state.selectingText&&e.state.selectingText(t),r&&function(t,e,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),aa(t,Xo(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,(function(e){if("string"==typeof e&&(e=ea[e]),!e)return!1;var r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r=e(t,n)!=H}finally{t.state.suppressEdits=!1}return r}))}(e,i,r,o,t)||(1==i?r?function(t,e,n,r){a?setTimeout(j(Sr,t),0):t.curOp.focus=I();var i,o=function(t,e,n){var r=t.getOption("configureMouse"),i=r?r(t,e,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==i.extend||t.doc.extend)&&(i.extend=t.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(t,n,r),c=t.doc.sel;t.options.dragDrop&&Tt&&!t.isReadOnly()&&"single"==n&&(i=c.contains(e))>-1&&(ee((i=c.ranges[i]).from(),e)<0||e.xRel>0)&&(ee(i.to(),e)>0||e.xRel<0)?function(t,e,n,r){var i=t.display,o=!1,c=ti(t,(function(e){l&&(i.scroller.draggable=!1),t.state.draggingText=!1,ft(i.wrapper.ownerDocument,"mouseup",c),ft(i.wrapper.ownerDocument,"mousemove",u),ft(i.scroller,"dragstart",h),ft(i.scroller,"drop",c),o||(bt(e),r.addNew||Xi(t.doc,n,null,null,r.extend),l&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ht(i.wrapper.ownerDocument,"mouseup",c),ht(i.wrapper.ownerDocument,"mousemove",u),ht(i.scroller,"dragstart",h),ht(i.scroller,"drop",c),Er(t),setTimeout((function(){return i.input.focus()}),20)}(t,r,e,o):function(t,e,n,r){var i=t.display,o=t.doc;bt(e);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Ei(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ei(n,n)),n=cr(t,e,!0,!0),s=-1;else{var u=va(t,n,r.unit);a=r.extend?qi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(o,Ci(t,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ci(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):$i(o,s,a,G):(s=0,Qi(o,new Si([a],0),G),l=o.sel);var h=n;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],c=t.options.tabSize,u=F(Kt(o,n.line).text,n.ch,c),d=F(Kt(o,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Kt(o,m).text,y=W(v,f,c);f==p?i.push(new Ei(te(m,y),te(m,y))):v.length>y&&i.push(new Ei(te(m,y),te(m,W(v,p,c))))}i.length||i.push(new Ei(n,n)),Qi(o,Ci(t,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,w=a,x=va(t,e,r.unit),S=w.anchor;ee(x.anchor,S)>0?(b=x.head,S=oe(w.from(),x.anchor)):(b=x.anchor,S=ie(w.to(),x.head));var E=l.ranges.slice(0);E[s]=function(t,e){var n=e.anchor,r=e.head,i=Kt(t.doc,n.line);if(0==ee(n,r)&&n.sticky==r.sticky)return e;var o=ct(i);if(!o)return e;var a=st(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=st(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?e:new Ei(new te(n.line,p,m),r)}(t,new Ei(se(o,S),b)),Qi(o,Ci(t,E,s),G)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),i.input.focus()),ft(i.wrapper.ownerDocument,"mousemove",g),ft(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ti(t,(function(e){0!==e.buttons&&Ct(e)?function e(n){var a=++p,s=cr(t,n,!0,"rectangle"==r.unit);if(s)if(0!=ee(s,h)){t.curOp.focus=I(),d(s);var l=Or(i,o);(s.line>=l.to||s.line<l.from)&&setTimeout(ti(t,(function(){p==a&&e(n)})),150)}else{var c=n.clientY<f.top?-20:n.clientY>f.bottom?20:0;c&&setTimeout(ti(t,(function(){p==a&&(i.scroller.scrollTop+=c,e(n))})),50)}}(e):m(e)})),v=ti(t,m);t.state.selectingText=v,ht(i.wrapper.ownerDocument,"mousemove",g),ht(i.wrapper.ownerDocument,"mouseup",v)}(t,r,e,o)}(e,r,o,t):Et(t)==n.scroller&&bt(t):2==i?(r&&Xi(e.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(E?e.display.input.onContextMenu(t):Er(e)))}}function va(t,e,n){if("char"==n)return new Ei(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ei(te(e.line,0),se(t.doc,te(e.line+1,0)));var r=n(t,e);return new Ei(r.from,r.to)}function ya(t,e,n,r){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,n))return xt(e);o-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return pt(t,n,t,Jt(t.doc,o),t.display.gutterSpecs[l].className,e),xt(e)}}function ba(t,e){return ya(t,e,"gutterClick",!0)}function wa(t,e){Sn(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&ya(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||E||t.display.input.onContextMenu(e)}function xa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(t)}ma.prototype.compare=function(t,e,n){return this.time+400>t&&0==ee(e,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},Ea={},Ca={};function ka(t,e,n){if(!e!=!(n&&n!=Sa)){var r=t.display.dragFunctions,i=e?ht:ft;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function _a(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(_(t.display.wrapper,"CodeMirror-wrap"),We(t)),lr(t),hr(t),Un(t),setTimeout((function(){return Hr(t)}),100)}function Ta(t,e){var n=this;if(!(this instanceof Ta))return new Ta(t,e);this.options=e=e?P(e):{},P(Ea,e,!1);var r=e.value;"string"==typeof r?r=new Do(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Ta.inputStyles[e.inputStyle](this),o=this.display=new gi(t,r,i,e);for(var c in o.wrapper.CodeMirror=this,xa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",ti(t,ga)),ht(e.scroller,"dblclick",a&&s<11?ti(t,(function(e){if(!mt(t,e)){var n=cr(t,e);if(n&&!ba(t,e)&&!Sn(t.display,e)){bt(e);var r=t.findWordAt(n);Xi(t.doc,r.anchor,r.head)}}})):function(e){return mt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return wa(t,e)})),ht(e.input.getField(),"contextmenu",(function(n){e.scroller.contains(n.target)||wa(t,n)}));var n,r={end:0};function i(){e.activeTouch&&(n=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}ht(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Sn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Ei(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new Ei(te(s.line,0),se(t.doc,te(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),bt(n)}i()})),ht(e.scroller,"touchcancel",i),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Nr(t,e.scroller.scrollTop),Pr(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return xi(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return xi(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||St(e)},over:function(e){mt(t,e)||(function(t,e){var n=cr(t,e);if(n){var r=document.createDocumentFragment();yr(t,n,r),t.display.dragCursor||(t.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),O(t.display.dragCursor,r)}}(t,e),St(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Io<100))St(e);else if(!mt(t,e)&&!Sn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(t,e)},drop:ti(t,Ro),leave:function(e){mt(t,e)||Mo(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return ha.call(t,e)})),ht(l,"keydown",ti(t,ua)),ht(l,"keypress",ti(t,da)),ht(l,"focus",(function(e){return Cr(t,e)})),ht(l,"blur",(function(e){return kr(t,e)}))}(this),Po(),Kr(this),this.curOp.forceUpdate=!0,Ni(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Cr(n)}),20):kr(this),Ca)Ca.hasOwnProperty(c)&&Ca[c](this,e[c],Sa);di(this),e.finishInit&&e.finishInit(this);for(var u=0;u<Oa.length;++u)Oa[u](this);qr(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ta.defaults=Ea,Ta.optionHandlers=Ca;var Oa=[];function Aa(t,e,n,r){var i,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=fe(t,e).state:n="prev");var a=t.options.tabSize,s=Kt(o,e),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==H||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?F(Kt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,h+="\t";if(d<c&&(h+=q(c-d)),h!=u)return mo(o,h,te(e,0),te(e,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==e&&m.head.ch<u.length){var g=te(e,u.length);$i(o,p,new Ei(g,g));break}}}Ta.defineInitHook=function(t){return Oa.push(t)};var La=null;function Da(t){La=t}function Ia(t,e,n,r,i){var o=t.doc;t.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||t.state.pasteIncoming>a,l=Dt(e),c=null;if(s&&r.ranges.length>1)if(La&&La.text.join("\n")==e){if(r.ranges.length%La.text.length==0){c=[];for(var u=0;u<La.text.length;u++)c.push(o.splitLines(La.text[u]))}}else l.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(c=Y(l,(function(t){return[t]})));for(var h=t.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=te(p.line,p.ch-n):t.state.overwrite&&!s?m=te(m.line,Math.min(Kt(o,m.line).text.length,m.ch+X(l).length)):s&&La&&La.lineWise&&La.text.join("\n")==l.join("\n")&&(p=m=te(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};co(t.doc,g),ln(t,"inputRead",t,g)}e&&!s&&Ma(t,e),Dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ra(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return Ia(e,n,0,null,"paste")})),!0}function Ma(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(e.indexOf(o.electricChars.charAt(s))>-1){a=Aa(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Kt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(t,i.head.line,"smart"));a&&ln(t,"electricInput",t,i.head.line)}}}function Na(t){for(var e=[],n=[],r=0;r<t.doc.sel.ranges.length;r++){var i=t.doc.sel.ranges[r].head.line,o={anchor:te(i,0),head:te(i+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function ja(t,e,n,r){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",r?"":"off"),t.setAttribute("spellcheck",!!e)}function Pa(){var t=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=A("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),m&&(t.style.border="1px solid black"),ja(t),e}function Fa(t,e,n,r,i){var o=e,a=n,s=Kt(t,e.line),l=i&&"rtl"==t.direction?-n:n;function c(o){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(e.ch+(r>0?0:-1));a=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?function(t,e,n,r){var i=ct(e,t.doc.direction);if(!i)return Qo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=st(i,n.ch,n.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Qo(e,n,r);var s,l=function(t,n){return Zo(e,t instanceof te?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(s=s||In(t,e),Zn(t,e,s,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==a.level){var h=1==a.level==r<0,d=l(n,h?1:-1);if(null!=d&&(h?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var f=h?"before":"after";return new te(n.line,d,f)}}var p=function(t,e,r){for(var o=function(t,e){return e?new te(n.line,l(t,1),"before"):new te(n.line,t,"after")};t>=0&&t<i.length;t+=e){var a=i[t],s=e>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},m=p(o+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==e.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(t.cm,s,e,n):Qo(s,e,n);if(null==a){if(o||(c=e.line+l)<t.first||c>=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(s=Kt(t,c))))return!1;e=ta(i,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(e.ch)||"\n",m=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),e.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=oo(t,e,o,a,!0);return ne(o,g)&&(g.hitSide=!0),g}function Ba(t,e,n,r){var i,o,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(t.display),3);i=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(o=$n(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(t,e){var n=Dn(t,e.line);if(!n||n.hidden)return null;var r=Kt(t.doc,e.line),i=An(n,r,e.line),o=ct(r,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=jn(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(t,e){return e&&(t.bad=!0),t}function Ga(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return za(t.clipPos(te(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var i=0;i<t.display.view.length;i++){var o=t.display.view[i];if(o.node==r)return Va(o,e,n)}}function Va(t,e,n){var r=t.text.firstChild,i=!1;if(!e||!D(r,e))return za(te($t(t.line),0),!0);if(e==r&&(i=!0,e=r.childNodes[n],n=0,!e)){var o=t.rest?X(t.rest):t.line;return za(te($t(o),o.text.length),i)}var a=3==e.nodeType?e:null,s=e;for(a||1!=e.childNodes.length||3!=e.firstChild.nodeType||(a=e.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=t.measure,c=l.maps;function u(e,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==e||s==n){var u=$t(i<0?t.line:t.rest[i]),h=o[a]+r;return(r<0||s!=e)&&(h=o[a+(r?1:0)]),te(u,h)}}}var h=u(a,s,n);if(h)return za(h,i);for(var d=s.nextSibling,f=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(h=u(d,d.firstChild,0))return za(te(h.line,h.ch-f),i);f+=d.textContent.length}for(var p=s.previousSibling,m=n;p;p=p.previousSibling){if(h=u(p,p.firstChild,-1))return za(te(h.line,h.ch+m),i);m+=p.textContent.length}}Ua.prototype.init=function(t){var e=this,n=this,r=n.cm,i=n.div=t.lineDiv;function o(t){for(var e=t.target;e;e=e.parentNode){if(e==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function a(t){if(o(t)&&!mt(r,t)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Na(r);Da({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation((function(){r.setSelections(e.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(t.clipboardData){t.clipboardData.clearData();var a=La.text.join("\n");if(t.clipboardData.setData("Text",a),t.clipboardData.getData("Text")==a)return void t.preventDefault()}var s=Pa(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=La.text.join("\n");var c=document.activeElement;N(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}ja(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),ht(i,"paste",(function(t){!o(t)||mt(r,t)||Ra(t,r)||s<=11&&setTimeout(ti(r,(function(){return e.updateFromDOM()})),20)})),ht(i,"compositionstart",(function(t){e.composing={data:t.data,done:!1}})),ht(i,"compositionupdate",(function(t){e.composing||(e.composing={data:t.data,done:!1})})),ht(i,"compositionend",(function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)})),ht(i,"touchstart",(function(){return n.forceCompositionEnd()})),ht(i,"input",(function(){e.composing||e.readFromDOMSoon()})),ht(i,"copy",a),ht(i,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var t=vr(this.cm,!1);return t.focus=document.activeElement==this.div,t},Ua.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),i=r.from(),o=r.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||o.line<e.display.viewFrom)t.removeAllRanges();else{var a=Ga(e,t.anchorNode,t.anchorOffset),s=Ga(e,t.focusNode,t.focusOffset);if(!a||a.bad||!s||s.bad||0!=ee(oe(a,s),i)||0!=ee(ie(a,s),o)){var l=e.display.view,c=i.line>=e.display.viewFrom&&Ha(e,i)||{node:l[0].measure.map[2],offset:0},u=o.line<e.display.viewTo&&Ha(e,o);if(!u){var h=l[l.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var f,p=t.rangeCount&&t.getRangeAt(0);try{f=k(c.node,c.offset,u.offset,u.node)}catch(t){}f&&(!n&&e.state.focused?(t.collapse(c.node,c.offset),f.collapsed||(t.removeAllRanges(),t.addRange(f))):(t.removeAllRanges(),t.addRange(f)),p&&null==t.anchorNode?t.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation((function(){return t.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(t){O(this.cm.display.cursorDiv,t.cursors),O(this.cm.display.selectionDiv,t.selection)},Ua.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ua.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return D(this.div,e)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Qr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ua.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Ga(e,t.anchorNode,t.anchorOffset),r=Ga(e,t.focusNode,t.focusOffset);n&&r&&Qr(e,(function(){Qi(e.doc,ki(n,r),z),(n.bad||r.bad)&&(e.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=te(a.line-1,Kt(r.doc,a.line-1).length)),s.ch==Kt(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=te(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ur(r,a.line))?(e=$t(i.view[0].line),n=i.view[0].node):(e=$t(i.view[t].line),n=i.view[t-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$t(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(t,e,n,r,i){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(t){t&&(c(),o+=t)}function h(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var o,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(r,0),te(i+1,0),(g=+d,function(t){return t.id==g}));return void(f.length&&(o=f[0].find(0))&&u(qt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var m=0;m<e.childNodes.length;m++)h(e.childNodes[m]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),p&&(a=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;h(e),e!=n;)e=e.nextSibling,l=!1;return o}(r,n,c,e,l)),d=qt(r.doc,te(e,0),te(l,Kt(r.doc,l).text.length));h.length>1&&d.length>1;)if(X(h)==X(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=X(h),b=X(d),w=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==d.length&&e==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var x=te(e,f),S=te(l,d.length?X(d).length-p:0);return h.length>1||h[0]||ee(x,S)?(mo(r.doc,h,x,S,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(t.cm)}))},Ua.prototype.setUneditable=function(t){t.contentEditable="false"},Ua.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Ia)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ua.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(r,t)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Na(r);Da({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,z):(n.prevInput="",i.value=e.text.join("\n"),N(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ht(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ht(i,"paste",(function(t){mt(r,t)||Ra(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ht(i,"cut",o),ht(i,"copy",o),ht(t.scroller,"paste",(function(e){if(!Sn(t,e)&&!mt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ht(t.lineSpace,"selectstart",(function(e){Sn(t,e)||bt(e)})),ht(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(t){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Wa.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Wa.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=vr(t);if(t.options.moveInputWithCursor){var i=qn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Wa.prototype.showSelection=function(t){var e=this.cm.display;O(e.cursorDiv,t.cursors),O(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Wa.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||I()!=this.textarea))try{this.textarea.focus()}catch(t){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Wa.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}))},Wa.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||It(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Qr(e,(function(){Ia(e,i.slice(l),r.length-l,null,t.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=cr(n,t),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,Qi)(n.doc,ki(o),z);var u,d=i.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),E){St(t);var m=function(){ft(window,"mouseup",m),setTimeout(v,20)};ht(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var t=n.somethingSelected(),o=""+(t?i.value:"");i.value="⇚",i.value=o,e.prevInput=t?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==e.prevInput?ti(n,so)(n):t++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Wa.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Wa.prototype.setUneditable=function(){},Wa.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,i,o){t.defaults[n]=r,i&&(e[n]=o?function(t,e,n){n!=Sa&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Sa,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,Li(t)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Di(t),Un(t),hr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,n.push(te(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(t.doc,e,n[i],te(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Sa&&t.refresh()})),n("specialCharPlaceholder",Ze,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){xa(t),mi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=$o(e),i=n!=Sa&&$o(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=fi(e,t.options.lineNumbers),mi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?ar(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return Hr(t)}),!0),n("scrollbarStyle","native",(function(t){Vr(t),Hr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fi(t.options.gutters,e),mi(t)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(t){return t}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(kr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}(Ta),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,i=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&ti(this,e[t])(this,n,i),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"]($o(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:ei((function(e,n){var r=e.token?e:t.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(t,e,n){for(var r=0,i=n(e);r<t.length&&n(t[r])<=i;)r++;t.splice(r,0,e)}(this.state.overlays,{mode:r,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(t){return t.priority})),this.state.modeGen++,hr(this)})),removeOverlay:ei((function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var r=e[n].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return e.splice(n,1),this.state.modeGen++,void hr(this)}})),indentLine:ei((function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),Zt(this.doc,t)&&Aa(this,t,e,n)})),indentSelection:ei((function(t){for(var e=this.doc.sel.ranges,n=-1,r=0;r<e.length;r++){var i=e[r];if(i.empty())i.head.line>n&&(Aa(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Aa(this,l,t);var c=this.doc.sel.ranges;0==o.ch&&e.length==c.length&&c[r].from().ch>0&&$i(this.doc,r,new Ei(o,c[r].to()),z)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=se(this.doc,t);var e,n=de(this,Kt(this.doc,t.line)),r=0,i=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){e=n[2*a+2];break}r=a+1}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!n.hasOwnProperty(e))return r;var i=n[e],o=this.getModeAt(t);if("string"==typeof o[e])i[o[e]]&&r.push(i[o[e]]);else if(o[e])for(var a=0;a<o[e].length;a++){var s=i[o[e][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(t,e){var n=this.doc;return fe(this,(t=ae(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return qn(this,null==t?n.head:"object"==typeof t?se(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return Kn(this,se(this.doc,t),e||"page")},coordsChar:function(t,e){return $n(this,(t=Wn(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Wn(this,{top:t,left:0},e||"page").top,Jt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var r,i=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,i=!0),r=Kt(this.doc,t)}else r=t;return Vn(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var o,a,s,l=this.display,c=(t=qn(this,se(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==i?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&Nr(o,s.scrollTop),null!=s.scrollLeft&&Pr(o,s.scrollLeft))},triggerOnKeyDown:ei(ua),triggerOnKeyPress:ei(da),triggerOnKeyUp:ha,triggerOnMouseDown:ei(ga),execCommand:function(t){if(ea.hasOwnProperty(t))return ea[t].call(null,this)},triggerElectric:ei((function(t){Ma(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var o=se(this.doc,t),a=0;a<e&&!(o=Fa(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ei((function(t,e){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Fa(n.doc,r.head,t,e,n.options.rtlMoveVisually):t<0?r.from():r.to()}),V)})),deleteH:ei((function(t,e){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Jo(this,(function(n){var i=Fa(r,n.head,t,e,!1);return t<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(t,e,n,r){var i=1,o=r;e<0&&(i=-1,e=-e);for(var a=se(this.doc,t),s=0;s<e;++s){var l=qn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ba(this,l,i,n)).hitSide)break}return a},moveV:ei((function(t,e){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return t<0?a.from():a.to();var s=qn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ba(n,s,t,e);return"page"==e&&a==r.sel.primary()&&Lr(n,Kn(n,l,"div").top-s.top),l}),V),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(t){var e=Kt(this.doc,t.line).text,n=t.ch,r=t.ch;if(e){var i=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=e.length||!n?++r:--n;for(var o=e.charAt(n),a=tt(o,i)?function(t){return tt(t,i)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!tt(t)};n>0&&a(e.charAt(n-1));)--n;for(;r<e.length&&a(e.charAt(r));)++r}return new Ei(te(t.line,n),te(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),pt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ei((function(t,e){Ir(this,t,e)})),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-_n(this)-this.display.barHeight,width:t.scrollWidth-_n(this)-this.display.barWidth,clientHeight:On(this),clientWidth:Tn(this)}},scrollIntoView:ei((function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:te(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?function(t,e){Rr(t),t.curOp.scrollToPos=e}(this,t):Mr(this,t.from,t.to,t.margin)})),setSize:ei((function(t,e){var n=this,r=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&Bn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){dr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pt(this,"refresh",this)})),operation:function(t){return Qr(this,t)},startOperation:function(){return Kr(this)},endOperation:function(){return qr(this)},refresh:ei((function(){var t=this.display.cachedTextHeight;hr(this),this.curOp.forceUpdate=!0,Un(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==t||Math.abs(t-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),pt(this,"refresh",this)})),swapDoc:ei((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ni(this,t),Un(this),this.display.input.reset(),Ir(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,o){t.registerHelper(e,r,o),n[e]._global.push({pred:i,val:o})}}(Ta);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var qa in Do.prototype)Do.prototype.hasOwnProperty(qa)&&U(Ka,qa)<0&&(Ta.prototype[qa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Do.prototype[qa]));return yt(Do),Ta.inputStyles={textarea:Wa,contenteditable:Ua},Ta.defineMode=function(t){Ta.defaults.mode||"null"==t||(Ta.defaults.mode=t),Pt.apply(this,arguments)},Ta.defineMIME=function(t,e){jt[t]=e},Ta.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ta.defineMIME("text/plain","null"),Ta.defineExtension=function(t,e){Ta.prototype[t]=e},Ta.defineDocExtension=function(t,e){Do.prototype[t]=e},Ta.fromTextArea=function(t,e){if((e=e?P(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=I();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ta((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=wi,t.Doc=Do,t.splitLines=Dt,t.countColumn=F,t.findColumn=W,t.isWordChar=Q,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=_i,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Nt,t.mimeModes=jt,t.resolveMode=Ft,t.getMode=Bt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=zt,t.startState=Vt,t.innerMode=Gt,t.commands=ea,t.keyMap=Go,t.keyName=Yo,t.isModifierKey=qo,t.lookupKey=Ko,t.normalizeKeyMap=Wo,t.StringStream=Wt,t.SharedTextMarker=To,t.TextMarker=ko,t.LineWidget=So,t.e_preventDefault=bt,t.e_stopPropagation=wt,t.e_stop=St,t.addClass=R,t.contains=D,t.rmClass=_,t.keyNames=Bo}(Ta),Ta.version="5.58.2",Ta}()},WYAk:
/*!****************************************!*\
!*** ./node_modules/crypto-js/hmac.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a;t.exports=(r=n(/*! ./core */"Ib8C"),o=(i=r).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),o=this._iKey=e.clone(),s=i.words,l=o.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;i.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},WaYH:
/*!*********************************************************!*\
!*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***!
\*********************************************************/
/*! exports provided: InternalTreeNode, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("rePB"),i=n("Ff2n"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),m=n("OZM5"),g=function(t){var e=t.prefixCls,n=t.level,i=t.isStart,o=t.isEnd;if(!n)return null;for(var a="".concat(e,"-indent-unit"),s=[],l=0;l<n;l+=1){var c;s.push(h.createElement("span",{key:l,className:f()(a,(c={},Object(r.a)(c,"".concat(a,"-start"),i[l+1]),Object(r.a)(c,"".concat(a,"-end"),o[l+1]),Object(r.a)(c,"".concat(a,"-end-first-level"),!l&&o[0]),c))}))}return h.createElement("span",{"aria-hidden":"true",className:"".concat(e,"-indent")},s)},v=n("815F"),y=function(t){Object(c.a)(n,t);var e=Object(u.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.apply(this,arguments)).state={dragNodeHighlight:!1},t.onSelectorClick=function(e){(0,t.props.context.onNodeClick)(e,Object(v.b)(t.props)),t.isSelectable()?t.onSelect(e):t.onCheck(e)},t.onSelectorDoubleClick=function(e){(0,t.props.context.onNodeDoubleClick)(e,Object(v.b)(t.props))},t.onSelect=function(e){if(!t.isDisabled()){var n=t.props.context.onNodeSelect;e.preventDefault(),n(e,Object(v.b)(t.props))}},t.onCheck=function(e){if(!t.isDisabled()){var n=t.props,r=n.disableCheckbox,i=n.checked,o=t.props.context.onNodeCheck;if(t.isCheckable()&&!r){e.preventDefault();var a=!i;o(e,Object(v.b)(t.props),a)}}},t.onMouseEnter=function(e){(0,t.props.context.onNodeMouseEnter)(e,Object(v.b)(t.props))},t.onMouseLeave=function(e){(0,t.props.context.onNodeMouseLeave)(e,Object(v.b)(t.props))},t.onContextMenu=function(e){(0,t.props.context.onNodeContextMenu)(e,Object(v.b)(t.props))},t.onDragStart=function(e){var n=t.props.context.onNodeDragStart;e.stopPropagation(),t.setState({dragNodeHighlight:!0}),n(e,Object(l.a)(t));try{e.dataTransfer.setData("text/plain","")}catch(t){}},t.onDragEnter=function(e){var n=t.props.context.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragOver=function(e){var n=t.props.context.onNodeDragOver;e.preventDefault(),e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragLeave=function(e){var n=t.props.context.onNodeDragLeave;e.stopPropagation(),n(e,Object(l.a)(t))},t.onDragEnd=function(e){var n=t.props.context.onNodeDragEnd;e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,Object(l.a)(t))},t.onDrop=function(e){var n=t.props.context.onNodeDrop;e.preventDefault(),e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,Object(l.a)(t))},t.onExpand=function(e){(0,t.props.context.onNodeExpand)(e,Object(v.b)(t.props))},t.setSelectHandle=function(e){t.selectHandle=e},t.getNodeState=function(){var e=t.props.expanded;return t.isLeaf()?null:e?"open":"close"},t.hasChildren=function(){var e=t.props.eventKey;return!!((t.props.context.keyEntities[e]||{}).children||[]).length},t.isLeaf=function(){var e=t.props,n=e.isLeaf,r=e.loaded,i=t.props.context.loadData,o=t.hasChildren();return!1!==n&&(n||!i&&!o||i&&r&&!o)},t.isDisabled=function(){var e=t.props.disabled;return!(!t.props.context.disabled&&!e)},t.isCheckable=function(){var e=t.props.checkable,n=t.props.context.checkable;return!(!n||!1===e)&&n},t.syncLoadData=function(e){var n=e.expanded,r=e.loading,i=e.loaded,o=t.props.context,a=o.loadData,s=o.onNodeLoad;r||a&&n&&!t.isLeaf()&&(t.hasChildren()||i||s(Object(v.b)(t.props)))},t.renderSwitcher=function(){var e=t.props,n=e.expanded,r=e.switcherIcon,i=t.props.context,a=i.prefixCls,s=i.switcherIcon,l=r||s;if(t.isLeaf())return h.createElement("span",{className:f()("".concat(a,"-switcher"),"".concat(a,"-switcher-noop"))},"function"==typeof l?l(Object(o.a)(Object(o.a)({},t.props),{},{isLeaf:!0})):l);var c=f()("".concat(a,"-switcher"),"".concat(a,"-switcher_").concat(n?"open":"close"));return h.createElement("span",{onClick:t.onExpand,className:c},"function"==typeof l?l(Object(o.a)(Object(o.a)({},t.props),{},{isLeaf:!1})):l)},t.renderCheckbox=function(){var e=t.props,n=e.checked,r=e.halfChecked,i=e.disableCheckbox,o=t.props.context.prefixCls,a=t.isDisabled(),s=t.isCheckable();if(!s)return null;var l="boolean"!=typeof s?s:null;return h.createElement("span",{className:f()("".concat(o,"-checkbox"),n&&"".concat(o,"-checkbox-checked"),!n&&r&&"".concat(o,"-checkbox-indeterminate"),(a||i)&&"".concat(o,"-checkbox-disabled")),onClick:t.onCheck},l)},t.renderIcon=function(){var e=t.props.loading,n=t.props.context.prefixCls;return h.createElement("span",{className:f()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(t.getNodeState()||"docu"),e&&"".concat(n,"-icon_loading"))})},t.renderSelector=function(){var e,n,r=t.state.dragNodeHighlight,i=t.props,o=i.title,a=i.selected,s=i.icon,l=i.loading,c=i.data,u=t.props.context,d=u.prefixCls,p=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,y=u.titleRender,b=t.isDisabled(),w="".concat(d,"-node-content-wrapper");if(p){var x=s||m;e=x?h.createElement("span",{className:f()("".concat(d,"-iconEle"),"".concat(d,"-icon__customize"))},"function"==typeof x?x(t.props):x):t.renderIcon()}else v&&l&&(e=t.renderIcon());n="function"==typeof o?o(c):y?y(c):o;var S=h.createElement("span",{className:"".concat(d,"-title")},n);return h.createElement("span",{ref:t.setSelectHandle,title:"string"==typeof o?o:"",className:f()("".concat(w),"".concat(w,"-").concat(t.getNodeState()||"normal"),!b&&(a||r)&&"".concat(d,"-node-selected"),!b&&g&&"draggable"),draggable:!b&&g||void 0,"aria-grabbed":!b&&g||void 0,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick,onDragStart:g?t.onDragStart:void 0},e,S)},t}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var t=this.props.selectable,e=this.props.context.selectable;return"boolean"==typeof t?t:e}},{key:"render",value:function(){var t,e=this.props,n=e.eventKey,o=e.className,a=e.style,s=e.dragOver,l=e.dragOverGapTop,c=e.dragOverGapBottom,u=e.isLeaf,d=e.isStart,p=e.isEnd,y=e.expanded,b=e.selected,w=e.checked,x=e.halfChecked,S=e.loading,E=e.domRef,C=e.active,k=e.onMouseMove,_=Object(i.a)(e,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),T=this.props.context,O=T.prefixCls,A=T.filterTreeNode,L=T.draggable,D=T.keyEntities,I=this.isDisabled(),R=Object(m.f)(_),M=(D[n]||{}).level,N=p[p.length-1];return h.createElement("div",Object.assign({ref:E,className:f()(o,"".concat(O,"-treenode"),(t={},Object(r.a)(t,"".concat(O,"-treenode-disabled"),I),Object(r.a)(t,"".concat(O,"-treenode-switcher-").concat(y?"open":"close"),!u),Object(r.a)(t,"".concat(O,"-treenode-checkbox-checked"),w),Object(r.a)(t,"".concat(O,"-treenode-checkbox-indeterminate"),x),Object(r.a)(t,"".concat(O,"-treenode-selected"),b),Object(r.a)(t,"".concat(O,"-treenode-loading"),S),Object(r.a)(t,"".concat(O,"-treenode-active"),C),Object(r.a)(t,"".concat(O,"-treenode-leaf-last"),N),Object(r.a)(t,"drag-over",!I&&s),Object(r.a)(t,"drag-over-gap-top",!I&&l),Object(r.a)(t,"drag-over-gap-bottom",!I&&c),Object(r.a)(t,"filter-node",A&&A(Object(v.b)(this.props))),t)),style:a,onDragEnter:L?this.onDragEnter:void 0,onDragOver:L?this.onDragOver:void 0,onDragLeave:L?this.onDragLeave:void 0,onDrop:L?this.onDrop:void 0,onDragEnd:L?this.onDragEnd:void 0,onMouseMove:k},R),h.createElement(g,{prefixCls:O,level:M,isStart:d,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(h.Component),b=function(t){return h.createElement(p.a.Consumer,null,(function(e){return h.createElement(y,Object.assign({},t,{context:e}))}))};b.displayName="TreeNode",b.defaultProps={title:"---"},b.isTreeNode=1;e.a=b},XIdC:
/*!********************************************!*\
!*** ./node_modules/rc-switch/es/index.js ***!
\********************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! react */"q1tI"),s=n(/*! classnames */"TSYQ"),l=n.n(s),c=n(/*! rc-util/es/hooks/useMergedState */"6cGi"),u=n(/*! rc-util/es/KeyCode */"4IlW"),h=a.forwardRef((function(t,e){var n,s=t.prefixCls,h=void 0===s?"rc-switch":s,d=t.className,f=t.checked,p=t.defaultChecked,m=t.disabled,g=t.loadingIcon,v=t.checkedChildren,y=t.unCheckedChildren,b=t.onClick,w=t.onChange,x=t.onKeyDown,S=Object(o.a)(t,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=Object(c.a)(!1,{value:f,defaultValue:p}),C=Object(i.a)(E,2),k=C[0],_=C[1];function T(t,e){var n=k;return m||(_(n=t),null==w||w(n,e)),n}var O=l()(h,d,(n={},Object(r.a)(n,"".concat(h,"-checked"),k),Object(r.a)(n,"".concat(h,"-disabled"),m),n));return a.createElement("button",Object.assign({},S,{type:"button",role:"switch","aria-checked":k,disabled:m,className:O,ref:e,onKeyDown:function(t){t.which===u.a.LEFT?T(!1,t):t.which===u.a.RIGHT&&T(!0,t),null==x||x(t)},onClick:function(t){var e=T(!k,t);null==b||b(e,t)}}),g,a.createElement("span",{className:"".concat(h,"-inner")},k?v:y))}));h.displayName="Switch",e.a=h},Y1PL:
/*!**********************************************************!*\
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
\**********************************************************/
/*! exports provided: ResizableTextArea, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.r(e),n.d(e,"ResizableTextArea",(function(){return R}));var r=n("wx14"),i=n("1OyB"),o=n("vuIU"),a=n("Ji7U"),s=n("LK+K"),l=n("q1tI"),c=n("VTBJ"),u=n("rePB"),h=n("Zm9Q"),d=(n("Kwbf"),n("c+Xe")),f=n("m+aA"),p=n("bdgK"),m=new Map;var g=new p.default((function(t){t.forEach((function(t){var e,n=t.target;null===(e=m.get(n))||void 0===e||e.forEach((function(t){return t(n)}))}))}));var v=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){return Object(i.a)(this,n),e.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component),y=l.createContext(null);function b(t){var e=t.children,n=t.disabled,r=l.useRef(null),i=l.useRef(null),o=l.useContext(y),a=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(e)&&Object(d.c)(e),u=s?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,r)}),[u,r]),p=l.useRef(t);p.current=t;var b=l.useCallback((function(t){var e=p.current,n=e.onResize,r=e.data,i=t.getBoundingClientRect(),s=i.width,l=i.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(s),f=Math.floor(l);if(a.current.width!==d||a.current.height!==f||a.current.offsetWidth!==u||a.current.offsetHeight!==h){var m={width:d,height:f,offsetWidth:u,offsetHeight:h};a.current=m;var g=u===Math.round(s)?s:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==o||o(y,t,r),n&&Promise.resolve().then((function(){n(y,t)}))}}),[]);return l.useEffect((function(){var t,e,o=Object(f.a)(r.current)||Object(f.a)(i.current);return o&&!n&&(t=o,e=b,m.has(t)||(m.set(t,new Set),g.observe(t)),m.get(t).add(e)),function(){return function(t,e){m.has(t)&&(m.get(t).delete(e),m.get(t).size||(g.unobserve(t),m.delete(t)))}(o,b)}}),[r.current,n]),l.createElement(v,{ref:i},s?l.cloneElement(e,{ref:h}):e)}function w(t){var e=t.children;return Object(h.a)(e).map((function(e,n){var i=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(n);return l.createElement(b,Object(r.a)({},t,{key:i}),e)}))}w.Collection=function(t){var e=t.children,n=t.onBatchResize,r=l.useRef(0),i=l.useRef([]),o=l.useContext(y),a=l.useCallback((function(t,e,a){r.current+=1;var s=r.current;i.current.push({size:t,element:e,data:a}),Promise.resolve().then((function(){s===r.current&&(null==n||n(i.current),i.current=[])})),null==o||o(t,e,a)}),[n,o]);return l.createElement(y.Provider,{value:a},e)};var x,S=w,E=n("bT9E"),C=n("TSYQ"),k=n.n(C),_="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",T=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],O={};function A(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&O[n])return O[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=T.map((function(t){return"".concat(t,":").concat(r.getPropertyValue(t))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&n&&(O[n]=l),l}var L,D=n("Gytx"),I=n.n(D);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(L||(L={}));var R=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var o;return Object(i.a)(this,n),(o=e.call(this,t)).nextFrameActionId=void 0,o.resizeFrameId=void 0,o.textArea=void 0,o.saveTextArea=function(t){o.textArea=t},o.handleResize=function(t){var e=o.state.resizeStatus,n=o.props,r=n.autoSize,i=n.onResize;e===L.NONE&&("function"==typeof i&&i(t),r&&o.resizeOnNextFrame())},o.resizeOnNextFrame=function(){cancelAnimationFrame(o.nextFrameActionId),o.nextFrameActionId=requestAnimationFrame(o.resizeTextarea)},o.resizeTextarea=function(){var t=o.props.autoSize;if(t&&o.textArea){var e=t.minRows,n=t.maxRows,r=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;x||((x=document.createElement("textarea")).setAttribute("tab-index","-1"),x.setAttribute("aria-hidden","true"),document.body.appendChild(x)),t.getAttribute("wrap")?x.setAttribute("wrap",t.getAttribute("wrap")):x.removeAttribute("wrap");var i=A(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;x.setAttribute("style","".concat(l,";").concat(_)),x.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=x.scrollHeight;if("border-box"===s?d+=a:"content-box"===s&&(d-=o),null!==n||null!==r){x.value=" ";var f=x.scrollHeight-o;null!==n&&(u=f*n,"border-box"===s&&(u=u+o+a),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+o+a),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(o.textArea,!1,e,n);o.setState({textareaStyles:r,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(o.resizeFrameId),o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.RESIZED},(function(){o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.NONE}),o.fixFirefoxAutoScroll()}))}))}))}))}},o.renderTextArea=function(){var t=o.props,e=t.prefixCls,n=void 0===e?"rc-textarea":e,i=t.autoSize,a=t.onResize,s=t.className,h=t.disabled,d=o.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(E.a)(o.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=k()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},o.props.style),f),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(S,{onResize:o.handleResize,disabled:!(i||a)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:o.saveTextArea})))},o.state={textareaStyles:{},resizeStatus:L.NONE},o}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&I()(t.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),M=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(t){var r;Object(i.a)(this,n),(r=e.call(this,t)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(t){r.resizableTextArea=t},r.handleChange=function(t){var e=r.props.onChange;r.setValue(t.target.value,(function(){r.resizableTextArea.resizeTextarea()})),e&&e(t)},r.handleKeyDown=function(t){var e=r.props,n=e.onPressEnter,i=e.onKeyDown;13===t.keyCode&&n&&n(t),i&&i(t)};var o=void 0===t.value||null===t.value?t.defaultValue:t.value;return r.state={value:o},r}return Object(o.a)(n,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),n}(l.Component);e.default=M},ZD9Y:
/*!*********************************************************!*\
!*** ./src/components/tpi-code-setting/CodeSetting.tsx ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/switch/style */"BoS7");var r=n(/*! antd/es/switch */"Sdc0"),i=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),o=n(/*! react */"q1tI"),a=n.n(o),s=(n(/*! ./index.less */"lOMy"),i.a.Option);e.a=function(t){var e=t.onFontSizeChange,n=t.cmFontSize,o=t.cmCodeMode,l=t.onCodeModeChange,c=t.onTabToSpace,u=t.className,h=void 0===u?"":u,d=t.tabToSpace,f=t.children;return a.a.createElement("div",{className:"tpi-code-setting ".concat(h)},a.a.createElement("h3",null,"代码格式"),a.a.createElement("section",null,a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"显示模式"),a.a.createElement(i.a,{bordered:!1,size:"small",value:o,onChange:l},a.a.createElement(s,{value:"vs"},"白色背景"),a.a.createElement(s,{value:"vs-dark"},"黑色背景"))),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"字体大小"),a.a.createElement(i.a,{bordered:!1,size:"small",value:n,onChange:e},a.a.createElement(s,{value:12},"12px"),a.a.createElement(s,{value:14},"14px"),a.a.createElement(s,{value:16},"16px"),a.a.createElement(s,{value:18},"18px"),a.a.createElement(s,{value:20},"20px"),a.a.createElement(s,{value:22},"22px"))),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"Tab转换"),a.a.createElement(r.a,{checked:d,onChange:c}))),a.a.createElement("h3",null,"快捷键"),a.a.createElement("section",null,a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"保存代码"),a.a.createElement("span",null,"Ctrl + S")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"唤出快捷键列表"),a.a.createElement("span",null,"F1 / Alt + F1")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"左右缩进"),a.a.createElement("span",null,"Ctrl + ]/[")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"跳到匹配的括号"),a.a.createElement("span",null,"Ctrl + Shift + \\")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"转到行首"),a.a.createElement("span",null,"Home")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"转到行尾"),a.a.createElement("span",null,"End"))),f)}},ZW9T:
/*!************************************************************!*\
!*** ./src/components/monaco-editor/index.jsx + 1 modules ***!
\************************************************************/
/*! exports provided: getLanguageByMirrorName, default, DiffEditor */
/*! exports used: DiffEditor, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n("k1fw"),i=n("oBTY"),o=n("9og8"),a=(n("miYZ"),n("tsqr")),s=n("rAM+"),l=n("tJVT"),c=n("PpiC"),u=n("WmNS"),h=n.n(u),d=n("q1tI"),f=n.n(d),p=n("bdgK");function m(t,e,n,i,o){var a=e.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn},l=i.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return o.map((function(t){l.push(Object(r.a)(Object(r.a)({},t),{},{range:s}))})),l}var g=n("fjLI"),v=n("LvDl");n("+ua5");function y(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function b(){}var w={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale"};function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var n=0;n<t.length;n++){var r=w[t[n]];if(r)return r}return e[0]}return w[e]||e}var S=null;e.b=function(t){var e=t.width,u=void 0===e?"100%":e,w=t.height,E=void 0===w?"100%":w,C=t.value,k=t.language,_=void 0===k?"javascript":k,T=t.style,O=void 0===T?{}:T,A=t.options,L=void 0===A?{}:A,D=t.overrideServices,I=void 0===D?{}:D,R=t.theme,M=void 0===R?"vs-dark":R,N=t.onEditBlur,j=t.onSave,P=t.autoHeight,F=void 0!==P&&P,B=t.forbidCopy,U=void 0!==B&&B,H=t.onChange,z=void 0===H?b:H,G=t.editorDidMount,V=void 0===G?b:G,W=t.onFocus,K=void 0===W?b:W,q=t.onBreakPoint,X=void 0===q?b:q,Y=t.breakPointValue,$=void 0===Y?[]:Y,J=t.filename,Z=void 0===J?"educoder.txt":J,Q=t.errorLine,tt=t.errorContent,et=void 0===tt?"":tt,nt=t.highlightLine,rt=t.openBreakPoint,it=void 0!==rt&&rt,ot=(Object(c.a)(t,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Object(d.useRef)()),at=Object(d.useRef)({}),st=Object(d.useRef)(),lt=Object(d.useRef)(),ct=Object(d.useRef)([]),ut=Object(d.useRef)(!1),ht=Object(d.useRef)(),dt=Object(d.useState)(!1),ft=Object(l.a)(dt,2),pt=ft[0],mt=ft[1];function gt(){var t=at.current.instance;if(t){var e=t.getSelection(),n=at.current.pastePos||{},r=new S.Range(n.startLineNumber||e.endLineNumber,n.startColumn||e.endColumn,n.endLineNumber||e.endLineNumber,n.endColumn||e.endColumn);setTimeout((function(){t.executeEdits("",[{range:r,text:""}])}),300)}}function vt(t){(window.navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)&&83==t.keyCode&&(t.preventDefault(),j())}Object(d.useEffect)((function(){var t,e=at.current.instance;lt.current&&clearTimeout(lt.current),lt.current=setTimeout((function(){!function(){var t=at.current.instance;if(null!=C&&t&&pt){var e=t.getModel();e&&C!==e.getValue()&&(!0,e.setValue(C),t.layout(),!1)}}()}),500),null==e||null===(t=e.updateOptions)||void 0===t||t.call(e,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(C.split(/\r\n|\r|\n/g).length))+3,5)})}),[C,pt,at.current]),Object(d.useEffect)((function(){if(Q&&at.current&&at.current.instance){var t=at.current.instance;t.changeViewZones((function(t){var e=document.createElement("div");e.style.padding="10px 20px",e.style.width="calc(100% - 20px)",e.className="my-error-line-wrp",e.innerHTML=et,t.addZone({afterLineNumber:Q||11,heightInLines:3,domNode:e})}));var e={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};t.addOverlayWidget(e),t.revealPositionInCenter({lineNumber:20,column:1})}}),[Q,at.current,pt]),Object(d.useEffect)((function(){var t;if(null!==(t=at.current)&&void 0!==t&&t.instance&&pt&&it){var e=at.current.instance,n=e.getModel();if(!n)return;!function(){var t,r=[],i=[],o=n.getAllDecorations(),a=Object(s.a)(o);try{for(a.s();!(t=a.n()).done;){var l,c=t.value;if("highlighted-line"===c.options.className)r.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),i.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}n.deltaDecorations(i,[]);var u=n.getLineCount();nt&&nt<=u&&(e.deltaDecorations([],[{range:new S.Range(nt,1,nt,n.getLineMaxColumn(nt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),e.revealLineInCenter(nt))}();var r=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=[],i=[],o=n.getAllDecorations(),a=Object(s.a)(o);try{for(a.s();!(t=a.n()).done;){var l,c=t.value;if("breakpoints"===c.options.linesDecorationsClassName)r.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),i.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}if(e)return{lines:r,ids:i};X(r)},i=function(){var t=Object(o.a)(h.a.mark((function t(e){var i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={range:new S.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},t.next=3,n.deltaDecorations([],[i]);case 3:r();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),a=function(){var t=Object(o.a)(h.a.mark((function t(i){var o,a,l,c,u;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=[],a=e.getLineDecorations(i),l=Object(s.a)(a);try{for(l.s();!(c=l.n()).done;)"breakpoints"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(t){l.e(t)}finally{l.f()}return t.next=6,n.deltaDecorations(o,[]);case 6:r();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),l=function(t){var n,r=e.getLineDecorations(t),i=Object(s.a)(r);try{for(i.s();!(n=i.n()).done;){if("breakpoints"===n.value.options.linesDecorationsClassName)return!0}}catch(t){i.e(t)}finally{i.f()}return!1};if(!Object(v.isEqual)($,r(!0).lines)){n.deltaDecorations(r(!0).ids,[]);var c=$.map((function(t){return{range:new S.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}}));n.deltaDecorations([],c)}var u=e.onDidChangeModelContent((function(t){var r=e.getPosition();if(r){var o=r.lineNumber;""===n.getLineContent(o).trim()?a(o):l(o)&&(a(o),i(o))}})),d=e.onMouseDown((function(t){var e,r,o;if(t.target.detail&&null!==(e=t.target)&&void 0!==e&&null!==(r=e.element)&&void 0!==r&&null!==(o=r.className)&&void 0!==o&&o.includes("line-numbers")){var s=t.target.position.lineNumber;if(""===n.getLineContent(s).trim())return;l(s)?a(s):i(s)}})),f=function(){ct.current=e.deltaDecorations(ct.current,[])},p=e.onMouseMove((function(t){var r,i,o;if(f(),t.target.detail&&null!==(r=t.target)&&void 0!==r&&null!==(i=r.element)&&void 0!==i&&null!==(o=i.className)&&void 0!==o&&o.includes("line-numbers")){var a=t.target.position.lineNumber;if(""===n.getLineContent(a).trim())return;!function(t){var n={range:new S.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ct.current=e.deltaDecorations(ct.current,[n])}(a)}})),m=e.onMouseLeave((function(){f()}));return function(){u.dispose(),d.dispose(),p.dispose(),m.dispose()}}}),[at.current,pt,$,nt,it]);var yt=function(){if(F&&at.current.instance){var t=at.current.instance.getContentHeight();Tt(t<E?E:t)}else Tt(E)};var bt=function(t){var e=t.keyCode,n=t.ctrlKey,r=t.metaKey,i=t.target;return"paste"!==t.type&&(67!==e&&86!==e||!r&&!n)||"TEXTAREA"!==i.nodeName||(a.b.warn({content:decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"),key:"monaco-editor-tip"}),t.preventDefault()),!1};function wt(t,e){var n,r,i=window.URL||window.webkitURL||window,o=new Blob([e]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=i.createObjectURL(o),a.download=t,n=a,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}Object(d.useEffect)((function(){yt()}),[yt]),Object(d.useEffect)((function(){ot.current&&!pt&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){try{S=t,at.current.instance=S.editor.create(ot.current,{value:C,language:x(_),theme:M,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},I);var e=at.current.instance,n=g.c._menuItems,r=Object(i.a)(n).find((function(t){return"EditorContext"==t[0]._debugName}))[1];if(V(e,S),setTimeout((function(){yt(),at.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){wt(Z||"educoder.txt",e.getValue())}}),e.getDomNode().addEventListener("input",(function(){st.current.autoFormat&&e.getAction("editor.action.formatDocument").run()}))}),500),at.current.subscription=e.onDidChangeModelContent((function(t){ut.current?clearTimeout(ht.current):(yt(),z(e.getValue(),t)),ht.current=setTimeout((function(){ut.current=!1}),500)})),window.Monaco||function(t){var e={label:"ifelse",kind:t.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet},n=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];t.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(r,i){return{suggestions:m(t,r,i,n,[e])}}});var r=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];t.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(e,n){var i=[{label:"print",kind:t.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:m(t,e,n,r,i)}}});var i=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];t.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,r){var o=[e,{label:"main",kind:t.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:t.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:m(t,n,r,i,o)}}})}(S,x(_)),U&&(!function(t,e){var n=t._first;do{var r,i;e.includes(null===(r=n.element)||void 0===r||null===(i=r.command)||void 0===i?void 0:i.id)&&t._remove(n)}while(n=n.next)}(r,["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"]),ot.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",bt),window.removeEventListener("paste",bt),window.addEventListener("keydown",bt),window.addEventListener("paste",bt)),window.Monaco=S,N&&e.onDidBlurEditorWidget((function(){N(e.getValue())})),K&&e.onDidFocusEditorText((function(){K(e.getValue())})),U)try{window.addEventListener("paste",gt)}catch(t){}var o=function(){var t;return ot.current&&(t=new p.default((function(t){var e,n=Object(s.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&at.current.instance.layout()}}catch(t){n.e(t)}finally{n.f()}}))).observe(ot.current),t}();return mt(!0),function(){var t=at.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),at.current.subscription&&at.current.subscription.dispose(),U&&window.removeEventListener("paste",gt),o.unobserve(ot.current)}}catch(t){}}))}),[]),Object(d.useEffect)((function(){if(at.current.instance&&pt)return document.addEventListener("keydown",vt,!1),function(){document.removeEventListener("keydown",vt)}}),[j,pt]),Object(d.useEffect)((function(){var t=at.current.instance;if(t&&pt){var e=x(_);S.editor.setModelLanguage(t.getModel(),e)}}),[_,pt]),Object(d.useEffect)((function(){at.current.instance&&pt&&S.editor.setTheme(M)}),[M,pt]),Object(d.useEffect)((function(){var t=at.current.instance;st.current=L,t&&pt&&(t.updateOptions(Object(r.a)({},L)),setTimeout((function(){t.getModel().updateOptions(Object(r.a)({},L))}),200))}),[JSON.stringify(L),pt]),Object(d.useEffect)((function(){var t=at.current.instance;t&&pt&&t.layout()}),[u,E,pt]);var xt=Object(d.useState)(y(u)),St=Object(l.a)(xt,2),Et=St[0],Ct=(St[1],Object(d.useState)(y(E))),kt=Object(l.a)(Ct,2),_t=kt[0],Tt=kt[1],Ot=Object(r.a)(Object(r.a)({},O),{},{width:Et,height:_t});return f.a.createElement("div",{className:"my-monaco-editor",ref:ot,style:Ot})};function E(t){var e=t.width,i=void 0===e?"100%":e,o=t.height,a=void 0===o?"100%":o,c=t.original,u=t.modified,h=t.language,m=t.options,g=void 0===m?{}:m,v=Object(d.useRef)(),b=Object(d.useState)(null),w=Object(l.a)(b,2),x=w[0],E=w[1];Object(d.useEffect)((function(){return v.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(S=t).editor.createDiffEditor(v.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},g),{},{wordWrap:!0}));E(e);var n=function(t){var e;return v.current&&(e=new p.default((function(e){var n,r=Object(s.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&t.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(v.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),n.unobserve(v.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),Object(d.useEffect)((function(){x&&x.setModel({original:S.editor.createModel(c,h),modified:S.editor.createModel(u,h)})}),[c,u,h,x]);var C={width:y(i),height:y(a)};return f.a.createElement("div",{className:"my-diff-editor",ref:v,style:C})}},ZpRC:
/*!*************************************************************************!*\
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
\*************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";function r(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function i(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function o(t,e){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var n=getComputedStyle(t,null);return i(n.overflowY,e)||i(n.overflowX,e)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function a(t,e,n,r,i,o,a,s){return o<t&&a>e||o>t&&a<e?0:o<=t&&s<=n||a>=e&&s>=n?o-t-r:a>e&&s<n||o<t&&s>n?a-e+i:0}var s=function(t,e){var n=window,i=e.scrollMode,s=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!r(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&o(p)&&!o(document.documentElement)||null!=p&&o(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),w=b.height,x=b.width,S=b.top,E=b.right,C=b.bottom,k=b.left,_="start"===s||"nearest"===s?S:"end"===s?C:S+w/2,T="center"===l?k+x/2:"end"===l?E:k,O=[],A=0;A<f.length;A++){var L=f[A],D=L.getBoundingClientRect(),I=D.height,R=D.width,M=D.top,N=D.right,j=D.bottom,P=D.left;if("if-needed"===i&&S>=0&&k>=0&&C<=g&&E<=m&&S>=M&&C<=j&&k>=P&&E<=N)return O;var F=getComputedStyle(L),B=parseInt(F.borderLeftWidth,10),U=parseInt(F.borderTopWidth,10),H=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),G=0,V=0,W="offsetWidth"in L?L.offsetWidth-L.clientWidth-B-H:0,K="offsetHeight"in L?L.offsetHeight-L.clientHeight-U-z:0;if(d===L)G="start"===s?_:"end"===s?_-g:"nearest"===s?a(y,y+g,g,U,z,y+_,y+_+w,w):_-g/2,V="start"===l?T:"center"===l?T-m/2:"end"===l?T-m:a(v,v+m,m,B,H,v+T,v+T+x,x),G=Math.max(0,G+y),V=Math.max(0,V+v);else{G="start"===s?_-M-U:"end"===s?_-j+z+K:"nearest"===s?a(M,j,I,U,z+K,_,_+w,w):_-(M+I/2)+K/2,V="start"===l?T-P-B:"center"===l?T-(P+R/2)+W/2:"end"===l?T-N+H+W:a(P,N,R,B,H+W,T,T+x,x);var q=L.scrollLeft,X=L.scrollTop;_+=X-(G=Math.max(0,Math.min(X+G,L.scrollHeight-I+K))),T+=q-(V=Math.max(0,Math.min(q+V,L.scrollWidth-R+W)))}O.push({el:L,top:G,left:V})}return O};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var n=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(n?[]:s(t,e));if(!n){var r=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach((function(t){var r=t.el,i=t.top,o=t.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:e}):(r.scrollTop=i,r.scrollLeft=o)}))}(s(t,r),r.behavior)}}},Zss7:
/*!**********************************************!*\
!*** ./node_modules/tinycolor2/tinycolor.js ***!
\**********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(o,"").replace(a,"").toLowerCase();var e,n=!1;if(L[t])t=L[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=G.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=G.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=G.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=G.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=G.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=G.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=G.hex8.exec(t))return{r:N(e[1]),g:N(e[2]),b:N(e[3]),a:B(e[4]),format:n?"name":"hex8"};if(e=G.hex6.exec(t))return{r:N(e[1]),g:N(e[2]),b:N(e[3]),format:n?"name":"hex"};if(e=G.hex4.exec(t))return{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),a:B(e[4]+""+e[4]),format:n?"name":"hex8"};if(e=G.hex3.exec(t))return{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==typeof t&&(V(t.r)&&V(t.g)&&V(t.b)?(f=t.r,p=t.g,m=t.b,e={r:255*R(f,255),g:255*R(p,255),b:255*R(m,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):V(t.h)&&V(t.s)&&V(t.v)?(r=P(t.s),s=P(t.v),e=function(t,e,n){t=6*R(t,360),e=R(e,100),n=R(n,100);var r=i.floor(t),o=t-r,a=n*(1-e),s=n*(1-o*e),l=n*(1-(1-o)*e),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(t.h,r,s),h=!0,d="hsv"):V(t.h)&&V(t.s)&&V(t.l)&&(r=P(t.s),l=P(t.l),e=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=R(t,360),e=R(e,100),n=R(n,100),0===e)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,r,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(n=t.a));var f,p,m;return n=I(n),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(t,e,n){t=R(t,255),e=R(e,255),n=R(n,255);var r,i,o=u(t,e,n),a=c(t,e,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,l:s}}function p(t,e,n){t=R(t,255),e=R(e,255),n=R(n,255);var r,i,o=u(t,e,n),a=c(t,e,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,v:s}}function m(t,e,n,r){var i=[j(l(t).toString(16)),j(l(e).toString(16)),j(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(t,e,n,r){return[j(F(r)),j(l(t).toString(16)),j(l(e).toString(16)),j(l(n).toString(16))].join("")}function v(t,e){e=0===e?0:e||10;var n=d(t).toHsl();return n.s-=e/100,n.s=M(n.s),d(n)}function y(t,e){e=0===e?0:e||10;var n=d(t).toHsl();return n.s+=e/100,n.s=M(n.s),d(n)}function b(t){return d(t).desaturate(100)}function w(t,e){e=0===e?0:e||10;var n=d(t).toHsl();return n.l+=e/100,n.l=M(n.l),d(n)}function x(t,e){e=0===e?0:e||10;var n=d(t).toRgb();return n.r=u(0,c(255,n.r-l(-e/100*255))),n.g=u(0,c(255,n.g-l(-e/100*255))),n.b=u(0,c(255,n.b-l(-e/100*255))),d(n)}function S(t,e){e=0===e?0:e||10;var n=d(t).toHsl();return n.l-=e/100,n.l=M(n.l),d(n)}function E(t,e){var n=d(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,d(n)}function C(t){var e=d(t).toHsl();return e.h=(e.h+180)%360,d(e)}function k(t){var e=d(t).toHsl(),n=e.h;return[d(t),d({h:(n+120)%360,s:e.s,l:e.l}),d({h:(n+240)%360,s:e.s,l:e.l})]}function _(t){var e=d(t).toHsl(),n=e.h;return[d(t),d({h:(n+90)%360,s:e.s,l:e.l}),d({h:(n+180)%360,s:e.s,l:e.l}),d({h:(n+270)%360,s:e.s,l:e.l})]}function T(t){var e=d(t).toHsl(),n=e.h;return[d(t),d({h:(n+72)%360,s:e.s,l:e.l}),d({h:(n+216)%360,s:e.s,l:e.l})]}function O(t,e,n){e=e||6,n=n||30;var r=d(t).toHsl(),i=360/n,o=[d(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(d(r));return o}function A(t,e){e=e||6;for(var n=d(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,r=this.toRgb();return t=r.r/255,e=r.g/255,n=r.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=I(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),r=l(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),r=l(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return m(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,i){var o=[j(l(t).toString(16)),j(l(e).toString(16)),j(l(n).toString(16)),j(F(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*R(this._r,255))+"%",g:l(100*R(this._g,255))+"%",b:l(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%)":"rgba("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+g(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=d(t);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:P(t[r]));t=n}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,n){n=0===n?0:n||50;var r=d(t).toRgb(),i=d(e).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(t,e){var n=d(t),r=d(e);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(t,e,n){var r,i,o=d.readability(t,e);switch(i=!1,(r=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(t,e,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<e.length;c++)(r=d.readability(t,e[c]))>l&&(l=r,s=d(e[c]));return d.isReadable(t,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],n))};var L=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=d.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(L);function I(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function R(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return c(1,u(0,t))}function N(t){return parseInt(t,16)}function j(t){return 1==t.length?"0"+t:""+t}function P(t){return t<=1&&(t=100*t+"%"),t}function F(t){return i.round(255*parseFloat(t)).toString(16)}function B(t){return N(t)/255}var U,H,z,G=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",z="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!G.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(r=function(){return d}.call(e,n,e,t))||(t.exports=r)}(Math)},bCnd:
/*!******************************!*\
!*** ./src/utils/urlTool.ts ***!
\******************************/
/*! exports provided: toStore, fromStore */
/*! exports used: fromStore, toStore */function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(/*! store */"je13"),i=n.n(r);function o(t,e){var n=i.a.get("__ec");n||(n={}),n[t]=e,i.a.set("__ec",n)}function a(t,e){var n=i.a.get("__ec");return n?void 0===n[t]?e:n[t]:e}},bQjk:
/*!**********************************************!*\
!*** ./node_modules/crypto-js/format-hex.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a;t.exports=(a=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},a.format.Hex)},bT9E:
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(t,e){var n=Object(r.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete n[t]})),n}},biw7:
/*!**********************************************************!*\
!*** ./node_modules/rc-table/es/context/TableContext.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);e.a=i},c5Ni:
/*!******************************************************!*\
!*** ./node_modules/codemirror/theme/blackboard.css ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},cDPC:
/*!*************************************************!*\
!*** ./src/components/SplitContainer/index.tsx ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),i=n(/*! react */"q1tI"),o=n.n(i);n(/*! ./index.less */"i3hx");e.a=function(t){var e=t.defaultX,n=void 0===e?"40%":e,a=t.leftChild,s=t.rightChild,l=t.className,c=t.hideResize,u=void 0!==c&&c,h=Object(i.useState)(n),d=Object(r.a)(h,2),f=d[0],p=d[1],m=Object(i.useRef)();Object(i.useEffect)((function(){function t(t){m.current&&p(t.pageX)}function e(){m.current=!1}return window.addEventListener("mousemove",t),window.addEventListener("mouseup",e),function(){window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",e)}}),[]);var g="number"==typeof f&&.01!==f?"".concat(f,"px"):n,v="calc(100% - ".concat(u?"0px":"4px"," - ").concat(g,")");return o.a.createElement("div",{className:"split-panel-container ".concat(l)},o.a.createElement("section",{style:{width:g,display:.01===f?"none":""}},a),o.a.createElement("section",{className:"resize-x-bar",onMouseDown:function(){m.current=!0}},o.a.createElement("a",{className:"btn-resize"},o.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},o.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),o.a.createElement("section",{style:{width:v}},s))}},cv67:
/*!***************************************!*\
!*** ./node_modules/crypto-js/md5.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],l=t[e+1],f=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],v=t[e+6],y=t[e+7],b=t[e+8],w=t[e+9],x=t[e+10],S=t[e+11],E=t[e+12],C=t[e+13],k=t[e+14],_=t[e+15],T=o[0],O=o[1],A=o[2],L=o[3];T=c(T,O,A,L,a,7,s[0]),L=c(L,T,O,A,l,12,s[1]),A=c(A,L,T,O,f,17,s[2]),O=c(O,A,L,T,p,22,s[3]),T=c(T,O,A,L,m,7,s[4]),L=c(L,T,O,A,g,12,s[5]),A=c(A,L,T,O,v,17,s[6]),O=c(O,A,L,T,y,22,s[7]),T=c(T,O,A,L,b,7,s[8]),L=c(L,T,O,A,w,12,s[9]),A=c(A,L,T,O,x,17,s[10]),O=c(O,A,L,T,S,22,s[11]),T=c(T,O,A,L,E,7,s[12]),L=c(L,T,O,A,C,12,s[13]),A=c(A,L,T,O,k,17,s[14]),T=u(T,O=c(O,A,L,T,_,22,s[15]),A,L,l,5,s[16]),L=u(L,T,O,A,v,9,s[17]),A=u(A,L,T,O,S,14,s[18]),O=u(O,A,L,T,a,20,s[19]),T=u(T,O,A,L,g,5,s[20]),L=u(L,T,O,A,x,9,s[21]),A=u(A,L,T,O,_,14,s[22]),O=u(O,A,L,T,m,20,s[23]),T=u(T,O,A,L,w,5,s[24]),L=u(L,T,O,A,k,9,s[25]),A=u(A,L,T,O,p,14,s[26]),O=u(O,A,L,T,b,20,s[27]),T=u(T,O,A,L,C,5,s[28]),L=u(L,T,O,A,f,9,s[29]),A=u(A,L,T,O,y,14,s[30]),T=h(T,O=u(O,A,L,T,E,20,s[31]),A,L,g,4,s[32]),L=h(L,T,O,A,b,11,s[33]),A=h(A,L,T,O,S,16,s[34]),O=h(O,A,L,T,k,23,s[35]),T=h(T,O,A,L,l,4,s[36]),L=h(L,T,O,A,m,11,s[37]),A=h(A,L,T,O,y,16,s[38]),O=h(O,A,L,T,x,23,s[39]),T=h(T,O,A,L,C,4,s[40]),L=h(L,T,O,A,a,11,s[41]),A=h(A,L,T,O,p,16,s[42]),O=h(O,A,L,T,v,23,s[43]),T=h(T,O,A,L,w,4,s[44]),L=h(L,T,O,A,E,11,s[45]),A=h(A,L,T,O,_,16,s[46]),T=d(T,O=h(O,A,L,T,f,23,s[47]),A,L,a,6,s[48]),L=d(L,T,O,A,y,10,s[49]),A=d(A,L,T,O,k,15,s[50]),O=d(O,A,L,T,g,21,s[51]),T=d(T,O,A,L,E,6,s[52]),L=d(L,T,O,A,p,10,s[53]),A=d(A,L,T,O,x,15,s[54]),O=d(O,A,L,T,l,21,s[55]),T=d(T,O,A,L,b,6,s[56]),L=d(L,T,O,A,_,10,s[57]),A=d(A,L,T,O,v,15,s[58]),O=d(O,A,L,T,C,21,s[59]),T=d(T,O,A,L,m,6,s[60]),L=d(L,T,O,A,S,10,s[61]),A=d(A,L,T,O,f,15,s[62]),O=d(O,A,L,T,w,21,s[63]),o[0]=o[0]+T|0,o[1]=o[1]+O|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+i+a;return(s<<o|s>>>32-o)+e}function u(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+i+a;return(s<<o|s>>>32-o)+e}function h(t,e,n,r,i,o,a){var s=t+(e^n^r)+i+a;return(s<<o|s>>>32-o)+e}function d(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+i+a;return(s<<o|s>>>32-o)+e}e.MD5=o._createHelper(l),e.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},dejd:
/*!***********************************************************!*\
!*** ./src/components/markdown-editor/toolbar/index.less ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},dmUQ:
/*!**************************************************************!*\
!*** ./node_modules/rc-input-number/es/index.js + 1 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("Ff2n"),i=n("rePB"),o=n("1OyB"),a=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=n("4IlW");function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Object(c.a)(t);if(e){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function y(){}function b(t){t.preventDefault()}var w=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(t){return null!=t},S=function(t,e){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},E=function(t){Object(s.a)(n,t);var e=v(n);function n(t){var r;Object(o.a)(this,n),(r=e.call(this,t)).onKeyDown=function(t){var e=r.props,n=e.onKeyDown,i=e.onPressEnter;if(t.keyCode===p.a.UP){var o=r.getRatio(t);r.up(t,o,null),r.stop()}else if(t.keyCode===p.a.DOWN){var a=r.getRatio(t);r.down(t,a,null),r.stop()}else t.keyCode===p.a.ENTER&&i&&i(t);if(r.recordCursorPosition(),r.lastKeyCode=t.keyCode,n){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];n.apply(void 0,[t].concat(l))}},r.onKeyUp=function(t){var e=r.props.onKeyUp;if(r.stop(),r.recordCursorPosition(),e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];e.apply(void 0,[t].concat(i))}},r.onChange=function(t){var e=r.props.onChange;r.state.focused&&(r.inputting=!0),r.rawInput=r.props.parser(r.getValueFromEvent(t)),r.setState({inputValue:r.rawInput}),e(r.toNumber(r.rawInput))},r.onMouseUp=function(){var t=r.props.onMouseUp;r.recordCursorPosition(),t&&t.apply(void 0,arguments)},r.onFocus=function(){var t;r.setState({focused:!0}),(t=r.props).onFocus.apply(t,arguments)},r.onBlur=function(){var t=r.props.onBlur;r.inputting=!1,r.setState({focused:!1});var e=r.getCurrentValidValue(r.state.inputValue),n=r.setValue(e,y);if(t){var i=r.input.value,o=r.getInputDisplayValue({focus:!1,value:n});r.input.value=o?Number(o):o,t.apply(void 0,arguments),r.input.value=i}},r.getRatio=function(t){var e=1;return t.metaKey||t.ctrlKey?e=.1:t.shiftKey&&(e=10),e},r.getFullNum=function(t){return isNaN(t)?t:/e/i.test(String(t))?Number(t).toFixed(18).replace(/\.?0+$/,""):t},r.getPrecision=function(t){if(x(r.props.precision))return r.props.precision;var e=String(t);if(e.indexOf("e-")>=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var n=0;return e.indexOf(".")>=0&&(n=e.length-e.indexOf(".")-1),n},r.getInputDisplayValue=function(t){var e,n=t||r.state,i=n.focused,o=n.inputValue,a=n.value;null==(e=i?o:r.toPrecisionAsStep(a))&&(e="");var s=r.formatWrapper(e);return x(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(t){}},r.restoreByAfter=function(t){if(void 0===t)return!1;var e=r.input.value,n=e.lastIndexOf(t);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===t[0]?(r.fixCaret(i,i),!0):n+t.length===e.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,n){var i=t.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(t,e,n){r.pressingUpOrDown=!0,r.step("down",t,e,n)},r.up=function(t,e,n){r.pressingUpOrDown=!0,r.step("up",t,e,n)},r.saveInput=function(t){r.input=t};var i=t.value;void 0===i&&(i=t.defaultValue),r.state={focused:t.autoFocus};var a=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(a),value:a}),r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.value,r=e.onChange,i=e.max,o=e.min,a=this.state.focused;if(t){if(!S(t.value,n)||!S(t.max,i)||!S(t.min,o)){var s,l=a?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&t.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&t.min!==o&&"number"==typeof c&&c<o&&r&&r(o)}try{if(void 0!==this.cursorStart&&this.state.focused)if(this.partRestoreByAfter(this.cursorAfter)||this.state.value===this.props.value){if(this.currentValue===this.input.value)switch(this.lastKeyCode){case p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===p.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(t){}this.lastKeyCode=null,this.pressingUpOrDown&&this.props.focusOnUpDown&&this.state.focused&&document.activeElement!==this.input&&this.focus()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(t){var e=t;return e=""===e?"":this.isNotCompleteNumber(parseFloat(e))?this.state.value:this.getValidValue(e),this.toNumber(e)}},{key:"getValueFromEvent",value:function(t){var e=t.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(e=e.replace(this.props.decimalSeparator,".")),e}},{key:"getValidValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(t);return isNaN(r)?t:(r<e&&(r=e),r>n&&(r=n),r)}},{key:"setValue",value:function(t,e){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),i=this.state.value,o=void 0===i?null:i,a=this.state.inputValue,s=void 0===a?null:a,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==o||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},e)):this.setState({value:r,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(x(r))return r;var o=this.getPrecision(e),a=this.getPrecision(i),s=this.getPrecision(t);return t?Math.max(s,o+a):o+a}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(t,e);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,n=this.state.focused,r=t&&t.length>16&&n;return this.isNotCompleteNumber(t)||r?t:x(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var n=this.props.step,r=this.getPrecisionFactor(t,e),i=Math.abs(this.getMaxPrecision(t,e)),o=((r*t+r*n*e)/r).toFixed(i);return this.toNumber(o)}},{key:"downStep",value:function(t,e){var n=this.props.step,r=this.getPrecisionFactor(t,e),i=Math.abs(this.getMaxPrecision(t,e)),o=((r*t-r*n*e)/r).toFixed(i);return this.toNumber(o)}},{key:"step",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var o=this.props;if(!o.disabled){var a=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(a)){var s=this["".concat(t,"Step")](a,r),l=s>o.max||s<o.min;s>o.max?s=o.max:s<o.min&&(s=o.min),this.setValue(s,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){n[t](e,r,!0)}),i?200:600))}}}},{key:"fixCaret",value:function(t,e){if(void 0!==t&&void 0!==e&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;t===n&&e===r||this.input.setSelectionRange(t,e)}catch(t){}}},{key:"render",value:function(){var t,e=this.props,n=e.prefixCls,o=e.disabled,a=e.readOnly,s=e.useTouch,l=e.autoComplete,c=e.upHandler,u=e.downHandler,d=e.className,p=e.max,m=e.min,g=e.style,v=e.title,w=e.onMouseEnter,x=e.onMouseLeave,S=e.onMouseOver,E=e.onMouseOut,C=e.required,k=e.onClick,_=e.tabIndex,T=e.type,O=e.placeholder,A=e.id,L=e.inputMode,D=e.pattern,I=e.step,R=e.maxLength,M=e.autoFocus,N=e.name,j=e.onPaste,P=e.onInput,F=Object(r.a)(e,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),B=this.state,U=B.value,H=B.focused,z=f()(n,(t={},Object(i.a)(t,d,!!d),Object(i.a)(t,"".concat(n,"-disabled"),o),Object(i.a)(t,"".concat(n,"-focused"),H),t)),G={};Object.keys(F).forEach((function(t){"data-"!==t.substr(0,5)&&"aria-"!==t.substr(0,5)&&"role"!==t||(G[t]=F[t])}));var V=!a&&!o,W=this.getInputDisplayValue(null),K=(U||0===U)&&(isNaN(U)||Number(U)>=p)||o||a,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||o||a,X=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:w,onMouseLeave:x,onMouseOver:S,onMouseOut:E,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:X}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:C,type:T,placeholder:O,onPaste:j,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:_,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:y,onKeyUp:V?this.onKeyUp:y,autoFocus:M,maxLength:R,readOnly:a,disabled:o,max:p,min:m,step:I,name:N,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:D,inputMode:L,onInput:P},G))))}}]),n}(h.a.Component);E.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var C=E;e.a=C},e7zE:
/*!******************************************!*\
!*** ./node_modules/crypto-js/pbkdf2.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l,c,u,h;t.exports=(h=n(/*! ./core */"Ib8C"),n(/*! ./sha1 */"3y9D"),n(/*! ./hmac */"WYAk"),i=(r=h).lib,o=i.Base,a=i.WordArray,s=r.algo,l=s.SHA1,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=c.create(n.hasher,t),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,h=n.iterations;s.length<u;){var d=r.update(e).finalize(o);r.reset();for(var f=d.words,p=f.length,m=d,g=1;g<h;g++){m=r.finalize(m),r.reset();for(var v=m.words,y=0;y<p;y++)f[y]^=v[y]}i.concat(d),l[0]++}return i.sigBytes=4*u,i}}),r.PBKDF2=function(t,e,n){return u.create(n).compute(t,e)},h.PBKDF2)},eRFJ:
/*!*********************************************************!*\
!*** ./src/pages/Question/AddOrEdit/index.less?modules ***!
\*********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:
/*!********************************************************!*\
!*** ./node_modules/rc-drawer/es/index.js + 3 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/PortalWrapper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";var r=n("Ff2n"),i=n("1OyB"),o=n("vuIU"),a=n("Ji7U"),s=n("md7G"),l=n("foSv"),c=n("1W/9"),u=n("q1tI"),h=n("rePB"),d=n("JX7q"),f=n("TSYQ"),p=n.n(f),m=n("qx4F"),g=n("4IlW");var v={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},y=Object.keys(v).filter((function(t){if("undefined"==typeof document)return!1;var e=document.getElementsByTagName("html")[0];return t in(e?e.style:{})}))[0],b=v[y];function w(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on".concat(e),n)}function x(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r):t.attachEvent&&t.detachEvent("on".concat(e),n)}var S=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},E=!("undefined"!=typeof window&&window.document&&window.document.createElement);function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Object(l.a)(t);if(e){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var k={},_=function(t){Object(a.a)(n,t);var e=C(n);function n(t){var r;return Object(i.a)(this,n),(r=e.call(this,t)).domFocus=function(){r.dom&&r.dom.focus()},r.removeStartHandler=function(t){t.touches.length>1||(r.startPos={x:t.touches[0].clientX,y:t.touches[0].clientY})},r.removeMoveHandler=function(t){if(!(t.changedTouches.length>1)){var e=t.currentTarget,n=t.changedTouches[0].clientX-r.startPos.x,i=t.changedTouches[0].clientY-r.startPos.y;(e===r.maskDom||e===r.handlerDom||e===r.contentDom&&function t(e,n,r,i){if(!n||n===document||n instanceof Document)return!1;if(n===e.parentNode)return!0;var o=Math.max(Math.abs(r),Math.abs(i))===Math.abs(i),a=Math.max(Math.abs(r),Math.abs(i))===Math.abs(r),s=n.scrollHeight-n.clientHeight,l=n.scrollWidth-n.clientWidth,c=document.defaultView.getComputedStyle(n),u="auto"===c.overflowY||"scroll"===c.overflowY,h="auto"===c.overflowX||"scroll"===c.overflowX,d=s&&u,f=l&&h;return!!(o&&(!d||d&&(n.scrollTop>=s&&i<0||n.scrollTop<=0&&i>0))||a&&(!f||f&&(n.scrollLeft>=l&&r<0||n.scrollLeft<=0&&r>0)))&&t(e,n.parentNode,r,i)}(e,t.target,n,i))&&t.cancelable&&t.preventDefault()}},r.transitionEnd=function(t){var e=t.target;x(e,b,r.transitionEnd),e.style.transition=""},r.onKeyDown=function(t){if(t.keyCode===g.a.ESC){var e=r.props.onClose;t.stopPropagation(),e&&e(t)}},r.onWrapperTransitionEnd=function(t){var e=r.props,n=e.open,i=e.afterVisibleChange;t.target===r.contentWrapper&&t.propertyName.match(/transform$/)&&(r.dom.style.transition="",!n&&r.getCurrentDrawerSome()&&(document.body.style.overflowX="",r.maskDom&&(r.maskDom.style.left="",r.maskDom.style.width="")),i&&i(!!n))},r.openLevelTransition=function(){var t=r.props,e=t.open,n=t.width,i=t.height,o=r.getHorizontalBoolAndPlacementName(),a=o.isHorizontal,s=o.placementName,l=r.contentDom?r.contentDom.getBoundingClientRect()[a?"width":"height"]:0,c=(a?n:i)||l;r.setLevelAndScrolling(e,s,c)},r.setLevelTransform=function(t,e,n,i){var o=r.props,a=o.placement,s=o.levelMove,l=o.duration,c=o.ease,u=o.showMask;r.levelDom.forEach((function(o){o.style.transition="transform ".concat(l," ").concat(c),w(o,b,r.transitionEnd);var h,d,f,p=t?n:0;if(s){var m=(d={target:o,open:t},f="function"==typeof(h=s)?h(d):h,Array.isArray(f)?2===f.length?f:[f[0],f[1]]:[f]);p=t?m[0]:m[1]||0}var g="number"==typeof p?"".concat(p,"px"):p,v="left"===a||"top"===a?g:"-".concat(g);v=u&&"right"===a&&i?"calc(".concat(v," + ").concat(i,"px)"):v,o.style.transform=p?"".concat(e,"(").concat(v,")"):""}))},r.setLevelAndScrolling=function(t,e,n){var i=r.props.onChange;if(!E){var o=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(m.a)(!0):0;r.setLevelTransform(t,e,n,o),r.toggleScrollingToDrawerAndBody(o)}i&&i(t)},r.toggleScrollingToDrawerAndBody=function(t){var e=r.props,n=e.getOpenCount,i=e.getContainer,o=e.showMask,a=e.open,s=i&&i(),l=n&&n();if(s&&s.parentNode===document.body&&o){var c=["touchstart"],u=[document.body,r.maskDom,r.handlerDom,r.contentDom];a&&"hidden"!==document.body.style.overflow?(t&&r.addScrollingEffect(t),1===l&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",u.forEach((function(t,e){t&&w(t,c[e]||"touchmove",e?r.removeMoveHandler:r.removeStartHandler,r.passive)}))):r.getCurrentDrawerSome()&&(l||(document.body.style.overflow=""),document.body.style.touchAction="",t&&r.remScrollingEffect(t),u.forEach((function(t,e){t&&x(t,c[e]||"touchmove",e?r.removeMoveHandler:r.removeStartHandler,r.passive)})))}},r.addScrollingEffect=function(t){var e=r.props,n=e.placement,i=e.duration,o=e.ease,a=e.getOpenCount,s=e.switchScrollingEffect;1===(a&&a())&&s();var l="width ".concat(i," ").concat(o),c="transform ".concat(i," ").concat(o);switch(r.dom.style.transition="none",n){case"right":r.dom.style.transform="translateX(-".concat(t,"px)");break;case"top":case"bottom":r.dom.style.width="calc(100% - ".concat(t,"px)"),r.dom.style.transform="translateZ(0)"}clearTimeout(r.timeout),r.timeout=setTimeout((function(){r.dom&&(r.dom.style.transition="".concat(c,",").concat(l),r.dom.style.width="",r.dom.style.transform="")}))},r.remScrollingEffect=function(t){var e,n=r.props,i=n.placement,o=n.duration,a=n.ease,s=n.getOpenCount,l=n.switchScrollingEffect;s&&s()||l(!0),y&&(document.body.style.overflowX="hidden"),r.dom.style.transition="none";var c="width ".concat(o," ").concat(a),u="transform ".concat(o," ").concat(a);switch(i){case"left":r.dom.style.width="100%",c="width 0s ".concat(a," ").concat(o);break;case"right":r.dom.style.transform="translateX(".concat(t,"px)"),r.dom.style.width="100%",c="width 0s ".concat(a," ").concat(o),r.maskDom&&(r.maskDom.style.left="-".concat(t,"px"),r.maskDom.style.width="calc(100% + ".concat(t,"px)"));break;case"top":case"bottom":r.dom.style.width="calc(100% + ".concat(t,"px)"),r.dom.style.height="100%",r.dom.style.transform="translateZ(0)",e="height 0s ".concat(a," ").concat(o)}clearTimeout(r.timeout),r.timeout=setTimeout((function(){r.dom&&(r.dom.style.transition="".concat(u,",").concat(e?"".concat(e,","):"").concat(c),r.dom.style.transform="",r.dom.style.width="",r.dom.style.height="")}))},r.getCurrentDrawerSome=function(){return!Object.keys(k).some((function(t){return k[t]}))},r.getLevelDom=function(t){var e=t.level,n=t.getContainer;if(!E){var i,o=n&&n(),a=o?o.parentNode:null;if(r.levelDom=[],"all"===e)(a?Array.prototype.slice.call(a.children):[]).forEach((function(t){"SCRIPT"!==t.nodeName&&"STYLE"!==t.nodeName&&"LINK"!==t.nodeName&&t!==o&&r.levelDom.push(t)}));else e&&(i=e,Array.isArray(i)?i:[i]).forEach((function(t){document.querySelectorAll(t).forEach((function(t){r.levelDom.push(t)}))}))}},r.getHorizontalBoolAndPlacementName=function(){var t=r.props.placement,e="left"===t||"right"===t;return{isHorizontal:e,placementName:"translate".concat(e?"X":"Y")}},r.state={_self:Object(d.a)(r)},r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var t=this;if(!E){var e=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return e=!0,null}}))}catch(t){}this.passive=!!e&&{passive:!1}}var n=this.props,r=n.open,i=n.getContainer,o=i&&i();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(9*Math.random()).toString())).toString(16)),this.getLevelDom(this.props),r&&(o&&o.parentNode===document.body&&(k[this.drawerId]=r),this.openLevelTransition(),this.forceUpdate((function(){t.domFocus()})))}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.open,r=e.getContainer,i=r&&r();n!==t.open&&(n&&this.domFocus(),i&&i.parentNode===document.body&&(k[this.drawerId]=!!n),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.getOpenCount,n=t.open,r=t.switchScrollingEffect,i="function"==typeof e&&e();delete k[this.drawerId],n&&(this.setLevelTransform(!1),document.body.style.touchAction=""),i||(document.body.style.overflow="",r(!0))}},{key:"render",value:function(){var t,e=this,n=this.props,i=n.className,o=n.children,a=n.style,s=n.width,l=n.height,c=(n.defaultOpen,n.open),d=n.prefixCls,f=n.placement,m=(n.level,n.levelMove,n.ease,n.duration,n.getContainer,n.handler),g=(n.onChange,n.afterVisibleChange,n.showMask),v=n.maskClosable,y=n.maskStyle,b=n.onClose,w=n.onHandleClick,x=n.keyboard,E=(n.getOpenCount,n.switchScrollingEffect,Object(r.a)(n,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"])),C=!!this.dom&&c,k=p()(d,(t={},Object(h.a)(t,"".concat(d,"-").concat(f),!0),Object(h.a)(t,"".concat(d,"-open"),C),Object(h.a)(t,i||"",!!i),Object(h.a)(t,"no-mask",!g),t)),_=this.getHorizontalBoolAndPlacementName().placementName,T="left"===f||"top"===f?"-100%":"100%",O=C?"":"".concat(_,"(").concat(T,")"),A=m&&u.cloneElement(m,{onClick:function(t){m.props.onClick&&m.props.onClick(),w&&w(t)},ref:function(t){e.handlerDom=t}});return u.createElement("div",Object.assign({},E,{tabIndex:-1,className:k,style:a,ref:function(t){e.dom=t},onKeyDown:C&&x?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),g&&u.createElement("div",{className:"".concat(d,"-mask"),onClick:v?b:void 0,style:y,ref:function(t){e.maskDom=t}}),u.createElement("div",{className:"".concat(d,"-content-wrapper"),style:{transform:O,msTransform:O,width:S(s)?"".concat(s,"px"):s,height:S(l)?"".concat(l,"px"):l},ref:function(t){e.contentWrapper=t}},u.createElement("div",{className:"".concat(d,"-content"),ref:function(t){e.contentDom=t},onTouchStart:C&&g?this.removeStartHandler:void 0,onTouchMove:C&&g?this.removeMoveHandler:void 0},o),A))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.prevProps,r=e._self,i={prevProps:t};if(void 0!==n){var o=t.placement,a=t.level;o!==n.placement&&(r.contentDom=null),a!==n.level&&r.getLevelDom(t)}return i}}]),n}(u.Component);_.defaultProps={switchScrollingEffect:function(){}};var T=_;function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Object(l.a)(t);if(e){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var A=function(t){Object(a.a)(n,t);var e=O(n);function n(t){var r;Object(i.a)(this,n),(r=e.call(this,t)).onHandleClick=function(t){var e=r.props,n=e.onHandleClick,i=e.open;if(n&&n(t),void 0===i){var o=r.state.open;r.setState({open:!o})}},r.onClose=function(t){var e=r.props,n=e.onClose,i=e.open;n&&n(t),void 0===i&&r.setState({open:!1})};var o=void 0!==t.open?t.open:!!t.defaultOpen;return r.state={open:o},"onMaskClick"in t&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),r}return Object(o.a)(n,[{key:"render",value:function(){var t=this,e=this.props,n=(e.defaultOpen,e.getContainer),i=e.wrapperClassName,o=e.forceRender,a=e.handler,s=Object(r.a)(e,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),l=this.state.open;if(!n)return u.createElement("div",{className:i,ref:function(e){t.dom=e}},u.createElement(T,Object.assign({},s,{open:l,handler:a,getContainer:function(){return t.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var h=!!a||o;return u.createElement(c.a,{visible:l,forceRender:h,getContainer:n,wrapperClassName:i},(function(e){var n=e.visible,i=e.afterClose,o=Object(r.a)(e,["visible","afterClose"]);return u.createElement(T,Object.assign({},s,o,{open:void 0!==n?n:l,afterVisibleChange:void 0!==i?i:s.afterVisibleChange,handler:a,onClose:t.onClose,onHandleClick:t.onHandleClick}))}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.prevProps,r={prevProps:t};return void 0!==n&&t.open!==n.open&&(r.open=t.open),r}}]),n}(u.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:u.createElement("div",{className:"drawer-handle"},u.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var L=A;e.a=L},fjLI:
/*!******************************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js ***!
\******************************************************************************/
/*! exports provided: isIMenuItem, IMenuService, MenuRegistry, ExecuteCommandAction, SubmenuItemAction, MenuItemAction */
/*! exports used: IMenuService, MenuItemAction, MenuRegistry, SubmenuItemAction, isIMenuItem */function(t,e,n){"use strict";n.d(e,"e",(function(){return f})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return v})),n.d(e,"b",(function(){return y}));var r,i=n(/*! ../../../base/common/actions.js */"8HAY"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=n(/*! ../../contextkey/common/contextkey.js */"T8No"),s=n(/*! ../../commands/common/commands.js */"nnTU"),l=n(/*! ../../../base/common/event.js */"MI8n"),c=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},h=function(t,e){return function(n,r){e(n,r,t)}},d=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};function f(t){return void 0!==t.command}var p=Object(o.c)("menuService"),m=new(function(){function t(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return t.prototype.addCommand=function(t){var e=this;return this._commands.set(t.id,t),this._onDidChangeMenu.fire(0),{dispose:function(){e._commands.delete(t.id)&&e._onDidChangeMenu.fire(0)}}},t.prototype.getCommand=function(t){return this._commands.get(t)},t.prototype.getCommands=function(){var t=new Map;return this._commands.forEach((function(e,n){return t.set(n,e)})),t},t.prototype.appendMenuItem=function(t,e){var n=this,r=this._menuItems.get(t);return r?r.push(e):(r=[e],this._menuItems.set(t,r)),this._onDidChangeMenu.fire(t),{dispose:function(){var i=r.indexOf(e);i>=0&&(r.splice(i,1),n._onDidChangeMenu.fire(t))}}},t.prototype.getMenuItems=function(t){var e=(this._menuItems.get(t)||[]).slice(0);return 0===t&&this._appendImplicitItems(e),e},t.prototype._appendImplicitItems=function(t){for(var e=new Set,n=0,r=t.filter((function(t){return f(t)}));n<r.length;n++){var i=r[n],o=i.command,a=i.alt;e.add(o.id),a&&e.add(a.id)}this._commands.forEach((function(n,r){e.has(r)||t.push({command:n})}))},t}()),g=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i._commandService=r,i}return c(e,t),e.prototype.run=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._commandService).executeCommand.apply(t,d([this.id],e))},e=u([h(2,s.b)],e)}(i.a),v=function(t){function e(e){var n=this;return(n="string"==typeof e.title?t.call(this,"",e.title,"submenu")||this:t.call(this,"",e.title.value,"submenu")||this).item=e,n}return c(e,t),e}(i.a),y=function(t){function e(n,r,i,o,a){var s=this;return(s="string"==typeof n.title?t.call(this,n.id,n.title,a)||this:t.call(this,n.id,n.title.value,a)||this)._cssClass=void 0,s._enabled=!n.precondition||o.contextMatchesRules(n.precondition),s._checked=Boolean(n.toggled&&o.contextMatchesRules(n.toggled)),s._options=i||{},s.item=n,s.alt=r?new e(r,void 0,s._options,o,a):void 0,s}return c(e,t),e.prototype.dispose=function(){this.alt&&this.alt.dispose(),t.prototype.dispose.call(this)},e.prototype.run=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=[];return this._options.arg&&(r=d(r,[this._options.arg])),this._options.shouldForwardArgs&&(r=d(r,e)),t.prototype.run.apply(this,r)},e=u([h(3,a.c),h(4,s.b)],e)}(g)},fyJ8:
/*!************************************************!*\
!*** ./node_modules/rc-table/es/Cell/index.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(t,e){var n,l,d,f=t.prefixCls,p=t.className,m=t.record,g=t.index,v=t.dataIndex,y=t.render,b=t.children,w=t.component,x=void 0===w?"td":w,S=t.colSpan,E=t.rowSpan,C=t.fixLeft,k=t.fixRight,_=t.firstFixLeft,T=t.lastFixLeft,O=t.firstFixRight,A=t.lastFixRight,L=t.appendNode,D=t.additionalProps,I=void 0===D?{}:D,R=t.ellipsis,M=t.align,N=t.rowType,j=t.isSticky,P="".concat(f,"-cell");if(b)d=b;else{var F=Object(h.b)(m,v);if(d=F,y){var B=y(F,m,g);!function(t){return t&&"object"===Object(a.a)(t)&&!Array.isArray(t)&&!s.isValidElement(t)}(B)?d=B:(d=B.children,l=B.props)}}"object"!==Object(a.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),R&&(T||O)&&(d=s.createElement("span",{className:"".concat(P,"-content")},d));var U=l||{},H=U.colSpan,z=U.rowSpan,G=U.style,V=U.className,W=Object(o.a)(U,["colSpan","rowSpan","style","className"]),K=void 0!==H?H:S,q=void 0!==z?z:E;if(0===K||0===q)return null;var X={},Y="number"==typeof C,$="number"==typeof k;Y&&(X.position="sticky",X.left=C),$&&(X.position="sticky",X.right=k);var J,Z={};M&&(Z.textAlign=M);var Q=!0===R?{showTitle:!0}:R;Q&&(Q.showTitle||"header"===N)&&("string"==typeof d||"number"==typeof d?J=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(J=d.props.children));var tt,et=Object(i.a)(Object(i.a)(Object(i.a)({title:J},W),I),{},{colSpan:K&&1!==K?K:null,rowSpan:q&&1!==q?q:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),Y),Object(r.a)(n,"".concat(P,"-fix-left-first"),_),Object(r.a)(n,"".concat(P,"-fix-left-last"),T),Object(r.a)(n,"".concat(P,"-fix-right"),$),Object(r.a)(n,"".concat(P,"-fix-right-first"),O),Object(r.a)(n,"".concat(P,"-fix-right-last"),A),Object(r.a)(n,"".concat(P,"-ellipsis"),R),Object(r.a)(n,"".concat(P,"-with-append"),L),Object(r.a)(n,"".concat(P,"-fix-sticky"),(Y||$)&&j),n),I.className,V),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},I.style),Z),X),G),ref:(tt=x,"string"==typeof tt||Object(u.c)(tt)?e:null)});return s.createElement(x,Object.assign({},et),L,d)}));d.displayName="Cell";var f=s.memo(d,(function(t,e){return!!e.shouldCellUpdate&&!e.shouldCellUpdate(e.record,t.record)}));e.a=f},gRFJ:
/*!********************************************!*\
!*** ./node_modules/store/storages/all.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=[n(/*! ./localStorage */"rdUC"),n(/*! ./oldFF-globalStorage */"ynwM"),n(/*! ./oldIE-userDataStorage */"RELg"),n(/*! ./cookieStorage */"DlR+"),n(/*! ./sessionStorage */"CrYA"),n(/*! ./memoryStorage */"PD8m")]},gaXo:
/*!*************************************************!*\
!*** ./node_modules/store/plugins/lib/json2.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,(function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function str(t,e){var n,r,i,o,a,s=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)a[n]=str(n,l)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&a.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&a.push(quote(r)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var n,r,i=t[e];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(t,e,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ecb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i;t.exports=(i=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),i.mode.ECB)},h78n:
/*!**********************************************************!*\
!*** ./node_modules/rc-progress/es/index.js + 3 modules ***!
\**********************************************************/
/*! exports provided: Line, Circle, default */
/*! exports used: Circle */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var t=Date.now(),r=!1;Object.keys(e).forEach((function(i){var o=e[i].current;if(o){r=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",n.current&&t-n.current<100&&(a.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var f=function(t){var e=t.className,n=t.percent,r=t.prefixCls,o=t.strokeColor,s=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,m=t.trailWidth,g=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(o)?o:[o],w=u(l(y),1)[0],x=h/2,S=100-h/2,E="M ".concat("round"===s?x:0,",").concat(x,"\n L ").concat("round"===s?S:100,",").concat(x),C="0 0 100 ".concat(h),k=0;return i.a.createElement("svg",c({className:a()("".concat(r,"-line"),e),viewBox:C,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:E,strokeLinecap:s,stroke:p,strokeWidth:m||h,fillOpacity:"0"}),y.map((function(t,e){var n={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(k,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},o=b[e]||b[b.length-1];return k+=t,i.a.createElement("path",{key:e,className:"".concat(r,"-line-path"),d:E,strokeLinecap:s,stroke:o,strokeWidth:h,fillOpacity:"0",ref:w[e],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var y=0;function b(t){return+t.replace("%","")}function w(t){return Array.isArray(t)?t:[t]}function x(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,a=50-r/2,s=0,l=-a,c=0,u=-2*a;switch(o){case"left":s=-a,l=0,c=2*a,u=0;break;case"right":s=a,l=0,c=-2*a,u=0;break;case"bottom":l=a,u=2*a}var h="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*a,f={stroke:n,strokeDasharray:"".concat(e/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+t/100*(d-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var S=function(t){var e,n=t.prefixCls,o=t.strokeWidth,s=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,g=t.className,S=t.strokeColor,E=t.percent,C=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),k=Object(r.useMemo)((function(){return y+=1}),[]),_=x(0,100,h,o,c,u),T=_.pathString,O=_.pathStyle,A=w(E),L=w(S),D=L.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),I=m(l(A),1)[0];return i.a.createElement("svg",p({className:a()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},C),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(k),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return i.a.createElement("stop",{key:e,offset:t,stopColor:D[t]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:s||o,fillOpacity:"0",style:O}),(e=0,A.map((function(t,r){var a=L[r]||L[L.length-1],s="[object Object]"===Object.prototype.toString.call(a)?"url(#".concat(n,"-gradient-").concat(k,")"):"",l=x(e,t,a,o,c,u);return e+=t,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:o,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:I[r]})}))).reverse())};S.defaultProps=s;var E=S},hW8S:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/utils/legacyUtil.js ***!
\******************************************************/
/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */
/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function a(t){var e=t.expandable,n=Object(i.a)(t,["expandable"]);return"expandable"in t?Object(r.a)(Object(r.a)({},n),e):n}function s(t){return Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(e[n]=t[n]),e}),{})}},i3hx:
/*!**************************************************!*\
!*** ./src/components/SplitContainer/index.less ***!
\**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},jO9C:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-iso97971.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},je13:
/*!*************************************************!*\
!*** ./node_modules/store/dist/store.legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/store-engine */"5nXd"),i=n(/*! ../storages/all */"gRFJ"),o=[n(/*! ../plugins/json2 */"uQRt")];t.exports=r.createStore(i,o)},k3GJ:
/*!*******************************************************!*\
!*** ./node_modules/rc-tabs/es/index.js + 50 modules ***!
\*******************************************************/
/*! exports provided: TabPane, default */
/*! exports used: TabPane, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return We}));var r=n("rePB"),i=n("ODXe"),o=n("Ff2n"),a=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),h=n("6cGi"),d=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(t){var e=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(e.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.current||(p.a.cancel(e.current),e.current=p()((function(){t.apply(void 0,i)})))}}var v=n("4IlW");var y=s.forwardRef((function(t,e){var n,i=t.prefixCls,o=t.id,a=t.active,l=t.rtl,u=t.tab,h=u.key,d=u.tab,f=u.disabled,p=u.closeIcon,m=t.tabBarGutter,g=t.tabPosition,y=t.closable,b=t.renderWrapper,w=t.removeAriaLabel,x=t.editable,S=t.onClick,E=t.onRemove,C=t.onFocus,k="".concat(i,"-tab");s.useEffect((function(){return E}),[]);var _={};"top"===g||"bottom"===g?_[l?"marginLeft":"marginRight"]=m:_.marginBottom=m;var T=x&&!1!==y&&!f;function O(t){f||S(t)}var A=s.createElement("div",{key:h,ref:e,className:c()(k,(n={},Object(r.a)(n,"".concat(k,"-with-remove"),T),Object(r.a)(n,"".concat(k,"-active"),a),Object(r.a)(n,"".concat(k,"-disabled"),f),n)),style:_,onClick:O},s.createElement("div",{role:"tab","aria-selected":a,id:o&&"".concat(o,"-tab-").concat(h),className:"".concat(k,"-btn"),"aria-controls":o&&"".concat(o,"-panel-").concat(h),"aria-disabled":f,tabIndex:f?null:0,onClick:function(t){t.stopPropagation(),O(t)},onKeyDown:function(t){[v.a.SPACE,v.a.ENTER].includes(t.which)&&(t.preventDefault(),O(t))},onFocus:C},d),T&&s.createElement("button",{type:"button","aria-label":w||"remove",tabIndex:0,className:"".concat(k,"-remove"),onClick:function(t){var e;t.stopPropagation(),(e=t).preventDefault(),e.stopPropagation(),x.onEdit("remove",{key:h,event:e})}},p||x.removeIcon||"×"));return b&&(A=b(A)),A})),b={width:0,height:0,left:0,top:0};var w={width:0,height:0,left:0,top:0,right:0};var x=n("wx14"),S=n("1OyB"),E=n("vuIU"),C=n("JX7q"),k=n("Ji7U"),_=n("LK+K"),T=n("I8Z2"),O=n("bT9E"),A=n("2GS6"),L=n("Gytx"),D=n.n(L),I=n("U8pU"),R=/iPhone/i,M=/iPod/i,N=/iPad/i,j=/\bAndroid(?:.+)Mobile\b/i,P=/Android/i,F=/\bAndroid(?:.+)SD4930UR\b/i,B=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,U=/Windows Phone/i,H=/\bWindows(?:.+)ARM\b/i,z=/BlackBerry/i,G=/BB10/i,V=/Opera Mini/i,W=/\b(CriOS|Chrome)(?:.+)Mobile/i,K=/Mobile(?:.+)Firefox\b/i;function q(t,e){return t.test(e)}function X(t){var e=t||("undefined"!=typeof navigator?navigator.userAgent:""),n=(e||"").split("[FBAN");if(void 0!==n[1]){var r=n;e=Object(i.a)(r,1)[0]}if(void 0!==(n=e.split("Twitter"))[1]){var o=n;e=Object(i.a)(o,1)[0]}var a={apple:{phone:q(R,e)&&!q(U,e),ipod:q(M,e),tablet:!q(R,e)&&q(N,e)&&!q(U,e),device:(q(R,e)||q(M,e)||q(N,e))&&!q(U,e)},amazon:{phone:q(F,e),tablet:!q(F,e)&&q(B,e),device:q(F,e)||q(B,e)},android:{phone:!q(U,e)&&q(F,e)||!q(U,e)&&q(j,e),tablet:!q(U,e)&&!q(F,e)&&!q(j,e)&&(q(B,e)||q(P,e)),device:!q(U,e)&&(q(F,e)||q(B,e)||q(j,e)||q(P,e))||q(/\bokhttp\b/i,e)},windows:{phone:q(U,e),tablet:q(H,e),device:q(U,e)||q(H,e)},other:{blackberry:q(z,e),blackberry10:q(G,e),opera:q(V,e),firefox:q(K,e),chrome:q(W,e),device:q(z,e)||q(G,e)||q(V,e)||q(K,e)||q(W,e)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Y=Object(a.a)(Object(a.a)({},X()),{},{isMobile:X});function $(){}function J(t,e,n){var r=e||"";return t.key||"".concat(r,"item_").concat(n)}function Z(t){return"".concat(t,"-menu-")}function Q(t,e){var n=-1;s.Children.forEach(t,(function(t){n+=1,t&&t.type&&t.type.isMenuItemGroup?s.Children.forEach(t.props.children,(function(t){e(t,n+=1)})):e(t,n)}))}var tt=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],et=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t&&"function"==typeof t.getBoundingClientRect&&t.getBoundingClientRect().width;if(n){if(e){var r=getComputedStyle(t),i=r.marginLeft,o=r.marginRight;n+=+i.replace("px","")+ +o.replace("px","")}n=+n.toFixed(6)}return n||0},nt=function(t,e,n){t&&"object"===Object(I.a)(t.style)&&(t.style[e]=n)},rt=n("bdgK"),it=n("i8i4"),ot=n.n(it),at=n("wgJM"),st=n("l4aY"),lt=n("m+aA"),ct=n("c+Xe"),ut=n("zT1h"),ht=n("QC+M");function dt(t,e,n){return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}var ft=n("MNnm");function pt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}var mt,gt,vt,yt=(mt=Object(ft.a)(),gt="undefined"!=typeof window?window:{},vt={animationend:pt("Animation","AnimationEnd"),transitionend:pt("Transition","TransitionEnd")},mt&&("AnimationEvent"in gt||delete vt.animationend.animation,"TransitionEvent"in gt||delete vt.transitionend.transition),vt),bt={};if(Object(ft.a)()){var wt=document.createElement("div");bt=wt.style}var xt={};function St(t){if(xt[t])return xt[t];var e=yt[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in bt)return xt[t]=e[o],xt[t]}return""}var Et=St("animationend"),Ct=St("transitionend"),kt=!(!Et||!Ct),_t=Et||"animationend",Tt=Ct||"transitionend";function Ot(t,e){return t?"object"===Object(I.a)(t)?t[e.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]:"".concat(t,"-").concat(e):null}function At(t){var e=Object(s.useRef)(!1),n=Object(s.useState)(t),r=Object(i.a)(n,2),o=r[0],a=r[1];return Object(s.useEffect)((function(){return function(){e.current=!0}}),[]),[o,function(t){e.current||a(t)}]}var Lt=Object(ft.a)()?s.useLayoutEffect:s.useEffect,Dt=["prepare","start","active","end"];function It(t){return"active"===t||"end"===t}var Rt=function(t,e){var n=s.useState("none"),r=Object(i.a)(n,2),o=r[0],a=r[1],l=function(){var t=s.useRef(null);function e(){at.a.cancel(t.current)}return s.useEffect((function(){return function(){e()}}),[]),[function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;e();var o=Object(at.a)((function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)}));t.current=o},e]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Lt((function(){if("none"!==o&&"end"!==o){var t=Dt.indexOf(o),n=Dt[t+1],r=e(o);!1===r?a(n):u((function(t){function e(){t.isCanceled()||a(n)}!0===r?e():Promise.resolve(r).then(e)}))}}),[t,o]),s.useEffect((function(){return function(){h()}}),[]),[function(){a("prepare")},o]};function Mt(t,e,n,o){var l=o.motionEnter,c=void 0===l||l,u=o.motionAppear,h=void 0===u||u,d=o.motionLeave,f=void 0===d||d,p=o.motionDeadline,m=o.motionLeaveImmediately,g=o.onAppearPrepare,v=o.onEnterPrepare,y=o.onLeavePrepare,b=o.onAppearStart,w=o.onEnterStart,x=o.onLeaveStart,S=o.onAppearActive,E=o.onEnterActive,C=o.onLeaveActive,k=o.onAppearEnd,_=o.onEnterEnd,T=o.onLeaveEnd,O=o.onVisibleChanged,A=At(),L=Object(i.a)(A,2),D=L[0],I=L[1],R=At("none"),M=Object(i.a)(R,2),N=M[0],j=M[1],P=At(null),F=Object(i.a)(P,2),B=F[0],U=F[1],H=Object(s.useRef)(!1),z=Object(s.useRef)(null),G=Object(s.useRef)(!1),V=Object(s.useRef)(null);function W(){return n()||V.current}var K=Object(s.useRef)(!1);function q(t){var e,n=W();t&&!t.deadline&&t.target!==n||("appear"===N&&K.current?e=null==k?void 0:k(n,t):"enter"===N&&K.current?e=null==_?void 0:_(n,t):"leave"===N&&K.current&&(e=null==T?void 0:T(n,t)),!1===e||G.current||(j("none"),U(null)))}var X=function(t){var e=Object(s.useRef)(),n=Object(s.useRef)(t);n.current=t;var r=s.useCallback((function(t){n.current(t)}),[]);function i(t){t&&(t.removeEventListener(Tt,r),t.removeEventListener(_t,r))}return s.useEffect((function(){return function(){i(e.current)}}),[]),[function(t){e.current&&e.current!==t&&i(e.current),t&&t!==e.current&&(t.addEventListener(Tt,r),t.addEventListener(_t,r),e.current=t)},i]}(q),Y=Object(i.a)(X,1)[0],$=s.useMemo((function(){var t,e,n;switch(N){case"appear":return t={},Object(r.a)(t,"prepare",g),Object(r.a)(t,"start",b),Object(r.a)(t,"active",S),t;case"enter":return e={},Object(r.a)(e,"prepare",v),Object(r.a)(e,"start",w),Object(r.a)(e,"active",E),e;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",x),Object(r.a)(n,"active",C),n;default:return{}}}),[N]),J=Rt(N,(function(t){if("prepare"===t){var e=$.prepare;return!!e&&e(W())}var n;tt in $&&U((null===(n=$[tt])||void 0===n?void 0:n.call($,W(),null))||null);return"active"===tt&&(Y(W()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){q({deadline:!0})}),p))),!0})),Z=Object(i.a)(J,2),Q=Z[0],tt=Z[1],et=It(tt);K.current=et,Lt((function(){I(e);var n,r=H.current;(H.current=!0,t)&&(!r&&e&&h&&(n="appear"),r&&e&&c&&(n="enter"),(r&&!e&&f||!r&&m&&!e&&f)&&(n="leave"),n&&(j(n),Q()))}),[e]),Object(s.useEffect)((function(){("appear"===N&&!h||"enter"===N&&!c||"leave"===N&&!f)&&j("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),G.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===N&&(null==O||O(D))}),[D,N]);var nt=B;return $.prepare&&"start"===tt&&(nt=Object(a.a)({transition:"none"},nt)),[N,tt,nt,null!=D?D:e]}var Nt=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(){return Object(S.a)(this,n),e.apply(this,arguments)}return Object(E.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var jt=function(t){var e=t;function n(t){return!(!t.motionName||!e)}"object"===Object(I.a)(t)&&(e=t.transitionSupport);var o=s.forwardRef((function(t,e){var o=t.visible,l=void 0===o||o,u=t.removeOnLeave,h=void 0===u||u,d=t.forceRender,f=t.children,p=t.motionName,m=t.leavedClassName,g=t.eventProps,v=n(t),y=Object(s.useRef)(),b=Object(s.useRef)();var w=Mt(v,l,(function(){try{return Object(lt.a)(y.current||b.current)}catch(t){return null}}),t),x=Object(i.a)(w,4),S=x[0],E=x[1],C=x[2],k=x[3],_=s.useRef(k);k&&(_.current=!0);var T=Object(s.useRef)(e);T.current=e;var O,A=s.useCallback((function(t){y.current=t,Object(ct.b)(T.current,t)}),[]),L=Object(a.a)(Object(a.a)({},g),{},{visible:l});if(f)if("none"!==S&&n(t)){var D,I;"prepare"===E?I="prepare":It(E)?I="active":"start"===E&&(I="start"),O=f(Object(a.a)(Object(a.a)({},L),{},{className:c()(Ot(p,S),(D={},Object(r.a)(D,Ot(p,"".concat(S,"-").concat(I)),I),Object(r.a)(D,p,"string"==typeof p),D)),style:C}),A)}else O=k?f(Object(a.a)({},L),A):!h&&_.current?f(Object(a.a)(Object(a.a)({},L),{},{className:m}),A):d?f(Object(a.a)(Object(a.a)({},L),{},{style:{display:"none"}}),A):null;else O=null;return s.createElement(Nt,{ref:b},O)}));return o.displayName="CSSMotion",o}(kt);function Pt(t){var e;return e=t&&"object"===Object(I.a)(t)&&"key"in t?t:{key:t},Object(a.a)(Object(a.a)({},e),{},{key:String(e.key)})}function Ft(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.map(Pt)}function Bt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=e.length,o=Ft(t),s=Ft(e);o.forEach((function(t){for(var e=!1,o=r;o<i;o+=1){var l=s[o];if(l.key===t.key){r<o&&(n=n.concat(s.slice(r,o).map((function(t){return Object(a.a)(Object(a.a)({},t),{},{status:"add"})}))),r=o),n.push(Object(a.a)(Object(a.a)({},l),{},{status:"keep"})),r+=1,e=!0;break}}e||n.push(Object(a.a)(Object(a.a)({},t),{},{status:"remove"}))})),r<i&&(n=n.concat(s.slice(r).map((function(t){return Object(a.a)(Object(a.a)({},t),{},{status:"add"})}))));var l={};n.forEach((function(t){var e=t.key;l[e]=(l[e]||0)+1}));var c=Object.keys(l).filter((function(t){return l[t]>1}));return c.forEach((function(t){(n=n.filter((function(e){var n=e.key,r=e.status;return n!==t||"remove"!==r}))).forEach((function(e){e.key===t&&(e.status="keep")}))})),n}var Ut=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jt,n=function(t){Object(k.a)(r,t);var n=Object(_.a)(r);function r(){var t;return Object(S.a)(this,r),(t=n.apply(this,arguments)).state={keyEntities:[]},t.removeKey=function(e){t.setState((function(t){return{keyEntities:t.keyEntities.map((function(t){return t.key!==e?t:Object(a.a)(Object(a.a)({},t),{},{status:"removed"})}))}}))},t}return Object(E.a)(r,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,r=this.props,i=r.component,a=r.children,l=r.onVisibleChanged,c=Object(o.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return Ut.forEach((function(t){h[t]=c[t],delete c[t]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(o.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(e,Object(x.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(e){null==l||l(e,{key:i.key}),e||t.removeKey(i.key)}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.keys,r=e.keyEntities,i=Ft(n);return{keyEntities:Bt(r,i).filter((function(t){var e=r.find((function(e){var n=e.key;return t.key===n}));return!e||"removed"!==e.status||"remove"!==t.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(kt);var Ht=jt;function zt(t){var e=t.prefixCls,n=t.motion,r=t.animation,i=t.transitionName;return n||(r?{motionName:"".concat(e,"-").concat(r)}:i?{motionName:i}:null)}function Gt(t){var e=t.prefixCls,n=t.visible,r=t.zIndex,i=t.mask,o=t.maskMotion,l=t.maskAnimation,u=t.maskTransitionName;if(!i)return null;var h={};return(o||u||l)&&(h=Object(a.a)({motionAppear:!0},zt({motion:o,prefixCls:e,transitionName:u,animation:l}))),s.createElement(Ht,Object(x.a)({},h,{visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(e,"-mask"),n)})}))}var Vt=n("9mu1"),Wt=n("o0o1"),Kt=n.n(Wt),qt=n("HaE+"),Xt=["measure","align",null,"motion"],Yt=s.forwardRef((function(t,e){var n=t.visible,r=t.prefixCls,o=t.className,l=t.style,u=t.children,h=t.zIndex,d=t.stretch,f=t.destroyPopupOnHide,p=t.forceRender,m=t.align,g=t.point,v=t.getRootDomNode,y=t.getClassNameFromAlign,b=t.onAlign,w=t.onMouseEnter,S=t.onMouseLeave,E=t.onMouseDown,C=t.onTouchStart,k=Object(s.useRef)(),_=Object(s.useRef)(),T=Object(s.useState)(),O=Object(i.a)(T,2),A=O[0],L=O[1],D=function(t){var e=s.useState({width:0,height:0}),n=Object(i.a)(e,2),r=n[0],o=n[1];return[s.useMemo((function(){var e={};if(t){var n=r.width,i=r.height;-1!==t.indexOf("height")&&i?e.height=i:-1!==t.indexOf("minHeight")&&i&&(e.minHeight=i),-1!==t.indexOf("width")&&n?e.width=n:-1!==t.indexOf("minWidth")&&n&&(e.minWidth=n)}return e}),[t,r]),function(t){o({width:t.offsetWidth,height:t.offsetHeight})}]}(d),I=Object(i.a)(D,2),R=I[0],M=I[1];var N=function(t,e){var n=Object(s.useState)(null),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(t){c.current||a(t)}function h(){at.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[t]),Object(s.useEffect)((function(){switch(o){case"measure":e()}o&&(l.current=Object(at.a)(Object(qt.a)(Kt.a.mark((function t(){var e,n;return Kt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Xt.indexOf(o),(n=Xt[e+1])&&-1!==e&&u(n);case 3:case"end":return t.stop()}}),t)})))))}),[o]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[o,function(t){h(),l.current=Object(at.a)((function(){u((function(t){switch(o){case"align":return"motion";case"motion":return"stable"}return t})),null==t||t()}))}]}(n,(function(){d&&M(v())})),j=Object(i.a)(N,2),P=j[0],F=j[1],B=Object(s.useRef)();function U(){var t;null===(t=k.current)||void 0===t||t.forceAlign()}function H(t,e){var n=y(e);A!==n&&L(n),"align"===P&&(A!==n?Promise.resolve().then((function(){U()})):F((function(){var t;null===(t=B.current)||void 0===t||t.call(B)})),null==b||b(t,e))}var z=Object(a.a)({},zt(t));function G(){return new Promise((function(t){B.current=t}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(t){var e=z[t];z[t]=function(t,n){return F(),null==e?void 0:e(t,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||F()}),[z.motionName,P]),s.useImperativeHandle(e,(function(){return{forceAlign:U,getElement:function(){return _.current}}}));var V=Object(a.a)(Object(a.a)({},R),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),W=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(W=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(Ht,Object(x.a)({visible:n,ref:_,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:p}),(function(t,e){var n=t.className,i=t.style,l=c()(r,o,A,n);return s.createElement(Vt.a,{target:g||v,key:"popup",ref:k,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:e,className:l,onMouseEnter:w,onMouseLeave:S,onMouseDownCapture:E,onTouchStartCapture:C,style:Object(a.a)(Object(a.a)({},i),V)},K))}))}));Yt.displayName="PopupInner";var $t=Yt,Jt=s.forwardRef((function(t,e){var n=t.prefixCls,r=t.visible,i=t.zIndex,o=t.children,l=t.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(e,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(a.a)({zIndex:i},h),v=o;return s.Children.count(o)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},o)),p&&(v=p(v)),s.createElement(Ht,Object(x.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(t,e){var r=t.className,i=t.style,o=c()(n,u,r);return s.createElement("div",{ref:e,className:o,style:Object(a.a)(Object(a.a)({},i),g)},v)}))}));Jt.displayName="MobilePopupInner";var Zt=Jt,Qt=["visible","mobile"],te=s.forwardRef((function(t,e){var n=t.visible,r=t.mobile,l=Object(o.a)(t,Qt),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(a.a)(Object(a.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==t?void 0:t.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Zt,Object(x.a)({},v,{mobile:r,ref:e})):s.createElement($t,Object(x.a)({},v,{ref:e}));return s.createElement("div",null,s.createElement(Gt,v),y)}));te.displayName="Popup";var ee=te,ne=s.createContext(null);function re(){}function ie(){return""}function oe(t){return t?t.ownerDocument:window.document}var ae=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var se,le,ce=(se=ht.a,(le=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(t){var r,i;return Object(S.a)(this,n),(r=e.call(this,t)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(t){var e=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",t),r.delaySetPopupVisible(!0,e,e?null:t)},r.onMouseMove=function(t){r.fireEvents("onMouseMove",t),r.setPoint(t)},r.onMouseLeave=function(t){r.fireEvents("onMouseLeave",t),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(t){var e;t.relatedTarget&&!t.relatedTarget.setTimeout&&Object(st.a)(null===(e=r.popupRef.current)||void 0===e?void 0:e.getElement(),t.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(t){r.fireEvents("onFocus",t),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(t){r.fireEvents("onMouseDown",t),r.preClickTime=Date.now()},r.onTouchStart=function(t){r.fireEvents("onTouchStart",t),r.preTouchTime=Date.now()},r.onBlur=function(t){r.fireEvents("onBlur",t),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(t){t.preventDefault(),r.fireEvents("onContextMenu",t),r.setPopupVisible(!0,t)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(t){if(r.fireEvents("onClick",t),r.focusTime){var e;if(r.preClickTime&&r.preTouchTime?e=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?e=r.preClickTime:r.preTouchTime&&(e=r.preTouchTime),Math.abs(e-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,t)},r.onPopupMouseDown=function(){var t;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(t=r.context).onPopupMouseDown.apply(t,arguments)},r.onDocumentClick=function(t){if(!r.props.mask||r.props.maskClosable){var e=t.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(st.a)(n,e)&&!r.isContextMenuOnly()||Object(st.a)(i,e)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var t=r.props.getTriggerDOMNode;if(t)return t(r.triggerRef.current);try{var e=Object(lt.a)(r.triggerRef.current);if(e)return e}catch(t){}return ot.a.findDOMNode(Object(C.a)(r))},r.getPopupClassNameFromAlign=function(t){var e=[],n=r.props,i=n.popupPlacement,o=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&o&&e.push(function(t,e,n,r){for(var i=n.points,o=Object.keys(t),a=0;a<o.length;a+=1){var s=o[a];if(dt(t[s].points,i,r))return"".concat(e,"-placement-").concat(s)}return""}(o,a,t,s)),l&&e.push(l(t)),e.join(" ")},r.getComponent=function(){var t=r.props,e=t.prefixCls,n=t.destroyPopupOnHide,i=t.popupClassName,o=t.onPopupAlign,a=t.popupMotion,l=t.popupAnimation,c=t.popupTransitionName,u=t.popupStyle,h=t.mask,d=t.maskAnimation,f=t.maskTransitionName,p=t.maskMotion,m=t.zIndex,g=t.popup,v=t.stretch,y=t.alignPoint,b=t.mobile,w=t.forceRender,S=r.state,E=S.popupVisible,C=S.point,k=r.getPopupAlign(),_={};return r.isMouseEnterToShow()&&(_.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(_.onMouseLeave=r.onPopupMouseLeave),_.onMouseDown=r.onPopupMouseDown,_.onTouchStart=r.onPopupMouseDown,s.createElement(ee,Object(x.a)({prefixCls:e,destroyPopupOnHide:n,visible:E,point:y&&C,className:i,align:k,onAlign:o,animation:l,getClassNameFromAlign:r.getPopupClassNameFromAlign},_,{stretch:v,getRootDomNode:r.getRootDomNode,style:u,mask:h,zIndex:m,transitionName:c,maskAnimation:d,maskTransitionName:f,maskMotion:p,ref:r.popupRef,motion:a,mobile:b,forceRender:w}),"function"==typeof g?g():g)},r.attachParent=function(t){at.a.cancel(r.attachId);var e,n=r.props,i=n.getPopupContainer,o=n.getDocument,a=r.getRootDomNode();i?(a||0===i.length)&&(e=i(a)):e=o(r.getRootDomNode()).body,e?e.appendChild(t):r.attachId=Object(at.a)((function(){r.attachParent(t)}))},r.getContainer=function(){var t=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");return t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",r.attachParent(t),t},r.setPoint=function(t){r.props.alignPoint&&t&&r.setState({point:{pageX:t.pageX,pageY:t.pageY}})},r.handlePortalUpdate=function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)},r.triggerContextValue={onPopupMouseDown:r.onPopupMouseDown},i="popupVisible"in t?!!t.popupVisible:!!t.defaultPopupVisible,r.state={prevPopupVisible:i,popupVisible:i},ae.forEach((function(t){r["fire".concat(t)]=function(e){r.fireEvents(t,e)}})),r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t,e=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(t=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ut.a)(t,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(t=t||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ut.a)(t,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(t=t||e.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ut.a)(t,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ut.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var t;return(null===(t=this.popupRef.current)||void 0===t?void 0:t.getElement())||null}},{key:"getPopupAlign",value:function(){var t=this.props,e=t.popupPlacement,n=t.popupAlign,r=t.builtinPlacements;return e&&r?function(t,e,n){var r=t[e]||{};return Object(a.a)(Object(a.a)({},r),n)}(r,e,n):n}},{key:"setPopupVisible",value:function(t,e){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==t&&("popupVisible"in this.props||this.setState({popupVisible:t,prevPopupVisible:r}),this.props.onPopupVisibleChange(t)),n&&e&&t&&this.setPoint(e)}},{key:"delaySetPopupVisible",value:function(t,e,n){var r=this,i=1e3*e;if(this.clearDelayTimer(),i){var o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(t,o),r.clearDelayTimer()}),i)}else this.setPopupVisible(t,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(t){var e=this.props.children.props,n=this.props;return e[t]&&n[t]?this["fire".concat(t)]:e[t]||n[t]}},{key:"isClickToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var t=this.props.action;return"contextMenu"===t||1===t.length&&"contextMenu"===t[0]}},{key:"isContextMenuToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var t;this.state.popupVisible&&(null===(t=this.popupRef.current)||void 0===t||t.forceAlign())}},{key:"fireEvents",value:function(t,e){var n=this.props.children.props[t];n&&n(e);var r=this.props[t];r&&r(e)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,e=this.props,n=e.children,r=e.forceRender,i=e.alignPoint,o=e.className,l=e.autoDestroy,u=s.Children.only(n),h={key:"trigger"};this.isContextMenuToShow()?h.onContextMenu=this.onContextMenu:h.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(h.onClick=this.onClick,h.onMouseDown=this.onMouseDown,h.onTouchStart=this.onTouchStart):(h.onClick=this.createTwoChains("onClick"),h.onMouseDown=this.createTwoChains("onMouseDown"),h.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(h.onMouseEnter=this.onMouseEnter,i&&(h.onMouseMove=this.onMouseMove)):h.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?h.onMouseLeave=this.onMouseLeave:h.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(h.onFocus=this.onFocus,h.onBlur=this.onBlur):(h.onFocus=this.createTwoChains("onFocus"),h.onBlur=this.createTwoChains("onBlur"));var d=c()(u&&u.props&&u.props.className,o);d&&(h.className=d);var f=Object(a.a)({},h);Object(ct.c)(u)&&(f.ref=Object(ct.a)(this.triggerRef,u.ref));var p,m=s.cloneElement(u,f);return(t||this.popupRef.current||r)&&(p=s.createElement(se,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&l&&(p=null),s.createElement(ne.Provider,{value:this.triggerContextValue},m,p)}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.popupVisible,r={};return void 0!==n&&e.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=e.popupVisible),r}}]),n}(s.Component)).contextType=ne,le.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ie,getDocument:oe,onPopupVisibleChange:re,afterPopupVisibleChange:re,onPopupAlign:re,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},le),ue={adjustX:1,adjustY:1},he={topLeft:{points:["bl","tl"],overflow:ue,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ue,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ue,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ue,offset:[4,0]}},de={topLeft:{points:["bl","tl"],overflow:ue,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ue,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ue,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ue,offset:[4,0]}},fe=0,pe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},me=function(t,e,n){var i=Z(e),o=t.getState();t.setState({defaultActiveFirst:Object(a.a)(Object(a.a)({},o.defaultActiveFirst),{},Object(r.a)({},i,n))})},ge=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(t){var r;Object(S.a)(this,n),(r=e.call(this,t)).onDestroy=function(t){r.props.onDestroy(t)},r.onKeyDown=function(t){var e=t.keyCode,n=r.menuInstance,i=r.props.store,o=r.getVisible();if(e===v.a.ENTER)return r.onTitleClick(t),me(i,r.props.eventKey,!0),!0;if(e===v.a.RIGHT)return o?n.onKeyDown(t):(r.triggerOpenChange(!0),me(i,r.props.eventKey,!0)),!0;if(e===v.a.LEFT){var a;if(!o)return;return(a=n.onKeyDown(t))||(r.triggerOpenChange(!1),a=!0),a}return!o||e!==v.a.UP&&e!==v.a.DOWN?void 0:n.onKeyDown(t)},r.onOpenChange=function(t){r.props.onOpenChange(t)},r.onPopupVisibleChange=function(t){r.triggerOpenChange(t,t?"mouseenter":"mouseleave")},r.onMouseEnter=function(t){var e=r.props,n=e.eventKey,i=e.onMouseEnter,o=e.store;me(o,r.props.eventKey,!1),i({key:n,domEvent:t})},r.onMouseLeave=function(t){var e=r.props,n=e.parentMenu,i=e.eventKey,o=e.onMouseLeave;n.subMenuInstance=Object(C.a)(r),o({key:i,domEvent:t})},r.onTitleMouseEnter=function(t){var e=r.props,n=e.eventKey,i=e.onItemHover,o=e.onTitleMouseEnter;i({key:n,hover:!0}),o({key:n,domEvent:t})},r.onTitleMouseLeave=function(t){var e=r.props,n=e.parentMenu,i=e.eventKey,o=e.onItemHover,a=e.onTitleMouseLeave;n.subMenuInstance=Object(C.a)(r),o({key:i,hover:!1}),a({key:i,domEvent:t})},r.onTitleClick=function(t){var e=Object(C.a)(r).props;e.onTitleClick({key:e.eventKey,domEvent:t}),"hover"!==e.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),me(e.store,r.props.eventKey,!1))},r.onSubMenuClick=function(t){"function"==typeof r.props.onClick&&r.props.onClick(r.addKeyPath(t))},r.onSelect=function(t){r.props.onSelect(t)},r.onDeselect=function(t){r.props.onDeselect(t)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(t){r.menuInstance=t},r.addKeyPath=function(t){return Object(a.a)(Object(a.a)({},t),{},{keyPath:(t.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(t,e){var n=r.props.eventKey,i=function(){r.onOpenChange({key:n,item:Object(C.a)(r),trigger:e,open:t})};"mouseenter"===e?r.mouseenterTimeout=setTimeout((function(){i()}),0):i()},r.isChildrenSelected=function(){var t={find:!1};return function t(e,n,r){e&&!r.find&&s.Children.forEach(e,(function(e){if(e){var i=e.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(e.key)?r.find=!0:e.props.children&&t(e.props.children,n,r)}}))}(r.props.children,r.props.selectedKeys,t),t.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var t=it.findDOMNode(r.menuInstance);t.offsetWidth>=r.subMenuTitle.offsetWidth||(t.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(t){r.subMenuTitle=t},r.getBaseProps=function(){var t=Object(C.a)(r).props,e=r.getMode();return{mode:"horizontal"===e?"vertical":e,visible:r.getVisible(),level:t.level+1,inlineIndent:t.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:t.selectedKeys,eventKey:"".concat(t.eventKey,"-menu-"),openKeys:t.openKeys,motion:t.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:t.subMenuOpenDelay,parentMenu:Object(C.a)(r),subMenuCloseDelay:t.subMenuCloseDelay,forceSubMenuRender:t.forceSubMenuRender,triggerSubMenuAction:t.triggerSubMenuAction,builtinPlacements:t.builtinPlacements,defaultActiveFirst:t.store.getState().defaultActiveFirst[Z(t.eventKey)],multiple:t.multiple,prefixCls:t.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:t.itemIcon,expandIcon:t.expandIcon,direction:t.direction}},r.getMotion=function(t,e){var n=Object(C.a)(r).haveRendered,i=r.props,o=i.motion,s=i.rootPrefixCls;return Object(a.a)(Object(a.a)({},o),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!e||"inline"!==t})};var i=t.store,o=t.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[o]),me(i,o,c),r.state={mode:t.mode,isOpen:t.isOpen},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t=this,e=this.props,n=e.mode,r=e.parentMenu,i=e.manualRef,o=e.isOpen,a=function(){t.setState({mode:n,isOpen:o})},s=o!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(at.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(at.a)(a):a()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&o&&(this.minWidthTimeout=setTimeout((function(){return t.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.onDestroy,n=t.eventKey;e&&e(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(t,e){var n=this.getBaseProps();return s.createElement(_e,Object(x.a)({},n,{id:this.internalMenuId,className:t,style:e}),this.props.children)}},{key:"renderChildren",value:function(){var t=this,e=this.getBaseProps(),n=e.mode,i=e.visible,o=e.forceSubMenuRender,a=e.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||o,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(e.prefixCls,"-sub"),Object(r.a)({},"".concat(e.prefixCls,"-rtl"),"rtl"===a));return this.isInlineMode()?s.createElement(Ht,Object(x.a)({visible:e.visible,forceRender:o},l),(function(e){var n=e.className,r=e.style,i=c()(u,n);return t.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var t,e,n,i=Object(a.a)({},this.props),o=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(t={},Object(r.a)(t,i.className,!!i.className),Object(r.a)(t,this.getOpenClassName(),o),Object(r.a)(t,this.getActiveClassName(),i.active||o&&!u),Object(r.a)(t,this.getDisabledClassName(),i.disabled),Object(r.a)(t,this.getSelectedClassName(),this.isChildrenSelected()),t));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(fe+=1,this.internalMenuId="$__$".concat(fe,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(a.a)({},this.props))));var w=s.createElement("div",Object(x.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":o},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),S=this.renderChildren(),E=(null===(e=i.parentMenu)||void 0===e?void 0:e.isRootMenu)?i.parentMenu.props.getPopupContainer:function(t){return t.parentNode},C=pe[h],k=i.popupOffset?{offset:i.popupOffset}:{},_=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),T=i.disabled,O=i.triggerSubMenuAction,A=i.subMenuOpenDelay,L=i.forceSubMenuRender,D=i.subMenuCloseDelay,I=i.builtinPlacements;tt.forEach((function(t){return delete i[t]})),delete i.onClick;var R=v?Object(a.a)(Object(a.a)({},de),I):Object(a.a)(Object(a.a)({},he),I);delete i.direction;var M=this.getBaseProps(),N=u?null:this.getMotion(M.mode,M.visible);return s.createElement("li",Object(x.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ce,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),_),getPopupContainer:E,builtinPlacements:R,popupPlacement:C,popupVisible:!u&&o,popupAlign:k,popup:u?null:S,action:T||u?[]:[O],mouseEnterDelay:A,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:L,popupMotion:N},w),u?S:null)}}]),n}(s.Component);ge.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var ve=Object(T.b)((function(t,e){var n=t.openKeys,r=t.activeKey,i=t.selectedKeys,o=e.eventKey,a=e.subMenuKey;return{isOpen:n.indexOf(o)>-1,active:r[a]===o,selectedKeys:i}}))(ge);ve.isSubMenu=!0;var ye=ve,be=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(){var t;return Object(S.a)(this,n),(t=e.apply(this,arguments)).resizeObserver=null,t.mutationObserver=null,t.originalTotalWidth=0,t.overflowedItems=[],t.menuItemSizes=[],t.cancelFrameId=null,t.state={lastVisibleIndex:void 0},t.childRef=s.createRef(),t.getMenuItemNodes=function(){var e=t.props.prefixCls,n=t.childRef.current;return n?[].slice.call(n.children).filter((function(t){return t.className.split(" ").indexOf("".concat(e,"-overflowed-submenu"))<0})):[]},t.getOverflowedSubMenuItem=function(e,n,r){var i=t.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=t.props.children[0].props,p=(f.children,f.title,f.style),m=Object(o.a)(f,["children","title","style"]),g=Object(a.a)({},p),v="".concat(e,"-overflowed-indicator"),y="".concat(e,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(a.a)(Object(a.a)({},g),{},{display:"none"}):r&&(g=Object(a.a)(Object(a.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",w={};return tt.forEach((function(t){void 0!==m[t]&&(w[t]=m[t])})),s.createElement(ye,Object(x.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},w,{key:v,eventKey:y,disabled:!1,style:g}),n)},t.setChildrenWidthAndResize=function(){if("horizontal"===t.props.mode){var e=t.childRef.current;if(e){var n=e.children;if(n&&0!==n.length){var r=e.children[n.length-1];nt(r,"display","inline-block");var i=t.getMenuItemNodes(),o=i.filter((function(t){return t.className.split(" ").indexOf("menuitem-overflowed")>=0}));o.forEach((function(t){nt(t,"display","inline-block")})),t.menuItemSizes=i.map((function(t){return et(t,!0)})),o.forEach((function(t){nt(t,"display","none")})),t.overflowedIndicatorWidth=et(e.children[e.children.length-1],!0),t.originalTotalWidth=t.menuItemSizes.reduce((function(t,e){return t+e}),0),t.handleResize(),nt(r,"display","none")}}}},t.handleResize=function(){if("horizontal"===t.props.mode){var e=t.childRef.current;if(e){var n=et(e);t.overflowedItems=[];var r,i=0;t.originalTotalWidth>n+.5&&(r=-1,t.menuItemSizes.forEach((function(e){(i+=e)+t.overflowedIndicatorWidth<=n&&(r+=1)}))),t.setState({lastVisibleIndex:r})}}},t}return Object(E.a)(n,[{key:"componentDidMount",value:function(){var t=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var e=this.childRef.current;if(!e)return;this.resizeObserver=new rt.default((function(e){e.forEach((function(){var e=t.cancelFrameId;cancelAnimationFrame(e),t.cancelFrameId=requestAnimationFrame(t.setChildrenWidthAndResize)}))})),[].slice.call(e.children).concat(e).forEach((function(e){t.resizeObserver.observe(e)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){t.resizeObserver.disconnect(),[].slice.call(e.children).concat(e).forEach((function(e){t.resizeObserver.observe(e)})),t.setChildrenWidthAndResize()})),this.mutationObserver.observe(e,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(t){var e=this,n=this.state.lastVisibleIndex;return(t||[]).reduce((function(r,i,o){var a=i;if("horizontal"===e.props.mode){var l=e.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==e.props.className.indexOf("".concat(e.props.prefixCls,"-root"))&&(o>n&&(a=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),o===n+1&&(e.overflowedItems=t.slice(n+1).map((function(t){return s.cloneElement(t,{key:t.props.eventKey,mode:"vertical-left"})})),l=e.getOverflowedSubMenuItem(i.props.eventKey,e.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,a]);return o===t.length-1&&c.push(e.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[a])}),[])}},{key:"render",value:function(){var t=this.props,e=(t.visible,t.prefixCls,t.overflowedIndicator,t.mode,t.level,t.tag),n=t.children,r=(t.theme,Object(o.a)(t,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=e;return s.createElement(i,Object(x.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);be.defaultProps={tag:"div",className:""};var we=be;function xe(t,e,n){var i=t.getState();t.setState({activeKey:Object(a.a)(Object(a.a)({},i.activeKey),{},Object(r.a)({},e,n))})}function Se(t){return t.eventKey||"0-menu-"}function Ee(t,e){var n,r=e,i=t.children,o=t.eventKey;if(r&&(Q(i,(function(t,e){t&&t.props&&!t.props.disabled&&r===J(t,o,e)&&(n=!0)})),n))return r;return r=null,t.defaultActiveFirst?(Q(i,(function(t,e){r||!t||t.props.disabled||(r=J(t,o,e))})),r):r}function Ce(t){if(t){var e=this.instanceArray.indexOf(t);-1!==e?this.instanceArray[e]=t:this.instanceArray.push(t)}}var ke=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(t){var i;return Object(S.a)(this,n),(i=e.call(this,t)).onKeyDown=function(t,e){var n,r=t.keyCode;if(i.getFlatInstanceArray().forEach((function(e){e&&e.props.active&&e.onKeyDown&&(n=e.onKeyDown(t))})),n)return 1;var o=null;return r!==v.a.UP&&r!==v.a.DOWN||(o=i.step(r===v.a.UP?-1:1)),o?(t.preventDefault(),xe(i.props.store,Se(i.props),o.props.eventKey),"function"==typeof e&&e(o),1):void 0},i.onItemHover=function(t){var e=t.key,n=t.hover;xe(i.props.store,Se(i.props),n?e:null)},i.onDeselect=function(t){i.props.onDeselect(t)},i.onSelect=function(t){i.props.onSelect(t)},i.onClick=function(t){i.props.onClick(t)},i.onOpenChange=function(t){i.props.onOpenChange(t)},i.onDestroy=function(t){i.props.onDestroy(t)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(t){var e=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[Se(i.props)],r=e.length;if(!r)return null;t<0&&(e=e.concat().reverse());var o=-1;if(e.every((function(t,e){return!t||t.props.eventKey!==n||(o=e,!1)})),i.props.defaultActiveFirst||-1===o||(a=e.slice(o,r-1)).length&&!a.every((function(t){return!!t.props.disabled}))){var a,s=(o+1)%r,l=s;do{var c=e[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(t,e,n){var r=i.props.store.getState(),o=Object(C.a)(i).props,l=J(t,o.eventKey,e),c=t.props;if(!c||"string"==typeof t.type)return t;var u=l===r.activeKey,h=Object(a.a)(Object(a.a)({mode:c.mode||o.mode,level:o.level,inlineIndent:o.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:o.prefixCls,index:e,parentMenu:o.parentMenu,manualRef:c.disabled?void 0:Object(A.a)(t.ref,Ce.bind(Object(C.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:o.multiple,onClick:function(t){(c.onClick||$)(t),i.onClick(t)},onItemHover:i.onItemHover,motion:o.motion,subMenuOpenDelay:o.subMenuOpenDelay,subMenuCloseDelay:o.subMenuCloseDelay,forceSubMenuRender:o.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:o.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:o.direction});return("inline"===o.mode||Y.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(t,Object(a.a)(Object(a.a)({},h),{},{key:l||e}))},i.renderMenuItem=function(t,e,n){if(!t)return null;var r=i.props.store.getState(),o={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(t,e,o)},t.store.setState({activeKey:Object(a.a)(Object(a.a)({},t.store.getState().activeKey),{},Object(r.a)({},t.eventKey,Ee(t,t.activeKey)))}),i.instanceArray=[],i}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(t){return this.props.visible||t.visible||this.props.className!==t.className||!D()(this.props.style,t.style)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n="activeKey"in e?e.activeKey:e.store.getState().activeKey[Se(e)],r=Ee(e,n);if(r!==n)xe(e.store,Se(e),r);else if("activeKey"in t){r!==Ee(t,t.activeKey)&&xe(e.store,Se(e),r)}}},{key:"render",value:function(){var t=this,e=Object(x.a)({},this.props);this.instanceArray=[];var n={className:c()(e.prefixCls,e.className,"".concat(e.prefixCls,"-").concat(e.mode)),role:e.role||"menu"};e.id&&(n.id=e.id),e.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=e.prefixCls,i=e.eventKey,o=e.visible,a=e.level,l=e.mode,h=e.overflowedIndicator,d=e.theme;return tt.forEach((function(t){return delete e[t]})),delete e.onClick,s.createElement(we,Object(x.a)({},e,{prefixCls:r,mode:l,tag:"ul",level:a,theme:d,visible:o,overflowedIndicator:h},n),Object(u.a)(e.children).map((function(e,n){return t.renderMenuItem(e,n,i||"0-menu-")})))}}]),n}(s.Component);ke.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var _e=Object(T.b)()(ke),Te=n("Kwbf");function Oe(t,e,n){var r=t.prefixCls,i=t.motion,o=t.defaultMotions,a=void 0===o?{}:o,s=t.openAnimation,l=t.openTransitionName,c=e.switchingModeFromInline;if(i)return i;if("object"===Object(I.a)(s)&&s)Object(Te.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=a[n];return u||(c?null:a.other)}var Ae=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(t){var r;Object(S.a)(this,n),(r=e.call(this,t)).onSelect=function(t){var e=Object(C.a)(r).props;if(e.selectable){var n=r.store.getState().selectedKeys,i=t.key;n=e.multiple?n.concat([i]):[i],"selectedKeys"in e||r.store.setState({selectedKeys:n}),e.onSelect(Object(a.a)(Object(a.a)({},t),{},{selectedKeys:n}))}},r.onClick=function(t){var e=r.getRealMenuMode(),n=Object(C.a)(r),i=n.store,o=n.props.onOpenChange;"inline"===e||"openKeys"in r.props||(i.setState({openKeys:[]}),o([])),r.props.onClick(t)},r.onKeyDown=function(t,e){r.innerMenu.getWrappedInstance().onKeyDown(t,e)},r.onOpenChange=function(t){var e=Object(C.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,o=function(t){var e=!1;if(t.open)(e=-1===n.indexOf(t.key))&&n.push(t.key);else{var r=n.indexOf(t.key);(e=-1!==r)&&n.splice(r,1)}i=i||e};Array.isArray(t)?t.forEach(o):o(t),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),e.onOpenChange(n))},r.onDeselect=function(t){var e=Object(C.a)(r).props;if(e.selectable){var n=r.store.getState().selectedKeys.concat(),i=t.key,o=n.indexOf(i);-1!==o&&n.splice(o,1),"selectedKeys"in e||r.store.setState({selectedKeys:n}),e.onDeselect(Object(a.a)(Object(a.a)({},t),{},{selectedKeys:n}))}},r.onMouseEnter=function(t){r.restoreModeVerticalFromInline();var e=r.props.onMouseEnter;e&&e(t)},r.onTransitionEnd=function(t){var e="width"===t.propertyName&&t.target===t.currentTarget,n=t.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,o="font-size"===t.propertyName&&i.indexOf("anticon")>=0;(e||o)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(t){r.innerMenu=t},r.isRootMenu=!0;var i=t.defaultSelectedKeys,o=t.defaultOpenKeys;return"selectedKeys"in t&&(i=t.selectedKeys||[]),"openKeys"in t&&(o=t.openKeys||[]),r.store=Object(T.c)({selectedKeys:i,openKeys:o,activeKey:{"0-menu-":Ee(t,t.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:t,inlineOpenKeys:[],store:r.store},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.siderCollapsed,r=e.inlineCollapsed,i=e.onOpenChange;(!t.inlineCollapsed&&r||!t.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var t=this.props.collapsedWidth,e=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===t||"0"===t||"0px"===t)?(this.prevOpenKeys=e.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var t=this.props.mode,e=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return e&&n?"inline":n?"vertical":t}},{key:"getInlineCollapsed",value:function(){var t=this.props,e=t.inlineCollapsed,n=t.siderCollapsed;return void 0!==n?n:e}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var t=Object(a.a)({},Object(O.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),e=this.getRealMenuMode();return t.className+=" ".concat(t.prefixCls,"-root"),"rtl"===t.direction&&(t.className+=" ".concat(t.prefixCls,"-rtl")),delete(t=Object(a.a)(Object(a.a)({},t),{},{mode:e,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,e)})).openAnimation,delete t.openTransitionName,s.createElement(T.a,{store:this.store},s.createElement(_e,Object(x.a)({},t,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.prevProps,r=e.store,i=r.getState(),o={},a={prevProps:t};return"inline"===n.mode&&"inline"!==t.mode&&(a.switchingModeFromInline=!0),"openKeys"in t?o.openKeys=t.openKeys||[]:((t.inlineCollapsed&&!n.inlineCollapsed||t.siderCollapsed&&!n.siderCollapsed)&&(a.switchingModeFromInline=!0,a.inlineOpenKeys=i.openKeys,o.openKeys=[]),(!t.inlineCollapsed&&n.inlineCollapsed||!t.siderCollapsed&&n.siderCollapsed)&&(o.openKeys=e.inlineOpenKeys,a.inlineOpenKeys=[])),Object.keys(o).length&&r.setState(o),a}}]),n}(s.Component);Ae.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var Le=Ae,De=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(){var t;return Object(S.a)(this,n),(t=e.apply(this,arguments)).onKeyDown=function(e){if(e.keyCode===v.a.ENTER)return t.onClick(e),!0},t.onMouseLeave=function(e){var n=t.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseLeave;i({key:r,hover:!1}),o({key:r,domEvent:e})},t.onMouseEnter=function(e){var n=t.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseEnter;i({key:r,hover:!0}),o({key:r,domEvent:e})},t.onClick=function(e){var n=t.props,r=n.eventKey,i=n.multiple,o=n.onClick,a=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(C.a)(t),domEvent:e};o(c),i?l?s(c):a(c):l||a(c)},t.saveNode=function(e){t.node=e},t}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var t=this.props;t.onDestroy&&t.onDestroy(t.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var t,e=Object(a.a)({},this.props),n=c()(this.getPrefixCls(),e.className,(t={},Object(r.a)(t,this.getActiveClassName(),!e.disabled&&e.active),Object(r.a)(t,this.getSelectedClassName(),e.isSelected),Object(r.a)(t,this.getDisabledClassName(),e.disabled),t)),i=Object(a.a)(Object(a.a)({},e.attribute),{},{title:"string"==typeof e.title?e.title:void 0,className:n,role:e.role||"menuitem","aria-disabled":e.disabled});"option"===e.role?i=Object(a.a)(Object(a.a)({},i),{},{role:"option","aria-selected":e.isSelected}):null!==e.role&&"none"!==e.role||(i.role="none");var o={onClick:e.disabled?null:this.onClick,onMouseLeave:e.disabled?null:this.onMouseLeave,onMouseEnter:e.disabled?null:this.onMouseEnter},l=Object(a.a)({},e.style);"inline"===e.mode&&("rtl"===e.direction?l.paddingRight=e.inlineIndent*e.level:l.paddingLeft=e.inlineIndent*e.level),tt.forEach((function(t){return delete e[t]})),delete e.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(x.a)({},Object(O.a)(e,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,o,{style:l,ref:this.saveNode}),e.children,u)}}]),n}(s.Component);De.isMenuItem=!0,De.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var Ie=Object(T.b)((function(t,e){var n=t.activeKey,r=t.selectedKeys,i=e.eventKey;return{active:n[e.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(De),Re=function(t){Object(k.a)(n,t);var e=Object(_.a)(n);function n(){var t;return Object(S.a)(this,n),(t=e.apply(this,arguments)).renderInnerMenuItem=function(e){var n=t.props;return(0,n.renderMenuItem)(e,n.index,t.props.subMenuKey)},t}return Object(E.a)(n,[{key:"render",value:function(){var t=Object(x.a)({},this.props),e=t.className,n=void 0===e?"":e,r=t.rootPrefixCls,i="".concat(r,"-item-group-title"),o="".concat(r,"-item-group-list"),a=t.title,l=t.children;return tt.forEach((function(e){return delete t[e]})),delete t.direction,s.createElement("li",Object(x.a)({},t,{onClick:function(t){return t.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof a?a:void 0},a),s.createElement("ul",{className:o},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Re.isMenuItemGroup=!0,Re.defaultProps={disabled:!0};var Me=function(t){var e=t.className,n=t.rootPrefixCls,r=t.style;return s.createElement("li",{className:"".concat(e," ").concat(n,"-item-divider"),style:r})};Me.defaultProps={disabled:!0,className:"",style:{}};var Ne=Le,je=n("eDIo");var Pe=s.forwardRef((function(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(t){r.onEdit("add",{event:t})}},r.addIcon||"+"):null}));var Fe=s.forwardRef((function(t,e){var n=t.prefixCls,o=t.id,a=t.tabs,l=t.locale,u=t.mobile,h=t.moreIcon,d=void 0===h?"More":h,f=t.moreTransitionName,p=t.style,m=t.className,g=t.editable,y=t.tabBarGutter,b=t.rtl,w=t.onTabClick,x=Object(s.useState)(!1),S=Object(i.a)(x,2),E=S[0],C=S[1],k=Object(s.useState)(null),_=Object(i.a)(k,2),T=_[0],O=_[1],A="".concat(o,"-more-popup"),L="".concat(n,"-dropdown"),D=null!==T?"".concat(A,"-").concat(T):null,I=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(Ne,{onClick:function(t){var e=t.key,n=t.domEvent;w(e,n),C(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[T],"aria-label":void 0!==I?I:"expanded dropdown"},a.map((function(t){return s.createElement(Ie,{key:t.key,id:"".concat(A,"-").concat(t.key),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(t.key),disabled:t.disabled},t.tab)})));function M(t){for(var e=a.filter((function(t){return!t.disabled})),n=e.findIndex((function(t){return t.key===T}))||0,r=e.length,i=0;i<r;i+=1){var o=e[n=(n+t+r)%r];if(!o.disabled)return void O(o.key)}}Object(s.useEffect)((function(){var t=document.getElementById(D);t&&t.scrollIntoView&&t.scrollIntoView(!1)}),[T]),Object(s.useEffect)((function(){E||O(null)}),[E]);var N=Object(r.a)({},b?"marginLeft":"marginRight",y);a.length||(N.visibility="hidden",N.order=1);var j=c()(Object(r.a)({},"".concat(L,"-rtl"),b)),P=u?null:s.createElement(je.a,{prefixCls:L,overlay:R,trigger:["hover"],visible:E,transitionName:f,onVisibleChange:C,overlayClassName:j,mouseEnterDelay:.1,mouseLeaveDelay:.1},s.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:N,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":A,id:"".concat(o,"-more"),"aria-expanded":E,onKeyDown:function(t){var e=t.which;if(E)switch(e){case v.a.UP:M(-1),t.preventDefault();break;case v.a.DOWN:M(1),t.preventDefault();break;case v.a.ESC:C(!1);break;case v.a.SPACE:case v.a.ENTER:null!==T&&w(T,t)}else[v.a.DOWN,v.a.SPACE,v.a.ENTER].includes(e)&&(C(!0),t.preventDefault())}},d));return s.createElement("div",{className:c()("".concat(n,"-nav-operations"),m),style:p,ref:e},P,s.createElement(Pe,{prefixCls:n,locale:l,editable:g}))})),Be=Object(s.createContext)(null),Ue=Math.pow(.995,20);function He(t,e){var n=s.useRef(t),r=s.useState({}),o=Object(i.a)(r,2)[1];return[n.current,function(t){var r="function"==typeof t?t(n.current):t;r!==n.current&&e(r,n.current),n.current=r,o({})}]}var ze=function(t){var e,n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o=i;return"right"===n&&(e=o.right||!o.left&&o||null),"left"===n&&(e=o.left||null),e?s.createElement("div",{className:"".concat(r,"-extra-content")},e):null};var Ge=s.forwardRef((function(t,e){var n,o,l=s.useContext(Be),u=l.prefixCls,h=l.tabs,f=t.className,v=t.style,x=t.id,S=t.animated,E=t.activeKey,C=t.rtl,k=t.extra,_=t.editable,T=t.locale,O=t.tabPosition,A=t.tabBarGutter,L=t.children,D=t.onTabClick,I=t.onTabScroll,R=Object(s.useRef)(),M=Object(s.useRef)(),N=Object(s.useRef)(),j=Object(s.useRef)(),P=(o=Object(s.useRef)(new Map),[function(t){return o.current.has(t)||o.current.set(t,s.createRef()),o.current.get(t)},function(t){o.current.delete(t)}]),F=Object(i.a)(P,2),B=F[0],U=F[1],H="top"===O||"bottom"===O,z=He(0,(function(t,e){H&&I&&I({direction:t>e?"left":"right"})})),G=Object(i.a)(z,2),V=G[0],W=G[1],K=He(0,(function(t,e){!H&&I&&I({direction:t>e?"top":"bottom"})})),q=Object(i.a)(K,2),X=q[0],Y=q[1],$=Object(s.useState)(0),J=Object(i.a)($,2),Z=J[0],Q=J[1],tt=Object(s.useState)(0),et=Object(i.a)(tt,2),nt=et[0],rt=et[1],it=Object(s.useState)(0),ot=Object(i.a)(it,2),at=ot[0],st=ot[1],lt=Object(s.useState)(0),ct=Object(i.a)(lt,2),ut=ct[0],ht=ct[1],dt=Object(s.useState)(null),ft=Object(i.a)(dt,2),pt=ft[0],mt=ft[1],gt=Object(s.useState)(null),vt=Object(i.a)(gt,2),yt=vt[0],bt=vt[1],wt=Object(s.useState)(0),xt=Object(i.a)(wt,2),St=xt[0],Et=xt[1],Ct=Object(s.useState)(0),kt=Object(i.a)(Ct,2),_t=kt[0],Tt=kt[1],Ot=function(t){var e=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],o=Object(s.useRef)("function"==typeof t?t():t),a=g((function(){var t=o.current;e.current.forEach((function(e){t=e(t)})),e.current=[],o.current=t,r({})}));return[o.current,function(t){e.current.push(t),a()}]}(new Map),At=Object(i.a)(Ot,2),Lt=At[0],Dt=At[1],It=function(t,e,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=e.get(null===(n=t[0])||void 0===n?void 0:n.key)||b,o=i.left+i.width,s=0;s<t.length;s+=1){var l,c=t[s].key,u=e.get(c);if(!u)u=e.get(null===(l=t[s-1])||void 0===l?void 0:l.key)||b;var h=r.get(c)||Object(a.a)({},u);h.right=o-h.left-h.width,r.set(c,h)}return r}),[t.map((function(t){return t.key})).join("_"),e,n])}(h,Lt,Z),Rt="".concat(u,"-nav-operations-hidden"),Mt=0,Nt=0;function jt(t){return t<Mt?[Mt,!1]:t>Nt?[Nt,!1]:[t,!0]}H?C?(Mt=0,Nt=Math.max(0,Z-pt)):(Mt=Math.min(0,pt-Z),Nt=0):(Mt=Math.min(0,yt-nt),Nt=0);var Pt=Object(s.useRef)(),Ft=Object(s.useState)(),Bt=Object(i.a)(Ft,2),Ut=Bt[0],Ht=Bt[1];function zt(){Ht(Date.now())}function Gt(){window.clearTimeout(Pt.current)}function Vt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,e=It.get(t);if(e)if(H){var n=V;C?e.right<V?n=e.right:e.right+e.width>V+pt&&(n=e.right+e.width-pt):e.left<-V?n=-e.left:e.left+e.width>-V+pt&&(n=-(e.left+e.width-pt)),Y(0),W(jt(n)[0])}else{var r=X;e.top<-X?r=-e.top:e.top+e.height>-X+yt&&(r=-(e.top+e.height-yt)),W(0),Y(jt(r)[0])}}!function(t,e){var n=Object(s.useState)(),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],w=Object(s.useRef)(),x=Object(s.useRef)(0),S=Object(s.useRef)(!1),E=Object(s.useRef)(),C=Object(s.useRef)(null);C.current={onTouchStart:function(t){var e=t.touches[0],n=e.screenX,r=e.screenY;a({x:n,y:r}),window.clearInterval(w.current)},onTouchMove:function(t){if(o){t.preventDefault();var n=t.touches[0],r=n.screenX,i=n.screenY;a({x:r,y:i});var s=r-o.x,l=i-o.y;e(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(o&&(a(null),b(null),y)){var t=y.x/p,n=y.y/p,r=Math.abs(t),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=t,l=n;w.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(w.current):e(20*(s*=Ue),20*(l*=Ue))}),20)}},onWheel:function(t){var n=t.deltaX,r=t.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===E.current?n:r:o>a?(i=n,E.current="x"):(i=r,E.current="y");var s=Date.now();s-x.current>100&&(S.current=!1),(e(-i,-i)||S.current)&&(t.preventDefault(),S.current=!0),x.current=s}},s.useEffect((function(){function e(t){C.current.onTouchMove(t)}function n(t){C.current.onTouchEnd(t)}return document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),t.current.addEventListener("touchstart",(function(t){C.current.onTouchStart(t)}),{passive:!1}),t.current.addEventListener("wheel",(function(t){C.current.onWheel(t)})),function(){document.removeEventListener("touchmove",e),document.removeEventListener("touchend",n)}}),[])}(R,(function(t,e){var n=!1;function r(t,e){t((function(t){var r=jt(t+e),o=Object(i.a)(r,2),a=o[0],s=o[1];return n=s,a}))}if(H){if(pt>=Z)return n;r(W,t)}else{if(yt>=nt)return n;r(Y,e)}return Gt(),zt(),n})),Object(s.useEffect)((function(){return Gt(),Ut&&(Pt.current=window.setTimeout((function(){Ht(0)}),100)),Gt}),[Ut]);var Wt=function(t,e,n,r,i){var o,a,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(o="width",a=h?"right":"left",l=Math.abs(e.left)):(o="height",a="top",l=-e.top);var d=e[o],f=n[o],p=r[o],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var e=c.length,n=e,r=0;r<e;r+=1){var i=t.get(c[r].key)||w;if(i[a]+i[o]>l+m){n=r-1;break}}for(var s=0,u=e-1;u>=0;u-=1){if((t.get(c[u].key)||w)[a]<l){s=u+1;break}}return[s,n]}),[t,l,m,u,c.map((function(t){return t.key})).join("_"),h])}(It,{width:pt,height:yt,left:V,top:X},{width:at,height:ut},{width:St,height:_t},Object(a.a)(Object(a.a)({},t),{},{tabs:h})),Kt=Object(i.a)(Wt,2),qt=Kt[0],Xt=Kt[1],Yt=h.map((function(t){var e=t.key;return s.createElement(y,{id:x,prefixCls:u,key:e,rtl:C,tab:t,closable:t.closable,editable:_,active:e===E,tabPosition:O,tabBarGutter:A,renderWrapper:L,removeAriaLabel:null==T?void 0:T.removeAriaLabel,ref:B(e),onClick:function(t){D(e,t)},onRemove:function(){U(e)},onFocus:function(){Vt(e),zt(),C||(R.current.scrollLeft=0),R.current.scrollTop=0}})})),$t=g((function(){var t,e,n,r,i,o,a,s,l,c=(null===(t=R.current)||void 0===t?void 0:t.offsetWidth)||0,u=(null===(e=R.current)||void 0===e?void 0:e.offsetHeight)||0,d=(null===(n=j.current)||void 0===n?void 0:n.offsetWidth)||0,f=(null===(r=j.current)||void 0===r?void 0:r.offsetHeight)||0,p=(null===(i=N.current)||void 0===i?void 0:i.offsetWidth)||0,m=(null===(o=N.current)||void 0===o?void 0:o.offsetHeight)||0;mt(c),bt(u),Et(d),Tt(f);var g=((null===(a=M.current)||void 0===a?void 0:a.offsetWidth)||0)-d,v=((null===(s=M.current)||void 0===s?void 0:s.offsetHeight)||0)-f;Q(g),rt(v);var y=null===(l=N.current)||void 0===l?void 0:l.className.includes(Rt);st(g-(y?0:p)),ht(v-(y?0:m)),Dt((function(){var t=new Map;return h.forEach((function(e){var n=e.key,r=B(n).current;r&&t.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),t}))})),Jt=h.slice(0,qt),Zt=h.slice(Xt+1),Qt=[].concat(Object(d.a)(Jt),Object(d.a)(Zt)),te=Object(s.useState)(),ee=Object(i.a)(te,2),ne=ee[0],re=ee[1],ie=It.get(E),oe=Object(s.useRef)();function ae(){p.a.cancel(oe.current)}Object(s.useEffect)((function(){var t={};return ie&&(H?(C?t.right=ie.right:t.left=ie.left,t.width=ie.width):(t.top=ie.top,t.height=ie.height)),ae(),oe.current=p()((function(){re(t)})),ae}),[ie,H,C]),Object(s.useEffect)((function(){Vt()}),[E,ie,It,H]),Object(s.useEffect)((function(){$t()}),[C,A,E,h.map((function(t){return t.key})).join("_")]);var se,le,ce,ue,he=!!Qt.length,de="".concat(u,"-nav-wrap");return H?C?(le=V>0,se=V+pt<Z):(se=V<0,le=-V+pt<Z):(ce=X<0,ue=-X+yt<nt),s.createElement("div",{ref:e,role:"tablist",className:c()("".concat(u,"-nav"),f),style:v,onKeyDown:function(){zt()}},s.createElement(ze,{position:"left",extra:k,prefixCls:u}),s.createElement(m.a,{onResize:$t},s.createElement("div",{className:c()(de,(n={},Object(r.a)(n,"".concat(de,"-ping-left"),se),Object(r.a)(n,"".concat(de,"-ping-right"),le),Object(r.a)(n,"".concat(de,"-ping-top"),ce),Object(r.a)(n,"".concat(de,"-ping-bottom"),ue),n)),ref:R},s.createElement(m.a,{onResize:$t},s.createElement("div",{ref:M,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(V,"px, ").concat(X,"px)"),transition:Ut?"none":void 0}},Yt,s.createElement(Pe,{ref:j,prefixCls:u,locale:T,editable:_,style:{visibility:he?"hidden":null}}),s.createElement("div",{className:c()("".concat(u,"-ink-bar"),Object(r.a)({},"".concat(u,"-ink-bar-animated"),S.inkBar)),style:ne}))))),s.createElement(Fe,Object.assign({},t,{ref:N,prefixCls:u,tabs:Qt,className:!he&&Rt})),s.createElement(ze,{position:"right",extra:k,prefixCls:u}))}));function Ve(t){var e=t.id,n=t.activeKey,i=t.animated,o=t.tabPosition,a=t.rtl,l=t.destroyInactiveTabPane,u=s.useContext(Be),h=u.prefixCls,d=u.tabs,f=i.tabPane,p=d.findIndex((function(t){return t.key===n}));return s.createElement("div",{className:c()("".concat(h,"-content-holder"))},s.createElement("div",{className:c()("".concat(h,"-content"),"".concat(h,"-content-").concat(o),Object(r.a)({},"".concat(h,"-content-animated"),f)),style:p&&f?Object(r.a)({},a?"marginRight":"marginLeft","-".concat(p,"00%")):null},d.map((function(t){return s.cloneElement(t.node,{key:t.key,prefixCls:h,tabKey:t.key,id:e,animated:f,active:t.key===n,destroyInactiveTabPane:l})}))))}function We(t){var e=t.prefixCls,n=t.forceRender,r=t.className,o=t.style,l=t.id,u=t.active,h=t.animated,d=t.destroyInactiveTabPane,f=t.tabKey,p=t.children,m=s.useState(n),g=Object(i.a)(m,2),v=g[0],y=g[1];s.useEffect((function(){u?y(!0):d&&y(!1)}),[u,d]);var b={};return u||(h?(b.visibility="hidden",b.height=0,b.overflowY="hidden"):b.display="none"),s.createElement("div",{id:l&&"".concat(l,"-panel-").concat(f),role:"tabpanel",tabIndex:u?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(f),"aria-hidden":!u,style:Object(a.a)(Object(a.a)({},b),o),className:c()("".concat(e,"-tabpane"),u&&"".concat(e,"-tabpane-active"),r)},(u||v||n)&&p)}var Ke=0;var qe=s.forwardRef((function(t,e){var n,l,d=t.id,f=t.prefixCls,p=void 0===f?"rc-tabs":f,m=t.className,g=t.children,v=t.direction,y=t.activeKey,b=t.defaultActiveKey,w=t.editable,x=t.animated,S=t.tabPosition,E=void 0===S?"top":S,C=t.tabBarGutter,k=t.tabBarStyle,_=t.tabBarExtraContent,T=t.locale,O=t.moreIcon,A=t.moreTransitionName,L=t.destroyInactiveTabPane,D=t.renderTabBar,I=t.onChange,R=t.onTabClick,M=t.onTabScroll,N=Object(o.a)(t,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),j=function(t){return Object(u.a)(t).map((function(t){if(s.isValidElement(t)){var e=void 0!==t.key?String(t.key):void 0;return Object(a.a)(Object(a.a)({key:e},t.props),{},{node:t})}return null})).filter((function(t){return t}))}(g),P="rtl"===v;l=!1===x?{inkBar:!1,tabPane:!1}:Object(a.a)({inkBar:!0,tabPane:!1},!0!==x?x:null);var F=Object(s.useState)(!1),B=Object(i.a)(F,2),U=B[0],H=B[1];Object(s.useEffect)((function(){var t;H((t=navigator.userAgent||navigator.vendor||window.opera,!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.substr(0,4)))))}),[]);var z=Object(h.a)((function(){var t;return null===(t=j[0])||void 0===t?void 0:t.key}),{value:y,defaultValue:b}),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Object(s.useState)((function(){return j.findIndex((function(t){return t.key===V}))})),q=Object(i.a)(K,2),X=q[0],Y=q[1];Object(s.useEffect)((function(){var t,e=j.findIndex((function(t){return t.key===V}));-1===e&&(e=Math.max(0,Math.min(X,j.length-1)),W(null===(t=j[e])||void 0===t?void 0:t.key));Y(e)}),[j.map((function(t){return t.key})).join("_"),V,X]);var $=Object(h.a)(null,{value:d}),J=Object(i.a)($,2),Z=J[0],Q=J[1],tt=E;U&&!["left","right"].includes(E)&&(tt="top"),Object(s.useEffect)((function(){d||(Q("rc-tabs-".concat(Ke)),Ke+=1)}),[]);var et,nt={id:Z,activeKey:V,animated:l,tabPosition:tt,rtl:P,mobile:U},rt=Object(a.a)(Object(a.a)({},nt),{},{editable:w,locale:T,moreIcon:O,moreTransitionName:A,tabBarGutter:C,onTabClick:function(t,e){null==R||R(t,e),W(t),null==I||I(t)},onTabScroll:M,extra:_,style:k,panes:g});return et=D?D(rt,Ge):s.createElement(Ge,Object.assign({},rt)),s.createElement(Be.Provider,{value:{tabs:j,prefixCls:p}},s.createElement("div",Object.assign({ref:e,id:d,className:c()(p,"".concat(p,"-").concat(tt),(n={},Object(r.a)(n,"".concat(p,"-mobile"),U),Object(r.a)(n,"".concat(p,"-editable"),w),Object(r.a)(n,"".concat(p,"-rtl"),P),n),m)},N),et,s.createElement(Ve,Object.assign({destroyInactiveTabPane:L},nt,{animated:l}))))}));qe.TabPane=We;var Xe=qe;e.b=Xe},kSUc:
/*!***************************************************!*\
!*** ./src/components/markdown-editor/index.less ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},lOMy:
/*!****************************************************!*\
!*** ./src/components/tpi-code-setting/index.less ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},lPiR:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha256.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),l[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=0;f<64;f++){if(f<16)c[f]=0|t[e+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+w|0,a=o,o=i,i=r,r=w+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(u),e.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},lZu9:
/*!***********************************************************!*\
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";t.defineMode("markdown",(function(e,n){var r=t.getMode(e,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(t,e,n){return e.f=e.inline=n,n(t,e)}function v(t,e,n){return e.f=e.block=n,n(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==w){var n=i;if(!n){var o=t.innerMode(r,e.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(e.f=C,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(r,i){var a,d=r.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,w=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var E=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;E<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=E-i.listStack[i.listStack.length-1])}var C=!(m||y||i.prevLine.header||b&&v||i.prevLine.fencedCodeEnd),k=(!1===i.list||y||m)&&i.indentation<=w&&r.match(s),_=null;if(i.indentationDiff>=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,o.code;if(r.eatSpace())return null;if(d&&i.indentation<=w&&(_=r.match(u))&&_[1].length<=6)return i.quote=0,i.header=_[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,S(i);if(i.indentation<=w&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),S(i);if(!k&&!i.setext&&d&&i.indentation<=w&&(_=r.match(l))){var T=_[1]?"ol":"ul";return i.indentation=E+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),S(i)}return d&&i.indentation<=w&&(_=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(_[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(t.findModeByName){var r=t.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=t.getMode(e,n);return"null"==i.name?null:i}(_[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=t.startState(i.localMode)),i.f=i.block=x,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,S(i)):i.setext||!(C&&b||i.quote||!1!==i.list||i.code||k||p.test(r.string))&&(_=r.lookAhead(1))&&(_=_.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==_[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,S(i)):k?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===r.peek()?g(r,i,O):g(r,i,i.inline)}function w(e,n){var o=r.token(e,n.htmlState);if(!i){var a=t.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&e.current().indexOf(">")>-1)&&(n.f=C,n.block=b,n.htmlState=null)}return o}function x(t,e){var r,i=e.listStack[e.listStack.length-1]||0,a=e.indentation<i,s=i+3;return e.fencedEndRE&&e.indentation<=s&&(a||t.match(e.fencedEndRE))?(n.highlightFormatting&&(e.formatting="code-block"),a||(r=S(e)),e.localMode=e.localState=null,e.block=b,e.f=C,e.fencedEndRE=null,e.code=0,e.thisLine.fencedCodeEnd=!0,a?v(t,e,e.block):r):e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),o.code)}function S(t){var e=[];if(t.formatting){e.push(o.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var r=0;r<t.formatting.length;r++)e.push(o.formatting+"-"+t.formatting[r]),"header"===t.formatting[r]&&e.push(o.formatting+"-"+t.formatting[r]+"-"+t.header),"quote"===t.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(o.formatting+"-"+t.formatting[r]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(o.linkHref,"url"):(t.strong&&e.push(o.strong),t.em&&e.push(o.em),t.strikethrough&&e.push(o.strikethrough),t.emoji&&e.push(o.emoji),t.linkText&&e.push(o.linkText),t.code&&e.push(o.code),t.image&&e.push(o.image),t.imageAltText&&e.push(o.imageAltText,"link"),t.imageMarker&&e.push(o.imageMarker)),t.header&&e.push(o.header,o.header+"-"+t.header),t.quote&&(e.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(o.quote+"-"+t.quote):e.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var i=(t.listStack.length-1)%3;i?1===i?e.push(o.list2):e.push(o.list3):e.push(o.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function E(t,e){if(t.match(d,!0))return S(e)}function C(e,i){var a=i.text(e,i);if(void 0!==a)return a;if(i.list)return i.list=null,S(i);if(i.taskList)return" "===e.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,S(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),S(i);var s=e.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=S(i);return i.code=0,f}return i.formatting=h,S(i)}return i.code=d,S(i)}if(i.code)return S(i);if("\\"===s&&(e.next(),n.highlightFormatting)){var p=S(i),g=o.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("["===s&&i.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),S(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=S(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=_,p}if("["===s&&!i.image)return i.linkText&&e.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),S(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=S(i);return i.linkText=!1,i.inline=i.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?_:C,p}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=S(i))?p+=" ":p="",p+o.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=S(i))?p+=" ":p="",p+o.linkEmail;if(n.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=t.startState(r),v(e,i,w)}if(n.xml&&"<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,E=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(s);)x++;var T=e.peek()||" ",O=!/\s/.test(T)&&(!m.test(T)||/\s/.test(E)||m.test(E)),A=!/\s/.test(E)&&(!m.test(E)||/\s/.test(T)||m.test(T)),L=null,D=null;if(x%2&&(i.em||!O||"*"!==s&&A&&!m.test(E)?i.em!=s||!A||"*"!==s&&O&&!m.test(T)||(L=!1):L=!0),x>1&&(i.strong||!O||"*"!==s&&A&&!m.test(E)?i.strong!=s||!A||"*"!==s&&O&&!m.test(T)||(D=!1):D=!0),null!=D||null!=L)return n.highlightFormatting&&(i.formatting=null==L?"strong":null==D?"em":"strong em"),!0===L&&(i.em=s),!0===D&&(i.strong=s),f=S(i),!1===L&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return S(i);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=S(i),i.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),S(i)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return S(i);e.backUp(2)}if(n.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var I=S(i);return i.emoji=!1,I}return" "===s&&(e.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),S(i)}function k(t,e){if(">"===t.next()){e.f=e.inline=C,n.highlightFormatting&&(e.formatting="link");var r=S(e);return r?r+=" ":r="",r+o.linkInline}return t.match(/^[^>]+/,!0),o.linkInline}function _(t,e){if(t.eatSpace())return null;var r,i=t.next();return"("===i||"["===i?(e.f=e.inline=(r="("===i?")":"]",function(t,e){if(t.next()===r){e.f=e.inline=C,n.highlightFormatting&&(e.formatting="link-string");var i=S(e);return e.linkHref=!1,i}return t.match(T[r]),e.linkHref=!0,S(e)}),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,S(e)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function O(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=A,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,S(e)):g(t,e,C)}function A(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=L,n.highlightFormatting&&(e.formatting="link");var r=S(e);return e.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function L(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=C,o.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:C,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(r,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=w)){var n=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=n,e.indentationDiff=null,n>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==w?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:D}},indent:function(e,n,i){return e.block==w&&r.indent?r.indent(e.htmlState,n,i):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,n,i):t.Pass},blankLine:y,getType:S,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},mxV5:
/*!*****************************************************!*\
!*** ./node_modules/ali-oss/dist/aliyun-oss-sdk.js ***!
\*****************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,(function(t){return i(e[a][1][t]||t)}),c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";var r=t("./browser/client");r.Buffer=t("buffer").Buffer,r.urllib=t("../shims/xhr"),r.version=t("./browser/version").version,e.exports=r},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(t,e,n){(function(n,r){"use strict";var i=s(t("babel-runtime/core-js/promise")),o=s(t("babel-runtime/regenerator")),a=s(t("babel-runtime/core-js/object/assign"));function s(t){return t&&t.__esModule?t:{default:t}}var l=t("debug")("ali-oss"),c=t("copy-to"),u=t("xml2js"),h=t("agentkeepalive"),d=t("merge-descriptors"),f=t("url"),p=t("is-type-of"),m=t("platform"),g=t("utility"),v=t("urllib"),y=t("./version"),b=t("bowser"),w=t("../common/signUtils"),x=t("../common/utils/isIP").isIP,S=t("../common/client/initOptions"),E=t("../common/utils/createRequest").createRequest,C=new h;function k(t,e){var n,r;if(n=m.name,r=m.version,n&&n.toLowerCase&&"ie"===n.toLowerCase()&&r.split(".")[0]<10&&console.warn("ali-oss does not support the current browser"),!(this instanceof k))return new k(t,e);t&&t.inited?this.options=t:this.options=k.initOptions(t),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=v,this.agent=this.options.agent||C),this.ctx=e,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}e.exports=k,k.initOptions=function(t){t.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var e=(0,a.default)({secure:location&&"https:"===location.protocol,useFetch:!1},t);return S(e)};var _=k.prototype;_.debug=l,d(_,t("./object")),d(_,t("../common/bucket/getBucketWebsite")),d(_,t("../common/bucket/putBucketWebsite")),d(_,t("../common/bucket/deleteBucketWebsite")),d(_,t("../common/bucket/getBucketLifecycle")),d(_,t("../common/bucket/putBucketLifecycle")),d(_,t("../common/bucket/deleteBucketLifecycle")),d(_,t("../common/bucket/putBucketVersioning")),d(_,t("../common/bucket/getBucketVersioning")),d(_,t("./managed-upload")),d(_,t("../common/multipart")),d(_,t("../common/parallel")),_.signature=function(t){return this.debug("authorization stringToSign: %s",t,"info"),w.computeSignature(this.options.accessKeySecret,t)},_.authorization=function(t,e,n,r){var i=w.buildCanonicalString(t.toUpperCase(),e,{headers:r,parameters:n});return w.authorization(this.options.accessKeyId,this.options.accessKeySecret,i)},_.request=function(t){var e,n,r,i,a,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return e=E.call(this,t),this.options.useFetch||(e.params.mode="disable-fetch"),n=void 0,r=void 0,i=!!t.stream,l.prev=5,l.next=8,o.default.awrap(this.urllib.request(e.url,e.params));case 8:n=l.sent,this.debug("response %s %s, got %s, headers: %j",t.method,e.url,n.status,n.headers,"info"),l.next=15;break;case 12:l.prev=12,l.t0=l.catch(5),r=l.t0;case 15:if(a=void 0,!n||!t.successStatuses||-1!==t.successStatuses.indexOf(n.status)){l.next=28;break}return l.next=19,o.default.awrap(this.requestError(n));case 19:if("RequestTimeTooSkewed"!==(a=l.sent).code||i){l.next=25;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,l.next=24,o.default.awrap(this.request(t));case 24:return l.abrupt("return",l.sent);case 25:a.params=t,l.next=32;break;case 28:if(!r){l.next=32;break}return l.next=31,o.default.awrap(this.requestError(r));case 31:a=l.sent;case 32:if(!a){l.next=34;break}throw a;case 34:if(!t.xmlResponse){l.next=39;break}return l.next=37,o.default.awrap(this.parseXML(n.data));case 37:s=l.sent,n.data=s;case 39:return l.abrupt("return",n);case 40:case"end":return l.stop()}}),null,this,[[5,12]])},_._getResource=function(t){var e="/";return t.bucket&&(e+=t.bucket+"/"),t.object&&(e+=t.object),e},_._isIP=x,_._escape=function(t){return g.encodeURIComponent(t).replace(/%2F/g,"/")},_._getReqUrl=function(t){var e={};c(this.options.endpoint).to(e);var n=this._isIP(e.hostname),r=this.options.cname;!t.bucket||r||n||(e.host=t.bucket+"."+e.host);var i="/";t.bucket&&n&&(i+=t.bucket+"/"),t.object&&(i+=this._escape(t.object).replace(/\+/g,"%2B")),e.pathname=i;var o={};if(t.query&&d(o,t.query),t.subres){var a={};p.string(t.subres)?a[t.subres]="":p.array(t.subres)?t.subres.forEach((function(t){a[t]=""})):a=t.subres,d(o,a)}return e.query=o,f.format(e)},_._getUserAgent=function(){var t="aliyun-sdk-"+(r&&r.browser?"js":"nodejs")+"/"+y.version,e=m.description;return!e&&r&&(e="Node.js "+r.version.slice(1)+" on "+r.platform+" "+r.arch),this._checkUserAgent(t+" "+e)},_._checkUserAgent=function(t){return t.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},_.checkBrowserAndVersion=function(t,e){return b.name===t&&b.version.split(".")[0]===e},_.parseXML=function(t){return new i.default((function(e,r){n.isBuffer(t)&&(t=t.toString()),u.parseString(t,{explicitRoot:!1,explicitArray:!1},(function(t,n){t?r(t):e(n)}))}))},_.requestError=function(t){var e,n,r,i;return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(e=null,t.data&&t.data.length){a.next=5;break}-1===t.status||-2===t.status?((e=new Error(t.message)).name=t.name,e.status=t.status,e.code=t.name):(404===t.status?((e=new Error("Object not exists")).name="NoSuchKeyError",e.status=404,e.code="NoSuchKey"):412===t.status?((e=new Error("Pre condition failed")).name="PreconditionFailedError",e.status=412,e.code="PreconditionFailed"):((e=new Error("Unknow error, status: "+t.status)).name="UnknowError",e.status=t.status),e.requestId=t.headers["x-oss-request-id"],e.host=""),a.next=33;break;case 5:return n=String(t.data),this.debug("request response error data: %s",n,"error"),r=void 0,a.prev=8,a.next=11,o.default.awrap(this.parseXML(n));case 11:if(a.t0=a.sent,a.t0){a.next=14;break}a.t0={};case 14:r=a.t0,a.next=24;break;case 17:return a.prev=17,a.t1=a.catch(8),this.debug(n,"error"),a.t1.message+="\nraw xml: "+n,a.t1.status=t.status,a.t1.requestId=t.headers["x-oss-request-id"],a.abrupt("return",a.t1);case 24:i=r.Message||"unknow request error, status: "+t.status,r.Condition&&(i+=" (condition: "+r.Condition+")"),(e=new Error(i)).name=r.Code?r.Code+"Error":"UnknowError",e.status=t.status,e.code=r.Code,e.requestId=r.RequestId,e.hostId=r.HostId,e.serverTime=r.ServerTime;case 33:return this.debug("generate error %j",e,"error"),a.abrupt("return",e);case 35:case"end":return a.stop()}}),null,this,[[8,17]])}}).call(this,{isBuffer:t("../../node_modules/is-buffer/index.js")},t("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(t,e,n){(function(e){"use strict";var r=a(t("babel-runtime/core-js/array/from")),i=a(t("babel-runtime/core-js/promise")),o=a(t("babel-runtime/regenerator"));function a(t){return t&&t.__esModule?t:{default:t}}var s=t("is-type-of"),l=t("util"),c=t("path"),u=t("mime"),h=t("copy-to"),d=t("../common/utils/isBlob").isBlob,f=t("../common/utils/isFile").isFile,p=n;p.multipartUpload=function(t,e,n){var r,i,a,s,l,h,p,m,g;return o.default.async((function(v){for(;;)switch(v.prev=v.next){case 0:if(this.resetCancelFlag(),!(n=n||{}).checkpoint||!n.checkpoint.uploadId){v.next=6;break}return v.next=5,o.default.awrap(this._resumeMultipart(n.checkpoint,n));case 5:return v.abrupt("return",v.sent);case 6:return r=102400,n.mime||(f(e)?n.mime=u.getType(c.extname(e.name)):d(e)?n.mime=e.type:n.mime=u.getType(c.extname(e))),n.headers=n.headers||{},this._convertMetaToHeaders(n.meta,n.headers),v.next=12,o.default.awrap(this._getFileSize(e));case 12:if(!((i=v.sent)<r)){v.next=25;break}return a=this._createStream(e,0,i),n.contentLength=i,v.next=18,o.default.awrap(this.putStream(t,a,n));case 18:if(s=v.sent,!n||!n.progress){v.next=22;break}return v.next=22,o.default.awrap(n.progress(1));case 22:return l={res:s.res,bucket:this.options.bucket,name:t,etag:s.res.headers.etag},(n.headers&&n.headers["x-oss-callback"]||n.callback)&&(l.data=s.data),v.abrupt("return",l);case 25:if(!n.partSize||parseInt(n.partSize,10)===n.partSize){v.next=27;break}throw new Error("partSize must be int number");case 27:if(!(n.partSize&&n.partSize<r)){v.next=29;break}throw new Error("partSize must not be smaller than "+r);case 29:return v.next=31,o.default.awrap(this.initMultipartUpload(t,n));case 31:if(h=v.sent,p=h.uploadId,m=this._getPartSize(i,n.partSize),g={file:e,name:t,fileSize:i,partSize:m,uploadId:p,doneParts:[]},!n||!n.progress){v.next=38;break}return v.next=38,o.default.awrap(n.progress(0,g,h.res));case 38:return v.next=40,o.default.awrap(this._resumeMultipart(g,n));case 40:return v.abrupt("return",v.sent);case 41:case"end":return v.stop()}}),null,this)},p._resumeMultipart=function(t,e){var n,a,s,l,c,u,d,f,p,m,g,v,y,b,w,x,S;return o.default.async((function(E){for(;;)switch(E.prev=E.next){case 0:if(n=this,!this.isCancel()){E.next=3;break}throw this._makeCancelEvent();case 3:return a=t.file,s=t.fileSize,l=t.partSize,c=t.uploadId,u=t.doneParts,d=t.name,f=[],u.length>0&&h(u).to(f),p=this._divideParts(s,l),m=p.length,g=!1,v=function(n,r){var s=this;return new i.default((function(i,l){var f,v,y,b;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,n.isCancel()){s.next=18;break}return f=p[r-1],v={stream:n._createStream(a,f.start,f.end),size:f.end-f.start},s.next=6,o.default.awrap(n._uploadPart(d,c,r,v));case 6:if(y=s.sent,n.isCancel()||g){s.next=15;break}if(t.doneParts.push({number:r,etag:y.res.headers.etag}),!e.progress){s.next=12;break}return s.next=12,o.default.awrap(e.progress(u.length/m,t,y.res));case 12:i({number:r,etag:y.res.headers.etag}),s.next=16;break;case 15:i();case 16:s.next=19;break;case 18:i();case 19:s.next=30;break;case 21:s.prev=21,s.t0=s.catch(0),(b=new Error).name=s.t0.name,b.message=s.t0.message,b.stack=s.t0.stack,b.partNum=r,h(s.t0).to(b),l(b);case 30:case"end":return s.stop()}}),null,s,[[0,21]])}))},y=(0,r.default)(new Array(m),(function(t,e){return e+1})),b=f.map((function(t){return t.number})),w=y.filter((function(t){return b.indexOf(t)<0})),x=e.parallel||5,E.next=17,o.default.awrap(this._parallel(w,x,(function(t){return new i.default((function(e,r){v(n,t).then((function(t){t&&f.push(t),e()})).catch((function(t){r(t)}))}))})));case 17:if(S=E.sent,g=!0,!this.isCancel()){E.next=22;break}throw v=null,this._makeCancelEvent();case 22:if(!(S&&S.length>0)){E.next=25;break}throw S[0].message="Failed to upload some parts with error: "+S[0].toString()+" part_num: "+S[0].partNum,S[0];case 25:return E.next=27,o.default.awrap(this.completeMultipartUpload(d,c,f,e));case 27:return E.abrupt("return",E.sent);case 28:case"end":return E.stop()}}),null,this)},p._getFileSize=function(t){return o.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(!s.buffer(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!d(t)&&!f(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return e.stop()}}),null,this)};var m=t("stream").Readable;function g(t,e){if(!(this instanceof g))return new g(t,e);m.call(this,e),this.file=t,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(g,m),g.prototype.readFileAndPush=function(t){if(this.fileBuffer)for(var e=!0;e&&this.fileBuffer&&this.start<this.fileBuffer.length;){var n=this.start,r=n+t;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,e=this.push(this.fileBuffer.slice(n,r))}},g.prototype._read=function(t){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);t=t||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=e.from(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(t)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(t)},p._createStream=function(t,e,n){if(d(t)||f(t))return new g(t.slice(e,n));throw new Error("_createStream requires File/Blob.")},p._getPartSize=function(t,e){return e?Math.max(Math.ceil(t/1e4),e):1048576},p._divideParts=function(t,e){for(var n=Math.ceil(t/e),r=[],i=0;i<n;i++){var o=e*i,a=Math.min(o+e,t);r.push({start:o,end:a})}return r}}).call(this,t("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(t,e,n){"use strict";var r=s(t("babel-runtime/core-js/promise")),i=s(t("babel-runtime/core-js/object/keys")),o=s(t("babel-runtime/core-js/object/assign")),a=s(t("babel-runtime/regenerator"));function s(t){return t&&t.__esModule?t:{default:t}}var l=t("utility"),c=t("fs"),u=t("is-type-of"),h=t("url"),d=t("copy-to"),f=t("path"),p=t("mime"),m=t("../common/callback"),g=t("../common/signUtils"),v=t("merge-descriptors"),y=t("../common/utils/isBlob").isBlob,b=t("../common/utils/isFile").isFile,w=n;w.append=function(t,e,n){var r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return void 0===(n=n||{}).position&&(n.position="0"),n.subres={append:"",position:n.position},n.method="POST",i.next=6,a.default.awrap(this.put(t,e,n));case 6:return(r=i.sent).nextAppendPosition=r.res.headers["x-oss-next-append-position"],i.abrupt("return",r);case 9:case"end":return i.stop()}}),null,this)},w.put=function(t,e,n){var r,i,o,s,l,c,h;return a.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(r=void 0,n=n||{},t=this._objectName(t),!u.buffer(e)){d.next=7;break}r=e,d.next=33;break;case 7:if(!y(e)&&!b(e)){d.next=32;break}return n.mime||(b(e)?n.mime=p.getType(f.extname(e.name)):n.mime=e.type),i=this._createStream(e,0,e.size),d.next=12,a.default.awrap(this._getFileSize(e));case 12:return n.contentLength=d.sent,d.prev=13,d.next=16,a.default.awrap(this.putStream(t,i,n));case 16:return o=d.sent,d.abrupt("return",o);case 20:if(d.prev=20,d.t0=d.catch(13),"RequestTimeTooSkewed"!==d.t0.code){d.next=29;break}return this.options.amendTimeSkewed=+new Date(d.t0.serverTime)-new Date,d.next=26,a.default.awrap(this.put(t,e,n));case 26:return d.abrupt("return",d.sent);case 29:throw d.t0;case 30:d.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return n.headers=n.headers||{},this._convertMetaToHeaders(n.meta,n.headers),s=n.method||"PUT",l=this._objectRequestParams(s,t,n),m.encodeCallback(l,n),l.mime=n.mime,l.content=r,l.successStatuses=[200],d.next=43,a.default.awrap(this.request(l));case 43:return c=d.sent,h={name:t,url:this._objectUrl(t),res:c.res},l.headers&&l.headers["x-oss-callback"]&&(h.data=JSON.parse(c.data.toString())),d.abrupt("return",h);case 47:case"end":return d.stop()}}),null,this,[[13,20]])},w.putStream=function(t,e,n){var r,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(n=n||{}).headers=n.headers||{},t=this._objectName(t),n.contentLength?n.headers["Content-Length"]=n.contentLength:n.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(n.meta,n.headers),r=n.method||"PUT",i=this._objectRequestParams(r,t,n),m.encodeCallback(i,n),i.mime=n.mime,i.stream=e,i.successStatuses=[200],l.next=13,a.default.awrap(this.request(i));case 13:return o=l.sent,s={name:t,url:this._objectUrl(t),res:o.res},i.headers&&i.headers["x-oss-callback"]&&(s.data=JSON.parse(o.data.toString())),l.abrupt("return",s);case 17:case"end":return l.stop()}}),null,this)},v(w,t("../common/object/copyObject")),v(w,t("../common/object/getObjectTagging")),v(w,t("../common/object/putObjectTagging")),v(w,t("../common/object/deleteObjectTagging")),v(w,t("../common/image")),v(w,t("../common/object/getBucketVersions")),v(w,t("../common/object/getACL")),v(w,t("../common/object/putACL")),v(w,t("../common/object/head")),v(w,t("../common/object/delete")),v(w,t("../common/object/get")),v(w,t("../common/object/putSymlink")),v(w,t("../common/object/getSymlink")),v(w,t("../common/object/deleteMulti")),v(w,t("../common/object/getObjectMeta")),w.putMeta=function(t,e,n){var r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,a.default.awrap(this.copy(t,t,{meta:e||{},timeout:n&&n.timeout,ctx:n&&n.ctx}));case 2:return r=i.sent,i.abrupt("return",r);case 4:case"end":return i.stop()}}),null,this)},w.list=function(t,e){var n,r,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(n=this._objectRequestParams("GET","",e)).query=t,n.xmlResponse=!0,n.successStatuses=[200],l.next=6,a.default.awrap(this.request(n));case 6:return r=l.sent,i=r.data.Contents,o=this,i&&(Array.isArray(i)||(i=[i]),i=i.map((function(t){return{name:t.Key,url:o._objectUrl(t.Key),lastModified:t.LastModified,etag:t.ETag,type:t.Type,size:Number(t.Size),storageClass:t.StorageClass,owner:{id:t.Owner.ID,displayName:t.Owner.DisplayName}}}))),(s=r.data.CommonPrefixes||null)&&(Array.isArray(s)||(s=[s]),s=s.map((function(t){return t.Prefix}))),l.abrupt("return",{res:r.res,objects:i,prefixes:s,nextMarker:r.data.NextMarker||null,isTruncated:"true"===r.data.IsTruncated});case 13:case"end":return l.stop()}}),null,this)},w.restore=function(t,e){var n,r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return(e=e||{}).subres=(0,o.default)({restore:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),(n=this._objectRequestParams("POST",t,e)).successStatuses=[202],i.next=7,a.default.awrap(this.request(n));case 7:return r=i.sent,i.abrupt("return",{res:r.res});case 9:case"end":return i.stop()}}),null,this)},w.signatureUrl=function(t,e){e=e||{},t=this._objectName(t),e.method=e.method||"GET";var n=l.timestamp()+(e.expires||1800),r={bucket:this.options.bucket,object:t},i=this._getResource(r);this.options.stsToken&&(e["security-token"]=this.options.stsToken);var o=g._signatureForURL(this.options.accessKeySecret,e,i,n),a=h.parse(this._getReqUrl(r));return a.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:o.Signature},d(o.subResource).to(a.query),a.format()},w.getObjectUrl=function(t,e){return e?"/"!==e[e.length-1]&&(e+="/"):e=this.options.endpoint.format(),e+this._escape(this._objectName(t))},w._objectUrl=function(t){return this._getReqUrl({bucket:this.options.bucket,object:t})},w.generateObjectUrl=function(t,e){if(e)"/"!==e[e.length-1]&&(e+="/");else{e=this.options.endpoint.format();var n=h.parse(e),r=this.options.bucket;n.hostname=r+"."+n.hostname,n.host=r+"."+n.host,e=n.format()}return e+this._escape(this._objectName(t))},w._objectRequestParams=function(t,e,n){if(!this.options.bucket)throw new Error("Please create a bucket first");n=n||{};var r={object:e=this._objectName(e),bucket:this.options.bucket,method:t,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(r.headers={},d(n.headers).to(r.headers)),r},w._objectName=function(t){return t.replace(/^\/+/,"")},w._convertMetaToHeaders=function(t,e){t&&(0,i.default)(t).forEach((function(n){e["x-oss-meta-"+n]=t[n]}))},w._deleteFileSafe=function(t){var e=this;return new r.default((function(n){c.exists(t,(function(r){r?c.unlink(t,(function(r){r&&e.debug("unlink %j error: %s",t,r,"error"),n()})):n()}))}))}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(t,e,n){"use strict";n.version="6.10.0"},{}],6:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName;n.deleteBucketLifecycle=function(t,e){var n,r;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(t),(n=this._bucketRequestParams("DELETE",t,"lifecycle",e)).successStatuses=[204],i.next=5,o.default.awrap(this.request(n));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName;n.deleteBucketWebsite=function(t,e){var n,r;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(t),(n=this._bucketRequestParams("DELETE",t,"website",e)).successStatuses=[204],i.next=5,o.default.awrap(this.request(n));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("../utils/isArray").isArray,l=t("../utils/formatObjKey").formatObjKey;n.getBucketLifecycle=function(t,e){var n,r,i;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return a(t),(n=this._bucketRequestParams("GET",t,"lifecycle",e)).successStatuses=[200],n.xmlResponse=!0,c.next=6,o.default.awrap(this.request(n));case 6:return r=c.sent,(i=r.data.Rule||null)&&(s(i)||(i=[i]),i=i.map((function(t){return t.ID&&(t.id=t.ID,delete t.ID),t.Tag&&!s(t.Tag)&&(t.Tag=[t.Tag]),l(t,"firstLowerCase")}))),c.abrupt("return",{rules:i,res:r.res});case 10:case"end":return c.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName;n.getBucketVersioning=function(t,e){var n,r,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a(t),(n=this._bucketRequestParams("GET",t,"versioning",e)).xmlResponse=!0,n.successStatuses=[200],s.next=6,o.default.awrap(this.request(n));case 6:return r=s.sent,i=r.data.Status,s.abrupt("return",{status:r.status,versionStatus:i,res:r.res});case 9:case"end":return s.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("../utils/isObject").isObject;n.getBucketWebsite=function(t,e){var n,r,i;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return a(t),(n=this._bucketRequestParams("GET",t,"website",e)).successStatuses=[200],n.xmlResponse=!0,l.next=6,o.default.awrap(this.request(n));case 6:return r=l.sent,i=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(i=s(r.data.RoutingRules.RoutingRule)?[r.data.RoutingRules.RoutingRule]:r.data.RoutingRules.RoutingRule),l.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:i,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return l.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("../utils/isArray").isArray,l=t("../utils/deepCopy").deepCopy,c=t("../utils/isObject").isObject,u=t("../utils/obj2xml").obj2xml,h=t("../utils/checkObjectTag").checkObjectTag,d=t("../utils/getStrBytesCount").getStrBytesCount;function f(t){t.days&&(t.expiration={days:t.days}),t.date&&(t.expiration={createdBeforeDate:t.date})}function p(t,e){var n=t.days,r=t.createdBeforeDate;if(!n&&!r)throw new Error(e+" must includes days or createdBeforeDate");if(n&&!/^[1-9][0-9]*$/.test(n))throw new Error("days must be a positive integer");if(r&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(r))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function m(t){if(t.id&&d(t.id)>255)throw new Error("ID is composed of 255 bytes at most");if(""===t.prefix||void 0===t.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(t.status))throw new Error("Status must be Enabled or Disabled");if(t.transition){if(!["IA","Archive"].includes(t.transition.storageClass))throw new Error("StorageClass must be IA or Archive");p(t.transition,"Transition")}if(t.expiration)if(t.expiration.expiredObjectDeleteMarker){if(t.expiration.days||t.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else p(t.expiration,"Expiration");if(t.abortMultipartUpload&&p(t.abortMultipartUpload,"AbortMultipartUpload"),!(t.expiration||t.abortMultipartUpload||t.transition||t.noncurrentVersionTransition))throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(t.tag){if(t.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");!function(t){if(!s(t)&&!c(t))throw new Error("tag must be Object or Array");t=c(t)?[t]:t;var e={};l(t).forEach((function(t){e[t.key]=t.value})),h(e)}(t.tag)}}n.putBucketLifecycle=function(t,e,n){var r,i,l,c,h;return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(t),s(e)){d.next=3;break}throw new Error("rules must be Array");case 3:return r=this._bucketRequestParams("PUT",t,"lifecycle",n),l={LifecycleConfiguration:{Rule:i=[]}},e.forEach((function(t){f(t),m(t),t.id&&(t.ID=t.id,delete t.id),i.push(t)})),c=u(l,{headers:!0,firstUpperCase:!0}),r.content=c,r.mime="xml",r.successStatuses=[200],d.next=13,o.default.awrap(this.request(r));case 13:return h=d.sent,d.abrupt("return",{res:h.res});case 15:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("../utils/obj2xml").obj2xml;n.putBucketVersioning=function(t,e){var n,r,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(a(t),["Enabled","Suspended"].includes(e)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return n=this._bucketRequestParams("PUT",t,"versioning",l),r={VersioningConfiguration:{Status:e}},n.mime="xml",n.content=s(r,{headers:!0}),c.next=9,o.default.awrap(this.request(n));case 9:return i=c.sent,c.abrupt("return",{res:i.res,status:i.status});case 11:case"end":return c.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("../utils/obj2xml").obj2xml,l=t("../utils/isArray").isArray;n.putBucketWebsite=function(t){var e,n,r,i,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=arguments[2];return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(t),e=this._bucketRequestParams("PUT",t,"website",h),n={Suffix:u.index||"index.html"},i={WebsiteConfiguration:r={IndexDocument:n}},u.supportSubDir&&(n.SupportSubDir=u.supportSubDir),u.type&&(n.Type=u.type),u.error&&(r.ErrorDocument={Key:u.error}),void 0===u.routingRules){d.next=12;break}if(l(u.routingRules)){d.next=11;break}throw new Error("RoutingRules must be Array");case 11:r.RoutingRules={RoutingRule:u.routingRules};case 12:return i=s(i),e.content=i,e.mime="xml",e.successStatuses=[200],d.next=18,o.default.awrap(this.request(e));case 18:return c=d.sent,d.abrupt("return",{res:c.res});case 20:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(t,e,n){(function(e){"use strict";var r=o(t("babel-runtime/core-js/object/keys")),i=o(t("babel-runtime/core-js/json/stringify"));function o(t){return t&&t.__esModule?t:{default:t}}n.encodeCallback=function(t,n){if(t.headers=t.headers||{},!Object.prototype.hasOwnProperty.call(t.headers,"x-oss-callback")&&n.callback){var o={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(o.callbackHost=n.callback.host),n.callback.contentType&&(o.callbackBodyType=n.callback.contentType);var a=e.from((0,i.default)(o)).toString("base64");if(t.headers["x-oss-callback"]=a,n.callback.customValue){var s={};(0,r.default)(n.callback.customValue).forEach((function(t){s["x:"+t]=n.callback.customValue[t]})),t.headers["x-oss-callback-var"]=e.from((0,i.default)(s)).toString("base64")}}}}).call(this,t("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r},a=t("humanize-ms"),s=t("url"),l=t("../utils/checkBucketName").checkBucketName;e.exports=function(t){if(!t||!t.accessKeyId||!t.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");t.bucket&&l(t.bucket);var e,n,r,i,c,u=(0,o.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},t);if(u.accessKeyId=u.accessKeyId.trim(),u.accessKeySecret=u.accessKeySecret.trim(),u.timeout&&(u.timeout=a(u.timeout)),u.endpoint)u.endpoint=function(t,e){var n=s.parse(t);if(n.protocol||(n=s.parse("http"+(e?"s":"")+"://"+t)),"http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}(u.endpoint,u.secure);else{if(!u.region)throw new Error("require options.endpoint or options.region");u.endpoint=(e=u.region,n=u.internal,r=u.secure,i=r?"https://":"http://",c=n?"-internal.aliyuncs.com":".aliyuncs.com","vpc100-oss-cn-"===e.substr(0,"vpc100-oss-cn-".length)&&(c=".aliyuncs.com"),s.parse(i+e+c))}return u.inited=!0,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(t,e,n){"use strict";t("merge-descriptors")(n,t("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("../utils/checkBucketName").checkBucketName,s=t("querystring"),l=t("js-base64").Base64.encode;function c(t,e){if(!t)throw new Error(e+" is required");if("string"!=typeof t)throw new Error(e+" must be String")}n.processObjectSave=function(t,e,n,r){var i,u,h,d;return o.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:return c(t,"sourceObject"),c(e,"targetObject"),c(n,"process"),e=this._objectName(e),r&&a(r),i=this._objectRequestParams("POST",t,{subres:"x-oss-process"}),u=r?",b_"+l(r):"",e=l(e),h={"x-oss-process":n+"|sys/saveas,o_"+e+u},i.content=s.stringify(h),f.next=12,o.default.awrap(this.request(i));case 12:return d=f.sent,f.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return f.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(t,e,n){"use strict";var r,i=t("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=t("copy-to"),s=t("./callback"),l=t("./utils/deepCopy").deepCopy,c=n;c.listUploads=function(t,e){var n,r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return n={},a(e=e||{}).to(n),n.subres="uploads",(r=this._objectRequestParams("GET","",n)).query=t,r.xmlResponse=!0,r.successStatuses=[200],l.next=10,o.default.awrap(this.request(r));case 10:return i=l.sent,s=i.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map((function(t){return{name:t.Key,uploadId:t.UploadId,initiated:t.Initiated}})),l.abrupt("return",{res:i.res,uploads:s,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:"true"===i.data.IsTruncated});case 15:case"end":return l.stop()}}),null,this)},c.listParts=function(t,e,n,r){var i,s,l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return i={},a(r=r||{}).to(i),i.subres={uploadId:e},(s=this._objectRequestParams("GET",t,i)).query=n,s.xmlResponse=!0,s.successStatuses=[200],c.next=10,o.default.awrap(this.request(s));case 10:return l=c.sent,c.abrupt("return",{res:l.res,uploadId:l.data.UploadId,bucket:l.data.Bucket,name:l.data.Key,partNumberMarker:l.data.PartNumberMarker,nextPartNumberMarker:l.data.NextPartNumberMarker,maxParts:l.data.MaxParts,isTruncated:l.data.IsTruncated,parts:l.data.Part||[]});case 12:case"end":return c.stop()}}),null,this)},c.abortMultipartUpload=function(t,e,n){var r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),r={},a(n=n||{}).to(r),r.subres={uploadId:e},(i=this._objectRequestParams("DELETE",t,r)).successStatuses=[204],l.next=9,o.default.awrap(this.request(i));case 9:return s=l.sent,l.abrupt("return",{res:s.res});case 11:case"end":return l.stop()}}),null,this)},c.initMultipartUpload=function(t,e){var n,r,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n={},a(e=e||{}).to(n),n.headers=n.headers||{},this._convertMetaToHeaders(e.meta,n.headers),n.subres="uploads",(r=this._objectRequestParams("POST",t,n)).mime=e.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,o.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}}),null,this)},c.uploadPart=function(t,e,n,r,i,a,s){var l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return l={stream:this._createStream(r,i,a),size:a-i},c.next=3,o.default.awrap(this._uploadPart(t,e,n,l,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}}),null,this)},c.completeMultipartUpload=function(t,e,n,r){var i,a,c,u,h,d,f,p;return o.default.async((function(m){for(;;)switch(m.prev=m.next){case 0:for(i=n.concat().sort((function(t,e){return t.number-e.number})).filter((function(t,e,n){return!e||t.number!==n[e-1].number})),a='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',c=0;c<i.length;c++)u=i[c],a+="<Part>\n",a+="<PartNumber>"+u.number+"</PartNumber>\n",a+="<ETag>"+u.etag+"</ETag>\n",a+="</Part>\n";return a+="</CompleteMultipartUpload>",h={},(h=l(r=r||{})).headers&&delete h.headers["x-oss-server-side-encryption"],h.subres={uploadId:e},d=this._objectRequestParams("POST",t,h),s.encodeCallback(d,h),d.mime="xml",d.content=a,d.headers&&d.headers["x-oss-callback"]||(d.xmlResponse=!0),d.successStatuses=[200],m.next=17,o.default.awrap(this.request(d));case 17:return f=m.sent,p={res:f.res,bucket:d.bucket,name:t,etag:f.res.headers.etag},d.headers&&d.headers["x-oss-callback"]&&(p.data=JSON.parse(f.data.toString())),m.abrupt("return",p);case 21:case"end":return m.stop()}}),null,this)},c._uploadPart=function(t,e,n,r,i){var s,l,c;return o.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return s={},a(i=i||{}).to(s),s.headers={"Content-Length":r.size},s.subres={partNumber:n,uploadId:e},(l=this._objectRequestParams("PUT",t,s)).mime=s.mime,l.stream=r.stream,l.successStatuses=[200],u.next=11,o.default.awrap(this.request(l));case 11:if((c=u.sent).res.headers.etag){u.next=14;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 14:return r.stream=null,l.stream=null,u.abrupt("return",{name:t,etag:c.res.headers.etag,res:c.res});case 17:case"end":return u.stop()}}),null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(t,e,n){"use strict";var r=a(t("babel-runtime/regenerator")),i=a(t("babel-runtime/core-js/object/keys")),o=a(t("babel-runtime/helpers/typeof"));function a(t){return t&&t.__esModule?t:{default:t}}var s=t("../utils/checkBucketName").checkBucketName,l=n;l.copy=function(t,e,n,a){var s,l,c;return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return"object"===(void 0===n?"undefined":(0,o.default)(n))&&(a=n),(a=a||{}).headers=a.headers||{},(0,i.default)(a.headers).forEach((function(t){a.headers["x-oss-copy-source-"+t.toLowerCase()]=a.headers[t]})),a.meta&&(a.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(a.meta,a.headers),e=this._getSourceName(e,n),a.versionId&&(e=e+"?versionId="+a.versionId),a.headers["x-oss-copy-source"]=e,(s=this._objectRequestParams("PUT",t,a)).xmlResponse=!0,s.successStatuses=[200,304],u.next=14,r.default.awrap(this.request(s));case 14:return l=u.sent,(c=l.data)&&(c={etag:c.ETag,lastModified:c.LastModified}),u.abrupt("return",{data:c,res:l.res});case 18:case"end":return u.stop()}}),null,this)},l._getSourceName=function(t,e){return"string"==typeof e?t=this._objectName(t):"/"!==t[0]?e=this.options.bucket:(e=t.replace(/\/(.+?)(\/.*)/,"$1"),t=t.replace(/(\/.+?\/)(.*)/,"$2")),s(e),t="/"+e+"/"+(t=encodeURI(t))}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.delete=function(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),(e=this._objectRequestParams("DELETE",t,o)).successStatuses=[204],a.next=6,r.default.awrap(this.request(e));case 6:return n=a.sent,a.abrupt("return",{res:n.res});case 8:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}var a=t("utility"),s=t("../utils/obj2xml").obj2xml;n.deleteMulti=function(t){var e,n,o,l,c,u,h,d,f,p,m,g,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(y){for(;;)switch(y.prev=y.next){case 0:if(e=[],t&&t.length){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n<t.length;n++)o={},"string"==typeof t[n]?o.Key=a.escape(this._objectName(t[n])):(l=t[n],c=l.key,u=l.versionId,o.Key=a.escape(this._objectName(c)),o.VersionId=u),e.push(o);return h={Delete:{Quiet:!!v.quiet,Object:e}},d=s(h,{headers:!0}),v.subres=(0,i.default)({delete:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),(f=this._objectRequestParams("POST","",v)).mime="xml",f.content=d,f.xmlResponse=!0,f.successStatuses=[200],y.next=15,r.default.awrap(this.request(f));case 15:return p=y.sent,m=p.data,(g=m&&m.Deleted||null)&&(Array.isArray(g)||(g=[g])),y.abrupt("return",{res:p.res,deleted:g||[]});case 20:case"end":return y.stop()}}),null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.deleteObjectTagging=function(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),t=this._objectName(t),(e=this._objectRequestParams("DELETE",t,o)).successStatuses=[204],a.next=7,r.default.awrap(this.request(e));case 7:return n=a.sent,a.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}var a=t("fs"),s=t("is-type-of");n.get=function(t,e){var n,o,l,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return n=null,o=!1,s.writableStream(e)?n=e:s.string(e)?(n=a.createWriteStream(e),o=!0):u=e,(u=u||{}).subres=(0,i.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),l=void 0,h.prev=8,(c=this._objectRequestParams("GET",t,u)).writeStream=n,c.successStatuses=[200,206,304],h.next=14,r.default.awrap(this.request(c));case 14:l=h.sent,o&&n.destroy(),h.next=25;break;case 18:if(h.prev=18,h.t0=h.catch(8),!o){h.next=24;break}return n.destroy(),h.next=24,r.default.awrap(this._deleteFileSafe(e));case 24:throw h.t0;case 25:return h.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return h.stop()}}),null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.getACL=function(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),t=this._objectName(t),(e=this._objectRequestParams("GET",t,o)).successStatuses=[200],e.xmlResponse=!0,a.next=8,r.default.awrap(this.request(e));case 8:return n=a.sent,a.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(t,e,n){"use strict";var r=a(t("babel-runtime/core-js/object/keys")),i=a(t("babel-runtime/regenerator")),o=a(t("babel-runtime/core-js/object/assign"));function a(t){return t&&t.__esModule?t:{default:t}}var s=n,l=t("../utils/isObject").isObject,c=t("../utils/isArray").isArray;function u(){var t,e,n,r,a,s,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(!l.versionIdMarker||void 0!==l.keyMarker){h.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return u.subres=(0,o.default)({versions:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),(t=this._objectRequestParams("GET","",u)).xmlResponse=!0,t.successStatuses=[200],t.query=d(l),h.next=10,i.default.awrap(this.request(t));case 10:return e=h.sent,n=e.data.Version||[],r=e.data.DeleteMarker||[],a=this,n&&(Array.isArray(n)||(n=[n]),n=n.map((function(t){return{name:t.Key,url:a._objectUrl(t.Key),lastModified:t.LastModified,isLatest:"true"===t.IsLatest,versionId:t.VersionId,etag:t.ETag,type:t.Type,size:Number(t.Size),storageClass:t.StorageClass,owner:{id:t.Owner.ID,displayName:t.Owner.DisplayName}}}))),r&&(c(r)||(r=[r]),r=r.map((function(t){return{name:t.Key,lastModified:t.LastModified,versionId:t.VersionId,owner:{id:t.Owner.ID,displayName:t.Owner.DisplayName}}}))),(s=e.data.CommonPrefixes||null)&&(c(s)||(s=[s]),s=s.map((function(t){return t.Prefix}))),h.abrupt("return",{res:e.res,objects:n,deleteMarker:r,prefixes:s,nextMarker:e.data.NextMarker||null,NextVersionIdMarker:e.data.NextVersionIdMarker||null,isTruncated:"true"===e.data.IsTruncated});case 19:case"end":return h.stop()}}),null,this)}function h(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};return l(t)&&(0,r.default)(t).forEach((function(n){e[h(n)]=t[n]})),e}s.getBucketVersions=u,s.listObjectVersions=u},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.getObjectMeta=function(t,e){var n,o;return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return e=e||{},t=this._objectName(t),e.subres=(0,i.default)({objectMeta:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),(n=this._objectRequestParams("HEAD",t,e)).successStatuses=[200],a.next=8,r.default.awrap(this.request(n));case 8:return o=a.sent,a.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}var a=n,s=t("../utils/isObject").isObject;a.getObjectTagging=function(t){var e,n,o,a,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return c.subres=(0,i.default)({tagging:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),t=this._objectName(t),(e=this._objectRequestParams("GET",t,c)).successStatuses=[200],u.next=7,r.default.awrap(this.request(e));case 7:return n=u.sent,u.next=10,r.default.awrap(this.parseXML(n.data));case 10:return o=u.sent,a=(a=o.TagSet.Tag)&&s(a)?[a]:a||[],l={},a.forEach((function(t){l[t.Key]=t.Value})),u.abrupt("return",{status:n.status,res:n.res,tag:l});case 16:case"end":return u.stop()}}),null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.getSymlink=function(t){var e,n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a.subres=(0,i.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),t=this._objectName(t),(e=this._objectRequestParams("GET",t,a)).successStatuses=[200],s.next=7,r.default.awrap(this.request(e));case 7:return n=s.sent,o=n.res.headers["x-oss-symlink-target"],s.abrupt("return",{targetName:decodeURIComponent(o),res:n.res});case 10:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(t,e,n){"use strict";var r=a(t("babel-runtime/regenerator")),i=a(t("babel-runtime/core-js/object/keys")),o=a(t("babel-runtime/core-js/object/assign"));function a(t){return t&&t.__esModule?t:{default:t}}n.head=function(t){var e,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return s.subres=(0,o.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),(e=this._objectRequestParams("HEAD",t,s)).successStatuses=[200,304],l.next=6,r.default.awrap(this.request(e));case 6:return n=l.sent,a={meta:null,res:n.res,status:n.status},200===n.status&&(0,i.default)(n.headers).forEach((function(t){0===t.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[t.substring(11)]=n.headers[t])})),l.abrupt("return",a);case 10:case"end":return l.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.putACL=function(t,e,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).subres=(0,i.default)({acl:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.headers=n.headers||{},n.headers["x-oss-object-acl"]=e,t=this._objectName(t),(o=this._objectRequestParams("PUT",t,n)).successStatuses=[200],s.next=10,r.default.awrap(this.request(o));case 10:return a=s.sent,s.abrupt("return",{res:a.res});case 12:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(t,e,n){"use strict";var r=a(t("babel-runtime/regenerator")),i=a(t("babel-runtime/core-js/object/keys")),o=a(t("babel-runtime/core-js/object/assign"));function a(t){return t&&t.__esModule?t:{default:t}}var s=t("../utils/obj2xml").obj2xml,l=t("../utils/checkObjectTag").checkObjectTag;n.putObjectTagging=function(t,e){var n,a,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return l(e),u.subres=(0,o.default)({tagging:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),t=this._objectName(t),(n=this._objectRequestParams("PUT",t,u)).successStatuses=[200],e=(0,i.default)(e).map((function(t){return{Key:t,Value:e[t]}})),a={Tagging:{TagSet:{Tag:e}}},n.mime="xml",n.content=s(a),h.next=12,r.default.awrap(this.request(n));case 12:return c=h.sent,h.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return h.stop()}}),null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/object/assign"));function o(t){return t&&t.__esModule?t:{default:t}}n.putSymlink=function(t,e,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).headers=n.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(n.meta,n.headers),n.headers["x-oss-symlink-target"]=e,n.subres=(0,i.default)({symlink:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.storageClass&&(n.headers["x-oss-storage-class"]=n.storageClass),t=this._objectName(t),(o=this._objectRequestParams("PUT",t,n)).successStatuses=[200],s.next=13,r.default.awrap(this.request(o));case 13:return a=s.sent,s.abrupt("return",{res:a.res});case 15:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(t,e,n){"use strict";var r=o(t("babel-runtime/regenerator")),i=o(t("babel-runtime/core-js/promise"));function o(t){return t&&t.__esModule?t:{default:t}}var a=n;a._parallelNode=function(t,e,n,o){var a,s,l,c,u,h,d,f;return r.default.async((function(p){for(;;)switch(p.prev=p.next){case 0:a=this,s=[],l=[],c=t.length/e,u=t.length%e,h=0===u?c:(t.length-u)/e+1,d=1,f=0;case 8:if(!(f<t.length)){p.next=26;break}if(!a.isCancel()){p.next=11;break}return p.abrupt("break",26);case 11:if(o?l.push(n(a,t[f],o)):l.push(n(a,t[f])),l.length!==e&&(d!==h||f!==t.length-1)){p.next=23;break}return p.prev=13,d+=1,p.next=17,r.default.awrap(i.default.all(l));case 17:p.next=22;break;case 19:p.prev=19,p.t0=p.catch(13),s.push(p.t0);case 22:l=[];case 23:f++,p.next=8;break;case 26:return p.abrupt("return",s);case 27:case"end":return p.stop()}}),null,this,[[13,19]])},a._parallel=function(t,e,n){var r=this;return new i.default((function(i){var o=[];if(e<=0||!t)i(o);else{var a,s,l,c=(s=-1,l=(a=t).length,function(){return++s<l&&!r.isCancel()?{value:a[s],key:s}:null}),u=!1,h=0,d=!1;g()}function f(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null;for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}function p(t,e){h-=1,t?(u=!0,o.push(t),i(o)):e==={}||u&&h<=0?(u=!0,i(o)):d||(r.isCancel()?i(o):g())}function m(t,e){n(t).then((function(t){e(null,t)})).catch((function(t){e(t)}))}function g(){for(d=!0;h<e&&!u&&!r.isCancel();){var t=c();if(null===t||o.length>0)return u=!0,void(h<=0&&i(o));h+=1,m(t.value,f(p))}d=!1}}))},a.cancel=function(t){this.options.cancelFlag=!0,t&&this.abortMultipartUpload(t.name,t.uploadId,t.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(t,e,n){(function(e){"use strict";var r=o(t("babel-runtime/core-js/json/stringify")),i=o(t("babel-runtime/core-js/object/keys"));function o(t){return t&&t.__esModule?t:{default:t}}var a=t("./../../shims/crypto/crypto.js"),s=t("is-type-of");n.buildCanonicalizedResource=function(t,e){var n=""+t,r="?";return s.string(e)&&""!==e.trim()?n+=r+e:s.array(e)?(e.sort(),n+=r+e.join("&")):e&&(0,i.default)(e).sort((function(t,e){return t[0]>e[0]?1:t[0]<e[0]?-1:0})).forEach((function(t){n+=r+t,e[t]&&(n+="="+e[t]),r="&"})),n},n.buildCanonicalString=function(t,e,n,r){var o=(n=n||{}).headers||{},a=[],s={},l=[t.toUpperCase(),o["Content-Md5"]||"",o["Content-Type"]||o["Content-Type".toLowerCase()],r||o["x-oss-date"]];return(0,i.default)(o).forEach((function(t){var e=t.toLowerCase();0===e.indexOf("x-oss-")&&(s[e]=String(o[t]).trim())})),(0,i.default)(s).sort().forEach((function(t){a.push(t+":"+s[t])})),(l=l.concat(a)).push(this.buildCanonicalizedResource(e,n.parameters)),l.join("\n")},n.computeSignature=function(t,n){return a.createHmac("sha1",t).update(e.from(n,"utf8")).digest("base64")},n.authorization=function(t,e,n){return"OSS "+t+":"+this.computeSignature(e,n)},n._signatureForURL=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments[2],a=arguments[3],s={},l=n.subResource,c=void 0===l?{}:l;if(n.process){var u="x-oss-process";c[u]=n.process}if(n.trafficLimit){var h="x-oss-traffic-limit";c[h]=n.trafficLimit}if(n.response&&(0,i.default)(n.response).forEach((function(t){var e="response-"+t.toLowerCase();c[e]=n.response[t]})),(0,i.default)(n).forEach((function(t){var e=t.toLowerCase(),r=n[t];0===e.indexOf("x-oss-")?s[e]=r:(0===e.indexOf("content-md5")||0===e.indexOf("content-type"))&&(s[t]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(c["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var d={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(d.callbackHost=n.callback.host),n.callback.contentType&&(d.callbackBodyType=n.callback.contentType),c.callback=e.from((0,r.default)(d)).toString("base64"),n.callback.customValue){var f={};(0,i.default)(n.callback.customValue).forEach((function(t){f["x:"+t]=n.callback.customValue[t]})),c["callback-var"]=e.from((0,r.default)(f)).toString("base64")}}var p=this.buildCanonicalString(n.method,o,{headers:s,parameters:c},a.toString());return{Signature:this.computeSignature(t,p),subResource:c}}}).call(this,t("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBucketName=void 0,n.checkBucketName=function(t,e){if(!(e?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(t))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/entries"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.checkObjectTag=void 0;var a=t("./checkValid").checkValid,s=t("./isObject").isObject,l=[{validator:function(t){if("string"!=typeof t)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],c={key:[].concat(l,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(l,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};n.checkObjectTag=function(t){if(!s(t))throw new Error("tag must be Object");var e=(0,o.default)(t);if(e.length>10)throw new Error("maximum of 10 tags for a object");var n=["key","value"];e.forEach((function(t){t.forEach((function(t,e){a(t,c[n[e]])}))}))}},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkValid=void 0,n.checkValid=function(t,e){e.forEach((function(e){if(e.validator)e.validator(t);else if(e.pattern&&!e.pattern.test(t))throw new Error(e.msg)}))}},{}],38:[function(t,e,n){(function(e){"use strict";var r,i=t("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.createRequest=void 0;var a=t("./../../../shims/crypto/crypto.js"),s=t("debug")("ali-oss"),l=t("mime"),c=t("dateformat"),u=t("copy-to"),h=t("path");function d(t,e){return t[e]||t[e.toLowerCase()]}n.createRequest=function(t){var n=new Date;this.options.amendTimeSkewed&&(n=+new Date+this.options.amendTimeSkewed);var r={"x-oss-date":c(n,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(r["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,o.default)(r,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(r["x-oss-security-token"]=this.options.stsToken),u(t.headers).to(r),d(r,"Content-Type")||(t.mime&&t.mime.indexOf("/")>0?r["Content-Type"]=t.mime:r["Content-Type"]=l.getType(t.mime||h.extname(t.object||""))),d(r,"Content-Type")||function(t,e){delete t[e],delete t[e.toLowerCase()]}(r,"Content-Type"),t.content&&(r["Content-Md5"]=a.createHash("md5").update(e.from(t.content,"utf8")).digest("base64"),r["Content-Length"]||(r["Content-Length"]=t.content.length));var i=this._getResource(t);r.authorization=this.authorization(t.method,i,t.subres,r);var f=this._getReqUrl(t);s("request %s %s, with headers %j, !!stream: %s",t.method,f,r,!!t.stream);var p=t.timeout||this.options.timeout,m={method:t.method,content:t.content,stream:t.stream,headers:r,timeout:p,writeStream:t.writeStream,customResponse:t.customResponse,ctx:t.ctx||this.ctx};return this.agent&&(m.agent=this.agent),this.httpsAgent&&(m.httpsAgent=this.httpsAgent),{url:f,params:m}}}).call(this,t("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(t,e,n){"use strict";var r=o(t("babel-runtime/core-js/object/keys")),i=o(t("babel-runtime/helpers/typeof"));function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0}),n.deepCopy=void 0,n.deepCopy=function(t){if(null===t||"object"!==(void 0===t?"undefined":(0,i.default)(t)))return t;var e=Array.isArray(t)?[]:{};return(0,r.default)(t).forEach((function(r){e[r]=n.deepCopy(t[r])})),e}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(t,e,n){"use strict";var r=o(t("babel-runtime/core-js/object/keys")),i=o(t("babel-runtime/helpers/typeof"));function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0}),n.formatObjKey=void 0,n.formatObjKey=function t(e,n){if(null===e||"object"!==(void 0===e?"undefined":(0,i.default)(e)))return e;var o=void 0;if(Array.isArray(e)){o=[];for(var a=0;a<e.length;a++)o.push(t(e[a],n))}else o={},(0,r.default)(e).forEach((function(r){o[function(t,e){return"firstUpperCase"===e?t=t.replace(/^./,(function(t){return t.toUpperCase()})):"firstLowerCase"===e&&(t=t.replace(/^./,(function(t){return t.toLowerCase()}))),t}(r,n)]=t(e[r],n)}));return o}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getStrBytesCount=void 0,n.getStrBytesCount=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charAt(n);/^[\u00-\uff]$/.test(r)?e+=1:e+=2}return e}},{}],42:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],43:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isBlob=void 0,n.isBlob=function(t){return"undefined"!=typeof Blob&&t instanceof Blob}},{}],44:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFile=void 0,n.isFile=function(t){return"undefined"!=typeof File&&t instanceof File}},{}],45:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isIP=void 0,n.isIP=function(t){return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(t)||/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(t)}},{}],46:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isObject=void 0,n.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)}},{}],47:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/keys"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.obj2xml=void 0;var a=t("./formatObjKey");function s(t){return Object.prototype.toString.call(t).replace(/(.*? |])/g,"").toLowerCase()}n.obj2xml=function t(e,n){var r="";return n&&n.headers&&(r='<?xml version="1.0" encoding="UTF-8"?>\n'),n&&n.firstUpperCase&&(e=a.formatObjKey(e,"firstUpperCase")),"object"===s(e)?(0,o.default)(e).forEach((function(n){"string"===s(e[n])||"number"===s(e[n])?r+="<"+n+">"+e[n]+"</"+n+">":"object"===s(e[n])?r+="<"+n+">"+t(e[n])+"</"+n+">":"array"===s(e[n])?r+=e[n].map((function(e){return"<"+n+">"+t(e)+"</"+n+">"})).join(""):r+="<"+n+">"+e[n].toString()+"</"+n+">"})):r+=e.toString(),r}},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(t,e,n){function r(){}e.exports=r,e.exports.HttpsAgent=r},{}],49:[function(t,e,n){e.exports=t("./register")().Promise},{"./register":51}],50:[function(t,e,n){"use strict";var r=null;e.exports=function(t,e){return function(n,i){n=n||null;var o=!1!==(i=i||{}).global;if(null===r&&o&&(r=t["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:e(n),o&&(t["@@any-promise/REGISTRATION"]=r)),r}}},{}],51:[function(t,e,n){"use strict";e.exports=t("./loader")(window,(function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}))},{"./loader":50}],52:[function(t,e,n){e.exports={default:t("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(t,e,n){e.exports={default:t("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(t,e,n){e.exports={default:t("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(t,e,n){e.exports={default:t("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(t,e,n){e.exports={default:t("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(t,e,n){e.exports={default:t("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(t,e,n){e.exports={default:t("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(t,e,n){e.exports={default:t("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(t,e,n){e.exports={default:t("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(t,e,n){"use strict";n.__esModule=!0;var r=a(t("../core-js/symbol/iterator")),i=a(t("../core-js/symbol")),o="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}n.default="function"==typeof i.default&&"symbol"===o(r.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(t,e,n){e.exports=t("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(t,e,n){"use strict";n.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},n.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],l=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,l[u++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(u(t,a,a+16383>s?s:a+16383));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],70:[function(t,e,n){var r,i;r=this,i=function(){var t=!0;function e(e){function n(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function r(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}var i,a=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(e)&&/android/i.test(e),l=/nexus\s*[0-6]\s*/i.test(e),c=!l&&/nexus\s*[0-9]+/i.test(e),u=/CrOS/.test(e),h=/silk/i.test(e),d=/sailfish/i.test(e),f=/tizen/i.test(e),p=/(web|hpw)(o|0)s/i.test(e),m=/windows phone/i.test(e),g=(/SamsungBrowser/i.test(e),!m&&/windows/i.test(e)),v=!a&&!h&&/macintosh/i.test(e),y=!s&&!d&&!f&&!p&&/linux/i.test(e),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=n(/version\/(\d+(\.\d+)?)/i),x=/tablet/i.test(e)&&!/tablet pc/i.test(e),S=!x&&/[^-]mobi/i.test(e),E=/xbox/i.test(e);/opera/i.test(e)?i={name:"Opera",opera:t,version:w||n(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?i={name:"Opera",opera:t,version:n(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(e)?i={name:"Samsung Internet for Android",samsungBrowser:t,version:w||n(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?i={name:"NAVER Whale browser",whale:t,version:n(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?i={name:"MZ Browser",mzbrowser:t,version:n(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?i={name:"Opera Coast",coast:t,version:w||n(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?i={name:"Focus",focus:t,version:n(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?i={name:"Yandex Browser",yandexbrowser:t,version:w||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?i={name:"UC Browser",ucbrowser:t,version:n(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?i={name:"Maxthon",maxthon:t,version:n(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?i={name:"Epiphany",epiphany:t,version:n(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?i={name:"Puffin",puffin:t,version:n(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?i={name:"Sleipnir",sleipnir:t,version:n(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?i={name:"K-Meleon",kMeleon:t,version:n(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:t},b?(i.msedge=t,i.version=b):(i.msie=t,i.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?i={name:"Internet Explorer",msie:t,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?i={name:"Chrome",osname:"Chrome OS",chromeos:t,chromeBook:t,chrome:t,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?i={name:"Microsoft Edge",msedge:t,version:b}:/vivaldi/i.test(e)?i={name:"Vivaldi",vivaldi:t,version:n(/vivaldi\/(\d+(\.\d+)?)/i)||w}:d?i={name:"Sailfish",osname:"Sailfish OS",sailfish:t,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?i={name:"SeaMonkey",seamonkey:t,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(i={name:"Firefox",firefox:t,version:n(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(i.firefoxos=t,i.osname="Firefox OS")):h?i={name:"Amazon Silk",silk:t,version:n(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?i={name:"PhantomJS",phantom:t,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?i={name:"SlimerJS",slimer:t,version:n(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?i={name:"BlackBerry",osname:"BlackBerry OS",blackberry:t,version:w||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(i={name:"WebOS",osname:"WebOS",webos:t,version:w||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(i.touchpad=t)):/bada/i.test(e)?i={name:"Bada",osname:"Bada",bada:t,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:f?i={name:"Tizen",osname:"Tizen",tizen:t,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(e)?i={name:"QupZilla",qupzilla:t,version:n(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(e)?i={name:"Chromium",chromium:t,version:n(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(e)?i={name:"Chrome",chrome:t,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?i={name:"Android",version:w}:/safari|applewebkit/i.test(e)?(i={name:"Safari",safari:t},w&&(i.version=w)):a?(i={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},w&&(i.version=w)):i=/googlebot/i.test(e)?{name:"Googlebot",googlebot:t,version:n(/googlebot\/(\d+(\.\d+))/i)||w}:{name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(i.name=i.name||"Blink",i.blink=t):(i.name=i.name||"Webkit",i.webkit=t),!i.version&&w&&(i.version=w)):!i.opera&&/gecko\//i.test(e)&&(i.name=i.name||"Gecko",i.gecko=t,i.version=i.version||n(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||!s&&!i.silk?!i.windowsphone&&a?(i[a]=t,i.ios=t,i.osname="iOS"):v?(i.mac=t,i.osname="macOS"):E?(i.xbox=t,i.osname="Xbox"):g?(i.windows=t,i.osname="Windows"):y&&(i.linux=t,i.osname="Linux"):(i.android=t,i.osname="Android");var C="";i.windows?C=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(n(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?C=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?C=(C=n(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?C=(C=n(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?C=n(/android[ \/-](\d+(\.\d+)*)/i):i.webos?C=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?C=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?C=n(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(C=n(/tizen[\/\s](\d+(\.\d+)*)/i)),C&&(i.osversion=C);var k=!i.windows&&C.split(".")[0];return x||c||"ipad"==a||s&&(3==k||k>=4&&!S)||i.silk?i.tablet=t:(S||"iphone"==a||"ipod"==a||s||l||i.blackberry||i.webos||i.bada)&&(i.mobile=t),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.whale&&1===o([i.version,"1.0"])||i.mzbrowser&&1===o([i.version,"6.0"])||i.focus&&1===o([i.version,"1.0"])||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=t:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=t:i.x=t,i}var n=e("undefined"!=typeof navigator&&navigator.userAgent||"");function r(t){return t.split(".").length}function i(t,e){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(n=0;n<t.length;n++)r.push(e(t[n]));return r}function o(t){for(var e=Math.max(r(t[0]),r(t[1])),n=i(t,(function(t){var n=e-r(t);return i((t+=new Array(n+1).join(".0")).split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));--e>=0;){if(n[0][e]>n[1][e])return 1;if(n[0][e]!==n[1][e])return-1;if(0===e)return 0}}function a(t,r,i){var a=n;"string"==typeof r&&(i=r,r=void 0),void 0===r&&(r=!1),i&&(a=e(i));var s=""+a.version;for(var l in t)if(t.hasOwnProperty(l)&&a[l]){if("string"!=typeof t[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(t));return o([s,t[l]])<0}return r}return n.test=function(t){for(var e=0;e<t.length;++e){var r=t[e];if("string"==typeof r&&r in n)return!0}return!1},n.isUnsupportedBrowser=a,n.compareVersions=o,n.check=function(t,e,n){return!a(t,e,n)},n._detect=e,n.detect=e,n},void 0!==e&&e.exports?e.exports=i():"function"==typeof define&&define.amd?define("bowser",i):r.bowser=i()},{}],71:[function(t,e,n){},{}],72:[function(t,e,n){var r=t("buffer").Buffer,i=r.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},o=n.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=l;break;default:return void(this.write=a)}this.charBuffer=new r(6),this.charReceived=0,this.charLength=0};function a(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function l(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((r=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(r=e.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},o.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},o.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},{buffer:73}],73:[function(t,e,n){(function(e,r){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
"use strict";var i=t("base64-js"),o=t("ieee754"),a=t("isarray");function s(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return r.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=r.prototype:(null===t&&(t=new r(e)),t.length=e),t}function r(t,e,n){if(!(r.TYPED_ARRAY_SUPPORT||this instanceof r))return new r(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}function c(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),r.TYPED_ARRAY_SUPPORT?(t=e).__proto__=r.prototype:t=d(t,e),t}(t,e,n,i):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,n),o=(t=l(t,i)).write(e,n);return o!==i&&(t=t.slice(0,o)),t}(t,e,n):function(t,e){if(r.isBuffer(e)){var n=0|f(e.length);return 0===(t=l(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?l(t,0):d(t,e);if("Buffer"===e.type&&a(e.data))return d(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(u(e),t=l(t,e<0?0:0|f(e)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|f(e.length);t=l(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(r.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(i)return B(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return _(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=r.from(e,i)),r.isBuffer(e))return 0===e.length?-1:y(t,e,n,i,o);if("number"==typeof e)return e&=255,r.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(t,o+d)!==c(e,d)){h=!1;break}if(h)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function w(t,e,n,r){return H(B(e,t.length-n),t,n,r)}function x(t,e,n,r){return H(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return x(t,e,n,r)}function E(t,e,n,r){return H(U(e),t,n,r)}function C(t,e,n,r){return H(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function _(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,l,c=t[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function O(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r,i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=e;a<n;++a)o+=(r=t[a])<16?"0"+r.toString(16):r.toString(16);return o}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,i,o,a){if(!r.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<a)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,i){return i||N(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function P(t,e,n,r,i){return i||N(t,0,n,8),o.write(t,e,n,r,52,8),n+8}n.Buffer=r,n.SlowBuffer=function(t){return+t!=t&&(t=0),r.alloc(+t)},n.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),n.kMaxLength=s(),r.poolSize=8192,r._augment=function(t){return t.__proto__=r.prototype,t},r.from=function(t,e,n){return c(null,t,e,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(t,e,n){return function(t,e,n,r){return u(e),e<=0?l(t,e):void 0!==n?"string"==typeof r?l(t,e).fill(n,r):l(t,e).fill(n):l(t,e)}(null,t,e,n)},r.allocUnsafe=function(t){return h(null,t)},r.allocUnsafeSlow=function(t){return h(null,t)},r.isBuffer=function(t){return!(null==t||!t._isBuffer)},r.compare=function(t,e){if(!r.isBuffer(t)||!r.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,a=Math.min(n,i);o<a;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0},r.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return r.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=r.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!r.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},r.byteLength=p,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},r.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},r.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},r.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?_(this,0,t):m.apply(this,arguments)},r.prototype.equals=function(t){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===r.compare(this,t)},r.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},r.prototype.compare=function(t,e,n,i,o){if(!r.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=t.slice(e,n),h=0;h<l;++h)if(c[h]!==u[h]){a=c[h],s=u[h];break}return a<s?-1:s<a?1:0},r.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},r.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},r.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},r.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=r.prototype;else{var o=e-t;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+t]}return n},r.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},r.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},r.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},r.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},r.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},r.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},r.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},r.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},r.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},r.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},r.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},r.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},r.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},r.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},r.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},r.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},r.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},r.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},r.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,255,0),r.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},r.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},r.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},r.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},r.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},r.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},r.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},r.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,127,-128),r.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},r.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},r.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},r.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},r.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),r.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},r.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},r.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},r.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},r.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},r.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o,a=i-n;if(this===t&&n<e&&e<i)for(o=a-1;o>=0;--o)t[o+e]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},r.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!r.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=r.isBuffer(t)?t:B(new r(t,i).toString()),l=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%l]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(t,e,n){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],75:[function(t,e,n){e.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(t,e,n){
/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var r=Array.prototype.slice;function i(t,e){if(!(this instanceof i))return new i(t,e);this.src=t,this._withAccess=e}function o(t,e){return void 0===t[e]&&void 0===t.__lookupGetter__(e)&&void 0===t.__lookupSetter__(e)}e.exports=i,i.prototype.withAccess=function(t){return this._withAccess=!1!==t,this},i.prototype.pick=function(t){return Array.isArray(t)||(t=r.call(arguments)),t.length&&(this.keys=t),this},i.prototype.to=function(t){if(t=t||{},!this.src)return t;var e=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;n<e.length;n++)void 0===t[r=e[n]]&&(t[r]=this.src[r]);return t}for(n=0;n<e.length;n++){var r=e[n];if(o(t,r)){var i=this.src.__lookupGetter__(r),a=this.src.__lookupSetter__(r);i&&t.__defineGetter__(r,i),a&&t.__defineSetter__(r,a),i||a||(t[r]=this.src[r])}}return t},i.prototype.toCover=function(t){for(var e=this.keys||Object.keys(this.src),n=0;n<e.length;n++){var r=e[n];delete t[r];var i=this.src.__lookupGetter__(r),o=this.src.__lookupSetter__(r);i&&t.__defineGetter__(r,i),o&&t.__defineSetter__(r,o),i||o||(t[r]=this.src[r])}},i.prototype.override=i.prototype.toCover,i.prototype.and=function(t){var e={};return this.to(e),this.src=t,this.to(e),this.src=e,this}},{}],77:[function(t,e,n){t("../../modules/es6.string.iterator"),t("../../modules/es6.array.from"),e.exports=t("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(t,e,n){var r=t("../../modules/_core"),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(t){return i.stringify.apply(i,arguments)}},{"../../modules/_core":99}],79:[function(t,e,n){t("../../modules/es6.object.assign"),e.exports=t("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(t,e,n){t("../../modules/es6.object.create");var r=t("../../modules/_core").Object;e.exports=function(t,e){return r.create(t,e)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(t,e,n){t("../../modules/es6.object.define-property");var r=t("../../modules/_core").Object;e.exports=function(t,e,n){return r.defineProperty(t,e,n)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(t,e,n){t("../../modules/es7.object.entries"),e.exports=t("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(t,e,n){t("../../modules/es6.object.get-own-property-names");var r=t("../../modules/_core").Object;e.exports=function(t){return r.getOwnPropertyNames(t)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(t,e,n){t("../../modules/es6.object.get-prototype-of"),e.exports=t("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(t,e,n){t("../../modules/es6.object.keys"),e.exports=t("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(t,e,n){t("../modules/es6.object.to-string"),t("../modules/es6.string.iterator"),t("../modules/web.dom.iterable"),t("../modules/es6.promise"),t("../modules/es7.promise.finally"),t("../modules/es7.promise.try"),e.exports=t("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(t,e,n){t("../modules/web.immediate"),e.exports=t("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(t,e,n){t("../../modules/es6.string.from-code-point"),e.exports=t("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(t,e,n){t("../../modules/es6.function.has-instance"),e.exports=t("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(t,e,n){t("../../modules/es6.symbol"),t("../../modules/es6.object.to-string"),t("../../modules/es7.symbol.async-iterator"),t("../../modules/es7.symbol.observable"),e.exports=t("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(t,e,n){t("../../modules/es6.string.iterator"),t("../../modules/web.dom.iterable"),e.exports=t("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(t,e,n){e.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],93:[function(t,e,n){e.exports=function(){}},{}],94:[function(t,e,n){e.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},{}],95:[function(t,e,n){var r=t("./_is-object");e.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},{"./_is-object":119}],96:[function(t,e,n){var r=t("./_to-iobject"),i=t("./_to-length"),o=t("./_to-absolute-index");e.exports=function(t){return function(e,n,a){var s,l=r(e),c=i(l.length),u=o(a,c);if(t&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(t,e,n){var r=t("./_cof"),i=t("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},{"./_cof":98,"./_wks":166}],98:[function(t,e,n){var r={}.toString;e.exports=function(t){return r.call(t).slice(8,-1)}},{}],99:[function(t,e,n){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},{}],100:[function(t,e,n){"use strict";var r=t("./_object-dp"),i=t("./_property-desc");e.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},{"./_object-dp":132,"./_property-desc":146}],101:[function(t,e,n){var r=t("./_a-function");e.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},{"./_a-function":92}],102:[function(t,e,n){e.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},{}],103:[function(t,e,n){e.exports=!t("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":108}],104:[function(t,e,n){var r=t("./_is-object"),i=t("./_global").document,o=r(i)&&r(i.createElement);e.exports=function(t){return o?i.createElement(t):{}}},{"./_global":110,"./_is-object":119}],105:[function(t,e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(t,e,n){var r=t("./_object-keys"),i=t("./_object-gops"),o=t("./_object-pie");e.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),l=o.f,c=0;s.length>c;)l.call(t,a=s[c++])&&e.push(a);return e}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(t,e,n){var r=t("./_global"),i=t("./_core"),o=t("./_ctx"),a=t("./_hide"),s=t("./_has"),l=function(t,e,n){var c,u,h,d=t&l.F,f=t&l.G,p=t&l.S,m=t&l.P,g=t&l.B,v=t&l.W,y=f?i:i[e]||(i[e]={}),b=y.prototype,w=f?r:p?r[e]:(r[e]||{}).prototype;for(c in f&&(n=e),n)(u=!d&&w&&void 0!==w[c])&&s(y,c)||(h=u?w[c]:n[c],y[c]=f&&"function"!=typeof w[c]?n[c]:g&&u?o(h,r):v&&w[c]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,t&l.R&&b&&!b[c]&&a(b,c,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(t){return!0}}},{}],109:[function(t,e,n){var r=t("./_ctx"),i=t("./_iter-call"),o=t("./_is-array-iter"),a=t("./_an-object"),s=t("./_to-length"),l=t("./core.get-iterator-method"),c={},u={};(n=e.exports=function(t,e,n,h,d){var f,p,m,g,v=d?function(){return t}:l(t),y=r(n,h,e?2:1),b=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(f=s(t.length);f>b;b++)if((g=e?y(a(p=t[b])[0],p[1]):y(t[b]))===c||g===u)return g}else for(m=v.call(t);!(p=m.next()).done;)if((g=i(m,y,p.value,e))===c||g===u)return g}).BREAK=c,n.RETURN=u},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(t,e,n){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],111:[function(t,e,n){var r={}.hasOwnProperty;e.exports=function(t,e){return r.call(t,e)}},{}],112:[function(t,e,n){var r=t("./_object-dp"),i=t("./_property-desc");e.exports=t("./_descriptors")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(t,e,n){var r=t("./_global").document;e.exports=r&&r.documentElement},{"./_global":110}],114:[function(t,e,n){e.exports=!t("./_descriptors")&&!t("./_fails")((function(){return 7!=Object.defineProperty(t("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(t,e,n){e.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],116:[function(t,e,n){var r=t("./_cof");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},{"./_cof":98}],117:[function(t,e,n){var r=t("./_iterators"),i=t("./_wks")("iterator"),o=Array.prototype;e.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},{"./_iterators":125,"./_wks":166}],118:[function(t,e,n){var r=t("./_cof");e.exports=Array.isArray||function(t){return"Array"==r(t)}},{"./_cof":98}],119:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],120:[function(t,e,n){var r=t("./_an-object");e.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},{"./_an-object":95}],121:[function(t,e,n){"use strict";var r=t("./_object-create"),i=t("./_property-desc"),o=t("./_set-to-string-tag"),a={};t("./_hide")(a,t("./_wks")("iterator"),(function(){return this})),e.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(t,e,n){"use strict";var r=t("./_library"),i=t("./_export"),o=t("./_redefine"),a=t("./_hide"),s=t("./_iterators"),l=t("./_iter-create"),c=t("./_set-to-string-tag"),u=t("./_object-gpo"),h=t("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(t,e,n,p,m,g,v){l(n,e,p);var y,b,w,x=function(t){if(!d&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",E="values"==m,C=!1,k=t.prototype,_=k[h]||k["@@iterator"]||m&&k[m],T=_||x(m),O=m?E?x("entries"):T:void 0,A="Array"==e&&k.entries||_;if(A&&(w=u(A.call(new t)))!==Object.prototype&&w.next&&(c(w,S,!0),r||"function"==typeof w[h]||a(w,h,f)),E&&_&&"values"!==_.name&&(C=!0,T=function(){return _.call(this)}),r&&!v||!d&&!C&&k[h]||a(k,h,T),s[e]=T,s[S]=f,m)if(y={values:E?T:x("values"),keys:g?T:x("keys"),entries:O},v)for(b in y)b in k||o(k,b,y[b]);else i(i.P+i.F*(d||C),e,y);return y}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(t,e,n){var r=t("./_wks")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}e.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},{"./_wks":166}],124:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],125:[function(t,e,n){e.exports={}},{}],126:[function(t,e,n){e.exports=!0},{}],127:[function(t,e,n){var r=t("./_uid")("meta"),i=t("./_is-object"),o=t("./_has"),a=t("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},c=!t("./_fails")((function(){return l(Object.preventExtensions({}))})),u=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=e.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[r].w},onFreeze:function(t){return c&&h.NEED&&l(t)&&!o(t,r)&&u(t),t}}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(t,e,n){var r=t("./_global"),i=t("./_task").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==t("./_cof")(a);e.exports=function(){var t,e,n,c=function(){var r,i;for(l&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(t,e,n){"use strict";var r=t("./_a-function");function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}e.exports.f=function(t){return new i(t)}},{"./_a-function":92}],130:[function(t,e,n){"use strict";var r=t("./_descriptors"),i=t("./_object-keys"),o=t("./_object-gops"),a=t("./_object-pie"),s=t("./_to-object"),l=t("./_iobject"),c=Object.assign;e.exports=!c||t("./_fails")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=s(t),c=arguments.length,u=1,h=o.f,d=a.f;c>u;)for(var f,p=l(arguments[u++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)f=m[v++],r&&!d.call(p,f)||(n[f]=p[f]);return n}:c},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(t,e,n){var r=t("./_an-object"),i=t("./_object-dps"),o=t("./_enum-bug-keys"),a=t("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var e,n=t("./_dom-create")("iframe"),r=o.length;for(n.style.display="none",t("./_html").appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[o[r]];return l()};e.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:i(n,e)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(t,e,n){var r=t("./_an-object"),i=t("./_ie8-dom-define"),o=t("./_to-primitive"),a=Object.defineProperty;n.f=t("./_descriptors")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(t,e,n){var r=t("./_object-dp"),i=t("./_an-object"),o=t("./_object-keys");e.exports=t("./_descriptors")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,l=0;s>l;)r.f(t,n=a[l++],e[n]);return t}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(t,e,n){var r=t("./_object-pie"),i=t("./_property-desc"),o=t("./_to-iobject"),a=t("./_to-primitive"),s=t("./_has"),l=t("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=t("./_descriptors")?c:function(t,e){if(t=o(t),e=a(e,!0),l)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(t,e,n){var r=t("./_to-iobject"),i=t("./_object-gopn").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(t,e,n){var r=t("./_object-keys-internal"),i=t("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(t,e,n){n.f=Object.getOwnPropertySymbols},{}],138:[function(t,e,n){var r=t("./_has"),i=t("./_to-object"),o=t("./_shared-key")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(t,e,n){var r=t("./_has"),i=t("./_to-iobject"),o=t("./_array-includes")(!1),a=t("./_shared-key")("IE_PROTO");e.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>l;)r(s,n=e[l++])&&(~o(c,n)||c.push(n));return c}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(t,e,n){var r=t("./_object-keys-internal"),i=t("./_enum-bug-keys");e.exports=Object.keys||function(t){return r(t,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(t,e,n){n.f={}.propertyIsEnumerable},{}],142:[function(t,e,n){var r=t("./_export"),i=t("./_core"),o=t("./_fails");e.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(t,e,n){var r=t("./_descriptors"),i=t("./_object-keys"),o=t("./_to-iobject"),a=t("./_object-pie").f;e.exports=function(t){return function(e){for(var n,s=o(e),l=i(s),c=l.length,u=0,h=[];c>u;)n=l[u++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(t,e,n){e.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},{}],145:[function(t,e,n){var r=t("./_an-object"),i=t("./_is-object"),o=t("./_new-promise-capability");e.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],147:[function(t,e,n){var r=t("./_hide");e.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},{"./_hide":112}],148:[function(t,e,n){e.exports=t("./_hide")},{"./_hide":112}],149:[function(t,e,n){"use strict";var r=t("./_global"),i=t("./_core"),o=t("./_object-dp"),a=t("./_descriptors"),s=t("./_wks")("species");e.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(t,e,n){var r=t("./_object-dp").f,i=t("./_has"),o=t("./_wks")("toStringTag");e.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(t,e,n){var r=t("./_shared")("keys"),i=t("./_uid");e.exports=function(t){return r[t]||(r[t]=i(t))}},{"./_shared":152,"./_uid":162}],152:[function(t,e,n){var r=t("./_core"),i=t("./_global"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:t("./_library")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(t,e,n){var r=t("./_an-object"),i=t("./_a-function"),o=t("./_wks")("species");e.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(t,e,n){var r=t("./_to-integer"),i=t("./_defined");e.exports=function(t){return function(e,n){var o,a,s=String(i(e)),l=r(n),c=s.length;return l<0||l>=c?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},{"./_defined":102,"./_to-integer":157}],155:[function(t,e,n){var r,i,o,a=t("./_ctx"),s=t("./_invoke"),l=t("./_html"),c=t("./_dom-create"),u=t("./_global"),h=u.process,d=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,m=u.Dispatch,g=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},b=function(t){y.call(t.data)};d&&f||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},f=function(t){delete v[t]},"process"==t("./_cof")(h)?r=function(t){h.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(t){u.postMessage(t+"","*")},u.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),e.exports={set:d,clear:f}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(t,e,n){var r=t("./_to-integer"),i=Math.max,o=Math.min;e.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},{"./_to-integer":157}],157:[function(t,e,n){var r=Math.ceil,i=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},{}],158:[function(t,e,n){var r=t("./_iobject"),i=t("./_defined");e.exports=function(t){return r(i(t))}},{"./_defined":102,"./_iobject":116}],159:[function(t,e,n){var r=t("./_to-integer"),i=Math.min;e.exports=function(t){return t>0?i(r(t),9007199254740991):0}},{"./_to-integer":157}],160:[function(t,e,n){var r=t("./_defined");e.exports=function(t){return Object(r(t))}},{"./_defined":102}],161:[function(t,e,n){var r=t("./_is-object");e.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(t,e,n){var r=0,i=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+i).toString(36))}},{}],163:[function(t,e,n){var r=t("./_global").navigator;e.exports=r&&r.userAgent||""},{"./_global":110}],164:[function(t,e,n){var r=t("./_global"),i=t("./_core"),o=t("./_library"),a=t("./_wks-ext"),s=t("./_object-dp").f;e.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(t,e,n){n.f=t("./_wks")},{"./_wks":166}],166:[function(t,e,n){var r=t("./_shared")("wks"),i=t("./_uid"),o=t("./_global").Symbol,a="function"==typeof o;(e.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(t,e,n){var r=t("./_classof"),i=t("./_wks")("iterator"),o=t("./_iterators");e.exports=t("./_core").getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(t,e,n){"use strict";var r=t("./_ctx"),i=t("./_export"),o=t("./_to-object"),a=t("./_iter-call"),s=t("./_is-array-iter"),l=t("./_to-length"),c=t("./_create-property"),u=t("./core.get-iterator-method");i(i.S+i.F*!t("./_iter-detect")((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,d=o(t),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=u(d);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||f==Array&&s(y))for(n=new f(e=l(d.length));e>v;v++)c(n,v,g?m(d[v],v):d[v]);else for(h=y.call(d),n=new f;!(i=h.next()).done;v++)c(n,v,g?a(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(t,e,n){"use strict";var r=t("./_add-to-unscopables"),i=t("./_iter-step"),o=t("./_iterators"),a=t("./_to-iobject");e.exports=t("./_iter-define")(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(t,e,n){"use strict";var r=t("./_is-object"),i=t("./_object-gpo"),o=t("./_wks")("hasInstance"),a=Function.prototype;o in a||t("./_object-dp").f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(t,e,n){var r=t("./_export");r(r.S+r.F,"Object",{assign:t("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{create:t("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(t,e,n){var r=t("./_export");r(r.S+r.F*!t("./_descriptors"),"Object",{defineProperty:t("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(t,e,n){t("./_object-sap")("getOwnPropertyNames",(function(){return t("./_object-gopn-ext").f}))},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(t,e,n){var r=t("./_to-object"),i=t("./_object-gpo");t("./_object-sap")("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(t,e,n){var r=t("./_to-object"),i=t("./_object-keys");t("./_object-sap")("keys",(function(){return function(t){return i(r(t))}}))},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(t,e,n){arguments[4][71][0].apply(n,arguments)},{dup:71}],178:[function(t,e,n){"use strict";var r,i,o,a,s=t("./_library"),l=t("./_global"),c=t("./_ctx"),u=t("./_classof"),h=t("./_export"),d=t("./_is-object"),f=t("./_a-function"),p=t("./_an-instance"),m=t("./_for-of"),g=t("./_species-constructor"),v=t("./_task").set,y=t("./_microtask")(),b=t("./_new-promise-capability"),w=t("./_perform"),x=t("./_user-agent"),S=t("./_promise-resolve"),E=l.TypeError,C=l.process,k=C&&C.versions,_=k&&k.v8||"",T=l.Promise,O="process"==u(C),A=function(){},L=i=b.f,D=!!function(){try{var e=T.resolve(1),n=(e.constructor={})[t("./_wks")("species")]=function(t){t(A,A)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof n&&0!==_.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;y((function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(i||(2==t._h&&j(t),t._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),a=!0)),n===e.promise?c(E("Promise-chain cycle")):(o=I(n))?o.call(n,l,c):l(n)):c(r)}catch(t){u&&!a&&u.exit(),c(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){v.call(l,(function(){var e,n,r,i=t._v,o=N(t);if(o&&(e=w((function(){O?C.emit("unhandledRejection",i,t):(n=l.onunhandledrejection)?n({promise:t,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=O||N(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},N=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){v.call(l,(function(){var e;O?C.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})}))},P=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw E("Promise can't be resolved itself");(e=I(t))?y((function(){var r={_w:n,_d:!1};try{e.call(t,c(F,r,1),c(P,r,1))}catch(t){P.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){P.call({_w:n,_d:!1},t)}}};D||(T=function(t){p(this,T,"Promise","_h"),f(t),r.call(this);try{t(c(F,this,1),c(P,this,1))}catch(t){P.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=t("./_redefine-all")(T.prototype,{then:function(t,e){var n=L(g(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=O?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(F,t,1),this.reject=c(P,t,1)},b.f=L=function(t){return t===T||t===a?new o(t):i(t)}),h(h.G+h.W+h.F*!D,{Promise:T}),t("./_set-to-string-tag")(T,"Promise"),t("./_set-species")("Promise"),a=t("./_core").Promise,h(h.S+h.F*!D,"Promise",{reject:function(t){var e=L(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!D),"Promise",{resolve:function(t){return S(s&&this===a?T:this,t)}}),h(h.S+h.F*!(D&&t("./_iter-detect")((function(t){T.all(t).catch(A)}))),"Promise",{all:function(t){var e=this,n=L(e),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,a=1;m(t,!1,(function(t){var s=o++,l=!1;n.push(void 0),a++,e.resolve(t).then((function(t){l||(l=!0,n[s]=t,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=L(e),r=n.reject,i=w((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(t,e,n){var r=t("./_export"),i=t("./_to-absolute-index"),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(t,e,n){"use strict";var r=t("./_string-at")(!0);t("./_iter-define")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},{"./_iter-define":122,"./_string-at":154}],181:[function(t,e,n){"use strict";var r=t("./_global"),i=t("./_has"),o=t("./_descriptors"),a=t("./_export"),s=t("./_redefine"),l=t("./_meta").KEY,c=t("./_fails"),u=t("./_shared"),h=t("./_set-to-string-tag"),d=t("./_uid"),f=t("./_wks"),p=t("./_wks-ext"),m=t("./_wks-define"),g=t("./_enum-keys"),v=t("./_is-array"),y=t("./_an-object"),b=t("./_is-object"),w=t("./_to-object"),x=t("./_to-iobject"),S=t("./_to-primitive"),E=t("./_property-desc"),C=t("./_object-create"),k=t("./_object-gopn-ext"),_=t("./_object-gopd"),T=t("./_object-gops"),O=t("./_object-dp"),A=t("./_object-keys"),L=_.f,D=O.f,I=k.f,R=r.Symbol,M=r.JSON,N=M&&M.stringify,j=f("_hidden"),P=f("toPrimitive"),F={}.propertyIsEnumerable,B=u("symbol-registry"),U=u("symbols"),H=u("op-symbols"),z=Object.prototype,G="function"==typeof R&&!!T.f,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,K=o&&c((function(){return 7!=C(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=L(z,e);r&&delete z[e],D(t,e,n),r&&t!==z&&D(z,e,r)}:D,q=function(t){var e=U[t]=C(R.prototype);return e._k=t,e},X=G&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},Y=function(t,e,n){return t===z&&Y(H,e,n),y(t),e=S(e,!0),y(n),i(U,e)?(n.enumerable?(i(t,j)&&t[j][e]&&(t[j][e]=!1),n=C(n,{enumerable:E(0,!1)})):(i(t,j)||D(t,j,E(1,{})),t[j][e]=!0),K(t,e,n)):D(t,e,n)},$=function(t,e){y(t);for(var n,r=g(e=x(e)),i=0,o=r.length;o>i;)Y(t,n=r[i++],e[n]);return t},J=function(t){var e=F.call(this,t=S(t,!0));return!(this===z&&i(U,t)&&!i(H,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,j)&&this[j][t])||e)},Z=function(t,e){if(t=x(t),e=S(e,!0),t!==z||!i(U,e)||i(H,e)){var n=L(t,e);return!n||!i(U,e)||i(t,j)&&t[j][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=I(x(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==j||e==l||r.push(e);return r},tt=function(t){for(var e,n=t===z,r=I(n?H:x(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(z,e)||o.push(U[e]);return o};G||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(H,n),i(this,j)&&i(this[j],t)&&(this[j][t]=!1),K(this,t,E(1,n))};return o&&W&&K(z,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",(function(){return this._k})),_.f=Z,O.f=Y,t("./_object-gopn").f=k.f=Q,t("./_object-pie").f=J,T.f=tt,o&&!t("./_library")&&s(z,"propertyIsEnumerable",J,!0),p.f=function(t){return q(f(t))}),a(a.G+a.W+a.F*!G,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)f(et[nt++]);for(var rt=A(f.store),it=0;rt.length>it;)m(rt[it++]);a(a.S+a.F*!G,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!G,"Object",{create:function(t,e){return void 0===e?C(t):$(C(t),e)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=c((function(){T.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return T.f(w(t))}}),M&&a(a.S+a.F*(!G||c((function(){var t=R();return"[null]"!=N([t])||"{}"!=N({a:t})||"{}"!=N(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!X(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,N.apply(M,r)}}),R.prototype[P]||t("./_hide")(R.prototype,P,R.prototype.valueOf),h(R,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(t,e,n){var r=t("./_export"),i=t("./_object-to-array")(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},{"./_export":107,"./_object-to-array":143}],183:[function(t,e,n){"use strict";var r=t("./_export"),i=t("./_core"),o=t("./_global"),a=t("./_species-constructor"),s=t("./_promise-resolve");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(t,e,n){"use strict";var r=t("./_export"),i=t("./_new-promise-capability"),o=t("./_perform");r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(t,e,n){t("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(t,e,n){t("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(t,e,n){t("./es6.array.iterator");for(var r=t("./_global"),i=t("./_hide"),o=t("./_iterators"),a=t("./_wks")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var c=s[l],u=r[c],h=u&&u.prototype;h&&!h[a]&&i(h,a,c),o[c]=o.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(t,e,n){var r=t("./_export"),i=t("./_task");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":107,"./_task":155}],189:[function(t,e,n){(function(e){"use strict";var r,i=t("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r};function a(t){return Object.prototype.toString.call(t)}n.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===a(t)},n.isBoolean=function(t){return"boolean"==typeof t},n.isNull=function(t){return null===t},n.isNullOrUndefined=function(t){return null==t},n.isNumber=function(t){return"number"==typeof t},n.isString=function(t){return"string"==typeof t},n.isSymbol=function(t){return"symbol"===(void 0===t?"undefined":(0,o.default)(t))},n.isUndefined=function(t){return void 0===t},n.isRegExp=function(t){return"[object RegExp]"===a(t)},n.isObject=function(t){return"object"===(void 0===t?"undefined":(0,o.default)(t))&&null!==t},n.isDate=function(t){return"[object Date]"===a(t)},n.isError=function(t){return"[object Error]"===a(t)||t instanceof Error},n.isFunction=function(t){return"function"==typeof t},n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===(void 0===t?"undefined":(0,o.default)(t))||void 0===t},n.isBuffer=e.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(t,e,n){"use strict";var r,i=t("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r};!function(t){var r,i,a,s=(r=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g,function(t,e,n,o){if(1!==arguments.length||"string"!==h(t)||/\d/.test(t)||(e=t,t=void 0),(t=t||new Date)instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");var d=(e=String(s.masks[e]||e||s.masks.default)).slice(0,4);"UTC:"!==d&&"GMT:"!==d||(e=e.slice(4),n=!0,"GMT:"===d&&(o=!0));var f=n?"getUTC":"get",p=t[f+"Date"](),m=t[f+"Day"](),g=t[f+"Month"](),v=t[f+"FullYear"](),y=t[f+"Hours"](),b=t[f+"Minutes"](),w=t[f+"Seconds"](),x=t[f+"Milliseconds"](),S=n?0:t.getTimezoneOffset(),E=c(t),C=u(t),k={d:p,dd:l(p),ddd:s.i18n.dayNames[m],dddd:s.i18n.dayNames[m+7],m:g+1,mm:l(g+1),mmm:s.i18n.monthNames[g],mmmm:s.i18n.monthNames[g+12],yy:String(v).slice(2),yyyy:v,h:y%12||12,hh:l(y%12||12),H:y,HH:l(y),M:b,MM:l(b),s:w,ss:l(w),l:l(x,3),L:l(Math.round(x/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:o?"GMT":n?"UTC":(String(t).match(i)||[""]).pop().replace(a,""),o:(S>0?"-":"+")+l(100*Math.floor(Math.abs(S)/60)+Math.abs(S)%60,4),S:["th","st","nd","rd"][p%10>3?0:(p%100-p%10!=10)*p%10],W:E,N:C};return e.replace(r,(function(t){return t in k?k[t]:t.slice(1,t.length-1)}))});function l(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}function c(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.setDate(e.getDate()-(e.getDay()+6)%7+3);var n=new Date(e.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=e.getTimezoneOffset()-n.getTimezoneOffset();e.setHours(e.getHours()-r);var i=(e-n)/6048e5;return 1+Math.floor(i)}function u(t){var e=t.getDay();return 0===e&&(e=7),e}function h(t){return null===t?"null":void 0===t?"undefined":"object"!==(void 0===t?"undefined":(0,o.default)(t))?void 0===t?"undefined":(0,o.default)(t):Array.isArray(t)?"array":{}.toString.call(t).slice(8,-1).toLowerCase()}s.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},s.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},"function"==typeof define&&define.amd?define((function(){return s})):"object"===(void 0===n?"undefined":(0,o.default)(n))?e.exports=s:t.dateFormat=s}(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(t,e,n){
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/
"use strict";var r=/["'&<>]/;e.exports=function(t){var e,n=""+t,i=r.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#39;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}s!==a&&(o+=n.substring(s,a)),s=a+1,o+=e}return s!==a?o+n.substring(s,a):o}},{}],192:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,s,l,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}if(a(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),r=(c=n.slice()).length,l=0;l<r;l++)c[l].apply(this,s);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var n,r,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(a=(n=this._events[t]).length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],193:[function(t,e,n){var r=t("http"),i=e.exports;for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);i.request=function(t,e){return t||(t={}),t.scheme="https",t.protocol="https:",r.request.call(this,t,e)}},{http:231}],194:[function(t,e,n){
/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var r=t("util"),i=t("ms");e.exports=function(t){if("number"==typeof t)return t;var e=i(t);if(void 0===e){var n=new Error(r.format("humanize-ms(%j) result undefined",t));console.warn(n.stack)}return e}},{ms:204,util:243}],195:[function(t,e,n){n.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+t[e+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+t[e+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(e*l-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},{}],196:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},{}],197:[function(t,e,n){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],198:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],199:[function(require,module,exports){(function(global){!function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e(t):"function"==typeof define&&define.amd?define(e):e(t)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:this,(function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(void 0!==module&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(t){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(t){for(var e={},n=0,r=t.length;n<r;n++)e[t.charAt(n)]=n;return e}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?fromCharCode(192|e>>>6)+fromCharCode(128|63&e):fromCharCode(224|e>>>12&15)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return fromCharCode(240|e>>>18&7)+fromCharCode(128|e>>>12&63)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(t){return t.replace(re_utob,cb_utob)},cb_encode=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),e>=2?"=":b64chars.charAt(n>>>6&63),e>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(t){return global.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)?t.toString("base64"):btoa(utob(String(t)))},encode=function(t,e){return e?_encode(String(t)).replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,""):_encode(t)},encodeURI=function(t){return encode(t,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return fromCharCode(55296+(e>>>10))+fromCharCode(56320+(1023&e));case 3:return fromCharCode((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return fromCharCode((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},btou=function(t){return t.replace(re_btou,cb_btou)},cb_decode=function(t){var e=t.length,n=e%4,r=(e>0?b64tab[t.charAt(0)]<<18:0)|(e>1?b64tab[t.charAt(1)]<<12:0)|(e>2?b64tab[t.charAt(2)]<<6:0)|(e>3?b64tab[t.charAt(3)]:0),i=[fromCharCode(r>>>16),fromCharCode(r>>>8&255),fromCharCode(255&r)];return i.length-=[0,0,2,1][n],i.join("")},_atob=global.atob?function(t){return global.atob(t)}:function(t){return t.replace(/\S{1,4}/g,cb_decode)},atob=function(t){return _atob(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(t){return(t.constructor===buffer.constructor?t:buffer.from(t,"base64")).toString()}:function(t){return(t.constructor===buffer.constructor?t:new buffer(t,"base64")).toString()}:function(t){return btou(_atob(t))},decode=function(t){return _decode(String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var t=global.Base64;return global.Base64=_Base64,t};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(t){return encode(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),void 0!==module&&module.exports?module.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],(function(){return global.Base64})),{Base64:global.Base64}}))}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],200:[function(t,e,n){
/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";e.exports=function(t,e,n){if(!t)throw new TypeError("argument dest is required");if(!e)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(e).forEach((function(i){if(n||!r.call(t,i)){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o)}})),t};var r=Object.prototype.hasOwnProperty},{}],201:[function(t,e,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(var t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}r.prototype.define=function(t,e){for(var n in t){var r=t[n].map((function(t){return t.toLowerCase()}));n=n.toLowerCase();for(var i=0;i<r.length;i++)if("*"!=(o=r[i])[0]){if(!e&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}if(e||!this._extensions[n]){var o=r[0];this._extensions[n]="*"!=o[0]?o:o.substr(1)}}},r.prototype.getType=function(t){var e=(t=String(t)).replace(/^.*[/\\]/,"").toLowerCase(),n=e.replace(/^.*\./,"").toLowerCase(),r=e.length<t.length;return(n.length<e.length-1||!r)&&this._types[n]||null},r.prototype.getExtension=function(t){return(t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1)&&this._extensions[t.toLowerCase()]||null},e.exports=r},{}],202:[function(t,e,n){"use strict";var r=t("./Mime");e.exports=new r(t("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(t,e,n){e.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(t,e,n){var r=1e3,i=6e4,o=60*i,a=24*o;function s(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}e.exports=function(t,e){e=e||{};var n,l,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(t);if("number"===c&&isFinite(t))return e.long?(n=t,(l=Math.abs(n))>=a?s(n,l,a,"day"):l>=o?s(n,l,o,"hour"):l>=i?s(n,l,i,"minute"):l>=r?s(n,l,r,"second"):n+" ms"):function(t){var e=Math.abs(t);return e>=a?Math.round(t/a)+"d":e>=o?Math.round(t/o)+"h":e>=i?Math.round(t/i)+"m":e>=r?Math.round(t/r)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},{}],205:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return(i?"/":"")+(n=e(r(n.split("/"),(function(t){return!!t})),!i).join("/"))||"."},n.normalize=function(t){var o=n.isAbsolute(t),a="/"===i(t,-1);return(t=e(r(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),o=r(e.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},n.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:208}],206:[function(t,e,n){(function(t){(function(){"use strict";var r={function:!0,object:!0},i=r[typeof window]&&window||this,o=r[typeof n]&&n,a=r[typeof e]&&e&&!e.nodeType&&e,s=o&&a&&"object"==typeof t&&t;!s||s.global!==s&&s.window!==s&&s.self!==s||(i=s);var l=Math.pow(2,53)-1,c=/\bOpera/,u=Object.prototype,h=u.hasOwnProperty,d=u.toString;function f(t){return(t=String(t)).charAt(0).toUpperCase()+t.slice(1)}function p(t){return t=b(t),/^(?:webOS|i(?:OS|P))/.test(t)?t:f(t)}function m(t,e){for(var n in t)h.call(t,n)&&e(t[n],n,t)}function g(t){return null==t?f(t):d.call(t).slice(8,-1)}function v(t){return String(t).replace(/([ -])(?!$)/g,"$1?")}function y(t,e){var n=null;return function(t,e){var n=-1,r=t?t.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)e(t[n],n,t);else m(t,e)}(t,(function(r,i){n=e(n,r,i,t)})),n}function b(t){return String(t).replace(/^ +| +$/g,"")}var w=function t(e){var n=i,r=e&&"object"==typeof e&&"String"!=g(e);r&&(n=e,e=null);var o=n.navigator||{},a=o.userAgent||"";e||(e=a);var s,l,u,h,f,w=r?!!o.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(d.toString()),x=r?"Object":"ScriptBridgingProxyObject",S=r?"Object":"Environment",E=r&&n.java?"JavaPackage":g(n.java),C=r?"Object":"RuntimeObject",k=/\bJava/.test(E)&&n.java,_=k&&g(n.environment)==S,T=k?"a":"α",O=k?"b":"β",A=n.document||{},L=n.operamini||n.opera,D=c.test(D=r&&L?L["[[Class]]"]:g(L))?D:L=null,I=e,R=[],M=null,N=e==a,j=N&&L&&"function"==typeof L.version&&L.version(),P=y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(t,n){return t||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(e)&&(n.label||n)})),F=function(t){return y(t,(function(t,n){return t||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(e)&&(n.label||n)}))}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),B=z([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),U=function(t){return y(t,(function(t,n,r){return t||(n[B]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(B)]||RegExp("\\b"+v(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r}))}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),H=function(t){return y(t,(function(t,n){var r=n.pattern||v(n);return!t&&(t=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=function(t,e,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return e&&n&&/^Win/i.test(t)&&!/^Windows Phone /i.test(t)&&(r=r[/[\d.]+$/.exec(t)])&&(t="Windows "+r),t=String(t),e&&n&&(t=t.replace(RegExp(e,"i"),n)),t=p(t.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(t,r,n.label||n)),t}))}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function z(t){return y(t,(function(t,n){var r=n.pattern||v(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),n=n.label||n,t=p(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t}))}if(P&&(P=[P]),U&&!B&&(B=z([U])),(s=/\bGoogle TV\b/.exec(B))&&(B=s[0]),/\bSimulator\b/i.test(e)&&(B=(B?B+" ":"")+"Simulator"),"Opera Mini"==F&&/\bOPiOS\b/.test(e)&&R.push("running in Turbo/Uncompressed mode"),"IE"==F&&/\blike iPhone OS\b/.test(e)?(U=(s=t(e.replace(/like iPhone OS/,""))).manufacturer,B=s.product):/^iP/.test(B)?(F||(F="Safari"),H="iOS"+((s=/ OS ([\d_]+)/i.exec(e))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"!=F||/buntu/i.test(H)?U&&"Google"!=U&&(/Chrome/.test(F)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(B))||/\bAndroid\b/.test(H)&&/^Chrome/.test(F)&&/\bVersion\//i.test(e)?(F="Android Browser",H=/\bAndroid\b/.test(H)?H:"Android"):"Silk"==F?(/\bMobi/i.test(e)||(H="Android",R.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&R.unshift("accelerated")):"PaleMoon"==F&&(s=/\bFirefox\/([\d.]+)\b/.exec(e))?R.push("identifying as Firefox "+s[1]):"Firefox"==F&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(H||(H="Firefox OS"),B||(B=s[1])):!F||(s=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(F))?(F&&!B&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(s+"/")+8))&&(F=null),(s=B||U||H)&&(B||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H))&&(F=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H)?H:s)+" Browser")):"Electron"==F&&(s=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&R.push("Chromium "+s):H="Kubuntu",j||(j=y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",v(F),"(?:Firefox|Minefield|NetFront)"],(function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null}))),(s=("iCab"==P&&parseFloat(j)>3?"WebKit":/\bOpera\b/.test(F)&&(/\bOPR\b/.test(e)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(P)&&"WebKit"||!P&&/\bMSIE\b/i.test(e)&&("Mac OS"==H?"Tasman":"Trident")||"WebKit"==P&&/\bPlayStation\b(?! Vita\b)/i.test(F)&&"NetFront")&&(P=[s]),"IE"==F&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(F+=" Mobile",H="Windows Phone "+(/\+$/.test(s)?s:s+".x"),R.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(F="IE Mobile",H="Windows Phone 8.x",R.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=F&&"Trident"==P&&(s=/\brv:([\d.]+)/.exec(e))&&(F&&R.push("identifying as "+F+(j?" "+j:"")),F="IE",j=s[1]),N){if(h="global",f=null!=(u=n)?typeof u[h]:"number",/^(?:boolean|number|string|undefined)$/.test(f)||"object"==f&&!u[h])g(s=n.runtime)==x?(F="Adobe AIR",H=s.flash.system.Capabilities.os):g(s=n.phantom)==C?(F="PhantomJS",j=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof A.documentMode&&(s=/\bTrident\/(\d+)/i.exec(e))?(j=[j,A.documentMode],(s=+s[1]+4)!=j[1]&&(R.push("IE "+j[1]+" mode"),P&&(P[1]=""),j[1]=s),j="IE"==F?String(j[1].toFixed(1)):j[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(F)&&(R.push("masking as "+F+" "+j),F="IE",j="11.0",P=["Trident"],H="Windows");else if(k&&(I=(s=k.lang.System).getProperty("os.arch"),H=H||s.getProperty("os.name")+" "+s.getProperty("os.version")),_){try{j=n.require("ringo/engine").version.join("."),F="RingoJS"}catch(t){(s=n.system)&&s.global.system==n.system&&(F="Narwhal",H||(H=s[0].os||null))}F||(F="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(s=n.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(R.push("Node "+s.versions.node),F="Electron",j=s.versions.electron):"string"==typeof s.versions.nw&&(R.push("Chromium "+j,"Node "+s.versions.node),F="NW.js",j=s.versions.nw)),F||(F="Node.js",I=s.arch,H=s.platform,j=(j=/[\d.]+/.exec(s.version))?j[0]:null));H=H&&p(H)}if(j&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(N&&o.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(M=/b/i.test(s)?"beta":"alpha",j=j.replace(RegExp(s+"\\+?$"),"")+("beta"==M?O:T)+(/\d+\+?/.exec(s)||"")),"Fennec"==F||"Firefox"==F&&/\b(?:Android|Firefox OS)\b/.test(H))F="Firefox Mobile";else if("Maxthon"==F&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(B))"Xbox 360"==B&&(H=null),"Xbox 360"==B&&/\bIEMobile\b/.test(e)&&R.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(F)&&(!F||B||/Browser|Mobi/.test(F))||"Windows CE"!=H&&!/Mobi/i.test(e))if("IE"==F&&N)try{null===n.external&&R.unshift("platform preview")}catch(t){R.unshift("embedded")}else(/\bBlackBerry\b/.test(B)||/\bBB10\b/.test(e))&&(s=(RegExp(B.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||j)?(H=((s=[s,/BB10/.test(e)])[1]?(B=null,U="BlackBerry"):"Device Software")+" "+s[0],j=null):this!=m&&"Wii"!=B&&(N&&L||/Opera/.test(F)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==F&&/\bOS X (?:\d+\.){2,}/.test(H)||"IE"==F&&(H&&!/^Win/.test(H)&&j>5.5||/\bWindows XP\b/.test(H)&&j>8||8==j&&!/\bTrident\b/.test(e)))&&!c.test(s=t.call(m,e.replace(c,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),c.test(F)?(/\bIE\b/.test(s)&&"Mac OS"==H&&(H=null),s="identify"+s):(s="mask"+s,F=D?p(D.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(H=null),N||(j=null)),P=["Presto"],R.push(s));else F+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==F&&"+"==s[1].slice(-1)?(F="WebKit Nightly",M="alpha",j=s[1].slice(0,-1)):j!=s[1]&&j!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(j=null),s[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==P&&(P=["Blink"]),N&&(w||s[1])?(P&&(P[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=P?"27":"28")):(P&&(P[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:"8"),P&&(P[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==F&&(!j||parseInt(j)>45)&&(j=s)),"Opera"==F&&(s=/\bzbov|zvav$/.exec(H))?(F+=" ",R.unshift("desktop mode"),"zvav"==s?(F+="Mini",j=null):F+="Mobile",H=H.replace(RegExp(" *"+s+"$"),"")):"Safari"==F&&/\bChrome\b/.exec(P&&P[1])&&(R.unshift("desktop mode"),F="Chrome Mobile",j=null,/\bOS X\b/.test(H)?(U="Apple",H="iOS 4.3+"):H=null),j&&0==j.indexOf(s=/[\d.]+$/.exec(H))&&e.indexOf("/"+s+"-")>-1&&(H=b(H.replace(s,""))),P&&!/\b(?:Avant|Nook)\b/.test(F)&&(/Browser|Lunascape|Maxthon/.test(F)||"Safari"!=F&&/^iOS/.test(H)&&/\bSafari\b/.test(P[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(F)&&P[1])&&(s=P[P.length-1])&&R.push(s),R.length&&(R=["("+R.join("; ")+")"]),U&&B&&B.indexOf(U)<0&&R.push("on "+U),B&&R.push((/^on /.test(R[R.length-1])?"":"on ")+B),H&&(s=/ ([\d.+]+)$/.exec(H),l=s&&"/"==H.charAt(H.length-s[0].length-1),H={architecture:32,family:s&&!l?H.replace(s[0],""):H,version:s?s[1]:null,toString:function(){var t=this.version;return this.family+(t&&!l?" "+t:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(I))&&!/\bi686\b/i.test(I)?(H&&(H.architecture=64,H.family=H.family.replace(RegExp(" *"+s),"")),F&&(/\bWOW64\b/i.test(e)||N&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(e))&&R.unshift("32-bit")):H&&/^OS X/.test(H.family)&&"Chrome"==F&&parseFloat(j)>=39&&(H.architecture=64),e||(e=null);var G={};return G.description=e,G.layout=P&&P[0],G.manufacturer=U,G.name=F,G.prerelease=M,G.product=B,G.ua=e,G.version=F&&j,G.os=H||{architecture:null,family:null,version:null,toString:function(){return"null"}},G.parse=t,G.toString=function(){return this.description||""},G.version&&R.unshift(j),G.name&&R.unshift(F),H&&F&&(H!=String(H).split(" ")[0]||H!=F.split(" ")[0]&&!B)&&R.push(B?"("+H+")":"on "+H),R.length&&(G.description=R.join(" ")),G}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(i.platform=w,define((function(){return w}))):o&&a?m(w,(function(t,e){o[e]=t})):i.platform=w}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],207:[function(t,e,n){(function(t){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,t("_process"))},{_process:208}],208:[function(t,e,n){var r,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var t=l(f);h=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new m(t,e)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],209:[function(t,e,n){(function(t){!function(r){var i="object"==typeof n&&n&&!n.nodeType&&n,o="object"==typeof e&&e&&!e.nodeType&&e,a="object"==typeof t&&t;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,l,c=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function g(t){throw new RangeError(f[t])}function v(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function y(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+v((t=t.replace(d,".")).split("."),e).join(".")}function b(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function w(t){return v(t,(function(t){var e="";return t>65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function S(t,e,n){var r=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;r+=36)t=p(t/35);return p(r+36*t/(t+38))}function E(t){var e,n,r,i,o,a,s,l,u,h,d,f=[],m=t.length,v=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&g("not-basic"),f.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=v,a=1,s=36;i>=m&&g("invalid-input"),((l=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||l>p((c-v)/a))&&g("overflow"),v+=l*a,!(l<(u=s<=b?1:s>=b+26?26:s-b));s+=36)a>p(c/(h=36-u))&&g("overflow"),a*=h;b=S(v-o,e=f.length+1,0==o),p(v/e)>c-y&&g("overflow"),y+=p(v/e),v%=e,f.splice(v++,0,y)}return w(f)}function C(t){var e,n,r,i,o,a,s,l,u,h,d,f,v,y,w,E=[];for(f=(t=b(t)).length,e=128,n=0,o=72,a=0;a<f;++a)(d=t[a])<128&&E.push(m(d));for(r=i=E.length,i&&E.push("-");r<f;){for(s=c,a=0;a<f;++a)(d=t[a])>=e&&d<s&&(s=d);for(s-e>p((c-n)/(v=r+1))&&g("overflow"),n+=(s-e)*v,e=s,a=0;a<f;++a)if((d=t[a])<e&&++n>c&&g("overflow"),d==e){for(l=n,u=36;!(l<(h=u<=o?1:u>=o+26?26:u-o));u+=36)w=l-h,y=36-h,E.push(m(x(h+w%y,0))),l=p(w/y);E.push(m(x(l,0))),o=S(n,v,r==i),n=0,++r}++n,++e}return E.join("")}if(s={version:"1.4.1",ucs2:{decode:b,encode:w},decode:E,encode:C,toASCII:function(t){return y(t,(function(t){return h.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return y(t,(function(t){return u.test(t)?E(t.slice(4).toLowerCase()):t}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(i&&o)if(e.exports==i)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(i[l]=s[l]);else r.punycode=s}(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],210:[function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=t.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var h,d,f,p,m=t[u].replace(s,"%20"),g=m.indexOf(n);g>=0?(h=m.substr(0,g),d=m.substr(g+1)):(h=m,d=""),f=decodeURIComponent(h),p=decodeURIComponent(d),r(a,f)?i(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],211:[function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),(function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(r(t))})).join(e):s+encodeURIComponent(r(t[a]))})).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var a=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},{}],212:[function(t,e,n){"use strict";n.decode=n.parse=t("./decode"),n.encode=n.stringify=t("./encode")},{"./decode":210,"./encode":211}],213:[function(t,e,n){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(t,e,n){"use strict";var r=o(t("babel-runtime/core-js/object/create")),i=o(t("babel-runtime/core-js/object/keys"));function o(t){return t&&t.__esModule?t:{default:t}}var a=t("process-nextick-args"),s=i.default||function(t){var e=[];for(var n in t)e.push(n);return e};e.exports=p;var l=(0,r.default)(t("core-util-is"));l.inherits=t("inherits");var c=t("./_stream_readable"),u=t("./_stream_writable");l.inherits(p,c);for(var h=s(u.prototype),d=0;d<h.length;d++){var f=h[d];p.prototype[f]||(p.prototype[f]=u.prototype[f])}function p(t){if(!(this instanceof p))return new p(t);c.call(this,t),u.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||a.nextTick(g,this)}function g(t){t.end()}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),p.prototype._destroy=function(t,e){this.push(null),this.end(),a.nextTick(e,t)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};e.exports=l;var a=t("./_stream_transform"),s=(0,o.default)(t("core-util-is"));function l(t){if(!(this instanceof l))return new l(t);a.call(this,t)}s.inherits=t("inherits"),s.inherits(l,a),l.prototype._transform=function(t,e,n){n(null,t)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(t,e,n){(function(n,r){"use strict";var i=a(t("babel-runtime/core-js/object/get-prototype-of")),o=a(t("babel-runtime/core-js/object/create"));function a(t){return t&&t.__esModule?t:{default:t}}var s=t("process-nextick-args");e.exports=S;var l,c=t("isarray");S.ReadableState=x,t("events").EventEmitter;var u=function(t,e){return t.listeners(e).length},h=t("./internal/streams/stream"),d=t("safe-buffer").Buffer,f=r.Uint8Array||function(){},p=(0,o.default)(t("core-util-is"));p.inherits=t("inherits");var m=t("util"),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var v,y=t("./internal/streams/BufferList"),b=t("./internal/streams/destroy");p.inherits(S,h);var w=["error","close","destroy","pause","resume"];function x(e,n){e=e||{};var r=n instanceof(l=l||t("./_stream_duplex"));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=t("string_decoder/").StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(l=l||t("./_stream_duplex"),!(this instanceof S))return new S(e);this._readableState=new x(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),h.call(this)}function E(t,e,n,r,o){var a,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,_(t)}}(t,s)):(o||(a=function(t,e){var n,r;return r=e,d.isBuffer(r)||r instanceof f||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||(0,i.default)(e)===d.prototype||(e=function(t){return d.from(t)}(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):C(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?C(t,s,e,!1):O(t,s)):C(t,s,e,!1))):r||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function C(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&_(t)),O(t,e)}function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function _(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(g("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?s.nextTick(T,t):T(t))}function T(t){g("emit readable"),t.emit("readable"),I(t)}function O(t,e){e.readingMore||(e.readingMore=!0,s.nextTick(A,t,e))}function A(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(g("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function L(t){g("readable nexttick read 0"),t.read(0)}function D(t,e){e.reading||(g("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(g("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0==(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=d.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0==(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e),r}(t,e.buffer,e.decoder),n);var n}function M(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,s.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(t,e){this.push(null),e(t)},S.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=d.from(t,e),e=""),n=!0),E(this,t,e,!1,n)},S.prototype.unshift=function(t){return E(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=t("string_decoder/").StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this},S.prototype.read=function(t){g("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return g("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?M(this):_(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&M(this),null;var r,i=e.needReadable;return g("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&g("length less than watermark",i=!0),e.ended||e.reading?g("reading or ended",i=!1):i&&(g("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(n,e))),null===(r=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&M(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,g("pipe count=%d opts=%j",i.pipesCount,e);var o=e&&!1===e.end||t===n.stdout||t===n.stderr?b:l;function a(e,n){g("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",m),t.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",p),d=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){g("onend"),t.end()}i.endEmitted?s.nextTick(o):r.once("end",o),t.on("unpipe",a);var h=function(t){return function(){var e=t._readableState;g("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",h);var d=!1,f=!1;function p(e){g("ondata"),f=!1,!1!==t.write(e)||f||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!d&&(g("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(e){g("onerror",e),b(),t.removeListener("error",m),0===u(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),b()}function y(){g("onfinish"),t.removeListener("close",v),b()}function b(){g("unpipe"),r.unpipe(t)}return r.on("data",p),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?c(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",m),t.once("close",v),t.once("finish",y),t.emit("pipe",r),i.flowing||(g("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=j(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},S.prototype.on=function(t,e){var n=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&_(this):s.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var t=this._readableState;return t.flowing||(g("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,s.nextTick(D,t,e))}(this,t)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(g("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<w.length;o++)t.on(w[o],this.emit.bind(this,w[o]));return this._read=function(e){g("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=R}).call(this,t("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};e.exports=c;var a=t("./_stream_duplex"),s=(0,o.default)(t("core-util-is"));function l(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);a.call(this,t),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",u)}function u(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){h(t,e,n)})):h(this,null,null)}function h(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}s.inherits=t("inherits"),s.inherits(c,a),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},c.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},c.prototype._destroy=function(t,e){var n=this;a.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(t,e,n){(function(n,r){"use strict";var i=c(t("babel-runtime/core-js/object/define-property")),o=c(t("babel-runtime/core-js/symbol/has-instance")),a=c(t("babel-runtime/core-js/symbol")),s=c(t("babel-runtime/core-js/object/create")),l=c(t("babel-runtime/core-js/set-immediate"));function c(t){return t&&t.__esModule?t:{default:t}}var u=t("process-nextick-args");function h(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=E;var d,f=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?l.default:u.nextTick;E.WritableState=S;var p=(0,s.default)(t("core-util-is"));p.inherits=t("inherits");var m,g={deprecate:t("util-deprecate")},v=t("./internal/streams/stream"),y=t("safe-buffer").Buffer,b=r.Uint8Array||function(){},w=t("./internal/streams/destroy");function x(){}function S(e,n){d=d||t("./_stream_duplex"),e=e||{};var r=n instanceof d;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(u.nextTick(i,r),u.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),A(t,e))}(t,n,r,e,i);else{var o=T(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?f(k,t,n,o,i):k(t,n,o,i)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new h(this)}function E(e){if(d=d||t("./_stream_duplex"),!(m.call(E,this)||this instanceof d))return new E(e);this._writableState=new S(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),v.call(this)}function C(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),A(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,s=!0;n;)i[a]=n,n.isBuf||(s=!1),n=n.next,a+=1;i.allBuffers=s,C(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new h(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,u=n.callback;if(C(t,e,!1,e.objectMode?1:l.length,l,c,u),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function O(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),A(t,e)}))}function A(t,e){var n=T(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,u.nextTick(O,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}p.inherits(E,v),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:g.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof a.default&&o.default&&"function"==typeof Function.prototype[o.default]?(m=Function.prototype[o.default],(0,i.default)(E,o.default,{value:function(t){return!!m.call(this,t)||this===E&&t&&t._writableState instanceof S}})):m=function(t){return t instanceof this},E.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},E.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,a=!i.objectMode&&(r=t,y.isBuffer(r)||r instanceof b);return a&&!y.isBuffer(t)&&(t=function(t){return y.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=x),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),u.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),u.nextTick(r,o),i=!1),i}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=y.from(e,n)),e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,s,r,i,o);return l}(this,i,a,t,e,n)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},E.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},E.prototype._writev=null,E.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,A(t,e),n&&(e.finished?u.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(E.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=w.destroy,E.prototype._undestroy=w.undestroy,E.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=o,i=s,e.copy(n,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":228,util:71}],220:[function(t,e,n){"use strict";var r=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":207}],221:[function(t,e,n){"use strict";e.exports=t("events").EventEmitter},{events:192}],222:[function(t,e,n){e.exports=t("./readable").PassThrough},{"./readable":223}],223:[function(t,e,n){(n=e.exports=t("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(t,e,n){e.exports=t("./readable").Transform},{"./readable":223}],225:[function(t,e,n){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=t("./runtime"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(t,e,n){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=m;var u={},h={};h[o]=function(){return this};var d=Object.getPrototypeOf,f=d&&d(d(_([])));f&&f!==n&&r.call(f,o)&&(h=f);var p=b.prototype=v.prototype=Object.create(h);y.prototype=p.constructor=b,b.constructor=y,b[s]=y.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(p),t},c.awrap=function(t){return{__await:t}},w(x.prototype),x.prototype[a]=function(){return this},c.AsyncIterator=x,c.async=function(t,e,n,r){var i=new x(m(t,e,n,r));return c.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(p),p[s]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=_,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function m(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=g(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function b(){}function w(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){var e;this._invoke=function(n,i){function o(){return new Promise((function(e,o){!function e(n,i,o,a){var s=g(t[n],t,i);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(c).then((function(t){l.value=t,o(l)}),a)}a(s.arg)}(n,i,e,o)}))}return e=e?e.then(o,o):o()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},{}],228:[function(t,e,n){var r=t("buffer"),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},{buffer:73}],229:[function(t,e,n){(function(e){"use strict";var r=c(t("babel-runtime/core-js/string/from-code-point")),i=c(t("babel-runtime/core-js/json/stringify")),o=c(t("babel-runtime/helpers/typeof")),a=c(t("babel-runtime/core-js/object/define-property")),s=c(t("babel-runtime/core-js/object/keys")),l=c(t("babel-runtime/core-js/object/create"));function c(t){return t&&t.__esModule?t:{default:t}}!function(n){n.parser=function(t,e){return new h(t,e)},n.SAXParser=h,n.SAXStream=f,n.createStream=function(t,e){return new f(t,e)},n.MAX_BUFFER_LENGTH=65536;var c,u=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function h(t,e){if(!(this instanceof h))return new h(t,e);!function(t){for(var e=0,n=u.length;e<n;e++)t[u[e]]=""}(this),this.q=this.c="",this.bufferCheckPosition=n.MAX_BUFFER_LENGTH,this.opt=e||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!t,this.noscript=!(!t&&!this.opt.noscript),this.state=O.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?(0,l.default)(n.XML_ENTITIES):(0,l.default)(n.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=(0,l.default)(m)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),L(this,"onready")}n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],l.default||(Object.create=function(t){function e(){}return e.prototype=t,new e}),s.default||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),h.prototype={end:function(){N(this)},write:function(t){if(this.error)throw this.error;if(this.closed)return M(this,"Cannot write after close. Assign an onready handler.");if(null===t)return N(this);"object"===(void 0===t?"undefined":(0,o.default)(t))&&(t=t.toString());for(var e=0,r="";r=V(t,e++),this.c=r,r;)switch(this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++),this.state){case O.BEGIN:if(this.state=O.BEGIN_WHITESPACE,"\ufeff"===r)continue;G(this,r);continue;case O.BEGIN_WHITESPACE:G(this,r);continue;case O.TEXT:if(this.sawRoot&&!this.closedRoot){for(var i=e-1;r&&"<"!==r&&"&"!==r;)(r=V(t,e++))&&this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(i,e-1)}"<"!==r||this.sawRoot&&this.closedRoot&&!this.strict?(w(r)||this.sawRoot&&!this.closedRoot||j(this,"Text data outside of root node."),"&"===r?this.state=O.TEXT_ENTITY:this.textNode+=r):(this.state=O.OPEN_WAKA,this.startTagPosition=this.position);continue;case O.SCRIPT:"<"===r?this.state=O.SCRIPT_ENDING:this.script+=r;continue;case O.SCRIPT_ENDING:"/"===r?this.state=O.CLOSE_TAG:(this.script+="<"+r,this.state=O.SCRIPT);continue;case O.OPEN_WAKA:if("!"===r)this.state=O.SGML_DECL,this.sgmlDecl="";else if(w(r));else if(E(g,r))this.state=O.OPEN_TAG,this.tagName=r;else if("/"===r)this.state=O.CLOSE_TAG,this.tagName="";else if("?"===r)this.state=O.PROC_INST,this.procInstName=this.procInstBody="";else{if(j(this,"Unencoded <"),this.startTagPosition+1<this.position){var a=this.position-this.startTagPosition;r=new Array(a).join(" ")+r}this.textNode+="<"+r,this.state=O.TEXT}continue;case O.SGML_DECL:"[CDATA["===(this.sgmlDecl+r).toUpperCase()?(D(this,"onopencdata"),this.state=O.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+r==="--"?(this.state=O.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+r).toUpperCase()?(this.state=O.DOCTYPE,(this.doctype||this.sawRoot)&&j(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===r?(D(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=O.TEXT):x(r)?(this.state=O.SGML_DECL_QUOTED,this.sgmlDecl+=r):this.sgmlDecl+=r;continue;case O.SGML_DECL_QUOTED:r===this.q&&(this.state=O.SGML_DECL,this.q=""),this.sgmlDecl+=r;continue;case O.DOCTYPE:">"===r?(this.state=O.TEXT,D(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=r,"["===r?this.state=O.DOCTYPE_DTD:x(r)&&(this.state=O.DOCTYPE_QUOTED,this.q=r));continue;case O.DOCTYPE_QUOTED:this.doctype+=r,r===this.q&&(this.q="",this.state=O.DOCTYPE);continue;case O.DOCTYPE_DTD:this.doctype+=r,"]"===r?this.state=O.DOCTYPE:x(r)&&(this.state=O.DOCTYPE_DTD_QUOTED,this.q=r);continue;case O.DOCTYPE_DTD_QUOTED:this.doctype+=r,r===this.q&&(this.state=O.DOCTYPE_DTD,this.q="");continue;case O.COMMENT:"-"===r?this.state=O.COMMENT_ENDING:this.comment+=r;continue;case O.COMMENT_ENDING:"-"===r?(this.state=O.COMMENT_ENDED,this.comment=R(this.opt,this.comment),this.comment&&D(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+r,this.state=O.COMMENT);continue;case O.COMMENT_ENDED:">"!==r?(j(this,"Malformed comment"),this.comment+="--"+r,this.state=O.COMMENT):this.state=O.TEXT;continue;case O.CDATA:"]"===r?this.state=O.CDATA_ENDING:this.cdata+=r;continue;case O.CDATA_ENDING:"]"===r?this.state=O.CDATA_ENDING_2:(this.cdata+="]"+r,this.state=O.CDATA);continue;case O.CDATA_ENDING_2:">"===r?(this.cdata&&D(this,"oncdata",this.cdata),D(this,"onclosecdata"),this.cdata="",this.state=O.TEXT):"]"===r?this.cdata+="]":(this.cdata+="]]"+r,this.state=O.CDATA);continue;case O.PROC_INST:"?"===r?this.state=O.PROC_INST_ENDING:w(r)?this.state=O.PROC_INST_BODY:this.procInstName+=r;continue;case O.PROC_INST_BODY:if(!this.procInstBody&&w(r))continue;"?"===r?this.state=O.PROC_INST_ENDING:this.procInstBody+=r;continue;case O.PROC_INST_ENDING:">"===r?(D(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=O.TEXT):(this.procInstBody+="?"+r,this.state=O.PROC_INST_BODY);continue;case O.OPEN_TAG:E(v,r)?this.tagName+=r:(P(this),">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:(w(r)||j(this,"Invalid character in tag name"),this.state=O.ATTRIB));continue;case O.OPEN_TAG_SLASH:">"===r?(U(this,!0),H(this)):(j(this,"Forward-slash in opening tag not followed by >"),this.state=O.ATTRIB);continue;case O.ATTRIB:if(w(r))continue;">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:E(g,r)?(this.attribName=r,this.attribValue="",this.state=O.ATTRIB_NAME):j(this,"Invalid attribute name");continue;case O.ATTRIB_NAME:"="===r?this.state=O.ATTRIB_VALUE:">"===r?(j(this,"Attribute without value"),this.attribValue=this.attribName,B(this),U(this)):w(r)?this.state=O.ATTRIB_NAME_SAW_WHITE:E(v,r)?this.attribName+=r:j(this,"Invalid attribute name");continue;case O.ATTRIB_NAME_SAW_WHITE:if("="===r)this.state=O.ATTRIB_VALUE;else{if(w(r))continue;j(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",D(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===r?U(this):E(g,r)?(this.attribName=r,this.state=O.ATTRIB_NAME):(j(this,"Invalid attribute name"),this.state=O.ATTRIB)}continue;case O.ATTRIB_VALUE:if(w(r))continue;x(r)?(this.q=r,this.state=O.ATTRIB_VALUE_QUOTED):(j(this,"Unquoted attribute value"),this.state=O.ATTRIB_VALUE_UNQUOTED,this.attribValue=r);continue;case O.ATTRIB_VALUE_QUOTED:if(r!==this.q){"&"===r?this.state=O.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=r;continue}B(this),this.q="",this.state=O.ATTRIB_VALUE_CLOSED;continue;case O.ATTRIB_VALUE_CLOSED:w(r)?this.state=O.ATTRIB:">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:E(g,r)?(j(this,"No whitespace between attributes"),this.attribName=r,this.attribValue="",this.state=O.ATTRIB_NAME):j(this,"Invalid attribute name");continue;case O.ATTRIB_VALUE_UNQUOTED:if(!S(r)){"&"===r?this.state=O.ATTRIB_VALUE_ENTITY_U:this.attribValue+=r;continue}B(this),">"===r?U(this):this.state=O.ATTRIB;continue;case O.CLOSE_TAG:if(this.tagName)">"===r?H(this):E(v,r)?this.tagName+=r:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=O.SCRIPT):(w(r)||j(this,"Invalid tagname in closing tag"),this.state=O.CLOSE_TAG_SAW_WHITE);else{if(w(r))continue;C(g,r)?this.script?(this.script+="</"+r,this.state=O.SCRIPT):j(this,"Invalid tagname in closing tag."):this.tagName=r}continue;case O.CLOSE_TAG_SAW_WHITE:if(w(r))continue;">"===r?H(this):j(this,"Invalid characters in closing tag");continue;case O.TEXT_ENTITY:case O.ATTRIB_VALUE_ENTITY_Q:case O.ATTRIB_VALUE_ENTITY_U:var s,l;switch(this.state){case O.TEXT_ENTITY:s=O.TEXT,l="textNode";break;case O.ATTRIB_VALUE_ENTITY_Q:s=O.ATTRIB_VALUE_QUOTED,l="attribValue";break;case O.ATTRIB_VALUE_ENTITY_U:s=O.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===r?(this[l]+=z(this),this.entity="",this.state=s):E(this.entity.length?b:y,r)?this.entity+=r:(j(this,"Invalid character in entity name"),this[l]+="&"+this.entity+r,this.entity="",this.state=s);continue;default:throw new Error(this,"Unknown state: "+this.state)}return this.position>=this.bufferCheckPosition&&function(t){for(var e=Math.max(n.MAX_BUFFER_LENGTH,10),r=0,i=0,o=u.length;i<o;i++){var a=t[u[i]].length;if(a>e)switch(u[i]){case"textNode":I(t);break;case"cdata":D(t,"oncdata",t.cdata),t.cdata="";break;case"script":D(t,"onscript",t.script),t.script="";break;default:M(t,"Max buffer length exceeded: "+u[i])}r=Math.max(r,a)}var s=n.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=s+t.position}(this),this}
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;I(t=this),""!==t.cdata&&(D(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(D(t,"onscript",t.script),t.script="")}};try{c=t("stream").Stream}catch(t){c=function(){}}var d=n.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function f(t,e){if(!(this instanceof f))return new f(t,e);c.apply(this),this._parser=new h(t,e),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(t){n.emit("error",t),n._parser.error=null},this._decoder=null,d.forEach((function(t){(0,a.default)(n,"on"+t,{get:function(){return n._parser["on"+t]},set:function(e){if(!e)return n.removeAllListeners(t),n._parser["on"+t]=e,e;n.on(t,e)},enumerable:!0,configurable:!1})}))}f.prototype=(0,l.default)(c.prototype,{constructor:{value:f}}),f.prototype.write=function(n){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(n)){if(!this._decoder){var r=t("string_decoder").StringDecoder;this._decoder=new r("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},f.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},f.prototype.on=function(t,e){var n=this;return n._parser["on"+t]||-1===d.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),c.prototype.on.call(n,t,e)};var p="http://www.w3.org/XML/1998/namespace",m={xml:p,xmlns:"http://www.w3.org/2000/xmlns/"},g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function w(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function x(t){return'"'===t||"'"===t}function S(t){return">"===t||w(t)}function E(t,e){return t.test(e)}function C(t,e){return!E(t,e)}var k,_,T,O=0;for(var A in n.STATE={BEGIN:O++,BEGIN_WHITESPACE:O++,TEXT:O++,TEXT_ENTITY:O++,OPEN_WAKA:O++,SGML_DECL:O++,SGML_DECL_QUOTED:O++,DOCTYPE:O++,DOCTYPE_QUOTED:O++,DOCTYPE_DTD:O++,DOCTYPE_DTD_QUOTED:O++,COMMENT_STARTING:O++,COMMENT:O++,COMMENT_ENDING:O++,COMMENT_ENDED:O++,CDATA:O++,CDATA_ENDING:O++,CDATA_ENDING_2:O++,PROC_INST:O++,PROC_INST_BODY:O++,PROC_INST_ENDING:O++,OPEN_TAG:O++,OPEN_TAG_SLASH:O++,ATTRIB:O++,ATTRIB_NAME:O++,ATTRIB_NAME_SAW_WHITE:O++,ATTRIB_VALUE:O++,ATTRIB_VALUE_QUOTED:O++,ATTRIB_VALUE_CLOSED:O++,ATTRIB_VALUE_UNQUOTED:O++,ATTRIB_VALUE_ENTITY_Q:O++,ATTRIB_VALUE_ENTITY_U:O++,CLOSE_TAG:O++,CLOSE_TAG_SAW_WHITE:O++,SCRIPT:O++,SCRIPT_ENDING:O++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,s.default)(n.ENTITIES).forEach((function(t){var e=n.ENTITIES[t],r="number"==typeof e?String.fromCharCode(e):e;n.ENTITIES[t]=r})),n.STATE)n.STATE[n.STATE[A]]=A;function L(t,e,n){t[e]&&t[e](n)}function D(t,e,n){t.textNode&&I(t),L(t,e,n)}function I(t){t.textNode=R(t.opt,t.textNode),t.textNode&&L(t,"ontext",t.textNode),t.textNode=""}function R(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function M(t,e){return I(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,L(t,"onerror",e),t}function N(t){return t.sawRoot&&!t.closedRoot&&j(t,"Unclosed root tag"),t.state!==O.BEGIN&&t.state!==O.BEGIN_WHITESPACE&&t.state!==O.TEXT&&M(t,"Unexpected end"),I(t),t.c="",t.closed=!0,L(t,"onend"),h.call(t,t.strict,t.opt),t}function j(t,e){if("object"!==(void 0===t?"undefined":(0,o.default)(t))||!(t instanceof h))throw new Error("bad call to strictFail");t.strict&&M(t,e)}function P(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,D(t,"onopentagstart",n)}function F(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function B(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=F(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==p)j(t,"xml: prefix must be bound to "+p+"\nActual: "+t.attribValue);else if("xmlns"===r&&"http://www.w3.org/2000/xmlns/"!==t.attribValue)j(t,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=(0,l.default)(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,D(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function U(t,e){if(t.opt.xmlns){var n=t.tag,r=F(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(j(t,"Unbound namespace prefix: "+(0,i.default)(t.tagName)),n.uri=r.prefix);var o=t.tags[t.tags.length-1]||t;n.ns&&o.ns!==n.ns&&(0,s.default)(n.ns).forEach((function(e){D(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var a=0,l=t.attribList.length;a<l;a++){var c=t.attribList[a],u=c[0],h=c[1],d=F(u,!0),f=d.prefix,p=d.local,m=""===f?"":n.ns[f]||"",g={name:u,value:h,prefix:f,local:p,uri:m};f&&"xmlns"!==f&&!m&&(j(t,"Unbound namespace prefix: "+(0,i.default)(f)),g.uri=f),t.tag.attributes[u]=g,D(t,"onattribute",g)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),D(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=O.TEXT:t.state=O.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function H(t){if(!t.tagName)return j(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=O.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=O.SCRIPT);D(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)j(t,"Unexpected close tag");if(e<0)return j(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=O.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,D(t,"onclosetag",t.tagName);var a={};for(var l in o.ns)a[l]=o.ns[l];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==c.ns&&(0,s.default)(o.ns).forEach((function(e){var n=o.ns[e];D(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=O.TEXT}function z(t){var e,n=t.entity,i=n.toLowerCase(),o="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[i]?t.ENTITIES[i]:("#"===(n=i).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||o.toLowerCase()!==n?(j(t,"Invalid character entity"),"&"+t.entity+";"):(0,r.default)(e))}function G(t,e){"<"===e?(t.state=O.OPEN_WAKA,t.startTagPosition=t.position):w(e)||(j(t,"Non-whitespace before first tag."),t.textNode=e,t.state=O.TEXT)}function V(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}O=n.STATE,r.default||(k=String.fromCharCode,_=Math.floor,T=function(){var t,e,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var a="";++i<o;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||_(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,r.push(t,e)),(i+1===o||r.length>n)&&(a+=k.apply(null,r),r.length=0)}return a},a.default?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(void 0===n?(void 0).sax={}:n)}).call(this,t("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(t,e,n){e.exports=i;var r=t("events").EventEmitter;function i(){r.call(this)}t("inherits")(i,r),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,t.end())}function l(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(u(),0===r.listenerCount(this,"error"))throw t}function u(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),t.removeListener("close",u)}return n.on("error",c),t.on("error",c),n.on("end",u),n.on("close",u),t.on("close",u),t.emit("pipe",n),t}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(t,e,n){(function(e){var r=t("./lib/request"),i=t("./lib/response"),o=t("xtend"),a=t("builtin-status-codes"),s=t("url"),l=n;l.request=function(t,n){t="string"==typeof t?s.parse(t):o(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var h=new r(t);return n&&h.on("response",n),h},l.get=function(t,e){var n=l.request(t,e);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(t,e,n){(function(t){"use strict";n.fetch=s(t.fetch)&&s(t.ReadableStream),n.writableStream=s(t.WritableStream),n.abortController=s(t.AbortController),n.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),n.blobConstructor=!0}catch(t){}var e;function r(){if(void 0!==e)return e;if(t.XMLHttpRequest){e=new t.XMLHttpRequest;try{e.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){e=null}}else e=null;return e}function i(t){var e=r();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,a=o&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"==typeof t}n.arraybuffer=n.fetch||o&&i("arraybuffer"),n.msstream=!n.fetch&&a&&i("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&o&&i("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!r()&&s(r().overrideMimeType),n.vbArray=s(t.VBArray),e=null}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],233:[function(t,e,n){(function(n,r,i){"use strict";var o,a=t("babel-runtime/core-js/object/keys"),s=(o=a)&&o.__esModule?o:{default:o},l=t("./capability"),c=t("inherits"),u=t("./response"),h=t("readable-stream"),d=t("to-arraybuffer"),f=u.IncomingMessage,p=u.readyStates,m=e.exports=function(t){var e,n=this;h.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new i(t.auth).toString("base64")),(0,s.default)(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var r=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!l.abortController)r=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!l.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}n._mode=function(t,e){return l.fetch&&e?"fetch":l.mozchunkedarraybuffer?"moz-chunked-arraybuffer":l.msstream?"ms-stream":l.arraybuffer&&t?"arraybuffer":l.vbArray&&t?"text:vbarray":"text"}(e,r),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};c(m,h.Writable),m.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===g.indexOf(n)&&(this._headers[n]={name:t,value:e})},m.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},m.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},m.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts,o=t._headers,a=null;"GET"!==e.method&&"HEAD"!==e.method&&(a=l.arraybuffer?d(i.concat(t._body)):l.blobConstructor?new r.Blob(t._body.map((function(t){return d(t)})),{type:(o["content-type"]||{}).value||""}):i.concat(t._body).toString());var c=[];if((0,s.default)(o).forEach((function(t){var e=o[t].name,n=o[t].value;Array.isArray(n)?n.forEach((function(t){c.push([e,t])})):c.push([e,n])})),"fetch"===t._mode){var u=null;if(l.abortController){var h=new AbortController;u=h.signal,t._fetchAbortController=h,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=r.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}r.fetch(t._opts.url,{method:t._opts.method,headers:c,body:a||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){r.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var f=t._xhr=new r.XMLHttpRequest;try{f.open(t._opts.method,t._opts.url,!0)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}"responseType"in f&&(f.responseType=t._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(f.timeout=e.requestTimeout,f.ontimeout=function(){t.emit("requestTimeout")}),c.forEach((function(t){f.setRequestHeader(t[0],t[1])})),t._response=null,f.onreadystatechange=function(){switch(f.readyState){case p.LOADING:case p.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(f.onprogress=function(){t._onXHRProgress()}),f.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{f.send(a)}catch(e){return void n.nextTick((function(){t.emit("error",e)}))}}}},m.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},m.prototype._connect=function(){var t=this;t._destroyed||(t._response=new f(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},m.prototype._write=function(t,e,n){this._body.push(t),n()},m.prototype.abort=m.prototype.destroy=function(){this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},m.prototype.end=function(t,e,n){"function"==typeof t&&(n=t,t=void 0),h.Writable.prototype.end.call(this,t,e,n)},m.prototype.flushHeaders=function(){},m.prototype.setTimeout=function(){},m.prototype.setNoDelay=function(){},m.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,t("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(t,e,n){(function(e,r,i){"use strict";var o,a=t("babel-runtime/core-js/promise"),s=(o=a)&&o.__esModule?o:{default:o},l=t("./capability"),c=t("inherits"),u=t("readable-stream"),h=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=n.IncomingMessage=function(t,n,o,a){var c=this;if(u.Readable.call(c),c._mode=o,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===o){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),l.writableStream){var h=new WritableStream({write:function(t){return new s.default((function(e,n){c._destroyed?n():c.push(new i(t))?e():c._resumeFetch=e}))},close:function(){r.clearTimeout(a),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void n.body.pipeTo(h).catch((function(t){r.clearTimeout(a),c._destroyed||c.emit("error",t)}))}catch(t){}}var d=n.body.getReader();!function t(){d.read().then((function(e){if(!c._destroyed){if(e.done)return r.clearTimeout(a),void c.push(null);c.push(new i(e.value)),t()}})).catch((function(t){r.clearTimeout(a),c._destroyed||c.emit("error",t)}))}()}else if(c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(e[2])):void 0!==c.headers[n]?c.headers[n]+=", "+e[2]:c.headers[n]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset="x-user-defined",!l.overrideMimeType){var f=c.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};c(d,u.Readable),d.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},d.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text:vbarray":if(e.readyState!==h.DONE)break;try{n=new r.VBArray(e.responseBody).toArray()}catch(t){}if(null!==n){t.push(new i(n));break}case"text":try{n=e.responseText}catch(e){t._mode="text:vbarray";break}if(n.length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new i(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);t.push(a)}else t.push(o,t._charset);t._pos=n.length}break;case"arraybuffer":if(e.readyState!==h.DONE||!e.response)break;n=e.response,t.push(new i(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=e.response,e.readyState!==h.LOADING||!n)break;t.push(new i(new Uint8Array(n)));break;case"ms-stream":if(n=e.response,e.readyState!==h.LOADING)break;var l=new r.MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(new i(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){t.push(null)},l.readAsArrayBuffer(n)}t._xhr.readyState===h.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,t("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=u,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function u(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}n.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":228}],236:[function(t,e,n){(function(e,r){var i=t("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"==typeof e?e:function(t){var e=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"==typeof r?r:function(t){delete s[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(t,e,n){var r=t("buffer").Buffer;e.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(r.isBuffer(t)){for(var e=new Uint8Array(t.length),n=t.length,i=0;i<n;i++)e[i]=t[i];return e.buffer}throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(t,e,n){"use strict";var r=t("punycode"),i=t("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=b,n.resolve=function(t,e){return b(t,!1,!0).resolve(e)},n.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},n.format=function(t){return i.isString(t)&&(t=b(t)),t instanceof o?t.format():o.prototype.format.call(t)},n.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),h=["%","/","?",";","#"].concat(u),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=t("querystring");function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(s);c[0]=c[0].replace(/\\/g,"/");var b=t=c.join(s);if(b=b.trim(),!n&&1===t.split("#").length){var w=l.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var x=a.exec(b);if(x){var S=(x=x[0]).toLowerCase();this.protocol=S,b=b.substr(x.length)}if(n||x||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||x&&g[x]||(b=b.substr(2),this.slashes=!0)}if(!g[x]&&(E||x&&!v[x])){for(var C,k,_=-1,T=0;T<d.length;T++)-1!==(O=b.indexOf(d[T]))&&(-1===_||O<_)&&(_=O);for(-1!==(k=-1===_?b.lastIndexOf("@"):b.lastIndexOf("@",_))&&(C=b.slice(0,k),b=b.slice(k+1),this.auth=decodeURIComponent(C)),_=-1,T=0;T<h.length;T++){var O;-1!==(O=b.indexOf(h[T]))&&(-1===_||O<_)&&(_=O)}-1===_&&(_=b.length),this.host=b.slice(0,_),b=b.slice(_),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var L=this.hostname.split(/\./),D=(T=0,L.length);T<D;T++){var I=L[T];if(I&&!I.match(f)){for(var R="",M=0,N=I.length;M<N;M++)I.charCodeAt(M)>127?R+="x":R+=I[M];if(!R.match(f)){var j=L.slice(0,T),P=L.slice(T+1),F=I.match(p);F&&(j.push(F[1]),P.unshift(F[2])),P.length&&(b="/"+P.join(".")+b),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+B,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(T=0,D=u.length;T<D;T++){var H=u[T];if(-1!==b.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),b=b.split(H).join(z)}}var G=b.indexOf("#");-1!==G&&(this.hash=b.substr(G),b=b.slice(0,G));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),e&&(this.query=y.parse(this.query)),b=b.slice(0,V)):e&&(this.search="",this.query={}),b&&(this.pathname=b),v[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){B=this.pathname||"";var W=this.search||"";this.path=B+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=t[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!v[t.protocol]){for(var h=Object.keys(t),d=0;d<h.length;d++){var f=h[d];n[f]=t[f]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||g[t.protocol])n.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",y=n.search||"";n.path=m+y}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=w||b||n.host&&t.pathname,S=x,E=n.pathname&&n.pathname.split("/")||[],C=(p=t.pathname&&t.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),x=x&&(""===p[0]||""===E[0])),w)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),n.search=t.search,n.query=t.query;else if(!i.isNullOrUndefined(t.search))return C&&(n.hostname=n.host=E.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=E.slice(-1)[0],_=(n.host||t.host||E.length>1)&&("."===k||".."===k)||""===k,T=0,O=E.length;O>=0;O--)"."===(k=E[O])?E.splice(O,1):".."===k?(E.splice(O,1),T++):T&&(E.splice(O,1),T--);if(!x&&!S)for(;T--;T)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),_&&"/"!==E.join("/").substr(-1)&&E.push("");var A,L=""===E[0]||E[0]&&"/"===E[0].charAt(0);return C&&(n.hostname=n.host=L?"":E.length?E.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),(x=x||n.host&&E.length)&&!L&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":239,punycode:209,querystring:212}],239:[function(t,e,n){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],240:[function(t,e,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(t){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],241:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],242:[function(t,e,n){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],243:[function(t,e,n){(function(e,r){var i=/%[sdj%]/g;n.format=function(t){if(!v(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),l=r[n];n<o;l=r[++n])m(l)||!w(l)?a+=" "+l:a+=" "+s(l);return a},n.deprecate=function(t,i){if(y(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,a={};function s(t,e){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(e)?r.showHidden=e:e&&n._extend(r,e),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,t,r.depth)}function l(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function u(t,e,r){if(t.customInspect&&e&&E(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return v(i)||(i=u(t,i,r)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,e);if(o)return o;var a=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),S(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(e);if(0===a.length){if(E(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(b(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(S(e))return h(e)}var c,w="",C=!1,k=["{","}"];return f(e)&&(C=!0,k=["[","]"]),E(e)&&(w=" [Function"+(e.name?": "+e.name:"")+"]"),b(e)&&(w=" "+RegExp.prototype.toString.call(e)),x(e)&&(w=" "+Date.prototype.toUTCString.call(e)),S(e)&&(w=" "+h(e)),0!==a.length||C&&0!=e.length?r<0?b(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=C?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)O(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,e,r,s,a):a.map((function(n){return d(t,e,r,s,n,C)})),t.seen.pop(),function(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,w,k)):k[0]+w+k[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=m(n)?u(t,l.value,null):u(t,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function y(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function x(t){return w(t)&&"[object Date]"===C(t)}function S(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function E(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}n.debuglog=function(t){if(y(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=e.pid;a[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else a[t]=function(){};return a[t]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=f,n.isBoolean=p,n.isNull=m,n.isNullOrUndefined=function(t){return null==t},n.isNumber=g,n.isString=v,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=y,n.isRegExp=b,n.isObject=w,n.isDate=x,n.isError=S,n.isFunction=E,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),_[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){console.log("%s - %s",T(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(t,e,n){"use strict";(function(){n.stripBOM=function(t){return"\ufeff"===t[0]?t.substring(1):t}}).call(void 0)},{}],245:[function(t,e,n){"use strict";var r=o(t("babel-runtime/helpers/typeof")),i=o(t("babel-runtime/core-js/object/keys"));function o(t){return t&&t.__esModule?t:{default:t}}(function(){var e,o,a,s,l,c={}.hasOwnProperty;e=t("xmlbuilder"),o=t("./defaults").defaults,s=function(t){return"string"==typeof t&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},l=function(t){return"<![CDATA["+a(t)+"]]>"},a=function(t){return t.replace("]]>","]]]]><![CDATA[>")},n.Builder=function(){function t(t){var e,n,r;for(e in this.options={},n=o[.2])c.call(n,e)&&(r=n[e],this.options[e]=r);for(e in t)c.call(t,e)&&(r=t[e],this.options[e]=r)}return t.prototype.buildObject=function(t){var n,a,u,h,d,f;return n=this.options.attrkey,a=this.options.charkey,1===(0,i.default)(t).length&&this.options.rootName===o[.2].rootName?t=t[d=(0,i.default)(t)[0]]:d=this.options.rootName,f=this,u=function(t,e){var i,o,h,d,p,m;if("object"!==(void 0===e?"undefined":(0,r.default)(e)))f.options.cdata&&s(e)?t.raw(l(e)):t.txt(e);else if(Array.isArray(e)){for(d in e)if(c.call(e,d))for(p in o=e[d])h=o[p],t=u(t.ele(p),h).up()}else for(p in e)if(c.call(e,p))if(o=e[p],p===n){if("object"===(void 0===o?"undefined":(0,r.default)(o)))for(i in o)m=o[i],t=t.att(i,m)}else if(p===a)t=f.options.cdata&&s(o)?t.raw(l(o)):t.txt(o);else if(Array.isArray(o))for(d in o)c.call(o,d)&&(t="string"==typeof(h=o[d])?f.options.cdata&&s(h)?t.ele(p).raw(l(h)).up():t.ele(p,h).up():u(t.ele(p),h).up());else"object"===(void 0===o?"undefined":(0,r.default)(o))?t=u(t.ele(p),o).up():"string"==typeof o&&f.options.cdata&&s(o)?t=t.ele(p).raw(l(o)).up():(null==o&&(o=""),t=t.ele(p,o.toString()).up());return t},h=e.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(h,t).end(this.options.renderOpts)},t}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(t,e,n){"use strict";(function(){n.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(t,e,n){"use strict";var r=s(t("babel-runtime/core-js/promise")),i=s(t("babel-runtime/core-js/object/get-own-property-names")),o=s(t("babel-runtime/core-js/object/keys")),a=s(t("babel-runtime/helpers/typeof"));function s(t){return t&&t.__esModule?t:{default:t}}(function(){var e,s,l,c,u,h,d,f,p=function(t,e){return function(){return t.apply(e,arguments)}},m={}.hasOwnProperty;d=t("sax"),l=t("events"),e=t("./bom"),h=t("./processors"),f=t("timers").setImmediate,s=t("./defaults").defaults,c=function(t){return"object"===(void 0===t?"undefined":(0,a.default)(t))&&null!=t&&0===(0,o.default)(t).length},u=function(t,e,n){var r,i;for(r=0,i=t.length;r<i;r++)e=(0,t[r])(e,n);return e},n.Parser=function(t){function l(t){var e,r,i;if(this.parseStringPromise=p(this.parseStringPromise,this),this.parseString=p(this.parseString,this),this.reset=p(this.reset,this),this.assignOrPush=p(this.assignOrPush,this),this.processAsync=p(this.processAsync,this),!(this instanceof n.Parser))return new n.Parser(t);for(e in this.options={},r=s[.2])m.call(r,e)&&(i=r[e],this.options[e]=i);for(e in t)m.call(t,e)&&(i=t[e],this.options[e]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(h.normalize)),this.reset()}return function(t,e){for(var n in e)m.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(l,t),l.prototype.processAsync=function(){var t,e;try{return this.remaining.length<=this.options.chunkSize?(t=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(t),this.saxParser.close()):(t=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(t),f(this.processAsync))}catch(t){if(e=t,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(e)}},l.prototype.assignOrPush=function(t,e,n){return e in t?(t[e]instanceof Array||(t[e]=[t[e]]),t[e].push(n)):this.options.explicitArray?t[e]=[n]:t[e]=n},l.prototype.reset=function(){var t,e,n,r,s;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(s=this,function(t){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",t)}),this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended)return t.saxParser.ended=!0,t.emit("end",t.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],t=this.options.attrkey,e=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var o,a,s,l,c;if((s={})[e]="",!n.options.ignoreAttrs)for(o in c=i.attributes)m.call(c,o)&&(t in s||n.options.mergeAttrs||(s[t]={}),a=n.options.attrValueProcessors?u(n.options.attrValueProcessors,i.attributes[o],o):i.attributes[o],l=n.options.attrNameProcessors?u(n.options.attrNameProcessors,o):o,n.options.mergeAttrs?n.assignOrPush(s,l,a):s[t][l]=a);return s["#name"]=n.options.tagNameProcessors?u(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(s[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(s)}}(this),this.saxParser.onclosetag=function(t){return function(){var n,s,l,h,d,f,p,g,v,y;if(f=r.pop(),d=f["#name"],t.options.explicitChildren&&t.options.preserveChildrenOrder||delete f["#name"],!0===f.cdata&&(n=f.cdata,delete f.cdata),v=r[r.length-1],f[e].match(/^\s*$/)&&!n?(s=f[e],delete f[e]):(t.options.trim&&(f[e]=f[e].trim()),t.options.normalize&&(f[e]=f[e].replace(/\s{2,}/g," ").trim()),f[e]=t.options.valueProcessors?u(t.options.valueProcessors,f[e],d):f[e],1===(0,o.default)(f).length&&e in f&&!t.EXPLICIT_CHARKEY&&(f=f[e])),c(f)&&(f=""!==t.options.emptyTag?t.options.emptyTag:s),null!=t.options.validator&&(y="/"+function(){var t,e,n;for(n=[],t=0,e=r.length;t<e;t++)h=r[t],n.push(h["#name"]);return n}().concat(d).join("/"),function(){var e;try{f=t.options.validator(y,v&&v[d],f)}catch(n){return e=n,t.emit("error",e)}}()),t.options.explicitChildren&&!t.options.mergeAttrs&&"object"===(void 0===f?"undefined":(0,a.default)(f)))if(t.options.preserveChildrenOrder){if(v){for(l in v[t.options.childkey]=v[t.options.childkey]||[],p={},f)m.call(f,l)&&(p[l]=f[l]);v[t.options.childkey].push(p),delete f["#name"],1===(0,o.default)(f).length&&e in f&&!t.EXPLICIT_CHARKEY&&(f=f[e])}}else h={},t.options.attrkey in f&&(h[t.options.attrkey]=f[t.options.attrkey],delete f[t.options.attrkey]),!t.options.charsAsChildren&&t.options.charkey in f&&(h[t.options.charkey]=f[t.options.charkey],delete f[t.options.charkey]),(0,i.default)(f).length>0&&(h[t.options.childkey]=f),f=h;return r.length>0?t.assignOrPush(v,d,f):(t.options.explicitRoot&&(g=f,(f={})[d]=g),t.resultObject=f,t.saxParser.ended=!0,t.emit("end",t.resultObject))}}(this),n=function(t){return function(n){var i,o;if(o=r[r.length-1])return o[e]+=n,t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(o[t.options.childkey]=o[t.options.childkey]||[],(i={"#name":"__text__"})[e]=n,t.options.normalize&&(i[e]=i[e].replace(/\s{2,}/g," ").trim()),o[t.options.childkey].push(i)),o}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(t){var e;if(e=n(t))return e.cdata=!0}},l.prototype.parseString=function(t,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(t){return this.reset(),n(null,t)})),this.on("error",(function(t){return this.reset(),n(t)})));try{return""===(t=t.toString()).trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,f(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(t){if(r=t,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},l.prototype.parseStringPromise=function(t){return new r.default((e=this,function(n,r){return e.parseString(t,(function(t,e){return t?r(t):n(e)}))}));var e},l}(l),n.parseString=function(t,e,r){var i,o;return null!=r?("function"==typeof r&&(i=r),"object"===(void 0===e?"undefined":(0,a.default)(e))&&(o=e)):("function"==typeof e&&(i=e),o={}),new n.Parser(o).parseString(t,i)},n.parseStringPromise=function(t,e){var r;return"object"===(void 0===e?"undefined":(0,a.default)(e))&&(r=e),new n.Parser(r).parseStringPromise(t)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(t,e,n){"use strict";(function(){var t;t=new RegExp(/(?!xmlns)^.*:/),n.normalize=function(t){return t.toLowerCase()},n.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},n.stripPrefix=function(e){return e.replace(t,"")},n.parseNumbers=function(t){return isNaN(t)||(t=t%1==0?parseInt(t,10):parseFloat(t)),t},n.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t="true"===t.toLowerCase()),t}}).call(void 0)},{}],249:[function(t,e,n){"use strict";(function(){var e,r,i,o,a={}.hasOwnProperty;r=t("./defaults"),e=t("./builder"),i=t("./parser"),o=t("./processors"),n.defaults=r.defaults,n.processors=o,n.ValidationError=function(t){function e(t){this.message=t}return function(t,e){for(var n in e)a.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,Error),e}(),n.Builder=e.Builder,n.Parser=i.Parser,n.parseString=i.parseString,n.parseStringPromise=i.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(t,e,n){"use strict";(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(t,e,n){"use strict";(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(t,e,n){"use strict";var r=a(t("babel-runtime/core-js/object/get-prototype-of")),i=a(t("babel-runtime/helpers/typeof")),o=a(t("babel-runtime/core-js/object/assign"));function a(t){return t&&t.__esModule?t:{default:t}}(function(){var t,n,a,s,l,c,u,h=[].slice,d={}.hasOwnProperty;t=function(){var t,e,n,r,i,a;if(a=arguments[0],i=2<=arguments.length?h.call(arguments,1):[],l(o.default))o.default.apply(null,arguments);else for(t=0,n=i.length;t<n;t++)if(null!=(r=i[t]))for(e in r)d.call(r,e)&&(a[e]=r[e]);return a},l=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},c=function(t){var e;return!!t&&("function"===(e=void 0===t?"undefined":(0,i.default)(t))||"object"===e)},a=function(t){return l(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},s=function(t){var e;if(a(t))return!t.length;for(e in t)if(d.call(t,e))return!1;return!0},u=function(t){var e,n;return c(t)&&(n=(0,r.default)(t))&&(e=n.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},n=function(t){return l(t.valueOf)?t.valueOf():t},e.exports.assign=t,e.exports.isFunction=l,e.exports.isObject=c,e.exports.isArray=a,e.exports.isEmpty=s,e.exports.isPlainObject=u,e.exports.getValue=n}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(t,e,n){"use strict";(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n;n=t("./NodeType"),t("./XMLNode"),e.exports=function(){function t(t,e,r){if(this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==e)throw new Error("Missing attribute name. "+this.debugInfo(e));this.name=this.stringify.name(e),this.value=this.stringify.attValue(r),this.type=n.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(t){return this.options.writer.attribute(this,this.options.writer.filterOptions(t))},t.prototype.debugInfo=function(t){return null==(t=t||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+t+"}, parent: <"+this.parent.name+">"},t.prototype.isEqualNode=function(t){return t.namespaceURI===this.namespaceURI&&t.prefix===this.prefix&&t.localName===this.localName&&t.value===this.value},t}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=t("./NodeType"),r=t("./XMLCharacterData"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=n.CData,this.value=this.stringify.cdata(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r={}.hasOwnProperty;n=t("./XMLNode"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.value=""}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.data===this.data},e}(n)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=t("./NodeType"),r=t("./XMLCharacterData"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=n.Comment,this.value=this.stringify.comment(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(t,e,n){"use strict";var r=o(t("babel-runtime/core-js/object/keys")),i=o(t("babel-runtime/core-js/object/create"));function o(t){return t&&t.__esModule?t:{default:t}}(function(){var n,o;n=t("./XMLDOMErrorHandler"),o=t("./XMLDOMStringList"),e.exports=function(){function t(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new n,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=(0,i.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new o((0,r.default)(this.defaultParams))}}),t.prototype.getParameter=function(t){return this.params.hasOwnProperty(t)?this.params[t]:null},t.prototype.canSetParameter=function(t,e){return!0},t.prototype.setParameter=function(t,e){return null!=e?this.params[t]=e:delete this.params[t]},t}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(t,e,n){"use strict";(function(){e.exports=function(){function t(){}return t.prototype.handleError=function(t){throw new Error(t)},t}()}).call(void 0)},{}],260:[function(t,e,n){"use strict";(function(){e.exports=function(){function t(){}return t.prototype.hasFeature=function(t,e){return!0},t.prototype.createDocumentType=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(void 0)},{}],261:[function(t,e,n){"use strict";(function(){e.exports=function(){function t(t){this.arr=t||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(t){return this.arr[t]||null},t.prototype.contains=function(t){return-1!==this.arr.indexOf(t)},t}()}).call(void 0)},{}],262:[function(t,e,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t,r,i,o,a,s){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==a.indexOf("#")&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(s&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=n.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),s&&(this.defaultValue=this.stringify.dtdAttDefault(s)),this.defaultValueType=a}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(t,e,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t,r,i){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(r),this.type=n.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(t,e,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=t("./Utility").isObject,r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t,r,o,a){if(e.__super__.constructor.call(this,t),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==a)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!r,this.name=this.stringify.name(o),this.type=n.EntityDeclaration,i(a)){if(!a.pubID&&!a.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(a.pubID&&!a.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=a.pubID&&(this.pubID=this.stringify.dtdPubID(a.pubID)),null!=a.sysID&&(this.sysID=this.stringify.dtdSysID(a.sysID)),null!=a.nData&&(this.nData=this.stringify.dtdNData(a.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(a),this.internal=!0}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return null}}),e.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(t,e,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t,r,i){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=n.NotationDeclaration,null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),e.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(t,e,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=t("./Utility").isObject,r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t,r,o,a){var s;e.__super__.constructor.call(this,t),i(r)&&(r=(s=r).version,o=s.encoding,a=s.standalone),r||(r="1.0"),this.type=n.Declaration,this.version=this.stringify.xmlVersion(r),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(t,e,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u={}.hasOwnProperty;c=t("./Utility").isObject,l=t("./XMLNode"),n=t("./NodeType"),r=t("./XMLDTDAttList"),o=t("./XMLDTDEntity"),i=t("./XMLDTDElement"),a=t("./XMLDTDNotation"),s=t("./XMLNamedNodeMap"),e.exports=function(t){function e(t,r,i){var o,a,s,l,u,h;if(e.__super__.constructor.call(this,t),this.type=n.DocType,t.children)for(a=0,s=(l=t.children).length;a<s;a++)if((o=l[a]).type===n.Element){this.name=o.name;break}this.documentObject=t,c(r)&&(r=(u=r).pubID,i=u.sysID),null==i&&(i=(h=[r,i])[0],r=h[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"entities",{get:function(){var t,e,r,i,o;for(i={},e=0,r=(o=this.children).length;e<r;e++)(t=o[e]).type!==n.EntityDeclaration||t.pe||(i[t.name]=t);return new s(i)}}),Object.defineProperty(e.prototype,"notations",{get:function(){var t,e,r,i,o;for(i={},e=0,r=(o=this.children).length;e<r;e++)(t=o[e]).type===n.NotationDeclaration&&(i[t.name]=t);return new s(i)}}),Object.defineProperty(e.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(e.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(e.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.element=function(t,e){var n;return n=new i(this,t,e),this.children.push(n),this},e.prototype.attList=function(t,e,n,i,o){var a;return a=new r(this,t,e,n,i,o),this.children.push(a),this},e.prototype.entity=function(t,e){var n;return n=new o(this,!1,t,e),this.children.push(n),this},e.prototype.pEntity=function(t,e){var n;return n=new o(this,!0,t,e),this.children.push(n),this},e.prototype.notation=function(t,e){var n;return n=new a(this,t,e),this.children.push(n),this},e.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))},e.prototype.ele=function(t,e){return this.element(t,e)},e.prototype.att=function(t,e,n,r,i){return this.attList(t,e,n,r,i)},e.prototype.ent=function(t,e){return this.entity(t,e)},e.prototype.pent=function(t,e){return this.pEntity(t,e)},e.prototype.not=function(t,e){return this.notation(t,e)},e.prototype.up=function(){return this.root()||this.documentObject},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.name===this.name&&t.publicId===this.publicId&&t.systemId===this.systemId},e}(l)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(t,e,n){"use strict";(function(){var n,r,i,o,a,s,l,c={}.hasOwnProperty;l=t("./Utility").isPlainObject,i=t("./XMLDOMImplementation"),r=t("./XMLDOMConfiguration"),o=t("./XMLNode"),n=t("./NodeType"),s=t("./XMLStringifier"),a=t("./XMLStringWriter"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,null),this.name="#document",this.type=n.Document,this.documentURI=null,this.domConfig=new r,t||(t={}),t.writer||(t.writer=new a),this.options=t,this.stringify=new s(t)}return function(t,e){for(var n in e)c.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"implementation",{value:new i}),Object.defineProperty(e.prototype,"doctype",{get:function(){var t,e,r,i;for(e=0,r=(i=this.children).length;e<r;e++)if((t=i[e]).type===n.DocType)return t;return null}}),Object.defineProperty(e.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(e.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(e.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(e.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration?this.children[0].encoding:null}}),Object.defineProperty(e.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(e.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(e.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(e.prototype,"origin",{get:function(){return null}}),Object.defineProperty(e.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(e.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(e.prototype,"contentType",{get:function(){return null}}),e.prototype.end=function(t){var e;return e={},t?l(t)&&(e=t,t=this.options.writer):t=this.options.writer,t.document(this,t.filterOptions(e))},e.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))},e.prototype.createElement=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createTextNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createProcessingInstruction=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.importNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createElementNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.adoptNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.renameNode=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createEvent=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createNodeIterator=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.createTreeWalker=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e}(o)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(t,e,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,w,x,S,E,C,k={}.hasOwnProperty;C=t("./Utility"),S=C.isObject,x=C.isFunction,E=C.isPlainObject,w=C.getValue,n=t("./NodeType"),f=t("./XMLDocument"),p=t("./XMLElement"),o=t("./XMLCData"),a=t("./XMLComment"),g=t("./XMLRaw"),b=t("./XMLText"),m=t("./XMLProcessingInstruction"),h=t("./XMLDeclaration"),d=t("./XMLDocType"),s=t("./XMLDTDAttList"),c=t("./XMLDTDEntity"),l=t("./XMLDTDElement"),u=t("./XMLDTDNotation"),i=t("./XMLAttribute"),y=t("./XMLStringifier"),v=t("./XMLStringWriter"),r=t("./WriterState"),e.exports=function(){function t(t,e,r){var i;this.name="?xml",this.type=n.Document,t||(t={}),i={},t.writer?E(t.writer)&&(i=t.writer,t.writer=new v):t.writer=new v,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new y(t),this.onDataCallback=e||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return t.prototype.createChildNode=function(t){var e,r,i,o,a,s,l,c;switch(t.type){case n.CData:this.cdata(t.value);break;case n.Comment:this.comment(t.value);break;case n.Element:for(r in i={},l=t.attribs)k.call(l,r)&&(e=l[r],i[r]=e.value);this.node(t.name,i);break;case n.Dummy:this.dummy();break;case n.Raw:this.raw(t.value);break;case n.Text:this.text(t.value);break;case n.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(a=0,s=(c=t.children).length;a<s;a++)o=c[a],this.createChildNode(o),o.type===n.Element&&this.up();return this},t.prototype.dummy=function(){return this},t.prototype.node=function(t,e,n){var r;if(null==t)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(t));return this.openCurrent(),t=w(t),null==e&&(e={}),e=w(e),S(e)||(n=(r=[e,n])[0],e=r[1]),this.currentNode=new p(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},t.prototype.element=function(t,e,r){var i,o,a,s,l,c;if(this.currentNode&&this.currentNode.type===n.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(t)||S(t)||x(t))for(s=this.options.noValidation,this.options.noValidation=!0,(c=new f(this.options).element("TEMP_ROOT")).element(t),this.options.noValidation=s,o=0,a=(l=c.children).length;o<a;o++)i=l[o],this.createChildNode(i),i.type===n.Element&&this.up();else this.node(t,e,r);return this},t.prototype.attribute=function(t,e){var n,r;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t));if(null!=t&&(t=w(t)),S(t))for(n in t)k.call(t,n)&&(r=t[n],this.attribute(n,r));else x(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.currentNode.attribs[t]=new i(this,t,""):null!=e&&(this.currentNode.attribs[t]=new i(this,t,e));return this},t.prototype.text=function(t){var e;return this.openCurrent(),e=new b(this,t),this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.cdata=function(t){var e;return this.openCurrent(),e=new o(this,t),this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.comment=function(t){var e;return this.openCurrent(),e=new a(this,t),this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.raw=function(t){var e;return this.openCurrent(),e=new g(this,t),this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.instruction=function(t,e){var n,r,i,o,a;if(this.openCurrent(),null!=t&&(t=w(t)),null!=e&&(e=w(e)),Array.isArray(t))for(n=0,o=t.length;n<o;n++)r=t[n],this.instruction(r);else if(S(t))for(r in t)k.call(t,r)&&(i=t[r],this.instruction(r,i));else x(e)&&(e=e.apply()),a=new m(this,t,e),this.onData(this.writer.processingInstruction(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},t.prototype.declaration=function(t,e,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new h(this,t,e,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.doctype=function(t,e,n){if(this.openCurrent(),null==t)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new d(this,e,n),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},t.prototype.dtdElement=function(t,e){var n;return this.openCurrent(),n=new l(this,t,e),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.attList=function(t,e,n,r,i){var o;return this.openCurrent(),o=new s(this,t,e,n,r,i),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.entity=function(t,e){var n;return this.openCurrent(),n=new c(this,!1,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.pEntity=function(t,e){var n;return this.openCurrent(),n=new c(this,!0,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.notation=function(t,e){var n;return this.openCurrent(),n=new u(this,t,e),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},t.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},t.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},t.prototype.openNode=function(t){var e,i,o,a;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==n.Element||(this.root=t),i="",t.type===n.Element){for(o in this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,a=t.attribs)k.call(a,o)&&(e=a[o],i+=this.writer.attribute(e,this.writerOptions,this.currentLevel));i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+t.rootNodeName,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.children?(i+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,i+=">"),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}},t.prototype.closeNode=function(t){var e;if(!t.isClosed)return e="",this.writerOptions.state=r.CloseTag,e=t.type===n.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+"</"+t.name+">"+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(e,this.currentLevel),t.isClosed=!0},t.prototype.onData=function(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)},t.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},t.prototype.debugInfo=function(t){return null==t?"":"node: <"+t+">"},t.prototype.ele=function(){return this.element.apply(this,arguments)},t.prototype.nod=function(t,e,n){return this.node(t,e,n)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},t.prototype.dtd=function(t,e,n){return this.doctype(t,e,n)},t.prototype.e=function(t,e,n){return this.element(t,e,n)},t.prototype.n=function(t,e,n){return this.node(t,e,n)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.att=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.a=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;r=t("./XMLNode"),n=t("./NodeType"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.type=n.Dummy}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return""},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i,a,s,l,c,u,h={}.hasOwnProperty;u=t("./Utility"),c=u.isObject,l=u.isFunction,s=u.getValue,a=t("./XMLNode"),n=t("./NodeType"),r=t("./XMLAttribute"),i=t("./XMLNamedNodeMap"),e.exports=function(t){function e(t,r,i){var o,a,s,l;if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=n.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),t.type===n.Document&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this,t.children))for(a=0,s=(l=t.children).length;a<s;a++)if((o=l[a]).type===n.DocType){o.name=this.name;break}}return function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),e.prototype.clone=function(){var t,e,n,r;for(e in(n=(0,o.default)(this)).isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs)h.call(r,e)&&(t=r[e],n.attribs[e]=t.clone());return n.children=[],this.children.forEach((function(t){var e;return(e=t.clone()).parent=n,n.children.push(e)})),n},e.prototype.attribute=function(t,e){var n,i;if(null!=t&&(t=s(t)),c(t))for(n in t)h.call(t,n)&&(i=t[n],this.attribute(n,i));else l(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.attribs[t]=new r(this,t,""):null!=e&&(this.attribs[t]=new r(this,t,e));return this},e.prototype.removeAttribute=function(t){var e,n,r;if(null==t)throw new Error("Missing attribute name. "+this.debugInfo());if(t=s(t),Array.isArray(t))for(n=0,r=t.length;n<r;n++)e=t[n],delete this.attribs[e];else delete this.attribs[t];return this},e.prototype.toString=function(t){return this.options.writer.element(this,this.options.writer.filterOptions(t))},e.prototype.att=function(t,e){return this.attribute(t,e)},e.prototype.a=function(t,e){return this.attribute(t,e)},e.prototype.getAttribute=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t].value:null},e.prototype.setAttribute=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNode=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t]:null},e.prototype.setAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getAttributeNodeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setAttributeNodeNS=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasAttribute=function(t){return this.attribs.hasOwnProperty(t)},e.prototype.hasAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setIdAttribute=function(t,e){return this.attribs.hasOwnProperty(t)?this.attribs[t].isId:e},e.prototype.setIdAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setIdAttributeNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){var n,r,i;if(!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t))return!1;if(t.namespaceURI!==this.namespaceURI)return!1;if(t.prefix!==this.prefix)return!1;if(t.localName!==this.localName)return!1;if(t.attribs.length!==this.attribs.length)return!1;for(n=r=0,i=this.attribs.length-1;0<=i?r<=i:r>=i;n=0<=i?++r:--r)if(!this.attribs[n].isEqualNode(t.attribs[n]))return!1;return!0},e}(a)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/keys"),o=(r=i)&&r.__esModule?r:{default:r};(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return(0,o.default)(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(t){return this.nodes[t]},t.prototype.setNamedItem=function(t){var e;return e=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,e||null},t.prototype.removeNamedItem=function(t){var e;return e=this.nodes[t],delete this.nodes[t],e||null},t.prototype.item=function(t){return this.nodes[(0,o.default)(this.nodes)[t]]||null},t.prototype.getNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(t,e,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b={}.hasOwnProperty;y=t("./Utility"),v=y.isObject,g=y.isFunction,m=y.isEmpty,p=y.getValue,c=null,i=null,o=null,a=null,s=null,d=null,f=null,h=null,l=null,r=null,u=null,n=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=t("./XMLElement"),i=t("./XMLCData"),o=t("./XMLComment"),a=t("./XMLDeclaration"),s=t("./XMLDocType"),d=t("./XMLRaw"),f=t("./XMLText"),h=t("./XMLProcessingInstruction"),l=t("./XMLDummy"),r=t("./NodeType"),u=t("./XMLNodeList"),t("./XMLNamedNodeMap"),n=t("./DocumentPosition"))}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n,i,o;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(o="",e=0,n=(i=this.children).length;e<n;e++)(t=i[e]).textContent&&(o+=t.textContent);return o}return null},set:function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(t){var e,n,r,i,o;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),o=[],n=0,r=(i=this.children).length;n<r;n++)e=i[n],o.push(e.setParent(this));return o},e.prototype.element=function(t,e,n){var r,i,o,a,s,l,c,u,h,d,f;if(l=null,null===e&&null==n&&(e=(h=[{},null])[0],n=h[1]),null==e&&(e={}),e=p(e),v(e)||(n=(d=[e,n])[0],e=d[1]),null!=t&&(t=p(t)),Array.isArray(t))for(o=0,c=t.length;o<c;o++)i=t[o],l=this.element(i);else if(g(t))l=this.element(t.apply());else if(v(t)){for(s in t)if(b.call(t,s))if(f=t[s],g(f)&&(f=f.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))l=this.attribute(s.substr(this.stringify.convertAttKey.length),f);else if(!this.options.separateArrayItems&&Array.isArray(f)&&m(f))l=this.dummy();else if(v(f)&&m(f))l=this.element(s);else if(this.options.keepNullNodes||null!=f)if(!this.options.separateArrayItems&&Array.isArray(f))for(a=0,u=f.length;a<u;a++)i=f[a],(r={})[s]=i,l=this.element(r);else v(f)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===s.indexOf(this.stringify.convertTextKey)?l=this.element(f):(l=this.element(s)).element(f):l=this.element(s,f);else l=this.dummy()}else l=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===t.indexOf(this.stringify.convertPIKey)?this.instruction(t.substr(this.stringify.convertPIKey.length),n):this.node(t,e,n):this.dummy();if(null==l)throw new Error("Could not create any elements with: "+t+". "+this.debugInfo());return l},e.prototype.insertBefore=function(t,e,n){var r,i,o,a,s;if(null!=t?t.type:void 0)return a=e,(o=t).setParent(this),a?(i=children.indexOf(a),s=children.splice(i),children.push(o),Array.prototype.push.apply(children,s)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),s=this.parent.children.splice(i),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,s),r},e.prototype.insertAfter=function(t,e,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,o),r},e.prototype.remove=function(){var t;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat([])),this.parent},e.prototype.node=function(t,e,n){var r,i;return null!=t&&(t=p(t)),e||(e={}),e=p(e),v(e)||(n=(i=[e,n])[0],e=i[1]),r=new c(this,t,e),null!=n&&r.text(n),this.children.push(r),r},e.prototype.text=function(t){var e;return v(t)&&this.element(t),e=new f(this,t),this.children.push(e),this},e.prototype.cdata=function(t){var e;return e=new i(this,t),this.children.push(e),this},e.prototype.comment=function(t){var e;return e=new o(this,t),this.children.push(e),this},e.prototype.commentBefore=function(t){var e,n;return e=this.parent.children.indexOf(this),n=this.parent.children.splice(e),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.commentAfter=function(t){var e,n;return e=this.parent.children.indexOf(this),n=this.parent.children.splice(e+1),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.raw=function(t){var e;return e=new d(this,t),this.children.push(e),this},e.prototype.dummy=function(){return new l(this)},e.prototype.instruction=function(t,e){var n,r,i,o,a;if(null!=t&&(t=p(t)),null!=e&&(e=p(e)),Array.isArray(t))for(o=0,a=t.length;o<a;o++)n=t[o],this.instruction(n);else if(v(t))for(n in t)b.call(t,n)&&(r=t[n],this.instruction(n,r));else g(e)&&(e=e.apply()),i=new h(this,t,e),this.children.push(i);return this},e.prototype.instructionBefore=function(t,e){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.instructionAfter=function(t,e){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.declaration=function(t,e,n){var i,o;return i=this.document(),o=new a(i,t,e,n),0===i.children.length?i.children.unshift(o):i.children[0].type===r.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},e.prototype.dtd=function(t,e){var n,i,o,a,l,c,u,h,d;for(n=this.document(),i=new s(n,t,e),o=a=0,c=(h=n.children).length;a<c;o=++a)if(h[o].type===r.DocType)return n.children[o]=i,i;for(o=l=0,u=(d=n.children).length;l<u;o=++l)if(d[o].isRoot)return n.children.splice(o,0,i),i;return n.children.push(i),i},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var t;for(t=this;t;){if(t.type===r.Document)return t.rootObject;if(t.isRoot)return t;t=t.parent}},e.prototype.document=function(){var t;for(t=this;t;){if(t.type===r.Document)return t;t=t.parent}},e.prototype.end=function(t){return this.document().end(t)},e.prototype.prev=function(){var t;if((t=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[t-1]},e.prototype.next=function(){var t;if(-1===(t=this.parent.children.indexOf(this))||t===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[t+1]},e.prototype.importDocument=function(t){var e;return(e=t.root().clone()).parent=this,e.isRoot=!1,this.children.push(e),this},e.prototype.debugInfo=function(t){var e,n;return null!=(t=t||this.name)||(null!=(e=this.parent)?e.name:void 0)?null==t?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""},e.prototype.ele=function(t,e,n){return this.element(t,e,n)},e.prototype.nod=function(t,e,n){return this.node(t,e,n)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},e.prototype.e=function(t,e,n){return this.element(t,e,n)},e.prototype.n=function(t,e,n){return this.node(t,e,n)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.i=function(t,e){return this.instruction(t,e)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(t){return this.importDocument(t)},e.prototype.replaceChild=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(t,e){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(t){var e;return this===t?0:this.document()!==t.document()?(e=n.Disconnected|n.ImplementationSpecific,Math.random()<.5?e|=n.Preceding:e|=n.Following,e):this.isAncestor(t)?n.Contains|n.Preceding:this.isDescendant(t)?n.Contains|n.Following:this.isPreceding(t)?n.Preceding:n.Following},e.prototype.isSameNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){var e,n,r;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0},e.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(t){return!!t&&(t===this||this.isDescendant(t))},e.prototype.isDescendant=function(t){var e,n,r,i;for(n=0,r=(i=this.children).length;n<r;n++){if(t===(e=i[n]))return!0;if(e.isDescendant(t))return!0}return!1},e.prototype.isAncestor=function(t){return t.isDescendant(this)},e.prototype.isPreceding=function(t){var e,n;return e=this.treePosition(t),n=this.treePosition(this),-1!==e&&-1!==n&&e<n},e.prototype.isFollowing=function(t){var e,n;return e=this.treePosition(t),n=this.treePosition(this),-1!==e&&-1!==n&&e>n},e.prototype.treePosition=function(t){var e,n;return n=0,e=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!e&&r===t)return e=!0})),e?n:-1},e.prototype.foreachTreeNode=function(t,e){var n,r,i,o,a;for(t||(t=this.document()),r=0,i=(o=t.children).length;r<i;r++){if(a=e(n=o[r]))return a;if(a=this.foreachTreeNode(n,e))return a}},e}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(t,e,n){"use strict";(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(t){return this.nodes[t]||null},t}()}).call(void 0)},{}],275:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=t("./NodeType"),r=t("./XMLCharacterData"),e.exports=function(t){function e(t,r,i){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=n.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.target===this.target},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=t("./NodeType"),r=t("./XMLNode"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=n.Raw,this.value=this.stringify.raw(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(t,e,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;n=t("./NodeType"),i=t("./XMLWriterBase"),r=t("./WriterState"),e.exports=function(t){function e(t,n){this.stream=t,e.__super__.constructor.call(this,n)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),e.prototype.endline=function(t,n,i){return t.isLastRootNode&&n.state===r.CloseTag?"":e.__super__.endline.call(this,t,n,i)},e.prototype.document=function(t,e){var n,r,i,o,a,s,l,c,u;for(r=i=0,a=(l=t.children).length;i<a;r=++i)(n=l[r]).isLastRootNode=r===t.children.length-1;for(e=this.filterOptions(e),u=[],o=0,s=(c=t.children).length;o<s;o++)n=c[o],u.push(this.writeChildNode(n,e,0));return u},e.prototype.attribute=function(t,n,r){return this.stream.write(e.__super__.attribute.call(this,t,n,r))},e.prototype.cdata=function(t,n,r){return this.stream.write(e.__super__.cdata.call(this,t,n,r))},e.prototype.comment=function(t,n,r){return this.stream.write(e.__super__.comment.call(this,t,n,r))},e.prototype.declaration=function(t,n,r){return this.stream.write(e.__super__.declaration.call(this,t,n,r))},e.prototype.docType=function(t,e,n){var i,o,a,s;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,this.stream.write(this.indent(t,e,n)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,n)),e.state=r.InsideTag,o=0,a=(s=t.children).length;o<a;o++)i=s[o],this.writeChildNode(i,e,n+1);e.state=r.CloseTag,this.stream.write("]")}return e.state=r.CloseTag,this.stream.write(e.spaceBeforeSlash+">"),this.stream.write(this.endline(t,e,n)),e.state=r.None,this.closeNode(t,e,n)},e.prototype.element=function(t,e,i){var a,s,l,c,u,h,d,f,p;for(d in i||(i=0),this.openNode(t,e,i),e.state=r.OpenTag,this.stream.write(this.indent(t,e,i)+"<"+t.name),f=t.attribs)o.call(f,d)&&(a=f[d],this.attribute(a,e,i));if(c=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every((function(t){return(t.type===n.Text||t.type===n.Raw)&&""===t.value})))e.allowEmpty?(this.stream.write(">"),e.state=r.CloseTag,this.stream.write("</"+t.name+">")):(e.state=r.CloseTag,this.stream.write(e.spaceBeforeSlash+"/>"));else if(!e.pretty||1!==l||c.type!==n.Text&&c.type!==n.Raw||null==c.value){for(this.stream.write(">"+this.endline(t,e,i)),e.state=r.InsideTag,u=0,h=(p=t.children).length;u<h;u++)s=p[u],this.writeChildNode(s,e,i+1);e.state=r.CloseTag,this.stream.write(this.indent(t,e,i)+"</"+t.name+">")}else this.stream.write(">"),e.state=r.InsideTag,e.suppressPrettyCount++,this.writeChildNode(c,e,i+1),e.suppressPrettyCount--,e.state=r.CloseTag,this.stream.write("</"+t.name+">");return this.stream.write(this.endline(t,e,i)),e.state=r.None,this.closeNode(t,e,i)},e.prototype.processingInstruction=function(t,n,r){return this.stream.write(e.__super__.processingInstruction.call(this,t,n,r))},e.prototype.raw=function(t,n,r){return this.stream.write(e.__super__.raw.call(this,t,n,r))},e.prototype.text=function(t,n,r){return this.stream.write(e.__super__.text.call(this,t,n,r))},e.prototype.dtdAttList=function(t,n,r){return this.stream.write(e.__super__.dtdAttList.call(this,t,n,r))},e.prototype.dtdElement=function(t,n,r){return this.stream.write(e.__super__.dtdElement.call(this,t,n,r))},e.prototype.dtdEntity=function(t,n,r){return this.stream.write(e.__super__.dtdEntity.call(this,t,n,r))},e.prototype.dtdNotation=function(t,n,r){return this.stream.write(e.__super__.dtdNotation.call(this,t,n,r))},e}(i)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(t,e,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=t("./XMLWriterBase"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e.prototype.document=function(t,e){var n,r,i,o,a;for(e=this.filterOptions(e),o="",r=0,i=(a=t.children).length;r<i;r++)n=a[r],o+=this.writeChildNode(n,e,0);return e.pretty&&o.slice(-e.newline.length)===e.newline&&(o=o.slice(0,-e.newline.length)),o},e}(n)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(t,e,n){"use strict";(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty;e.exports=function(){function e(e){var r,i,o;for(r in this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.options=e,this.options.version||(this.options.version="1.0"),i=e.stringify||{})n.call(i,r)&&(o=i[r],this[r]=o)}return e.prototype.name=function(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")},e.prototype.text=function(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))},e.prototype.cdata=function(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(t))},e.prototype.comment=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},e.prototype.raw=function(t){return this.options.noValidation?t:""+t||""},e.prototype.attValue=function(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))},e.prototype.insTarget=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.insValue=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)},e.prototype.xmlVersion=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},e.prototype.xmlEncoding=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)},e.prototype.xmlStandalone=function(t){return this.options.noValidation?t:t?"yes":"no"},e.prototype.dtdPubID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdSysID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdElementValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttType=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttDefault=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdEntityValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdNData=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(t){var e,n;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e))throw new Error("Invalid character in string: "+t+" at index "+n.index)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e)))throw new Error("Invalid character in string: "+t+" at index "+n.index);return t},e.prototype.assertLegalName=function(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t},e.prototype.textEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},e.prototype.attEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},e}()}).call(void 0)},{}],280:[function(t,e,n){"use strict";var r,i=t("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=t("./NodeType"),r=t("./XMLCharacterData"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=n.Text,this.value=this.stringify.text(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(e.prototype,"wholeText",{get:function(){var t,e,n;for(n="",e=this.previousSibling;e;)n=e.data+n,e=e.previousSibling;for(n+=this.data,t=this.nextSibling;t;)n+=t.data,t=t.nextSibling;return n}}),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},e.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(t,e,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=t("./Utility").assign,n=t("./NodeType"),t("./XMLDeclaration"),t("./XMLDocType"),t("./XMLCData"),t("./XMLComment"),t("./XMLElement"),t("./XMLRaw"),t("./XMLText"),t("./XMLProcessingInstruction"),t("./XMLDummy"),t("./XMLDTDAttList"),t("./XMLDTDElement"),t("./XMLDTDEntity"),t("./XMLDTDNotation"),r=t("./WriterState"),e.exports=function(){function t(t){var e,n,r;for(e in t||(t={}),this.options=t,n=t.writer||{})o.call(n,e)&&(r=n[e],this["_"+e]=this[e],this[e]=r)}return t.prototype.filterOptions=function(t){var e,n,o,a,s,l,c,u;return t||(t={}),t=i({},this.options,t),(e={writer:this}).pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=null!=(n=t.indent)?n:" ",e.newline=null!=(o=t.newline)?o:"\n",e.offset=null!=(a=t.offset)?a:0,e.dontPrettyTextNodes=null!=(s=null!=(l=t.dontPrettyTextNodes)?l:t.dontprettytextnodes)?s:0,e.spaceBeforeSlash=null!=(c=null!=(u=t.spaceBeforeSlash)?u:t.spacebeforeslash)?c:"",!0===e.spaceBeforeSlash&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=r.None,e},t.prototype.indent=function(t,e,n){var r;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(r=(n||0)+e.offset+1)>0?new Array(r).join(e.indent):""},t.prototype.endline=function(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline},t.prototype.attribute=function(t,e,n){var r;return this.openAttribute(t,e,n),r=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r},t.prototype.cdata=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<![CDATA[",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+="]]>"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.comment=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"\x3c!-- ",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=" --\x3e"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.declaration=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<?xml",e.state=r.InsideTag,i+=' version="'+t.version+'"',null!=t.encoding&&(i+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(i+=' standalone="'+t.standalone+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.docType=function(t,e,n){var i,o,a,s,l;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,s=this.indent(t,e,n),s+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(s+=" [",s+=this.endline(t,e,n),e.state=r.InsideTag,o=0,a=(l=t.children).length;o<a;o++)i=l[o],s+=this.writeChildNode(i,e,n+1);e.state=r.CloseTag,s+="]"}return e.state=r.CloseTag,s+=e.spaceBeforeSlash+">",s+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),s},t.prototype.element=function(t,e,i){var a,s,l,c,u,h,d,f,p,m,g,v,y,b;for(p in i||(i=0),m=!1,g="",this.openNode(t,e,i),e.state=r.OpenTag,g+=this.indent(t,e,i)+"<"+t.name,v=t.attribs)o.call(v,p)&&(a=v[p],g+=this.attribute(a,e,i));if(c=0===(l=t.children.length)?null:t.children[0],0===l||t.children.every((function(t){return(t.type===n.Text||t.type===n.Raw)&&""===t.value})))e.allowEmpty?(g+=">",e.state=r.CloseTag,g+="</"+t.name+">"+this.endline(t,e,i)):(e.state=r.CloseTag,g+=e.spaceBeforeSlash+"/>"+this.endline(t,e,i));else if(!e.pretty||1!==l||c.type!==n.Text&&c.type!==n.Raw||null==c.value){if(e.dontPrettyTextNodes)for(u=0,d=(y=t.children).length;u<d;u++)if(((s=y[u]).type===n.Text||s.type===n.Raw)&&null!=s.value){e.suppressPrettyCount++,m=!0;break}for(g+=">"+this.endline(t,e,i),e.state=r.InsideTag,h=0,f=(b=t.children).length;h<f;h++)s=b[h],g+=this.writeChildNode(s,e,i+1);e.state=r.CloseTag,g+=this.indent(t,e,i)+"</"+t.name+">",m&&e.suppressPrettyCount--,g+=this.endline(t,e,i),e.state=r.None}else g+=">",e.state=r.InsideTag,e.suppressPrettyCount++,m=!0,g+=this.writeChildNode(c,e,i+1),e.suppressPrettyCount--,m=!1,e.state=r.CloseTag,g+="</"+t.name+">"+this.endline(t,e,i);return this.closeNode(t,e,i),g},t.prototype.writeChildNode=function(t,e,r){switch(t.type){case n.CData:return this.cdata(t,e,r);case n.Comment:return this.comment(t,e,r);case n.Element:return this.element(t,e,r);case n.Raw:return this.raw(t,e,r);case n.Text:return this.text(t,e,r);case n.ProcessingInstruction:return this.processingInstruction(t,e,r);case n.Dummy:return"";case n.Declaration:return this.declaration(t,e,r);case n.DocType:return this.docType(t,e,r);case n.AttributeDeclaration:return this.dtdAttList(t,e,r);case n.ElementDeclaration:return this.dtdElement(t,e,r);case n.EntityDeclaration:return this.dtdEntity(t,e,r);case n.NotationDeclaration:return this.dtdNotation(t,e,r);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},t.prototype.processingInstruction=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<?",e.state=r.InsideTag,i+=t.target,t.value&&(i+=" "+t.value),e.state=r.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.raw=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.text=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdAttList=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ATTLIST",e.state=r.InsideTag,i+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(i+=" "+t.defaultValueType),t.defaultValue&&(i+=' "'+t.defaultValue+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdElement=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ELEMENT",e.state=r.InsideTag,i+=" "+t.name+" "+t.value,e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdEntity=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ENTITY",e.state=r.InsideTag,t.pe&&(i+=" %"),i+=" "+t.name,t.value?i+=' "'+t.value+'"':(t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.nData&&(i+=" NDATA "+t.nData)),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdNotation=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!NOTATION",e.state=r.InsideTag,i+=" "+t.name,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?i+=' PUBLIC "'+t.pubID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.openNode=function(t,e,n){},t.prototype.closeNode=function(t,e,n){},t.prototype.openAttribute=function(t,e,n){},t.prototype.closeAttribute=function(t,e,n){},t}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(t,e,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h;h=t("./Utility"),c=h.assign,u=h.isFunction,i=t("./XMLDOMImplementation"),o=t("./XMLDocument"),a=t("./XMLDocumentCB"),l=t("./XMLStringWriter"),s=t("./XMLStreamWriter"),n=t("./NodeType"),r=t("./WriterState"),e.exports.create=function(t,e,n,r){var i,a;if(null==t)throw new Error("Root element needs a name.");return r=c({},e,n,r),a=(i=new o(r)).element(t),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),a},e.exports.begin=function(t,e,n){var r;return u(t)&&(e=(r=[t,e])[0],n=r[1],t={}),e?new a(t,e,n):new o(t)},e.exports.stringWriter=function(t){return new l(t)},e.exports.streamWriter=function(t,e){return new s(t,e)},e.exports.implementation=new i,e.exports.nodeType=n,e.exports.writerState=r}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(t,e,n){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}],284:[function(t,e,n){"use strict";var r=t("buffer").Buffer,i={sha1:t("./sha"),md5:t("./md5")},o=r.alloc(64);function a(t,e){var n=i[t=t||"sha1"],a=[];return n||s("algorithm:",t,"is not yet supported"),{update:function(t){return r.isBuffer(t)||(t=r.from(t)),a.push(t),t.length,this},digest:function(t){var i=r.concat(a),s=e?function(t,e,n){r.isBuffer(e)||(e=r.from(e)),r.isBuffer(n)||(n=r.from(n)),e.length>64?e=t(e):e.length<64&&(e=r.concat([e,o],64));for(var i=r.alloc(64),a=r.alloc(64),s=0;s<64;s++)i[s]=54^e[s],a[s]=92^e[s];var l=t(r.concat([i,n]));return t(r.concat([a,l]))}(n,e,i):n(i);return a=null,t?s.toString(t):s}}}function s(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}o.fill(0),n.createHash=function(t){return a(t)},n.createHmac=function(t,e){return a(t,e)},n.createCredentials=function(){s("sorry,createCredentials is not implemented yet")},n.createCipher=function(){s("sorry,createCipher is not implemented yet")},n.createCipheriv=function(){s("sorry,createCipheriv is not implemented yet")},n.createDecipher=function(){s("sorry,createDecipher is not implemented yet")},n.createDecipheriv=function(){s("sorry,createDecipheriv is not implemented yet")},n.createSign=function(){s("sorry,createSign is not implemented yet")},n.createVerify=function(){s("sorry,createVerify is not implemented yet")},n.createDiffieHellman=function(){s("sorry,createDiffieHellman is not implemented yet")},n.pbkdf2=function(){s("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(t,e,n){"use strict";var r=t("buffer").Buffer,i=r.alloc(4);i.fill(0),e.exports={hash:function(t,e,n,o){return r.isBuffer(t)||(t=r.from(t)),function(t,e,n){for(var i=r.alloc(e),o=n?i.writeInt32BE:i.writeInt32LE,a=0;a<t.length;a++)o.call(i,t[a],4*a,!0);return i}(e(function(t,e){if(t.length%4!=0){var n=t.length+(4-t.length%4);t=r.concat([t,i],n)}for(var o=[],a=e?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=4)o.push(a.call(t,s));return o}(t,o),8*t.length),n,o)}}},{buffer:73}],286:[function(t,e,n){"use strict";var r=t("./helpers");function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,h=0;h<t.length;h+=16){var d=n,f=r,p=i,m=o;n=a(n,r,i,o,t[h+0],7,-680876936),o=a(o,n,r,i,t[h+1],12,-389564586),i=a(i,o,n,r,t[h+2],17,606105819),r=a(r,i,o,n,t[h+3],22,-1044525330),n=a(n,r,i,o,t[h+4],7,-176418897),o=a(o,n,r,i,t[h+5],12,1200080426),i=a(i,o,n,r,t[h+6],17,-1473231341),r=a(r,i,o,n,t[h+7],22,-45705983),n=a(n,r,i,o,t[h+8],7,1770035416),o=a(o,n,r,i,t[h+9],12,-1958414417),i=a(i,o,n,r,t[h+10],17,-42063),r=a(r,i,o,n,t[h+11],22,-1990404162),n=a(n,r,i,o,t[h+12],7,1804603682),o=a(o,n,r,i,t[h+13],12,-40341101),i=a(i,o,n,r,t[h+14],17,-1502002290),n=s(n,r=a(r,i,o,n,t[h+15],22,1236535329),i,o,t[h+1],5,-165796510),o=s(o,n,r,i,t[h+6],9,-1069501632),i=s(i,o,n,r,t[h+11],14,643717713),r=s(r,i,o,n,t[h+0],20,-373897302),n=s(n,r,i,o,t[h+5],5,-701558691),o=s(o,n,r,i,t[h+10],9,38016083),i=s(i,o,n,r,t[h+15],14,-660478335),r=s(r,i,o,n,t[h+4],20,-405537848),n=s(n,r,i,o,t[h+9],5,568446438),o=s(o,n,r,i,t[h+14],9,-1019803690),i=s(i,o,n,r,t[h+3],14,-187363961),r=s(r,i,o,n,t[h+8],20,1163531501),n=s(n,r,i,o,t[h+13],5,-1444681467),o=s(o,n,r,i,t[h+2],9,-51403784),i=s(i,o,n,r,t[h+7],14,1735328473),n=l(n,r=s(r,i,o,n,t[h+12],20,-1926607734),i,o,t[h+5],4,-378558),o=l(o,n,r,i,t[h+8],11,-2022574463),i=l(i,o,n,r,t[h+11],16,1839030562),r=l(r,i,o,n,t[h+14],23,-35309556),n=l(n,r,i,o,t[h+1],4,-1530992060),o=l(o,n,r,i,t[h+4],11,1272893353),i=l(i,o,n,r,t[h+7],16,-155497632),r=l(r,i,o,n,t[h+10],23,-1094730640),n=l(n,r,i,o,t[h+13],4,681279174),o=l(o,n,r,i,t[h+0],11,-358537222),i=l(i,o,n,r,t[h+3],16,-722521979),r=l(r,i,o,n,t[h+6],23,76029189),n=l(n,r,i,o,t[h+9],4,-640364487),o=l(o,n,r,i,t[h+12],11,-421815835),i=l(i,o,n,r,t[h+15],16,530742520),n=c(n,r=l(r,i,o,n,t[h+2],23,-995338651),i,o,t[h+0],6,-198630844),o=c(o,n,r,i,t[h+7],10,1126891415),i=c(i,o,n,r,t[h+14],15,-1416354905),r=c(r,i,o,n,t[h+5],21,-57434055),n=c(n,r,i,o,t[h+12],6,1700485571),o=c(o,n,r,i,t[h+3],10,-1894986606),i=c(i,o,n,r,t[h+10],15,-1051523),r=c(r,i,o,n,t[h+1],21,-2054922799),n=c(n,r,i,o,t[h+8],6,1873313359),o=c(o,n,r,i,t[h+15],10,-30611744),i=c(i,o,n,r,t[h+6],15,-1560198380),r=c(r,i,o,n,t[h+13],21,1309151649),n=c(n,r,i,o,t[h+4],6,-145523070),o=c(o,n,r,i,t[h+11],10,-1120210379),i=c(i,o,n,r,t[h+2],15,718787259),r=c(r,i,o,n,t[h+9],21,-343485551),n=u(n,d),r=u(r,f),i=u(i,p),o=u(o,m)}return Array(n,r,i,o)}function o(t,e,n,r,i,o){return u((a=u(u(e,t),u(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function a(t,e,n,r,i,a,s){return o(e&n|~e&r,t,e,i,a,s)}function s(t,e,n,r,i,a,s){return o(e&r|n&~r,t,e,i,a,s)}function l(t,e,n,r,i,a,s){return o(e^n^r,t,e,i,a,s)}function c(t,e,n,r,i,a,s){return o(n^(e|~r),t,e,i,a,s)}function u(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}e.exports=function(t){return r.hash(t,i,16)}},{"./helpers":285}],287:[function(t,e,n){"use strict";var r=t("./helpers");function i(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n=Array(80),r=1732584193,i=-271733879,c=-1732584194,u=271733878,h=-1009589776,d=0;d<t.length;d+=16){for(var f=r,p=i,m=c,g=u,v=h,y=0;y<80;y++){n[y]=y<16?t[d+y]:l(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=s(s(l(r,5),o(y,i,c,u)),s(s(h,n[y]),a(y)));h=u,u=c,c=l(i,30),i=r,r=b}r=s(r,f),i=s(i,p),c=s(c,m),u=s(u,g),h=s(h,v)}return Array(r,i,c,u,h)}function o(t,e,n,r){return t<20?e&n|~e&r:t<40?e^n^r:t<60?e&n|e&r|n&r:e^n^r}function a(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function s(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function l(t,e){return t<<e|t>>>32-e}e.exports=function(t){return r.hash(t,i,20,!0)}},{"./helpers":285}],288:[function(t,e,n){"use strict";e.exports=function(){return function(){}}},{}],289:[function(t,e,n){(function(n){"use strict";var r,i=t("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r},a=t("stream").Stream,s=t("../lib/common/utils/isArray").isArray;e.exports.string=function(t){return"string"==typeof t},e.exports.array=s,e.exports.buffer=n.isBuffer,e.exports.writableStream=function(t){return function(t){return t instanceof a}(t)&&"function"==typeof t._write&&"object"===(0,o.default)(t._writableState)}}).call(this,{isBuffer:t("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(t,e,n){"use strict";n.encodeURIComponent=function(t){try{return encodeURIComponent(t)}catch(e){return t}},n.escape=t("escape-html"),n.timestamp=function(t){if(t){var e=t;return"string"==typeof e&&(e=Number(e)),10===String(t).length&&(e*=1e3),new Date(e)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(t,e,n){(function(e,r){"use strict";var i=a(t("babel-runtime/core-js/json/stringify")),o=a(t("babel-runtime/helpers/typeof"));function a(t){return t&&t.__esModule?t:{default:t}}var s,l=t("util"),c=t("url"),u=t("http"),h=t("https"),d=t("debug")("urllib"),f=t("humanize-ms"),p=0,m=Math.pow(2,31)-10,g=/^https?:\/\//i;function v(t,e){return void 0===t?e:t}function y(t,e){return function(n,r,i){if(n)return e(n);t({data:r,status:i.statusCode,headers:i.headers,res:i})}}n.TIMEOUTS=[f("300s"),f("300s")];var b=["json","text"];n.request=function(e,r,i){return 2===arguments.length&&"function"==typeof r&&(i=r,r=null),"function"==typeof i?n.requestWithCallback(e,r,i):(s||(s=t("any-promise")),new s((function(t,i){n.requestWithCallback(e,r,y(t,i))})))},n.requestWithCallback=function(a,s,y){if(!a||"string"!=typeof a&&"object"!==(void 0===a?"undefined":(0,o.default)(a))){var w=l.format("expect request url to be a string or a http request options, but got %j",a);throw new Error(w)}2===arguments.length&&"function"==typeof s&&(y=s,s=null),p>=m&&(p=0);var x=++p;(s=s||{}).requestUrls=s.requestUrls||[];var S={requestId:x,url:a,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",S),s.timeout=s.timeout||n.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var E,C=Date.now();"string"==typeof a?(g.test(a)||(a="http://"+a),E=c.parse(a)):E=a;var k=(s.type||s.method||E.method||"GET").toUpperCase(),_=E.port||80,T=u,O=v(s.agent,n.agent),A=s.fixJSONCtlChars;"https:"===E.protocol&&(T=h,O=v(s.httpsAgent,n.httpsAgent),E.port||(_=443));var L={host:E.hostname||E.host||"localhost",path:E.path||"/",method:k,port:_,agent:O,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?L.requestTimeout=s.timeout[s.timeout.length-1]:void 0!==s.timeout&&(L.requestTimeout=s.timeout);for(var D=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],I=0;I<D.length;I++){var R=D[I];s.hasOwnProperty(R)&&(L[R]=s[R])}!1!==L.rejectUnauthorized||L.hasOwnProperty("secureOptions")||(L.secureOptions=t("constants").SSL_OP_NO_TLSv1_2);var M=s.auth||E.auth;M&&(L.auth=M);var N=s.content||s.data,j="GET"===k||"HEAD"===k||s.dataAsQueryString;if(!s.content&&N&&"string"!=typeof N&&!r.isBuffer(N))if(j)N=s.nestedQuerystring?qs.stringify(N):querystring.stringify(N);else{var P=L.headers["Content-Type"]||L.headers["content-type"];P||(P="json"===s.contentType?"application/json":"application/x-www-form-urlencoded",L.headers["Content-Type"]=P),N="application/json"===parseContentType(P).type?(0,i.default)(N):s.nestedQuerystring?qs.stringify(N):querystring.stringify(N)}j&&N&&(L.path+=(E.query?"&":"?")+N,N=null);var F=0;if(N){var B=N.length;r.isBuffer(N)||(B=r.byteLength(N)),F=L.headers["Content-Length"]=B}"json"===s.dataType&&(L.headers.Accept="application/json"),"function"==typeof s.beforeRequest&&s.beforeRequest(L);var U=null,H=null,z=null,G=!1,V=!1,W=0,K=-1,q=!1,X="",Y="",$=null;function J(){U&&(clearTimeout(U),U=null)}function Z(){H&&(clearTimeout(H),H=null)}function Q(t,r,o){if(Z(),!y)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),x,e.pid,L.method,a),void(t&&console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s",Date(),x,e.pid,t.name,t.message,t.stack));var l=y;y=null;var c={};if(o&&(K=o.statusCode,c=o.headers),401===K&&c["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var u=c["www-authenticate"];if(u.indexOf("Digest ")>=0)return d("Request#%d %s: got digest auth header WWW-Authenticate: %s",x,a,u),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(L.method,L.path,u,s.digestAuth),d("Request#%d %s: auth with digest header: %s",x,a,s.headers.Authorization),o.headers["set-cookie"]&&(s.headers.Cookie=o.headers["set-cookie"].join(";")),n.requestWithCallback(a,s,l)}var h=Date.now()-C;$&&($.contentDownload=h),d("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",h,W,K,L.method,L.host,L.path,V,$);var f={status:K,statusCode:K,headers:c,size:W,aborted:q,rt:h,keepAliveSocket:V,data:r,requestUrls:s.requestUrls,timing:$,remoteAddress:X,remotePort:Y};if(t){var p="";O&&"function"==typeof O.getCurrentStatus&&(p=", agent status: "+(0,i.default)(O.getCurrentStatus())),t.message+=", "+L.method+" "+a+" "+K+" (connected: "+G+", keepalive socket: "+V+p+")\nheaders: "+(0,i.default)(c),t.data=r,t.path=L.path,t.status=K,t.headers=c,t.res=f}l(t,r,s.streaming?o:f),s.emitter&&(S.url=a,S.socket=it&&it.connection,S.options=L,S.size=F,s.emitter.emit("response",{requestId:x,error:t,ctx:s.ctx,req:S,res:f}))}function tt(t){var e=null;if(s.followRedirect&&statuses.redirect[t.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var r=t.headers.location;if(r){if(!(s._followRedirectCount>s.maxRedirects)){var i=s.formatRedirectUrl?s.formatRedirectUrl(a,r):c.resolve(a,r);d("Request#%d %s: `redirected` from %s to %s",x,L.path,a,i),Z(),s.headers&&s.headers.Host&&g.test(r)&&(s.headers.Host=null);var o=y;return y=null,n.requestWithCallback(i,s,o),{redirect:!0,error:null}}(e=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a)).name="MaxRedirectError"}else(e=new Error("Got statusCode "+t.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:e}}function et(t,e,n){return n(null,e,t.headers["content-encoding"])}s.timing&&($={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),L.headers["User-Agent"]||L.headers["user-agent"]||(L.headers["User-Agent"]=navigator.userAgent),s.gzip&&(L.headers["Accept-Encoding"]||L.headers["accept-encoding"]||(L.headers["Accept-Encoding"]="gzip"));var nt,rt,it,ot=s.writeStream;function at(t){var e;if($&&($.waiting=Date.now()-C),d("Request#%d %s `req response` event emit: status %d, headers: %j",x,a,t.statusCode,t.headers),s.streaming)return(e=tt(t)).redirect?void t.resume():e.error?(t.resume(),Q(e.error,null,t)):Q(null,null,t);if(t.on("close",(function(){d("Request#%d %s: `res close` event emit, total size %d",x,a,W)})),t.on("error",(function(){d("Request#%d %s: `res error` event emit, total size %d",x,a,W)})),t.on("aborted",(function(){q=!0,d("Request#%d %s: `res aborted` event emit, total size %d",x,a,W)})),ot)return(e=tt(t)).redirect?void t.resume():e.error?(t.resume(),ot.end(),Q(e.error,null,t)):(!1===s.consumeWriteStream?t.on("end",Q.bind(null,null,null,t)):isNode010||isNode012?first([[ot,"close"],[t,"aborted"]],(function(e,n,r){d("Request#%d %s: writeStream or res %s event emitted",x,a,r),Q(z||null,null,t)})):ot.on("close",(function(){d("Request#%d %s: writeStream close event emitted",x,a),Q(z||null,null,t)})),t.pipe(ot));var n=[];t.on("data",(function(t){d("Request#%d %s: `res data` event emit, size %d",x,a,t.length),W+=t.length,n.push(t)})),t.on("end",(function(){var e=r.concat(n,W);if(d("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",x,a,W,t._dumped),z)return Q(z,e,t);var i=tt(t);if(i.error)return Q(i.error,e,t);i.redirect||et(t,e,(function(n,r,i){if(n)return Q(n,e,t);if(!i&&b.indexOf(s.dataType)>=0){try{r=decodeBodyByCharset(r,t)}catch(e){return d("decodeBodyByCharset error: %s",e),Q(null,r,t)}if("json"===s.dataType)if(0===W)r=null;else{var o=parseJSON(r,A);o.error?n=o.error:r=o.data}}q&&d("Request#%d %s: Remote socket was terminated before `response.end()` was called",x,a),Q(n,r,t)}))}))}function st(){d("Connect timer ticking, timeout: %d",nt),U=setTimeout((function(){U=null,-1===K&&(K=-2);var t="Connect timeout for "+nt+"ms",e="ConnectionTimeoutError";it.socket||(e="SocketAssignTimeoutError",t+=", working sockets is full"),(z=new Error(t)).name=e,z.requestId=x,d("ConnectTimeout: Request#%d %s %s: %s, connected: %s",x,a,z.name,t,G),ct()}),nt)}function lt(){d("Response timer ticking, timeout: %d",rt),H=setTimeout((function(){H=null;var t="Response timeout for "+rt+"ms";(z=new Error(t)).name="ResponseTimeoutError",z.requestId=x,d("ResponseTimeout: Request#%d %s %s: %s, connected: %s",x,a,z.name,t,G),ct()}),rt)}d("Request#%d %s %s with headers %j, options.path: %s",x,k,a,L.headers,L.path),s.requestUrls.push(a),Array.isArray(s.timeout)?(nt=f(s.timeout[0]),rt=f(s.timeout[1])):nt=rt=f(s.timeout),d("ConnectTimeout: %d, ResponseTimeout: %d",nt,rt),L.mode=s.mode?s.mode:"";try{it=T.request(L,at)}catch(t){return Q(t)}function ct(){d("Request#%d %s abort, connected: %s",x,a,G),it.socket||(z.noSocket=!0,Q(z)),it.abort()}return"undefined"==typeof window?st():it.on("requestTimeout",(function(){-1===K&&(K=-2),(z=new Error("Connect timeout for "+nt+"ms")).name="ConnectionTimeoutError",z.requestId=x,ct()})),$&&it.on("finish",(function(){$.requestSent=Date.now()-C})),it.once("socket",(function(t){$&&($.queuing=Date.now()-C),isNode010&&t.socket&&(t=t.socket);var e=t.readyState;if("opening"===e)return t.once("lookup",(function(t,e,n){d("Request#%d %s lookup: %s, %s, %s",x,a,t,e,n),$&&($.dnslookup=Date.now()-C),e&&(X=e)})),void t.once("connect",(function(){$&&($.connected=Date.now()-C),J(),lt(),d("Request#%d %s new socket connected",x,a),G=!0,X||(X=t.remoteAddress),Y=t.remotePort}));d("Request#%d %s reuse socket connected, readyState: %s",x,a,e),G=!0,V=!0,X||(X=t.remoteAddress),Y=t.remotePort,J(),lt()})),it.on("error",(function(t){"Error"!==t.name&&"TypeError"!==t.name||(t.name=G?"ResponseError":"RequestError"),t.message+=' (req "error")',d("Request#%d %s `req error` event emit, %s: %s",x,a,t.name,t.message),Q(z||t)})),ot&&ot.once("error",(function(t){t.message+=' (writeStream "error")',z=t,d("Request#%d %s `writeStream error` event emit, %s: %s",x,a,t.name,t.message),ct()})),s.stream?(s.stream.pipe(it),s.stream.once("error",(function(t){t.message+=' (stream "error")',z=t,d("Request#%d %s `readStream error` event emit, %s: %s",x,a,t.name,t.message),ct()}))):it.end(N),it.requestId=x,it}}).call(this,t("_process"),t("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)},module.exports=f()}).call(this,__webpack_require__(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},n6Qo:
/*!**************************************************************!*\
!*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***!
\**************************************************************/
/*! exports provided: default, FooterComponents */
/*! exports used: FooterComponents, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n("q1tI"),i=n("biw7"),o=n("fyJ8");e.b=function(t){var e=t.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},e)};var a={Cell:function(t){var e=t.className,n=t.index,a=t.children,s=t.colSpan,l=t.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(o.a,Object.assign({className:e,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:a,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(t){return r.createElement("tr",Object.assign({},t))}}},nj2k:
/*!***************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/nodata.svg ***!
\***************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=n.p+"static/nodata.8f2d5135.svg"},nnTU:
/*!********************************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js ***!
\********************************************************************************/
/*! exports provided: ICommandService, CommandsRegistry */
/*! exports used: CommandsRegistry, ICommandService */function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return h}));var r=n(/*! ../../../base/common/lifecycle.js */"pmY6"),i=n(/*! ../../../base/common/types.js */"746U"),o=n(/*! ../../instantiation/common/instantiation.js */"Cg/j"),a=n(/*! ../../../base/common/event.js */"MI8n"),s=n(/*! ../../../base/common/linkedList.js */"24hK"),l=n(/*! ../../../base/common/map.js */"QDVR"),c=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},u=Object(o.c)("commandService"),h=new(function(){function t(){this._commands=new Map,this._onDidRegisterCommand=new a.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return t.prototype.registerCommand=function(t,e){var n=this;if(!t)throw new Error("invalid command");if("string"==typeof t){if(!e)throw new Error("invalid command");return this.registerCommand({id:t,handler:e})}if(t.description){for(var o=[],a=0,l=t.description.args;a<l.length;a++){var u=l[a];o.push(u.constraint)}var h=t.handler;t.handler=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Object(i.m)(e,o),h.apply(void 0,c([t],e))}}var d=t.id,f=this._commands.get(d);f||(f=new s.a,this._commands.set(d,f));var p=f.unshift(t),m=Object(r.h)((function(){p();var t=n._commands.get(d);(null==t?void 0:t.isEmpty())&&n._commands.delete(d)}));return this._onDidRegisterCommand.fire(d),m},t.prototype.registerCommandAlias=function(t,e){return h.registerCommand(t,(function(t){for(var n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(n=t.get(u)).executeCommand.apply(n,c([e],r))}))},t.prototype.getCommand=function(t){var e=this._commands.get(t);if(e&&!e.isEmpty())return e.iterator().next().value},t.prototype.getCommands=function(){for(var t=new Map,e=0,n=Object(l.d)(this._commands);e<n.length;e++){var r=n[e],i=this.getCommand(r);i&&t.set(r,i)}return t},t}())},oRuE:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-iso10126.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},osHv:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/xml-fold.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){!function(t){"use strict";var e=t.Pos;function n(t,e){return t.line-e.line||t.ch-e.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(t,e,n,r){this.line=e,this.ch=n,this.cm=t,this.text=t.getLine(e),this.min=r?Math.max(r.from,t.firstLine()):t.firstLine(),this.max=r?Math.min(r.to-1,t.lastLine()):t.lastLine()}function a(t,n){var r=t.cm.getTokenTypeAt(e(t.line,n));return r&&/\btag\b/.test(r)}function s(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(s(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){i.lastIndex=e,t.ch=e;var n=i.exec(t.text);if(n&&n.index==e)return n}else t.ch=e}}function h(t){for(;;){i.lastIndex=t.ch;var e=i.exec(t.text);if(!e){if(s(t))continue;return}if(a(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e}}function f(t,n){for(var r=[];;){var i,o=h(t),a=t.line,s=t.ch-(o?o[0].length:0);if(!o||!(i=c(t)))return;if("selfClose"!=i)if(o[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:e(a,s),to:e(t.line,t.ch)}}else r.push(o[2])}}function p(t,n){for(var r=[];;){var i=d(t);if(!i)return;if("selfClose"!=i){var o=t.line,a=t.ch,s=u(t);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:e(t.line,t.ch),to:e(o,a)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var i=new o(t,r.line,0);;){var a=h(i);if(!a||i.line!=r.line)return;var s=c(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=e(i.line,i.ch),u=f(i,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,r,i){var a=new o(t,r.line,r.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&e(a.line,a.ch),h=s&&u(a);if(s&&h&&!(n(a,r)>0)){var d={from:e(a.line,a.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(a,h[2]),close:d,at:"close"}:{open:d,close:f(a=new o(t,l.line,l.ch,i),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,n,r){for(var i=new o(t,e.line,e.ch,n);;){var a=p(i,r);if(!a)break;var s=f(new o(t,e.line,e.ch,n),a.tag);if(s)return{open:a,close:s}}},t.scanForClosingTag=function(t,e,n,r){return f(new o(t,e.line,e.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
/*!*********************************************!*\
!*** ./src/components/PreviewAll/index.tsx ***!
\*********************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),f=n.n(d),p=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");e.a=function(t){var e,n,l,d,b,w,x=t.editOffice,S=void 0===x?"view":x,E=(t.name,t.data),C=(t.theme,t.type),k=t.filename,_=t.monacoEditor,T=t.className,O=t.style,A=t.close,L=t.onClose,D=t.hasMask,I=t.disabledDownload,R=t.onImgDimensions,M=t.otherData,N=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),j=Object(s.a)(N,2),P=(j[0],j[1],Object(u.useState)("")),F=Object(s.a)(P,2),B=(F[0],F[1]),U=Object(u.useState)(),H=Object(s.a)(U,2),z=H[0],G=H[1],V="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(e=E)&&void 0!==e&&e.startsWith("/api")&&"txt"!==C&&(E=y.a.API_SERVER+E),"office"===C&&Object(g.P)(E).filesize>10485760&&(C="other"),k&&(_.filename=k),Object(u.useEffect)((function(){var t,e,n=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&B(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===C&&q()}),[C,E]);var q=function(){var t=Object(a.a)(c.a.mark((function t(){var e,n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",E),e=E,E.startsWith("http")||(e=location.origin+e),n=new URL(e).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:n});case 6:r=t.sent,G(r);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),X=function(){E.startsWith("http")||E.startsWith("blob:")?Y():Object(g.x)(k||"educoder",E,k)},Y=function(){Object(g.v)(k||"educoder",decodeURIComponent(E))};return h.a.createElement("div",{style:Object(o.a)({},O||{}),className:"".concat(D&&f.a.bgBlack," ").concat(C?f.a.wrp:"hide")},A&&h.a.createElement("div",{className:f.a.close,ref:K},!!R&&h.a.createElement(i.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){L(),R()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!I&&h.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:Y},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:L},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[T]," ").concat(T," ").concat(f.a.monaco," ").concat("txt"===C?"show":"hide")},"txt"===C&&h.a.createElement(m.b,_)),"audio"===C&&h.a.createElement("audio",{src:"".concat((null===(n=E)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=E)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(E),autoPlay:!0}),"video"===C&&h.a.createElement(h.a.Fragment,null,(null===(d=E)||void 0===d?void 0:d.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(E),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(E),autoPlay:!0})),"office"===C&&z&&h.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(z.key,"&url=").concat(W+z.url,"&callbackUrl=").concat(W+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.title,"&model=").concat(S,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!I)}),("xlsx"===C||"doc"===C||"pptx"===C||"docx"===C)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(M.key,"&url=").concat(y.a.API_SERVER+M.url,"&callbackUrl=").concat(y.a.API_SERVER+M.callbackUrl,"&fileType=").concat(M.fileType,"&title=").concat(M.title,"&model=").concat(M.model)}),"html"===C&&h.a.createElement("iframe",{src:E+"&disposition=inline"}),"pdf"===C&&h.a.createElement("embed",{className:f.a.embed,src:E}),"image"===C&&h.a.createElement("img",{src:"".concat((null===(b=E)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(w=E)||void 0===w?void 0:w.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)}),"other"===C&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:X},h.a.createElement(p.a,null),"点击下载")),"download"===C&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:X},h.a.createElement(p.a,null),"点击下载"))}},"p77/":
/*!****************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.css ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){},pA7S:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/tripledes.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=e[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=e[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function f(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(e)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},pmY6:
/*!********************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js ***!
\********************************************************************/
/*! exports provided: isDisposable, dispose, combinedDisposable, toDisposable, DisposableStore, Disposable, MutableDisposable, ImmortalReference */
/*! exports used: Disposable, DisposableStore, ImmortalReference, MutableDisposable, combinedDisposable, dispose, isDisposable, toDisposable */function(t,e,n){"use strict";n.d(e,"g",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return h}));function r(t){}function i(t){return"function"==typeof t.dispose&&0===t.dispose.length}function o(t){return Array.isArray(t)?(t.forEach((function(t){t&&t.dispose()})),[]):t?(t.dispose(),t):void 0}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(r),{dispose:function(){return o(t)}}}function s(t){var e={dispose:function(){t()}};return e}var l=function(){function t(){this._toDispose=new Set,this._isDisposed=!1}return t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.clear())},t.prototype.clear=function(){this._toDispose.forEach((function(t){return t.dispose()})),this._toDispose.clear()},t.prototype.add=function(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t},t}(),c=function(){function t(){this._store=new l}return t.prototype.dispose=function(){this._store.dispose()},t.prototype._register=function(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)},t.None=Object.freeze({dispose:function(){}}),t}(),u=function(){function t(){this._isDisposed=!1}return Object.defineProperty(t.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(t){this._isDisposed||t===this._value||(this._value&&this._value.dispose(),this._value=t)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.value=void 0},t.prototype.dispose=function(){this._isDisposed=!0,this._value&&this._value.dispose(),this._value=void 0},t}(),h=function(){function t(t){this.object=t}return t.prototype.dispose=function(){},t}()},qBft:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-ansix923.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},qM6L:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/enc-utf16.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),function(){var t=r,e=t.lib.WordArray,n=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i+=2){var o=e[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o+=2){var a=i(e[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),r.enc.Utf16)},qu8F:
/*!****************************************************!*\
!*** ./node_modules/crypto-js/mode-ctr-gladman.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l<i;l++)t[n+l]^=s[l]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},"rAM+":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
\*******************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},rUJ1:
/*!********************************************!*\
!*** ./node_modules/marked/src/helpers.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: escape */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=t=>a[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const n=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(m,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(g,"$1")+e:t+e}function y(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.substr(0,r-i)}t.exports={escape:function(t,e){if(e){if(n.test(t))return t.replace(r,s)}else if(i.test(t))return t.replace(o,s);return t},unescape:c,edit:function(t,e){t=t.source||t,e=e||"";const n={replace:(e,r)=>(r=(r=r.source||r).replace(u,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n},cleanUrl:function(t,e,n){if(t){let t;try{t=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(n)&&(n=v(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,n,r=1;for(;r<arguments.length;r++)for(n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},splitCells:function(t,e){const n=t.replace(/\|/g,(t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:y,findClosingBracket:function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let r=0,i=0;for(;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},rWjI:
/*!************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/index.tsx + 4 modules ***!
\************************************************************/
/*! exports provided: Types, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PoweroffOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/AddOrEdit/CodePanel/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/AddOrEdit/ManageModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/AddOrEdit/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/SplitContainer/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/monaco-editor/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/tpi-code-setting/CodeSetting.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/urlTool.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/collapse/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/collapse/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/drawer/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/drawer/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popconfirm/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popconfirm/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/js-base64/base64.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.r(e),n.d(e,"Types",(function(){return at}));n("P2fV");var r,i,o=n("NJEC"),a=n("CiB2"),s=(n("DYRE"),n("zeV3")),l=(n("sRBo"),n("kaz8")),c=(n("7Kak"),n("9yH6")),u=(n("giR+"),n("fyUT")),h=(n("OaEy"),n("2fM7")),d=n("oBTY"),f=n("rAM+"),p=(n("T2oS"),n("W9HT")),m=(n("g9YV"),n("wCAj")),g=(n("+L6B"),n("2/Rp")),v=(n("14J3"),n("BMrR")),y=(n("jCWc"),n("kPKH")),b=(n("miYZ"),n("tsqr")),w=n("9og8"),x=(n("y8nQ"),n("Vl3Y")),S=n("tJVT"),E=n("k1fw"),C=(n("fu2T"),n("gK9i")),k=(n("2qtc"),n("kLXV")),_=(n("5NDa"),n("5rEg")),T=n("WmNS"),O=n.n(T),A=n("q1tI"),L=n.n(A),D=n("eRFJ"),I=n.n(D),R=n("jrin"),M=h.a.Option;!function(t){t[t.language=0]="language",t[t.difficulty=1]="difficulty",t[t.category=2]="category",t[t.openOrNot=3]="openOrNot"}(i||(i={}));var N=(r={},Object(R.a)(r,i.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(R.a)(r,i.difficulty,[{title:"简单",key:1},{title:"适中",key:2},{title:"困难",key:3}]),Object(R.a)(r,i.category,[{title:"程序设计",key:1},{title:"算法",key:2}]),Object(R.a)(r,i.openOrNot,[{title:"公开",key:1},{title:"私有",key:0}]),r);var j=n("Ty5D"),P=n("9kvl"),F=n("J66h"),B=n("GIiI"),U=n("2BaD"),H=n("Ot1p"),z=n("ErOA");function G(t){return Object(z.f)("practices.json",t)}function V(t){return Object(z.c)("practices/".concat(t,"/edit.json"))}function W(t,e){return Object(z.g)("practices/".concat(t),e)}var K,q=n("cDPC"),X=(n("bbsP"),n("/wGt")),Y=n("0Owb"),$=n("ZW9T"),J=n("ZD9Y"),Z=n("M8RZ"),Q=n("bCnd"),tt=n("1T2W"),et=n.n(tt),nt={theme:Object(Q.a)("cmCodeMode","vs-dark"),fontSize:Object(Q.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Q.a)("cmTabToSpace",!0)};function rt(t,e){switch(e.type){case K.set_show_editor_setting:return Object(E.a)(Object(E.a)({},t),{},{showEditorSetting:e.payload});case K.set_theme:return Object(E.a)(Object(E.a)({},t),{},{theme:e.payload});case K.set_font_size:return Object(E.a)(Object(E.a)({},t),{},{fontSize:e.payload});case K.on_tab_to_space:return Object(E.a)(Object(E.a)({},t),{},{tabToSpace:e.payload});default:throw new Error}}!function(t){t[t.set_font_size=0]="set_font_size",t[t.set_theme=1]="set_theme",t[t.on_tab_to_space=2]="on_tab_to_space",t[t.set_show_editor_setting=3]="set_show_editor_setting"}(K||(K={}));var it=function(t){var e=t.value,n=t.onChange,r=t.language,i=t.onLanguage,o=t.languageItems,a=t.ActionBarRender,s=void 0===a?function(t){return L.a.createElement(ot,{languageItems:o,onLanguage:i,language:r,onShowCodeSetting:t})}:a,l=Object(A.useReducer)(rt,nt),c=Object(S.a)(l,2),u=c[0],h=c[1],d=u.theme,f=u.fontSize,p=u.showEditorSetting,m=u.tabToSpace;console.log(e,r,"value");var g={onFontSizeChange:function(t){h({type:K.set_font_size,payload:t}),Object(Q.b)("cmFontSize",t)},tabToSpace:m,cmFontSize:f,className:"oj",cmCodeMode:d,onTabToSpace:function(t){h({type:K.on_tab_to_space,payload:t}),Object(Q.b)("cmTabToSpace",t)},onCodeModeChange:function(t){h({type:K.set_theme,payload:t}),Object(Q.b)("cmCodeMode",t)}};var v={value:e,language:r,onChange:n,theme:d,height:"calc(100% - 56px)",options:{fontSize:f,insertSpaces:m}};return L.a.createElement(A.Fragment,null,L.a.createElement("div",{className:et.a["code-panel-container"]},s((function(){h({type:K.set_show_editor_setting,payload:!0})})),L.a.createElement($.b,Object(Y.a)({key:r},v))),L.a.createElement(Z.a,null,L.a.createElement(X.a,{className:"oj",title:null,placement:"right",closable:!1,visible:p,onClose:function(){h({type:K.set_show_editor_setting,payload:!1})}},L.a.createElement(J.a,g))))};function ot(t){var e=t.languageItems,n=t.language,r=t.onShowCodeSetting,i=t.onLanguage;return L.a.createElement("div",{className:et.a["action-oj-bar"]},null==e?void 0:e.map((function(t){return L.a.createElement("div",{className:n===(null==t?void 0:t.language)?et.a.active:"",onClick:function(){return i(null==t?void 0:t.language)},key:null==t?void 0:t.language},null==t?void 0:t.language)})),L.a.createElement("a",{onClick:r},L.a.createElement("i",{className:"iconfont icon-shezhi"})))}n("Znn+");var at,st=n("ZTPi"),lt=n("L9qf"),ct=n.n(lt),ut=function(t){var e=t.visible,n=t.onOK,r=t.onCancel,i=Object(A.useState)(!1),o=Object(S.a)(i,2),a=o[0],s=o[1],l=Object(A.useState)(!1),c=Object(S.a)(l,2),u=c[0],h=c[1],d=Object(A.useState)("1"),f=Object(S.a)(d,2),p=f[0],v=f[1],y=Object(A.useState)(""),x=Object(S.a)(y,2),E=x[0],C=x[1],T=Object(A.useState)([]),D=Object(S.a)(T,2),I=D[0],R=D[1],M=function(){var t=Object(w.a)(O.a.mark((function t(){var r;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(E){t.next=3;break}return b.b.warn("题目".concat(j,"不能为空")),t.abrupt("return");case 3:return h(!0),t.next=6,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:e,name:E}});case 6:if(0!==(null==(r=t.sent)?void 0:r.status)){t.next=10;break}return n(),t.abrupt("return");case 10:h(!1);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=Object(w.a)(O.a.mark((function t(){var n,r,i=arguments;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>0&&void 0!==i[0]?i[0]:"",s(!0),t.next=4,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:e,search:n}});case 4:r=t.sent,R(r.tag_disciplines||[]),s(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j="practice"===e?"知识点":"来源";return L.a.createElement(k.a,{afterClose:function(){h(!1),s(!1),C(""),v("1"),R([])},centered:!0,keyboard:!1,width:600,title:"".concat(j,"管理"),visible:!!e,className:ct.a.customModal,footer:null,onCancel:r},L.a.createElement("section",{className:ct.a.wrap},L.a.createElement(st.a,{activeKey:p,onChange:function(t){C(""),v(t),N()}},L.a.createElement(st.a.TabPane,{tab:"新增".concat(j),key:"1"},L.a.createElement(_.a,{value:E,onChange:function(t){return C(t.target.value)},className:ct.a.in,placeholder:"输入".concat(j,"名称不超过20个字"),maxLength:20}),L.a.createElement("div",{className:ct.a.btns},L.a.createElement(g.a,{onClick:r,className:"mr20"},"取消 "),L.a.createElement(g.a,{loading:u,onClick:M,type:"primary"},"确认新建"))),L.a.createElement(st.a.TabPane,{tab:"已有".concat(j),key:"2"},L.a.createElement(_.a.Search,{allowClear:!0,onSearch:function(t){N(t)},value:E,onChange:function(t){return C(t.target.value)},className:ct.a.in,placeholder:"输入".concat(j,"名称进行查询")}),L.a.createElement(m.a,{dataSource:I,bordered:!1,loading:a,scroll:I.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(j,"名称"),dataIndex:"name",ellipsis:!0},{title:"操作",dataIndex:"action",width:120,render:function(t,n){return L.a.createElement("span",null,L.a.createElement("span",{onClick:function(){return function(t){var e,n=t.name;k.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"重命名",content:L.a.createElement("div",null,L.a.createElement(_.a,{defaultValue:n,placeholder:"请输入".concat(j,"名称不超过20个字"),maxLength:20,onChange:function(t){n=t.target.value}})),okText:"确认",cancelText:"取消",onOk:(e=Object(w.a)(O.a.mark((function e(){var r;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=3;break}return b.b.warn("题目".concat(j,"不能为空")),e.abrupt("return",Promise.reject());case 3:return e.next=5,Object(z.a)("/api/tag_disciplines/".concat(t.id,"/rename.json"),{method:"post",body:{id:t.id,name:n}});case 5:0===(null==(r=e.sent)?void 0:r.status)&&N();case 7:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}(n)},className:"current mr10 c-light-primary"},"重命名"),L.a.createElement("span",{onClick:function(){return function(t){var n;k.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"删除",content:"practice"===e?L.a.createElement("div",null,"确认将题目来源“",L.a.createElement("span",{className:"c-light-primary"},t.name),"”删除吗?",L.a.createElement("br",null),"删除后,会将相关题目中的来源进行清除。"):L.a.createElement("div",null,"确认将题目知识点“",L.a.createElement("span",{className:"c-light-primary"},t.name),"”删除吗?",L.a.createElement("br",null),"删除后,会将相关题目中的知识点进行清除。"),okText:"确认",cancelText:"取消",onOk:(n=Object(w.a)(O.a.mark((function e(){var n;return O.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/tag_disciplines/".concat(t.id,".json"),{method:"delete",body:{id:t.id}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&N();case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}(n)},className:"current c-grey-666"},"删除"))}}],pagination:!1})))))},ht=n("m3rI"),dt=n("B7Ph"),ft=n("wd/R"),pt=n.n(ft),mt=n("1vsH"),gt=n("9Bee"),vt=n("xKgJ"),yt=_.a.TextArea,bt=(k.a.confirm,C.a.Panel),wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};!function(t){t[t.SET_INITAL_DATA=0]="SET_INITAL_DATA",t[t.SET_LOADING=1]="SET_LOADING",t[t.SET_STATUS=2]="SET_STATUS"}(at||(at={}));function xt(t,e){switch(e.type){case at.SET_INITAL_DATA:return Object(E.a)(Object(E.a)({},t),e.payload);case at.SET_LOADING:return Object(E.a)(Object(E.a)({},t),{},{loading:e.payload});case at.SET_STATUS:return Object(E.a)(Object(E.a)({},t),{},{status:e.payload});default:throw new Error}}e.default=function(){Object(j.h)();var t,e,n,r=Object(j.g)(),i=Object(j.i)().id,o=x.a.useForm(),a=Object(S.a)(o,1)[0],s=Object(A.useState)(),l=Object(S.a)(s,2),c=l[0],u=l[1],h=Object(A.useState)(!1),d=Object(S.a)(h,2),C=d[0],_=d[1],T=Object(A.useState)([]),D=Object(S.a)(T,2),R=D[0],M=D[1],N=Object(A.useState)([]),U=Object(S.a)(N,2),K=U[0],X=U[1],Y=Object(A.useState)([]),$=Object(S.a)(Y,2),J=$[0],Z=$[1],Q=Object(A.useState)([]),tt=Object(S.a)(Q,2),et=tt[0],nt=tt[1],rt=Object(A.useState)([]),ot=Object(S.a)(rt,2),st=ot[0],lt=ot[1],ct=Object(A.useState)("C"),ut=Object(S.a)(ct,2),dt=ut[0],ft=ut[1],vt=Object(A.useReducer)(xt,wt),yt=Object(S.a)(vt,2),bt=yt[0],Et=yt[1],Ct=bt.loading,kt=bt.data,_t=bt.user,Tt=(bt.status,null==kt?void 0:kt.hack_sets),Ot=null==kt||null===(t=kt.hack)||void 0===t?void 0:t.test_set_average,At=Object(A.useState)(!1),Lt=Object(S.a)(At,2),Dt=Lt[0],It=Lt[1],Rt=Object(A.useRef)([]),Mt=Object(A.useState)(!1),Nt=Object(S.a)(Mt,2),jt=Nt[0],Pt=Nt[1],Ft=Object(A.useState)(!1),Bt=Object(S.a)(Ft,2),Ut=Bt[0],Ht=Bt[1],zt=Object(A.useRef)(!0),Gt=Object(A.useState)({}),Vt=Object(S.a)(Gt,2),Wt=Vt[0],Kt=Vt[1];Object(A.useEffect)((function(){return Object(P.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(P.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(P.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(P.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}}),[]),Object(A.useEffect)((function(){setTimeout((function(){document.title="在线刷题"}),400)}));var qt=function(){var t=Object(w.a)(O.a.mark((function t(){var e,n;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return e=t.sent,t.next=5,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:n=t.sent,X(e.tag_disciplines||[]),Z(n.tag_disciplines||[]);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Xt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Yt=Object(A.useCallback)(Object(w.a)(O.a.mark((function t(){var e,n,r,o,s,l,c,h,d,f,p,m,g,v,y,b,w,x,S,C,k,_,T,A;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Et({type:at.SET_LOADING,payload:!0}),!i){t.next=19;break}return t.next=4,V(i);case 4:e=t.sent,n=e.user,e.language,r=e.practice_sets,o=e.practice_codes,s=e.description,l=e.difficulty,c=e.name,h=e.open_or_not,d=e.time_limit,f=e.test_set_average,p=e.test_set_score,m=e.status,g=e.tag_discipline_ids,v=e.source_discipline_ids,e.item_banks_group_id,y=e.is_file,b=void 0!==y&&y,w=e.hide_actual_output,x=e.review_privilege,S=e.review_description,Kt({review_privilege:x,status:m,review_description:S,name:c}),It(w),C=b?[{input:"",output:"",score:100,position:1}]:r,b?(M(r),a.setFieldsValue({hack_sets:C})):M([]),k={loading:!0,user:n,status:m,data:{hack:{difficulty:l,name:c,description:s,open_or_not:h,time_limit:d,test_set_average:f,test_set_score:p,tag_discipline_ids:g,source_discipline_ids:v,is_file:b},hack_sets:C}},Et({type:at.SET_INITAL_DATA,payload:k}),u({hack:{difficulty:l,name:c,description:s,open_or_not:h,time_limit:d,test_set_average:f,test_set_score:p,tag_discipline_ids:g,source_discipline_ids:v,is_file:b}}),_=null==o?void 0:o.map((function(t){return Object(E.a)(Object(E.a)({},t),{},{code:F.Base64.decode(null==t?void 0:t.code)})})),lt(_),Rt.current=_,t.next=27;break;case 19:return t.next=21,Object(z.c)("problems/new.json");case 21:T=t.sent,A=T.user,Et({type:at.SET_INITAL_DATA,payload:{loading:!0,status:0,user:A,data:{hack:{difficulty:"",time_limit:3,description:"#### 题目描述\n现有一个整型数组 `nums`,请编写程序将数组 `nums` 中的所有 `$$0$$` 移动到数组的末尾,但不改变非零元素在数组中的相对位置。请在原数组 `nums` 上进行操作。\n#### 输入输出格式\n**输入格式**\n第一行有一个整数 `numsSize`,表示数组 `nums` 的大小;\n第二行有 `numsSize` 个整数,表示数组 `nums` 的所有元素,每个整数用一个空格隔开。\n**输出格式**\n一行输出数组 `nums` 的所有元素,有 `numsSize` 个整数,每个整数用一个空格隔开。\n#### 输入输出样例1\n**输入**\n`4`\n`0 1 2 3`\n**输出**\n`1 2 3 0`\n**解释(可选)**\nXXXXX\n#### 输入输出样例2\n**输入**\n`5`\n`1 1 0 1 0`\n**输出**\n`1 1 1 0 0`\n**解释(可选)**\nXXXXX\n#### 说明提示\n-`1≤n≤100`",test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),u({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),lt(Xt),Rt.current=Xt;case 27:Et({type:at.SET_LOADING,payload:!1});case 28:case"end":return t.stop()}}),t)}))),[i]);function $t(){return($t=Object(w.a)(O.a.mark((function t(e,n){var o,a,s,l,c,u,h,d,p,m,g,v,y,w,x,S,C,k;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=Object(E.a)({},e),s=a.hack_sets,(l=a.hack).hide_actual_output=Dt,c=[],u=[],h=0,d=null!=l&&l.is_file?R.map((function(t,e){return Object(E.a)(Object(E.a)({},t),{},{position:e+1})})):s.map((function(t){return Object(E.a)(Object(E.a)({},t),{},{is_file:!1})})),p=Object(f.a)(d);try{for(p.s();!(m=p.n()).done;)g=m.value,h+=g.score,g.id&&g.id>=0?c.push(g):u.push(g)}catch(t){p.e(t)}finally{p.f()}if(null!=d&&d.length){t.next=11;break}return b.b.error("测试集不能为空"),t.abrupt("return");case 11:if(100===h||l.test_set_score){t.next=14;break}return b.b.error("测试集的评分占比之和必须等于100"),t.abrupt("return");case 14:if(null==d||!d.some((function(t){return!t.output}))){t.next=17;break}return b.b.error("测试集输出不能为空"),t.abrupt("return");case 17:if(zt.current?Pt(!0):Ht(!0),y=null==st?void 0:st.map((function(t){return Object(E.a)(Object(E.a)({},t),{},{code:F.Base64.encode(null==t?void 0:t.code)})})),!i){t.next=25;break}return t.next=22,W(i,{practice:l,practice_codes:y,practice_sets:u,update_practice_sets:c});case 22:v=t.sent,t.next=28;break;case 25:return t.next=27,G({practice:l,practice_codes:y,practice_sets:d,publish:!zt.current});case 27:v=t.sent;case 28:if(Pt(!1),Ht(!1),0!==(null===(o=v)||void 0===o?void 0:o.status)){t.next=46;break}if(null===(w=v)||void 0===w||null===(x=w.similar_practice)||void 0===x||!x.length){t.next=35;break}return _(!0),nt(null===(S=v)||void 0===S?void 0:S.similar_practice),t.abrupt("return");case 35:if(!i){t.next=44;break}if(b.b.success("保存成功"),zt.current){t.next=42;break}return t.next=40,Object(z.a)("/api/practices/".concat(i,"/start"),{method:"get"});case 40:0===(null==(C=t.sent)?void 0:C.status)&&r.push("/problems/".concat(null==C?void 0:C.identifier,"/oj/").concat(i));case 42:t.next=46;break;case 44:b.b.success("新建成功"),r.replace("/problems/".concat(null===(k=v)||void 0===k?void 0:k.identifier,"/ojedit"));case 46:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Jt(){r.replace("/problems")}Object(A.useEffect)((function(){try{Yt(),qt()}catch(t){console.log(t,"----")}}),[]);var Zt=function(t){var e=Math.floor(100/t.length),n=e+100%t.length;t=t.map((function(r,i){return i===t.length-1?Object(E.a)(Object(E.a)({},r),{},{score:n}):Object(E.a)(Object(E.a)({},r),{},{score:e})})),M(t)};Object(A.useEffect)((function(){if(Ot){var t=null==Tt?void 0:Tt.length,e=Math.floor(100/t),n=100%t;null==Tt||Tt.map((function(r,i){return r.score=e,r.position=i+1,i===t-1&&(r.score=e+n),r})),Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack_sets:Tt})}}),a.setFieldsValue({hack_sets:Tt})}}),[Ot]);var Qt=function(){var t=Object(w.a)(O.a.mark((function t(e){var n;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/practices/".concat(e,"/start"),{method:"get"});case 2:0===(null==(n=t.sent)?void 0:n.status)&&Object(mt.O)("/problems/".concat(null==n?void 0:n.identifier,"/oj/").concat(e));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),te=function(){var t=Object(w.a)(O.a.mark((function t(){var e,n,r,o,a;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,V(i);case 2:e=t.sent,n=e.name,r=e.status,o=e.review_privilege,a=e.review_description,Kt({review_privilege:o,status:r,review_description:a,name:n});case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ee=function(){var t=Object(w.a)(O.a.mark((function t(){return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"提示",content:"确认将题目《".concat(null==Wt?void 0:Wt.name,"》的审核通过吗?"),okText:"确认",cancelText:"取消",onOk:function(){var t=Object(w.a)(O.a.mark((function t(){var e;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/practices/".concat(i,"/review.json"),{method:"post",body:{op:"pass"}});case 2:0===(null==(e=t.sent)?void 0:e.status)&&(b.b.success("提交成功"),te());case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return L.a.createElement(p.a,{spinning:Ct,size:"large",className:I.a["oj-custom-large-spin"]},kt?L.a.createElement(A.Fragment,null,L.a.createElement("header",{className:I.a.header},L.a.createElement("div",null,L.a.createElement("img",{src:"".concat(ht.a.IMG_SERVER,"/images/").concat(null==_t?void 0:_t.image_url),alt:"user",width:30}),L.a.createElement("span",null,null==_t?void 0:_t.name)),L.a.createElement("h2",null," ",null==kt||null===(e=kt.hack)||void 0===e?void 0:e.name," "),i?L.a.createElement("a",{className:I.a.btn_back,onClick:Jt}," ",L.a.createElement(B.a,null),"退出"):null),L.a.createElement(x.a,{form:a,initialValues:kt,layout:"vertical",className:I.a["oj-form-container"],onValuesChange:function(t){u(Object(E.a)({},a.getFieldsValue()))},onFinish:function(t,e){return $t.apply(this,arguments)}},L.a.createElement(q.a,{hideResize:!0,className:I.a["oj-problems"],leftChild:L.a.createElement(St,{formValue:c,onRemoveTestCase:function(t){var e=a.getFieldValue("hack_sets"),n=(null==e?void 0:e.length)-1,r=Math.ceil(100/n),i=100%n;e.splice(t,1),null==e||e.map((function(t,e){return Ot&&(t.score=r,e===n-1&&(t.score=r+i)),t.position=e+1,t})),Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack_sets:e})}}),a.setFieldsValue({hack_sets:e})},onAddTestCase:function(){var t=a.getFieldValue("hack_sets"),e=t.length+1,n=Math.floor(100/e),r=100%e;t.map((function(t,e){return Ot&&(t.score=n),t.position=e+1,t})),t.push({input:"",output:"",position:e,score:Ot?n+r:0}),a.setFieldsValue({hack_sets:t}),Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack_sets:t})}})},hack:kt.hack,onChangeScore:function(t){t.target.value||Zt(R),Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack:Object(E.a)(Object(E.a)({},kt.hack),{},{test_set_score:t.target.value})})}})},onChangehide:function(t){It(t.target.checked)},onChangeAverage:function(t){var e=t.target.value;e&&Zt(R),Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack:Object(E.a)(Object(E.a)({},kt.hack),{},{test_set_average:e})})}})},onChangeFile:function(t){Et({type:at.SET_INITAL_DATA,payload:{data:Object(E.a)(Object(E.a)({},kt),{},{hack:Object(E.a)(Object(E.a)({},kt.hack),{},{is_file:t.target.value})})}})},uploadData:R,setUploadData:M,handleUploadRatio:Zt,ischecked:Dt,pointData:K,sourceData:J,getPointData:qt}),rightChild:L.a.createElement(it,{value:null==st||null===(n=st.find((function(t){return t.language===dt})))||void 0===n?void 0:n.code,onChange:function(t){var e,n=null===(e=Rt.current)||void 0===e?void 0:e.findIndex((function(t){return t.language===dt}));Rt.current[n].code=t,lt(Rt.current)},onLanguage:function(t){ft(t)},languageItems:st,language:dt})}),L.a.createElement("div",{className:I.a.footer},!!i&&L.a.createElement("div",{className:I.a.result},L.a.createElement("span",null,"审核结果:"),null!=Wt&&Wt.review_privilege?L.a.createElement(L.a.Fragment,null,L.a.createElement("div",{onClick:ee,className:I.a.pass},"通过"),L.a.createElement("div",{onClick:function(){var t,e="";k.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"不通过原因",content:L.a.createElement("div",{className:"mt20"},L.a.createElement(H.a,{className:I.a.MdEditor,defaultValue:e,onChange:function(t){e=t}})),okText:"确认",cancelText:"取消",onOk:(t=Object(w.a)(O.a.mark((function t(){var n;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=3;break}return b.b.warn("不通过原因不能为空"),t.abrupt("return",Promise.reject());case 3:return t.next=5,Object(z.a)("/api/practices/".concat(i,"/review.json"),{method:"post",body:{op:"fail",description:e}});case 5:0===(null==(n=t.sent)?void 0:n.status)&&(b.b.success("提交成功"),te());case 7:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},className:I.a.noPass},"不通过")):L.a.createElement(L.a.Fragment,null,0===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.passText},L.a.createElement("i",{className:"iconfont icon-tongguo"}),"未发布"),1===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.passText},L.a.createElement("i",{className:"iconfont icon-tongguo"}),"已公开"),2===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.passText},L.a.createElement("i",{className:"iconfont icon-tongguo"}),"未审批"),3===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.passText},L.a.createElement("i",{className:"iconfont icon-tongguo"}),"审核中"),4===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.passText},L.a.createElement("i",{className:"iconfont icon-tongguo"}),"审核完成待公开"),5===(null==Wt?void 0:Wt.status)&&L.a.createElement("div",{className:I.a.noPassText},L.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"审核不通过",L.a.createElement("span",{onClick:function(){var t=k.a.confirm({icon:null,width:700,className:"".concat(I.a.cusModal," custom-modal-divider"),centered:!0,title:L.a.createElement(v.a,null,L.a.createElement(y.a,{flex:"1"},"不通过原因"),L.a.createElement(y.a,null,L.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return t.destroy()}}))),content:L.a.createElement("div",null,L.a.createElement(gt.a,{className:"mt20",value:(null==Wt?void 0:Wt.review_description)||""}))})}},"查看原因")))),L.a.createElement(g.a,{type:"primary",ghost:!0,onClick:Jt},"退出编辑"),L.a.createElement(g.a,{disabled:Ut,loading:jt,type:"primary",onClick:function(){zt.current=!0,a.submit()}},"保存 "),i?L.a.createElement(g.a,{disabled:jt,loading:Ut,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){zt.current=!1,a.submit()}},"立即体验"):L.a.createElement(g.a,{disabled:jt,loading:Ut,type:"primary",onClick:function(){zt.current=!1,a.submit()}},"保存并发布审核")))):null,L.a.createElement(k.a,{centered:!0,destroyOnClose:!0,footer:null,visible:C,onCancel:function(){return _(!1)},title:"相似性检测",width:"600px"},L.a.createElement("div",null,L.a.createElement("p",{className:"font14"},"经系统检测发现,本题目与系统中已创建的题目高度雷同,请调整题目后再进行保存"),L.a.createElement(m.a,{dataSource:et,bordered:!1,scroll:et.length>7?{y:300}:{},columns:[{title:"相似题题目",dataIndex:"name",ellipsis:!0,render:function(t,e){return L.a.createElement("span",{onClick:function(){return Qt(null==e?void 0:e.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},t)}},{title:"创建时间",dataIndex:"create_time",width:170,render:function(t){var e;return null===(e=pt()(t))||void 0===e?void 0:e.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function St(t){var e,n,r,f=t.ischecked,p=t.formValue,m=t.hack,v=t.onChangeAverage,y=t.onChangeScore,b=t.onChangehide,T=t.onChangeFile,D=t.onAddTestCase,R=t.onRemoveTestCase,j=t.uploadData,P=t.setUploadData,F=t.handleUploadRatio,B=t.pointData,G=t.sourceData,V=t.getPointData,W=m.test_set_average,K=m.test_set_score,q=Object(A.useState)(!1),X=Object(S.a)(q,2),Y=X[0],$=X[1],J=Object(A.useState)(!1),Z=Object(S.a)(J,2),Q=Z[0],tt=Z[1];function et(t){t.stopPropagation()}return L.a.createElement("div",{className:I.a["oj-left-panel"]},L.a.createElement("div",{className:I.a["oj-form-info"]},L.a.createElement(x.a.Item,{label:"题目名称",name:["hack","name"],rules:[{required:!0,message:"请输入题目名称"}],className:I.a.inputOne},L.a.createElement(_.a,{bordered:!1,maxLength:60,placeholder:"请输入题目名称",suffix:L.a.createElement("span",null,(null==p||null===(e=p.hack)||void 0===e||null===(n=e.name)||void 0===n?void 0:n.length)||0,"/",L.a.createElement("span",{className:"c-grey-999"},"60"))})),L.a.createElement(x.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"请输入描述内容"}]},L.a.createElement(H.a,{placeholder:"请输入题目描述…",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),L.a.createElement("div",{className:I.a.row},L.a.createElement("div",{className:I.a.a},L.a.createElement(x.a.Item,{label:"难易度",name:["hack","difficulty"],rules:[{required:!0,message:"请选择难易度"}]},L.a.createElement(h.a,null,(r=i.difficulty,N[r].map((function(t){return L.a.createElement(M,{key:t.title,value:t.key}," ",t.title," ")})))))),L.a.createElement("div",{className:I.a.b},L.a.createElement(x.a.Item,{label:"题目来源",name:["hack","source_discipline_ids"]},L.a.createElement(h.a,{placeholder:"选择题目来源",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(t){return t.parentNode}},G.map((function(t){return L.a.createElement(h.a.Option,{key:t.id,value:t.id},t.name)})))),L.a.createElement(g.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return function(){if(Object(vt.v)())tt("practice_source");else{var t,e="";k.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"新建来源",content:L.a.createElement("div",null,L.a.createElement(_.a,{placeholder:"请输入来源名称不超过20个字",maxLength:20,onChange:function(t){e=t.target.value}})),okText:"确认",cancelText:"取消",onOk:(t=Object(w.a)(O.a.mark((function t(){var n;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:e}});case 2:0===(null==(n=t.sent)?void 0:n.status)&&V();case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}()}},Object(vt.v)()?"来源管理":"新建来源"))),L.a.createElement("div",{className:I.a.row},L.a.createElement("div",{className:I.a.b,style:{width:"100%",marginLeft:0}},L.a.createElement(x.a.Item,{label:"知识点",rules:[{required:!0,message:"请选择知识点"}],name:["hack","tag_discipline_ids"]},L.a.createElement(h.a,{placeholder:"选择知识点",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(t){return t.parentNode}},B.map((function(t){return L.a.createElement(h.a.Option,{key:t.id,value:t.id},t.name)})))),L.a.createElement(g.a,{type:"primary",ghost:!0,onClick:function(){return function(){if(Object(vt.v)())tt("practice");else{var t,e="";k.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"新建知识点",content:L.a.createElement("div",null,L.a.createElement(_.a,{placeholder:"请输入知识点名称不超过20个字",maxLength:20,onChange:function(t){e=t.target.value}})),okText:"确认",cancelText:"取消",onOk:(t=Object(w.a)(O.a.mark((function t(){var n;return O.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:e}});case 2:0===(null==(n=t.sent)?void 0:n.status)&&V();case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}()}},Object(vt.v)()?"知识点管理":"新建知识点"))),L.a.createElement("div",{className:I.a.field},L.a.createElement(x.a.Item,{label:"评测时长限制",name:["hack","time_limit"],rules:[{required:!0,message:"请输入评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],className:I.a.inputTwo,extra:L.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"秒",L.a.createElement("span",{className:"ml5 c-grey-999"},"(代码执行所允许的最大时长)"))},L.a.createElement(u.a,{style:{width:185},min:3}))),L.a.createElement("div",{className:"tst-case-info"},L.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","测试用例与系统评分规则",!m.is_file&&L.a.createElement(g.a,{style:{height:40},type:"primary",ghost:!0,onClick:D},"添加测试用例")),L.a.createElement(x.a.Item,{name:["hack","test_set_score"]},L.a.createElement(c.a.Group,{onChange:y},L.a.createElement(c.a,{value:!0},"通过全部测试集",L.a.createElement("span",{className:"tip"}," ","(学员评测,仅当所有测试集都正确时,才获得一次性奖励)")),L.a.createElement(c.a,{value:!1},"通过部分测试集",L.a.createElement("span",{className:"tip"}," ","(学员评测,通过测试集即可获得对应奖励)")))),L.a.createElement(l.a,{style:{marginBottom:"5px"},checked:f,onChange:b},"隐藏实际输出 (选中,则在学生做题过程中无法看到实际输出结果,仅展示是否评测是否通过)"),L.a.createElement(x.a.Item,{className:I.a.testJi,name:["hack","is_file"],label:"用例类型:"},L.a.createElement(c.a.Group,{onChange:T},L.a.createElement(s.a,{direction:"horizontal"},L.a.createElement(c.a,{value:!1},"文本"),L.a.createElement(c.a,{value:!0},"文件")))),!m.test_set_score&&L.a.createElement(x.a.Item,{name:["hack","test_set_average"],label:"系统评分占比"},L.a.createElement(c.a.Group,{onChange:v},L.a.createElement(c.a,{value:!0},"均分比例"),L.a.createElement(c.a,{value:!1},"自定义比例"))),m.is_file&&L.a.createElement("div",{className:I.a.upBtn},L.a.createElement(g.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return $(!0)}},"批量上传测试用例"),L.a.createElement(dt.a,{disabled:null==m?void 0:m.test_set_average,inputChange:function(t,e){console.log(t,e);var n=j.map((function(n,r){return r===e?Object(E.a)(Object(E.a)({},n),{},{score:t.target.value?Number(t.target.value):0}):n}));P(n)},showScore:!m.test_set_score,data:j,onRemove:function(t,e){var n=Object(d.a)(j);n.splice(e,1),W?F(n):P(n)}})),!m.is_file&&L.a.createElement(x.a.List,{name:"hack_sets"},(function(t,e){return Object(a.a)(e),L.a.createElement(C.a,{accordion:!0},t.map((function(t,e){return L.a.createElement(bt,{key:"".concat(t.key,"--").concat(e),header:L.a.createElement("a",{className:I.a["test-case-name"]},L.a.createElement("span",null,"测试用例",e+1),K?null:L.a.createElement(L.a.Fragment,null,L.a.createElement(x.a.Item,{name:[t.name,"score"],fieldKey:[t.fieldKey,"score"],rules:[{required:!0,message:"请输入测试集".concat(e+1,"评分")}]},L.a.createElement(u.a,{onClick:et,min:0,max:100,disabled:W})),L.a.createElement("span",null,"%"))),extra:e>0?L.a.createElement("div",{onClick:et},L.a.createElement(o.a,{okText:"确定",cancelText:"取消",title:"确定删除测试集\b"+(e+1),onConfirm:function(){R(e)}},L.a.createElement(U.a,{className:I.a["btn-remove-case"]}))):null},L.a.createElement(x.a.Item,{label:"输入",name:[t.name,"input"],fieldKey:[t.fieldKey,"input"]},L.a.createElement(yt,null)),L.a.createElement(x.a.Item,{label:"输出",name:[t.name,"output"],fieldKey:[t.fieldKey,"output"],rules:[{required:!0,message:"请输入输出内容"}]},L.a.createElement(yt,null)))})))})))),L.a.createElement(dt.b,{rootIdentifier:null,visible:Y,onClose:function(){return $(!1)},onOK:function(t){var e=j.concat(t);m.test_set_average?F(e):P(e)}}),L.a.createElement(ut,{visible:Q,onCancel:function(){tt(!1),V()},onOK:function(){tt(!1),V()}}))}},rdUC:
/*!*****************************************************!*\
!*** ./node_modules/store/storages/localStorage.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe").Global;function i(){return r.localStorage}function o(t){return i().getItem(t)}t.exports={name:"localStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},sR1s:
/*!*****************************************************!*\
!*** ./node_modules/rc-table/es/utils/valueUtil.js ***!
\*****************************************************/
/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */
/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(t){return null==t?[]:Array.isArray(t)?t:[t]}function o(t,e){if(!e&&"number"!=typeof e)return t;for(var n=i(e),r=t,o=0;o<n.length;o+=1){if(!r)return null;r=r[n[o]]}return r}function a(t){var e=[],n={};return t.forEach((function(t){for(var r=t||{},o=r.key,a=r.dataIndex,s=o||i(a).join("-")||"RC_TABLE_KEY";n[s];)s="".concat(s,"_next");n[s]=!0,e.push(s)})),e}function s(){var t={};function e(t,n){n&&Object.keys(n).forEach((function(i){var o=n[i];o&&"object"===Object(r.a)(o)?(t[i]=t[i]||{},e(t[i],o)):t[i]=o}))}for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){e(t,n)})),t}function l(t){return null!=t}},sboe:
/*!*************************************************!*\
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
\*************************************************/
/*! exports provided: TreeContext */
/*! exports used: TreeContext */function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(/*! react */"q1tI"),i=r.createContext(null)},t23M:
/*!*****************************************************!*\
!*** ./node_modules/rc-resize-observer/es/index.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */function(t,e,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),o=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),a=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=n(/*! react */"q1tI"),c=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=n(/*! rc-util/es/Children/toArray */"Zm9Q"),h=n(/*! rc-util/es/warning */"Kwbf"),d=n(/*! rc-util/es/ref */"c+Xe"),f=n(/*! resize-observer-polyfill */"bdgK"),p=function(t){Object(a.a)(n,t);var e=Object(s.a)(n);function n(){var t;return Object(i.a)(this,n),(t=e.apply(this,arguments)).resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(e){var n=t.props.onResize,i=e[0].target,o=i.getBoundingClientRect(),a=o.width,s=o.height,l=i.offsetWidth,c=i.offsetHeight,u=Math.floor(a),h=Math.floor(s);if(t.state.width!==u||t.state.height!==h||t.state.offsetWidth!==l||t.state.offsetHeight!==c){var d={width:u,height:h,offsetWidth:l,offsetHeight:c};t.setState(d),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},d),{},{offsetWidth:l,offsetHeight:c}))}))}},t.setChildNode=function(e){t.childNode=e},t}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var t=Object(c.a)(this.childNode||this);t!==this.currentElement&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(t))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,e=Object(u.a)(t);if(e.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===e.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=e[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;e[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===e.length?e[0]:e.map((function(t,e){return!l.isValidElement(t)||"key"in t&&null!==t.key?t:l.cloneElement(t,{key:"".concat("rc-observer-key","-").concat(e)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",e.a=p},uGsb:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha384.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o,a,s,l,c,u;t.exports=(u=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),n(/*! ./sha512 */"1uat"),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=l._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},uGxW:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/pad-nopadding.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},uQRt:
/*!*********************************************!*\
!*** ./node_modules/store/plugins/json2.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports=function(){return n(/*! ./lib/json2 */"gaXo"),{}}},ulZh:
/*!*****************************************!*\
!*** ./node_modules/hls.js/dist/hls.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;"undefined"!=typeof window&&(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||t,o),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],s]:t._events[l].push(s):(t._events[l]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},c.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var l,c,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,r),!0;case 5:return u.fn.call(u.context,e,n,r,o),!0;case 6:return u.fn.call(u.context,e,n,r,o,a),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,r);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},c.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return l(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||l(this,o);else{for(var s=0,c=[],u=a.length;s<u;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:l(this,o)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&l(this,e)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},"./node_modules/url-toolkit/src/url-toolkit.js":
/*!*****************************************************!*\
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
\*****************************************************/
/*! no static exports found */function(t,e,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var r=s.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):e;var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=i.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var u=a.path,h=u.substring(0,u.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(h)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(o,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
!*** ./node_modules/webworkify-webpack/index.js ***!
\**************************************************/
/*! no static exports found */function(t,e,n){function r(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n.oe=function(t){throw console.error(t),t};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(t,e,r){var o={};o[r]=[];var a=e.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var l,c=s[1],u=new RegExp("(\\\\n|\\W)"+i(c)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=u.exec(a);)"dll-reference"!==l[3]&&o[r].push(l[3]);for(u=new RegExp("\\("+i(c)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=u.exec(a);)t[l[2]]||(o[r].push(l[1]),t[l[2]]=n(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var h,d=Object.keys(o),f=0;f<d.length;f++)for(var p=0;p<o[d[f]].length;p++)h=o[d[f]][p],isNaN(1*h)||(o[d[f]][p]=1*o[d[f]][p]);return o}function a(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}t.exports=function(t,e){e=e||{};var i={main:n.m},s=e.all?{main:Object.keys(i.main)}:function(t,e){for(var n={main:[e]},r={main:[]},i={main:{}};a(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l],u=n[c].pop();if(i[c]=i[c]||{},!i[c][u]&&t[c][u]){i[c][u]=!0,r[c]=r[c]||[],r[c].push(u);for(var h=o(t,t[c][u],c),d=Object.keys(h),f=0;f<d.length;f++)n[d[f]]=n[d[f]]||[],n[d[f]]=n[d[f]].concat(h[d[f]])}}return r}(i,t),l="";Object.keys(s).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;s[t][e];)e++;s[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+t+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s[t].map((function(e){return JSON.stringify(e)+": "+i[t][e].toString()})).join(",")+"});\n"})),l=l+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s.main.map((function(t){return JSON.stringify(t)+": "+i.main[t].toString()})).join(",")+"}))(self);";var c=new window.Blob([l],{type:"text/javascript"});if(e.bare)return c;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),h=new window.Worker(u);return h.objectURL=u,h}},"./src/config.ts":
/*!***********************!*\
!*** ./src/config.ts ***!
\***********************/
/*! exports provided: hlsDefaultConfig, mergeConfig, enableStreamingMode */function(t,e,n){"use strict";n.r(e),n.d(e,"hlsDefaultConfig",(function(){return E})),n.d(e,"mergeConfig",(function(){return C})),n.d(e,"enableStreamingMode",(function(){return k}));var r=n(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),i=n(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),o=n(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),a=n(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),s=n(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=n(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),c=n(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),u=n(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),h=n(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),d=n(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),f=n(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),p=n(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),m=n(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),g=n(/*! ./utils/cues */"./src/utils/cues.ts"),v=n(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),y=n(/*! ./utils/logger */"./src/utils/logger.ts");function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E=x(x({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:p.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:r.default,bufferController:l.default,capLevelController:u.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:v.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},{cueHandler:g.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:a.SubtitleStreamController,subtitleTrackController:s.default,timelineController:c.TimelineController,audioStreamController:i.default,audioTrackController:o.default,emeController:d.default,cmcdController:f.default});function C(t,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return b({},t,e)}function k(t){var e=t.loader;e!==m.default&&e!==p.default?(y.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):Object(m.fetchSupported)()&&(t.loader=m.default,t.progressive=!0,t.enableSoftwareAES=!0,y.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
/*!******************************************!*\
!*** ./src/controller/abr-controller.ts ***!
\******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../types/loader */"./src/types/loader.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var h=function(){function t(t){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=t;var e=t.config;this.bwEstimator=new i.default(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}var e,n,h,d=t.prototype;return d.registerListeners=function(){var t=this.hls;t.on(o.Events.FRAG_LOADING,this.onFragLoading,this),t.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(o.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var t=this.hls;t.off(o.Events.FRAG_LOADING,this.onFragLoading,this),t.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(o.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},d.onFragLoading=function(t,e){var n,r=e.frag;r.type===l.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=e.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},d.onLevelLoaded=function(t,e){var n=this.hls.config;e.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},d._abandonRulesCheck=function(){var t=this.fragCurrent,e=this.partCurrent,n=this.hls,i=n.autoLevelEnabled,s=n.config,l=n.media;if(t&&l){var u=e?e.stats:t.stats,h=e?e.duration:t.duration;if(u.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var d=performance.now()-u.loading.start,f=Math.abs(l.playbackRate);if(!(d<=500*h/f)){var p=n.levels,m=n.minAutoLevel,g=p[t.level],v=u.total||Math.max(u.loaded,Math.round(h*g.maxBitrate/8)),y=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/d),b=(v-u.loaded)/y,w=l.currentTime,x=(a.BufferHelper.bufferInfo(l,w,s.maxBufferHole).end-w)/f;if(!(x>=2*h/f||b<=x)){var S,E=Number.POSITIVE_INFINITY;for(S=t.level-1;S>m&&!((E=h*p[S].maxBitrate/(6.4*y))<x);S--);if(!(E>=b)){var C=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+S+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(C)?(C/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+E.toFixed(3)+" s\n Time to underbuffer: "+x.toFixed(3)+" s"),n.nextLoadLevel=S,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),n.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var n=e.frag,i=e.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var a=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+a.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:a,frag:n,part:i,id:n.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var n=e.frag,r=e.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var o=i.parsing.end-i.loading.start;this.bwEstimator.sample(o,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,o=n.minAutoLevel,s=n.media,l=e?e.duration:t?t.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(a.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,o,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(d,o,r,f+m,g,v),Math.max(p,0)},d.findBestLevel=function(t,e,n,r,i,o){for(var a,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(a=d.details)||void 0===a||!a.live),p=null==d?void 0:d.codecSet,m=l?l.duration:s?s.duration:0,g=n;g>=e;g--){var v=h[g];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,w=void 0;w=g<=u?i*t:o*t;var x=h[g].maxBitrate,S=x*b/w;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(w)+"/"+x+"/"+b+"/"+r+"/"+S),w>x&&(!S||f&&!this.bitrateTestDelay||S<r))return g}}return-1},e=t,(n=[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var n=this.getNextABRAutoLevel();return-1!==t&&(n=Math.min(t,n)),n},set:function(t){this._nextAutoLevel=t}}])&&u(e.prototype,n),h&&u(e,h),t}();e.default=h},"./src/controller/audio-stream-controller.ts":
/*!***************************************************!*\
!*** ./src/controller/audio-stream-controller.ts ***!
\***************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=n(/*! ../types/level */"./src/types/level.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),d=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),m=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),g=n(/*! ../errors */"./src/errors.ts"),v=n(/*! ../utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var w=function(t){var e,n;function w(e,n){var r;return(r=t.call(this,e,n,"[audio-stream-controller]")||this).videoBuffer=null,r.videoTrackCC=-1,r.waitingVideoCC=-1,r.audioSwitch=!1,r.trackId=-1,r.waitingData=null,r.mainDetails=null,r.bufferFlushed=!1,r._registerListeners(),r}n=t,(e=w).prototype=Object.create(n.prototype),e.prototype.constructor=e,b(e,n);var x=w.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var t=this.hls;t.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(o.Events.ERROR,this.onError,this),t.on(o.Events.BUFFER_RESET,this.onBufferReset,this),t.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),t.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var t=this.hls;t.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(o.Events.ERROR,this.onError,this),t.off(o.Events.BUFFER_RESET,this.onBufferReset,this),t.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),t.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(t,e){var n=e.frag,r=e.id,o=e.initPTS;if("main"===r){var a=n.cc;this.initPTS[n.cc]=o,this.log("InitPTS for cc: "+a+" found from main: "+o),this.videoTrackCC=a,this.state===i.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(t){if(!this.levels)return this.startPosition=t,void(this.state=i.State.STOPPED);var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},x.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var e,n=this.levels,r=this.trackId,o=null==n||null===(e=n[r])||void 0===e?void 0:e.details;if(o){if(this.waitForCdnTuneIn(o))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&t.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=a.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},x.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},x.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},x.doTickIdle=function(){var t,e,n=this.hls,r=this.levels,a=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(a||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(d,h))return n.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=h.fragments[0].start,v=d.end;if(m){var y=this.getLoadPosition();v=y,h.PTSKnown&&y<g&&(d.end>g||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),a.currentTime=g+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},x.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?e:Math.max(e,n.len)},x.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(t,e){var n=e.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(t){return new l.Level(t)}))},x.onAudioTrackSwitching=function(t,e){var n=!!e.url;this.trackId=e.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(t,e){this.mainDetails=e.details},x.onAudioTrackLoaded=function(t,e){var n,r=this.levels,o=e.details,a=e.id;if(r){this.log("Track "+a+" loaded ["+o.startSN+","+o.endSN+"],duration:"+o.totalduration);var s=r[a],l=0;if(o.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed||!c)return;!s.details&&o.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(o,c),l=o.fragments[0].start):l=this.alignPlaylists(o,s.details)}s.details=o,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&o.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(o)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)},x._handleFragmentLoadProgress=function(t){var e,n=t.frag,r=t.part,o=t.payload,a=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var m=a.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(e=n.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var w=r?r.index:-1,x=-1!==w,S=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,o.byteLength,w,x);g.push(o,b,m,"",n,r,p.totalduration,!1,S,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(o)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},x._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(t,e){var n=e.tracks.audio;n&&(this.mediaBuffer=n.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},x.onFragBuffered=function(t,e){var n=e.frag,r=e.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},x.onError=function(e,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,o=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);o&&o.len>.5&&(r=!this.reduceMaxBufferLength(o.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},x.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(t){var e,n="audio",r=this.hls,a=t.remuxResult,s=t.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=a.audio,f=a.text,p=a.id3,m=a.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),d){var g=d.startPTS,v=d.endPTS,b=d.startDTS,w=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:b,endDTS:w}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,b,w),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var x=y({frag:c,id:n},p);r.trigger(o.Events.FRAG_PARSING_METADATA,x)}if(f){var S=y({frag:c,id:n},f);r.trigger(o.Events.FRAG_PARSING_USERDATA,S)}}},x._bufferInitSegment=function(t,e,n){if(this.state===i.State.PARSING){t.video&&delete t.video;var r=t.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t);var a=r.initSegment;if(null!=a&&a.byteLength){var s={type:"audio",frag:e,part:null,chunkMeta:n,parent:e.type,data:a};this.hls.trigger(o.Events.BUFFER_APPENDING,s)}this.tick()}}},x.loadFragment=function(e,n,o){var a=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||a===s.FragmentState.NOT_LOADED||a===s.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):n.live&&!Object(r.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,n,o)))},x.completeAudioSwitch=function(){var e=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:r})},w}(i.default);e.default=w},"./src/controller/audio-track-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/audio-track-controller.ts ***!
\**************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=function(t){var e,n;function o(e){var n;return(n=t.call(this,e,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,l(e,n);var c,u,h,d=o.prototype;return d.registerListeners=function(){var t=this.hls;t.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(r.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var t=this.hls;t.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(r.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,t.prototype.destroy.call(this)},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},d.onManifestParsed=function(t,e){this.tracks=e.audioTracks||[]},d.onAudioTrackLoaded=function(t,e){var n=e.id,r=e.details,i=this.tracksInGroup[n];if(i){var o=i.details;i.details=e.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,e,o))}else this.warn("Invalid audio track id "+n)},d.onLevelLoading=function(t,e){this.switchLevel(e.level)},d.onLevelSwitching=function(t,e){this.switchLevel(e.level)},d.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.audioGroupIds){var n=e.audioGroupIds[e.urlId];if(this.groupId!==n){this.groupId=n;var i=this.tracks.filter((function(t){return!n||t.groupId===n}));this.selectDefaultTrack&&!i.some((function(t){return t.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var o={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.AUDIO_TRACKS_UPDATED,o),this.selectInitialTrack()}}},d.onError=function(e,n){t.prototype.onError.call(this,e,n),!n.fatal&&n.context&&n.context.type===a.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},d.setAudioTrack=function(t){var e=this.tracksInGroup;if(t<0||t>=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=e[this.trackId];this.log("Now switching to audio-track index "+t);var i=e[t],o=i.id,a=i.groupId,s=void 0===a?"":a,l=i.name,c=i.type,u=i.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:o,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,n=this.findTrackId(e)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,n=0;n<e.length;n++){var r=e[n];if((!this.selectDefaultTrack||r.default)&&(!t||t===r.name))return r.id}return-1},d.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var n=e.id,i=e.groupId,o=e.url;if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(r.Events.AUDIO_TRACK_LOADING,{url:o,id:n,groupId:i,deliveryDirectives:t||null})}},c=o,(u=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}}])&&s(c.prototype,u),h&&s(c,h),o}(o.default);e.default=c},"./src/controller/base-playlist-controller.ts":
/*!****************************************************!*\
!*** ./src/controller/base-playlist-controller.ts ***!
\****************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return l}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../types/level */"./src/types/level.ts"),o=n(/*! ./level-helper */"./src/controller/level-helper.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=a.logger.log.bind(a.logger,e+":"),this.warn=a.logger.warn.bind(a.logger,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var n=null==e?void 0:e.renditionReports;if(n)for(var o=0;o<n.length;o++){var a=n[o],s=""+a.URI;if(s===t.substr(-s.length)){var l=parseInt(a["LAST-MSN"]),c=parseInt(a["LAST-PART"]);if(e&&this.hls.config.lowLatencyMode){var u=Math.min(e.age-e.partTarget,e.targetduration);void 0!==c&&u>e.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,n){var r=this,i=e.details,a=e.stats,s=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+t+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(o.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=d===f;-1!==p?(c=m?f+1:d,u=m?h?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,e.deliveryDirectives,c,u),h||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,e.deliveryDirectives,c,u);var w=Object(o.computeReloadInterval)(i,a);void 0!==c&&i.canBlockReload&&(w-=i.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(w)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),w)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,n,r){var o=Object(i.getSkipValue)(t,n);return null!=e&&e.skip&&t.deltaUpdateFailed&&(n=e.msn,r=e.part,o=i.HlsSkip.No),new i.HlsUrlParameters(n,r,o)},e.retryLoadingOrFail=function(t){var e,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.retryCount++,t.details.indexOf("LoadTimeOut")>-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return i},t}()},"./src/controller/base-stream-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/base-stream-controller.ts ***!
\**************************************************/
/*! exports provided: State, default */function(t,e,n){"use strict";n.r(e),n.d(e,"State",(function(){return x})),n.d(e,"default",(function(){return S}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),o=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var x={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},S=function(t){var e,n;function i(e,n,r){var i;return(i=t.call(this)||this).hls=void 0,i.fragPrevious=null,i.fragCurrent=null,i.fragmentTracker=void 0,i.transmuxer=null,i._state=x.STOPPED,i.media=void 0,i.mediaBuffer=void 0,i.config=void 0,i.bitrateTest=!1,i.lastCurrentTime=0,i.nextLoadPosition=0,i.startPosition=0,i.loadedmetadata=!1,i.fragLoadError=0,i.retryDate=0,i.levels=null,i.fragmentLoader=void 0,i.levelLastLoaded=null,i.startFragRequested=!1,i.decrypter=void 0,i.initPTS=[],i.onvseeking=null,i.onvended=null,i.logPrefix="",i.log=void 0,i.warn=void 0,i.logPrefix=r,i.log=s.logger.log.bind(s.logger,r+":"),i.warn=s.logger.warn.bind(s.logger,r+":"),i.hls=e,i.fragmentLoader=new m.default(e.config),i.fragmentTracker=n,i.config=e.config,i.decrypter=new g.default(e,e.config),e.on(l.Events.KEY_LOADED,i.onKeyLoaded,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i)),i}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,w(e,n);var S,E,C,k=i.prototype;return k.doTick=function(){this.onTickEnd()},k.onTickEnd=function(){},k.startLoad=function(t){},k.stopLoad=function(){this.fragmentLoader.abort();var t=this.fragCurrent;t&&this.fragmentTracker.removeFragment(t),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=x.STOPPED},k._streamEnded=function(t,e){var n=this.fragCurrent,r=this.fragmentTracker;if(!e.live&&n&&n.sn===e.endSN&&!t.nextStart){var i=r.getState(n);return i===o.FragmentState.PARTIAL||i===o.FragmentState.OK}return!1},k.onMediaAttached=function(t,e){var n=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===x.STOPPED&&this.startLoad(r.startPosition)},k.onMediaDetaching=function(){var t=this.media;null!=t&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},k.onMediaSeeking=function(){var t=this.config,e=this.fragCurrent,n=this.media,i=this.mediaBuffer,o=this.state,s=n?n.currentTime:0,l=a.BufferHelper.bufferInfo(i||n,s,t.maxBufferHole);if(this.log("media seeking to "+(Object(r.isFiniteNumber)(s)?s.toFixed(3):s)+", state: "+o),o===x.ENDED)this.resetLoadingState();else if(e&&!l.len){var c=t.maxFragLookUpTolerance,u=e.start-c,h=s>e.start+e.duration+c;(s<u||h)&&(h&&e.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),e.loader.abort()),this.resetLoadingState())}n&&(this.lastCurrentTime=s),this.loadedmetadata||l.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},k.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},k.onKeyLoaded=function(t,e){if(this.state===x.KEY_LOADING&&e.frag===this.fragCurrent&&this.levels){this.state=x.IDLE;var n=this.levels[e.frag.level].details;n&&this.loadFragment(e.frag,n,e.frag.start)}},k.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},k.onHandlerDestroyed=function(){this.state=x.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},k.loadKey=function(t,e){this.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level),this.state=x.KEY_LOADING,this.fragCurrent=t,this.hls.trigger(l.Events.KEY_LOADING,{frag:t})},k.loadFragment=function(t,e,n){this._loadFragForPlayback(t,e,n)},k._loadFragForPlayback=function(t,e,n){var r=this;this._doFragLoad(t,e,n,(function(e){if(r.fragContextChanged(t))return r.warn("Fragment "+t.sn+(e.part?" p: "+e.part.index:"")+" of level "+t.level+" was dropped during download."),void r.fragmentTracker.removeFragment(t);t.stats.chunkCount++,r._handleFragmentLoadProgress(e)})).then((function(e){if(e){r.fragLoadError=0;var n=r.state;if(!r.fragContextChanged(t))return"payload"in e&&(r.log("Loaded fragment "+t.sn+" of level "+t.level),r.hls.trigger(l.Events.FRAG_LOADED,e),r.state===x.BACKTRACKING)?(r.fragmentTracker.backtrack(t,e),void r.resetFragmentLoading(t)):void r._handleFragmentLoadComplete(e);(n===x.FRAG_LOADING||n===x.BACKTRACKING||!r.fragCurrent&&n===x.PARSING)&&(r.fragmentTracker.removeFragment(t),r.state=x.IDLE)}})).catch((function(e){r.warn(e),r.resetFragmentLoading(t)}))},k.flushMainBuffer=function(t,e,n){if(void 0===n&&(n=null),t-e){var r={startOffset:t,endOffset:e,type:n};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,r)}},k._loadInitSegment=function(t){var e=this;this._doFragLoad(t).then((function(n){if(!n||e.fragContextChanged(t)||!e.levels)throw new Error("init load aborted");return n})).then((function(n){var r=e.hls,i=n.payload,o=t.decryptdata;if(i&&i.byteLength>0&&o&&o.key&&o.iv&&"AES-128"===o.method){var a=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(i),o.key.buffer,o.iv.buffer).then((function(e){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:a,tdecrypt:i}}),n.payload=e,n}))}return n})).then((function(n){var r=e.fragCurrent,i=e.hls,o=e.levels;if(!o)throw new Error("init load aborted, missing levels");var a=o[t.level].details;console.assert(a,"Level details are defined when init segment is loaded");var s=t.stats;e.state=x.IDLE,e.fragLoadError=0,t.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:t.type}),e.tick()})).catch((function(n){e.warn(n),e.resetFragmentLoading(t)}))},k.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},k.fragBufferedComplete=function(t,e){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(a.BufferHelper.getBuffered(n))),this.state=x.IDLE,this.tick()},k._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var n=t.frag,r=t.part,i=t.partsLoaded,o=!i||0===i.length||i.some((function(t){return!t})),a=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!o);e.flush(a)}},k._handleFragmentLoadProgress=function(t){},k._doFragLoad=function(t,e,n,i){var o=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(t.start,n||0),this.config.lowLatencyMode&&e){var a=e.partList;if(a&&i){n>t.end&&e.fragmentHint&&(t=e.fragmentHint);var s=this.getNextPart(a,t,n);if(s>-1){var c=a[s];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+s+"-"+(a.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=x.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:a[s],targetBufferTime:n}),this.doFragPartsLoad(t,a,s,i).catch((function(t){return o.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(a,n))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=x.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:n}),this.fragmentLoader.load(t,i).catch((function(t){return o.handleFragLoadError(t)}))},k.doFragPartsLoad=function(t,e,n,r){var i=this;return new Promise((function(o,a){var s=[];!function n(c){var u=e[c];i.fragmentLoader.loadPart(t,u,r).then((function(r){s[u.index]=r;var a=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=e[c+1];if(!h||h.fragment!==t)return o({frag:t,part:a,partsLoaded:s});n(c+1)})).catch(a)}(n)}))},k.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},k._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===x.PARSING){var n=e.frag,r=e.part,i=e.level,o=self.performance.now();n.stats.parsing.end=o,r&&(r.stats.parsing.end=o),this.updateLevelTiming(n,r,i,t.partial)}else this.fragCurrent||(this.state=x.IDLE)},k.getCurrentContext=function(t){var e=this.levels,n=t.level,r=t.sn,i=t.part;if(!e||!e[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var o=e[n],a=i>-1?Object(p.getPartWith)(o,r,i):null,s=a?a.fragment:Object(p.getFragmentWithSN)(o,r,this.fragCurrent);return s?{frag:s,part:a,level:o}:null},k.bufferFragmentData=function(t,e,n,r){if(t&&this.state===x.PARSING){var i=t.data1,o=t.data2,a=i;if(i&&o&&(a=Object(h.appendUint8Array)(i,o)),a&&a.length){var s={type:t.type,frag:e,part:n,chunkMeta:r,parent:e.type,data:a};this.hls.trigger(l.Events.BUFFER_APPENDING,s),t.dropped&&t.independent&&!n&&this.flushBufferGap(e)}}},k.flushBufferGap=function(t){var e=this.media;if(e)if(a.BufferHelper.isBuffered(e,e.currentTime)){var n=e.currentTime,r=a.BufferHelper.bufferInfo(e,n,0),i=t.duration,o=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(t.start-o,r.end-o),n+o);t.start-s>o&&this.flushMainBuffer(s,t.start)}else this.flushMainBuffer(0,t.start)},k.getFwdBufferInfo=function(t,e){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var o=a.BufferHelper.bufferInfo(t,i,n.maxBufferHole);if(0===o.len&&void 0!==o.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,e);if(s&&o.nextStart<s.end)return a.BufferHelper.bufferInfo(t,i,Math.max(o.nextStart,n.maxBufferHole))}return o},k.getMaxBufferLength=function(t){var e,n=this.config;return e=t?Math.max(8*n.maxBufferSize/t,n.maxBufferLength):n.maxBufferLength,Math.min(e,n.maxMaxBufferLength)},k.reduceMaxBufferLength=function(t){var e=this.config,n=t||e.maxBufferLength;return e.maxMaxBufferLength>=n&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},k.getNextFragment=function(t,e){var n,r,i=e.fragments,o=i.length;if(!o)return null;var a,s=this.config,l=i[0].start;if(e.live){var c=s.initialLiveManifestSize;if(o<c)return this.warn("Not enough fragments to start playback (have: "+o+", need: "+c+")"),null;e.PTSKnown||this.startFragRequested||-1!==this.startPosition||(a=this.getInitialLiveFragment(e,i),this.startPosition=a?this.hls.liveSyncPosition||a.start:t)}else t<=l&&(a=i[0]);if(!a){var u=s.lowLatencyMode?e.partEnd:e.fragmentEnd;a=this.getFragmentAtPosition(t,u,e)}return null===(n=a)||void 0===n||!n.initSegment||null!==(r=a)&&void 0!==r&&r.initSegment.data||this.bitrateTest||(a=a.initSegment),a},k.getNextPart=function(t,e,n){for(var r=-1,i=!1,o=!0,a=0,s=t.length;a<s;a++){var l=t[a];if(o=o&&!l.independent,r>-1&&n<l.start)break;var c=l.loaded;!c&&(i||l.independent||o)&&l.fragment===e&&(r=a),i=c}return r},k.loadedEndOfParts=function(t,e){var n=t[t.length-1];return n&&e>n.start&&n.loaded},k.getInitialLiveFragment=function(t,e){var n=this.fragPrevious,r=null;if(n){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(e,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=t.startSN&&i<=t.endSN){var o=e[i-t.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(e,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var a=this.hls.liveSyncPosition;null!==a&&(r=this.getFragmentAtPosition(a,this.bitrateTest?t.fragmentEnd:t.edge,t))}return r},k.getFragmentAtPosition=function(t,e,n){var r,i=this.config,a=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),t<e){var d=t>e-u?0:u;r=Object(f.findFragmentByPTS)(a,s,t,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=a&&r.level===a.level,g=s[p+1];if(this.fragmentTracker.getState(r)===o.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===o.FragmentState.BACKTRACKED;)r=a?s[v--]:s[--v];r||(r=g)}else a&&r.sn===a.sn&&!h&&m&&(r.sn<l&&this.fragmentTracker.getState(g)!==o.FragmentState.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+g.sn),r=g):r=null)}return r},k.synchronizeToLiveEdge=function(t){var e=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,o=t.fragments[0].start,a=t.edge,s=i>=o-e.maxFragLookUpTolerance&&i<=a;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:e.liveMaxLatencyDurationCount*t.targetduration;(!s&&n.readyState<4||i<a-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+a+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},k.alignPlaylists=function(t,e){var n=this.levels,i=this.levelLastLoaded,o=this.fragPrevious,a=null!==i?n[i]:null,s=t.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var l=t.fragments[0].start,c=!e,u=t.alignedSliding&&Object(r.isFiniteNumber)(l);if(c||!u&&!l){Object(d.alignStream)(o,a,t);var h=t.fragments[0].start;return this.log("Live playlist sliding: "+h.toFixed(2)+" start-sn: "+(e?e.startSN:"na")+"->"+t.startSN+" prev-sn: "+(o?o.sn:"na")+" fragments: "+s),h}return l},k.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},k.setStartPosition=function(t,e){var n=this.startPosition;if(n<e&&(n=-1),-1===n||-1===this.lastCurrentTime){var i=t.startTimeOffset;Object(r.isFiniteNumber)(i)?(n=e+i,i<0&&(n+=t.totalduration),n=Math.min(Math.max(e,n),e+t.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+n),this.startPosition=n):t.live?n=this.hls.liveSyncPosition||e:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},k.getLoadPosition=function(){var t=this.media,e=0;return this.loadedmetadata&&t?e=t.currentTime:this.nextLoadPosition&&(e=this.nextLoadPosition),e},k.handleFragLoadAborted=function(t,e){this.transmuxer&&"initSegment"!==t.sn&&t.stats.aborted&&(this.warn("Fragment "+t.sn+(e?" part"+e.index:"")+" of level "+t.level+" was aborted"),this.resetFragmentLoading(t))},k.resetFragmentLoading=function(t){this.fragCurrent&&this.fragContextChanged(t)||(this.state=x.IDLE)},k.onFragmentOrKeyLoadError=function(t,e){if(!e.fatal){var n=e.frag;if(n&&n.type===t){var r=this.fragCurrent;console.assert(r&&n.sn===r.sn&&n.level===r.level&&n.urlId===r.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(n.level))return;var o=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+n.sn+" of "+t+" "+n.level+" failed to load, retrying in "+o+"ms"),this.retryDate=self.performance.now()+o,this.fragLoadError++,this.state=x.FRAG_LOADING_WAITING_RETRY}else e.levelRetry?(t===y.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=x.IDLE):(s.logger.error(e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.stopLoad(),this.state=x.ERROR)}}},k.afterBufferFlushed=function(t,e,n){if(t){var r=a.BufferHelper.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,r,n),this.state===x.ENDED&&this.resetLoadingState()}},k.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=x.IDLE},k.resetLiveStartWhenNotLoaded=function(t){if(!this.loadedmetadata){this.startFragRequested=!1;var e=this.levels?this.levels[t].details:null;if(null!=e&&e.live)return this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},k.updateLevelTiming=function(t,e,n,r){var i=this,o=n.details;console.assert(!!o,"level.details must be defined"),Object.keys(t.elementaryStreams).reduce((function(e,a){var s=t.elementaryStreams[a];if(s){var c=s.endPTS-s.startPTS;if(c<=0)return i.warn("Could not parse fragment "+t.sn+" "+a+" duration reliably ("+c+") resetting transmuxer to fallback to playlist timing"),i.resetTransmuxer(),e||!1;var u=r?0:Object(p.updateFragPTSDTS)(o,t,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return i.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:o,level:n,drift:u,type:a,frag:t,start:s.startPTS,end:s.endPTS}),!0}return e}),!1)?(this.state=x.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:t,part:e})):this.resetLoadingState()},k.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S=i,(E=[{key:"state",get:function(){return this._state},set:function(t){var e=this._state;e!==t&&(this._state=t,this.log(e+"->"+t))}}])&&b(S.prototype,E),C&&b(S,C),i}(i.default)},"./src/controller/buffer-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/buffer-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,n=e.media,r=e.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),n&&(e.updateMediaElementDuration(),t.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){o.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(i.Events.BUFFER_RESET,this.onBufferReset,this),t.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(i.Events.BUFFER_EOS,this.onBufferEos,this),t.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(i.Events.FRAG_PARSED,this.onFragParsed,this),t.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(i.Events.BUFFER_RESET,this.onBufferReset,this),t.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(i.Events.BUFFER_EOS,this.onBufferEos,this),t.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(i.Events.FRAG_PARSED,this.onFragParsed,this),t.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var n=2;(e.audio&&!e.video||!e.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var n=this.media=e.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,n=this._objectUrl;if(e){if(o.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){o.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(n&&self.URL.revokeObjectURL(n),t.src===n?(t.removeAttribute("src"),t.load()):o.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(i.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var n=t.sourceBuffer[e];try{n&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(n),t.sourceBuffer[e]=void 0)}catch(t){o.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var n=this,r=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(r){var i=n.tracks[t];if(i&&"function"==typeof i.buffer.changeType){var o=e[t],a=o.codec,s=o.levelCodec,l=o.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||a).replace(d,"$1")){var c=l+";codecs="+(s||a);n.appendChangeType(t,c)}}}else n.pendingTracks[t]=e[t]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[t];i&&(o.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),i.changeType(e)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){o.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};r.append(i,t)},e.onBufferAppending=function(t,e){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,m=p.buffering[h],g=self.performance.now();m.start=g;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,w="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),x={execute:function(){if(m.executeStart=self.performance.now(),w){var t=n.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();m.executeEnd=m.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=n.sourceBuffer,r={};for(var o in e)r[o]=s.BufferHelper.getBuffered(e[o]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(t){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:a.ErrorTypes.MEDIA_ERROR,parent:d.type,details:a.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=a.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,e.details=a.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),r.trigger(i.Events.ERROR,e)}};l.append(x,h)},e.onBufferFlushing=function(t,e){var n=this,r=this.operationQueue,a=function(t){return{execute:n.removeExecutor.bind(n,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){o.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?r.append(a(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){r.append(a(t),t)}))},e.onFragParsed=function(t,e){var n=this,r=e.frag,a=e.part,s=[],l=a?a.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&o.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var t=self.performance.now();r.stats.buffering.end=t,a&&(a.stats.buffering.end=t);var e=a?a.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:a,stats:e,id:r.type})}),s)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var n=this;this.getSourceBufferTypes().reduce((function(t,r){var i=n.sourceBuffer[r];return e.type&&e.type!==r||i&&!i.ended&&(i.ended=!0,o.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),t&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var t=n.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var n=e.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,n=this.media,o=this.sourceBuffer;if(n&&null!==e){var a=this.getSourceBufferTypes();if(a.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;a.forEach((function(n){var r=o[n];if(r){var a=s.BufferHelper.getBuffered(r);a.length>0&&d>a.start(0)&&(t.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,n=this.media,i=this.mediaSource,a=t.fragments[0].start+t.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(o.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(t)):(a>l&&a>s||!Object(r.isFiniteNumber)(s))&&(o.logger.log("[buffer-controller]: Updating Media Source duration to "+a.toFixed(3)),i.duration=a)}},e.updateSeekableRange=function(t){var e=this.mediaSource,n=t.fragments;if(n.length&&t.live&&null!=e&&e.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+t.totalduration);e.setLiveSeekableRange(r,i)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!t||2===r){this.createSourceBuffers(n),this.pendingTracks={};var o=this.getSourceBufferTypes();if(0===o.length)return void this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});o.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in t)if(!e[s]){var l=t[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;o.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(t){o.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){o.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(t);n&&n.onError(e)},e.removeExecutor=function(t,e,n){var i=this.media,a=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[t];if(!i||!a||!l)return o.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(t);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(a.duration)?a.duration:1/0,h=Math.max(0,e),d=Math.min(n,c,u);d>h?(o.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var n=this.operationQueue,r=this.sourceBuffer[e];if(!r)return o.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(e);r.ended=!1,console.assert(!r.updating,e+" sourceBuffer must not be updating"),r.appendBuffer(t)},e.blockBuffers=function(t,e){var n=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return o.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var r=this.operationQueue,i=e.map((function(t){return r.appendBlocker(t)}));Promise.all(i).then((function(){t(),e.forEach((function(t){var e=n.sourceBuffer[t];e&&e.updating||r.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,n){var r=this.sourceBuffer[t];if(r){var i=n.bind(this,t);this.listeners[t].push({event:e,listener:i}),r.addEventListener(e,i)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts":
/*!**************************************************!*\
!*** ./src/controller/buffer-operation-queue.ts ***!
\**************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var n=this.queues[e];n.push(t),1===n.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,n=new Promise((function(t){e=t})),r={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,t),n},e.executeNext=function(t){var e=this.buffers,n=this.queues,i=e[t],o=n[t];if(o.length){var a=o[0];try{a.execute()}catch(e){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(e),i&&i.updating||(o.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts":
/*!************************************************!*\
!*** ./src/controller/cap-level-controller.ts ***!
\************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts");function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(t){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e,n,o,a=t.prototype;return a.setStreamController=function(t){this.streamController=t},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var t=this.hls;t.on(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var t=this.hls;t.off(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(e,n){t.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},a.onMediaAttaching=function(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null},a.onManifestParsed=function(t,e){var n=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,n.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onBufferCodecs=function(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},a.getMaxLevel=function(e){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return t.isLevelAllowed(i,n.restrictedLevels)&&i<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var n=t.getBoundingClientRect();e.width=n.width,e.height=n.height,e.width||e.height||(e.width=n.right-n.left||t.width||0,e.height=n.bottom-n.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,n){if(!t||!t.length)return-1;for(var r,i,o=t.length-1,a=0;a<t.length;a+=1){var s=t[a];if((s.width>=e||s.height>=n)&&(r=s,!(i=t[a+1])||r.width!==i.width||r.height!==i.height)){o=a;break}}return o},e=t,o=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&i(e.prototype,n),o&&i(e,o),t}();e.default=o},"./src/controller/cmcd-controller.ts":
/*!*******************************************!*\
!*** ./src/controller/cmcd-controller.ts ***!
\*******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(){return(h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var d=function(){function t(e){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(t){try{n.apply(t,{ot:i.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(t){a.logger.warn("Could not generate manifest CMCD data.",t)}},this.applyFragmentData=function(t){try{var e=t.frag,r=n.hls.levels[e.level],o=n.getObjectType(e),s={d:1e3*e.duration,ot:o};o!==i.CMCDObjectType.VIDEO&&o!==i.CMCDObjectType.AUDIO&&o!=i.CMCDObjectType.MUXED||(s.br=r.bitrate/1e3,s.tb=n.getTopBandwidth(o),s.bl=n.getBufferLength(o)),n.apply(t,s)}catch(t){a.logger.warn("Could not generate segment CMCD data.",t)}},this.hls=e;var r=this.config=e.config,o=r.cmcd;null!=o&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=o.sessionId||t.uuid(),this.cid=o.contentId,this.useHeaders=!0===o.useHeaders,this.registerListeners())}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(r.Events.BUFFER_CREATED,this.onBufferCreated,this)},e.unregisterListeners=function(){var t=this.hls;t.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(r.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},e.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},e.onMediaAttached=function(t,e){this.media=e.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},e.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},e.onBufferCreated=function(t,e){var n,r;this.audioBuffer=null===(n=e.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=e.tracks.video)||void 0===r?void 0:r.buffer},e.createData=function(){var t;return{v:i.CMCDVersion,sf:i.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:null===(t=this.media)||void 0===t?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},e.apply=function(e,n){void 0===n&&(n={}),h(n,this.createData());var r=n.ot===i.CMCDObjectType.INIT||n.ot===i.CMCDObjectType.VIDEO||n.ot===i.CMCDObjectType.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var o=t.toHeaders(n);if(!Object.keys(o).length)return;e.headers||(e.headers={}),h(e.headers,o)}else{var a=t.toQuery(n);if(!a)return;e.url=t.appendQueryToUri(e.url,a)}},e.getObjectType=function(t){var e=t.type;return"subtitle"===e?i.CMCDObjectType.TIMED_TEXT:"initSegment"===t.sn?i.CMCDObjectType.INIT:"audio"===e?i.CMCDObjectType.AUDIO:"main"===e?this.hls.audioTracks.length?i.CMCDObjectType.VIDEO:i.CMCDObjectType.MUXED:void 0},e.getTopBandwidth=function(t){for(var e,n=0,r=c(t===i.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels);!(e=r()).done;){var o=e.value;o.bitrate>n&&(n=o.bitrate)}return n>0?n:NaN},e.getBufferLength=function(t){var e=this.hls.media,n=t===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&e?1e3*o.BufferHelper.bufferInfo(n,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,n=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new n(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,n,r){e(t),this.loader.load(t,n,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,n=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new n(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,n,r){e(t),this.loader.load(t,n,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,n=[],r=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},i=function(t){return Math.round(t)},o=function(t){return 100*i(t/100)},a={br:i,d:i,bl:o,dl:o,mtp:o,nor:function(t){return encodeURIComponent(t)},rtp:o,tb:i},s=c(Object.keys(t||{}).sort());!(e=s()).done;){var l=e.value,u=t[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=a[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(f)}}return n.join(",")},t.toHeaders=function(e){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},a=0,s=Object.keys(e);a<s.length;a++){var l=s[a];i[null!=o[l]?o[l]:1][l]=e[l]}for(var c=0;c<i.length;c++){var u=t.serialize(i[c]);u&&(n["CMCD-"+r[c]]=u)}return n},t.toQuery=function(e){return"CMCD="+encodeURIComponent(t.serialize(e))},t.appendQueryToUri=function(t,e){if(!e)return t;var n=t.includes("?")?"&":"?";return""+t+n+e},t}()},"./src/controller/eme-controller.ts":
/*!******************************************!*\
!*** ./src/controller/eme-controller.ts ***!
\******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function t(t){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=t,this._config=t.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var e,n,l,c=t.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(t){switch(t){case a.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+t+'"')},c._attemptKeySystemAccess=function(t,e,n){var r=this,i=function(t,e,n,r){switch(t){case a.KeySystems.WIDEVINE:return function(t,e,n){var r={audioCapabilities:[],videoCapabilities:[]};return t.forEach((function(t){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:n.audioRobustness||""})})),e.forEach((function(t){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:n.videoRobustness||""})})),[r]}(e,n,r);default:throw new Error("Unknown key-system: "+t)}}(t,e,n,this._drmSystemOptions);o.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(t,i);this.mediaKeysPromise=s.then((function(e){return r._onMediaKeySystemAccessObtained(t,e)})),s.catch((function(e){o.logger.error('Failed to obtain key-system "'+t+'" access:',e)}))},c._onMediaKeySystemAccessObtained=function(t,e){var n=this;o.logger.log('Access for key-system "'+t+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(r);var i=Promise.resolve().then((function(){return e.createMediaKeys()})).then((function(e){return r.mediaKeys=e,o.logger.log('Media-keys created for key-system "'+t+'"'),n._onMediaKeysCreated(),e}));return i.catch((function(t){o.logger.error("Failed to create media-keys:",t)})),i},c._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach((function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))}))},c._onNewMediaKeySession=function(t){var e=this;o.logger.log("New key-system session "+t.sessionId),t.addEventListener("message",(function(n){e._onKeySessionMessage(t,n.message)}),!1)},c._onKeySessionMessage=function(t,e){o.logger.log("Got EME message event, creating license request"),this._requestLicense(e,(function(e){o.logger.log("Received license data (length: "+(e?e.byteLength:e)+"), updating key-session"),t.update(e)}))},c.onMediaEncrypted=function(t){var e=this;if(o.logger.log('Media is encrypted using "'+t.initDataType+'" init data type'),!this.mediaKeysPromise)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var n=function(n){e._media&&(e._attemptSetMediaKeys(n),e._generateRequestWithPreferredKeySession(t.initDataType,t.initData))};this.mediaKeysPromise.then(n).catch(n)},c._attemptSetMediaKeys=function(t){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});o.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(t,e){var n=this,a=this._mediaKeysList[0];if(!a)return o.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(a.mediaKeysSessionInitialized)o.logger.warn("Key-Session already initialized but requested again");else{var s=a.mediaKeysSession;if(!s)return o.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!e)return o.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});o.logger.log('Generating key-session request for "'+t+'" init data type'),a.mediaKeysSessionInitialized=!0,s.generateRequest(t,e).then((function(){o.logger.debug("Key-session generation succeeded")})).catch((function(t){o.logger.error("Error generating key-session request:",t),n.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},c._createLicenseXhr=function(t,e,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,t,e,n);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,r,t),i=void 0}catch(t){o.logger.error(t)}try{r.readyState||r.open("POST",t,!0),i&&i.call(this.hls,r,t)}catch(t){throw new Error("issue setting up KeySystem license XHR "+t)}return r},c._onLicenseRequestReadyStageChange=function(t,e,n,a){switch(t.readyState){case 4:if(200===t.status){this._requestLicenseFailureCount=0,o.logger.log("License request succeeded");var s=t.response,l=this._licenseResponseCallback;if(l)try{s=l.call(this.hls,t,e)}catch(t){o.logger.error(t)}a(s)}else{if(o.logger.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;o.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,a)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case a.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){o.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var a=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(a,t,e);o.logger.log("Sending license request to URL: "+a);var l=this._generateLicenseRequestChallenge(n,t);s.send(l)}catch(t){o.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var n=e.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var n=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),r=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(a.KeySystems.WIDEVINE,n,r)}},e=t,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(e.prototype,n),l&&s(e,l),t}();e.default=l},"./src/controller/fps-controller.ts":
/*!******************************************!*\
!*** ./src/controller/fps-controller.ts ***!
\******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,n){var o=performance.now();if(e){if(this.lastTime){var a=o-this.lastTime,s=n-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*s/a,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=n,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=o},"./src/controller/fragment-finders.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-finders.ts ***!
\********************************************/
/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,n){"use strict";n.r(e),n.d(e,"findFragmentByPDT",(function(){return o})),n.d(e,"findFragmentByPTS",(function(){return a})),n.d(e,"fragmentWithinToleranceTest",(function(){return s})),n.d(e,"pdtWithinToleranceTest",(function(){return l})),n.d(e,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function o(t,e,n){if(null===e||!Array.isArray(t)||!t.length||!Object(r.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<t.length;++i){var o=t[i];if(l(e,n,o))return o}return null}function a(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=null;if(t?o=e[t.sn-e[0].sn+1]||null:0===n&&0===e[0].start&&(o=e[0]),o&&0===s(n,r,o))return o;var a=i.default.search(e,s.bind(null,n,r));return a||o}function s(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0);var r=Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=t?1:n.start-r>t&&n.start?-1:0}function l(t,e,n){var r=1e3*Math.min(e,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>t}function c(t,e){return i.default.search(t,(function(t){return t.cc<e?1:t.cc>e?-1:0}))}},"./src/controller/fragment-tracker.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-tracker.ts ***!
\********************************************/
/*! exports provided: FragmentState, FragmentTracker */function(t,e,n){"use strict";n.r(e),n.d(e,"FragmentState",(function(){return r})),n.d(e,"FragmentTracker",(function(){return a}));var r,i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(r||(r={}));var a=function(){function t(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===o.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var a=r[i],s=a?a.end:n.appendedPTS;if(a.start<=t&&void 0!==s&&t<=s)return i>9&&(this.activeParts=r.slice(i-9)),a}else if(n.start<=t&&void 0!==n.appendedPTS&&t<=n.appendedPTS)return n}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var o=n[r[i]];if((null==o?void 0:o.body.type)===e&&o.buffered){var a=o.body;if(a.start<=t&&t<=a.end)return a}}return null},e.detectEvictedFragments=function(t,e,n){var r=this;Object.keys(this.fragments).forEach((function(i){var o=r.fragments[i];if(o)if(o.buffered){var a=o.range[t];a&&a.time.some((function(t){var n=!r.isTimeBuffered(t.startPTS,t.endPTS,e);return n&&r.removeFragment(o.body),n}))}else o.body.type===n&&r.removeFragment(o.body)}))},e.detectPartialFragments=function(t){var e=this,n=this.timeRanges,r=t.frag,i=t.part;if(n&&"initSegment"!==r.sn){var o=l(r),a=this.fragments[o];a&&(Object.keys(n).forEach((function(t){var o=r.elementaryStreams[t];if(o){var s=n[t],l=null!==i||!0===o.partial;a.range[t]=e.getBufferedTimes(r,i,l,s)}})),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body))}},e.fragBuffered=function(t){var e=l(t),n=this.fragments[e];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},e.getBufferedTimes=function(t,e,n,r){for(var i={time:[],partial:n},o=e?e.start:t.start,a=e?e.end:t.end,s=t.minEndPTS||a,l=t.maxStartPTS||o,c=0;c<r.length;c++){var u=r.start(c)-this.bufferPadding,h=r.end(c)+this.bufferPadding;if(l>=u&&s<=h){i.time.push({startPTS:Math.max(o,r.start(c)),endPTS:Math.min(a,r.end(c))});break}if(o<h&&a>u)i.partial=!0,i.time.push({startPTS:Math.max(o,r.start(c)),endPTS:Math.min(a,r.end(c))});else if(a<=u)break}return i},e.getPartialFragment=function(t){var e,n,r,i=null,o=0,a=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-a,r=u.body.end+a,t>=n&&t<=r&&(e=Math.min(t-n,r-t),o<=e&&(i=u.body,o=e)))})),i},e.getState=function(t){var e=l(t),n=this.fragments[e];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},e.backtrack=function(t,e){var n=l(t),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=e||r.loaded;return r.loaded=null,i},e.getBacktrackData=function(t){var e=l(t),n=this.fragments[e];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,n){for(var r,i,o=0;o<n.length;o++){if(r=n.start(o)-this.bufferPadding,i=n.end(o)+this.bufferPadding,t>=r&&e<=i)return!0;if(e<=r)return!1}return!1},e.onFragLoaded=function(t,e){var n=e.frag,r=e.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var n=this,r=e.frag,i=e.part,a=e.timeRanges;if(r.type===o.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(t){var e=a[t];if(n.detectEvictedFragments(t,e),!i)for(var o=0;o<e.length;o++)r.appendedPTS=Math.max(e.end(o),r.appendedPTS||0)}))},e.onFragBuffered=function(t,e){this.detectPartialFragments(e)},e.hasFragment=function(t){var e=l(t);return!!this.fragments[e]},e.removeFragmentsInRange=function(t,e,n){var r=this;Object.keys(this.fragments).forEach((function(i){var o=r.fragments[i];if(o&&o.buffered){var a=o.body;a.type===n&&a.start<e&&a.end>t&&r.removeFragment(a)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function s(t){var e,n;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(n=t.range.audio)||void 0===n?void 0:n.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts":
/*!******************************************!*\
!*** ./src/controller/gap-controller.ts ***!
\******************************************/
/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(t,e,n){"use strict";n.r(e),n.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(e,"MAX_START_GAP_JUMP",(function(){return l})),n.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(e,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(e,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function t(t,e,n,r){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=n,this.hls=r}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,n=this.media,i=this.stalled,o=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,o===t){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,o,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var m=d.len>l,g=!p||p-o>l&&!this.fragmentTracker.getPartialFragment(o);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-o,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,w=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=w)return void this._trySkipBufferHole(null)}var x=self.performance.now();if(null!==i){var S=x-i;!c&&S>=s&&this._reportStall(d.len);var E=r.BufferHelper.bufferInfo(n,o,e.maxBufferHole);this._tryFixBufferStall(E,S)}else this.stalled=x}}}else if(this.moved=!0,null!==i){if(this.stallReported){var C=self.performance.now()-i;a.logger.warn("playback not stuck anymore @"+o+", after "+Math.round(C)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,o=r.getPartialFragment(i);o&&this._trySkipBufferHole(o)||t.len>n.maxBufferHole&&e>1e3*n.highBufferWatchdogPeriod&&(a.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,a.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f<d.length;f++){var p=d.start(f);if(l+e.maxBufferHole>=h&&l<p){var m=Math.max(p+u,s.currentTime+c);return a.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+m),this.moved=!0,this.stalled=null,s.currentTime=m,t&&n.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+m,frag:t}),m}h=d.end(f)}return 0},e._tryNudgeBuffer=function(){var t=this.config,e=this.hls,n=this.media,r=n.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<t.nudgeMaxRetry){var l=r+s*t.nudgeOffset;a.logger.warn("Nudging 'currentTime' from "+r+" to "+l),n.currentTime=l,e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else a.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+t.nudgeMaxRetry+" nudges"),e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},t}()},"./src/controller/id3-track-controller.ts":
/*!************************************************!*\
!*** ./src/controller/id3-track-controller.ts ***!
\************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=function(){function t(t){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e.destroy=function(){this._unregisterListeners()},e._registerListeners=function(){var t=this.hls;t.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},e._unregisterListeners=function(){var t=this.hls;t.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},e.onMediaAttached=function(t,e){this.media=e.media},e.onMediaDetaching=function(){this.id3Track&&(Object(i.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null)},e.getID3Track=function(t){if(this.media){for(var e=0;e<t.length;e++){var n=t[e];if("metadata"===n.kind&&"id3"===n.label)return Object(i.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},e.onFragParsingMetadata=function(t,e){if(this.media){var n=e.frag,r=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,a=0;a<r.length;a++){var s=o.getID3Frames(r[a].data);if(s){var l=r[a].pts,c=a<r.length-1?r[a+1].pts:n.end;c-l<=0&&(c=l+.25);for(var u=0;u<s.length;u++){var h=s[u];if(!o.isTimeStampFrame(h)){var d=new i(l,c,"");d.value=h,this.id3Track.addCue(d)}}}}}},e.onBufferFlushing=function(t,e){var n=e.startOffset,r=e.endOffset,o=e.type;if(!o||"audio"===o){var a=this.id3Track;a&&Object(i.removeCuesInRange)(a,n,r)}},t}();e.default=a},"./src/controller/latency-controller.ts":
/*!**********************************************!*\
!*** ./src/controller/latency-controller.ts ***!
\**********************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return s}));var r=n(/*! ../errors */"./src/errors.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(t){var e=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return e.timeupdate()},this.hls=t,this.config=t.config,this.registerListeners()}var e,n,s,l=t.prototype;return l.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},l.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(i.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(i.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(i.Events.ERROR,this.onError)},l.onMediaAttached=function(t,e){this.media=e.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},l.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},l.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},l.onLevelUpdated=function(t,e){var n=e.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},l.onError=function(t,e){e.details===r.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,o.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},l.timeupdate=function(){var t=this.media,e=this.levelDetails;if(t&&e){this.currentTime=t.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,o=r.maxLiveSyncPlaybackRate;if(i&&1!==o){var a=this.targetLatency;if(null!==a){var s=n-a,l=s<Math.min(this.maxLatency,a+e.targetduration);if(e.live&&l&&s>.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,o)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,n=t.partHoldBack,r=t.targetduration,i=this.config,o=i.liveSyncDuration,a=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==o?o:a*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,n=this.levelDetails;if(null===t||null===e||null===n)return null;var r=n.edge,i=t-e-this.edgeStalled,o=r-n.totalduration,a=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(o,i),a)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var n=t.buffered.length;return n?t.buffered.end(n-1):e.edge-this.currentTime}}])&&a(e.prototype,n),s&&a(e,s),t}()},"./src/controller/level-controller.ts":
/*!********************************************!*\
!*** ./src/controller/level-controller.ts ***!
\********************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),p=function(t){var e,n;function l(e){var n;return(n=t.call(this,e,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=t,(e=l).prototype=Object.create(n.prototype),e.prototype.constructor=e,d(e,n);var p,m,g,v=l.prototype;return v._registerListeners=function(){var t=this.hls;t.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(i.Events.ERROR,this.onError,this)},v._unregisterListeners=function(){var t=this.hls;t.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(i.Events.ERROR,this.onError,this)},v.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},v.startLoad=function(){this._levels.forEach((function(t){t.loadError=0})),t.prototype.startLoad.call(this)},v.onManifestLoaded=function(t,e){var n,l,c=[],u=[],h=[],d={},p=!1,m=!1,g=!1;if(e.levels.forEach((function(t){var e=t.attrs;p=p||!(!t.width||!t.height),m=m||!!t.videoCodec,g=g||!!t.audioCodec,f&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0);var n=t.bitrate+"-"+t.attrs.RESOLUTION+"-"+t.attrs.CODECS;(l=d[n])?l.url.push(t.url):(l=new r.Level(t),d[n]=l,c.push(l)),e&&(e.AUDIO&&Object(s.addGroupId)(l,"audio",e.AUDIO),e.SUBTITLES&&Object(s.addGroupId)(l,"text",e.SUBTITLES))})),(p||m)&&g&&(c=c.filter((function(t){var e=t.videoCodec,n=t.width,r=t.height;return!!e||!(!n||!r)}))),c=c.filter((function(t){var e=t.audioCodec,n=t.videoCodec;return(!e||Object(a.isCodecSupportedInMp4)(e,"audio"))&&(!n||Object(a.isCodecSupportedInMp4)(n,"video"))})),e.audioTracks&&(u=e.audioTracks.filter((function(t){return!t.audioCodec||Object(a.isCodecSupportedInMp4)(t.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(u)),e.subtitles&&(h=e.subtitles,Object(s.assignTrackIdsByGroup)(h)),c.length>0){n=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;v<c.length;v++)if(c[v].bitrate===n){this._firstLevel=v,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+n);break}var y=g&&!m,b={levels:c,audioTracks:u,subtitleTracks:h,firstLevel:this._firstLevel,stats:e.stats,audio:g,video:m,altAudio:!y&&u.some((function(t){return!!t.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,b),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,reason:"no level with compatible codecs found in manifest"})},v.onError=function(e,n){if(t.prototype.onError.call(this,e,n),!n.fatal){var r=n.context,i=this._levels[this.currentLevelIndex];if(r&&(r.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&r.groupId===i.audioGroupIds[i.urlId]||r.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&r.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var a,s=!1,l=!0;switch(n.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var u=this._levels[n.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=n.frag.level)):a=n.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),a=r.level),s=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:a=n.level,s=!0}void 0!==a&&this.recoverLevel(n,a,s,l)}}},v.recoverLevel=function(t,e,n,r){var i=t.details,o=this._levels[e];if(o.loadError++,n){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(r){var a=o.url.length;if(a>1&&o.loadError<a)t.levelRetry=!0,this.redundantFailover(e);else if(-1===this.manualLevelIndex){var s=0===e?this._levels.length-1:e-1;this.currentLevelIndex!==s&&0===this._levels[s].loadError&&(this.warn(i+": switch to "+s),t.levelRetry=!0,this.hls.nextAutoLevel=s)}}},v.redundantFailover=function(t){var e=this._levels[t],n=e.url.length;if(n>1){var r=(e.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(t){t.urlId=r})),this.level=t}},v.onFragLoaded=function(t,e){var n=e.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(t,e){var n,r,i=e.level,o=e.details,a=this._levels[i];if(!a)return this.warn("Invalid level index "+i),void(null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(o.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(i,e,a.details)):null!==(n=e.deliveryDirectives)&&void 0!==n&&n.skip&&(o.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[e.id].groupId,o=0;o<n.audioGroupIds.length;o++)if(n.audioGroupIds[o]===i){r=o;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},v.loadPlaylist=function(t){var e=this.currentLevelIndex,n=this._levels[e];if(this.canLoad&&n&&n.url.length>0){var r=n.urlId,o=n.url[r];if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+r+" "+o),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:o,level:e,id:r,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var n=function(t,n){return n!==e},r=this._levels.filter((function(r,i){return i!==t||r.url.length>1&&void 0!==e&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(t,e){var n=t.details;return null!=n&&n.fragments&&n.fragments.forEach((function(t){t.level=e})),t}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==t||null===(e=n[t])||void 0===e||!e.details)){if(t<0||t>=n.length){var r=t<0;if(this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:r,reason:"invalid level idx"}),r)return;t=Math.min(t,n.length-1)}this.clearTimer();var a=this.currentLevelIndex,s=n[a],l=n[t];this.log("switching to level "+t+" from "+a),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,m),g&&h(p,g),l}(l.default)},"./src/controller/level-helper.ts":
/*!****************************************!*\
!*** ./src/controller/level-helper.ts ***!
\****************************************/
/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(t,e,n){"use strict";n.r(e),n.d(e,"addGroupId",(function(){return o})),n.d(e,"assignTrackIdsByGroup",(function(){return a})),n.d(e,"updatePTS",(function(){return s})),n.d(e,"updateFragPTSDTS",(function(){return c})),n.d(e,"mergeDetails",(function(){return u})),n.d(e,"mapPartIntersection",(function(){return h})),n.d(e,"mapFragmentIntersection",(function(){return d})),n.d(e,"adjustSliding",(function(){return f})),n.d(e,"addSliding",(function(){return p})),n.d(e,"computeReloadInterval",(function(){return m})),n.d(e,"getFragmentWithSN",(function(){return g})),n.d(e,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function o(t,e,n){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(n);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(n)}}function a(t){var e={};t.forEach((function(t){var n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++}))}function s(t,e,n){l(t[e],t[n])}function l(t,e){var n=e.startPTS;if(Object(r.isFiniteNumber)(n)){var i,o=0;e.sn>t.sn?(o=n-t.start,i=t):(o=t.start-n,i=e),i.duration!==o&&(i.duration=o)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,n,o,a,s){o-n<=0&&(i.logger.warn("Fragment should have a positive duration",e),o=n+e.duration,s=a+e.duration);var c=n,u=o,h=e.startPTS,d=e.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),a=Math.min(a,e.startDTS),u=Math.min(o,d),o=Math.max(o,d),s=Math.max(s,e.endDTS)}e.duration=o-n;var p=n-e.start;e.appendedPTS=o,e.start=e.startPTS=n,e.maxStartPTS=c,e.startDTS=a,e.endPTS=o,e.minEndPTS=u,e.endDTS=s;var m,g=e.sn;if(!t||g<t.startSN||g>t.endSN)return 0;var v=g-t.startSN,y=t.fragments;for(y[v]=e,m=v;m>0;m--)l(y[m],y[m-1]);for(m=v;m<y.length-1;m++)l(y[m],y[m+1]);return t.fragmentHint&&l(y[y.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,p}function u(t,e){for(var n=null,o=t.fragments,a=o.length-1;a>=0;a--){var s=o[a].initSegment;if(s){n=s;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,i){t.relurl&&(u=t.cc-i.cc),Object(r.isFiniteNumber)(t.startPTS)&&Object(r.isFiniteNumber)(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.appendedPTS=t.appendedPTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(l=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,i.urlId=t.urlId,t.initSegment&&(i.initSegment=t.initSegment,n=t.initSegment)})),n&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=n)||void 0===e?void 0:e.relurl)||(t.initSegment=n)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var m=e.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<m.length;g++)m[g].cc+=u}e.skippedSegments&&(e.startCC=e.fragments[0].cc),h(t.partList,e.partList,(function(t,e){e.elementaryStreams=t.elementaryStreams,e.stats=t.stats})),l?c(e,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):f(t,e),m.length&&(e.totalduration=e.edge-m[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;var v=e.advancedDateTime;if(e.advanced&&v){var y=e.edge;e.driftStart||(e.driftStartTime=v,e.driftStart=y),e.driftEndTime=v,e.driftEnd=y}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function h(t,e,n){if(t&&e)for(var r=0,i=0,o=t.length;i<=o;i++){var a=t[i],s=e[i+r];a&&s&&a.index===s.index&&a.fragment.sn===s.fragment.sn?n(a,s):r--}}function d(t,e,n){for(var r=e.skippedSegments,i=Math.max(t.startSN,e.startSN)-e.startSN,o=(t.fragmentHint?1:0)+(r?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,a=e.startSN-t.startSN,s=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,c=i;c<=o;c++){var u=l[a+c],h=s[c];r&&!h&&c<r&&(h=e.fragments[c]=u),u&&h&&n(u,h)}}function f(t,e){var n=e.startSN+e.skippedSegments-t.startSN,r=t.fragments;n<0||n>=r.length||p(e,r[n].start)}function p(t,e){if(e){for(var n=t.fragments,r=t.skippedSegments;r<n.length;r++)n[r].start+=e;t.fragmentHint&&(t.fragmentHint.start+=e)}}function m(t,e){var n,r=1e3*t.levelTargetDuration,i=r/2,o=t.age,a=o>0&&o<3*r,s=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(a){var c=333*t.misses;n=Math.max(Math.min(i,2*s),c),t.availabilityDelay=(t.availabilityDelay||0)+n}else n=i;else a?(l=Math.min(l||r/2,o),t.availabilityDelay=l,n=l+r-o):n=r-s;return Math.round(n)}function g(t,e,n){if(!t||!t.details)return null;var r=t.details,i=r.fragments[e-r.startSN];return i||((i=r.fragmentHint)&&i.sn===e?i:e<r.startSN&&n&&n.sn===e?n:null)}function v(t,e,n){if(!t||!t.details)return null;var r=t.details.partList;if(r)for(var i=r.length;i--;){var o=r[i];if(o.index===n&&o.fragment.sn===e)return o}return null}},"./src/controller/stream-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/stream-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=n(/*! ../is-supported */"./src/is-supported.ts"),a=n(/*! ../events */"./src/events.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),d=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),f=n(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=n(/*! ../errors */"./src/errors.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var y=function(t){var e,n;function y(e,n){var r;return(r=t.call(this,e,n,"[stream-controller]")||this).audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.stalled=!1,r.couldBacktrack=!1,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}n=t,(e=y).prototype=Object.create(n.prototype),e.prototype.constructor=e,v(e,n);var b,w,x,S=y.prototype;return S._registerListeners=function(){var t=this.hls;t.on(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(a.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(a.Events.ERROR,this.onError,this),t.on(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(a.Events.BUFFER_CREATED,this.onBufferCreated,this),t.on(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S._unregisterListeners=function(){var t=this.hls;t.off(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(a.Events.ERROR,this.onError,this),t.off(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(a.Events.BUFFER_CREATED,this.onBufferCreated,this),t.off(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},S.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}e>0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},S.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},S.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var t,e=this.levels,n=this.level,r=null==e||null===(t=e[n])||void 0===t?void 0:t.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var o,a=self.performance.now(),s=this.retryDate;(!s||a>=s||null!==(o=this.media)&&void 0!==o&&o.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},S.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},S.doTickIdle=function(){var t,e,n=this.hls,r=this.levelLastLoaded,o=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&o&&o[d]){var f=o[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(a.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var w=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,w,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},S.loadFragment=function(e,n,r){var i,o=this.fragmentTracker.getState(e);if(this.fragCurrent=e,o===l.FragmentState.BACKTRACKED){var a=this.fragmentTracker.getBacktrackData(e);if(a)return this._handleFragmentLoadProgress(a),void this._handleFragmentLoadComplete(a);o=l.FragmentState.NOT_LOADED}o===l.FragmentState.NOT_LOADED||o===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,n,r)):o===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},S.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},S.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},S.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},S.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},S.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var n,r=this.getAppendedFrag(e.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!e.paused&&t){var i=t[this.hls.nextLoadLevel],o=this.fragLastKbps;n=o&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*o)+1:0}else n=0;var a=this.getBufferedFrag(e.currentTime+n);if(a){var s=this.followingBufferedFrag(a);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,u=Math.max(a.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},S.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},S.flushMainBuffer=function(e,n){t.prototype.flushMainBuffer.call(this,e,n,this.altAudio?"video":null)},S.onMediaAttached=function(e,n){t.prototype.onMediaAttached.call(this,e,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},S.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},S.onMediaPlaying=function(){this.tick()},S.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(r.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},S.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(a.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},S.onManifestParsed=function(t,e){var n,r=!1,i=!1;e.levels.forEach((function(t){(n=t.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(o.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},S.onLevelLoading=function(t,e){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[e.level];(!r.details||r.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},S.onLevelLoaded=function(t,e){var n,r=this.levels,o=e.level,s=e.details,l=s.totalduration;if(r){this.log("Level "+o+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[o],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=o,this.hls.trigger(a.Events.LEVEL_UPDATED,{details:s,level:o}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,n=t.frag,r=t.part,i=t.payload,o=this.levels;if(o){var a=o[n.level],s=a.details;if(s){var l=a.videoCodec,u=s.PTSKnown||!s.live,f=null===(e=n.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(a),m=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),b=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},S.onAudioTrackSwitching=function(t,e){var n=this.altAudio,r=!!e.url,i=e.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var o=this.fragCurrent;null!=o&&o.loader&&(this.log("Switching to main audio track, cancel main fragment load"),o.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(a.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:i})}},S.onAudioTrackSwitched=function(t,e){var n=e.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},S.onBufferCreated=function(t,e){var n,r,i=e.tracks,o=!1;for(var a in i){var s=i[a];if("main"===s.id){if(r=a,n=s,"video"===a){var l=i[a];l&&(this.videoBuffer=l.buffer)}}else o=!0}o&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},S.onFragBuffered=function(t,e){var n=e.frag,r=e.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var o=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},S.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=i.State.ERROR):e.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},S.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var n=s.BufferHelper.getBuffered(t);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},S.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},S.onBufferFlushed=function(t,e){var n=e.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},S.onLevelsUpdated=function(t,e){this.levels=e.levels},S.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},S.seekToStartPos=function(){var t=this.media,e=t.currentTime,n=this.startPosition;if(n>=0&&e<n){if(t.seeking)return void m.logger.log("could not seek to "+n+", already seeking at "+e);var r=s.BufferHelper.getBuffered(t),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+e),t.currentTime=n}},S._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),e},S._loadBitrateTestFrag=function(t){var e=this;this._doFragLoad(t).then((function(n){var r=e.hls;if(n&&!r.nextLoadLevel&&!e.fragContextChanged(t)){e.fragLoadError=0,e.state=i.State.IDLE,e.startFragRequested=!1,e.bitrateTest=!1;var o=t.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),r.trigger(a.Events.FRAG_LOADED,n)}}))},S._handleTransmuxComplete=function(t){var e,n="main",o=this.hls,s=t.remuxResult,l=t.chunkMeta,c=this.getCurrentContext(l);if(!c)return this.warn("The loading context changed while buffering fragment "+l.sn+" of level "+l.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(l.level);var h=c.frag,d=c.part,f=c.level,p=s.video,m=s.text,g=s.id3,v=s.initSegment,y=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(h)){if(this.state=i.State.PARSING,v){v.tracks&&(this._bufferInitSegment(f,v.tracks,h,l),o.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:h,id:n,tracks:v.tracks}));var b=v.initPTS,w=v.timescale;Object(r.isFiniteNumber)(b)&&(this.initPTS[h.cc]=b,o.trigger(a.Events.INIT_PTS_FOUND,{frag:h,id:n,initPTS:b,timescale:w}))}if(p&&!1!==s.independent){if(f.details){var x=p.startPTS,S=p.endPTS,E=p.startDTS,C=p.endDTS;if(d)d.elementaryStreams[p.type]={startPTS:x,endPTS:S,startDTS:E,endDTS:C};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<x)return void this.backtrack(h);h.setElementaryStreamInfo(p.type,h.start,S,h.start,C,!0)}h.setElementaryStreamInfo(p.type,x,S,E,C),this.bufferFragmentData(p,h,d,l)}}else if(!1===s.independent)return void this.backtrack(h);if(y){var k=y.startPTS,_=y.endPTS,T=y.startDTS,O=y.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:k,endPTS:_,startDTS:T,endDTS:O}),h.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,k,_,T,O),this.bufferFragmentData(y,h,d,l)}if(null!=g&&null!==(e=g.samples)&&void 0!==e&&e.length){var A={frag:h,id:n,samples:g.samples};o.trigger(a.Events.FRAG_PARSING_METADATA,A)}if(m){var L={frag:h,id:n,samples:m.samples};o.trigger(a.Events.FRAG_PARSING_USERDATA,L)}}},S._bufferInitSegment=function(t,e,n,r){var o=this;if(this.state===i.State.PARSING){this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;var s=e.audio,l=e.video,c=e.audiovideo;if(s){var u=t.audioCodec,h=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===h.indexOf("firefox")&&(u="mp4a.40.5")),-1!==h.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),t.audioCodec&&t.audioCodec!==u&&this.log('Swapping manifest audio codec "'+t.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(t.audioCodec||"")+"/"+s.codec+"]")}l&&(l.levelCodec=t.videoCodec,l.id="main",this.log("Init video buffer, container:"+l.container+", codecs[level/parsed]=["+(t.videoCodec||"")+"/"+l.codec+"]")),c&&this.log("Init audiovideo buffer, container:"+c.container+", codecs[level/parsed]=["+(t.attrs.CODECS||"")+"/"+c.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,e),Object.keys(e).forEach((function(t){var i=e[t].initSegment;null!=i&&i.byteLength&&o.hls.trigger(a.Events.BUFFER_APPENDING,{type:t,data:i,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},S.backtrack=function(t){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(t);var e=this.fragmentTracker.backtrack(t);this.fragPrevious=null,this.nextLoadPosition=t.start,e?this.resetFragmentLoading(t):this.state=i.State.BACKTRACKING},S.checkFragmentChanged=function(){var t=this.media,e=null;if(t&&t.readyState>1&&!1===t.seeking){var n=t.currentTime;if(s.BufferHelper.isBuffered(t,n)?e=this.getAppendedFrag(n):s.BufferHelper.isBuffered(t,n+.1)&&(e=this.getAppendedFrag(n+.1)),e){var r=this.fragPlaying,i=e.level;r&&e.sn===r.sn&&r.level===i&&e.urlId===r.urlId||(this.hls.trigger(a.Events.FRAG_CHANGED,{frag:e}),r&&r.level===i||this.hls.trigger(a.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=e)}}},b=y,(w=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(b.prototype,w),x&&g(b,x),y}(i.default)},"./src/controller/subtitle-stream-controller.ts":
/*!******************************************************!*\
!*** ./src/controller/subtitle-stream-controller.ts ***!
\******************************************************/
/*! exports provided: SubtitleStreamController */function(t,e,n){"use strict";n.r(e),n.d(e,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var m=function(t){var e,n;function m(e,n){var r;return(r=t.call(this,e,n,"[subtitle-stream-controller]")||this).levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}n=t,(e=m).prototype=Object.create(n.prototype),e.prototype.constructor=e,p(e,n);var g,v,y,b=m.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var t=this.hls;t.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(r.Events.ERROR,this.onError,this),t.on(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var t=this.hls;t.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(r.Events.ERROR,this.onError,this),t.off(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(500),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(t,e){this.mainDetails=e.details},b.onSubtitleFragProcessed=function(t,e){var n=e.frag,r=e.success;if(this.fragPrevious=n,this.state=u.State.IDLE,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var o,a=n.start,s=0;s<i.length;s++)if(a>=i[s].start&&a<=i[s].end){o=i[s];break}var l=n.start+n.duration;o?o.end=l:(o={start:a,end:l},i.push(o)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(t,e){var n=e.startOffset,r=e.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,o=this.levels;if(!o.length||!o[i]||!o[i].details)return;var a=r-o[i].details.targetduration;if(a<=0)return;e.endOffsetSubtitles=Math.max(0,a),this.tracksBuffered.forEach((function(t){for(var e=0;e<t.length;)if(t[e].end<=a)t.shift();else{if(!(t[e].start<a))break;t[e].start=a,e++}})),this.fragmentTracker.removeFragmentsInRange(n,a,h.PlaylistLevelType.SUBTITLE)}},b.onError=function(t,e){var n,r=e.frag;r&&r.type===h.PlaylistLevelType.SUBTITLE&&(null!==(n=this.fragCurrent)&&void 0!==n&&n.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},b.onSubtitleTracksUpdated=function(t,e){var n=this,r=e.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(t){return new d.Level(t)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(t){n.tracksBuffered[t.id]=[]})),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(t,e){if(this.currentTrackId=e.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},b.onSubtitleTrackLoaded=function(t,e){var n,r=e.details,i=e.id,o=this.currentTrackId,c=this.levels;if(c.length){var h=c[o];if(!(i>=c.length||i!==o)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.live){var d=this.mainDetails;if(r.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(r,h.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&d.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(a.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,n=t.payload,i=e.decryptdata,o=this.hls;if(!this.fragContextChanged(e)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(t){var n=performance.now();o.trigger(r.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:a,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,n=this.levels;if(!n.length||!n[e]||!n[e].details)return;var s=n[e].details,l=s.targetduration,h=this.config,d=this.media,f=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,y=s.edge,b=this.fragPrevious;if(p<y){var w=h.maxFragLookUpTolerance;b&&s.hasProgramDateTime&&(m=Object(a.findFragmentByPDT)(g,b.endProgramDateTime,w)),m||!(m=Object(a.findFragmentByPTS)(b,g,p,w))&&b&&b.start<g[0].start&&(m=g[0])}else m=g[v-1];null!==(t=m)&&void 0!==t&&t.encrypted?(i.logger.log("Loading key for "+m.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(r.Events.KEY_LOADING,{frag:m})):m&&this.fragmentTracker.getState(m)===c.FragmentState.NOT_LOADED&&this.loadFragment(m,s,p)}}else this.state=u.State.IDLE},b.loadFragment=function(e,n,r){this.fragCurrent=e,t.prototype.loadFragment.call(this,e,n,r)},g=m,(v=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&f(g.prototype,v),y&&f(g,y),m}(u.default)},"./src/controller/subtitle-track-controller.ts":
/*!*****************************************************!*\
!*** ./src/controller/subtitle-track-controller.ts ***!
\*****************************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=function(t){var e,n;function o(e){var n;return(n=t.call(this,e,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,l(e,n);var c,h,d,f=o.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,t.prototype.destroy.call(this)},f.registerListeners=function(){var t=this.hls;t.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(r.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var t=this.hls;t.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(r.Events.ERROR,this.onError,this)},f.onMediaAttached=function(t,e){this.media=e.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(i.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var n=e.id,r=e.details,i=this.trackId,o=this.tracksInGroup[i];if(o){var a=o.details;o.details=e.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,e,a))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var n=e.textGroupIds[e.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,o=this.tracks.filter((function(t){return!n||t.groupId===n}));this.tracksInGroup=o;var a=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:o};this.log("Updating subtitle tracks, "+o.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,i)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,n=0;n<e.length;n++){var r=e[n];if((!this.selectDefaultTrack||r.default)&&(!t||t===r.name))return r.id}return-1},f.onError=function(e,n){t.prototype.onError.call(this,e,n),!n.fatal&&n.context&&n.context.type===a.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},f.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var n=e.id,i=e.groupId,o=e.url;if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Loading subtitle playlist for id "+n),this.hls.trigger(r.Events.SUBTITLE_TRACK_LOADING,{url:o,id:n,groupId:i,deliveryDirectives:t||null})}},f.toggleTrackModes=function(t){var e=this,n=this.media,r=this.subtitleDisplay,i=this.trackId;if(n){var o=u(n.textTracks),a=o.filter((function(t){return t.groupId===e.groupId}));if(-1===t)[].slice.call(o).forEach((function(t){t.mode="disabled"}));else{var s=a[i];s&&(s.mode="disabled")}var l=a[t];l&&(l.mode=r?"showing":"hidden")}},f.setSubtitleTrack=function(t,e){var n,i=this.tracksInGroup;if(this.media){if(this.trackId!==t&&this.toggleTrackModes(t),!(this.trackId===t&&(-1===t||null!==(n=i[t])&&void 0!==n&&n.details)||t<-1||t>=i.length)){this.clearTimer();var o=i[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,o){var a=o.id,s=o.groupId,l=void 0===s?"":s,c=o.name,u=o.type,h=o.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:c,type:u,url:h});var d=this.switchParams(o.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),n=0;n<e.length;n++)if("hidden"===e[n].mode)t=n;else if("showing"===e[n].mode){t=n;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)}},c=o,(h=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var e=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,e)}}])&&s(c.prototype,h),d&&s(c,d),o}(o.default);function u(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];"subtitles"===r.kind&&r.label&&e.push(t[n])}return e}e.default=c},"./src/controller/timeline-controller.ts":
/*!***********************************************!*\
!*** ./src/controller/timeline-controller.ts ***!
\***********************************************/
/*! exports provided: TimelineController */function(t,e,n){"use strict";n.r(e),n.d(e,"TimelineController",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.ts"),a=n(/*! ../utils/output-filter */"./src/utils/output-filter.ts"),s=n(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.ts"),l=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),c=n(/*! ../utils/imsc1-ttml-parser */"./src/utils/imsc1-ttml-parser.ts"),u=n(/*! ../types/loader */"./src/types/loader.ts"),h=n(/*! ../utils/logger */"./src/utils/logger.ts"),d=function(){function t(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var e=new a.default(this,"textTrack1"),n=new a.default(this,"textTrack2"),r=new a.default(this,"textTrack3"),s=new a.default(this,"textTrack4");this.cea608Parser1=new o.default(1,e,n),this.cea608Parser2=new o.default(3,r,s)}t.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(i.Events.FRAG_LOADING,this.onFragLoading,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var e=t.prototype;return e.destroy=function(){var t=this.hls;t.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(i.Events.FRAG_LOADING,this.onFragLoading,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},e.addCues=function(t,e,n,r,o){for(var a,s,l,c,u=!1,h=o.length;h--;){var d=o[h],f=(a=d[0],s=d[1],l=e,c=n,Math.min(s,c)-Math.max(a,l));if(f>=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],n),u=!0,f/(n-e)>.5))return}if(u||o.push([e,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,n,r)}else{var m=this.Cues.newCue(null,e,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:t})}},e.onInitPtsFound=function(t,e){var n=this,r=e.frag,o=e.id,a=e.initPTS,s=e.timescale,l=this.unparsedVttFrags;"main"===o&&(this.initPTS[r.cc]=a,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){n.onFragLoaded(i.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var n=0;n<e.textTracks.length;n++){var r=e.textTracks[n];if(r[t])return r}return null},e.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},e.createNativeTrack=function(t){if(!this.captionsTracks[t]){var e=this.captionsProperties,n=this.captionsTracks,r=this.media,i=e[t],o=i.label,a=i.languageCode,s=this.getExistingTrack(t);if(s)n[t]=s,Object(l.clearCurrentCues)(n[t]),Object(l.sendAddTrackEvent)(n[t],r);else{var c=this.createTextTrack("captions",o,a);c&&(c[t]=!0,n[t]=c)}}},e.createNonNativeTrack=function(t){if(!this.nonNativeCaptionsTracks[t]){var e=this.captionsProperties[t];if(e){var n={_id:t,label:e.label,kind:"captions",default:!!e.media&&!!e.media.default,closedCaptions:e.media};this.nonNativeCaptionsTracks[t]=n,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},e.createTextTrack=function(t,e,n){var r=this.media;if(r)return r.addTextTrack(t,e,n)},e.onMediaAttaching=function(t,e){this.media=e.media,this._cleanTracks()},e.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach((function(e){Object(l.clearCurrentCues)(t[e]),delete t[e]})),this.nonNativeCaptionsTracks={}},e.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},e._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var n=0;n<e.length;n++)Object(l.clearCurrentCues)(e[n])}},e.onSubtitleTracksUpdated=function(t,e){var n=this;this.textTracks=[];var r=e.subtitleTracks||[],o=r.some((function(t){return t.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||o&&this.config.enableIMSC1){var a=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(t,e){var r;if(e<s.length){for(var i=null,o=0;o<s.length;o++)if(f(s[o],t)){i=s[o];break}i&&(r=i)}r?Object(l.clearCurrentCues)(r):(r=n.createTextTrack("subtitles",t.name,t.lang))&&(r.mode="disabled"),r&&(r.groupId=t.groupId,n.textTracks.push(r))}))}else if(!a&&this.tracks&&this.tracks.length){var u=this.tracks.map((function(t){return{label:t.name,kind:t.type.toLowerCase(),default:t.default,subtitleTrack:t}}));this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},e.onManifestLoaded=function(t,e){var n=this;this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((function(t){var e=/(?:CC|SERVICE)([1-4])/.exec(t.instreamId);if(e){var r="textTrack"+e[1],i=n.captionsProperties[r];i&&(i.label=t.name,t.lang&&(i.languageCode=t.lang),i.media=t)}}))},e.onFragLoading=function(t,e){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,o=this.lastPartIndex;if(this.enabled&&n&&r&&e.frag.type===u.PlaylistLevelType.MAIN){var a,s,l=e.frag.sn,c=null!=(a=null==e||null===(s=e.part)||void 0===s?void 0:s.index)?a:-1;l===i+1||l===i&&c===o+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=c}},e.onFragLoaded=function(t,e){var n=e.frag,o=e.payload,a=this.initPTS,s=this.unparsedVttFrags;if(n.type===u.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(r.isFiniteNumber)(a[n.cc]))return s.push(e),void(a.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var h=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),h&&h.textCodec===c.IMSC1_CODEC?this._parseIMSC1(n,o):this._parseVTTs(n,o,d)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},e._parseIMSC1=function(t,e){var n=this,r=this.hls;Object(c.parseIMSC1)(e,this.initPTS[t.cc],this.timescale[t.cc],(function(e){n._appendCues(e,t.level),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(e){h.logger.log("Failed to parse IMSC1: "+e),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:e})}))},e._parseVTTs=function(t,e,n){var r=this,o=this.hls;Object(s.parseWebVTT)(e,this.initPTS[t.cc],this.timescale[t.cc],n,t.cc,t.start,(function(e){r._appendCues(e,t.level),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(n){r._fallbackToIMSC1(t,e),h.logger.log("Failed to parse VTT cue: "+n),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:n})}))},e._fallbackToIMSC1=function(t,e){var n=this,r=this.tracks[t.level];r.textCodec||Object(c.parseIMSC1)(e,this.initPTS[t.cc],this.timescale[t.cc],(function(){r.textCodec=c.IMSC1_CODEC,n._parseIMSC1(t,e)}),(function(){r.textCodec="wvtt"}))},e._appendCues=function(t,e){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[e];if("disabled"===r.mode)return;t.forEach((function(t){return Object(l.addCueToTrack)(r,t)}))}else{var o=this.tracks[e].default?"default":"subtitles"+e;n.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:t,track:o})}},e.onFragDecrypted=function(t,e){var n=e.frag;if(n.type===u.PlaylistLevelType.SUBTITLE){if(!Object(r.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(e);this.onFragLoaded(i.Events.FRAG_LOADED,e)}},e.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},e.onFragParsingUserdata=function(t,e){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r)for(var i=0;i<e.samples.length;i++){var o=e.samples[i].bytes;if(o){var a=this.extractCea608Data(o);n.addData(e.samples[i].pts,a[0]),r.addData(e.samples[i].pts,a[1])}}},e.onBufferFlushing=function(t,e){var n=e.startOffset,r=e.endOffset,i=e.endOffsetSubtitles,o=e.type,a=this.media;if(a&&!(a.currentTime<r)){if(!o||"video"===o){var s=this.captionsTracks;Object.keys(s).forEach((function(t){return Object(l.removeCuesInRange)(s[t],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var c=this.textTracks;Object.keys(c).forEach((function(t){return Object(l.removeCuesInRange)(c[t],n,i)}))}}},e.extractCea608Data=function(t){for(var e=31&t[0],n=2,r=[[],[]],i=0;i<e;i++){var o=t[n++],a=127&t[n++],s=127&t[n++],l=3&o;0===a&&0===s||0!=(4&o)&&(0!==l&&1!==l||(r[l].push(a),r[l].push(s)))}return r},t}();function f(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}},"./src/crypt/aes-crypto.ts":
/*!*********************************!*\
!*** ./src/crypt/aes-crypto.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}()},"./src/crypt/aes-decryptor.ts":
/*!************************************!*\
!*** ./src/crypt/aes-decryptor.ts ***!
\************************************/
/*! exports provided: removePadding, default */function(t,e,n){"use strict";n.r(e),n.d(e,"removePadding",(function(){return i})),n.d(e,"default",(function(){return o}));var r=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts");function i(t){var e=t.byteLength,n=e&&new DataView(t.buffer).getUint8(e-1);return n?Object(r.sliceUint8)(t,0,e-n):t}var o=function(){function t(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var e=t.prototype;return e.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),n=new Uint32Array(4),r=0;r<4;r++)n[r]=e.getUint32(4*r);return n},e.initTable=function(){var t=this.sBox,e=this.invSBox,n=this.subMix,r=n[0],i=n[1],o=n[2],a=n[3],s=this.invSubMix,l=s[0],c=s[1],u=s[2],h=s[3],d=new Uint32Array(256),f=0,p=0,m=0;for(m=0;m<256;m++)d[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,t[f]=g,e[g]=f;var v=d[f],y=d[v],b=d[y],w=257*d[g]^16843008*g;r[f]=w<<24|w>>>8,i[f]=w<<16|w>>>16,o[f]=w<<8|w>>>24,a[f]=w,w=16843009*b^65537*y^257*v^16843008*f,l[g]=w<<24|w>>>8,c[g]=w<<16|w>>>16,u[g]=w<<8|w>>>24,h[g]=w,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r<e.length&&n;)n=e[r]===this.key[r],r++;if(!n){this.key=e;var i=this.keySize=e.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o,a,s,l,c=this.ksRows=4*(i+6+1),u=this.keySchedule=new Uint32Array(c),h=this.invKeySchedule=new Uint32Array(c),d=this.sBox,f=this.rcon,p=this.invSubMix,m=p[0],g=p[1],v=p[2],y=p[3];for(o=0;o<c;o++)o<i?s=u[o]=e[o]:(l=s,o%i==0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=f[o/i|0]<<24):i>6&&o%i==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),u[o]=s=(u[o-i]^l)>>>0);for(a=0;a<c;a++)o=c-a,l=3&a?u[o]:u[o-4],h[a]=a<4||o<=4?l:m[d[l>>>24]]^g[d[l>>>16&255]]^v[d[l>>>8&255]]^y[d[255&l]],h[a]=h[a]>>>0}},e.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},e.decrypt=function(t,e,n){for(var r,i,o,a,s,l,c,u,h,d,f,p,m,g,v=this.keySize+6,y=this.invKeySchedule,b=this.invSBox,w=this.invSubMix,x=w[0],S=w[1],E=w[2],C=w[3],k=this.uint8ArrayToUint32Array_(n),_=k[0],T=k[1],O=k[2],A=k[3],L=new Int32Array(t),D=new Int32Array(L.length),I=this.networkToHostOrderSwap;e<L.length;){for(h=I(L[e]),d=I(L[e+1]),f=I(L[e+2]),p=I(L[e+3]),s=h^y[0],l=p^y[1],c=f^y[2],u=d^y[3],m=4,g=1;g<v;g++)r=x[s>>>24]^S[l>>16&255]^E[c>>8&255]^C[255&u]^y[m],i=x[l>>>24]^S[c>>16&255]^E[u>>8&255]^C[255&s]^y[m+1],o=x[c>>>24]^S[u>>16&255]^E[s>>8&255]^C[255&l]^y[m+2],a=x[u>>>24]^S[s>>16&255]^E[l>>8&255]^C[255&c]^y[m+3],s=r,l=i,c=o,u=a,m+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[c>>8&255]<<8^b[255&u]^y[m],i=b[l>>>24]<<24^b[c>>16&255]<<16^b[u>>8&255]<<8^b[255&s]^y[m+1],o=b[c>>>24]<<24^b[u>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^y[m+2],a=b[u>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&c]^y[m+3],D[e]=I(r^_),D[e+1]=I(a^T),D[e+2]=I(o^O),D[e+3]=I(i^A),_=h,T=d,O=f,A=p,e+=4}return D.buffer},t}()},"./src/crypt/decrypter.ts":
/*!********************************!*\
!*** ./src/crypt/decrypter.ts ***!
\********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return c}));var r=n(/*! ./aes-crypto */"./src/crypt/aes-crypto.ts"),i=n(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.ts"),o=n(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),c=function(){function t(t,e,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=t,this.config=e,this.removePKCS7Padding=i,i)try{var o=self.crypto;o&&(this.subtle=o.subtle||o.webkitSubtle)}catch(t){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var e=t.prototype;return e.destroy=function(){this.observer=null},e.isSync=function(){return this.config.enableSoftwareAES},e.flush=function(){var t=this.currentResult;if(t){var e=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?Object(o.removePadding)(e):e}this.reset()},e.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},e.decrypt=function(t,e,n,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(t),e,n);var i=this.flush();i&&r(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(t),e,n).then(r)},e.softwareDecrypt=function(t,e,n){var r=this.currentIV,i=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(t=Object(s.appendUint8Array)(a,t),this.remainderData=null);var c=this.getValidChunk(t);if(!c.length)return null;r&&(n=r);var u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new o.default),u.expandKey(e);var h=i;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=Object(l.sliceUint8)(c,-16).buffer,h||null},e.webCryptoDecrypt=function(t,e,n){var o=this,a=this.subtle;return this.key===e&&this.fastAesKey||(this.key=e,this.fastAesKey=new i.default(a,e)),this.fastAesKey.expandKey().then((function(e){return a?new r.default(a,n).decrypt(t.buffer,e):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return o.onWebCryptoError(r,t,e,n)}))},e.onWebCryptoError=function(t,e,n,r){return a.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",t),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(e,n,r)},e.getValidChunk=function(t){var e=t,n=t.length-t.length%16;return n!==t.length&&(e=Object(l.sliceUint8)(t,0,n),this.remainderData=Object(l.sliceUint8)(t,n)),e},e.logOnce=function(t){this.logEnabled&&(a.logger.log("[decrypter.ts]: "+t),this.logEnabled=!1)},t}()},"./src/crypt/fast-aes-key.ts":
/*!***********************************!*\
!*** ./src/crypt/fast-aes-key.ts ***!
\***********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}()},"./src/demux/aacdemuxer.ts":
/*!*********************************!*\
!*** ./src/demux/aacdemuxer.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ./adts */"./src/demux/adts.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts");function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,n;function r(e,n){var r;return(r=t.call(this)||this).observer=void 0,r.config=void 0,r.observer=e,r.config=n,r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var l=r.prototype;return l.resetInitSegment=function(e,n,r){t.prototype.resetInitSegment.call(this,e,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:e,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(t){if(!t)return!1;for(var e=(a.getID3Data(t,0)||[]).length,n=t.length;e<n;e++)if(i.probe(t,e))return o.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(t,e){return i.canParse(t,e)},l.appendFrame=function(t,e,n){i.initTrackConfig(t,this.observer,e,n,t.manifestCodec);var r=i.appendFrame(t,e,n,this.initPTS,this.frameIndex);if(r&&0===r.missing)return r},r}(r.default);l.minProbeByteLength=9,e.default=l},"./src/demux/adts.ts":
/*!***************************!*\
!*** ./src/demux/adts.ts ***!
\***************************/
/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(t,e,n){"use strict";n.r(e),n.d(e,"getAudioConfig",(function(){return a})),n.d(e,"isHeaderPattern",(function(){return s})),n.d(e,"getHeaderLength",(function(){return l})),n.d(e,"getFullFrameLength",(function(){return c})),n.d(e,"canGetFrameLength",(function(){return u})),n.d(e,"isHeader",(function(){return h})),n.d(e,"canParse",(function(){return d})),n.d(e,"probe",(function(){return f})),n.d(e,"initTrackConfig",(function(){return p})),n.d(e,"getFrameDuration",(function(){return m})),n.d(e,"parseFrameHeader",(function(){return g})),n.d(e,"appendFrame",(function(){return v}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../events */"./src/events.ts");function a(t,e,n,a){var s,l,c,u,h=navigator.userAgent.toLowerCase(),d=a,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&e[n+2])>>>6);var p=(60&e[n+2])>>>2;if(!(p>f.length-1))return c=(1&e[n+2])<<2,c|=(192&e[n+3])>>>6,r.logger.log("manifest codec:"+a+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=5,u=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&p>=6?l=p-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!a&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:d};t.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5<t.length}function h(t,e){return e+1<t.length&&s(t,e)}function d(t,e){return u(t,e)&&s(t,e)&&c(t,e)<=t.length-e}function f(t,e){if(h(t,e)){var n=l(t,e);if(e+n>=t.length)return!1;var r=c(t,e);if(r<=n)return!1;var i=e+r;return i===t.length||h(t,i)}return!1}function p(t,e,n,i,o){if(!t.samplerate){var s=a(e,n,i,o);if(!s)return;t.config=s.config,t.samplerate=s.samplerate,t.channelCount=s.channelCount,t.codec=s.codec,t.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+t.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(t){return 9216e4/t}function g(t,e,n,r,i){var o=l(t,e),a=c(t,e);if((a-=o)>0)return{headerLength:o,frameLength:a,stamp:n+r*i}}function v(t,e,n,r,i){var o=g(e,n,r,i,m(t.samplerate));if(o){var a,s=o.frameLength,l=o.headerLength,c=o.stamp,u=l+s,h=Math.max(0,n+u-e.length);h?(a=new Uint8Array(u-l)).set(e.subarray(n+l,e.length),0):a=e.subarray(n+l,n+u);var d={unit:a,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts":
/*!*****************************************!*\
!*** ./src/demux/base-audio-demuxer.ts ***!
\*****************************************/
/*! exports provided: initPTSFn, default */function(t,e,n){"use strict";n.r(e),n.d(e,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),a=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,n){},e.demux=function(t,e){this.cachedData&&(t=Object(a.appendUint8Array)(this.cachedData,t),this.cachedData=null);var n,r,l=i.getID3Data(t,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,e)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;u<p;){if(this.canParse(t,u)){var m=this.appendFrame(h,t,u);m?(this.frameIndex++,r=m.sample.pts,n=u+=m.length):u=p}else i.canParse(t,u)?(l=i.getID3Data(t,u),d.samples.push({pts:r,dts:r,data:l}),n=u+=l.length):u++;if(u===p&&n!==p){var g=Object(s.sliceUint8)(t,n);this.cachedData?this.cachedData=Object(a.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:h,avcTrack:Object(o.dummyTrack)(),id3Track:d,textTrack:Object(o.dummyTrack)()}},e.demuxSampleAes=function(t,e,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},e.flush=function(t){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(o.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(o.dummyTrack)()}},e.destroy=function(){},t}(),c=function(t,e){return Object(r.isFiniteNumber)(t)?90*t:9e4*e};e.default=l},"./src/demux/chunk-cache.ts":
/*!**********************************!*\
!*** ./src/demux/chunk-cache.ts ***!
\**********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(){this.chunks=[],this.dataLength=0}var e=t.prototype;return e.push=function(t){this.chunks.push(t),this.dataLength+=t.length},e.flush=function(){var t,e=this.chunks,n=this.dataLength;return e.length?(t=1===e.length?e[0]:function(t,e){for(var n=new Uint8Array(e),r=0,i=0;i<t.length;i++){var o=t[i];n.set(o,r),r+=o.length}return n}(e,n),this.reset(),t):new Uint8Array(0)},e.reset=function(){this.chunks.length=0,this.dataLength=0},t}()},"./src/demux/dummy-demuxed-track.ts":
/*!******************************************!*\
!*** ./src/demux/dummy-demuxed-track.ts ***!
\******************************************/
/*! exports provided: dummyTrack */function(t,e,n){"use strict";function r(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}n.r(e),n.d(e,"dummyTrack",(function(){return r}))},"./src/demux/exp-golomb.ts":
/*!*********************************!*\
!*** ./src/demux/exp-golomb.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function t(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,n=t.byteLength-e,r=new Uint8Array(4),i=Math.min(4,e);if(0===i)throw new Error("no bytes available");r.set(t.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?n<<e|this.readBits(e):n},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,n=8,r=0;r<t;r++)0!==n&&(n=(e+this.readEG()+256)%256),e=0===n?e:n},e.readSPS=function(){var t,e,n,r=0,i=0,o=0,a=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),c=this.readUEG.bind(this),u=this.readBoolean.bind(this),h=this.skipBits.bind(this),d=this.skipEG.bind(this),f=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var m=s();if(l(5),h(3),s(),f(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){var g=c();if(3===g&&h(1),f(),f(),h(1),u())for(e=3!==g?8:12,n=0;n<e;n++)u()&&p(n<6?16:64)}f();var v=c();if(0===v)c();else if(1===v)for(h(1),d(),d(),t=c(),n=0;n<t;n++)d();f(),h(1);var y=c(),b=c(),w=l(1);0===w&&h(1),h(1),u()&&(r=c(),i=c(),o=c(),a=c());var x=[1,1];if(u()&&u())switch(s()){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:x=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(y+1)-2*r-2*i),height:(2-w)*(b+1)*16-(w?2:4)*(o+a),pixelRatio:x}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}();e.default=i},"./src/demux/id3.ts":
/*!**************************!*\
!*** ./src/demux/id3.ts ***!
\**************************/
/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(t,e,n){"use strict";n.r(e),n.d(e,"isHeader",(function(){return i})),n.d(e,"isFooter",(function(){return o})),n.d(e,"getID3Data",(function(){return a})),n.d(e,"canParse",(function(){return l})),n.d(e,"getTimeStamp",(function(){return c})),n.d(e,"isTimeStampFrame",(function(){return u})),n.d(e,"getID3Frames",(function(){return d})),n.d(e,"decodeFrame",(function(){return f})),n.d(e,"utf8ArrayToStr",(function(){return y})),n.d(e,"testables",(function(){return b}));var r,i=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},o=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},a=function(t,e){for(var n=e,r=0;i(t,e);)r+=10,r+=s(t,e+6),o(t,e+10)&&(r+=10),e+=r;if(r>0)return t.subarray(n,n+r)},s=function(t,e){var n=0;return n=(127&t[e])<<21,n|=(127&t[e+1])<<14,n|=(127&t[e+2])<<7,n|=127&t[e+3]},l=function(t,e){return i(t,e)&&s(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),n=0;n<e.length;n++){var r=e[n];if(u(r))return v(r)}},u=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},h=function(t){var e=String.fromCharCode(t[0],t[1],t[2],t[3]),n=s(t,4);return{type:e,size:n,data:t.subarray(10,10+n)}},d=function(t){for(var e=0,n=[];i(t,e);){for(var r=s(t,e+6),a=(e+=10)+r;e+8<a;){var l=h(t.subarray(e)),c=f(l);c&&n.push(c),e+=l.size+10}o(t,e)&&(e+=10)}return n},f=function(t){return"PRIV"===t.type?p(t):"W"===t.type[0]?g(t):m(t)},p=function(t){if(!(t.size<2)){var e=y(t.data,!0),n=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:n.buffer}}},m=function(t){if(!(t.size<2)){if("TXXX"===t.type){var e=1,n=y(t.data.subarray(e),!0);e+=n.length+1;var r=y(t.data.subarray(e));return{key:t.type,info:n,data:r}}var i=y(t.data.subarray(1));return{key:t.type,data:i}}},g=function(t){if("WXXX"===t.type){if(t.size<2)return;var e=1,n=y(t.data.subarray(e),!0);e+=n.length+1;var r=y(t.data.subarray(e));return{key:t.type,info:n,data:r}}var i=y(t.data);return{key:t.type,data:i}},v=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),n=1&e[3],r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},y=function(t,e){void 0===e&&(e=!1);var n=w();if(n){var r=n.decode(t);if(e){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var o,a,s,l=t.length,c="",u=0;u<l;){if(0===(o=t[u++])&&e)return c;if(0!==o&&3!==o)switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(o);break;case 12:case 13:a=t[u++],c+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=t[u++],s=t[u++],c+=String.fromCharCode((15&o)<<12|(63&a)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};function w(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp3demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var l=r.prototype;return l.resetInitSegment=function(e,n,r){t.prototype.resetInitSegment.call(this,e,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(t){if(!t)return!1;for(var e=(i.getID3Data(t,0)||[]).length,n=t.length;e<n;e++)if(a.probe(t,e))return o.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(t,e){return a.canParse(t,e)},l.appendFrame=function(t,e,n){if(null!==this.initPTS)return a.appendFrame(t,e,n,this.initPTS,this.frameIndex)},r}(r.default);l.minProbeByteLength=4,e.default=l},"./src/demux/mp4demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp4demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(r.findBox)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(r.appendUint8Array)(this.remainderData,t));var o=Object(r.segmentValidRange)(e);this.remainderData=o.remainder,n.samples=o.valid||new Uint8Array}else n.samples=e;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.flush=function(){var t=Object(i.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:t,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.demuxSampleAes=function(t,e,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();o.minProbeByteLength=1024,e.default=o},"./src/demux/mpegaudio.ts":
/*!********************************!*\
!*** ./src/demux/mpegaudio.ts ***!
\********************************/
/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(t,e,n){"use strict";n.r(e),n.d(e,"appendFrame",(function(){return l})),n.d(e,"parseHeader",(function(){return c})),n.d(e,"isHeaderPattern",(function(){return u})),n.d(e,"isHeader",(function(){return h})),n.d(e,"canParse",(function(){return d})),n.d(e,"probe",(function(){return f}));var r=null,i=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],o=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],a=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function l(t,e,n,r,i){if(!(n+24>e.length)){var o=c(e,n);if(o&&n+o.frameLength<=e.length){var a=r+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:e.subarray(n,n+o.frameLength),pts:a,dts:a};return t.config=[],t.channelCount=o.channelCount,t.samplerate=o.sampleRate,t.samples.push(s),{sample:s,length:o.frameLength,missing:0}}}}function c(t,e){var n=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=o[3*(3===n?0:2===n?1:2)+u],m=3===d?1:2,g=a[n][l],v=s[l],y=8*g*v,b=Math.floor(g*f/p+h)*v;if(null===r){var w=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=w?parseInt(w[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1<t.length&&u(t,e)}function d(t,e){return u(t,e)&&4<=t.length-e}function f(t,e){if(e+1<t.length&&u(t,e)){var n=c(t,e),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=e+r;return i===t.length||h(t,i)}return!1}},"./src/demux/sample-aes.ts":
/*!*********************************!*\
!*** ./src/demux/sample-aes.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),i=n(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),o=function(){function t(t,e,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new r.default(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,n,r){var i=t[e].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,(function(o){var a=new Uint8Array(o);i.set(a,16),r||s.decryptAacSamples(t,e+1,n)}))},e.decryptAacSamples=function(t,e,n){for(;;e++){if(e>=t.length)return void n();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,n,r),!r)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,n=new Int8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)n.set(t.subarray(i,i+16),r);return n},e.getAvcDecryptedUnit=function(t,e){for(var n=new Uint8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(n.subarray(r,r+16),i);return t},e.decryptAvcSample=function(t,e,n,r,o,a){var s=Object(i.discardEPB)(o.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){o.data=c.getAvcDecryptedUnit(s,i),a||c.decryptAvcSamples(t,e,n+1,r)}))},e.decryptAvcSamples=function(t,e,n,r){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,n=0){if(e>=t.length)return void r();for(var i=t[e].units;!(n>=i.length);n++){var o=i[n];if(!(o.data.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(t,e,n,r,o,a),!a)return}}}},t}();e.default=o},"./src/demux/transmuxer-interface.ts":
/*!*******************************************!*\
!*** ./src/demux/transmuxer-interface.ts ***!
\*******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,n,l){var h=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=t,this.id=e,this.onTransmuxComplete=n,this.onFlush=l;var d=t.config,f=function(e,n){(n=n||{}).frag=h.frag,n.id=h.id,t.trigger(e,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var g;a.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(e){t.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:e,config:JSON.stringify(d)})}catch(t){a.logger.warn("Error in worker:",t),a.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new o.default(this.observer,p,d,m,e),this.worker=null}}else this.transmuxer=new o.default(this.observer,p,d,m,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},e.push=function(t,e,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),w=v?u.sn-v.sn:-1,x=this.part?u.part-this.part.index:1,S=!b&&(1===w||0===w&&1===x),E=self.performance.now();(b||w||0===i.stats.parsing.start)&&(i.stats.parsing.start=E),!s||!x&&S||(s.stats.parsing.start=E);var C=new o.TransmuxState(y,S,c,b,m);if(!S||y){a.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+S+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var k=new o.TransmuxConfig(n,r,e,l,h);this.configureTransmuxer(k)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:t,decryptdata:g,chunkMeta:u,state:C},t instanceof ArrayBuffer?[t]:[]);else if(f){var _=f.push(t,g,u,C);Object(o.isPromise)(_)?_.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(_)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:t});else if(n){var i=n.flush(t);Object(o.isPromise)(i)?i.then((function(n){e.handleFlushResult(n,t)})):this.handleFlushResult(i,t)}},e.handleFlushResult=function(t,e){var n=this;t.forEach((function(t){n.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,n=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,n.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,n=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):n&&n.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts":
/*!****************************************!*\
!*** ./src/demux/transmuxer-worker.ts ***!
\****************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(t){var e=new a.EventEmitter,n=function(e,n){t.postMessage({event:e,data:n})};e.on(i.Events.FRAG_DECRYPTED,n),e.on(i.Events.ERROR,n),t.addEventListener("message",(function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);t.transmuxer=new r.default(e,a.typeSupported,s,a.vendor,a.id),Object(o.enableLogs)(s.debug),n("init",null);break;case"configure":t.transmuxer.configure(a.config);break;case"demux":var c=t.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(r.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=a.chunkMeta,d=t.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((n=e.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=e.remuxResult,o=i.audio,a=i.video;o&&c(r,o),a&&c(r,a),t.postMessage({event:"transmuxComplete",data:e},r)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,n){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts":
/*!*********************************!*\
!*** ./src/demux/transmuxer.ts ***!
\*********************************/
/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y})),n.d(e,"isPromise",(function(){return w})),n.d(e,"TransmuxConfig",(function(){return x})),n.d(e,"TransmuxState",(function(){return S}));var r,i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(t){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;g.forEach((function(t){var e=t.demux;v=Math.max(v,e.minProbeByteLength)}));var y=function(){function t(t,e,n,r,i){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=t,this.typeSupported=e,this.config=n,this.vendor=r,this.id=i}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,n,i){var o=this,a=n.transmuxing;a.executeStart=r();var s=new Uint8Array(t),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(t,e){var n=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(n=e),n}(s,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(t){var e=o.push(t,null,n);return o.decryptionPromise=null,e})),this.decryptionPromise;var m=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!m)return a.executeEnd=r(),b(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,y=g.discontinuity,w=g.trackSwitch,x=g.accurateTimeOffset,S=g.timeOffset,E=h.audioCodec,C=h.videoCodec,k=h.defaultInitPts,_=h.duration,T=h.initSegmentData;if((y||w)&&this.resetInitSegment(T,E,C,_),y&&this.resetInitialTimestamp(k),v||this.resetContiguity(),this.needsProbing(s,y,w)){if(l.dataLength){var O=l.flush();s=Object(p.appendUint8Array)(O,s)}this.configureTransmuxer(s,h)}var A=this.transmux(s,d,S,x,n),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,a.executeEnd=r(),A},e.flush=function(t){var e=this,n=t.transmuxing;n.executeStart=r();var a=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(a){var d=a.flush();d&&u.push(this.push(d,null,t))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(t)];var g=p.flush(h);return w(g)?g.then((function(n){return e.flushRemux(u,n,t),u})):(this.flushRemux(u,g,t),u)},e.flushRemux=function(t,e,n){var i=e.audioTrack,o=e.avcTrack,a=e.id3Track,s=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,o,a,s,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},e.resetInitialTimestamp=function(t){var e=this.demuxer,n=this.remuxer;e&&n&&(e.resetTimeStamp(t),n.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,n,r){var i=this.demuxer,o=this.remuxer;i&&o&&(i.resetInitSegment(e,n,r),o.resetInitSegment(t,e,n))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,n,r,i){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,n,r,i):this.transmuxUnencrypted(t,n,r,i)},e.transmuxUnencrypted=function(t,e,n,r){var i=this.demuxer.demux(t,e,!1,!this.config.progressive),o=i.audioTrack,a=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(o,a,s,l,e,n,!1,this.id),chunkMeta:r}},e.transmuxSampleAes=function(t,e,n,r,i){var o=this;return this.demuxer.demuxSampleAes(t,e,n).then((function(t){return{remuxResult:o.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,n,r,!1,o.id),chunkMeta:i}}))},e.configureTransmuxer=function(t,e){for(var n,r=this.config,i=this.observer,o=this.typeSupported,a=this.vendor,s=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=g.length;p<v;p++)if(g[p].demux.probe(t)){n=g[p];break}n||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),n={demux:l.default,remux:d.default});var y=this.demuxer,b=this.remuxer,w=n.remux,x=n.demux;b&&b instanceof w||(this.remuxer=new w(i,r,o,a)),y&&y instanceof x||(this.demuxer=new x(i,r,o),this.probe=x.probe),this.resetInitSegment(h,s,f,u),this.resetInitialTimestamp(c)},e.needsProbing=function(t,e,n){return!this.demuxer||!this.remuxer||e||n},e.getDecrypter=function(){var t=this.decrypter;return t||(t=this.decrypter=new a.default(this.observer,this.config)),t},t}(),b=function(t){return{remuxResult:{},chunkMeta:t}};function w(t){return"then"in t&&t.then instanceof Function}var x=function(t,e,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},S=function(t,e,n,r,i){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":
/*!********************************!*\
!*** ./src/demux/tsdemuxer.ts ***!
\********************************/
/*! exports provided: discardEPB, default */function(t,e,n){"use strict";n.r(e),n.d(e,"discardEPB",(function(){return w}));var r=n(/*! ./adts */"./src/demux/adts.ts"),i=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts"),o=n(/*! ./exp-golomb */"./src/demux/exp-golomb.ts"),a=n(/*! ./id3 */"./src/demux/id3.ts"),s=n(/*! ./sample-aes */"./src/demux/sample-aes.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),u=n(/*! ../utils/logger */"./src/utils/logger.ts"),h=n(/*! ../errors */"./src/errors.ts"),d={video:1,audio:2,id3:3,text:4},f=function(){function t(t,e,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=t,this.config=e,this.typeSupported=n}t.probe=function(e){var n=t.syncOffset(e);return!(n<0||(n&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},t.syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),n=0;n<e;){if(71===t[n]&&71===t[n+188]&&71===t[n+376])return n;n++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:d[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===t?e:void 0}};var e=t.prototype;return e.resetInitSegment=function(e,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",r),this._audioTrack=t.createTrack("audio",r),this._id3Track=t.createTrack("id3",r),this._txtTrack=t.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=n,this._duration=r},e.resetTimeStamp=function(){},e.resetContiguity=function(){var t=this._audioTrack,e=this._avcTrack,n=this._id3Track;t&&(t.pesData=null),e&&(e.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},e.demux=function(e,n,r,i){var o;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var a=this._avcTrack,s=this._audioTrack,d=this._id3Track,f=a.pid,p=a.pesData,y=s.pid,b=d.pid,w=s.pesData,x=d.pesData,S=!1,E=this.pmtParsed,C=this._pmtId,k=e.length;if(this.remainderData&&(k=(e=Object(c.appendUint8Array)(this.remainderData,e)).length,this.remainderData=null),k<188&&!i)return this.remainderData=e,{audioTrack:s,avcTrack:a,id3Track:d,textTrack:this._txtTrack};var _=Math.max(0,t.syncOffset(e));(k-=(k+_)%188)<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,k,e.buffer.byteLength-k));for(var T=_;T<k;T+=188)if(71===e[T]){var O=!!(64&e[T+1]),A=((31&e[T+1])<<8)+e[T+2],L=void 0;if((48&e[T+3])>>4>1){if((L=T+5+e[T+4])===T+188)continue}else L=T+4;switch(A){case f:O&&(p&&(o=v(p))&&this.parseAVCPES(o,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(L,T+188)),p.size+=T+188-L);break;case y:O&&(w&&(o=v(w))&&(s.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),w={data:[],size:0}),w&&(w.data.push(e.subarray(L,T+188)),w.size+=T+188-L);break;case b:O&&(x&&(o=v(x))&&this.parseID3PES(o),x={data:[],size:0}),x&&(x.data.push(e.subarray(L,T+188)),x.size+=T+188-L);break;case 0:O&&(L+=e[L]+1),C=this._pmtId=m(e,L);break;case C:O&&(L+=e[L]+1);var D=g(e,L,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(a.pid=f),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(d.pid=b),S&&!E&&(u.logger.log("reparse from beginning"),S=!1,T=_-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:S=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});a.pesData=p,s.pesData=w,d.pesData=x;var I={audioTrack:s,avcTrack:a,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(I),I},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,n=t.audioTrack,r=t.avcTrack,i=t.id3Track,o=r.pesData,a=n.pesData,s=i.pesData;o&&(e=v(o))?(this.parseAVCPES(e,!0),r.pesData=null):r.pesData=o,a&&(e=v(a))?(n.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),n.pesData=null):(null!=a&&a.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=a),s&&(e=v(s))?(this.parseID3PES(e),i.pesData=null):i.pesData=s},e.demuxSampleAes=function(t,e,n){var r=this.demux(t,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,e);return this.decrypt(r,i)},e.decrypt=function(t,e){return new Promise((function(n){var r=t.audioTrack,i=t.avcTrack;r.samples&&r.isAAC?e.decryptAacSamples(r.samples,0,(function(){i.samples?e.decryptAvcSamples(i.samples,0,0,(function(){n(t)})):n(t)})):i.samples&&e.decryptAvcSamples(i.samples,0,0,(function(){n(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,t.pts,t.dts,"")),s.forEach((function(e){switch(e.type){case 1:n=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var s=e.data;if(c&&s.length>4){var u=new o.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new o.default(w(e.data));h.readUByte();for(var d=0,f=0,m=!1,g=0;!m&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);f=0;do{f+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(m=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),x=31&v,S=[v,h.readUByte()],E=0;E<x;E++)S.push(h.readUByte()),S.push(h.readUByte()),S.push(h.readUByte());b(r._txtTrack.samples,{type:3,pts:t.pts,bytes:S})}}else if(5===d&&0!==h.bytesAvailable){if(m=!0,f>16){for(var C=[],k=0;k<16;k++)C.push(h.readUByte().toString(16)),3!==k&&5!==k&&7!==k&&9!==k||C.push("-");for(var _=f-16,T=new Uint8Array(_),O=0;O<_;O++)T[O]=h.readUByte();b(r._txtTrack.samples,{pts:t.pts,payloadType:d,uuid:C.join(""),userData:Object(a.utf8ArrayToStr)(T),userDataBytes:T})}}else if(f<h.bytesAvailable)for(var A=0;A<f;A++)h.readUByte()}break;case 7:if(n=!0,c=!0,!i.sps){var L=new o.default(e.data).readSPS();i.width=L.width,i.height=L.height,i.pixelRatio=L.pixelRatio,i.sps=[e.data],i.duration=r._duration;for(var D=e.data.subarray(1,4),I="avc1.",R=0;R<3;R++){var M=D[R].toString(16);M.length<2&&(M="0"+M),I+=M}i.codec=I}break;case 8:n=!0,i.pps||(i.pps=[e.data]);break;case 9:n=!1,i.audFound=!0,l&&y(l,i),l=r.avcSample=p(!1,t.pts,t.dts,"");break;case 12:n=!1;break;default:n=!1,l&&(l.debug+="unknown NAL "+e.type+" ")}l&&n&&l.units.push(e)})),e&&l&&(y(l,i),this.avcSample=null)},e.getLastNalUnit=function(){var t,e,n=this.avcSample;if(!n||0===n.units.length){var r=this._avcTrack.samples;n=r[r.length-1]}if(null!==(t=n)&&void 0!==t&&t.units){var i=n.units;e=i[i.length-1]}return e},e.parseAVCNALu=function(t){var e,n,r=t.byteLength,i=this._avcTrack,o=i.naluState||0,a=o,s=[],l=0,c=-1,u=0;for(-1===o&&(c=0,u=31&t[0],o=0,l=1);l<r;)if(e=t[l++],o)if(1!==o)if(e)if(1===e){if(c>=0){var h={data:t.subarray(c,l-o-1),type:u};s.push(h)}else{var d=this.getLastNalUnit();if(d&&(a&&l<=4-a&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-a)),(n=l-o-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(t.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l<r?(c=l,u=31&t[l],o=0):o=-1}else o=0;else o=3;else o=e?0:2;else o=e?0:1;if(c>=0&&o>=0){var p={data:t.subarray(c,r),type:u,state:o};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+t.byteLength);g.set(m.data,0),g.set(t,m.data.byteLength),m.data=g}}return i.naluState=o,s},e.parseAACPES=function(t){var e,n,i,o,a,s=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,m=Math.min(d.missing,p),g=p-m;d.sample.unit.set(f.subarray(0,m),g),c.samples.push(d.sample),s=d.missing}for(e=s,n=f.length;e<n-1&&!r.isHeader(f,e);e++);if(e===s||(e<n-1?(i="AAC PES did not start with ADTS header,offset:"+e,o=!1):(i="no ADTS header found in AAC PES",o=!0),u.logger.warn("parsing error:"+i),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:o,reason:i}),!o)){if(r.initTrackConfig(c,this.observer,f,e,this.audioCodec),void 0!==t.pts)a=t.pts;else{if(!d)return void u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=r.getFrameDuration(c.samplerate);a=d.sample.pts+v}for(var y=0;e<n;){if(r.isHeader(f,e)){if(e+5<n){var b=r.appendFrame(c,f,e,a,y);if(b){if(!b.missing){e+=b.length,y++;continue}this.aacOverFlow=b}}break}e++}}},e.parseMPEGPES=function(t){var e=t.data,n=e.length,r=0,o=0,a=t.pts;if(void 0!==a)for(;o<n;)if(i.isHeader(e,o)){var s=i.appendFrame(this._audioTrack,e,o,a,r);if(!s)break;o+=s.length,r++}else o++;else u.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},e.parseID3PES=function(t){void 0!==t.pts?this._id3Track.samples.push(t):u.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},t}();function p(t,e,n,r){return{key:t,frame:!1,pts:e,dts:n,units:[],debug:r,length:0}}function m(t,e){return(31&t[e+10])<<8|t[e+11]}function g(t,e,n,r){var i={audio:-1,avc:-1,id3:-1,isAAC:!0},o=e+3+((15&t[e+1])<<8|t[e+2])-4;for(e+=12+((15&t[e+10])<<8|t[e+11]);e<o;){var a=(31&t[e+1])<<8|t[e+2];switch(t[e]){case 207:if(!r){u.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=a);break;case 21:-1===i.id3&&(i.id3=a);break;case 219:if(!r){u.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=a);break;case 3:case 4:n?-1===i.audio&&(i.audio=a,i.isAAC=!1):u.logger.log("MPEG audio found, not supported in this browser");break;case 36:u.logger.warn("Unsupported HEVC stream type found")}e+=5+((15&t[e+3])<<8|t[e+4])}return i}function v(t){var e,n,r,i,o,a=0,s=t.data;if(!t||0===t.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((e=s[0])[0]<<16)+(e[1]<<8)+e[2]){if((n=(e[4]<<8)+e[5])&&n>t.size-6)return null;var c=e[7];192&c&&(i=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?i-(o=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((i-o)/9e4)+"s delta between PTS and DTS, align them"),i=o):o=i);var h=(r=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=s.length;f<p;f++){var m=(e=s[f]).byteLength;if(h){if(h>m){h-=m;continue}e=e.subarray(h),m-=h,h=0}d.set(e,a),a+=m}return n&&(n-=r+3),{data:d,pts:i,dts:o,len:n}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var n=e.samples,r=n.length;if(!r)return void e.dropped++;var i=n[r-1];t.pts=i.pts,t.dts=i.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var n=t.length;if(n>0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.pts<t[r].pts){t.splice(r,0,e);break}}else t.push(e)}function w(t){for(var e=t.byteLength,n=[],r=1;r<e-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return t;var i=e-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=t[a];return o}f.minProbeByteLength=188,e.default=f},"./src/errors.ts":
/*!***********************!*\
!*** ./src/errors.ts ***!
\***********************/
/*! exports provided: ErrorTypes, ErrorDetails */function(t,e,n){"use strict";var r,i;n.r(e),n.d(e,"ErrorTypes",(function(){return r})),n.d(e,"ErrorDetails",(function(){return i})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(r||(r={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown"}(i||(i={}))},"./src/events.ts":
/*!***********************!*\
!*** ./src/events.ts ***!
\***********************/
/*! exports provided: Events */function(t,e,n){"use strict";var r;n.r(e),n.d(e,"Events",(function(){return r})),function(t){t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},"./src/hls.ts":
/*!********************!*\
!*** ./src/hls.ts ***!
\********************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=n(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),o=n(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),a=n(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),s=n(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=n(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=n(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),h=n(/*! ./is-supported */"./src/is-supported.ts"),d=n(/*! ./utils/logger */"./src/utils/logger.ts"),f=n(/*! ./config */"./src/config.ts"),p=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),m=n(/*! ./events */"./src/events.ts"),g=n(/*! ./errors */"./src/errors.ts");function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var y=function(){function t(e){void 0===e&&(e={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=Object(f.mergeConfig)(t.DefaultConfig,e);this.userConfig=e,Object(d.enableLogs)(n.debug),this._autoLevelCapping=-1,n.progressive&&Object(f.enableStreamingMode)(n);var r=n.abrController,h=n.bufferController,m=n.capLevelController,g=n.fpsController,v=this.abrController=new r(this),y=this.bufferController=new h(this),b=this.capLevelController=new m(this),w=new g(this),x=new i.default(this),S=new o.default(this),E=new a.default(this),C=this.levelController=new l.default(this),k=new c.FragmentTracker(this),_=this.streamController=new u.default(this,k);b.setStreamController(_),w.setStreamController(_);var T=[C,_];this.networkControllers=T;var O=[x,S,v,y,b,w,E,k];this.audioTrackController=this.createController(n.audioTrackController,null,T),this.createController(n.audioStreamController,k,T),this.subtitleTrackController=this.createController(n.subtitleTrackController,null,T),this.createController(n.subtitleStreamController,k,T),this.createController(n.timelineController,null,O),this.emeController=this.createController(n.emeController,null,O),this.cmcdController=this.createController(n.cmcdController,null,O),this.latencyController=this.createController(s.default,null,O),this.coreComponents=O}t.isSupported=function(){return Object(h.isSupported)()};var e,n,y,b=t.prototype;return b.createController=function(t,e,n){if(t){var r=e?new t(this,e):new t(this);return n&&n.push(r),r}return null},b.on=function(t,e,n){void 0===n&&(n=this),this._emitter.on(t,e,n)},b.once=function(t,e,n){void 0===n&&(n=this),this._emitter.once(t,e,n)},b.removeAllListeners=function(t){this._emitter.removeAllListeners(t)},b.off=function(t,e,n,r){void 0===n&&(n=this),this._emitter.off(t,e,n,r)},b.listeners=function(t){return this._emitter.listeners(t)},b.emit=function(t,e,n){return this._emitter.emit(t,e,n)},b.trigger=function(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(e){d.logger.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.trigger(m.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:t,error:e})}return!1},b.listenerCount=function(t){return this._emitter.listenerCount(t)},b.destroy=function(){d.logger.log("destroy"),this.trigger(m.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(t){return t.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(t){return t.destroy()})),this.coreComponents.length=0},b.attachMedia=function(t){d.logger.log("attachMedia"),this._media=t,this.trigger(m.Events.MEDIA_ATTACHING,{media:t})},b.detachMedia=function(){d.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(t){this.stopLoad();var e=this.media,n=this.url,i=this.url=r.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});d.logger.log("loadSource:"+i),e&&n&&n!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(m.Events.MANIFEST_LOADING,{url:t})},b.startLoad=function(t){void 0===t&&(t=-1),d.logger.log("startLoad("+t+")"),this.networkControllers.forEach((function(e){e.startLoad(t)}))},b.stopLoad=function(){d.logger.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},b.swapAudioCodec=function(){d.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){d.logger.log("recoverMediaError");var t=this._media;this.detachMedia(),t&&this.attachMedia(t)},b.removeLevel=function(t,e){void 0===e&&(e=0),this.levelController.removeLevel(t,e)},e=t,y=[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return m.Events}},{key:"ErrorTypes",get:function(){return g.ErrorTypes}},{key:"ErrorDetails",get:function(){return g.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:f.hlsDefaultConfig},set:function(e){t.defaultConfig=e}}],(n=[{key:"levels",get:function(){var t=this.levelController.levels;return t||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){d.logger.log("set currentLevel:"+t),this.loadLevel=t,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){d.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){d.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){d.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){d.logger.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(t){var e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){this._autoLevelCapping!==t&&(d.logger.log("set autoLevelCapping:"+t),this._autoLevelCapping=t)}},{key:"bandwidthEstimate",get:function(){var t=this.abrController.bwEstimator;return t?t.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var t=this.levels,e=this.config.minAutoBitrate;if(!t)return 0;for(var n=t.length,r=0;r<n;r++)if(t[r].maxBitrate>e)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&v(e.prototype,n),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts":
/*!*****************************!*\
!*** ./src/is-supported.ts ***!
\*****************************/
/*! exports provided: isSupported, changeTypeSupported */function(t,e,n){"use strict";n.r(e),n.d(e,"isSupported",(function(){return o})),n.d(e,"changeTypeSupported",(function(){return a}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var t=Object(r.getMediaSource)();if(!t)return!1;var e=i(),n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!n&&!!o}function a(){var t,e=i();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts":
/*!***************************************!*\
!*** ./src/loader/fragment-loader.ts ***!
\***************************************/
/*! exports provided: default, LoadError */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h})),n.d(e,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,c(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,t)})(t)}function a(t,e,n){return(a=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=Math.pow(2,17),h=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var n=this,r=t.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=t.loader=a?new a(o):new s(o),h=d(t),p={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,i,o,a){n.resetLoader(t,c),r({frag:t,part:null,payload:e.data,networkDetails:a})},onError:function(e,r,o){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:o}))},onAbort:function(e,r,o){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:o}))},onTimeout:function(e,r,o){n.resetLoader(t,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:o}))},onProgress:function(n,r,i,o){e&&e({frag:t,part:null,payload:i,networkDetails:o})}})}))},e.loadPart=function(t,e,n){var r=this;this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=t.loader=a?new a(o):new s(o),p=d(t,e),m={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,m,{onSuccess:function(i,o,a,s){r.resetLoader(t,h),r.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,o,a){r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:n,networkDetails:a}))},onAbort:function(n,o,a){t.stats.aborted=e.stats.aborted,r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:a}))},onTimeout:function(n,o,a){r.resetLoader(t,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:a}))}})}))},e.updateStatsFromPart=function(t,e){var n=t.stats,r=e.stats,i=r.total;if(n.loaded+=r.loaded,i){var o=Math.round(t.duration/e.duration),a=Math.min(Math.round(n.loaded/i),o),s=(o-a)*Math.round(n.loaded/a);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function d(t,e){void 0===e&&(e=null);var n=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},o=n.byteRangeStartOffset,a=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(o)&&Object(r.isFiniteNumber)(a)&&(i.rangeStart=o,i.rangeEnd=a),i}var f=function(t){var e,n;function r(e){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(n=t.call.apply(t,[this].concat(i))||this).data=void 0,n.data=e,n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,l(e,n),r}(o(Error))},"./src/loader/fragment.ts":
/*!********************************!*\
!*** ./src/loader/fragment.ts ***!
\********************************/
/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(t,e,n){"use strict";n.r(e),n.d(e,"ElementaryStreamTypes",(function(){return r})),n.d(e,"BaseSegment",(function(){return f})),n.d(e,"Fragment",(function(){return p})),n.d(e,"Part",(function(){return m}));var r,i=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),o=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ./load-stats */"./src/loader/load-stats.ts");function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}!function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"}(r||(r={}));var f=function(){function t(t){var e;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((e={})[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null,e),this.baseurl=t}return t.prototype.setByteRange=function(t,e){var n=t.split("@",2),r=[];1===n.length?r[0]=e?e.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},d(t,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(t){this._url=t}}]),t}(),p=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkey=void 0,r.type=void 0,r.loader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new l.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.type=e,r}c(e,t);var n=e.prototype;return n.createInitializationVector=function(t){for(var e=new Uint8Array(16),n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e},n.setDecryptDataFromLevelKey=function(t,e){var n=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((n=s.LevelKey.fromURI(t.uri)).method=t.method,n.iv=this.createInitializationVector(e),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(t,e,n,r,i,o){void 0===o&&(o=!1);var a=this.elementaryStreams,s=a[t];s?(s.startPTS=Math.min(s.startPTS,e),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):a[t]={startPTS:e,endPTS:n,startDTS:r,endDTS:i,partial:o}},n.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&a.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var t=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),m=function(t){function e(e,n,r,i,o){var a;(a=t.call(this,r)||this).fragOffset=0,a.duration=0,a.gap=!1,a.independent=!1,a.relurl=void 0,a.fragment=void 0,a.index=void 0,a.stats=new l.LoadStats,a.duration=e.decimalFloatingPoint("DURATION"),a.gap=e.bool("GAP"),a.independent=e.bool("INDEPENDENT"),a.relurl=e.enumeratedString("URI"),a.fragment=n,a.index=i;var s=e.enumeratedString("BYTERANGE");return s&&a.setByteRange(s,o),o&&(a.fragOffset=o.fragOffset+o.duration),a}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts":
/*!**********************************!*\
!*** ./src/loader/key-loader.ts ***!
\**********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return a}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var n=e.frag,i=n.type,a=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(a&&(o.logger.warn("abort previous key loader for type:"+i),a.abort()),!s)return void o.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else o.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):o.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var n=e.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})},e.loadtimeout=function(t,e){var n=e.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},t}()},"./src/loader/level-details.ts":
/*!*************************************!*\
!*** ./src/loader/level-details.ts ***!
\*************************************/
/*! exports provided: LevelDetails */function(t,e,n){"use strict";n.r(e),n.d(e,"LevelDetails",(function(){return o}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(t){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=t}var e,n,o;return t.prototype.reloaded=function(t){if(!t)return this.advanced=!0,void(this.updated=!0);var e=this.lastPartSn-t.lastPartSn,n=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!n||!!e,this.advanced=this.endSN>t.endSN||e>0||0===e&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(e.prototype,n),o&&i(e,o),t}()},"./src/loader/level-key.ts":
/*!*********************************!*\
!*** ./src/loader/level-key.ts ***!
\*********************************/
/*! exports provided: LevelKey */function(t,e,n){"use strict";n.r(e),n.d(e,"LevelKey",(function(){return o}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(t,e){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=e?Object(r.buildAbsoluteURL)(t,e,{alwaysNormalize:!0}):t}var e,n,o;return t.fromURL=function(e,n){return new t(e,n)},t.fromURI=function(e){return new t(e)},e=t,(n=[{key:"uri",get:function(){return this._uri}}])&&i(e.prototype,n),o&&i(e,o),t}()},"./src/loader/load-stats.ts":
/*!**********************************!*\
!*** ./src/loader/load-stats.ts ***!
\**********************************/
/*! exports provided: LoadStats */function(t,e,n){"use strict";n.r(e),n.d(e,"LoadStats",(function(){return r}));var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":
/*!***********************************!*\
!*** ./src/loader/m3u8-parser.ts ***!
\***********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=n(/*! ./fragment */"./src/loader/fragment.ts"),a=n(/*! ./level-details */"./src/loader/level-details.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts"),u=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),m=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){}return t.findGroup=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.id===e)return r}},t.convertAVC1ToAVCOTI=function(t){var e=t.split(".");if(e.length>2){var n=e.shift()+".";return n+=parseInt(e.shift()).toString(16),n+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return i.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,n){var r,i=[],o={},a=!1;for(h.lastIndex=0;null!=(r=h.exec(e));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:t.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(a=!0,o[d["DATA-ID"]]=d)}return{levels:i,sessionData:a?o:null}},t.parseMasterPlaylistMedia=function(e,n,r,i){var o;void 0===i&&(i=[]);var a=[],s=0;for(d.lastIndex=0;null!==(o=d.exec(e));){var c=new l.AttrList(o[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,n):""};if(i.length){var h=t.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}a.push(u)}}return a},t.parseLevelPlaylist=function(t,e,n,u,h){var d,g,v,y=new a.LevelDetails(e),w=y.fragments,x=null,S=0,E=0,C=0,k=0,_=null,T=new o.Fragment(u,e),O=-1,A=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){A&&(A=!1,(T=new o.Fragment(u,e)).start=C,T.sn=S,T.cc=k,T.level=n,x&&(T.initSegment=x,T.rawProgramDateTime=x.rawProgramDateTime));var L=d[1];if(L){T.duration=parseFloat(L);var D=(" "+d[2]).slice(1);T.title=D||null,T.tagList.push(D?["INF",L,D]:["INF",L])}else if(d[3])Object(r.isFiniteNumber)(T.duration)&&(T.start=C,v&&(T.levelkey=v),T.sn=S,T.level=n,T.cc=k,T.urlId=h,w.push(T),T.relurl=(" "+d[3]).slice(1),b(T,_),_=T,C+=T.duration,S++,E=0,A=!0);else if(d[4]){var I=(" "+d[4]).slice(1);_?T.setByteRange(I,_):T.setByteRange(I)}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),-1===O&&(O=w.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g<d.length&&void 0===d[g];g++);var R=(" "+d[g]).slice(1),M=(" "+d[g+1]).slice(1),N=d[g+2]?(" "+d[g+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":y.type=M.toUpperCase();break;case"MEDIA-SEQUENCE":S=y.startSN=parseInt(M);break;case"SKIP":var j=new l.AttrList(M),P=j.decimalInteger("SKIPPED-SEGMENTS");if(Object(r.isFiniteNumber)(P)){y.skippedSegments=P;for(var F=P;F--;)w.unshift(null);S+=P}var B=j.enumeratedString("RECENTLY-REMOVED-DATERANGES");B&&(y.recentlyRemovedDateranges=B.split("\t"));break;case"TARGETDURATION":y.targetduration=parseFloat(M);break;case"VERSION":y.version=parseInt(M);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(M||N)&&T.tagList.push(N?[M,N]:[M]);break;case"DIS":k++;case"GAP":T.tagList.push([R]);break;case"BITRATE":T.tagList.push([R,M]);break;case"DISCONTINUITY-SEQ":k=parseInt(M);break;case"KEY":var U,H=new l.AttrList(M),z=H.enumeratedString("METHOD"),G=H.URI,V=H.hexadecimalInteger("IV"),W=H.enumeratedString("KEYFORMATVERSIONS"),K=H.enumeratedString("KEYID"),q=null!=(U=H.enumeratedString("KEYFORMAT"))?U:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(q)>-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;z&&(v=s.LevelKey.fromURL(e,G),G&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(v.method=z,v.keyFormat=q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=V));break;case"START":var X=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(X)&&(y.startTimeOffset=X);break;case"MAP":var Y=new l.AttrList(M);T.relurl=Y.URI,Y.BYTERANGE&&T.setByteRange(Y.BYTERANGE),T.level=n,T.sn="initSegment",v&&(T.levelkey=v),T.initSegment=null,x=T,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var J=new l.AttrList(M);y.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=y.partList;Z||(Z=y.partList=[]);var Q=E>0?Z[Z.length-1]:void 0,tt=E++,et=new o.Part(new l.AttrList(M),T,e,tt,Q);Z.push(et),T.duration+=et.duration;break;case"PRELOAD-HINT":var nt=new l.AttrList(M);y.preloadHint=nt;break;case"RENDITION-REPORT":var rt=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(rt);break;default:c.logger.warn("line parsed but not handled: "+d)}}}_&&!_.relurl?(w.pop(),C-=_.duration,y.partList&&(y.fragmentHint=_)):y.partList&&(b(T,_),T.cc=k,y.fragmentHint=T);var it=w.length,ot=w[0],at=w[it-1];if((C+=y.skippedSegments*y.targetduration)>0&&it&&at){y.averagetargetduration=C/it;var st=at.sn;y.endSN="initSegment"!==st?st:0,ot&&(y.startCC=ot.cc,ot.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,m.test(null!=(n=null===(r=i.parseURL(e))||void 0===r?void 0:r.path)?n:""));var e,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new o.Fragment(u,e)).relurl=at.relurl,T.level=n,T.sn="initSegment",ot.initSegment=T,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(C+=y.fragmentHint.duration),y.totalduration=C,y.endCC=k,O>0&&function(t,e){for(var n=t[e],r=e;r--;){var i=t[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(w,O),y},t}();function v(t,e){["video","audio","text"].forEach((function(n){var r=t.filter((function(t){return Object(u.isCodecType)(t,n)}));if(r.length){var i=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[n+"Codec"]=i.length>0?i[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,n){var r=e[n];r&&(t[n]=r)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(r.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":
/*!***************************************!*\
!*** ./src/loader/playlist-loader.ts ***!
\***************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var n=t.url;return void 0!==n&&0!==n.indexOf("data:")||(n=e.url),n}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,n=e.pLoader,r=e.loader,i=new(n||r)(e);return t.loader=i,this.loaders[t.type]=i,i},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var n=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var n=e.id,r=e.level,i=e.url,o=e.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:o})},e.onAudioTrackLoading=function(t,e){var n=e.id,r=e.groupId,i=e.url,o=e.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:o})},e.onSubtitleTrackLoading=function(t,e){var n=e.id,r=e.groupId,i=e.url,o=e.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:o})},e.load=function(t){var e,n,r,i,o,s,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void a.logger.trace("[playlist-loader]: playlist request ongoing");a.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,o=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,o=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?s=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?s=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(s=this.hls.subtitleTracks[t.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:o,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,m)},e.loadsuccess=function(t,e,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(t,n),void this.handlePlaylistLoaded(t,e,n,r);this.resetInternalLoader(n.type);var i=t.data;0===i.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,n,r):this.handleMasterPlaylist(t,e,n,r)):this.handleManifestParsingError(t,n,"no EXTM3U delimiter",r)},e.loaderror=function(t,e,n){void 0===n&&(n=null),this.handleNetworkError(e,n,!1,t)},e.loadtimeout=function(t,e,n){void 0===n&&(n=null),this.handleNetworkError(e,n,!0)},e.handleMasterPlaylist=function(t,e,n,r){var o=this.hls,s=t.data,c=h(t,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var m=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),g=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(a.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),o.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(t,n,"no level found in manifest",r)},e.handleTrackOrLevelPlaylist=function(t,e,n,a){var s=this.hls,d=n.id,f=n.level,p=n.type,m=h(t,n),g=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:g,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(t.data,m,v,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var w={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[w],audioTracks:[],url:m,stats:e,networkDetails:a,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var x,S=null===(x=b.fragments[0].initSegment)||void 0===x?void 0:x.url;this.load({url:S,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=b,this.handlePlaylistLoaded(t,e,n,a)}else s.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},e.handleSidxRequest=function(t,e){var n=Object(s.parseSegmentIndex)(new Uint8Array(t.data));if(n){var r=n.references,i=e.levelDetails;r.forEach((function(t,e){var r=t.info,o=i.fragments[e];0===o.byteRange.length&&o.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),o.initSegment&&o.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,n,r){this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:n,response:t,context:e,networkDetails:r})},e.handleNetworkError=function(t,e,n,r){void 0===n&&(n=!1),a.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var s=o.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:s=n?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:o.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,n,r){var o=n.type,a=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),o){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:a||0,id:s||0,stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(t,n,"invalid target duration",r)},t}();e.default=d},"./src/polyfills/number.ts":
/*!*********************************!*\
!*** ./src/polyfills/number.ts ***!
\*********************************/
/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,n){"use strict";n.r(e),n.d(e,"isFiniteNumber",(function(){return r})),n.d(e,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":
/*!*********************************!*\
!*** ./src/remux/aac-helper.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},t}();e.default=r},"./src/remux/mp4-generator.ts":
/*!************************************!*\
!*** ./src/remux/mp4-generator.ts ***!
\************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=Math.pow(2,32)-1,i=function(){function t(){}return t.init=function(){var e;for(e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=o,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,l,a,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))},t.box=function(t){for(var e=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=r.length,a=o;o--;)e+=r[o].byteLength;var s=new Uint8Array(e);for(s[0]=e>>24&255,s[1]=e>>16&255,s[2]=e>>8&255,s[3]=255&e,s.set(t,4),o=0,e=8;o<a;o++)s.set(r[o],e),e+=r[o].byteLength;return s},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,n){n*=e;var i=Math.floor(n/(r+1)),o=Math.floor(n%(r+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))},t.moov=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,n){n*=e;var i=Math.floor(n/(r+1)),o=Math.floor(n%(r+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,a)},t.sdtp=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,o[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return t.box(t.types.sdtp,o)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var n,r,i,o=[],a=[];for(n=0;n<e.sps.length;n++)i=(r=e.sps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<e.pps.length;n++)i=(r=e.pps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=t.box(t.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|e.sps.length].concat(o).concat([e.pps.length]).concat(a))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var n=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var n=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var n=e.id,i=e.duration*e.timescale,o=e.width,a=e.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>8&255,255&o,0,0,a>>8&255,255&a,0,0]))},t.traf=function(e,n){var i=t.sdtp(e),o=e.id,a=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,n){var r,i,o,a,s,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<u;r++)o=(i=c[r]).duration,a=i.size,s=i.flags,l=i.cts,d.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var n=t.moov(e),r=new Uint8Array(t.FTYP.byteLength+n.byteLength);return r.set(t.FTYP),r.set(n,t.FTYP.byteLength),r},t}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,e.default=i},"./src/remux/mp4-remuxer.ts":
/*!**********************************!*\
!*** ./src/remux/mp4-remuxer.ts ***!
\**********************************/
/*! exports provided: default, normalizePts */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return m})),n.d(e,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),o=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),a=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var d=null,f=null,p=!1,m=function(){function t(t,e,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=t,this.config=e,this.typeSupported=n,this.ISGenerated=!1,null===d){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);d=i?parseInt(i[1]):0}if(null===f){var o=navigator.userAgent.match(/Safari\/(\d+)/i);f=o?parseInt(o[1]):0}p=!!d&&d<75||!!f&&f<600}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t},e.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},e.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,n=t.reduce((function(t,n){var r=n.pts-t;return r<-4294967296?(e=!0,g(t,n.pts)):r>0?t:n.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),n},e.remux=function(t,e,n,r,i,o,a,s){var u,h,d,f,p,m,v=i,y=i,b=t.pid>-1,w=e.pid>-1,x=e.samples.length,S=t.samples.length>0,E=x>1;if((!b||S)&&(!w||E)||this.ISGenerated||a){this.ISGenerated||(d=this.generateIS(t,e,i));var C=this.isVideoContiguous,k=-1;if(E&&(k=function(t){for(var e=0;e<t.length;e++)if(t[e].key)return e;return-1}(e.samples),!C&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,k>0){l.logger.warn("[mp4-remuxer]: Dropped "+k+" out of "+x+" video samples due to a missing keyframe");var _=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(k),e.dropped+=k,y+=(e.samples[0].pts-_)/(e.timescale||9e4)}else-1===k&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+x+" video samples"),m=!1);if(this.ISGenerated){if(S&&E){var T=this.getVideoStartPts(e.samples),O=(g(t.samples[0].pts,T)-T)/e.inputTimeScale;v+=Math.max(0,O),y+=Math.max(0,-O)}if(S){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,i)),h=this.remuxAudio(t,v,this.isAudioContiguous,o,w||E||s===c.PlaylistLevelType.AUDIO?y:void 0),E){var A=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,i)),u=this.remuxVideo(e,y,C,A)}}else E&&(u=this.remuxVideo(e,y,C,0));u&&(u.firstKeyFrame=k,u.independent=-1!==k)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:m,text:f,id3:p}},e.generateIS=function(t,e,n){var i,a,s,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=a=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):o.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(s=t.inputTimeScale,i=a=l[0].pts-Math.round(s*n))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:o.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){s=e.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);a=Math.min(a,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=a),{tracks:h,initPTS:i,timescale:s}},e.remuxVideo=function(t,e,n,r){var i,c,f,m=t.inputTimeScale,y=t.samples,b=[],w=y.length,x=this._initPTS,S=this.nextAvcDts,E=8,C=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,_=0,T=!1;n&&null!==S||(S=e*m-(y[0].pts-g(y[0].dts,y[0].pts)));for(var O=0;O<w;O++){var A=y[O];A.pts=g(A.pts-x,S),A.dts=g(A.dts-x,S),A.dts>A.pts&&(_=Math.max(Math.min(_,A.pts-A.dts),-18e3)),A.dts<y[O>0?O-1:O].dts&&(T=!0)}T&&y.sort((function(t,e){var n=t.dts-e.dts,r=t.pts-e.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var L=Math.round((f-c)/(w-1));if(_<0){if(_<-2*L){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-L,!0)+" ms");for(var D=_,I=0;I<w;I++)y[I].dts=D=Math.max(D,y[I].pts-L),y[I].pts=Math.max(D,y[I].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(_,!0)+" ms to overcome this issue");for(var R=0;R<w;R++)y[R].dts=y[R].dts+_}c=y[0].dts}if(n){var M=c-S,N=M>L;if(N||M<-1){N?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=S;var j=y[0].pts-M;y[0].dts=c,y[0].pts=j,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(j,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,F=0,B=0;B<w;B++){for(var U=y[B],H=U.units,z=H.length,G=0,V=0;V<z;V++)G+=H[V].data.length;F+=G,P+=z,U.length=G,U.dts=Math.max(U.dts,c),U.pts=Math.max(U.pts,U.dts,0),C=Math.min(U.pts,C),k=Math.max(U.pts,k)}f=y[w-1].dts;var W,K=F+4*P+8;try{W=new Uint8Array(K)}catch(t){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating video mdat "+K})}var q=new DataView(W.buffer);q.setUint32(0,K),W.set(o.default.types.mdat,4);for(var X=0;X<w;X++){for(var Y=y[X],$=Y.units,J=0,Z=0,Q=$.length;Z<Q;Z++){var tt=$[Z],et=tt.data,nt=tt.data.byteLength;q.setUint32(E,nt),E+=4,W.set(et,E),E+=nt,J+=4+nt}if(X<w-1)i=y[X+1].dts-Y.dts;else{var rt=this.config,it=Y.dts-y[X>0?X-1:X].dts;if(rt.stretchShortVideoTrack&&null!==this.nextAudioPts){var ot=Math.floor(rt.maxBufferHole*m),at=(r?C+r*m:this.nextAudioPts)-Y.pts;at>ot?((i=at-it)<0&&(i=it),l.logger.log("[mp4-remuxer]: It is approximately "+at/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=it}else i=it}var st=Math.round(Y.pts-Y.dts);b.push(new v(Y.key,i,J,st))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=S=f+i,this.isVideoContiguous=!0;var ct={data1:o.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:W,startPTS:C/m,endPTS:(k+i)/m,startDTS:c/m,endDTS:S/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(W.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,n,r,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,m=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],w=t.samples,x=y?0:8,S=this.nextAudioPts||-1,E=e*u;if(this.isAudioContiguous=n=n||w.length&&S>0&&(r&&Math.abs(E-S)<9e3||Math.abs(g(w[0].pts-m,E)-S)<20*p),w.forEach((function(t){t.pts=g(t.pts-m,E)})),!n||S<0){if(!(w=w.filter((function(t){return t.pts>=0}))).length)return;S=0===c?0:r?Math.max(0,E):w[0].pts}if(t.isAAC)for(var C=void 0!==c,k=this.config.maxAudioFramesDrift,_=0,T=S;_<w.length;_++){var O=w[_],A=O.pts,L=A-T,D=Math.abs(1e3*L/u);if(L<=-k*p&&C)0===_&&(l.logger.warn("Audio frame @ "+(A/u).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*L/u)+" ms."),this.nextAudioPts=S=T=A);else if(L>=k*p&&D<1e4&&C){var I=Math.round(L/p);(T=A-I*p)<0&&(I--,T+=p),0===_&&(this.nextAudioPts=S=T),l.logger.warn("[mp4-remuxer]: Injecting "+I+" audio frame @ "+(T/u).toFixed(3)+"s due to "+Math.round(1e3*L/u)+" ms gap.");for(var R=0;R<I;R++){var M=Math.max(T,0),N=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);N||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),N=O.unit.subarray()),w.splice(_,0,{unit:N,pts:M}),T+=p,_++}}O.pts=T,T+=p}for(var j,P=null,F=null,B=0,U=w.length;U--;)B+=w[U].unit.byteLength;for(var H=0,z=w.length;H<z;H++){var G=w[H],V=G.unit,W=G.pts;if(null!==F)b[H-1].duration=Math.round((W-F)/d);else{if(n&&t.isAAC&&(W=S),P=W,!(B>0))return;B+=x;try{j=new Uint8Array(B)}catch(t){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}y||(new DataView(j.buffer).setUint32(0,B),j.set(o.default.types.mdat,4))}j.set(V,x);var K=V.byteLength;x+=K,b.push(new v(!0,f,K,0)),F=W}var q=b.length;if(q){var X=b[b.length-1];this.nextAudioPts=S=F+d*X.duration;var Y=y?new Uint8Array(0):o.default.moof(t.sequenceNumber++,P/d,h({},t,{samples:b}));t.samples=[];var $=P/u,J=S/u,Z={data1:Y,data2:j,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(j.length,"MDAT length must not be zero"),Z}},e.remuxEmptyAudio=function(t,e,n,r){var o=t.inputTimeScale,a=o/(t.samplerate?t.samplerate:o),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*o)+this._initDTS,u=r.endDTS*o+this._initDTS,h=1024*a,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m<d;m++){var g=c+m*h;p.push({unit:f,pts:g,dts:g})}return t.samples=p,this.remuxAudio(t,e,n,!1)}l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e.remuxID3=function(t,e){var n=t.samples.length;if(n){for(var r=t.inputTimeScale,i=this._initPTS,o=this._initDTS,a=0;a<n;a++){var s=t.samples[a];s.pts=g(s.pts-i,e*r)/r,s.dts=g(s.dts-o,e*r)/r}var l=t.samples;return t.samples=[],{samples:l}}},e.remuxText=function(t,e){var n=t.samples.length;if(n){for(var r=t.inputTimeScale,i=this._initPTS,o=0;o<n;o++){var a=t.samples[o];a.pts=g(a.pts-i,e*r)/r}t.samples.sort((function(t,e){return t.pts-e.pts}));var s=t.samples;return t.samples=[],{samples:s}}},t}();function g(t,e){var n;if(null===e)return t;for(n=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=n;return t}var v=function(t,e,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=n,this.cts=r,this.flags=new y(t)},y=function(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1}},"./src/remux/passthrough-remuxer.ts":
/*!******************************************!*\
!*** ./src/remux/passthrough-remuxer.ts ***!
\******************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),o=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,n){this.audioCodec=e,this.videoCodec=n,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,n=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(t);e||(e=c(r.audio,o.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,o.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:e+","+n,initSegment:t,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:t,id:"main"}:a.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},e.remux=function(t,e,n,o,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:o,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return a.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var m=Object(i.getDuration)(d,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,d,c),m>0?this.lastEndDTS=v:(a.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,w="";y&&(w+="audio"),b&&(w+="video");var x={data1:d,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:w,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===x.type?x:void 0,h.video="audio"!==x.type?x:void 0,h.text=o,h.id3=n,h.initSegment=f,h},t}(),l=function(t,e,n){return Object(i.getStartDTS)(t,e)-n};function c(t,e){var n=null==t?void 0:t.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||e===o.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=s},"./src/task-loop.ts":
/*!**************************!*\
!*** ./src/task-loop.ts ***!
\**************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts":
/*!***************************!*\
!*** ./src/types/cmcd.ts ***!
\***************************/
/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,n){"use strict";n.r(e),n.d(e,"CMCDVersion",(function(){return a})),n.d(e,"CMCDObjectType",(function(){return r})),n.d(e,"CMCDStreamingFormat",(function(){return i})),n.d(e,"CMCDStreamType",(function(){return o}));var r,i,o,a=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(r||(r={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(i||(i={})),function(t){t.VOD="v",t.LIVE="l"}(o||(o={}))},"./src/types/level.ts":
/*!****************************!*\
!*** ./src/types/level.ts ***!
\****************************/
/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i;function o(t,e){var n=t.canSkipUntil,r=t.canSkipDateRanges,o=t.endSN;return n&&(void 0!==e?e-o:0)<n?r?i.v2:i.Yes:i.No}n.r(e),n.d(e,"HlsSkip",(function(){return i})),n.d(e,"getSkipValue",(function(){return o})),n.d(e,"HlsUrlParameters",(function(){return a})),n.d(e,"Level",(function(){return s})),function(t){t.No="",t.Yes="YES",t.v2="v2"}(i||(i={}));var a=function(){function t(t,e,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=e,this.skip=n}return t.prototype.addDirectives=function(t){var e=new self.URL(t);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.toString()},t}(),s=function(){function t(t){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[t.url],this.attrs=t.attrs,this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter((function(t){return t})).join(",").replace(/\.[^.,]+/g,"")}var e,n,i;return e=t,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(t){var e=t%this.url.length;this._urlId!==e&&(this.details=void 0,this._urlId=e)}}])&&r(e.prototype,n),i&&r(e,i),t}()},"./src/types/loader.ts":
/*!*****************************!*\
!*** ./src/types/loader.ts ***!
\*****************************/
/*! exports provided: PlaylistContextType, PlaylistLevelType */function(t,e,n){"use strict";var r,i;n.r(e),n.d(e,"PlaylistContextType",(function(){return r})),n.d(e,"PlaylistLevelType",(function(){return i})),function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(i||(i={}))},"./src/types/transmuxer.ts":
/*!*********************************!*\
!*** ./src/types/transmuxer.ts ***!
\*********************************/
/*! exports provided: ChunkMetadata */function(t,e,n){"use strict";n.r(e),n.d(e,"ChunkMetadata",(function(){return r}));var r=function(t,e,n,r,i,o){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===o&&(o=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=t,this.sn=e,this.id=n,this.size=r,this.part=i,this.partial=o}},"./src/utils/attr-list.ts":
/*!********************************!*\
!*** ./src/utils/attr-list.ts ***!
\********************************/
/*! exports provided: AttrList */function(t,e,n){"use strict";n.r(e),n.d(e,"AttrList",(function(){return o}));var r=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){for(var n in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(n)&&(this[n]=e[n])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;r<e.length/2;r++)n[r]=parseInt(e.slice(2*r,2*r+2),16);return n}return null},e.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var n=this[t];return n?parseFloat(n):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=r.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,n={};for(i.lastIndex=0;null!==(e=i.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n},t}()},"./src/utils/binary-search.ts":
/*!************************************!*\
!*** ./src/utils/binary-search.ts ***!
\************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default={search:function(t,e){for(var n=0,r=t.length-1,i=null,o=null;n<=r;){var a=e(o=t[i=(n+r)/2|0]);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}}},"./src/utils/buffer-helper.ts":
/*!************************************!*\
!*** ./src/utils/buffer-helper.ts ***!
\************************************/
/*! exports provided: BufferHelper */function(t,e,n){"use strict";n.r(e),n.d(e,"BufferHelper",(function(){return o}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},o=function(){function t(){}return t.isBuffered=function(e,n){try{if(e)for(var r=t.getBuffered(e),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(e,n,r){try{if(e){var i,o=t.getBuffered(e),a=[];for(i=0;i<o.length;i++)a.push({start:o.start(i),end:o.end(i)});return this.bufferedInfo(a,n,r)}}catch(t){}return{len:0,start:n,end:n,nextStart:void 0}},t.bufferedInfo=function(t,e,n){e=Math.max(0,e),t.sort((function(t,e){var n=t.start-e.start;return n||e.end-t.end}));var r=[];if(n)for(var i=0;i<t.length;i++){var o=r.length;if(o){var a=r[o-1].end;t[i].start-a<n?t[i].end>a&&(r[o-1].end=t[i].end):r.push(t[i])}else r.push(t[i])}else r=t;for(var s,l=0,c=e,u=e,h=0;h<r.length;h++){var d=r[h].start,f=r[h].end;if(e+n>=d&&e<f)c=d,l=(u=f)-e;else if(e+n<d){s=d;break}}return{len:l,start:c||0,end:u||0,nextStart:s}},t.getBuffered=function(t){try{return t.buffered}catch(t){return r.logger.log("failed to get media.buffered",t),i}},t}()},"./src/utils/cea-608-parser.ts":
/*!*************************************!*\
!*** ./src/utils/cea-608-parser.ts ***!
\*************************************/
/*! exports provided: Row, CaptionScreen, default */function(t,e,n){"use strict";n.r(e),n.d(e,"Row",(function(){return g})),n.d(e,"CaptionScreen",(function(){return v}));var r,i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},a=function(t){var e=t;return o.hasOwnProperty(t)&&(e=o[t]),String.fromCharCode(e)},s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(t){t[t.ERROR=0]="ERROR",t[t.TEXT=1]="TEXT",t[t.WARNING=2]="WARNING",t[t.INFO=2]="INFO",t[t.DEBUG=3]="DEBUG",t[t.DATA=3]="DATA"}(r||(r={}));var d=function(){function t(){this.time=null,this.verboseLevel=r.ERROR}return t.prototype.log=function(t,e){this.verboseLevel>=t&&i.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},p=function(){function t(t,e,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=t||"white",this.underline=e||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var e=t.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],n=0;n<e.length;n++){var r=e[n];t.hasOwnProperty(r)&&(this[r]=t[r])}},e.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},e.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),m=function(){function t(t,e,n,r,i,o){this.uchar=void 0,this.penState=void 0,this.uchar=t||" ",this.penState=new p(e,n,r,i,o)}var e=t.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},e.setPenState=function(t){this.penState.copy(t)},e.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},e.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},e.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),g=function(){function t(t){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var e=0;e<100;e++)this.chars.push(new m);this.logger=t,this.pos=0,this.currPenState=new p}var e=t.prototype;return e.equals=function(t){for(var e=!0,n=0;n<100;n++)if(!this.chars[n].equals(t.chars[n])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<100;e++)this.chars[e].copy(t.chars[e])},e.isEmpty=function(){for(var t=!0,e=0;e<100;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},e.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(r.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n<e+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(e)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(t){t>=144&&this.backSpace();var e=a(t);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new g(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,n=0;n<15;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(r.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(r.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var n=0;n<15;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){var a=o.rows[i].cueStartTime,s=this.logger.time;if(a&&null!==s&&a<s)for(var l=0;l<this.nrRollUpRows;l++)this.rows[e-this.nrRollUpRows+l+1].copy(o.rows[i+l])}}this.currRow=e;var c=this.rows[this.currRow];if(null!==t.indent){var u=t.indent,h=Math.max(u-1,0);c.setCursor(t.indent),t.color=c.chars[h].penState.foreground}var d={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(d)},e.setBkgData=function(t){this.logger.log(r.INFO,"bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},e.setRollUpRows=function(t){this.nrRollUpRows=t},e.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(r.TEXT,this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(r.INFO,"Rolling up")}else this.logger.log(r.DEBUG,"roll_up but nrRollUpRows not set yet")},e.getDisplayText=function(t){t=t||!1;for(var e=[],n="",r=-1,i=0;i<15;i++){var o=this.rows[i].getTextString();o&&(r=i+1,t?e.push("Row "+r+": '"+o+"'"):e.push(o.trim()))}return e.length>0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(r.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(r.INFO,n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(r.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(r.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){this.logger.log(r.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(r.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(t){this.logger.log(r.INFO,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},e.ccFON=function(){this.logger.log(r.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(r.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(r.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(r.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(r.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(r.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(r.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(r.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(r.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(t){this.logger.log(r.INFO,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},e.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(t,e,r),new y(t+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var n,i,o,a=!1;this.logger.time=t;for(var s=0;s<e.length;s+=2)if(i=127&e[s],o=127&e[s+1],0!==i||0!==o){if(this.logger.log(r.DATA,"["+f([e[s],e[s+1]])+"] -> ("+f([i,o])+")"),(n=this.parseCmd(i,o))||(n=this.parseMidrow(i,o)),n||(n=this.parsePAC(i,o)),n||(n=this.parseBackgroundAttributes(i,o)),!n&&(a=this.parseChars(i,o))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(a):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,o])+" orig: "+f([e[s],e[s+1]]))}},e.parseCmd=function(t,e){var n=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(x(t,e,n))return w(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var i=20===t||21===t||23===t?1:2,o=this.channels[i];return 20===t||21===t||28===t||29===t?32===e?o.ccRCL():33===e?o.ccBS():34===e?o.ccAOF():35===e?o.ccAON():36===e?o.ccDER():37===e?o.ccRU(2):38===e?o.ccRU(3):39===e?o.ccRU(4):40===e?o.ccFON():41===e?o.ccRDC():42===e?o.ccTR():43===e?o.ccRTD():44===e?o.ccEDM():45===e?o.ccCR():46===e?o.ccENM():47===e&&o.ccEOC():o.ccTO(e-32),w(t,e,n),this.currentChannel=i,!0},e.parseMidrow=function(t,e){var n=0;if((17===t||25===t)&&e>=32&&e<=47){if((n=17===t?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(e),this.logger.log(r.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var n,r=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(x(t,e,r))return w(null,null,r),!0;var i=t<=23?1:2;n=e>=64&&e<=95?1===i?s[t]:c[t]:1===i?l[t]:u[t];var o=this.channels[i];return!!o&&(o.setPAC(this.interpretPAC(n,e)),w(t,e,r),this.currentChannel=i,!0)},e.interpretPAC=function(t,e){var n,r={color:null,italics:!1,indent:null,underline:!1,row:t};return n=e>95?e-96:e-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},e.parseChars=function(t,e){var n,i,o=null,s=null;if(t>=25?(n=2,s=t-8):(n=1,s=t),s>=17&&s<=19?(i=17===s?e+80:18===s?e+112:e+144,this.logger.log(r.INFO,"Special char '"+a(i)+"' in channel "+n),o=[i]):t>=32&&t<=127&&(o=0===e?[t]:[t,e]),o){var l=f(o);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),w(t,e,this.cmdHistory)}return o},e.parseBackgroundAttributes=function(t,e){var n;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var r={};16===t||24===t?(n=Math.floor((e-32)/2),r.background=h[n],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0));var i=t<=23?1:2;return this.channels[i].setBkgData(r),w(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t<Object.keys(this.channels).length;t++){var e=this.channels[t];e&&e.reset()}this.cmdHistory={a:null,b:null}},e.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++){var n=this.channels[e];n&&n.cueSplitAtTime(t)}},t}();function w(t,e,n){n.a=t,n.b=e}function x(t,e,n){return n.a===t&&n.b===e}e.default=b},"./src/utils/codecs.ts":
/*!*****************************!*\
!*** ./src/utils/codecs.ts ***!
\*****************************/
/*! exports provided: isCodecType, isCodecSupportedInMp4 */function(t,e,n){"use strict";n.r(e),n.d(e,"isCodecType",(function(){return i})),n.d(e,"isCodecSupportedInMp4",(function(){return o}));var r={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function i(t,e){var n=r[e];return!!n&&!0===n[t.slice(0,4)]}function o(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}},"./src/utils/cues.ts":
/*!***************************!*\
!*** ./src/utils/cues.ts ***!
\***************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./vttparser */"./src/utils/vttparser.ts"),i=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),o=n(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),a=/\s/,s={newCue:function(t,e,n,s){for(var l,c,u,h,d,f=[],p=self.VTTCue||self.TextTrackCue,m=0;m<s.rows.length;m++)if(u=!0,h=0,d="",!(l=s.rows[m]).isEmpty()){for(var g=0;g<l.chars.length;g++)a.test(l.chars[g].uchar)&&u?h++:(d+=l.chars[g].uchar,u=!1);l.cueStartTime=e,e===n&&(n+=1e-4),h>=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(e,n,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,n,v)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(o.addCueToTrack)(t,e)}))),f}};e.default=s},"./src/utils/discontinuities.ts":
/*!**************************************!*\
!*** ./src/utils/discontinuities.ts ***!
\**************************************/
/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(t,e,n){"use strict";n.r(e),n.d(e,"findFirstFragWithCC",(function(){return a})),n.d(e,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(e,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(e,"adjustSlidingStart",(function(){return u})),n.d(e,"alignStream",(function(){return h})),n.d(e,"alignPDT",(function(){return d})),n.d(e,"alignFragmentByPDTDelta",(function(){return f})),n.d(e,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),o=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function a(t,e){for(var n=null,r=0,i=t.length;r<i;r++){var o=t[r];if(o&&o.cc===e){n=o;break}}return n}function s(t,e,n){return!(!e.details||!(n.endCC>n.startCC||t&&t.cc<n.startCC))}function l(t,e){var n=t.fragments,r=e.fragments;if(r.length&&n.length){var o=a(n,r[0].cc);if(o&&(!o||o.startPTS))return o;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function c(t,e){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}}function u(t,e){for(var n=e.fragments,r=0,i=n.length;r<i;r++)c(n[r],t);e.fragmentHint&&c(e.fragmentHint,t),e.alignedSliding=!0}function h(t,e,n){e&&(function(t,e,n){if(s(t,n,e)){var o=l(n.details,e);o&&Object(r.isFiniteNumber)(o.start)&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level "+e.url),u(o.start,e))}}(t,n,e),!n.alignedSliding&&e.details&&d(n,e.details),n.alignedSliding||!e.details||n.skippedSegments||Object(o.adjustSliding)(e.details,n))}function d(t,e){if(e.fragments.length&&t.hasProgramDateTime&&e.hasProgramDateTime){var n=e.fragments[0].programDateTime,o=t.fragments[0].programDateTime,a=(o-n)/1e3+e.fragments[0].start;a&&Object(r.isFiniteNumber)(a)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(o-n)+"ms, sliding:"+a.toFixed(3)+" "+t.url+" "),u(a,t))}}function f(t,e){var n=t.programDateTime;if(n){var r=(n-e)/1e3;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function p(t,e){if(e.fragments.length&&t.hasProgramDateTime&&e.hasProgramDateTime){var n=e.fragments[0].programDateTime-1e3*e.fragments[0].start;t.fragments.forEach((function(t){f(t,n)})),t.fragmentHint&&f(t.fragmentHint,n),t.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":
/*!***********************************************!*\
!*** ./src/utils/ewma-bandwidth-estimator.ts ***!
\***********************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/ewma */"./src/utils/ewma.ts"),i=function(){function t(t,e,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(t),this.fast_=new r.default(e)}var e=t.prototype;return e.update=function(t,e){var n=this.slow_,i=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new r.default(t,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new r.default(e,i.getEstimate(),i.getTotalWeight()))},e.sample=function(t,e){var n=(t=Math.max(t,this.minDelayMs_))/1e3,r=8*e/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=i},"./src/utils/ewma.ts":
/*!***************************!*\
!*** ./src/utils/ewma.ts ***!
\***************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=n}var e=t.prototype;return e.sample=function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=r},"./src/utils/fetch-loader.ts":
/*!***********************************!*\
!*** ./src/utils/fetch-loader.ts ***!
\***********************************/
/*! exports provided: fetchSupported, default */function(t,e,n){"use strict";n.r(e),n.d(e,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),o=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return s(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function s(t,e,n){return(s=l()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function d(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var f=function(){function t(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||p,this.controller=new self.AbortController,this.stats=new i.LoadStats}var e=t.prototype;return e.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},e.abortInternal=function(){var t=this.response;t&&t.ok||(this.stats.aborted=!0,this.controller.abort())},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},e.load=function(t,e,n){var i=this,o=this.stats;if(o.loading.start)throw new Error("Loader can only be used once.");o.loading.start=self.performance.now();var a=function(t,e){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(h({},t.headers))};return t.rangeEnd&&n.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),n}(t,this.controller.signal),s=n.onProgress,l="arraybuffer"===t.responseType,c=l?"byteLength":"length";this.context=t,this.config=e,this.callbacks=n,this.request=this.fetchSetup(t,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),n.onTimeout(o,t,i.response)}),e.timeout),self.fetch(this.request).then((function(n){if(i.response=i.loader=n,!n.ok){var a=n.status,c=n.statusText;throw new m(c||"fetch, bad network response",a,n)}return o.loading.first=Math.max(self.performance.now(),o.loading.start),o.total=parseInt(n.headers.get("Content-Length")||"0"),s&&Object(r.isFiniteNumber)(e.highWaterMark)?i.loadProgressively(n,o,t,e.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(a){var l=i.response;self.clearTimeout(i.requestTimeout),o.loading.end=Math.max(self.performance.now(),o.loading.first),o.loaded=o.total=a[c];var u={url:l.url,data:a};s&&!Object(r.isFiniteNumber)(e.highWaterMark)&&s(o,t,a,l),n.onSuccess(u,o,t,l)})).catch((function(e){if(self.clearTimeout(i.requestTimeout),!o.aborted){var r=e.code||0;n.onError({code:r,text:e.message},t,e.details)}}))},e.getCacheAge=function(){var t=null;if(this.response){var e=this.response.headers.get("age");t=e?parseFloat(e):null}return t},e.loadProgressively=function(t,e,n,r,i){void 0===r&&(r=0);var a=new o.default,s=t.body.getReader();return function o(){return s.read().then((function(s){if(s.done)return a.dataLength&&i(e,n,a.flush(),t),Promise.resolve(new ArrayBuffer(0));var l=s.value,c=l.length;return e.loaded+=c,c<r||a.dataLength?(a.push(l),a.dataLength>=r&&i(e,n,a.flush(),t)):i(e,n,l,t),o()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var m=function(t){var e,n;function r(e,n,r){var i;return(i=t.call(this,e)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,c(e,n),r}(a(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts":
/*!****************************************!*\
!*** ./src/utils/imsc1-ttml-parser.ts ***!
\****************************************/
/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(t,e,n){"use strict";n.r(e),n.d(e,"IMSC1_CODEC",(function(){return u})),n.d(e,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),o=n(/*! ./vttcue */"./src/utils/vttcue.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var u="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,d=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(t,e,n,i,u){var h=Object(r.findBox)(new Uint8Array(t),["mdat"]);if(0!==h.length){var d=h[0],p=Object(a.utf8ArrayToStr)(new Uint8Array(t,d.start,d.end-d.start)),w=Object(s.toTimescaleFromScale)(e,1,n);try{i(function(t,e){var n=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(t,e){return t[e]=n.getAttribute("ttp:"+e)||r[e],t}),{}),a="preserve"!==n.getAttribute("xml:space"),s=g(m(n,"styling","style")),u=g(m(n,"layout","region")),h=m(n,"body","[begin]");return[].map.call(h,(function(t){var n=function t(e,n){return[].slice.call(e.childNodes).reduce((function(e,r,i){var o;return"br"===r.nodeName&&i?e+"\n":null!==(o=r.childNodes)&&void 0!==o&&o.length?t(r,n):n?e+r.textContent.trim().replace(/\s+/g," "):e+r.textContent}),"")}(t,a);if(!n||!t.hasAttribute("begin"))return null;var r=b(t.getAttribute("begin"),i),h=b(t.getAttribute("dur"),i),d=b(t.getAttribute("end"),i);if(null===r)throw y(t);if(null===d){if(null===h)throw y(t);d=r+h}var p=new o.default(r-e,d-e,n);p.id=Object(l.generateCueId)(p.startTime,p.endTime,p.text);var m=u[t.getAttribute("region")],g=s[t.getAttribute("style")];p.position=10,p.size=80;var w=function(t,e){var n="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(r,i){var o=v(e,n,i)||v(t,n,i);return o&&(r[i]=o),r}),{})}(m,g),x=w.textAlign;if(x){var S=f[x];S&&(p.lineAlign=S),p.align=x}return c(p,w),p})).filter((function(t){return null!==t}))}(p,w))}catch(t){u(t)}}else u(new Error("Could not parse IMSC1 mdat"))}function m(t,e,n){var r=t.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function g(t){return t.reduce((function(t,e){var n=e.getAttribute("xml:id");return n&&(t[n]=e),t}),{})}function v(t,e,n){return t.hasAttributeNS(e,n)?t.getAttributeNS(e,n):null}function y(t){return new Error("Could not parse ttml timestamp "+t)}function b(t,e){if(!t)return null;var n=Object(i.parseTimeStamp)(t);return null===n&&(h.test(t)?n=function(t,e){var n=h.exec(t),r=(0|n[4])+(0|n[5])/e.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/e.frameRate}(t,e):d.test(t)&&(n=function(t,e){var n=d.exec(t),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}(t,e))),n}},"./src/utils/logger.ts":
/*!*****************************!*\
!*** ./src/utils/logger.ts ***!
\*****************************/
/*! exports provided: enableLogs, logger */function(t,e,n){"use strict";n.r(e),n.d(e,"enableLogs",(function(){return s})),n.d(e,"logger",(function(){return l}));var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},o=i;function a(t){var e=self.console[t];return e?e.bind(self.console,"["+t+"] >"):r}function s(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.forEach((function(e){o[e]=t[e]?t[e].bind(t):a(e)}))}(t,"debug","log","info","warn","error");try{o.log()}catch(t){o=i}}else o=i}var l=i},"./src/utils/mediakeys-helper.ts":
/*!***************************************!*\
!*** ./src/utils/mediakeys-helper.ts ***!
\***************************************/
/*! exports provided: KeySystems, requestMediaKeySystemAccess */function(t,e,n){"use strict";var r;n.r(e),n.d(e,"KeySystems",(function(){return r})),n.d(e,"requestMediaKeySystemAccess",(function(){return i})),function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(r||(r={}));var i="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":
/*!*****************************************!*\
!*** ./src/utils/mediasource-helper.ts ***!
\*****************************************/
/*! exports provided: getMediaSource */function(t,e,n){"use strict";function r(){return self.MediaSource||self.WebKitMediaSource}n.r(e),n.d(e,"getMediaSource",(function(){return r}))},"./src/utils/mp4-tools.ts":
/*!********************************!*\
!*** ./src/utils/mp4-tools.ts ***!
\********************************/
/*! exports provided: bin2str, readUint16, readUint32, writeUint32, findBox, parseSegmentIndex, parseInitSegment, getStartDTS, getDuration, computeRawDurationFromSamples, offsetStartDTS, segmentValidRange, appendUint8Array */function(t,e,n){"use strict";n.r(e),n.d(e,"bin2str",(function(){return s})),n.d(e,"readUint16",(function(){return l})),n.d(e,"readUint32",(function(){return c})),n.d(e,"writeUint32",(function(){return u})),n.d(e,"findBox",(function(){return h})),n.d(e,"parseSegmentIndex",(function(){return d})),n.d(e,"parseInitSegment",(function(){return f})),n.d(e,"getStartDTS",(function(){return p})),n.d(e,"getDuration",(function(){return m})),n.d(e,"computeRawDurationFromSamples",(function(){return g})),n.d(e,"offsetStartDTS",(function(){return v})),n.d(e,"segmentValidRange",(function(){return y})),n.d(e,"appendUint8Array",(function(){return b}));var r=n(/*! ./typed-array */"./src/utils/typed-array.ts"),i=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=Math.pow(2,32)-1,a=[].push;function s(t){return String.fromCharCode.apply(null,t)}function l(t,e){"data"in t&&(e+=t.start,t=t.data);var n=t[e]<<8|t[e+1];return n<0?65536+n:n}function c(t,e){"data"in t&&(e+=t.start,t=t.data);var n=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return n<0?4294967296+n:n}function u(t,e,n){"data"in t&&(e+=t.start,t=t.data),t[e]=n>>24,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n}function h(t,e){var n,r,i,o=[];if(!e.length)return o;"data"in t?(n=t.data,r=t.start,i=t.end):(r=0,i=(n=t).byteLength);for(var l=r;l<i;){var u=c(n,l),d=u>1?l+u:i;if(s(n.subarray(l+4,l+8))===e[0])if(1===e.length)o.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},e.slice(1));f.length&&a.apply(o,f)}l=d}return o}function d(t){var e=h(t,["moov"])[0],n=e?e.end:null,r=h(t,["sidx"]);if(!r||!r[0])return null;var i=[],o=r[0],a=o.data[0],s=0===a?8:16,u=c(o,s);s+=4,s+=0===a?8:16,s+=2;var d=o.end+0,f=l(o,s);s+=2;for(var p=0;p<f;p++){var m=s,g=c(o,m);m+=4;var v=2147483647&g;if(1==(2147483648&g)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(o,m);m+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:a,referencesCount:f,references:i,moovEndOffset:n}}function f(t){for(var e=[],n=h(t,["moov","trak"]),r=0;r<n.length;r++){var o=n[r],a=h(o,["tkhd"])[0];if(a){var l=a.data[a.start],u=0===l?12:20,d=c(a,u),f=h(o,["mdia","mdhd"])[0];if(f){var p=c(f,u=0===(l=f.data[f.start])?12:20),m=h(o,["mdia","hdlr"])[0];if(m){var g=s(m.data.subarray(m.start+8,m.start+12)),v={soun:i.ElementaryStreamTypes.AUDIO,vide:i.ElementaryStreamTypes.VIDEO}[g];if(v){var y=h(o,["mdia","minf","stbl","stsd"])[0],b=void 0;y&&(b=s(y.data.subarray(y.start+12,y.start+16))),e[d]={timescale:p,type:v},e[v]={timescale:p,id:d,codec:b}}}}}}return h(t,["moov","mvex","trex"]).forEach((function(t){var n=c(t,4),r=e[n];r&&(r.default={duration:c(t,12),flags:c(t,20)})})),e}function p(t,e){return h(e,["moof","traf"]).reduce((function(e,n){var r=h(n,["tfdt"])[0],i=r.data[r.start],o=h(n,["tfhd"]).reduce((function(e,n){var o=c(n,4),a=t[o];if(a){var s=c(r,4);1===i&&(s*=Math.pow(2,32),s+=c(r,8));var l=s/(a.timescale||9e4);if(isFinite(l)&&(null===e||l<e))return l}return e}),null);return null!==o&&isFinite(o)&&(null===e||o<e)?o:e}),null)||0}function m(t,e){for(var n=0,r=0,o=0,a=h(t,["moof","traf"]),s=0;s<a.length;s++){var l=a[s],u=h(l,["tfhd"])[0],f=e[c(u,4)];if(f){var p=f.default,m=c(u,0)|(null==p?void 0:p.flags),v=null==p?void 0:p.duration;8&m&&(v=c(u,2&m?12:8));for(var y=f.timescale||9e4,b=h(l,["trun"]),w=0;w<b.length;w++)n=v?v*c(b[w],4):g(b[w]),f.type===i.ElementaryStreamTypes.VIDEO?r+=n/y:f.type===i.ElementaryStreamTypes.AUDIO&&(o+=n/y)}}if(0===r&&0===o){var x=d(t);if(null!=x&&x.references)return x.references.reduce((function(t,e){return t+e.info.duration||0}),0)}return r||o}function g(t){var e=c(t,0),n=8;1&e&&(n+=4),4&e&&(n+=4);for(var r=0,i=c(t,4),o=0;o<i;o++)256&e&&(r+=c(t,n),n+=4),512&e&&(n+=4),1024&e&&(n+=4),2048&e&&(n+=4);return r}function v(t,e,n){h(e,["moof","traf"]).forEach((function(e){h(e,["tfhd"]).forEach((function(r){var i=c(r,4),a=t[i];if(a){var s=a.timescale||9e4;h(e,["tfdt"]).forEach((function(t){var e=t.data[t.start],r=c(t,4);if(0===e)u(t,4,r-n*s);else{r*=Math.pow(2,32),r+=c(t,8),r-=n*s,r=Math.max(r,0);var i=Math.floor(r/(o+1)),a=Math.floor(r%(o+1));u(t,4,i),u(t,8,a)}}))}}))}))}function y(t){var e={valid:null,remainder:null},n=h(t,["moof"]);if(!n)return e;if(n.length<2)return e.remainder=t,e;var i=n[n.length-1];return e.valid=Object(r.sliceUint8)(t,0,i.start-8),e.remainder=Object(r.sliceUint8)(t,i.start-8),e}function b(t,e){var n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}},"./src/utils/output-filter.ts":
/*!************************************!*\
!*** ./src/utils/output-filter.ts ***!
\************************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return r}));var r=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,n){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts":
/*!**************************************!*\
!*** ./src/utils/texttrack-utils.ts ***!
\**************************************/
/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,n){"use strict";n.r(e),n.d(e,"sendAddTrackEvent",(function(){return i})),n.d(e,"addCueToTrack",(function(){return o})),n.d(e,"clearCurrentCues",(function(){return a})),n.d(e,"removeCuesInRange",(function(){return s})),n.d(e,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(t,e){var n;try{n=new Event("addtrack")}catch(t){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)}function o(t,e){var n=t.mode;if("disabled"===n&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}"disabled"===n&&(t.mode=n)}function a(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var n=t.cues.length;n--;)t.removeCue(t.cues[n]);"disabled"===e&&(t.mode=e)}function s(t,e,n){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var i=l(t.cues,e,n),o=0;o<i.length;o++)t.removeCue(i[o]);"disabled"===r&&(t.mode=r)}function l(t,e,n){var r=[],i=function(t,e){if(e<t[0].startTime)return 0;var n=t.length-1;if(e>t[n].endTime)return-1;for(var r=0,i=n;r<=i;){var o=Math.floor((i+r)/2);if(e<t[o].startTime)i=o-1;else{if(!(e>t[o].startTime&&r<n))return o;r=o+1}}return t[r].startTime-e<e-t[i].startTime?r:i}(t,e);if(i>-1)for(var o=i,a=t.length;o<a;o++){var s=t[o];if(s.startTime>=e&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts":
/*!**********************************!*\
!*** ./src/utils/time-ranges.ts ***!
\**********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default={toString:function(t){for(var e="",n=t.length,r=0;r<n;r++)e+="["+t.start(r).toFixed(3)+","+t.end(r).toFixed(3)+"]";return e}}},"./src/utils/timescale-conversion.ts":
/*!*******************************************!*\
!*** ./src/utils/timescale-conversion.ts ***!
\*******************************************/
/*! exports provided: toTimescaleFromBase, toTimescaleFromScale, toMsFromMpegTsClock, toMpegTsClockFromTimescale */function(t,e,n){"use strict";function r(t,e,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=t*e*n;return r?Math.round(i):i}function i(t,e,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(t,e,1/n,i)}function o(t,e){return void 0===e&&(e=!1),r(t,1e3,1/9e4,e)}function a(t,e){return void 0===e&&(e=1),r(t,9e4,1/e)}n.r(e),n.d(e,"toTimescaleFromBase",(function(){return r})),n.d(e,"toTimescaleFromScale",(function(){return i})),n.d(e,"toMsFromMpegTsClock",(function(){return o})),n.d(e,"toMpegTsClockFromTimescale",(function(){return a}))},"./src/utils/typed-array.ts":
/*!**********************************!*\
!*** ./src/utils/typed-array.ts ***!
\**********************************/
/*! exports provided: sliceUint8 */function(t,e,n){"use strict";function r(t,e,n){return Uint8Array.prototype.slice?t.slice(e,n):new Uint8Array(Array.prototype.slice.call(t,e,n))}n.r(e),n.d(e,"sliceUint8",(function(){return r}))},"./src/utils/vttcue.ts":
/*!*****************************!*\
!*** ./src/utils/vttcue.ts ***!
\*****************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e),e.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var t=["","lr","rl"],e=["start","middle","end","left","right"];function n(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;var n=e.toLowerCase();return!!~t.indexOf(n)&&n}function r(t){return n(e,t)}function i(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)t[a]=o[a]}return t}function o(e,o,a){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var c="",u=!1,h=e,d=o,f=a,p=null,m="",g=!0,v="auto",y="start",b=50,w="middle",x=50,S="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return c},set:function(t){c=""+t}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return u},set:function(t){u=!!t}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return h},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");h=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return d},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");d=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(t){f=""+t,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return p},set:function(t){p=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return m},set:function(e){var r=function(e){return n(t,e)}(e);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return g},set:function(t){g=!!t,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return y},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return w},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return x},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return S},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");S=e,this.hasBeenReset=!0}})),s.displayState=void 0}return o.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":
/*!********************************!*\
!*** ./src/utils/vttparser.ts ***!
\********************************/
/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(t,e,n){"use strict";n.r(e),n.d(e,"parseTimeStamp",(function(){return o})),n.d(e,"fixLineBreaks",(function(){return h})),n.d(e,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function o(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+parseFloat(r||0)}var n=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?e(n[2],n[3],0,n[4]):e(n[1],n[2],n[3],n[4]):null}var a=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},e.integer=function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},e.percent=function(t,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){var n=parseFloat(e);if(n>=0&&n<=100)return this.set(t,n),!0}return!1},t}();function s(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);2===a.length&&e(a[0],a[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,n){var r=t;function i(){var e=o(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=i(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),u(),e.endTime=i(),u(),function(t,e){var r=new a;s(t,(function(t,e){var i;switch(t){case"region":for(var o=n.length-1;o>=0;o--)if(n[o].id===e){r.set(t,n[o].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":i=e.split(","),r.integer(t,i[0]),r.percent(t,i[0])&&r.set("snapToLines",!1),r.alt(t,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=e.split(","),r.percent(t,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),e.line=i,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",c);var o=r.get("position","auto");"auto"===o&&50===l.position&&(o="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=o}(t,e)}function h(t){return t.replace(/<br(?: \/)?>/gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function n(){var t=e.buffer,n=0;for(t=h(t);n<t.length&&"\r"!==t[n]&&"\n"!==t[n];)++n;var r=t.substr(0,n);return"\r"===t[n]&&++n,"\n"===t[n]&&++n,e.buffer=t.substr(n),r}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var i="";if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var o=(i=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var a=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(a?a=!1:i=n(),e.state){case"HEADER":/:/.test(i)?s(i,(function(t,e){}),/:/):i||(e.state="ID");continue;case"NOTE":i||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){e.state="NOTE";break}if(!i)continue;if(e.cue=new r.default(0,0,""),e.state="CUE",-1===i.indexOf("--\x3e")){e.cue.id=i;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{u(i,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var l=-1!==i.indexOf("--\x3e");if(!i||l&&(a=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(null===e.cue)continue;e.cue.text&&(e.cue.text+="\n"),e.cue.text+=i;continue;case"BADCUE":i||(e.state="ID")}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},e.flush=function(){try{if((this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state||"BADWEBVTT"===this.state)throw new Error("Malformed WebVTT signature.")}catch(t){this.onparsingerror&&this.onparsingerror(t)}return this.onflush&&this.onflush(),this},t}()},"./src/utils/webvtt-parser.ts":
/*!************************************!*\
!*** ./src/utils/webvtt-parser.ts ***!
\************************************/
/*! exports provided: generateCueId, parseWebVTT */function(t,e,n){"use strict";n.r(e),n.d(e,"generateCueId",(function(){return h})),n.d(e,"parseWebVTT",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),s=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(t,e,n){return void 0===n&&(n=0),t.substr(n,e.length)===e},u=function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return(e>>>0).toString()};function h(t,e,n){return u(t.toString())+u(e.toString())+u(n)}function d(t,e,n,u,d,f,p,m){var g,v=new i.VTTParser,y=Object(o.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],w=Object(a.toMpegTsClockFromTimescale)(e,n),x="00:00.000",S=0,E=0,C=!0,k=!1;v.oncue=function(t){var e=u[d],n=u.ccOffset,r=(S-w)/9e4;if(null!=e&&e.new&&(void 0!==E?n=u.ccOffset=e.start:function(t,e,n){var r=t[e],i=t[r.prevCC];if(!i||!i.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;null!==(o=i)&&void 0!==o&&o.new;){var o;t.ccOffset+=r.start-i.start,r.new=!1,i=t[(r=i).prevCC]}t.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),k){var i=t.endTime-t.startTime,o=Object(s.normalizePts)(9e4*(t.startTime+n-E),9e4*f)/9e4;t.startTime=o,t.endTime=o+i}var a=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(a)),t.id||(t.id=h(t.startTime,t.endTime,a)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){g=t},v.onflush=function(){g?m(g):p(b)},y.forEach((function(t){if(C){if(c(t,"X-TIMESTAMP-MAP=")){C=!1,k=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?x=t.substr(6):c(t,"MPEGTS:")&&(S=parseInt(t.substr(7)))}));try{E=function(t){var e=parseInt(t.substr(-3)),n=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),o=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(e)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(o)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*n,e+=6e4*i,e+=36e5*o}(x)/1e3}catch(t){k=!1,g=t}return}""===t&&(C=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts":
/*!*********************************!*\
!*** ./src/utils/xhr-loader.ts ***!
\*********************************/
/*! exports provided: default */function(t,e,n){"use strict";n.r(e);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),o=/^age:\s*[\d.]+\s*$/m,a=function(){function t(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t?t.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=n,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,e.url)}catch(t){n.open("GET",e.url,!0),i(n,e.url)}n.readyState||n.open("GET",e.url,!0);var o=this.context.headers;if(o)for(var a in o)n.setRequestHeader(a,o[a])}catch(t){return void this.callbacks.onError({code:n.status,text:t.message},e,n)}e.rangeEnd&&n.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),n.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,n=this.stats;if(t&&e){var i=e.readyState,o=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){e.onreadystatechange=null,e.onprogress=null;var a=e.status;if(a>=200&&a<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===t.responseType?(s=e.response).byteLength:(s=e.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,t,s,e),!this.callbacks)return;var u={url:e.responseURL,data:s};this.callbacks.onSuccess(u,n,t,e)}else n.retry>=o.maxRetry||a>=400&&a<499?(r.logger.error(a+" while loading "+t.url),this.callbacks.onError({code:a,text:e.statusText},t,e)):(r.logger.warn(a+" while loading "+t.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)}},e.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&o.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=a}}).default},t.exports=r())},vHTk:
/*!******************************************************!*\
!*** ./src/components/PreviewAll/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:
/*!***************************************!*\
!*** ./node_modules/crypto-js/rc4.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},wCXF:
/*!********************************************************!*\
!*** ./node_modules/rc-table/es/Table.js + 17 modules ***!
\********************************************************/
/*! exports provided: INTERNAL_HOOKS, default */
/*! exports used: INTERNAL_HOOKS, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,n){"use strict";n.d(e,"a",(function(){return Z}));var r=n("rePB"),i=n("VTBJ"),o=n("KQm4"),a=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),h=n("Gytx"),d=n.n(h),f=n("Kwbf"),p=n("t23M"),m=n("qx4F"),g=n("6eGT"),v=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),w=n("fyJ8"),x=n("biw7");function S(t,e,n,r,i){var o,a,s=n[t]||{},l=n[e]||{};"left"===s.fixed?o=r.left[t]:"right"===l.fixed&&(a=r.right[e]);var c=!1,u=!1,h=!1,d=!1,f=n[e+1],p=n[t-1];if("rtl"===i){if(void 0!==o)d=!(p&&"left"===p.fixed);else if(void 0!==a){h=!(f&&"right"===f.fixed)}}else if(void 0!==o){c=!(f&&"left"===f.fixed)}else if(void 0!==a){u=!(p&&"right"===p.fixed)}return{fixLeft:o,fixRight:a,lastFixLeft:c,firstFixRight:u,lastFixRight:h,firstFixLeft:d,isSticky:r.isSticky}}var E=n("sR1s");function C(t){var e,n=t.cells,r=t.stickyOffsets,i=t.flattenColumns,o=t.rowComponent,a=t.cellComponent,s=t.onHeaderRow,c=t.index,u=l.useContext(x.a),h=u.prefixCls,d=u.direction;s&&(e=s(n.map((function(t){return t.column})),c));var f=Object(E.a)(n.map((function(t){return t.column})));return l.createElement(o,Object.assign({},e),n.map((function(t,e){var n,o=t.column,s=S(t.colStart,t.colEnd,i,r,d);return o&&o.onHeaderCell&&(n=t.column.onHeaderCell(o)),l.createElement(w.a,Object.assign({},t,{ellipsis:o.ellipsis,align:o.align,component:a,prefixCls:h,key:f[e]},s,{additionalProps:n,rowType:"header"}))})))}C.displayName="HeaderRow";var k=C;var _=function(t){var e=t.stickyOffsets,n=t.columns,r=t.flattenColumns,i=t.onHeaderRow,o=l.useContext(x.a),a=o.prefixCls,s=o.getComponent,c=l.useMemo((function(){return function(t){var e=[];!function t(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e[i]=e[i]||[];var o=r,a=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:o},a=1,s=n.children;return s&&s.length>0&&(a=t(s,o,i+1).reduce((function(t,e){return t+e}),0),r.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=a,r.colEnd=r.colStart+a-1,e[i].push(r),o+=a,a}));return a}(t,0);for(var n=e.length,r=function(t){e[t].forEach((function(e){"rowSpan"in e||e.hasSubColumns||(e.rowSpan=n-t)}))},i=0;i<n;i+=1)r(i);return e}(n)}),[n]),u=s(["header","wrapper"],"thead"),h=s(["header","row"],"tr"),d=s(["header","cell"],"th");return l.createElement(u,{className:"".concat(a,"-thead")},c.map((function(t,n){return l.createElement(k,{key:n,flattenColumns:r,cells:t,stickyOffsets:e,rowComponent:h,cellComponent:d,onHeaderRow:i,index:n})})))},T=n("hW8S");var O=function(t){for(var e=t.colWidths,n=t.columns,r=[],i=!1,o=(t.columCount||n.length)-1;o>=0;o-=1){var a=e[o],s=n&&n[o],c=s&&s[T.a];(a||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:o,style:{width:a,minWidth:a}},c))),i=!0)}return l.createElement("colgroup",null,r)};var A=l.forwardRef((function(t,e){var n=t.noData,a=t.columns,s=t.flattenColumns,c=t.colWidths,h=t.columCount,d=t.stickyOffsets,f=t.direction,p=t.fixHeader,m=t.offsetHeader,g=t.stickyClassName,v=t.onScroll,w=Object(y.a)(t,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),S=l.useContext(x.a),E=S.prefixCls,C=S.scrollbarSize,k=S.isSticky,T=k&&!p?0:C,A=l.useRef(null),L=l.useCallback((function(t){Object(b.b)(e,t),Object(b.b)(A,t)}),[]);l.useEffect((function(){var t;function e(t){var e=t.currentTarget,n=t.deltaX;n&&(v({currentTarget:e,scrollLeft:e.scrollLeft+n}),t.preventDefault())}return null===(t=A.current)||void 0===t||t.addEventListener("wheel",e),function(){var t;null===(t=A.current)||void 0===t||t.removeEventListener("wheel",e)}}),[]);var D=s[s.length-1],I={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(E,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return T?[].concat(Object(o.a)(a),[I]):a}),[T,a]),M=Object(l.useMemo)((function(){return T?[].concat(Object(o.a)(s),[I]):s}),[T,s]),N=Object(l.useMemo)((function(){var t=d.right,e=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(o.a)(e.map((function(t){return t+T}))),[0]):e,right:"rtl"===f?t:[].concat(Object(o.a)(t.map((function(t){return t+T}))),[0]),isSticky:k})}),[T,d,k]),j=function(t,e){return Object(l.useMemo)((function(){for(var n=[],r=0;r<e;r+=1){var i=t[r];if(void 0===i)return null;n[r]=i}return n}),[t.join("_"),e])}(c,h);return l.createElement("div",{style:Object(i.a)({overflow:"hidden"},k?{top:m}:{}),ref:L,className:u()("".concat(E,"-header"),Object(r.a)({},g,!!g))},l.createElement("table",{style:{tableLayout:"fixed",visibility:n||j?null:"hidden"}},l.createElement(O,{colWidths:j?[].concat(Object(o.a)(j),[T]):[],columCount:h+1,columns:M}),l.createElement(_,Object.assign({},w,{stickyOffsets:N,columns:R,flattenColumns:M}))))}));A.displayName="FixedHeader";var L=A,D=l.createContext(null);var I=function(t){var e=t.prefixCls,n=t.children,r=t.component,i=t.cellComponent,o=t.fixHeader,a=t.fixColumn,s=t.horizonScroll,c=t.className,u=t.expanded,h=t.componentWidth,d=t.colSpan,f=l.useContext(x.a).scrollbarSize;return l.useMemo((function(){var t=n;return a&&(t=l.createElement("div",{style:{width:h-(o?f:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(e,"-expanded-row-fixed")},t)),l.createElement(r,{className:c,style:{display:u?null:"none"}},l.createElement(w.a,{component:i,prefixCls:e,colSpan:d},t))}),[n,r,o,s,c,u,h,d,f])};function R(t){var e=t.className,n=t.style,r=t.record,o=t.index,a=t.rowKey,c=t.getRowKey,h=t.rowExpandable,d=t.expandedKeys,f=t.onRow,p=t.indent,m=void 0===p?0:p,g=t.rowComponent,v=t.cellComponent,y=t.childrenColumnName,b=l.useContext(x.a),S=b.prefixCls,C=b.fixedInfoList,k=l.useContext(D),_=k.fixHeader,T=k.fixColumn,O=k.horizonScroll,A=k.componentWidth,L=k.flattenColumns,M=k.expandableType,N=k.expandRowByClick,j=k.onTriggerExpand,P=k.rowClassName,F=k.expandedRowClassName,B=k.indentSize,U=k.expandIcon,H=k.expandedRowRender,z=k.expandIconColumnIndex,G=l.useState(!1),V=Object(s.a)(G,2),W=V[0],K=V[1],q=d&&d.has(t.recordKey);l.useEffect((function(){q&&K(!0)}),[q]);var X,Y="row"===M&&(!h||h(r)),$="nest"===M,J=y&&r&&r[y],Z=Y||$;f&&(X=f(r,o));var Q;"string"==typeof P?Q=P:"function"==typeof P&&(Q=P(r,o,m));var tt,et,nt=Object(E.a)(L),rt=l.createElement(g,Object.assign({},X,{"data-row-key":a,className:u()(e,"".concat(S,"-row"),"".concat(S,"-row-level-").concat(m),Q,X&&X.className),style:Object(i.a)(Object(i.a)({},n),X?X.style:null),onClick:function(t){if(N&&Z&&j(r,t),X&&X.onClick){for(var e,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(e=X).onClick.apply(e,[t].concat(i))}}}),L.map((function(t,e){var n,i,a=t.render,s=t.dataIndex,c=t.className,u=nt[e],h=C[e];return e===(z||0)&&$&&(n=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(B*m,"px")},className:"".concat(S,"-row-indent indent-level-").concat(m)}),U({prefixCls:S,expanded:q,expandable:J,record:r,onExpand:j}))),t.onCell&&(i=t.onCell(r,o)),l.createElement(w.a,Object.assign({className:c,ellipsis:t.ellipsis,align:t.align,component:v,prefixCls:S,key:u,record:r,index:o,dataIndex:s,render:a,shouldCellUpdate:t.shouldCellUpdate},h,{appendNode:n,additionalProps:i}))})));if(Y&&(W||q)){var it=H(r,o,m+1,q),ot=F&&F(r,o,m);tt=l.createElement(I,{expanded:q,className:u()("".concat(S,"-expanded-row"),"".concat(S,"-expanded-row-level-").concat(m+1),ot),prefixCls:S,fixHeader:_,fixColumn:T,horizonScroll:O,component:g,componentWidth:A,cellComponent:v,colSpan:L.length},it)}return J&&q&&(et=(r[y]||[]).map((function(e,n){var r=c(e,n);return l.createElement(R,Object.assign({},t,{key:r,rowKey:r,record:e,recordKey:r,index:n,indent:m+1}))}))),l.createElement(l.Fragment,null,rt,tt,et)}R.displayName="BodyRow";var M=R,N=l.createContext(null);function j(t){var e=t.columnKey,n=t.onColumnResize,r=l.useRef();return l.useEffect((function(){r.current&&n(e,r.current.offsetWidth)}),[]),l.createElement(p.a,{onResize:function(t){var r=t.offsetWidth;n(e,r)}},l.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var P=l.memo((function(t){var e=t.data,n=t.getRowKey,r=t.measureColumnWidth,i=t.expandedKeys,o=t.onRow,a=t.rowExpandable,s=t.emptyNode,c=t.childrenColumnName,u=l.useContext(N).onColumnResize,h=l.useContext(x.a),d=h.prefixCls,f=h.getComponent,p=l.useContext(D),m=p.fixHeader,g=p.horizonScroll,v=p.flattenColumns,y=p.componentWidth;return l.useMemo((function(){var t,h=f(["body","wrapper"],"tbody"),p=f(["body","row"],"tr"),b=f(["body","cell"],"td");t=e.length?e.map((function(t,e){var r=n(t,e);return l.createElement(M,{key:r,rowKey:r,record:t,recordKey:r,index:e,rowComponent:p,cellComponent:b,expandedKeys:i,onRow:o,getRowKey:n,rowExpandable:a,childrenColumnName:c})})):l.createElement(I,{expanded:!0,className:"".concat(d,"-placeholder"),prefixCls:d,fixHeader:m,fixColumn:g,horizonScroll:g,component:p,componentWidth:y,cellComponent:b,colSpan:v.length},s);var w=Object(E.a)(v);return l.createElement(h,{className:"".concat(d,"-tbody")},r&&l.createElement("tr",{"aria-hidden":"true",className:"".concat(d,"-measure-row"),style:{height:0}},w.map((function(t){return l.createElement(j,{key:t,columnKey:t,onColumnResize:u})}))),t)}),[e,d,o,r,i,n,f,y,s,v])}));P.displayName="Body";var F=P,B=n("wRmb"),U=n("xEkU"),H=n.n(U);function z(t){var e=Object(l.useRef)(t),n=Object(l.useState)({}),r=Object(s.a)(n,2)[1],i=Object(l.useRef)(null),o=Object(l.useRef)([]);return Object(l.useEffect)((function(){return function(){H.a.cancel(i.current)}}),[]),[e.current,function(t){null===i.current&&(o.current=[],i.current=H()((function(){o.current.forEach((function(t){e.current=t(e.current)})),i.current=null,r({})}))),o.current.push(t)}]}var G=function(t,e,n){return Object(l.useMemo)((function(){for(var r=[],i=[],o=0,a=0,s=0;s<e;s+=1)if("rtl"===n){i[s]=a,a+=t[s]||0;var l=e-s-1;r[l]=o,o+=t[l]||0}else{r[s]=o,o+=t[s]||0;var c=e-s-1;i[c]=a,a+=t[c]||0}return{left:r,right:i}}),[t,e,n])};var V=function(t){var e=t.className,n=t.children;return l.createElement("div",{className:e},n)},W=n("n6Qo");function K(t){var e,n=t.prefixCls,i=t.record,o=t.onExpand,a=t.expanded,s=t.expandable,c="".concat(n,"-row-expand-icon");if(!s)return l.createElement("span",{className:u()(c,"".concat(n,"-row-spaced"))});return l.createElement("span",{className:u()(c,(e={},Object(r.a)(e,"".concat(n,"-row-expanded"),a),Object(r.a)(e,"".concat(n,"-row-collapsed"),!a),e)),onClick:function(t){o(i,t),t.stopPropagation()}})}var q=n("zT1h"),X=n("y0+3"),Y=l.forwardRef((function(t,e){var n,o,a=t.scrollBodyRef,c=t.onScroll,h=t.offsetScroll,d=l.useContext(x.a).prefixCls,f=(null===(n=a.current)||void 0===n?void 0:n.scrollWidth)||0,p=(null===(o=a.current)||void 0===o?void 0:o.clientWidth)||0,g=f&&p*(p/f),v=l.useRef(),y=z({scrollLeft:0,isHiddenScrollBar:!1}),b=Object(s.a)(y,2),w=b[0],S=b[1],E=l.useRef({delta:0,x:0}),C=l.useState(!1),k=Object(s.a)(C,2),_=k[0],T=k[1],O=function(){T(!1)},A=function(t){var e,n=(t||(null===(e=window)||void 0===e?void 0:e.event)).buttons;if(_&&0!==n){var r=E.current.x+t.pageX-E.current.x-E.current.delta;r<=0&&(r=0),r+g>=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),E.current.x=t.pageX}else _&&T(!1)},L=function(){var t=Object(X.b)(a.current).top,e=t+a.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;e-Object(m.a)()<=n||t>=n-h?S((function(t){return Object(i.a)(Object(i.a)({},t),{},{isHiddenScrollBar:!0})})):S((function(t){return Object(i.a)(Object(i.a)({},t),{},{isHiddenScrollBar:!1})}))},D=function(t){S((function(e){return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:t/f*p||0})}))};return l.useImperativeHandle(e,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var t=Object(q.a)(document.body,"mouseup",O,!1),e=Object(q.a)(document.body,"mousemove",A,!1);return L(),function(){t.remove(),e.remove()}}),[g,_]),l.useEffect((function(){var t=Object(q.a)(window,"scroll",L,!1),e=Object(q.a)(window,"resize",L,!1);return function(){t.remove(),e.remove()}}),[]),l.useEffect((function(){w.isHiddenScrollBar||S((function(t){var e,n;return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:a.current.scrollLeft/(null===(e=a.current)||void 0===e?void 0:e.scrollWidth)*(null===(n=a.current)||void 0===n?void 0:n.clientWidth)})}))}),[w.isHiddenScrollBar]),f<=p||!g||w.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(t){t.persist(),E.current.delta=t.pageX-w.scrollLeft,E.current.x=0,T(!0),t.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),_)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(w.scrollLeft,"px, 0, 0)")}}))}));var $=[],J={},Z="rc-table-internal-hook",Q=l.memo((function(t){return t.children}),(function(t,e){return!!d()(t.props,e.props)&&(t.pingLeft!==e.pingLeft||t.pingRight!==e.pingRight)}));function tt(t){var e,n=t.prefixCls,c=t.className,h=t.rowClassName,d=t.style,g=t.data,v=t.rowKey,y=t.scroll,b=t.tableLayout,w=t.direction,C=t.title,k=t.footer,A=t.summary,I=t.id,R=t.showHeader,M=t.components,j=t.emptyText,P=t.onRow,U=t.onHeaderRow,H=t.internalHooks,q=t.transformColumns,X=t.internalRefs,tt=t.sticky,et=g||$,nt=!!et.length,rt=l.useState(0),it=Object(s.a)(rt,2),ot=it[0],at=it[1];l.useEffect((function(){at(Object(m.a)())}));var st,lt,ct,ut=l.useMemo((function(){return Object(E.c)(M,{})}),[M]),ht=l.useCallback((function(t,e){return Object(E.b)(ut,t)||e}),[ut]),dt=l.useMemo((function(){return"function"==typeof v?v:function(t){return t&&t[v]}}),[v]),ft=Object(T.c)(t),pt=ft.expandIcon,mt=ft.expandedRowKeys,gt=ft.defaultExpandedRowKeys,vt=ft.defaultExpandAllRows,yt=ft.expandedRowRender,bt=ft.onExpand,wt=ft.onExpandedRowsChange,xt=ft.expandRowByClick,St=ft.rowExpandable,Et=ft.expandIconColumnIndex,Ct=ft.expandedRowClassName,kt=ft.childrenColumnName,_t=ft.indentSize,Tt=pt||K,Ot=kt||"children",At=l.useMemo((function(){return yt?"row":!!(t.expandable&&H===Z&&t.expandable.__PARENT_RENDER_ICON__||et.some((function(t){return t&&"object"===Object(a.a)(t)&&t[Ot]})))&&"nest"}),[!!yt,et]),Lt=l.useState((function(){return gt||(vt?function(t,e,n){var r=[];return function t(i){(i||[]).forEach((function(i,o){r.push(e(i,o)),t(i[n])}))}(t),r}(et,dt,Ot):[])})),Dt=Object(s.a)(Lt,2),It=Dt[0],Rt=Dt[1],Mt=l.useMemo((function(){return new Set(mt||It||[])}),[mt,It]),Nt=l.useCallback((function(t){var e,n=dt(t,et.indexOf(t)),r=Mt.has(n);r?(Mt.delete(n),e=Object(o.a)(Mt)):e=[].concat(Object(o.a)(Mt),[n]),Rt(e),bt&&bt(!r,t),wt&&wt(e)}),[dt,Mt,et,bt,wt]),jt=l.useState(0),Pt=Object(s.a)(jt,2),Ft=Pt[0],Bt=Pt[1],Ut=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},t),ft),{},{expandable:!!yt,expandedKeys:Mt,getRowKey:dt,onTriggerExpand:Nt,expandIcon:Tt,expandIconColumnIndex:Et,direction:w}),H===Z?q:null),Ht=Object(s.a)(Ut,2),zt=Ht[0],Gt=Ht[1],Vt=l.useMemo((function(){return{columns:zt,flattenColumns:Gt}}),[zt,Gt]),Wt=l.useRef(),Kt=l.useRef(),qt=l.useRef(),Xt=l.useState(!1),Yt=Object(s.a)(Xt,2),$t=Yt[0],Jt=Yt[1],Zt=l.useState(!1),Qt=Object(s.a)(Zt,2),te=Qt[0],ee=Qt[1],ne=z(new Map),re=Object(s.a)(ne,2),ie=re[0],oe=re[1],ae=Object(E.a)(Gt).map((function(t){return ie.get(t)})),se=l.useMemo((function(){return ae}),[ae.join("_")]),le=G(se,Gt.length,w),ce=y&&Object(E.d)(y.y),ue=y&&Object(E.d)(y.x),he=ue&&Gt.some((function(t){return t.fixed})),de=l.useRef(),fe=function(t,e){return l.useMemo((function(){var n=!!t;return{isSticky:n,stickyClassName:n?"".concat(e,"-sticky-header"):"",offsetHeader:"object"===Object(a.a)(t)&&t.offsetHeader||0,offsetScroll:"object"===Object(a.a)(t)&&t.offsetScroll||0}}),[t,e])}(tt,n),pe=fe.isSticky,me=fe.offsetHeader,ge=fe.offsetScroll,ve=fe.stickyClassName;ce&&(lt={overflowY:"scroll",maxHeight:y.y}),ue&&(st={overflowX:"auto"},ce||(lt={overflowY:"hidden"}),ct={width:!0===y.x?"auto":y.x,minWidth:"100%"});var ye=l.useCallback((function(t,e){oe((function(n){var r=new Map(n);return r.set(t,e),r}))}),[]),be=function(t){var e=Object(l.useRef)(t),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(t){e.current=t,r(),n.current=window.setTimeout((function(){e.current=null,n.current=null}),100)},function(){return e.current}]}(null),we=Object(s.a)(be,2),xe=we[0],Se=we[1];function Ee(t,e){e&&("function"==typeof e?e(t):e.scrollLeft!==t&&(e.scrollLeft=t))}var Ce=function(t){var e,n=t.currentTarget,r=t.scrollLeft,i="number"==typeof r?r:n.scrollLeft,o=n||J;Se()&&Se()!==o||(xe(o),Ee(i,Kt.current),Ee(i,qt.current),Ee(i,null===(e=de.current)||void 0===e?void 0:e.setScrollLeft));if(n){var a=n.scrollWidth,s=n.clientWidth;Jt(i>0),ee(i<a-s)}},ke=function(){qt.current&&Ce({currentTarget:qt.current})};l.useEffect((function(){return ke}),[]),l.useEffect((function(){ue&&ke()}),[ue]),l.useEffect((function(){H===Z&&X&&(X.body.current=qt.current)}));var _e,Te,Oe=ht(["table"],"table"),Ae=l.useMemo((function(){return b||(he?"max-content"===y.x?"auto":"fixed":ce||Gt.some((function(t){return t.ellipsis}))?"fixed":"auto")}),[ce,he,Gt,b]),Le={colWidths:se,columCount:Gt.length,stickyOffsets:le,onHeaderRow:U,fixHeader:ce},De=l.useMemo((function(){return nt?null:"function"==typeof j?j():j}),[nt,j]),Ie=l.createElement(F,{data:et,measureColumnWidth:ce||ue||pe,expandedKeys:Mt,rowExpandable:St,getRowKey:dt,onRow:P,emptyNode:De,childrenColumnName:Ot}),Re=l.createElement(O,{colWidths:Gt.map((function(t){return t.width})),columns:Gt}),Me=A&&l.createElement(W.b,null,A(et)),Ne=ht(["body"]);ce||pe?("function"==typeof Ne?(Te=Ne(et,{scrollbarSize:ot,ref:qt,onScroll:Ce}),Le.colWidths=Gt.map((function(t,e){var n=t.width,r=e===zt.length-1?n-ot:n;return"number"!=typeof r||Number.isNaN(r)?(Object(f.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0):r}))):Te=l.createElement("div",{style:Object(i.a)(Object(i.a)({},st),lt),onScroll:Ce,ref:qt,className:u()("".concat(n,"-body"))},l.createElement(Oe,{style:Object(i.a)(Object(i.a)({},ct),{},{tableLayout:Ae})},Re,Ie,Me),pe&&l.createElement(Y,{ref:de,offsetScroll:ge,scrollBodyRef:qt,onScroll:Ce})),_e=l.createElement(l.Fragment,null,!1!==R&&l.createElement(L,Object.assign({noData:!et.length},Le,Vt,{direction:w,offsetHeader:me,stickyClassName:ve,ref:Kt,onScroll:Ce})),Te)):_e=l.createElement("div",{style:Object(i.a)(Object(i.a)({},st),lt),className:u()("".concat(n,"-content")),onScroll:Ce,ref:qt},l.createElement(Oe,{style:Object(i.a)(Object(i.a)({},ct),{},{tableLayout:Ae})},Re,!1!==R&&l.createElement(_,Object.assign({},Le,Vt)),Ie,Me));var je=Object(T.b)(t),Pe=l.createElement("div",Object.assign({className:u()(n,c,(e={},Object(r.a)(e,"".concat(n,"-rtl"),"rtl"===w),Object(r.a)(e,"".concat(n,"-ping-left"),$t),Object(r.a)(e,"".concat(n,"-ping-right"),te),Object(r.a)(e,"".concat(n,"-layout-fixed"),"fixed"===b),Object(r.a)(e,"".concat(n,"-fixed-header"),ce),Object(r.a)(e,"".concat(n,"-fixed-column"),he),Object(r.a)(e,"".concat(n,"-scroll-horizontal"),ue),Object(r.a)(e,"".concat(n,"-has-fix-left"),Gt[0]&&Gt[0].fixed),Object(r.a)(e,"".concat(n,"-has-fix-right"),Gt[Gt.length-1]&&"right"===Gt[Gt.length-1].fixed),e)),style:d,id:I,ref:Wt},je),l.createElement(Q,{pingLeft:$t,pingRight:te,props:Object(i.a)(Object(i.a)({},t),{},{stickyOffsets:le,mergedExpandedKeys:Mt})},C&&l.createElement(V,{className:"".concat(n,"-title")},C(et)),l.createElement("div",{className:"".concat(n,"-container")},_e),k&&l.createElement(V,{className:"".concat(n,"-footer")},k(et))));ue&&(Pe=l.createElement(p.a,{onResize:function(t){var e=t.width;ke(),Bt(Wt.current?Wt.current.offsetWidth:e)}},Pe));var Fe=l.useMemo((function(){return{prefixCls:n,getComponent:ht,scrollbarSize:ot,direction:w,fixedInfoList:Gt.map((function(t,e){return S(e,e,Gt,le,w)})),isSticky:pe}}),[n,ht,ot,w,Gt,le,w,pe]),Be=l.useMemo((function(){return Object(i.a)(Object(i.a)({},Vt),{},{tableLayout:Ae,rowClassName:h,expandedRowClassName:Ct,componentWidth:Ft,fixHeader:ce,fixColumn:he,horizonScroll:ue,expandIcon:Tt,expandableType:At,expandRowByClick:xt,expandedRowRender:yt,onTriggerExpand:Nt,expandIconColumnIndex:Et,indentSize:_t})}),[Vt,Ae,h,Ct,Ft,ce,he,ue,Tt,At,xt,yt,Nt,Et,_t]),Ue=l.useMemo((function(){return{onColumnResize:ye}}),[ye]);return l.createElement(x.a.Provider,{value:Fe},l.createElement(D.Provider,{value:Be},l.createElement(N.Provider,{value:Ue},Pe)))}tt.Column=v.a,tt.ColumnGroup=g.a,tt.Summary=W.a,tt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};e.b=tt},wRmb:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/hooks/useColumns.js ***!
\******************************************************/
/*! exports provided: convertChildrenToColumns, default */
/*! exports used: convertChildrenToColumns, default */function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),o=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=n(/*! react */"q1tI"),l=(n(/*! rc-util/es/warning */"Kwbf"),n(/*! rc-util/es/Children/toArray */"Zm9Q")),c=n(/*! ../utils/legacyUtil */"hW8S");function u(t){return Object(l.a)(t).filter((function(t){return s.isValidElement(t)})).map((function(t){var e=t.key,n=t.props,r=n.children,i=Object(a.a)(n,["children"]),s=Object(o.a)({key:e},i);return r&&(s.children=u(r)),s}))}function h(t){return t.reduce((function(t,e){var n=e.fixed,r=!0===n?"left":n,a=e.children;return a&&a.length>0?[].concat(Object(i.a)(t),Object(i.a)(h(a).map((function(t){return Object(o.a)({fixed:r},t)})))):[].concat(Object(i.a)(t),[Object(o.a)(Object(o.a)({},e),{},{fixed:r})])}),[])}e.b=function(t,e){var n=t.prefixCls,i=t.columns,l=t.children,d=t.expandable,f=t.expandedKeys,p=t.getRowKey,m=t.onTriggerExpand,g=t.expandIcon,v=t.rowExpandable,y=t.expandIconColumnIndex,b=t.direction,w=t.expandRowByClick,x=s.useMemo((function(){return i||u(l)}),[i,l]),S=s.useMemo((function(){if(d){var t,e=y||0,i=x[e],o=(t={},Object(r.a)(t,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(t,"title",""),Object(r.a)(t,"fixed",i?i.fixed:null),Object(r.a)(t,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(t,"render",(function(t,e,r){var i=p(e,r),o=f.has(i),a=!v||v(e),l=g({prefixCls:n,expanded:o,expandable:a,record:e,onExpand:m});return w?s.createElement("span",{onClick:function(t){return t.stopPropagation()}},l):l})),t),a=x.slice();return e>=0&&a.splice(e,0,o),a}return x}),[d,x,p,f,g,b]),E=s.useMemo((function(){var t=S;return e&&(t=e(t)),t.length||(t=[{render:function(){return null}}]),t}),[e,S,b]),C=s.useMemo((function(){return"rtl"===b?function(t){return t.map((function(t){var e=t.fixed,n=Object(a.a)(t,["fixed"]),r=e;return"left"===e?r="right":"right"===e&&(r="left"),Object(o.a)({fixed:r},n)}))}(h(E)):h(E)}),[E,b]);return[E,C]}},wZgz:
/*!***************************************!*\
!*** ./node_modules/crypto-js/aes.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r;t.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],h=[],d=[],f=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*m^16843008*n,u[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=e[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(a=r-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^h[i[c>>>16&255]]^d[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,l,c,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,u,h,d,f,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var l=this._nRounds,c=t[e]^n[0],u=t[e+1]^n[1],h=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<l;p++){var m=r[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],g=r[u>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&c]^n[f++],v=r[h>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^n[f++],y=r[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];c=m,u=g,h=v,d=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[f++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[f++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},wbyO:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/enc-base64url.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r,i,o;t.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64url={stringify:function(t,e=!0){var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<r;l++)o.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t,e=!0){var n=t.length,r=e?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<r.length;a++)o[r.charCodeAt(a)]=a}var s=r.charAt(64);if(s){var l=t.indexOf(s);-1!==l&&(n=l)}return function(t,e,n){for(var r=[],o=0,a=0;a<e;a++)if(a%4){var s=n[t.charCodeAt(a-1)]<<a%4*2,l=n[t.charCodeAt(a)]>>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(t,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},o.enc.Base64url)},"y0+3":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/Dom/css.js ***!
\********************************************/
/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */
/*! exports used: getClientSize, getOffset */function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},ynwM:
/*!************************************************************!*\
!*** ./node_modules/store/storages/oldFF-globalStorage.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,n){var r=n(/*! ../src/util */"MFOe").Global;t.exports={name:"oldFF-globalStorage",read:function(t){return i[t]},write:function(t,e){i[t]=e},each:o,remove:function(t){return i.removeItem(t)},clearAll:function(){o((function(t,e){delete i[t]}))}};var i=r.globalStorage;function o(t){for(var e=i.length-1;e>=0;e--){var n=i.key(e);t(i[n],n)}}}}]);