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.
408 lines
1.5 MiB
408 lines
1.5 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[95,3,5,7,8,17,18],{"+NIl":function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){"use strict";X.defineMode("stex",function(N,_){"use strict";function Q(w,g){w.cmdState.push(g)}function R(w){return w.cmdState.length>0?w.cmdState[w.cmdState.length-1]:null}function E(w){var g=w.cmdState.pop();g&&g.closeBracket()}function S(w){for(var g=w.cmdState,C=g.length-1;C>=0;C--){var c=g[C];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function s(w,g,C){return function(){this.name=w,this.bracketNo=0,this.style=g,this.styles=C,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var p={};p.importmodule=s("importmodule","tag",["string","builtin"]),p.documentclass=s("documentclass","tag",["","atom"]),p.usepackage=s("usepackage","tag",["atom"]),p.begin=s("begin","tag",["atom"]),p.end=s("end","tag",["atom"]),p.label=s("label","tag",["atom"]),p.ref=s("ref","tag",["atom"]),p.eqref=s("eqref","tag",["atom"]),p.cite=s("cite","tag",["atom"]),p.bibitem=s("bibitem","tag",["atom"]),p.Bibitem=s("Bibitem","tag",["atom"]),p.RBibitem=s("RBibitem","tag",["atom"]),p.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function v(w,g){w.f=g}function i(w,g){var C;if(w.match(/^\\[a-zA-Z@]+/)){var c=w.current().slice(1);return C=p.hasOwnProperty(c)?p[c]:p.DEFAULT,C=new C,Q(g,C),v(g,O),C.style}if(w.match(/^\\[$&%#{}_]/))return"tag";if(w.match(/^\\[,;!\/\\]/))return"tag";if(w.match("\\["))return v(g,function(u,m){return A(u,m,"\\]")}),"keyword";if(w.match("\\("))return v(g,function(u,m){return A(u,m,"\\)")}),"keyword";if(w.match("$$"))return v(g,function(u,m){return A(u,m,"$$")}),"keyword";if(w.match("$"))return v(g,function(u,m){return A(u,m,"$")}),"keyword";var a=w.next();if(a=="%")return w.skipToEnd(),"comment";if(a=="}"||a=="]"){if(C=R(g),C)C.closeBracket(a),v(g,O);else return"error";return"bracket"}else return a=="{"||a=="["?(C=p.DEFAULT,C=new C,Q(g,C),"bracket"):/\d/.test(a)?(w.eatWhile(/[\w.%]/),"atom"):(w.eatWhile(/[\w\-_]/),C=S(g),C.name=="begin"&&(C.argument=w.current()),C.styleIdentifier())}function A(w,g,C){if(w.eatSpace())return null;if(C&&w.match(C))return v(g,i),"keyword";if(w.match(/^\\[a-zA-Z@]+/))return"tag";if(w.match(/^[a-zA-Z]+/))return"variable-2";if(w.match(/^\\[$&%#{}_]/))return"tag";if(w.match(/^\\[,;!\/]/))return"tag";if(w.match(/^[\^_&]/))return"tag";if(w.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(w.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var c=w.next();return c=="{"||c=="}"||c=="["||c=="]"||c=="("||c==")"?"bracket":c=="%"?(w.skipToEnd(),"comment"):"error"}function O(w,g){var C=w.peek(),c;return C=="{"||C=="["?(c=R(g),c.openBracket(C),w.eat(C),v(g,i),"bracket"):/[ \t\r]/.test(C)?(w.eat(C),null):(v(g,i),E(g),i(w,g))}return{startState:function(){var w=_.inMathMode?function(g,C){return A(g,C)}:i;return{cmdState:[],f:w}},copyState:function(w){return{cmdState:w.cmdState.slice(),f:w.f}},token:function(w,g){return g.f(w,g)},blankLine:function(w){w.f=i,w.cmdState.length=0},lineComment:"%"}}),X.defineMIME("text/x-stex","stex"),X.defineMIME("text/x-latex","stex")})},"06Qe":function(Xe,pe,W){var X=W("ItGF"),N="urn:schemas-microsoft-com:vml",_=typeof window=="undefined"?null:window,Q=!1,R=_&&_.document;function E(p){return S(p)}var S;if(R&&!X.canvasSupported)try{!R.namespaces.zrvml&&R.namespaces.add("zrvml",N),S=function(p){return R.createElement("<zrvml:"+p+' class="zrvml">')}}catch(p){S=function(v){return R.createElement("<"+v+' xmlns="'+N+'" class="zrvml">')}}function s(){if(Q||!R)return;Q=!0;var p=R.styleSheets;p.length<31?R.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):p[0].addRule(".zrvml","behavior:url(#default#VML)")}pe.doc=R,pe.createNode=E,pe.initVML=s},"0s+r":function(Xe,pe,W){var X=W("bYtY"),N=W("QBsz"),_=W("y23F"),Q=W("H6uX"),R=W("YH21"),E=W("C0SR"),S="silent";function s(C,c,a){return{type:C,event:a,target:c.target,topTarget:c.topTarget,cancelBubble:!1,offsetX:a.zrX,offsetY:a.zrY,gestureEvent:a.gestureEvent,pinchX:a.pinchX,pinchY:a.pinchY,pinchScale:a.pinchScale,wheelDelta:a.zrDelta,zrByTouch:a.zrByTouch,which:a.which,stop:p}}function p(){R.stop(this.event)}function v(){}v.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],A=function(C,c,a,u){Q.call(this),this.storage=C,this.painter=c,this.painterRoot=u,a=a||new v,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,_.call(this),this.setHandlerProxy(a)};A.prototype={constructor:A,setHandlerProxy:function(C){this.proxy&&this.proxy.dispose(),C&&(X.each(i,function(c){C.on&&C.on(c,this[c],this)},this),C.handler=this),this.proxy=C},mousemove:function(C){var c=C.zrX,a=C.zrY,u=w(this,c,a),m=this._hovered,y=m.target;y&&!y.__zr&&(m=this.findHover(m.x,m.y),y=m.target);var T=this._hovered=u?{x:c,y:a}:this.findHover(c,a),x=T.target,M=this.proxy;M.setCursor&&M.setCursor(x?x.cursor:"default"),y&&x!==y&&this.dispatchToElement(m,"mouseout",C),this.dispatchToElement(T,"mousemove",C),x&&x!==y&&this.dispatchToElement(T,"mouseover",C)},mouseout:function(C){var c=C.zrEventControl,a=C.zrIsToLocalDOM;c!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",C),c!=="no_globalout"&&(!a&&this.trigger("globalout",{type:"globalout",event:C}))},resize:function(C){this._hovered={}},dispatch:function(C,c){var a=this[C];a&&a.call(this,c)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(C){var c=this.proxy;c.setCursor&&c.setCursor(C)},dispatchToElement:function(C,c,a){C=C||{};var u=C.target;if(u&&u.silent)return;for(var m="on"+c,y=s(c,C,a);u&&!(u[m]&&(y.cancelBubble=u[m].call(u,y)),u.trigger(c,y),u=u.parent,y.cancelBubble););y.cancelBubble||(this.trigger(c,y),this.painter&&this.painter.eachOtherLayer(function(T){typeof T[m]=="function"&&T[m].call(T,y),T.trigger&&T.trigger(c,y)}))},findHover:function(C,c,a){for(var u=this.storage.getDisplayList(),m={x:C,y:c},y=u.length-1;y>=0;y--){var T;if(u[y]!==a&&!u[y].ignore&&(T=O(u[y],C,c))&&(!m.topTarget&&(m.topTarget=u[y]),T!==S)){m.target=u[y];break}}return m},processGesture:function(C,c){this._gestureMgr||(this._gestureMgr=new E);var a=this._gestureMgr;c==="start"&&a.clear();var u=a.recognize(C,this.findHover(C.zrX,C.zrY,null).target,this.proxy.dom);if(c==="end"&&a.clear(),u){var m=u.type;C.gestureEvent=m,this.dispatchToElement({target:u.target},m,u.event)}}},X.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(C){A.prototype[C]=function(c){var a=c.zrX,u=c.zrY,m=w(this,a,u),y,T;if((C!=="mouseup"||!m)&&(y=this.findHover(a,u),T=y.target),C==="mousedown")this._downEl=T,this._downPoint=[c.zrX,c.zrY],this._upEl=T;else if(C==="mouseup")this._upEl=T;else if(C==="click"){if(this._downEl!==this._upEl||!this._downPoint||N.dist(this._downPoint,[c.zrX,c.zrY])>4)return;this._downPoint=null}this.dispatchToElement(y,C,c)}});function O(C,c,a){if(C[C.rectHover?"rectContain":"contain"](c,a)){for(var u=C,m;u;){if(u.clipPath&&!u.clipPath.contain(c,a))return!1;u.silent&&(m=!0),u=u.parent}return m?S:!0}return!1}function w(C,c,a){var u=C.painter;return c<0||c>u.getWidth()||a<0||a>u.getHeight()}X.mixin(A,Q),X.mixin(A,_);var g=A;Xe.exports=g},"19Vz":function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){X.defineOption("placeholder","",function(s,p,v){var i=v&&v!=X.Init;if(p&&!i)s.on("blur",R),s.on("change",E),s.on("swapDoc",E),X.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){Q(s)}),E(s);else if(!p&&i){s.off("blur",R),s.off("change",E),s.off("swapDoc",E),X.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),N(s);var A=s.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}p&&!s.hasFocus()&&R(s)});function N(s){s.state.placeholder&&(s.state.placeholder.parentNode.removeChild(s.state.placeholder),s.state.placeholder=null)}function _(s){N(s);var p=s.state.placeholder=document.createElement("pre");p.style.cssText="height: 0; overflow: visible",p.style.direction=s.getOption("direction"),p.className="CodeMirror-placeholder CodeMirror-line-like";var v=s.getOption("placeholder");typeof v=="string"&&(v=document.createTextNode(v)),p.appendChild(v),s.display.lineSpace.insertBefore(p,s.display.lineSpace.firstChild)}function Q(s){setTimeout(function(){var p=!1,v=s.getInputField();v.nodeName=="TEXTAREA"?p=!v.value:s.lineCount()==1&&(p=!/[^\u200b]/.test(v.querySelector(".CodeMirror-line").textContent)),p?_(s):N(s)},20)}function R(s){S(s)&&_(s)}function E(s){var p=s.getWrapperElement(),v=S(s);p.className=p.className.replace(" CodeMirror-empty","")+(v?" CodeMirror-empty":""),v?_(s):N(s)}function S(s){return s.lineCount()===1&&s.getLine(0)===""}})},"1Jh7":function(Xe,pe,W){var X=W("y+Vt"),N=W("T6xi"),_=X.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(Q,R){N.buildPath(Q,R,!1)}});Xe.exports=_},"1MYJ":function(Xe,pe,W){var X=W("y+Vt"),N=X.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var _=this.__dirtyPath,Q=this.shape.paths,R=0;R<Q.length;R++)_=_||Q[R].__dirtyPath;this.__dirtyPath=_,this.__dirty=this.__dirty||_},beforeBrush:function(){this._updatePathDirty();for(var _=this.shape.paths||[],Q=this.getGlobalScale(),R=0;R<_.length;R++)_[R].path||_[R].createPathProxy(),_[R].path.setScale(Q[0],Q[1],_[R].segmentIgnoreThreshold)},buildPath:function(_,Q){for(var R=Q.paths||[],E=0;E<R.length;E++)R[E].buildPath(_,R[E].shape,!0)},afterBrush:function(){for(var _=this.shape.paths||[],Q=0;Q<_.length;Q++)_[Q].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),X.prototype.getBoundingRect.call(this)}});Xe.exports=N},"1RvN":function(Xe,pe){var W=function(){this.head=null,this.tail=null,this._len=0},X=W.prototype;X.insert=function(E){var S=new N(E);return this.insertEntry(S),S},X.insertEntry=function(E){this.head?(this.tail.next=E,E.prev=this.tail,E.next=null,this.tail=E):this.head=this.tail=E,this._len++},X.remove=function(E){var S=E.prev,s=E.next;S?S.next=s:this.head=s,s?s.prev=S:this.tail=S,E.next=E.prev=null,this._len--},X.len=function(){return this._len},X.clear=function(){this.head=this.tail=null,this._len=0};var N=function(E){this.value=E,this.next,this.prev},_=function(E){this._list=new W,this._map={},this._maxSize=E||10,this._lastRemovedEntry=null},Q=_.prototype;Q.put=function(E,S){var s=this._list,p=this._map,v=null;if(p[E]==null){var i=s.len(),A=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var O=s.head;s.remove(O),delete p[O.key],v=O.value,this._lastRemovedEntry=O}A?A.value=S:A=new N(S),A.key=E,s.insertEntry(A),p[E]=A}return v},Q.get=function(E){var S=this._map[E],s=this._list;if(S!=null)return S!==s.tail&&(s.remove(S),s.insertEntry(S)),S.value},Q.clear=function(){this._list.clear(),this._map={}};var R=_;Xe.exports=R},"1bdT":function(Xe,pe,W){var X=W("3gBT"),N=W("H6uX"),_=W("DN4a"),Q=W("vWvF"),R=W("bYtY"),E=function(s){_.call(this,s),N.call(this,s),Q.call(this,s),this.id=s.id||X()};E.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(s,p){switch(this.draggable){case"horizontal":p=0;break;case"vertical":s=0;break}var v=this.transform;v||(v=this.transform=[1,0,0,1,0,0]),v[4]+=s,v[5]+=p,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(s,p){},attrKV:function(s,p){if(s==="position"||s==="scale"||s==="origin"){if(p){var v=this[s];v||(v=this[s]=[]),v[0]=p[0],v[1]=p[1]}}else this[s]=p},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(s,p){if(typeof s=="string")this.attrKV(s,p);else if(R.isObject(s))for(var v in s)s.hasOwnProperty(v)&&this.attrKV(v,s[v]);return this.dirty(!1),this},setClipPath:function(s){var p=this.__zr;p&&s.addSelfToZr(p),this.clipPath&&this.clipPath!==s&&this.removeClipPath(),this.clipPath=s,s.__zr=p,s.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var s=this.clipPath;s&&(s.__zr&&s.removeSelfFromZr(s.__zr),s.__zr=null,s.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(s){this.__zr=s;var p=this.animators;if(p)for(var v=0;v<p.length;v++)s.animation.addAnimator(p[v]);this.clipPath&&this.clipPath.addSelfToZr(s)},removeSelfFromZr:function(s){this.__zr=null;var p=this.animators;if(p)for(var v=0;v<p.length;v++)s.animation.removeAnimator(p[v]);this.clipPath&&this.clipPath.removeSelfFromZr(s)}},R.mixin(E,Q),R.mixin(E,_),R.mixin(E,N);var S=E;Xe.exports=S},"1eCo":function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){"use strict";var N={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},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};X.defineMode("xml",function(Q,R){var E=Q.indentUnit,S={},s=R.htmlMode?N:_;for(var p in s)S[p]=s[p];for(var p in R)S[p]=R[p];var v,i;function A(l,L){function B(H){return L.tokenize=H,H(l,L)}var h=l.next();if(h=="<")return l.eat("!")?l.eat("[")?l.match("CDATA[")?B(g("atom","]]>")):null:l.match("--")?B(g("comment","-->")):l.match("DOCTYPE",!0,!0)?(l.eatWhile(/[\w\._\-]/),B(C(1))):null:l.eat("?")?(l.eatWhile(/[\w\._\-]/),L.tokenize=g("meta","?>"),"meta"):(v=l.eat("/")?"closeTag":"openTag",L.tokenize=O,"tag bracket");if(h=="&"){var I;return l.eat("#")?l.eat("x")?I=l.eatWhile(/[a-fA-F\d]/)&&l.eat(";"):I=l.eatWhile(/[\d]/)&&l.eat(";"):I=l.eatWhile(/[\w\.\-:]/)&&l.eat(";"),I?"atom":"error"}else return l.eatWhile(/[^&<]/),null}A.isInText=!0;function O(l,L){var B=l.next();if(B==">"||B=="/"&&l.eat(">"))return L.tokenize=A,v=B==">"?"endTag":"selfcloseTag","tag bracket";if(B=="=")return v="equals",null;if(B=="<"){L.tokenize=A,L.state=m,L.tagName=L.tagStart=null;var h=L.tokenize(l,L);return h?h+" tag error":"tag error"}else return/[\'\"]/.test(B)?(L.tokenize=w(B),L.stringStartCol=l.column(),L.tokenize(l,L)):(l.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(l){var L=function(B,h){for(;!B.eol();)if(B.next()==l){h.tokenize=O;break}return"string"};return L.isInAttribute=!0,L}function g(l,L){return function(B,h){for(;!B.eol();){if(B.match(L)){h.tokenize=A;break}B.next()}return l}}function C(l){return function(L,B){for(var h;(h=L.next())!=null;){if(h=="<")return B.tokenize=C(l+1),B.tokenize(L,B);if(h==">")if(l==1){B.tokenize=A;break}else return B.tokenize=C(l-1),B.tokenize(L,B)}return"meta"}}function c(l,L,B){this.prev=l.context,this.tagName=L,this.indent=l.indented,this.startOfLine=B,(S.doNotIndent.hasOwnProperty(L)||l.context&&l.context.noIndent)&&(this.noIndent=!0)}function a(l){l.context&&(l.context=l.context.prev)}function u(l,L){for(var B;;){if(!l.context)return;if(B=l.context.tagName,!S.contextGrabbers.hasOwnProperty(B)||!S.contextGrabbers[B].hasOwnProperty(L))return;a(l)}}function m(l,L,B){return l=="openTag"?(B.tagStart=L.column(),y):l=="closeTag"?T:m}function y(l,L,B){return l=="word"?(B.tagName=L.current(),i="tag",b):S.allowMissingTagName&&l=="endTag"?(i="tag bracket",b(l,L,B)):(i="error",y)}function T(l,L,B){if(l=="word"){var h=L.current();return B.context&&B.context.tagName!=h&&S.implicitlyClosed.hasOwnProperty(B.context.tagName)&&a(B),B.context&&B.context.tagName==h||S.matchClosing===!1?(i="tag",x):(i="tag error",M)}else return S.allowMissingTagName&&l=="endTag"?(i="tag bracket",x(l,L,B)):(i="error",M)}function x(l,L,B){return l!="endTag"?(i="error",x):(a(B),m)}function M(l,L,B){return i="error",x(l,L,B)}function b(l,L,B){if(l=="word")return i="attribute",o;if(l=="endTag"||l=="selfcloseTag"){var h=B.tagName,I=B.tagStart;return B.tagName=B.tagStart=null,l=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(h)?u(B,h):(u(B,h),B.context=new c(B,h,I==B.indented)),m}return i="error",b}function o(l,L,B){return l=="equals"?r:(S.allowMissing||(i="error"),b(l,L,B))}function r(l,L,B){return l=="string"?n:l=="word"&&S.allowUnquoted?(i="string",b):(i="error",b(l,L,B))}function n(l,L,B){return l=="string"?n:b(l,L,B)}return{startState:function(l){var L={tokenize:A,state:m,indented:l||0,tagName:null,tagStart:null,context:null};return l!=null&&(L.baseIndent=l),L},token:function(l,L){if(!L.tagName&&l.sol()&&(L.indented=l.indentation()),l.eatSpace())return null;v=null;var B=L.tokenize(l,L);return(B||v)&&B!="comment"&&(i=null,L.state=L.state(v||B,l,L),i&&(B=i=="error"?B+" error":i)),B},indent:function(l,L,B){var h=l.context;if(l.tokenize.isInAttribute)return l.tagStart==l.indented?l.stringStartCol+1:l.indented+E;if(h&&h.noIndent)return X.Pass;if(l.tokenize!=O&&l.tokenize!=A)return B?B.match(/^(\s*)/)[0].length:0;if(l.tagName)return S.multilineTagIndentPastTag!==!1?l.tagStart+l.tagName.length+2:l.tagStart+E*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(L))return 0;var I=L&&/^<(\/)?([\w_:\.-]*)/.exec(L);if(I&&I[1])for(;h;)if(h.tagName==I[2]){h=h.prev;break}else if(S.implicitlyClosed.hasOwnProperty(h.tagName))h=h.prev;else break;else if(I)for(;h;){var H=S.contextGrabbers[h.tagName];if(H&&H.hasOwnProperty(I[2]))h=h.prev;else break}for(;h&&h.prev&&!h.startOfLine;)h=h.prev;return h?h.indent+E:l.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(l){l.state==r&&(l.state=b)},xmlCurrentTag:function(l){return l.tagName?{name:l.tagName,close:l.type=="closeTag"}:null},xmlCurrentContext:function(l){for(var L=[],B=l.context;B;B=B.prev)B.tagName&&L.push(B.tagName);return L.reverse()}}}),X.defineMIME("text/xml","xml"),X.defineMIME("application/xml","xml"),X.mimeModes.hasOwnProperty("text/html")||X.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function(Xe,pe,W){Xe.exports={md:"md___1fRow"}},"1j5w":function(Xe,pe,W){"use strict";W.d(pe,"d",function(){return ft}),W.d(pe,"b",function(){return ze}),W.d(pe,"c",function(){return Et}),W.d(pe,"a",function(){return Nt});var X=W("VTBJ"),N=W("1OyB"),_=W("vuIU"),Q=W("JX7q"),R=W("Ji7U"),E=W("LK+K"),S=W("q1tI"),s=W("I8Z2"),p=W("BGR+"),v=W("wx14"),i=W("rePB"),A=W("4IlW"),O=W("2GS6"),w=W("Gytx"),g=W.n(w),C=W("TSYQ"),c=W.n(C),a=W("U8pU"),u=W("ODXe"),m=/iPhone/i,y=/iPod/i,T=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,M=/Android/i,b=/\bAndroid(?:.+)SD4930UR\b/i,o=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,r=/Windows Phone/i,n=/\bWindows(?:.+)ARM\b/i,l=/BlackBerry/i,L=/BB10/i,B=/Opera Mini/i,h=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function H(Lt,st){return Lt.test(st)}function z(Lt){var st=Lt||(typeof navigator!="undefined"?navigator.userAgent:""),rt=st.split("[FBAN");if(typeof rt[1]!="undefined"){var et=rt,Ce=Object(u.a)(et,1);st=Ce[0]}if(rt=st.split("Twitter"),typeof rt[1]!="undefined"){var Ue=rt,ct=Object(u.a)(Ue,1);st=ct[0]}var at={apple:{phone:H(m,st)&&!H(r,st),ipod:H(y,st),tablet:!H(m,st)&&H(T,st)&&!H(r,st),device:(H(m,st)||H(y,st)||H(T,st))&&!H(r,st)},amazon:{phone:H(b,st),tablet:!H(b,st)&&H(o,st),device:H(b,st)||H(o,st)},android:{phone:!H(r,st)&&H(b,st)||!H(r,st)&&H(x,st),tablet:!H(r,st)&&!H(b,st)&&!H(x,st)&&(H(o,st)||H(M,st)),device:!H(r,st)&&(H(b,st)||H(o,st)||H(x,st)||H(M,st))||H(/\bokhttp\b/i,st)},windows:{phone:H(r,st),tablet:H(n,st),device:H(r,st)||H(n,st)},other:{blackberry:H(l,st),blackberry10:H(L,st),opera:H(B,st),firefox:H(I,st),chrome:H(h,st),device:H(l,st)||H(L,st)||H(B,st)||H(I,st)||H(h,st)},any:null,phone:null,tablet:null};return at.any=at.apple.device||at.android.device||at.windows.device||at.other.device,at.phone=at.apple.phone||at.android.phone||at.windows.phone,at.tablet=at.apple.tablet||at.android.tablet||at.windows.tablet,at}var Z=Object(X.a)(Object(X.a)({},z()),{},{isMobile:z}),Y=Z;function G(){}function ee(Lt,st,rt){var et=st||"";return Lt.key||"".concat(et,"item_").concat(rt)}function J(Lt){return"".concat(Lt,"-menu-")}function oe(Lt,st){var rt=-1;S.Children.forEach(Lt,function(et){rt+=1,et&&et.type&&et.type.isMenuItemGroup?S.Children.forEach(et.props.children,function(Ce){rt+=1,st(Ce,rt)}):st(et,rt)})}function se(Lt,st,rt){if(!Lt||rt.find)return;S.Children.forEach(Lt,function(et){if(et){var Ce=et.type;if(!Ce||!(Ce.isSubMenu||Ce.isMenuItem||Ce.isMenuItemGroup))return;st.indexOf(et.key)!==-1?rt.find=!0:et.props.children&&se(et.props.children,st,rt)}})}var Te=["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"],be=function(st){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=st&&typeof st.getBoundingClientRect=="function"&&st.getBoundingClientRect().width;if(et){if(rt){var Ce=getComputedStyle(st),Ue=Ce.marginLeft,ct=Ce.marginRight;et+=+Ue.replace("px","")+ +ct.replace("px","")}et=+et.toFixed(6)}return et||0},xe=function(st,rt,et){st&&Object(a.a)(st.style)==="object"&&(st.style[rt]=et)},Oe=function(){return Y.any},Ne=W("KQm4"),Le=W("Ff2n"),Se=W("i8i4"),tt=W("bdgK"),Bt=W("uciX"),De=W("8XRh"),Qe={adjustX:1,adjustY:1},it={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Qe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Qe,offset:[4,0]}},Ae={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Qe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Qe,offset:[4,0]}},re=it,ie=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Be=function(st,rt,et){var Ce=J(rt),Ue=st.getState();st.setState({defaultActiveFirst:Object(X.a)(Object(X.a)({},Ue.defaultActiveFirst),{},Object(i.a)({},Ce,et))})},Re=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(et){var Ce;Object(N.a)(this,rt),Ce=st.call(this,et),Ce.onDestroy=function(qe){Ce.props.onDestroy(qe)},Ce.onKeyDown=function(qe){var St=qe.keyCode,Ht=Ce.menuInstance,Pt=Ce.props,zt=Pt.isOpen,Ir=Pt.store;if(St===A.a.ENTER)return Ce.onTitleClick(qe),Be(Ir,Ce.props.eventKey,!0),!0;if(St===A.a.RIGHT)return zt?Ht.onKeyDown(qe):(Ce.triggerOpenChange(!0),Be(Ir,Ce.props.eventKey,!0)),!0;if(St===A.a.LEFT){var Rr;if(zt)Rr=Ht.onKeyDown(qe);else return;return Rr||(Ce.triggerOpenChange(!1),Rr=!0),Rr}return zt&&(St===A.a.UP||St===A.a.DOWN)?Ht.onKeyDown(qe):void 0},Ce.onOpenChange=function(qe){Ce.props.onOpenChange(qe)},Ce.onPopupVisibleChange=function(qe){Ce.triggerOpenChange(qe,qe?"mouseenter":"mouseleave")},Ce.onMouseEnter=function(qe){var St=Ce.props,Ht=St.eventKey,Pt=St.onMouseEnter,zt=St.store;Be(zt,Ce.props.eventKey,!1),Pt({key:Ht,domEvent:qe})},Ce.onMouseLeave=function(qe){var St=Ce.props,Ht=St.parentMenu,Pt=St.eventKey,zt=St.onMouseLeave;Ht.subMenuInstance=Object(Q.a)(Ce),zt({key:Pt,domEvent:qe})},Ce.onTitleMouseEnter=function(qe){var St=Ce.props,Ht=St.eventKey,Pt=St.onItemHover,zt=St.onTitleMouseEnter;Pt({key:Ht,hover:!0}),zt({key:Ht,domEvent:qe})},Ce.onTitleMouseLeave=function(qe){var St=Ce.props,Ht=St.parentMenu,Pt=St.eventKey,zt=St.onItemHover,Ir=St.onTitleMouseLeave;Ht.subMenuInstance=Object(Q.a)(Ce),zt({key:Pt,hover:!1}),Ir({key:Pt,domEvent:qe})},Ce.onTitleClick=function(qe){var St=Object(Q.a)(Ce),Ht=St.props;if(Ht.onTitleClick({key:Ht.eventKey,domEvent:qe}),Ht.triggerSubMenuAction==="hover")return;Ce.triggerOpenChange(!Ht.isOpen,"click"),Be(Ht.store,Ce.props.eventKey,!1)},Ce.onSubMenuClick=function(qe){typeof Ce.props.onClick=="function"&&Ce.props.onClick(Ce.addKeyPath(qe))},Ce.onSelect=function(qe){Ce.props.onSelect(qe)},Ce.onDeselect=function(qe){Ce.props.onDeselect(qe)},Ce.getPrefixCls=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu")},Ce.getActiveClassName=function(){return"".concat(Ce.getPrefixCls(),"-active")},Ce.getDisabledClassName=function(){return"".concat(Ce.getPrefixCls(),"-disabled")},Ce.getSelectedClassName=function(){return"".concat(Ce.getPrefixCls(),"-selected")},Ce.getOpenClassName=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu-open")},Ce.saveMenuInstance=function(qe){Ce.menuInstance=qe},Ce.addKeyPath=function(qe){return Object(X.a)(Object(X.a)({},qe),{},{keyPath:(qe.keyPath||[]).concat(Ce.props.eventKey)})},Ce.triggerOpenChange=function(qe,St){var Ht=Ce.props.eventKey,Pt=function(){Ce.onOpenChange({key:Ht,item:Object(Q.a)(Ce),trigger:St,open:qe})};St==="mouseenter"?Ce.mouseenterTimeout=setTimeout(function(){Pt()},0):Pt()},Ce.isChildrenSelected=function(){var qe={find:!1};return se(Ce.props.children,Ce.props.selectedKeys,qe),qe.find},Ce.isOpen=function(){return Ce.props.openKeys.indexOf(Ce.props.eventKey)!==-1},Ce.adjustWidth=function(){if(!Ce.subMenuTitle||!Ce.menuInstance)return;var qe=Se.findDOMNode(Ce.menuInstance);if(qe.offsetWidth>=Ce.subMenuTitle.offsetWidth)return;qe.style.minWidth="".concat(Ce.subMenuTitle.offsetWidth,"px")},Ce.saveSubMenuTitle=function(qe){Ce.subMenuTitle=qe},Ce.getBaseProps=function(){var qe=Object(Q.a)(Ce),St=qe.props;return{mode:St.mode==="horizontal"?"vertical":St.mode,visible:Ce.props.isOpen,level:St.level+1,inlineIndent:St.inlineIndent,focusable:!1,onClick:Ce.onSubMenuClick,onSelect:Ce.onSelect,onDeselect:Ce.onDeselect,onDestroy:Ce.onDestroy,selectedKeys:St.selectedKeys,eventKey:"".concat(St.eventKey,"-menu-"),openKeys:St.openKeys,motion:St.motion,onOpenChange:Ce.onOpenChange,subMenuOpenDelay:St.subMenuOpenDelay,parentMenu:Object(Q.a)(Ce),subMenuCloseDelay:St.subMenuCloseDelay,forceSubMenuRender:St.forceSubMenuRender,triggerSubMenuAction:St.triggerSubMenuAction,builtinPlacements:St.builtinPlacements,defaultActiveFirst:St.store.getState().defaultActiveFirst[J(St.eventKey)],multiple:St.multiple,prefixCls:St.rootPrefixCls,id:Ce.internalMenuId,manualRef:Ce.saveMenuInstance,itemIcon:St.itemIcon,expandIcon:St.expandIcon,direction:St.direction}},Ce.getMotion=function(qe,St){var Ht=Object(Q.a)(Ce),Pt=Ht.haveRendered,zt=Ce.props,Ir=zt.motion,Rr=zt.rootPrefixCls,yr=Object(X.a)(Object(X.a)({},Ir),{},{leavedClassName:"".concat(Rr,"-hidden"),removeOnLeave:!1,motionAppear:Pt||!St||qe!=="inline"});return yr};var Ue=et.store,ct=et.eventKey,at=Ue.getState(),Tt=at.defaultActiveFirst;Ce.isRootMenu=!1;var Ct=!1;return Tt&&(Ct=Tt[ct]),Be(Ue,ct,Ct),Ce}return Object(_.a)(rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ce=this,Ue=this.props,ct=Ue.mode,at=Ue.parentMenu,Tt=Ue.manualRef;if(Tt&&Tt(this),ct!=="horizontal"||!at.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ce=this.props,Ue=Ce.onDestroy,ct=Ce.eventKey;Ue&&Ue(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Ce){var Ue=this,ct=this.getBaseProps(),at=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return S.createElement("div",null);var Tt=ct.direction;return S.createElement(De.default,Object.assign({visible:ct.visible},at),function(Ct){var qe=Ct.className,St=Ct.style,Ht=c()("".concat(ct.prefixCls,"-sub"),qe,Object(i.a)({},"".concat(ct.prefixCls,"-rtl"),Tt==="rtl"));return S.createElement(Ke,Object.assign({},ct,{id:Ue.internalMenuId,className:Ht,style:St}),Ce)})}},{key:"render",value:function(){var Ce,Ue=Object(X.a)({},this.props),ct=Ue.isOpen,at=this.getPrefixCls(),Tt=Ue.mode==="inline",Ct=c()(at,"".concat(at,"-").concat(Ue.mode),(Ce={},Object(i.a)(Ce,Ue.className,!!Ue.className),Object(i.a)(Ce,this.getOpenClassName(),ct),Object(i.a)(Ce,this.getActiveClassName(),Ue.active||ct&&!Tt),Object(i.a)(Ce,this.getDisabledClassName(),Ue.disabled),Object(i.a)(Ce,this.getSelectedClassName(),this.isChildrenSelected()),Ce));this.internalMenuId||(Ue.eventKey?this.internalMenuId="".concat(Ue.eventKey,"$Menu"):(ie+=1,this.internalMenuId="$__$".concat(ie,"$Menu")));var qe={},St={},Ht={};Ue.disabled||(qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},St={onClick:this.onTitleClick},Ht={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pt={},zt=Ue.direction;Tt&&(zt==="rtl"?Pt.paddingRight=Ue.inlineIndent*Ue.level:Pt.paddingLeft=Ue.inlineIndent*Ue.level);var Ir={};this.props.isOpen&&(Ir={"aria-owns":this.internalMenuId});var Rr=null;Ue.mode!=="horizontal"&&(Rr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Rr=S.createElement(this.props.expandIcon,Object(X.a)({},this.props))));var yr=S.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Pt,className:"".concat(at,"-title"),role:"button"},Ht,St,{"aria-expanded":ct},Ir,{"aria-haspopup":"true",title:typeof Ue.title=="string"?Ue.title:void 0}),Ue.title,Rr||S.createElement("i",{className:"".concat(at,"-arrow")})),jt=this.renderChildren(Ue.children),Mr=Ue.parentMenu.isRootMenu?Ue.parentMenu.props.getPopupContainer:function($e){return $e.parentNode},Wr=ce[Ue.mode],Ur=Ue.popupOffset?{offset:Ue.popupOffset}:{},mr=Ue.mode==="inline"?"":Ue.popupClassName;mr+=zt==="rtl"?" ".concat(at,"-rtl"):"";var Sr=Ue.disabled,Cn=Ue.triggerSubMenuAction,dn=Ue.subMenuOpenDelay,fe=Ue.forceSubMenuRender,ye=Ue.subMenuCloseDelay,Fe=Ue.builtinPlacements;Te.forEach(function($e){return delete Ue[$e]}),delete Ue.onClick;var nt=zt==="rtl"?Object.assign({},Ae,Fe):Object.assign({},it,Fe);return delete Ue.direction,S.createElement("li",Object.assign({},Ue,qe,{className:Ct,role:"menuitem"}),Tt&&yr,Tt&&jt,!Tt&&S.createElement(Bt.a,{prefixCls:at,popupClassName:c()("".concat(at,"-popup"),mr),getPopupContainer:Mr,builtinPlacements:nt,popupPlacement:Wr,popupVisible:ct,popupAlign:Ur,popup:jt,action:Sr?[]:[Cn],mouseEnterDelay:dn,mouseLeaveDelay:ye,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fe},yr))}}]),rt}(S.Component);Re.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var ke=Object(s.b)(function(Lt,st){var rt=Lt.openKeys,et=Lt.activeKey,Ce=Lt.selectedKeys,Ue=st.eventKey,ct=st.subMenuKey;return{isOpen:rt.indexOf(Ue)>-1,active:et[ct]===Ue,selectedKeys:Ce}})(Re);ke.isSubMenu=!0;var ft=ke,pt="menuitem-overflowed",bt=.5,yt=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(){var et;return Object(N.a)(this,rt),et=st.apply(this,arguments),et.resizeObserver=null,et.mutationObserver=null,et.originalTotalWidth=0,et.overflowedItems=[],et.menuItemSizes=[],et.cancelFrameId=null,et.state={lastVisibleIndex:void 0},et.getMenuItemNodes=function(){var Ce=et.props.prefixCls,Ue=Se.findDOMNode(Object(Q.a)(et));return Ue?[].slice.call(Ue.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(Ce,"-overflowed-submenu"))<0}):[]},et.getOverflowedSubMenuItem=function(Ce,Ue,ct){var at=et.props,Tt=at.overflowedIndicator,Ct=at.level,qe=at.mode,St=at.prefixCls,Ht=at.theme;if(Ct!==1||qe!=="horizontal")return null;var Pt=et.props.children[0],zt=Pt.props,Ir=zt.children,Rr=zt.title,yr=zt.style,jt=Object(Le.a)(zt,["children","title","style"]),Mr=Object(X.a)({},yr),Wr="".concat(Ce,"-overflowed-indicator"),Ur="".concat(Ce,"-overflowed-indicator");Ue.length===0&&ct!==!0?Mr=Object(X.a)(Object(X.a)({},Mr),{},{display:"none"}):ct&&(Mr=Object(X.a)(Object(X.a)({},Mr),{},{visibility:"hidden",position:"absolute"}),Wr="".concat(Wr,"-placeholder"),Ur="".concat(Ur,"-placeholder"));var mr=Ht?"".concat(St,"-").concat(Ht):"",Sr={};return Te.forEach(function(Cn){jt[Cn]!==void 0&&(Sr[Cn]=jt[Cn])}),S.createElement(ft,Object.assign({title:Tt,className:"".concat(St,"-overflowed-submenu"),popupClassName:mr},Sr,{key:Wr,eventKey:Ur,disabled:!1,style:Mr}),Ue)},et.setChildrenWidthAndResize=function(){if(et.props.mode!=="horizontal")return;var Ce=Se.findDOMNode(Object(Q.a)(et));if(!Ce)return;var Ue=Ce.children;if(!Ue||Ue.length===0)return;var ct=Ce.children[Ue.length-1];xe(ct,"display","inline-block");var at=et.getMenuItemNodes(),Tt=at.filter(function(Ct){return Ct.className.split(" ").indexOf(pt)>=0});Tt.forEach(function(Ct){xe(Ct,"display","inline-block")}),et.menuItemSizes=at.map(function(Ct){return be(Ct,!0)}),Tt.forEach(function(Ct){xe(Ct,"display","none")}),et.overflowedIndicatorWidth=be(Ce.children[Ce.children.length-1],!0),et.originalTotalWidth=et.menuItemSizes.reduce(function(Ct,qe){return Ct+qe},0),et.handleResize(),xe(ct,"display","none")},et.handleResize=function(){if(et.props.mode!=="horizontal")return;var Ce=Se.findDOMNode(Object(Q.a)(et));if(!Ce)return;var Ue=be(Ce);et.overflowedItems=[];var ct=0,at;et.originalTotalWidth>Ue+bt&&(at=-1,et.menuItemSizes.forEach(function(Tt){ct+=Tt,ct+et.overflowedIndicatorWidth<=Ue&&(at+=1)})),et.setState({lastVisibleIndex:at})},et}return Object(_.a)(rt,[{key:"componentDidMount",value:function(){var Ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ue=Se.findDOMNode(this);if(!Ue)return;this.resizeObserver=new tt.default(function(ct){ct.forEach(function(){var at=Ce.cancelFrameId;cancelAnimationFrame(at),Ce.cancelFrameId=requestAnimationFrame(Ce.setChildrenWidthAndResize)})}),[].slice.call(Ue.children).concat(Ue).forEach(function(ct){Ce.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ce.resizeObserver.disconnect(),[].slice.call(Ue.children).concat(Ue).forEach(function(ct){Ce.resizeObserver.observe(ct)}),Ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ue,{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(Ce){var Ue=this,ct=this.state.lastVisibleIndex;return(Ce||[]).reduce(function(at,Tt,Ct){var qe=Tt;if(Ue.props.mode==="horizontal"){var St=Ue.getOverflowedSubMenuItem(Tt.props.eventKey,[]);ct!==void 0&&Ue.props.className.indexOf("".concat(Ue.props.prefixCls,"-root"))!==-1&&(Ct>ct&&(qe=S.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(pt)})),Ct===ct+1&&(Ue.overflowedItems=Ce.slice(ct+1).map(function(Pt){return S.cloneElement(Pt,{key:Pt.props.eventKey,mode:"vertical-left"})}),St=Ue.getOverflowedSubMenuItem(Tt.props.eventKey,Ue.overflowedItems)));var Ht=[].concat(Object(Ne.a)(at),[St,qe]);return Ct===Ce.length-1&&Ht.push(Ue.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),Ht}return[].concat(Object(Ne.a)(at),[qe])},[])}},{key:"render",value:function(){var Ce=this.props,Ue=Ce.visible,ct=Ce.prefixCls,at=Ce.overflowedIndicator,Tt=Ce.mode,Ct=Ce.level,qe=Ce.tag,St=Ce.children,Ht=Ce.theme,Pt=Object(Le.a)(Ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),zt=qe;return S.createElement(zt,Object.assign({},Pt),this.renderChildren(St))}}]),rt}(S.Component);yt.defaultProps={tag:"div",className:""};var _t=yt;function It(Lt){return Lt.length?Lt.every(function(st){return!!st.props.disabled}):!0}function He(Lt,st,rt){var et=Lt.getState();Lt.setState({activeKey:Object(X.a)(Object(X.a)({},et.activeKey),{},Object(i.a)({},st,rt))})}function Pe(Lt){return Lt.eventKey||"0-menu-"}function At(Lt,st){var rt=st,et=Lt.children,Ce=Lt.eventKey;if(rt){var Ue;if(oe(et,function(ct,at){ct&&ct.props&&!ct.props.disabled&&rt===ee(ct,Ce,at)&&(Ue=!0)}),Ue)return rt}return rt=null,Lt.defaultActiveFirst&&oe(et,function(ct,at){!rt&&ct&&!ct.props.disabled&&(rt=ee(ct,Ce,at))}),rt}function mt(Lt){if(Lt){var st=this.instanceArray.indexOf(Lt);st!==-1?this.instanceArray[st]=Lt:this.instanceArray.push(Lt)}}var Ze=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(et){var Ce;return Object(N.a)(this,rt),Ce=st.call(this,et),Ce.onKeyDown=function(Ue,ct){var at=Ue.keyCode,Tt;if(Ce.getFlatInstanceArray().forEach(function(qe){qe&&qe.props.active&&qe.onKeyDown&&(Tt=qe.onKeyDown(Ue))}),Tt)return 1;var Ct=null;return(at===A.a.UP||at===A.a.DOWN)&&(Ct=Ce.step(at===A.a.UP?-1:1)),Ct?(Ue.preventDefault(),He(Ce.props.store,Pe(Ce.props),Ct.props.eventKey),typeof ct=="function"&&ct(Ct),1):void 0},Ce.onItemHover=function(Ue){var ct=Ue.key,at=Ue.hover;He(Ce.props.store,Pe(Ce.props),at?ct:null)},Ce.onDeselect=function(Ue){Ce.props.onDeselect(Ue)},Ce.onSelect=function(Ue){Ce.props.onSelect(Ue)},Ce.onClick=function(Ue){Ce.props.onClick(Ue)},Ce.onOpenChange=function(Ue){Ce.props.onOpenChange(Ue)},Ce.onDestroy=function(Ue){Ce.props.onDestroy(Ue)},Ce.getFlatInstanceArray=function(){return Ce.instanceArray},Ce.step=function(Ue){var ct=Ce.getFlatInstanceArray(),at=Ce.props.store.getState().activeKey[Pe(Ce.props)],Tt=ct.length;if(!Tt)return null;Ue<0&&(ct=ct.concat().reverse());var Ct=-1;if(ct.every(function(Pt,zt){return Pt&&Pt.props.eventKey===at?(Ct=zt,!1):!0}),!Ce.props.defaultActiveFirst&&Ct!==-1&&It(ct.slice(Ct,Tt-1)))return;var qe=(Ct+1)%Tt,St=qe;do{var Ht=ct[St];if(!Ht||Ht.props.disabled)St=(St+1)%Tt;else return Ht}while(St!==qe);return null},Ce.renderCommonMenuItem=function(Ue,ct,at){var Tt=Ce.props.store.getState(),Ct=Object(Q.a)(Ce),qe=Ct.props,St=ee(Ue,qe.eventKey,ct),Ht=Ue.props;if(!Ht||typeof Ue.type=="string")return Ue;var Pt=St===Tt.activeKey,zt=Object(X.a)(Object(X.a)({mode:Ht.mode||qe.mode,level:qe.level,inlineIndent:qe.inlineIndent,renderMenuItem:Ce.renderMenuItem,rootPrefixCls:qe.prefixCls,index:ct,parentMenu:qe.parentMenu,manualRef:Ht.disabled?void 0:Object(O.a)(Ue.ref,mt.bind(Object(Q.a)(Ce))),eventKey:St,active:!Ht.disabled&&Pt,multiple:qe.multiple,onClick:function(Rr){(Ht.onClick||G)(Rr),Ce.onClick(Rr)},onItemHover:Ce.onItemHover,motion:qe.motion,subMenuOpenDelay:qe.subMenuOpenDelay,subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,onOpenChange:Ce.onOpenChange,onDeselect:Ce.onDeselect,onSelect:Ce.onSelect,builtinPlacements:qe.builtinPlacements,itemIcon:Ht.itemIcon||Ce.props.itemIcon,expandIcon:Ht.expandIcon||Ce.props.expandIcon},at),{},{direction:qe.direction});return(qe.mode==="inline"||Oe())&&(zt.triggerSubMenuAction="click"),S.cloneElement(Ue,zt)},Ce.renderMenuItem=function(Ue,ct,at){if(!Ue)return null;var Tt=Ce.props.store.getState(),Ct={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Ce.props.triggerSubMenuAction,subMenuKey:at};return Ce.renderCommonMenuItem(Ue,ct,Ct)},et.store.setState({activeKey:Object(X.a)(Object(X.a)({},et.store.getState().activeKey),{},Object(i.a)({},et.eventKey,At(et,et.activeKey)))}),Ce.instanceArray=[],Ce}return Object(_.a)(rt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ce){return this.props.visible||Ce.visible||this.props.className!==Ce.className||!g()(this.props.style,Ce.style)}},{key:"componentDidUpdate",value:function(Ce){var Ue=this.props,ct="activeKey"in Ue?Ue.activeKey:Ue.store.getState().activeKey[Pe(Ue)],at=At(Ue,ct);if(at!==ct)He(Ue.store,Pe(Ue),at);else if("activeKey"in Ce){var Tt=At(Ce,Ce.activeKey);at!==Tt&&He(Ue.store,Pe(Ue),at)}}},{key:"render",value:function(){var Ce=this,Ue=Object(v.a)({},this.props);this.instanceArray=[];var ct=c()(Ue.prefixCls,Ue.className,"".concat(Ue.prefixCls,"-").concat(Ue.mode)),at={className:ct,role:Ue.role||"menu"};Ue.id&&(at.id=Ue.id),Ue.focusable&&(at.tabIndex=0,at.onKeyDown=this.onKeyDown);var Tt=Ue.prefixCls,Ct=Ue.eventKey,qe=Ue.visible,St=Ue.level,Ht=Ue.mode,Pt=Ue.overflowedIndicator,zt=Ue.theme;return Te.forEach(function(Ir){return delete Ue[Ir]}),delete Ue.onClick,S.createElement(_t,Object.assign({},Ue,{prefixCls:Tt,mode:Ht,tag:"ul",level:St,theme:zt,visible:qe,overflowedIndicator:Pt},at),S.Children.map(Ue.children,function(Ir,Rr){return Ce.renderMenuItem(Ir,Rr,Ct||"0-menu-")}))}}]),rt}(S.Component);Ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var ut=Object(s.b)()(Ze),Ke=ut,Ie=W("Kwbf");function Me(Lt,st,rt){var et=Lt.prefixCls,Ce=Lt.motion,Ue=Lt.defaultMotions,ct=Ue===void 0?{}:Ue,at=Lt.openAnimation,Tt=Lt.openTransitionName,Ct=st.switchingModeFromInline;if(Ce)return Ce;if(Object(a.a)(at)==="object"&&at)Object(Ie.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof at=="string")return{motionName:"".concat(et,"-open-").concat(at)};if(Tt)return{motionName:Tt};var qe=ct[rt];return qe||(Ct?null:ct.other)}var me=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(et){var Ce;Object(N.a)(this,rt),Ce=st.call(this,et),Ce.inlineOpenKeys=[],Ce.onSelect=function(at){var Tt=Object(Q.a)(Ce),Ct=Tt.props;if(Ct.selectable){var qe=Ce.store.getState(),St=qe.selectedKeys,Ht=at.key;Ct.multiple?St=St.concat([Ht]):St=[Ht],"selectedKeys"in Ct||Ce.store.setState({selectedKeys:St}),Ct.onSelect(Object(X.a)(Object(X.a)({},at),{},{selectedKeys:St}))}},Ce.onClick=function(at){var Tt=Ce.getRealMenuMode(),Ct=Object(Q.a)(Ce),qe=Ct.store,St=Ct.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Ce.props)&&(qe.setState({openKeys:[]}),St([])),Ce.props.onClick(at)},Ce.onKeyDown=function(at,Tt){Ce.innerMenu.getWrappedInstance().onKeyDown(at,Tt)},Ce.onOpenChange=function(at){var Tt=Object(Q.a)(Ce),Ct=Tt.props,qe=Ce.store.getState().openKeys.concat(),St=!1,Ht=function(zt){var Ir=!1;if(zt.open)Ir=qe.indexOf(zt.key)===-1,Ir&&qe.push(zt.key);else{var Rr=qe.indexOf(zt.key);Ir=Rr!==-1,Ir&&qe.splice(Rr,1)}St=St||Ir};Array.isArray(at)?at.forEach(Ht):Ht(at),St&&("openKeys"in Ce.props||Ce.store.setState({openKeys:qe}),Ct.onOpenChange(qe))},Ce.onDeselect=function(at){var Tt=Object(Q.a)(Ce),Ct=Tt.props;if(Ct.selectable){var qe=Ce.store.getState().selectedKeys.concat(),St=at.key,Ht=qe.indexOf(St);Ht!==-1&&qe.splice(Ht,1),"selectedKeys"in Ct||Ce.store.setState({selectedKeys:qe}),Ct.onDeselect(Object(X.a)(Object(X.a)({},at),{},{selectedKeys:qe}))}},Ce.onMouseEnter=function(at){Ce.restoreModeVerticalFromInline();var Tt=Ce.props.onMouseEnter;Tt&&Tt(at)},Ce.onTransitionEnd=function(at){var Tt=at.propertyName==="width"&&at.target===at.currentTarget,Ct=at.target.className,qe=Object.prototype.toString.call(Ct)==="[object SVGAnimatedString]"?Ct.animVal:Ct,St=at.propertyName==="font-size"&&qe.indexOf("anticon")>=0;(Tt||St)&&Ce.restoreModeVerticalFromInline()},Ce.setInnerMenu=function(at){Ce.innerMenu=at},Ce.isRootMenu=!0;var Ue=et.defaultSelectedKeys,ct=et.defaultOpenKeys;return"selectedKeys"in et&&(Ue=et.selectedKeys||[]),"openKeys"in et&&(ct=et.openKeys||[]),Ce.store=Object(s.c)({selectedKeys:Ue,openKeys:ct,activeKey:{"0-menu-":At(et,et.activeKey)}}),Ce.state={switchingModeFromInline:!1},Ce}return Object(_.a)(rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ce){this.updateOpentKeysWhenSwitchMode(Ce),this.updateMiniStore();var Ue=this.props,ct=Ue.siderCollapsed,at=Ue.inlineCollapsed,Tt=Ue.onOpenChange;(!Ce.inlineCollapsed&&at||!Ce.siderCollapsed&&ct)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Ce){var Ue=this.props,ct=this.store,at=this.inlineOpenKeys,Tt=ct.getState(),Ct={};Ce.mode==="inline"&&Ue.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ue||((Ue.inlineCollapsed&&!Ce.inlineCollapsed||Ue.siderCollapsed&&!Ce.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Tt.openKeys.concat(),Ct.openKeys=[]),(!Ue.inlineCollapsed&&Ce.inlineCollapsed||!Ue.siderCollapsed&&Ce.siderCollapsed)&&(Ct.openKeys=at,this.inlineOpenKeys=[])),Object.keys(Ct).length&&ct.setState(Ct)}},{key:"updateMenuDisplay",value:function(){var Ce=this.props.collapsedWidth,Ue=this.store,ct=this.prevOpenKeys,at=this.getInlineCollapsed()&&(Ce===0||Ce==="0"||Ce==="0px");at?(this.prevOpenKeys=Ue.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ce=this.props.mode,Ue=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return Ue&&ct?"inline":ct?"vertical":Ce}},{key:"getInlineCollapsed",value:function(){var Ce=this.props,Ue=Ce.inlineCollapsed,ct=Ce.siderCollapsed;return ct!==void 0?ct:Ue}},{key:"restoreModeVerticalFromInline",value:function(){var Ce=this.state.switchingModeFromInline;Ce&&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 Ce=Object(X.a)({},Object(p.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ue=this.getRealMenuMode();return Ce.className+=" ".concat(Ce.prefixCls,"-root"),Ce.direction==="rtl"&&(Ce.className+=" ".concat(Ce.prefixCls,"-rtl")),Ce=Object(X.a)(Object(X.a)({},Ce),{},{mode:Ue,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Me(this.props,this.state,Ue)}),delete Ce.openAnimation,delete Ce.openTransitionName,S.createElement(s.a,{store:this.store},S.createElement(Ke,Object.assign({},Ce,{ref:this.setInnerMenu}),this.props.children))}}]),rt}(S.Component);me.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:S.createElement("span",null,"\xB7\xB7\xB7")};var Ee=me,ge=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(){var et;return Object(N.a)(this,rt),et=st.apply(this,arguments),et.onKeyDown=function(Ce){var Ue=Ce.keyCode;return Ue===A.a.ENTER?(et.onClick(Ce),!0):void 0},et.onMouseLeave=function(Ce){var Ue=et.props,ct=Ue.eventKey,at=Ue.onItemHover,Tt=Ue.onMouseLeave;at({key:ct,hover:!1}),Tt({key:ct,domEvent:Ce})},et.onMouseEnter=function(Ce){var Ue=et.props,ct=Ue.eventKey,at=Ue.onItemHover,Tt=Ue.onMouseEnter;at({key:ct,hover:!0}),Tt({key:ct,domEvent:Ce})},et.onClick=function(Ce){var Ue=et.props,ct=Ue.eventKey,at=Ue.multiple,Tt=Ue.onClick,Ct=Ue.onSelect,qe=Ue.onDeselect,St=Ue.isSelected,Ht={key:ct,keyPath:[ct],item:Object(Q.a)(et),domEvent:Ce};Tt(Ht),at?St?qe(Ht):Ct(Ht):St||Ct(Ht)},et.saveNode=function(Ce){et.node=Ce},et}return Object(_.a)(rt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ce=this.props;Ce.onDestroy&&Ce.onDestroy(Ce.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 Ce,Ue=Object(X.a)({},this.props),ct=c()(this.getPrefixCls(),Ue.className,(Ce={},Object(i.a)(Ce,this.getActiveClassName(),!Ue.disabled&&Ue.active),Object(i.a)(Ce,this.getSelectedClassName(),Ue.isSelected),Object(i.a)(Ce,this.getDisabledClassName(),Ue.disabled),Ce)),at=Object(X.a)(Object(X.a)({},Ue.attribute),{},{title:typeof Ue.title=="string"?Ue.title:void 0,className:ct,role:Ue.role||"menuitem","aria-disabled":Ue.disabled});Ue.role==="option"?at=Object(X.a)(Object(X.a)({},at),{},{role:"option","aria-selected":Ue.isSelected}):(Ue.role===null||Ue.role==="none")&&(at.role="none");var Tt={onClick:Ue.disabled?null:this.onClick,onMouseLeave:Ue.disabled?null:this.onMouseLeave,onMouseEnter:Ue.disabled?null:this.onMouseEnter},Ct=Object(X.a)({},Ue.style);Ue.mode==="inline"&&(Ue.direction==="rtl"?Ct.paddingRight=Ue.inlineIndent*Ue.level:Ct.paddingLeft=Ue.inlineIndent*Ue.level),Te.forEach(function(St){return delete Ue[St]}),delete Ue.direction;var qe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(qe=S.createElement(this.props.itemIcon,this.props)),S.createElement("li",Object.assign({},Object(p.default)(Ue,["onClick","onMouseEnter","onMouseLeave","onSelect"]),at,Tt,{style:Ct,ref:this.saveNode}),Ue.children,qe)}}]),rt}(S.Component);ge.isMenuItem=!0,ge.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var we=Object(s.b)(function(Lt,st){var rt=Lt.activeKey,et=Lt.selectedKeys,Ce=st.eventKey,Ue=st.subMenuKey;return{active:rt[Ue]===Ce,isSelected:et.indexOf(Ce)!==-1}})(ge),ze=we,Je=function(Lt){Object(R.a)(rt,Lt);var st=Object(E.a)(rt);function rt(){var et;return Object(N.a)(this,rt),et=st.apply(this,arguments),et.renderInnerMenuItem=function(Ce){var Ue=et.props,ct=Ue.renderMenuItem,at=Ue.index;return ct(Ce,at,et.props.subMenuKey)},et}return Object(_.a)(rt,[{key:"render",value:function(){var Ce=Object(v.a)({},this.props),Ue=Ce.className,ct=Ue===void 0?"":Ue,at=Ce.rootPrefixCls,Tt="".concat(at,"-item-group-title"),Ct="".concat(at,"-item-group-list"),qe=Ce.title,St=Ce.children;return Te.forEach(function(Ht){return delete Ce[Ht]}),delete Ce.onClick,delete Ce.direction,S.createElement("li",Object.assign({},Ce,{className:"".concat(ct," ").concat(at,"-item-group")}),S.createElement("div",{className:Tt,title:typeof qe=="string"?qe:void 0},qe),S.createElement("ul",{className:Ct},S.Children.map(St,this.renderInnerMenuItem)))}}]),rt}(S.Component);Je.isMenuItemGroup=!0,Je.defaultProps={disabled:!0};var Et=Je,Ft=function(st){var rt=st.className,et=st.rootPrefixCls,Ce=st.style;return S.createElement("li",{className:"".concat(rt," ").concat(et,"-item-divider"),style:Ce})};Ft.defaultProps={disabled:!0,className:"",style:{}};var Nt=Ft,ht=pe.e=Ee},"24YM":function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.SensorTabIndex=pe.SensorClassName=pe.SizeSensorId=void 0;var X="size-sensor-id";pe.SizeSensorId=X;var N="size-sensor-object";pe.SensorClassName=N;var _="-1";pe.SensorTabIndex=_},"2DNl":function(Xe,pe,W){var X=W("IMiH"),N=W("loD1"),_=W("59Ip"),Q=W("aKvl"),R=W("n1HI"),E=W("hX1E"),S=E.normalizeRadian,s=W("Sj9i"),p=W("hyiK"),v=X.CMD,i=Math.PI*2,A=1e-4;function O(x,M){return Math.abs(x-M)<A}var w=[-1,-1,-1],g=[-1,-1];function C(){var x=g[0];g[0]=g[1],g[1]=x}function c(x,M,b,o,r,n,l,L,B,h){if(h>M&&h>o&&h>n&&h>L||h<M&&h<o&&h<n&&h<L)return 0;var I=s.cubicRootAt(M,o,n,L,h,w);if(I===0)return 0;for(var H=0,z=-1,Z,Y,G=0;G<I;G++){var ee=w[G],J=ee===0||ee===1?.5:1,oe=s.cubicAt(x,b,r,l,ee);if(oe<B)continue;z<0&&(z=s.cubicExtrema(M,o,n,L,g),g[1]<g[0]&&z>1&&C(),Z=s.cubicAt(M,o,n,L,g[0]),z>1&&(Y=s.cubicAt(M,o,n,L,g[1]))),z===2?ee<g[0]?H+=Z<M?J:-J:ee<g[1]?H+=Y<Z?J:-J:H+=L<Y?J:-J:ee<g[0]?H+=Z<M?J:-J:H+=L<Z?J:-J}return H}function a(x,M,b,o,r,n,l,L){if(L>M&&L>o&&L>n||L<M&&L<o&&L<n)return 0;var B=s.quadraticRootAt(M,o,n,L,w);if(B===0)return 0;var h=s.quadraticExtremum(M,o,n);if(h>=0&&h<=1){for(var I=0,H=s.quadraticAt(M,o,n,h),z=0;z<B;z++){var Z=w[z]===0||w[z]===1?.5:1,Y=s.quadraticAt(x,b,r,w[z]);if(Y<l)continue;w[z]<h?I+=H<M?Z:-Z:I+=n<H?Z:-Z}return I}else{var Z=w[0]===0||w[0]===1?.5:1,Y=s.quadraticAt(x,b,r,w[0]);return Y<l?0:n<M?Z:-Z}}function u(x,M,b,o,r,n,l,L){if(L-=M,L>b||L<-b)return 0;var B=Math.sqrt(b*b-L*L);w[0]=-B,w[1]=B;var h=Math.abs(o-r);if(h<1e-4)return 0;if(h%i<1e-4){o=0,r=i;var I=n?1:-1;return l>=w[0]+x&&l<=w[1]+x?I:0}if(n){var B=o;o=S(r),r=S(B)}else o=S(o),r=S(r);o>r&&(r+=i);for(var H=0,z=0;z<2;z++){var Z=w[z];if(Z+x>l){var Y=Math.atan2(L,Z),I=n?1:-1;Y<0&&(Y=i+Y),(Y>=o&&Y<=r||Y+i>=o&&Y+i<=r)&&(Y>Math.PI/2&&Y<Math.PI*1.5&&(I=-I),H+=I)}}return H}function m(x,M,b,o,r){for(var n=0,l=0,L=0,B=0,h=0,I=0;I<x.length;){var H=x[I++];H===v.M&&I>1&&(b||(n+=p(l,L,B,h,o,r))),I===1&&(l=x[I],L=x[I+1],B=l,h=L);switch(H){case v.M:B=x[I++],h=x[I++],l=B,L=h;break;case v.L:if(b){if(N.containStroke(l,L,x[I],x[I+1],M,o,r))return!0}else n+=p(l,L,x[I],x[I+1],o,r)||0;l=x[I++],L=x[I++];break;case v.C:if(b){if(_.containStroke(l,L,x[I++],x[I++],x[I++],x[I++],x[I],x[I+1],M,o,r))return!0}else n+=c(l,L,x[I++],x[I++],x[I++],x[I++],x[I],x[I+1],o,r)||0;l=x[I++],L=x[I++];break;case v.Q:if(b){if(Q.containStroke(l,L,x[I++],x[I++],x[I],x[I+1],M,o,r))return!0}else n+=a(l,L,x[I++],x[I++],x[I],x[I+1],o,r)||0;l=x[I++],L=x[I++];break;case v.A:var z=x[I++],Z=x[I++],Y=x[I++],G=x[I++],ee=x[I++],J=x[I++];I+=1;var oe=1-x[I++],se=Math.cos(ee)*Y+z,Te=Math.sin(ee)*G+Z;I>1?n+=p(l,L,se,Te,o,r):(B=se,h=Te);var be=(o-z)*G/Y+z;if(b){if(R.containStroke(z,Z,G,ee,ee+J,oe,M,be,r))return!0}else n+=u(z,Z,G,ee,ee+J,oe,be,r);l=Math.cos(ee+J)*Y+z,L=Math.sin(ee+J)*G+Z;break;case v.R:B=l=x[I++],h=L=x[I++];var xe=x[I++],Oe=x[I++],se=B+xe,Te=h+Oe;if(b){if(N.containStroke(B,h,se,h,M,o,r)||N.containStroke(se,h,se,Te,M,o,r)||N.containStroke(se,Te,B,Te,M,o,r)||N.containStroke(B,Te,B,h,M,o,r))return!0}else n+=p(se,h,se,Te,o,r),n+=p(B,Te,B,h,o,r);break;case v.Z:if(b){if(N.containStroke(l,L,B,h,M,o,r))return!0}else n+=p(l,L,B,h,o,r);l=B,L=h;break}}return!b&&!O(L,h)&&(n+=p(l,L,B,h,o,r)||0),n!==0}function y(x,M,b){return m(x,0,!1,M,b)}function T(x,M,b,o){return m(x,M,!0,b,o)}pe.contain=y,pe.containStroke=T},"2fw6":function(Xe,pe,W){var X=W("y+Vt"),N=X.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(_,Q,R){R&&_.moveTo(Q.cx+Q.r,Q.cy),_.arc(Q.cx,Q.cy,Q.r,0,Math.PI*2,!0)}});Xe.exports=N},"3C/r":function(Xe,pe){var W=function(N,_){this.image=N,this.repeat=_,this.type="pattern"};W.prototype.getCanvasPattern=function(N){return N.createPattern(this.image,this.repeat||"repeat")};var X=W;Xe.exports=X},"3CBa":function(Xe,pe,W){var X=W("hydK"),N=X.createElement,_=W("bYtY"),Q=W("SUKs"),R=W("y+Vt"),E=W("Dagg"),S=W("dqUG"),s=W("DBLp"),p=W("sW+o"),v=W("n6Mw"),i=W("vKoX"),A=W("P47w"),O=A.path,w=A.image,g=A.text;function C(r){return parseInt(r,10)}function c(r){return r instanceof R?O:r instanceof E?w:r instanceof S?g:O}function a(r,n){return n&&r&&n.parentNode!==r}function u(r,n,l){if(a(r,n)&&l){var L=l.nextSibling;L?r.insertBefore(n,L):r.appendChild(n)}}function m(r,n){if(a(r,n)){var l=r.firstChild;l?r.insertBefore(n,l):r.appendChild(n)}}function y(r,n){n&&r&&n.parentNode===r&&r.removeChild(n)}function T(r){return r.__textSvgEl}function x(r){return r.__svgEl}var M=function(r,n,l,L){this.root=r,this.storage=n,this._opts=l=_.extend({},l||{});var B=N("svg");B.setAttribute("xmlns","http://www.w3.org/2000/svg"),B.setAttribute("version","1.1"),B.setAttribute("baseProfile","full"),B.style.cssText="user-select:none;position:absolute;left:0;top:0;";var h=N("g");B.appendChild(h);var I=N("g");B.appendChild(I),this.gradientManager=new p(L,I),this.clipPathManager=new v(L,I),this.shadowManager=new i(L,I);var H=document.createElement("div");H.style.cssText="overflow:hidden;position:relative",this._svgDom=B,this._svgRoot=I,this._backgroundRoot=h,this._viewport=H,r.appendChild(H),H.appendChild(B),this.resize(l.width,l.height),this._visibleList=[]};M.prototype={constructor:M,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},refresh:function(){var r=this.storage.getDisplayList(!0);this._paintList(r)},setBackgroundColor:function(r){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var n=N("rect");n.setAttribute("width",this.getWidth()),n.setAttribute("height",this.getHeight()),n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("id",0),n.style.fill=r,this._backgroundRoot.appendChild(n),this._backgroundNode=n},_paintList:function(r){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var n=this._svgRoot,l=this._visibleList,L=r.length,B=[],h;for(h=0;h<L;h++){var I=r[h],H=c(I),z=x(I)||T(I);I.invisible||(I.__dirty&&(H&&H.brush(I),this.clipPathManager.update(I),I.style&&(this.gradientManager.update(I.style.fill),this.gradientManager.update(I.style.stroke),this.shadowManager.update(z,I)),I.__dirty=!1),B.push(I))}var Z=s(l,B),Y;for(h=0;h<Z.length;h++){var G=Z[h];if(G.removed)for(var ee=0;ee<G.count;ee++){var I=l[G.indices[ee]],z=x(I),J=T(I);y(n,z),y(n,J)}}for(h=0;h<Z.length;h++){var G=Z[h];if(G.added)for(var ee=0;ee<G.count;ee++){var I=B[G.indices[ee]],z=x(I),J=T(I);Y?u(n,z,Y):m(n,z),z?u(n,J,z):Y?u(n,J,Y):m(n,J),u(n,J,z),Y=J||z||Y,this.gradientManager.addWithoutUpdate(z||J,I),this.shadowManager.addWithoutUpdate(z||J,I),this.clipPathManager.markUsed(I)}else if(!G.removed)for(var ee=0;ee<G.count;ee++){var I=B[G.indices[ee]],z=x(I),J=T(I),z=x(I),J=T(I);this.gradientManager.markUsed(I),this.gradientManager.addWithoutUpdate(z||J,I),this.shadowManager.markUsed(I),this.shadowManager.addWithoutUpdate(z||J,I),this.clipPathManager.markUsed(I),J&&u(n,J,z),Y=z||J||Y}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=B},_getDefs:function(r){var n=this._svgDom,l=n.getElementsByTagName("defs");if(l.length===0)if(r){var l=n.insertBefore(N("defs"),n.firstChild);return l.contains||(l.contains=function(B){var h=l.children;if(!h)return!1;for(var I=h.length-1;I>=0;--I)if(h[I]===B)return!0;return!1}),l}else return null;else return l[0]},resize:function(r,n){var l=this._viewport;l.style.display="none";var L=this._opts;if(r!=null&&(L.width=r),n!=null&&(L.height=n),r=this._getSize(0),n=this._getSize(1),l.style.display="",this._width!==r||this._height!==n){this._width=r,this._height=n;var B=l.style;B.width=r+"px",B.height=n+"px";var h=this._svgDom;h.setAttribute("width",r),h.setAttribute("height",n)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",r),this._backgroundNode.setAttribute("height",n))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(r){var n=this._opts,l=["width","height"][r],L=["clientWidth","clientHeight"][r],B=["paddingLeft","paddingTop"][r],h=["paddingRight","paddingBottom"][r];if(n[l]!=null&&n[l]!=="auto")return parseFloat(n[l]);var I=this.root,H=document.defaultView.getComputedStyle(I);return(I[L]||C(H[l])||C(I.style[l]))-(C(H[B])||0)-(C(H[h])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var r=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
|
|
\r<`));return"data:image/svg+xml;charset=UTF-8,"+r}};function b(r){return function(){Q('In SVG mode painter not support method "'+r+'"')}}_.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(r){M.prototype[r]=b(r)});var o=M;Xe.exports=o},"3e3G":function(Xe,pe,W){var X=W("bYtY"),N=W("QuXc"),_=function(R,E,S,s,p){this.x=R==null?.5:R,this.y=E==null?.5:E,this.r=S==null?.5:S,this.type="radial",this.global=p||!1,N.call(this,s)};_.prototype={constructor:_},X.inherits(_,N);var Q=_;Xe.exports=Q},"3gBT":function(Xe,pe){var W=2311;function X(){return W++}Xe.exports=X},"49sm":function(Xe,pe){var W={}.toString;Xe.exports=Array.isArray||function(X){return W.call(X)=="[object Array]"}},"4fz+":function(Xe,pe,W){var X=W("bYtY"),N=W("1bdT"),_=W("mFDi"),Q=function(E){E=E||{},N.call(this,E);for(var S in E)E.hasOwnProperty(S)&&(this[S]=E[S]);this._children=[],this.__storage=null,this.__dirty=!0};Q.prototype={constructor:Q,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(E){return this._children[E]},childOfName:function(E){for(var S=this._children,s=0;s<S.length;s++)if(S[s].name===E)return S[s]},childCount:function(){return this._children.length},add:function(E){return E&&E!==this&&E.parent!==this&&(this._children.push(E),this._doAdd(E)),this},addBefore:function(E,S){if(E&&E!==this&&E.parent!==this&&S&&S.parent===this){var s=this._children,p=s.indexOf(S);p>=0&&(s.splice(p,0,E),this._doAdd(E))}return this},_doAdd:function(E){E.parent&&E.parent.remove(E),E.parent=this;var S=this.__storage,s=this.__zr;S&&S!==E.__storage&&(S.addToStorage(E),E instanceof Q&&E.addChildrenToStorage(S)),s&&s.refresh()},remove:function(E){var S=this.__zr,s=this.__storage,p=this._children,v=X.indexOf(p,E);return v<0?this:(p.splice(v,1),E.parent=null,s&&(s.delFromStorage(E),E instanceof Q&&E.delChildrenFromStorage(s)),S&&S.refresh(),this)},removeAll:function(){var E=this._children,S=this.__storage,s,p;for(p=0;p<E.length;p++)s=E[p],S&&(S.delFromStorage(s),s instanceof Q&&s.delChildrenFromStorage(S)),s.parent=null;return E.length=0,this},eachChild:function(E,S){for(var s=this._children,p=0;p<s.length;p++){var v=s[p];E.call(S,v,p)}return this},traverse:function(E,S){for(var s=0;s<this._children.length;s++){var p=this._children[s];E.call(S,p),p.type==="group"&&p.traverse(E,S)}return this},addChildrenToStorage:function(E){for(var S=0;S<this._children.length;S++){var s=this._children[S];E.addToStorage(s),s instanceof Q&&s.addChildrenToStorage(E)}},delChildrenFromStorage:function(E){for(var S=0;S<this._children.length;S++){var s=this._children[S];E.delFromStorage(s),s instanceof Q&&s.delChildrenFromStorage(E)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(E){for(var S=null,s=new _(0,0,0,0),p=E||this._children,v=[],i=0;i<p.length;i++){var A=p[i];if(A.ignore||A.invisible)continue;var O=A.getBoundingRect(),w=A.getLocalTransform(v);w?(s.copy(O),s.applyTransform(w),S=S||s.clone(),S.union(s)):(S=S||O.clone(),S.union(O))}return S||s}},X.inherits(Q,N);var R=Q;Xe.exports=R},"4mN7":function(Xe,pe,W){var X=W("QBsz"),N=W("Sj9i"),_=Math.min,Q=Math.max,R=Math.sin,E=Math.cos,S=Math.PI*2,s=X.create(),p=X.create(),v=X.create();function i(a,u,m){if(a.length===0)return;var y=a[0],T=y[0],x=y[0],M=y[1],b=y[1],o;for(o=1;o<a.length;o++)y=a[o],T=_(T,y[0]),x=Q(x,y[0]),M=_(M,y[1]),b=Q(b,y[1]);u[0]=T,u[1]=M,m[0]=x,m[1]=b}function A(a,u,m,y,T,x){T[0]=_(a,m),T[1]=_(u,y),x[0]=Q(a,m),x[1]=Q(u,y)}var O=[],w=[];function g(a,u,m,y,T,x,M,b,o,r){var n=N.cubicExtrema,l=N.cubicAt,L,B=n(a,m,T,M,O);for(o[0]=Infinity,o[1]=Infinity,r[0]=-Infinity,r[1]=-Infinity,L=0;L<B;L++){var h=l(a,m,T,M,O[L]);o[0]=_(h,o[0]),r[0]=Q(h,r[0])}for(B=n(u,y,x,b,w),L=0;L<B;L++){var I=l(u,y,x,b,w[L]);o[1]=_(I,o[1]),r[1]=Q(I,r[1])}o[0]=_(a,o[0]),r[0]=Q(a,r[0]),o[0]=_(M,o[0]),r[0]=Q(M,r[0]),o[1]=_(u,o[1]),r[1]=Q(u,r[1]),o[1]=_(b,o[1]),r[1]=Q(b,r[1])}function C(a,u,m,y,T,x,M,b){var o=N.quadraticExtremum,r=N.quadraticAt,n=Q(_(o(a,m,T),1),0),l=Q(_(o(u,y,x),1),0),L=r(a,m,T,n),B=r(u,y,x,l);M[0]=_(a,T,L),M[1]=_(u,x,B),b[0]=Q(a,T,L),b[1]=Q(u,x,B)}function c(a,u,m,y,T,x,M,b,o){var r=X.min,n=X.max,l=Math.abs(T-x);if(l%S<1e-4&&l>1e-4){b[0]=a-m,b[1]=u-y,o[0]=a+m,o[1]=u+y;return}if(s[0]=E(T)*m+a,s[1]=R(T)*y+u,p[0]=E(x)*m+a,p[1]=R(x)*y+u,r(b,s,p),n(o,s,p),T=T%S,T<0&&(T=T+S),x=x%S,x<0&&(x=x+S),T>x&&!M?x+=S:T<x&&M&&(T+=S),M){var L=x;x=T,T=L}for(var B=0;B<x;B+=Math.PI/2)B>T&&(v[0]=E(B)*m+a,v[1]=R(B)*y+u,r(b,v,b),n(o,v,o))}pe.fromPoints=i,pe.fromLine=A,pe.fromCubic=g,pe.fromQuadratic=C,pe.fromArc=c},"55Ip":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return u}),W.d(pe,"b",function(){return b});var X=W("Ty5D"),N=W("dI71"),_=W("q1tI"),Q=W.n(_),R=W("YS25"),E=W("17x9"),S=W.n(E),s=W("wx14"),p=W("zLVn"),v=W("9R94"),i=function(r){Object(N.a)(n,r);function n(){for(var L,B=arguments.length,h=new Array(B),I=0;I<B;I++)h[I]=arguments[I];return L=r.call.apply(r,[this].concat(h))||this,L.history=Object(R.a)(L.props),L}var l=n.prototype;return l.render=function(){return Q.a.createElement(X.c,{history:this.history,children:this.props.children})},n}(Q.a.Component),A=function(r){Object(N.a)(n,r);function n(){for(var L,B=arguments.length,h=new Array(B),I=0;I<B;I++)h[I]=arguments[I];return L=r.call.apply(r,[this].concat(h))||this,L.history=Object(R.b)(L.props),L}var l=n.prototype;return l.render=function(){return Q.a.createElement(X.c,{history:this.history,children:this.props.children})},n}(Q.a.Component),O=function(n,l){return typeof n=="function"?n(l):n},w=function(n,l){return typeof n=="string"?Object(R.c)(n,null,null,l):n},g=function(n){return n},C=Q.a.forwardRef;typeof C=="undefined"&&(C=g);function c(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}var a=C(function(r,n){var l=r.innerRef,L=r.navigate,B=r.onClick,h=Object(p.a)(r,["innerRef","navigate","onClick"]),I=h.target,H=Object(s.a)({},h,{onClick:function(Z){try{B&&B(Z)}catch(Y){throw Z.preventDefault(),Y}!Z.defaultPrevented&&Z.button===0&&(!I||I==="_self")&&!c(Z)&&(Z.preventDefault(),L())}});return g!==C?H.ref=n||l:H.ref=l,Q.a.createElement("a",H)}),u=C(function(r,n){var l=r.component,L=l===void 0?a:l,B=r.replace,h=r.to,I=r.innerRef,H=Object(p.a)(r,["component","replace","to","innerRef"]);return Q.a.createElement(X.e.Consumer,null,function(z){z||Object(v.a)(!1);var Z=z.history,Y=w(O(h,z.location),z.location),G=Y?Z.createHref(Y):"",ee=Object(s.a)({},H,{href:G,navigate:function(){var oe=O(h,z.location),se=B?Z.replace:Z.push;se(oe)}});return g!==C?ee.ref=n||I:ee.innerRef=I,Q.a.createElement(L,ee)})});if(!1)var m,y;var T=function(n){return n},x=Q.a.forwardRef;typeof x=="undefined"&&(x=T);function M(){for(var r=arguments.length,n=new Array(r),l=0;l<r;l++)n[l]=arguments[l];return n.filter(function(L){return L}).join(" ")}var b=x(function(r,n){var l=r["aria-current"],L=l===void 0?"page":l,B=r.activeClassName,h=B===void 0?"active":B,I=r.activeStyle,H=r.className,z=r.exact,Z=r.isActive,Y=r.location,G=r.sensitive,ee=r.strict,J=r.style,oe=r.to,se=r.innerRef,Te=Object(p.a)(r,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Q.a.createElement(X.e.Consumer,null,function(be){be||Object(v.a)(!1);var xe=Y||be.location,Oe=w(O(oe,xe),xe),Ne=Oe.pathname,Le=Ne&&Ne.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Se=Le?Object(X.f)(xe.pathname,{path:Le,exact:z,sensitive:G,strict:ee}):null,tt=!!(Z?Z(Se,xe):Se),Bt=tt?M(H,h):H,De=tt?Object(s.a)({},J,{},I):J,Qe=Object(s.a)({"aria-current":tt&&L||null,className:Bt,style:De,to:Oe},Te);return T!==x?Qe.ref=n||se:Qe.innerRef=se,Q.a.createElement(u,Qe)})});if(!1)var o},"59Ip":function(Xe,pe,W){var X=W("Sj9i");function N(_,Q,R,E,S,s,p,v,i,A,O){if(i===0)return!1;var w=i;if(O>Q+w&&O>E+w&&O>s+w&&O>v+w||O<Q-w&&O<E-w&&O<s-w&&O<v-w||A>_+w&&A>R+w&&A>S+w&&A>p+w||A<_-w&&A<R-w&&A<S-w&&A<p-w)return!1;var g=X.cubicProjectPoint(_,Q,R,E,S,s,p,v,A,O,null);return g<=w/2}pe.containStroke=N},"5gs/":function(Xe,pe,W){"use strict";W.r(pe);var X=W("cWXX"),N=W("/ezw"),_=W("g9YV"),Q=W("wCAj"),R=W("/zsF"),E=W("PArb"),S=W("14J3"),s=W("BMrR"),p=W("+L6B"),v=W("2/Rp"),i=W("jCWc"),A=W("kPKH"),O=W("sPJy"),w=W("bE4q"),g=W("miYZ"),C=W("tsqr"),c=W("2qtc"),a=W("kLXV"),u=W("9og8"),m=W("Pv/L"),y=W("k1fw"),T=W("tJVT"),x=W("PpiC"),M=W("WmNS"),b=W.n(M),o=W("q1tI"),r=W.n(o),n=W("wd/R"),l=W.n(n),L=W("xOOu"),B=W.n(L),h=W("Ty5D"),I=W("9kvl"),H=W("55Ip"),z=W("jhfD"),Z=W("CTES"),Y=W("RCxd"),G=W("/MfK"),ee=W("m3rI"),J=W("xKgJ"),oe=W("1vsH"),se=W("cVA7"),Te=W.n(se),be=W("z9Ch"),xe=W.n(be),Oe={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},Ne=function(we){var ze,Je,Et,Ft,Nt,ht=we.shixunHomeworks,Lt=we.globalSetting,st=we.loading,rt=we.dispatch,et=Object(h.i)(),Ce=Object(h.h)(),Ue=Object(o.useState)([]),ct=Object(T.a)(Ue,2),at=ct[0],Tt=ct[1],Ct=Object(o.useState)(Ce.query.tabs||0),qe=Object(T.a)(Ct,2),St=qe[0],Ht=qe[1],Pt=ht.shixunWorkReport,zt=((ze=Pt.echart_data)===null||ze===void 0?void 0:ze.efficiency_list.length)-parseInt((Je=Pt.echart_data)===null||Je===void 0?void 0:Je.myself_eff[0]),Ir=function(){var jt,Mr,Wr;return{title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(mr){if(mr.name===Pt.username){var Sr;return"\u59D3\u540D\uFF1A"+Pt.username+"<br/>\u5B66\u53F7\uFF1A "+Pt.user_id+"<br/>\u6548\u7387\uFF1A"+((Sr=Pt.echart_data)===null||Sr===void 0?void 0:Sr.myself_eff[1])}else return mr.name+":"+mr.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:(jt=Pt.echart_data)===null||jt===void 0?void 0:jt.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:Pt.username,xAxis:zt,yAxis:(Mr=Pt.echart_data)===null||Mr===void 0?void 0:Mr.myself_eff[1],value:(Wr=Pt.echart_data)===null||Wr===void 0?void 0:Wr.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},Rr=function(){var jt,Mr,Wr,Ur;return{title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Sr){var Cn=Sr.value;if(Sr.name===Pt.username){var dn;return"\u59D3\u540D\uFF1A"+Pt.username+"<br/>\u5B66\u53F7\uFF1A "+Pt.user_id+"<br/>\u5F97\u5206\uFF1A"+((dn=Pt.echart_data)===null||dn===void 0?void 0:dn.myself_object[1])}}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Oe,data:(jt=Pt.echart_data)===null||jt===void 0?void 0:jt.consume_list,symbolSize:function(Sr){return Math.round(Sr[2])},markPoint:{data:[{name:Pt.username,xAxis:(Mr=Pt.echart_data)===null||Mr===void 0?void 0:Mr.myself_object[0],yAxis:(Wr=Pt.echart_data)===null||Wr===void 0?void 0:Wr.myself_object[1],value:(Ur=Pt.echart_data)===null||Ur===void 0?void 0:Ur.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return r.a.createElement(r.a.Fragment,null,r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(s.a,null,r.a.createElement(A.a,{flex:"800px"},r.a.createElement(Te.a,{style:{width:750,height:580},option:Ir()})),r.a.createElement(A.a,{flex:"1"},r.a.createElement("aside",{className:xe.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Pt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Pt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Et=Pt.echart_data)===null||Et===void 0?void 0:Et.myself_eff[1])),r.a.createElement("li",null,r.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Ft=Pt.echart_data)===null||Ft===void 0?void 0:Ft.myself_eff[0]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",r.a.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(s.a,null,r.a.createElement(A.a,{flex:"800px"},r.a.createElement(Te.a,{style:{width:750,height:580},option:Rr()})),r.a.createElement(A.a,{flex:"1"},r.a.createElement("aside",{className:xe.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Pt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Pt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u80FD\u529B")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Nt=Pt.echart_data)===null||Nt===void 0?void 0:Nt.myself_object[1]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",r.a.createElement("br",null)))))))},Le=Object(I.a)(function(ge){var we=ge.shixunHomeworks,ze=ge.loading,Je=ge.globalSetting;return{shixunHomeworks:we,globalSetting:Je,loading:ze.effects}})(Ne),Se=W("giR+"),tt=W("fyUT"),Bt=function(ge){var we=ge.defaultValue,ze=ge.onBlur,Je=ge.max,Et=ge.className,Ft=Et===void 0?"game-score":Et,Nt=Object(o.useState)(we),ht=Object(T.a)(Nt,2),Lt=ht[0],st=ht[1];Object(o.useEffect)(function(){st(we)},[we]);function rt(Ce){st(Ce)}function et(){Lt!==we&&ze(Lt>Je?Je:Lt)}return r.a.createElement(tt.a,{max:Je,min:0,className:Ft,value:Lt,onChange:rt,onBlur:et})},De=W("OaEy"),Qe=W("2fM7"),it=W("ZW9T"),Ae=W("Ot1p"),re=W("1eJ8"),ie=W.n(re),ce=Qe.a.Option,Be={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Re;(function(ge){ge[ge.SET_PATH=0]="SET_PATH",ge[ge.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Re||(Re={}));function ke(ge,we){switch(we.type){case Re.SET_PATH:return Object(y.a)(Object(y.a)({},ge),{},{selectedPath:we.payload});case Re.GET_PASSED_CONTENT:return Object(y.a)(Object(y.a)({},ge),{},{passedContent:we.payload});default:throw new Error}}var ft=function(ge){var we,ze,Je,Et,Ft=ge.path,Nt=ge.game_id,ht=ge.onPathChange,Lt=ge.autoHeight,st=ge.diff_code_count,rt=ge.data,et=Ft.split("\uFF1B").filter(function(St){return!!St}),Ce=Object(o.useReducer)(ke,{selectedPath:et[0],passedContent:{language:"python",content:""}}),Ue=Object(T.a)(Ce,2),ct=Ue[0],at=Ue[1],Tt=ct.selectedPath,Ct=ct.passedContent;function qe(St){at({type:Re.SET_PATH,payload:St})}return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null," ",r.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),st&&r.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",st),r.a.createElement("span",null,r.a.createElement(Qe.a,{style:{width:200},value:Tt,onChange:qe}," ",et.map(function(St){return r.a.createElement(ce,{key:St,value:St},St)})," "))," "),(Tt==null?void 0:Tt.split(".")[1])==="md"&&r.a.createElement(Ae.a,{height:300,autoHeight:Lt,defaultValue:(rt==null||((we=rt.filter(function(St){return St.path===Tt}))===null||we===void 0||((ze=we[0])===null||ze===void 0))?void 0:ze.content)||"",className:ie.a.md}),(Tt==null?void 0:Tt.split(".")[1])!=="md"&&r.a.createElement(it.b,{height:300,language:Ct.language,value:(rt==null||((Je=rt.filter(function(St){return St.path===Tt}))===null||Je===void 0||((Et=Je[0])===null||Et===void 0))?void 0:Et.content)||"",autoHeight:Lt,theme:"default",options:Be}))},pt=W("ErOA"),bt=function(we){var ze=we.shixunHomeworks,Je=we.autoHeight,Et=we.dispatch,Ft=ze.shixunWorkReport,Nt=Ft.stage_list,ht=Ft.work_id,Lt=Object(h.i)(),st=Object(J.c)(),rt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"}];function et(at,Tt){return Ce.apply(this,arguments)}function Ce(){return Ce=Object(u.a)(b.a.mark(function at(Tt,Ct){var qe,St;return b.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return qe=Nt[Tt].challenge_id,Pt.next=3,Et({type:"shixunHomeworks/changeScore",payload:{categoryId:Lt.homeworkId,type:"report",score:Ct,challenge_id:qe}});case 3:return St=Pt.sent,Pt.next=6,Et({type:"shixunHomeworks/getShixunWorkReport",payload:Object(y.a)({},Lt)});case 6:St.status===0&&C.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return Pt.stop()}},at)})),Ce.apply(this,arguments)}function Ue(at,Tt){return Object(pt.c)("student_works/".concat(ht,"/rep_passed_content.json"),{path:Tt,game_id:at})}var ct=Object(oe.n)(5,Ft.shixun_detail);return r.a.createElement(r.a.Fragment,null,ct==null?void 0:ct.map(function(at,Tt){return r.a.createElement("div",{key:Tt},at.map(function(Ct,qe){var St;return r.a.createElement("aside",{className:"pl30 pr30",key:qe},r.a.createElement("div",{className:"".concat(xe.a.shixunTitle," mt10")},r.a.createElement("div",null,r.a.createElement("span",{className:"fa fa-code "}),r.a.createElement("strong",{className:"c-black"},"\u7B2C",Tt*5+qe+1,"\u5173 ",r.a.createElement(H.a,{className:"c-black",to:"/tasks/".concat(Ct.game_identifier)},Ct.subject))),st?r.a.createElement("span",null,"\u8C03\u5206\uFF1A",r.a.createElement(Bt,{className:"game-score",max:Nt[qe].game_score_full,defaultValue:Nt[qe].game_score,onBlur:function(Pt){et(qe,Pt)}})):null),r.a.createElement("div",{className:"font16 mt10"},Ct.st===0&&Ct.complete_status===0&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",Ct.st===0&&Ct.complete_status!==0&&(Ct.path?r.a.createElement("aside",{className:xe.a.shixunWrp},r.a.createElement(ft,{autoHeight:Je,path:Ct.path,game_id:Ct.id,data:Ct.game_codes,diff_code_count:Ct.diff_code_count,onPathChange:Ue})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),Ct.st===1&&(Ct.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),r.a.createElement("aside",{className:"mt10 font16"},(St=Ct.outputs)!==null&&St!==void 0&&St.length?r.a.createElement(Q.a,{columns:rt,pagination:{hideOnSinglePage:!0},dataSource:Ct.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},yt=Object(I.a)(function(ge){var we=ge.shixunHomeworks,ze=ge.loading,Je=ge.globalSetting;return{shixunHomeworks:we,globalSetting:Je,loading:ze.effects}})(bt),_t=W("5NDa"),It=W("5rEg"),He=W("y8nQ"),Pe=W("Vl3Y"),At=function(we){var ze=we.shixunHomeworks,Je=we.dispatch,Et=Object(x.a)(we,["shixunHomeworks","dispatch"]),Ft=Object(h.i)(),Nt=Object(o.useState)(!1),ht=Object(T.a)(Nt,2),Lt=ht[0],st=ht[1],rt=Pe.a.useForm(),et=Object(T.a)(rt,1),Ce=et[0];Object(o.useEffect)(function(){var ct,at,Tt,Ct;ze.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Ce.setFieldsValue({comment:(ct=ze.actionTabs.selectArrs)===null||ct===void 0||((at=ct.data)===null||at===void 0)?void 0:at.work_comment,hidden_comment:(Tt=ze.actionTabs.selectArrs)===null||Tt===void 0||((Ct=Tt.data)===null||Ct===void 0)?void 0:Ct.work_comment_hidden})},[ze.actionTabs.key]);var Ue=function(){var ct=Object(u.a)(b.a.mark(function at(){var Tt,Ct;return b.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return Tt=Ce.getFieldValue(),St.next=3,Object(pt.a)("/api/student_works/".concat(Ft.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:Tt.hidden_comment,comment:Tt.comment}});case 3:Ct=St.sent,Ct.status===0&&(C.b.success("\u8BC4\u9605\u6210\u529F"),Ce.resetFields(),Je({type:"shixunHomeworks/setActionTabs",payload:{}}),Je({type:"shixunHomeworks/getShixunWorkReport",payload:Object(y.a)({},Ft)}));case 5:case"end":return St.stop()}},at)}));return function(){return ct.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(a.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:ze.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(u.a)(b.a.mark(function ct(){var at;return b.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:at=Ce.getFieldValue(),JSON.stringify(at)==="{}"||at.hidden_comment===""&&at.comment===""?st(!0):Ue();case 2:case"end":return Ct.stop()}},ct)})),onCancel:function(){Je({type:"shixunHomeworks/setActionTabs",payload:{}})}},r.a.createElement(Pe.a,{form:Ce,onChange:function(){Lt&&st(!1)}},r.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"comment"},r.a.createElement(It.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),r.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"hidden_comment"},r.a.createElement(It.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Lt&&r.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},mt=Object(I.a)(function(ge){var we=ge.shixunHomeworks;return{shixunHomeworks:we}})(At),Ze=W("Xm8N"),ut=W("9Bee"),Ke=W("XYT7"),Ie=W("1n7x"),Me=W.n(Ie),me=function(we){var ze,Je,Et=we.shixunHomeworks,Ft=we.globalSetting,Nt=we.loading,ht=we.dispatch,Lt=Object(x.a)(we,["shixunHomeworks","globalSetting","loading","dispatch"]),st=Object(o.useState)(Object(y.a)({},Object(h.i)())),rt=Object(T.a)(st,2),et=rt[0],Ce=rt[1],Ue=Object(h.i)(),ct=Object(o.useState)([]),at=Object(m.a)(ct),Tt=Object(o.useState)({last:!1}),Ct=Object(T.a)(Tt,2),qe=Ct[0],St=Ct[1],Ht=Object(o.useState)({last:!1}),Pt=Object(T.a)(Ht,2),zt=Pt[0],Ir=Pt[1],Rr=Object(o.useRef)(),yr=Object(o.useRef)(),jt=Object(o.useState)(!1),Mr=Object(T.a)(jt,2),Wr=Mr[0],Ur=Mr[1],mr=Object(o.useState)(!1),Sr=Object(T.a)(mr,2),Cn=Sr[0],dn=Sr[1],fe=Object(o.useState)(!1),ye=Object(T.a)(fe,2),Fe=ye[0],nt=ye[1],$e=Et.shixunWorkReport,Rt=Object(J.c)(),$=Object(o.useState)(new B.a),F=Object(T.a)($,2),P=F[0],q=F[1],le=Object(o.useState)(0),te=Object(T.a)(le,2),je=te[0],xt=te[1],ot=Object(o.useState)([]),kt=Object(T.a)(ot,2),wt=kt[0],Yt=kt[1],Gt=Object(o.useState)(!1),Jt=Object(T.a)(Gt,2),hr=Jt[0],Fr=Jt[1],gr=Object(o.useState)(!1),Lr=Object(T.a)(gr,2),fr=Lr[0],Hr=Lr[1];Object(o.useEffect)(function(){return ht({type:"globalSetting/footerToggle",payload:!1}),function(){ht({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(o.useEffect)(function(){Et.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&wt.length>0&&Gr("all")},[wt]),Object(o.useEffect)(function(){Ce(Object(y.a)({},Ue))},[Lt.location.pathname]);var Pr=function(){document.body.scrollIntoView()};function on(){return Yr.apply(this,arguments)}function Yr(){return Yr=Object(u.a)(b.a.mark(function Er(){var cr,nr,tr,$t,vr,Cr,_r;return b.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return tr=JSON.parse(sessionStorage.all_student_works_params||"{}"),kn.next=3,ht({type:"shixunHomeworks/getAllStudentWorks",payload:Object(y.a)(Object(y.a)({},et),tr)});case 3:$t=kn.sent,Yt($t.all_student_works),vr=(cr=$t.all_student_works)===null||cr===void 0?void 0:cr.map(function(Vr){return String(Vr.student_work_id)}).indexOf(et.homeworkId),vr===((nr=$t.all_student_works)===null||nr===void 0?void 0:nr.length)-1?St({last:!0}):St((Cr=$t.all_student_works)===null||Cr===void 0?void 0:Cr[vr+1]),vr===0?Ir({last:!0}):Ir((_r=$t.all_student_works)===null||_r===void 0?void 0:_r[vr-1]);case 8:case"end":return kn.stop()}},Er)})),Yr.apply(this,arguments)}var tn=function(){document.querySelectorAll("canvas").forEach(function(cr){(!cr.clientWidth||!cr.clientHeight)&&cr.remove()})},sn=function(){Rr.current.offsetHeight>62e3?nt(!1):nt(!0)},Gr=function(){var Er=Object(u.a)(b.a.mark(function cr(nr){var tr,$t,vr,Cr,_r,wr;return b.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(_r=function(){return _r=Object(u.a)(b.a.mark(function Dn(){var wn;return b.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,ht({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:wt[tr].student_work_id}});case 2:wn=Jn.sent,Pr(),tr++,setTimeout(Object(u.a)(b.a.mark(function In(){var Vn,Rn,si,Ln,hn,Nn,ui;return b.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:tn(),Rn=P.folder("".concat(wn==null?void 0:wn.username)),si=document.querySelector("#export-all").children,Ln=Me()(),hn=b.a.mark(function Fn(Zn){return b.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Ar.next=2,Ln.set(vr).from(si[Zn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var lr=Object(u.a)(b.a.mark(function Or(Qr){return b.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(!(Zn<si.length-1)){Dr.next=3;break}return Dr.next=3,Qr.addPage();case 3:case"end":return Dr.stop()}},Or)}));return function(Or){return lr.apply(this,arguments)}}());case 2:case"end":return Ar.stop()}},Fn)}),Nn=0;case 6:if(!(Nn<si.length)){gn.next=11;break}return gn.delegateYield(hn(Nn),"t0",8);case 8:Nn++,gn.next=6;break;case 11:Rn.file("".concat(wt[tr-1].student_work_user_name).concat(tr,".pdf"),Ln.output("blob")),ui=Rn.folder("\u4EE3\u7801\u6587\u4EF6"),wn==null||((Vn=wn.shixun_detail)===null||Vn===void 0)||Vn.map(function(Fn,Zn){var er,Ar=ui.folder("\u7B2C".concat(Zn+1,"\u5173-").concat(Fn.subject,"-").concat(Fn.id));Fn==null||((er=Fn.game_codes)===null||er===void 0)||er.map(function(lr){Ar.file("".concat(lr.filename,".txt"),lr==null?void 0:lr.content)})}),$t.update({content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},tr),"/",wt==null?void 0:wt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),tr==(wt==null?void 0:wt.length)?($t.destroy(),rn()):Cr();case 16:case"end":return gn.stop()}},In)})),2200);case 6:case"end":return Jn.stop()}},Dn)})),_r.apply(this,arguments)},Cr=function(){return _r.apply(this,arguments)},tr=0,$t=a.a.info({width:460,title:r.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",r.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},tr+1),"/",nr!=="all"?1:wt==null?void 0:wt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:xe.a.modal,onOk:function(){}}),vr={margin:[0,0],filename:"".concat($e.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(nr!=="all"||(wt==null?void 0:wt.length)<2)){Vr.next=12;break}return Vr.delegateYield(b.a.mark(function nn(){var Dn,wn,Jr,Jn,In,Vn,Rn;return b.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:tn(),Pr(),wn=yr.current.children,Jr=Me()(),Jn=P.folder("".concat($e==null?void 0:$e.username)),In=b.a.mark(function hn(Nn){return b.a.wrap(function(hi){for(;;)switch(hi.prev=hi.next){case 0:return hi.next=2,Jr.set(vr).from(wn[Nn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var gn=Object(u.a)(b.a.mark(function Fn(Zn){return b.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:if(!(Nn<wn.length-1)){Ar.next=3;break}return Ar.next=3,Zn.addPage();case 3:case"end":return Ar.stop()}},Fn)}));return function(Fn){return gn.apply(this,arguments)}}());case 2:case"end":return hi.stop()}},hn)}),Vn=0;case 7:if(!(Vn<wn.length)){Ln.next=12;break}return Ln.delegateYield(In(Vn),"t0",9);case 9:Vn++,Ln.next=7;break;case 12:return Ur(!1),Jn.file("".concat($e.username,".pdf"),Jr.output("blob"),{base64:!1}),Rn=Jn.folder("\u4EE3\u7801\u6587\u4EF6"),$e==null||((Dn=$e.shixun_detail)===null||Dn===void 0)||Dn.map(function(hn,Nn){var ui,hi=Rn.folder("\u7B2C".concat(Nn+1,"\u5173-").concat(hn.subject,"-").concat(hn.id));hn==null||((ui=hn.game_codes)===null||ui===void 0)||ui.map(function(gn){hi.file("".concat(gn.filename,".txt"),gn==null?void 0:gn.content)})}),$t.destroy(),rn(),Ln.abrupt("return",{v:void 0});case 19:case"end":return Ln.stop()}},nn)})(),"t0",7);case 7:if(wr=Vr.t0,!(typeof wr=="object")){Vr.next=10;break}return Vr.abrupt("return",wr.v);case 10:Vr.next=13;break;case 12:Cr();case 13:case"end":return Vr.stop()}},cr)}));return function(nr){return Er.apply(this,arguments)}}(),rn=function(){P.generateAsync({type:"blob"}).then(function(cr){var nr=document.createElement("a");nr.href=window.URL.createObjectURL(cr),nr.download=$e.course_name+".zip",document.body.appendChild(nr);var tr=document.createEvent("MouseEvents");tr.initEvent("click",!1,!1),nr.dispatchEvent(tr),document.body.removeChild(nr),q(new B.a)}),nt(!1)};Object(o.useEffect)(function(){ln()},[et.homeworkId]);var ln=function(){var Er=Object(u.a)(b.a.mark(function cr(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return dn(!0),tr.next=3,ht({type:"shixunHomeworks/getShixunWorkReport",payload:Object(y.a)({},et)});case 3:dn(!1),Object(J.c)()&&on();case 5:case"end":return tr.stop()}},cr)}));return function(){return Er.apply(this,arguments)}}(),$r=[{title:"\u5173\u5361",dataIndex:"name",render:function(cr,nr,tr){return tr+1}},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name"},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:function(cr,nr,tr){return cr||"- -"}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:function(cr){return cr?"\u662F":"\u5426"}},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:function(cr,nr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},nr.myself_experience),"/",cr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(cr,nr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},cr),"/",nr.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(cr,nr){return Rt?r.a.createElement(Bt,{max:nr.game_score_full,defaultValue:parseFloat(cr),onBlur:function(){var tr=Object(u.a)(b.a.mark(function $t(vr){var Cr;return b.a.wrap(function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.next=2,ht({type:"shixunHomeworks/changeScore",payload:{categoryId:et.homeworkId,type:"report",score:vr,challenge_id:nr.challenge_id}});case 2:return Cr=wr.sent,wr.next=5,ht({type:"shixunHomeworks/getShixunWorkReport",payload:Object(y.a)({},et)});case 5:Cr.status===0&&C.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return wr.stop()}},$t)}));return function($t){return tr.apply(this,arguments)}}()}):cr}}],un=function(cr){ht({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){cr==="next"?I.d.push("/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/").concat(qe==null?void 0:qe.student_work_id,"/comment")):I.d.push("/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/").concat(zt==null?void 0:zt.student_work_id,"/comment"))},200)};return r.a.createElement("section",{className:"bg-fafafa mb100",style:{position:"sticky",top:0}},r.a.createElement("div",{className:"edu-container mt10"},r.a.createElement(N.a,{loading:Cn,active:!0,avatar:{size:40},paragraph:{rows:5}},r.a.createElement("div",{className:"edu-container"},$e.course_id&&r.a.createElement("section",{className:"animated fadeIn"},r.a.createElement("aside",{className:""},$e.category&&r.a.createElement(w.a,{separator:">"},r.a.createElement(w.a.Item,null,r.a.createElement(H.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework")},$e.course_name)),r.a.createElement(w.a.Item,null,r.a.createElement(H.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework/").concat($e.category.main?"":$e.category.category_id)},$e.category.category_name)),r.a.createElement(w.a.Item,null,r.a.createElement(H.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework/").concat($e.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),r.a.createElement(w.a.Item,null,$e.username))),r.a.createElement("aside",{className:[xe.a.title1,"mt20"].join(" ")},r.a.createElement(s.a,{align:"middle"},r.a.createElement(A.a,{flex:1},r.a.createElement(H.a,{to:"/classrooms/".concat($e.course_id,"/shixun_homework/").concat($e.homework_common_id,"/detail")},r.a.createElement(z.a,{className:"font16 c-black"})),r.a.createElement("strong",{className:"font20 ml5"},$e.shixun_name),r.a.createElement(oe.k,{temporary:!0,status:$e.homework_status})),r.a.createElement(A.a,{className:xe.a.title1_right},$e.view_tpi&&r.a.createElement(v.a,null,r.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),r.a.createElement(H.a,{className:"c-black",target:"_blank",to:"/tasks/".concat($e==null||((ze=$e.shixun_detail)===null||ze===void 0||((Je=ze[0])===null||Je===void 0))?void 0:Je.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(J.c)()&&$e.homework_end===!1&&!!$e.myshixun_id&&r.a.createElement(v.a,{className:"ml10",onClick:Object(u.a)(b.a.mark(function Er(){return b.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return nr.next=2,ht({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:$e.myshixun_identifier}}});case 2:case"end":return nr.stop()}},Er)}))},r.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),r.a.createElement(v.a,{className:"ml10",onClick:function(){return Gr("")},loading:Wr},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(J.c)()&&(wt==null?void 0:wt.length)>1&&r.a.createElement(v.a,{className:"ml10",onClick:function(){return Gr("all")}},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),r.a.createElement("aside",{className:"mt30 relative"})),r.a.createElement("aside",{className:"edu-container bg-white",ref:Rr},r.a.createElement("div",{id:"export-all",ref:yr},r.a.createElement("div",{id:"export-all-1"},r.a.createElement("div",{className:xe.a.title},r.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),r.a.createElement("div",null,Object(J.c)()&&r.a.createElement(v.a,{className:"mr20",type:"primary",onClick:function(){ht({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:$e.user_id,data:Object(y.a)({},$e)}}})}},r.a.createElement(Z.a,null),$e.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),r.a.createElement(E.a,{style:{marginTop:0}}),r.a.createElement(s.a,{className:"pl30 pr30"},r.a.createElement(A.a,null,r.a.createElement("img",{className:xe.a.userPic,src:"".concat(ee.a.IMG_SERVER,"/images/").concat($e.image_url),alt:$e.username})),r.a.createElement(A.a,null,r.a.createElement("span",{className:"font16 ml40"},$e.username),r.a.createElement(oe.e,{status:$e.compelete_status}),r.a.createElement("ul",{className:xe.a.userInfo},r.a.createElement("li",null,"\u5B66\u53F7\uFF1A",$e.student_id||"--"),r.a.createElement("li",null,"\u5206\u73ED\uFF1A",$e.group_name||"--"),r.a.createElement("br",null),r.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},$e.complete_count),"/",r.a.createElement("span",{className:"c-red"},$e.challenges_count)),r.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},$e.current_complete_count||"-"),"/",r.a.createElement("span",{className:"c-red"},$e.challenges_count)),r.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",$e&&$e.efficiency===null?"--":$e&&$e.efficiency),r.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",$e&&$e.max_efficiency===null?"--":$e&&$e.max_efficiency))),r.a.createElement("ul",{className:[xe.a.listItem,"mt10"].join(" ")},r.a.createElement("li",null,r.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),r.a.createElement("div",{className:"c-light-black mt20"},$e&&$e.passed_time===null||$e&&$e.passed_time==="--"?"--":l()($e&&$e.passed_time).format("YYYY-MM-DD HH:mm"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",r.a.createElement("i",{onClick:function(cr){cr.stopPropagation(),cr.preventDefault(),Fr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},$e==null?void 0:$e.human_training_time_rules)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",r.a.createElement("i",{onClick:function(cr){cr.stopPropagation(),cr.preventDefault(),Hr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},$e.time_consuming)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),r.a.createElement("div",{className:"mt20"},$e.evaluate_count)),($e==null?void 0:$e.eff_score_full)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,r.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},$e.challenge_score),"/",r.a.createElement("span",{className:"c-light-black"},$e.challenge_score_full))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6548\u7387\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},$e.eff_score),"/",r.a.createElement("span",{className:"c-light-black"},$e.eff_score_full)))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",null,$e.late_penalty||"- -"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},$e.work_score),"/",r.a.createElement("span",{className:"c-light-black"},$e.all_work_score))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u603B\u8BC4"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},$e.overall_appraisal))))),r.a.createElement(E.a,{style:{margin:0}}),($e.work_comment_hidden||$e.work_comment)&&r.a.createElement("div",null,r.a.createElement(s.a,{align:"middle"},r.a.createElement(A.a,{flex:1},r.a.createElement("h1",{className:xe.a.title},"\u70B9\u8BC4\u5185\u5BB9")),r.a.createElement(A.a,{className:"pr30"},Object(J.c)()&&r.a.createElement(v.a,{onClick:Object(u.a)(b.a.mark(function Er(){return b.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:a.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:r.a.createElement(Y.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(u.a)(b.a.mark(function $t(){var vr;return b.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,Object(Ke.m)({comment_id:$e.comment_id,homeworkId:et.homeworkId});case 2:vr=_r.sent,vr.status===0&&(C.b.success("\u5220\u9664\u6210\u529F"),ht({type:"shixunHomeworks/getShixunWorkReport",payload:Object(y.a)({},et)}));case 4:case"end":return _r.stop()}},$t)}))()}});case 1:case"end":return nr.stop()}},Er)}))},r.a.createElement(G.a,null),"\u5220\u9664"))),r.a.createElement(E.a,{style:{margin:0}}),$e.work_comment&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(ut.a,{value:$e.work_comment})),$e.work_comment_hidden&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(ut.a,{value:$e.work_comment_hidden}))),r.a.createElement("h1",{className:xe.a.title},"\u9636\u6BB5\u6210\u7EE9"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(Q.a,{dataSource:$e.stage_list,pagination:!1,columns:$r})),($e==null?void 0:$e.work_description)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:xe.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(ut.a,{value:$e==null?void 0:$e.work_description}))),r.a.createElement("h1",{className:xe.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),r.a.createElement(Le,null),r.a.createElement("h1",{className:xe.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),r.a.createElement(yt,{autoHeight:Fe}))),Object(J.c)()&&r.a.createElement("aside",{className:"".concat(xe.a.footerBar," ").concat(Wr?xe.a.footerBarStatic:"")},r.a.createElement("aside",{className:"edu-container"},r.a.createElement(s.a,{align:"middle"},r.a.createElement(A.a,{flex:"1"},r.a.createElement(H.a,{className:xe.a.exitComment,to:"/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),r.a.createElement(A.a,{flex:"1",className:"tr"},r.a.createElement(v.a,{type:"default",disabled:zt==null?void 0:zt.last,onClick:function(){return un()}},"\u4E0A\u4E00\u4E2A"),r.a.createElement(v.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:qe==null?void 0:qe.last,onClick:function(){return un("next")}},"\u4E0B\u4E00\u4E2A"),Object(J.c)()&&r.a.createElement(v.a,{type:"primary",onClick:Object(u.a)(b.a.mark(function Er(){return b.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:ht({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:$e.user_id,data:Object(y.a)({},$e)}}});case 1:case"end":return nr.stop()}},Er)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),r.a.createElement(mt,null),r.a.createElement(Ze.a,null),r.a.createElement(a.a,{visible:hr,width:860,centered:!0,onCancel:function(){Fr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},r.a.createElement("div",{style:{color:"#333333",fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),r.a.createElement("br",null),r.a.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u5373\u65F6\u901A\u5173\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u8BA1\u65F6\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),r.a.createElement(a.a,{visible:fr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Hr(!1)},width:600},r.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},r.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5373\u65F6\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},Ee=pe.default=Object(I.a)(function(ge){var we=ge.shixunHomeworks,ze=ge.loading,Je=ge.globalSetting;return{shixunHomeworks:we,globalSetting:Je,loading:ze.effects}})(me)},"6+eU":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return x});var X=W("wx14"),N=W("rePB"),_=W("VTBJ"),Q=W("1OyB"),R=W("vuIU"),E=W("Ji7U"),S=W("LK+K"),s=W("q1tI"),p=W.n(s),v=W("TSYQ"),i=W.n(v),A=function(b){var o,r="".concat(b.rootPrefixCls,"-item"),n=i()(r,"".concat(r,"-").concat(b.page),(o={},Object(N.a)(o,"".concat(r,"-active"),b.active),Object(N.a)(o,b.className,!!b.className),Object(N.a)(o,"".concat(r,"-disabled"),!b.page),o)),l=function(){b.onClick(b.page)},L=function(h){b.onKeyPress(h,b.onClick,b.page)};return p.a.createElement("li",{title:b.showTitle?b.page:null,className:n,onClick:l,onKeyPress:L,tabIndex:"0"},b.itemRender(b.page,"page",p.a.createElement("a",{rel:"nofollow"},b.page)))},O=A,w={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},g=function(M){Object(E.a)(o,M);var b=Object(S.a)(o);function o(){var r;Object(Q.a)(this,o);for(var n=arguments.length,l=new Array(n),L=0;L<n;L++)l[L]=arguments[L];return r=b.call.apply(b,[this].concat(l)),r.state={goInputText:""},r.buildOptionText=function(B){return"".concat(B," ").concat(r.props.locale.items_per_page)},r.changeSize=function(B){r.props.changeSize(Number(B))},r.handleChange=function(B){r.setState({goInputText:B.target.value})},r.handleBlur=function(B){var h=r.props,I=h.goButton,H=h.quickGo,z=h.rootPrefixCls,Z=r.state.goInputText;if(I||Z==="")return;if(B.relatedTarget&&(B.relatedTarget.className.indexOf("".concat(z,"-prev"))>=0||B.relatedTarget.className.indexOf("".concat(z,"-next"))>=0))return;r.setState({goInputText:""}),H(r.getValidValue())},r.go=function(B){var h=r.state.goInputText;if(h==="")return;(B.keyCode===w.ENTER||B.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Object(R.a)(o,[{key:"getValidValue",value:function(){var n=this.state,l=n.goInputText,L=n.current;return!l||isNaN(l)?L:Number(l)}},{key:"getPageSizeOptions",value:function(){var n=this.props,l=n.pageSize,L=n.pageSizeOptions;return L.some(function(B){return B.toString()===l.toString()})?L:L.concat([l.toString()]).sort(function(B,h){var I=isNaN(Number(B))?0:Number(B),H=isNaN(Number(h))?0:Number(h);return I-H})}},{key:"render",value:function(){var n=this,l=this.props,L=l.pageSize,B=l.locale,h=l.rootPrefixCls,I=l.changeSize,H=l.quickGo,z=l.goButton,Z=l.selectComponentClass,Y=l.buildOptionText,G=l.selectPrefixCls,ee=l.disabled,J=this.state.goInputText,oe="".concat(h,"-options"),se=Z,Te=null,be=null,xe=null;if(!I&&!H)return null;var Oe=this.getPageSizeOptions();if(I&&se){var Ne=Oe.map(function(Le,Se){return p.a.createElement(se.Option,{key:Se,value:Le.toString()},(Y||n.buildOptionText)(Le))});Te=p.a.createElement(se,{disabled:ee,prefixCls:G,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(L||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Se){return Se.parentNode}},Ne)}return H&&(z&&(xe=typeof z=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ee,className:"".concat(oe,"-quick-jumper-button")},B.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},z)),be=p.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},B.jump_to,p.a.createElement("input",{disabled:ee,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),B.page,xe)),p.a.createElement("li",{className:"".concat(oe)},Te,be)}}]),o}(p.a.Component);g.defaultProps={pageSizeOptions:["10","20","50","100"]};var C=g,c=W("N2Kk");function a(){}function u(M){return typeof M=="number"&&isFinite(M)&&Math.floor(M)===M}function m(M,b,o){return o}function y(M,b,o){var r=typeof M=="undefined"?b.pageSize:M;return Math.floor((o.total-1)/r)+1}var T=function(M){Object(E.a)(o,M);var b=Object(S.a)(o);function o(r){var n;Object(Q.a)(this,o),n=b.call(this,r),n.getJumpPrevPage=function(){return Math.max(1,n.state.current-(n.props.showLessItems?3:5))},n.getJumpNextPage=function(){return Math.min(y(void 0,n.state,n.props),n.state.current+(n.props.showLessItems?3:5))},n.getItemIcon=function(I,H){var z=n.props.prefixCls,Z=I||p.a.createElement("button",{type:"button","aria-label":H,className:"".concat(z,"-item-link")});return typeof I=="function"&&(Z=p.a.createElement(I,Object(_.a)({},n.props))),Z},n.savePaginationNode=function(I){n.paginationNode=I},n.isValid=function(I){return u(I)&&I!==n.state.current},n.shouldDisplayQuickJumper=function(){var I=n.props,H=I.showQuickJumper,z=I.pageSize,Z=I.total;return Z<=z?!1:H},n.handleKeyDown=function(I){(I.keyCode===w.ARROW_UP||I.keyCode===w.ARROW_DOWN)&&I.preventDefault()},n.handleKeyUp=function(I){var H=n.getValidValue(I),z=n.state.currentInputValue;H!==z&&n.setState({currentInputValue:H}),I.keyCode===w.ENTER?n.handleChange(H):I.keyCode===w.ARROW_UP?n.handleChange(H-1):I.keyCode===w.ARROW_DOWN&&n.handleChange(H+1)},n.changePageSize=function(I){var H=n.state.current,z=y(I,n.state,n.props);H=H>z?z:H,z===0&&(H=n.state.current),typeof I=="number"&&("pageSize"in n.props||n.setState({pageSize:I}),"current"in n.props||n.setState({current:H,currentInputValue:H})),n.props.onShowSizeChange(H,I),"onChange"in n.props&&n.props.onChange&&n.props.onChange(H,I)},n.handleChange=function(I){var H=n.props.disabled,z=I;if(n.isValid(z)&&!H){var Z=y(void 0,n.state,n.props);z>Z?z=Z:z<1&&(z=1),"current"in n.props||n.setState({current:z,currentInputValue:z});var Y=n.state.pageSize;return n.props.onChange(z,Y),z}return n.state.current},n.prev=function(){n.hasPrev()&&n.handleChange(n.state.current-1)},n.next=function(){n.hasNext()&&n.handleChange(n.state.current+1)},n.jumpPrev=function(){n.handleChange(n.getJumpPrevPage())},n.jumpNext=function(){n.handleChange(n.getJumpNextPage())},n.hasPrev=function(){return n.state.current>1},n.hasNext=function(){return n.state.current<y(void 0,n.state,n.props)},n.runIfEnter=function(I,H){if(I.key==="Enter"||I.charCode===13){for(var z=arguments.length,Z=new Array(z>2?z-2:0),Y=2;Y<z;Y++)Z[Y-2]=arguments[Y];H.apply(void 0,Z)}},n.runIfEnterPrev=function(I){n.runIfEnter(I,n.prev)},n.runIfEnterNext=function(I){n.runIfEnter(I,n.next)},n.runIfEnterJumpPrev=function(I){n.runIfEnter(I,n.jumpPrev)},n.runIfEnterJumpNext=function(I){n.runIfEnter(I,n.jumpNext)},n.handleGoTO=function(I){(I.keyCode===w.ENTER||I.type==="click")&&n.handleChange(n.state.currentInputValue)};var l=r.onChange!==a,L="current"in r;L&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var B=r.defaultCurrent;"current"in r&&(B=r.current);var h=r.defaultPageSize;return"pageSize"in r&&(h=r.pageSize),B=Math.min(B,y(h,void 0,r)),n.state={current:B,currentInputValue:B,pageSize:h},n}return Object(R.a)(o,[{key:"componentDidUpdate",value:function(n,l){var L=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var B=this.paginationNode.querySelector(".".concat(L,"-item-").concat(l.current));B&&document.activeElement===B&&B.blur()}}},{key:"getValidValue",value:function(n){var l=n.target.value,L=y(void 0,this.state,this.props),B=this.state.currentInputValue,h;return l===""?h=l:isNaN(Number(l))?h=B:l>=L?h=L:h=Number(l),h}},{key:"getShowSizeChanger",value:function(){var n=this.props,l=n.showSizeChanger,L=n.total,B=n.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:L>B}},{key:"renderPrev",value:function(n){var l=this.props,L=l.prevIcon,B=l.itemRender,h=B(n,"prev",this.getItemIcon(L,"prev page")),I=!this.hasPrev();return Object(s.isValidElement)(h)?Object(s.cloneElement)(h,{disabled:I}):h}},{key:"renderNext",value:function(n){var l=this.props,L=l.nextIcon,B=l.itemRender,h=B(n,"next",this.getItemIcon(L,"next page")),I=!this.hasNext();return Object(s.isValidElement)(h)?Object(s.cloneElement)(h,{disabled:I}):h}},{key:"render",value:function(){var n=this,l=this.props,L=l.prefixCls,B=l.className,h=l.style,I=l.disabled,H=l.hideOnSinglePage,z=l.total,Z=l.locale,Y=l.showQuickJumper,G=l.showLessItems,ee=l.showTitle,J=l.showTotal,oe=l.simple,se=l.itemRender,Te=l.showPrevNextJumpers,be=l.jumpPrevIcon,xe=l.jumpNextIcon,Oe=l.selectComponentClass,Ne=l.selectPrefixCls,Le=l.pageSizeOptions,Se=this.state,tt=Se.current,Bt=Se.pageSize,De=Se.currentInputValue;if(H===!0&&z<=Bt)return null;var Qe=y(void 0,this.state,this.props),it=[],Ae=null,re=null,ie=null,ce=null,Be=null,Re=Y&&Y.goButton,ke=G?1:2,ft=tt-1>0?tt-1:0,pt=tt+1<Qe?tt+1:Qe,bt=Object.keys(this.props).reduce(function(me,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(me[Ee]=n.props[Ee]),me},{});if(oe)return Re&&(typeof Re=="boolean"?Be=p.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Z.jump_to_confirm):Be=p.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Re),Be=p.a.createElement("li",{title:ee?"".concat(Z.jump_to).concat(tt,"/").concat(Qe):null,className:"".concat(L,"-simple-pager")},Be)),p.a.createElement("ul",Object(X.a)({className:i()(L,"".concat(L,"-simple"),Object(N.a)({},"".concat(L,"-disabled"),I),B),style:h,ref:this.savePaginationNode},bt),p.a.createElement("li",{title:ee?Z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(L,"-prev"),Object(N.a)({},"".concat(L,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ft)),p.a.createElement("li",{title:ee?"".concat(tt,"/").concat(Qe):null,className:"".concat(L,"-simple-pager")},p.a.createElement("input",{type:"text",value:De,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),p.a.createElement("span",{className:"".concat(L,"-slash")},"/"),Qe),p.a.createElement("li",{title:ee?Z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(L,"-next"),Object(N.a)({},"".concat(L,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(pt)),Be);if(Qe<=3+ke*2){var yt={locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:ee,itemRender:se};Qe||it.push(p.a.createElement(O,Object(X.a)({},yt,{key:"noPager",page:Qe,className:"".concat(L,"-disabled")})));for(var _t=1;_t<=Qe;_t+=1){var It=tt===_t;it.push(p.a.createElement(O,Object(X.a)({},yt,{key:_t,page:_t,active:It})))}}else{var He=G?Z.prev_3:Z.prev_5,Pe=G?Z.next_3:Z.next_5;Te&&(Ae=p.a.createElement("li",{title:ee?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(L,"-jump-prev"),Object(N.a)({},"".concat(L,"-jump-prev-custom-icon"),!!be))},se(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(be,"prev page"))),re=p.a.createElement("li",{title:ee?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(L,"-jump-next"),Object(N.a)({},"".concat(L,"-jump-next-custom-icon"),!!xe))},se(this.getJumpNextPage(),"jump-next",this.getItemIcon(xe,"next page")))),ce=p.a.createElement(O,{locale:Z,last:!0,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:!1,showTitle:ee,itemRender:se}),ie=p.a.createElement(O,{locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:ee,itemRender:se});var At=Math.max(1,tt-ke),mt=Math.min(tt+ke,Qe);tt-1<=ke&&(mt=1+ke*2),Qe-tt<=ke&&(At=Qe-ke*2);for(var Ze=At;Ze<=mt;Ze+=1){var ut=tt===Ze;it.push(p.a.createElement(O,{locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:ut,showTitle:ee,itemRender:se}))}tt-1>=ke*2&&tt!==1+2&&(it[0]=Object(s.cloneElement)(it[0],{className:"".concat(L,"-item-after-jump-prev")}),it.unshift(Ae)),Qe-tt>=ke*2&&tt!==Qe-2&&(it[it.length-1]=Object(s.cloneElement)(it[it.length-1],{className:"".concat(L,"-item-before-jump-next")}),it.push(re)),At!==1&&it.unshift(ie),mt!==Qe&&it.push(ce)}var Ke=null;J&&(Ke=p.a.createElement("li",{className:"".concat(L,"-total-text")},J(z,[z===0?0:(tt-1)*Bt+1,tt*Bt>z?z:tt*Bt])));var Ie=!this.hasPrev()||!Qe,Me=!this.hasNext()||!Qe;return p.a.createElement("ul",Object(X.a)({className:i()(L,B,Object(N.a)({},"".concat(L,"-disabled"),I)),style:h,unselectable:"unselectable",ref:this.savePaginationNode},bt),Ke,p.a.createElement("li",{title:ee?Z.prev_page:null,onClick:this.prev,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(L,"-prev"),Object(N.a)({},"".concat(L,"-disabled"),Ie)),"aria-disabled":Ie},this.renderPrev(ft)),it,p.a.createElement("li",{title:ee?Z.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(L,"-next"),Object(N.a)({},"".concat(L,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(pt)),p.a.createElement(C,{disabled:I,locale:Z,rootPrefixCls:L,selectComponentClass:Oe,selectPrefixCls:Ne,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:tt,pageSize:Bt,pageSizeOptions:Le,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Re}))}}],[{key:"getDerivedStateFromProps",value:function(n,l){var L={};if("current"in n&&(L.current=n.current,n.current!==l.current&&(L.currentInputValue=L.current)),"pageSize"in n&&n.pageSize!==l.pageSize){var B=l.current,h=y(n.pageSize,l,n);B=B>h?h:B,"current"in n||(L.current=B,L.currentInputValue=B),L.pageSize=n.pageSize}return L}}]),o}(p.a.Component);T.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:c.a,style:{},itemRender:m,totalBoundaryShowSizeChanger:50};var x=T},"6GrX":function(Xe,pe,W){var X=W("mFDi"),N=W("Xnb7"),_=W("bYtY"),Q=_.getContext,R=_.extend,E=_.retrieve2,S=_.retrieve3,s=_.trim,p={},v=0,i=5e3,A=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,O="12px sans-serif",w={};function g(H,z){w[H]=z}function C(H,z){z=z||O;var Z=H+":"+z;if(p[Z])return p[Z];for(var Y=(H+"").split(`
|
|
`),G=0,ee=0,J=Y.length;ee<J;ee++)G=Math.max(l(Y[ee],z).width,G);return v>i&&(v=0,p={}),v++,p[Z]=G,G}function c(H,z,Z,Y,G,ee,J,oe){return J?u(H,z,Z,Y,G,ee,J,oe):a(H,z,Z,Y,G,ee,oe)}function a(H,z,Z,Y,G,ee,J){var oe=L(H,z,G,ee,J),se=C(H,z);G&&(se+=G[1]+G[3]);var Te=oe.outerHeight,be=m(0,se,Z),xe=y(0,Te,Y),Oe=new X(be,xe,se,Te);return Oe.lineHeight=oe.lineHeight,Oe}function u(H,z,Z,Y,G,ee,J,oe){var se=B(H,{rich:J,truncate:oe,font:z,textAlign:Z,textPadding:G,textLineHeight:ee}),Te=se.outerWidth,be=se.outerHeight,xe=m(0,Te,Z),Oe=y(0,be,Y);return new X(xe,Oe,Te,be)}function m(H,z,Z){return Z==="right"?H-=z:Z==="center"&&(H-=z/2),H}function y(H,z,Z){return Z==="middle"?H-=z/2:Z==="bottom"&&(H-=z),H}function T(H,z,Z){var Y=z.textPosition,G=z.textDistance,ee=Z.x,J=Z.y;G=G||0;var oe=Z.height,se=Z.width,Te=oe/2,be="left",xe="top";switch(Y){case"left":ee-=G,J+=Te,be="right",xe="middle";break;case"right":ee+=G+se,J+=Te,xe="middle";break;case"top":ee+=se/2,J-=G,be="center",xe="bottom";break;case"bottom":ee+=se/2,J+=oe+G,be="center";break;case"inside":ee+=se/2,J+=Te,be="center",xe="middle";break;case"insideLeft":ee+=G,J+=Te,xe="middle";break;case"insideRight":ee+=se-G,J+=Te,be="right",xe="middle";break;case"insideTop":ee+=se/2,J+=G,be="center";break;case"insideBottom":ee+=se/2,J+=oe-G,be="center",xe="bottom";break;case"insideTopLeft":ee+=G,J+=G;break;case"insideTopRight":ee+=se-G,J+=G,be="right";break;case"insideBottomLeft":ee+=G,J+=oe-G,xe="bottom";break;case"insideBottomRight":ee+=se-G,J+=oe-G,be="right",xe="bottom";break}return H=H||{},H.x=ee,H.y=J,H.textAlign=be,H.textVerticalAlign=xe,H}function x(H,z,Z){var Y={textPosition:H,textDistance:Z};return T({},Y,z)}function M(H,z,Z,Y,G){if(!z)return"";var ee=(H+"").split(`
|
|
`);G=b(z,Z,Y,G);for(var J=0,oe=ee.length;J<oe;J++)ee[J]=o(ee[J],G);return ee.join(`
|
|
`)}function b(H,z,Z,Y){Y=R({},Y),Y.font=z;var Z=E(Z,"...");Y.maxIterations=E(Y.maxIterations,2);var G=Y.minChar=E(Y.minChar,0);Y.cnCharWidth=C("\u56FD",z);var ee=Y.ascCharWidth=C("a",z);Y.placeholder=E(Y.placeholder,"");for(var J=H=Math.max(0,H-1),oe=0;oe<G&&J>=ee;oe++)J-=ee;var se=C(Z,z);return se>J&&(Z="",se=0),J=H-se,Y.ellipsis=Z,Y.ellipsisWidth=se,Y.contentWidth=J,Y.containerWidth=H,Y}function o(H,z){var Z=z.containerWidth,Y=z.font,G=z.contentWidth;if(!Z)return"";var ee=C(H,Y);if(ee<=Z)return H;for(var J=0;;J++){if(ee<=G||J>=z.maxIterations){H+=z.ellipsis;break}var oe=J===0?r(H,G,z.ascCharWidth,z.cnCharWidth):ee>0?Math.floor(H.length*G/ee):0;H=H.substr(0,oe),ee=C(H,Y)}return H===""&&(H=z.placeholder),H}function r(H,z,Z,Y){for(var G=0,ee=0,J=H.length;ee<J&&G<z;ee++){var oe=H.charCodeAt(ee);G+=0<=oe&&oe<=127?Z:Y}return ee}function n(H){return C("\u56FD",H)}function l(H,z){return w.measureText(H,z)}w.measureText=function(H,z){var Z=Q();return Z.font=z||O,Z.measureText(H)};function L(H,z,Z,Y,G){H!=null&&(H+="");var ee=E(Y,n(z)),J=H?H.split(`
|
|
`):[],oe=J.length*ee,se=oe,Te=!0;if(Z&&(se+=Z[0]+Z[2]),H&&G){Te=!1;var be=G.outerHeight,xe=G.outerWidth;if(be!=null&&se>be)H="",J=[];else if(xe!=null)for(var Oe=b(xe-(Z?Z[1]+Z[3]:0),z,G.ellipsis,{minChar:G.minChar,placeholder:G.placeholder}),Ne=0,Le=J.length;Ne<Le;Ne++)J[Ne]=o(J[Ne],Oe)}return{lines:J,height:oe,outerHeight:se,lineHeight:ee,canCacheByTextString:Te}}function B(H,z){var Z={lines:[],width:0,height:0};if(H!=null&&(H+=""),!H)return Z;for(var Y=A.lastIndex=0,G;(G=A.exec(H))!=null;){var ee=G.index;ee>Y&&h(Z,H.substring(Y,ee)),h(Z,G[2],G[1]),Y=A.lastIndex}Y<H.length&&h(Z,H.substring(Y,H.length));var J=Z.lines,oe=0,se=0,Te=[],be=z.textPadding,xe=z.truncate,Oe=xe&&xe.outerWidth,Ne=xe&&xe.outerHeight;be&&(Oe!=null&&(Oe-=be[1]+be[3]),Ne!=null&&(Ne-=be[0]+be[2]));for(var Le=0;Le<J.length;Le++){for(var Se=J[Le],tt=0,Bt=0,De=0;De<Se.tokens.length;De++){var Qe=Se.tokens[De],it=Qe.styleName&&z.rich[Qe.styleName]||{},Ae=Qe.textPadding=it.textPadding,re=Qe.font=it.font||z.font,ie=Qe.textHeight=E(it.textHeight,n(re));if(Ae&&(ie+=Ae[0]+Ae[2]),Qe.height=ie,Qe.lineHeight=S(it.textLineHeight,z.textLineHeight,ie),Qe.textAlign=it&&it.textAlign||z.textAlign,Qe.textVerticalAlign=it&&it.textVerticalAlign||"middle",Ne!=null&&oe+Qe.lineHeight>Ne)return{lines:[],width:0,height:0};Qe.textWidth=C(Qe.text,re);var ce=it.textWidth,Be=ce==null||ce==="auto";if(typeof ce=="string"&&ce.charAt(ce.length-1)==="%")Qe.percentWidth=ce,Te.push(Qe),ce=0;else{if(Be){ce=Qe.textWidth;var Re=it.textBackgroundColor,ke=Re&&Re.image;ke&&(ke=N.findExistImage(ke),N.isImageReady(ke)&&(ce=Math.max(ce,ke.width*ie/ke.height)))}var ft=Ae?Ae[1]+Ae[3]:0;ce+=ft;var pt=Oe!=null?Oe-Bt:null;pt!=null&&pt<ce&&(!Be||pt<ft?(Qe.text="",Qe.textWidth=ce=0):(Qe.text=M(Qe.text,pt-ft,re,xe.ellipsis,{minChar:xe.minChar}),Qe.textWidth=C(Qe.text,re),ce=Qe.textWidth+ft))}Bt+=Qe.width=ce,it&&(tt=Math.max(tt,Qe.lineHeight))}Se.width=Bt,Se.lineHeight=tt,oe+=tt,se=Math.max(se,Bt)}Z.outerWidth=Z.width=E(z.textWidth,se),Z.outerHeight=Z.height=E(z.textHeight,oe),be&&(Z.outerWidth+=be[1]+be[3],Z.outerHeight+=be[0]+be[2]);for(var Le=0;Le<Te.length;Le++){var Qe=Te[Le],bt=Qe.percentWidth;Qe.width=parseInt(bt,10)/100*se}return Z}function h(H,z,Z){for(var Y=z==="",G=z.split(`
|
|
`),ee=H.lines,J=0;J<G.length;J++){var oe=G[J],se={styleName:Z,text:oe,isLineHolder:!oe&&!Y};if(J)ee.push({tokens:[se]});else{var Te=(ee[ee.length-1]||(ee[0]={tokens:[]})).tokens,be=Te.length;be===1&&Te[0].isLineHolder?Te[0]=se:(oe||!be||Y)&&Te.push(se)}}}function I(H){var z=(H.fontSize||H.fontFamily)&&[H.fontStyle,H.fontWeight,(H.fontSize||12)+"px",H.fontFamily||"sans-serif"].join(" ");return z&&s(z)||H.textFont||H.font}pe.DEFAULT_FONT=O,pe.$override=g,pe.getWidth=C,pe.getBoundingRect=c,pe.adjustTextX=m,pe.adjustTextY=y,pe.calculateTextPosition=T,pe.adjustTextPositionOnRect=x,pe.truncateText=M,pe.getLineHeight=n,pe.measureText=l,pe.parsePlainText=L,pe.parseRichText=B,pe.makeFont=I},"6RRn":function(Xe,pe,W){"use strict";var X=W("wCXF"),N=W("n6Qo");W.d(pe,"b",function(){return N.a});var _=W("IBYe"),Q=W("6eGT"),R=W("hW8S");W.d(pe,"a",function(){return R.a}),pe.c=X.b},"6eGT":function(Xe,pe,W){"use strict";function X(N){return null}pe.a=X},"6fms":function(Xe,pe,W){var X=W("SUKs"),N=W("06Qe"),_=W("bYtY"),Q=_.each;function R(p){return parseInt(p,10)}function E(p,v){N.initVML(),this.root=p,this.storage=v;var i=document.createElement("div"),A=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",A.style.cssText="position:absolute;left:0;top:0;",p.appendChild(i),this._vmlRoot=A,this._vmlViewport=i,this.resize();var O=v.delFromStorage,w=v.addToStorage;v.delFromStorage=function(g){O.call(v,g),g&&(g.onRemove&&g.onRemove(A))},v.addToStorage=function(g){g.onAdd&&g.onAdd(A),w.call(v,g)},this._firstPaint=!0}E.prototype={constructor:E,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var p=this.getViewportRoot();if(p)return{offsetLeft:p.offsetLeft||0,offsetTop:p.offsetTop||0}},refresh:function(){var p=this.storage.getDisplayList(!0,!0);this._paintList(p)},_paintList:function(p){for(var v=this._vmlRoot,i=0;i<p.length;i++){var A=p[i];A.invisible||A.ignore?(A.__alreadyNotVisible||A.onRemove(v),A.__alreadyNotVisible=!0):(A.__alreadyNotVisible&&A.onAdd(v),A.__alreadyNotVisible=!1,A.__dirty&&(A.beforeBrush&&A.beforeBrush(),(A.brushVML||A.brush).call(A,v),A.afterBrush&&A.afterBrush())),A.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(v),this._firstPaint=!1)},resize:function(p,v){var p=p==null?this._getWidth():p,v=v==null?this._getHeight():v;if(this._width!==p||this._height!==v){this._width=p,this._height=v;var i=this._vmlViewport.style;i.width=p+"px",i.height=v+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var p=this.root,v=p.currentStyle;return(p.clientWidth||R(v.width))-R(v.paddingLeft)-R(v.paddingRight)|0},_getHeight:function(){var p=this.root,v=p.currentStyle;return(p.clientHeight||R(v.height))-R(v.paddingTop)-R(v.paddingBottom)|0}};function S(p){return function(){X('In IE8.0 VML mode painter not support method "'+p+'"')}}Q(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(p){E.prototype[p]=S(p)});var s=E;Xe.exports=s},"7Cbv":function(Xe,pe,W){"use strict";var X=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),N=new Uint8Array(16);function _(){if(!X)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(N)}var Q=/^(?:[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;function R(O){return typeof O=="string"&&Q.test(O)}for(var E=R,S=[],s=0;s<256;++s)S.push((s+256).toString(16).substr(1));function p(O){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=(S[O[w+0]]+S[O[w+1]]+S[O[w+2]]+S[O[w+3]]+"-"+S[O[w+4]]+S[O[w+5]]+"-"+S[O[w+6]]+S[O[w+7]]+"-"+S[O[w+8]]+S[O[w+9]]+"-"+S[O[w+10]]+S[O[w+11]]+S[O[w+12]]+S[O[w+13]]+S[O[w+14]]+S[O[w+15]]).toLowerCase();if(!E(g))throw TypeError("Stringified UUID is invalid");return g}var v=p;function i(O,w,g){O=O||{};var C=O.random||(O.rng||_)();if(C[6]=C[6]&15|64,C[8]=C[8]&63|128,w){g=g||0;for(var c=0;c<16;++c)w[g+c]=C[c];return w}return v(C)}var A=pe.a=i},"7SHv":function(Xe,pe,W){var X=W("LPTA"),N=X.devicePixelRatio,_=W("bYtY"),Q=W("SUKs"),R=W("mFDi"),E=W("BPZU"),S=W("Xmg4"),s=W("mLcG"),p=W("Dagg"),v=W("ItGF"),i=1e5,A=314159,O=.01,w=.001;function g(b){return parseInt(b,10)}function C(b){return b?b.__builtin__?!0:!(typeof b.resize!="function"||typeof b.refresh!="function"):!1}var c=new R(0,0,0,0),a=new R(0,0,0,0);function u(b,o,r){return c.copy(b.getBoundingRect()),b.transform&&c.applyTransform(b.transform),a.width=o,a.height=r,!c.intersect(a)}function m(b,o){if(b===o)return!1;if(!b||!o||b.length!==o.length)return!0;for(var r=0;r<b.length;r++)if(b[r]!==o[r])return!0;return!1}function y(b,o){for(var r=0;r<b.length;r++){var n=b[r];n.setTransform(o),o.beginPath(),n.buildPath(o,n.shape),o.clip(),n.restoreTransform(o)}}function T(b,o){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+b+"px","height:"+o+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var x=function(b,o,r){this.type="canvas";var n=!b.nodeName||b.nodeName.toUpperCase()==="CANVAS";this._opts=r=_.extend({},r||{}),this.dpr=r.devicePixelRatio||N,this._singleCanvas=n,this.root=b;var l=b.style;l&&(l["-webkit-tap-highlight-color"]="transparent",l["-webkit-user-select"]=l["user-select"]=l["-webkit-touch-callout"]="none",b.innerHTML=""),this.storage=o;var L=this._zlevelList=[],B=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var I=b.width,H=b.height;r.width!=null&&(I=r.width),r.height!=null&&(H=r.height),this.dpr=r.devicePixelRatio||1,b.width=I*this.dpr,b.height=H*this.dpr,this._width=I,this._height=H;var z=new S(b,this,this.dpr);z.__builtin__=!0,z.initContext(),B[A]=z,z.zlevel=A,L.push(A),this._domRoot=b}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=T(this._width,this._height);b.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]};x.prototype={constructor:x,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var b=this.getViewportRoot();if(b)return{offsetLeft:b.offsetLeft||0,offsetTop:b.offsetTop||0}},refresh:function(b){var o=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(o,b,this._redrawId);for(var n=0;n<r.length;n++){var l=r[n],L=this._layers[l];if(!L.__builtin__&&L.refresh){var B=n===0?this._backgroundColor:null;L.refresh(B)}}return this.refreshHover(),this},addHover:function(b,o){if(b.__hoverMir)return;var r=new b.constructor({style:b.style,shape:b.shape,z:b.z,z2:b.z2,silent:b.silent});return r.__from=b,b.__hoverMir=r,o&&r.setStyle(o),this._hoverElements.push(r),r},removeHover:function(b){var o=b.__hoverMir,r=this._hoverElements,n=_.indexOf(r,o);n>=0&&r.splice(n,1),b.__hoverMir=null},clearHover:function(b){for(var o=this._hoverElements,r=0;r<o.length;r++){var n=o[r].__from;n&&(n.__hoverMir=null)}o.length=0},refreshHover:function(){var b=this._hoverElements,o=b.length,r=this._hoverlayer;if(r&&r.clear(),!o)return;E(b,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(i));var n={};r.ctx.save();for(var l=0;l<o;){var L=b[l],B=L.__from;if(!(B&&B.__zr)){b.splice(l,1),B.__hoverMir=null,o--;continue}l++,B.invisible||(L.transform=B.transform,L.invTransform=B.invTransform,L.__clipPaths=B.__clipPaths,this._doPaintEl(L,r,!0,n))}r.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(b,o,r){if(this._redrawId!==r)return;o=o||!1,this._updateLayerStatus(b);var n=this._doPaintList(b,o);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var l=this;s(function(){l._paintList(b,o,r)})}},_compositeManually:function(){var b=this.getLayer(A).ctx,o=this._domRoot.width,r=this._domRoot.height;b.clearRect(0,0,o,r),this.eachBuiltinLayer(function(n){n.virtual&&b.drawImage(n.dom,0,0,o,r)})},_doPaintList:function(b,o){for(var r=[],n=0;n<this._zlevelList.length;n++){var l=this._zlevelList[n],L=this._layers[l];L.__builtin__&&L!==this._hoverlayer&&(L.__dirty||o)&&r.push(L)}for(var B=!0,h=0;h<r.length;h++){var L=r[h],I=L.ctx,H={};I.save();var z=o?L.__startIndex:L.__drawIndex,Z=!o&&L.incremental&&Date.now,Y=Z&&Date.now(),G=L.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(L.__startIndex===L.__endIndex)L.clear(!1,G);else if(z===L.__startIndex){var ee=b[z];(!ee.incremental||!ee.notClear||o)&&L.clear(!1,G)}z===-1&&(console.error("For some unknown reason. drawIndex is -1"),z=L.__startIndex);for(var J=z;J<L.__endIndex;J++){var oe=b[J];if(this._doPaintEl(oe,L,o,H),oe.__dirty=oe.__dirtyText=!1,Z){var se=Date.now()-Y;if(se>15)break}}L.__drawIndex=J,L.__drawIndex<L.__endIndex&&(B=!1),H.prevElClipPaths&&I.restore(),I.restore()}return v.wxa&&_.each(this._layers,function(Te){Te&&Te.ctx&&Te.ctx.draw&&Te.ctx.draw()}),B},_doPaintEl:function(b,o,r,n){var l=o.ctx,L=b.transform;if((o.__dirty||r)&&!b.invisible&&b.style.opacity!==0&&!(L&&!L[0]&&!L[3])&&!(b.culling&&u(b,this._width,this._height))){var B=b.__clipPaths,h=n.prevElClipPaths;(!h||m(B,h))&&(h&&(l.restore(),n.prevElClipPaths=null,n.prevEl=null),B&&(l.save(),y(B,l),n.prevElClipPaths=B)),b.beforeBrush&&b.beforeBrush(l),b.brush(l,n.prevEl||null),n.prevEl=b,b.afterBrush&&b.afterBrush(l)}},getLayer:function(b,o){this._singleCanvas&&!this._needsManuallyCompositing&&(b=A);var r=this._layers[b];return r||(r=new S("zr_"+b,this,this.dpr),r.zlevel=b,r.__builtin__=!0,this._layerConfig[b]?_.merge(r,this._layerConfig[b],!0):this._layerConfig[b-O]&&_.merge(r,this._layerConfig[b-O],!0),o&&(r.virtual=o),this.insertLayer(b,r),r.initContext()),r},insertLayer:function(b,o){var r=this._layers,n=this._zlevelList,l=n.length,L=null,B=-1,h=this._domRoot;if(r[b]){Q("ZLevel "+b+" has been used already");return}if(!C(o)){Q("Layer of zlevel "+b+" is not valid");return}if(l>0&&b>n[0]){for(B=0;B<l-1&&!(n[B]<b&&n[B+1]>b);B++);L=r[n[B]]}if(n.splice(B+1,0,b),r[b]=o,!o.virtual)if(L){var I=L.dom;I.nextSibling?h.insertBefore(o.dom,I.nextSibling):h.appendChild(o.dom)}else h.firstChild?h.insertBefore(o.dom,h.firstChild):h.appendChild(o.dom)},eachLayer:function(b,o){var r=this._zlevelList,n,l;for(l=0;l<r.length;l++)n=r[l],b.call(o,this._layers[n],n)},eachBuiltinLayer:function(b,o){var r=this._zlevelList,n,l,L;for(L=0;L<r.length;L++)l=r[L],n=this._layers[l],n.__builtin__&&b.call(o,n,l)},eachOtherLayer:function(b,o){var r=this._zlevelList,n,l,L;for(L=0;L<r.length;L++)l=r[L],n=this._layers[l],n.__builtin__||b.call(o,n,l)},getLayers:function(){return this._layers},_updateLayerStatus:function(b){this.eachBuiltinLayer(function(H,z){H.__dirty=H.__used=!1});function o(H){l&&(l.__endIndex!==H&&(l.__dirty=!0),l.__endIndex=H)}if(this._singleCanvas)for(var r=1;r<b.length;r++){var n=b[r];if(n.zlevel!==b[r-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}for(var l=null,L=0,B,r=0;r<b.length;r++){var n=b[r],h=n.zlevel,I;B!==h&&(B=h,L=0),n.incremental?(I=this.getLayer(h+w,this._needsManuallyCompositing),I.incremental=!0,L=1):I=this.getLayer(h+(L>0?O:0),this._needsManuallyCompositing),I.__builtin__||Q("ZLevel "+h+" has been used by unkown layer "+I.id),I!==l&&(I.__used=!0,I.__startIndex!==r&&(I.__dirty=!0),I.__startIndex=r,I.incremental?I.__drawIndex=-1:I.__drawIndex=r,o(r),l=I),n.__dirty&&(I.__dirty=!0,I.incremental&&I.__drawIndex<0&&(I.__drawIndex=r))}o(r),this.eachBuiltinLayer(function(H,z){!H.__used&&H.getElementCount()>0&&(H.__dirty=!0,H.__startIndex=H.__endIndex=H.__drawIndex=0),H.__dirty&&H.__drawIndex<0&&(H.__drawIndex=H.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(b){b.clear()},setBackgroundColor:function(b){this._backgroundColor=b},configLayer:function(b,o){if(o){var r=this._layerConfig;r[b]?_.merge(r[b],o,!0):r[b]=o;for(var n=0;n<this._zlevelList.length;n++){var l=this._zlevelList[n];if(l===b||l===b+O){var L=this._layers[l];_.merge(L,r[b],!0)}}}},delLayer:function(b){var o=this._layers,r=this._zlevelList,n=o[b];if(!n)return;n.dom.parentNode.removeChild(n.dom),delete o[b],r.splice(_.indexOf(r,b),1)},resize:function(b,o){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var n=this._opts;if(b!=null&&(n.width=b),o!=null&&(n.height=o),b=this._getSize(0),o=this._getSize(1),r.style.display="",this._width!==b||o!==this._height){r.style.width=b+"px",r.style.height=o+"px";for(var l in this._layers)this._layers.hasOwnProperty(l)&&this._layers[l].resize(b,o);_.each(this._progressiveLayers,function(L){L.resize(b,o)}),this.refresh(!0)}this._width=b,this._height=o}else{if(b==null||o==null)return;this._width=b,this._height=o,this.getLayer(A).resize(b,o)}return this},clearLayer:function(b){var o=this._layers[b];o&&o.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(b){if(b=b||{},this._singleCanvas&&!this._compositeManually)return this._layers[A].dom;var o=new S("image",this,b.pixelRatio||this.dpr);if(o.initContext(),o.clear(!1,b.backgroundColor||this._backgroundColor),b.pixelRatio<=this.dpr){this.refresh();var r=o.dom.width,n=o.dom.height,l=o.ctx;this.eachLayer(function(H){H.__builtin__?l.drawImage(H.dom,0,0,r,n):H.renderToCanvas&&(o.ctx.save(),H.renderToCanvas(o.ctx),o.ctx.restore())})}else for(var L={},B=this.storage.getDisplayList(!0),h=0;h<B.length;h++){var I=B[h];this._doPaintEl(I,o,!0,L)}return o.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(b){var o=this._opts,r=["width","height"][b],n=["clientWidth","clientHeight"][b],l=["paddingLeft","paddingTop"][b],L=["paddingRight","paddingBottom"][b];if(o[r]!=null&&o[r]!=="auto")return parseFloat(o[r]);var B=this.root,h=document.defaultView.getComputedStyle(B);return(B[n]||g(h[r])||g(B.style[r]))-(g(h[l])||0)-(g(h[L])||0)|0},pathToImage:function(b,o){o=o||this.dpr;var r=document.createElement("canvas"),n=r.getContext("2d"),l=b.getBoundingRect(),L=b.style,B=L.shadowBlur*o,h=L.shadowOffsetX*o,I=L.shadowOffsetY*o,H=L.hasStroke()?L.lineWidth:0,z=Math.max(H/2,-h+B),Z=Math.max(H/2,h+B),Y=Math.max(H/2,-I+B),G=Math.max(H/2,I+B),ee=l.width+z+Z,J=l.height+Y+G;r.width=ee*o,r.height=J*o,n.scale(o,o),n.clearRect(0,0,ee,J),n.dpr=o;var oe={position:b.position,rotation:b.rotation,scale:b.scale};b.position=[z-l.x,Y-l.y],b.rotation=0,b.scale=[1,1],b.updateTransform(),b&&b.brush(n);var se=p,Te=new se({style:{x:0,y:0,image:r}});return oe.position!=null&&(Te.position=b.position=oe.position),oe.rotation!=null&&(Te.rotation=b.rotation=oe.rotation),oe.scale!=null&&(Te.scale=b.scale=oe.scale),Te}};var M=x;Xe.exports=M},"7ahc":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return y});var X=W("k1fw"),N=W("0Owb"),_=W("+L6B"),Q=W("2/Rp"),R=W("y8nQ"),E=W("Vl3Y"),S=W("tJVT"),s=W("OaEy"),p=W("2fM7"),v=W("q1tI"),i=W.n(v),A=W("VrN/"),O=W.n(A),w=W("p77/"),g=W.n(w),C=W("c5Ni"),c=W.n(C),a=p.a.Option,u={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"]};pe.b=function(T){var x=T.callback,M=T.onCancel,b=Object(v.useState)("python"),o=Object(S.a)(b,2),r=o[0],n=o[1];function l(B){n(m[B][1])}function L(B){x(B)}return i.a.createElement(E.a,Object(N.a)({},u,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:L}),i.a.createElement(E.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(p.a,{onChange:l},Object.keys(m).map(function(B){return i.a.createElement(a,{key:B,value:B},m[B][0])}))),i.a.createElement(E.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(y,{mode:r})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(Q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function y(T){var x=T.value,M=T.onChange,b=T.mode,o=T.options,r=o===void 0?{}:o,n=Object(v.useRef)(),l=Object(v.useState)(),L=Object(S.a)(l,2),B=L[0],h=L[1];return Object(v.useEffect)(function(){if(B){function I(H){var z=H.getValue();M&&M(z)}return B.on("change",I),function(){B.off("change",I)}}},[B,M]),Object(v.useEffect)(function(){B&&B.setOption("mode",b)},[B,b]),Object(v.useEffect)(function(){B&&((x!==B.getValue()||x==="")&&setTimeout(function(){B.setValue(x||" ")},300))},[B,x]),Object(v.useEffect)(function(){if(n.current&&!B){var I=O.a.fromTextArea(n.current,Object(X.a)({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));h(I)}},[n.current,B]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:n}))}},"7ixt":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return _});var X={adjustX:1,adjustY:1},N=[0,0],_={left:{points:["cr","cl"],overflow:X,offset:[-4,0],targetOffset:N},right:{points:["cl","cr"],overflow:X,offset:[4,0],targetOffset:N},top:{points:["bc","tc"],overflow:X,offset:[0,-4],targetOffset:N},bottom:{points:["tc","bc"],overflow:X,offset:[0,4],targetOffset:N},topLeft:{points:["bl","tl"],overflow:X,offset:[0,-4],targetOffset:N},leftTop:{points:["tr","tl"],overflow:X,offset:[-4,0],targetOffset:N},topRight:{points:["br","tr"],overflow:X,offset:[0,-4],targetOffset:N},rightTop:{points:["tl","tr"],overflow:X,offset:[4,0],targetOffset:N},bottomRight:{points:["tr","br"],overflow:X,offset:[0,4],targetOffset:N},rightBottom:{points:["bl","br"],overflow:X,offset:[4,0],targetOffset:N},bottomLeft:{points:["tl","bl"],overflow:X,offset:[0,4],targetOffset:N},leftBottom:{points:["br","bl"],overflow:X,offset:[-4,0],targetOffset:N}},Q=_},"7oTu":function(Xe,pe,W){var X=W("IMiH"),N=W("QBsz"),_=N.applyTransform,Q=X.CMD,R=[[],[],[]],E=Math.sqrt,S=Math.atan2;function s(p,v){var i=p.data,A,O,w,g,C,c,a=Q.M,u=Q.C,m=Q.L,y=Q.R,T=Q.A,x=Q.Q;for(w=0,g=0;w<i.length;){A=i[w++],g=w,O=0;switch(A){case a:O=1;break;case m:O=1;break;case u:O=3;break;case x:O=2;break;case T:var M=v[4],b=v[5],o=E(v[0]*v[0]+v[1]*v[1]),r=E(v[2]*v[2]+v[3]*v[3]),n=S(-v[1]/r,v[0]/o);i[w]*=o,i[w++]+=M,i[w]*=r,i[w++]+=b,i[w++]*=o,i[w++]*=r,i[w++]+=n,i[w++]+=n,w+=2,g=w;break;case y:c[0]=i[w++],c[1]=i[w++],_(c,c,v),i[g++]=c[0],i[g++]=c[1],c[0]+=i[w++],c[1]+=i[w++],_(c,c,v),i[g++]=c[0],i[g++]=c[1]}for(C=0;C<O;C++){var c=R[C];c[0]=i[w++],c[1]=i[w++],_(c,c,v),i[g++]=c[0],i[g++]=c[1]}}}Xe.exports=s},"815F":function(Xe,pe,W){"use strict";W.d(pe,"e",function(){return S}),W.d(pe,"c",function(){return p}),W.d(pe,"d",function(){return v}),W.d(pe,"a",function(){return A}),W.d(pe,"f",function(){return O}),W.d(pe,"b",function(){return w});var X=W("KQm4"),N=W("VTBJ"),_=W("Ff2n"),Q=W("Zm9Q"),R=W("Kwbf"),E=W("OZM5");function S(g,C){return g!=null?g:C}function s(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=new Map;function c(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(m){var y=m.key,T=m.children;Object(R.a)(y!=null,"Tree node must have a certain key: [".concat(u).concat(y,"]"));var x=String(y);Object(R.a)(!C.has(x)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(x)),C.set(x,!0),c(T,"".concat(u).concat(x," > "))})}c(g)}function p(g){function C(c){var a=Object(Q.a)(c);return a.map(function(u){if(!Object(E.i)(u))return Object(R.a)(!u,"Tree/TreeNode can only accept TreeNode as children."),null;var m=u.key,y=u.props,T=y.children,x=Object(_.a)(y,["children"]),M=Object(N.a)({key:m},x),b=C(T);return b.length&&(M.children=b),M}).filter(function(u){return u})}return C(g)}function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(C===!0?[]:C),a=[];function u(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(T,x){var M=Object(E.h)(y?y.pos:"0",x),b=S(T.key,M),o=Object(N.a)(Object(N.a)({},T),{},{parent:y,pos:M,children:null,data:T,isStart:[].concat(Object(X.a)(y?y.isStart:[]),[x===0]),isEnd:[].concat(Object(X.a)(y?y.isEnd:[]),[x===m.length-1])});return a.push(o),C===!0||c.has(b)?o.children=u(T.children||[],o):o.children=[],o})}return u(g),a}function i(g,C,c){var a;c?typeof c=="string"?a=function(y){return y[c]}:typeof c=="function"&&(a=function(y){return c(y)}):a=function(y,T){return S(y.key,T)};function u(m,y,T){var x=m?m.children:g,M=m?Object(E.h)(T.pos,y):"0";if(m){var b=a(m,M),o={node:m,index:y,pos:M,key:b,parentPos:T.node?T.pos:null,level:T.level+1};C(o)}x&&x.forEach(function(r,n){u(r,n,{node:m,pos:M,level:T?T.level+1:-1})})}u(null)}function A(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=C.initWrapper,a=C.processEntity,u=C.onProcessFinished,m=arguments.length>2?arguments[2]:void 0,y={},T={},x={posEntities:y,keyEntities:T};return c&&(x=c(x)||x),i(g,function(M){var b=M.node,o=M.index,r=M.pos,n=M.key,l=M.parentPos,L=M.level,B={node:b,index:o,key:n,pos:r,level:L},h=S(n,r);y[r]=B,T[h]=B,B.parent=y[l],B.parent&&(B.parent.children=B.parent.children||[],B.parent.children.push(B)),a&&a(B,x)},m),u&&u(x),x}function O(g,C){var c=C.expandedKeys,a=C.selectedKeys,u=C.loadedKeys,m=C.loadingKeys,y=C.checkedKeys,T=C.halfCheckedKeys,x=C.dragOverNodeKey,M=C.dropPosition,b=C.keyEntities,o=b[g],r={eventKey:g,expanded:c.indexOf(g)!==-1,selected:a.indexOf(g)!==-1,loaded:u.indexOf(g)!==-1,loading:m.indexOf(g)!==-1,checked:y.indexOf(g)!==-1,halfChecked:T.indexOf(g)!==-1,pos:String(o?o.pos:""),dragOver:x===g&&M===0,dragOverGapTop:x===g&&M===-1,dragOverGapBottom:x===g&&M===1};return r}function w(g){var C=g.data,c=g.expanded,a=g.selected,u=g.checked,m=g.loaded,y=g.loading,T=g.halfChecked,x=g.dragOver,M=g.dragOverGapTop,b=g.dragOverGapBottom,o=g.pos,r=g.active,n=Object(N.a)(Object(N.a)({},C),{},{expanded:c,selected:a,checked:u,loaded:m,loading:y,halfChecked:T,dragOver:x,dragOverGapTop:M,dragOverGapBottom:b,pos:o,active:r});return"props"in n||Object.defineProperty(n,"props",{get:function(){return Object(R.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),g}}),n}},"8EBN":function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){"use strict";X.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 N=0;N<X.modeInfo.length;N++){var _=X.modeInfo[N];_.mimes&&(_.mime=_.mimes[0])}X.findModeByMIME=function(Q){Q=Q.toLowerCase();for(var R=0;R<X.modeInfo.length;R++){var E=X.modeInfo[R];if(E.mime==Q)return E;if(E.mimes){for(var S=0;S<E.mimes.length;S++)if(E.mimes[S]==Q)return E}}if(/\+xml$/.test(Q))return X.findModeByMIME("application/xml");if(/\+json$/.test(Q))return X.findModeByMIME("application/json")},X.findModeByExtension=function(Q){Q=Q.toLowerCase();for(var R=0;R<X.modeInfo.length;R++){var E=X.modeInfo[R];if(E.ext){for(var S=0;S<E.ext.length;S++)if(E.ext[S]==Q)return E}}},X.findModeByFileName=function(Q){for(var R=0;R<X.modeInfo.length;R++){var E=X.modeInfo[R];if(E.file&&E.file.test(Q))return E}var S=Q.lastIndexOf("."),s=S>-1&&Q.substring(S+1,Q.length);if(s)return X.findModeByExtension(s)},X.findModeByName=function(Q){Q=Q.toLowerCase();for(var R=0;R<X.modeInfo.length;R++){var E=X.modeInfo[R];if(E.name.toLowerCase()==Q)return E;if(E.alias){for(var S=0;S<E.alias.length;S++)if(E.alias[S].toLowerCase()==Q)return E}}}})},"8XDt":function(Xe,pe,W){W("qH13");var X=W("aX58"),N=X.registerPainter,_=W("6fms");N("vml",_)},"8hTe":function(Xe,pe,W){Xe.exports={button:"button___1wy9m"}},"9Bee":function(Xe,pe,W){"use strict";var X=W("DYRE"),N=W("zeV3"),_=W("+L6B"),Q=W("2/Rp"),R=W("k1fw"),E=W("9og8"),S=W("tJVT"),s=W("WmNS"),p=W.n(s),v=W("q1tI"),i=W.n(v),A=W("vg9a"),O=W("DlQD"),w=W.n(O),g=W("rUJ1");function C($,F){var P=$.match(/^(\s+)(?:```)/);if(P===null)return F;var q=P[1];return F.split(`
|
|
`).map(function(le){var te=le.match(/^\s+/);if(te===null)return le;var je=Object(S.a)(te,1),xt=je[0];return xt.length>=q.length?le.slice(q.length):le}).join(`
|
|
`)}var c=[],a=["<ul>"],u=new w.a.Renderer,m=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){c.length=0,a=["<ul>"]}var T={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x($,F,P,q){if(F>=$.length||$[F].level<=P)return F;var le=$[F];q.push("<li><a href='#"+le.anchor+"'>"+le.text+"</a>"),F++;var te=[];return F=x($,F,le.level,te),te.length>0&&(q.push("<ul>"),te.forEach(function(je){q.push(je)}),q.push("</ul>")),q.push("</li>"),F=x($,F,P,q),F}function M(){return x(c,0,0,a),a.push("</ul>"),a.join("")}var b={heading:function(F){var P=m.exec(F);if(P)return{type:"heading",raw:P[0],depth:P[1].length,text:P[2]}},fences:function(F){var P=this.rules.block.fences.exec(F);if(P){var q=P[0],le=C(q,P[3]||""),te=P[2]?P[2].trim():P[2];if(["latex","katex","math"].indexOf(te)>=0){var je=n(),xt=le;le=je,l[je]={type:"block",expression:xt}}return{type:"code",raw:q,lang:te,text:le}}}},o=/(?:\${2})([^\n`]+?)(?:\${2})/gi,r=0,n=function(){return"__special_katext_id_".concat(r++,"__")},l={};function L(){return l}function B(){r=0,l={}}function h($){return $=$.replace(o,function(F,P){var q=n();return l[q]={type:"inline",expression:P},q}),$}var I=u.listitem;u.listitem=function($){return I(h($))};var H=u.paragraph;u.paragraph=function($){return H(h($))};var z=u.tablecell;u.tablecell=function($,F){return z(h($),F)},u.code=function($,F,P){var q=(F||"").match(/\S*/)[0];return q?["latex","katex","math"].indexOf(q)>=0?"<p class='editormd-tex'>".concat($,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(F,'">').concat(P?$:Object(g.escape)($,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(P?$:Object(g.escape)($,!0))+"</code></pre>"},u.heading=function($,F,P){var q=this.options.headerPrefix+P.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:q,level:F,text:$}),"<h"+F+' id="'+q+'">'+$+"</h"+F+">"},w.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),w.a.use({tokenizer:b,renderer:u});var Z=w.a,Y=W("SJMd"),G=W("ulZh"),ee=W.n(G),J=W("m3rI"),oe=W("Oy/b"),se=W("p5ED"),Te=W("ErOA");/*! *****************************************************************************
|
|
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.
|
|
***************************************************************************** */var be=function($,F){return(be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,q){P.__proto__=q}||function(P,q){for(var le in q)Object.prototype.hasOwnProperty.call(q,le)&&(P[le]=q[le])})($,F)};function xe($,F){function P(){this.constructor=$}be($,F),$.prototype=F===null?Object.create(F):(P.prototype=F.prototype,new P)}function Oe($,F,P,q){return new(P||(P=Promise))(function(le,te){function je(kt){try{ot(q.next(kt))}catch(wt){te(wt)}}function xt(kt){try{ot(q.throw(kt))}catch(wt){te(wt)}}function ot(kt){var wt;kt.done?le(kt.value):(wt=kt.value,wt instanceof P?wt:new P(function(Yt){Yt(wt)})).then(je,xt)}ot((q=q.apply($,F||[])).next())})}function Ne($,F){var P,q,le,te,je={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:xt(0),throw:xt(1),return:xt(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function xt(ot){return function(kt){return function(wt){if(P)throw new TypeError("Generator is already executing.");for(;je;)try{if(P=1,q&&(le=2&wt[0]?q.return:wt[0]?q.throw||((le=q.return)&&le.call(q),0):q.next)&&!(le=le.call(q,wt[1])).done)return le;switch(q=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return je.label++,{value:wt[1],done:!1};case 5:je.label++,q=wt[1],wt=[0];continue;case 7:wt=je.ops.pop(),je.trys.pop();continue;default:if(!(le=je.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){je=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]<le[3])){je.label=wt[1];break}if(wt[0]===6&&je.label<le[1]){je.label=le[1],le=wt;break}if(le&&je.label<le[2]){je.label=le[2],je.ops.push(wt);break}le[2]&&je.ops.pop(),je.trys.pop();continue}wt=F.call($,je)}catch(Yt){wt=[6,Yt],q=0}finally{P=le=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([ot,kt])}}}function Le(){for(var $=0,F=0,P=arguments.length;F<P;F++)$+=arguments[F].length;var q=Array($),le=0;for(F=0;F<P;F++)for(var te=arguments[F],je=0,xt=te.length;je<xt;je++,le++)q[le]=te[je];return q}var Se=function(){function $(){}return $.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},$.setAttributes=function(F,P){for(var q=0,le=P;q<le.length;q++){var te=le[q],je=te[0],xt=te[1];F.setAttribute(je,xt)}},$.createRect=function(F,P,q){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",F.toString()),le.setAttribute("height",P.toString()),q&&$.setAttributes(le,q),le},$.createLine=function(F,P,q,le,te){var je=document.createElementNS("http://www.w3.org/2000/svg","line");return je.setAttribute("x1",F.toString()),je.setAttribute("y1",P.toString()),je.setAttribute("x2",q.toString()),je.setAttribute("y2",le.toString()),te&&$.setAttributes(je,te),je},$.createPolygon=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return q.setAttribute("points",F),P&&$.setAttributes(q,P),q},$.createCircle=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","circle");return q.setAttribute("cx",(F/2).toString()),q.setAttribute("cy",(F/2).toString()),q.setAttribute("r",F.toString()),P&&$.setAttributes(q,P),q},$.createEllipse=function(F,P,q){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(F/2).toString()),le.setAttribute("cy",(P/2).toString()),le.setAttribute("rx",(F/2).toString()),le.setAttribute("ry",(P/2).toString()),q&&$.setAttributes(le,q),le},$.createGroup=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return F&&$.setAttributes(P,F),P},$.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},$.createMarker=function(F,P,q,le,te,je,xt){var ot=document.createElementNS("http://www.w3.org/2000/svg","marker");return $.setAttributes(ot,[["id",F],["orient",P],["markerWidth",q.toString()],["markerHeight",le.toString()],["refX",te.toString()],["refY",je.toString()]]),ot.appendChild(xt),ot},$.createText=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),F&&$.setAttributes(P,F),P},$.createTSpan=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return q.textContent=F,P&&$.setAttributes(q,P),q},$.createImage=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return F&&$.setAttributes(P,F),P},$.createPoint=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return q.x=F,q.y=P,q},$.createPath=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","path");return q.setAttribute("d",F),P&&$.setAttributes(q,P),q},$}(),tt=function(){function $(){}return $.addKey=function(F){$.key=F},Object.defineProperty($,"isLicensed",{get:function(){return!!$.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test($.key)},enumerable:!1,configurable:!0}),$}(),Bt=function(){function $(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return $.prototype.rasterize=function(F,P,q){var le=this;return new Promise(function(te){var je=q!==void 0?q:document.createElement("canvas");F===null&&(le.markersOnly=!0,le.naturalSize=!1);var xt=document.createElementNS("http://www.w3.org/2000/svg","svg");xt.setAttribute("xmlns","http://www.w3.org/2000/svg"),xt.setAttribute("width",P.width.baseVal.valueAsString),xt.setAttribute("height",P.height.baseVal.valueAsString),xt.setAttribute("viewBox","0 0 "+P.viewBox.baseVal.width.toString()+" "+P.viewBox.baseVal.height.toString()),xt.innerHTML=P.innerHTML,le.naturalSize===!0?(xt.width.baseVal.value=F.naturalWidth,xt.height.baseVal.value=F.naturalHeight):le.width!==void 0&&le.height!==void 0&&(xt.width.baseVal.value=le.width,xt.height.baseVal.value=le.height),je.width=xt.width.baseVal.value,je.height=xt.height.baseVal.value;var ot=xt.outerHTML,kt=je.getContext("2d");le.markersOnly!==!0&&kt.drawImage(F,0,0,je.width,je.height);var wt=window.URL,Yt=new Image(je.width,je.height);Yt.setAttribute("crossOrigin","anonymous");var Gt=new Blob([ot],{type:"image/svg+xml"}),Jt=wt.createObjectURL(Gt);Yt.onload=function(){kt.drawImage(Yt,0,0),wt.revokeObjectURL(Jt);var hr=je.toDataURL(le.imageType,le.imageQuality);te(hr)},Yt.src=Jt})},$}(),De=function(){},Qe=function(){function $(F){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+F+"_"}return Object.defineProperty($.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty($.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($.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),$.prototype.addClass=function(F){return this.styleSheet===void 0&&this.addStyleSheet(),F.name=""+this.classNamePrefix+F.localName,this.classes.push(F),this.styleSheet.sheet.insertRule("."+F.name+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length),F},$.prototype.addRule=function(F){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(F),this.styleSheet.sheet.insertRule(F.selector+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length)},$.prototype.addStyleSheet=function(){var F;this.styleSheet=document.createElement("style"),((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ae("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ae("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},$.prototype.removeStyleSheet=function(){var F;this.styleSheet&&(((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},$}(),it=function($,F){this.selector=$,this.style=F},Ae=function($,F){this.localName=$,this.style=F},re=function(){function $(F,P,q,le,te){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=F,this.displayMode=P,this.markerItems=q,this.uiStyleSettings=le,this.styles=te,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return $.prototype.show=function(F){var P=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=F,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var q=document.createElement("div");q.className=this.toolbarBlockStyleClass.name,q.style.whiteSpace="nowrap",this.uiContainer.appendChild(q),this.addActionButton(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(te){var je=document.createElement("div");je.className=""+P.toolbarButtonStyleClass.name,je.setAttribute("data-type-name",te.typeName),je.innerHTML=te.icon,je.addEventListener("click",function(){P.markerToolbarButtonClicked(je,te)}),P.buttons.push(je),P.markerButtons.push(je)}),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 le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<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(le,'<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()},$.prototype.addButtonClickListener=function(F){this.buttonClickListeners.push(F)},$.prototype.removeButtonClickListener=function(F){this.buttonClickListeners.indexOf(F)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(F),1)},$.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},$.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var F=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var P=0;P<this.markerButtons.length;P++)P<F||P===F&&this.markerButtons.length-1===F?this.markerButtonBlock.appendChild(this.markerButtons[P]):(P===F&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[P]))}},$.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(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")},$.prototype.resetButtonStyles=function(){var F=this;this.buttons.forEach(function(P){P.className=P.className.replace(F.uiStyleSettings.toolbarButtonStyleColorsClassName?F.uiStyleSettings.toolbarButtonStyleColorsClassName:F.toolbarButtonStyleColorsClass.name,"").trim(),P.className=P.className.replace(F.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?F.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:F.toolbarActiveButtonStyleColorsClass.name,"").trim(),P.className+=" "+(F.uiStyleSettings.toolbarButtonStyleColorsClassName?F.uiStyleSettings.toolbarButtonStyleColorsClassName:F.toolbarButtonStyleColorsClass.name)})},$.prototype.addActionButton=function(F,P,q){var le=this,te=document.createElement("div");switch(te.className=""+this.toolbarButtonStyleClass.name,te.innerHTML=P,te.setAttribute("data-action",q),te.addEventListener("click",function(){le.actionToolbarButtonClicked(te,q)}),q){case"select":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":te.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":te.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":te.style.fill=this.uiStyleSettings.closeButtonColor}F.appendChild(te),this.buttons.push(te)},$.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ae("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ae("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ae("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ae("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Ae("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var F=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ae("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},$.prototype.markerToolbarButtonClicked=function(F,P){this.setActiveButton(F),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("marker",P)}),this.markerButtonOverflowBlock.style.display="none"},$.prototype.actionToolbarButtonClicked=function(F,P){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("action",P)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},$.prototype.setActiveButton=function(F){this.resetButtonStyles(),F.className=F.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),F.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},$.prototype.setActiveMarkerButton=function(F){var P=this.markerButtons.find(function(q){return q.getAttribute("data-type-name")===F});P&&this.setActiveButton(P)},$.prototype.setCurrentMarker=function(F){var P=this;this.currentMarker=F,this.buttons.filter(function(q){return/delete|notes/.test(q.getAttribute("data-action"))}).forEach(function(q){P.currentMarker===void 0?(q.style.fillOpacity="0.4",q.style.pointerEvents="none"):(q.style.fillOpacity="1",q.style.pointerEvents="all")})},$}(),ie=function(){function $(F,P,q,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=F,this.displayMode=P,this.uiStyleSettings=q,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return $.prototype.addStyles=function(){var F;this.toolboxStyleClass=this.styles.addClass(new Ae("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Ae("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var P=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ae("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ae("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-panel-row_colors",`
|
|
background-color: `+((F=this.uiStyleSettings.toolboxBackgroundColor)!==null&&F!==void 0?F:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ae("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
padding: `+P+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},$.prototype.show=function(F){var P;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=F,this.uiContainer.className=this.toolboxStyleClass.name+" "+((P=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},$.prototype.setPanelButtons=function(F){var P,q,le=this;this.panels=F,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((P=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((q=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&q!==void 0?q:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(te){var je;te.uiStyleSettings=le.uiStyleSettings;var xt=document.createElement("div");xt.className=le.toolboxButtonStyleClass.name+" "+((je=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:le.toolboxButtonStyleColorsClass.name),xt.innerHTML=te.icon,xt.title=te.title,xt.addEventListener("click",function(){le.panelButtonClick(te)}),le.panelButtons.push(xt),le.buttonRow.appendChild(xt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},$.prototype.panelButtonClick=function(F){var P=this,q=-1;if(F!==this.activePanel){q=this.panels.indexOf(F),this.panelRow.innerHTML="";var le=F.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),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=F}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){P.displayMode==="inline"?P.panelRow.style.display="none":P.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(te,je){var xt,ot;te.className=P.toolboxButtonStyleClass.name+" "+(je===q?""+((xt=P.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&xt!==void 0?xt:P.toolboxActiveButtonStyleColorsClass.name):""+((ot=P.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ot!==void 0?ot:P.toolboxButtonStyleColorsClass.name))})},$}(),ce=function($,F){this.title=$,this.icon=F},Be=function($){function F(P,q,le,te){var je=$.call(this,P,te||'<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 je.colors=[],je.addTransparent=!1,je.colorBoxes=[],je.colors=q,je.currentColor=le,je.setCurrentColor=je.setCurrentColor.bind(je),je.getColorBox=je.getColorBox.bind(je),je}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.whiteSpace="nowrap",this.colors.forEach(function(le){var te=P.getColorBox(le);q.appendChild(te),P.colorBoxes.push(te)}),q},F.prototype.getColorBox=function(P){var q=this,le=this.uiStyleSettings.toolbarHeight/4,te=this.uiStyleSettings.toolbarHeight-le,je=document.createElement("div");je.style.display="inline-block",je.style.boxSizing="content-box",je.style.width=te-2+"px",je.style.height=te-2+"px",je.style.padding="1px",je.style.marginRight="2px",je.style.marginBottom="2px",je.style.borderWidth="2px",je.style.borderStyle="solid",je.style.borderRadius=(te+2)/2+"px",je.style.borderColor=P===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",je.addEventListener("click",function(){q.setCurrentColor(P,je)});var xt=document.createElement("div");return xt.style.display="inline-block",xt.style.width=te-2+"px",xt.style.height=te-2+"px",xt.style.backgroundColor=P,xt.style.borderRadius=te/2+"px",P==="transparent"&&(xt.style.fill=this.uiStyleSettings.toolboxAccentColor,xt.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<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" />
|
|
</svg>`),je.appendChild(xt),je},F.prototype.setCurrentColor=function(P,q){var le=this;this.currentColor=P,this.colorBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(P)},F}(ce),Re=function(){function $(F,P,q){this._state="new",this._isSelected=!1,this._container=F,this._overlayContainer=P,this.globalSettings=q,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty($.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),$.prototype.ownsTarget=function(F){return!1},Object.defineProperty($.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),$.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},$.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},$.prototype.pointerDown=function(F,P){},$.prototype.dblClick=function(F,P){},$.prototype.manipulate=function(F){},$.prototype.pointerUp=function(F){this.stateChanged()},$.prototype.dispose=function(){},$.prototype.addMarkerVisualToContainer=function(F){this.container.childNodes.length>0?this.container.insertBefore(F,this.container.childNodes[0]):this.container.appendChild(F)},$.prototype.getState=function(){return{typeName:$.typeName,state:this.state,notes:this.notes}},$.prototype.restoreState=function(F){this._state=F.state,this.notes=F.notes},$.prototype.scale=function(F,P){},$.prototype.colorChanged=function(F){this.onColorChanged&&this.onColorChanged(F),this.stateChanged()},$.prototype.fillColorChanged=function(F){this.onFillColorChanged&&this.onFillColorChanged(F),this.stateChanged()},$.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var F=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),F.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(F)&&this.onStateChanged(this)}},$.typeName="MarkerBase",$}(),ke=function(){function $(){this.findGripByVisual=this.findGripByVisual.bind(this)}return $.prototype.findGripByVisual=function(F){return this.topLeft.ownsTarget(F)?this.topLeft:this.topCenter.ownsTarget(F)?this.topCenter:this.topRight.ownsTarget(F)?this.topRight:this.centerLeft.ownsTarget(F)?this.centerLeft:this.centerRight.ownsTarget(F)?this.centerRight:this.bottomLeft.ownsTarget(F)?this.bottomLeft:this.bottomCenter.ownsTarget(F)?this.bottomCenter:this.bottomRight.ownsTarget(F)?this.bottomRight:void 0},$}(),ft=function(){function $(){this.GRIP_SIZE=10,this.visual=Se.createGroup(),this.visual.appendChild(Se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Se.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(F){return F===this.visual||F===this.visual.childNodes[0]||F===this.visual.childNodes[1]},$}(),pt=function(){function $(){}return $.toITransformMatrix=function(F){return{a:F.a,b:F.b,c:F.c,d:F.d,e:F.e,f:F.f}},$.toSVGMatrix=function(F,P){return F.a=P.a,F.b=P.b,F.c=P.c,F.d=P.d,F.e=P.e,F.f=P.f,F},$}(),bt=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.left=0,te.top=0,te.width=0,te.height=0,te.defaultSize={x:50,y:20},te.offsetX=0,te.offsetY=0,te.rotationAngle=0,te.CB_DISTANCE=10,te._suppressMarkerCreateEvent=!1,te.container.transform.baseVal.appendItem(Se.createTransform()),te.setupControlBox(),te}return xe(F,$),Object.defineProperty(F.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"visual",{get:function(){return this._visual},set:function(P){this._visual=P;var q=Se.createTransform();this._visual.transform.baseVal.appendItem(q)},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(P){return!!$.prototype.ownsTarget.call(this,P)||!!(this.controlGrips.findGripByVisual(P)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(P))},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="new"&&(this.left=P.x,this.top=P.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(P);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(q),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(q)){this.activeGrip=this.rotatorGrip;var te=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=te.x-this.width/2,this.top=te.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var je=this.container.transform.baseVal.getItem(0);je.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(je,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},F.prototype.pointerUp=function(P){var q=this.state;$.prototype.pointerUp.call(this,P),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(P),this._state="select",q==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},F.prototype.moveVisual=function(P){this.visual.style.transform="translate("+P.x+"px, "+P.y+"px)"},F.prototype.manipulate=function(P){var q=this.unrotatePoint(P);this.state==="creating"?this.resize(P):this.state==="move"?(this.left=this.manipulationStartLeft+(q.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(q.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(q):this.state==="rotate"&&this.rotate(P)},F.prototype.resize=function(P){var q=this.manipulationStartLeft,le=this.manipulationStartWidth,te=this.manipulationStartTop,je=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:q=this.manipulationStartLeft+P.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-q;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+P.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:te=this.manipulationStartTop+P.y-this.manipulationStartY,je=this.manipulationStartHeight+this.manipulationStartTop-te;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:je=this.manipulationStartHeight+P.y-this.manipulationStartY}le>=0?(this.left=q,this.width=le):(this.left=q+le,this.width=-le),je>=0?(this.top=te,this.height=je):(this.top=te+je,this.height=-je),this.setSize()},F.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},F.prototype.rotate=function(P){if(Math.abs(P.x-this.centerX)>.1){var q=Math.sign(P.x-this.centerX);this.rotationAngle=180*Math.atan((P.y-this.centerY)/(P.x-this.centerX))/Math.PI+90*q,this.applyRotation()}},F.prototype.applyRotation=function(){var P=this.container.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(P,0)},F.prototype.rotatePoint=function(P){if(this.rotationAngle===0)return P;var q=this.container.getCTM(),le=Se.createPoint(P.x,P.y);return{x:(le=le.matrixTransform(q)).x,y:le.y}},F.prototype.unrotatePoint=function(P){if(this.rotationAngle===0)return P;var q=this.container.getCTM();q=q.inverse();var le=Se.createPoint(P.x,P.y);return{x:(le=le.matrixTransform(q)).x,y:le.y}},F.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},F.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},F.prototype.setupControlBox=function(){this.controlBox=Se.createGroup();var P=Se.createTransform();P.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(P),this.container.appendChild(this.controlBox),this.controlRect=Se.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),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Se.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 ke,this.addControlGrips(),this.controlBox.style.display="none"},F.prototype.adjustControlBox=function(){var P=this.controlBox.transform.baseVal.getItem(0);P.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(P,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(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()},F.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(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},F.prototype.createGrip=function(){var P=new ft;return P.visual.transform.baseVal.appendItem(Se.createTransform()),this.controlBox.appendChild(P.visual),P},F.prototype.positionGrips=function(){var P=this.controlGrips.topLeft.GRIP_SIZE,q=-P/2,le=q,te=(this.width+this.CB_DISTANCE)/2-P/2,je=(this.height+this.CB_DISTANCE)/2-P/2,xt=this.height+this.CB_DISTANCE-P/2,ot=this.width+this.CB_DISTANCE-P/2;this.positionGrip(this.controlGrips.topLeft.visual,q,le),this.positionGrip(this.controlGrips.topCenter.visual,te,le),this.positionGrip(this.controlGrips.topRight.visual,ot,le),this.positionGrip(this.controlGrips.centerLeft.visual,q,je),this.positionGrip(this.controlGrips.centerRight.visual,ot,je),this.positionGrip(this.controlGrips.bottomLeft.visual,q,xt),this.positionGrip(this.controlGrips.bottomCenter.visual,te,xt),this.positionGrip(this.controlGrips.bottomRight.visual,ot,xt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,te,le-3*this.CB_DISTANCE)},F.prototype.positionGrip=function(P,q,le){var te=P.transform.baseVal.getItem(0);te.setTranslate(q,le),P.transform.baseVal.replaceItem(te,0)},F.prototype.hideControlBox=function(){this.controlBox.style.display="none"},F.prototype.showControlBox=function(){this.controlBox.style.display=""},F.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},$.prototype.getState.call(this))},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P);var q=P;this.left=q.left,this.top=q.top,this.width=q.width,this.height=q.height,this.rotationAngle=q.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,q.containerTransformMatrix))},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q);var le=this.rotatePoint({x:this.left,y:this.top}),te=this.unrotatePoint({x:le.x*P,y:le.y*q});this.left=te.x,this.top=te.y,this.width=this.width*P,this.height=this.height*q,this.adjustControlBox()},F}(Re),yt=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.createVisual=te.createVisual.bind(te),te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.visual)},F.prototype.createVisual=function(){this.visual=Se.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)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.manipulate=function(P){$.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){$.prototype.resize.call(this,P),this.setSize()},F.prototype.setSize=function(){$.prototype.setSize.call(this),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},F.prototype.pointerUp=function(P){$.prototype.pointerUp.call(this,P),this.setSize()},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},F.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},F.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this))},F.prototype.restoreState=function(P){var q=P;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),$.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.setSize()},F.title="Rectangle marker",F}(bt),_t=function($){function F(P,q,le,te){var je=$.call(this,P,te||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return je.widths=[],je.widthBoxes=[],je.widths=q,je.currentWidth=le,je.setCurrentWidth=je.setCurrentWidth.bind(je),je}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.widths.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.flexGrow="2",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===P.currentWidth?P.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){P.setCurrentWidth(le,te)}),q.appendChild(te);var je=document.createElement("div");je.innerText=le.toString(),je.style.marginRight="5px",te.appendChild(je);var xt=document.createElement("div");xt.style.minHeight="20px",xt.style.flexGrow="2",xt.style.display="flex",xt.style.alignItems="center";var ot=document.createElement("hr");ot.style.minWidth="20px",ot.style.border="0px",ot.style.borderTop=le+"px solid "+P.uiStyleSettings.toolboxColor,ot.style.flexGrow="2",xt.appendChild(ot),te.appendChild(xt),P.widthBoxes.push(te)}),q},F.prototype.setCurrentWidth=function(P,q){var le=this;this.currentWidth=P,this.widthBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},F}(ce),It=function($){function F(P,q,le,te){var je=$.call(this,P,te||'<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 je.styles=[],je.styleBoxes=[],je.styles=q,je.currentStyle=le,je.setCurrentStyle=je.setCurrentStyle.bind(je),je}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.styles.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/P.styles.length-5+"%",te.style.borderColor=le===P.currentStyle?P.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){P.setCurrentStyle(le,te)}),q.appendChild(te);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.overflow="hidden";var xt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+P.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;je.innerHTML=xt,te.appendChild(je),P.styleBoxes.push(te)}),q},F.prototype.setCurrentStyle=function(P,q){var le=this;this.currentStyle=P,this.styleBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},F}(ce),He=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new Be("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new _t("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new It("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return xe(F,$),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=$.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="FrameMarker",F.title="Frame marker",F.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',F}(yt),Pe=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},At=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.x1=0,te.y1=0,te.x2=0,te.y2=0,te.defaultLength=50,te.manipulationStartX=0,te.manipulationStartY=0,te.manipulationStartX1=0,te.manipulationStartY1=0,te.manipulationStartX2=0,te.manipulationStartY2=0,te.setupControlBox(),te}return xe(F,$),F.prototype.ownsTarget=function(P){return!!$.prototype.ownsTarget.call(this,P)||!(!this.grip1.ownsTarget(P)&&!this.grip2.ownsTarget(P))},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.manipulationStartX=P.x,this.manipulationStartY=P.y,this.state==="new"&&(this.x1=P.x,this.y1=P.y,this.x2=P.x,this.y2=P.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(q)?this.activeGrip=this.grip1:this.grip2.ownsTarget(q)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},F.prototype.pointerUp=function(P){var q=this.state;$.prototype.pointerUp.call(this,P),this.state==="creating"&&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(P),this._state="select",q==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},F.prototype.adjustVisual=function(){},F.prototype.manipulate=function(P){this.state==="creating"?this.resize(P):this.state==="move"?(this.x1=this.manipulationStartX1+P.x-this.manipulationStartX,this.y1=this.manipulationStartY1+P.y-this.manipulationStartY,this.x2=this.manipulationStartX2+P.x-this.manipulationStartX,this.y2=this.manipulationStartY2+P.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(P)},F.prototype.resize=function(P){switch(this.activeGrip){case this.grip1:this.x1=P.x,this.y1=P.y;break;case this.grip2:case void 0:this.x2=P.x,this.y2=P.y}this.adjustVisual(),this.adjustControlBox()},F.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},F.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},F.prototype.setupControlBox=function(){this.controlBox=Se.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},F.prototype.adjustControlBox=function(){this.positionGrips()},F.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},F.prototype.createGrip=function(){var P=new ft;return P.visual.transform.baseVal.appendItem(Se.createTransform()),this.controlBox.appendChild(P.visual),P},F.prototype.positionGrips=function(){var P=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-P/2,this.y1-P/2),this.positionGrip(this.grip2.visual,this.x2-P/2,this.y2-P/2)},F.prototype.positionGrip=function(P,q,le){var te=P.transform.baseVal.getItem(0);te.setTranslate(q,le),P.transform.baseVal.replaceItem(te,0)},F.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},$.prototype.getState.call(this))},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P);var q=P;this.x1=q.x1,this.y1=q.y1,this.x2=q.x2,this.y2=q.y2},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.x1=this.x1*P,this.y1=this.y1*q,this.x2=this.x2*P,this.y2=this.y2*q,this.adjustVisual(),this.adjustControlBox()},F}(Re),mt=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new Be("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new _t("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new It("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorLine&&P!==this.visibleLine)},F.prototype.createVisual=function(){this.visual=Se.createGroup(),this.selectorLine=Se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Se.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)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},F.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()),Se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P);var q=P;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.createVisual(),this.adjustVisual()},F.typeName="LineMarker",F.title="Line marker",F.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',F}(At),Ze=function($){function F(P,q,le,te){var je=$.call(this,P,te||'<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 je.fonts=[],je.fontBoxes=[],je.fonts=q,je.currentFont=le,je.setCurrentFont=je.setCurrentFont.bind(je),je}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.flexGrow="2",this.fonts.forEach(function(le){var te=document.createElement("div");te.style.display="inline-block",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/P.fonts.length-5+"%",te.style.borderColor=le===P.currentFont?P.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){P.setCurrentFont(le,te)}),q.appendChild(te);var je=document.createElement("div");je.style.display="flex",je.style.minHeight="20px",je.style.flexGrow="2",je.style.fontFamily=le,je.style.overflow="hidden";var xt=document.createElement("div");xt.style.whiteSpace="nowrap",xt.style.overflow="hidden",xt.style.textOverflow="ellipsis",xt.innerHTML="The quick brown fox jumps over the lazy dog",je.appendChild(xt),te.appendChild(je),P.fontBoxes.push(te)}),q},F.prototype.setCurrentFont=function(P,q){var le=this;this.currentFont=P,this.fontBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},F}(ce),ut=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.color="transparent",te.padding=5,te.DEFAULT_TEXT="your text here",te.text=te.DEFAULT_TEXT,te.isMoved=!1,te.color=le.defaultColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setColor=te.setColor.bind(te),te.setFont=te.setFont.bind(te),te.renderText=te.renderText.bind(te),te.sizeText=te.sizeText.bind(te),te.textEditDivClicked=te.textEditDivClicked.bind(te),te.showTextEditor=te.showTextEditor.bind(te),te.setSize=te.setSize.bind(te),te.positionTextEditor=te.positionTextEditor.bind(te),te.colorPanel=new Be("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.fontFamilyPanel=new Ze("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te}return xe(F,$),F.prototype.ownsTarget=function(P){if($.prototype.ownsTarget.call(this,P)||P===this.visual||P===this.textElement||P===this.bgRectangle)return!0;var q=!1;return this.textElement.childNodes.forEach(function(le){le===P&&(q=!0)}),q},F.prototype.createVisual=function(){this.visual=Se.createGroup(),this.bgRectangle=Se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.textElement.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.isMoved=!1,this.pointerDownPoint=P,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.renderText=function(){var P=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(q){P.textElement.appendChild(Se.createTSpan(q.trim()===""?" ":q.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},F.prototype.getTextScale=function(){var P=this.textElement.getBBox(),q=1;if(P.width>0&&P.height>0){var le=(1*this.width-this.width*this.padding*2/100)/P.width,te=(1*this.height-this.height*this.padding*2/100)/P.height;q=Math.min(le,te)}return q},F.prototype.getTextPosition=function(P){var q=this.textElement.getBBox(),le=0,te=0;return q.width>0&&q.height>0&&(le=(this.width-q.width*P)/2,te=this.height/2-q.height*P/2),{x:le,y:te}},F.prototype.sizeText=function(){var P=this.textElement.getBBox(),q=this.getTextScale(),le=this.getTextPosition(q);le.y-=P.y*q,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+q+", "+q+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(q,q))},F.prototype.manipulate=function(P){$.prototype.manipulate.call(this,P),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(P.x-this.pointerDownPoint.x)>5||Math.abs(P.y-this.pointerDownPoint.y)>5)},F.prototype.resize=function(P){$.prototype.resize.call(this,P),this.isMoved=!0,this.setSize(),this.sizeText()},F.prototype.setSize=function(){$.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},F.prototype.pointerUp=function(P){var q=this.state;q==="creating"&&(this._suppressMarkerCreateEvent=!0),$.prototype.pointerUp.call(this,P),this.setSize(),(q==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},F.prototype.showTextEditor=function(){var P=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(q){q.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var q=Number.parseFloat(P.textEditor.style.fontSize);P.textEditor.clientWidth>=Number.parseInt(P.textEditor.style.maxWidth)&&q>.9;)q-=.1,P.textEditor.style.fontSize=Math.max(q,.9)+"em"}),this.textEditor.addEventListener("keyup",function(q){q.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(q){if(q.clipboardData){var le=q.clipboardData.getData("text"),te=window.getSelection();if(!te.rangeCount)return!1;te.deleteFromDocument(),te.getRangeAt(0).insertNode(document.createTextNode(le)),q.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){P.textEditDivClicked(P.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},F.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var P=this.getTextScale(),q=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),te={x:le.width*P,y:le.height*P};q.x-=te.x/2,q.y-=te.y/2,this.textEditor.style.top=q.y+"px",this.textEditor.style.left=q.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-q.x+"px",this.textEditor.style.fontSize=Math.max(16*P,12)+"px",this.textElement.style.display="none"}},F.prototype.textEditDivClicked=function(P){this.text=P.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},F.prototype.select=function(){$.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},F.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),$.prototype.deselect.call(this)},F.prototype.dblClick=function(P,q){$.prototype.dblClick.call(this,P,q),this.showTextEditor()},F.prototype.setColor=function(P){this.textElement&&Se.setAttributes(this.textElement,[["fill",P]]),this.color=P,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(P)},F.prototype.setFont=function(P){this.textElement&&Se.setAttributes(this.textElement,[["font-family",P]]),this.fontFamily=P,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},F.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},F.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var q=P;this.color=q.color,this.fontFamily=q.fontFamily,this.padding=q.padding,this.text=q.text,this.createVisual(),$.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.setSize(),this.sizeText(),this.positionTextEditor()},F.typeName="TextMarker",F.title="Text marker",F.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>',F}(bt),Ke=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.color="transparent",te.lineWidth=3,te.drawing=!1,te.pixelRatio=1,te.color=le.defaultColor,te.lineWidth=le.defaultStrokeWidth,te.pixelRatio=le.freehandPixelRatio,te.setColor=te.setColor.bind(te),te.addCanvas=te.addCanvas.bind(te),te.finishCreation=te.finishCreation.bind(te),te.setLineWidth=te.setLineWidth.bind(te),te.colorPanel=new Be("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.lineWidthPanel=new _t("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.lineWidthPanel.onWidthChanged=te.setLineWidth,te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.drawingImage)},F.prototype.createVisual=function(){this.visual=Se.createGroup(),this.drawingImage=Se.createImage(),this.visual.appendChild(this.drawingImage);var P=Se.createTransform();this.visual.transform.baseVal.appendItem(P),this.addMarkerVisualToContainer(this.visual)},F.prototype.pointerDown=function(P,q){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(P.x,P.y),this.drawing=!0):$.prototype.pointerDown.call(this,P,q)},F.prototype.manipulate=function(P){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(P.x,P.y),this.canvasContext.stroke()):$.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){$.prototype.resize.call(this,P),Se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},F.prototype.pointerUp=function(P){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):$.prototype.pointerUp.call(this,P)},F.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)},F.prototype.select=function(){this.state==="creating"&&this.finishCreation(),$.prototype.select.call(this)},F.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),$.prototype.deselect.call(this)},F.prototype.finishCreation=function(){for(var P=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),q=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=q[0],te=q[1],je=q[2],xt=q[3],ot=!1,kt=0;kt<this.canvasElement.height;kt++)for(var wt=0;wt<this.canvasElement.width;wt++)P.data[kt*this.canvasElement.width*4+4*wt+3]>0&&(ot=!0,kt<te&&(te=kt),wt<le&&(le=wt),kt>xt&&(xt=kt),wt>je&&(je=wt));if(ot){this.left=le/this.pixelRatio,this.top=te/this.pixelRatio,this.width=(je-le)/this.pixelRatio,this.height=(xt-te)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=je-le,Yt.height=xt-te,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(le,te,je-le,xt-te),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},F.prototype.setDrawingImage=function(){Se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Se.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},F.prototype.setColor=function(P){this.color=P,this.colorChanged(P)},F.prototype.setLineWidth=function(P){this.lineWidth=P},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({drawingImgUrl:this.drawingImgUrl},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){this.createVisual(),$.prototype.restoreState.call(this,P),this.drawingImgUrl=P.drawingImgUrl,this.setDrawingImage()},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.setDrawingImage()},F.typeName="FreehandMarker",F.title="Freehand marker",F.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>',F}(bt),Ie=function($){function F(P,q,le){var te=$.call(this,P,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return te.typeBoxes=[],te.currentType=q,te.setCurrentType=te.setCurrentType.bind(te),te}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2";for(var le=function(xt){var ot="both";switch(xt){case 0:ot="both";break;case 1:ot="start";break;case 2:ot="end";break;case 3:ot="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=ot===te.currentType?te.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){P.setCurrentType(ot,kt)}),q.appendChild(kt),ot==="both"||ot==="start"){var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,wt.style.marginLeft="5px",kt.appendChild(wt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var Gt=document.createElement("hr");if(Gt.style.minWidth="20px",Gt.style.border="0px",Gt.style.borderTop="3px solid "+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee"),Gt.style.flexGrow="2",Yt.appendChild(Gt),kt.appendChild(Yt),ot==="both"||ot==="end"){var Jt=document.createElement("div");Jt.style.display="flex",Jt.style.alignItems="center",Jt.style.minHeight="20px",Jt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Jt.style.marginRight="5px",kt.appendChild(Jt)}te.typeBoxes.push(kt)},te=this,je=0;je<4;je++)le(je);return q},F.prototype.setCurrentType=function(P,q){var le=this;this.currentType=P,this.typeBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},F}(ce),Me=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.arrowType="end",te.arrowBaseHeight=10,te.arrowBaseWidth=10,te.getArrowPoints=te.getArrowPoints.bind(te),te.setArrowType=te.setArrowType.bind(te),te.arrowTypePanel=new Ie("Arrow type","end"),te.arrowTypePanel.onArrowTypeChanged=te.setArrowType,te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.arrow1&&P!==this.arrow2)},F.prototype.getArrowPoints=function(P,q){var le=this.arrowBaseWidth+2*this.strokeWidth,te=this.arrowBaseHeight+2*this.strokeWidth;return P-le/2+","+(q+te/2)+" "+P+","+(q-te/2)+" "+(P+le/2)+","+(q+te/2)},F.prototype.createTips=function(){this.arrow1=Se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Se.createTransform()),this.visual.appendChild(this.arrow2)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="creating"&&this.createTips()},F.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Se.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var P=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),q=this.arrow1.transform.baseVal.getItem(0);q.setRotate(P,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(q,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(P+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},F.prototype.setArrowType=function(P){this.arrowType=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({arrowType:this.arrowType},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P);var q=P;this.arrowType=q.arrowType,this.createTips(),this.adjustVisual()},F.typeName="ArrowMarker",F.title="Arrow marker",F.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',F}(mt),me=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.fillColor=le.defaultFillColor,te.strokeWidth=0,te.fillPanel=new Be("Color",le.defaultColorSet,le.defaultFillColor),te.fillPanel.onColorChanged=te.setFillColor,te}return xe(F,$),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=$.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="CoverMarker",F.title="Cover marker",F.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',F}(yt),Ee=function($){function F(P,q,le,te){var je=$.call(this,P,te||'<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 je.opacities=[],je.opacityBoxes=[],je.opacities=q,je.currentOpacity=le,je.setCurrentOpacity=je.setCurrentOpacity.bind(je),je}return xe(F,$),F.prototype.getUi=function(){var P=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",q.style.justifyContent="space-between",this.opacities.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="center",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===P.currentOpacity?P.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){P.setCurrentOpacity(le,te)}),q.appendChild(te);var je=document.createElement("div");je.innerText=100*le+"%",te.appendChild(je),P.opacityBoxes.push(te)}),q},F.prototype.setCurrentOpacity=function(P,q){var le=this;this.currentOpacity=P,this.opacityBoxes.forEach(function(te){te.style.borderColor=te===q?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},F}(ce),ge=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.setOpacity=te.setOpacity.bind(te),te.fillColor=le.defaultHighlightColor,te.strokeWidth=0,te.opacity=le.defaultHighlightOpacity,te.fillPanel=new Be("Color",le.defaultColorSet,te.fillColor),te.fillPanel.onColorChanged=te.setFillColor,te.opacityPanel=new Ee("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return xe(F,$),F.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=$.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="HighlightMarker",F.title="Highlight marker",F.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>',F}(me),we='<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>',ze=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.bgColor="transparent",te.tipPosition={x:0,y:0},te.tipBase1Position={x:0,y:0},te.tipBase2Position={x:0,y:0},te.tipMoving=!1,te.color=le.defaultStrokeColor,te.bgColor=le.defaultFillColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setBgColor=te.setBgColor.bind(te),te.getTipPoints=te.getTipPoints.bind(te),te.positionTip=te.positionTip.bind(te),te.setTipPoints=te.setTipPoints.bind(te),te.colorPanel=new Be("Text color",le.defaultColorSet,te.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>'),te.colorPanel.onColorChanged=te.setColor,te.bgColorPanel=new Be("Fill color",le.defaultColorSet,te.bgColor,we),te.bgColorPanel.onColorChanged=te.setBgColor,te.fontFamilyPanel=new Ze("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te.tipGrip=new ft,te.tipGrip.visual.transform.baseVal.appendItem(Se.createTransform()),te.controlBox.appendChild(te.tipGrip.visual),te}return xe(F,$),F.prototype.ownsTarget=function(P){return $.prototype.ownsTarget.call(this,P)||this.tipGrip.ownsTarget(P)||this.tip===P},F.prototype.createTip=function(){Se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},F.prototype.pointerDown=function(P,q){this.state==="new"&&$.prototype.pointerDown.call(this,P,q),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(q)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):$.prototype.pointerDown.call(this,P,q)},F.prototype.pointerUp=function(P){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,$.prototype.pointerUp.call(this,P);else{var q=this.state==="creating";$.prototype.pointerUp.call(this,P),this.setTipPoints(q),this.positionTip()}},F.prototype.manipulate=function(P){if(this.tipMoving){var q=this.unrotatePoint(P);this.tipPosition={x:q.x-this.manipulationStartLeft,y:q.y-this.manipulationStartTop},this.positionTip()}else $.prototype.manipulate.call(this,P)},F.prototype.setBgColor=function(P){this.bgRectangle&&this.tip&&(Se.setAttributes(this.bgRectangle,[["fill",P]]),Se.setAttributes(this.tip,[["fill",P]])),this.bgColor=P,this.fillColorChanged(P)},F.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},F.prototype.setTipPoints=function(P){P===void 0&&(P=!1);var q=Math.min(this.height/2,15),le=this.height/5;P&&(this.tipPosition={x:q+le/2,y:this.height+20});var te=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:0},this.tipBase2Position={x:q+le,y:0}):(this.tipBase1Position={x:0,y:q},this.tipBase2Position={x:0,y:q+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-le,y:0},this.tipBase2Position={x:this.width-q,y:0}):(this.tipBase1Position={x:this.width,y:q},this.tipBase2Position={x:this.width,y:q+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?te<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-le,y:this.height},this.tipBase2Position={x:this.width-q,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-q-le},this.tipBase2Position={x:this.width,y:this.height-q}):te<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:this.height},this.tipBase2Position={x:q+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-q},this.tipBase2Position={x:0,y:this.height-q-le})},F.prototype.resize=function(P){$.prototype.resize.call(this,P),this.positionTip()},F.prototype.positionTip=function(){Se.setAttributes(this.tip,[["points",this.getTipPoints()]]);var P=this.tipGrip.visual.transform.baseVal.getItem(0);P.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(P,0)},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),F.prototype.select=function(){this.positionTip(),$.prototype.select.call(this)},F.prototype.getState=function(){var P=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var q=P;this.bgColor=q.bgColor,this.tipPosition=q.tipPosition,$.prototype.restoreState.call(this,P),this.createTip(),this.setTipPoints()},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.tipPosition={x:this.tipPosition.x*P,y:this.tipPosition.y*q},this.positionTip()},F.typeName="CalloutMarker",F.title="Callout marker",F.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>',F}(ut),Je=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.fillColor=le.defaultFillColor,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.setOpacity=te.setOpacity.bind(te),te.createVisual=te.createVisual.bind(te),te.strokePanel=new Be("Line color",Le(le.defaultColorSet,["transparent"]),le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.fillPanel=new Be("Fill color",Le(le.defaultColorSet,["transparent"]),te.fillColor,we),te.fillPanel.onColorChanged=te.setFillColor,te.strokeWidthPanel=new _t("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new It("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te.opacityPanel=new Ee("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.visual)},F.prototype.createVisual=function(){this.visual=Se.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)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.manipulate=function(P){$.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){$.prototype.resize.call(this,P),this.setSize()},F.prototype.setSize=function(){$.prototype.setSize.call(this),Se.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},F.prototype.pointerUp=function(P){$.prototype.pointerUp.call(this,P),this.setSize()},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},F.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(P),this.stateChanged()},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},F.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var q=P;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),$.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,q){$.prototype.scale.call(this,P,q),this.setSize()},F.typeName="EllipseMarker",F.title="Ellipse marker",F.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>',F}(bt),Et=function($){function F(P,q,le){return $.call(this,P,q,le)||this}return xe(F,$),Object.defineProperty(F.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.tip1&&P!==this.tip2)},F.prototype.createTips=function(){this.tip1=Se.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(Se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Se.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(Se.createTransform()),this.visual.appendChild(this.tip2)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.state==="creating"&&this.createTips()},F.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Se.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()]]),Se.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 P=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),q=this.tip1.transform.baseVal.getItem(0);q.setRotate(P,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(q,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(P+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=$.prototype.getState.call(this);return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P),this.createTips(),this.adjustVisual()},F.typeName="MeasurementMarker",F.title="Measurement marker",F.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>',F}(mt),Ft=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.strokePanel.colors=le.defaultColorSet,te.fillColor="transparent",te}return xe(F,$),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=$.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="EllipseFrameMarker",F.title="Ellipse frame marker",F.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>',F}(Je),Nt=function(){function $(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),$.prototype.addUndoStep=function(F){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(F)||(this.undoStack.push(F),JSON.stringify(this.lastRedoStep)!==JSON.stringify(F)&&this.redoStack.splice(0,this.redoStack.length))},$.prototype.replaceLastUndoStep=function(F){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=F)},$.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},$.prototype.undo=function(){if(this.undoStack.length>1){var F=this.undoStack.pop();return F!==void 0&&this.redoStack.push(F),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},$.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},$}(),ht=function($){function F(P,q,le){var te=$.call(this,P,q,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.curveX=0,te.curveY=0,te.manipulationStartCurveX=0,te.manipulationStartCurveY=0,te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.positionGrips=te.positionGrips.bind(te),te.addControlGrips=te.addControlGrips.bind(te),te.adjustVisual=te.adjustVisual.bind(te),te.setupControlBox=te.setupControlBox.bind(te),te.resize=te.resize.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new Be("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new _t("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new It("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return xe(F,$),F.prototype.ownsTarget=function(P){return!(!$.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorCurve&&P!==this.visibleCurve&&!this.curveGrip.ownsTarget(P))},F.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},F.prototype.createVisual=function(){this.visual=Se.createGroup(),this.selectorCurve=Se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Se.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)},F.prototype.pointerDown=function(P,q){$.prototype.pointerDown.call(this,P,q),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=P.x,this.curveY=P.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(q)&&(this.activeGrip=this.curveGrip,this._state="resize")},F.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},F.prototype.setupControlBox=function(){$.prototype.setupControlBox.call(this),this.curveControlLine1=Se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Se.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)},F.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,$.prototype.addControlGrips.call(this)},F.prototype.positionGrips=function(){$.prototype.positionGrips.call(this);var P=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-P/2,this.curveY-P/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()))},F.prototype.manipulate=function(P){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+P.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+P.y-this.manipulationStartY),$.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){this.activeGrip===this.curveGrip&&(this.curveX=P.x,this.curveY=P.y),$.prototype.resize.call(this,P),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual()},F.prototype.scale=function(P,q){this.curveX=this.curveX*P,this.curveY=this.curveY*q,$.prototype.scale.call(this,P,q)},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},$.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){$.prototype.restoreState.call(this,P);var q=P;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.curveX=q.curveX,this.curveY=q.curveY,this.createVisual(),this.adjustVisual()},F.typeName="CurveMarker",F.title="Curve marker",F.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>',F}(At),Lt=function(){function $(F,P){P===void 0&&(P=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=F,this.cancelable=P}return Object.defineProperty($.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),$.prototype.preventDefault=function(){this._defaultPrevented=!0},$}(),st=function($){function F(P,q,le){var te=$.call(this,P,!1)||this;return te.dataUrl=q,te.state=le,te}return xe(F,$),F}(Lt),rt=function($){function F(P,q,le){le===void 0&&(le=!1);var te=$.call(this,P,le)||this;return te.marker=q,te}return xe(F,$),F}(Lt),et=function(){function $(){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 $.prototype.addEventListener=function(F,P){this[F].push(P)},$.prototype.removeEventListener=function(F,P){var q=this[F].indexOf(P);q>-1&&this[F].splice(q,1)},$}(),Ce=function(){function $(F){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Pe,this._isOpen=!1,this.undoRedoManager=new Nt,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 et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=$.instanceCounter++,this.styles=new Qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=F,this.targetRoot=document.body,this.width=F.clientWidth,this.height=F.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($.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ke,Me,ut,Ft,Je,ge,ze,Et,me,mt,ht]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ke,Me,ut,Je,ge,ze]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ke,Me,ut,ge]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(F){var P=this;this._availableMarkerTypes.splice(0),F.forEach(function(q){if(typeof q=="string"){var le=P.ALL_MARKER_TYPES.find(function(te){return te.typeName===q});le!==void 0&&P._availableMarkerTypes.push(le)}else P._availableMarkerTypes.push(q)})},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(F){this._zoomLevel=F,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($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),$.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),tt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},$.prototype.show=function(){var F=this;this.styles.styleSheetRoot===void 0&&De.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=De.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(P){return P(new Lt(F))})},$.prototype.render=function(){return Oe(this,void 0,void 0,function(){var F;return Ne(this,function(P){switch(P.label){case 0:return this.setCurrentMarker(),(F=new Bt).naturalSize=this.renderAtNaturalSize,F.imageType=this.renderImageType,F.imageQuality=this.renderImageQuality,F.markersOnly=this.renderMarkersOnly,F.width=this.renderWidth,F.height=this.renderHeight,[4,F.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return P.sent(),[4,F.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,P.sent()]}})})},$.prototype.close=function(F){var P=this;if(F===void 0&&(F=!1),this.isOpen){var q=!1;F||this.eventListeners.beforeclose.forEach(function(le){var te=new Lt(P,!0);le(te),te.defaultPrevented&&(q=!0)}),q||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(le){return le(new Lt(P))}),this.detachEvents(),this._isOpen=!1)}},$.prototype.addMarkersToToolbar=function(){for(var F,P=[],q=0;q<arguments.length;q++)P[q]=arguments[q];(F=this._availableMarkerTypes).push.apply(F,P)},$.prototype.addRenderEventListener=function(F){this.addEventListener("render",function(P){F(P.dataUrl,P.state)})},$.prototype.removeRenderEventListener=function(F){},$.prototype.addCloseEventListener=function(F){this.addEventListener("close",function(){F()})},$.prototype.removeCloseEventListener=function(F){},$.prototype.setupResizeObserver=function(){var F=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){F.resize(F.target.clientWidth,F.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return F.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},$.prototype.onPopupTargetResize=function(){var F=1*this.target.clientWidth/this.target.clientHeight,P=this.editorCanvas.clientWidth/F>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*F:this.editorCanvas.clientWidth,q=P<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/F;this.resize(P,q)},$.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},$.prototype.resize=function(F,P){this._isResizing=!0;var q=F/this.imageWidth,le=P/this.imageHeight;this.imageWidth=Math.round(F),this.imageHeight=Math.round(P),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",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(q,le),this._isResizing=!1},$.prototype.scaleMarkers=function(F,P){var q,le=this;this._currentMarker&&this._currentMarker instanceof ut?this._currentMarker.scale(F,P):(q=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(te){te!==le._currentMarker&&te.scale(F,P)}),q!==void 0&&this.setCurrentMarker(q)},$.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"},$.prototype.setTopLeft=function(){var F=this.editingTarget.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=F.left-P.left,this.top=F.top-P.top},$.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)},$.prototype.addDefs=function(){for(var F,P=[],q=0;q<arguments.length;q++)P[q]=arguments[q];this.defs=Se.createDefs(),this.addDefsToImage(),(F=this.defs).append.apply(F,P)},$.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},$.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)},$.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},$.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},$.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)},$.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},$.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)},$.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 F=document.createElement("a");F.href="https://markerjs.com/",F.target="_blank",F.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>',F.title="Powered by marker.js",F.style.display="grid",F.style.alignItems="center",F.style.justifyItems="center",F.style.padding="3px",F.style.width="20px",F.style.height="20px",this.logoUI.appendChild(F),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},$.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?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")},$.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"},$.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&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 F=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=F+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?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=this.uiStyleSettings.zIndex!==void 0?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=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new re(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",this.settings.displayMode==="popup"&&(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",this.settings.displayMode==="popup"&&(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 ie(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},$.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$.prototype.removeMarker=function(F){this.markerImage.removeChild(F.container),this.markers.indexOf(F)>-1&&this.markers.splice(this.markers.indexOf(F),1),F.dispose()},$.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},$.prototype.toolbarButtonClicked=function(F,P){if(F==="marker"&&P!==void 0)this.createNewMarker(P);else if(F==="action")switch(P){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":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},$.prototype.deleteSelectedMarker=function(){var F=this;if(this._currentMarker!==void 0){var P=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var te=new rt(F,F._currentMarker,!0);le(te),te.defaultPrevented&&(P=!0)}),!P){var q=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(le){return le(new rt(F,q))})}}},$.prototype.clear=function(){var F=this,P=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(je){var xt=new rt(F,void 0,!0);je(xt),xt.defaultPrevented&&(P=!0)}),!P)){this.setCurrentMarker();for(var q=function(je){var xt=le.markers[je];le.setCurrentMarker(le.markers[je]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(ot){return ot(new rt(F,xt))})},le=this,te=this.markers.length-1;te>=0;te--)q(te);this.addUndoStep()}},Object.defineProperty($.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),$.prototype.showNotesEditor=function(){var F;this._currentMarker!==void 0&&(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=(F=this._currentMarker.notes)!==null&&F!==void 0?F:"",this.overlayContainer.appendChild(this.notesArea))},$.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},$.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},$.prototype.addUndoStep=function(){var F=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var P=this.getState(),q=this.undoRedoManager.getLastUndoStep();if(!q||q.width===P.width&&q.height===P.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(P),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(te){return te(new Lt(F))})}else this.undoRedoManager.replaceLastUndoStep(P),this.eventListeners.statechange.forEach(function(te){return te(new Lt(F))})}},$.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},$.prototype.undoStep=function(){var F=this,P=this.undoRedoManager.undo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new Lt(F))}))},$.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},$.prototype.redoStep=function(){var F=this,P=this.undoRedoManager.redo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new Lt(F))}))},$.prototype.stepZoom=function(){var F=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=F<this.zoomSteps.length-1?this.zoomSteps[F+1]:this.zoomSteps[0]},$.prototype.panTo=function(F){this.contentDiv.scrollBy({left:this.prevPanPoint.x-F.x,top:this.prevPanPoint.y-F.y}),this.prevPanPoint=F},$.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var F,P,q=this;return Ne(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return F=le.sent(),P=this.getState(),this.eventListeners.render.forEach(function(te){return te(new st(q,F,P))}),this.close(!0),[2]}})})},$.prototype.getState=function(F){F===!0&&this.setCurrentMarker();var P={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(q){return P.markers.push(q.getState())}),P},$.prototype.restoreState=function(F){var P=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);F.markers.forEach(function(q){var le=P._availableMarkerTypes.find(function(je){return je.typeName===q.typeName});if(le!==void 0){var te=P.addNewMarker(le);te.restoreState(q),P.markers.push(te)}}),F.width&&F.height&&(F.width!==this.imageWidth||F.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/F.width,this.imageHeight/F.height),this.eventListeners.restorestate.forEach(function(q){return q(new Lt(P))})},$.prototype.addNewMarker=function(F){var P=Se.createGroup();return this.markerImage.appendChild(P),new F(P,this.overlayContainer,this.settings)},$.prototype.createNewMarker=function(F){var P,q=this;(P=typeof F=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===F}):F)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(P),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(P.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new rt(q,q._currentMarker))}))},$.prototype.markerCreated=function(F){var P=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(F),this.setCurrentMarker(F),F instanceof Ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(q){return q(new rt(P,P._currentMarker))})},$.prototype.colorChanged=function(F){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=F,this.settings.defaultStrokeColor=F)},$.prototype.fillColorChanged=function(F){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=F)},$.prototype.markerStateChanged=function(F){var P=this;this.eventListeners.markerchange.forEach(function(q){return q(new rt(P,F))})},$.prototype.setCurrentMarker=function(F){var P=this;this._currentMarker!==F&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(q){return q(new rt(P,P._currentMarker))})),this._currentMarker=F,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(q){return q(new rt(P,P._currentMarker))}))},$.prototype.onPointerDown=function(F){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||F.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var P=this.markers.find(function(q){return q.ownsTarget(F.target)});P!==void 0?(this.setCurrentMarker(P),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(F.clientX,F.clientY),F.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:F.clientX,y:F.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(F.clientX,F.clientY))},$.prototype.onDblClick=function(F){if(this._isFocused||this.focus(),this.mode==="select"){var P=this.markers.find(function(q){return q.ownsTarget(F.target)});P!==void 0&&P!==this._currentMarker&&this.setCurrentMarker(P),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(F.clientX,F.clientY),F.target):this.setCurrentMarker()}},$.prototype.onPointerMove=function(F){this.touchPoints!==1&&F.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||F.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(F.clientX,F.clientY)):this.zoomLevel>1&&this.panTo({x:F.clientX,y:F.clientY}))},$.prototype.onPointerUp=function(F){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(F.clientX,F.clientY)),this.isDragging=!1,this.addUndoStep()},$.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},$.prototype.onKeyUp=function(F){this._currentMarker===void 0||this.notesArea!==void 0||F.key!=="Delete"&&F.key!=="Backspace"||this.deleteSelectedMarker()},$.prototype.clientToLocalCoordinates=function(F,P){var q=this.markerImage.getBoundingClientRect();return{x:(F-q.left)/this.zoomLevel,y:(P-q.top)/this.zoomLevel}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var F=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=F+"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()},$.prototype.addLicenseKey=function(F){tt.addKey(F)},$.prototype.addEventListener=function(F,P){this.eventListeners.addEventListener(F,P)},$.prototype.removeEventListener=function(F,P){this.eventListeners.removeEventListener(F,P)},$.prototype.renderState=function(F){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(F),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty($.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),$.prototype.focus=function(){var F=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(P){return P(new Lt(F))}))},$.prototype.blur=function(){var F=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(P){return P(new Lt(F))}))},$.instanceCounter=0,$}();/* **********************************
|
|
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.
|
|
***************************************************************************** */var Ue=function($,F){return(Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,q){P.__proto__=q}||function(P,q){for(var le in q)Object.prototype.hasOwnProperty.call(q,le)&&(P[le]=q[le])})($,F)};function ct($,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function P(){this.constructor=$}Ue($,F),$.prototype=F===null?Object.create(F):(P.prototype=F.prototype,new P)}function at($,F,P,q){return new(P||(P=Promise))(function(le,te){function je(kt){try{ot(q.next(kt))}catch(wt){te(wt)}}function xt(kt){try{ot(q.throw(kt))}catch(wt){te(wt)}}function ot(kt){var wt;kt.done?le(kt.value):(wt=kt.value,wt instanceof P?wt:new P(function(Yt){Yt(wt)})).then(je,xt)}ot((q=q.apply($,F||[])).next())})}function Tt($,F){var P,q,le,te,je={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:xt(0),throw:xt(1),return:xt(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function xt(ot){return function(kt){return function(wt){if(P)throw new TypeError("Generator is already executing.");for(;je;)try{if(P=1,q&&(le=2&wt[0]?q.return:wt[0]?q.throw||((le=q.return)&&le.call(q),0):q.next)&&!(le=le.call(q,wt[1])).done)return le;switch(q=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return je.label++,{value:wt[1],done:!1};case 5:je.label++,q=wt[1],wt=[0];continue;case 7:wt=je.ops.pop(),je.trys.pop();continue;default:if(!(le=je.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){je=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]<le[3])){je.label=wt[1];break}if(wt[0]===6&&je.label<le[1]){je.label=le[1],le=wt;break}if(le&&je.label<le[2]){je.label=le[2],je.ops.push(wt);break}le[2]&&je.ops.pop(),je.trys.pop();continue}wt=F.call($,je)}catch(Yt){wt=[6,Yt],q=0}finally{P=le=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([ot,kt])}}}var Ct=function(){function $(){}return $.addKey=function(F){$.key=F},Object.defineProperty($,"isLicensed",{get:function(){return!!$.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test($.key)},enumerable:!1,configurable:!0}),$}(),qe=function(){function $(){}return $.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},$.setAttributes=function(F,P){for(var q=0,le=P;q<le.length;q++){var te=le[q],je=te[0],xt=te[1];F.setAttribute(je,xt)}},$.createRect=function(F,P,q){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",F.toString()),le.setAttribute("height",P.toString()),q&&$.setAttributes(le,q),le},$.createLine=function(F,P,q,le,te){var je=document.createElementNS("http://www.w3.org/2000/svg","line");return je.setAttribute("x1",F.toString()),je.setAttribute("y1",P.toString()),je.setAttribute("x2",q.toString()),je.setAttribute("y2",le.toString()),te&&$.setAttributes(je,te),je},$.createPolygon=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return q.setAttribute("points",F),P&&$.setAttributes(q,P),q},$.createCircle=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","circle");return q.setAttribute("cx",(F/2).toString()),q.setAttribute("cy",(F/2).toString()),q.setAttribute("r",F.toString()),P&&$.setAttributes(q,P),q},$.createEllipse=function(F,P,q){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(F/2).toString()),le.setAttribute("cy",(P/2).toString()),le.setAttribute("rx",(F/2).toString()),le.setAttribute("ry",(P/2).toString()),q&&$.setAttributes(le,q),le},$.createGroup=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return F&&$.setAttributes(P,F),P},$.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},$.createMarker=function(F,P,q,le,te,je,xt){var ot=document.createElementNS("http://www.w3.org/2000/svg","marker");return $.setAttributes(ot,[["id",F],["orient",P],["markerWidth",q.toString()],["markerHeight",le.toString()],["refX",te.toString()],["refY",je.toString()]]),ot.appendChild(xt),ot},$.createText=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),F&&$.setAttributes(P,F),P},$.createTSpan=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return q.textContent=F,P&&$.setAttributes(q,P),q},$.createImage=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return F&&$.setAttributes(P,F),P},$.createPoint=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return q.x=F,q.y=P,q},$.createPath=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg","path");return q.setAttribute("d",F),P&&$.setAttributes(q,P),q},$.createElement=function(F,P){var q=document.createElementNS("http://www.w3.org/2000/svg",F);return P&&$.setAttributes(q,P),q},$.getHollowRectanglePath=function(F,P,q,le,te,je,xt,ot){return"M"+F+","+P+"V"+(P+le)+"H"+(F+q)+"V"+P+"H"+te+"V"+je+"H"+(te+xt)+"V"+(je+ot)+"H"+te+"V"+P+"Z"},$}(),St=function(){function $(F){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+F+"_"}return Object.defineProperty($.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty($.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($.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),$.prototype.addClass=function(F){return this.styleSheet===void 0&&this.addStyleSheet(),F.name=""+this.classNamePrefix+F.localName,this.classes.push(F),this.styleSheet.sheet.insertRule("."+F.name+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length),F},$.prototype.addRule=function(F){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(F),this.styleSheet.sheet.insertRule(F.selector+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length)},$.prototype.addStyleSheet=function(){var F;this.styleSheet=document.createElement("style"),((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).appendChild(this.styleSheet),this.addRule(new Ht("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ht("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ht("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Pt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Pt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},$.prototype.removeStyleSheet=function(){var F;this.styleSheet&&(((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},$}(),Ht=function($,F){this.selector=$,this.style=F},Pt=function($,F){this.localName=$,this.style=F},zt=function(){function $(){this.blocks=[],this.display=""}return $.prototype.addButtonBlock=function(F){F.className=this.blockClassName,F.buttonClassName=this.buttonClassName,F.buttonColorsClassName=this.buttonColorsClassName,F.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(F)},$.prototype.addElementBlock=function(F){F.className===void 0&&(F.className=this.blockClassName),this.blocks.push(F)},$.prototype.getUI=function(){var F=document.createElement("div");return F.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,F.style.display=this.display,this.blocks.forEach(function(P){return F.appendChild(P.getUI())}),F},$}(),Ir=function(){function $(){}return $.prototype.getUI=function(){var F=document.createElement("div");if(F.className=this.className,this.minWidth!==void 0&&(F.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":F.style.justifyContent="flex-start";break;case"center":F.style.justifyContent="center";break;case"end":F.style.justifyContent="flex-end"}return F.style.whiteSpace="nowrap",F},$}(),Rr=function($){function F(){var P=$!==null&&$.apply(this,arguments)||this;return P.buttons=[],P}return ct(F,$),F.prototype.addButton=function(P){P.className=this.buttonClassName,P.colorsClassName=this.buttonColorsClassName,P.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(P)},F.prototype.getUI=function(){var P=$.prototype.getUI.call(this);return this.buttons.forEach(function(q){return P.appendChild(q.getUI())}),P},F}(Ir),yr=function(){function $(F,P){this._isActive=!1,this._isHidden=!1,this._icon=F,this.title=P,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty($.prototype,"icon",{get:function(){return this._icon},set:function(F){this._icon=F,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isActive",{get:function(){return this._isActive},set:function(F){this._isActive=F,this.adjustClassName()},enumerable:!1,configurable:!0}),$.prototype.getUI=function(){var F=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 F.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},$.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,"")))},$.prototype.hide=function(){this._isHidden=!0},$}(),jt=function($){function F(){var P=$!==null&&$.apply(this,arguments)||this;return P.elements=[],P}return ct(F,$),F.prototype.addElement=function(P){this.elements.push(P)},F.prototype.getUI=function(){var P=$.prototype.getUI.call(this);return this.elements.forEach(function(q){return P.appendChild(q)}),P},F}(Ir),Mr=function(){function $(F,P){this.horizontal=F,this.vertical=P}return Object.defineProperty($.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),$.prototype.getVerticalLength=function(F){return F/this.ratio},$.prototype.getHorizontalLength=function(F){return F*this.ratio},$}(),Wr=function(){function $(){}return $.getIcon=function(F,P){if(F>0&&P>0){var q=new Mr(F,P),le=q.ratio>=1?20:q.getHorizontalLength(20),te=q.ratio<1?20:q.getVerticalLength(20),je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(je);var xt=qe.createDefs();je.appendChild(xt);var ot=qe.createElement("clipPath",[["id","text-bg-clip"]]);xt.appendChild(ot);var kt=qe.createPath(qe.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));je.appendChild(kt);var wt=qe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);wt.appendChild(qe.createTSpan(F+":"+P)),je.appendChild(wt);var Yt=wt.getBBox();qe.setAttributes(wt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var Gt=qe.createPath(qe.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return ot.appendChild(Gt),qe.setAttributes(kt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(je),je.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>'},$}(),Ur=function($){function F(P,q,le){var te=$.call(this,P,q)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return ct(F,$),F.prototype.setupDropdown=function(){var P=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(q){q.className=P.className,q.colorsClassName=P.colorsClassName,P.dropdownBlock.appendChild(q.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},F.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},F.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},F.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},F.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},F.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},F}(yr),mr=function(){function $(F,P){this.GRIP_SIZE=10,this.color=F,this.fillColor=P,this.visual=qe.createGroup(),this.visual.appendChild(qe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(qe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(F){return F===this.visual||F===this.visual.childNodes[0]||F===this.visual.childNodes[1]},$.prototype.setCenter=function(F,P){this.visual.childNodes.forEach(function(q){return qe.setAttributes(q,[["cx",F.toString()],["cy",P.toString()]])})},$}(),Sr=function(){function $(F,P,q,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=F,this.canvasHeight=P,this.margin=q,this.container=le,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($.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(F){this._aspectRatio=F,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(F){this._isGridVisible=F,this.gridContainer&&qe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(F){this._zoomFactor=F,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),$.prototype.open=function(){var F=this;this.cropShadeElement=qe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=qe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var P=0;P<this.numberOfGridLines;P++)this.horizontalGridLines.push(qe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(qe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(q){return F.gridContainer.appendChild(q)}),this.verticalGridLines.forEach(function(q){return F.gridContainer.appendChild(q)}),this.cropRectElement=qe.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new mr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new mr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new mr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new mr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},$.prototype.setCropRectangle=function(F){this.cropRect=F;var P=Object.assign({},this.cropRect);this.zoomFactor!==1&&(P.width=this.cropRect.width*this.zoomFactor,P.height=this.cropRect.height*this.zoomFactor,P.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-P.width/2,P.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-P.height/2),qe.setAttributes(this.cropRectElement,[["x",P.x.toString()],["y",P.y.toString()],["width",P.width.toString()],["height",P.height.toString()]]);var q=P.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,je){var xt=P.y+q*(je+1);qe.setAttributes(te,[["x1",""+P.x],["y1",""+xt],["x2",""+(P.x+P.width)],["y2",""+xt]])});var le=P.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,je){var xt=P.x+le*(je+1);qe.setAttributes(te,[["x1",""+xt],["y1",""+P.y],["x2",""+xt],["y2",""+(P.y+P.height)]])}),qe.setAttributes(this.cropShadeElement,[["d",qe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,P.x,P.y,P.width,P.height)]]),this.topLeftGrip.setCenter(P.x,P.y),this.topRightGrip.setCenter(P.x+P.width,P.y),this.bottomLeftGrip.setCenter(P.x,P.y+P.height),this.bottomRightGrip.setCenter(P.x+P.width,P.y+P.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},$.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)},$.prototype.clientToLocalCoordinates=function(F,P){var q=this.container.getBoundingClientRect();return{x:F-q.left+this.margin,y:P-q.top+this.margin}},$.prototype.onPointerDown=function(F){this.container.setPointerCapture(F.pointerId),this.previousPoint=this.clientToLocalCoordinates(F.clientX,F.clientY),this.cropRectElement===F.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(F.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(F.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(F.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(F.target)&&(this.activeGrip=this.bottomRightGrip)},$.prototype.onPointerMove=function(F){if(this.isMoving)this.move(this.clientToLocalCoordinates(F.clientX,F.clientY));else if(this.activeGrip){var P=this.clientToLocalCoordinates(F.clientX,F.clientY);this.resize(P)}F.preventDefault()},$.prototype.onPointerUp=function(F){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(F.pointerId)},$.prototype.move=function(F){var P=F.x-this.previousPoint.x,q=F.y-this.previousPoint.y;this.zoomFactor!==1&&(P=-P/this.zoomFactor,q=-q/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+P),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+q),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=F},$.prototype.resize=function(F){var P=Object.assign({},this.cropRect),q=F.x-this.previousPoint.x,le=F.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:P.x+q<this.margin&&(q=this.margin-P.x),P.x+=q,P.width=this.cropRect.x+this.cropRect.width-P.x;break;case this.bottomRightGrip:case this.topRightGrip:P.width+q>this.canvasWidth*this.zoomFactor&&(q=this.canvasWidth*this.zoomFactor-P.width),P.width+=q}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(P.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(q),P.height=this.aspectRatio.getVerticalLength(P.width)):(P.y+=le,P.height=this.cropRect.y+this.cropRect.height-P.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?P.height=this.aspectRatio.getVerticalLength(P.width):P.height+=le}P.width<10&&(P.x=this.cropRect.x,P.width=10),P.height<10&&(P.y=this.cropRect.y,P.height=10),this.previousPoint=F,P.x>=this.margin&&P.y>=this.margin&&P.x-this.margin+P.width<=this.canvasWidth&&P.y-this.margin+P.height<=this.canvasHeight&&(this.cropRect=P,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},$.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var F=this.cropRect.x+this.cropRect.width/2,P=this.cropRect.y+this.cropRect.height/2,q=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);q/this.canvasWidth<le/this.canvasHeight?this.cropRect.width=q:this.cropRect.height=le,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=F-this.cropRect.width/2,this.cropRect.y=P-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)}},$.prototype.getRescaledRect=function(F,P,q,le,te,je){var xt=q/F,ot=le/P;return{x:(te.x-je)*xt+je,y:(te.y-je)*ot+je,width:te.width*xt,height:te.height*ot}},$.prototype.scaleCanvas=function(F,P){var q=this.getRescaledRect(this.canvasWidth,this.canvasHeight,F,P,this.cropRect,this.margin);this.canvasWidth=F,this.canvasHeight=P,this.onCropChange&&this.onCropChange(q),this.setCropRectangle(q)},$}(),Cn=function(){function $(F){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=F,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($.prototype,"angle",{get:function(){return this._angle},set:function(F){this._angle=F,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),$.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},$.prototype.onPointerDown=function(F){this.controlContainer.setPointerCapture(F.pointerId),this.isDragging=!0,this.previousPoint={x:F.clientX,y:F.clientY}},$.prototype.onPointerMove=function(F){this.isDragging&&(this.onAngleChange&&this.onAngleChange((F.clientX-this.previousPoint.x)/5),this.previousPoint.x=F.clientX)},$.prototype.onPointerUp=function(F){this.isDragging&&this.onAngleChange&&this.onAngleChange((F.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(F.pointerId)},$.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var F=this.angleLabelText.getBBox();qe.setAttributes(this.angleLabelElement,[["x",((this.width-F.width)/2).toString()],["y",(this.height/2).toString()]])}},$.prototype.positionScaleShape=function(){if(this.scaleShape){var F=this.scaleShape.transform.baseVal.getItem(0);F.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(F,0)}},$.prototype.getVisual=function(){var F=document.createElementNS("http://www.w3.org/2000/svg","svg");F.setAttribute("xmlns","http://www.w3.org/2000/svg"),F.setAttribute("width",this.width+"px"),F.setAttribute("height",this.height+"px"),F.setAttribute("viewBox","0 0 "+this.width+" "+this.height),F.style.flexShrink="0",document.body.appendChild(F);for(var P="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,q=1;q<=this.width/5+10;q++){var le=q%5==0?this.height/3:this.height/6;P+="h4v"+-le+"h1v"+le}P+="v1H0Z",this.scaleShape=qe.createPath(P);var te=qe.createTransform();this.scaleShape.transform.baseVal.appendItem(te),F.appendChild(this.scaleShape),this.angleLabelElement=qe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=qe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var je=qe.createTSpan("");return je.innerHTML="°",this.angleLabelElement.appendChild(je),F.appendChild(this.angleLabelElement),document.body.removeChild(F),F},$}(),dn=function(){function $(){this.naturalSize=!1,this.imageType="image/png"}return $.prototype.rasterize=function(F,P,q,le,te,je,xt){var ot=this;return new Promise(function(kt){var wt=document.createElement("canvas");wt.width=F.width.baseVal.value-2*le,wt.height=F.height.baseVal.value-2*le;var Yt=1,Gt=1;ot.naturalSize===!0?(Yt=P.naturalWidth/(F.width.baseVal.value-2*le)/je,Gt=P.naturalHeight/(F.height.baseVal.value-2*le)/xt,wt.width=P.naturalWidth/je,wt.height=P.naturalHeight/xt):ot.width!==void 0&&ot.height!==void 0&&(Yt=ot.width/q.width,Gt=ot.height/q.height,wt.width*=Yt,wt.height*=Gt);var Jt=wt.getContext("2d");Jt.translate(wt.width/2,wt.height/2),Jt.rotate(te*Math.PI/180),Jt.scale(je,xt),Jt.translate(-wt.width/2,-wt.height/2),Jt.drawImage(P,0,0,wt.width,wt.height);var hr=document.createElement("canvas");hr.width=q.width*Yt,hr.height=q.height*Gt,hr.getContext("2d").putImageData(Jt.getImageData((q.x-le)*Yt,(q.y-le)*Gt,q.width*Yt,q.height*Gt),0,0),kt(hr.toDataURL(ot.imageType,ot.imageQuality))})},$}(),fe=function(){function $(F){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=$.instanceCounter++,this.styles=new St(this.instanceNo),this.target=F,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($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(F){this._zoomToCropEnabled=F,F?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(F){this._isGridVisible=F,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"gridLines",{get:function(){return this._gridLines},set:function(F){this._gridLines=F,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(F){this._rotationAngle=F,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"aspectRatio",{get:function(){var F;return(F=this._aspectRatio)!==null&&F!==void 0?F:this.aspectRatios[0]},set:function(F){this._aspectRatio=F},enumerable:!1,configurable:!0}),$.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(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},$.prototype.show=function(){this.showUI(),this.open()},$.prototype.close=function(F){F===void 0&&(F=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),F||this.closeEventListeners.forEach(function(P){return P()}),this._isOpen=!1)},$.prototype.addRenderEventListener=function(F){this.renderEventListeners.push(F)},$.prototype.removeRenderEventListener=function(F){this.renderEventListeners.indexOf(F)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(F),1)},$.prototype.addCloseEventListener=function(F){this.closeEventListeners.push(F)},$.prototype.removeCloseEventListener=function(F){this.closeEventListeners.indexOf(F)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(F),1)},$.prototype.setupResizeObserver=function(){var F=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){F.resize(F.target.clientWidth,F.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},$.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var F=1*this.target.clientWidth/this.target.clientHeight,P=this.contentDiv.clientWidth/F>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*F:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,q=P+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/F;this.resize(P,q)}},$.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},$.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",qe.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},$.prototype.resize=function(F,P){this.imageWidth=Math.round(F),this.imageHeight=Math.round(P),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",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},$.prototype.setEditingTarget=function(){var F=document.createElement("canvas");F.width=this.target.naturalWidth,F.height=this.target.naturalHeight,F.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var P=F.toDataURL();qe.setAttributes(this.editingTarget,[["href",P]]),this.setEditingTargetSize()},$.prototype.setTopLeft=function(){var F=this.target.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=F.left-P.left-this.CANVAS_MARGIN,this.top=F.top-P.top-this.CANVAS_MARGIN},$.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=qe.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=qe.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=qe.createGroup(),this.editingTargetRotationScaleContainer=qe.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var F=qe.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(F);var P=qe.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(P),this.editingTargetContainer=qe.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)},$.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},$.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=qe.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sr(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()},$.prototype.zoomToCrop=function(){if(this.cropRect){var F=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,P=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=F+"px "+P+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-F+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-P+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},$.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)},$.prototype.cropRectChanged=function(F){this.cropRect=F,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},$.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},$.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"},$.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&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 F=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,P=this.target.offsetTop>F+this.CANVAS_MARGIN?this.target.offsetTop-(F+this.CANVAS_MARGIN):0;this.coverDiv.style.top=P+"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=this.styles.settings.zIndex!==void 0?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=this.styles.settings.zIndex!==void 0?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=this.displayMode==="popup"?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,this.displayMode==="popup"&&(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",this.displayMode==="popup"&&(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},$.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},$.prototype.addTopToolbar=function(){var F=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 P=new Rr;P.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(P);var q=[];this.aspectRatios.forEach(function(Gt){var Jt=new yr(Wr.getIcon(Gt.horizontal,Gt.vertical),Gt.horizontal===0&&Gt.vertical===0?"FREE":Gt.horizontal+":"+Gt.vertical);Jt.onClick=function(){return F.ratioButtonClicked(Gt)},q.push(Jt)}),this.aspectRatioButton=new Ur(Wr.getIcon(0,0),"Aspect ratio",q),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,P.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new yr('<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");le.isActive=this.isGridVisible,le.onClick=function(){F.isGridVisible=!F.isGridVisible,le.isActive=F.isGridVisible},P.addButton(le);var te=new yr('<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(te.isActive=this.zoomToCropEnabled,te.onClick=function(){F.zoomToCropEnabled=!F.zoomToCropEnabled,te.isActive=F.zoomToCropEnabled},P.addButton(te),!Ct.isLicensed){var je=new jt;this.topToolbar.addElementBlock(je);var xt=document.createElement("div");xt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ot=document.createElement("a");ot.style.color="currentColor",ot.href="https://markerjs.com/products/cropro",ot.target="_blank",ot.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>',xt.appendChild(ot),je.addElement(xt)}var kt=new Rr;kt.minWidth=3*this.toolbarHeight+"px",kt.contentAlign="end",this.topToolbar.addButtonBlock(kt);var wt=new yr('<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");wt.onClick=this.startRenderAndClose,kt.addButton(wt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(wt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new yr('<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");Yt.onClick=this.close,kt.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},$.prototype.addBottomToolbar=function(){var F=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 P=new Rr;P.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(P);var q=new yr('<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");q.onClick=this.rotateLeftButtonClicked,P.addButton(q);var le=new yr('<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");le.onClick=this.rotateRightButtonClicked,P.addButton(le);var te=new jt;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new Cn("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(kt){F.rotateBy(kt),F.straightener.angle=F.rotationAngle},te.addElement(this.straightener.getUI());var je=new Rr;je.minWidth=2*this.toolbarHeight+"px",je.contentAlign="end",this.bottomToolbar.addButtonBlock(je);var xt=new yr('<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");xt.onClick=this.flipHorizontallyButtonClicked,je.addButton(xt);var ot=new yr('<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");ot.onClick=this.flipVerticallyButtonClicked,je.addButton(ot)},$.prototype.ratioButtonClicked=function(F){this.aspectRatio=F,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},$.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Wr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},$.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Mr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},$.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},$.prototype.restoreState=function(F){if(F){var P=this.cropLayer.getRescaledRect(F.width,F.height,this.imageWidth,this.imageHeight,F.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(P),this.cropRectChanged(P),this.flippedHorizontally=F.flippedHorizontally,this.flippedVertically=F.flippedVertically,this.applyFlip(),this.rotationAngle=F.rotationAngle,this.applyRotation()}},$.prototype.clientToLocalCoordinates=function(F,P){var q=this.cropImage.getBoundingClientRect();return{x:F-q.left,y:P-q.top}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var F=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=F+"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()},$.prototype.rotateLeftButtonClicked=function(){var F=this.rotationAngle-90;this.rotationAngle%90!=0&&(F+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(F)},$.prototype.rotateRightButtonClicked=function(){var F=this.rotationAngle+90;this.rotationAngle%90!=0&&(F-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(F)},$.prototype.rotateTo=function(F){F=(F=F>180?F-360:F)<=-180?F+360:F,this.rotationAngle=F,this.applyRotation()},$.prototype.rotateBy=function(F){this.rotateTo((this.rotationAngle+F)%360)},$.prototype.applyRotation=function(){var F=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var P=this.editingTargetRotationContainer.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(P,0);var q=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/q.width,this.imageHeight/q.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=F},$.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},$.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},$.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},$.prototype.startRenderAndClose=function(){return at(this,void 0,void 0,function(){var F,P;return Tt(this,function(q){switch(q.label){case 0:return[4,this.render()];case 1:return F=q.sent(),P=this.getState(),this.renderEventListeners.forEach(function(le){return le(F,P)}),this.close(!0),[2]}})})},$.prototype.render=function(){return at(this,void 0,void 0,function(){var F;return Tt(this,function(P){switch(P.label){case 0:return(F=new dn).naturalSize=this.renderAtNaturalSize,F.imageType=this.renderImageType,F.imageQuality=this.renderImageQuality,F.width=this.renderWidth,F.height=this.renderHeight,this.unzoomFromCrop(),qe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,F.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 P.sent(),[4,F.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,P.sent()]}})})},$.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Pt("toolbar",`
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
overflow: hidden;
|
|
line-height: 0px;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Pt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Pt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var F=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Pt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*F)+`px;
|
|
height: `+(this.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Pt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Pt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new Ht("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ht("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Pt("toolbar_dropdown",`
|
|
position: absolute;
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
z-index: 20;
|
|
white-space: normal;
|
|
box-sizing: content-box;
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
line-height: 0px;
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Pt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Pt("toolbar_straightener_block",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
-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%);
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Pt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Pt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},$.instanceCounter=0,$}(),ye=W("8hTe"),Fe=W.n(ye),nt=/<pre[^>]*>/g;function $e($){var F=document.createElement("div");return F.innerHTML=$,F.childNodes.length===0?"":F.childNodes[0].nodeValue}var Rt=pe.a=function($){var F=$.value,P=F===void 0?"":F,q=$.edit,le=q===void 0?!1:q,te=$.className,je=$.showTextOnly,xt=$.showLines,ot=$.replaces,kt=$.zoomImg,wt=$.hasMask,Yt=$.style,Gt=Yt===void 0?{}:Yt,Jt=$.stylesPrev,hr=Jt===void 0?{}:Jt,Fr=String(P),gr=Object(v.useRef)(),Lr=Object(v.useRef)(),fr=Object(v.useState)(""),Hr=Object(S.a)(fr,2),Pr=Hr[0],on=Hr[1],Yr=Object(v.useState)("office"),tn=Object(S.a)(Yr,2),sn=tn[0],Gr=tn[1],rn=function(){var $t=new fe(Lr.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var vr=Object(E.a)(p.a.mark(function Cr(_r){var wr;return p.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:return gr.current.style.display="none",Vr.next=3,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:_r}});case 3:wr=Vr.sent,wr!=null&&wr.id&&ot(Lr.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(wr==null?void 0:wr.id,"?type=").concat(wr.content_type));case 5:case"end":return Vr.stop()}},Cr)}));return function(Cr){return vr.apply(this,arguments)}}()),$t.show()},ln=function(){var $t=new Ce(Lr.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var vr=Object(E.a)(p.a.mark(function Cr(_r){var wr;return p.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(gr.current.style.display="none",!Lr.current){Vr.next=6;break}return Vr.next=4,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:_r.dataUrl}});case 4:wr=Vr.sent,wr!=null&&wr.id&&ot(Lr.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(wr==null?void 0:wr.id,"?type=").concat(wr.content_type));case 6:case"end":return Vr.stop()}},Cr)}));return function(Cr){return vr.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},$r=Object(v.useMemo)(function(){try{var tr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,vr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Fr=Fr.replace(tr,"("+J.a.API_SERVER+"/api/attachments/").replace($t,'"'+J.a.API_SERVER+"/api/attachments/").replace(vr,'"'+J.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,`
|
|
`),Fr=Fr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(kn){}var Cr=Z(Fr),_r=L();if(Fr.match(/\[TOC\]/)&&(Cr=Cr.replace("<p>[TOC]</p>",M()),y()),Cr=Cr.replace(/(__special_katext_id_\d+__)/g,function(kn,Vr){var nn=_r[Vr],Dn=nn.type,wn=nn.expression;return Object(oe.renderToString)($e(wn)||"",{displayMode:Dn==="block",throwOnError:!1,output:"html"})}),Cr=Cr.replace(/▁/g,"\u2581\u2581\u2581"),B(),je){var wr=document.createElement("div");return wr.innerHTML=Cr,wr.innerText}return setTimeout(function(){return cr()},500),Cr},[Fr]),un=Object(v.useRef)();T.WebkitLineClamp=xt,xt&&(Gt=Object(R.a)(Object(R.a)({},Gt),T));function Er(tr){var $t=tr.target;if($t.tagName.toUpperCase()==="IMG"){if(kt){var vr=$t.getAttribute("src");on(vr),Gr("image")}}else if($t.tagName.toUpperCase()==="A"){var Cr=$t.getAttribute("href");if(Cr.indexOf("office")>-1)tr.preventDefault(),on(Cr),Gr("office");else if(Cr.indexOf("application/pdf")>-1)tr.preventDefault(),on(Cr),Gr("pdf");else if(Cr.indexOf("type=text")>-1)tr.preventDefault(),on(Cr),Gr("html");else if(Cr.startsWith("#")){tr.preventDefault();var _r=document.getElementById(Cr.replace("#",""));_r&&_r.scrollIntoView(!0)}}}var cr=function(){var $t,vr=($t=un.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");vr==null||vr.forEach(function(Cr){if(Cr.oncontextmenu=function(){return!1},Cr.src.indexOf(".m3u8")>-1&&!Cr.canPlayType("application/vnd.apple.mpegurl")){if(ee.a.isSupported()){var _r=new ee.a;_r.loadSource(Cr.src),_r.attachMedia(Cr)}}})};Object(v.useEffect)(function(){if(un.current&&$r&&($r.match(nt)&&window.PR.prettyPrint()),un.current)return un.current.addEventListener("click",Er),function(){un.current.removeEventListener("click",Er),B(),y()}},[$r,un.current,Er]);var nr=function($t){if(!le)return;$t.target.nodeName==="IMG"?(gr.current.style.display="flex",gr.current.style.width=$t.target.clientWidth+"px",gr.current.style.height=$t.target.clientHeight+"px",gr.current.style.top=$t.target.offsetTop+"px",gr.current.style.left=$t.target.offsetLeft+"px",Lr.current.src=$t.target.getAttribute("src")):gr.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:un,style:Object(R.a)({},Gt),className:"".concat(te||""," markdown-body ").concat(Fe.a.mdBody),onMouseOver:nr,dangerouslySetInnerHTML:{__html:$r}}),i.a.createElement("div",{ref:gr,className:Fe.a.button},i.a.createElement(N.a,null,i.a.createElement(Q.a,{onClick:function(){return rn()}},"\u88C1\u526A"),i.a.createElement(Q.a,{onClick:function(){return ln()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:Lr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),i.a.createElement(se.a,{close:!0,data:Pr,hasMask:wt,type:Pr!=null&&Pr.length?sn:"",style:Object(R.a)({},hr),onClose:function(){return on("")}}))}},"9VGf":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return _});var X=W("q1tI"),N=W.n(X);function _(Q,R){var E=Object(X.useRef)();Object(X.useEffect)(function(){E.current=Q}),Object(X.useEffect)(function(){function S(){E.current()}if(R!==null){var s=setInterval(S,R);return function(){return clearInterval(s)}}},[R])}},BPZU:function(Xe,pe){var W=32,X=7,N=256;function _(i){for(var A=0;i>=W;)A|=i&1,i>>=1;return i+A}function Q(i,A,O,w){var g=A+1;if(g===O)return 1;if(w(i[g++],i[A])<0){for(;g<O&&w(i[g],i[g-1])<0;)g++;R(i,A,g)}else for(;g<O&&w(i[g],i[g-1])>=0;)g++;return g-A}function R(i,A,O){for(O--;A<O;){var w=i[A];i[A++]=i[O],i[O--]=w}}function E(i,A,O,w,g){for(w===A&&w++;w<O;w++){for(var C=i[w],c=A,a=w,u;c<a;)u=c+a>>>1,g(C,i[u])<0?a=u:c=u+1;var m=w-c;switch(m){case 3:i[c+3]=i[c+2];case 2:i[c+2]=i[c+1];case 1:i[c+1]=i[c];break;default:for(;m>0;)i[c+m]=i[c+m-1],m--}i[c]=C}}function S(i,A,O,w,g,C){var c=0,a=0,u=1;if(C(i,A[O+g])>0){for(a=w-g;u<a&&C(i,A[O+g+u])>0;)c=u,u=(u<<1)+1,u<=0&&(u=a);u>a&&(u=a),c+=g,u+=g}else{for(a=g+1;u<a&&C(i,A[O+g-u])<=0;)c=u,u=(u<<1)+1,u<=0&&(u=a);u>a&&(u=a);var m=c;c=g-u,u=g-m}for(c++;c<u;){var y=c+(u-c>>>1);C(i,A[O+y])>0?c=y+1:u=y}return u}function s(i,A,O,w,g,C){var c=0,a=0,u=1;if(C(i,A[O+g])<0){for(a=g+1;u<a&&C(i,A[O+g-u])<0;)c=u,u=(u<<1)+1,u<=0&&(u=a);u>a&&(u=a);var m=c;c=g-u,u=g-m}else{for(a=w-g;u<a&&C(i,A[O+g+u])>=0;)c=u,u=(u<<1)+1,u<=0&&(u=a);u>a&&(u=a),c+=g,u+=g}for(c++;c<u;){var y=c+(u-c>>>1);C(i,A[O+y])<0?u=y:c=y+1}return u}function p(i,A){var O=X,w=0,g=N,C=0,c,a,u=0;w=i.length,w<2*N&&(g=w>>>1);var m=[];C=w<120?5:w<1542?10:w<119151?19:40,c=[],a=[];function y(r,n){c[u]=r,a[u]=n,u+=1}function T(){for(;u>1;){var r=u-2;if(r>=1&&a[r-1]<=a[r]+a[r+1]||r>=2&&a[r-2]<=a[r]+a[r-1])a[r-1]<a[r+1]&&r--;else if(a[r]>a[r+1])break;M(r)}}function x(){for(;u>1;){var r=u-2;r>0&&a[r-1]<a[r+1]&&r--,M(r)}}function M(r){var n=c[r],l=a[r],L=c[r+1],B=a[r+1];a[r]=l+B,r===u-3&&(c[r+1]=c[r+2],a[r+1]=a[r+2]),u--;var h=s(i[L],i,n,l,0,A);if(n+=h,l-=h,l===0)return;if(B=S(i[n+l-1],i,L,B,B-1,A),B===0)return;l<=B?b(n,l,L,B):o(n,l,L,B)}function b(r,n,l,L){var B=0;for(B=0;B<n;B++)m[B]=i[r+B];var h=0,I=l,H=r;if(i[H++]=i[I++],--L===0){for(B=0;B<n;B++)i[H+B]=m[h+B];return}if(n===1){for(B=0;B<L;B++)i[H+B]=i[I+B];i[H+L]=m[h];return}for(var z=O,Z,Y,G;;){Z=0,Y=0,G=!1;do if(A(i[I],m[h])<0){if(i[H++]=i[I++],Y++,Z=0,--L===0){G=!0;break}}else if(i[H++]=m[h++],Z++,Y=0,--n===1){G=!0;break}while((Z|Y)<z);if(G)break;do{if(Z=s(i[I],m,h,n,0,A),Z!==0){for(B=0;B<Z;B++)i[H+B]=m[h+B];if(H+=Z,h+=Z,n-=Z,n<=1){G=!0;break}}if(i[H++]=i[I++],--L===0){G=!0;break}if(Y=S(m[h],i,I,L,0,A),Y!==0){for(B=0;B<Y;B++)i[H+B]=i[I+B];if(H+=Y,I+=Y,L-=Y,L===0){G=!0;break}}if(i[H++]=m[h++],--n===1){G=!0;break}z--}while(Z>=X||Y>=X);if(G)break;z<0&&(z=0),z+=2}if(O=z,O<1&&(O=1),n===1){for(B=0;B<L;B++)i[H+B]=i[I+B];i[H+L]=m[h]}else{if(n===0)throw new Error;for(B=0;B<n;B++)i[H+B]=m[h+B]}}function o(r,n,l,L){var B=0;for(B=0;B<L;B++)m[B]=i[l+B];var h=r+n-1,I=L-1,H=l+L-1,z=0,Z=0;if(i[H--]=i[h--],--n===0){for(z=H-(L-1),B=0;B<L;B++)i[z+B]=m[B];return}if(L===1){for(H-=n,h-=n,Z=H+1,z=h+1,B=n-1;B>=0;B--)i[Z+B]=i[z+B];i[H]=m[I];return}for(var Y=O;;){var G=0,ee=0,J=!1;do if(A(m[I],i[h])<0){if(i[H--]=i[h--],G++,ee=0,--n===0){J=!0;break}}else if(i[H--]=m[I--],ee++,G=0,--L===1){J=!0;break}while((G|ee)<Y);if(J)break;do{if(G=n-s(m[I],i,r,n,n-1,A),G!==0){for(H-=G,h-=G,n-=G,Z=H+1,z=h+1,B=G-1;B>=0;B--)i[Z+B]=i[z+B];if(n===0){J=!0;break}}if(i[H--]=m[I--],--L===1){J=!0;break}if(ee=L-S(i[h],m,0,L,L-1,A),ee!==0){for(H-=ee,I-=ee,L-=ee,Z=H+1,z=I+1,B=0;B<ee;B++)i[Z+B]=m[z+B];if(L<=1){J=!0;break}}if(i[H--]=i[h--],--n===0){J=!0;break}Y--}while(G>=X||ee>=X);if(J)break;Y<0&&(Y=0),Y+=2}if(O=Y,O<1&&(O=1),L===1){for(H-=n,h-=n,Z=H+1,z=h+1,B=n-1;B>=0;B--)i[Z+B]=i[z+B];i[H]=m[I]}else{if(L===0)throw new Error;for(z=H-(L-1),B=0;B<L;B++)i[z+B]=m[B]}}this.mergeRuns=T,this.forceMergeRuns=x,this.pushRun=y}function v(i,A,O,w){O||(O=0),w||(w=i.length);var g=w-O;if(g<2)return;var C=0;if(g<W){C=Q(i,O,w,A),E(i,O,w,O+C,A);return}var c=new p(i,A),a=_(g);do{if(C=Q(i,O,w,A),C<a){var u=g;u>a&&(u=a),E(i,O,O+u,O+C,A),C=u}c.pushRun(O,C),c.mergeRuns(),g-=C,O+=C}while(g!==0);c.forceMergeRuns()}Xe.exports=v},BU3w:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return E});var X=W("MNnm"),N="rc-util-key";function _(S){if(S.attachTo)return S.attachTo;var s=document.querySelector("head");return s||document.body}function Q(S){var s,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(X.a)())return null;var v=document.createElement("style");if((s=p.csp)===null||s===void 0?void 0:s.nonce){var i;v.nonce=(i=p.csp)===null||i===void 0?void 0:i.nonce}v.innerHTML=S;var A=_(p),O=A.firstChild;return p.prepend&&A.prepend?A.prepend(v):p.prepend&&O?A.insertBefore(v,O):A.appendChild(v),v}var R=new Map;function E(S,s){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},v=_(p);if(!R.has(v)){var i=Q("",p),A=i.parentNode;R.set(v,A),A.removeChild(i)}var O=Array.from(R.get(v).children).find(function(a){return a.tagName==="STYLE"&&a[N]===s});if(O){var w,g;if(((w=p.csp)===null||w===void 0?void 0:w.nonce)&&O.nonce!==((g=p.csp)===null||g===void 0?void 0:g.nonce)){var C;O.nonce=(C=p.csp)===null||C===void 0?void 0:C.nonce}return O.innerHTML!==S&&(O.innerHTML=S),O}var c=Q(S,p);return c[N]=s,c}},Bd2K:function(Xe,pe,W){(function(X){X(W("VrN/"),W("osHv"))})(function(X){X.defineOption("autoCloseTags",!1,function(p,v,i){if(i!=X.Init&&i&&p.removeKeyMap("autoCloseTags"),!v)return;var A={name:"autoCloseTags"};(typeof v!="object"||v.whenClosing!==!1)&&(A["'/'"]=function(O){return E(O)}),(typeof v!="object"||v.whenOpening!==!1)&&(A["'>'"]=function(O){return Q(O)}),p.addKeyMap(A)});var N=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=["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 Q(p){if(p.getOption("disableInput"))return X.Pass;for(var v=p.listSelections(),i=[],A=p.getOption("autoCloseTags"),O=0;O<v.length;O++){if(!v[O].empty())return X.Pass;var w=v[O].head,g=p.getTokenAt(w),C=X.innerMode(p.getMode(),g.state),c=C.state,a=C.mode.xmlCurrentTag&&C.mode.xmlCurrentTag(c),u=a&&a.name;if(!u)return X.Pass;var m=C.mode.configuration=="html",y=typeof A=="object"&&A.dontCloseTags||m&&N,T=typeof A=="object"&&A.indentTags||m&&_;g.end>w.ch&&(u=u.slice(0,u.length-g.end+w.ch));var x=u.toLowerCase();if(!u||g.type=="string"&&(g.end!=w.ch||!/[\"\']/.test(g.string.charAt(g.string.length-1))||g.string.length==1)||g.type=="tag"&&a.close||g.string.indexOf("/")==w.ch-g.start-1||y&&S(y,x)>-1||s(p,C.mode.xmlCurrentContext&&C.mode.xmlCurrentContext(c)||[],u,w,!0))return X.Pass;var M=typeof A=="object"&&A.emptyTags;if(M&&S(M,u)>-1){i[O]={text:"/>",newPos:X.Pos(w.line,w.ch+2)};continue}var b=T&&S(T,x)>-1;i[O]={indent:b,text:">"+(b?`
|
|
|
|
`:"")+"</"+u+">",newPos:b?X.Pos(w.line+1,0):X.Pos(w.line,w.ch+1)}}for(var o=typeof A=="object"&&A.dontIndentOnAutoClose,O=v.length-1;O>=0;O--){var r=i[O];p.replaceRange(r.text,v[O].head,v[O].anchor,"+insert");var n=p.listSelections().slice(0);n[O]={head:r.newPos,anchor:r.newPos},p.setSelections(n),!o&&r.indent&&(p.indentLine(r.newPos.line,null,!0),p.indentLine(r.newPos.line+1,null,!0))}}function R(p,v){for(var i=p.listSelections(),A=[],O=v?"/":"</",w=p.getOption("autoCloseTags"),g=typeof w=="object"&&w.dontIndentOnSlash,C=0;C<i.length;C++){if(!i[C].empty())return X.Pass;var c=i[C].head,a=p.getTokenAt(c),u=X.innerMode(p.getMode(),a.state),m=u.state;if(v&&(a.type=="string"||a.string.charAt(0)!="<"||a.start!=c.ch-1))return X.Pass;var y,T=u.mode.name!="xml"&&p.getMode().name=="htmlmixed";if(T&&u.mode.name=="javascript")y=O+"script";else if(T&&u.mode.name=="css")y=O+"style";else{var x=u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(m);if(!x||x.length&&s(p,x,x[x.length-1],c))return X.Pass;y=O+x[x.length-1]}p.getLine(c.line).charAt(a.end)!=">"&&(y+=">"),A[C]=y}if(p.replaceSelections(A),i=p.listSelections(),!g)for(var C=0;C<i.length;C++)(C==i.length-1||i[C].head.line<i[C+1].head.line)&&p.indentLine(i[C].head.line)}function E(p){return p.getOption("disableInput")?X.Pass:R(p,!0)}X.commands.closeTag=function(p){return R(p)};function S(p,v){if(p.indexOf)return p.indexOf(v);for(var i=0,A=p.length;i<A;++i)if(p[i]==v)return i;return-1}function s(p,v,i,A,O){if(!X.scanForClosingTag)return!1;var w=Math.min(p.lastLine()+1,A.line+500),g=X.scanForClosingTag(p,A,null,w);if(!g||g.tag!=i)return!1;for(var C=O?1:0,c=v.length-1;c>=0&&v[c]==i;c--)++C;A=g.to;for(var c=1;c<C;c++){var a=X.scanForClosingTag(p,A,null,w);if(!a||a.tag!=i)return!1;A=a.to}return!0}})},BjJ7:function(Xe,pe,W){"use strict";W.d(pe,"d",function(){return N}),W.d(pe,"c",function(){return _}),W.d(pe,"e",function(){return Q}),W.d(pe,"b",function(){return R}),W.d(pe,"a",function(){return S});var X=W("m3rI");function N(s){var p=!0;if(s.length>0){for(var v=0;v<s.length;v++)if(s[v].compile_success==0||!s[v].compile_success){p=!1;break}}else p=!1;return p}function _(s){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",v=[],i=0;i<s.length;i++){var A=s[i],O=p?"".concat(p,"/").concat(A.name):"".concat(A.name);v.push({title:A.name,isLeaf:!(A.type==="tree"),key:O})}return v}function Q(s,p,v){for(var i=0;i<s.length;i++){var A=s[i];if(A.key===p){A.children=v;break}A.children&&Q(A.children,p,v)}return s}function R(s,p,v){var i;return function(){var A=this,O=arguments,w=function(){i=null,v||s.apply(A,O)},g=v&&!i;clearTimeout(i),i=setTimeout(w,p),g&&s.apply(A,O)}}var E=!0,S=X.a.API_SERVER},BlVb:function(Xe,pe,W){var X=W("hyiK"),N=1e-8;function _(R,E){return Math.abs(R-E)<N}function Q(R,E,S){var s=0,p=R[0];if(!p)return!1;for(var v=1;v<R.length;v++){var i=R[v];s+=X(p[0],p[1],i[0],i[1],E,S),p=i}var A=R[0];return(!_(p[0],A[0])||!_(p[1],A[1]))&&(s+=X(p[0],p[1],A[0],A[1],E,S)),s!==0}pe.contain=Q},Bq2U:function(Xe,pe,W){var X=W("RDYZ"),N=W("Qe9p"),_=W("bYtY"),Q=_.isArrayLike,R=Array.prototype.slice;function E(y,T){return y[T]}function S(y,T,x){y[T]=x}function s(y,T,x){return(T-y)*x+y}function p(y,T,x){return x>.5?T:y}function v(y,T,x,M,b){var o=y.length;if(b===1)for(var r=0;r<o;r++)M[r]=s(y[r],T[r],x);else for(var n=o&&y[0].length,r=0;r<o;r++)for(var l=0;l<n;l++)M[r][l]=s(y[r][l],T[r][l],x)}function i(y,T,x){var M=y.length,b=T.length;if(M!==b){var o=M>b;if(o)y.length=b;else for(var r=M;r<b;r++)y.push(x===1?T[r]:R.call(T[r]))}for(var n=y[0]&&y[0].length,r=0;r<y.length;r++)if(x===1)isNaN(y[r])&&(y[r]=T[r]);else for(var l=0;l<n;l++)isNaN(y[r][l])&&(y[r][l]=T[r][l])}function A(y,T,x){if(y===T)return!0;var M=y.length;if(M!==T.length)return!1;if(x===1){for(var b=0;b<M;b++)if(y[b]!==T[b])return!1}else for(var o=y[0].length,b=0;b<M;b++)for(var r=0;r<o;r++)if(y[b][r]!==T[b][r])return!1;return!0}function O(y,T,x,M,b,o,r,n,l){var L=y.length;if(l===1)for(var B=0;B<L;B++)n[B]=w(y[B],T[B],x[B],M[B],b,o,r);else for(var h=y[0].length,B=0;B<L;B++)for(var I=0;I<h;I++)n[B][I]=w(y[B][I],T[B][I],x[B][I],M[B][I],b,o,r)}function w(y,T,x,M,b,o,r){var n=(x-y)*.5,l=(M-T)*.5;return(2*(T-x)+n+l)*r+(-3*(T-x)-2*n-l)*o+n*b+T}function g(y){if(Q(y)){var T=y.length;if(Q(y[0])){for(var x=[],M=0;M<T;M++)x.push(R.call(y[M]));return x}return R.call(y)}return y}function C(y){return y[0]=Math.floor(y[0]),y[1]=Math.floor(y[1]),y[2]=Math.floor(y[2]),"rgba("+y.join(",")+")"}function c(y){var T=y[y.length-1].value;return Q(T&&T[0])?2:1}function a(y,T,x,M,b,o){var r=y._getter,n=y._setter,l=T==="spline",L=M.length;if(!L)return;var B=M[0].value,h=Q(B),I=!1,H=!1,z=h?c(M):0,Z;M.sort(function(re,ie){return re.time-ie.time}),Z=M[L-1].time;for(var Y=[],G=[],ee=M[0].value,J=!0,oe=0;oe<L;oe++){Y.push(M[oe].time/Z);var se=M[oe].value;if(h&&A(se,ee,z)||!h&&se===ee||(J=!1),ee=se,typeof se=="string"){var Te=N.parse(se);Te?(se=Te,I=!0):H=!0}G.push(se)}if(!o&&J)return;for(var be=G[L-1],oe=0;oe<L-1;oe++)h?i(G[oe],be,z):isNaN(G[oe])&&!isNaN(be)&&!H&&!I&&(G[oe]=be);h&&i(r(y._target,b),be,z);var xe=0,Oe=0,Ne,Le,Se,tt,Bt,De;if(I)var Qe=[0,0,0,0];var it=function(re,ie){var ce;if(ie<0)ce=0;else if(ie<Oe){for(Ne=Math.min(xe+1,L-1),ce=Ne;ce>=0&&!(Y[ce]<=ie);ce--);ce=Math.min(ce,L-2)}else{for(ce=xe;ce<L&&!(Y[ce]>ie);ce++);ce=Math.min(ce-1,L-2)}xe=ce,Oe=ie;var Be=Y[ce+1]-Y[ce];if(Be===0)return;if(Le=(ie-Y[ce])/Be,l)if(tt=G[ce],Se=G[ce===0?ce:ce-1],Bt=G[ce>L-2?L-1:ce+1],De=G[ce>L-3?L-1:ce+2],h)O(Se,tt,Bt,De,Le,Le*Le,Le*Le*Le,r(re,b),z);else{var Re;if(I)Re=O(Se,tt,Bt,De,Le,Le*Le,Le*Le*Le,Qe,1),Re=C(Qe);else{if(H)return p(tt,Bt,Le);Re=w(Se,tt,Bt,De,Le,Le*Le,Le*Le*Le)}n(re,b,Re)}else if(h)v(G[ce],G[ce+1],Le,r(re,b),z);else{var Re;if(I)v(G[ce],G[ce+1],Le,Qe,1),Re=C(Qe);else{if(H)return p(G[ce],G[ce+1],Le);Re=s(G[ce],G[ce+1],Le)}n(re,b,Re)}},Ae=new X({target:y._target,life:Z,loop:y._loop,delay:y._delay,onframe:it,ondestroy:x});return T&&T!=="spline"&&(Ae.easing=T),Ae}var u=function(y,T,x,M){this._tracks={},this._target=y,this._loop=T||!1,this._getter=x||E,this._setter=M||S,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};u.prototype={when:function(y,T){var x=this._tracks;for(var M in T){if(!T.hasOwnProperty(M))continue;if(!x[M]){x[M]=[];var b=this._getter(this._target,M);if(b==null)continue;y!==0&&x[M].push({time:0,value:g(b)})}x[M].push({time:y,value:T[M]})}return this},during:function(y){return this._onframeList.push(y),this},pause:function(){for(var y=0;y<this._clipList.length;y++)this._clipList[y].pause();this._paused=!0},resume:function(){for(var y=0;y<this._clipList.length;y++)this._clipList[y].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var y=this._doneList,T=y.length,x=0;x<T;x++)y[x].call(this)},start:function(y,T){var x=this,M=0,b=function(){M--,M||x._doneCallback()},o;for(var r in this._tracks){if(!this._tracks.hasOwnProperty(r))continue;var n=a(this,y,b,this._tracks[r],r,T);n&&(this._clipList.push(n),M++,this.animation&&this.animation.addClip(n),o=n)}if(o){var l=o.onframe;o.onframe=function(L,B){l(L,B);for(var h=0;h<x._onframeList.length;h++)x._onframeList[h](L,B)}}return M||this._doneCallback(),this},stop:function(y){for(var T=this._clipList,x=this.animation,M=0;M<T.length;M++){var b=T[M];y&&b.onframe(this._target,1),x&&x.removeClip(b)}T.length=0},delay:function(y){return this._delay=y,this},done:function(y){return y&&this._doneList.push(y),this},getClips:function(){return this._clipList}};var m=u;Xe.exports=m},"C+DQ":function(Xe,pe,W){},C0SR:function(Xe,pe,W){var X=W("YH21"),N=function(){this._track=[]};N.prototype={constructor:N,recognize:function(S,s,p){return this._doTrack(S,s,p),this._recognize(S)},clear:function(){return this._track.length=0,this},_doTrack:function(S,s,p){var v=S.touches;if(!v)return;for(var i={points:[],touches:[],target:s,event:S},A=0,O=v.length;A<O;A++){var w=v[A],g=X.clientToLocal(p,w,{});i.points.push([g.zrX,g.zrY]),i.touches.push(w)}this._track.push(i)},_recognize:function(S){for(var s in R)if(R.hasOwnProperty(s)){var p=R[s](this._track,S);if(p)return p}}};function _(S){var s=S[1][0]-S[0][0],p=S[1][1]-S[0][1];return Math.sqrt(s*s+p*p)}function Q(S){return[(S[0][0]+S[1][0])/2,(S[0][1]+S[1][1])/2]}var R={pinch:function(S,s){var p=S.length;if(!p)return;var v=(S[p-1]||{}).points,i=(S[p-2]||{}).points||v;if(i&&i.length>1&&v&&v.length>1){var A=_(v)/_(i);!isFinite(A)&&(A=1),s.pinchScale=A;var O=Q(v);return s.pinchX=O[0],s.pinchY=O[1],{type:"pinch",target:S[0].target,event:s}}}},E=N;Xe.exports=E},D1Df:function(Xe,pe,W){"use strict";function X(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(H){return typeof H}:X=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},X(h)}function N(){return N=Object.assign||function(h){for(var I=1;I<arguments.length;I++){var H=arguments[I];for(var z in H)Object.prototype.hasOwnProperty.call(H,z)&&(h[z]=H[z])}return h},N.apply(this,arguments)}function _(h,I){var H=Object.keys(h);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(h);I&&(z=z.filter(function(Z){return Object.getOwnPropertyDescriptor(h,Z).enumerable})),H.push.apply(H,z)}return H}function Q(h){for(var I=1;I<arguments.length;I++){var H=arguments[I]!=null?arguments[I]:{};I%2?_(H,!0).forEach(function(z){g(h,z,H[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(H)):_(H).forEach(function(z){Object.defineProperty(h,z,Object.getOwnPropertyDescriptor(H,z))})}return h}function R(h,I){if(h==null)return{};var H=E(h,I),z,Z;if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(h);for(Z=0;Z<Y.length;Z++){if(z=Y[Z],I.indexOf(z)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(h,z))continue;H[z]=h[z]}}return H}function E(h,I){if(h==null)return{};var H={},z=Object.keys(h),Z,Y;for(Y=0;Y<z.length;Y++){if(Z=z[Y],I.indexOf(Z)>=0)continue;H[Z]=h[Z]}return H}function S(h,I){if(!(h instanceof I))throw new TypeError("Cannot call a class as a function")}function s(h,I){for(var H=0;H<I.length;H++){var z=I[H];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(h,z.key,z)}}function p(h,I,H){return I&&s(h.prototype,I),H&&s(h,H),h}function v(h,I){return I&&(X(I)==="object"||typeof I=="function")?I:A(h)}function i(h){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},i(h)}function A(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function O(h,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(I&&I.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),I&&w(h,I)}function w(h,I){return w=Object.setPrototypeOf||function(z,Z){return z.__proto__=Z,z},w(h,I)}function g(h,I,H){return I in h?Object.defineProperty(h,I,{value:H,enumerable:!0,configurable:!0,writable:!0}):h[I]=H,h}var C=W("q1tI"),c=W("17x9"),a=W("H38U"),u=W("aRTE");function m(h){for(var I="",H=0;H<h.length;H++){var z=h.charCodeAt(H);z<128?I+=String.fromCharCode(z):z<2048?(I+=String.fromCharCode(192|z>>6),I+=String.fromCharCode(128|z&63)):z<55296||z>=57344?(I+=String.fromCharCode(224|z>>12),I+=String.fromCharCode(128|z>>6&63),I+=String.fromCharCode(128|z&63)):(H++,z=65536+((z&1023)<<10|h.charCodeAt(H)&1023),I+=String.fromCharCode(240|z>>18),I+=String.fromCharCode(128|z>>12&63),I+=String.fromCharCode(128|z>>6&63),I+=String.fromCharCode(128|z&63))}return I}var y={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},T={},x=4,M=.1;function b(h){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=[];return h.forEach(function(z,Z){var Y=null;z.forEach(function(G,ee){if(!G&&Y!==null){H.push("M".concat(Y+I," ").concat(Z+I,"h").concat(ee-Y,"v1H").concat(Y+I,"z")),Y=null;return}if(ee===z.length-1){if(!G)return;Y===null?H.push("M".concat(ee+I,",").concat(Z+I," h1v1H").concat(ee+I,"z")):H.push("M".concat(Y+I,",").concat(Z+I," h").concat(ee+1-Y,"v1H").concat(Y+I,"z"));return}G&&Y===null&&(Y=ee)})}),H.join("")}function o(h,I){return h.slice().map(function(H,z){return z<I.y||z>=I.y+I.h?H:H.map(function(Z,Y){return Y<I.x||Y>=I.x+I.w?Z:!1})})}function r(h,I){var H=h.imageSettings,z=h.size,Z=h.includeMargin;if(H==null)return null;var Y=Z?x:0,G=I.length+Y*2,ee=Math.floor(z*M),J=G/z,oe=(H.width||ee)*J,se=(H.height||ee)*J,Te=H.x==null?I.length/2-oe/2:H.x*J,be=H.y==null?I.length/2-se/2:H.y*J,xe=null;if(H.excavate){var Oe=Math.floor(Te),Ne=Math.floor(be),Le=Math.ceil(oe+Te-Oe),Se=Math.ceil(se+be-Ne);xe={x:Oe,y:Ne,w:Le,h:Se}}return{x:Te,y:be,h:se,w:oe,excavation:xe}}var n=function(){try{new Path2D().addPath(new Path2D)}catch(h){return!1}return!0}(),l=function(h){O(I,h);function I(){var H,z;S(this,I);for(var Z=arguments.length,Y=new Array(Z),G=0;G<Z;G++)Y[G]=arguments[G];return z=v(this,(H=i(I)).call.apply(H,[this].concat(Y))),g(A(z),"_canvas",void 0),g(A(z),"_image",void 0),g(A(z),"state",{imgLoaded:!1}),g(A(z),"handleImageLoad",function(){z.setState({imgLoaded:!0})}),z}return p(I,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var z=this.props,Z=z.value,Y=z.size,G=z.level,ee=z.bgColor,J=z.fgColor,oe=z.includeMargin,se=z.imageSettings,Te=new a(-1,u[G]);if(Te.addData(m(Z)),Te.make(),this._canvas!=null){var be=this._canvas,xe=be.getContext("2d");if(!xe)return;var Oe=Te.modules;if(Oe===null)return;var Ne=oe?x:0,Le=Oe.length+Ne*2,Se=r(this.props,Oe);se!=null&&Se!=null&&(Se.excavation!=null&&(Oe=o(Oe,Se.excavation)));var tt=window.devicePixelRatio||1;be.height=be.width=Y*tt;var Bt=Y/Le*tt;xe.scale(Bt,Bt),xe.fillStyle=ee,xe.fillRect(0,0,Le,Le),xe.fillStyle=J,n?xe.fill(new Path2D(b(Oe,Ne))):Oe.forEach(function(De,Qe){De.forEach(function(it,Ae){it&&xe.fillRect(Ae+Ne,Qe+Ne,1,1)})}),this.state.imgLoaded&&this._image&&Se!=null&&xe.drawImage(this._image,Se.x+Ne,Se.y+Ne,Se.w,Se.h)}}},{key:"render",value:function(){var z=this,Z=this.props,Y=Z.value,G=Z.size,ee=Z.level,J=Z.bgColor,oe=Z.fgColor,se=Z.style,Te=Z.includeMargin,be=Z.imageSettings,xe=R(Z,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Oe=Q({height:G,width:G},se),Ne=null,Le=be&&be.src;return be!=null&&Le!=null&&(Ne=C.createElement("img",{src:Le,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(tt){return z._image=tt}})),C.createElement(C.Fragment,null,C.createElement("canvas",N({style:Oe,height:G,width:G,ref:function(tt){return z._canvas=tt}},xe)),Ne)}}]),I}(C.PureComponent);g(l,"defaultProps",y);var L=function(h){O(I,h);function I(){return S(this,I),v(this,i(I).apply(this,arguments))}return p(I,[{key:"render",value:function(){var z=this.props,Z=z.value,Y=z.size,G=z.level,ee=z.bgColor,J=z.fgColor,oe=z.includeMargin,se=z.imageSettings,Te=R(z,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),be=new a(-1,u[G]);be.addData(m(Z)),be.make();var xe=be.modules;if(xe===null)return null;var Oe=oe?x:0,Ne=xe.length+Oe*2,Le=r(this.props,xe),Se=null;se!=null&&Le!=null&&(Le.excavation!=null&&(xe=o(xe,Le.excavation)),Se=C.createElement("image",{xlinkHref:se.src,height:Le.h,width:Le.w,x:Le.x+Oe,y:Le.y+Oe,preserveAspectRatio:"none"}));var tt=b(xe,Oe);return C.createElement("svg",N({shapeRendering:"crispEdges",height:Y,width:Y,viewBox:"0 0 ".concat(Ne," ").concat(Ne)},Te),C.createElement("path",{fill:ee,d:"M0,0 h".concat(Ne,"v").concat(Ne,"H0z")}),C.createElement("path",{fill:J,d:tt}),Se)}}]),I}(C.PureComponent);g(L,"defaultProps",y);var B=function(I){var H=I.renderAs,z=R(I,["renderAs"]),Z=H==="svg"?L:l;return C.createElement(Z,z)};B.defaultProps=Q({renderAs:"canvas"},y),Xe.exports=B},DBLp:function(Xe,pe){function W(){}W.prototype={diff:function(R,E,S){S||(S=function(u,m){return u===m}),this.equals=S;var s=this;R=R.slice(),E=E.slice();var p=E.length,v=R.length,i=1,A=p+v,O=[{newPos:-1,components:[]}],w=this.extractCommon(O[0],E,R,0);if(O[0].newPos+1>=p&&w+1>=v){for(var g=[],C=0;C<E.length;C++)g.push(C);return[{indices:g,count:E.length}]}function c(){for(var u=-1*i;u<=i;u+=2){var m,y=O[u-1],T=O[u+1],x=(T?T.newPos:0)-u;y&&(O[u-1]=void 0);var M=y&&y.newPos+1<p,b=T&&0<=x&&x<v;if(!M&&!b){O[u]=void 0;continue}if(!M||b&&y.newPos<T.newPos?(m=N(T),s.pushComponent(m.components,void 0,!0)):(m=y,m.newPos++,s.pushComponent(m.components,!0,void 0)),x=s.extractCommon(m,E,R,u),m.newPos+1>=p&&x+1>=v)return X(s,m.components,E,R);O[u]=m}i++}for(;i<=A;){var a=c();if(a)return a}},pushComponent:function(R,E,S){var s=R[R.length-1];s&&s.added===E&&s.removed===S?R[R.length-1]={count:s.count+1,added:E,removed:S}:R.push({count:1,added:E,removed:S})},extractCommon:function(R,E,S,s){for(var p=E.length,v=S.length,i=R.newPos,A=i-s,O=0;i+1<p&&A+1<v&&this.equals(E[i+1],S[A+1]);)i++,A++,O++;return O&&R.components.push({count:O}),R.newPos=i,A},tokenize:function(R){return R.slice()},join:function(R){return R.slice()}};function X(R,E,S,s){for(var p=0,v=E.length,i=0,A=0;p<v;p++){var O=E[p];if(O.removed){for(var w=[],g=A;g<A+O.count;g++)w.push(g);O.indices=w,A+=O.count}else{for(var w=[],g=i;g<i+O.count;g++)w.push(g);O.indices=w,i+=O.count,O.added||(A+=O.count)}}return E}function N(R){return{newPos:R.newPos,components:R.components.slice(0)}}var _=new W;function Q(R,E,S){return _.diff(R,E,S)}Xe.exports=Q},DN4a:function(Xe,pe,W){var X=W("Fofx"),N=W("QBsz"),_=X.identity,Q=5e-5;function R(A){return A>Q||A<-Q}var E=function(A){A=A||{},A.position||(this.position=[0,0]),A.rotation==null&&(this.rotation=0),A.scale||(this.scale=[1,1]),this.origin=this.origin||null},S=E.prototype;S.transform=null,S.needLocalTransform=function(){return R(this.rotation)||R(this.position[0])||R(this.position[1])||R(this.scale[0]-1)||R(this.scale[1]-1)};var s=[];S.updateTransform=function(){var A=this.parent,O=A&&A.transform,w=this.needLocalTransform(),g=this.transform;if(!(w||O)){g&&_(g);return}g=g||X.create(),w?this.getLocalTransform(g):_(g),O&&(w?X.mul(g,A.transform,g):X.copy(g,A.transform)),this.transform=g;var C=this.globalScaleRatio;if(C!=null&&C!==1){this.getGlobalScale(s);var c=s[0]<0?-1:1,a=s[1]<0?-1:1,u=((s[0]-c)*C+c)/s[0]||0,m=((s[1]-a)*C+a)/s[1]||0;g[0]*=u,g[1]*=u,g[2]*=m,g[3]*=m}this.invTransform=this.invTransform||X.create(),X.invert(this.invTransform,g)},S.getLocalTransform=function(A){return E.getLocalTransform(this,A)},S.setTransform=function(A){var O=this.transform,w=A.dpr||1;O?A.setTransform(w*O[0],w*O[1],w*O[2],w*O[3],w*O[4],w*O[5]):A.setTransform(w,0,0,w,0,0)},S.restoreTransform=function(A){var O=A.dpr||1;A.setTransform(O,0,0,O,0,0)};var p=[],v=X.create();S.setLocalTransform=function(A){if(!A)return;var O=A[0]*A[0]+A[1]*A[1],w=A[2]*A[2]+A[3]*A[3],g=this.position,C=this.scale;R(O-1)&&(O=Math.sqrt(O)),R(w-1)&&(w=Math.sqrt(w)),A[0]<0&&(O=-O),A[3]<0&&(w=-w),g[0]=A[4],g[1]=A[5],C[0]=O,C[1]=w,this.rotation=Math.atan2(-A[1]/w,A[0]/O)},S.decomposeTransform=function(){if(!this.transform)return;var A=this.parent,O=this.transform;A&&A.transform&&(X.mul(p,A.invTransform,O),O=p);var w=this.origin;w&&(w[0]||w[1])&&(v[4]=w[0],v[5]=w[1],X.mul(p,O,v),p[4]-=w[0],p[5]-=w[1],O=p),this.setLocalTransform(O)},S.getGlobalScale=function(A){var O=this.transform;return A=A||[],O?(A[0]=Math.sqrt(O[0]*O[0]+O[1]*O[1]),A[1]=Math.sqrt(O[2]*O[2]+O[3]*O[3]),O[0]<0&&(A[0]=-A[0]),O[3]<0&&(A[1]=-A[1]),A):(A[0]=1,A[1]=1,A)},S.transformCoordToLocal=function(A,O){var w=[A,O],g=this.invTransform;return g&&N.applyTransform(w,w,g),w},S.transformCoordToGlobal=function(A,O){var w=[A,O],g=this.transform;return g&&N.applyTransform(w,w,g),w},E.getLocalTransform=function(A,O){O=O||[],_(O);var w=A.origin,g=A.scale||[1,1],C=A.rotation||0,c=A.position||[0,0];return w&&(O[4]-=w[0],O[5]-=w[1]),X.scale(O,O,g),C&&X.rotate(O,O,C),w&&(O[4]+=w[0],O[5]+=w[1]),O[4]+=c[0],O[5]+=c[1],O};var i=E;Xe.exports=i},Dagg:function(Xe,pe,W){var X=W("Gev7"),N=W("mFDi"),_=W("bYtY"),Q=W("Xnb7");function R(S){X.call(this,S)}R.prototype={constructor:R,type:"image",brush:function(S,s){var p=this.style,v=p.image;p.bind(S,this,s);var i=this._image=Q.createOrUpdateImage(v,this._image,this,this.onload);if(!i||!Q.isImageReady(i))return;var A=p.x||0,O=p.y||0,w=p.width,g=p.height,C=i.width/i.height;if(w==null&&g!=null?w=g*C:g==null&&w!=null?g=w/C:w==null&&g==null&&(w=i.width,g=i.height),this.setTransform(S),p.sWidth&&p.sHeight){var c=p.sx||0,a=p.sy||0;S.drawImage(i,c,a,p.sWidth,p.sHeight,A,O,w,g)}else if(p.sx&&p.sy){var c=p.sx,a=p.sy,u=w-c,m=g-a;S.drawImage(i,c,a,u,m,A,O,w,g)}else S.drawImage(i,A,O,w,g);p.text!=null&&(this.restoreTransform(S),this.drawRectText(S,this.getBoundingRect()))},getBoundingRect:function(){var S=this.style;return this._rect||(this._rect=new N(S.x||0,S.y||0,S.width||0,S.height||0)),this._rect}},_.inherits(R,X);var E=R;Xe.exports=E},DlQD:function(Xe,pe,W){(function(X,N){Xe.exports=N()})(this,function(){"use strict";function X(Ke,Ie){for(var Me=0;Me<Ie.length;Me++){var me=Ie[Me];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(Ke,me.key,me)}}function N(Ke,Ie,Me){return Ie&&X(Ke.prototype,Ie),Me&&X(Ke,Me),Ke}function _(Ke,Ie){if(!Ke)return;if(typeof Ke=="string")return Q(Ke,Ie);var Me=Object.prototype.toString.call(Ke).slice(8,-1);if(Me==="Object"&&Ke.constructor&&(Me=Ke.constructor.name),Me==="Map"||Me==="Set")return Array.from(Ke);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return Q(Ke,Ie)}function Q(Ke,Ie){(Ie==null||Ie>Ke.length)&&(Ie=Ke.length);for(var Me=0,me=new Array(Ie);Me<Ie;Me++)me[Me]=Ke[Me];return me}function R(Ke,Ie){var Me;if(typeof Symbol=="undefined"||Ke[Symbol.iterator]==null){if(Array.isArray(Ke)||(Me=_(Ke))||Ie&&Ke&&typeof Ke.length=="number"){Me&&(Ke=Me);var me=0;return function(){return me>=Ke.length?{done:!0}:{done:!1,value:Ke[me++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Me=Ke[Symbol.iterator](),Me.next.bind(Me)}function E(Ke,Ie){return Ie={exports:{}},Ke(Ie,Ie.exports),Ie.exports}var S=E(function(Ke){function Ie(){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}}function Me(me){Ke.exports.defaults=me}Ke.exports={defaults:Ie(),getDefaults:Ie,changeDefaults:Me}}),s=S.defaults,p=S.getDefaults,v=S.changeDefaults,i=/[&<>"']/,A=/[&<>"']/g,O=/[<>"']|&(?!#?\w+;)/,w=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},C=function(Ie){return g[Ie]};function c(Ke,Ie){if(Ie){if(i.test(Ke))return Ke.replace(A,C)}else if(O.test(Ke))return Ke.replace(w,C);return Ke}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(Ke){return Ke.replace(a,function(Ie,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var m=/(^|[^\[])\^/g;function y(Ke,Ie){Ke=Ke.source||Ke,Ie=Ie||"";var Me={replace:function(Ee,ge){return ge=ge.source||ge,ge=ge.replace(m,"$1"),Ke=Ke.replace(Ee,ge),Me},getRegex:function(){return new RegExp(Ke,Ie)}};return Me}var T=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(Ke,Ie,Me){if(Ke){var me;try{me=decodeURIComponent(u(Me)).replace(T,"").toLowerCase()}catch(Ee){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}Ie&&!x.test(Me)&&(Me=l(Ie,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Ee){return null}return Me}var b={},o=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,n=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(Ke,Ie){b[" "+Ke]||(o.test(Ke)?b[" "+Ke]=Ke+"/":b[" "+Ke]=I(Ke,"/",!0)),Ke=b[" "+Ke];var Me=Ke.indexOf(":")===-1;return Ie.substring(0,2)==="//"?Me?Ie:Ke.replace(r,"$1")+Ie:Ie.charAt(0)==="/"?Me?Ie:Ke.replace(n,"$1")+Ie:Ke+Ie}var L={exec:function(){}};function B(Ke){for(var Ie=1,Me,me;Ie<arguments.length;Ie++){Me=arguments[Ie];for(me in Me)Object.prototype.hasOwnProperty.call(Me,me)&&(Ke[me]=Me[me])}return Ke}function h(Ke,Ie){var Me=Ke.replace(/\|/g,function(ge,we,ze){for(var Je=!1,Et=we;--Et>=0&&ze[Et]==="\\";)Je=!Je;return Je?"|":" |"}),me=Me.split(/ \|/),Ee=0;if(me.length>Ie)me.splice(Ie);else for(;me.length<Ie;)me.push("");for(;Ee<me.length;Ee++)me[Ee]=me[Ee].trim().replace(/\\\|/g,"|");return me}function I(Ke,Ie,Me){var me=Ke.length;if(me===0)return"";for(var Ee=0;Ee<me;){var ge=Ke.charAt(me-Ee-1);if(ge===Ie&&!Me)Ee++;else if(ge!==Ie&&Me)Ee++;else break}return Ke.substr(0,me-Ee)}function H(Ke,Ie){if(Ke.indexOf(Ie[1])===-1)return-1;for(var Me=Ke.length,me=0,Ee=0;Ee<Me;Ee++)if(Ke[Ee]==="\\")Ee++;else if(Ke[Ee]===Ie[0])me++;else if(Ke[Ee]===Ie[1]&&(me--,me<0))return Ee;return-1}function z(Ke){Ke&&Ke.sanitize&&!Ke.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")}var Z={escape:c,unescape:u,edit:y,cleanUrl:M,resolveUrl:l,noopTest:L,merge:B,splitCells:h,rtrim:I,findClosingBracket:H,checkSanitizeDeprecation:z},Y=S.defaults,G=Z.rtrim,ee=Z.splitCells,J=Z.escape,oe=Z.findClosingBracket;function se(Ke,Ie,Me){var me=Ie.href,Ee=Ie.title?J(Ie.title):null,ge=Ke[1].replace(/\\([\[\]])/g,"$1");return Ke[0].charAt(0)!=="!"?{type:"link",raw:Me,href:me,title:Ee,text:ge}:{type:"image",raw:Me,href:me,title:Ee,text:J(ge)}}function Te(Ke,Ie){var Me=Ke.match(/^(\s+)(?:```)/);if(Me===null)return Ie;var me=Me[1];return Ie.split(`
|
|
`).map(function(Ee){var ge=Ee.match(/^\s+/);if(ge===null)return Ee;var we=ge[0];return we.length>=me.length?Ee.slice(me.length):Ee}).join(`
|
|
`)}var be=function(){function Ke(Me){this.options=Me||Y}var Ie=Ke.prototype;return Ie.space=function(me){var Ee=this.rules.block.newline.exec(me);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
`}},Ie.code=function(me,Ee){var ge=this.rules.block.code.exec(me);if(ge){var we=Ee[Ee.length-1];if(we&&we.type==="paragraph")return{raw:ge[0],text:ge[0].trimRight()};var ze=ge[0].replace(/^ {4}/gm,"");return{type:"code",raw:ge[0],codeBlockStyle:"indented",text:this.options.pedantic?ze:G(ze,`
|
|
`)}}},Ie.fences=function(me){var Ee=this.rules.block.fences.exec(me);if(Ee){var ge=Ee[0],we=Te(ge,Ee[3]||"");return{type:"code",raw:ge,lang:Ee[2]?Ee[2].trim():Ee[2],text:we}}},Ie.heading=function(me){var Ee=this.rules.block.heading.exec(me);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Ie.nptable=function(me){var Ee=this.rules.block.nptable.exec(me);if(Ee){var ge={type:"table",header:ee(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Ee[0]};if(ge.header.length===ge.align.length){var we=ge.align.length,ze;for(ze=0;ze<we;ze++)/^ *-+: *$/.test(ge.align[ze])?ge.align[ze]="right":/^ *:-+: *$/.test(ge.align[ze])?ge.align[ze]="center":/^ *:-+ *$/.test(ge.align[ze])?ge.align[ze]="left":ge.align[ze]=null;for(we=ge.cells.length,ze=0;ze<we;ze++)ge.cells[ze]=ee(ge.cells[ze],ge.header.length);return ge}}},Ie.hr=function(me){var Ee=this.rules.block.hr.exec(me);if(Ee)return{type:"hr",raw:Ee[0]}},Ie.blockquote=function(me){var Ee=this.rules.block.blockquote.exec(me);if(Ee){var ge=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:ge}}},Ie.list=function(me){var Ee=this.rules.block.list.exec(me);if(Ee){for(var ge=Ee[0],we=Ee[2],ze=we.length>1,Je=we[we.length-1]===")",Et={type:"list",raw:ge,ordered:ze,start:ze?+we.slice(0,-1):"",loose:!1,items:[]},Ft=Ee[0].match(this.rules.block.item),Nt=!1,ht,Lt,st,rt,et,Ce,Ue,ct=Ft.length,at=0;at<ct;at++)ht=Ft[at],ge=ht,Lt=ht.length,ht=ht.replace(/^ *([*+-]|\d+[.)]) */,""),~ht.indexOf(`
|
|
`)&&(Lt-=ht.length,ht=this.options.pedantic?ht.replace(/^ {1,4}/gm,""):ht.replace(new RegExp("^ {1,"+Lt+"}","gm"),"")),at!==ct-1&&(st=this.rules.block.bullet.exec(Ft[at+1])[0],(ze?st.length===1||!Je&&st[st.length-1]===")":st.length>1||this.options.smartLists&&st!==we)&&(rt=Ft.slice(at+1).join(`
|
|
`),Et.raw=Et.raw.substring(0,Et.raw.length-rt.length),at=ct-1)),et=Nt||/\n\n(?!\s*$)/.test(ht),at!==ct-1&&(Nt=ht.charAt(ht.length-1)===`
|
|
`,et||(et=Nt)),et&&(Et.loose=!0),Ce=/^\[[ xX]\] /.test(ht),Ue=void 0,Ce&&(Ue=ht[1]!==" ",ht=ht.replace(/^\[[ xX]\] +/,"")),Et.items.push({type:"list_item",raw:ge,task:Ce,checked:Ue,loose:et,text:ht});return Et}},Ie.html=function(me){var Ee=this.rules.block.html.exec(me);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):J(Ee[0]):Ee[0]}},Ie.def=function(me){var Ee=this.rules.block.def.exec(me);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var ge=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:ge,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Ie.table=function(me){var Ee=this.rules.block.table.exec(me);if(Ee){var ge={type:"table",header:ee(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ge.header.length===ge.align.length){ge.raw=Ee[0];var we=ge.align.length,ze;for(ze=0;ze<we;ze++)/^ *-+: *$/.test(ge.align[ze])?ge.align[ze]="right":/^ *:-+: *$/.test(ge.align[ze])?ge.align[ze]="center":/^ *:-+ *$/.test(ge.align[ze])?ge.align[ze]="left":ge.align[ze]=null;for(we=ge.cells.length,ze=0;ze<we;ze++)ge.cells[ze]=ee(ge.cells[ze].replace(/^ *\| *| *\| *$/g,""),ge.header.length);return ge}}},Ie.lheading=function(me){var Ee=this.rules.block.lheading.exec(me);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Ie.paragraph=function(me){var Ee=this.rules.block.paragraph.exec(me);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
`?Ee[1].slice(0,-1):Ee[1]}},Ie.text=function(me,Ee){var ge=this.rules.block.text.exec(me);if(ge){var we=Ee[Ee.length-1];return we&&we.type==="text"?{raw:ge[0],text:ge[0]}:{type:"text",raw:ge[0],text:ge[0]}}},Ie.escape=function(me){var Ee=this.rules.inline.escape.exec(me);if(Ee)return{type:"escape",raw:Ee[0],text:J(Ee[1])}},Ie.tag=function(me,Ee,ge){var we=this.rules.inline.tag.exec(me);if(we)return!Ee&&/^<a /i.test(we[0])?Ee=!0:Ee&&/^<\/a>/i.test(we[0])&&(Ee=!1),!ge&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?ge=!0:ge&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(ge=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:Ee,inRawBlock:ge,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):J(we[0]):we[0]}},Ie.link=function(me){var Ee=this.rules.inline.link.exec(me);if(Ee){var ge=oe(Ee[2],"()");if(ge>-1){var we=Ee[0].indexOf("!")===0?5:4,ze=we+Ee[1].length+ge;Ee[2]=Ee[2].substring(0,ge),Ee[0]=Ee[0].substring(0,ze).trim(),Ee[3]=""}var Je=Ee[2],Et="";if(this.options.pedantic){var Ft=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Je);Ft?(Je=Ft[1],Et=Ft[3]):Et=""}else Et=Ee[3]?Ee[3].slice(1,-1):"";Je=Je.trim().replace(/^<([\s\S]*)>$/,"$1");var Nt=se(Ee,{href:Je&&Je.replace(this.rules.inline._escapes,"$1"),title:Et&&Et.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Nt}},Ie.reflink=function(me,Ee){var ge;if((ge=this.rules.inline.reflink.exec(me))||(ge=this.rules.inline.nolink.exec(me))){var we=(ge[2]||ge[1]).replace(/\s+/g," ");if(we=Ee[we.toLowerCase()],!we||!we.href){var ze=ge[0].charAt(0);return{type:"text",raw:ze,text:ze}}var Je=se(ge,we,ge[0]);return Je}},Ie.strong=function(me,Ee,ge){ge===void 0&&(ge="");var we=this.rules.inline.strong.start.exec(me);if(we&&(!we[1]||we[1]&&(ge===""||this.rules.inline.punctuation.exec(ge)))){Ee=Ee.slice(-1*me.length);var ze=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ze.lastIndex=0;for(var Je;(we=ze.exec(Ee))!=null;)if(Je=this.rules.inline.strong.middle.exec(Ee.slice(0,we.index+3)),Je)return{type:"strong",raw:me.slice(0,Je[0].length),text:me.slice(2,Je[0].length-2)}}},Ie.em=function(me,Ee,ge){ge===void 0&&(ge="");var we=this.rules.inline.em.start.exec(me);if(we&&(!we[1]||we[1]&&(ge===""||this.rules.inline.punctuation.exec(ge)))){Ee=Ee.slice(-1*me.length);var ze=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ze.lastIndex=0;for(var Je;(we=ze.exec(Ee))!=null;)if(Je=this.rules.inline.em.middle.exec(Ee.slice(0,we.index+2)),Je)return{type:"em",raw:me.slice(0,Je[0].length),text:me.slice(1,Je[0].length-1)}}},Ie.codespan=function(me){var Ee=this.rules.inline.code.exec(me);if(Ee){var ge=Ee[2].replace(/\n/g," "),we=/[^ ]/.test(ge),ze=ge.startsWith(" ")&&ge.endsWith(" ");return we&&ze&&(ge=ge.substring(1,ge.length-1)),ge=J(ge,!0),{type:"codespan",raw:Ee[0],text:ge}}},Ie.br=function(me){var Ee=this.rules.inline.br.exec(me);if(Ee)return{type:"br",raw:Ee[0]}},Ie.del=function(me){var Ee=this.rules.inline.del.exec(me);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Ie.autolink=function(me,Ee){var ge=this.rules.inline.autolink.exec(me);if(ge){var we,ze;return ge[2]==="@"?(we=J(this.options.mangle?Ee(ge[1]):ge[1]),ze="mailto:"+we):(we=J(ge[1]),ze=we),{type:"link",raw:ge[0],text:we,href:ze,tokens:[{type:"text",raw:we,text:we}]}}},Ie.url=function(me,Ee){var ge;if(ge=this.rules.inline.url.exec(me)){var we,ze;if(ge[2]==="@")we=J(this.options.mangle?Ee(ge[0]):ge[0]),ze="mailto:"+we;else{var Je;do Je=ge[0],ge[0]=this.rules.inline._backpedal.exec(ge[0])[0];while(Je!==ge[0]);we=J(ge[0]),ge[1]==="www."?ze="http://"+we:ze=we}return{type:"link",raw:ge[0],text:we,href:ze,tokens:[{type:"text",raw:we,text:we}]}}},Ie.inlineText=function(me,Ee,ge){var we=this.rules.inline.text.exec(me);if(we){var ze;return Ee?ze=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):J(we[0]):we[0]:ze=J(this.options.smartypants?ge(we[0]):we[0]),{type:"text",raw:we[0],text:ze}}},Ke}(),xe=Z.noopTest,Oe=Z.edit,Ne=Z.merge,Le={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:xe,table:xe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Le._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Le._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Le.def=Oe(Le.def).replace("label",Le._label).replace("title",Le._title).getRegex(),Le.bullet=/(?:[*+-]|\d{1,9}[.)])/,Le.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Le.item=Oe(Le.item,"gm").replace(/bull/g,Le.bullet).getRegex(),Le.list=Oe(Le.list).replace(/bull/g,Le.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Le.def.source+")").getRegex(),Le._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",Le._comment=/<!--(?!-?>)[\s\S]*?-->/,Le.html=Oe(Le.html,"i").replace("comment",Le._comment).replace("tag",Le._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Le.paragraph=Oe(Le._paragraph).replace("hr",Le.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",Le._tag).getRegex(),Le.blockquote=Oe(Le.blockquote).replace("paragraph",Le.paragraph).getRegex(),Le.normal=Ne({},Le),Le.gfm=Ne({},Le.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*|$)"}),Le.gfm.nptable=Oe(Le.gfm.nptable).replace("hr",Le.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",Le._tag).getRegex(),Le.gfm.table=Oe(Le.gfm.table).replace("hr",Le.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",Le._tag).getRegex(),Le.pedantic=Ne({},Le.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Le._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:xe,paragraph:Oe(Le.normal._paragraph).replace("hr",Le.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Le.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,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:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Se.punctuation=Oe(Se.punctuation).replace(/punctuation/g,Se._punctuation).getRegex(),Se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Se.em.start=Oe(Se.em.start).replace(/punctuation/g,Se._punctuation).getRegex(),Se.em.middle=Oe(Se.em.middle).replace(/punctuation/g,Se._punctuation).replace(/overlapSkip/g,Se._overlapSkip).getRegex(),Se.em.endAst=Oe(Se.em.endAst,"g").replace(/punctuation/g,Se._punctuation).getRegex(),Se.em.endUnd=Oe(Se.em.endUnd,"g").replace(/punctuation/g,Se._punctuation).getRegex(),Se.strong.start=Oe(Se.strong.start).replace(/punctuation/g,Se._punctuation).getRegex(),Se.strong.middle=Oe(Se.strong.middle).replace(/punctuation/g,Se._punctuation).replace(/blockSkip/g,Se._blockSkip).getRegex(),Se.strong.endAst=Oe(Se.strong.endAst,"g").replace(/punctuation/g,Se._punctuation).getRegex(),Se.strong.endUnd=Oe(Se.strong.endUnd,"g").replace(/punctuation/g,Se._punctuation).getRegex(),Se.blockSkip=Oe(Se._blockSkip,"g").getRegex(),Se.overlapSkip=Oe(Se._overlapSkip,"g").getRegex(),Se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Se._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])?)+(?![-_])/,Se.autolink=Oe(Se.autolink).replace("scheme",Se._scheme).replace("email",Se._email).getRegex(),Se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Se.tag=Oe(Se.tag).replace("comment",Le._comment).replace("attribute",Se._attribute).getRegex(),Se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Se.link=Oe(Se.link).replace("label",Se._label).replace("href",Se._href).replace("title",Se._title).getRegex(),Se.reflink=Oe(Se.reflink).replace("label",Se._label).getRegex(),Se.reflinkSearch=Oe(Se.reflinkSearch,"g").replace("reflink",Se.reflink).replace("nolink",Se.nolink).getRegex(),Se.normal=Ne({},Se),Se.pedantic=Ne({},Se.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:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",Se._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se._label).getRegex()}),Se.gfm=Ne({},Se.normal,{escape:Oe(Se.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Se.gfm.url=Oe(Se.gfm.url,"i").replace("email",Se.gfm._extended_email).getRegex(),Se.breaks=Ne({},Se.gfm,{br:Oe(Se.br).replace("{2,}","*").getRegex(),text:Oe(Se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var tt={block:Le,inline:Se},Bt=S.defaults,De=tt.block,Qe=tt.inline;function it(Ke){return Ke.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ae(Ke){var Ie="",Me,me,Ee=Ke.length;for(Me=0;Me<Ee;Me++)me=Ke.charCodeAt(Me),Math.random()>.5&&(me="x"+me.toString(16)),Ie+="&#"+me+";";return Ie}var re=function(){function Ke(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||Bt,this.options.tokenizer=this.options.tokenizer||new be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var me={block:De.normal,inline:Qe.normal};this.options.pedantic?(me.block=De.pedantic,me.inline=Qe.pedantic):this.options.gfm&&(me.block=De.gfm,this.options.breaks?me.inline=Qe.breaks:me.inline=Qe.gfm),this.tokenizer.rules=me}Ke.lex=function(me,Ee){var ge=new Ke(Ee);return ge.lex(me)};var Ie=Ke.prototype;return Ie.lex=function(me){return me=me.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(me,this.tokens,!0),this.inline(this.tokens),this.tokens},Ie.blockTokens=function(me,Ee,ge){Ee===void 0&&(Ee=[]),ge===void 0&&(ge=!0),me=me.replace(/^ +$/gm,"");for(var we,ze,Je,Et;me;){if(we=this.tokenizer.space(me)){me=me.substring(we.raw.length),we.type&&Ee.push(we);continue}if(we=this.tokenizer.code(me,Ee)){me=me.substring(we.raw.length),we.type?Ee.push(we):(Et=Ee[Ee.length-1],Et.raw+=`
|
|
`+we.raw,Et.text+=`
|
|
`+we.text);continue}if(we=this.tokenizer.fences(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.heading(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.nptable(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.hr(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.blockquote(me)){me=me.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],ge),Ee.push(we);continue}if(we=this.tokenizer.list(me)){for(me=me.substring(we.raw.length),Je=we.items.length,ze=0;ze<Je;ze++)we.items[ze].tokens=this.blockTokens(we.items[ze].text,[],!1);Ee.push(we);continue}if(we=this.tokenizer.html(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(ge&&(we=this.tokenizer.def(me))){me=me.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.lheading(me)){me=me.substring(we.raw.length),Ee.push(we);continue}if(ge&&(we=this.tokenizer.paragraph(me))){me=me.substring(we.raw.length),Ee.push(we);continue}if(we=this.tokenizer.text(me,Ee)){me=me.substring(we.raw.length),we.type?Ee.push(we):(Et=Ee[Ee.length-1],Et.raw+=`
|
|
`+we.raw,Et.text+=`
|
|
`+we.text);continue}if(me){var Ft="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Ft);break}else throw new Error(Ft)}}return Ee},Ie.inline=function(me){var Ee,ge,we,ze,Je,Et,Ft=me.length;for(Ee=0;Ee<Ft;Ee++){Et=me[Ee];switch(Et.type){case"paragraph":case"text":case"heading":{Et.tokens=[],this.inlineTokens(Et.text,Et.tokens);break}case"table":{for(Et.tokens={header:[],cells:[]},ze=Et.header.length,ge=0;ge<ze;ge++)Et.tokens.header[ge]=[],this.inlineTokens(Et.header[ge],Et.tokens.header[ge]);for(ze=Et.cells.length,ge=0;ge<ze;ge++)for(Je=Et.cells[ge],Et.tokens.cells[ge]=[],we=0;we<Je.length;we++)Et.tokens.cells[ge][we]=[],this.inlineTokens(Je[we],Et.tokens.cells[ge][we]);break}case"blockquote":{this.inline(Et.tokens);break}case"list":{for(ze=Et.items.length,ge=0;ge<ze;ge++)this.inline(Et.items[ge].tokens);break}}}return me},Ie.inlineTokens=function(me,Ee,ge,we,ze){Ee===void 0&&(Ee=[]),ge===void 0&&(ge=!1),we===void 0&&(we=!1),ze===void 0&&(ze="");var Je,Et=me,Ft;if(this.tokens.links){var Nt=Object.keys(this.tokens.links);if(Nt.length>0)for(;(Ft=this.tokenizer.rules.inline.reflinkSearch.exec(Et))!=null;)Nt.includes(Ft[0].slice(Ft[0].lastIndexOf("[")+1,-1))&&(Et=Et.slice(0,Ft.index)+"["+"a".repeat(Ft[0].length-2)+"]"+Et.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ft=this.tokenizer.rules.inline.blockSkip.exec(Et))!=null;)Et=Et.slice(0,Ft.index)+"["+"a".repeat(Ft[0].length-2)+"]"+Et.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;me;){if(Je=this.tokenizer.escape(me)){me=me.substring(Je.raw.length),Ee.push(Je);continue}if(Je=this.tokenizer.tag(me,ge,we)){me=me.substring(Je.raw.length),ge=Je.inLink,we=Je.inRawBlock,Ee.push(Je);continue}if(Je=this.tokenizer.link(me)){me=me.substring(Je.raw.length),Je.type==="link"&&(Je.tokens=this.inlineTokens(Je.text,[],!0,we)),Ee.push(Je);continue}if(Je=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(Je.raw.length),Je.type==="link"&&(Je.tokens=this.inlineTokens(Je.text,[],!0,we)),Ee.push(Je);continue}if(Je=this.tokenizer.strong(me,Et,ze)){me=me.substring(Je.raw.length),Je.tokens=this.inlineTokens(Je.text,[],ge,we),Ee.push(Je);continue}if(Je=this.tokenizer.em(me,Et,ze)){me=me.substring(Je.raw.length),Je.tokens=this.inlineTokens(Je.text,[],ge,we),Ee.push(Je);continue}if(Je=this.tokenizer.codespan(me)){me=me.substring(Je.raw.length),Ee.push(Je);continue}if(Je=this.tokenizer.br(me)){me=me.substring(Je.raw.length),Ee.push(Je);continue}if(Je=this.tokenizer.del(me)){me=me.substring(Je.raw.length),Je.tokens=this.inlineTokens(Je.text,[],ge,we),Ee.push(Je);continue}if(Je=this.tokenizer.autolink(me,Ae)){me=me.substring(Je.raw.length),Ee.push(Je);continue}if(!ge&&(Je=this.tokenizer.url(me,Ae))){me=me.substring(Je.raw.length),Ee.push(Je);continue}if(Je=this.tokenizer.inlineText(me,we,it)){me=me.substring(Je.raw.length),ze=Je.raw.slice(-1),Ee.push(Je);continue}if(me){var ht="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(ht);break}else throw new Error(ht)}}return Ee},N(Ke,null,[{key:"rules",get:function(){return{block:De,inline:Qe}}}]),Ke}(),ie=S.defaults,ce=Z.cleanUrl,Be=Z.escape,Re=function(){function Ke(Me){this.options=Me||ie}var Ie=Ke.prototype;return Ie.code=function(me,Ee,ge){var we=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var ze=this.options.highlight(me,we);ze!=null&&ze!==me&&(ge=!0,me=ze)}return we?'<pre><code class="'+this.options.langPrefix+Be(we,!0)+'">'+(ge?me:Be(me,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ge?me:Be(me,!0))+`</code></pre>
|
|
`},Ie.blockquote=function(me){return`<blockquote>
|
|
`+me+`</blockquote>
|
|
`},Ie.html=function(me){return me},Ie.heading=function(me,Ee,ge,we){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+we.slug(ge)+'">'+me+"</h"+Ee+`>
|
|
`:"<h"+Ee+">"+me+"</h"+Ee+`>
|
|
`},Ie.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Ie.list=function(me,Ee,ge){var we=Ee?"ol":"ul",ze=Ee&&ge!==1?' start="'+ge+'"':"";return"<"+we+ze+`>
|
|
`+me+"</"+we+`>
|
|
`},Ie.listitem=function(me){return"<li>"+me+`</li>
|
|
`},Ie.checkbox=function(me){return"<input "+(me?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ie.paragraph=function(me){return"<p>"+me+`</p>
|
|
`},Ie.table=function(me,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
<thead>
|
|
`+me+`</thead>
|
|
`+Ee+`</table>
|
|
`},Ie.tablerow=function(me){return`<tr>
|
|
`+me+`</tr>
|
|
`},Ie.tablecell=function(me,Ee){var ge=Ee.header?"th":"td",we=Ee.align?"<"+ge+' align="'+Ee.align+'">':"<"+ge+">";return we+me+"</"+ge+`>
|
|
`},Ie.strong=function(me){return"<strong>"+me+"</strong>"},Ie.em=function(me){return"<em>"+me+"</em>"},Ie.codespan=function(me){return"<code>"+me+"</code>"},Ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ie.del=function(me){return"<del>"+me+"</del>"},Ie.link=function(me,Ee,ge){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return ge;var we='<a href="'+Be(me)+'"';return Ee&&(we+=' title="'+Ee+'"'),we+=">"+ge+"</a>",we},Ie.image=function(me,Ee,ge){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return ge;var we='<img src="'+me+'" alt="'+ge+'"';return Ee&&(we+=' title="'+Ee+'"'),we+=this.options.xhtml?"/>":">",we},Ie.text=function(me){return me},Ke}(),ke=function(){function Ke(){}var Ie=Ke.prototype;return Ie.strong=function(me){return me},Ie.em=function(me){return me},Ie.codespan=function(me){return me},Ie.del=function(me){return me},Ie.html=function(me){return me},Ie.text=function(me){return me},Ie.link=function(me,Ee,ge){return""+ge},Ie.image=function(me,Ee,ge){return""+ge},Ie.br=function(){return""},Ke}(),ft=function(){function Ke(){this.seen={}}var Ie=Ke.prototype;return Ie.slug=function(me){var Ee=me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var ge=Ee;do this.seen[ge]++,Ee=ge+"-"+this.seen[ge];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},Ke}(),pt=S.defaults,bt=Z.unescape,yt=function(){function Ke(Me){this.options=Me||pt,this.options.renderer=this.options.renderer||new Re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new ft}Ke.parse=function(me,Ee){var ge=new Ke(Ee);return ge.parse(me)};var Ie=Ke.prototype;return Ie.parse=function(me,Ee){Ee===void 0&&(Ee=!0);var ge="",we,ze,Je,Et,Ft,Nt,ht,Lt,st,rt,et,Ce,Ue,ct,at,Tt,Ct,qe,St=me.length;for(we=0;we<St;we++){rt=me[we];switch(rt.type){case"space":continue;case"hr":{ge+=this.renderer.hr();continue}case"heading":{ge+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,bt(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ge+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(Lt="",ht="",Et=rt.header.length,ze=0;ze<Et;ze++)ht+=this.renderer.tablecell(this.parseInline(rt.tokens.header[ze]),{header:!0,align:rt.align[ze]});for(Lt+=this.renderer.tablerow(ht),st="",Et=rt.cells.length,ze=0;ze<Et;ze++){for(Nt=rt.tokens.cells[ze],ht="",Ft=Nt.length,Je=0;Je<Ft;Je++)ht+=this.renderer.tablecell(this.parseInline(Nt[Je]),{header:!1,align:rt.align[Je]});st+=this.renderer.tablerow(ht)}ge+=this.renderer.table(Lt,st);continue}case"blockquote":{st=this.parse(rt.tokens),ge+=this.renderer.blockquote(st);continue}case"list":{for(et=rt.ordered,Ce=rt.start,Ue=rt.loose,Et=rt.items.length,st="",ze=0;ze<Et;ze++)at=rt.items[ze],Tt=at.checked,Ct=at.task,ct="",at.task&&(qe=this.renderer.checkbox(Tt),Ue?at.tokens.length>0&&at.tokens[0].type==="text"?(at.tokens[0].text=qe+" "+at.tokens[0].text,at.tokens[0].tokens&&at.tokens[0].tokens.length>0&&at.tokens[0].tokens[0].type==="text"&&(at.tokens[0].tokens[0].text=qe+" "+at.tokens[0].tokens[0].text)):at.tokens.unshift({type:"text",text:qe}):ct+=qe),ct+=this.parse(at.tokens,Ue),st+=this.renderer.listitem(ct,Ct,Tt);ge+=this.renderer.list(st,et,Ce);continue}case"html":{ge+=this.renderer.html(rt.text);continue}case"paragraph":{ge+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(st=rt.tokens?this.parseInline(rt.tokens):rt.text;we+1<St&&me[we+1].type==="text";)rt=me[++we],st+=`
|
|
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);ge+=Ee?this.renderer.paragraph(st):st;continue}default:{var Ht='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(Ht);return}else throw new Error(Ht)}}}return ge},Ie.parseInline=function(me,Ee){Ee=Ee||this.renderer;var ge="",we,ze,Je=me.length;for(we=0;we<Je;we++){ze=me[we];switch(ze.type){case"escape":{ge+=Ee.text(ze.text);break}case"html":{ge+=Ee.html(ze.text);break}case"link":{ge+=Ee.link(ze.href,ze.title,this.parseInline(ze.tokens,Ee));break}case"image":{ge+=Ee.image(ze.href,ze.title,ze.text);break}case"strong":{ge+=Ee.strong(this.parseInline(ze.tokens,Ee));break}case"em":{ge+=Ee.em(this.parseInline(ze.tokens,Ee));break}case"codespan":{ge+=Ee.codespan(ze.text);break}case"br":{ge+=Ee.br();break}case"del":{ge+=Ee.del(this.parseInline(ze.tokens,Ee));break}case"text":{ge+=Ee.text(ze.text);break}default:{var Et='Token with "'+ze.type+'" type was not found.';if(this.options.silent){console.error(Et);return}else throw new Error(Et)}}}return ge},Ke}(),_t=Z.merge,It=Z.checkSanitizeDeprecation,He=Z.escape,Pe=S.getDefaults,At=S.changeDefaults,mt=S.defaults;function Ze(Ke,Ie,Me){if(typeof Ke=="undefined"||Ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ke)+", string expected");if(typeof Ie=="function"&&(Me=Ie,Ie=null),Ie=_t({},Ze.defaults,Ie||{}),It(Ie),Me){var me=Ie.highlight,Ee;try{Ee=re.lex(Ke,Ie)}catch(Je){return Me(Je)}var ge=function(Et){var Ft;if(!Et)try{Ft=yt.parse(Ee,Ie)}catch(Nt){Et=Nt}return Ie.highlight=me,Et?Me(Et):Me(null,Ft)};if(!me||me.length<3)return ge();if(delete Ie.highlight,!Ee.length)return ge();var we=0;Ze.walkTokens(Ee,function(Je){Je.type==="code"&&(we++,setTimeout(function(){me(Je.text,Je.lang,function(Et,Ft){if(Et)return ge(Et);Ft!=null&&Ft!==Je.text&&(Je.text=Ft,Je.escaped=!0),we--,we===0&&ge()})},0))}),we===0&&ge();return}try{var ze=re.lex(Ke,Ie);return Ie.walkTokens&&Ze.walkTokens(ze,Ie.walkTokens),yt.parse(ze,Ie)}catch(Je){if(Je.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+He(Je.message+"",!0)+"</pre>";throw Je}}Ze.options=Ze.setOptions=function(Ke){return _t(Ze.defaults,Ke),At(Ze.defaults),Ze},Ze.getDefaults=Pe,Ze.defaults=mt,Ze.use=function(Ke){var Ie=_t({},Ke);if(Ke.renderer&&function(){var me=Ze.defaults.renderer||new Re,Ee=function(ze){var Je=me[ze];me[ze]=function(){for(var Et=arguments.length,Ft=new Array(Et),Nt=0;Nt<Et;Nt++)Ft[Nt]=arguments[Nt];var ht=Ke.renderer[ze].apply(me,Ft);return ht===!1&&(ht=Je.apply(me,Ft)),ht}};for(var ge in Ke.renderer)Ee(ge);Ie.renderer=me}(),Ke.tokenizer&&function(){var me=Ze.defaults.tokenizer||new be,Ee=function(ze){var Je=me[ze];me[ze]=function(){for(var Et=arguments.length,Ft=new Array(Et),Nt=0;Nt<Et;Nt++)Ft[Nt]=arguments[Nt];var ht=Ke.tokenizer[ze].apply(me,Ft);return ht===!1&&(ht=Je.apply(me,Ft)),ht}};for(var ge in Ke.tokenizer)Ee(ge);Ie.tokenizer=me}(),Ke.walkTokens){var Me=Ze.defaults.walkTokens;Ie.walkTokens=function(me){Ke.walkTokens(me),Me&&Me(me)}}Ze.setOptions(Ie)},Ze.walkTokens=function(Ke,Ie){for(var Me=R(Ke),me;!(me=Me()).done;){var Ee=me.value;Ie(Ee);switch(Ee.type){case"table":{for(var ge=R(Ee.tokens.header),we;!(we=ge()).done;){var ze=we.value;Ze.walkTokens(ze,Ie)}for(var Je=R(Ee.tokens.cells),Et;!(Et=Je()).done;)for(var Ft=Et.value,Nt=R(Ft),ht;!(ht=Nt()).done;){var Lt=ht.value;Ze.walkTokens(Lt,Ie)}break}case"list":{Ze.walkTokens(Ee.items,Ie);break}default:Ee.tokens&&Ze.walkTokens(Ee.tokens,Ie)}}},Ze.Parser=yt,Ze.parser=yt.parse,Ze.Renderer=Re,Ze.TextRenderer=ke,Ze.Lexer=re,Ze.lexer=re.lex,Ze.Tokenizer=be,Ze.Slugger=ft,Ze.parse=Ze;var ut=Ze;return ut})},ELLl:function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){var N={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_=X.Pos;X.defineOption("autoCloseBrackets",!1,function(g,C,c){c&&c!=X.Init&&(g.removeKeyMap(R),g.state.closeBrackets=null),C&&(E(Q(C,"pairs")),g.state.closeBrackets=C,g.addKeyMap(R))});function Q(g,C){return C=="pairs"&&typeof g=="string"?g:typeof g=="object"&&g[C]!=null?g[C]:N[C]}var R={Backspace:p,Enter:v};function E(g){for(var C=0;C<g.length;C++){var c=g.charAt(C),a="'"+c+"'";R[a]||(R[a]=S(c))}}E(N.pairs+"`");function S(g){return function(C){return A(C,g)}}function s(g){var C=g.state.closeBrackets;if(!C||C.override)return C;var c=g.getModeAt(g.getCursor());return c.closeBrackets||C}function p(g){var C=s(g);if(!C||g.getOption("disableInput"))return X.Pass;for(var c=Q(C,"pairs"),a=g.listSelections(),u=0;u<a.length;u++){if(!a[u].empty())return X.Pass;var m=O(g,a[u].head);if(!m||c.indexOf(m)%2!=0)return X.Pass}for(var u=a.length-1;u>=0;u--){var y=a[u].head;g.replaceRange("",_(y.line,y.ch-1),_(y.line,y.ch+1),"+delete")}}function v(g){var C=s(g),c=C&&Q(C,"explode");if(!c||g.getOption("disableInput"))return X.Pass;for(var a=g.listSelections(),u=0;u<a.length;u++){if(!a[u].empty())return X.Pass;var m=O(g,a[u].head);if(!m||c.indexOf(m)%2!=0)return X.Pass}g.operation(function(){var y=g.lineSeparator()||`
|
|
`;g.replaceSelection(y+y,null),g.execCommand("goCharLeft"),a=g.listSelections();for(var T=0;T<a.length;T++){var x=a[T].head.line;g.indentLine(x,null,!0),g.indentLine(x+1,null,!0)}})}function i(g){var C=X.cmpPos(g.anchor,g.head)>0;return{anchor:new _(g.anchor.line,g.anchor.ch+(C?-1:1)),head:new _(g.head.line,g.head.ch+(C?1:-1))}}function A(g,C){var c=s(g);if(!c||g.getOption("disableInput"))return X.Pass;var a=Q(c,"pairs"),u=a.indexOf(C);if(u==-1)return X.Pass;for(var m=Q(c,"closeBefore"),y=Q(c,"triples"),T=a.charAt(u+1)==C,x=g.listSelections(),M=u%2==0,b,o=0;o<x.length;o++){var r=x[o],n=r.head,l,L=g.getRange(n,_(n.line,n.ch+1));if(M&&!r.empty())l="surround";else if((T||!M)&&L==C)T&&w(g,n)?l="both":y.indexOf(C)>=0&&g.getRange(n,_(n.line,n.ch+3))==C+C+C?l="skipThree":l="skip";else if(T&&n.ch>1&&y.indexOf(C)>=0&&g.getRange(_(n.line,n.ch-2),n)==C+C){if(n.ch>2&&/\bstring/.test(g.getTokenTypeAt(_(n.line,n.ch-2))))return X.Pass;l="addFour"}else if(T){var B=n.ch==0?" ":g.getRange(_(n.line,n.ch-1),n);if(!X.isWordChar(L)&&B!=C&&!X.isWordChar(B))l="both";else return X.Pass}else if(M&&(L.length===0||/\s/.test(L)||m.indexOf(L)>-1))l="both";else return X.Pass;if(!b)b=l;else if(b!=l)return X.Pass}var h=u%2?a.charAt(u-1):C,I=u%2?C:a.charAt(u+1);g.operation(function(){if(b=="skip")g.execCommand("goCharRight");else if(b=="skipThree")for(var H=0;H<3;H++)g.execCommand("goCharRight");else if(b=="surround"){for(var z=g.getSelections(),H=0;H<z.length;H++)z[H]=h+z[H]+I;g.replaceSelections(z,"around"),z=g.listSelections().slice();for(var H=0;H<z.length;H++)z[H]=i(z[H]);g.setSelections(z)}else b=="both"?(g.replaceSelection(h+I,null),g.triggerElectric(h+I),g.execCommand("goCharLeft")):b=="addFour"&&(g.replaceSelection(h+h+h+h,"before"),g.execCommand("goCharRight"))})}function O(g,C){var c=g.getRange(_(C.line,C.ch-1),_(C.line,C.ch+1));return c.length==2?c:null}function w(g,C){var c=g.getTokenAt(_(C.line,C.ch+1));return/\bstring/.test(c.type)&&c.start==C.ch&&(C.ch==0||!/\bstring/.test(g.getTokenTypeAt(C)))}})},Fofx:function(Xe,pe){var W=typeof Float32Array=="undefined"?Array:Float32Array;function X(){var v=new W(6);return N(v),v}function N(v){return v[0]=1,v[1]=0,v[2]=0,v[3]=1,v[4]=0,v[5]=0,v}function _(v,i){return v[0]=i[0],v[1]=i[1],v[2]=i[2],v[3]=i[3],v[4]=i[4],v[5]=i[5],v}function Q(v,i,A){var O=i[0]*A[0]+i[2]*A[1],w=i[1]*A[0]+i[3]*A[1],g=i[0]*A[2]+i[2]*A[3],C=i[1]*A[2]+i[3]*A[3],c=i[0]*A[4]+i[2]*A[5]+i[4],a=i[1]*A[4]+i[3]*A[5]+i[5];return v[0]=O,v[1]=w,v[2]=g,v[3]=C,v[4]=c,v[5]=a,v}function R(v,i,A){return v[0]=i[0],v[1]=i[1],v[2]=i[2],v[3]=i[3],v[4]=i[4]+A[0],v[5]=i[5]+A[1],v}function E(v,i,A){var O=i[0],w=i[2],g=i[4],C=i[1],c=i[3],a=i[5],u=Math.sin(A),m=Math.cos(A);return v[0]=O*m+C*u,v[1]=-O*u+C*m,v[2]=w*m+c*u,v[3]=-w*u+m*c,v[4]=m*g+u*a,v[5]=m*a-u*g,v}function S(v,i,A){var O=A[0],w=A[1];return v[0]=i[0]*O,v[1]=i[1]*w,v[2]=i[2]*O,v[3]=i[3]*w,v[4]=i[4]*O,v[5]=i[5]*w,v}function s(v,i){var A=i[0],O=i[2],w=i[4],g=i[1],C=i[3],c=i[5],a=A*C-g*O;return a?(a=1/a,v[0]=C*a,v[1]=-g*a,v[2]=-O*a,v[3]=A*a,v[4]=(O*c-C*w)*a,v[5]=(g*w-A*c)*a,v):null}function p(v){var i=X();return _(i,v),i}pe.create=X,pe.identity=N,pe.copy=_,pe.mul=Q,pe.translate=R,pe.rotate=E,pe.scale=S,pe.invert=s,pe.clone=p},FxDU:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var X=W("QO+J"),N=W("j5sG"),_=typeof ResizeObserver!="undefined"?N.createSensor:X.createSensor;pe.createSensor=_},Gev7:function(Xe,pe,W){var X=W("bYtY"),N=W("K2GJ"),_=W("1bdT"),Q=W("ni6a");function R(S){S=S||{},_.call(this,S);for(var s in S)S.hasOwnProperty(s)&&s!=="style"&&(this[s]=S[s]);this.style=new N(S.style,this),this._rect=null,this.__clipPaths=null}R.prototype={constructor:R,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(S){},afterBrush:function(S){},brush:function(S,s){},getBoundingRect:function(){},contain:function(S,s){return this.rectContain(S,s)},traverse:function(S,s){S.call(s,this)},rectContain:function(S,s){var p=this.transformCoordToLocal(S,s),v=this.getBoundingRect();return v.contain(p[0],p[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(S){return this.animate("style",S)},attrKV:function(S,s){S!=="style"?_.prototype.attrKV.call(this,S,s):this.style.set(s)},setStyle:function(S,s){return this.style.set(S,s),this.dirty(!1),this},useStyle:function(S){return this.style=new N(S,this),this.dirty(!1),this},calculateTextPosition:null},X.inherits(R,_),X.mixin(R,Q);var E=R;Xe.exports=E},Gytx:function(Xe,pe){Xe.exports=function(X,N,_,Q){var R=_?_.call(Q,X,N):void 0;if(R!==void 0)return!!R;if(X===N)return!0;if(typeof X!="object"||!X||typeof N!="object"||!N)return!1;var E=Object.keys(X),S=Object.keys(N);if(E.length!==S.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(N),p=0;p<E.length;p++){var v=E[p];if(!s(v))return!1;var i=X[v],A=N[v];if(R=_?_.call(Q,i,A,v):void 0,R===!1||R===void 0&&i!==A)return!1}return!0}},H38U:function(Xe,pe,W){var X=W("f4xo"),N=W("rcnY"),_=W("wU8J"),Q=W("Iq15"),R=W("dWSS");function E(s,p){this.typeNumber=s,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var S=E.prototype;S.addData=function(s){var p=new X(s);this.dataList.push(p),this.dataCache=null},S.isDark=function(s,p){if(s<0||this.moduleCount<=s||p<0||this.moduleCount<=p)throw new Error(s+","+p);return this.modules[s][p]},S.getModuleCount=function(){return this.moduleCount},S.make=function(){if(this.typeNumber<1){var s=1;for(s=1;s<40;s++){for(var p=N.getRSBlocks(s,this.errorCorrectLevel),v=new _,i=0,A=0;A<p.length;A++)i+=p[A].dataCount;for(var A=0;A<this.dataList.length;A++){var O=this.dataList[A];v.put(O.mode,4),v.put(O.getLength(),Q.getLengthInBits(O.mode,s)),O.write(v)}if(v.getLengthInBits()<=i*8)break}this.typeNumber=s}this.makeImpl(!1,this.getBestMaskPattern())},S.makeImpl=function(s,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++){this.modules[v]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[v][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(s,p),this.typeNumber>=7&&this.setupTypeNumber(s),this.dataCache==null&&(this.dataCache=E.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},S.setupPositionProbePattern=function(s,p){for(var v=-1;v<=7;v++){if(s+v<=-1||this.moduleCount<=s+v)continue;for(var i=-1;i<=7;i++){if(p+i<=-1||this.moduleCount<=p+i)continue;0<=v&&v<=6&&(i==0||i==6)||0<=i&&i<=6&&(v==0||v==6)||2<=v&&v<=4&&2<=i&&i<=4?this.modules[s+v][p+i]=!0:this.modules[s+v][p+i]=!1}}},S.getBestMaskPattern=function(){for(var s=0,p=0,v=0;v<8;v++){this.makeImpl(!0,v);var i=Q.getLostPoint(this);(v==0||s>i)&&(s=i,p=v)}return p},S.createMovieClip=function(s,p,v){var i=s.createEmptyMovieClip(p,v),A=1;this.make();for(var O=0;O<this.modules.length;O++)for(var w=O*A,g=0;g<this.modules[O].length;g++){var C=g*A,c=this.modules[O][g];c&&(i.beginFill(0,100),i.moveTo(C,w),i.lineTo(C+A,w),i.lineTo(C+A,w+A),i.lineTo(C,w+A),i.endFill())}return i},S.setupTimingPattern=function(){for(var s=8;s<this.moduleCount-8;s++){if(this.modules[s][6]!=null)continue;this.modules[s][6]=s%2==0}for(var p=8;p<this.moduleCount-8;p++){if(this.modules[6][p]!=null)continue;this.modules[6][p]=p%2==0}},S.setupPositionAdjustPattern=function(){for(var s=Q.getPatternPosition(this.typeNumber),p=0;p<s.length;p++)for(var v=0;v<s.length;v++){var i=s[p],A=s[v];if(this.modules[i][A]!=null)continue;for(var O=-2;O<=2;O++)for(var w=-2;w<=2;w++)O==-2||O==2||w==-2||w==2||O==0&&w==0?this.modules[i+O][A+w]=!0:this.modules[i+O][A+w]=!1}},S.setupTypeNumber=function(s){for(var p=Q.getBCHTypeNumber(this.typeNumber),v=0;v<18;v++){var i=!s&&(p>>v&1)==1;this.modules[Math.floor(v/3)][v%3+this.moduleCount-8-3]=i}for(var v=0;v<18;v++){var i=!s&&(p>>v&1)==1;this.modules[v%3+this.moduleCount-8-3][Math.floor(v/3)]=i}},S.setupTypeInfo=function(s,p){for(var v=this.errorCorrectLevel<<3|p,i=Q.getBCHTypeInfo(v),A=0;A<15;A++){var O=!s&&(i>>A&1)==1;A<6?this.modules[A][8]=O:A<8?this.modules[A+1][8]=O:this.modules[this.moduleCount-15+A][8]=O}for(var A=0;A<15;A++){var O=!s&&(i>>A&1)==1;A<8?this.modules[8][this.moduleCount-A-1]=O:A<9?this.modules[8][15-A-1+1]=O:this.modules[8][15-A-1]=O}this.modules[this.moduleCount-8][8]=!s},S.mapData=function(s,p){for(var v=-1,i=this.moduleCount-1,A=7,O=0,w=this.moduleCount-1;w>0;w-=2)for(w==6&&w--;;){for(var g=0;g<2;g++)if(this.modules[i][w-g]==null){var C=!1;O<s.length&&(C=(s[O]>>>A&1)==1);var c=Q.getMask(p,i,w-g);c&&(C=!C),this.modules[i][w-g]=C,A--,A==-1&&(O++,A=7)}if(i+=v,i<0||this.moduleCount<=i){i-=v,v=-v;break}}},E.PAD0=236,E.PAD1=17,E.createData=function(s,p,v){for(var i=N.getRSBlocks(s,p),A=new _,O=0;O<v.length;O++){var w=v[O];A.put(w.mode,4),A.put(w.getLength(),Q.getLengthInBits(w.mode,s)),w.write(A)}for(var g=0,O=0;O<i.length;O++)g+=i[O].dataCount;if(A.getLengthInBits()>g*8)throw new Error("code length overflow. ("+A.getLengthInBits()+">"+g*8+")");for(A.getLengthInBits()+4<=g*8&&A.put(0,4);A.getLengthInBits()%8!=0;)A.putBit(!1);for(;!(A.getLengthInBits()>=g*8);){if(A.put(E.PAD0,8),A.getLengthInBits()>=g*8)break;A.put(E.PAD1,8)}return E.createBytes(A,i)},E.createBytes=function(s,p){for(var v=0,i=0,A=0,O=new Array(p.length),w=new Array(p.length),g=0;g<p.length;g++){var C=p[g].dataCount,c=p[g].totalCount-C;i=Math.max(i,C),A=Math.max(A,c),O[g]=new Array(C);for(var a=0;a<O[g].length;a++)O[g][a]=255&s.buffer[a+v];v+=C;var u=Q.getErrorCorrectPolynomial(c),m=new R(O[g],u.getLength()-1),y=m.mod(u);w[g]=new Array(u.getLength()-1);for(var a=0;a<w[g].length;a++){var T=a+y.getLength()-w[g].length;w[g][a]=T>=0?y.get(T):0}}for(var x=0,a=0;a<p.length;a++)x+=p[a].totalCount;for(var M=new Array(x),b=0,a=0;a<i;a++)for(var g=0;g<p.length;g++)a<O[g].length&&(M[b++]=O[g][a]);for(var a=0;a<A;a++)for(var g=0;g<p.length;g++)a<w[g].length&&(M[b++]=w[g][a]);return M},Xe.exports=E},H6uX:function(Xe,pe){var W=Array.prototype.slice,X=function(R){this._$handlers={},this._$eventProcessor=R};X.prototype={constructor:X,one:function(R,E,S,s){return _(this,R,E,S,s,!0)},on:function(R,E,S,s){return _(this,R,E,S,s,!1)},isSilent:function(R){var E=this._$handlers;return!E[R]||!E[R].length},off:function(R,E){var S=this._$handlers;if(!R)return this._$handlers={},this;if(E){if(S[R]){for(var s=[],p=0,v=S[R].length;p<v;p++)S[R][p].h!==E&&s.push(S[R][p]);S[R]=s}S[R]&&S[R].length===0&&delete S[R]}else delete S[R];return this},trigger:function(R){var E=this._$handlers[R],S=this._$eventProcessor;if(E){var s=arguments,p=s.length;p>3&&(s=W.call(s,1));for(var v=E.length,i=0;i<v;){var A=E[i];if(S&&S.filter&&A.query!=null&&!S.filter(R,A.query)){i++;continue}switch(p){case 1:A.h.call(A.ctx);break;case 2:A.h.call(A.ctx,s[1]);break;case 3:A.h.call(A.ctx,s[1],s[2]);break;default:A.h.apply(A.ctx,s);break}A.one?(E.splice(i,1),v--):i++}}return S&&S.afterTrigger&&S.afterTrigger(R),this},triggerWithContext:function(R){var E=this._$handlers[R],S=this._$eventProcessor;if(E){var s=arguments,p=s.length;p>4&&(s=W.call(s,1,s.length-1));for(var v=s[s.length-1],i=E.length,A=0;A<i;){var O=E[A];if(S&&S.filter&&O.query!=null&&!S.filter(R,O.query)){A++;continue}switch(p){case 1:O.h.call(v);break;case 2:O.h.call(v,s[1]);break;case 3:O.h.call(v,s[1],s[2]);break;default:O.h.apply(v,s);break}O.one?(E.splice(A,1),i--):A++}}return S&&S.afterTrigger&&S.afterTrigger(R),this}};function N(R,E){var S=R._$eventProcessor;return E!=null&&S&&S.normalizeQuery&&(E=S.normalizeQuery(E)),E}function _(R,E,S,s,p,v){var i=R._$handlers;if(typeof S=="function"&&(p=s,s=S,S=null),!s||!E)return R;S=N(R,S),i[E]||(i[E]=[]);for(var A=0;A<i[E].length;A++)if(i[E][A].h===s)return R;var O={h:s,one:v,query:S,ctx:p||R,callAtLast:s.zrEventfulCallAtLast},w=i[E].length-1,g=i[E][w];return g&&g.callAtLast?i[E].splice(w,0,O):i[E].push(O),R}var Q=X;Xe.exports=Q},H7XF:function(Xe,pe,W){"use strict";pe.byteLength=s,pe.toByteArray=v,pe.fromByteArray=O;for(var X=[],N=[],_=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0,E=Q.length;R<E;++R)X[R]=Q[R],N[Q.charCodeAt(R)]=R;N["-".charCodeAt(0)]=62,N["_".charCodeAt(0)]=63;function S(w){var g=w.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=w.indexOf("=");C===-1&&(C=g);var c=C===g?0:4-C%4;return[C,c]}function s(w){var g=S(w),C=g[0],c=g[1];return(C+c)*3/4-c}function p(w,g,C){return(g+C)*3/4-C}function v(w){var g,C=S(w),c=C[0],a=C[1],u=new _(p(w,c,a)),m=0,y=a>0?c-4:c,T;for(T=0;T<y;T+=4)g=N[w.charCodeAt(T)]<<18|N[w.charCodeAt(T+1)]<<12|N[w.charCodeAt(T+2)]<<6|N[w.charCodeAt(T+3)],u[m++]=g>>16&255,u[m++]=g>>8&255,u[m++]=g&255;return a===2&&(g=N[w.charCodeAt(T)]<<2|N[w.charCodeAt(T+1)]>>4,u[m++]=g&255),a===1&&(g=N[w.charCodeAt(T)]<<10|N[w.charCodeAt(T+1)]<<4|N[w.charCodeAt(T+2)]>>2,u[m++]=g>>8&255,u[m++]=g&255),u}function i(w){return X[w>>18&63]+X[w>>12&63]+X[w>>6&63]+X[w&63]}function A(w,g,C){for(var c,a=[],u=g;u<C;u+=3)c=(w[u]<<16&16711680)+(w[u+1]<<8&65280)+(w[u+2]&255),a.push(i(c));return a.join("")}function O(w){for(var g,C=w.length,c=C%3,a=[],u=16383,m=0,y=C-c;m<y;m+=u)a.push(A(w,m,m+u>y?y:m+u));return c===1?(g=w[C-1],a.push(X[g>>2]+X[g<<4&63]+"==")):c===2&&(g=(w[C-2]<<8)+w[C-1],a.push(X[g>>10]+X[g>>4&63]+X[g<<2&63]+"=")),a.join("")}},HDXh:function(Xe,pe,W){"use strict";(function(X){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var N=W("H7XF"),_=W("kVK+"),Q=W("49sm");pe.Buffer=s,pe.SlowBuffer=a,pe.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=X.TYPED_ARRAY_SUPPORT!==void 0?X.TYPED_ARRAY_SUPPORT:R(),pe.kMaxLength=E();function R(){try{var Ae=new Uint8Array(1);return Ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ae.foo()===42&&typeof Ae.subarray=="function"&&Ae.subarray(1,1).byteLength===0}catch(re){return!1}}function E(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function S(Ae,re){if(E()<re)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(Ae=new Uint8Array(re),Ae.__proto__=s.prototype):(Ae===null&&(Ae=new s(re)),Ae.length=re),Ae}function s(Ae,re,ie){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(Ae,re,ie);if(typeof Ae=="number"){if(typeof re=="string")throw new Error("If encoding is specified then the first argument must be a string");return A(this,Ae)}return p(this,Ae,re,ie)}s.poolSize=8192,s._augment=function(Ae){return Ae.__proto__=s.prototype,Ae};function p(Ae,re,ie,ce){if(typeof re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&re instanceof ArrayBuffer?g(Ae,re,ie,ce):typeof re=="string"?O(Ae,re,ie):C(Ae,re)}s.from=function(Ae,re,ie){return p(null,Ae,re,ie)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0}));function v(Ae){if(typeof Ae!="number")throw new TypeError('"size" argument must be a number');if(Ae<0)throw new RangeError('"size" argument must not be negative')}function i(Ae,re,ie,ce){return v(re),re<=0?S(Ae,re):ie!==void 0?typeof ce=="string"?S(Ae,re).fill(ie,ce):S(Ae,re).fill(ie):S(Ae,re)}s.alloc=function(Ae,re,ie){return i(null,Ae,re,ie)};function A(Ae,re){if(v(re),Ae=S(Ae,re<0?0:c(re)|0),!s.TYPED_ARRAY_SUPPORT)for(var ie=0;ie<re;++ie)Ae[ie]=0;return Ae}s.allocUnsafe=function(Ae){return A(null,Ae)},s.allocUnsafeSlow=function(Ae){return A(null,Ae)};function O(Ae,re,ie){if((typeof ie!="string"||ie==="")&&(ie="utf8"),!s.isEncoding(ie))throw new TypeError('"encoding" must be a valid string encoding');var ce=u(re,ie)|0;Ae=S(Ae,ce);var Be=Ae.write(re,ie);return Be!==ce&&(Ae=Ae.slice(0,Be)),Ae}function w(Ae,re){var ie=re.length<0?0:c(re.length)|0;Ae=S(Ae,ie);for(var ce=0;ce<ie;ce+=1)Ae[ce]=re[ce]&255;return Ae}function g(Ae,re,ie,ce){if(re.byteLength,ie<0||re.byteLength<ie)throw new RangeError("'offset' is out of bounds");if(re.byteLength<ie+(ce||0))throw new RangeError("'length' is out of bounds");return ie===void 0&&ce===void 0?re=new Uint8Array(re):ce===void 0?re=new Uint8Array(re,ie):re=new Uint8Array(re,ie,ce),s.TYPED_ARRAY_SUPPORT?(Ae=re,Ae.__proto__=s.prototype):Ae=w(Ae,re),Ae}function C(Ae,re){if(s.isBuffer(re)){var ie=c(re.length)|0;return Ae=S(Ae,ie),Ae.length===0||re.copy(Ae,0,0,ie),Ae}if(re){if(typeof ArrayBuffer!="undefined"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||it(re.length)?S(Ae,0):w(Ae,re);if(re.type==="Buffer"&&Q(re.data))return w(Ae,re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function c(Ae){if(Ae>=E())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E().toString(16)+" bytes");return Ae|0}function a(Ae){return+Ae!=Ae&&(Ae=0),s.alloc(+Ae)}s.isBuffer=function(re){return!!(re!=null&&re._isBuffer)},s.compare=function(re,ie){if(!s.isBuffer(re)||!s.isBuffer(ie))throw new TypeError("Arguments must be Buffers");if(re===ie)return 0;for(var ce=re.length,Be=ie.length,Re=0,ke=Math.min(ce,Be);Re<ke;++Re)if(re[Re]!==ie[Re]){ce=re[Re],Be=ie[Re];break}return ce<Be?-1:Be<ce?1:0},s.isEncoding=function(re){switch(String(re).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}},s.concat=function(re,ie){if(!Q(re))throw new TypeError('"list" argument must be an Array of Buffers');if(re.length===0)return s.alloc(0);var ce;if(ie===void 0)for(ie=0,ce=0;ce<re.length;++ce)ie+=re[ce].length;var Be=s.allocUnsafe(ie),Re=0;for(ce=0;ce<re.length;++ce){var ke=re[ce];if(!s.isBuffer(ke))throw new TypeError('"list" argument must be an Array of Buffers');ke.copy(Be,Re),Re+=ke.length}return Be};function u(Ae,re){if(s.isBuffer(Ae))return Ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ae)||Ae instanceof ArrayBuffer))return Ae.byteLength;typeof Ae!="string"&&(Ae=""+Ae);var ie=Ae.length;if(ie===0)return 0;for(var ce=!1;;)switch(re){case"ascii":case"latin1":case"binary":return ie;case"utf8":case"utf-8":case void 0:return Se(Ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie*2;case"hex":return ie>>>1;case"base64":return De(Ae).length;default:if(ce)return Se(Ae).length;re=(""+re).toLowerCase(),ce=!0}}s.byteLength=u;function m(Ae,re,ie){var ce=!1;if((re===void 0||re<0)&&(re=0),re>this.length)return"";if((ie===void 0||ie>this.length)&&(ie=this.length),ie<=0)return"";if(ie>>>=0,re>>>=0,ie<=re)return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return Z(this,re,ie);case"utf8":case"utf-8":return B(this,re,ie);case"ascii":return H(this,re,ie);case"latin1":case"binary":return z(this,re,ie);case"base64":return L(this,re,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,re,ie);default:if(ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),ce=!0}}s.prototype._isBuffer=!0;function y(Ae,re,ie){var ce=Ae[re];Ae[re]=Ae[ie],Ae[ie]=ce}s.prototype.swap16=function(){var re=this.length;if(re%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ie=0;ie<re;ie+=2)y(this,ie,ie+1);return this},s.prototype.swap32=function(){var re=this.length;if(re%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ie=0;ie<re;ie+=4)y(this,ie,ie+3),y(this,ie+1,ie+2);return this},s.prototype.swap64=function(){var re=this.length;if(re%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ie=0;ie<re;ie+=8)y(this,ie,ie+7),y(this,ie+1,ie+6),y(this,ie+2,ie+5),y(this,ie+3,ie+4);return this},s.prototype.toString=function(){var re=this.length|0;return re===0?"":arguments.length===0?B(this,0,re):m.apply(this,arguments)},s.prototype.equals=function(re){if(!s.isBuffer(re))throw new TypeError("Argument must be a Buffer");return this===re?!0:s.compare(this,re)===0},s.prototype.inspect=function(){var re="",ie=pe.INSPECT_MAX_BYTES;return this.length>0&&(re=this.toString("hex",0,ie).match(/.{2}/g).join(" "),this.length>ie&&(re+=" ... ")),"<Buffer "+re+">"},s.prototype.compare=function(re,ie,ce,Be,Re){if(!s.isBuffer(re))throw new TypeError("Argument must be a Buffer");if(ie===void 0&&(ie=0),ce===void 0&&(ce=re?re.length:0),Be===void 0&&(Be=0),Re===void 0&&(Re=this.length),ie<0||ce>re.length||Be<0||Re>this.length)throw new RangeError("out of range index");if(Be>=Re&&ie>=ce)return 0;if(Be>=Re)return-1;if(ie>=ce)return 1;if(ie>>>=0,ce>>>=0,Be>>>=0,Re>>>=0,this===re)return 0;for(var ke=Re-Be,ft=ce-ie,pt=Math.min(ke,ft),bt=this.slice(Be,Re),yt=re.slice(ie,ce),_t=0;_t<pt;++_t)if(bt[_t]!==yt[_t]){ke=bt[_t],ft=yt[_t];break}return ke<ft?-1:ft<ke?1:0};function T(Ae,re,ie,ce,Be){if(Ae.length===0)return-1;if(typeof ie=="string"?(ce=ie,ie=0):ie>2147483647?ie=2147483647:ie<-2147483648&&(ie=-2147483648),ie=+ie,isNaN(ie)&&(ie=Be?0:Ae.length-1),ie<0&&(ie=Ae.length+ie),ie>=Ae.length){if(Be)return-1;ie=Ae.length-1}else if(ie<0)if(Be)ie=0;else return-1;if(typeof re=="string"&&(re=s.from(re,ce)),s.isBuffer(re))return re.length===0?-1:x(Ae,re,ie,ce,Be);if(typeof re=="number")return re=re&255,s.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(Ae,re,ie):Uint8Array.prototype.lastIndexOf.call(Ae,re,ie):x(Ae,[re],ie,ce,Be);throw new TypeError("val must be string, number or Buffer")}function x(Ae,re,ie,ce,Be){var Re=1,ke=Ae.length,ft=re.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(Ae.length<2||re.length<2)return-1;Re=2,ke/=2,ft/=2,ie/=2}function pt(He,Pe){return Re===1?He[Pe]:He.readUInt16BE(Pe*Re)}var bt;if(Be){var yt=-1;for(bt=ie;bt<ke;bt++)if(pt(Ae,bt)===pt(re,yt===-1?0:bt-yt)){if(yt===-1&&(yt=bt),bt-yt+1===ft)return yt*Re}else yt!==-1&&(bt-=bt-yt),yt=-1}else for(ie+ft>ke&&(ie=ke-ft),bt=ie;bt>=0;bt--){for(var _t=!0,It=0;It<ft;It++)if(pt(Ae,bt+It)!==pt(re,It)){_t=!1;break}if(_t)return bt}return-1}s.prototype.includes=function(re,ie,ce){return this.indexOf(re,ie,ce)!==-1},s.prototype.indexOf=function(re,ie,ce){return T(this,re,ie,ce,!0)},s.prototype.lastIndexOf=function(re,ie,ce){return T(this,re,ie,ce,!1)};function M(Ae,re,ie,ce){ie=Number(ie)||0;var Be=Ae.length-ie;ce?(ce=Number(ce),ce>Be&&(ce=Be)):ce=Be;var Re=re.length;if(Re%2!==0)throw new TypeError("Invalid hex string");ce>Re/2&&(ce=Re/2);for(var ke=0;ke<ce;++ke){var ft=parseInt(re.substr(ke*2,2),16);if(isNaN(ft))return ke;Ae[ie+ke]=ft}return ke}function b(Ae,re,ie,ce){return Qe(Se(re,Ae.length-ie),Ae,ie,ce)}function o(Ae,re,ie,ce){return Qe(tt(re),Ae,ie,ce)}function r(Ae,re,ie,ce){return o(Ae,re,ie,ce)}function n(Ae,re,ie,ce){return Qe(De(re),Ae,ie,ce)}function l(Ae,re,ie,ce){return Qe(Bt(re,Ae.length-ie),Ae,ie,ce)}s.prototype.write=function(re,ie,ce,Be){if(ie===void 0)Be="utf8",ce=this.length,ie=0;else if(ce===void 0&&typeof ie=="string")Be=ie,ce=this.length,ie=0;else if(isFinite(ie))ie=ie|0,isFinite(ce)?(ce=ce|0,Be===void 0&&(Be="utf8")):(Be=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Re=this.length-ie;if((ce===void 0||ce>Re)&&(ce=Re),re.length>0&&(ce<0||ie<0)||ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");for(var ke=!1;;)switch(Be){case"hex":return M(this,re,ie,ce);case"utf8":case"utf-8":return b(this,re,ie,ce);case"ascii":return o(this,re,ie,ce);case"latin1":case"binary":return r(this,re,ie,ce);case"base64":return n(this,re,ie,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,re,ie,ce);default:if(ke)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),ke=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(Ae,re,ie){return re===0&&ie===Ae.length?N.fromByteArray(Ae):N.fromByteArray(Ae.slice(re,ie))}function B(Ae,re,ie){ie=Math.min(Ae.length,ie);for(var ce=[],Be=re;Be<ie;){var Re=Ae[Be],ke=null,ft=Re>239?4:Re>223?3:Re>191?2:1;if(Be+ft<=ie){var pt,bt,yt,_t;switch(ft){case 1:Re<128&&(ke=Re);break;case 2:pt=Ae[Be+1],(pt&192)===128&&(_t=(Re&31)<<6|pt&63,_t>127&&(ke=_t));break;case 3:pt=Ae[Be+1],bt=Ae[Be+2],(pt&192)===128&&(bt&192)===128&&(_t=(Re&15)<<12|(pt&63)<<6|bt&63,_t>2047&&(_t<55296||_t>57343)&&(ke=_t));break;case 4:pt=Ae[Be+1],bt=Ae[Be+2],yt=Ae[Be+3],(pt&192)===128&&(bt&192)===128&&(yt&192)===128&&(_t=(Re&15)<<18|(pt&63)<<12|(bt&63)<<6|yt&63,_t>65535&&_t<1114112&&(ke=_t))}}ke===null?(ke=65533,ft=1):ke>65535&&(ke-=65536,ce.push(ke>>>10&1023|55296),ke=56320|ke&1023),ce.push(ke),Be+=ft}return I(ce)}var h=4096;function I(Ae){var re=Ae.length;if(re<=h)return String.fromCharCode.apply(String,Ae);for(var ie="",ce=0;ce<re;)ie+=String.fromCharCode.apply(String,Ae.slice(ce,ce+=h));return ie}function H(Ae,re,ie){var ce="";ie=Math.min(Ae.length,ie);for(var Be=re;Be<ie;++Be)ce+=String.fromCharCode(Ae[Be]&127);return ce}function z(Ae,re,ie){var ce="";ie=Math.min(Ae.length,ie);for(var Be=re;Be<ie;++Be)ce+=String.fromCharCode(Ae[Be]);return ce}function Z(Ae,re,ie){var ce=Ae.length;(!re||re<0)&&(re=0),(!ie||ie<0||ie>ce)&&(ie=ce);for(var Be="",Re=re;Re<ie;++Re)Be+=Le(Ae[Re]);return Be}function Y(Ae,re,ie){for(var ce=Ae.slice(re,ie),Be="",Re=0;Re<ce.length;Re+=2)Be+=String.fromCharCode(ce[Re]+ce[Re+1]*256);return Be}s.prototype.slice=function(re,ie){var ce=this.length;re=~~re,ie=ie===void 0?ce:~~ie,re<0?(re+=ce,re<0&&(re=0)):re>ce&&(re=ce),ie<0?(ie+=ce,ie<0&&(ie=0)):ie>ce&&(ie=ce),ie<re&&(ie=re);var Be;if(s.TYPED_ARRAY_SUPPORT)Be=this.subarray(re,ie),Be.__proto__=s.prototype;else{var Re=ie-re;Be=new s(Re,void 0);for(var ke=0;ke<Re;++ke)Be[ke]=this[ke+re]}return Be};function G(Ae,re,ie){if(Ae%1!==0||Ae<0)throw new RangeError("offset is not uint");if(Ae+re>ie)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUIntLE=function(re,ie,ce){re=re|0,ie=ie|0,ce||G(re,ie,this.length);for(var Be=this[re],Re=1,ke=0;++ke<ie&&(Re*=256);)Be+=this[re+ke]*Re;return Be},s.prototype.readUIntBE=function(re,ie,ce){re=re|0,ie=ie|0,ce||G(re,ie,this.length);for(var Be=this[re+--ie],Re=1;ie>0&&(Re*=256);)Be+=this[re+--ie]*Re;return Be},s.prototype.readUInt8=function(re,ie){return ie||G(re,1,this.length),this[re]},s.prototype.readUInt16LE=function(re,ie){return ie||G(re,2,this.length),this[re]|this[re+1]<<8},s.prototype.readUInt16BE=function(re,ie){return ie||G(re,2,this.length),this[re]<<8|this[re+1]},s.prototype.readUInt32LE=function(re,ie){return ie||G(re,4,this.length),(this[re]|this[re+1]<<8|this[re+2]<<16)+this[re+3]*16777216},s.prototype.readUInt32BE=function(re,ie){return ie||G(re,4,this.length),this[re]*16777216+(this[re+1]<<16|this[re+2]<<8|this[re+3])},s.prototype.readIntLE=function(re,ie,ce){re=re|0,ie=ie|0,ce||G(re,ie,this.length);for(var Be=this[re],Re=1,ke=0;++ke<ie&&(Re*=256);)Be+=this[re+ke]*Re;return Re*=128,Be>=Re&&(Be-=Math.pow(2,8*ie)),Be},s.prototype.readIntBE=function(re,ie,ce){re=re|0,ie=ie|0,ce||G(re,ie,this.length);for(var Be=ie,Re=1,ke=this[re+--Be];Be>0&&(Re*=256);)ke+=this[re+--Be]*Re;return Re*=128,ke>=Re&&(ke-=Math.pow(2,8*ie)),ke},s.prototype.readInt8=function(re,ie){return ie||G(re,1,this.length),this[re]&128?(255-this[re]+1)*-1:this[re]},s.prototype.readInt16LE=function(re,ie){ie||G(re,2,this.length);var ce=this[re]|this[re+1]<<8;return ce&32768?ce|4294901760:ce},s.prototype.readInt16BE=function(re,ie){ie||G(re,2,this.length);var ce=this[re+1]|this[re]<<8;return ce&32768?ce|4294901760:ce},s.prototype.readInt32LE=function(re,ie){return ie||G(re,4,this.length),this[re]|this[re+1]<<8|this[re+2]<<16|this[re+3]<<24},s.prototype.readInt32BE=function(re,ie){return ie||G(re,4,this.length),this[re]<<24|this[re+1]<<16|this[re+2]<<8|this[re+3]},s.prototype.readFloatLE=function(re,ie){return ie||G(re,4,this.length),_.read(this,re,!0,23,4)},s.prototype.readFloatBE=function(re,ie){return ie||G(re,4,this.length),_.read(this,re,!1,23,4)},s.prototype.readDoubleLE=function(re,ie){return ie||G(re,8,this.length),_.read(this,re,!0,52,8)},s.prototype.readDoubleBE=function(re,ie){return ie||G(re,8,this.length),_.read(this,re,!1,52,8)};function ee(Ae,re,ie,ce,Be,Re){if(!s.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(re>Be||re<Re)throw new RangeError('"value" argument is out of bounds');if(ie+ce>Ae.length)throw new RangeError("Index out of range")}s.prototype.writeUIntLE=function(re,ie,ce,Be){if(re=+re,ie=ie|0,ce=ce|0,!Be){var Re=Math.pow(2,8*ce)-1;ee(this,re,ie,ce,Re,0)}var ke=1,ft=0;for(this[ie]=re&255;++ft<ce&&(ke*=256);)this[ie+ft]=re/ke&255;return ie+ce},s.prototype.writeUIntBE=function(re,ie,ce,Be){if(re=+re,ie=ie|0,ce=ce|0,!Be){var Re=Math.pow(2,8*ce)-1;ee(this,re,ie,ce,Re,0)}var ke=ce-1,ft=1;for(this[ie+ke]=re&255;--ke>=0&&(ft*=256);)this[ie+ke]=re/ft&255;return ie+ce},s.prototype.writeUInt8=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,1,255,0),s.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),this[ie]=re&255,ie+1};function J(Ae,re,ie,ce){re<0&&(re=65535+re+1);for(var Be=0,Re=Math.min(Ae.length-ie,2);Be<Re;++Be)Ae[ie+Be]=(re&255<<8*(ce?Be:1-Be))>>>(ce?Be:1-Be)*8}s.prototype.writeUInt16LE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8):J(this,re,ie,!0),ie+2},s.prototype.writeUInt16BE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>8,this[ie+1]=re&255):J(this,re,ie,!1),ie+2};function oe(Ae,re,ie,ce){re<0&&(re=4294967295+re+1);for(var Be=0,Re=Math.min(Ae.length-ie,4);Be<Re;++Be)Ae[ie+Be]=re>>>(ce?Be:3-Be)*8&255}s.prototype.writeUInt32LE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[ie+3]=re>>>24,this[ie+2]=re>>>16,this[ie+1]=re>>>8,this[ie]=re&255):oe(this,re,ie,!0),ie+4},s.prototype.writeUInt32BE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>24,this[ie+1]=re>>>16,this[ie+2]=re>>>8,this[ie+3]=re&255):oe(this,re,ie,!1),ie+4},s.prototype.writeIntLE=function(re,ie,ce,Be){if(re=+re,ie=ie|0,!Be){var Re=Math.pow(2,8*ce-1);ee(this,re,ie,ce,Re-1,-Re)}var ke=0,ft=1,pt=0;for(this[ie]=re&255;++ke<ce&&(ft*=256);)re<0&&pt===0&&this[ie+ke-1]!==0&&(pt=1),this[ie+ke]=(re/ft>>0)-pt&255;return ie+ce},s.prototype.writeIntBE=function(re,ie,ce,Be){if(re=+re,ie=ie|0,!Be){var Re=Math.pow(2,8*ce-1);ee(this,re,ie,ce,Re-1,-Re)}var ke=ce-1,ft=1,pt=0;for(this[ie+ke]=re&255;--ke>=0&&(ft*=256);)re<0&&pt===0&&this[ie+ke+1]!==0&&(pt=1),this[ie+ke]=(re/ft>>0)-pt&255;return ie+ce},s.prototype.writeInt8=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,1,127,-128),s.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),re<0&&(re=255+re+1),this[ie]=re&255,ie+1},s.prototype.writeInt16LE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8):J(this,re,ie,!0),ie+2},s.prototype.writeInt16BE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>8,this[ie+1]=re&255):J(this,re,ie,!1),ie+2},s.prototype.writeInt32LE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8,this[ie+2]=re>>>16,this[ie+3]=re>>>24):oe(this,re,ie,!0),ie+4},s.prototype.writeInt32BE=function(re,ie,ce){return re=+re,ie=ie|0,ce||ee(this,re,ie,4,2147483647,-2147483648),re<0&&(re=4294967295+re+1),s.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>24,this[ie+1]=re>>>16,this[ie+2]=re>>>8,this[ie+3]=re&255):oe(this,re,ie,!1),ie+4};function se(Ae,re,ie,ce,Be,Re){if(ie+ce>Ae.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("Index out of range")}function Te(Ae,re,ie,ce,Be){return Be||se(Ae,re,ie,4,34028234663852886e22,-34028234663852886e22),_.write(Ae,re,ie,ce,23,4),ie+4}s.prototype.writeFloatLE=function(re,ie,ce){return Te(this,re,ie,!0,ce)},s.prototype.writeFloatBE=function(re,ie,ce){return Te(this,re,ie,!1,ce)};function be(Ae,re,ie,ce,Be){return Be||se(Ae,re,ie,8,17976931348623157e292,-17976931348623157e292),_.write(Ae,re,ie,ce,52,8),ie+8}s.prototype.writeDoubleLE=function(re,ie,ce){return be(this,re,ie,!0,ce)},s.prototype.writeDoubleBE=function(re,ie,ce){return be(this,re,ie,!1,ce)},s.prototype.copy=function(re,ie,ce,Be){if(ce||(ce=0),!Be&&Be!==0&&(Be=this.length),ie>=re.length&&(ie=re.length),ie||(ie=0),Be>0&&Be<ce&&(Be=ce),Be===ce)return 0;if(re.length===0||this.length===0)return 0;if(ie<0)throw new RangeError("targetStart out of bounds");if(ce<0||ce>=this.length)throw new RangeError("sourceStart out of bounds");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),re.length-ie<Be-ce&&(Be=re.length-ie+ce);var Re=Be-ce,ke;if(this===re&&ce<ie&&ie<Be)for(ke=Re-1;ke>=0;--ke)re[ke+ie]=this[ke+ce];else if(Re<1e3||!s.TYPED_ARRAY_SUPPORT)for(ke=0;ke<Re;++ke)re[ke+ie]=this[ke+ce];else Uint8Array.prototype.set.call(re,this.subarray(ce,ce+Re),ie);return Re},s.prototype.fill=function(re,ie,ce,Be){if(typeof re=="string"){if(typeof ie=="string"?(Be=ie,ie=0,ce=this.length):typeof ce=="string"&&(Be=ce,ce=this.length),re.length===1){var Re=re.charCodeAt(0);Re<256&&(re=Re)}if(Be!==void 0&&typeof Be!="string")throw new TypeError("encoding must be a string");if(typeof Be=="string"&&!s.isEncoding(Be))throw new TypeError("Unknown encoding: "+Be)}else typeof re=="number"&&(re=re&255);if(ie<0||this.length<ie||this.length<ce)throw new RangeError("Out of range index");if(ce<=ie)return this;ie=ie>>>0,ce=ce===void 0?this.length:ce>>>0,re||(re=0);var ke;if(typeof re=="number")for(ke=ie;ke<ce;++ke)this[ke]=re;else{var ft=s.isBuffer(re)?re:Se(new s(re,Be).toString()),pt=ft.length;for(ke=0;ke<ce-ie;++ke)this[ke+ie]=ft[ke%pt]}return this};var xe=/[^+\/0-9A-Za-z-_]/g;function Oe(Ae){if(Ae=Ne(Ae).replace(xe,""),Ae.length<2)return"";for(;Ae.length%4!==0;)Ae=Ae+"=";return Ae}function Ne(Ae){return Ae.trim?Ae.trim():Ae.replace(/^\s+|\s+$/g,"")}function Le(Ae){return Ae<16?"0"+Ae.toString(16):Ae.toString(16)}function Se(Ae,re){re=re||Infinity;for(var ie,ce=Ae.length,Be=null,Re=[],ke=0;ke<ce;++ke){if(ie=Ae.charCodeAt(ke),ie>55295&&ie<57344){if(!Be){if(ie>56319){(re-=3)>-1&&Re.push(239,191,189);continue}else if(ke+1===ce){(re-=3)>-1&&Re.push(239,191,189);continue}Be=ie;continue}if(ie<56320){(re-=3)>-1&&Re.push(239,191,189),Be=ie;continue}ie=(Be-55296<<10|ie-56320)+65536}else Be&&((re-=3)>-1&&Re.push(239,191,189));if(Be=null,ie<128){if((re-=1)<0)break;Re.push(ie)}else if(ie<2048){if((re-=2)<0)break;Re.push(ie>>6|192,ie&63|128)}else if(ie<65536){if((re-=3)<0)break;Re.push(ie>>12|224,ie>>6&63|128,ie&63|128)}else if(ie<1114112){if((re-=4)<0)break;Re.push(ie>>18|240,ie>>12&63|128,ie>>6&63|128,ie&63|128)}else throw new Error("Invalid code point")}return Re}function tt(Ae){for(var re=[],ie=0;ie<Ae.length;++ie)re.push(Ae.charCodeAt(ie)&255);return re}function Bt(Ae,re){for(var ie,ce,Be,Re=[],ke=0;ke<Ae.length&&!((re-=2)<0);++ke)ie=Ae.charCodeAt(ke),ce=ie>>8,Be=ie%256,Re.push(Be),Re.push(ce);return Re}function De(Ae){return N.toByteArray(Oe(Ae))}function Qe(Ae,re,ie,ce){for(var Be=0;Be<ce&&!(Be+ie>=re.length||Be>=Ae.length);++Be)re[Be+ie]=Ae[Be];return Be}function it(Ae){return Ae!==Ae}}).call(this,W("IyRk"))},HmJG:function(Xe,pe,W){},I8Z2:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return Q}),W.d(pe,"b",function(){return O}),W.d(pe,"c",function(){return g});var X=W("q1tI"),N=function(){var C=function(c,a){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var y in m)m.hasOwnProperty(y)&&(u[y]=m[y])},C(c,a)};return function(c,a){C(c,a);function u(){this.constructor=c}c.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}}(),_=X.createContext(null),Q=function(C){N(c,C);function c(){return C!==null&&C.apply(this,arguments)||this}return c.prototype.render=function(){return X.createElement(_.Provider,{value:this.props.store},this.props.children)},c}(X.Component),R=W("Gytx"),E=W.n(R),S=W("2mql"),s=W.n(S),p=function(){var C=function(c,a){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var y in m)m.hasOwnProperty(y)&&(u[y]=m[y])},C(c,a)};return function(c,a){C(c,a);function u(){this.constructor=c}c.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}}(),v=function(){return v=Object.assign||function(C){for(var c,a=1,u=arguments.length;a<u;a++){c=arguments[a];for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(C[m]=c[m])}return C},v.apply(this,arguments)};function i(C){return C.displayName||C.name||"Component"}var A=function(){return{}};function O(C,c){c===void 0&&(c={});var a=!!C,u=C||A;return function(y){var T=function(M){p(b,M);function b(o,r){var n=M.call(this,o,r)||this;return n.unsubscribe=null,n.handleChange=function(){if(!n.unsubscribe)return;var l=u(n.store.getState(),n.props);n.setState({subscribed:l})},n.store=n.context,n.state={subscribed:u(n.store.getState(),o),store:n.store,props:o},n}return b.getDerivedStateFromProps=function(o,r){return C&&C.length===2&&o!==r.props?{subscribed:u(r.store.getState(),o),props:o}:{props:o}},b.prototype.componentDidMount=function(){this.trySubscribe()},b.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},b.prototype.shouldComponentUpdate=function(o,r){return!E()(this.props,o)||!E()(this.state.subscribed,r.subscribed)},b.prototype.trySubscribe=function(){a&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},b.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},b.prototype.render=function(){var o=v(v(v({},this.props),this.state.subscribed),{store:this.store});return X.createElement(y,v({},o,{ref:this.props.miniStoreForwardedRef}))},b.displayName="Connect("+i(y)+")",b.contextType=_,b}(X.Component);if(c.forwardRef){var x=X.forwardRef(function(M,b){return X.createElement(T,v({},M,{miniStoreForwardedRef:b}))});return s()(x,y)}return s()(T,y)}}var w=function(){return w=Object.assign||function(C){for(var c,a=1,u=arguments.length;a<u;a++){c=arguments[a];for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(C[m]=c[m])}return C},w.apply(this,arguments)};function g(C){var c=C,a=[];function u(T){c=w(w({},c),T);for(var x=0;x<a.length;x++)a[x]()}function m(){return c}function y(T){return a.push(T),function(){var M=a.indexOf(T);a.splice(M,1)}}return{setState:u,getState:m,subscribe:y}}},IBYe:function(Xe,pe,W){"use strict";function X(N){return null}pe.a=X},IMiH:function(Xe,pe,W){var X=W("Sj9i"),N=W("QBsz"),_=W("4mN7"),Q=W("mFDi"),R=W("LPTA"),E=R.devicePixelRatio,S={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},s=[],p=[],v=[],i=[],A=Math.min,O=Math.max,w=Math.cos,g=Math.sin,C=Math.sqrt,c=Math.abs,a=typeof Float32Array!="undefined",u=function(y){this._saveData=!(y||!1),this._saveData&&(this.data=[]),this._ctx=null};u.prototype={constructor:u,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(y,T,x){x=x||0,this._ux=c(x/E/y)||0,this._uy=c(x/E/T)||0},getContext:function(){return this._ctx},beginPath:function(y){return this._ctx=y,y&&y.beginPath(),y&&(this.dpr=y.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(y,T){return this.addData(S.M,y,T),this._ctx&&this._ctx.moveTo(y,T),this._x0=y,this._y0=T,this._xi=y,this._yi=T,this},lineTo:function(y,T){var x=c(y-this._xi)>this._ux||c(T-this._yi)>this._uy||this._len<5;return this.addData(S.L,y,T),this._ctx&&x&&(this._needsDash()?this._dashedLineTo(y,T):this._ctx.lineTo(y,T)),x&&(this._xi=y,this._yi=T),this},bezierCurveTo:function(y,T,x,M,b,o){return this.addData(S.C,y,T,x,M,b,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(y,T,x,M,b,o):this._ctx.bezierCurveTo(y,T,x,M,b,o)),this._xi=b,this._yi=o,this},quadraticCurveTo:function(y,T,x,M){return this.addData(S.Q,y,T,x,M),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(y,T,x,M):this._ctx.quadraticCurveTo(y,T,x,M)),this._xi=x,this._yi=M,this},arc:function(y,T,x,M,b,o){return this.addData(S.A,y,T,x,x,M,b-M,0,o?0:1),this._ctx&&this._ctx.arc(y,T,x,M,b,o),this._xi=w(b)*x+y,this._yi=g(b)*x+T,this},arcTo:function(y,T,x,M,b){return this._ctx&&this._ctx.arcTo(y,T,x,M,b),this},rect:function(y,T,x,M){return this._ctx&&this._ctx.rect(y,T,x,M),this.addData(S.R,y,T,x,M),this},closePath:function(){this.addData(S.Z);var y=this._ctx,T=this._x0,x=this._y0;return y&&(this._needsDash()&&this._dashedLineTo(T,x),y.closePath()),this._xi=T,this._yi=x,this},fill:function(y){y&&y.fill(),this.toStatic()},stroke:function(y){y&&y.stroke(),this.toStatic()},setLineDash:function(y){if(y instanceof Array){this._lineDash=y,this._dashIdx=0;for(var T=0,x=0;x<y.length;x++)T+=y[x];this._dashSum=T}return this},setLineDashOffset:function(y){return this._dashOffset=y,this},len:function(){return this._len},setData:function(y){var T=y.length;!(this.data&&this.data.length===T)&&a&&(this.data=new Float32Array(T));for(var x=0;x<T;x++)this.data[x]=y[x];this._len=T},appendPath:function(y){y instanceof Array||(y=[y]);for(var T=y.length,x=0,M=this._len,b=0;b<T;b++)x+=y[b].len();a&&this.data instanceof Float32Array&&(this.data=new Float32Array(M+x));for(var b=0;b<T;b++)for(var o=y[b].data,r=0;r<o.length;r++)this.data[M++]=o[r];this._len=M},addData:function(y){if(!this._saveData)return;var T=this.data;this._len+arguments.length>T.length&&(this._expandData(),T=this.data);for(var x=0;x<arguments.length;x++)T[this._len++]=arguments[x];this._prevCmd=y},_expandData:function(){if(!(this.data instanceof Array)){for(var y=[],T=0;T<this._len;T++)y[T]=this.data[T];this.data=y}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(y,T){var x=this._dashSum,M=this._dashOffset,b=this._lineDash,o=this._ctx,r=this._xi,n=this._yi,l=y-r,L=T-n,B=C(l*l+L*L),h=r,I=n,H,z=b.length,Z;for(l/=B,L/=B,M<0&&(M=x+M),M%=x,h-=M*l,I-=M*L;l>0&&h<=y||l<0&&h>=y||l===0&&(L>0&&I<=T||L<0&&I>=T);){if(Z=this._dashIdx,H=b[Z],h+=l*H,I+=L*H,this._dashIdx=(Z+1)%z,l>0&&h<r||l<0&&h>r||L>0&&I<n||L<0&&I>n)continue;o[Z%2?"moveTo":"lineTo"](l>=0?A(h,y):O(h,y),L>=0?A(I,T):O(I,T))}l=h-y,L=I-T,this._dashOffset=-C(l*l+L*L)},_dashedBezierTo:function(y,T,x,M,b,o){var r=this._dashSum,n=this._dashOffset,l=this._lineDash,L=this._ctx,B=this._xi,h=this._yi,I,H,z,Z=X.cubicAt,Y=0,G=this._dashIdx,ee=l.length,J,oe,se=0;for(n<0&&(n=r+n),n%=r,I=0;I<1;I+=.1)H=Z(B,y,x,b,I+.1)-Z(B,y,x,b,I),z=Z(h,T,M,o,I+.1)-Z(h,T,M,o,I),Y+=C(H*H+z*z);for(;G<ee&&!(se+=l[G],se>n);G++);for(I=(se-n)/Y;I<=1;)J=Z(B,y,x,b,I),oe=Z(h,T,M,o,I),G%2?L.moveTo(J,oe):L.lineTo(J,oe),I+=l[G]/Y,G=(G+1)%ee;G%2!==0&&L.lineTo(b,o),H=b-J,z=o-oe,this._dashOffset=-C(H*H+z*z)},_dashedQuadraticTo:function(y,T,x,M){var b=x,o=M;x=(x+2*y)/3,M=(M+2*T)/3,y=(this._xi+2*y)/3,T=(this._yi+2*T)/3,this._dashedBezierTo(y,T,x,M,b,o)},toStatic:function(){var y=this.data;y instanceof Array&&(y.length=this._len,a&&(this.data=new Float32Array(y)))},getBoundingRect:function(){s[0]=s[1]=v[0]=v[1]=Number.MAX_VALUE,p[0]=p[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var y=this.data,T=0,x=0,M=0,b=0,o=0;o<y.length;){var r=y[o++];o===1&&(T=y[o],x=y[o+1],M=T,b=x);switch(r){case S.M:M=y[o++],b=y[o++],T=M,x=b,v[0]=M,v[1]=b,i[0]=M,i[1]=b;break;case S.L:_.fromLine(T,x,y[o],y[o+1],v,i),T=y[o++],x=y[o++];break;case S.C:_.fromCubic(T,x,y[o++],y[o++],y[o++],y[o++],y[o],y[o+1],v,i),T=y[o++],x=y[o++];break;case S.Q:_.fromQuadratic(T,x,y[o++],y[o++],y[o],y[o+1],v,i),T=y[o++],x=y[o++];break;case S.A:var n=y[o++],l=y[o++],L=y[o++],B=y[o++],h=y[o++],I=y[o++]+h;o+=1;var H=1-y[o++];o===1&&(M=w(h)*L+n,b=g(h)*B+l),_.fromArc(n,l,L,B,h,I,H,v,i),T=w(I)*L+n,x=g(I)*B+l;break;case S.R:M=T=y[o++],b=x=y[o++];var z=y[o++],Z=y[o++];_.fromLine(M,b,M+z,b+Z,v,i);break;case S.Z:T=M,x=b;break}N.min(s,s,v),N.max(p,p,i)}return o===0&&(s[0]=s[1]=p[0]=p[1]=0),new Q(s[0],s[1],p[0]-s[0],p[1]-s[1])},rebuildPath:function(y){for(var T=this.data,x,M,b,o,r,n,l=this._ux,L=this._uy,B=this._len,h=0;h<B;){var I=T[h++];h===1&&(b=T[h],o=T[h+1],x=b,M=o);switch(I){case S.M:x=b=T[h++],M=o=T[h++],y.moveTo(b,o);break;case S.L:r=T[h++],n=T[h++],(c(r-b)>l||c(n-o)>L||h===B-1)&&(y.lineTo(r,n),b=r,o=n);break;case S.C:y.bezierCurveTo(T[h++],T[h++],T[h++],T[h++],T[h++],T[h++]),b=T[h-2],o=T[h-1];break;case S.Q:y.quadraticCurveTo(T[h++],T[h++],T[h++],T[h++]),b=T[h-2],o=T[h-1];break;case S.A:var H=T[h++],z=T[h++],Z=T[h++],Y=T[h++],G=T[h++],ee=T[h++],J=T[h++],oe=T[h++],se=Z>Y?Z:Y,Te=Z>Y?1:Z/Y,be=Z>Y?Y/Z:1,xe=Math.abs(Z-Y)>.001,Oe=G+ee;xe?(y.translate(H,z),y.rotate(J),y.scale(Te,be),y.arc(0,0,se,G,Oe,1-oe),y.scale(1/Te,1/be),y.rotate(-J),y.translate(-H,-z)):y.arc(H,z,se,G,Oe,1-oe),h===1&&(x=w(G)*Z+H,M=g(G)*Y+z),b=w(Oe)*Z+H,o=g(Oe)*Y+z;break;case S.R:x=b=T[h],M=o=T[h+1],y.rect(T[h++],T[h++],T[h++],T[h++]);break;case S.Z:y.closePath(),b=x,o=M}}}},u.CMD=S;var m=u;Xe.exports=m},Iq15:function(Xe,pe,W){var X=W("nVVt"),N=W("dWSS"),_=W("dQei"),Q={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},R={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(E){for(var S=E<<10;R.getBCHDigit(S)-R.getBCHDigit(R.G15)>=0;)S^=R.G15<<R.getBCHDigit(S)-R.getBCHDigit(R.G15);return(E<<10|S)^R.G15_MASK},getBCHTypeNumber:function(E){for(var S=E<<12;R.getBCHDigit(S)-R.getBCHDigit(R.G18)>=0;)S^=R.G18<<R.getBCHDigit(S)-R.getBCHDigit(R.G18);return E<<12|S},getBCHDigit:function(E){for(var S=0;E!=0;)S++,E>>>=1;return S},getPatternPosition:function(E){return R.PATTERN_POSITION_TABLE[E-1]},getMask:function(E,S,s){switch(E){case Q.PATTERN000:return(S+s)%2==0;case Q.PATTERN001:return S%2==0;case Q.PATTERN010:return s%3==0;case Q.PATTERN011:return(S+s)%3==0;case Q.PATTERN100:return(Math.floor(S/2)+Math.floor(s/3))%2==0;case Q.PATTERN101:return S*s%2+S*s%3==0;case Q.PATTERN110:return(S*s%2+S*s%3)%2==0;case Q.PATTERN111:return(S*s%3+(S+s)%2)%2==0;default:throw new Error("bad maskPattern:"+E)}},getErrorCorrectPolynomial:function(E){for(var S=new N([1],0),s=0;s<E;s++)S=S.multiply(new N([1,_.gexp(s)],0));return S},getLengthInBits:function(E,S){if(1<=S&&S<10)switch(E){case X.MODE_NUMBER:return 10;case X.MODE_ALPHA_NUM:return 9;case X.MODE_8BIT_BYTE:return 8;case X.MODE_KANJI:return 8;default:throw new Error("mode:"+E)}else if(S<27)switch(E){case X.MODE_NUMBER:return 12;case X.MODE_ALPHA_NUM:return 11;case X.MODE_8BIT_BYTE:return 16;case X.MODE_KANJI:return 10;default:throw new Error("mode:"+E)}else if(S<41)switch(E){case X.MODE_NUMBER:return 14;case X.MODE_ALPHA_NUM:return 13;case X.MODE_8BIT_BYTE:return 16;case X.MODE_KANJI:return 12;default:throw new Error("mode:"+E)}else throw new Error("type:"+S)},getLostPoint:function(E){for(var S=E.getModuleCount(),s=0,p=0;p<S;p++)for(var v=0;v<S;v++){for(var i=0,A=E.isDark(p,v),O=-1;O<=1;O++){if(p+O<0||S<=p+O)continue;for(var w=-1;w<=1;w++){if(v+w<0||S<=v+w)continue;if(O==0&&w==0)continue;A==E.isDark(p+O,v+w)&&i++}}i>5&&(s+=3+i-5)}for(var p=0;p<S-1;p++)for(var v=0;v<S-1;v++){var g=0;E.isDark(p,v)&&g++,E.isDark(p+1,v)&&g++,E.isDark(p,v+1)&&g++,E.isDark(p+1,v+1)&&g++,(g==0||g==4)&&(s+=3)}for(var p=0;p<S;p++)for(var v=0;v<S-6;v++)E.isDark(p,v)&&!E.isDark(p,v+1)&&E.isDark(p,v+2)&&E.isDark(p,v+3)&&E.isDark(p,v+4)&&!E.isDark(p,v+5)&&E.isDark(p,v+6)&&(s+=40);for(var v=0;v<S;v++)for(var p=0;p<S-6;p++)E.isDark(p,v)&&!E.isDark(p+1,v)&&E.isDark(p+2,v)&&E.isDark(p+3,v)&&E.isDark(p+4,v)&&!E.isDark(p+5,v)&&E.isDark(p+6,v)&&(s+=40);for(var C=0,v=0;v<S;v++)for(var p=0;p<S;p++)E.isDark(p,v)&&C++;var c=Math.abs(100*C/S/S-50)/5;return s+=c*10,s}};Xe.exports=R},ItGF:function(Xe,pe){var W={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?W={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?W={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?W={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:W=N(navigator.userAgent);var X=W;function N(_){var Q={},R={},E=_.match(/Firefox\/([\d.]+)/),S=_.match(/MSIE\s([\d.]+)/)||_.match(/Trident\/.+?rv:(([\d.]+))/),s=_.match(/Edge\/([\d.]+)/),p=/micromessenger/i.test(_);return E&&(R.firefox=!0,R.version=E[1]),S&&(R.ie=!0,R.version=S[1]),s&&(R.edge=!0,R.version=s[1]),p&&(R.weChat=!0),{browser:R,os:Q,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!R.ie&&!R.edge,pointerEventsSupported:"onpointerdown"in window&&(R.edge||R.ie&&R.version>=11),domSupported:typeof document!="undefined"}}Xe.exports=X},K2GJ:function(Xe,pe,W){var X=W("fW2E"),N=W("gut8"),_=N.ContextCachedBy,Q=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],R=function(A){this.extendFrom(A,!1)};function E(A,O,w){var g=O.x==null?0:O.x,C=O.x2==null?1:O.x2,c=O.y==null?0:O.y,a=O.y2==null?0:O.y2;O.global||(g=g*w.width+w.x,C=C*w.width+w.x,c=c*w.height+w.y,a=a*w.height+w.y),g=isNaN(g)?0:g,C=isNaN(C)?1:C,c=isNaN(c)?0:c,a=isNaN(a)?0:a;var u=A.createLinearGradient(g,c,C,a);return u}function S(A,O,w){var g=w.width,C=w.height,c=Math.min(g,C),a=O.x==null?.5:O.x,u=O.y==null?.5:O.y,m=O.r==null?.5:O.r;O.global||(a=a*g+w.x,u=u*C+w.y,m=m*c);var y=A.createRadialGradient(a,u,0,a,u,m);return y}R.prototype={constructor:R,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(A,O,w){var g=this,C=w&&w.style,c=!C||A.__attrCachedBy!==_.STYLE_BIND;A.__attrCachedBy=_.STYLE_BIND;for(var a=0;a<Q.length;a++){var u=Q[a],m=u[0];(c||g[m]!==C[m])&&(A[m]=X(A,m,g[m]||u[1]))}if((c||g.fill!==C.fill)&&(A.fillStyle=g.fill),(c||g.stroke!==C.stroke)&&(A.strokeStyle=g.stroke),(c||g.opacity!==C.opacity)&&(A.globalAlpha=g.opacity==null?1:g.opacity),(c||g.blend!==C.blend)&&(A.globalCompositeOperation=g.blend||"source-over"),this.hasStroke()){var y=g.lineWidth;A.lineWidth=y/(this.strokeNoScale&&O&&O.getLineScale?O.getLineScale():1)}},hasFill:function(){var A=this.fill;return A!=null&&A!=="none"},hasStroke:function(){var A=this.stroke;return A!=null&&A!=="none"&&this.lineWidth>0},extendFrom:function(A,O){if(A)for(var w in A)A.hasOwnProperty(w)&&(O===!0||(O===!1?!this.hasOwnProperty(w):A[w]!=null))&&(this[w]=A[w])},set:function(A,O){typeof A=="string"?this[A]=O:this.extendFrom(A,!0)},clone:function(){var A=new this.constructor;return A.extendFrom(this,!0),A},getGradient:function(A,O,w){for(var g=O.type==="radial"?S:E,C=g(A,O,w),c=O.colorStops,a=0;a<c.length;a++)C.addColorStop(c[a].offset,c[a].color);return C}};for(var s=R.prototype,p=0;p<Q.length;p++){var v=Q[p];v[0]in s||(s[v[0]]=v[1])}R.getGradient=s.getGradient;var i=R;Xe.exports=i},LPTA:function(Xe,pe){var W=1;typeof window!="undefined"&&(W=Math.max(window.devicePixelRatio||1,1));var X=0,N=W;pe.debugMode=X,pe.devicePixelRatio=N},LdHM:function(Xe,pe,W){"use strict";W.d(pe,"b",function(){return m}),W.d(pe,"a",function(){return T});var X=W("1OyB"),N=W("vuIU"),_=W("Ji7U"),Q=W("LK+K"),R=W("q1tI"),E=W("rePB"),S=W("Ff2n"),s=W("ODXe"),p=W("4IlW"),v=W("bX4T"),i=W("YrtM"),A=W("TSYQ"),O=W.n(A),w=W("+nKL"),g=W("8OUc"),C=function(ee,J){var oe=ee.prefixCls,se=ee.id,Te=ee.flattenOptions,be=ee.childrenAsData,xe=ee.values,Oe=ee.searchValue,Ne=ee.multiple,Le=ee.defaultActiveFirstOption,Se=ee.height,tt=ee.itemHeight,Bt=ee.notFoundContent,De=ee.open,Qe=ee.menuItemSelectedIcon,it=ee.virtual,Ae=ee.onSelect,re=ee.onToggleOpen,ie=ee.onActiveValue,ce=ee.onScroll,Be=ee.onMouseEnter,Re="".concat(oe,"-item"),ke=Object(i.a)(function(){return Te},[De,Te],function(ut,Ke){return Ke[0]&&ut[1]!==Ke[1]}),ft=R.useRef(null),pt=function(Ke){Ke.preventDefault()},bt=function(Ke){ft.current&&ft.current.scrollTo({index:Ke})},yt=function(Ke){for(var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=ke.length,me=0;me<Me;me+=1){var Ee=(Ke+me*Ie+Me)%Me,ge=ke[Ee],we=ge.group,ze=ge.data;if(!we&&!ze.disabled)return Ee}return-1},_t=R.useState(function(){return yt(0)}),It=Object(s.a)(_t,2),He=It[0],Pe=It[1],At=function(Ke){Pe(Ke);var Ie=ke[Ke];if(!Ie){ie(null,-1);return}ie(Ie.data.value,Ke)};R.useEffect(function(){At(Le!==!1?yt(0):-1)},[ke.length,Oe]),R.useEffect(function(){var ut=setTimeout(function(){if(!Ne&&De&&xe.size===1){var Ke=Array.from(xe)[0],Ie=ke.findIndex(function(Me){var me=Me.data;return me.value===Ke});At(Ie),bt(Ie)}});return function(){return clearTimeout(ut)}},[De]);var mt=function(Ke){Ke!==void 0&&Ae(Ke,{selected:!xe.has(Ke)}),Ne||re(!1)};if(R.useImperativeHandle(J,function(){return{onKeyDown:function(Ke){var Ie=Ke.which;switch(Ie){case p.a.UP:case p.a.DOWN:{var Me=0;if(Ie===p.a.UP?Me=-1:Ie===p.a.DOWN&&(Me=1),Me!==0){var me=yt(He+Me,Me);bt(me),At(me)}break}case p.a.ENTER:{var Ee=ke[He];Ee&&!Ee.data.disabled?mt(Ee.data.value):mt(void 0),De&&Ke.preventDefault();break}case p.a.ESC:re(!1)}},onKeyUp:function(){},scrollTo:function(Ke){bt(Ke)}}}),ke.length===0)return R.createElement("div",{role:"listbox",id:"".concat(se,"_list"),className:"".concat(Re,"-empty"),onMouseDown:pt},Bt);function Ze(ut){var Ke=ke[ut];if(!Ke)return null;var Ie=Ke.data||{},Me=Ie.value,me=Ie.label,Ee=Ie.children,ge=Object(v.a)(Ie,!0),we=be?Ee:me;return Ke?R.createElement("div",Object.assign({"aria-label":typeof we=="string"?we:null},ge,{key:ut,role:"option",id:"".concat(se,"_list_").concat(ut),"aria-selected":xe.has(Me)}),Me):null}return R.createElement(R.Fragment,null,R.createElement("div",{role:"listbox",id:"".concat(se,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(He-1),Ze(He),Ze(He+1)),R.createElement(w.a,{itemKey:"key",ref:ft,data:ke,height:Se,itemHeight:tt,fullHeight:!1,onMouseDown:pt,onScroll:ce,virtual:it,onMouseEnter:Be},function(ut,Ke){var Ie,Me=ut.group,me=ut.groupOption,Ee=ut.data,ge=Ee.label,we=Ee.key;if(Me)return R.createElement("div",{className:O()(Re,"".concat(Re,"-group"))},ge!==void 0?ge:we);var ze=Ee.disabled,Je=Ee.value,Et=Ee.title,Ft=Ee.children,Nt=Ee.style,ht=Ee.className,Lt=Object(S.a)(Ee,["disabled","value","title","children","style","className"]),st=xe.has(Je),rt="".concat(Re,"-option"),et=O()(Re,rt,ht,(Ie={},Object(E.a)(Ie,"".concat(rt,"-grouped"),me),Object(E.a)(Ie,"".concat(rt,"-active"),He===Ke&&!ze),Object(E.a)(Ie,"".concat(rt,"-disabled"),ze),Object(E.a)(Ie,"".concat(rt,"-selected"),st),Ie)),Ce=be?Ft:ge,Ue=!Qe||typeof Qe=="function"||st;return R.createElement("div",Object.assign({},Lt,{"aria-selected":st,className:et,title:Et,onMouseMove:function(){if(He===Ke||ze)return;At(Ke)},onClick:function(){ze||mt(Je)},style:Nt}),R.createElement("div",{className:"".concat(rt,"-content")},Ce||Je),R.isValidElement(Qe)||st,Ue&&R.createElement(g.a,{className:"".concat(Re,"-option-state"),customizeIcon:Qe,customizeIconProps:{isSelected:st}},st?"\u2713":null))}))},c=R.forwardRef(C);c.displayName="OptionList";var a=c,u=function(){return null};u.isSelectOption=!0;var m=u,y=function(){return null};y.isSelectOptGroup=!0;var T=y,x=W("VTBJ"),M=W("Zm9Q");function b(G){var ee=G.key,J=G.props,oe=J.children,se=J.value,Te=Object(S.a)(J,["children","value"]);return Object(x.a)({key:ee,value:se!==void 0?se:ee,children:oe},Te)}function o(G){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(M.a)(G).map(function(J,oe){if(!R.isValidElement(J)||!J.type)return null;var se=J.type.isSelectOptGroup,Te=J.key,be=J.props,xe=be.children,Oe=Object(S.a)(be,["children"]);return ee||!se?b(J):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Te===null?oe:Te,"__"),label:Te},Oe),{},{options:o(xe)})}).filter(function(J){return J})}var r=W("2Qr1"),n=W("qNPg"),l=W("U8pU"),L=W("Kwbf"),B=W("WKfj");function h(G){var ee=G.mode,J=G.options,oe=G.children,se=G.backfill,Te=G.allowClear,be=G.placeholder,xe=G.getInputElement,Oe=G.showSearch,Ne=G.onSearch,Le=G.defaultOpen,Se=G.autoFocus,tt=G.labelInValue,Bt=G.value,De=G.inputValue,Qe=G.optionLabelProp,it=ee==="multiple"||ee==="tags",Ae=Oe!==void 0?Oe:it||ee==="combobox",re=J||o(oe);if(Object(L.a)(ee!=="tags"||re.every(function(Re){return!Re.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ee==="tags"||ee==="combobox"){var ie=re.some(function(Re){return Re.options?Re.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Re?Re.value:Re.key)=="number"});Object(L.a)(!ie,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)(ee!=="combobox"||!Qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)(ee==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(L.a)(ee==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(L.b)(ee!=="combobox"||!xe||!Te||!be,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ne&&!Ae&&ee!=="combobox"&&ee!=="tags"&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!Le||Se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Bt!=null){var ce=Object(B.d)(Bt);Object(L.a)(!tt||ce.every(function(Re){return Object(l.a)(Re)==="object"&&("key"in Re||"value"in Re)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(L.a)(!it||Array.isArray(Bt),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var Be=null;Object(M.a)(oe).some(function(Re){if(!R.isValidElement(Re)||!Re.type)return!1;var ke=Re.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var ft=Object(M.a)(Re.props.children).every(function(pt){return!R.isValidElement(pt)||!Re.type||pt.type.isSelectOption?!0:(Be=pt.type,!1)});return!ft}return Be=ke,!0}),Be&&Object(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Be.displayName||Be.name||Be,"`.")),Object(L.a)(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=h,H=Object(n.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:o,flattenOptions:r.d,getLabeledValue:r.e,filterOptions:r.b,isValueDisabled:r.g,findValueOption:r.c,warningProps:I,fillOptionsWithMissingValue:r.a}),z=function(G){Object(_.a)(J,G);var ee=Object(Q.a)(J);function J(){var oe;return Object(X.a)(this,J),oe=ee.apply(this,arguments),oe.selectRef=R.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(N.a)(J,[{key:"render",value:function(){return R.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),J}(R.Component);z.Option=m,z.OptGroup=T;var Z=z,Y=pe.c=Z},M8RZ:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return p});var X=W("fWQN"),N=W("mtLc"),_=W("yKVA"),Q=W("879j"),R=W("q1tI"),E=W.n(R),S=W("i8i4"),s=W.n(S),p=function(v){Object(_.a)(A,v);var i=Object(Q.a)(A);function A(O){var w;Object(X.a)(this,A),w=i.call(this,O);var g=window.document;return w.node=g.createElement("div"),g.body.appendChild(w.node),w}return Object(N.a)(A,[{key:"render",value:function(){var w=this.props.children;return Object(S.createPortal)(w,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),A}(E.a.Component)},MEGo:function(Xe,pe,W){var X=W("4fz+"),N=W("Dagg"),_=W("dqUG"),Q=W("2fw6"),R=W("x6Kt"),E=W("rmlV"),S=W("yxFR"),s=W("y+Vt"),p=W("h7HQ"),v=W("1Jh7"),i=W("SKnc"),A=W("K2GJ"),O=W("Fofx"),w=W("NC18"),g=w.createFromString,C=W("bYtY"),c=C.isString,a=C.extend,u=C.defaults,m=C.trim,y=C.each,T=/[\s,]+/;function x(J){if(c(J)){var oe=new DOMParser;J=oe.parseFromString(J,"text/xml")}for(J.nodeType===9&&(J=J.firstChild);J.nodeName.toLowerCase()!=="svg"||J.nodeType!==1;)J=J.nextSibling;return J}function M(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}M.prototype.parse=function(J,oe){oe=oe||{};var se=x(J);if(!se)throw new Error("Illegal svg");var Te=new X;this._root=Te;var be=se.getAttribute("viewBox")||"",xe=parseFloat(se.getAttribute("width")||oe.width),Oe=parseFloat(se.getAttribute("height")||oe.height);isNaN(xe)&&(xe=null),isNaN(Oe)&&(Oe=null),B(se,Te,null,!0);for(var Ne=se.firstChild;Ne;)this._parseNode(Ne,Te),Ne=Ne.nextSibling;var Le,Se;if(be){var tt=m(be).split(T);tt.length>=4&&(Le={x:parseFloat(tt[0]||0),y:parseFloat(tt[1]||0),width:parseFloat(tt[2]),height:parseFloat(tt[3])})}if(Le&&xe!=null&&Oe!=null&&(Se=G(Le,xe,Oe),!oe.ignoreViewBox)){var Bt=Te;Te=new X,Te.add(Bt),Bt.scale=Se.scale.slice(),Bt.position=Se.position.slice()}return!oe.ignoreRootClip&&xe!=null&&Oe!=null&&Te.setClipPath(new R({shape:{x:0,y:0,width:xe,height:Oe}})),{root:Te,width:xe,height:Oe,viewBoxRect:Le,viewBoxTransform:Se}},M.prototype._parseNode=function(J,oe){var se=J.nodeName.toLowerCase();se==="defs"?this._isDefine=!0:se==="text"&&(this._isText=!0);var Te;if(this._isDefine){var be=o[se];if(be){var xe=be.call(this,J),Oe=J.getAttribute("id");Oe&&(this._defs[Oe]=xe)}}else{var be=b[se];be&&(Te=be.call(this,J,oe),oe.add(Te))}for(var Ne=J.firstChild;Ne;)Ne.nodeType===1&&this._parseNode(Ne,Te),Ne.nodeType===3&&this._isText&&this._parseText(Ne,Te),Ne=Ne.nextSibling;se==="defs"?this._isDefine=!1:se==="text"&&(this._isText=!1)},M.prototype._parseText=function(J,oe){if(J.nodeType===1){var se=J.getAttribute("dx")||0,Te=J.getAttribute("dy")||0;this._textX+=parseFloat(se),this._textY+=parseFloat(Te)}var be=new _({style:{text:J.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});n(oe,be),B(J,be,this._defs);var xe=be.style.fontSize;xe&&xe<9&&(be.style.fontSize=9,be.scale=be.scale||[1,1],be.scale[0]*=xe/9,be.scale[1]*=xe/9);var Oe=be.getBoundingRect();return this._textX+=Oe.width,oe.add(be),be};var b={g:function(J,oe){var se=new X;return n(oe,se),B(J,se,this._defs),se},rect:function(J,oe){var se=new R;return n(oe,se),B(J,se,this._defs),se.setShape({x:parseFloat(J.getAttribute("x")||0),y:parseFloat(J.getAttribute("y")||0),width:parseFloat(J.getAttribute("width")||0),height:parseFloat(J.getAttribute("height")||0)}),se},circle:function(J,oe){var se=new Q;return n(oe,se),B(J,se,this._defs),se.setShape({cx:parseFloat(J.getAttribute("cx")||0),cy:parseFloat(J.getAttribute("cy")||0),r:parseFloat(J.getAttribute("r")||0)}),se},line:function(J,oe){var se=new S;return n(oe,se),B(J,se,this._defs),se.setShape({x1:parseFloat(J.getAttribute("x1")||0),y1:parseFloat(J.getAttribute("y1")||0),x2:parseFloat(J.getAttribute("x2")||0),y2:parseFloat(J.getAttribute("y2")||0)}),se},ellipse:function(J,oe){var se=new E;return n(oe,se),B(J,se,this._defs),se.setShape({cx:parseFloat(J.getAttribute("cx")||0),cy:parseFloat(J.getAttribute("cy")||0),rx:parseFloat(J.getAttribute("rx")||0),ry:parseFloat(J.getAttribute("ry")||0)}),se},polygon:function(J,oe){var se=J.getAttribute("points");se&&(se=l(se));var Te=new p({shape:{points:se||[]}});return n(oe,Te),B(J,Te,this._defs),Te},polyline:function(J,oe){var se=new s;n(oe,se),B(J,se,this._defs);var Te=J.getAttribute("points");Te&&(Te=l(Te));var be=new v({shape:{points:Te||[]}});return be},image:function(J,oe){var se=new N;return n(oe,se),B(J,se,this._defs),se.setStyle({image:J.getAttribute("xlink:href"),x:J.getAttribute("x"),y:J.getAttribute("y"),width:J.getAttribute("width"),height:J.getAttribute("height")}),se},text:function(J,oe){var se=J.getAttribute("x")||0,Te=J.getAttribute("y")||0,be=J.getAttribute("dx")||0,xe=J.getAttribute("dy")||0;this._textX=parseFloat(se)+parseFloat(be),this._textY=parseFloat(Te)+parseFloat(xe);var Oe=new X;return n(oe,Oe),B(J,Oe,this._defs),Oe},tspan:function(J,oe){var se=J.getAttribute("x"),Te=J.getAttribute("y");se!=null&&(this._textX=parseFloat(se)),Te!=null&&(this._textY=parseFloat(Te));var be=J.getAttribute("dx")||0,xe=J.getAttribute("dy")||0,Oe=new X;return n(oe,Oe),B(J,Oe,this._defs),this._textX+=be,this._textY+=xe,Oe},path:function(J,oe){var se=J.getAttribute("d")||"",Te=g(se);return n(oe,Te),B(J,Te,this._defs),Te}},o={lineargradient:function(J){var oe=parseInt(J.getAttribute("x1")||0,10),se=parseInt(J.getAttribute("y1")||0,10),Te=parseInt(J.getAttribute("x2")||10,10),be=parseInt(J.getAttribute("y2")||0,10),xe=new i(oe,se,Te,be);return r(J,xe),xe},radialgradient:function(J){}};function r(J,oe){for(var se=J.firstChild;se;){if(se.nodeType===1){var Te=se.getAttribute("offset");Te.indexOf("%")>0?Te=parseInt(Te,10)/100:Te?Te=parseFloat(Te):Te=0;var be=se.getAttribute("stop-color")||"#000000";oe.addColorStop(Te,be)}se=se.nextSibling}}function n(J,oe){J&&J.__inheritedStyle&&(oe.__inheritedStyle||(oe.__inheritedStyle={}),u(oe.__inheritedStyle,J.__inheritedStyle))}function l(J){for(var oe=m(J).split(T),se=[],Te=0;Te<oe.length;Te+=2){var be=parseFloat(oe[Te]),xe=parseFloat(oe[Te+1]);se.push([be,xe])}return se}var L={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function B(J,oe,se,Te){var be=oe.__inheritedStyle||{},xe=oe.type==="text";if(J.nodeType===1&&(z(J,oe),a(be,Y(J)),!Te)){for(var Oe in L)if(L.hasOwnProperty(Oe)){var Ne=J.getAttribute(Oe);Ne!=null&&(be[L[Oe]]=Ne)}}var Le=xe?"textFill":"fill",Se=xe?"textStroke":"stroke";oe.style=oe.style||new A;var tt=oe.style;be.fill!=null&&tt.set(Le,I(be.fill,se)),be.stroke!=null&&tt.set(Se,I(be.stroke,se)),y(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Bt){var De=Bt==="lineWidth"&&xe?"textStrokeWidth":Bt;be[Bt]!=null&&tt.set(De,parseFloat(be[Bt]))}),(!be.textBaseline||be.textBaseline==="auto")&&(be.textBaseline="alphabetic"),be.textBaseline==="alphabetic"&&(be.textBaseline="bottom"),be.textAlign==="start"&&(be.textAlign="left"),be.textAlign==="end"&&(be.textAlign="right"),y(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Bt){be[Bt]!=null&&tt.set(Bt,be[Bt])}),be.lineDash&&(oe.style.lineDash=m(be.lineDash).split(T)),tt[Se]&&tt[Se]!=="none"&&(oe[Se]=!0),oe.__inheritedStyle=be}var h=/url\(\s*#(.*?)\)/;function I(J,oe){var se=oe&&J&&J.match(h);if(se){var Te=m(se[1]),be=oe[Te];return be}return J}var H=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function z(J,oe){var se=J.getAttribute("transform");if(se){se=se.replace(/,/g," ");var Te=null,be=[];se.replace(H,function(Le,Se,tt){be.push(Se,tt)});for(var xe=be.length-1;xe>0;xe-=2){var Oe=be[xe],Ne=be[xe-1];Te=Te||O.create();switch(Ne){case"translate":Oe=m(Oe).split(T),O.translate(Te,Te,[parseFloat(Oe[0]),parseFloat(Oe[1]||0)]);break;case"scale":Oe=m(Oe).split(T),O.scale(Te,Te,[parseFloat(Oe[0]),parseFloat(Oe[1]||Oe[0])]);break;case"rotate":Oe=m(Oe).split(T),O.rotate(Te,Te,parseFloat(Oe[0]));break;case"skew":Oe=m(Oe).split(T),console.warn("Skew transform is not supported yet");break;case"matrix":var Oe=m(Oe).split(T);Te[0]=parseFloat(Oe[0]),Te[1]=parseFloat(Oe[1]),Te[2]=parseFloat(Oe[2]),Te[3]=parseFloat(Oe[3]),Te[4]=parseFloat(Oe[4]),Te[5]=parseFloat(Oe[5]);break}}oe.setLocalTransform(Te)}}var Z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Y(J){var oe=J.getAttribute("style"),se={};if(!oe)return se;var Te={};Z.lastIndex=0;for(var be;(be=Z.exec(oe))!=null;)Te[be[1]]=be[2];for(var xe in L)L.hasOwnProperty(xe)&&Te[xe]!=null&&(se[L[xe]]=Te[xe]);return se}function G(J,oe,se){var Te=oe/J.width,be=se/J.height,xe=Math.min(Te,be),Oe=[xe,xe],Ne=[-(J.x+J.width/2)*xe+oe/2,-(J.y+J.height/2)*xe+se/2];return{scale:Oe,position:Ne}}function ee(J,oe){var se=new M;return se.parse(J,oe)}pe.parseXML=x,pe.makeViewBoxTransform=G,pe.parseSVG=ee},MKOG:function(Xe,pe,W){var X=W("bYtY"),N=W("YH21"),_=N.Dispatcher,Q=W("mLcG"),R=W("Bq2U"),E=function(s){s=s||{},this.stage=s.stage||{},this.onframe=s.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,_.call(this)};E.prototype={constructor:E,addClip:function(s){this._clips.push(s)},addAnimator:function(s){s.animation=this;for(var p=s.getClips(),v=0;v<p.length;v++)this.addClip(p[v])},removeClip:function(s){var p=X.indexOf(this._clips,s);p>=0&&this._clips.splice(p,1)},removeAnimator:function(s){for(var p=s.getClips(),v=0;v<p.length;v++)this.removeClip(p[v]);s.animation=null},_update:function(){for(var s=new Date().getTime()-this._pausedTime,p=s-this._time,v=this._clips,i=v.length,A=[],O=[],w=0;w<i;w++){var g=v[w],C=g.step(s,p);C&&(A.push(C),O.push(g))}for(var w=0;w<i;)v[w]._needsRemove?(v[w]=v[i-1],v.pop(),i--):w++;i=A.length;for(var w=0;w<i;w++)O[w].fire(A[w]);this._time=s,this.onframe(p),this.trigger("frame",p),this.stage.update&&this.stage.update()},_startLoop:function(){var s=this;this._running=!0;function p(){s._running&&(Q(p),!s._paused&&s._update())}Q(p)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(s,p){p=p||{};var v=new R(s,p.loop,p.getter,p.setter);return this.addAnimator(v),v}},X.mixin(E,_);var S=E;Xe.exports=S},NC18:function(Xe,pe,W){var X=W("y+Vt"),N=W("IMiH"),_=W("7oTu"),Q=Math.sqrt,R=Math.sin,E=Math.cos,S=Math.PI,s=function(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])},p=function(u,m){return(u[0]*m[0]+u[1]*m[1])/(s(u)*s(m))},v=function(u,m){return(u[0]*m[1]<u[1]*m[0]?-1:1)*Math.acos(p(u,m))};function i(u,m,y,T,x,M,b,o,r,n,l){var L=r*(S/180),B=E(L)*(u-y)/2+R(L)*(m-T)/2,h=-1*R(L)*(u-y)/2+E(L)*(m-T)/2,I=B*B/(b*b)+h*h/(o*o);I>1&&(b*=Q(I),o*=Q(I));var H=(x===M?-1:1)*Q((b*b*(o*o)-b*b*(h*h)-o*o*(B*B))/(b*b*(h*h)+o*o*(B*B)))||0,z=H*b*h/o,Z=H*-o*B/b,Y=(u+y)/2+E(L)*z-R(L)*Z,G=(m+T)/2+R(L)*z+E(L)*Z,ee=v([1,0],[(B-z)/b,(h-Z)/o]),J=[(B-z)/b,(h-Z)/o],oe=[(-1*B-z)/b,(-1*h-Z)/o],se=v(J,oe);p(J,oe)<=-1&&(se=S),p(J,oe)>=1&&(se=0),M===0&&se>0&&(se=se-2*S),M===1&&se<0&&(se=se+2*S),l.addData(n,Y,G,b,o,ee,se,L,M)}var A=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,O=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function w(u){if(!u)return new N;for(var m=0,y=0,T=m,x=y,M,b=new N,o=N.CMD,r=u.match(A),n=0;n<r.length;n++){for(var l=r[n],L=l.charAt(0),B,h=l.match(O)||[],I=h.length,H=0;H<I;H++)h[H]=parseFloat(h[H]);for(var z=0;z<I;){var Z,Y,G,ee,J,oe,se,Te=m,be=y;switch(L){case"l":m+=h[z++],y+=h[z++],B=o.L,b.addData(B,m,y);break;case"L":m=h[z++],y=h[z++],B=o.L,b.addData(B,m,y);break;case"m":m+=h[z++],y+=h[z++],B=o.M,b.addData(B,m,y),T=m,x=y,L="l";break;case"M":m=h[z++],y=h[z++],B=o.M,b.addData(B,m,y),T=m,x=y,L="L";break;case"h":m+=h[z++],B=o.L,b.addData(B,m,y);break;case"H":m=h[z++],B=o.L,b.addData(B,m,y);break;case"v":y+=h[z++],B=o.L,b.addData(B,m,y);break;case"V":y=h[z++],B=o.L,b.addData(B,m,y);break;case"C":B=o.C,b.addData(B,h[z++],h[z++],h[z++],h[z++],h[z++],h[z++]),m=h[z-2],y=h[z-1];break;case"c":B=o.C,b.addData(B,h[z++]+m,h[z++]+y,h[z++]+m,h[z++]+y,h[z++]+m,h[z++]+y),m+=h[z-2],y+=h[z-1];break;case"S":Z=m,Y=y;var xe=b.len(),Oe=b.data;M===o.C&&(Z+=m-Oe[xe-4],Y+=y-Oe[xe-3]),B=o.C,Te=h[z++],be=h[z++],m=h[z++],y=h[z++],b.addData(B,Z,Y,Te,be,m,y);break;case"s":Z=m,Y=y;var xe=b.len(),Oe=b.data;M===o.C&&(Z+=m-Oe[xe-4],Y+=y-Oe[xe-3]),B=o.C,Te=m+h[z++],be=y+h[z++],m+=h[z++],y+=h[z++],b.addData(B,Z,Y,Te,be,m,y);break;case"Q":Te=h[z++],be=h[z++],m=h[z++],y=h[z++],B=o.Q,b.addData(B,Te,be,m,y);break;case"q":Te=h[z++]+m,be=h[z++]+y,m+=h[z++],y+=h[z++],B=o.Q,b.addData(B,Te,be,m,y);break;case"T":Z=m,Y=y;var xe=b.len(),Oe=b.data;M===o.Q&&(Z+=m-Oe[xe-4],Y+=y-Oe[xe-3]),m=h[z++],y=h[z++],B=o.Q,b.addData(B,Z,Y,m,y);break;case"t":Z=m,Y=y;var xe=b.len(),Oe=b.data;M===o.Q&&(Z+=m-Oe[xe-4],Y+=y-Oe[xe-3]),m+=h[z++],y+=h[z++],B=o.Q,b.addData(B,Z,Y,m,y);break;case"A":G=h[z++],ee=h[z++],J=h[z++],oe=h[z++],se=h[z++],Te=m,be=y,m=h[z++],y=h[z++],B=o.A,i(Te,be,m,y,oe,se,G,ee,J,B,b);break;case"a":G=h[z++],ee=h[z++],J=h[z++],oe=h[z++],se=h[z++],Te=m,be=y,m+=h[z++],y+=h[z++],B=o.A,i(Te,be,m,y,oe,se,G,ee,J,B,b);break}}(L==="z"||L==="Z")&&(B=o.Z,b.addData(B),m=T,y=x),M=B}return b.toStatic(),b}function g(u,m){var y=w(u);return m=m||{},m.buildPath=function(T){if(T.setData){T.setData(y.data);var x=T.getContext();x&&T.rebuildPath(x)}else{var x=T;y.rebuildPath(x)}},m.applyTransform=function(T){_(y,T),this.dirty(!0)},m}function C(u,m){return new X(g(u,m))}function c(u,m){return X.extend(g(u,m))}function a(u,m){for(var y=[],T=u.length,x=0;x<T;x++){var M=u[x];M.path||M.createPathProxy(),M.__dirtyPath&&M.buildPath(M.path,M.shape,!0),y.push(M.path)}var b=new X(m);return b.createPathProxy(),b.buildPath=function(o){o.appendPath(y);var r=o.getContext();r&&o.rebuildPath(r)},b}pe.createFromString=C,pe.extendFromString=c,pe.mergePath=a},NohK:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0;var X=function(_){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,R=null;return function(){for(var E=this,S=arguments.length,s=new Array(S),p=0;p<S;p++)s[p]=arguments[p];clearTimeout(R),R=setTimeout(function(){_.apply(E,s)},Q)}};pe.default=X},NvD2:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return E});var X=W("Kwbf");function N(S,s){var p=new Set;return S.forEach(function(v){s.has(v)||p.add(v)}),p}function _(S){var s=S||{},p=s.disabled,v=s.disableCheckbox,i=s.checkable;return!!(p||v)||i===!1}function Q(S,s,p,v){for(var i=new Set(S),A=new Set,O=0;O<=p;O+=1){var w=s.get(O)||new Set;w.forEach(function(a){var u=a.key,m=a.node,y=a.children,T=y===void 0?[]:y;i.has(u)&&!v(m)&&T.filter(function(x){return!v(x.node)}).forEach(function(x){i.add(x.key)})})}for(var g=new Set,C=p;C>=0;C-=1){var c=s.get(C)||new Set;c.forEach(function(a){var u=a.parent,m=a.node;if(v(m)||!a.parent||g.has(a.parent.key))return;if(v(a.parent.node)){g.add(u.key);return}var y=!0,T=!1;(u.children||[]).filter(function(x){return!v(x.node)}).forEach(function(x){var M=x.key,b=i.has(M);y&&!b&&(y=!1),!T&&(b||A.has(M))&&(T=!0)}),y&&i.add(u.key),T&&A.add(u.key),g.add(u.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(N(A,i))}}function R(S,s,p,v,i){for(var A=new Set(S),O=new Set(s),w=0;w<=v;w+=1){var g=p.get(w)||new Set;g.forEach(function(u){var m=u.key,y=u.node,T=u.children,x=T===void 0?[]:T;!A.has(m)&&!O.has(m)&&!i(y)&&x.filter(function(M){return!i(M.node)}).forEach(function(M){A.delete(M.key)})})}O=new Set;for(var C=new Set,c=v;c>=0;c-=1){var a=p.get(c)||new Set;a.forEach(function(u){var m=u.parent,y=u.node;if(i(y)||!u.parent||C.has(u.parent.key))return;if(i(u.parent.node)){C.add(m.key);return}var T=!0,x=!1;(m.children||[]).filter(function(M){return!i(M.node)}).forEach(function(M){var b=M.key,o=A.has(b);T&&!o&&(T=!1),!x&&(o||O.has(b))&&(x=!0)}),T||A.delete(m.key),x&&O.add(m.key),C.add(m.key)})}return{checkedKeys:Array.from(A),halfCheckedKeys:Array.from(N(O,A))}}function E(S,s,p,v){var i=[],A;v?A=v:A=_;var O=new Set(S.filter(function(c){var a=!!p[c];return a||i.push(c),a})),w=new Map,g=0;Object.keys(p).forEach(function(c){var a=p[c],u=a.level,m=w.get(u);m||(m=new Set,w.set(u,m)),m.add(a),g=Math.max(g,u)}),Object(X.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var C;return s===!0?C=Q(O,w,g,A):C=R(O,s.halfCheckedKeys,w,g,A),C}},OLES:function(Xe,pe,W){"use strict";var X=W("U8pU"),N=W("VTBJ"),_=W("Ff2n"),Q=W("q1tI"),R=W("uciX"),E=W("7ixt"),S=function(O){var w=O.overlay,g=O.prefixCls,C=O.id,c=O.overlayInnerStyle;return Q.createElement("div",{className:"".concat(g,"-inner"),id:C,role:"tooltip",style:c},typeof w=="function"?w():w)},s=S,p=function(O,w){var g=O.overlayClassName,C=O.trigger,c=C===void 0?["hover"]:C,a=O.mouseEnterDelay,u=a===void 0?0:a,m=O.mouseLeaveDelay,y=m===void 0?.1:m,T=O.overlayStyle,x=O.prefixCls,M=x===void 0?"rc-tooltip":x,b=O.children,o=O.onVisibleChange,r=O.afterVisibleChange,n=O.transitionName,l=O.animation,L=O.placement,B=L===void 0?"right":L,h=O.align,I=h===void 0?{}:h,H=O.destroyTooltipOnHide,z=H===void 0?!1:H,Z=O.defaultVisible,Y=O.getTooltipContainer,G=O.overlayInnerStyle,ee=Object(_.a)(O,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(Q.useRef)(null);Object(Q.useImperativeHandle)(w,function(){return J.current});var oe=Object(N.a)({},ee);"visible"in O&&(oe.popupVisible=O.visible);var se=function(){var Ne=O.arrowContent,Le=Ne===void 0?null:Ne,Se=O.overlay,tt=O.id;return[Q.createElement("div",{className:"".concat(M,"-arrow"),key:"arrow"},Le),Q.createElement(s,{key:"content",prefixCls:M,id:tt,overlay:Se,overlayInnerStyle:G})]},Te=!1,be=!1;if(typeof z=="boolean")Te=z;else if(z&&Object(X.a)(z)==="object"){var xe=z.keepParent;Te=xe===!0,be=xe===!1}return Q.createElement(R.a,Object.assign({popupClassName:g,prefixCls:M,popup:se,action:c,builtinPlacements:E.a,popupPlacement:B,ref:J,popupAlign:I,getPopupContainer:Y,onPopupVisibleChange:o,afterPopupVisibleChange:r,popupTransitionName:n,popupAnimation:l,defaultPopupVisible:Z,destroyPopupOnHide:Te,autoDestroy:be,mouseLeaveDelay:y,popupStyle:T,mouseEnterDelay:u},oe),b)},v=Object(Q.forwardRef)(p),i=pe.a=v},OS9S:function(Xe,pe,W){var X=W("bYtY"),N=X.inherits,_=W("Gev7"),Q=W("mFDi");function R(s){_.call(this,s),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}R.prototype.incremental=!0,R.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},R.prototype.addDisplayable=function(s,p){p?this._temporaryDisplayables.push(s):this._displayables.push(s),this.dirty()},R.prototype.addDisplayables=function(s,p){p=p||!1;for(var v=0;v<s.length;v++)this.addDisplayable(s[v],p)},R.prototype.eachPendingDisplayable=function(s){for(var p=this._cursor;p<this._displayables.length;p++)s&&s(this._displayables[p]);for(var p=0;p<this._temporaryDisplayables.length;p++)s&&s(this._temporaryDisplayables[p])},R.prototype.update=function(){this.updateTransform();for(var s=this._cursor;s<this._displayables.length;s++){var p=this._displayables[s];p.parent=this,p.update(),p.parent=null}for(var s=0;s<this._temporaryDisplayables.length;s++){var p=this._temporaryDisplayables[s];p.parent=this,p.update(),p.parent=null}},R.prototype.brush=function(s,p){for(var v=this._cursor;v<this._displayables.length;v++){var i=this._displayables[v];i.beforeBrush&&i.beforeBrush(s),i.brush(s,v===this._cursor?null:this._displayables[v-1]),i.afterBrush&&i.afterBrush(s)}this._cursor=v;for(var v=0;v<this._temporaryDisplayables.length;v++){var i=this._temporaryDisplayables[v];i.beforeBrush&&i.beforeBrush(s),i.brush(s,v===0?null:this._temporaryDisplayables[v-1]),i.afterBrush&&i.afterBrush(s)}this._temporaryDisplayables=[],this.notClear=!0};var E=[];R.prototype.getBoundingRect=function(){if(!this._rect){for(var s=new Q(Infinity,Infinity,-Infinity,-Infinity),p=0;p<this._displayables.length;p++){var v=this._displayables[p],i=v.getBoundingRect().clone();v.needLocalTransform()&&i.applyTransform(v.getLocalTransform(E)),s.union(i)}this._rect=s}return this._rect},R.prototype.contain=function(s,p){var v=this.transformCoordToLocal(s,p),i=this.getBoundingRect();if(i.contain(v[0],v[1]))for(var A=0;A<this._displayables.length;A++){var O=this._displayables[A];if(O.contain(s,p))return!0}return!1},N(R,_);var S=R;Xe.exports=S},OZM5:function(Xe,pe,W){"use strict";W.d(pe,"b",function(){return v}),W.d(pe,"a",function(){return i}),W.d(pe,"k",function(){return A}),W.d(pe,"h",function(){return O}),W.d(pe,"i",function(){return w}),W.d(pe,"g",function(){return g}),W.d(pe,"c",function(){return C}),W.d(pe,"d",function(){return c}),W.d(pe,"j",function(){return m}),W.d(pe,"e",function(){return y}),W.d(pe,"f",function(){return T});var X=W("KQm4"),N=W("U8pU"),_=W("Ff2n"),Q=W("q1tI"),R=W.n(Q),E=W("Kwbf"),S=W("WaYH"),s=.25,p=2;function v(x,M){var b=x.slice(),o=b.indexOf(M);return o>=0&&b.splice(o,1),b}function i(x,M){var b=x.slice();return b.indexOf(M)===-1&&b.push(M),b}function A(x){return x.split("-")}function O(x,M){return"".concat(x,"-").concat(M)}function w(x){return x&&x.type&&x.type.isTreeNode}function g(x,M){var b=[x],o=M[x];function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.forEach(function(l){var L=l.key,B=l.children;b.push(L),r(B)})}return r(o.children),b}function C(x,M){var b=x.clientY,o=M.selectHandle.getBoundingClientRect(),r=o.top,n=o.bottom,l=o.height,L=Math.max(l*s,p);return b<=r+L?-1:b>=n-L?1:0}function c(x,M){if(!x)return;var b=M.multiple;return b?x.slice():x.length?[x[0]]:x}var a=function(M){return M};function u(x,M){if(!x)return[];var b=M||{},o=b.processProps,r=o===void 0?a:o,n=Array.isArray(x)?x:[x];return n.map(function(l){var L=l.children,B=Object(_.a)(l,["children"]),h=u(L,M);return R.a.createElement(S.a,Object.assign({},r(B)),h)})}function m(x){if(!x)return null;var M;if(Array.isArray(x))M={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(N.a)(x)==="object")M={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(E.a)(!1,"`checkedKeys` is not an array or an object"),null;return M}function y(x,M){var b=new Set;function o(r){if(b.has(r))return;var n=M[r];if(!n)return;b.add(r);var l=n.parent,L=n.node;if(L.disabled)return;l&&o(l.key)}return(x||[]).forEach(function(r){o(r)}),Object(X.a)(b)}function T(x){var M={};return Object.keys(x).forEach(function(b){(b.startsWith("data-")||b.startsWith("aria-"))&&(M[b]=x[b])}),M}},Ot1p:function(Xe,pe,W){"use strict";var X=W("2qtc"),N=W("kLXV"),_=W("rAM+"),Q=W("miYZ"),R=W("tsqr"),E=W("9og8"),S=W("tJVT"),s=W("jrin"),p=W("WmNS"),v=W.n(p),i=W("q1tI"),A=W.n(i),O=W("VrN/"),w=W.n(O),g=W("bdgK"),C=W("p77/"),c=W("Bd2K"),a=W("ELLl"),u=W("19Vz"),m=W("lZu9"),y=W("+NIl"),T=W("kSUc"),x=W("9Bee"),M=function(ht){var Lt=ht.value,st=Lt===void 0?"":Lt,rt=ht.className,et=ht.showTextOnly,Ce=ht.showLines,Ue=ht.style,ct=Ue===void 0?{}:Ue,at=Object(i.useMemo)(function(){return""},[st]);return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{dangerouslySetInnerHTML:{__html:at}}))},b=W("Q9mQ"),o=W("diRs"),r=W("0Owb"),n=W("dejd"),l=W("C+DQ"),L=W("D1Df"),B=W.n(L),h=W("1vsH"),I=W("m3rI"),H=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function z(ht){var Lt=ht.onActionCallback,st=ht.title,rt=ht.icon,et=ht.actionName,Ce=ht.className,Ue=Ce===void 0?"":Ce,ct=ht.children;function at(){Lt(et)}return A.a.createElement("a",{title:st,className:Ue,onClick:at},A.a.createElement("i",{className:"md-iconfont ".concat(rt)}),ct)}var Z=function(ht){var Lt=ht.watch,st=ht.showNullButton,rt=ht.onActionCallback,et=ht.fullScreen,Ce=ht.insertTemp,Ue=ht.hidetoolBar,ct=ht.uuid,at=ht.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(h.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.E)("_educoder_session"),"&key=").concat(ct,"&api=").concat(encodeURIComponent(I.a.PROXY_SERVER)));var Tt=[].concat(H,[{title:"".concat(Lt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Lt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return A.a.createElement("ul",{className:"markdown-toolbar-container"},!Ue&&Tt.map(function(Ct,qe){return A.a.createElement("li",{key:qe},Ct.actionName?A.a.createElement(z,Object(r.a)({},Ct,{onActionCallback:rt})):A.a.createElement("span",{className:"v-line"}))}),st?A.a.createElement("li",null,A.a.createElement(z,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:rt},A.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ce&&A.a.createElement("li",null,A.a.createElement(z,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ce),onActionCallback:rt},A.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),A.a.createElement("li",null,A.a.createElement(o.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:A.a.createElement("div",null,A.a.createElement(B.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(h.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.E)("_educoder_session"),"&key=").concat(ct,"&api=").concat(encodeURIComponent(I.a.PROXY_SERVER))}))},A.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return at(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),A.a.createElement("li",{className:"btn-full-screen"},A.a.createElement(z,{icon:"".concat(et?"icon-shrink":"icon-enlarge"),title:et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:rt})))},Y=W("M8RZ"),G=W("+L6B"),ee=W("2/Rp"),J=W("y8nQ"),oe=W("Vl3Y"),se=W("5NDa"),Te=W("5rEg"),be={labelCol:{span:4},wrapperCol:{span:20}},xe=function(ht){var Lt=ht.callback,st=ht.onCancel;function rt(et){Lt(et)}return A.a.createElement(oe.a,Object(r.a)({},be,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rt}),A.a.createElement(oe.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},A.a.createElement(Te.a,null)),A.a.createElement(oe.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},A.a.createElement(Te.a,null)),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(ee.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(ee.a,{type:"ghost",onClick:st},"\u53D6\u6D88")))},Oe=W("7ahc"),Ne=W("k1fw"),Le=W("HmJG"),Se=W("BjJ7"),tt=oe.a.useForm,Bt={width:280,marginRight:10},De={labelCol:{span:5},wrapperCol:{span:19}},Qe=function(ht){var Lt=ht.callback,st=ht.onCancel,rt=tt(),et=Object(S.a)(rt,1),Ce=et[0],Ue=Object(i.useRef)();function ct(Ct){Lt(Object(Ne.a)(Object(Ne.a)({},Ct),{},{name:Ue.current}))}function at(Ct,qe){Ce.setFieldsValue({src:"/api/attachments/".concat(Ct.id,"?type=").concat(Ct.content_type),type:qe.type})}function Tt(Ct){var qe=Ct.target.files[0];Ue.current=qe.name,Ae(qe,at)}return A.a.createElement(oe.a,Object(r.a)({form:Ce},De,{className:"upload-image-panel",onFinish:ct}),A.a.createElement(oe.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},A.a.createElement("div",{className:"flex-container"},A.a.createElement(oe.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},A.a.createElement(Te.a,{style:Bt})),A.a.createElement(it,{onFileChange:Tt}))),A.a.createElement(oe.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},A.a.createElement(Te.a,{style:{width:264}})),A.a.createElement(oe.a.Item,{style:{textAlign:"right"}},A.a.createElement(ee.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(ee.a,{type:"ghost",onClick:st},"\u53D6\u6D88")))};function it(ht){var Lt=ht.onFileChange;return A.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",A.a.createElement("input",{type:"file",onChange:Lt}))}function Ae(ht,Lt){if(!ht)throw new String("\u6CA1\u6709\u6587\u4EF6");var st=new FormData;st.append("editormd-image-file",ht),st.append("file_param_name","editormd-image-file"),st.append("byxhr","true");var rt=new window.XMLHttpRequest;rt.withCredentials=!0,rt.addEventListener("load",function(et){Lt(JSON.parse(et.target.responseText),ht)},!1),rt.addEventListener("error",function(et){console.error(et)},!1),rt.open("POST","".concat(Se.a,"/api/attachments.json")),rt.send(st)}var re=W("giR+"),ie=W("fyUT"),ce=W("7Kak"),Be=W("9yH6"),Re=Be.a.Group,ke={margin:"0 8px"},ft=function(ht){var Lt=ht.callback,st=ht.onCancel;function rt(et){Lt(et)}return A.a.createElement(oe.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rt},A.a.createElement("div",{className:"flex-container"},A.a.createElement("span",{style:ke},"\u5355\u5143\u683C\u6570\uFF1A"),A.a.createElement("span",{style:ke},"\u884C\u6570"),A.a.createElement(oe.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},A.a.createElement(ie.a,null)),A.a.createElement("span",{style:ke},"\u5217\u6570"),A.a.createElement(oe.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},A.a.createElement(ie.a,null))),A.a.createElement("div",{className:"flex-container",style:{marginTop:12}},A.a.createElement("span",{style:ke},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),A.a.createElement(oe.a.Item,{name:"align"},A.a.createElement(Re,null,A.a.createElement(Be.a,{value:"default"},A.a.createElement("i",{className:"fa fa-align-justify"})),A.a.createElement(Be.a,{value:"left"},A.a.createElement("i",{className:"fa fa-align-left"})),A.a.createElement(Be.a,{value:"center"},A.a.createElement("i",{className:"fa fa-align-center"})),A.a.createElement(Be.a,{value:"right"},A.a.createElement("i",{className:"fa fa-align-right"}))))),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(ee.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(ee.a,{type:"ghost",onClick:st},"\u53D6\u6D88")))},pt=W("ErOA"),bt=W("7Cbv"),yt="link",_t="upload-image",It="code-block",He="add-table",Pe="------------",At={default:Pe,left:":".concat(Pe),center:":".concat(Pe,":"),right:"".concat(Pe,":")},mt=W("9VGf"),Ze,ut;function Ke(){}var Ie=0,Me=1e4,me="\u2581",Ee=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function ge(ht){return/^\d+$/.test(ht)?"".concat(ht,"px"):ht}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,ze=we?"Cmd":"Ctrl",Je=["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"],Et=(Ze={},Object(s.a)(Ze,ze+"-B","bold"),Object(s.a)(Ze,ze+"-I","italic"),Ze),Ft=(ut={},Object(s.a)(ut,yt,"\u6DFB\u52A0\u94FE\u63A5"),Object(s.a)(ut,It,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(s.a)(ut,_t,"\u6DFB\u52A0\u6587\u4EF6"),Object(s.a)(ut,He,"\u6DFB\u52A0\u8868\u683C"),ut),Nt=pe.a=function(ht){var Lt=ht.defaultValue,st=Lt===void 0?"":Lt,rt=ht.onChange,et=ht.width,Ce=et===void 0?"100%":et,Ue=ht.height,ct=Ue===void 0?400:Ue,at=ht.miniToolbar,Tt=at===void 0?!1:at,Ct=ht.isFocus,qe=Ct===void 0?!1:Ct,St=ht.watch,Ht=ht.insertTemp,Pt=ht.mode,zt=Pt===void 0?"markdown":Pt,Ir=ht.id,Rr=Ir===void 0?"markdown-editor-id":Ir,yr=ht.showResizeBar,jt=yr===void 0?!1:yr,Mr=ht.noStorage,Wr=Mr===void 0?!1:Mr,Ur=ht.showNullButton,mr=Ur===void 0?!1:Ur,Sr=ht.hidetoolBar,Cn=Sr===void 0?!1:Sr,dn=ht.fullScreen,fe=dn===void 0?!1:dn,ye=ht.onBlur,Fe=ht.onCMBeforeChange,nt=ht.onFullScreen,$e=ht.className,Rt=$e===void 0?"":$e,$=ht.disablePaste,F=$===void 0?!1:$,P=ht.placeholder,q=P===void 0?"":P,le=ht.values,te=le===void 0?"":le,je=Object(i.useState)(null),xt=Object(S.a)(je,2),ot=xt[0],kt=xt[1],wt=Object(i.useState)(st),Yt=Object(S.a)(wt,2),Gt=Yt[0],Jt=Yt[1],hr=Object(i.useState)(St),Fr=Object(S.a)(hr,2),gr=Fr[0],Lr=Fr[1],fr=Object(i.useState)(fe),Hr=Object(S.a)(fr,2),Pr=Hr[0],on=Hr[1],Yr=Object(i.useState)(""),tn=Object(S.a)(Yr,2),sn=tn[0],Gr=tn[1],rn=Object(i.useState)(0),ln=Object(S.a)(rn,2),$r=ln[0],un=ln[1],Er=Object(i.useState)(ct),cr=Object(S.a)(Er,2),nr=cr[0],tr=cr[1],$t=Object(i.useState)(!1),vr=Object(S.a)($t,2),Cr=vr[0],_r=vr[1],wr=Object(i.useRef)(Object(bt.a)()),kn=Object(i.useRef)(!1),Vr=Object(i.useRef)(),nn=Object(i.useRef)(),Dn=Object(i.useRef)(),wn=Object(i.useRef)(),Jr=Object(i.useRef)(),Jn=function(){var er=Object(E.a)(v.a.mark(function Ar(){var lr,Or;return v.a.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:return Zr.next=2,Object(pt.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:wr.current}});case 2:Or=Zr.sent,Or!=null&&(lr=Or.attachments)!==null&&lr!==void 0&&lr.length&&(console.log("cm:",ot,nn),Or.attachments.map(function(Dr){Dr.content_type.indexOf("image")>-1?ot.replaceSelection(".concat(Dr.content_type,")")):Dr.content_type.indexOf("video")>-1?ot.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Dr.content_type.indexOf("pdf")>-1?ot.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,'&disposition=inline" target="_blank">').concat(Dr.name,"</a>")):ot.replaceSelection("[".concat(Dr.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,")"))}));case 4:case"end":return Zr.stop()}},Ar)}));return function(){return er.apply(this,arguments)}}();Object(i.useEffect)(function(){Jt(te),ot==null||ot.setValue(te)},[te]),Object(i.useEffect)(function(){nt==null||nt(Pr)},[Pr]),Object(i.useEffect)(function(){if(nn.current){var er=w.a.fromTextArea(nn.current,{mode:zt,lineNumbers:!Tt,lineWrapping:!0,value:st,autoCloseTags:!0,autoCloseBrackets:!0});qe&&er.focus();function Ar(lr,Or){if(F){Or.preventDefault();return}var Qr=Or.clipboardData;if(Qr){var Zr=Qr.types.toString(),Dr=Qr.items;if(Zr==="Files"||Qr.types.indexOf("Files")>-1){if(Or.preventDefault(),zt=="stex")return;try{var vn,Un=Dr[1];((vn=Dr[0])===null||vn===void 0?void 0:vn.kind)==="file"&&(Un=Dr[0]);var Nr=Un.getAsFile(),Pi=Nr.name.split(".").pop();Ae(Nr,function(dr){if(dr.id){var xr,Tr,_n;(Nr==null||((xr=Nr.type)===null||xr===void 0)?void 0:xr.indexOf("image"))>-1?er.replaceSelection(".concat(dr.content_type,")")):(Nr==null||((Tr=Nr.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,'"></video>')):(Nr==null||((_n=Nr.type)===null||_n===void 0)?void 0:_n.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(Nr.type,'&disposition=inline" target="_blank">').concat(Nr.name,"</a>")):Je.includes(Pi)?er.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,'?type=office&disposition=inline" target="_blank">').concat(Nr.name,"</a>")):er.replaceSelection("[".concat(Nr.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}else(dr==null?void 0:dr.status)===401&&(document.location.href="/user/login")})}catch(dr){R.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return er.on("paste",Ar),er.on("dragleave",function(lr,Or){Dn.current.classList.remove("mouse-hover-md")}),er.on("dragover",function(lr,Or){Dn.current.classList.add("mouse-hover-md")}),er.on("drop",function(lr,Or){Dn.current.classList.add("mouse-hover-md");var Qr;if(Qr=Or.dataTransfer.files,Qr.length>0){Or.preventDefault(),Or.stopPropagation();for(var Zr=function(Un){var Nr=Qr[Un],Pi=Nr.name.split(".").pop();Ae(Nr,function(dr){if(dr.id){var xr,Tr,_n;(Nr==null||((xr=Nr.type)===null||xr===void 0)?void 0:xr.indexOf("image"))>-1?er.replaceSelection(".concat(dr.content_type,")")):(Nr==null||((Tr=Nr.type)===null||Tr===void 0)?void 0:Tr.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,'"></video>')):(Nr==null||((_n=Nr.type)===null||_n===void 0)?void 0:_n.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(Nr.type,'&disposition=inline" target="_blank">').concat(Nr.name,"</a>")):Je.includes(Pi)?er.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,'?type=office&disposition=inline" target="_blank">').concat(Nr.name,"</a>")):er.replaceSelection("[".concat(Nr.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}else(dr==null?void 0:dr.status)===401&&(document.location.href="/user/login")})},Dr=0;Dr<Qr.length;Dr++)Zr(Dr)}}),kt(er),function(){er.off("paste",Ar)}}},[]);var In=Object(i.useCallback)(function(){if(Dn.current)try{}catch(er){console.log(er,"---- to set md editor body height")}},[nr,Dn,Pr]);Object(i.useEffect)(function(){function er(){var lr=new g.default(function(Or){var Qr=Object(_.a)(Or),Zr;try{for(Qr.s();!(Zr=Qr.n()).done;){var Dr=Zr.value;(Dr.target.offsetHeight>0||Dr.target.offsetWidth>0)&&(In(),ot.setSize("100%","100%"),ot.refresh())}}catch(vn){Qr.e(vn)}finally{Qr.f()}});return lr.observe(nn.current.parentElement),lr}if(ot){var Ar=er();return function(){Ar.unobserve(nn.current.parentElement)}}},[ot,In]),Object(i.useEffect)(function(){if(ot){for(var er=[],Ar=function(){var Dr=Or[lr];Qr=Object(S.a)(Dr,2);var vn=Qr[0],Un=Qr[1],Nr=Object(s.a)({},vn,function(){Vn(Un)});er.push(Nr),ot.addKeyMap(Nr)},lr=0,Or=Object.entries(Et);lr<Or.length;lr++){var Qr;Ar()}return Vr.current=setInterval(function(){kn.current&&Jn()},4e3),function(){clearInterval(Vr.current);var Zr=Object(_.a)(er),Dr;try{for(Zr.s();!(Dr=Zr.n()).done;){var vn=Dr.value;ot.removeKeyMap(vn)}}catch(Un){Zr.e(Un)}finally{Zr.f()}}}},[ot]),Object(i.useEffect)(function(){fe!==Pr&&on(fe)},[fe]),Object(mt.a)(function(){if(!Wr&&$r>0){var er=new Date().getTime(),Ar=window.sessionStorage.getItem(Rr);er>=$r+Me&&(!Ar||Ar!==Gt)&&(window.sessionStorage.setItem(Rr,Gt),_r(!0))}},Me),Object(i.useEffect)(function(){Lr(St)},[ot,St]),Object(i.useEffect)(function(){ot&&(qe&&ot.focus())},[ot,qe]),Object(i.useEffect)(function(){if(gr&&ot){var er=ot.getScrollerElement();function Ar(lr){var Or=lr.target;if(Jr.current){var Qr=Or.scrollTop/Or.scrollHeight;Jr.current.scrollTop=Jr.current.scrollHeight*Qr}}return er.addEventListener("scroll",Ar),function(){er.removeEventListener("scroll",Ar)}}},[ot,gr]),Object(i.useEffect)(function(){if(ot&&Fe){function er(Ar,lr){Fe(Ar,lr)}return ot.on("beforeChange",er),function(){ot.off("beforeChange",er)}}},[ot,Fe]),Object(i.useEffect)(function(){if(ot&&ye){function er(){ye(ot.getValue())}return ot.on("blur",er),function(){ot.off("blur",er)}}},[ot,ye]),Object(i.useEffect)(function(){if(ot){function er(Ar){var lr=Ar.getValue();Jt(lr),un(new Date().getTime()),Ar.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),rt&&rt(lr)}return ot.on("change",er),function(){ot.off("change",er)}}},[ot,rt]),Object(i.useEffect)(function(){ot&&(st==null?(ot.setValue(""),Jt("")):st!==ot.getValue()&&(ot.setValue(st),Jt(st),ot.setCursor(ot.lineCount(),0)))},[ot,st]);var Vn=Object(i.useCallback)(function(er){var Ar=ot.getCursor(),lr=ot.getSelection(),Or=lr.split(`
|
|
`);switch(er){case"bold":return ot.replaceSelection("**"+lr+"**"),lr===""&&ot.setCursor(Ar.line,Ar.ch+2),ot.focus();case"italic":return ot.replaceSelection("*"+lr+"*"),lr===""&&ot.setCursor(Ar.line,Ar.ch+1),ot.focus();case"code":return ot.replaceSelection("`"+lr+"`"),lr===""&&ot.setCursor(Ar.line,Ar.ch+1),ot.focus();case"inline-latex":return ot.replaceSelection("`$$"+lr+"$$`"),lr===""&&ot.setCursor(Ar.line,Ar.ch+3),ot.focus();case"latex":return ot.replaceSelection("```latex\n"+lr+"\n```"),ot.setCursor(Ar.line+1,lr.length+1),ot.focus();case"line-break":return ot.replaceSelection(`<br/>
|
|
`),ot.focus();case"list-ul":return lr===""?ot.replaceSelection("- "+lr):ot.replaceSelection(Or.map(function(Qr){return Qr===""?"":"- ".concat(Qr)}).join(`
|
|
`)),ot.focus();case"list-ol":return lr===""?ot.replaceSelection("1. "+lr):ot.replaceSelection(Or.map(function(Qr,Zr){return Qr===""?"":"".concat(Zr+1,". ").concat(Qr)}).join(`
|
|
`)),ot.focus();case"add-null-ch":return lr===""&&ot.setCursor(Ar.line,Ar.ch+1),ot.replaceSelection(me),ot.focus();case"inster-template-1":return lr===""&&ot.setCursor(Ar.line,Ar.ch),ot.replaceSelection(Ee),ot.focus();case"eraser":return ot.setValue(""),ot.focus();case"trigger-watch":return Lr(!gr),ot.focus();case"trigger-full-screen":return on(!Pr),ot.focus();case yt:Gr(yt);return;case It:Gr(It);return;case _t:Gr(_t);return;case He:Gr(He);return;default:throw new Error}},[ot,gr,Pr]),Rn=Object(i.useCallback)(function(er){Gr("");switch(sn){case yt:var Ar=er.title,lr=er.link;return ot.replaceSelection("[".concat(Ar,"](").concat(lr,")")),ot.focus();case It:var Or=er.language,Qr=er.content;return ot.replaceSelection(["```"+Or,Qr,"```"].join(`
|
|
`)),ot.focus();case _t:var Zr=er.src,Dr=er.alt,vn=er.name;return Zr.indexOf("type=image")>-1?ot.replaceSelection(".concat(Zr,' "').concat(Dr||"",'" )')):Zr.indexOf("type=application/pdf")>-1?ot.replaceSelection('<a href="'.concat(Zr,'&disposition=inline" target="_blank">').concat(vn,"</a>")):ot.replaceSelection('<a href="'.concat(Zr,'" target="_blank">').concat(vn,"</a>")),ot.focus();case He:for(var Un=er.row,Nr=er.col,Pi=er.align,dr=`
|
|
`,xr=0;xr<Un;xr++){for(var Tr=[],_n=[],xi=0;xi<Nr;xi++)xr===1&&_n.push(At[Pi]),Tr.push(" ");xr===1&&(dr+="| ".concat(_n.join(" | "),` |
|
|
`)),dr+="| ".concat(Tr.join(Nr===1?"":" | "),` |
|
|
`)}return ot.replaceSelection(dr+`
|
|
`),ot.focus();default:throw new Error}},[ot,sn]),si=Object(i.useMemo)(function(){switch(sn){case yt:return A.a.createElement(xe,{callback:Rn,onCancel:Ln});case It:return A.a.createElement(Oe.b,{callback:Rn,onCancel:Ln});case _t:return A.a.createElement(Qe,{callback:Rn,onCancel:Ln});case He:return A.a.createElement(ft,{callback:Rn,onCancel:Ln});default:return null}},[sn]);function Ln(){Gr("")}Object(i.useEffect)(function(){if(wn.current){var er=wn.current,Ar=!1,lr=0;function Or(Dr){Ar=!0,lr=Dr.pageY}function Qr(){Ar=!1}function Zr(Dr){if(Ar){var vn=Dr.pageY-lr;vn<0&&(vn=0),vn>300&&(vn=300);var Un=ct+vn+"px";tr(Un)}}return er.addEventListener("mousedown",Or),document.addEventListener("mousemove",Zr),document.addEventListener("mouseup",Qr),function(){er.removeEventListener("mousedown",Or),document.removeEventListener("mousemove",Zr),document.removeEventListener("mouseup",Qr)}}},[ot,wn]),Object(i.useEffect)(function(){tr(ct)},[ct]);var hn=ge(Ce),Nn=ge(nr),ui={width:hn,height:Nn},hi=Object(i.useMemo)(function(){if($r){var er=new Date($r),Ar=er.getHours(),lr=er.getMinutes(),Or=er.getSeconds();return Ar=Ar<10?"0"+Ar:Ar,lr=lr<10?"0"+lr:lr,Or=Or<10?"0"+Or:Or,"".concat(Ar,":").concat(lr,":").concat(Or)}return 0},[$r]);function gn(){window.sessionStorage.removeItem(Rr),_r(!1),un(0)}function Fn(){_r(!1),un(0),ot.setValue(window.sessionStorage.getItem(Rr))}function Zn(er,Ar){var lr=ot.getValue();lr=lr.replace(er,Ar),Jt(lr),ot==null||ot.setValue(lr)}return A.a.createElement(i.Fragment,null,A.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dn},A.a.createElement("div",{className:"markdown-editor-container ".concat(Rt," ").concat(gr?"on-preview":""," ").concat(Tt?"mini":""," ").concat(Pr?"full-screen":""),style:ui},A.a.createElement(Z,{insertTemp:Ht,watch:gr,fullScreen:Pr,showNullButton:mr,onActionCallback:Vn,hidetoolBar:Cn,uuid:wr.current,setOpenPhones:function(){kn.current=!0}}),A.a.createElement("div",{className:"markdown-editor-body"},A.a.createElement("div",{className:"codemirror-container"},A.a.createElement("textarea",{ref:nn,placeholder:q})),gr?A.a.createElement("div",{ref:Jr,className:"preview-container"},zt==="stex"&&A.a.createElement(M,{value:Gt}),zt!=="stex"&&A.a.createElement(x.a,{edit:!0,value:Gt,replaces:Zn})):null))),jt?A.a.createElement("a",{ref:wn,className:"editor-resize"}):null,A.a.createElement(Y.a,null,Ft[sn]?A.a.createElement(N.a,{centered:!0,title:Ft[sn],visible:!0,onCancel:Ln,footer:null},si):null))}},P47w:function(Xe,pe,W){var X=W("hydK"),N=X.createElement,_=W("IMiH"),Q=W("mFDi"),R=W("Fofx"),E=W("6GrX"),S=W("pzxd"),s=W("dqUG"),p=_.CMD,v=Array.prototype.join,i="none",A=Math.round,O=Math.sin,w=Math.cos,g=Math.PI,C=Math.PI*2,c=180/g,a=1e-4;function u(J){return A(J*1e4)/1e4}function m(J){return J<a&&J>-a}function y(J,oe){var se=oe?J.textFill:J.fill;return se!=null&&se!==i}function T(J,oe){var se=oe?J.textStroke:J.stroke;return se!=null&&se!==i}function x(J,oe){oe&&M(J,"transform","matrix("+v.call(oe,",")+")")}function M(J,oe,se){(!se||se.type!=="linear"&&se.type!=="radial")&&J.setAttribute(oe,se)}function b(J,oe,se){J.setAttributeNS("http://www.w3.org/1999/xlink",oe,se)}function o(J,oe,se,Te){if(y(oe,se)){var be=se?oe.textFill:oe.fill;be=be==="transparent"?i:be,M(J,"fill",be),M(J,"fill-opacity",oe.fillOpacity!=null?oe.fillOpacity*oe.opacity:oe.opacity)}else M(J,"fill",i);if(T(oe,se)){var xe=se?oe.textStroke:oe.stroke;xe=xe==="transparent"?i:xe,M(J,"stroke",xe);var Oe=se?oe.textStrokeWidth:oe.lineWidth,Ne=!se&&oe.strokeNoScale?Te.getLineScale():1;M(J,"stroke-width",Oe/Ne),M(J,"paint-order",se?"stroke":"fill"),M(J,"stroke-opacity",oe.strokeOpacity!=null?oe.strokeOpacity:oe.opacity);var Le=oe.lineDash;Le?(M(J,"stroke-dasharray",oe.lineDash.join(",")),M(J,"stroke-dashoffset",A(oe.lineDashOffset||0))):M(J,"stroke-dasharray",""),oe.lineCap&&M(J,"stroke-linecap",oe.lineCap),oe.lineJoin&&M(J,"stroke-linejoin",oe.lineJoin),oe.miterLimit&&M(J,"stroke-miterlimit",oe.miterLimit)}else M(J,"stroke",i)}function r(J){for(var oe=[],se=J.data,Te=J.len(),be=0;be<Te;){var xe=se[be++],Oe="",Ne=0;switch(xe){case p.M:Oe="M",Ne=2;break;case p.L:Oe="L",Ne=2;break;case p.Q:Oe="Q",Ne=4;break;case p.C:Oe="C",Ne=6;break;case p.A:var Le=se[be++],Se=se[be++],tt=se[be++],Bt=se[be++],De=se[be++],Qe=se[be++],it=se[be++],Ae=se[be++],re=Math.abs(Qe),ie=m(re-C)||(Ae?Qe>=C:-Qe>=C),ce=Qe>0?Qe%C:Qe%C+C,Be=!1;ie?Be=!0:m(re)?Be=!1:Be=ce>=g===!!Ae;var Re=u(Le+tt*w(De)),ke=u(Se+Bt*O(De));ie&&(Ae?Qe=C-1e-4:Qe=-C+1e-4,Be=!0,be===9&&oe.push("M",Re,ke));var ft=u(Le+tt*w(De+Qe)),pt=u(Se+Bt*O(De+Qe));oe.push("A",u(tt),u(Bt),A(it*c),+Be,+Ae,ft,pt);break;case p.Z:Oe="Z";break;case p.R:var ft=u(se[be++]),pt=u(se[be++]),bt=u(se[be++]),yt=u(se[be++]);oe.push("M",ft,pt,"L",ft+bt,pt,"L",ft+bt,pt+yt,"L",ft,pt+yt,"L",ft,pt);break}Oe&&oe.push(Oe);for(var _t=0;_t<Ne;_t++)oe.push(u(se[be++]))}return oe.join(" ")}var n={};n.brush=function(J){var oe=J.style,se=J.__svgEl;se||(se=N("path"),J.__svgEl=se),J.path||J.createPathProxy();var Te=J.path;if(J.__dirtyPath){Te.beginPath(),Te.subPixelOptimize=!1,J.buildPath(Te,J.shape),J.__dirtyPath=!1;var be=r(Te);be.indexOf("NaN")<0&&M(se,"d",be)}o(se,oe,!1,J),x(se,J.transform),oe.text!=null?z(J,J.getBoundingRect()):ee(J)};var l={};l.brush=function(J){var oe=J.style,se=oe.image;if(se instanceof HTMLImageElement){var Te=se.src;se=Te}if(!se)return;var be=oe.x||0,xe=oe.y||0,Oe=oe.width,Ne=oe.height,Le=J.__svgEl;Le||(Le=N("image"),J.__svgEl=Le),se!==J.__imageSrc&&(b(Le,"href",se),J.__imageSrc=se),M(Le,"width",Oe),M(Le,"height",Ne),M(Le,"x",be),M(Le,"y",xe),x(Le,J.transform),oe.text!=null?z(J,J.getBoundingRect()):ee(J)};var L={},B=new Q,h={},I=[],H={left:"start",right:"end",center:"middle",middle:"middle"},z=function(J,oe){var se=J.style,Te=J.transform,be=J instanceof s||se.transformText;J.__dirty&&S.normalizeTextStyle(se,!0);var xe=se.text;if(xe!=null&&(xe+=""),!S.needDrawText(xe,se))return;xe==null&&(xe=""),!be&&Te&&(B.copy(oe),B.applyTransform(Te),oe=B);var Oe=J.__textSvgEl;Oe||(Oe=N("text"),J.__textSvgEl=Oe);var Ne=Oe.style,Le=se.font||E.DEFAULT_FONT,Se=Oe.__computedFont;Le!==Oe.__styleFont&&(Ne.font=Oe.__styleFont=Le,Se=Oe.__computedFont=Ne.font);var tt=se.textPadding,Bt=se.textLineHeight,De=J.__textCotentBlock;(!De||J.__dirtyText)&&(De=J.__textCotentBlock=E.parsePlainText(xe,Se,tt,Bt,se.truncate));var Qe=De.outerHeight,it=De.lineHeight;S.getBoxPosition(h,J,se,oe);var Ae=h.baseX,re=h.baseY,ie=h.textAlign||"left",ce=h.textVerticalAlign;Z(Oe,be,Te,se,oe,Ae,re);var Be=E.adjustTextY(re,Qe,ce),Re=Ae,ke=Be;tt&&(Re=Y(Ae,ie,tt),ke+=tt[0]),ke+=it/2,o(Oe,se,!0,J);var ft=De.canCacheByTextString,pt=J.__tspanList||(J.__tspanList=[]),bt=pt.length;if(ft&&J.__canCacheByTextString&&J.__text===xe){if(J.__dirtyText&&bt)for(var yt=0;yt<bt;++yt)G(pt[yt],ie,Re,ke+yt*it)}else{J.__text=xe,J.__canCacheByTextString=ft;for(var _t=De.lines,It=_t.length,yt=0;yt<It;yt++){var He=pt[yt],Pe=_t[yt];He?He.__zrText!==Pe&&(He.innerHTML="",He.appendChild(document.createTextNode(Pe))):(He=pt[yt]=N("tspan"),Oe.appendChild(He),He.appendChild(document.createTextNode(Pe))),G(He,ie,Re,ke+yt*it)}if(bt>It){for(;yt<bt;yt++)Oe.removeChild(pt[yt]);pt.length=It}}};function Z(J,oe,se,Te,be,xe,Oe){R.identity(I),oe&&se&&R.copy(I,se);var Ne=Te.textRotation;if(be&&Ne){var Le=Te.textOrigin;Le==="center"?(xe=be.width/2+be.x,Oe=be.height/2+be.y):Le&&(xe=Le[0]+be.x,Oe=Le[1]+be.y),I[4]-=xe,I[5]-=Oe,R.rotate(I,I,Ne),I[4]+=xe,I[5]+=Oe}x(J,I)}function Y(J,oe,se){return oe==="right"?J-se[1]:oe==="center"?J+se[3]/2-se[1]/2:J+se[3]}function G(J,oe,se,Te){M(J,"dominant-baseline","middle"),M(J,"text-anchor",H[oe]),M(J,"x",se),M(J,"y",Te)}function ee(J){J&&J.__textSvgEl&&(J.__textSvgEl.parentNode&&J.__textSvgEl.parentNode.removeChild(J.__textSvgEl),J.__textSvgEl=null,J.__tspanList=[],J.__text=null)}L.drawRectText=z,L.brush=function(J){var oe=J.style;oe.text!=null?z(J,!1):ee(J)},pe.path=n,pe.image=l,pe.text=L},P4Qj:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.removeSensor=pe.getSensor=void 0;var X=Q(W("chpo")),N=W("FxDU"),_=W("24YM");function Q(s){return s&&s.__esModule?s:{default:s}}var R={},E=function(p){var v=p.getAttribute(_.SizeSensorId);if(v&&R[v])return R[v];var i=(0,X.default)();p.setAttribute(_.SizeSensorId,i);var A=(0,N.createSensor)(p);return R[i]=A,A};pe.getSensor=E;var S=function(p){var v=p.element.getAttribute(_.SizeSensorId);p.element.removeAttribute(_.SizeSensorId),p.destroy(),v&&R[v]&&delete R[v]};pe.removeSensor=S},QBsz:function(Xe,pe){var W=typeof Float32Array=="undefined"?Array:Float32Array;function X(o,r){var n=new W(2);return o==null&&(o=0),r==null&&(r=0),n[0]=o,n[1]=r,n}function N(o,r){return o[0]=r[0],o[1]=r[1],o}function _(o){var r=new W(2);return r[0]=o[0],r[1]=o[1],r}function Q(o,r,n){return o[0]=r,o[1]=n,o}function R(o,r,n){return o[0]=r[0]+n[0],o[1]=r[1]+n[1],o}function E(o,r,n,l){return o[0]=r[0]+n[0]*l,o[1]=r[1]+n[1]*l,o}function S(o,r,n){return o[0]=r[0]-n[0],o[1]=r[1]-n[1],o}function s(o){return Math.sqrt(v(o))}var p=s;function v(o){return o[0]*o[0]+o[1]*o[1]}var i=v;function A(o,r,n){return o[0]=r[0]*n[0],o[1]=r[1]*n[1],o}function O(o,r,n){return o[0]=r[0]/n[0],o[1]=r[1]/n[1],o}function w(o,r){return o[0]*r[0]+o[1]*r[1]}function g(o,r,n){return o[0]=r[0]*n,o[1]=r[1]*n,o}function C(o,r){var n=s(r);return n===0?(o[0]=0,o[1]=0):(o[0]=r[0]/n,o[1]=r[1]/n),o}function c(o,r){return Math.sqrt((o[0]-r[0])*(o[0]-r[0])+(o[1]-r[1])*(o[1]-r[1]))}var a=c;function u(o,r){return(o[0]-r[0])*(o[0]-r[0])+(o[1]-r[1])*(o[1]-r[1])}var m=u;function y(o,r){return o[0]=-r[0],o[1]=-r[1],o}function T(o,r,n,l){return o[0]=r[0]+l*(n[0]-r[0]),o[1]=r[1]+l*(n[1]-r[1]),o}function x(o,r,n){var l=r[0],L=r[1];return o[0]=n[0]*l+n[2]*L+n[4],o[1]=n[1]*l+n[3]*L+n[5],o}function M(o,r,n){return o[0]=Math.min(r[0],n[0]),o[1]=Math.min(r[1],n[1]),o}function b(o,r,n){return o[0]=Math.max(r[0],n[0]),o[1]=Math.max(r[1],n[1]),o}pe.create=X,pe.copy=N,pe.clone=_,pe.set=Q,pe.add=R,pe.scaleAndAdd=E,pe.sub=S,pe.len=s,pe.length=p,pe.lenSquare=v,pe.lengthSquare=i,pe.mul=A,pe.div=O,pe.dot=w,pe.scale=g,pe.normalize=C,pe.distance=c,pe.dist=a,pe.distanceSquare=u,pe.distSquare=m,pe.negate=y,pe.lerp=T,pe.applyTransform=x,pe.min=M,pe.max=b},"QO+J":function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var X=_(W("NohK")),N=W("24YM");function _(R){return R&&R.__esModule?R:{default:R}}var Q=function(E){var S=void 0,s=[],p=function(){getComputedStyle(E).position==="static"&&(E.style.position="relative");var g=document.createElement("object");return g.onload=function(){g.contentDocument.defaultView.addEventListener("resize",v),v()},g.style.display="block",g.style.position="absolute",g.style.top="0",g.style.left="0",g.style.height="100%",g.style.width="100%",g.style.overflow="hidden",g.style.pointerEvents="none",g.style.zIndex="-1",g.style.opacity="0",g.setAttribute("class",N.SensorClassName),g.setAttribute("tabindex",N.SensorTabIndex),g.type="text/html",E.appendChild(g),g.data="about:blank",g},v=(0,X.default)(function(){s.forEach(function(w){w(E)})}),i=function(g){S||(S=p()),s.indexOf(g)===-1&&s.push(g)},A=function(){S&&S.parentNode&&(S.contentDocument&&S.contentDocument.defaultView.removeEventListener("resize",v),S.parentNode.removeChild(S),S=void 0,s=[])},O=function(g){var C=s.indexOf(g);C!==-1&&s.splice(C,1),s.length===0&&S&&A()};return{element:E,bind:i,destroy:A,unbind:O}};pe.createSensor=Q},Qe9p:function(Xe,pe,W){var X=W("1RvN"),N={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _(r){return r=Math.round(r),r<0?0:r>255?255:r}function Q(r){return r=Math.round(r),r<0?0:r>360?360:r}function R(r){return r<0?0:r>1?1:r}function E(r){return r.length&&r.charAt(r.length-1)==="%"?_(parseFloat(r)/100*255):_(parseInt(r,10))}function S(r){return r.length&&r.charAt(r.length-1)==="%"?R(parseFloat(r)/100):R(parseFloat(r))}function s(r,n,l){return l<0?l+=1:l>1&&(l-=1),l*6<1?r+(n-r)*l*6:l*2<1?n:l*3<2?r+(n-r)*(2/3-l)*6:r}function p(r,n,l){return r+(n-r)*l}function v(r,n,l,L,B){return r[0]=n,r[1]=l,r[2]=L,r[3]=B,r}function i(r,n){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r}var A=new X(20),O=null;function w(r,n){O&&i(O,n),O=A.put(r,O||n.slice())}function g(r,n){if(!r)return;n=n||[];var l=A.get(r);if(l)return i(n,l);r=r+"";var L=r.replace(/ /g,"").toLowerCase();if(L in N)return i(n,N[L]),w(r,n),n;if(L.charAt(0)==="#"){if(L.length===4){var B=parseInt(L.substr(1),16);if(!(B>=0&&B<=4095)){v(n,0,0,0,1);return}return v(n,(B&3840)>>4|(B&3840)>>8,B&240|(B&240)>>4,B&15|(B&15)<<4,1),w(r,n),n}else if(L.length===7){var B=parseInt(L.substr(1),16);if(!(B>=0&&B<=16777215)){v(n,0,0,0,1);return}return v(n,(B&16711680)>>16,(B&65280)>>8,B&255,1),w(r,n),n}return}var h=L.indexOf("("),I=L.indexOf(")");if(h!==-1&&I+1===L.length){var H=L.substr(0,h),z=L.substr(h+1,I-(h+1)).split(","),Z=1;switch(H){case"rgba":if(z.length!==4){v(n,0,0,0,1);return}Z=S(z.pop());case"rgb":if(z.length!==3){v(n,0,0,0,1);return}return v(n,E(z[0]),E(z[1]),E(z[2]),Z),w(r,n),n;case"hsla":if(z.length!==4){v(n,0,0,0,1);return}return z[3]=S(z[3]),C(z,n),w(r,n),n;case"hsl":if(z.length!==3){v(n,0,0,0,1);return}return C(z,n),w(r,n),n;default:return}}v(n,0,0,0,1);return}function C(r,n){var l=(parseFloat(r[0])%360+360)%360/360,L=S(r[1]),B=S(r[2]),h=B<=.5?B*(L+1):B+L-B*L,I=B*2-h;return n=n||[],v(n,_(s(I,h,l+1/3)*255),_(s(I,h,l)*255),_(s(I,h,l-1/3)*255),1),r.length===4&&(n[3]=r[3]),n}function c(r){if(!r)return;var n=r[0]/255,l=r[1]/255,L=r[2]/255,B=Math.min(n,l,L),h=Math.max(n,l,L),I=h-B,H=(h+B)/2,z,Z;if(I===0)z=0,Z=0;else{H<.5?Z=I/(h+B):Z=I/(2-h-B);var Y=((h-n)/6+I/2)/I,G=((h-l)/6+I/2)/I,ee=((h-L)/6+I/2)/I;n===h?z=ee-G:l===h?z=1/3+Y-ee:L===h&&(z=2/3+G-Y),z<0&&(z+=1),z>1&&(z-=1)}var J=[z*360,Z,H];return r[3]!=null&&J.push(r[3]),J}function a(r,n){var l=g(r);if(l){for(var L=0;L<3;L++)n<0?l[L]=l[L]*(1-n)|0:l[L]=(255-l[L])*n+l[L]|0,l[L]>255?l[L]=255:r[L]<0&&(l[L]=0);return o(l,l.length===4?"rgba":"rgb")}}function u(r){var n=g(r);if(n)return((1<<24)+(n[0]<<16)+(n[1]<<8)+ +n[2]).toString(16).slice(1)}function m(r,n,l){if(!(n&&n.length)||!(r>=0&&r<=1))return;l=l||[];var L=r*(n.length-1),B=Math.floor(L),h=Math.ceil(L),I=n[B],H=n[h],z=L-B;return l[0]=_(p(I[0],H[0],z)),l[1]=_(p(I[1],H[1],z)),l[2]=_(p(I[2],H[2],z)),l[3]=R(p(I[3],H[3],z)),l}var y=m;function T(r,n,l){if(!(n&&n.length)||!(r>=0&&r<=1))return;var L=r*(n.length-1),B=Math.floor(L),h=Math.ceil(L),I=g(n[B]),H=g(n[h]),z=L-B,Z=o([_(p(I[0],H[0],z)),_(p(I[1],H[1],z)),_(p(I[2],H[2],z)),R(p(I[3],H[3],z))],"rgba");return l?{color:Z,leftIndex:B,rightIndex:h,value:L}:Z}var x=T;function M(r,n,l,L){if(r=g(r),r)return r=c(r),n!=null&&(r[0]=Q(n)),l!=null&&(r[1]=S(l)),L!=null&&(r[2]=S(L)),o(C(r),"rgba")}function b(r,n){if(r=g(r),r&&n!=null)return r[3]=R(n),o(r,"rgba")}function o(r,n){if(!r||!r.length)return;var l=r[0]+","+r[1]+","+r[2];return(n==="rgba"||n==="hsva"||n==="hsla")&&(l+=","+r[3]),n+"("+l+")"}pe.parse=g,pe.lift=a,pe.toHex=u,pe.fastLerp=m,pe.fastMapToColor=y,pe.lerp=T,pe.mapToColor=x,pe.modifyHSL=M,pe.modifyAlpha=b,pe.stringify=o},QuXc:function(Xe,pe){var W=function(N){this.colorStops=N||[]};W.prototype={constructor:W,addColorStop:function(N,_){this.colorStops.push({offset:N,color:_})}};var X=W;Xe.exports=X},RDYZ:function(Xe,pe,W){var X=W("dMvE");function N(Q){this._target=Q.target,this._life=Q.life||1e3,this._delay=Q.delay||0,this._initialized=!1,this.loop=Q.loop==null?!1:Q.loop,this.gap=Q.gap||0,this.easing=Q.easing||"Linear",this.onframe=Q.onframe,this.ondestroy=Q.ondestroy,this.onrestart=Q.onrestart,this._pausedTime=0,this._paused=!1}N.prototype={constructor:N,step:function(Q,R){if(this._initialized||(this._startTime=Q+this._delay,this._initialized=!0),this._paused){this._pausedTime+=R;return}var E=(Q-this._startTime-this._pausedTime)/this._life;if(E<0)return;E=Math.min(E,1);var S=this.easing,s=typeof S=="string"?X[S]:S,p=typeof s=="function"?s(E):E;return this.fire("frame",p),E===1?this.loop?(this.restart(Q),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(Q){var R=(Q-this._startTime-this._pausedTime)%this._life;this._startTime=Q-R+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(Q,R){Q="on"+Q,this[Q]&&this[Q](this._target,R)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var _=N;Xe.exports=_},RXMa:function(Xe,pe,W){var X=W("y+Vt"),N=X.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(_,Q){var R=Q.cx,E=Q.cy,S=Math.PI*2;_.moveTo(R+Q.r,E),_.arc(R,E,Q.r,0,S,!1),_.moveTo(R+Q.r0,E),_.arc(R,E,Q.r0,0,S,!0)}});Xe.exports=N},"SA+Z":function(Xe,pe,W){var X=W("wTVA"),N=W("EbDI"),_=W("ZhPi"),Q=W("wkBT");function R(E){return X(E)||N(E)||_(E)||Q()}Xe.exports=R,Xe.exports.__esModule=!0,Xe.exports.default=Xe.exports},SJMd:function(Xe,pe){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var W,X,N,_=!1,Q,R;window.PR_SHOULD_USE_CONTINUATION=!0;var E,S;(function(){var s=window,p=["break,continue,do,else,for,if,return,while"],v=[p,"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"],i=[v,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[i,"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"],O=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],w=[i,"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"],g="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",C=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],c="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",a=[p,"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"],u=[p,"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"],m=[p,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[A,w,O,C,c,a,u,m],T=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",M="kwd",b="com",o="typ",r="lit",n="pun",l="pln",L="tag",B="dec",h="src",I="atn",H="atv",z="nocode",Z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Y(Ae){for(var re=0,ie=!1,ce=!1,Be=0,Re=Ae.length;Be<Re;++Be){var ke=Ae[Be];if(ke.ignoreCase)ce=!0;else if(/[a-z]/i.test(ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ie=!0,ce=!1;break}}var ft={b:8,t:9,n:10,v:11,f:12,r:13};function pt(He){var Pe=He.charCodeAt(0);if(Pe!==92)return Pe;var At=He.charAt(1);return Pe=ft[At],Pe||("0"<=At&&At<="7"?parseInt(He.substring(1),8):At==="u"||At==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function bt(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var Pe=String.fromCharCode(He);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function yt(He){var Pe=He.substring(1,He.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")),At=[],mt=Pe[0]==="^",Ze=["["];mt&&Ze.push("^");for(var ut=mt?1:0,Ke=Pe.length;ut<Ke;++ut){var Ie=Pe[ut];if(/\\[bdsw]/i.test(Ie))Ze.push(Ie);else{var Me=pt(Ie),me;ut+2<Ke&&Pe[ut+1]==="-"?(me=pt(Pe[ut+2]),ut+=2):me=Me,At.push([Me,me]),me<65||Me>122||(me<65||Me>90||At.push([Math.max(65,Me)|32,Math.min(me,90)|32]),me<97||Me>122||At.push([Math.max(97,Me)&~32,Math.min(me,122)&~32]))}}At.sort(function(ze,Je){return ze[0]-Je[0]||Je[1]-ze[1]});for(var Ee=[],ge=[],ut=0;ut<At.length;++ut){var we=At[ut];we[0]<=ge[1]+1?ge[1]=Math.max(ge[1],we[1]):Ee.push(ge=we)}for(var ut=0;ut<Ee.length;++ut){var we=Ee[ut];Ze.push(bt(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&Ze.push("-"),Ze.push(bt(we[1])))}return Ze.push("]"),Ze.join("")}function _t(He){for(var Pe=He.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")),At=Pe.length,mt=[],Ze=0,ut=0;Ze<At;++Ze){var Ke=Pe[Ze];if(Ke==="(")++ut;else if(Ke.charAt(0)==="\\"){var Ie=+Ke.substring(1);Ie&&(Ie<=ut?mt[Ie]=-1:Pe[Ze]=bt(Ie))}}for(var Ze=1;Ze<mt.length;++Ze)mt[Ze]===-1&&(mt[Ze]=++re);for(var Ze=0,ut=0;Ze<At;++Ze){var Ke=Pe[Ze];if(Ke==="(")++ut,mt[ut]||(Pe[Ze]="(?:");else if(Ke.charAt(0)==="\\"){var Ie=+Ke.substring(1);Ie&&Ie<=ut&&(Pe[Ze]="\\"+mt[Ie])}}for(var Ze=0;Ze<At;++Ze)Pe[Ze]==="^"&&Pe[Ze+1]!=="^"&&(Pe[Ze]="");if(He.ignoreCase&&ie)for(var Ze=0;Ze<At;++Ze){var Ke=Pe[Ze],Me=Ke.charAt(0);Ke.length>=2&&Me==="["?Pe[Ze]=yt(Ke):Me!=="\\"&&(Pe[Ze]=Ke.replace(/[a-zA-Z]/g,function(ge){var we=ge.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return Pe.join("")}for(var It=[],Be=0,Re=Ae.length;Be<Re;++Be){var ke=Ae[Be];if(ke.global||ke.multiline)throw new Error(""+ke);It.push("(?:"+_t(ke)+")")}return new RegExp(It.join("|"),ce?"gi":"g")}function G(Ae,re){var ie=/(?:^|\s)nocode(?:\s|$)/,ce=[],Be=0,Re=[],ke=0;function ft(pt){var bt=pt.nodeType;if(bt==1){if(ie.test(pt.className))return;for(var yt=pt.firstChild;yt;yt=yt.nextSibling)ft(yt);var _t=pt.nodeName.toLowerCase();(_t==="br"||_t==="li")&&(ce[ke]=`
|
|
`,Re[ke<<1]=Be++,Re[ke++<<1|1]=pt)}else if(bt==3||bt==4){var It=pt.nodeValue;It.length&&(re?It=It.replace(/\r\n?/g,`
|
|
`):It=It.replace(/[ \t\r\n]+/g," "),ce[ke]=It,Re[ke<<1]=Be,Be+=It.length,Re[ke++<<1|1]=pt)}}return ft(Ae),{sourceCode:ce.join("").replace(/\n$/,""),spans:Re}}function ee(Ae,re,ie,ce,Be){if(!ie)return;var Re={sourceNode:Ae,pre:1,langExtension:null,numberLines:null,sourceCode:ie,spans:null,basePos:re,decorations:null};ce(Re),Be.push.apply(Be,Re.decorations)}var J=/\S/;function oe(Ae){for(var re=void 0,ie=Ae.firstChild;ie;ie=ie.nextSibling){var ce=ie.nodeType;re=ce===1?re?Ae:ie:ce===3&&J.test(ie.nodeValue)?Ae:re}return re===Ae?void 0:re}function se(Ae,re){var ie={},ce;(function(){for(var ke=Ae.concat(re),ft=[],pt={},bt=0,yt=ke.length;bt<yt;++bt){var _t=ke[bt],It=_t[3];if(It)for(var He=It.length;--He>=0;)ie[It.charAt(He)]=_t;var Pe=_t[1],At=""+Pe;pt.hasOwnProperty(At)||(ft.push(Pe),pt[At]=null)}ft.push(/[\0-\uffff]/),ce=Y(ft)})();var Be=re.length,Re=function(ke){for(var ft=ke.sourceCode,pt=ke.basePos,bt=ke.sourceNode,yt=[pt,l],_t=0,It=ft.match(ce)||[],He={},Pe=0,At=It.length;Pe<At;++Pe){var mt=It[Pe],Ze=He[mt],ut=void 0,Ke;if(typeof Ze=="string")Ke=!1;else{var Ie=ie[mt.charAt(0)];if(Ie)ut=mt.match(Ie[1]),Ze=Ie[0];else{for(var Me=0;Me<Be;++Me)if(Ie=re[Me],ut=mt.match(Ie[1]),ut){Ze=Ie[0];break}ut||(Ze=l)}Ke=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ke&&!(ut&&typeof ut[1]=="string")&&(Ke=!1,Ze=h),Ke||(He[mt]=Ze)}var me=_t;if(_t+=mt.length,!Ke)yt.push(pt+me,Ze);else{var Ee=ut[1],ge=mt.indexOf(Ee),we=ge+Ee.length;ut[2]&&(we=mt.length-ut[2].length,ge=we-Ee.length);var ze=Ze.substring(5);ee(bt,pt+me,mt.substring(0,ge),Re,yt),ee(bt,pt+me+ge,Ee,Se(ze,Ee),yt),ee(bt,pt+me+we,mt.substring(we),Re,yt)}}ke.decorations=yt};return Re}function Te(Ae){var re=[],ie=[];Ae.tripleQuotedStrings?re.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?re.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):re.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&ie.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=Ae.hashComments;ce&&(Ae.cStyleComments?(ce>1?re.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):re.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ie.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):re.push([b,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(ie.push([b,/^\/\/[^\r\n]*/,null]),ie.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Be=Ae.regexLiterals;if(Be){var Re=Be>1?"":`
|
|
\r`,ke=Re?".":"[\\S\\s]",ft="/(?=[^/*"+Re+"])(?:[^/\\x5B\\x5C"+Re+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Re+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";ie.push(["lang-regex",RegExp("^"+Z+"("+ft+")")])}var pt=Ae.types;pt&&ie.push([o,pt]);var bt=(""+Ae.keywords).replace(/^ | $/g,"");bt.length&&ie.push([M,new RegExp("^(?:"+bt.replace(/[\s,]+/g,"|")+")\\b"),null]),re.push([l,/^\s+/,null,` \r
|
|
\xA0`]);var yt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(yt+="(?!s*/)"),ie.push([r,/^@[a-z_$][a-z_$@0-9]*/i,null],[o,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[r,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[n,new RegExp(yt),null]),se(re,ie)}var be=Te({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(Ae,re,ie){for(var ce=/(?:^|\s)nocode(?:\s|$)/,Be=/\r\n?|\n/,Re=Ae.ownerDocument,ke=Re.createElement("li");Ae.firstChild;)ke.appendChild(Ae.firstChild);var ft=[ke];function pt(Pe){var At=Pe.nodeType;if(At==1&&!ce.test(Pe.className))if(Pe.nodeName==="br")bt(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var mt=Pe.firstChild;mt;mt=mt.nextSibling)pt(mt);else if((At==3||At==4)&&ie){var Ze=Pe.nodeValue,ut=Ze.match(Be);if(ut){var Ke=Ze.substring(0,ut.index);Pe.nodeValue=Ke;var Ie=Ze.substring(ut.index+ut[0].length);if(Ie){var Me=Pe.parentNode;Me.insertBefore(Re.createTextNode(Ie),Pe.nextSibling)}bt(Pe),Ke||Pe.parentNode.removeChild(Pe)}}}function bt(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function At(ut,Ke){var Ie=Ke?ut.cloneNode(!1):ut,Me=ut.parentNode;if(Me){var me=At(Me,1),Ee=ut.nextSibling;me.appendChild(Ie);for(var ge=Ee;ge;ge=Ee)Ee=ge.nextSibling,me.appendChild(ge)}return Ie}for(var mt=At(Pe.nextSibling,0),Ze;(Ze=mt.parentNode)&&Ze.nodeType===1;)mt=Ze;ft.push(mt)}for(var yt=0;yt<ft.length;++yt)pt(ft[yt]);re===(re|0)&&ft[0].setAttribute("value",re);var _t=Re.createElement("ol");_t.className="linenums";for(var It=Math.max(0,re-1|0)||0,yt=0,He=ft.length;yt<He;++yt)ke=ft[yt],ke.className="L"+(yt+It)%10,ke.firstChild||ke.appendChild(Re.createTextNode("\xA0")),_t.appendChild(ke);Ae.appendChild(_t)}function Oe(Ae){var re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);re=re&&+re[1]<=8;var ie=/\n/g,ce=Ae.sourceCode,Be=ce.length,Re=0,ke=Ae.spans,ft=ke.length,pt=0,bt=Ae.decorations,yt=bt.length,_t=0;bt[yt]=Be;var It,He;for(He=It=0;He<yt;)bt[He]!==bt[He+2]?(bt[It++]=bt[He++],bt[It++]=bt[He++]):He+=2;for(yt=It,He=It=0;He<yt;){for(var Pe=bt[He],At=bt[He+1],mt=He+2;mt+2<=yt&&bt[mt+1]===At;)mt+=2;bt[It++]=Pe,bt[It++]=At,He=mt}yt=bt.length=It;var Ze=Ae.sourceNode,ut="";Ze&&(ut=Ze.style.display,Ze.style.display="none");try{for(var Ke=null;pt<ft;){var Ie=ke[pt],Me=ke[pt+2]||Be,me=bt[_t+2]||Be,mt=Math.min(Me,me),Ee=ke[pt+1],ge;if(Ee.nodeType!==1&&(ge=ce.substring(Re,mt))){re&&(ge=ge.replace(ie,"\r")),Ee.nodeValue=ge;var we=Ee.ownerDocument,ze=we.createElement("span");ze.className=bt[_t+1];var Je=Ee.parentNode;Je.replaceChild(ze,Ee),ze.appendChild(Ee),Re<Me&&(ke[pt+1]=Ee=we.createTextNode(ce.substring(mt,Me)),Je.insertBefore(Ee,ze.nextSibling))}Re=mt,Re>=Me&&(pt+=2),Re>=me&&(_t+=2)}}finally{Ze&&(Ze.style.display=ut)}}var Ne={};function Le(Ae,re){for(var ie=re.length;--ie>=0;){var ce=re[ie];Ne.hasOwnProperty(ce)?s.console&&console.warn("cannot override language handler %s",ce):Ne[ce]=Ae}}function Se(Ae,re){return Ae&&Ne.hasOwnProperty(Ae)||(Ae=/^\s*</.test(re)?"default-markup":"default-code"),Ne[Ae]}Le(be,["default-code"]),Le(se([],[[l,/^[^<?]+/],[B,/^<!\w[^>]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[n,/^(?:<[%?]|[%?]>)/],["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"]),Le(se([[l,/^[\s]+/,null,` \r
|
|
`],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[L,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[n,/^[=<>\/]+/],["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"]),Le(se([],[[H,/^[\s\S]+/]]),["uq.val"]),Le(Te({keywords:A,hashComments:!0,cStyleComments:!0,types:T}),["c","cc","cpp","cxx","cyc","m"]),Le(Te({keywords:"null,true,false"}),["json"]),Le(Te({keywords:w,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:T}),["cs"]),Le(Te({keywords:O,cStyleComments:!0}),["java"]),Le(Te({keywords:m,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Le(Te({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Le(Te({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Le(Te({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Le(Te({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Le(Te({keywords:g,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Le(se([],[[x,/^[\s\S]+/]]),["regex"]);function tt(Ae){var re=Ae.langExtension;try{var ie=G(Ae.sourceNode,Ae.pre),ce=ie.sourceCode;Ae.sourceCode=ce,Ae.spans=ie.spans,Ae.basePos=0,Se(re,ce)(Ae),Oe(Ae)}catch(Be){s.console&&console.log(Be&&Be.stack||Be)}}function Bt(Ae,re,ie){var ce=ie||!1,Be=re||null,Re=document.createElement("div");Re.innerHTML="<pre>"+Ae+"</pre>",Re=Re.firstChild,ce&&xe(Re,ce,!0);var ke={langExtension:Be,numberLines:ce,sourceNode:Re,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(ke),Re.innerHTML}function De(Ae,re){var ie=re||document.body,ce=ie.ownerDocument||document;function Be(Ie){return ie.getElementsByTagName(Ie)}for(var Re=[Be("pre"),Be("code"),Be("xmp")],ke=[],ft=0;ft<Re.length;++ft)for(var pt=0,bt=Re[ft].length;pt<bt;++pt)ke.push(Re[ft][pt]);Re=null;var yt=Date;yt.now||(yt={now:function(){return+new Date}});var _t=0,It=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,At=/pre|xmp/i,mt=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,ut={};function Ke(){for(var Ie=s.PR_SHOULD_USE_CONTINUATION?yt.now()+250:Infinity;_t<ke.length&&yt.now()<Ie;_t++){for(var Me=ke[_t],me=ut,Ee=Me;Ee=Ee.previousSibling;){var ge=Ee.nodeType,we=(ge===7||ge===8)&&Ee.nodeValue;if(we?!/^\??prettify\b/.test(we):ge!==3||/\S/.test(Ee.nodeValue))break;if(we){me={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,at,Tt){me[at]=Tt});break}}var ze=Me.className;if((me!==ut||He.test(ze))&&!Pe.test(ze)){for(var Je=!1,Et=Me.parentNode;Et;Et=Et.parentNode){var Ft=Et.tagName;if(Ze.test(Ft)&&Et.className&&He.test(Et.className)){Je=!0;break}}if(!Je){Me.className+=" prettyprinted";var Nt=me.lang;if(!Nt){Nt=ze.match(It);var ht;!Nt&&(ht=oe(Me))&&mt.test(ht.tagName)&&(Nt=ht.className.match(It)),Nt&&(Nt=Nt[1])}var Lt;if(At.test(Me.tagName))Lt=1;else{var st=Me.currentStyle,rt=ce.defaultView,et=st?st.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(Me,null).getPropertyValue("white-space"):0;Lt=et&&et.substring(0,3)==="pre"}var Ce=me.linenums;(Ce=Ce==="true"||+Ce)||(Ce=ze.match(/\blinenums\b(?::(\d+))?/),Ce=Ce?Ce[1]&&Ce[1].length?+Ce[1]:!0:!1),Ce&&xe(Me,Ce,Lt);var Ue={langExtension:Nt,sourceNode:Me,numberLines:Ce,pre:Lt,sourceCode:null,basePos:null,spans:null,decorations:null};tt(Ue)}}}_t<ke.length?s.setTimeout(Ke,250):typeof Ae=="function"&&Ae()}Ke()}var Qe=s.PR={createSimpleLexer:se,registerLangHandler:Le,sourceDecorator:Te,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:H,PR_COMMENT:b,PR_DECLARATION:B,PR_KEYWORD:M,PR_LITERAL:r,PR_NOCODE:z,PR_PLAIN:l,PR_PUNCTUATION:n,PR_SOURCE:h,PR_STRING:x,PR_TAG:L,PR_TYPE:o,prettyPrintOne:_?s.prettyPrintOne=Bt:E=Bt,prettyPrint:S=_?s.prettyPrint=De:S=De},it=s.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return Qe})})()},SKnc:function(Xe,pe,W){var X=W("bYtY"),N=W("QuXc"),_=function(R,E,S,s,p,v){this.x=R==null?0:R,this.y=E==null?0:E,this.x2=S==null?1:S,this.y2=s==null?0:s,this.type="linear",this.global=v||!1,N.call(this,p)};_.prototype={constructor:_},X.inherits(_,N);var Q=_;Xe.exports=Q},SUKs:function(Xe,pe,W){var X=W("LPTA"),N=X.debugMode,_=function(){};N===1&&(_=console.error);var Q=_;Xe.exports=Q},Sj9i:function(Xe,pe,W){var X=W("QBsz"),N=X.create,_=X.distSquare,Q=Math.pow,R=Math.sqrt,E=1e-8,S=1e-4,s=R(3),p=1/3,v=N(),i=N(),A=N();function O(r){return r>-E&&r<E}function w(r){return r>E||r<-E}function g(r,n,l,L,B){var h=1-B;return h*h*(h*r+3*B*n)+B*B*(B*L+3*h*l)}function C(r,n,l,L,B){var h=1-B;return 3*(((n-r)*h+2*(l-n)*B)*h+(L-l)*B*B)}function c(r,n,l,L,B,h){var I=L+3*(n-l)-r,H=3*(l-n*2+r),z=3*(n-r),Z=r-B,Y=H*H-3*I*z,G=H*z-9*I*Z,ee=z*z-3*H*Z,J=0;if(O(Y)&&O(G))if(O(H))h[0]=0;else{var oe=-z/H;oe>=0&&oe<=1&&(h[J++]=oe)}else{var se=G*G-4*Y*ee;if(O(se)){var Te=G/Y,oe=-H/I+Te,be=-Te/2;oe>=0&&oe<=1&&(h[J++]=oe),be>=0&&be<=1&&(h[J++]=be)}else if(se>0){var xe=R(se),Oe=Y*H+1.5*I*(-G+xe),Ne=Y*H+1.5*I*(-G-xe);Oe<0?Oe=-Q(-Oe,p):Oe=Q(Oe,p),Ne<0?Ne=-Q(-Ne,p):Ne=Q(Ne,p);var oe=(-H-(Oe+Ne))/(3*I);oe>=0&&oe<=1&&(h[J++]=oe)}else{var Le=(2*Y*H-3*I*G)/(2*R(Y*Y*Y)),Se=Math.acos(Le)/3,tt=R(Y),Bt=Math.cos(Se),oe=(-H-2*tt*Bt)/(3*I),be=(-H+tt*(Bt+s*Math.sin(Se)))/(3*I),De=(-H+tt*(Bt-s*Math.sin(Se)))/(3*I);oe>=0&&oe<=1&&(h[J++]=oe),be>=0&&be<=1&&(h[J++]=be),De>=0&&De<=1&&(h[J++]=De)}}return J}function a(r,n,l,L,B){var h=6*l-12*n+6*r,I=9*n+3*L-3*r-9*l,H=3*n-3*r,z=0;if(O(I)){if(w(h)){var Z=-H/h;Z>=0&&Z<=1&&(B[z++]=Z)}}else{var Y=h*h-4*I*H;if(O(Y))B[0]=-h/(2*I);else if(Y>0){var G=R(Y),Z=(-h+G)/(2*I),ee=(-h-G)/(2*I);Z>=0&&Z<=1&&(B[z++]=Z),ee>=0&&ee<=1&&(B[z++]=ee)}}return z}function u(r,n,l,L,B,h){var I=(n-r)*B+r,H=(l-n)*B+n,z=(L-l)*B+l,Z=(H-I)*B+I,Y=(z-H)*B+H,G=(Y-Z)*B+Z;h[0]=r,h[1]=I,h[2]=Z,h[3]=G,h[4]=G,h[5]=Y,h[6]=z,h[7]=L}function m(r,n,l,L,B,h,I,H,z,Z,Y){var G,ee=.005,J=Infinity,oe,se,Te,be;v[0]=z,v[1]=Z;for(var xe=0;xe<1;xe+=.05)i[0]=g(r,l,B,I,xe),i[1]=g(n,L,h,H,xe),Te=_(v,i),Te<J&&(G=xe,J=Te);J=Infinity;for(var Oe=0;Oe<32&&!(ee<S);Oe++)oe=G-ee,se=G+ee,i[0]=g(r,l,B,I,oe),i[1]=g(n,L,h,H,oe),Te=_(i,v),oe>=0&&Te<J?(G=oe,J=Te):(A[0]=g(r,l,B,I,se),A[1]=g(n,L,h,H,se),be=_(A,v),se<=1&&be<J?(G=se,J=be):ee*=.5);return Y&&(Y[0]=g(r,l,B,I,G),Y[1]=g(n,L,h,H,G)),R(J)}function y(r,n,l,L){var B=1-L;return B*(B*r+2*L*n)+L*L*l}function T(r,n,l,L){return 2*((1-L)*(n-r)+L*(l-n))}function x(r,n,l,L,B){var h=r-2*n+l,I=2*(n-r),H=r-L,z=0;if(O(h)){if(w(I)){var Z=-H/I;Z>=0&&Z<=1&&(B[z++]=Z)}}else{var Y=I*I-4*h*H;if(O(Y)){var Z=-I/(2*h);Z>=0&&Z<=1&&(B[z++]=Z)}else if(Y>0){var G=R(Y),Z=(-I+G)/(2*h),ee=(-I-G)/(2*h);Z>=0&&Z<=1&&(B[z++]=Z),ee>=0&&ee<=1&&(B[z++]=ee)}}return z}function M(r,n,l){var L=r+l-2*n;return L===0?.5:(r-n)/L}function b(r,n,l,L,B){var h=(n-r)*L+r,I=(l-n)*L+n,H=(I-h)*L+h;B[0]=r,B[1]=h,B[2]=H,B[3]=H,B[4]=I,B[5]=l}function o(r,n,l,L,B,h,I,H,z){var Z,Y=.005,G=Infinity;v[0]=I,v[1]=H;for(var ee=0;ee<1;ee+=.05){i[0]=y(r,l,B,ee),i[1]=y(n,L,h,ee);var J=_(v,i);J<G&&(Z=ee,G=J)}G=Infinity;for(var oe=0;oe<32&&!(Y<S);oe++){var se=Z-Y,Te=Z+Y;i[0]=y(r,l,B,se),i[1]=y(n,L,h,se);var J=_(i,v);if(se>=0&&J<G)Z=se,G=J;else{A[0]=y(r,l,B,Te),A[1]=y(n,L,h,Te);var be=_(A,v);Te<=1&&be<G?(Z=Te,G=be):Y*=.5}}return z&&(z[0]=y(r,l,B,Z),z[1]=y(n,L,h,Z)),R(G)}pe.cubicAt=g,pe.cubicDerivativeAt=C,pe.cubicRootAt=c,pe.cubicExtrema=a,pe.cubicSubdivide=u,pe.cubicProjectPoint=m,pe.quadraticAt=y,pe.quadraticDerivativeAt=T,pe.quadraticRootAt=x,pe.quadraticExtremum=M,pe.quadraticSubdivide=b,pe.quadraticProjectPoint=o},SqI9:function(Xe,pe,W){var X=W("y+Vt"),N=W("iXp4"),_=X.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:N(X.prototype.brush),buildPath:function(Q,R){var E=R.cx,S=R.cy,s=Math.max(R.r0||0,0),p=Math.max(R.r,0),v=R.startAngle,i=R.endAngle,A=R.clockwise,O=Math.cos(v),w=Math.sin(v);Q.moveTo(O*s+E,w*s+S),Q.lineTo(O*p+E,w*p+S),Q.arc(E,S,p,v,i,!A),Q.lineTo(Math.cos(i)*s+E,Math.sin(i)*s+S),s!==0&&Q.arc(E,S,s,i,v,A),Q.closePath()}});Xe.exports=_},SrGk:function(Xe,pe,W){var X=W("hydK"),N=X.createElement,_=W("bYtY"),Q=W("y+Vt"),R=W("Dagg"),E=W("dqUG"),S=W("P47w"),s=S.path,p=S.image,v=S.text,i="0",A="1";function O(g,C,c,a,u){this._zrId=g,this._svgRoot=C,this._tagNames=typeof c=="string"?[c]:c,this._markLabel=a,this._domName=u||"_dom",this.nextId=0}O.prototype.createElement=N,O.prototype.getDefs=function(g){var C=this._svgRoot,c=this._svgRoot.getElementsByTagName("defs");return c.length===0?g?(c=C.insertBefore(this.createElement("defs"),C.firstChild),c.contains||(c.contains=function(a){var u=c.children;if(!u)return!1;for(var m=u.length-1;m>=0;--m)if(u[m]===a)return!0;return!1}),c):null:c[0]},O.prototype.update=function(g,C){if(!g)return;var c=this.getDefs(!1);if(g[this._domName]&&c.contains(g[this._domName]))typeof C=="function"&&C(g);else{var a=this.add(g);a&&(g[this._domName]=a)}},O.prototype.addDom=function(g){var C=this.getDefs(!0);C.appendChild(g)},O.prototype.removeDom=function(g){var C=this.getDefs(!1);C&&g[this._domName]&&(C.removeChild(g[this._domName]),g[this._domName]=null)},O.prototype.getDoms=function(){var g=this.getDefs(!1);if(!g)return[];var C=[];return _.each(this._tagNames,function(c){var a=g.getElementsByTagName(c);C=C.concat([].slice.call(a))}),C},O.prototype.markAllUnused=function(){var g=this.getDoms(),C=this;_.each(g,function(c){c[C._markLabel]=i})},O.prototype.markUsed=function(g){g&&(g[this._markLabel]=A)},O.prototype.removeUnused=function(){var g=this.getDefs(!1);if(!g)return;var C=this.getDoms(),c=this;_.each(C,function(a){a[c._markLabel]!==A&&g.removeChild(a)})},O.prototype.getSvgProxy=function(g){return g instanceof Q?s:g instanceof R?p:g instanceof E?v:s},O.prototype.getTextSvgElement=function(g){return g.__textSvgEl},O.prototype.getSvgElement=function(g){return g.__svgEl};var w=O;Xe.exports=w},T6xi:function(Xe,pe,W){var X=W("YgsL"),N=W("nCxF");function _(Q,R,E){var S=R.points,s=R.smooth;if(S&&S.length>=2){if(s&&s!=="spline"){var p=N(S,s,E,R.smoothConstraint);Q.moveTo(S[0][0],S[0][1]);for(var v=S.length,i=0;i<(E?v:v-1);i++){var A=p[i*2],O=p[i*2+1],w=S[(i+1)%v];Q.bezierCurveTo(A[0],A[1],O[0],O[1],w[0],w[1])}}else{s==="spline"&&(S=X(S,E)),Q.moveTo(S[0][0],S[0][1]);for(var i=1,g=S.length;i<g;i++)Q.lineTo(S[i][0],S[i][1])}E&&Q.closePath()}}pe.buildPath=_},VpOo:function(Xe,pe){function W(X,N){var _=N.x,Q=N.y,R=N.width,E=N.height,S=N.r,s,p,v,i;R<0&&(_=_+R,R=-R),E<0&&(Q=Q+E,E=-E),typeof S=="number"?s=p=v=i=S:S instanceof Array?S.length===1?s=p=v=i=S[0]:S.length===2?(s=v=S[0],p=i=S[1]):S.length===3?(s=S[0],p=i=S[1],v=S[2]):(s=S[0],p=S[1],v=S[2],i=S[3]):s=p=v=i=0;var A;s+p>R&&(A=s+p,s*=R/A,p*=R/A),v+i>R&&(A=v+i,v*=R/A,i*=R/A),p+v>E&&(A=p+v,p*=E/A,v*=E/A),s+i>E&&(A=s+i,s*=E/A,i*=E/A),X.moveTo(_+s,Q),X.lineTo(_+R-p,Q),p!==0&&X.arc(_+R-p,Q+p,p,-Math.PI/2,0),X.lineTo(_+R,Q+E-v),v!==0&&X.arc(_+R-v,Q+E-v,v,0,Math.PI/2),X.lineTo(_+i,Q+E),i!==0&&X.arc(_+i,Q+E-i,i,Math.PI/2,Math.PI),X.lineTo(_,Q+s),s!==0&&X.arc(_+s,Q+s,s,Math.PI,Math.PI*1.5)}pe.buildPath=W},"VrN/":function(Xe,pe,W){(function(X,N){Xe.exports=N()})(this,function(){"use strict";var X=navigator.userAgent,N=navigator.platform,_=/gecko\/\d/i.test(X),Q=/MSIE \d/.test(X),R=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(X),E=/Edge\/(\d+)/.exec(X),S=Q||R||E,s=S&&(Q?document.documentMode||6:+(E||R)[1]),p=!E&&/WebKit\//.test(X),v=p&&/Qt\/\d+\.\d+/.test(X),i=!E&&/Chrome\//.test(X),A=/Opera\//.test(X),O=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(X),g=/PhantomJS/.test(X),C=!E&&/AppleWebKit/.test(X)&&/Mobile\/\w+/.test(X),c=/Android/.test(X),a=C||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(X),u=C||/Mac/.test(N),m=/\bCrOS\b/.test(X),y=/win/i.test(N),T=A&&X.match(/Version\/(\d*\.\d*)/);T&&(T=Number(T[1])),T&&T>=15&&(A=!1,p=!0);var x=u&&(v||A&&(T==null||T<12.11)),M=_||S&&s>=9;function b(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var o=function(e,t){var f=e.className,d=b(t).exec(f);if(d){var D=f.slice(d.index+d[0].length);e.className=f.slice(0,d.index)+(D?d[1]+D:"")}};function r(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,t){return r(e).appendChild(t)}function l(e,t,f,d){var D=document.createElement(e);if(f&&(D.className=f),d&&(D.style.cssText=d),typeof t=="string")D.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)D.appendChild(t[V]);return D}function L(e,t,f,d){var D=l(e,t,f,d);return D.setAttribute("role","presentation"),D}var B;document.createRange?B=function(e,t,f,d){var D=document.createRange();return D.setEnd(d||e,f),D.setStart(e,t),D}:B=function(e,t,f){var d=document.body.createTextRange();try{d.moveToElementText(e.parentNode)}catch(D){return d}return d.collapse(!0),d.moveEnd("character",f),d.moveStart("character",t),d};function h(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var f=e.className;b(t).test(f)||(e.className+=(f?" ":"")+t)}function z(e,t){for(var f=e.split(" "),d=0;d<f.length;d++)f[d]&&!b(f[d]).test(t)&&(t+=" "+f[d]);return t}var Z=function(e){e.select()};C?Z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(Z=function(e){try{e.select()}catch(t){}});function Y(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function G(e,t,f){t||(t={});for(var d in e)e.hasOwnProperty(d)&&(f!==!1||!t.hasOwnProperty(d))&&(t[d]=e[d]);return t}function ee(e,t,f,d,D){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=d||0,ne=D||0;;){var ue=e.indexOf(" ",V);if(ue<0||ue>=t)return ne+(t-V);ne+=ue-V,ne+=f-ne%f,V=ue+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=Y(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,t){this.f=t;var f=+new Date+e;(!this.id||f<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=f)};function oe(e,t){for(var f=0;f<e.length;++f)if(e[f]==t)return f;return-1}var se=50,Te={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},xe={origin:"*mouse"},Oe={origin:"+move"};function Ne(e,t,f){for(var d=0,D=0;;){var V=e.indexOf(" ",d);V==-1&&(V=e.length);var ne=V-d;if(V==e.length||D+ne>=t)return d+Math.min(ne,t-D);if(D+=V-d,D+=f-D%f,d=V+1,D>=t)return d}}var Le=[""];function Se(e){for(;Le.length<=e;)Le.push(tt(Le)+" ");return Le[e]}function tt(e){return e[e.length-1]}function Bt(e,t){for(var f=[],d=0;d<e.length;d++)f[d]=t(e[d],d);return f}function De(e,t,f){for(var d=0,D=f(t);d<e.length&&f(e[d])<=D;)d++;e.splice(d,0,t)}function Qe(){}function it(e,t){var f;return Object.create?f=Object.create(e):(Qe.prototype=e,f=new Qe),t&&G(t,f),f}var Ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ae.test(e))}function ie(e,t){return t?t.source.indexOf("\\w")>-1&&re(e)?!0:t.test(e):re(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\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 Re(e){return e.charCodeAt(0)>=768&&Be.test(e)}function ke(e,t,f){for(;(f<0?t>0:t<e.length)&&Re(e.charAt(t));)t+=f;return t}function ft(e,t,f){for(var d=t>f?-1:1;;){if(t==f)return t;var D=(t+f)/2,V=d<0?Math.ceil(D):Math.floor(D);if(V==t)return e(V)?t:f;e(V)?f=V:t=V+d}}function pt(e,t,f,d){if(!e)return d(t,f,"ltr",0);for(var D=!1,V=0;V<e.length;++V){var ne=e[V];(ne.from<f&&ne.to>t||t==f&&ne.to==t)&&(d(Math.max(ne.from,t),Math.min(ne.to,f),ne.level==1?"rtl":"ltr",V),D=!0)}D||d(t,f,"ltr")}var bt=null;function yt(e,t,f){var d;bt=null;for(var D=0;D<e.length;++D){var V=e[D];if(V.from<t&&V.to>t)return D;V.to==t&&(V.from!=V.to&&f=="before"?d=D:bt=D),V.from==t&&(V.from!=V.to&&f!="before"?d=D:bt=D)}return d!=null?d:bt}var _t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function f(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?t.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,D=/[stwN]/,V=/[LRr]/,ne=/[Lb1n]/,ue=/[1n]/;function de(ve,Ve,Ye){this.level=ve,this.from=Ve,this.to=Ye}return function(ve,Ve){var Ye=Ve=="ltr"?"L":"R";if(ve.length==0||Ve=="ltr"&&!d.test(ve))return!1;for(var gt=ve.length,dt=[],Mt=0;Mt<gt;++Mt)dt.push(f(ve.charCodeAt(Mt)));for(var Ut=0,Qt=Ye;Ut<gt;++Ut){var Vt=dt[Ut];Vt=="m"?dt[Ut]=Qt:Qt=Vt}for(var Zt=0,Xt=Ye;Zt<gt;++Zt){var rr=dt[Zt];rr=="1"&&Xt=="r"?dt[Zt]="n":V.test(rr)&&(Xt=rr,rr=="r"&&(dt[Zt]="R"))}for(var br=1,pr=dt[0];br<gt-1;++br){var kr=dt[br];kr=="+"&&pr=="1"&&dt[br+1]=="1"?dt[br]="1":kr==","&&pr==dt[br+1]&&(pr=="1"||pr=="n")&&(dt[br]=pr),pr=kr}for(var bn=0;bn<gt;++bn){var Wn=dt[bn];if(Wn==",")dt[bn]="N";else if(Wn=="%"){var On=void 0;for(On=bn+1;On<gt&&dt[On]=="%";++On);for(var di=bn&&dt[bn-1]=="!"||On<gt&&dt[On]=="1"?"1":"N",ei=bn;ei<On;++ei)dt[ei]=di;bn=On-1}}for(var Pn=0,ti=Ye;Pn<gt;++Pn){var Yn=dt[Pn];ti=="L"&&Yn=="1"?dt[Pn]="L":V.test(Yn)&&(ti=Yn)}for(var Wt=0;Wt<gt;++Wt)if(D.test(dt[Wt])){var Bn=void 0;for(Bn=Wt+1;Bn<gt&&D.test(dt[Bn]);++Bn);for(var Tn=(Wt?dt[Wt-1]:Ye)=="L",Sn=(Bn<gt?dt[Bn]:Ye)=="L",Wa=Tn==Sn?Tn?"L":"R":Ye,Xr=Wt;Xr<Bn;++Xr)dt[Xr]=Wa;Wt=Bn-1}for(var jr=[],vi,Gn=0;Gn<gt;)if(ne.test(dt[Gn])){var Ga=Gn;for(++Gn;Gn<gt&&ne.test(dt[Gn]);++Gn);jr.push(new de(0,Ga,Gn))}else{var Vi=Gn,Fi=jr.length,Ba=Ve=="rtl"?1:0;for(++Gn;Gn<gt&&dt[Gn]!="L";++Gn);for(var ai=Vi;ai<Gn;)if(ue.test(dt[ai])){Vi<ai&&(jr.splice(Fi,0,new de(1,Vi,ai)),Fi+=Ba);var Ta=ai;for(++ai;ai<Gn&&ue.test(dt[ai]);++ai);jr.splice(Fi,0,new de(2,Ta,ai)),Fi+=Ba,Vi=ai}else++ai;Vi<Gn&&jr.splice(Fi,0,new de(1,Vi,Gn))}return Ve=="ltr"&&(jr[0].level==1&&(vi=ve.match(/^\s+/))&&(jr[0].from=vi[0].length,jr.unshift(new de(0,0,vi[0].length))),tt(jr).level==1&&(vi=ve.match(/\s+$/))&&(tt(jr).to-=vi[0].length,jr.push(new de(0,gt-vi[0].length,gt)))),Ve=="rtl"?jr.reverse():jr}}();function It(e,t){var f=e.order;return f==null&&(f=e.order=_t(e.text,t)),f}var He=[],Pe=function(e,t,f){if(e.addEventListener)e.addEventListener(t,f,!1);else if(e.attachEvent)e.attachEvent("on"+t,f);else{var d=e._handlers||(e._handlers={});d[t]=(d[t]||He).concat(f)}};function At(e,t){return e._handlers&&e._handlers[t]||He}function mt(e,t,f){if(e.removeEventListener)e.removeEventListener(t,f,!1);else if(e.detachEvent)e.detachEvent("on"+t,f);else{var d=e._handlers,D=d&&d[t];if(D){var V=oe(D,f);V>-1&&(d[t]=D.slice(0,V).concat(D.slice(V+1)))}}}function Ze(e,t){var f=At(e,t);if(!f.length)return;for(var d=Array.prototype.slice.call(arguments,2),D=0;D<f.length;++D)f[D].apply(null,d)}function ut(e,t,f){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,f||t.type,e,t),ge(t)||t.codemirrorIgnore}function Ke(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var f=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),d=0;d<t.length;++d)oe(f,t[d])==-1&&f.push(t[d])}function Ie(e,t){return At(e,t).length>0}function Me(e){e.prototype.on=function(t,f){Pe(this,t,f)},e.prototype.off=function(t,f){mt(this,t,f)}}function me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ge(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function we(e){me(e),Ee(e)}function ze(e){return e.target||e.srcElement}function Je(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),u&&e.ctrlKey&&t==1&&(t=3),t}var Et=function(){if(S&&s<9)return!1;var e=l("div");return"draggable"in e||"dragDrop"in e}(),Ft;function Nt(e){if(Ft==null){var t=l("span","\u200B");n(e,l("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ft=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&s<8))}var f=Ft?l("span","\u200B"):l("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return f.setAttribute("cm-text",""),f}var ht;function Lt(e){if(ht!=null)return ht;var t=n(e,document.createTextNode("A\u062EA")),f=B(t,0,1).getBoundingClientRect(),d=B(t,1,2).getBoundingClientRect();return r(e),!f||f.left==f.right?!1:ht=d.right-f.right<3}var st=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,f=[],d=e.length;t<=d;){var D=e.indexOf(`
|
|
`,t);D==-1&&(D=e.length);var V=e.slice(t,e.charAt(D-1)=="\r"?D-1:D),ne=V.indexOf("\r");ne!=-1?(f.push(V.slice(0,ne)),t+=ne+1):(f.push(V),t=D+1)}return f}:function(e){return e.split(/\r\n?|\n/)},rt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(f){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},et=function(){var e=l("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ce=null;function Ue(e){if(Ce!=null)return Ce;var t=n(e,l("span","x")),f=t.getBoundingClientRect(),d=B(t,0,1).getBoundingClientRect();return Ce=Math.abs(f.left-d.left)>1}var ct={},at={};function Tt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=t}function Ct(e,t){at[e]=t}function qe(e){if(typeof e=="string"&&at.hasOwnProperty(e))e=at[e];else if(e&&typeof e.name=="string"&&at.hasOwnProperty(e.name)){var t=at[e.name];typeof t=="string"&&(t={name:t}),e=it(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function St(e,t){t=qe(t);var f=ct[t.name];if(!f)return St(e,"text/plain");var d=f(e,t);if(Ht.hasOwnProperty(t.name)){var D=Ht[t.name];for(var V in D){if(!D.hasOwnProperty(V))continue;d.hasOwnProperty(V)&&(d["_"+V]=d[V]),d[V]=D[V]}}if(d.name=t.name,t.helperType&&(d.helperType=t.helperType),t.modeProps)for(var ne in t.modeProps)d[ne]=t.modeProps[ne];return d}var Ht={};function Pt(e,t){var f=Ht.hasOwnProperty(e)?Ht[e]:Ht[e]={};G(t,f)}function zt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var f={};for(var d in t){var D=t[d];D instanceof Array&&(D=D.concat([])),f[d]=D}return f}function Ir(e,t){for(var f;e.innerMode&&!(f=e.innerMode(t),!f||f.mode==e);)t=f.state,e=f.mode;return f||{mode:e,state:t}}function Rr(e,t,f){return e.startState?e.startState(t,f):!0}var yr=function(e,t,f){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=f};yr.prototype.eol=function(){return this.pos>=this.string.length},yr.prototype.sol=function(){return this.pos==this.lineStart},yr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},yr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},yr.prototype.eat=function(e){var t=this.string.charAt(this.pos),f;if(typeof e=="string"?f=t==e:f=t&&(e.test?e.test(t):e(t)),f)return++this.pos,t},yr.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},yr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},yr.prototype.skipToEnd=function(){this.pos=this.string.length},yr.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},yr.prototype.backUp=function(e){this.pos-=e},yr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ee(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ee(this.string,this.lineStart,this.tabSize):0)},yr.prototype.indentation=function(){return ee(this.string,null,this.tabSize)-(this.lineStart?ee(this.string,this.lineStart,this.tabSize):0)},yr.prototype.match=function(e,t,f){if(typeof e=="string"){var d=function(ne){return f?ne.toLowerCase():ne},D=this.string.substr(this.pos,e.length);if(d(D)==d(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},yr.prototype.current=function(){return this.string.slice(this.start,this.pos)},yr.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},yr.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},yr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function jt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var f=e;!f.lines;)for(var d=0;;++d){var D=f.children[d],V=D.chunkSize();if(t<V){f=D;break}t-=V}return f.lines[t]}function Mr(e,t,f){var d=[],D=t.line;return e.iter(t.line,f.line+1,function(V){var ne=V.text;D==f.line&&(ne=ne.slice(0,f.ch)),D==t.line&&(ne=ne.slice(t.ch)),d.push(ne),++D}),d}function Wr(e,t,f){var d=[];return e.iter(t,f,function(D){d.push(D.text)}),d}function Ur(e,t){var f=t-e.height;if(f)for(var d=e;d;d=d.parent)d.height+=f}function mr(e){if(e.parent==null)return null;for(var t=e.parent,f=oe(t.lines,e),d=t.parent;d;t=d,d=d.parent)for(var D=0;!(d.children[D]==t);++D)f+=d.children[D].chunkSize();return f+t.first}function Sr(e,t){var f=e.first;e:do{for(var d=0;d<e.children.length;++d){var D=e.children[d],V=D.height;if(t<V){e=D;continue e}t-=V,f+=D.chunkSize()}return f}while(!e.lines);for(var ne=0;ne<e.lines.length;++ne){var ue=e.lines[ne],de=ue.height;if(t<de)break;t-=de}return f+ne}function Cn(e,t){return t>=e.first&&t<e.first+e.size}function dn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function fe(e,t,f){if(f===void 0&&(f=null),!(this instanceof fe))return new fe(e,t,f);this.line=e,this.ch=t,this.sticky=f}function ye(e,t){return e.line-t.line||e.ch-t.ch}function Fe(e,t){return e.sticky==t.sticky&&ye(e,t)==0}function nt(e){return fe(e.line,e.ch)}function $e(e,t){return ye(e,t)<0?t:e}function Rt(e,t){return ye(e,t)<0?e:t}function $(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function F(e,t){if(t.line<e.first)return fe(e.first,0);var f=e.first+e.size-1;return t.line>f?fe(f,jt(e,f).text.length):P(t,jt(e,t.line).text.length)}function P(e,t){var f=e.ch;return f==null||f>t?fe(e.line,t):f<0?fe(e.line,0):e}function q(e,t){for(var f=[],d=0;d<t.length;d++)f[d]=F(e,t[d]);return f}var le=function(e,t){this.state=e,this.lookAhead=t},te=function(e,t,f,d){this.state=t,this.doc=e,this.line=f,this.maxLookAhead=d||0,this.baseTokens=null,this.baseTokenPos=1};te.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},te.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},te.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},te.fromSaved=function(e,t,f){return t instanceof le?new te(e,zt(e.mode,t.state),f,t.lookAhead):new te(e,zt(e.mode,t),f)},te.prototype.save=function(e){var t=e!==!1?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new le(t,this.maxLookAhead):t};function je(e,t,f,d){var D=[e.state.modeGen],V={};Fr(e,t.text,e.doc.mode,f,function(ve,Ve){return D.push(ve,Ve)},V,d);for(var ne=f.state,ue=function(ve){f.baseTokens=D;var Ve=e.state.overlays[ve],Ye=1,gt=0;f.state=!0,Fr(e,t.text,Ve.mode,f,function(dt,Mt){for(var Ut=Ye;gt<dt;){var Qt=D[Ye];Qt>dt&&D.splice(Ye,1,dt,D[Ye+1],Qt),Ye+=2,gt=Math.min(dt,Qt)}if(!Mt)return;if(Ve.opaque)D.splice(Ut,Ye-Ut,dt,"overlay "+Mt),Ye=Ut+2;else for(;Ut<Ye;Ut+=2){var Vt=D[Ut+1];D[Ut+1]=(Vt?Vt+" ":"")+"overlay "+Mt}},V),f.state=ne,f.baseTokens=null,f.baseTokenPos=1},de=0;de<e.state.overlays.length;++de)ue(de);return{styles:D,classes:V.bgClass||V.textClass?V:null}}function xt(e,t,f){if(!t.styles||t.styles[0]!=e.state.modeGen){var d=ot(e,mr(t)),D=t.text.length>e.options.maxHighlightLength&&zt(e.doc.mode,d.state),V=je(e,t,d);D&&(d.state=D),t.stateAfter=d.save(!D),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),f===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ot(e,t,f){var d=e.doc,D=e.display;if(!d.mode.startState)return new te(d,!0,t);var V=gr(e,t,f),ne=V>d.first&&jt(d,V-1).stateAfter,ue=ne?te.fromSaved(d,ne,V):new te(d,Rr(d.mode),V);return d.iter(V,t,function(de){kt(e,de.text,ue);var ve=ue.line;de.stateAfter=ve==t-1||ve%5==0||ve>=D.viewFrom&&ve<D.viewTo?ue.save():null,ue.nextLine()}),f&&(d.modeFrontier=ue.line),ue}function kt(e,t,f,d){var D=e.doc.mode,V=new yr(t,e.options.tabSize,f);for(V.start=V.pos=d||0,t==""&&wt(D,f.state);!V.eol();)Yt(D,V,f.state),V.start=V.pos}function wt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var f=Ir(e,t);if(f.mode.blankLine)return f.mode.blankLine(f.state)}function Yt(e,t,f,d){for(var D=0;D<10;D++){d&&(d[0]=Ir(e,f).mode);var V=e.token(t,f);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gt=function(e,t,f){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=f};function Jt(e,t,f,d){var D=e.doc,V=D.mode,ne;t=F(D,t);var ue=jt(D,t.line),de=ot(e,t.line,f),ve=new yr(ue.text,e.options.tabSize,de),Ve;for(d&&(Ve=[]);(d||ve.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,ne=Yt(V,ve,de.state),d&&Ve.push(new Gt(ve,ne,zt(D.mode,de.state)));return d?Ve:new Gt(ve,ne,de.state)}function hr(e,t){if(e)for(;;){var f=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!f)break;e=e.slice(0,f.index)+e.slice(f.index+f[0].length);var d=f[1]?"bgClass":"textClass";t[d]==null?t[d]=f[2]:new RegExp("(?:^|\\s)"+f[2]+"(?:$|\\s)").test(t[d])||(t[d]+=" "+f[2])}return e}function Fr(e,t,f,d,D,V,ne){var ue=f.flattenSpans;ue==null&&(ue=e.options.flattenSpans);var de=0,ve=null,Ve=new yr(t,e.options.tabSize,d),Ye,gt=e.options.addModeClass&&[null];for(t==""&&hr(wt(f,d.state),V);!Ve.eol();){if(Ve.pos>e.options.maxHighlightLength?(ue=!1,ne&&kt(e,t,d,Ve.pos),Ve.pos=t.length,Ye=null):Ye=hr(Yt(f,Ve,d.state,gt),V),gt){var dt=gt[0].name;dt&&(Ye="m-"+(Ye?dt+" "+Ye:dt))}if(!ue||ve!=Ye){for(;de<Ve.start;)de=Math.min(Ve.start,de+5e3),D(de,ve);ve=Ye}Ve.start=Ve.pos}for(;de<Ve.pos;){var Mt=Math.min(Ve.pos,de+5e3);D(Mt,ve),de=Mt}}function gr(e,t,f){for(var d,D,V=e.doc,ne=f?-1:t-(e.doc.mode.innerMode?1e3:100),ue=t;ue>ne;--ue){if(ue<=V.first)return V.first;var de=jt(V,ue-1),ve=de.stateAfter;if(ve&&(!f||ue+(ve instanceof le?ve.lookAhead:0)<=V.modeFrontier))return ue;var Ve=ee(de.text,null,e.options.tabSize);(D==null||d>Ve)&&(D=ue-1,d=Ve)}return D}function Lr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var f=e.first,d=t-1;d>f;d--){var D=jt(e,d).stateAfter;if(D&&(!(D instanceof le)||d+D.lookAhead<t)){f=d+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,f)}var fr=!1,Hr=!1;function Pr(){fr=!0}function on(){Hr=!0}function Yr(e,t,f){this.marker=e,this.from=t,this.to=f}function tn(e,t){if(e)for(var f=0;f<e.length;++f){var d=e[f];if(d.marker==t)return d}}function sn(e,t){for(var f,d=0;d<e.length;++d)e[d]!=t&&(f||(f=[])).push(e[d]);return f}function Gr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function rn(e,t,f){var d;if(e)for(var D=0;D<e.length;++D){var V=e[D],ne=V.marker,ue=V.from==null||(ne.inclusiveLeft?V.from<=t:V.from<t);if(ue||V.from==t&&ne.type=="bookmark"&&(!f||!V.marker.insertLeft)){var de=V.to==null||(ne.inclusiveRight?V.to>=t:V.to>t);(d||(d=[])).push(new Yr(ne,V.from,de?null:V.to))}}return d}function ln(e,t,f){var d;if(e)for(var D=0;D<e.length;++D){var V=e[D],ne=V.marker,ue=V.to==null||(ne.inclusiveRight?V.to>=t:V.to>t);if(ue||V.from==t&&ne.type=="bookmark"&&(!f||V.marker.insertLeft)){var de=V.from==null||(ne.inclusiveLeft?V.from<=t:V.from<t);(d||(d=[])).push(new Yr(ne,de?null:V.from-t,V.to==null?null:V.to-t))}}return d}function $r(e,t){if(t.full)return null;var f=Cn(e,t.from.line)&&jt(e,t.from.line).markedSpans,d=Cn(e,t.to.line)&&jt(e,t.to.line).markedSpans;if(!f&&!d)return null;var D=t.from.ch,V=t.to.ch,ne=ye(t.from,t.to)==0,ue=rn(f,D,ne),de=ln(d,V,ne),ve=t.text.length==1,Ve=tt(t.text).length+(ve?D:0);if(ue)for(var Ye=0;Ye<ue.length;++Ye){var gt=ue[Ye];if(gt.to==null){var dt=tn(de,gt.marker);dt?ve&&(gt.to=dt.to==null?null:dt.to+Ve):gt.to=D}}if(de)for(var Mt=0;Mt<de.length;++Mt){var Ut=de[Mt];if(Ut.to!=null&&(Ut.to+=Ve),Ut.from==null){var Qt=tn(ue,Ut.marker);Qt||(Ut.from=Ve,ve&&(ue||(ue=[])).push(Ut))}else Ut.from+=Ve,ve&&(ue||(ue=[])).push(Ut)}ue&&(ue=un(ue)),de&&de!=ue&&(de=un(de));var Vt=[ue];if(!ve){var Zt=t.text.length-2,Xt;if(Zt>0&&ue)for(var rr=0;rr<ue.length;++rr)ue[rr].to==null&&(Xt||(Xt=[])).push(new Yr(ue[rr].marker,null,null));for(var br=0;br<Zt;++br)Vt.push(Xt);Vt.push(de)}return Vt}function un(e){for(var t=0;t<e.length;++t){var f=e[t];f.from!=null&&f.from==f.to&&f.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Er(e,t,f){var d=null;if(e.iter(t.line,f.line+1,function(dt){if(dt.markedSpans)for(var Mt=0;Mt<dt.markedSpans.length;++Mt){var Ut=dt.markedSpans[Mt].marker;Ut.readOnly&&(!d||oe(d,Ut)==-1)&&(d||(d=[])).push(Ut)}}),!d)return null;for(var D=[{from:t,to:f}],V=0;V<d.length;++V)for(var ne=d[V],ue=ne.find(0),de=0;de<D.length;++de){var ve=D[de];if(ye(ve.to,ue.from)<0||ye(ve.from,ue.to)>0)continue;var Ve=[de,1],Ye=ye(ve.from,ue.from),gt=ye(ve.to,ue.to);(Ye<0||!ne.inclusiveLeft&&!Ye)&&Ve.push({from:ve.from,to:ue.from}),(gt>0||!ne.inclusiveRight&&!gt)&&Ve.push({from:ue.to,to:ve.to}),D.splice.apply(D,Ve),de+=Ve.length-3}return D}function cr(e){var t=e.markedSpans;if(!t)return;for(var f=0;f<t.length;++f)t[f].marker.detachLine(e);e.markedSpans=null}function nr(e,t){if(!t)return;for(var f=0;f<t.length;++f)t[f].marker.attachLine(e);e.markedSpans=t}function tr(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function vr(e,t){var f=e.lines.length-t.lines.length;if(f!=0)return f;var d=e.find(),D=t.find(),V=ye(d.from,D.from)||tr(e)-tr(t);if(V)return-V;var ne=ye(d.to,D.to)||$t(e)-$t(t);return ne||t.id-e.id}function Cr(e,t){var f=Hr&&e.markedSpans,d;if(f)for(var D=void 0,V=0;V<f.length;++V)D=f[V],D.marker.collapsed&&(t?D.from:D.to)==null&&(!d||vr(d,D.marker)<0)&&(d=D.marker);return d}function _r(e){return Cr(e,!0)}function wr(e){return Cr(e,!1)}function kn(e,t){var f=Hr&&e.markedSpans,d;if(f)for(var D=0;D<f.length;++D){var V=f[D];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!d||vr(d,V.marker)<0)&&(d=V.marker)}return d}function Vr(e,t,f,d,D){var V=jt(e,t),ne=Hr&&V.markedSpans;if(ne)for(var ue=0;ue<ne.length;++ue){var de=ne[ue];if(!de.marker.collapsed)continue;var ve=de.marker.find(0),Ve=ye(ve.from,f)||tr(de.marker)-tr(D),Ye=ye(ve.to,d)||$t(de.marker)-$t(D);if(Ve>=0&&Ye<=0||Ve<=0&&Ye>=0)continue;if(Ve<=0&&(de.marker.inclusiveRight&&D.inclusiveLeft?ye(ve.to,f)>=0:ye(ve.to,f)>0)||Ve>=0&&(de.marker.inclusiveRight&&D.inclusiveLeft?ye(ve.from,d)<=0:ye(ve.from,d)<0))return!0}}function nn(e){for(var t;t=_r(e);)e=t.find(-1,!0).line;return e}function Dn(e){for(var t;t=wr(e);)e=t.find(1,!0).line;return e}function wn(e){for(var t,f;t=wr(e);)e=t.find(1,!0).line,(f||(f=[])).push(e);return f}function Jr(e,t){var f=jt(e,t),d=nn(f);return f==d?t:mr(d)}function Jn(e,t){if(t>e.lastLine())return t;var f=jt(e,t),d;if(!In(e,f))return t;for(;d=wr(f);)f=d.find(1,!0).line;return mr(f)+1}function In(e,t){var f=Hr&&t.markedSpans;if(f)for(var d=void 0,D=0;D<f.length;++D){if(d=f[D],!d.marker.collapsed)continue;if(d.from==null)return!0;if(d.marker.widgetNode)continue;if(d.from==0&&d.marker.inclusiveLeft&&Vn(e,t,d))return!0}}function Vn(e,t,f){if(f.to==null){var d=f.marker.find(1,!0);return Vn(e,d.line,tn(d.line.markedSpans,f.marker))}if(f.marker.inclusiveRight&&f.to==t.text.length)return!0;for(var D=void 0,V=0;V<t.markedSpans.length;++V)if(D=t.markedSpans[V],D.marker.collapsed&&!D.marker.widgetNode&&D.from==f.to&&(D.to==null||D.to!=f.from)&&(D.marker.inclusiveLeft||f.marker.inclusiveRight)&&Vn(e,t,D))return!0}function Rn(e){e=nn(e);for(var t=0,f=e.parent,d=0;d<f.lines.length;++d){var D=f.lines[d];if(D==e)break;t+=D.height}for(var V=f.parent;V;f=V,V=f.parent)for(var ne=0;ne<V.children.length;++ne){var ue=V.children[ne];if(ue==f)break;t+=ue.height}return t}function si(e){if(e.height==0)return 0;for(var t=e.text.length,f,d=e;f=_r(d);){var D=f.find(0,!0);d=D.from.line,t+=D.from.ch-D.to.ch}for(d=e;f=wr(d);){var V=f.find(0,!0);t-=d.text.length-V.from.ch,d=V.to.line,t+=d.text.length-V.to.ch}return t}function Ln(e){var t=e.display,f=e.doc;t.maxLine=jt(f,f.first),t.maxLineLength=si(t.maxLine),t.maxLineChanged=!0,f.iter(function(d){var D=si(d);D>t.maxLineLength&&(t.maxLineLength=D,t.maxLine=d)})}var hn=function(e,t,f){this.text=e,nr(this,t),this.height=f?f(this):1};hn.prototype.lineNo=function(){return mr(this)},Me(hn);function Nn(e,t,f,d){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),cr(e),nr(e,f);var D=d?d(e):1;D!=e.height&&Ur(e,D)}function ui(e){e.parent=null,cr(e)}var hi={},gn={};function Fn(e,t){if(!e||/^\s*$/.test(e))return null;var f=t.addModeClass?gn:hi;return f[e]||(f[e]=e.replace(/\S+/g,"cm-$&"))}function Zn(e,t){var f=L("span",null,null,p?"padding-right: .1px":null),d={pre:L("pre",[f],"CodeMirror-line"),content:f,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var D=0;D<=(t.rest?t.rest.length:0);D++){var V=D?t.rest[D-1]:t.line,ne=void 0;d.pos=0,d.addToken=Ar,Lt(e.display.measure)&&(ne=It(V,e.doc.direction))&&(d.addToken=Or(d.addToken,ne)),d.map=[];var ue=t!=e.display.externalMeasured&&mr(V);Zr(V,d,xt(e,V,ue)),V.styleClasses&&(V.styleClasses.bgClass&&(d.bgClass=z(V.styleClasses.bgClass,d.bgClass||"")),V.styleClasses.textClass&&(d.textClass=z(V.styleClasses.textClass,d.textClass||""))),d.map.length==0&&d.map.push(0,0,d.content.appendChild(Nt(e.display.measure))),D==0?(t.measure.map=d.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(d.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(p){var de=d.content.lastChild;(/\bcm-tab\b/.test(de.className)||de.querySelector&&de.querySelector(".cm-tab"))&&(d.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,t.line,d.pre),d.pre.className&&(d.textClass=z(d.pre.className,d.textClass||"")),d}function er(e){var t=l("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ar(e,t,f,d,D,V,ne){if(!t)return;var ue=e.splitSpaces?lr(t,e.trailingSpace):t,de=e.cm.state.specialChars,ve=!1,Ve;if(!de.test(t))e.col+=t.length,Ve=document.createTextNode(ue),e.map.push(e.pos,e.pos+t.length,Ve),S&&s<9&&(ve=!0),e.pos+=t.length;else{Ve=document.createDocumentFragment();for(var Ye=0;;){de.lastIndex=Ye;var gt=de.exec(t),dt=gt?gt.index-Ye:t.length-Ye;if(dt){var Mt=document.createTextNode(ue.slice(Ye,Ye+dt));S&&s<9?Ve.appendChild(l("span",[Mt])):Ve.appendChild(Mt),e.map.push(e.pos,e.pos+dt,Mt),e.col+=dt,e.pos+=dt}if(!gt)break;Ye+=dt+1;var Ut=void 0;if(gt[0]==" "){var Qt=e.cm.options.tabSize,Vt=Qt-e.col%Qt;Ut=Ve.appendChild(l("span",Se(Vt),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),e.col+=Vt}else gt[0]=="\r"||gt[0]==`
|
|
`?(Ut=Ve.appendChild(l("span",gt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ut.setAttribute("cm-text",gt[0]),e.col+=1):(Ut=e.cm.options.specialCharPlaceholder(gt[0]),Ut.setAttribute("cm-text",gt[0]),S&&s<9?Ve.appendChild(l("span",[Ut])):Ve.appendChild(Ut),e.col+=1);e.map.push(e.pos,e.pos+1,Ut),e.pos++}}if(e.trailingSpace=ue.charCodeAt(t.length-1)==32,f||d||D||ve||V||ne){var Zt=f||"";d&&(Zt+=d),D&&(Zt+=D);var Xt=l("span",[Ve],Zt,V);if(ne)for(var rr in ne)ne.hasOwnProperty(rr)&&rr!="style"&&rr!="class"&&Xt.setAttribute(rr,ne[rr]);return e.content.appendChild(Xt)}e.content.appendChild(Ve)}function lr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var f=t,d="",D=0;D<e.length;D++){var V=e.charAt(D);V==" "&&f&&(D==e.length-1||e.charCodeAt(D+1)==32)&&(V="\xA0"),d+=V,f=V==" "}return d}function Or(e,t){return function(f,d,D,V,ne,ue,de){D=D?D+" cm-force-border":"cm-force-border";for(var ve=f.pos,Ve=ve+d.length;;){for(var Ye=void 0,gt=0;gt<t.length&&!(Ye=t[gt],Ye.to>ve&&Ye.from<=ve);gt++);if(Ye.to>=Ve)return e(f,d,D,V,ne,ue,de);e(f,d.slice(0,Ye.to-ve),D,V,null,ue,de),V=null,d=d.slice(Ye.to-ve),ve=Ye.to}}}function Qr(e,t,f,d){var D=!d&&f.widgetNode;D&&e.map.push(e.pos,e.pos+t,D),!d&&e.cm.display.input.needsContentAttribute&&(D||(D=e.content.appendChild(document.createElement("span"))),D.setAttribute("cm-marker",f.id)),D&&(e.cm.display.input.setUneditable(D),e.content.appendChild(D)),e.pos+=t,e.trailingSpace=!1}function Zr(e,t,f){var d=e.markedSpans,D=e.text,V=0;if(!d){for(var ne=1;ne<f.length;ne+=2)t.addToken(t,D.slice(V,V=f[ne]),Fn(f[ne+1],t.cm.options));return}for(var ue=D.length,de=0,ve=1,Ve="",Ye,gt,dt=0,Mt,Ut,Qt,Vt,Zt;;){if(dt==de){Mt=Ut=Qt=gt="",Zt=null,Vt=null,dt=Infinity;for(var Xt=[],rr=void 0,br=0;br<d.length;++br){var pr=d[br],kr=pr.marker;if(kr.type=="bookmark"&&pr.from==de&&kr.widgetNode)Xt.push(kr);else if(pr.from<=de&&(pr.to==null||pr.to>de||kr.collapsed&&pr.to==de&&pr.from==de)){if(pr.to!=null&&pr.to!=de&&dt>pr.to&&(dt=pr.to,Ut=""),kr.className&&(Mt+=" "+kr.className),kr.css&&(gt=(gt?gt+";":"")+kr.css),kr.startStyle&&pr.from==de&&(Qt+=" "+kr.startStyle),kr.endStyle&&pr.to==dt&&(rr||(rr=[])).push(kr.endStyle,pr.to),kr.title&&((Zt||(Zt={})).title=kr.title),kr.attributes)for(var bn in kr.attributes)(Zt||(Zt={}))[bn]=kr.attributes[bn];kr.collapsed&&(!Vt||vr(Vt.marker,kr)<0)&&(Vt=pr)}else pr.from>de&&dt>pr.from&&(dt=pr.from)}if(rr)for(var Wn=0;Wn<rr.length;Wn+=2)rr[Wn+1]==dt&&(Ut+=" "+rr[Wn]);if(!Vt||Vt.from==de)for(var On=0;On<Xt.length;++On)Qr(t,0,Xt[On]);if(Vt&&(Vt.from||0)==de){if(Qr(t,(Vt.to==null?ue+1:Vt.to)-de,Vt.marker,Vt.from==null),Vt.to==null)return;Vt.to==de&&(Vt=!1)}}if(de>=ue)break;for(var di=Math.min(ue,dt);;){if(Ve){var ei=de+Ve.length;if(!Vt){var Pn=ei>di?Ve.slice(0,di-de):Ve;t.addToken(t,Pn,Ye?Ye+Mt:Mt,Qt,de+Pn.length==dt?Ut:"",gt,Zt)}if(ei>=di){Ve=Ve.slice(di-de),de=di;break}de=ei,Qt=""}Ve=D.slice(V,V=f[ve++]),Ye=Fn(f[ve++],t.cm.options)}}}function Dr(e,t,f){this.line=t,this.rest=wn(t),this.size=this.rest?mr(tt(this.rest))-f+1:1,this.node=this.text=null,this.hidden=In(e,t)}function vn(e,t,f){for(var d=[],D,V=t;V<f;V=D){var ne=new Dr(e.doc,jt(e.doc,V),V);D=V+ne.size,d.push(ne)}return d}var Un=null;function Nr(e){Un?Un.ops.push(e):e.ownsGroup=Un={ops:[e],delayedCallbacks:[]}}function Pi(e){var t=e.delayedCallbacks,f=0;do{for(;f<t.length;f++)t[f].call(null);for(var d=0;d<e.ops.length;d++){var D=e.ops[d];if(D.cursorActivityHandlers)for(;D.cursorActivityCalled<D.cursorActivityHandlers.length;)D.cursorActivityHandlers[D.cursorActivityCalled++].call(null,D.cm)}}while(f<t.length)}function dr(e,t){var f=e.ownsGroup;if(!f)return;try{Pi(f)}finally{Un=null,t(f)}}var xr=null;function Tr(e,t){var f=At(e,t);if(!f.length)return;var d=Array.prototype.slice.call(arguments,2),D;Un?D=Un.delayedCallbacks:xr?D=xr:(D=xr=[],setTimeout(_n,0));for(var V=function(ue){D.push(function(){return f[ue].apply(null,d)})},ne=0;ne<f.length;++ne)V(ne)}function _n(){var e=xr;xr=null;for(var t=0;t<e.length;++t)e[t]()}function xi(e,t,f,d){for(var D=0;D<t.changes.length;D++){var V=t.changes[D];V=="text"?hs(e,t):V=="gutter"?Ro(e,t,f,d):V=="class"?fs(e,t):V=="widget"&&nl(e,t,d)}t.changes=null}function Xi(e){return e.node==e.text&&(e.node=l("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&s<8&&(e.node.style.zIndex=2)),e.node}function Za(e,t){var f=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(f&&(f+=" CodeMirror-linebackground"),t.background)f?t.background.className=f:(t.background.parentNode.removeChild(t.background),t.background=null);else if(f){var d=Xi(t);t.background=d.insertBefore(l("div",null,f),d.firstChild),e.display.input.setUneditable(t.background)}}function Io(e,t){var f=e.display.externalMeasured;return f&&f.line==t.line?(e.display.externalMeasured=null,t.measure=f.measure,f.built):Zn(e,t)}function hs(e,t){var f=t.text.className,d=Io(e,t);t.text==t.node&&(t.node=d.pre),t.text.parentNode.replaceChild(d.pre,t.text),t.text=d.pre,d.bgClass!=t.bgClass||d.textClass!=t.textClass?(t.bgClass=d.bgClass,t.textClass=d.textClass,fs(e,t)):f&&(t.text.className=f)}function fs(e,t){Za(e,t),t.line.wrapClass?Xi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var f=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=f||""}function Ro(e,t,f,d){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var D=Xi(t);t.gutterBackground=l("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),D.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var ne=Xi(t),ue=t.gutter=l("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ue),ne.insertBefore(ue,t.text),t.line.gutterClass&&(ue.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=ue.appendChild(l("div",dn(e.options,f),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var de=0;de<e.display.gutterSpecs.length;++de){var ve=e.display.gutterSpecs[de].className,Ve=V.hasOwnProperty(ve)&&V[ve];Ve&&ue.appendChild(l("div",[Ve],"CodeMirror-gutter-elt","left: "+d.gutterLeft[ve]+"px; width: "+d.gutterWidth[ve]+"px"))}}}function nl(e,t,f){t.alignable&&(t.alignable=null);for(var d=b("CodeMirror-linewidget"),D=t.node.firstChild,V=void 0;D;D=V)V=D.nextSibling,d.test(D.className)&&t.node.removeChild(D);_a(e,t,f)}function il(e,t,f,d){var D=Io(e,t);return t.text=t.node=D.pre,D.bgClass&&(t.bgClass=D.bgClass),D.textClass&&(t.textClass=D.textClass),fs(e,t),Ro(e,t,f,d),_a(e,t,d),t.node}function _a(e,t,f){if(Aa(e,t.line,t,f,!0),t.rest)for(var d=0;d<t.rest.length;d++)Aa(e,t.rest[d],t,f,!1)}function Aa(e,t,f,d,D){if(!t.widgets)return;for(var V=Xi(f),ne=0,ue=t.widgets;ne<ue.length;++ne){var de=ue[ne],ve=l("div",[de.node],"CodeMirror-linewidget"+(de.className?" "+de.className:""));de.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),yn(de,ve,f,d),e.display.input.setUneditable(ve),D&&de.above?V.insertBefore(ve,f.gutter||f.text):V.appendChild(ve),Tr(de,"redraw")}}function yn(e,t,f,d){if(e.noHScroll){(f.alignable||(f.alignable=[])).push(t);var D=d.wrapperWidth;t.style.left=d.fixedPos+"px",e.coverGutter||(D-=d.gutterTotalWidth,t.style.paddingLeft=d.gutterTotalWidth+"px"),t.style.width=D+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-d.gutterTotalWidth+"px"))}function $a(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!h(document.body,e.node)){var f="position: relative;";e.coverGutter&&(f+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(f+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,l("div",[e.node],null,f))}return e.height=e.node.parentNode.offsetHeight}function Bi(e,t){for(var f=ze(t);f!=e.wrapper;f=f.parentNode)if(!f||f.nodeType==1&&f.getAttribute("cm-ignore-events")=="true"||f.parentNode==e.sizer&&f!=e.mover)return!0}function qa(e){return e.lineSpace.offsetTop}function Yi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ti(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,l("pre","x","CodeMirror-line-like")),f=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d={left:parseInt(f.paddingLeft),right:parseInt(f.paddingRight)};return!isNaN(d.left)&&!isNaN(d.right)&&(e.cachedPaddingH=d),d}function Di(e){return se-e.display.nativeBarWidth}function Ai(e){return e.display.scroller.clientWidth-Di(e)-e.display.barWidth}function Mn(e){return e.display.scroller.clientHeight-Di(e)-e.display.barHeight}function al(e,t,f){var d=e.options.lineWrapping,D=d&&Ai(e);if(!t.measure.heights||d&&t.measure.width!=D){var V=t.measure.heights=[];if(d){t.measure.width=D;for(var ne=t.text.firstChild.getClientRects(),ue=0;ue<ne.length-1;ue++){var de=ne[ue],ve=ne[ue+1];Math.abs(de.bottom-ve.bottom)>2&&V.push((de.bottom+ve.top)/2-f.top)}}V.push(f.bottom-f.top)}}function Xn(e,t,f){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var d=0;d<e.rest.length;d++)if(e.rest[d]==t)return{map:e.measure.maps[d],cache:e.measure.caches[d]};for(var D=0;D<e.rest.length;D++)if(mr(e.rest[D])>f)return{map:e.measure.maps[D],cache:e.measure.caches[D],before:!0}}function ps(e,t){t=nn(t);var f=mr(t),d=e.display.externalMeasured=new Dr(e.doc,t,f);d.lineN=f;var D=d.built=Zn(e,d);return d.text=D.pre,n(e.display.lineMeasure,D.pre),d}function ki(e,t,f,d){return Si(e,an(e,t),f,d)}function ca(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Zi(e,t)];var f=e.display.externalMeasured;if(f&&t>=f.lineN&&t<f.lineN+f.size)return f}function an(e,t){var f=mr(t),d=ca(e,f);d&&!d.text?d=null:d&&d.changes&&(xi(e,d,f,bs(e)),e.curOp.forceUpdate=!0),d||(d=ps(e,t));var D=Xn(d,t,f);return{line:t,view:d,rect:null,map:D.map,cache:D.cache,before:D.before,hasHeights:!1}}function Si(e,t,f,d,D){t.before&&(f=-1);var V=f+(d||""),ne;return t.cache.hasOwnProperty(V)?ne=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(al(e,t.view,t.rect),t.hasHeights=!0),ne=Mo(e,t,f,d),ne.bogus||(t.cache[V]=ne)),{left:ne.left,right:ne.right,top:D?ne.rtop:ne.top,bottom:D?ne.rbottom:ne.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,t,f){for(var d,D,V,ne,ue,de,ve=0;ve<e.length;ve+=3)if(ue=e[ve],de=e[ve+1],t<ue?(D=0,V=1,ne="left"):t<de?(D=t-ue,V=D+1):(ve==e.length-3||t==de&&e[ve+3]>t)&&(V=de-ue,D=V-1,t>=de&&(ne="right")),D!=null){if(d=e[ve+2],ue==de&&f==(d.insertLeft?"left":"right")&&(ne=f),f=="left"&&D==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)d=e[(ve-=3)+2],ne="left";if(f=="right"&&D==de-ue)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)d=e[(ve+=3)+2],ne="right";break}return{node:d,start:D,end:V,collapse:ne,coverStart:ue,coverEnd:de}}function ol(e,t){var f=ms;if(t=="left")for(var d=0;d<e.length&&!((f=e[d]).left!=f.right);d++);else for(var D=e.length-1;D>=0&&!((f=e[D]).left!=f.right);D--);return f}function Mo(e,t,f,d){var D=gs(t.map,f,d),V=D.node,ne=D.start,ue=D.end,de=D.collapse,ve;if(V.nodeType==3){for(var Ve=0;Ve<4;Ve++){for(;ne&&Re(t.line.text.charAt(D.coverStart+ne));)--ne;for(;D.coverStart+ue<D.coverEnd&&Re(t.line.text.charAt(D.coverStart+ue));)++ue;if(S&&s<9&&ne==0&&ue==D.coverEnd-D.coverStart?ve=V.parentNode.getBoundingClientRect():ve=ol(B(V,ne,ue).getClientRects(),d),ve.left||ve.right||ne==0)break;ue=ne,ne=ne-1,de="right"}S&&s<11&&(ve=sl(e.display.measure,ve))}else{ne>0&&(de=d="right");var Ye;e.options.lineWrapping&&(Ye=V.getClientRects()).length>1?ve=Ye[d=="right"?Ye.length-1:0]:ve=V.getBoundingClientRect()}if(S&&s<9&&!ne&&(!ve||!ve.left&&!ve.right)){var gt=V.parentNode.getClientRects()[0];gt?ve={left:gt.left,right:gt.left+Da(e.display),top:gt.top,bottom:gt.bottom}:ve=ms}for(var dt=ve.top-t.rect.top,Mt=ve.bottom-t.rect.top,Ut=(dt+Mt)/2,Qt=t.view.measure.heights,Vt=0;Vt<Qt.length-1&&!(Ut<Qt[Vt]);Vt++);var Zt=Vt?Qt[Vt-1]:0,Xt=Qt[Vt],rr={left:(de=="right"?ve.right:ve.left)-t.rect.left,right:(de=="left"?ve.left:ve.right)-t.rect.left,top:Zt,bottom:Xt};return!ve.left&&!ve.right&&(rr.bogus=!0),e.options.singleCursorHeightPerLine||(rr.rtop=dt,rr.rbottom=Mt),rr}function sl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ue(e))return t;var f=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*f,right:t.right*f,top:t.top*d,bottom:t.bottom*d}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function fi(e){e.display.externalMeasure=null,r(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vs(e.display.view[t])}function bi(e){fi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ni(){return i&&c?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Kn(){return i&&c?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ii(e){var t=0;if(e.widgets)for(var f=0;f<e.widgets.length;++f)e.widgets[f].above&&(t+=$a(e.widgets[f]));return t}function eo(e,t,f,d,D){if(!D){var V=Ii(t);f.top+=V,f.bottom+=V}if(d=="line")return f;d||(d="local");var ne=Rn(t);if(d=="local"?ne+=qa(e.display):ne-=e.display.viewOffset,d=="page"||d=="window"){var ue=e.display.lineSpace.getBoundingClientRect();ne+=ue.top+(d=="window"?0:Kn());var de=ue.left+(d=="window"?0:Ni());f.left+=de,f.right+=de}return f.top+=ne,f.bottom+=ne,f}function ys(e,t,f){if(f=="div")return t;var d=t.left,D=t.top;if(f=="page")d-=Ni(),D-=Kn();else if(f=="local"||!f){var V=e.display.sizer.getBoundingClientRect();d+=V.left,D+=V.top}var ne=e.display.lineSpace.getBoundingClientRect();return{left:d-ne.left,top:D-ne.top}}function to(e,t,f,d,D){return d||(d=jt(e.doc,t.line)),eo(e,d,ki(e,d,t.ch,D),f)}function Ei(e,t,f,d,D,V){d=d||jt(e.doc,t.line),D||(D=an(e,d));function ne(Mt,Ut){var Qt=Si(e,D,Mt,Ut?"right":"left",V);return Ut?Qt.left=Qt.right:Qt.right=Qt.left,eo(e,d,Qt,f)}var ue=It(d,e.doc.direction),de=t.ch,ve=t.sticky;if(de>=d.text.length?(de=d.text.length,ve="before"):de<=0&&(de=0,ve="after"),!ue)return ne(ve=="before"?de-1:de,ve=="before");function Ve(Mt,Ut,Qt){var Vt=ue[Ut],Zt=Vt.level==1;return ne(Qt?Mt-1:Mt,Zt!=Qt)}var Ye=yt(ue,de,ve),gt=bt,dt=Ve(de,Ye,ve=="before");return gt!=null&&(dt.other=Ve(de,gt,ve!="before")),dt}function ll(e,t){var f=0;t=F(e.doc,t),e.options.lineWrapping||(f=Da(e.display)*t.ch);var d=jt(e.doc,t.line),D=Rn(d)+qa(e.display);return{left:f,right:f,top:D,bottom:D+d.height}}function da(e,t,f,d,D){var V=fe(e,t,f);return V.xRel=D,d&&(V.outside=d),V}function Li(e,t,f){var d=e.doc;if(f+=e.display.viewOffset,f<0)return da(d.first,0,null,-1,-1);var D=Sr(d,f),V=d.first+d.size-1;if(D>V)return da(d.first+d.size-1,jt(d,V).text.length,null,1,1);t<0&&(t=0);for(var ne=jt(d,D);;){var ue=cl(e,ne,D,t,f),de=kn(ne,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!de)return ue;var ve=de.find(1);if(ve.line==D)return ve;ne=jt(d,D=ve.line)}}function ul(e,t,f,d){d-=Ii(t);var D=t.text.length,V=ft(function(ne){return Si(e,f,ne-1).bottom<=d},D,0);return D=ft(function(ne){return Si(e,f,ne).top>d},V,D),{begin:V,end:D}}function Al(e,t,f,d){f||(f=an(e,t));var D=eo(e,t,Si(e,f,d),"line").top;return ul(e,t,f,D)}function Oa(e,t,f,d){return e.bottom<=f?!1:e.top>f?!0:(d?e.left:e.right)>t}function cl(e,t,f,d,D){D-=Rn(t);var V=an(e,t),ne=Ii(t),ue=0,de=t.text.length,ve=!0,Ve=It(t,e.doc.direction);if(Ve){var Ye=(e.options.lineWrapping?yu:vu)(e,t,f,V,Ve,d,D);ve=Ye.level!=1,ue=ve?Ye.from:Ye.to-1,de=ve?Ye.to:Ye.from-1}var gt=null,dt=null,Mt=ft(function(br){var pr=Si(e,V,br);return pr.top+=ne,pr.bottom+=ne,Oa(pr,d,D,!1)?(pr.top<=D&&pr.left<=d&&(gt=br,dt=pr),!0):!1},ue,de),Ut,Qt,Vt=!1;if(dt){var Zt=d-dt.left<dt.right-d,Xt=Zt==ve;Mt=gt+(Xt?0:1),Qt=Xt?"after":"before",Ut=Zt?dt.left:dt.right}else{!ve&&(Mt==de||Mt==ue)&&Mt++,Qt=Mt==0?"after":Mt==t.text.length?"before":Si(e,V,Mt-(ve?1:0)).bottom+ne<=D==ve?"after":"before";var rr=Ei(e,fe(f,Mt,Qt),"line",t,V);Ut=rr.left,Vt=D<rr.top?-1:D>=rr.bottom?1:0}return Mt=ke(t.text,Mt,1),da(f,Mt,Qt,Vt,d-Ut)}function vu(e,t,f,d,D,V,ne){var ue=ft(function(Ye){var gt=D[Ye],dt=gt.level!=1;return Oa(Ei(e,fe(f,dt?gt.to:gt.from,dt?"before":"after"),"line",t,d),V,ne,!0)},0,D.length-1),de=D[ue];if(ue>0){var ve=de.level!=1,Ve=Ei(e,fe(f,ve?de.from:de.to,ve?"after":"before"),"line",t,d);Oa(Ve,V,ne,!0)&&Ve.top>ne&&(de=D[ue-1])}return de}function yu(e,t,f,d,D,V,ne){var ue=ul(e,t,d,ne),de=ue.begin,ve=ue.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var Ve=null,Ye=null,gt=0;gt<D.length;gt++){var dt=D[gt];if(dt.from>=ve||dt.to<=de)continue;var Mt=dt.level!=1,Ut=Si(e,d,Mt?Math.min(ve,dt.to)-1:Math.max(de,dt.from)).right,Qt=Ut<V?V-Ut+1e9:Ut-V;(!Ve||Ye>Qt)&&(Ve=dt,Ye=Qt)}return Ve||(Ve=D[D.length-1]),Ve.from<de&&(Ve={from:de,to:Ve.to,level:Ve.level}),Ve.to>ve&&(Ve={from:Ve.from,to:ve,level:Ve.level}),Ve}var $n;function ha(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if($n==null){$n=l("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)$n.appendChild(document.createTextNode("x")),$n.appendChild(l("br"));$n.appendChild(document.createTextNode("x"))}n(e.measure,$n);var f=$n.offsetHeight/50;return f>3&&(e.cachedTextHeight=f),r(e.measure),f||1}function Da(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=l("span","xxxxxxxxxx"),f=l("pre",[t],"CodeMirror-line-like");n(e.measure,f);var d=t.getBoundingClientRect(),D=(d.right-d.left)/10;return D>2&&(e.cachedCharWidth=D),D||10}function bs(e){for(var t=e.display,f={},d={},D=t.gutters.clientLeft,V=t.gutters.firstChild,ne=0;V;V=V.nextSibling,++ne){var ue=e.display.gutterSpecs[ne].className;f[ue]=V.offsetLeft+V.clientLeft+D,d[ue]=V.clientWidth}return{fixedPos:Ia(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:f,gutterWidth:d,wrapperWidth:t.wrapper.clientWidth}}function Ia(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dl(e){var t=ha(e.display),f=e.options.lineWrapping,d=f&&Math.max(5,e.display.scroller.clientWidth/Da(e.display)-3);return function(D){if(In(e.doc,D))return 0;var V=0;if(D.widgets)for(var ne=0;ne<D.widgets.length;ne++)D.widgets[ne].height&&(V+=D.widgets[ne].height);return f?V+(Math.ceil(D.text.length/d)||1)*t:V+t}}function Fo(e){var t=e.doc,f=dl(e);t.iter(function(d){var D=f(d);D!=d.height&&Ur(d,D)})}function Ji(e,t,f,d){var D=e.display;if(!f&&ze(t).getAttribute("cm-not-content")=="true")return null;var V,ne,ue=D.lineSpace.getBoundingClientRect();try{V=t.clientX-ue.left,ne=t.clientY-ue.top}catch(Ye){return null}var de=Li(e,V,ne),ve;if(d&&de.xRel>0&&(ve=jt(e.doc,de.line).text).length==de.ch){var Ve=ee(ve,ve.length,e.options.tabSize)-ve.length;de=fe(de.line,Math.max(0,Math.round((V-Ti(e.display).left)/Da(e.display))-Ve))}return de}function Zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var f=e.display.view,d=0;d<f.length;d++)if(t-=f[d].size,t<0)return d}function ri(e,t,f,d){t==null&&(t=e.doc.first),f==null&&(f=e.doc.first+e.doc.size),d||(d=0);var D=e.display;if(d&&f<D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>t)&&(D.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=D.viewTo)Hr&&Jr(e.doc,t)<D.viewTo&&Qi(e);else if(f<=D.viewFrom)Hr&&Jn(e.doc,f+d)>D.viewFrom?Qi(e):(D.viewFrom+=d,D.viewTo+=d);else if(t<=D.viewFrom&&f>=D.viewTo)Qi(e);else if(t<=D.viewFrom){var V=ro(e,f,f+d,1);V?(D.view=D.view.slice(V.index),D.viewFrom=V.lineN,D.viewTo+=d):Qi(e)}else if(f>=D.viewTo){var ne=ro(e,t,t,-1);ne?(D.view=D.view.slice(0,ne.index),D.viewTo=ne.lineN):Qi(e)}else{var ue=ro(e,t,t,-1),de=ro(e,f,f+d,1);ue&&de?(D.view=D.view.slice(0,ue.index).concat(vn(e,ue.lineN,de.lineN)).concat(D.view.slice(de.index)),D.viewTo+=d):Qi(e)}var ve=D.externalMeasured;ve&&(f<ve.lineN?ve.lineN+=d:t<ve.lineN+ve.size&&(D.externalMeasured=null))}function Hi(e,t,f){e.curOp.viewChanged=!0;var d=e.display,D=e.display.externalMeasured;if(D&&t>=D.lineN&&t<D.lineN+D.size&&(d.externalMeasured=null),t<d.viewFrom||t>=d.viewTo)return;var V=d.view[Zi(e,t)];if(V.node==null)return;var ne=V.changes||(V.changes=[]);oe(ne,f)==-1&&ne.push(f)}function Qi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ro(e,t,f,d){var D=Zi(e,t),V,ne=e.display.view;if(!Hr||f==e.doc.first+e.doc.size)return{index:D,lineN:f};for(var ue=e.display.viewFrom,de=0;de<D;de++)ue+=ne[de].size;if(ue!=t){if(d>0){if(D==ne.length-1)return null;V=ue+ne[D].size-t,D++}else V=ue-t;t+=V,f+=V}for(;Jr(e.doc,f)!=f;){if(D==(d<0?0:ne.length-1))return null;f+=d*ne[D-(d<0?1:0)].size,D+=d}return{index:D,lineN:f}}function hl(e,t,f){var d=e.display,D=d.view;D.length==0||t>=d.viewTo||f<=d.viewFrom?(d.view=vn(e,t,f),d.viewFrom=t):(d.viewFrom>t?d.view=vn(e,t,d.viewFrom).concat(d.view):d.viewFrom<t&&(d.view=d.view.slice(Zi(e,t))),d.viewFrom=t,d.viewTo<f?d.view=d.view.concat(vn(e,d.viewTo,f)):d.viewTo>f&&(d.view=d.view.slice(0,Zi(e,f)))),d.viewTo=f}function fl(e){for(var t=e.display.view,f=0,d=0;d<t.length;d++){var D=t[d];!D.hidden&&(!D.node||D.changes)&&++f}return f}function $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,t){t===void 0&&(t=!0);for(var f=e.doc,d={},D=d.cursors=document.createDocumentFragment(),V=d.selection=document.createDocumentFragment(),ne=0;ne<f.sel.ranges.length;ne++){if(!t&&ne==f.sel.primIndex)continue;var ue=f.sel.ranges[ne];if(ue.from().line>=e.display.viewTo||ue.to().line<e.display.viewFrom)continue;var de=ue.empty();(de||e.options.showCursorWhenSelecting)&&ml(e,ue.head,D),de||bu(e,ue,V)}return d}function ml(e,t,f){var d=Ei(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),D=f.appendChild(l("div","\xA0","CodeMirror-cursor"));if(D.style.left=d.left+"px",D.style.top=d.top+"px",D.style.height=Math.max(0,d.bottom-d.top)*e.options.cursorHeight+"px",d.other){var V=f.appendChild(l("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=d.other.left+"px",V.style.top=d.other.top+"px",V.style.height=(d.other.bottom-d.other.top)*.85+"px"}}function Ra(e,t){return e.top-t.top||e.left-t.left}function bu(e,t,f){var d=e.display,D=e.doc,V=document.createDocumentFragment(),ne=Ti(e.display),ue=ne.left,de=Math.max(d.sizerWidth,Ai(e)-d.sizer.offsetLeft)-ne.right,ve=D.direction=="ltr";function Ve(Xt,rr,br,pr){rr<0&&(rr=0),rr=Math.round(rr),pr=Math.round(pr),V.appendChild(l("div",null,"CodeMirror-selected","position: absolute; left: "+Xt+`px;
|
|
top: `+rr+"px; width: "+(br==null?de-Xt:br)+`px;
|
|
height: `+(pr-rr)+"px"))}function Ye(Xt,rr,br){var pr=jt(D,Xt),kr=pr.text.length,bn,Wn;function On(Pn,ti){return to(e,fe(Xt,Pn),"div",pr,ti)}function di(Pn,ti,Yn){var Wt=Al(e,pr,null,Pn),Bn=ti=="ltr"==(Yn=="after")?"left":"right",Tn=Yn=="after"?Wt.begin:Wt.end-(/\s/.test(pr.text.charAt(Wt.end-1))?2:1);return On(Tn,Bn)[Bn]}var ei=It(pr,D.direction);return pt(ei,rr||0,br==null?kr:br,function(Pn,ti,Yn,Wt){var Bn=Yn=="ltr",Tn=On(Pn,Bn?"left":"right"),Sn=On(ti-1,Bn?"right":"left"),Wa=rr==null&&Pn==0,Xr=br==null&&ti==kr,jr=Wt==0,vi=!ei||Wt==ei.length-1;if(Sn.top-Tn.top<=3){var Gn=(ve?Wa:Xr)&&jr,Ga=(ve?Xr:Wa)&&vi,Vi=Gn?ue:(Bn?Tn:Sn).left,Fi=Ga?de:(Bn?Sn:Tn).right;Ve(Vi,Tn.top,Fi-Vi,Tn.bottom)}else{var Ba,ai,Ta,tl;Bn?(Ba=ve&&Wa&&jr?ue:Tn.left,ai=ve?de:di(Pn,Yn,"before"),Ta=ve?ue:di(ti,Yn,"after"),tl=ve&&Xr&&vi?de:Sn.right):(Ba=ve?di(Pn,Yn,"before"):ue,ai=!ve&&Wa&&jr?de:Tn.right,Ta=!ve&&Xr&&vi?ue:Sn.left,tl=ve?di(ti,Yn,"after"):de),Ve(Ba,Tn.top,ai-Ba,Tn.bottom),Tn.bottom<Sn.top&&Ve(ue,Tn.bottom,null,Sn.top),Ve(Ta,Sn.top,tl-Ta,Sn.bottom)}(!bn||Ra(Tn,bn)<0)&&(bn=Tn),Ra(Sn,bn)<0&&(bn=Sn),(!Wn||Ra(Tn,Wn)<0)&&(Wn=Tn),Ra(Sn,Wn)<0&&(Wn=Sn)}),{start:bn,end:Wn}}var gt=t.from(),dt=t.to();if(gt.line==dt.line)Ye(gt.line,gt.ch,dt.ch);else{var Mt=jt(D,gt.line),Ut=jt(D,dt.line),Qt=nn(Mt)==nn(Ut),Vt=Ye(gt.line,gt.ch,Qt?Mt.text.length+1:null).end,Zt=Ye(dt.line,Qt?0:null,dt.ch).start;Qt&&(Vt.top<Zt.top-2?(Ve(Vt.right,Vt.top,null,Vt.bottom),Ve(ue,Zt.top,Zt.left,Zt.bottom)):Ve(Vt.right,Vt.top,Zt.left-Vt.right,Vt.bottom)),Vt.bottom<Zt.top&&Ve(ue,Vt.bottom,null,Zt.top)}f.appendChild(V)}function Uo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var f=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ma(e),t.cursorDiv.style.visibility=(f=!f)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gl(e){e.state.focused||(e.display.input.focus(),Es(e))}function vl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ma(e))},100)}function Es(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Uo(e)}function Ma(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,t),e.state.focused=!1,o(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Po(e){for(var t=e.display,f=t.lineDiv.offsetTop,d=0;d<t.view.length;d++){var D=t.view[d],V=e.options.lineWrapping,ne=void 0,ue=0;if(D.hidden)continue;if(S&&s<8){var de=D.node.offsetTop+D.node.offsetHeight;ne=de-f,f=de}else{var ve=D.node.getBoundingClientRect();ne=ve.bottom-ve.top,!V&&D.text.firstChild&&(ue=D.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Ve=D.line.height-ne;if((Ve>.005||Ve<-.005)&&(Ur(D.line,ne),fa(D.line),D.rest))for(var Ye=0;Ye<D.rest.length;Ye++)fa(D.rest[Ye]);if(ue>e.display.sizerWidth){var gt=Math.ceil(ue/Da(e.display));gt>e.display.maxLineLength&&(e.display.maxLineLength=gt,e.display.maxLine=D.line,e.display.maxLineChanged=!0)}}}function fa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var f=e.widgets[t],d=f.node.parentNode;d&&(f.height=d.offsetHeight)}}function ko(e,t,f){var d=f&&f.top!=null?Math.max(0,f.top):e.scroller.scrollTop;d=Math.floor(d-qa(e));var D=f&&f.bottom!=null?f.bottom:d+e.wrapper.clientHeight,V=Sr(t,d),ne=Sr(t,D);if(f&&f.ensure){var ue=f.ensure.from.line,de=f.ensure.to.line;ue<V?(V=ue,ne=Sr(t,Rn(jt(t,ue))+e.wrapper.clientHeight)):Math.min(de,t.lastLine())>=ne&&(V=Sr(t,Rn(jt(t,de))-e.wrapper.clientHeight),ne=de)}return{from:V,to:Math.max(ne,V+1)}}function Eu(e,t){if(ut(e,"scrollCursorIntoView"))return;var f=e.display,d=f.sizer.getBoundingClientRect(),D=null;if(t.top+d.top<0?D=!0:t.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(D=!1),D!=null&&!g){var V=l("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-f.viewOffset-qa(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Di(e)+f.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(D),e.display.lineSpace.removeChild(V)}}function No(e,t,f,d){d==null&&(d=0);var D;!e.options.lineWrapping&&t==f&&(t=t.ch?fe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,f=t.sticky=="before"?fe(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var ne=!1,ue=Ei(e,t),de=!f||f==t?ue:Ei(e,f);D={left:Math.min(ue.left,de.left),top:Math.min(ue.top,de.top)-d,right:Math.max(ue.left,de.left),bottom:Math.max(ue.bottom,de.bottom)+d};var ve=Cs(e,D),Ve=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(ve.scrollTop!=null&&(no(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Ve)>1&&(ne=!0)),ve.scrollLeft!=null&&(pa(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(ne=!0)),!ne)break}return D}function Cu(e,t){var f=Cs(e,t);f.scrollTop!=null&&no(e,f.scrollTop),f.scrollLeft!=null&&pa(e,f.scrollLeft)}function Cs(e,t){var f=e.display,d=ha(e.display);t.top<0&&(t.top=0);var D=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:f.scroller.scrollTop,V=Mn(e),ne={};t.bottom-t.top>V&&(t.bottom=t.top+V);var ue=e.doc.height+Yi(f),de=t.top<d,ve=t.bottom>ue-d;if(t.top<D)ne.scrollTop=de?0:t.top;else if(t.bottom>D+V){var Ve=Math.min(t.top,(ve?ue:t.bottom)-V);Ve!=D&&(ne.scrollTop=Ve)}var Ye=e.options.fixedGutter?0:f.gutters.offsetWidth,gt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:f.scroller.scrollLeft-Ye,dt=Ai(e)-f.gutters.offsetWidth,Mt=t.right-t.left>dt;return Mt&&(t.right=t.left+dt),t.left<10?ne.scrollLeft=0:t.left<gt?ne.scrollLeft=Math.max(0,t.left+Ye-(Mt?0:10)):t.right>dt+gt-3&&(ne.scrollLeft=t.right+(Mt?0:10)-dt),ne}function ws(e,t){if(t==null)return;Ho(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Fa(e){Ho(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function qi(e,t,f){(t!=null||f!=null)&&Ho(e),t!=null&&(e.curOp.scrollLeft=t),f!=null&&(e.curOp.scrollTop=f)}function wu(e,t){Ho(e),e.curOp.scrollToPos=t}function Ho(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var f=ll(e,t.from),d=ll(e,t.to);yl(e,f,d,t.margin)}}function yl(e,t,f,d){var D=Cs(e,{left:Math.min(t.left,f.left),top:Math.min(t.top,f.top)-d,right:Math.max(t.right,f.right),bottom:Math.max(t.bottom,f.bottom)+d});qi(e,D.scrollLeft,D.scrollTop)}function no(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;_||Ua(e,{top:t}),io(e,t,!0),_&&Ua(e),ya(e,100)}function io(e,t,f){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!f)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function pa(e,t,f,d){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(f?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!d)return;e.doc.scrollLeft=t,xl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ao(e){var t=e.display,f=t.gutters.offsetWidth,d=Math.round(e.doc.height+Yi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?f:0,docHeight:d,scrollHeight:d+Di(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:f}}var ma=function(e,t,f){this.cm=f;var d=this.vert=l("div",[l("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),D=this.horiz=l("div",[l("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");d.tabIndex=D.tabIndex=-1,e(d),e(D),Pe(d,"scroll",function(){d.clientHeight&&t(d.scrollTop,"vertical")}),Pe(D,"scroll",function(){D.clientWidth&&t(D.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ma.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,f=e.scrollHeight>e.clientHeight+1,d=e.nativeBarWidth;if(f){this.vert.style.display="block",this.vert.style.bottom=t?d+"px":"0";var D=e.viewHeight-(t?d:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+D)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=f?d+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(f?d:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(d==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:f?d:0,bottom:t?d:0}},ma.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ma.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ma.prototype.zeroWidthHack=function(){var e=u&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},ma.prototype.enableZeroWidthBar=function(e,t,f){e.style.pointerEvents="auto";function d(){var D=e.getBoundingClientRect(),V=f=="vert"?document.elementFromPoint(D.right-1,(D.top+D.bottom)/2):document.elementFromPoint((D.right+D.left)/2,D.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,d)}t.set(1e3,d)},ma.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var oo=function(){};oo.prototype.update=function(){return{bottom:0,right:0}},oo.prototype.setScrollLeft=function(){},oo.prototype.setScrollTop=function(){},oo.prototype.clear=function(){};function ji(e,t){t||(t=ao(e));var f=e.display.barWidth,d=e.display.barHeight;bl(e,t);for(var D=0;D<4&&f!=e.display.barWidth||d!=e.display.barHeight;D++)f!=e.display.barWidth&&e.options.lineWrapping&&Po(e),bl(e,ao(e)),f=e.display.barWidth,d=e.display.barHeight}function bl(e,t){var f=e.display,d=f.scrollbars.update(t);f.sizer.style.paddingRight=(f.barWidth=d.right)+"px",f.sizer.style.paddingBottom=(f.barHeight=d.bottom)+"px",f.heightForcer.style.borderBottom=d.bottom+"px solid transparent",d.right&&d.bottom?(f.scrollbarFiller.style.display="block",f.scrollbarFiller.style.height=d.bottom+"px",f.scrollbarFiller.style.width=d.right+"px"):f.scrollbarFiller.style.display="",d.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(f.gutterFiller.style.display="block",f.gutterFiller.style.height=d.bottom+"px",f.gutterFiller.style.width=t.gutterWidth+"px"):f.gutterFiller.style.display=""}var El={native:ma,null:oo};function Cl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&o(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,f){f=="horizontal"?pa(e,t):no(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var xu=0;function ga(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++xu},Nr(e.curOp)}function va(e){var t=e.curOp;t&&dr(t,function(f){for(var d=0;d<f.ops.length;d++)f.ops[d].cm.curOp=null;Bu(f)})}function Bu(e){for(var t=e.ops,f=0;f<t.length;f++)Tu(t[f]);for(var d=0;d<t.length;d++)Su(t[d]);for(var D=0;D<t.length;D++)Lu(t[D]);for(var V=0;V<t.length;V++)Qo(t[V]);for(var ne=0;ne<t.length;ne++)_u(t[ne])}function Tu(e){var t=e.cm,f=t.display;Ou(t),e.updateMaxLine&&Ln(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<f.viewFrom||e.scrollToPos.to.line>=f.viewTo)||f.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ko(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Su(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Lu(e){var t=e.cm,f=t.display;e.updatedDisplay&&Po(t),e.barMeasure=ao(t),f.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ki(t,f.maxLine,f.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(f.scroller.clientWidth,f.sizer.offsetLeft+e.adjustWidthTo+Di(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,f.sizer.offsetLeft+e.adjustWidthTo-Ai(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=f.input.prepareSelection())}function Qo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pa(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var f=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,f),(e.updatedDisplay||e.startHeight!=t.doc.height)&&ji(t,e.barMeasure),e.updatedDisplay&&Ts(t,e.barMeasure),e.selectionChanged&&Uo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),f&&gl(e.cm)}function _u(e){var t=e.cm,f=t.display,d=t.doc;if(e.updatedDisplay&&wl(t,e.update),f.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(f.wheelStartX=f.wheelStartY=null),e.scrollTop!=null&&io(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&pa(t,e.scrollLeft,!0,!0),e.scrollToPos){var D=No(t,F(d,e.scrollToPos.from),F(d,e.scrollToPos.to),e.scrollToPos.margin);Eu(t,D)}var V=e.maybeHiddenMarkers,ne=e.maybeUnhiddenMarkers;if(V)for(var ue=0;ue<V.length;++ue)V[ue].lines.length||Ze(V[ue],"hide");if(ne)for(var de=0;de<ne.length;++de)ne[de].lines.length&&Ze(ne[de],"unhide");f.wrapper.offsetHeight&&(d.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ze(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ci(e,t){if(e.curOp)return t();ga(e);try{return t()}finally{va(e)}}function Hn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ga(e);try{return t.apply(e,arguments)}finally{va(e)}}}function ni(e){return function(){if(this.curOp)return e.apply(this,arguments);ga(this);try{return e.apply(this,arguments)}finally{va(this)}}}function zn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ga(t);try{return e.apply(this,arguments)}finally{va(t)}}}function ya(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Y(jo,e))}function jo(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var f=+new Date+e.options.workTime,d=ot(e,t.highlightFrontier),D=[];t.iter(d.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(d.line>=e.display.viewFrom){var ne=V.styles,ue=V.text.length>e.options.maxHighlightLength?zt(t.mode,d.state):null,de=je(e,V,d,!0);ue&&(d.state=ue),V.styles=de.styles;var ve=V.styleClasses,Ve=de.classes;Ve?V.styleClasses=Ve:ve&&(V.styleClasses=null);for(var Ye=!ne||ne.length!=V.styles.length||ve!=Ve&&(!ve||!Ve||ve.bgClass!=Ve.bgClass||ve.textClass!=Ve.textClass),gt=0;!Ye&><ne.length;++gt)Ye=ne[gt]!=V.styles[gt];Ye&&D.push(d.line),V.stateAfter=d.save(),d.nextLine()}else V.text.length<=e.options.maxHighlightLength&&kt(e,V.text,d),V.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>f)return ya(e,e.options.workDelay),!0}),t.highlightFrontier=d.line,t.modeFrontier=Math.max(t.modeFrontier,d.line),D.length&&ci(e,function(){for(var V=0;V<D.length;V++)Hi(e,D[V],"text")})}var Ko=function(e,t,f){var d=e.display;this.viewport=t,this.visible=ko(d,e.doc,t),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Ai(e),this.force=f,this.dims=bs(e),this.events=[]};Ko.prototype.signal=function(e,t){Ie(e,t)&&this.events.push(arguments)},Ko.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function Ou(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Di(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Di(e)+"px",t.scrollbarsClipped=!0)}function Du(e){if(e.hasFocus())return null;var t=I();if(!t||!h(e.display.lineDiv,t))return null;var f={activeElt:t};if(window.getSelection){var d=window.getSelection();d.anchorNode&&d.extend&&h(e.display.lineDiv,d.anchorNode)&&(f.anchorNode=d.anchorNode,f.anchorOffset=d.anchorOffset,f.focusNode=d.focusNode,f.focusOffset=d.focusOffset)}return f}function Iu(e){if(!e||!e.activeElt||e.activeElt==I())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&h(document.body,e.anchorNode)&&h(document.body,e.focusNode)){var t=window.getSelection(),f=document.createRange();f.setEnd(e.anchorNode,e.anchorOffset),f.collapse(!1),t.removeAllRanges(),t.addRange(f),t.extend(e.focusNode,e.focusOffset)}}function xs(e,t){var f=e.display,d=e.doc;if(t.editorIsHidden)return Qi(e),!1;if(!t.force&&t.visible.from>=f.viewFrom&&t.visible.to<=f.viewTo&&(f.updateLineNumbers==null||f.updateLineNumbers>=f.viewTo)&&f.renderedView==f.view&&fl(e)==0)return!1;Bl(e)&&(Qi(e),t.dims=bs(e));var D=d.first+d.size,V=Math.max(t.visible.from-e.options.viewportMargin,d.first),ne=Math.min(D,t.visible.to+e.options.viewportMargin);f.viewFrom<V&&V-f.viewFrom<20&&(V=Math.max(d.first,f.viewFrom)),f.viewTo>ne&&f.viewTo-ne<20&&(ne=Math.min(D,f.viewTo)),Hr&&(V=Jr(e.doc,V),ne=Jn(e.doc,ne));var ue=V!=f.viewFrom||ne!=f.viewTo||f.lastWrapHeight!=t.wrapperHeight||f.lastWrapWidth!=t.wrapperWidth;hl(e,V,ne),f.viewOffset=Rn(jt(e.doc,f.viewFrom)),e.display.mover.style.top=f.viewOffset+"px";var de=fl(e);if(!ue&&de==0&&!t.force&&f.renderedView==f.view&&(f.updateLineNumbers==null||f.updateLineNumbers>=f.viewTo))return!1;var ve=Du(e);return de>4&&(f.lineDiv.style.display="none"),Ru(e,f.updateLineNumbers,t.dims),de>4&&(f.lineDiv.style.display=""),f.renderedView=f.view,Iu(ve),r(f.cursorDiv),r(f.selectionDiv),f.gutters.style.height=f.sizer.style.minHeight=0,ue&&(f.lastWrapHeight=t.wrapperHeight,f.lastWrapWidth=t.wrapperWidth,ya(e,400)),f.updateLineNumbers=null,!0}function wl(e,t){for(var f=t.viewport,d=!0;;d=!1){if(!d||!e.options.lineWrapping||t.oldDisplayWidth==Ai(e)){if(f&&f.top!=null&&(f={top:Math.min(e.doc.height+Yi(e.display)-Mn(e),f.top)}),t.visible=ko(e.display,e.doc,f),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else d&&(t.visible=ko(e.display,e.doc,f));if(!xs(e,t))break;Po(e);var D=ao(e);$i(e),ji(e,D),Ts(e,D),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ua(e,t){var f=new Ko(e,t);if(xs(e,f)){Po(e),wl(e,f);var d=ao(e);$i(e),ji(e,d),Ts(e,d),f.finish()}}function Ru(e,t,f){var d=e.display,D=e.options.lineNumbers,V=d.lineDiv,ne=V.firstChild;function ue(Mt){var Ut=Mt.nextSibling;return p&&u&&e.display.currentWheelTarget==Mt?Mt.style.display="none":Mt.parentNode.removeChild(Mt),Ut}for(var de=d.view,ve=d.viewFrom,Ve=0;Ve<de.length;Ve++){var Ye=de[Ve];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=V){var gt=il(e,Ye,ve,f);V.insertBefore(gt,ne)}else{for(;ne!=Ye.node;)ne=ue(ne);var dt=D&&t!=null&&t<=ve&&Ye.lineNumber;Ye.changes&&(oe(Ye.changes,"gutter")>-1&&(dt=!1),xi(e,Ye,ve,f)),dt&&(r(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(dn(e.options,ve)))),ne=Ye.node.nextSibling}ve+=Ye.size}for(;ne;)ne=ue(ne)}function Bs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ts(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Di(e)+"px"}function xl(e){var t=e.display,f=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var d=Ia(t)-t.scroller.scrollLeft+e.doc.scrollLeft,D=t.gutters.offsetWidth,V=d+"px",ne=0;ne<f.length;ne++)if(!f[ne].hidden){e.options.fixedGutter&&(f[ne].gutter&&(f[ne].gutter.style.left=V),f[ne].gutterBackground&&(f[ne].gutterBackground.style.left=V));var ue=f[ne].alignable;if(ue)for(var de=0;de<ue.length;de++)ue[de].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=d+D+"px")}function Bl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,f=dn(e.options,t.first+t.size-1),d=e.display;if(f.length!=d.lineNumChars){var D=d.measure.appendChild(l("div",[l("div",f)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=D.firstChild.offsetWidth,ne=D.offsetWidth-V;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(V,d.lineGutter.offsetWidth-ne)+1,d.lineNumWidth=d.lineNumInnerWidth+ne,d.lineNumChars=d.lineNumInnerWidth?f.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",Bs(e.display),!0}return!1}function Ss(e,t){for(var f=[],d=!1,D=0;D<e.length;D++){var V=e[D],ne=null;if(typeof V!="string"&&(ne=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)d=!0;else continue;f.push({className:V,style:ne})}return t&&!d&&f.push({className:"CodeMirror-linenumbers",style:null}),f}function Tl(e){var t=e.gutters,f=e.gutterSpecs;r(t),e.lineGutter=null;for(var d=0;d<f.length;++d){var D=f[d],V=D.className,ne=D.style,ue=t.appendChild(l("div",null,"CodeMirror-gutter "+V));ne&&(ue.style.cssText=ne),V=="CodeMirror-linenumbers"&&(e.lineGutter=ue,ue.style.width=(e.lineNumWidth||1)+"px")}t.style.display=f.length?"":"none",Bs(e)}function so(e){Tl(e.display),ri(e),xl(e)}function Mu(e,t,f,d){var D=this;this.input=f,D.scrollbarFiller=l("div",null,"CodeMirror-scrollbar-filler"),D.scrollbarFiller.setAttribute("cm-not-content","true"),D.gutterFiller=l("div",null,"CodeMirror-gutter-filler"),D.gutterFiller.setAttribute("cm-not-content","true"),D.lineDiv=L("div",null,"CodeMirror-code"),D.selectionDiv=l("div",null,null,"position: relative; z-index: 1"),D.cursorDiv=l("div",null,"CodeMirror-cursors"),D.measure=l("div",null,"CodeMirror-measure"),D.lineMeasure=l("div",null,"CodeMirror-measure"),D.lineSpace=L("div",[D.measure,D.lineMeasure,D.selectionDiv,D.cursorDiv,D.lineDiv],null,"position: relative; outline: none");var V=L("div",[D.lineSpace],"CodeMirror-lines");D.mover=l("div",[V],null,"position: relative"),D.sizer=l("div",[D.mover],"CodeMirror-sizer"),D.sizerWidth=null,D.heightForcer=l("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),D.gutters=l("div",null,"CodeMirror-gutters"),D.lineGutter=null,D.scroller=l("div",[D.sizer,D.heightForcer,D.gutters],"CodeMirror-scroll"),D.scroller.setAttribute("tabIndex","-1"),D.wrapper=l("div",[D.scrollbarFiller,D.gutterFiller,D.scroller],"CodeMirror"),S&&s<8&&(D.gutters.style.zIndex=-1,D.scroller.style.paddingRight=0),!p&&!(_&&a)&&(D.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(D.wrapper):e(D.wrapper)),D.viewFrom=D.viewTo=t.first,D.reportedViewFrom=D.reportedViewTo=t.first,D.view=[],D.renderedView=null,D.externalMeasured=null,D.viewOffset=0,D.lastWrapHeight=D.lastWrapWidth=0,D.updateLineNumbers=null,D.nativeBarWidth=D.barHeight=D.barWidth=0,D.scrollbarsClipped=!1,D.lineNumWidth=D.lineNumInnerWidth=D.lineNumChars=null,D.alignWidgets=!1,D.cachedCharWidth=D.cachedTextHeight=D.cachedPaddingH=null,D.maxLine=null,D.maxLineLength=0,D.maxLineChanged=!1,D.wheelDX=D.wheelDY=D.wheelStartX=D.wheelStartY=null,D.shift=!1,D.selForContextMenu=null,D.activeTouch=null,D.gutterSpecs=Ss(d.gutters,d.lineNumbers),Tl(D),f.init(D)}var zo=0,pi=null;S?pi=-.53:_?pi=15:i?pi=-.7:O&&(pi=-1/3);function Sl(e){var t=e.wheelDeltaX,f=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),f==null&&e.detail&&e.axis==e.VERTICAL_AXIS?f=e.detail:f==null&&(f=e.wheelDelta),{x:t,y:f}}function Ll(e){var t=Sl(e);return t.x*=pi,t.y*=pi,t}function _l(e,t){var f=Sl(t),d=f.x,D=f.y,V=e.display,ne=V.scroller,ue=ne.scrollWidth>ne.clientWidth,de=ne.scrollHeight>ne.clientHeight;if(!(d&&ue||D&&de))return;if(D&&u&&p){e:for(var ve=t.target,Ve=V.view;ve!=ne;ve=ve.parentNode)for(var Ye=0;Ye<Ve.length;Ye++)if(Ve[Ye].node==ve){e.display.currentWheelTarget=ve;break e}}if(d&&!_&&!A&&pi!=null){D&&de&&no(e,Math.max(0,ne.scrollTop+D*pi)),pa(e,Math.max(0,ne.scrollLeft+d*pi)),(!D||D&&de)&&me(t),V.wheelStartX=null;return}if(D&&pi!=null){var gt=D*pi,dt=e.doc.scrollTop,Mt=dt+V.wrapper.clientHeight;gt<0?dt=Math.max(0,dt+gt-50):Mt=Math.min(e.doc.height,Mt+gt+50),Ua(e,{top:dt,bottom:Mt})}zo<20&&(V.wheelStartX==null?(V.wheelStartX=ne.scrollLeft,V.wheelStartY=ne.scrollTop,V.wheelDX=d,V.wheelDY=D,setTimeout(function(){if(V.wheelStartX==null)return;var Ut=ne.scrollLeft-V.wheelStartX,Qt=ne.scrollTop-V.wheelStartY,Vt=Qt&&V.wheelDY&&Qt/V.wheelDY||Ut&&V.wheelDX&&Ut/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Vt)return;pi=(pi*zo+Vt)/(zo+1),++zo},200)):(V.wheelDX+=d,V.wheelDY+=D))}var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var f=this.ranges[t],d=e.ranges[t];if(!Fe(f.anchor,d.anchor)||!Fe(f.head,d.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new qr(nt(this.ranges[t].anchor),nt(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var f=0;f<this.ranges.length;f++){var d=this.ranges[f];if(ye(t,d.from())>=0&&ye(e,d.to())<=0)return f}return-1};var qr=function(e,t){this.anchor=e,this.head=t};qr.prototype.from=function(){return Rt(this.anchor,this.head)},qr.prototype.to=function(){return $e(this.anchor,this.head)},qr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function li(e,t,f){var d=e&&e.options.selectionsMayTouch,D=t[f];t.sort(function(gt,dt){return ye(gt.from(),dt.from())}),f=oe(t,D);for(var V=1;V<t.length;V++){var ne=t[V],ue=t[V-1],de=ye(ue.to(),ne.from());if(d&&!ne.empty()?de>0:de>=0){var ve=Rt(ue.from(),ne.from()),Ve=$e(ue.to(),ne.to()),Ye=ue.empty()?ne.from()==ne.head:ue.from()==ue.head;V<=f&&--f,t.splice(--V,2,new qr(Ye?Ve:ve,Ye?ve:Ve))}}return new mi(t,f)}function ea(e,t){return new mi([new qr(e,t||e)],0)}function ta(e){return e.text?fe(e.from.line+e.text.length-1,tt(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(ye(e,t.from)<0)return e;if(ye(e,t.to)<=0)return ta(t);var f=e.line+t.text.length-(t.to.line-t.from.line)-1,d=e.ch;return e.line==t.to.line&&(d+=ta(t).ch-t.to.ch),fe(f,d)}function _s(e,t){for(var f=[],d=0;d<e.sel.ranges.length;d++){var D=e.sel.ranges[d];f.push(new qr(Ls(D.anchor,t),Ls(D.head,t)))}return li(e.cm,f,e.sel.primIndex)}function Ol(e,t,f){return e.line==t.line?fe(f.line,e.ch-t.ch+f.ch):fe(f.line+(e.line-t.line),e.ch)}function Fu(e,t,f){for(var d=[],D=fe(e.first,0),V=D,ne=0;ne<t.length;ne++){var ue=t[ne],de=Ol(ue.from,D,V),ve=Ol(ta(ue),D,V);if(D=ue.to,V=ve,f=="around"){var Ve=e.sel.ranges[ne],Ye=ye(Ve.head,Ve.anchor)<0;d[ne]=new qr(Ye?ve:de,Ye?de:ve)}else d[ne]=new qr(de,de)}return new mi(d,e.sel.primIndex)}function Os(e){e.doc.mode=St(e.options,e.doc.modeOption),lo(e)}function lo(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ya(e,100),e.state.modeGen++,e.curOp&&ri(e)}function Dl(e,t){return t.from.ch==0&&t.to.ch==0&&tt(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ds(e,t,f,d){function D(Zt){return f?f[Zt]:null}function V(Zt,Xt,rr){Nn(Zt,Xt,rr,d),Tr(Zt,"change",Zt,t)}function ne(Zt,Xt){for(var rr=[],br=Zt;br<Xt;++br)rr.push(new hn(ve[br],D(br),d));return rr}var ue=t.from,de=t.to,ve=t.text,Ve=jt(e,ue.line),Ye=jt(e,de.line),gt=tt(ve),dt=D(ve.length-1),Mt=de.line-ue.line;if(t.full)e.insert(0,ne(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(Dl(e,t)){var Ut=ne(0,ve.length-1);V(Ye,Ye.text,dt),Mt&&e.remove(ue.line,Mt),Ut.length&&e.insert(ue.line,Ut)}else if(Ve==Ye)if(ve.length==1)V(Ve,Ve.text.slice(0,ue.ch)+gt+Ve.text.slice(de.ch),dt);else{var Qt=ne(1,ve.length-1);Qt.push(new hn(gt+Ve.text.slice(de.ch),dt,d)),V(Ve,Ve.text.slice(0,ue.ch)+ve[0],D(0)),e.insert(ue.line+1,Qt)}else if(ve.length==1)V(Ve,Ve.text.slice(0,ue.ch)+ve[0]+Ye.text.slice(de.ch),D(0)),e.remove(ue.line+1,Mt);else{V(Ve,Ve.text.slice(0,ue.ch)+ve[0],D(0)),V(Ye,gt+Ye.text.slice(de.ch),dt);var Vt=ne(1,ve.length-1);Mt>1&&e.remove(ue.line+1,Mt-1),e.insert(ue.line+1,Vt)}Tr(e,"change",e,t)}function ra(e,t,f){function d(D,V,ne){if(D.linked)for(var ue=0;ue<D.linked.length;++ue){var de=D.linked[ue];if(de.doc==V)continue;var ve=ne&&de.sharedHist;if(f&&!ve)continue;t(de.doc,ve),d(de.doc,D,ve)}}d(e,null,!0)}function Qn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Fo(e),Os(e),Il(e),e.options.lineWrapping||Ln(e),e.options.mode=t.modeOption,ri(e)}function Il(e){(e.doc.direction=="rtl"?H:o)(e.display.lineDiv,"CodeMirror-rtl")}function Uu(e){ci(e,function(){Il(e),ri(e)})}function Wo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Is(e,t){var f={from:nt(t.from),to:ta(t),text:Mr(e,t.from,t.to)};return Ul(e,f,t.from.line,t.to.line+1),ra(e,function(d){return Ul(d,f,t.from.line,t.to.line+1)},!0),f}function Rl(e){for(;e.length;){var t=tt(e);if(t.ranges)e.pop();else break}}function Ml(e,t){if(t)return Rl(e.done),tt(e.done);if(e.done.length&&!tt(e.done).ranges)return tt(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),tt(e.done)}function Fl(e,t,f,d){var D=e.history;D.undone.length=0;var V=+new Date,ne,ue;if((D.lastOp==d||D.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&D.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ne=Ml(D,D.lastOp==d)))ue=tt(ne.changes),ye(t.from,t.to)==0&&ye(t.from,ue.to)==0?ue.to=ta(t):ne.changes.push(Is(e,t));else{var de=tt(D.done);for((!de||!de.ranges)&&Go(e.sel,D.done),ne={changes:[Is(e,t)],generation:D.generation},D.done.push(ne);D.done.length>D.undoDepth;)D.done.shift(),D.done[0].ranges||D.done.shift()}D.done.push(f),D.generation=++D.maxGeneration,D.lastModTime=D.lastSelTime=V,D.lastOp=D.lastSelOp=d,D.lastOrigin=D.lastSelOrigin=t.origin,ue||Ze(e,"historyAdded")}function Pu(e,t,f,d){var D=t.charAt(0);return D=="*"||D=="+"&&f.ranges.length==d.ranges.length&&f.somethingSelected()==d.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ku(e,t,f,d){var D=e.history,V=d&&d.origin;f==D.lastSelOp||V&&D.lastSelOrigin==V&&(D.lastModTime==D.lastSelTime&&D.lastOrigin==V||Pu(e,V,tt(D.done),t))?D.done[D.done.length-1]=t:Go(t,D.done),D.lastSelTime=+new Date,D.lastSelOrigin=V,D.lastSelOp=f,d&&d.clearRedo!==!1&&Rl(D.undone)}function Go(e,t){var f=tt(t);f&&f.ranges&&f.equals(e)||t.push(e)}function Ul(e,t,f,d){var D=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,f),Math.min(e.first+e.size,d),function(ne){ne.markedSpans&&((D||(D=t["spans_"+e.id]={}))[V]=ne.markedSpans),++V})}function Nu(e){if(!e)return null;for(var t,f=0;f<e.length;++f)e[f].marker.explicitlyCleared?t||(t=e.slice(0,f)):t&&t.push(e[f]);return t?t.length?t:null:e}function Pl(e,t){var f=t["spans_"+e.id];if(!f)return null;for(var d=[],D=0;D<t.text.length;++D)d.push(Nu(f[D]));return d}function ir(e,t){var f=Pl(e,t),d=$r(e,t);if(!f)return d;if(!d)return f;for(var D=0;D<f.length;++D){var V=f[D],ne=d[D];if(V&&ne){e:for(var ue=0;ue<ne.length;++ue){for(var de=ne[ue],ve=0;ve<V.length;++ve)if(V[ve].marker==de.marker)continue e;V.push(de)}}else ne&&(f[D]=ne)}return f}function Pa(e,t,f){for(var d=[],D=0;D<e.length;++D){var V=e[D];if(V.ranges){d.push(f?mi.prototype.deepCopy.call(V):V);continue}var ne=V.changes,ue=[];d.push({changes:ue});for(var de=0;de<ne.length;++de){var ve=ne[de],Ve=void 0;if(ue.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var Ye in ve)(Ve=Ye.match(/^spans_(\d+)$/))&&(oe(t,Number(Ve[1]))>-1&&(tt(ue)[Ye]=ve[Ye],delete ve[Ye]))}}return d}function Rs(e,t,f,d){if(d){var D=e.anchor;if(f){var V=ye(t,D)<0;V!=ye(f,D)<0?(D=t,t=f):V!=ye(t,f)<0&&(t=f)}return new qr(D,t)}else return new qr(f||t,t)}function ka(e,t,f,d,D){D==null&&(D=e.cm&&(e.cm.display.shift||e.extend)),qn(e,new mi([Rs(e.sel.primary(),t,f,D)],0),d)}function _i(e,t,f){for(var d=[],D=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)d[V]=Rs(e.sel.ranges[V],t[V],null,D);var ne=li(e.cm,d,e.sel.primIndex);qn(e,ne,f)}function Ms(e,t,f,d){var D=e.sel.ranges.slice(0);D[t]=f,qn(e,li(e.cm,D,e.sel.primIndex),d)}function Fs(e,t,f,d){qn(e,ea(t,f),d)}function uo(e,t,f){var d={ranges:t.ranges,update:function(D){this.ranges=[];for(var V=0;V<D.length;V++)this.ranges[V]=new qr(F(e,D[V].anchor),F(e,D[V].head))},origin:f&&f.origin};return Ze(e,"beforeSelectionChange",e,d),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,d),d.ranges!=t.ranges?li(e.cm,d.ranges,d.ranges.length-1):t}function Ao(e,t,f){var d=e.history.done,D=tt(d);D&&D.ranges?(d[d.length-1]=t,Vo(e,t,f)):qn(e,t,f)}function qn(e,t,f){Vo(e,t,f),ku(e,e.sel,e.cm?e.cm.curOp.id:NaN,f)}function Vo(e,t,f){(Ie(e,"beforeSelectionChange")||e.cm&&Ie(e.cm,"beforeSelectionChange"))&&(t=uo(e,t,f));var d=f&&f.bias||(ye(t.primary().head,e.sel.primary().head)<0?-1:1);kl(e,Xo(e,t,d,!0)),!(f&&f.scroll===!1)&&e.cm&&Fa(e.cm)}function kl(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ke(e.cm)),Tr(e,"cursorActivity",e)}function na(e){kl(e,Xo(e,e.sel,null,!1))}function Xo(e,t,f,d){for(var D,V=0;V<t.ranges.length;V++){var ne=t.ranges[V],ue=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],de=Yo(e,ne.anchor,ue&&ue.anchor,f,d),ve=Yo(e,ne.head,ue&&ue.head,f,d);(D||de!=ne.anchor||ve!=ne.head)&&(D||(D=t.ranges.slice(0,V)),D[V]=new qr(de,ve))}return D?li(e.cm,D,t.primIndex):t}function ia(e,t,f,d,D){var V=jt(e,t.line);if(V.markedSpans)for(var ne=0;ne<V.markedSpans.length;++ne){var ue=V.markedSpans[ne],de=ue.marker,ve="selectLeft"in de?!de.selectLeft:de.inclusiveLeft,Ve="selectRight"in de?!de.selectRight:de.inclusiveRight;if((ue.from==null||(ve?ue.from<=t.ch:ue.from<t.ch))&&(ue.to==null||(Ve?ue.to>=t.ch:ue.to>t.ch))){if(D&&(Ze(de,"beforeCursorEnter"),de.explicitlyCleared))if(V.markedSpans){--ne;continue}else break;if(!de.atomic)continue;if(f){var Ye=de.find(d<0?1:-1),gt=void 0;if((d<0?Ve:ve)&&(Ye=Us(e,Ye,-d,Ye&&Ye.line==t.line?V:null)),Ye&&Ye.line==t.line&&(gt=ye(Ye,f))&&(d<0?gt<0:gt>0))return ia(e,Ye,t,d,D)}var dt=de.find(d<0?-1:1);return(d<0?ve:Ve)&&(dt=Us(e,dt,d,dt.line==t.line?V:null)),dt?ia(e,dt,t,d,D):null}}return t}function Yo(e,t,f,d,D){var V=d||1,ne=ia(e,t,f,V,D)||!D&&ia(e,t,f,V,!0)||ia(e,t,f,-V,D)||!D&&ia(e,t,f,-V,!0);return ne||(e.cantEdit=!0,fe(e.first,0))}function Us(e,t,f,d){return f<0&&t.ch==0?t.line>e.first?F(e,fe(t.line-1)):null:f>0&&t.ch==(d||jt(e,t.line)).text.length?t.line<e.first+e.size-1?fe(t.line+1,0):null:new fe(t.line,t.ch+f)}function Nl(e){e.setSelection(fe(e.firstLine(),0),fe(e.lastLine()),be)}function Jo(e,t,f){var d={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return d.canceled=!0}};return f&&(d.update=function(D,V,ne,ue){D&&(d.from=F(e,D)),V&&(d.to=F(e,V)),ne&&(d.text=ne),ue!==void 0&&(d.origin=ue)}),Ze(e,"beforeChange",e,d),e.cm&&Ze(e.cm,"beforeChange",e.cm,d),d.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:d.from,to:d.to,text:d.text,origin:d.origin}}function Na(e,t,f){if(e.cm){if(!e.cm.curOp)return Hn(e.cm,Na)(e,t,f);if(e.cm.state.suppressEdits)return}if((Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"))&&(t=Jo(e,t,!0),!t))return;var d=fr&&!f&&Er(e,t.from,t.to);if(d)for(var D=d.length-1;D>=0;--D)Hl(e,{from:d[D].from,to:d[D].to,text:D?[""]:t.text,origin:t.origin});else Hl(e,t)}function Hl(e,t){if(t.text.length==1&&t.text[0]==""&&ye(t.from,t.to)==0)return;var f=_s(e,t);Fl(e,t,f,e.cm?e.cm.curOp.id:NaN),co(e,t,f,$r(e,t));var d=[];ra(e,function(D,V){!V&&oe(d,D.history)==-1&&(Kl(D.history,t),d.push(D.history)),co(D,t,null,$r(D,t))})}function Zo(e,t,f){var d=e.cm&&e.cm.state.suppressEdits;if(d&&!f)return;for(var D=e.history,V,ne=e.sel,ue=t=="undo"?D.done:D.undone,de=t=="undo"?D.undone:D.done,ve=0;ve<ue.length&&!(V=ue[ve],f?V.ranges&&!V.equals(e.sel):!V.ranges);ve++);if(ve==ue.length)return;for(D.lastOrigin=D.lastSelOrigin=null;;)if(V=ue.pop(),V.ranges){if(Go(V,de),f&&!V.equals(e.sel)){qn(e,V,{clearRedo:!1});return}ne=V}else if(d){ue.push(V);return}else break;var Ve=[];Go(ne,de),de.push({changes:Ve,generation:D.generation}),D.generation=V.generation||++D.maxGeneration;for(var Ye=Ie(e,"beforeChange")||e.cm&&Ie(e.cm,"beforeChange"),gt=function(Ut){var Qt=V.changes[Ut];if(Qt.origin=t,Ye&&!Jo(e,Qt,!1))return ue.length=0,{};Ve.push(Is(e,Qt));var Vt=Ut?_s(e,Qt):tt(ue);co(e,Qt,Vt,ir(e,Qt)),!Ut&&e.cm&&e.cm.scrollIntoView({from:Qt.from,to:ta(Qt)});var Zt=[];ra(e,function(Xt,rr){!rr&&oe(Zt,Xt.history)==-1&&(Kl(Xt.history,Qt),Zt.push(Xt.history)),co(Xt,Qt,null,ir(Xt,Qt))})},dt=V.changes.length-1;dt>=0;--dt){var Mt=gt(dt);if(Mt)return Mt.v}}function Ql(e,t){if(t==0)return;if(e.first+=t,e.sel=new mi(Bt(e.sel.ranges,function(D){return new qr(fe(D.anchor.line+t,D.anchor.ch),fe(D.head.line+t,D.head.ch))}),e.sel.primIndex),e.cm){ri(e.cm,e.first,e.first-t,t);for(var f=e.cm.display,d=f.viewFrom;d<f.viewTo;d++)Hi(e.cm,d,"gutter")}}function co(e,t,f,d){if(e.cm&&!e.cm.curOp)return Hn(e.cm,co)(e,t,f,d);if(t.to.line<e.first){Ql(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var D=t.text.length-1-(e.first-t.from.line);Ql(e,D),t={from:fe(e.first,0),to:fe(t.to.line+D,t.to.ch),text:[tt(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:fe(V,jt(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Mr(e,t.from,t.to),f||(f=_s(e,t)),e.cm?Hu(e.cm,t,d):Ds(e,t,d),Vo(e,f,be),e.cantEdit&&Yo(e,fe(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,t,f){var d=e.doc,D=e.display,V=t.from,ne=t.to,ue=!1,de=V.line;e.options.lineWrapping||(de=mr(nn(jt(d,V.line))),d.iter(de,ne.line+1,function(dt){if(dt==D.maxLine)return ue=!0,!0})),d.sel.contains(t.from,t.to)>-1&&Ke(e),Ds(d,t,f,dl(e)),e.options.lineWrapping||(d.iter(de,V.line+t.text.length,function(dt){var Mt=si(dt);Mt>D.maxLineLength&&(D.maxLine=dt,D.maxLineLength=Mt,D.maxLineChanged=!0,ue=!1)}),ue&&(e.curOp.updateMaxLine=!0)),Lr(d,V.line),ya(e,400);var ve=t.text.length-(ne.line-V.line)-1;t.full?ri(e):V.line==ne.line&&t.text.length==1&&!Dl(e.doc,t)?Hi(e,V.line,"text"):ri(e,V.line,ne.line+1,ve);var Ve=Ie(e,"changes"),Ye=Ie(e,"change");if(Ye||Ve){var gt={from:V,to:ne,text:t.text,removed:t.removed,origin:t.origin};Ye&&Tr(e,"change",e,gt),Ve&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(gt)}e.display.selForContextMenu=null}function Ha(e,t,f,d,D){var V;d||(d=f),ye(d,f)<0&&(V=[d,f],f=V[0],d=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Na(e,{from:f,to:d,text:t,origin:D})}function jl(e,t,f,d){f<e.line?e.line+=d:t<e.line&&(e.line=t,e.ch=0)}function Ps(e,t,f,d){for(var D=0;D<e.length;++D){var V=e[D],ne=!0;if(V.ranges){V.copied||(V=e[D]=V.deepCopy(),V.copied=!0);for(var ue=0;ue<V.ranges.length;ue++)jl(V.ranges[ue].anchor,t,f,d),jl(V.ranges[ue].head,t,f,d);continue}for(var de=0;de<V.changes.length;++de){var ve=V.changes[de];if(f<ve.from.line)ve.from=fe(ve.from.line+d,ve.from.ch),ve.to=fe(ve.to.line+d,ve.to.ch);else if(t<=ve.to.line){ne=!1;break}}ne||(e.splice(0,D+1),D=0)}}function Kl(e,t){var f=t.from.line,d=t.to.line,D=t.text.length-(d-f)-1;Ps(e.done,f,d,D),Ps(e.undone,f,d,D)}function ho(e,t,f,d){var D=t,V=t;return typeof t=="number"?V=jt(e,$(e,t)):D=mr(t),D==null?null:(d(V,D)&&e.cm&&Hi(e.cm,D,f),V)}function fo(e){this.lines=e,this.parent=null;for(var t=0,f=0;f<e.length;++f)e[f].parent=this,t+=e[f].height;this.height=t}fo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var f=e,d=e+t;f<d;++f){var D=this.lines[f];this.height-=D.height,ui(D),Tr(D,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,f){this.height+=f,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var d=0;d<t.length;++d)t[d].parent=this},iterN:function(e,t,f){for(var d=e+t;e<d;++e)if(f(this.lines[e]))return!0}};function Qa(e){this.children=e;for(var t=0,f=0,d=0;d<e.length;++d){var D=e[d];t+=D.chunkSize(),f+=D.height,D.parent=this}this.size=t,this.height=f,this.parent=null}Qa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var f=0;f<this.children.length;++f){var d=this.children[f],D=d.chunkSize();if(e<D){var V=Math.min(t,D-e),ne=d.height;if(d.removeInner(e,V),this.height-=ne-d.height,D==V&&(this.children.splice(f--,1),d.parent=null),(t-=V)==0)break;e=0}else e-=D}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof fo))){var ue=[];this.collapse(ue),this.children=[new fo(ue)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,f){this.size+=t.length,this.height+=f;for(var d=0;d<this.children.length;++d){var D=this.children[d],V=D.chunkSize();if(e<=V){if(D.insertInner(e,t,f),D.lines&&D.lines.length>50){for(var ne=D.lines.length%25+25,ue=ne;ue<D.lines.length;){var de=new fo(D.lines.slice(ue,ue+=25));D.height-=de.height,this.children.splice(++d,0,de),de.parent=this}D.lines=D.lines.slice(0,ne),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),f=new Qa(t);if(e.parent){e.size-=f.size,e.height-=f.height;var D=oe(e.parent.children,e);e.parent.children.splice(D+1,0,f)}else{var d=new Qa(e.children);d.parent=e,e.children=[d,f],e=d}f.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,f){for(var d=0;d<this.children.length;++d){var D=this.children[d],V=D.chunkSize();if(e<V){var ne=Math.min(t,V-e);if(D.iterN(e,ne,f))return!0;if((t-=ne)==0)break;e=0}else e-=V}}};var po=function(e,t,f){if(f)for(var d in f)f.hasOwnProperty(d)&&(this[d]=f[d]);this.doc=e,this.node=t};po.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,f=this.line,d=mr(f);if(d==null||!t)return;for(var D=0;D<t.length;++D)t[D]==this&&t.splice(D--,1);t.length||(f.widgets=null);var V=$a(this);Ur(f,Math.max(0,f.height-V)),e&&(ci(e,function(){mo(e,f,-V),Hi(e,d,"widget")}),Tr(e,"lineWidgetCleared",e,this,d))},po.prototype.changed=function(){var e=this,t=this.height,f=this.doc.cm,d=this.line;this.height=null;var D=$a(this)-t;if(!D)return;In(this.doc,d)||Ur(d,d.height+D),f&&ci(f,function(){f.curOp.forceUpdate=!0,mo(f,d,D),Tr(f,"lineWidgetChanged",f,e,mr(d))})},Me(po);function mo(e,t,f){Rn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ws(e,f)}function Qu(e,t,f,d){var D=new po(e,f,d),V=e.cm;return V&&D.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(ne){var ue=ne.widgets||(ne.widgets=[]);if(D.insertAt==null?ue.push(D):ue.splice(Math.min(ue.length-1,Math.max(0,D.insertAt)),0,D),D.line=ne,V&&!In(e,ne)){var de=Rn(ne)<e.scrollTop;Ur(ne,ne.height+$a(D)),de&&ws(V,D.height),V.curOp.forceUpdate=!0}return!0}),V&&Tr(V,"lineWidgetAdded",V,D,typeof t=="number"?t:mr(t)),D}var $o=0,Ri=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++$o};Ri.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ga(e),Ie(this,"clear")){var f=this.find();f&&Tr(this,"clear",f.from,f.to)}for(var d=null,D=null,V=0;V<this.lines.length;++V){var ne=this.lines[V],ue=tn(ne.markedSpans,this);e&&!this.collapsed?Hi(e,mr(ne),"text"):e&&(ue.to!=null&&(D=mr(ne)),ue.from!=null&&(d=mr(ne))),ne.markedSpans=sn(ne.markedSpans,ue),ue.from==null&&this.collapsed&&!In(this.doc,ne)&&e&&Ur(ne,ha(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var de=0;de<this.lines.length;++de){var ve=nn(this.lines[de]),Ve=si(ve);Ve>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Ve,e.display.maxLineChanged=!0)}d!=null&&e&&this.collapsed&&ri(e,d,D+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&Tr(e,"markerCleared",e,this,d,D),t&&va(e),this.parent&&this.parent.clear()},Ri.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var f,d,D=0;D<this.lines.length;++D){var V=this.lines[D],ne=tn(V.markedSpans,this);if(ne.from!=null&&(f=fe(t?V:mr(V),ne.from),e==-1))return f;if(ne.to!=null&&(d=fe(t?V:mr(V),ne.to),e==1))return d}return f&&{from:f,to:d}},Ri.prototype.changed=function(){var e=this,t=this.find(-1,!0),f=this,d=this.doc.cm;if(!t||!d)return;ci(d,function(){var D=t.line,V=mr(t.line),ne=ca(d,V);if(ne&&(vs(ne),d.curOp.selectionChanged=d.curOp.forceUpdate=!0),d.curOp.updateMaxLine=!0,!In(f.doc,D)&&f.height!=null){var ue=f.height;f.height=null;var de=$a(f)-ue;de&&Ur(D,D.height+de)}Tr(d,"markerChanged",d,e)})},Ri.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||oe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ri.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(Ri);function ba(e,t,f,d,D){if(d&&d.shared)return ju(e,t,f,d,D);if(e.cm&&!e.cm.curOp)return Hn(e.cm,ba)(e,t,f,d,D);var V=new Ri(e,D),ne=ye(t,f);if(d&&G(d,V,!1),ne>0||ne==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=L("span",[V.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Vr(e,t.line,t,f,V)||t.line!=f.line&&Vr(e,f.line,t,f,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");on()}V.addToHistory&&Fl(e,{from:t,to:f,origin:"markText"},e.sel,NaN);var ue=t.line,de=e.cm,ve;if(e.iter(ue,f.line+1,function(Ye){de&&V.collapsed&&!de.options.lineWrapping&&nn(Ye)==de.display.maxLine&&(ve=!0),V.collapsed&&ue!=t.line&&Ur(Ye,0),Gr(Ye,new Yr(V,ue==t.line?t.ch:null,ue==f.line?f.ch:null)),++ue}),V.collapsed&&e.iter(t.line,f.line+1,function(Ye){In(e,Ye)&&Ur(Ye,0)}),V.clearOnEnter&&Pe(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Pr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++$o,V.atomic=!0),de){if(ve&&(de.curOp.updateMaxLine=!0),V.collapsed)ri(de,t.line,f.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ve=t.line;Ve<=f.line;Ve++)Hi(de,Ve,"text");V.atomic&&na(de.doc),Tr(de,"markerAdded",de,V)}return V}var ja=function(e,t){this.markers=e,this.primary=t;for(var f=0;f<e.length;++f)e[f].parent=this};ja.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Tr(this,"clear")},ja.prototype.find=function(e,t){return this.primary.find(e,t)},Me(ja);function ju(e,t,f,d,D){d=G(d),d.shared=!1;var V=[ba(e,t,f,d,D)],ne=V[0],ue=d.widgetNode;return ra(e,function(de){ue&&(d.widgetNode=ue.cloneNode(!0)),V.push(ba(de,F(de,t),F(de,f),d,D));for(var ve=0;ve<de.linked.length;++ve)if(de.linked[ve].isParent)return;ne=tt(V)}),new ja(V,ne)}function ks(e){return e.findMarks(fe(e.first,0),e.clipPos(fe(e.lastLine())),function(t){return t.parent})}function Ns(e,t){for(var f=0;f<t.length;f++){var d=t[f],D=d.find(),V=e.clipPos(D.from),ne=e.clipPos(D.to);if(ye(V,ne)){var ue=ba(e,V,ne,d.primary,d.primary.type);d.markers.push(ue),ue.parent=d}}}function Hs(e){for(var t=function(d){var D=e[d],V=[D.primary.doc];ra(D.primary.doc,function(de){return V.push(de)});for(var ne=0;ne<D.markers.length;ne++){var ue=D.markers[ne];oe(V,ue.doc)==-1&&(ue.parent=null,D.markers.splice(ne--,1))}},f=0;f<e.length;f++)t(f)}var zl=0,ii=function(e,t,f,d,D){if(!(this instanceof ii))return new ii(e,t,f,d,D);f==null&&(f=0),Qa.call(this,[new fo([new hn("",null)])]),this.first=f,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=f;var V=fe(f,0);this.sel=ea(V),this.history=new Wo(null),this.id=++zl,this.modeOption=t,this.lineSep=d,this.direction=D=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ds(this,{from:V,to:V,text:e}),qn(this,ea(V),be)};ii.prototype=it(Qa.prototype,{constructor:ii,iter:function(e,t,f){f?this.iterN(e-this.first,t-e,f):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var f=0,d=0;d<t.length;++d)f+=t[d].height;this.insertInner(e-this.first,t,f)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Wr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zn(function(e){var t=fe(this.first,0),f=this.first+this.size-1;Na(this,{from:t,to:fe(f,jt(this,f).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&qi(this.cm,0,0),qn(this,ea(t),be)}),replaceRange:function(e,t,f,d){t=F(this,t),f=f?F(this,f):t,Ha(this,e,t,f,d)},getRange:function(e,t,f){var d=Mr(this,F(this,e),F(this,t));return f===!1?d:d.join(f||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Cn(this,e))return jt(this,e)},getLineNumber:function(e){return mr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=jt(this,e)),nn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return F(this,e)},getCursor:function(e){var t=this.sel.primary(),f;return e==null||e=="head"?f=t.head:e=="anchor"?f=t.anchor:e=="end"||e=="to"||e===!1?f=t.to():f=t.from(),f},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zn(function(e,t,f){Fs(this,F(this,typeof e=="number"?fe(e,t||0):e),null,f)}),setSelection:zn(function(e,t,f){Fs(this,F(this,e),F(this,t||e),f)}),extendSelection:zn(function(e,t,f){ka(this,F(this,e),t&&F(this,t),f)}),extendSelections:zn(function(e,t){_i(this,q(this,e),t)}),extendSelectionsBy:zn(function(e,t){var f=Bt(this.sel.ranges,e);_i(this,q(this,f),t)}),setSelections:zn(function(e,t,f){if(!e.length)return;for(var d=[],D=0;D<e.length;D++)d[D]=new qr(F(this,e[D].anchor),F(this,e[D].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),qn(this,li(this.cm,d,t),f)}),addSelection:zn(function(e,t,f){var d=this.sel.ranges.slice(0);d.push(new qr(F(this,e),F(this,t||e))),qn(this,li(this.cm,d,d.length-1),f)}),getSelection:function(e){for(var t=this.sel.ranges,f,d=0;d<t.length;d++){var D=Mr(this,t[d].from(),t[d].to());f=f?f.concat(D):D}return e===!1?f:f.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],f=this.sel.ranges,d=0;d<f.length;d++){var D=Mr(this,f[d].from(),f[d].to());e!==!1&&(D=D.join(e||this.lineSeparator())),t[d]=D}return t},replaceSelection:function(e,t,f){for(var d=[],D=0;D<this.sel.ranges.length;D++)d[D]=e;this.replaceSelections(d,t,f||"+input")},replaceSelections:zn(function(e,t,f){for(var d=[],D=this.sel,V=0;V<D.ranges.length;V++){var ne=D.ranges[V];d[V]={from:ne.from(),to:ne.to(),text:this.splitLines(e[V]),origin:f}}for(var ue=t&&t!="end"&&Fu(this,d,t),de=d.length-1;de>=0;de--)Na(this,d[de]);ue?Ao(this,ue):this.cm&&Fa(this.cm)}),undo:zn(function(){Zo(this,"undo")}),redo:zn(function(){Zo(this,"redo")}),undoSelection:zn(function(){Zo(this,"undo",!0)}),redoSelection:zn(function(){Zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,f=0,d=0;d<e.done.length;d++)e.done[d].ranges||++t;for(var D=0;D<e.undone.length;D++)e.undone[D].ranges||++f;return{undo:t,redo:f}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ra(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Pa(this.history.done),undone:Pa(this.history.undone)}},setHistory:function(e){var t=this.history=new Wo(this.history.maxGeneration);t.done=Pa(e.done.slice(0),null,!0),t.undone=Pa(e.undone.slice(0),null,!0)},setGutterMarker:zn(function(e,t,f){return ho(this,e,"gutter",function(d){var D=d.gutterMarkers||(d.gutterMarkers={});return D[t]=f,!f&&ce(D)&&(d.gutterMarkers=null),!0})}),clearGutter:zn(function(e){var t=this;this.iter(function(f){f.gutterMarkers&&f.gutterMarkers[e]&&ho(t,f,"gutter",function(){return f.gutterMarkers[e]=null,ce(f.gutterMarkers)&&(f.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Cn(this,e))return null;if(t=e,e=jt(this,e),!e)return null}else if(t=mr(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:zn(function(e,t,f){return ho(this,e,t=="gutter"?"gutter":"class",function(d){var D=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!d[D])d[D]=f;else{if(b(f).test(d[D]))return!1;d[D]+=" "+f}return!0})}),removeLineClass:zn(function(e,t,f){return ho(this,e,t=="gutter"?"gutter":"class",function(d){var D=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=d[D];if(V)if(f==null)d[D]=null;else{var ne=V.match(b(f));if(!ne)return!1;var ue=ne.index+ne[0].length;d[D]=V.slice(0,ne.index)+(!ne.index||ue==V.length?"":" ")+V.slice(ue)||null}else return!1;return!0})}),addLineWidget:zn(function(e,t,f){return Qu(this,e,t,f)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,f){return ba(this,F(this,e),F(this,t),f,f&&f.type||"range")},setBookmark:function(e,t){var f={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=F(this,e),ba(this,e,e,f,"bookmark")},findMarksAt:function(e){e=F(this,e);var t=[],f=jt(this,e.line).markedSpans;if(f)for(var d=0;d<f.length;++d){var D=f[d];(D.from==null||D.from<=e.ch)&&(D.to==null||D.to>=e.ch)&&t.push(D.marker.parent||D.marker)}return t},findMarks:function(e,t,f){e=F(this,e),t=F(this,t);var d=[],D=e.line;return this.iter(e.line,t.line+1,function(V){var ne=V.markedSpans;if(ne)for(var ue=0;ue<ne.length;ue++){var de=ne[ue];!(de.to!=null&&D==e.line&&e.ch>=de.to||de.from==null&&D!=e.line||de.from!=null&&D==t.line&&de.from>=t.ch)&&(!f||f(de.marker))&&d.push(de.marker.parent||de.marker)}++D}),d},getAllMarks:function(){var e=[];return this.iter(function(t){var f=t.markedSpans;if(f)for(var d=0;d<f.length;++d)f[d].from!=null&&e.push(f[d].marker)}),e},posFromIndex:function(e){var t,f=this.first,d=this.lineSeparator().length;return this.iter(function(D){var V=D.text.length+d;if(V>e)return t=e,!0;e-=V,++f}),F(this,fe(f,t))},indexFromPos:function(e){e=F(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var f=this.lineSeparator().length;return this.iter(this.first,e.line,function(d){t+=d.text.length+f}),t},copy:function(e){var t=new ii(Wr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,f=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<f&&(f=e.to);var d=new ii(Wr(this,t,f),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:e.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(d,ks(this)),d},unlinkDoc:function(e){if(e instanceof En&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var f=this.linked[t];if(f.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Hs(ks(this));break}if(e.history==this.history){var d=[e.id];ra(e,function(D){return d.push(D.id)},!0),e.history=new Wo(null),e.history.done=Pa(this.history.done,d),e.history.undone=Pa(this.history.undone,d)}},iterLinkedDocs:function(e){ra(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):st(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:zn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Uu(this.cm)})}),ii.prototype.eachLine=ii.prototype.iter;var Qs=0;function Wl(e){var t=this;if(Gl(t),ut(t,e)||Bi(t.display,e))return;me(e),S&&(Qs=+new Date);var f=Ji(t,e,!0),d=e.dataTransfer.files;if(!f||t.isReadOnly())return;if(d&&d.length&&window.FileReader&&window.File)for(var D=d.length,V=Array(D),ne=0,ue=function(){++ne==D&&Hn(t,function(){f=F(t.doc,f);var dt={from:f,to:f,text:t.doc.splitLines(V.filter(function(Mt){return Mt!=null}).join(t.doc.lineSeparator())),origin:"paste"};Na(t.doc,dt),Ao(t.doc,ea(F(t.doc,f),F(t.doc,ta(dt))))})()},de=function(dt,Mt){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,dt.type)==-1){ue();return}var Ut=new FileReader;Ut.onerror=function(){return ue()},Ut.onload=function(){var Qt=Ut.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qt)){ue();return}V[Mt]=Qt,ue()},Ut.readAsText(dt)},ve=0;ve<d.length;ve++)de(d[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(f)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ve=e.dataTransfer.getData("Text");if(Ve){var Ye;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ye=t.listSelections()),Vo(t.doc,ea(f,f)),Ye)for(var gt=0;gt<Ye.length;++gt)Ha(t.doc,"",Ye[gt].anchor,Ye[gt].head,"drag");t.replaceSelection(Ve,"around","paste"),t.display.input.focus()}}catch(dt){}}}function js(e,t){if(S&&(!e.state.draggingText||+new Date-Qs<100)){we(t);return}if(ut(e,t)||Bi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!O){var f=l("img",null,null,"position: fixed; left: 0; top: 0;");f.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(f.width=f.height=1,e.display.wrapper.appendChild(f),f._top=f.offsetTop),t.dataTransfer.setDragImage(f,0,0),A&&f.parentNode.removeChild(f)}}function Ku(e,t){var f=Ji(e,t);if(!f)return;var d=document.createDocumentFragment();ml(e,f,d),e.display.dragCursor||(e.display.dragCursor=l("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,d)}function Gl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),f=[],d=0;d<t.length;d++){var D=t[d].CodeMirror;D&&f.push(D)}f.length&&f[0].operation(function(){for(var V=0;V<f.length;V++)e(f[V])})}var gi=!1;function Ks(){if(gi)return;zu(),gi=!0}function zu(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(Wu)},100))}),Pe(window,"blur",function(){return Vl(Ma)})}function Wu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var aa={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"},go=0;go<10;go++)aa[go+48]=aa[go+96]=String(go);for(var qo=65;qo<=90;qo++)aa[qo]=String.fromCharCode(qo);for(var vo=1;vo<=12;vo++)aa[vo+111]=aa[vo+63235]="F"+vo;var Ki={};Ki.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"},Ki.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"},Ki.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"},Ki.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"]},Ki.default=u?Ki.macDefault:Ki.pcDefault;function Gu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var f,d,D,V,ne=0;ne<t.length-1;ne++){var ue=t[ne];if(/^(cmd|meta|m)$/i.test(ue))V=!0;else if(/^a(lt)?$/i.test(ue))f=!0;else if(/^(c|ctrl|control)$/i.test(ue))d=!0;else if(/^s(hift)?$/i.test(ue))D=!0;else throw new Error("Unrecognized modifier name: "+ue)}return f&&(e="Alt-"+e),d&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),D&&(e="Shift-"+e),e}function Vu(e){var t={};for(var f in e)if(e.hasOwnProperty(f)){var d=e[f];if(/^(name|fallthrough|(de|at)tach)$/.test(f))continue;if(d=="..."){delete e[f];continue}for(var D=Bt(f.split(" "),Gu),V=0;V<D.length;V++){var ne=void 0,ue=void 0;V==D.length-1?(ue=D.join(" "),ne=d):(ue=D.slice(0,V+1).join(" "),ne="...");var de=t[ue];if(!de)t[ue]=ne;else if(de!=ne)throw new Error("Inconsistent bindings for "+ue)}delete e[f]}for(var ve in t)e[ve]=t[ve];return e}function Ea(e,t,f,d){t=jn(t);var D=t.call?t.call(e,d):t[e];if(D===!1)return"nothing";if(D==="...")return"multi";if(D!=null&&f(D))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ea(e,t.fallthrough,f,d);for(var V=0;V<t.fallthrough.length;V++){var ne=Ea(e,t.fallthrough[V],f,d);if(ne)return ne}}}function Xl(e){var t=typeof e=="string"?e:aa[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function es(e,t,f){var d=e;return t.altKey&&d!="Alt"&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&d!="Ctrl"&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&d!="Mod"&&(e="Cmd-"+e),!f&&t.shiftKey&&d!="Shift"&&(e="Shift-"+e),e}function zs(e,t){if(A&&e.keyCode==34&&e.char)return!1;var f=aa[e.keyCode];return f==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(f=e.code),es(f,e,t))}function jn(e){return typeof e=="string"?Ki[e]:e}function Mi(e,t){for(var f=e.doc.sel.ranges,d=[],D=0;D<f.length;D++){for(var V=t(f[D]);d.length&&ye(V.from,tt(d).to)<=0;){var ne=d.pop();if(ye(ne.from,V.from)<0){V.from=ne.from;break}}d.push(V)}ci(e,function(){for(var ue=d.length-1;ue>=0;ue--)Ha(e.doc,"",d[ue].from,d[ue].to,"+delete");Fa(e)})}function Ws(e,t,f){var d=ke(e.text,t+f,f);return d<0||d>e.text.length?null:d}function Gs(e,t,f){var d=Ws(e,t.ch,f);return d==null?null:new fe(t.line,d,f<0?"after":"before")}function ts(e,t,f,d,D){if(e){t.doc.direction=="rtl"&&(D=-D);var V=It(f,t.doc.direction);if(V){var ne=D<0?tt(V):V[0],ue=D<0==(ne.level==1),de=ue?"after":"before",ve;if(ne.level>0||t.doc.direction=="rtl"){var Ve=an(t,f);ve=D<0?f.text.length-1:0;var Ye=Si(t,Ve,ve).top;ve=ft(function(gt){return Si(t,Ve,gt).top==Ye},D<0==(ne.level==1)?ne.from:ne.to-1,ve),de=="before"&&(ve=Ws(f,ve,1))}else ve=D<0?ne.to:ne.from;return new fe(d,ve,de)}}return new fe(d,D<0?f.text.length:0,D<0?"before":"after")}function Vs(e,t,f,d){var D=It(t,e.doc.direction);if(!D)return Gs(t,f,d);f.ch>=t.text.length?(f.ch=t.text.length,f.sticky="before"):f.ch<=0&&(f.ch=0,f.sticky="after");var V=yt(D,f.ch,f.sticky),ne=D[V];if(e.doc.direction=="ltr"&&ne.level%2==0&&(d>0?ne.to>f.ch:ne.from<f.ch))return Gs(t,f,d);var ue=function(Vt,Zt){return Ws(t,Vt instanceof fe?Vt.ch:Vt,Zt)},de,ve=function(Vt){return e.options.lineWrapping?(de=de||an(e,t),Al(e,t,de,Vt)):{begin:0,end:t.text.length}},Ve=ve(f.sticky=="before"?ue(f,-1):f.ch);if(e.doc.direction=="rtl"||ne.level==1){var Ye=ne.level==1==d<0,gt=ue(f,Ye?1:-1);if(gt!=null&&(Ye?gt<=ne.to&><=Ve.end:gt>=ne.from&>>=Ve.begin)){var dt=Ye?"before":"after";return new fe(f.line,gt,dt)}}var Mt=function(Vt,Zt,Xt){for(var rr=function(bn,Wn){return Wn?new fe(f.line,ue(bn,1),"before"):new fe(f.line,bn,"after")};Vt>=0&&Vt<D.length;Vt+=Zt){var br=D[Vt],pr=Zt>0==(br.level!=1),kr=pr?Xt.begin:ue(Xt.end,-1);if(br.from<=kr&&kr<br.to)return rr(kr,pr);if(kr=pr?br.from:ue(br.to,-1),Xt.begin<=kr&&kr<Xt.end)return rr(kr,pr)}},Ut=Mt(V+d,d,Ve);if(Ut)return Ut;var Qt=d>0?Ve.end:ue(Ve.begin,-1);return Qt!=null&&!(d>0&&Qt==t.text.length)&&(Ut=Mt(d>0?0:D.length-1,d,ve(Qt)),Ut)?Ut:null}var yo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),be)},killLine:function(e){return Mi(e,function(t){if(t.empty()){var f=jt(e.doc,t.head.line).text.length;return t.head.ch==f&&t.head.line<e.lastLine()?{from:t.head,to:fe(t.head.line+1,0)}:{from:t.head,to:fe(t.head.line,f)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Mi(e,function(t){return{from:fe(t.from().line,0),to:F(e.doc,fe(t.to().line+1,0))}})},delLineLeft:function(e){return Mi(e,function(t){return{from:fe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Mi(e,function(t){var f=e.charCoords(t.head,"div").top+5,d=e.coordsChar({left:0,top:f},"div");return{from:d,to:t.from()}})},delWrappedLineRight:function(e){return Mi(e,function(t){var f=e.charCoords(t.head,"div").top+5,d=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:f},"div");return{from:t.from(),to:d}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(fe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(fe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Yl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Jl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Xu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var f=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:f},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var f=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:f},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var f=e.cursorCoords(t.head,"div").top+5,d=e.coordsChar({left:0,top:f},"div");return d.ch<e.getLine(d.line).search(/\S/)?Jl(e,t.head):d},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],f=e.listSelections(),d=e.options.tabSize,D=0;D<f.length;D++){var V=f[D].from(),ne=ee(e.getLine(V.line),V.ch,d);t.push(Se(d-ne%d))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ci(e,function(){for(var t=e.listSelections(),f=[],d=0;d<t.length;d++){if(!t[d].empty())continue;var D=t[d].head,V=jt(e.doc,D.line).text;if(V){if(D.ch==V.length&&(D=new fe(D.line,D.ch-1)),D.ch>0)D=new fe(D.line,D.ch+1),e.replaceRange(V.charAt(D.ch-1)+V.charAt(D.ch-2),fe(D.line,D.ch-2),D,"+transpose");else if(D.line>e.doc.first){var ne=jt(e.doc,D.line-1).text;ne&&(D=new fe(D.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+ne.charAt(ne.length-1),fe(D.line-1,ne.length-1),D,"+transpose"))}}f.push(new qr(D,D))}e.setSelections(f)})},newlineAndIndent:function(e){return ci(e,function(){for(var t=e.listSelections(),f=t.length-1;f>=0;f--)e.replaceRange(e.doc.lineSeparator(),t[f].anchor,t[f].head,"+input");t=e.listSelections();for(var d=0;d<t.length;d++)e.indentLine(t[d].from().line,null,!0);Fa(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var f=jt(e.doc,t),d=nn(f);return d!=f&&(t=mr(d)),ts(!0,e,d,t,1)}function Xu(e,t){var f=jt(e.doc,t),d=Dn(f);return d!=f&&(t=mr(d)),ts(!0,e,f,t,-1)}function Jl(e,t){var f=Yl(e,t.line),d=jt(e.doc,f.line),D=It(d,e.doc.direction);if(!D||D[0].level==0){var V=Math.max(f.ch,d.text.search(/\S/)),ne=t.line==f.line&&t.ch<=V&&t.ch;return fe(f.line,ne?0:V,f.sticky)}return f}function rs(e,t,f){if(typeof t=="string"&&(t=yo[t],!t))return!1;e.display.input.ensurePolled();var d=e.display.shift,D=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),f&&(e.display.shift=!1),D=t(e)!=Te}finally{e.display.shift=d,e.state.suppressEdits=!1}return D}function Yu(e,t,f){for(var d=0;d<e.state.keyMaps.length;d++){var D=Ea(t,e.state.keyMaps[d],f,e);if(D)return D}return e.options.extraKeys&&Ea(t,e.options.extraKeys,f,e)||Ea(t,e.options.keyMap,f,e)}var Ju=new J;function bo(e,t,f,d){var D=e.state.keySeq;if(D){if(Xl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==D&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,D+" "+t,f,d))return!0}return Xs(e,t,f,d)}function Xs(e,t,f,d){var D=Yu(e,t,d);return D=="multi"&&(e.state.keySeq=t),D=="handled"&&Tr(e,"keyHandled",e,t,f),(D=="handled"||D=="multi")&&(me(f),Uo(e)),!!D}function Ys(e,t){var f=zs(t,!0);return f?t.shiftKey&&!e.state.keySeq?bo(e,"Shift-"+f,t,function(d){return rs(e,d,!0)})||bo(e,f,t,function(d){if(typeof d=="string"?/^go[A-Z]/.test(d):d.motion)return rs(e,d)}):bo(e,f,t,function(d){return rs(e,d)}):!1}function Zl(e,t,f){return bo(e,"'"+f+"'",t,function(d){return rs(e,d,!0)})}var ns=null;function is(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=I(),ut(t,e))return;S&&s<11&&e.keyCode==27&&(e.returnValue=!1);var f=e.keyCode;t.display.shift=f==16||e.shiftKey;var d=Ys(t,e);A&&(ns=d?f:null,!d&&f==88&&!et&&(u?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),_&&!u&&!d&&f==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),f==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Zu(t)}function Zu(e){var t=e.display.lineDiv;H(t,"CodeMirror-crosshair");function f(d){(d.keyCode==18||!d.altKey)&&(o(t,"CodeMirror-crosshair"),mt(document,"keyup",f),mt(document,"mouseover",f))}Pe(document,"keyup",f),Pe(document,"mouseover",f)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),ut(this,e)}function ql(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Bi(t.display,e)||ut(t,e)||e.ctrlKey&&!e.altKey||u&&e.metaKey)return;var f=e.keyCode,d=e.charCode;if(A&&f==ns){ns=null,me(e);return}if(A&&(!e.which||e.which<10)&&Ys(t,e))return;var D=String.fromCharCode(d==null?f:d);if(D=="\b")return;if(Zl(t,e,D))return;t.display.input.onKeyPress(e)}var $u=400,Ka=function(e,t,f){this.time=e,this.pos=t,this.button=f};Ka.prototype.compare=function(e,t,f){return this.time+$u>e&&ye(t,this.pos)==0&&f==this.button};var oa,Eo;function eu(e,t){var f=+new Date;return Eo&&Eo.compare(f,e,t)?(oa=Eo=null,"triple"):oa&&oa.compare(f,e,t)?(Eo=new Ka(f,e,t),oa=null,"double"):(oa=new Ka(f,e,t),Eo=null,"single")}function as(e){var t=this,f=t.display;if(ut(t,e)||f.activeTouch&&f.input.supportsTouch())return;if(f.input.ensurePolled(),f.shift=e.shiftKey,Bi(f,e)){p||(f.scroller.draggable=!1,setTimeout(function(){return f.scroller.draggable=!0},100));return}if(Js(t,e))return;var d=Ji(t,e),D=Je(e),V=d?eu(d,D):"single";if(window.focus(),D==1&&t.state.selectingText&&t.state.selectingText(e),d&&tu(t,D,d,V,e))return;D==1?d?nu(t,d,V,e):ze(e)==f.scroller&&me(e):D==2?(d&&ka(t.doc,d),setTimeout(function(){return f.input.focus()},20)):D==3&&(M?t.display.input.onContextMenu(e):vl(t))}function tu(e,t,f,d,D){var V="Click";return d=="double"?V="Double"+V:d=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,bo(e,es(V,D),D,function(ne){if(typeof ne=="string"&&(ne=yo[ne]),!ne)return!1;var ue=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ue=ne(e,f)!=Te}finally{e.state.suppressEdits=!1}return ue})}function ru(e,t,f){var d=e.getOption("configureMouse"),D=d?d(e,t,f):{};if(D.unit==null){var V=m?f.shiftKey&&f.metaKey:f.altKey;D.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(D.extend==null||e.doc.extend)&&(D.extend=e.doc.extend||f.shiftKey),D.addNew==null&&(D.addNew=u?f.metaKey:f.ctrlKey),D.moveOnDrag==null&&(D.moveOnDrag=!(u?f.altKey:f.ctrlKey)),D}function nu(e,t,f,d){S?setTimeout(Y(gl,e),0):e.curOp.focus=I();var D=ru(e,f,d),V=e.doc.sel,ne;e.options.dragDrop&&Et&&!e.isReadOnly()&&f=="single"&&(ne=V.contains(t))>-1&&(ye((ne=V.ranges[ne]).from(),t)<0||t.xRel>0)&&(ye(ne.to(),t)>0||t.xRel<0)?qu(e,d,t,D):iu(e,d,t,D)}function qu(e,t,f,d){var D=e.display,V=!1,ne=Hn(e,function(ve){p&&(D.scroller.draggable=!1),e.state.draggingText=!1,mt(D.wrapper.ownerDocument,"mouseup",ne),mt(D.wrapper.ownerDocument,"mousemove",ue),mt(D.scroller,"dragstart",de),mt(D.scroller,"drop",ne),V||(me(ve),d.addNew||ka(e.doc,f,null,null,d.extend),p&&!O||S&&s==9?setTimeout(function(){D.wrapper.ownerDocument.body.focus({preventScroll:!0}),D.input.focus()},20):D.input.focus())}),ue=function(ve){V=V||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},de=function(){return V=!0};p&&(D.scroller.draggable=!0),e.state.draggingText=ne,ne.copy=!d.moveOnDrag,D.scroller.dragDrop&&D.scroller.dragDrop(),Pe(D.wrapper.ownerDocument,"mouseup",ne),Pe(D.wrapper.ownerDocument,"mousemove",ue),Pe(D.scroller,"dragstart",de),Pe(D.scroller,"drop",ne),vl(e),setTimeout(function(){return D.input.focus()},20)}function Co(e,t,f){if(f=="char")return new qr(t,t);if(f=="word")return e.findWordAt(t);if(f=="line")return new qr(fe(t.line,0),F(e.doc,fe(t.line+1,0)));var d=f(e,t);return new qr(d.from,d.to)}function iu(e,t,f,d){var D=e.display,V=e.doc;me(t);var ne,ue,de=V.sel,ve=de.ranges;if(d.addNew&&!d.extend?(ue=V.sel.contains(f),ue>-1?ne=ve[ue]:ne=new qr(f,f)):(ne=V.sel.primary(),ue=V.sel.primIndex),d.unit=="rectangle")d.addNew||(ne=new qr(f,f)),f=Ji(e,t,!0,!0),ue=-1;else{var Ve=Co(e,f,d.unit);d.extend?ne=Rs(ne,Ve.anchor,Ve.head,d.extend):ne=Ve}d.addNew?ue==-1?(ue=ve.length,qn(V,li(e,ve.concat([ne]),ue),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[ue].empty()&&d.unit=="char"&&!d.extend?(qn(V,li(e,ve.slice(0,ue).concat(ve.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),de=V.sel):Ms(V,ue,ne,xe):(ue=0,qn(V,new mi([ne],0),xe),de=V.sel);var Ye=f;function gt(Xt){if(ye(Ye,Xt)==0)return;if(Ye=Xt,d.unit=="rectangle"){for(var rr=[],br=e.options.tabSize,pr=ee(jt(V,f.line).text,f.ch,br),kr=ee(jt(V,Xt.line).text,Xt.ch,br),bn=Math.min(pr,kr),Wn=Math.max(pr,kr),On=Math.min(f.line,Xt.line),di=Math.min(e.lastLine(),Math.max(f.line,Xt.line));On<=di;On++){var ei=jt(V,On).text,Pn=Ne(ei,bn,br);bn==Wn?rr.push(new qr(fe(On,Pn),fe(On,Pn))):ei.length>Pn&&rr.push(new qr(fe(On,Pn),fe(On,Ne(ei,Wn,br))))}rr.length||rr.push(new qr(f,f)),qn(V,li(e,de.ranges.slice(0,ue).concat(rr),ue),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Xt)}else{var ti=ne,Yn=Co(e,Xt,d.unit),Wt=ti.anchor,Bn;ye(Yn.anchor,Wt)>0?(Bn=Yn.head,Wt=Rt(ti.from(),Yn.anchor)):(Bn=Yn.anchor,Wt=$e(ti.to(),Yn.head));var Tn=de.ranges.slice(0);Tn[ue]=au(e,new qr(F(V,Wt),Bn)),qn(V,li(e,Tn,ue),xe)}}var dt=D.wrapper.getBoundingClientRect(),Mt=0;function Ut(Xt){var rr=++Mt,br=Ji(e,Xt,!0,d.unit=="rectangle");if(!br)return;if(ye(br,Ye)!=0){e.curOp.focus=I(),gt(br);var pr=ko(D,V);(br.line>=pr.to||br.line<pr.from)&&setTimeout(Hn(e,function(){Mt==rr&&Ut(Xt)}),150)}else{var kr=Xt.clientY<dt.top?-20:Xt.clientY>dt.bottom?20:0;kr&&setTimeout(Hn(e,function(){if(Mt!=rr)return;D.scroller.scrollTop+=kr,Ut(Xt)}),50)}}function Qt(Xt){e.state.selectingText=!1,Mt=Infinity,Xt&&(me(Xt),D.input.focus()),mt(D.wrapper.ownerDocument,"mousemove",Vt),mt(D.wrapper.ownerDocument,"mouseup",Zt),V.history.lastSelOrigin=null}var Vt=Hn(e,function(Xt){Xt.buttons===0||!Je(Xt)?Qt(Xt):Ut(Xt)}),Zt=Hn(e,Qt);e.state.selectingText=Zt,Pe(D.wrapper.ownerDocument,"mousemove",Vt),Pe(D.wrapper.ownerDocument,"mouseup",Zt)}function au(e,t){var f=t.anchor,d=t.head,D=jt(e.doc,f.line);if(ye(f,d)==0&&f.sticky==d.sticky)return t;var V=It(D);if(!V)return t;var ne=yt(V,f.ch,f.sticky),ue=V[ne];if(ue.from!=f.ch&&ue.to!=f.ch)return t;var de=ne+(ue.from==f.ch==(ue.level!=1)?0:1);if(de==0||de==V.length)return t;var ve;if(d.line!=f.line)ve=(d.line-f.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ve=yt(V,d.ch,d.sticky),Ye=Ve-ne||(d.ch-f.ch)*(ue.level==1?-1:1);Ve==de-1||Ve==de?ve=Ye<0:ve=Ye>0}var gt=V[de+(ve?-1:0)],dt=ve==(gt.level==1),Mt=dt?gt.from:gt.to,Ut=dt?"after":"before";return f.ch==Mt&&f.sticky==Ut?t:new qr(new fe(f.line,Mt,Ut),d)}function ou(e,t,f,d){var D,V;if(t.touches)D=t.touches[0].clientX,V=t.touches[0].clientY;else try{D=t.clientX,V=t.clientY}catch(gt){return!1}if(D>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;d&&me(t);var ne=e.display,ue=ne.lineDiv.getBoundingClientRect();if(V>ue.bottom||!Ie(e,f))return ge(t);V-=ue.top-ne.viewOffset;for(var de=0;de<e.display.gutterSpecs.length;++de){var ve=ne.gutters.childNodes[de];if(ve&&ve.getBoundingClientRect().right>=D){var Ve=Sr(e.doc,V),Ye=e.display.gutterSpecs[de];return Ze(e,f,e,Ve,Ye.className,t),ge(t)}}}function Js(e,t){return ou(e,t,"gutterClick",!0)}function Zs(e,t){if(Bi(e.display,t)||za(e,t))return;if(ut(e,t,"contextmenu"))return;M||e.display.input.onContextMenu(t)}function za(e,t){return Ie(e,"gutterContextMenu")?ou(e,t,"gutterContextMenu",!1):!1}function os(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bi(e)}var zi={toString:function(){return"CodeMirror.Init"}},su={},ss={};function eA(e){var t=e.optionHandlers;function f(d,D,V,ne){e.defaults[d]=D,V&&(t[d]=ne?function(ue,de,ve){ve!=zi&&V(ue,de,ve)}:V)}e.defineOption=f,e.Init=zi,f("value","",function(d,D){return d.setValue(D)},!0),f("mode",null,function(d,D){d.doc.modeOption=D,Os(d)},!0),f("indentUnit",2,Os,!0),f("indentWithTabs",!1),f("smartIndent",!0),f("tabSize",4,function(d){lo(d),bi(d),ri(d)},!0),f("lineSeparator",null,function(d,D){if(d.doc.lineSep=D,!D)return;var V=[],ne=d.doc.first;d.doc.iter(function(de){for(var ve=0;;){var Ve=de.text.indexOf(D,ve);if(Ve==-1)break;ve=Ve+D.length,V.push(fe(ne,Ve))}ne++});for(var ue=V.length-1;ue>=0;ue--)Ha(d.doc,D,V[ue],fe(V[ue].line,V[ue].ch+D.length))}),f("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(d,D,V){d.state.specialChars=new RegExp(D.source+(D.test(" ")?"":"| "),"g"),V!=zi&&d.refresh()}),f("specialCharPlaceholder",er,function(d){return d.refresh()},!0),f("electricChars",!0),f("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),f("spellcheck",!1,function(d,D){return d.getInputField().spellcheck=D},!0),f("autocorrect",!1,function(d,D){return d.getInputField().autocorrect=D},!0),f("autocapitalize",!1,function(d,D){return d.getInputField().autocapitalize=D},!0),f("rtlMoveVisually",!y),f("wholeLineUpdateBefore",!0),f("theme","default",function(d){os(d),so(d)},!0),f("keyMap","default",function(d,D,V){var ne=jn(D),ue=V!=zi&&jn(V);ue&&ue.detach&&ue.detach(d,ne),ne.attach&&ne.attach(d,ue||null)}),f("extraKeys",null),f("configureMouse",null),f("lineWrapping",!1,lu,!0),f("gutters",[],function(d,D){d.display.gutterSpecs=Ss(D,d.options.lineNumbers),so(d)},!0),f("fixedGutter",!0,function(d,D){d.display.gutters.style.left=D?Ia(d.display)+"px":"0",d.refresh()},!0),f("coverGutterNextToScrollbar",!1,function(d){return ji(d)},!0),f("scrollbarStyle","native",function(d){Cl(d),ji(d),d.display.scrollbars.setScrollTop(d.doc.scrollTop),d.display.scrollbars.setScrollLeft(d.doc.scrollLeft)},!0),f("lineNumbers",!1,function(d,D){d.display.gutterSpecs=Ss(d.options.gutters,D),so(d)},!0),f("firstLineNumber",1,so,!0),f("lineNumberFormatter",function(d){return d},so,!0),f("showCursorWhenSelecting",!1,$i,!0),f("resetSelectionOnContextMenu",!0),f("lineWiseCopyCut",!0),f("pasteLinesPerSelection",!0),f("selectionsMayTouch",!1),f("readOnly",!1,function(d,D){D=="nocursor"&&(Ma(d),d.display.input.blur()),d.display.input.readOnlyChanged(D)}),f("screenReaderLabel",null,function(d,D){D=D===""?null:D,d.display.input.screenReaderLabelChanged(D)}),f("disableInput",!1,function(d,D){D||d.display.input.reset()},!0),f("dragDrop",!0,tA),f("allowDropFileTypes",null),f("cursorBlinkRate",530),f("cursorScrollMargin",0),f("cursorHeight",1,$i,!0),f("singleCursorHeightPerLine",!0,$i,!0),f("workTime",100),f("workDelay",100),f("flattenSpans",!0,lo,!0),f("addModeClass",!1,lo,!0),f("pollInterval",100),f("undoDepth",200,function(d,D){return d.doc.history.undoDepth=D}),f("historyEventDelay",1250),f("viewportMargin",10,function(d){return d.refresh()},!0),f("maxHighlightLength",1e4,lo,!0),f("moveInputWithCursor",!0,function(d,D){D||d.display.input.resetPosition()}),f("tabindex",null,function(d,D){return d.display.input.getField().tabIndex=D||""}),f("autofocus",null),f("direction","ltr",function(d,D){return d.doc.setDirection(D)},!0),f("phrases",null)}function tA(e,t,f){var d=f&&f!=zi;if(!t!=!d){var D=e.display.dragFunctions,V=t?Pe:mt;V(e.display.scroller,"dragstart",D.start),V(e.display.scroller,"dragenter",D.enter),V(e.display.scroller,"dragover",D.over),V(e.display.scroller,"dragleave",D.leave),V(e.display.scroller,"drop",D.drop)}}function lu(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(o(e.display.wrapper,"CodeMirror-wrap"),Ln(e)),Fo(e),ri(e),bi(e),setTimeout(function(){return ji(e)},100)}function En(e,t){var f=this;if(!(this instanceof En))return new En(e,t);this.options=t=t?G(t):{},G(su,t,!1);var d=t.value;typeof d=="string"?d=new ii(d,t.mode,null,t.lineSeparator,t.direction):t.mode&&(d.modeOption=t.mode),this.doc=d;var D=new En.inputStyles[t.inputStyle](this),V=this.display=new Mu(e,d,D,t);V.wrapper.CodeMirror=this,os(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Cl(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 J,keySeq:null,specialChars:null},t.autofocus&&!a&&V.input.focus(),S&&s<11&&setTimeout(function(){return f.display.input.reset(!0)},20),uu(this),Ks(),ga(this),this.curOp.forceUpdate=!0,Qn(this,d),t.autofocus&&!a||this.hasFocus()?setTimeout(function(){f.hasFocus()&&!f.state.focused&&Es(f)},20):Ma(this);for(var ne in ss)ss.hasOwnProperty(ne)&&ss[ne](this,t[ne],zi);Bl(this),t.finishInit&&t.finishInit(this);for(var ue=0;ue<ls.length;++ue)ls[ue](this);va(this),p&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}En.defaults=su,En.optionHandlers=ss;function uu(e){var t=e.display;Pe(t.scroller,"mousedown",Hn(e,as)),S&&s<11?Pe(t.scroller,"dblclick",Hn(e,function(de){if(ut(e,de))return;var ve=Ji(e,de);if(!ve||Js(e,de)||Bi(e.display,de))return;me(de);var Ve=e.findWordAt(ve);ka(e.doc,Ve.anchor,Ve.head)})):Pe(t.scroller,"dblclick",function(de){return ut(e,de)||me(de)}),Pe(t.scroller,"contextmenu",function(de){return Zs(e,de)}),Pe(t.input.getField(),"contextmenu",function(de){t.scroller.contains(de.target)||Zs(e,de)});var f,d={end:0};function D(){t.activeTouch&&(f=setTimeout(function(){return t.activeTouch=null},1e3),d=t.activeTouch,d.end=+new Date)}function V(de){if(de.touches.length!=1)return!1;var ve=de.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ne(de,ve){if(ve.left==null)return!0;var Ve=ve.left-de.left,Ye=ve.top-de.top;return Ve*Ve+Ye*Ye>20*20}Pe(t.scroller,"touchstart",function(de){if(!ut(e,de)&&!V(de)&&!Js(e,de)){t.input.ensurePolled(),clearTimeout(f);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-d.end<=300?d:null},de.touches.length==1&&(t.activeTouch.left=de.touches[0].pageX,t.activeTouch.top=de.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(de){var ve=t.activeTouch;if(ve&&!Bi(t,de)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Ve=e.coordsChar(t.activeTouch,"page"),Ye;!ve.prev||ne(ve,ve.prev)?Ye=new qr(Ve,Ve):!ve.prev.prev||ne(ve,ve.prev.prev)?Ye=e.findWordAt(Ve):Ye=new qr(fe(Ve.line,0),F(e.doc,fe(Ve.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),me(de)}D()}),Pe(t.scroller,"touchcancel",D),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(no(e,t.scroller.scrollTop),pa(e,t.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(de){return _l(e,de)}),Pe(t.scroller,"DOMMouseScroll",function(de){return _l(e,de)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(de){ut(e,de)||we(de)},over:function(de){ut(e,de)||(Ku(e,de),we(de))},start:function(de){return js(e,de)},drop:Hn(e,Wl),leave:function(de){ut(e,de)||Gl(e)}};var ue=t.input.getField();Pe(ue,"keyup",function(de){return $l.call(e,de)}),Pe(ue,"keydown",Hn(e,is)),Pe(ue,"keypress",Hn(e,ql)),Pe(ue,"focus",function(de){return Es(e,de)}),Pe(ue,"blur",function(de){return Ma(e,de)})}var ls=[];En.defineInitHook=function(e){return ls.push(e)};function Ca(e,t,f,d){var D=e.doc,V;f==null&&(f="add"),f=="smart"&&(D.mode.indent?V=ot(e,t).state:f="prev");var ne=e.options.tabSize,ue=jt(D,t),de=ee(ue.text,null,ne);ue.stateAfter&&(ue.stateAfter=null);var ve=ue.text.match(/^\s*/)[0],Ve;if(!d&&!/\S/.test(ue.text))Ve=0,f="not";else if(f=="smart"&&(Ve=D.mode.indent(V,ue.text.slice(ve.length),ue.text),Ve==Te||Ve>150)){if(!d)return;f="prev"}f=="prev"?t>D.first?Ve=ee(jt(D,t-1).text,null,ne):Ve=0:f=="add"?Ve=de+e.options.indentUnit:f=="subtract"?Ve=de-e.options.indentUnit:typeof f=="number"&&(Ve=de+f),Ve=Math.max(0,Ve);var Ye="",gt=0;if(e.options.indentWithTabs)for(var dt=Math.floor(Ve/ne);dt;--dt)gt+=ne,Ye+=" ";if(gt<Ve&&(Ye+=Se(Ve-gt)),Ye!=ve)return Ha(D,Ye,fe(t,0),fe(t,ve.length),"+input"),ue.stateAfter=null,!0;for(var Mt=0;Mt<D.sel.ranges.length;Mt++){var Ut=D.sel.ranges[Mt];if(Ut.head.line==t&&Ut.head.ch<ve.length){var Qt=fe(t,ve.length);Ms(D,Mt,new qr(Qt,Qt));break}}}var Ci=null;function wo(e){Ci=e}function $s(e,t,f,d,D){var V=e.doc;e.display.shift=!1,d||(d=V.sel);var ne=+new Date-200,ue=D=="paste"||e.state.pasteIncoming>ne,de=st(t),ve=null;if(ue&&d.ranges.length>1)if(Ci&&Ci.text.join(`
|
|
`)==t){if(d.ranges.length%Ci.text.length==0){ve=[];for(var Ve=0;Ve<Ci.text.length;Ve++)ve.push(V.splitLines(Ci.text[Ve]))}}else de.length==d.ranges.length&&e.options.pasteLinesPerSelection&&(ve=Bt(de,function(Vt){return[Vt]}));for(var Ye=e.curOp.updateInput,gt=d.ranges.length-1;gt>=0;gt--){var dt=d.ranges[gt],Mt=dt.from(),Ut=dt.to();dt.empty()&&(f&&f>0?Mt=fe(Mt.line,Mt.ch-f):e.state.overwrite&&!ue?Ut=fe(Ut.line,Math.min(jt(V,Ut.line).text.length,Ut.ch+tt(de).length)):ue&&Ci&&Ci.lineWise&&Ci.text.join(`
|
|
`)==de.join(`
|
|
`)&&(Mt=Ut=fe(Mt.line,0)));var Qt={from:Mt,to:Ut,text:ve?ve[gt%ve.length]:de,origin:D||(ue?"paste":e.state.cutIncoming>ne?"cut":"+input")};Na(e.doc,Qt),Tr(e,"inputRead",e,Qt)}t&&!ue&&Bo(e,t),Fa(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function xo(e,t){var f=e.clipboardData&&e.clipboardData.getData("Text");if(f)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&ci(t,function(){return $s(t,f,0,null,"paste")}),!0}function Bo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var f=e.doc.sel,d=f.ranges.length-1;d>=0;d--){var D=f.ranges[d];if(D.head.ch>100||d&&f.ranges[d-1].head.line==D.head.line)continue;var V=e.getModeAt(D.head),ne=!1;if(V.electricChars){for(var ue=0;ue<V.electricChars.length;ue++)if(t.indexOf(V.electricChars.charAt(ue))>-1){ne=Ca(e,D.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(jt(e.doc,D.head.line).text.slice(0,D.head.ch))&&(ne=Ca(e,D.head.line,"smart")));ne&&Tr(e,"electricInput",e,D.head.line)}}function qs(e){for(var t=[],f=[],d=0;d<e.doc.sel.ranges.length;d++){var D=e.doc.sel.ranges[d].head.line,V={anchor:fe(D,0),head:fe(D+1,0)};f.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:f}}function el(e,t,f,d){e.setAttribute("autocorrect",f?"":"off"),e.setAttribute("autocapitalize",d?"":"off"),e.setAttribute("spellcheck",!!t)}function Au(){var e=l("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=l("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return p?e.style.width="1000px":e.setAttribute("wrap","off"),C&&(e.style.border="1px solid black"),el(e),t}function cu(e){var t=e.optionHandlers,f=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(d,D){var V=this.options,ne=V[d];if(V[d]==D&&d!="mode")return;V[d]=D,t.hasOwnProperty(d)&&Hn(this,t[d])(this,D,ne),Ze(this,"optionChange",this,d)},getOption:function(d){return this.options[d]},getDoc:function(){return this.doc},addKeyMap:function(d,D){this.state.keyMaps[D?"push":"unshift"](jn(d))},removeKeyMap:function(d){for(var D=this.state.keyMaps,V=0;V<D.length;++V)if(D[V]==d||D[V].name==d)return D.splice(V,1),!0},addOverlay:ni(function(d,D){var V=d.token?d:e.getMode(this.options,d);if(V.startState)throw new Error("Overlays may not be stateful.");De(this.state.overlays,{mode:V,modeSpec:d,opaque:D&&D.opaque,priority:D&&D.priority||0},function(ne){return ne.priority}),this.state.modeGen++,ri(this)}),removeOverlay:ni(function(d){for(var D=this.state.overlays,V=0;V<D.length;++V){var ne=D[V].modeSpec;if(ne==d||typeof d=="string"&&ne.name==d){D.splice(V,1),this.state.modeGen++,ri(this);return}}}),indentLine:ni(function(d,D,V){typeof D!="string"&&typeof D!="number"&&(D==null?D=this.options.smartIndent?"smart":"prev":D=D?"add":"subtract"),Cn(this.doc,d)&&Ca(this,d,D,V)}),indentSelection:ni(function(d){for(var D=this.doc.sel.ranges,V=-1,ne=0;ne<D.length;ne++){var ue=D[ne];if(ue.empty())ue.head.line>V&&(Ca(this,ue.head.line,d,!0),V=ue.head.line,ne==this.doc.sel.primIndex&&Fa(this));else{var de=ue.from(),ve=ue.to(),Ve=Math.max(V,de.line);V=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ye=Ve;Ye<V;++Ye)Ca(this,Ye,d);var gt=this.doc.sel.ranges;de.ch==0&&D.length==gt.length&>[ne].from().ch>0&&Ms(this.doc,ne,new qr(de,gt[ne].to()),be)}}}),getTokenAt:function(d,D){return Jt(this,d,D)},getLineTokens:function(d,D){return Jt(this,fe(d),D,!0)},getTokenTypeAt:function(d){d=F(this.doc,d);var D=xt(this,jt(this.doc,d.line)),V=0,ne=(D.length-1)/2,ue=d.ch,de;if(ue==0)de=D[2];else for(;;){var ve=V+ne>>1;if((ve?D[ve*2-1]:0)>=ue)ne=ve;else if(D[ve*2+1]<ue)V=ve+1;else{de=D[ve*2+2];break}}var Ve=de?de.indexOf("overlay "):-1;return Ve<0?de:Ve==0?null:de.slice(0,Ve-1)},getModeAt:function(d){var D=this.doc.mode;return D.innerMode?e.innerMode(D,this.getTokenAt(d).state).mode:D},getHelper:function(d,D){return this.getHelpers(d,D)[0]},getHelpers:function(d,D){var V=[];if(!f.hasOwnProperty(D))return V;var ne=f[D],ue=this.getModeAt(d);if(typeof ue[D]=="string")ne[ue[D]]&&V.push(ne[ue[D]]);else if(ue[D])for(var de=0;de<ue[D].length;de++){var ve=ne[ue[D][de]];ve&&V.push(ve)}else ue.helperType&&ne[ue.helperType]?V.push(ne[ue.helperType]):ne[ue.name]&&V.push(ne[ue.name]);for(var Ve=0;Ve<ne._global.length;Ve++){var Ye=ne._global[Ve];Ye.pred(ue,this)&&oe(V,Ye.val)==-1&&V.push(Ye.val)}return V},getStateAfter:function(d,D){var V=this.doc;return d=$(V,d==null?V.first+V.size-1:d),ot(this,d+1,D).state},cursorCoords:function(d,D){var V,ne=this.doc.sel.primary();return d==null?V=ne.head:typeof d=="object"?V=F(this.doc,d):V=d?ne.from():ne.to(),Ei(this,V,D||"page")},charCoords:function(d,D){return to(this,F(this.doc,d),D||"page")},coordsChar:function(d,D){return d=ys(this,d,D||"page"),Li(this,d.left,d.top)},lineAtHeight:function(d,D){return d=ys(this,{top:d,left:0},D||"page").top,Sr(this.doc,d+this.display.viewOffset)},heightAtLine:function(d,D,V){var ne=!1,ue;if(typeof d=="number"){var de=this.doc.first+this.doc.size-1;d<this.doc.first?d=this.doc.first:d>de&&(d=de,ne=!0),ue=jt(this.doc,d)}else ue=d;return eo(this,ue,{top:0,left:0},D||"page",V||ne).top+(ne?this.doc.height-Rn(ue):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Da(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(d,D,V,ne,ue){var de=this.display;d=Ei(this,F(this.doc,d));var ve=d.bottom,Ve=d.left;if(D.style.position="absolute",D.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(D),de.sizer.appendChild(D),ne=="over")ve=d.top;else if(ne=="above"||ne=="near"){var Ye=Math.max(de.wrapper.clientHeight,this.doc.height),gt=Math.max(de.sizer.clientWidth,de.lineSpace.clientWidth);(ne=="above"||d.bottom+D.offsetHeight>Ye)&&d.top>D.offsetHeight?ve=d.top-D.offsetHeight:d.bottom+D.offsetHeight<=Ye&&(ve=d.bottom),Ve+D.offsetWidth>gt&&(Ve=gt-D.offsetWidth)}D.style.top=ve+"px",D.style.left=D.style.right="",ue=="right"?(Ve=de.sizer.clientWidth-D.offsetWidth,D.style.right="0px"):(ue=="left"?Ve=0:ue=="middle"&&(Ve=(de.sizer.clientWidth-D.offsetWidth)/2),D.style.left=Ve+"px"),V&&Cu(this,{left:Ve,top:ve,right:Ve+D.offsetWidth,bottom:ve+D.offsetHeight})},triggerOnKeyDown:ni(is),triggerOnKeyPress:ni(ql),triggerOnKeyUp:$l,triggerOnMouseDown:ni(as),execCommand:function(d){if(yo.hasOwnProperty(d))return yo[d].call(null,this)},triggerElectric:ni(function(d){Bo(this,d)}),findPosH:function(d,D,V,ne){var ue=1;D<0&&(ue=-1,D=-D);for(var de=F(this.doc,d),ve=0;ve<D&&!(de=us(this.doc,de,ue,V,ne),de.hitSide);++ve);return de},moveH:ni(function(d,D){var V=this;this.extendSelectionsBy(function(ne){return V.display.shift||V.doc.extend||ne.empty()?us(V.doc,ne.head,d,D,V.options.rtlMoveVisually):d<0?ne.from():ne.to()},Oe)}),deleteH:ni(function(d,D){var V=this.doc.sel,ne=this.doc;V.somethingSelected()?ne.replaceSelection("",null,"+delete"):Mi(this,function(ue){var de=us(ne,ue.head,d,D,!1);return d<0?{from:de,to:ue.head}:{from:ue.head,to:de}})}),findPosV:function(d,D,V,ne){var ue=1,de=ne;D<0&&(ue=-1,D=-D);for(var ve=F(this.doc,d),Ve=0;Ve<D;++Ve){var Ye=Ei(this,ve,"div");if(de==null?de=Ye.left:Ye.left=de,ve=du(this,Ye,ue,V),ve.hitSide)break}return ve},moveV:ni(function(d,D){var V=this,ne=this.doc,ue=[],de=!this.display.shift&&!ne.extend&&ne.sel.somethingSelected();if(ne.extendSelectionsBy(function(Ve){if(de)return d<0?Ve.from():Ve.to();var Ye=Ei(V,Ve.head,"div");Ve.goalColumn!=null&&(Ye.left=Ve.goalColumn),ue.push(Ye.left);var gt=du(V,Ye,d,D);return D=="page"&&Ve==ne.sel.primary()&&ws(V,to(V,gt,"div").top-Ye.top),gt},Oe),ue.length)for(var ve=0;ve<ne.sel.ranges.length;ve++)ne.sel.ranges[ve].goalColumn=ue[ve]}),findWordAt:function(d){var D=this.doc,V=jt(D,d.line).text,ne=d.ch,ue=d.ch;if(V){var de=this.getHelper(d,"wordChars");(d.sticky=="before"||ue==V.length)&&ne?--ne:++ue;for(var ve=V.charAt(ne),Ve=ie(ve,de)?function(Ye){return ie(Ye,de)}:/\s/.test(ve)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!ie(Ye)};ne>0&&Ve(V.charAt(ne-1));)--ne;for(;ue<V.length&&Ve(V.charAt(ue));)++ue}return new qr(fe(d.line,ne),fe(d.line,ue))},toggleOverwrite:function(d){if(d!=null&&d==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):o(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ni(function(d,D){qi(this,d,D)}),getScrollInfo:function(){var d=this.display.scroller;return{left:d.scrollLeft,top:d.scrollTop,height:d.scrollHeight-Di(this)-this.display.barHeight,width:d.scrollWidth-Di(this)-this.display.barWidth,clientHeight:Mn(this),clientWidth:Ai(this)}},scrollIntoView:ni(function(d,D){d==null?(d={from:this.doc.sel.primary().head,to:null},D==null&&(D=this.options.cursorScrollMargin)):typeof d=="number"?d={from:fe(d,0),to:null}:d.from==null&&(d={from:d,to:null}),d.to||(d.to=d.from),d.margin=D||0,d.from.line!=null?wu(this,d):yl(this,d.from,d.to,d.margin)}),setSize:ni(function(d,D){var V=this,ne=function(de){return typeof de=="number"||/^\d+$/.test(String(de))?de+"px":de};d!=null&&(this.display.wrapper.style.width=ne(d)),D!=null&&(this.display.wrapper.style.height=ne(D)),this.options.lineWrapping&&fi(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(de){if(de.widgets){for(var ve=0;ve<de.widgets.length;ve++)if(de.widgets[ve].noHScroll){Hi(V,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(d){return ci(this,d)},startOperation:function(){return ga(this)},endOperation:function(){return va(this)},refresh:ni(function(){var d=this.display.cachedTextHeight;ri(this),this.curOp.forceUpdate=!0,bi(this),qi(this,this.doc.scrollLeft,this.doc.scrollTop),Bs(this.display),(d==null||Math.abs(d-ha(this.display))>.5||this.options.lineWrapping)&&Fo(this),Ze(this,"refresh",this)}),swapDoc:ni(function(d){var D=this.doc;return D.cm=null,this.state.selectingText&&this.state.selectingText(),Qn(this,d),bi(this),this.display.input.reset(),qi(this,d.scrollLeft,d.scrollTop),this.curOp.forceScroll=!0,Tr(this,"swapDoc",this,D),D}),phrase:function(d){var D=this.options.phrases;return D&&Object.prototype.hasOwnProperty.call(D,d)?D[d]:d},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}},Me(e),e.registerHelper=function(d,D,V){f.hasOwnProperty(d)||(f[d]=e[d]={_global:[]}),f[d][D]=V},e.registerGlobalHelper=function(d,D,V,ne){e.registerHelper(d,D,ne),f[d]._global.push({pred:V,val:ne})}}function us(e,t,f,d,D){var V=t,ne=f,ue=jt(e,t.line),de=D&&e.direction=="rtl"?-f:f;function ve(){var Zt=t.line+de;return Zt<e.first||Zt>=e.first+e.size?!1:(t=new fe(Zt,t.ch,t.sticky),ue=jt(e,Zt))}function Ve(Zt){var Xt;if(d=="codepoint"){var rr=ue.text.charCodeAt(t.ch+(d>0?0:-1));isNaN(rr)?Xt=null:Xt=new fe(t.line,Math.max(0,Math.min(ue.text.length,t.ch+f*(rr>=55296&&rr<56320?2:1))),-f)}else D?Xt=Vs(e.cm,ue,t,f):Xt=Gs(ue,t,f);if(Xt==null)if(!Zt&&ve())t=ts(D,e.cm,ue,t.line,de);else return!1;else t=Xt;return!0}if(d=="char"||d=="codepoint")Ve();else if(d=="column")Ve(!0);else if(d=="word"||d=="group")for(var Ye=null,gt=d=="group",dt=e.cm&&e.cm.getHelper(t,"wordChars"),Mt=!0;!(f<0&&!Ve(!Mt));Mt=!1){var Ut=ue.text.charAt(t.ch)||`
|
|
`,Qt=ie(Ut,dt)?"w":gt&&Ut==`
|
|
`?"n":!gt||/\s/.test(Ut)?null:"p";if(gt&&!Mt&&!Qt&&(Qt="s"),Ye&&Ye!=Qt){f<0&&(f=1,Ve(),t.sticky="after");break}if(Qt&&(Ye=Qt),f>0&&!Ve(!Mt))break}var Vt=Yo(e,t,V,ne,!0);return Fe(V,Vt)&&(Vt.hitSide=!0),Vt}function du(e,t,f,d){var D=e.doc,V=t.left,ne;if(d=="page"){var ue=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),de=Math.max(ue-.5*ha(e.display),3);ne=(f>0?t.bottom:t.top)+f*de}else d=="line"&&(ne=f>0?t.bottom+3:t.top-3);for(var ve;!(ve=Li(e,V,ne),!ve.outside);){if(f<0?ne<=0:ne>=D.height){ve.hitSide=!0;break}ne+=f*5}return ve}var An=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};An.prototype.init=function(e){var t=this,f=this,d=f.cm,D=f.div=e.lineDiv;el(D,d.options.spellcheck,d.options.autocorrect,d.options.autocapitalize);function V(ue){for(var de=ue.target;de;de=de.parentNode){if(de==D)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(de.className))break}return!1}Pe(D,"paste",function(ue){if(!V(ue)||ut(d,ue)||xo(ue,d))return;s<=11&&setTimeout(Hn(d,function(){return t.updateFromDOM()}),20)}),Pe(D,"compositionstart",function(ue){t.composing={data:ue.data,done:!1}}),Pe(D,"compositionupdate",function(ue){t.composing||(t.composing={data:ue.data,done:!1})}),Pe(D,"compositionend",function(ue){t.composing&&(ue.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(D,"touchstart",function(){return f.forceCompositionEnd()}),Pe(D,"input",function(){t.composing||t.readFromDOMSoon()});function ne(ue){if(!V(ue)||ut(d,ue))return;if(d.somethingSelected())wo({lineWise:!1,text:d.getSelections()}),ue.type=="cut"&&d.replaceSelection("",null,"cut");else if(d.options.lineWiseCopyCut){var de=qs(d);wo({lineWise:!0,text:de.text}),ue.type=="cut"&&d.operation(function(){d.setSelections(de.ranges,0,be),d.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var ve=Ci.text.join(`
|
|
`);if(ue.clipboardData.setData("Text",ve),ue.clipboardData.getData("Text")==ve){ue.preventDefault();return}}var Ve=Au(),Ye=Ve.firstChild;d.display.lineSpace.insertBefore(Ve,d.display.lineSpace.firstChild),Ye.value=Ci.text.join(`
|
|
`);var gt=document.activeElement;Z(Ye),setTimeout(function(){d.display.lineSpace.removeChild(Ve),gt.focus(),gt==D&&f.showPrimarySelection()},50)}Pe(D,"copy",ne),Pe(D,"cut",ne)},An.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},An.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},An.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},An.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},An.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,f=t.doc.sel.primary(),d=f.from(),D=f.to();if(t.display.viewTo==t.display.viewFrom||d.line>=t.display.viewTo||D.line<t.display.viewFrom){e.removeAllRanges();return}var V=Wi(t,e.anchorNode,e.anchorOffset),ne=Wi(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&ne&&!ne.bad&&ye(Rt(V,ne),d)==0&&ye($e(V,ne),D)==0)return;var ue=t.display.view,de=d.line>=t.display.viewFrom&&wa(t,d)||{node:ue[0].measure.map[2],offset:0},ve=D.line<t.display.viewTo&&wa(t,D);if(!ve){var Ve=ue[ue.length-1].measure,Ye=Ve.maps?Ve.maps[Ve.maps.length-1]:Ve.map;ve={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!de||!ve){e.removeAllRanges();return}var gt=e.rangeCount&&e.getRangeAt(0),dt;try{dt=B(de.node,de.offset,ve.offset,ve.node)}catch(Mt){}dt&&(!_&&t.state.focused?(e.collapse(de.node,de.offset),dt.collapsed||(e.removeAllRanges(),e.addRange(dt))):(e.removeAllRanges(),e.addRange(dt)),gt&&e.anchorNode==null?e.addRange(gt):_&&this.startGracePeriod()),this.rememberSelection()},An.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},An.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},An.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},An.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return h(this.div,t)},An.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},An.prototype.blur=function(){this.div.blur()},An.prototype.getField=function(){return this.div},An.prototype.supportsTouch=function(){return!0},An.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():ci(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},An.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},An.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(c&&i&&this.cm.display.gutterSpecs.length&&hu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var f=Wi(t,e.anchorNode,e.anchorOffset),d=Wi(t,e.focusNode,e.focusOffset);f&&d&&ci(t,function(){qn(t.doc,ea(f,d),be),(f.bad||d.bad)&&(t.curOp.selectionChanged=!0)})},An.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,f=e.doc.sel.primary(),d=f.from(),D=f.to();if(d.ch==0&&d.line>e.firstLine()&&(d=fe(d.line-1,jt(e.doc,d.line-1).length)),D.ch==jt(e.doc,D.line).text.length&&D.line<e.lastLine()&&(D=fe(D.line+1,0)),d.line<t.viewFrom||D.line>t.viewTo-1)return!1;var V,ne,ue;d.line==t.viewFrom||(V=Zi(e,d.line))==0?(ne=mr(t.view[0].line),ue=t.view[0].node):(ne=mr(t.view[V].line),ue=t.view[V-1].node.nextSibling);var de=Zi(e,D.line),ve,Ve;if(de==t.view.length-1?(ve=t.viewTo-1,Ve=t.lineDiv.lastChild):(ve=mr(t.view[de+1].line)-1,Ve=t.view[de+1].node.previousSibling),!ue)return!1;for(var Ye=e.doc.splitLines(xa(e,ue,Ve,ne,ve)),gt=Mr(e.doc,fe(ne,0),fe(ve,jt(e.doc,ve).text.length));Ye.length>1&>.length>1;)if(tt(Ye)==tt(gt))Ye.pop(),gt.pop(),ve--;else if(Ye[0]==gt[0])Ye.shift(),gt.shift(),ne++;else break;for(var dt=0,Mt=0,Ut=Ye[0],Qt=gt[0],Vt=Math.min(Ut.length,Qt.length);dt<Vt&&Ut.charCodeAt(dt)==Qt.charCodeAt(dt);)++dt;for(var Zt=tt(Ye),Xt=tt(gt),rr=Math.min(Zt.length-(Ye.length==1?dt:0),Xt.length-(gt.length==1?dt:0));Mt<rr&&Zt.charCodeAt(Zt.length-Mt-1)==Xt.charCodeAt(Xt.length-Mt-1);)++Mt;if(Ye.length==1&>.length==1&&ne==d.line)for(;dt&&dt>d.ch&&Zt.charCodeAt(Zt.length-Mt-1)==Xt.charCodeAt(Xt.length-Mt-1);)dt--,Mt++;Ye[Ye.length-1]=Zt.slice(0,Zt.length-Mt).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(dt).replace(/\u200b+$/,"");var br=fe(ne,dt),pr=fe(ve,gt.length?tt(gt).length-Mt:0);if(Ye.length>1||Ye[0]||ye(br,pr))return Ha(e.doc,Ye,br,pr,"+input"),!0},An.prototype.ensurePolled=function(){this.forceCompositionEnd()},An.prototype.reset=function(){this.forceCompositionEnd()},An.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},An.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},An.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&ci(this.cm,function(){return ri(e.cm)})},An.prototype.setUneditable=function(e){e.contentEditable="false"},An.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Hn(this.cm,$s)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},An.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},An.prototype.onContextMenu=function(){},An.prototype.resetPosition=function(){},An.prototype.needsContentAttribute=!0;function wa(e,t){var f=ca(e,t.line);if(!f||f.hidden)return null;var d=jt(e.doc,t.line),D=Xn(f,d,t.line),V=It(d,e.doc.direction),ne="left";if(V){var ue=yt(V,t.ch);ne=ue%2?"right":"left"}var de=gs(D.map,t.ch,ne);return de.offset=de.collapse=="right"?de.end:de.start,de}function hu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function xn(e,t){return t&&(e.bad=!0),e}function xa(e,t,f,d,D){var V="",ne=!1,ue=e.doc.lineSeparator(),de=!1;function ve(dt){return function(Mt){return Mt.id==dt}}function Ve(){ne&&(V+=ue,de&&(V+=ue),ne=de=!1)}function Ye(dt){dt&&(Ve(),V+=dt)}function gt(dt){if(dt.nodeType==1){var Mt=dt.getAttribute("cm-text");if(Mt){Ye(Mt);return}var Ut=dt.getAttribute("cm-marker"),Qt;if(Ut){var Vt=e.findMarks(fe(d,0),fe(D+1,0),ve(+Ut));Vt.length&&(Qt=Vt[0].find(0))&&Ye(Mr(e.doc,Qt.from,Qt.to).join(ue));return}if(dt.getAttribute("contenteditable")=="false")return;var Zt=/^(pre|div|p|li|table|br)$/i.test(dt.nodeName);if(!/^br$/i.test(dt.nodeName)&&dt.textContent.length==0)return;Zt&&Ve();for(var Xt=0;Xt<dt.childNodes.length;Xt++)gt(dt.childNodes[Xt]);/^(pre|p)$/i.test(dt.nodeName)&&(de=!0),Zt&&(ne=!0)}else dt.nodeType==3&&Ye(dt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(gt(t),t==f);)t=t.nextSibling,de=!1;return V}function Wi(e,t,f){var d;if(t==e.display.lineDiv){if(d=e.display.lineDiv.childNodes[f],!d)return xn(e.clipPos(fe(e.display.viewTo-1)),!0);t=null,f=0}else for(d=t;;d=d.parentNode){if(!d||d==e.display.lineDiv)return null;if(d.parentNode&&d.parentNode==e.display.lineDiv)break}for(var D=0;D<e.display.view.length;D++){var V=e.display.view[D];if(V.node==d)return sa(V,t,f)}}function sa(e,t,f){var d=e.text.firstChild,D=!1;if(!t||!h(d,t))return xn(fe(mr(e.line),0),!0);if(t==d&&(D=!0,t=d.childNodes[f],f=0,!t)){var V=e.rest?tt(e.rest):e.line;return xn(fe(mr(V),V.text.length),D)}var ne=t.nodeType==3?t:null,ue=t;for(!ne&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ne=t.firstChild,f&&(f=ne.nodeValue.length));ue.parentNode!=d;)ue=ue.parentNode;var de=e.measure,ve=de.maps;function Ve(Qt,Vt,Zt){for(var Xt=-1;Xt<(ve?ve.length:0);Xt++)for(var rr=Xt<0?de.map:ve[Xt],br=0;br<rr.length;br+=3){var pr=rr[br+2];if(pr==Qt||pr==Vt){var kr=mr(Xt<0?e.line:e.rest[Xt]),bn=rr[br]+Zt;return(Zt<0||pr!=Qt)&&(bn=rr[br+(Zt?1:0)]),fe(kr,bn)}}}var Ye=Ve(ne,ue,f);if(Ye)return xn(Ye,D);for(var gt=ue.nextSibling,dt=ne?ne.nodeValue.length-f:0;gt;gt=gt.nextSibling){if(Ye=Ve(gt,gt.firstChild,0),Ye)return xn(fe(Ye.line,Ye.ch-dt),D);dt+=gt.textContent.length}for(var Mt=ue.previousSibling,Ut=f;Mt;Mt=Mt.previousSibling){if(Ye=Ve(Mt,Mt.firstChild,-1),Ye)return xn(fe(Ye.line,Ye.ch+Ut),D);Ut+=Mt.textContent.length}}var fn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};fn.prototype.init=function(e){var t=this,f=this,d=this.cm;this.createField(e);var D=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),C&&(D.style.width="0px"),Pe(D,"input",function(){S&&s>=9&&t.hasSelection&&(t.hasSelection=null),f.poll()}),Pe(D,"paste",function(ne){if(ut(d,ne)||xo(ne,d))return;d.state.pasteIncoming=+new Date,f.fastPoll()});function V(ne){if(ut(d,ne))return;if(d.somethingSelected())wo({lineWise:!1,text:d.getSelections()});else if(d.options.lineWiseCopyCut){var ue=qs(d);wo({lineWise:!0,text:ue.text}),ne.type=="cut"?d.setSelections(ue.ranges,null,be):(f.prevInput="",D.value=ue.text.join(`
|
|
`),Z(D))}else return;ne.type=="cut"&&(d.state.cutIncoming=+new Date)}Pe(D,"cut",V),Pe(D,"copy",V),Pe(e.scroller,"paste",function(ne){if(Bi(e,ne)||ut(d,ne))return;if(!D.dispatchEvent){d.state.pasteIncoming=+new Date,f.focus();return}var ue=new Event("paste");ue.clipboardData=ne.clipboardData,D.dispatchEvent(ue)}),Pe(e.lineSpace,"selectstart",function(ne){Bi(e,ne)||me(ne)}),Pe(D,"compositionstart",function(){var ne=d.getCursor("from");f.composing&&f.composing.range.clear(),f.composing={start:ne,range:d.markText(ne,d.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(D,"compositionend",function(){f.composing&&(f.poll(),f.composing.range.clear(),f.composing=null)})},fn.prototype.createField=function(e){this.wrapper=Au(),this.textarea=this.wrapper.firstChild},fn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},fn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,f=e.doc,d=pl(e);if(e.options.moveInputWithCursor){var D=Ei(e,f.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),ne=t.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,D.top+ne.top-V.top)),d.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,D.left+ne.left-V.left))}return d},fn.prototype.showSelection=function(e){var t=this.cm,f=t.display;n(f.cursorDiv,e.cursors),n(f.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},fn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var f=t.getSelection();this.textarea.value=f,t.state.focused&&Z(this.textarea),S&&s>=9&&(this.hasSelection=f)}else e||(this.prevInput=this.textarea.value="",S&&s>=9&&(this.hasSelection=null))},fn.prototype.getField=function(){return this.textarea},fn.prototype.supportsTouch=function(){return!1},fn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},fn.prototype.blur=function(){this.textarea.blur()},fn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},fn.prototype.receivedFocus=function(){this.slowPoll()},fn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function f(){var d=t.poll();!d&&!e?(e=!0,t.polling.set(60,f)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,f)},fn.prototype.poll=function(){var e=this,t=this.cm,f=this.textarea,d=this.prevInput;if(this.contextMenuPending||!t.state.focused||rt(f)&&!d&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var D=f.value;if(D==d&&!t.somethingSelected())return!1;if(S&&s>=9&&this.hasSelection===D||u&&/[\uf700-\uf7ff]/.test(D))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=D.charCodeAt(0);if(V==8203&&!d&&(d="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var ne=0,ue=Math.min(d.length,D.length);ne<ue&&d.charCodeAt(ne)==D.charCodeAt(ne);)++ne;return ci(t,function(){$s(t,D.slice(ne),d.length-ne,null,e.composing?"*compose":null),D.length>1e3||D.indexOf(`
|
|
`)>-1?f.value=e.prevInput="":e.prevInput=D,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},fn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},fn.prototype.onKeyPress=function(){S&&s>=9&&(this.hasSelection=null),this.fastPoll()},fn.prototype.onContextMenu=function(e){var t=this,f=t.cm,d=f.display,D=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Ji(f,e),ne=d.scroller.scrollTop;if(!V||A)return;var ue=f.options.resetSelectionOnContextMenu;ue&&f.doc.sel.contains(V)==-1&&Hn(f,qn)(f.doc,ea(V),be);var de=D.style.cssText,ve=t.wrapper.style.cssText,Ve=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",D.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-Ve.top-5)+"px; left: "+(e.clientX-Ve.left-5)+`px;
|
|
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;p&&(Ye=window.scrollY),d.input.focus(),p&&window.scrollTo(null,Ye),d.input.reset(),f.somethingSelected()||(D.value=t.prevInput=" "),t.contextMenuPending=dt,d.selForContextMenu=f.doc.sel,clearTimeout(d.detectingSelectAll);function gt(){if(D.selectionStart!=null){var Ut=f.somethingSelected(),Qt="\u200B"+(Ut?D.value:"");D.value="\u21DA",D.value=Qt,t.prevInput=Ut?"":"\u200B",D.selectionStart=1,D.selectionEnd=Qt.length,d.selForContextMenu=f.doc.sel}}function dt(){if(t.contextMenuPending!=dt)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,D.style.cssText=de,S&&s<9&&d.scrollbars.setScrollTop(d.scroller.scrollTop=ne),D.selectionStart!=null){(!S||S&&s<9)&>();var Ut=0,Qt=function(){d.selForContextMenu==f.doc.sel&&D.selectionStart==0&&D.selectionEnd>0&&t.prevInput=="\u200B"?Hn(f,Nl)(f):Ut++<10?d.detectingSelectAll=setTimeout(Qt,500):(d.selForContextMenu=null,d.input.reset())};d.detectingSelectAll=setTimeout(Qt,200)}}if(S&&s>=9&>(),M){we(e);var Mt=function(){mt(window,"mouseup",Mt),setTimeout(dt,20)};Pe(window,"mouseup",Mt)}else setTimeout(dt,50)},fn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},fn.prototype.setUneditable=function(){},fn.prototype.needsContentAttribute=!1;function To(e,t){if(t=t?G(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var f=I();t.autofocus=f==e||e.getAttribute("autofocus")!=null&&f==document.body}function d(){e.value=ue.getValue()}var D;if(e.form&&(Pe(e.form,"submit",d),!t.leaveSubmitMethodAlone)){var V=e.form;D=V.submit;try{var ne=V.submit=function(){d(),V.submit=D,V.submit(),V.submit=ne}}catch(de){}}t.finishInit=function(de){de.save=d,de.getTextArea=function(){return e},de.toTextArea=function(){de.toTextArea=isNaN,d(),e.parentNode.removeChild(de.getWrapperElement()),e.style.display="",e.form&&(mt(e.form,"submit",d),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=D))}},e.style.display="none";var ue=En(function(de){return e.parentNode.insertBefore(de,e.nextSibling)},t);return ue}function Gi(e){e.off=mt,e.on=Pe,e.wheelEventPixels=Ll,e.Doc=ii,e.splitLines=st,e.countColumn=ee,e.findColumn=Ne,e.isWordChar=re,e.Pass=Te,e.signal=Ze,e.Line=hn,e.changeEnd=ta,e.scrollbarModel=El,e.Pos=fe,e.cmpPos=ye,e.modes=ct,e.mimeModes=at,e.resolveMode=qe,e.getMode=St,e.modeExtensions=Ht,e.extendMode=Pt,e.copyState=zt,e.startState=Rr,e.innerMode=Ir,e.commands=yo,e.keyMap=Ki,e.keyName=zs,e.isModifierKey=Xl,e.lookupKey=Ea,e.normalizeKeyMap=Vu,e.StringStream=yr,e.SharedTextMarker=ja,e.TextMarker=Ri,e.LineWidget=po,e.e_preventDefault=me,e.e_stopPropagation=Ee,e.e_stop=we,e.addClass=H,e.contains=h,e.rmClass=o,e.keyNames=aa}eA(En),cu(En);var fu="iter insert remove copy getEditor constructor".split(" ");for(var So in ii.prototype)ii.prototype.hasOwnProperty(So)&&oe(fu,So)<0&&(En.prototype[So]=function(e){return function(){return e.apply(this.doc,arguments)}}(ii.prototype[So]));return Me(ii),En.inputStyles={textarea:fn,contenteditable:An},En.defineMode=function(e){!En.defaults.mode&&e!="null"&&(En.defaults.mode=e),Tt.apply(this,arguments)},En.defineMIME=Ct,En.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),En.defineMIME("text/plain","null"),En.defineExtension=function(e,t){En.prototype[e]=t},En.defineDocExtension=function(e,t){ii.prototype[e]=t},En.fromTextArea=To,Gi(En),En.version="5.58.2",En})},WaYH:function(Xe,pe,W){"use strict";var X=W("rePB"),N=W("Ff2n"),_=W("VTBJ"),Q=W("1OyB"),R=W("vuIU"),E=W("JX7q"),S=W("Ji7U"),s=W("LK+K"),p=W("q1tI"),v=W("TSYQ"),i=W.n(v),A=W("sboe"),O=W("OZM5"),w=function(M){var b=M.prefixCls,o=M.level,r=M.isStart,n=M.isEnd;if(!o)return null;for(var l="".concat(b,"-indent-unit"),L=[],B=0;B<o;B+=1){var h;L.push(p.createElement("span",{key:B,className:i()(l,(h={},Object(X.a)(h,"".concat(l,"-start"),r[B+1]),Object(X.a)(h,"".concat(l,"-end"),n[B+1]),Object(X.a)(h,"".concat(l,"-end-first-level"),!B&&n[0]),h))}))}return p.createElement("span",{"aria-hidden":"true",className:"".concat(b,"-indent")},L)},g=w,C=W("815F"),c="open",a="close",u="---",m=function(x){Object(S.a)(b,x);var M=Object(s.a)(b);function b(){var o;return Object(Q.a)(this,b),o=M.apply(this,arguments),o.state={dragNodeHighlight:!1},o.onSelectorClick=function(r){var n=o.props.context.onNodeClick;n(r,Object(C.b)(o.props)),o.isSelectable()?o.onSelect(r):o.onCheck(r)},o.onSelectorDoubleClick=function(r){var n=o.props.context.onNodeDoubleClick;n(r,Object(C.b)(o.props))},o.onSelect=function(r){if(o.isDisabled())return;var n=o.props.context.onNodeSelect;r.preventDefault(),n(r,Object(C.b)(o.props))},o.onCheck=function(r){if(o.isDisabled())return;var n=o.props,l=n.disableCheckbox,L=n.checked,B=o.props.context.onNodeCheck;if(!o.isCheckable()||l)return;r.preventDefault();var h=!L;B(r,Object(C.b)(o.props),h)},o.onMouseEnter=function(r){var n=o.props.context.onNodeMouseEnter;n(r,Object(C.b)(o.props))},o.onMouseLeave=function(r){var n=o.props.context.onNodeMouseLeave;n(r,Object(C.b)(o.props))},o.onContextMenu=function(r){var n=o.props.context.onNodeContextMenu;n(r,Object(C.b)(o.props))},o.onDragStart=function(r){var n=o.props.context.onNodeDragStart;r.stopPropagation(),o.setState({dragNodeHighlight:!0}),n(r,Object(E.a)(o));try{r.dataTransfer.setData("text/plain","")}catch(l){}},o.onDragEnter=function(r){var n=o.props.context.onNodeDragEnter;r.preventDefault(),r.stopPropagation(),n(r,Object(E.a)(o))},o.onDragOver=function(r){var n=o.props.context.onNodeDragOver;r.preventDefault(),r.stopPropagation(),n(r,Object(E.a)(o))},o.onDragLeave=function(r){var n=o.props.context.onNodeDragLeave;r.stopPropagation(),n(r,Object(E.a)(o))},o.onDragEnd=function(r){var n=o.props.context.onNodeDragEnd;r.stopPropagation(),o.setState({dragNodeHighlight:!1}),n(r,Object(E.a)(o))},o.onDrop=function(r){var n=o.props.context.onNodeDrop;r.preventDefault(),r.stopPropagation(),o.setState({dragNodeHighlight:!1}),n(r,Object(E.a)(o))},o.onExpand=function(r){var n=o.props.context.onNodeExpand;n(r,Object(C.b)(o.props))},o.setSelectHandle=function(r){o.selectHandle=r},o.getNodeState=function(){var r=o.props.expanded;return o.isLeaf()?null:r?c:a},o.hasChildren=function(){var r=o.props.eventKey,n=o.props.context.keyEntities,l=n[r]||{},L=l.children;return!!(L||[]).length},o.isLeaf=function(){var r=o.props,n=r.isLeaf,l=r.loaded,L=o.props.context.loadData,B=o.hasChildren();return n===!1?!1:n||!L&&!B||L&&l&&!B},o.isDisabled=function(){var r=o.props.disabled,n=o.props.context.disabled;return!!(n||r)},o.isCheckable=function(){var r=o.props.checkable,n=o.props.context.checkable;return!n||r===!1?!1:n},o.syncLoadData=function(r){var n=r.expanded,l=r.loading,L=r.loaded,B=o.props.context,h=B.loadData,I=B.onNodeLoad;if(l)return;h&&n&&!o.isLeaf()&&(!o.hasChildren()&&!L&&I(Object(C.b)(o.props)))},o.renderSwitcher=function(){var r=o.props,n=r.expanded,l=r.switcherIcon,L=o.props.context,B=L.prefixCls,h=L.switcherIcon,I=l||h;if(o.isLeaf())return p.createElement("span",{className:i()("".concat(B,"-switcher"),"".concat(B,"-switcher-noop"))},typeof I=="function"?I(Object(_.a)(Object(_.a)({},o.props),{},{isLeaf:!0})):I);var H=i()("".concat(B,"-switcher"),"".concat(B,"-switcher_").concat(n?c:a));return p.createElement("span",{onClick:o.onExpand,className:H},typeof I=="function"?I(Object(_.a)(Object(_.a)({},o.props),{},{isLeaf:!1})):I)},o.renderCheckbox=function(){var r=o.props,n=r.checked,l=r.halfChecked,L=r.disableCheckbox,B=o.props.context.prefixCls,h=o.isDisabled(),I=o.isCheckable();if(!I)return null;var H=typeof I!="boolean"?I:null;return p.createElement("span",{className:i()("".concat(B,"-checkbox"),n&&"".concat(B,"-checkbox-checked"),!n&&l&&"".concat(B,"-checkbox-indeterminate"),(h||L)&&"".concat(B,"-checkbox-disabled")),onClick:o.onCheck},H)},o.renderIcon=function(){var r=o.props.loading,n=o.props.context.prefixCls;return p.createElement("span",{className:i()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(o.getNodeState()||"docu"),r&&"".concat(n,"-icon_loading"))})},o.renderSelector=function(){var r=o.state.dragNodeHighlight,n=o.props,l=n.title,L=n.selected,B=n.icon,h=n.loading,I=n.data,H=o.props.context,z=H.prefixCls,Z=H.showIcon,Y=H.icon,G=H.draggable,ee=H.loadData,J=H.titleRender,oe=o.isDisabled(),se="".concat(z,"-node-content-wrapper"),Te;if(Z){var be=B||Y;Te=be?p.createElement("span",{className:i()("".concat(z,"-iconEle"),"".concat(z,"-icon__customize"))},typeof be=="function"?be(o.props):be):o.renderIcon()}else ee&&h&&(Te=o.renderIcon());var xe;typeof l=="function"?xe=l(I):J?xe=J(I):xe=l;var Oe=p.createElement("span",{className:"".concat(z,"-title")},xe);return p.createElement("span",{ref:o.setSelectHandle,title:typeof l=="string"?l:"",className:i()("".concat(se),"".concat(se,"-").concat(o.getNodeState()||"normal"),!oe&&(L||r)&&"".concat(z,"-node-selected"),!oe&&G&&"draggable"),draggable:!oe&&G||void 0,"aria-grabbed":!oe&&G||void 0,onMouseEnter:o.onMouseEnter,onMouseLeave:o.onMouseLeave,onContextMenu:o.onContextMenu,onClick:o.onSelectorClick,onDoubleClick:o.onSelectorDoubleClick,onDragStart:G?o.onDragStart:void 0},Te,Oe)},o}return Object(R.a)(b,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var r=this.props.selectable,n=this.props.context.selectable;return typeof r=="boolean"?r:n}},{key:"render",value:function(){var r,n=this.props,l=n.eventKey,L=n.className,B=n.style,h=n.dragOver,I=n.dragOverGapTop,H=n.dragOverGapBottom,z=n.isLeaf,Z=n.isStart,Y=n.isEnd,G=n.expanded,ee=n.selected,J=n.checked,oe=n.halfChecked,se=n.loading,Te=n.domRef,be=n.active,xe=n.onMouseMove,Oe=Object(N.a)(n,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ne=this.props.context,Le=Ne.prefixCls,Se=Ne.filterTreeNode,tt=Ne.draggable,Bt=Ne.keyEntities,De=this.isDisabled(),Qe=Object(O.f)(Oe),it=Bt[l]||{},Ae=it.level,re=Y[Y.length-1];return p.createElement("div",Object.assign({ref:Te,className:i()(L,"".concat(Le,"-treenode"),(r={},Object(X.a)(r,"".concat(Le,"-treenode-disabled"),De),Object(X.a)(r,"".concat(Le,"-treenode-switcher-").concat(G?"open":"close"),!z),Object(X.a)(r,"".concat(Le,"-treenode-checkbox-checked"),J),Object(X.a)(r,"".concat(Le,"-treenode-checkbox-indeterminate"),oe),Object(X.a)(r,"".concat(Le,"-treenode-selected"),ee),Object(X.a)(r,"".concat(Le,"-treenode-loading"),se),Object(X.a)(r,"".concat(Le,"-treenode-active"),be),Object(X.a)(r,"".concat(Le,"-treenode-leaf-last"),re),Object(X.a)(r,"drag-over",!De&&h),Object(X.a)(r,"drag-over-gap-top",!De&&I),Object(X.a)(r,"drag-over-gap-bottom",!De&&H),Object(X.a)(r,"filter-node",Se&&Se(Object(C.b)(this.props))),r)),style:B,onDragEnter:tt?this.onDragEnter:void 0,onDragOver:tt?this.onDragOver:void 0,onDragLeave:tt?this.onDragLeave:void 0,onDrop:tt?this.onDrop:void 0,onDragEnd:tt?this.onDragEnd:void 0,onMouseMove:xe},Qe),p.createElement(g,{prefixCls:Le,level:Ae,isStart:Z,isEnd:Y}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),b}(p.Component),y=function(M){return p.createElement(A.a.Consumer,null,function(b){return p.createElement(m,Object.assign({},M,{context:b}))})};y.displayName="TreeNode",y.defaultProps={title:u},y.isTreeNode=1;var T=pe.a=y},Xm8N:function(Xe,pe,W){"use strict";var X=W("2qtc"),N=W("kLXV"),_=W("k1fw"),Q=W("miYZ"),R=W("tsqr"),E=W("9og8"),S=W("PpiC"),s=W("WmNS"),p=W.n(s),v=W("q1tI"),i=W.n(v),A=W("ErOA"),O=W("Ty5D"),w=W("9kvl"),g=function(c){var a=c.shixunHomeworks,u=c.dispatch,m=Object(S.a)(c,["shixunHomeworks","dispatch"]),y=Object(O.i)();return i.a.createElement(N.a,{centered:!0,title:"\u63D0\u793A",visible:a.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(E.a)(p.a.mark(function T(){var x;return p.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,Object(A.a)("/api/myshixuns/".concat(a.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:y.coursesId}});case 2:x=b.sent,x.shixun_identifier&&(R.b.success("\u64CD\u4F5C\u6210\u529F"),u({type:"shixunHomeworks/setActionTabs",payload:{}}),u({type:"shixunHomeworks/getWorkList",payload:Object(_.a)({},a.actionTabs.params)}));case 4:case"end":return b.stop()}},T)})),onCancel:function(){u({type:"shixunHomeworks/setActionTabs",payload:{}})}},i.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),i.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};pe.a=Object(w.a)(function(C){var c=C.shixunHomeworks;return{shixunHomeworks:c}})(g)},Xmg4:function(Xe,pe,W){var X=W("bYtY"),N=W("LPTA"),_=N.devicePixelRatio,Q=W("K2GJ"),R=W("3C/r");function E(){return!1}function S(v,i,A){var O=X.createCanvas(),w=i.getWidth(),g=i.getHeight(),C=O.style;return C&&(C.position="absolute",C.left=0,C.top=0,C.width=w+"px",C.height=g+"px",O.setAttribute("data-zr-dom-id",v)),O.width=w*A,O.height=g*A,O}var s=function(v,i,A){var O;A=A||_,typeof v=="string"?O=S(v,i,A):X.isObject(v)&&(O=v,v=O.id),this.id=v,this.dom=O;var w=O.style;w&&(O.onselectstart=E,w["-webkit-user-select"]="none",w["user-select"]="none",w["-webkit-touch-callout"]="none",w["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",w.padding=0,w.margin=0,w["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=i,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=A};s.prototype={constructor:s,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var v=this.dpr;this.domBack=S("back-"+this.id,this.painter,v),this.ctxBack=this.domBack.getContext("2d"),v!==1&&this.ctxBack.scale(v,v)},resize:function(v,i){var A=this.dpr,O=this.dom,w=O.style,g=this.domBack;w&&(w.width=v+"px",w.height=i+"px"),O.width=v*A,O.height=i*A,g&&(g.width=v*A,g.height=i*A,A!==1&&this.ctxBack.scale(A,A))},clear:function(v,i){var A=this.dom,O=this.ctx,w=A.width,g=A.height,i=i||this.clearColor,C=this.motionBlur&&!v,c=this.lastFrameAlpha,a=this.dpr;if(C&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(A,0,0,w/a,g/a)),O.clearRect(0,0,w,g),i&&i!=="transparent"){var u;i.colorStops?(u=i.__canvasGradient||Q.getGradient(O,i,{x:0,y:0,width:w,height:g}),i.__canvasGradient=u):i.image&&(u=R.prototype.getCanvasPattern.call(i,O)),O.save(),O.fillStyle=u||i,O.fillRect(0,0,w,g),O.restore()}if(C){var m=this.domBack;O.save(),O.globalAlpha=c,O.drawImage(m,0,0,w,g),O.restore()}}};var p=s;Xe.exports=p},Xnb7:function(Xe,pe,W){var X=W("1RvN"),N=new X(50);function _(S){if(typeof S=="string"){var s=N.get(S);return s&&s.image}else return S}function Q(S,s,p,v,i){if(S)if(typeof S=="string"){if(s&&s.__zrImageSrc===S||!p)return s;var A=N.get(S),O={hostEl:p,cb:v,cbPayload:i};return A?(s=A.image,!E(s)&&A.pending.push(O)):(s=new Image,s.onload=s.onerror=R,N.put(S,s.__cachedImgObj={image:s,pending:[O]}),s.src=s.__zrImageSrc=S),s}else return S;else return s}function R(){var S=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var s=0;s<S.pending.length;s++){var p=S.pending[s],v=p.cb;v&&v(this,p.cbPayload),p.hostEl.dirty()}S.pending.length=0}function E(S){return S&&S.width&&S.height}pe.findExistImage=_,pe.createOrUpdateImage=Q,pe.isImageReady=E},Y1PL:function(Xe,pe,W){"use strict";W.r(pe),W.d(pe,"ResizableTextArea",function(){return oe});var X=W("wx14"),N=W("1OyB"),_=W("vuIU"),Q=W("Ji7U"),R=W("LK+K"),E=W("q1tI"),S=W("VTBJ"),s=W("rePB"),p=W("Zm9Q"),v=W("Kwbf"),i=W("c+Xe"),A=W("m+aA"),O=W("bdgK"),w=new Map;function g(be){be.forEach(function(xe){var Oe,Ne=xe.target;(Oe=w.get(Ne))===null||Oe===void 0||Oe.forEach(function(Le){return Le(Ne)})})}var C=new O.default(g),c=null,a=null;function u(be,xe){w.has(be)||(w.set(be,new Set),C.observe(be)),w.get(be).add(xe)}function m(be,xe){w.has(be)&&(w.get(be).delete(xe),w.get(be).size||(C.unobserve(be),w.delete(be)))}var y=function(be){Object(Q.a)(Oe,be);var xe=Object(R.a)(Oe);function Oe(){return Object(N.a)(this,Oe),xe.apply(this,arguments)}return Object(_.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(E.Component),T=E.createContext(null);function x(be){var xe=be.children,Oe=be.onBatchResize,Ne=E.useRef(0),Le=E.useRef([]),Se=E.useContext(T),tt=E.useCallback(function(Bt,De,Qe){Ne.current+=1;var it=Ne.current;Le.current.push({size:Bt,element:De,data:Qe}),Promise.resolve().then(function(){it===Ne.current&&(Oe==null||Oe(Le.current),Le.current=[])}),Se==null||Se(Bt,De,Qe)},[Oe,Se]);return E.createElement(T.Provider,{value:tt},xe)}function M(be){var xe=be.children,Oe=be.disabled,Ne=E.useRef(null),Le=E.useRef(null),Se=E.useContext(T),tt=E.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Bt=E.isValidElement(xe)&&Object(i.c)(xe),De=Bt?xe.ref:null,Qe=E.useMemo(function(){return Object(i.a)(De,Ne)},[De,Ne]),it=E.useRef(be);it.current=be;var Ae=E.useCallback(function(re){var ie=it.current,ce=ie.onResize,Be=ie.data,Re=re.getBoundingClientRect(),ke=Re.width,ft=Re.height,pt=re.offsetWidth,bt=re.offsetHeight,yt=Math.floor(ke),_t=Math.floor(ft);if(tt.current.width!==yt||tt.current.height!==_t||tt.current.offsetWidth!==pt||tt.current.offsetHeight!==bt){var It={width:yt,height:_t,offsetWidth:pt,offsetHeight:bt};tt.current=It;var He=pt===Math.round(ke)?ke:pt,Pe=bt===Math.round(ft)?ft:bt,At=Object(S.a)(Object(S.a)({},It),{},{offsetWidth:He,offsetHeight:Pe});Se==null||Se(At,re,Be),ce&&Promise.resolve().then(function(){ce(At,re)})}},[]);return E.useEffect(function(){var re=Object(A.a)(Ne.current)||Object(A.a)(Le.current);return re&&!Oe&&u(re,Ae),function(){return m(re,Ae)}},[Ne.current,Oe]),E.createElement(y,{ref:Le},Bt?E.cloneElement(xe,{ref:Qe}):xe)}var b="rc-observer-key";function o(be){var xe=be.children,Oe=Object(p.a)(xe);return Oe.map(function(Ne,Le){var Se=(Ne==null?void 0:Ne.key)||"".concat(b,"-").concat(Le);return E.createElement(M,Object(X.a)({},be,{key:Se}),Ne)})}o.Collection=x;var r=o,n=W("bT9E"),l=W("TSYQ"),L=W.n(l),B=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,h=["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"],I={},H;function z(be){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=be.getAttribute("id")||be.getAttribute("data-reactid")||be.getAttribute("name");if(xe&&I[Oe])return I[Oe];var Ne=window.getComputedStyle(be),Le=Ne.getPropertyValue("box-sizing")||Ne.getPropertyValue("-moz-box-sizing")||Ne.getPropertyValue("-webkit-box-sizing"),Se=parseFloat(Ne.getPropertyValue("padding-bottom"))+parseFloat(Ne.getPropertyValue("padding-top")),tt=parseFloat(Ne.getPropertyValue("border-bottom-width"))+parseFloat(Ne.getPropertyValue("border-top-width")),Bt=h.map(function(Qe){return"".concat(Qe,":").concat(Ne.getPropertyValue(Qe))}).join(";"),De={sizingStyle:Bt,paddingSize:Se,borderSize:tt,boxSizing:Le};return xe&&Oe&&(I[Oe]=De),De}function Z(be){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),be.getAttribute("wrap")?H.setAttribute("wrap",be.getAttribute("wrap")):H.removeAttribute("wrap");var Le=z(be,xe),Se=Le.paddingSize,tt=Le.borderSize,Bt=Le.boxSizing,De=Le.sizingStyle;H.setAttribute("style","".concat(De,";").concat(B)),H.value=be.value||be.placeholder||"";var Qe=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,Ae=H.scrollHeight,re;if(Bt==="border-box"?Ae+=tt:Bt==="content-box"&&(Ae-=Se),Oe!==null||Ne!==null){H.value=" ";var ie=H.scrollHeight-Se;Oe!==null&&(Qe=ie*Oe,Bt==="border-box"&&(Qe=Qe+Se+tt),Ae=Math.max(Qe,Ae)),Ne!==null&&(it=ie*Ne,Bt==="border-box"&&(it=it+Se+tt),re=Ae>it?"":"hidden",Ae=Math.min(it,Ae))}return{height:Ae,minHeight:Qe,maxHeight:it,overflowY:re,resize:"none"}}var Y=W("Gytx"),G=W.n(Y),ee;(function(be){be[be.NONE=0]="NONE",be[be.RESIZING=1]="RESIZING",be[be.RESIZED=2]="RESIZED"})(ee||(ee={}));var J=function(be){Object(Q.a)(Oe,be);var xe=Object(R.a)(Oe);function Oe(Ne){var Le;return Object(N.a)(this,Oe),Le=xe.call(this,Ne),Le.nextFrameActionId=void 0,Le.resizeFrameId=void 0,Le.textArea=void 0,Le.saveTextArea=function(Se){Le.textArea=Se},Le.handleResize=function(Se){var tt=Le.state.resizeStatus,Bt=Le.props,De=Bt.autoSize,Qe=Bt.onResize;if(tt!==ee.NONE)return;typeof Qe=="function"&&Qe(Se),De&&Le.resizeOnNextFrame()},Le.resizeOnNextFrame=function(){cancelAnimationFrame(Le.nextFrameActionId),Le.nextFrameActionId=requestAnimationFrame(Le.resizeTextarea)},Le.resizeTextarea=function(){var Se=Le.props.autoSize;if(!Se||!Le.textArea)return;var tt=Se.minRows,Bt=Se.maxRows,De=Z(Le.textArea,!1,tt,Bt);Le.setState({textareaStyles:De,resizeStatus:ee.RESIZING},function(){cancelAnimationFrame(Le.resizeFrameId),Le.resizeFrameId=requestAnimationFrame(function(){Le.setState({resizeStatus:ee.RESIZED},function(){Le.resizeFrameId=requestAnimationFrame(function(){Le.setState({resizeStatus:ee.NONE}),Le.fixFirefoxAutoScroll()})})})})},Le.renderTextArea=function(){var Se=Le.props,tt=Se.prefixCls,Bt=tt===void 0?"rc-textarea":tt,De=Se.autoSize,Qe=Se.onResize,it=Se.className,Ae=Se.disabled,re=Le.state,ie=re.textareaStyles,ce=re.resizeStatus,Be=Object(n.a)(Le.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Re=L()(Bt,it,Object(s.a)({},"".concat(Bt,"-disabled"),Ae));"value"in Be&&(Be.value=Be.value||"");var ke=Object(S.a)(Object(S.a)(Object(S.a)({},Le.props.style),ie),ce===ee.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return E.createElement(r,{onResize:Le.handleResize,disabled:!(De||Qe)},E.createElement("textarea",Object(X.a)({},Be,{className:Re,style:ke,ref:Le.saveTextArea})))},Le.state={textareaStyles:{},resizeStatus:ee.NONE},Le}return Object(_.a)(Oe,[{key:"componentDidUpdate",value:function(Le){(Le.value!==this.props.value||!G()(Le.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 Le=this.textArea.selectionStart,Se=this.textArea.selectionEnd;this.textArea.setSelectionRange(Le,Se)}}catch(tt){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(E.Component),oe=J,se=function(be){Object(Q.a)(Oe,be);var xe=Object(R.a)(Oe);function Oe(Ne){var Le;Object(N.a)(this,Oe),Le=xe.call(this,Ne),Le.resizableTextArea=void 0,Le.focus=function(){Le.resizableTextArea.textArea.focus()},Le.saveTextArea=function(tt){Le.resizableTextArea=tt},Le.handleChange=function(tt){var Bt=Le.props.onChange;Le.setValue(tt.target.value,function(){Le.resizableTextArea.resizeTextarea()}),Bt&&Bt(tt)},Le.handleKeyDown=function(tt){var Bt=Le.props,De=Bt.onPressEnter,Qe=Bt.onKeyDown;tt.keyCode===13&&De&&De(tt),Qe&&Qe(tt)};var Se=typeof Ne.value=="undefined"||Ne.value===null?Ne.defaultValue:Ne.value;return Le.state={value:Se},Le}return Object(_.a)(Oe,[{key:"setValue",value:function(Le,Se){"value"in this.props||this.setState({value:Le},Se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return E.createElement(oe,Object(X.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Le){return"value"in Le?{value:Le.value}:null}}]),Oe}(E.Component),Te=pe.default=se},YH21:function(Xe,pe,W){var X=W("H6uX");pe.Dispatcher=X;var N=W("ItGF"),_=W("Ze12"),Q=_.isCanvasEl,R=_.transformCoordWithViewport,E=typeof window!="undefined"&&!!window.addEventListener,S=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,s=[];function p(a,u,m,y){return m=m||{},y||!N.canvasSupported?v(a,u,m):N.browser.firefox&&u.layerX!=null&&u.layerX!==u.offsetX?(m.zrX=u.layerX,m.zrY=u.layerY):u.offsetX!=null?(m.zrX=u.offsetX,m.zrY=u.offsetY):v(a,u,m),m}function v(a,u,m){if(N.domSupported&&a.getBoundingClientRect){var y=u.clientX,T=u.clientY;if(Q(a)){var x=a.getBoundingClientRect();m.zrX=y-x.left,m.zrY=T-x.top;return}else if(R(s,a,y,T)){m.zrX=s[0],m.zrY=s[1];return}}m.zrX=m.zrY=0}function i(a){return a||window.event}function A(a,u,m){if(u=i(u),u.zrX!=null)return u;var y=u.type,T=y&&y.indexOf("touch")>=0;if(!T)p(a,u,u,m),u.zrDelta=u.wheelDelta?u.wheelDelta/120:-(u.detail||0)/3;else{var x=y!=="touchend"?u.targetTouches[0]:u.changedTouches[0];x&&p(a,x,u,m)}var M=u.button;return u.which==null&&M!==void 0&&S.test(u.type)&&(u.which=M&1?1:M&2?3:M&4?2:0),u}function O(a,u,m,y){E?a.addEventListener(u,m,y):a.attachEvent("on"+u,m)}function w(a,u,m,y){E?a.removeEventListener(u,m,y):a.detachEvent("on"+u,m)}var g=E?function(a){a.preventDefault(),a.stopPropagation(),a.cancelBubble=!0}:function(a){a.returnValue=!1,a.cancelBubble=!0};function C(a){return a.which===2||a.which===3}function c(a){return a.which>1}pe.clientToLocal=p,pe.getNativeEvent=i,pe.normalizeEvent=A,pe.addEventListener=O,pe.removeEventListener=w,pe.stop=g,pe.isMiddleOrRightButtonOnMouseUpDown=C,pe.notLeftMouse=c},YgsL:function(Xe,pe,W){var X=W("QBsz"),N=X.distance;function _(R,E,S,s,p,v,i){var A=(S-R)*.5,O=(s-E)*.5;return(2*(E-S)+A+O)*i+(-3*(E-S)-2*A-O)*v+A*p+E}function Q(R,E){for(var S=R.length,s=[],p=0,v=1;v<S;v++)p+=N(R[v-1],R[v]);var i=p/2;i=i<S?S:i;for(var v=0;v<i;v++){var A=v/(i-1)*(E?S:S-1),O=Math.floor(A),w=A-O,g,C=R[O%S],c,a;E?(g=R[(O-1+S)%S],c=R[(O+1)%S],a=R[(O+2)%S]):(g=R[O===0?O:O-1],c=R[O>S-2?S-1:O+1],a=R[O>S-3?S-1:O+2]);var u=w*w,m=w*u;s.push([_(g[0],C[0],c[0],a[0],w,u,m),_(g[1],C[1],c[1],a[1],w,u,m)])}return s}Xe.exports=Q},ZW9T:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return y});var X=W("k1fw"),N=W("miYZ"),_=W("tsqr"),Q=W("rAM+"),R=W("tJVT"),E=W("PpiC"),S=W("q1tI"),s=W.n(S),p=W("bdgK");function v(T,x,M,b,o){var r=x.getWordUntilPosition(M),n={startLineNumber:M.lineNumber,endLineNumber:M.lineNumber,startColumn:r.startColumn,endColumn:r.endColumn},l=b.map(function(L){return{label:L,kind:T.languages.CompletionItemKind.Keyword,insertText:L,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:n}});return o.map(function(L){l.push(Object(X.a)(Object(X.a)({},L),{},{range:n}))}),l}var i=function(T){var x={label:"ifelse",kind:T.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet},M=["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(n,l){var L=v(T,n,l,M,[x]);return{suggestions:L}}});var b=["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(n,l){var L=[{label:"print",kind:T.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}],B=v(T,n,l,b,L);return{suggestions:B}}});var o=["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,l){var L=[x,{label:"main",kind:T.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:T.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}],B=v(T,n,l,o,L);return{suggestions:B}}})},A="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",O=W("LvDl");function w(T){return/^\d+$/.test(T)?"".concat(T,"px"):T}function g(){}var C=!1,c={"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"};function a(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=T;if(Array.isArray(T)){for(var M=0;M<T.length;M++){var b=c[T[M]];if(b)return b}return x[0]}return c[x]||x}var u=null,m=pe.b=function(T){var x=T.width,M=x===void 0?"100%":x,b=T.height,o=b===void 0?"100%":b,r=T.value,n=T.language,l=n===void 0?"javascript":n,L=T.style,B=L===void 0?{}:L,h=T.options,I=h===void 0?{}:h,H=T.overrideServices,z=H===void 0?{}:H,Z=T.theme,Y=Z===void 0?"vs-dark":Z,G=T.onEditBlur,ee=T.onSave,J=T.autoHeight,oe=J===void 0?!1:J,se=T.forbidCopy,Te=se===void 0?!1:se,be=T.onChange,xe=be===void 0?g:be,Oe=T.editorDidMount,Ne=Oe===void 0?g:Oe,Le=T.onFocus,Se=Le===void 0?g:Le,tt=T.filename,Bt=tt===void 0?"educoder.txt":tt,De=Object(E.a)(T,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Qe=Object(S.useRef)(),it=Object(S.useRef)({}),Ae=Object(S.useRef)(),re=Object(S.useRef)(!1),ie=Object(S.useRef)(),ce=Object(S.useState)(!1),Be=Object(R.a)(ce,2),Re=Be[0],ke=Be[1];function ft(){var ge;return Qe.current&&(ge=new p.default(function(we){var ze=Object(Q.a)(we),Je;try{for(ze.s();!(Je=ze.n()).done;){var Et=Je.value;(Et.target.offsetHeight>0||Et.target.offsetWidth>0)&&it.current.instance.layout()}}catch(Ft){ze.e(Ft)}finally{ze.f()}}),ge.observe(Qe.current)),ge}function pt(){_.b.warn(decodeURIComponent(A))}var bt=function(){var we=it.current.instance;if(r!=null&&we&&Re){var ze=we.getModel();ze&&r!==ze.getValue()&&(C=!0,ze.setValue(r),we.layout(),C=!1)}};Object(S.useEffect)(function(){Ae.current&&clearTimeout(Ae.current),Ae.current=setTimeout(function(){bt()},500)},[r,Re,it.current]);function yt(){var ge=it.current.instance;if(ge){var we=ge.getSelection(),ze=it.current.pastePos||{},Je=new u.Range(ze.startLineNumber||we.endLineNumber,ze.startColumn||we.endColumn,ze.endLineNumber||we.endLineNumber,ze.endColumn||we.endColumn);setTimeout(function(){ge.executeEdits("",[{range:Je,text:""}])},300)}}function _t(ge){(window.navigator.platform.match("Mac")?ge.metaKey:ge.ctrlKey)&&ge.keyCode==83&&(ge.preventDefault(),ee())}var It=function(){if(oe&&it.current.instance){var we=it.current.instance.getContentHeight();me(we<o?o:we)}else me(o)};function He(ge){var we=document.createEvent("MouseEvents");we.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ge.dispatchEvent(we)}function Pe(ge,we){var ze=window.URL||window.webkitURL||window,Je=new Blob([we]),Et=document.createElementNS("http://www.w3.org/1999/xhtml","a");Et.href=ze.createObjectURL(Je),Et.download=ge,He(Et)}Object(S.useEffect)(function(){It()},[It]),Object(S.useEffect)(function(){Qe.current&&!Re&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(ge){try{u=ge,it.current.instance=u.editor.create(Qe.current,{value:r,language:a(l),theme:Y,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},z);var we=it.current.instance;if(Ne(we,u),setTimeout(function(){It(),it.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Pe(Bt||"educoder.txt",we.getValue())}})},500),it.current.subscription=we.onDidChangeModelContent(function(Je){re.current?clearTimeout(ie.current):(It(),xe(we.getValue(),Je)),ie.current=setTimeout(function(){re.current=!1},500)}),window.Monaco||i(u),Te&&(we.addCommand(u.KeyMod.CtrlCmd|u.KeyMod.Shift|u.KeyCode.KEY_V,function(){return pt(),null}),we.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_C,function(){return pt(),null})),window.Monaco=u,G&&we.onDidBlurEditorWidget(function(){G(we.getValue())}),Se&&we.onDidFocusEditorText(function(){Se(we.getValue())}),Te){we.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_V,function(){return pt(),null}),we.onDidPaste(function(Je){it.current.pastePos=Je});try{window.addEventListener("paste",yt)}catch(Je){}}var ze=ft();return ke(!0),function(){var Je=it.current.instance;Je.dispose();var Et=Je.getModel();Et&&Et.dispose(),it.current.subscription&&it.current.subscription.dispose(),Te&&window.removeEventListener("paste",yt),ze.unobserve(Qe.current)}}catch(Je){}})},[]),Object(S.useEffect)(function(){var ge=it.current.instance;if(ge&&Re)return document.addEventListener("keydown",_t,!1),function(){document.removeEventListener("keydown",_t)}},[ee,Re]),Object(S.useEffect)(function(){var ge=it.current.instance;if(ge&&Re){var we=a(l);u.editor.setModelLanguage(ge.getModel(),we),console.log("language:",l,ge.getModel(),we)}},[l,Re]),Object(S.useEffect)(function(){var ge=it.current.instance;ge&&Re&&u.editor.setTheme(Y)},[Y,Re]),Object(S.useEffect)(function(){var ge=it.current.instance;ge&&Re&&(ge.updateOptions(Object(X.a)({},I)),setTimeout(function(){ge.getModel().updateOptions(Object(X.a)({},I))},200))},[JSON.stringify(I),Re]),Object(S.useEffect)(function(){var ge=it.current.instance;ge&&Re&&ge.layout()},[M,o,Re]);var At=Object(S.useState)(w(M)),mt=Object(R.a)(At,2),Ze=mt[0],ut=mt[1],Ke=Object(S.useState)(w(o)),Ie=Object(R.a)(Ke,2),Me=Ie[0],me=Ie[1],Ee=Object(X.a)(Object(X.a)({},B),{},{width:Ze,height:Me});return s.a.createElement("div",{className:"my-monaco-editor",ref:Qe,style:Ee})};function y(T){var x=T.width,M=x===void 0?"100%":x,b=T.height,o=b===void 0?"100%":b,r=T.original,n=T.modified,l=T.language,L=T.options,B=L===void 0?{}:L,h=Object(S.useRef)(),I=Object(S.useState)(null),H=Object(R.a)(I,2),z=H[0],Z=H[1];function Y(oe){var se;return h.current&&(se=new p.default(function(Te){var be=Object(Q.a)(Te),xe;try{for(be.s();!(xe=be.n()).done;){var Oe=xe.value;(Oe.target.offsetHeight>0||Oe.target.offsetWidth>0)&&oe.layout()}}catch(Ne){be.e(Ne)}finally{be.f()}}),se.observe(h.current)),se}Object(S.useEffect)(function(){h.current&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(oe){u=oe;var se=u.editor.createDiffEditor(h.current,Object(X.a)(Object(X.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},B),{},{wordWrap:!0}));Z(se);var Te=Y(se);return function(){se.dispose();var be=se.getModel();be&&be.dispose(),Te.unobserve(h.current)}})},[]),Object(S.useEffect)(function(){z&&z.setModel({original:u.editor.createModel(r,l),modified:u.editor.createModel(n,l)})},[r,n,l,z]);var G=w(M),ee=w(o),J={width:G,height:ee};return s.a.createElement("div",{className:"my-diff-editor",ref:h,style:J})}},Ze12:function(Xe,pe,W){var X=W("ItGF"),N=W("hOwI"),_=N.buildTransformer,Q="___zrEVENTSAVED",R=[];function E(i,A,O,w,g){return S(R,A,w,g,!0)&&S(i,O,R[0],R[1])}function S(i,A,O,w,g){if(A.getBoundingClientRect&&X.domSupported&&!v(A)){var C=A[Q]||(A[Q]={}),c=s(A,C),a=p(c,C,g);if(a)return a(i,O,w),!0}return!1}function s(i,A){var O=A.markers;if(O)return O;O=A.markers=[];for(var w=["left","right"],g=["top","bottom"],C=0;C<4;C++){var c=document.createElement("div"),a=c.style,u=C%2,m=(C>>1)%2;a.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",w[u]+":0",g[m]+":0",w[1-u]+":auto",g[1-m]+":auto",""].join("!important;"),i.appendChild(c),O.push(c)}return O}function p(i,A,O){for(var w=O?"invTrans":"trans",g=A[w],C=A.srcCoords,c=!0,a=[],u=[],m=0;m<4;m++){var y=i[m].getBoundingClientRect(),T=2*m,x=y.left,M=y.top;a.push(x,M),c=c&&C&&x===C[T]&&M===C[T+1],u.push(i[m].offsetLeft,i[m].offsetTop)}return c&&g?g:(A.srcCoords=a,A[w]=O?_(u,a):_(a,u))}function v(i){return i.nodeName.toUpperCase()==="CANVAS"}pe.transformLocalCoord=E,pe.transformCoordWithViewport=S,pe.isCanvasEl=v},ZpRC:function(Xe,pe,W){"use strict";function X(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function N(i,A){return(!A||i!=="hidden")&&i!=="visible"&&i!=="clip"}function _(i,A){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var O=getComputedStyle(i,null);return N(O.overflowY,A)||N(O.overflowX,A)||function(w){var g=function(C){if(!C.ownerDocument||!C.ownerDocument.defaultView)return null;try{return C.ownerDocument.defaultView.frameElement}catch(c){return null}}(w);return!!g&&(g.clientHeight<w.scrollHeight||g.clientWidth<w.scrollWidth)}(i)}return!1}function Q(i,A,O,w,g,C,c,a){return C<i&&c>A||C>i&&c<A?0:C<=i&&a<=O||c>=A&&a>=O?C-i-w:c>A&&a<O||C<i&&a>O?c-A+g:0}var R=function(i,A){var O=window,w=A.scrollMode,g=A.block,C=A.inline,c=A.boundary,a=A.skipOverflowHiddenElements,u=typeof c=="function"?c:function(ie){return ie!==c};if(!X(i))throw new TypeError("Invalid target");for(var m=document.scrollingElement||document.documentElement,y=[],T=i;X(T)&&u(T);){if((T=T.parentElement)===m){y.push(T);break}T!=null&&T===document.body&&_(T)&&!_(document.documentElement)||T!=null&&_(T,a)&&y.push(T)}for(var x=O.visualViewport?O.visualViewport.width:innerWidth,M=O.visualViewport?O.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,o=window.scrollY||pageYOffset,r=i.getBoundingClientRect(),n=r.height,l=r.width,L=r.top,B=r.right,h=r.bottom,I=r.left,H=g==="start"||g==="nearest"?L:g==="end"?h:L+n/2,z=C==="center"?I+l/2:C==="end"?B:I,Z=[],Y=0;Y<y.length;Y++){var G=y[Y],ee=G.getBoundingClientRect(),J=ee.height,oe=ee.width,se=ee.top,Te=ee.right,be=ee.bottom,xe=ee.left;if(w==="if-needed"&&L>=0&&I>=0&&h<=M&&B<=x&&L>=se&&h<=be&&I>=xe&&B<=Te)return Z;var Oe=getComputedStyle(G),Ne=parseInt(Oe.borderLeftWidth,10),Le=parseInt(Oe.borderTopWidth,10),Se=parseInt(Oe.borderRightWidth,10),tt=parseInt(Oe.borderBottomWidth,10),Bt=0,De=0,Qe="offsetWidth"in G?G.offsetWidth-G.clientWidth-Ne-Se:0,it="offsetHeight"in G?G.offsetHeight-G.clientHeight-Le-tt:0;if(m===G)Bt=g==="start"?H:g==="end"?H-M:g==="nearest"?Q(o,o+M,M,Le,tt,o+H,o+H+n,n):H-M/2,De=C==="start"?z:C==="center"?z-x/2:C==="end"?z-x:Q(b,b+x,x,Ne,Se,b+z,b+z+l,l),Bt=Math.max(0,Bt+o),De=Math.max(0,De+b);else{Bt=g==="start"?H-se-Le:g==="end"?H-be+tt+it:g==="nearest"?Q(se,be,J,Le,tt+it,H,H+n,n):H-(se+J/2)+it/2,De=C==="start"?z-xe-Ne:C==="center"?z-(xe+oe/2)+Qe/2:C==="end"?z-Te+Se+Qe:Q(xe,Te,oe,Ne,Se+Qe,z,z+l,l);var Ae=G.scrollLeft,re=G.scrollTop;H+=re-(Bt=Math.max(0,Math.min(re+Bt,G.scrollHeight-J+it))),z+=Ae-(De=Math.max(0,Math.min(Ae+De,G.scrollWidth-oe+Qe)))}Z.push({el:G,top:Bt,left:De})}return Z};function E(i){return i===Object(i)&&Object.keys(i).length!==0}function S(i,A){A===void 0&&(A="auto");var O="scrollBehavior"in document.body.style;i.forEach(function(w){var g=w.el,C=w.top,c=w.left;g.scroll&&O?g.scroll({top:C,left:c,behavior:A}):(g.scrollTop=C,g.scrollLeft=c)})}function s(i){return i===!1?{block:"end",inline:"nearest"}:E(i)?i:{block:"start",inline:"nearest"}}function p(i,A){var O=!i.ownerDocument.documentElement.contains(i);if(E(A)&&typeof A.behavior=="function")return A.behavior(O?[]:R(i,A));if(O)return;var w=s(A);return S(R(i,w),w.behavior)}var v=pe.a=p},aKvl:function(Xe,pe,W){var X=W("Sj9i"),N=X.quadraticProjectPoint;function _(Q,R,E,S,s,p,v,i,A){if(v===0)return!1;var O=v;if(A>R+O&&A>S+O&&A>p+O||A<R-O&&A<S-O&&A<p-O||i>Q+O&&i>E+O&&i>s+O||i<Q-O&&i<E-O&&i<s-O)return!1;var w=N(Q,R,E,S,s,p,i,A,null);return w<=O/2}pe.containStroke=_},aRTE:function(Xe,pe){Xe.exports={L:1,M:0,Q:3,H:2}},aX58:function(Xe,pe,W){var X=W("3gBT"),N=W("ItGF"),_=W("bYtY"),Q=W("0s+r"),R=W("r6Bn"),E=W("7SHv"),S=W("MKOG"),s=W("zarK");/*!
|
|
* ZRender, a high performance 2d drawing library.
|
|
*
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
* All rights reserved.
|
|
*
|
|
* LICENSE
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
*/var p=!N.canvasSupported,v={canvas:E},i={},A="4.3.1";function O(u,m){var y=new a(X(),u,m);return i[y.id]=y,y}function w(u){if(u)u.dispose();else{for(var m in i)i.hasOwnProperty(m)&&i[m].dispose();i={}}return this}function g(u){return i[u]}function C(u,m){v[u]=m}function c(u){delete i[u]}var a=function(u,m,y){y=y||{},this.dom=m,this.id=u;var T=this,x=new R,M=y.renderer;if(p){if(!v.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");M="vml"}else(!M||!v[M])&&(M="canvas");var b=new v[M](m,x,y,u);this.storage=x,this.painter=b;var o=!N.node&&!N.worker?new s(b.getViewportRoot(),b.root):null;this.handler=new Q(x,b,o,b.root),this.animation=new S({stage:{update:_.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var r=x.delFromStorage,n=x.addToStorage;x.delFromStorage=function(l){r.call(x,l),l&&l.removeSelfFromZr(T)},x.addToStorage=function(l){n.call(x,l),l.addSelfToZr(T)}};a.prototype={constructor:a,getId:function(){return this.id},add:function(u){this.storage.addRoot(u),this._needsRefresh=!0},remove:function(u){this.storage.delRoot(u),this._needsRefresh=!0},configLayer:function(u,m){this.painter.configLayer&&this.painter.configLayer(u,m),this._needsRefresh=!0},setBackgroundColor:function(u){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(u),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var u;this._needsRefresh&&(u=!0,this.refreshImmediately()),this._needsRefreshHover&&(u=!0,this.refreshHoverImmediately()),u&&this.trigger("rendered")},addHover:function(u,m){if(this.painter.addHover){var y=this.painter.addHover(u,m);return this.refreshHover(),y}},removeHover:function(u){this.painter.removeHover&&(this.painter.removeHover(u),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(u){u=u||{},this.painter.resize(u.width,u.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(u,m){return this.painter.pathToImage(u,m)},setCursorStyle:function(u){this.handler.setCursorStyle(u)},findHover:function(u,m){return this.handler.findHover(u,m)},on:function(u,m,y){this.handler.on(u,m,y)},off:function(u,m){this.handler.off(u,m)},trigger:function(u,m){this.handler.trigger(u,m)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,c(this.id)}},pe.version=A,pe.init=O,pe.dispose=w,pe.getInstance=g,pe.registerPainter=C},bT9E:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return N});var X=W("VTBJ");function N(_,Q){var R=Object(X.a)({},_);return Array.isArray(Q)&&Q.forEach(function(E){delete R[E]}),R}},bYtY:function(Xe,pe){var W={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},X={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},N=Object.prototype.toString,_=Array.prototype,Q=_.forEach,R=_.filter,E=_.slice,S=_.map,s=_.reduce,p={};function v(De,Qe){De==="createCanvas"&&(c=null),p[De]=Qe}function i(De){if(De==null||typeof De!="object")return De;var Qe=De,it=N.call(De);if(it==="[object Array]"){if(!Ne(De)){Qe=[];for(var Ae=0,re=De.length;Ae<re;Ae++)Qe[Ae]=i(De[Ae])}}else if(X[it]){if(!Ne(De)){var ie=De.constructor;if(De.constructor.from)Qe=ie.from(De);else{Qe=new ie(De.length);for(var Ae=0,re=De.length;Ae<re;Ae++)Qe[Ae]=i(De[Ae])}}}else if(!W[it]&&!Ne(De)&&!Z(De)){Qe={};for(var ce in De)De.hasOwnProperty(ce)&&(Qe[ce]=i(De[ce]))}return Qe}function A(De,Qe,it){if(!I(Qe)||!I(De))return it?i(Qe):De;for(var Ae in Qe)if(Qe.hasOwnProperty(Ae)){var re=De[Ae],ie=Qe[Ae];I(ie)&&I(re)&&!L(ie)&&!L(re)&&!Z(ie)&&!Z(re)&&!H(ie)&&!H(re)&&!Ne(ie)&&!Ne(re)?A(re,ie,it):(it||!(Ae in De))&&(De[Ae]=i(Qe[Ae],!0))}return De}function O(De,Qe){for(var it=De[0],Ae=1,re=De.length;Ae<re;Ae++)it=A(it,De[Ae],Qe);return it}function w(De,Qe){for(var it in Qe)Qe.hasOwnProperty(it)&&(De[it]=Qe[it]);return De}function g(De,Qe,it){for(var Ae in Qe)Qe.hasOwnProperty(Ae)&&(it?Qe[Ae]!=null:De[Ae]==null)&&(De[Ae]=Qe[Ae]);return De}var C=function(){return p.createCanvas()};p.createCanvas=function(){return document.createElement("canvas")};var c;function a(){return c||(c=C().getContext("2d")),c}function u(De,Qe){if(De){if(De.indexOf)return De.indexOf(Qe);for(var it=0,Ae=De.length;it<Ae;it++)if(De[it]===Qe)return it}return-1}function m(De,Qe){var it=De.prototype;function Ae(){}Ae.prototype=Qe.prototype,De.prototype=new Ae;for(var re in it)it.hasOwnProperty(re)&&(De.prototype[re]=it[re]);De.prototype.constructor=De,De.superClass=Qe}function y(De,Qe,it){De="prototype"in De?De.prototype:De,Qe="prototype"in Qe?Qe.prototype:Qe,g(De,Qe,it)}function T(De){return De?typeof De=="string"?!1:typeof De.length=="number":void 0}function x(De,Qe,it){if(!(De&&Qe))return;if(De.forEach&&De.forEach===Q)De.forEach(Qe,it);else if(De.length===+De.length)for(var Ae=0,re=De.length;Ae<re;Ae++)Qe.call(it,De[Ae],Ae,De);else for(var ie in De)De.hasOwnProperty(ie)&&Qe.call(it,De[ie],ie,De)}function M(De,Qe,it){if(!(De&&Qe))return;if(De.map&&De.map===S)return De.map(Qe,it);for(var Ae=[],re=0,ie=De.length;re<ie;re++)Ae.push(Qe.call(it,De[re],re,De));return Ae}function b(De,Qe,it,Ae){if(!(De&&Qe))return;if(De.reduce&&De.reduce===s)return De.reduce(Qe,it,Ae);for(var re=0,ie=De.length;re<ie;re++)it=Qe.call(Ae,it,De[re],re,De);return it}function o(De,Qe,it){if(!(De&&Qe))return;if(De.filter&&De.filter===R)return De.filter(Qe,it);for(var Ae=[],re=0,ie=De.length;re<ie;re++)Qe.call(it,De[re],re,De)&&Ae.push(De[re]);return Ae}function r(De,Qe,it){if(!(De&&Qe))return;for(var Ae=0,re=De.length;Ae<re;Ae++)if(Qe.call(it,De[Ae],Ae,De))return De[Ae]}function n(De,Qe){var it=E.call(arguments,2);return function(){return De.apply(Qe,it.concat(E.call(arguments)))}}function l(De){var Qe=E.call(arguments,1);return function(){return De.apply(this,Qe.concat(E.call(arguments)))}}function L(De){return N.call(De)==="[object Array]"}function B(De){return typeof De=="function"}function h(De){return N.call(De)==="[object String]"}function I(De){var Qe=typeof De;return Qe==="function"||!!De&&Qe==="object"}function H(De){return!!W[N.call(De)]}function z(De){return!!X[N.call(De)]}function Z(De){return typeof De=="object"&&typeof De.nodeType=="number"&&typeof De.ownerDocument=="object"}function Y(De){return De!==De}function G(De){for(var Qe=0,it=arguments.length;Qe<it;Qe++)if(arguments[Qe]!=null)return arguments[Qe]}function ee(De,Qe){return De!=null?De:Qe}function J(De,Qe,it){return De!=null?De:Qe!=null?Qe:it}function oe(){return Function.call.apply(E,arguments)}function se(De){if(typeof De=="number")return[De,De,De,De];var Qe=De.length;return Qe===2?[De[0],De[1],De[0],De[1]]:Qe===3?[De[0],De[1],De[2],De[1]]:De}function Te(De,Qe){if(!De)throw new Error(Qe)}function be(De){return De==null?null:typeof De.trim=="function"?De.trim():De.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var xe="__ec_primitive__";function Oe(De){De[xe]=!0}function Ne(De){return De[xe]}function Le(De){var Qe=L(De);this.data={};var it=this;De instanceof Le?De.each(Ae):De&&x(De,Ae);function Ae(re,ie){Qe?it.set(re,ie):it.set(ie,re)}}Le.prototype={constructor:Le,get:function(De){return this.data.hasOwnProperty(De)?this.data[De]:null},set:function(De,Qe){return this.data[De]=Qe},each:function(De,Qe){Qe!==void 0&&(De=n(De,Qe));for(var it in this.data)this.data.hasOwnProperty(it)&&De(this.data[it],it)},removeKey:function(De){delete this.data[De]}};function Se(De){return new Le(De)}function tt(De,Qe){for(var it=new De.constructor(De.length+Qe.length),Ae=0;Ae<De.length;Ae++)it[Ae]=De[Ae];var re=De.length;for(Ae=0;Ae<Qe.length;Ae++)it[Ae+re]=Qe[Ae];return it}function Bt(){}pe.$override=v,pe.clone=i,pe.merge=A,pe.mergeAll=O,pe.extend=w,pe.defaults=g,pe.createCanvas=C,pe.getContext=a,pe.indexOf=u,pe.inherits=m,pe.mixin=y,pe.isArrayLike=T,pe.each=x,pe.map=M,pe.reduce=b,pe.filter=o,pe.find=r,pe.bind=n,pe.curry=l,pe.isArray=L,pe.isFunction=B,pe.isString=h,pe.isObject=I,pe.isBuiltInObject=H,pe.isTypedArray=z,pe.isDom=Z,pe.eqNaN=Y,pe.retrieve=G,pe.retrieve2=ee,pe.retrieve3=J,pe.slice=oe,pe.normalizeCssArray=se,pe.assert=Te,pe.trim=be,pe.setAsPrimitive=Oe,pe.isPrimitive=Ne,pe.createHashMap=Se,pe.concatArray=tt,pe.noop=Bt},biw7:function(Xe,pe,W){"use strict";var X=W("q1tI"),N=W.n(X),_=X.createContext(null);pe.a=_},c5Ni:function(Xe,pe,W){},chpo:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0;var X=1,N=function(){return"".concat(X++)};pe.default=N},crp1:function(Xe,pe,W){"use strict";W.d(pe,"b",function(){return Ue}),W.d(pe,"a",function(){return Ct});var X={},N=function(fe,ye,Fe,nt,$e){var Rt=X[ye]||(X[ye]=URL.createObjectURL(new Blob([fe],{type:"text/javascript"}))),$=new Worker(Rt);return $.onerror=function(F){return $e(F.error,null)},$.onmessage=function(F){return $e(null,F.data)},$.postMessage(Fe,nt),$},_=Uint8Array,Q=Uint16Array,R=Uint32Array,E=new _([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),S=new _([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new _([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),p=function(fe,ye){for(var Fe=new Q(31),nt=0;nt<31;++nt)Fe[nt]=ye+=1<<fe[nt-1];for(var $e=new R(Fe[30]),nt=1;nt<30;++nt)for(var Rt=Fe[nt];Rt<Fe[nt+1];++Rt)$e[Rt]=Rt-Fe[nt]<<5|nt;return[Fe,$e]},v=p(E,2),i=v[0],A=v[1];i[28]=258,A[258]=28;for(var O=p(S,0),w=O[0],g=O[1],C=new Q(32768),c=0;c<32768;++c){var a=(c&43690)>>>1|(c&21845)<<1;a=(a&52428)>>>2|(a&13107)<<2,a=(a&61680)>>>4|(a&3855)<<4,C[c]=((a&65280)>>>8|(a&255)<<8)>>>1}for(var u=function(fe,ye,Fe){for(var nt=fe.length,$e=0,Rt=new Q(ye);$e<nt;++$e)++Rt[fe[$e]-1];var $=new Q(ye);for($e=0;$e<ye;++$e)$[$e]=$[$e-1]+Rt[$e-1]<<1;var F;if(Fe){F=new Q(1<<ye);var P=15-ye;for($e=0;$e<nt;++$e)if(fe[$e])for(var q=$e<<4|fe[$e],le=ye-fe[$e],te=$[fe[$e]-1]++<<le,je=te|(1<<le)-1;te<=je;++te)F[C[te]>>>P]=q}else for(F=new Q(nt),$e=0;$e<nt;++$e)F[$e]=C[$[fe[$e]-1]++]>>>15-fe[$e];return F},m=new _(288),c=0;c<144;++c)m[c]=8;for(var c=144;c<256;++c)m[c]=9;for(var c=256;c<280;++c)m[c]=7;for(var c=280;c<288;++c)m[c]=8;for(var y=new _(32),c=0;c<32;++c)y[c]=5;var T=u(m,9,0),x=u(m,9,1),M=u(y,5,0),b=u(y,5,1),o=function(fe){for(var ye=fe[0],Fe=1;Fe<fe.length;++Fe)fe[Fe]>ye&&(ye=fe[Fe]);return ye},r=function(fe,ye,Fe){var nt=ye/8>>0;return(fe[nt]|fe[nt+1]<<8)>>>(ye&7)&Fe},n=function(fe,ye){var Fe=ye/8>>0;return(fe[Fe]|fe[Fe+1]<<8|fe[Fe+2]<<16)>>>(ye&7)},l=function(fe){return(fe/8>>0)+(fe&7&&1)},L=function(fe,ye,Fe){(ye==null||ye<0)&&(ye=0),(Fe==null||Fe>fe.length)&&(Fe=fe.length);var nt=new(fe instanceof Q?Q:fe instanceof R?R:_)(Fe-ye);return nt.set(fe.subarray(ye,Fe)),nt},B=function(fe,ye,Fe){var nt=fe.length,$e=!ye||Fe,Rt=!Fe||Fe.i;Fe||(Fe={}),ye||(ye=new _(nt*3));var $=function(Cr){var _r=ye.length;if(Cr>_r){var wr=new _(Math.max(_r*2,Cr));wr.set(ye),ye=wr}},F=Fe.f||0,P=Fe.p||0,q=Fe.b||0,le=Fe.l,te=Fe.d,je=Fe.m,xt=Fe.n,ot=nt*8;do{if(!le){Fe.f=F=r(fe,P,1);var kt=r(fe,P+1,3);if(P+=3,kt)if(kt==1)le=x,te=b,je=9,xt=5;else if(kt==2){var Jt=r(fe,P,31)+257,hr=r(fe,P+10,15)+4,Fr=Jt+r(fe,P+5,31)+1;P+=14;for(var gr=new _(Fr),Lr=new _(19),fr=0;fr<hr;++fr)Lr[s[fr]]=r(fe,P+fr*3,7);P+=hr*3;var Hr=o(Lr),Pr=(1<<Hr)-1;if(!Rt&&P+Fr*(Hr+7)>ot)break;for(var on=u(Lr,Hr,1),fr=0;fr<Fr;){var Yr=on[r(fe,P,Pr)];P+=Yr&15;var wt=Yr>>>4;if(wt<16)gr[fr++]=wt;else{var tn=0,sn=0;for(wt==16?(sn=3+r(fe,P,3),P+=2,tn=gr[fr-1]):wt==17?(sn=3+r(fe,P,7),P+=3):wt==18&&(sn=11+r(fe,P,127),P+=7);sn--;)gr[fr++]=tn}}var Gr=gr.subarray(0,Jt),rn=gr.subarray(Jt);je=o(Gr),xt=o(rn),le=u(Gr,je,1),te=u(rn,xt,1)}else throw"invalid block type";else{var wt=l(P)+4,Yt=fe[wt-4]|fe[wt-3]<<8,Gt=wt+Yt;if(Gt>nt){if(Rt)throw"unexpected EOF";break}$e&&$(q+Yt),ye.set(fe.subarray(wt,Gt),q),Fe.b=q+=Yt,Fe.p=P=Gt*8;continue}if(P>ot)throw"unexpected EOF"}$e&&$(q+131072);for(var ln=(1<<je)-1,$r=(1<<xt)-1,un=je+xt+18;Rt||P+un<ot;){var tn=le[n(fe,P)&ln],Er=tn>>>4;if(P+=tn&15,P>ot)throw"unexpected EOF";if(!tn)throw"invalid length/literal";if(Er<256)ye[q++]=Er;else if(Er==256){le=null;break}else{var cr=Er-254;if(Er>264){var fr=Er-257,nr=E[fr];cr=r(fe,P,(1<<nr)-1)+i[fr],P+=nr}var tr=te[n(fe,P)&$r],$t=tr>>>4;if(!tr)throw"invalid distance";P+=tr&15;var rn=w[$t];if($t>3){var nr=S[$t];rn+=n(fe,P)&(1<<nr)-1,P+=nr}if(P>ot)throw"unexpected EOF";$e&&$(q+131072);for(var vr=q+cr;q<vr;q+=4)ye[q]=ye[q-rn],ye[q+1]=ye[q+1-rn],ye[q+2]=ye[q+2-rn],ye[q+3]=ye[q+3-rn];q=vr}}Fe.l=le,Fe.p=P,Fe.b=q,le&&(F=1,Fe.m=je,Fe.d=te,Fe.n=xt)}while(!F);return q==ye.length?ye:L(ye,0,q)},h=function(fe,ye,Fe){Fe<<=ye&7;var nt=ye/8>>0;fe[nt]|=Fe,fe[nt+1]|=Fe>>>8},I=function(fe,ye,Fe){Fe<<=ye&7;var nt=ye/8>>0;fe[nt]|=Fe,fe[nt+1]|=Fe>>>8,fe[nt+2]|=Fe>>>16},H=function(fe,ye){for(var Fe=[],nt=0;nt<fe.length;++nt)fe[nt]&&Fe.push({s:nt,f:fe[nt]});var $e=Fe.length,Rt=Fe.slice();if(!$e)return[new _(0),0];if($e==1){var $=new _(Fe[0].s+1);return $[Fe[0].s]=1,[$,1]}Fe.sort(function(Fr,gr){return Fr.f-gr.f}),Fe.push({s:-1,f:25001});var F=Fe[0],P=Fe[1],q=0,le=1,te=2;for(Fe[0]={s:-1,f:F.f+P.f,l:F,r:P};le!=$e-1;)F=Fe[Fe[q].f<Fe[te].f?q++:te++],P=Fe[q!=le&&Fe[q].f<Fe[te].f?q++:te++],Fe[le++]={s:-1,f:F.f+P.f,l:F,r:P};for(var je=Rt[0].s,nt=1;nt<$e;++nt)Rt[nt].s>je&&(je=Rt[nt].s);var xt=new Q(je+1),ot=z(Fe[le-1],xt,0);if(ot>ye){var nt=0,kt=0,wt=ot-ye,Yt=1<<wt;for(Rt.sort(function(gr,Lr){return xt[Lr.s]-xt[gr.s]||gr.f-Lr.f});nt<$e;++nt){var Gt=Rt[nt].s;if(xt[Gt]>ye)kt+=Yt-(1<<ot-xt[Gt]),xt[Gt]=ye;else break}for(kt>>>=wt;kt>0;){var Jt=Rt[nt].s;xt[Jt]<ye?kt-=1<<ye-xt[Jt]++-1:++nt}for(;nt>=0&&kt;--nt){var hr=Rt[nt].s;xt[hr]==ye&&(--xt[hr],++kt)}ot=ye}return[new _(xt),ot]},z=function(fe,ye,Fe){return fe.s==-1?Math.max(z(fe.l,ye,Fe+1),z(fe.r,ye,Fe+1)):ye[fe.s]=Fe},Z=function(fe){for(var ye=fe.length;ye&&!fe[--ye];);for(var Fe=new Q(++ye),nt=0,$e=fe[0],Rt=1,$=function(P){Fe[nt++]=P},F=1;F<=ye;++F)if(fe[F]==$e&&F!=ye)++Rt;else{if(!$e&&Rt>2){for(;Rt>138;Rt-=138)$(32754);Rt>2&&($(Rt>10?Rt-11<<5|28690:Rt-3<<5|12305),Rt=0)}else if(Rt>3){for($($e),--Rt;Rt>6;Rt-=6)$(8304);Rt>2&&($(Rt-3<<5|8208),Rt=0)}for(;Rt--;)$($e);Rt=1,$e=fe[F]}return[Fe.subarray(0,nt),ye]},Y=function(fe,ye){for(var Fe=0,nt=0;nt<ye.length;++nt)Fe+=fe[nt]*ye[nt];return Fe},G=function(fe,ye,Fe){var nt=Fe.length,$e=l(ye+2);fe[$e]=nt&255,fe[$e+1]=nt>>>8,fe[$e+2]=fe[$e]^255,fe[$e+3]=fe[$e+1]^255;for(var Rt=0;Rt<nt;++Rt)fe[$e+Rt+4]=Fe[Rt];return($e+4+nt)*8},ee=function(fe,ye,Fe,nt,$e,Rt,$,F,P,q,le){h(ye,le++,Fe),++$e[256];for(var te=H($e,15),je=te[0],xt=te[1],ot=H(Rt,15),kt=ot[0],wt=ot[1],Yt=Z(je),Gt=Yt[0],Jt=Yt[1],hr=Z(kt),Fr=hr[0],gr=hr[1],Lr=new Q(19),fr=0;fr<Gt.length;++fr)Lr[Gt[fr]&31]++;for(var fr=0;fr<Fr.length;++fr)Lr[Fr[fr]&31]++;for(var Hr=H(Lr,7),Pr=Hr[0],on=Hr[1],Yr=19;Yr>4&&!Pr[s[Yr-1]];--Yr);var tn=q+5<<3,sn=Y($e,m)+Y(Rt,y)+$,Gr=Y($e,je)+Y(Rt,kt)+$+14+3*Yr+Y(Lr,Pr)+(2*Lr[16]+3*Lr[17]+7*Lr[18]);if(tn<=sn&&tn<=Gr)return G(ye,le,fe.subarray(P,P+q));var rn,ln,$r,un;if(h(ye,le,1+(Gr<sn)),le+=2,Gr<sn){rn=u(je,xt,0),ln=je,$r=u(kt,wt,0),un=kt;var Er=u(Pr,on,0);h(ye,le,Jt-257),h(ye,le+5,gr-1),h(ye,le+10,Yr-4),le+=14;for(var fr=0;fr<Yr;++fr)h(ye,le+3*fr,Pr[s[fr]]);le+=3*Yr;for(var cr=[Gt,Fr],nr=0;nr<2;++nr)for(var tr=cr[nr],fr=0;fr<tr.length;++fr){var $t=tr[fr]&31;h(ye,le,Er[$t]),le+=Pr[$t],$t>15&&(h(ye,le,tr[fr]>>>5&127),le+=tr[fr]>>>12)}}else rn=T,ln=m,$r=M,un=y;for(var fr=0;fr<F;++fr)if(nt[fr]>255){var $t=nt[fr]>>>18&31;I(ye,le,rn[$t+257]),le+=ln[$t+257],$t>7&&(h(ye,le,nt[fr]>>>23&31),le+=E[$t]);var vr=nt[fr]&31;I(ye,le,$r[vr]),le+=un[vr],vr>3&&(I(ye,le,nt[fr]>>>5&8191),le+=S[vr])}else I(ye,le,rn[nt[fr]]),le+=ln[nt[fr]];return I(ye,le,rn[256]),le+ln[256]},J=new R([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),oe=new _(0),se=function(fe,ye,Fe,nt,$e,Rt){var $=fe.length,F=new _(nt+$+5*(1+Math.floor($/7e3))+$e),P=F.subarray(nt,F.length-$e),q=0;if(!ye||$<8)for(var le=0;le<=$;le+=65535){var te=le+65535;te<$?q=G(P,q,fe.subarray(le,te)):(P[le]=Rt,q=G(P,q,fe.subarray(le,$)))}else{for(var je=J[ye-1],xt=je>>>13,ot=je&8191,kt=(1<<Fe)-1,wt=new Q(32768),Yt=new Q(kt+1),Gt=Math.ceil(Fe/3),Jt=2*Gt,hr=function(Jr){return(fe[Jr]^fe[Jr+1]<<Gt^fe[Jr+2]<<Jt)&kt},Fr=new R(25e3),gr=new Q(288),Lr=new Q(32),fr=0,Hr=0,le=0,Pr=0,on=0,Yr=0;le<$;++le){var tn=hr(le),sn=le&32767,Gr=Yt[tn];if(wt[sn]=Gr,Yt[tn]=sn,on<=le){var rn=$-le;if((fr>7e3||Pr>24576)&&rn>423){q=ee(fe,P,0,Fr,gr,Lr,Hr,Pr,Yr,le-Yr,q),Pr=fr=Hr=0,Yr=le;for(var ln=0;ln<286;++ln)gr[ln]=0;for(var ln=0;ln<30;++ln)Lr[ln]=0}var $r=2,un=0,Er=ot,cr=sn-Gr&32767;if(rn>2&&tn==hr(le-cr))for(var nr=Math.min(xt,rn)-1,tr=Math.min(32767,le),$t=Math.min(258,rn);cr<=tr&&--Er&&sn!=Gr;){if(fe[le+$r]==fe[le+$r-cr]){for(var vr=0;vr<$t&&fe[le+vr]==fe[le+vr-cr];++vr);if(vr>$r){if($r=vr,un=cr,vr>nr)break;for(var Cr=Math.min(cr,vr-2),_r=0,ln=0;ln<Cr;++ln){var wr=le-cr+ln+32768&32767,kn=wt[wr],Vr=wr-kn+32768&32767;Vr>_r&&(_r=Vr,Gr=wr)}}}sn=Gr,Gr=wt[sn],cr+=sn-Gr+32768&32767}if(un){Fr[Pr++]=268435456|A[$r]<<18|g[un];var nn=A[$r]&31,Dn=g[un]&31;Hr+=E[nn]+S[Dn],++gr[257+nn],++Lr[Dn],on=le+$r,++fr}else Fr[Pr++]=fe[le],++gr[fe[le]]}}q=ee(fe,P,Rt,Fr,gr,Lr,Hr,Pr,Yr,le-Yr,q),Rt||(q=G(P,q,oe))}return L(F,0,nt+l(q)+$e)},Te=function(){for(var fe=new R(256),ye=0;ye<256;++ye){for(var Fe=ye,nt=9;--nt;)Fe=(Fe&1&&3988292384)^Fe>>>1;fe[ye]=Fe}return fe}(),be=function(){var fe=4294967295;return{p:function(ye){for(var Fe=fe,nt=0;nt<ye.length;++nt)Fe=Te[Fe&255^ye[nt]]^Fe>>>8;fe=Fe},d:function(){return fe^4294967295}}},xe=function(){var fe=1,ye=0;return{p:function(Fe){for(var nt=fe,$e=ye,Rt=Fe.length,$=0;$!=Rt;){for(var F=Math.min($+5552,Rt);$<F;++$)nt+=Fe[$],$e+=nt;nt%=65521,$e%=65521}fe=nt,ye=$e},d:function(){return(fe>>>8<<16|(ye&255)<<8|ye>>>8)+((fe&255)<<23)*2}}},Oe=function(fe,ye,Fe,nt,$e){return se(fe,ye.level==null?6:ye.level,ye.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(fe.length)))*1.5):12+ye.mem,Fe,nt,!$e)},Ne=function(fe,ye){var Fe={};for(var nt in fe)Fe[nt]=fe[nt];for(var nt in ye)Fe[nt]=ye[nt];return Fe},Le=function(fe,ye,Fe){for(var nt=fe(),$e=fe.toString(),Rt=$e.slice($e.indexOf("[")+1,$e.lastIndexOf("]")).replace(/ /g,"").split(","),$=0;$<nt.length;++$){var F=nt[$],P=Rt[$];if(typeof F=="function"){ye+=";"+P+"=";var q=F.toString();if(F.prototype)if(q.indexOf("[native code]")!=-1){var le=q.indexOf(" ",8)+1;ye+=q.slice(le,q.indexOf("(",le))}else{ye+=q;for(var te in F.prototype)ye+=";"+P+".prototype."+te+"="+F.prototype[te].toString()}else ye+=q}else Fe[P]=F}return[ye,Fe]},Se=[],tt=function(fe){var ye=[];for(var Fe in fe)(fe[Fe]instanceof _||fe[Fe]instanceof Q||fe[Fe]instanceof R)&&ye.push((fe[Fe]=new fe[Fe].constructor(fe[Fe])).buffer);return ye},Bt=function(fe,ye,Fe,nt){var $e;if(!Se[Fe]){for(var Rt="",$={},F=fe.length-1,P=0;P<F;++P)$e=Le(fe[P],Rt,$),Rt=$e[0],$=$e[1];Se[Fe]=Le(fe[F],Rt,$)}var q=Ne({},Se[Fe][1]);return N(Se[Fe][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ye.toString()+"}",Fe,q,tt(q),nt)},De=function(){return[_,Q,R,E,S,s,i,w,x,b,C,u,o,r,n,l,L,B,we,ce,Be]},Qe=function(){return[_,Q,R,E,S,s,A,g,T,m,M,y,C,J,oe,u,h,I,H,z,Z,Y,G,ee,l,L,se,Oe,Me,ce]},it=function(){return[_t,Pe,yt,be,Te]},Ae=function(){return[It,He]},re=function(){return[At,yt,xe]},ie=function(){return[mt]},ce=function(fe){return postMessage(fe,[fe.buffer])},Be=function(fe){return fe&&fe.size&&new _(fe.size)},Re=function(fe,ye,Fe,nt,$e,Rt){var $=Bt(Fe,nt,$e,function(F,P){$.terminate(),Rt(F,P)});return ye.consume||(fe=new _(fe)),$.postMessage([fe,ye],[fe.buffer]),function(){$.terminate()}},ke=function(fe){return fe.ondata=function(ye,Fe){return postMessage([ye,Fe],[ye.buffer])},function(ye){return fe.push(ye.data[0],ye.data[1])}},ft=function(fe,ye,Fe,nt,$e){var Rt,$=Bt(fe,nt,$e,function(F,P){F?($.terminate(),ye.ondata.call(ye,F)):(P[1]&&$.terminate(),ye.ondata.call(ye,F,P[0],P[1]))});$.postMessage(Fe),ye.push=function(F,P){if(Rt)throw"stream finished";if(!ye.ondata)throw"no stream handler";$.postMessage([F,Rt=P],[F.buffer])},ye.terminate=function(){$.terminate()}},pt=function(fe,ye){return fe[ye]|fe[ye+1]<<8},bt=function(fe,ye){return(fe[ye]|fe[ye+1]<<8|fe[ye+2]<<16)+(fe[ye+3]<<23)*2},yt=function(fe,ye,Fe){for(;Fe;++ye)fe[ye]=Fe,Fe>>>=8},_t=function(fe,ye){var Fe=ye.filename;if(fe[0]=31,fe[1]=139,fe[2]=8,fe[8]=ye.level<2?4:ye.level==9?2:0,fe[9]=3,ye.mtime!=0&&yt(fe,4,Math.floor(new Date(ye.mtime||Date.now())/1e3)),Fe){fe[3]=8;for(var nt=0;nt<=Fe.length;++nt)fe[nt+10]=Fe.charCodeAt(nt)}},It=function(fe){if(fe[0]!=31||fe[1]!=139||fe[2]!=8)throw"invalid gzip data";var ye=fe[3],Fe=10;ye&4&&(Fe+=fe[10]|(fe[11]<<8)+2);for(var nt=(ye>>3&1)+(ye>>4&1);nt>0;nt-=!fe[Fe++]);return Fe+(ye&2)},He=function(fe){var ye=fe.length;return(fe[ye-4]|fe[ye-3]<<8|fe[ye-2]<<16)+2*(fe[ye-1]<<23)},Pe=function(fe){return 10+(fe.filename&&fe.filename.length+1||0)},At=function(fe,ye){var Fe=ye.level,nt=Fe==0?0:Fe<6?1:Fe==9?3:2;fe[0]=120,fe[1]=nt<<6|(nt?32-2*nt:1)},mt=function(fe){if((fe[0]&15)!=8||fe[0]>>>4>7||(fe[0]<<8|fe[1])%31)throw"invalid zlib data";if(fe[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ze(fe,ye){return!ye&&typeof fe=="function"&&(ye=fe,fe={}),this.ondata=ye,fe}var ut=function(){function fe(ye,Fe){!Fe&&typeof ye=="function"&&(Fe=ye,ye={}),this.ondata=Fe,this.o=ye||{}}return fe.prototype.p=function(ye,Fe){this.ondata(Oe(ye,this.o,0,0,!Fe),Fe)},fe.prototype.push=function(ye,Fe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Fe,this.p(ye,Fe||!1)},fe}(),Ke=function(){function fe(ye,Fe){ft([Qe,function(){return[ke,ut]}],this,Ze.call(this,ye,Fe),function(nt){var $e=new ut(nt.data);onmessage=ke($e)},6)}return fe}();function Ie(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[Qe],function(nt){return ce(Me(nt.data[0],nt.data[1]))},0,Fe)}function Me(fe,ye){return ye===void 0&&(ye={}),Oe(fe,ye,0,0)}var me=function(){function fe(ye){this.s={},this.p=new _(0),this.ondata=ye}return fe.prototype.e=function(ye){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Fe=this.p.length,nt=new _(Fe+ye.length);nt.set(this.p),nt.set(ye,Fe),this.p=nt},fe.prototype.c=function(ye){this.d=this.s.i=ye||!1;var Fe=this.s.b,nt=B(this.p,this.o,this.s);this.ondata(L(nt,Fe,this.s.b),this.d),this.o=L(nt,this.s.b-32768),this.s.b=this.o.length,this.p=L(this.p,this.s.p/8>>0),this.s.p&=7},fe.prototype.push=function(ye,Fe){this.e(ye),this.c(Fe)},fe}(),Ee=function(){function fe(ye){this.ondata=ye,ft([De,function(){return[ke,me]}],this,0,function(){var Fe=new me;onmessage=ke(Fe)},7)}return fe}();function ge(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[De],function(nt){return ce(we(nt.data[0],Be(nt.data[1])))},1,Fe)}function we(fe,ye){return B(fe,ye)}var ze=function(){function fe(ye,Fe){this.c=be(),this.l=0,this.v=1,ut.call(this,ye,Fe)}return fe.prototype.push=function(ye,Fe){ut.prototype.push.call(this,ye,Fe)},fe.prototype.p=function(ye,Fe){this.c.p(ye),this.l+=ye.length;var nt=Oe(ye,this.o,this.v&&Pe(this.o),Fe&&8,!Fe);this.v&&(_t(nt,this.o),this.v=0),Fe&&(yt(nt,nt.length-8,this.c.d()),yt(nt,nt.length-4,this.l)),this.ondata(nt,Fe)},fe}(),Je=function(){function fe(ye,Fe){ft([Qe,it,function(){return[ke,ut,ze]}],this,Ze.call(this,ye,Fe),function(nt){var $e=new ze(nt.data);onmessage=ke($e)},8)}return fe}();function Et(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[Qe,it,function(){return[Ft]}],function(nt){return ce(Ft(nt.data[0],nt.data[1]))},2,Fe)}function Ft(fe,ye){ye===void 0&&(ye={});var Fe=be(),nt=fe.length;Fe.p(fe);var $e=Oe(fe,ye,Pe(ye),8),Rt=$e.length;return _t($e,ye),yt($e,Rt-8,Fe.d()),yt($e,Rt-4,nt),$e}var Nt=function(){function fe(ye){this.v=1,me.call(this,ye)}return fe.prototype.push=function(ye,Fe){if(me.prototype.e.call(this,ye),this.v){var nt=It(this.p);if(nt>=this.p.length&&!Fe)return;this.p=this.p.subarray(nt),this.v=0}if(Fe){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}me.prototype.c.call(this,Fe)},fe}(),ht=function(){function fe(ye){this.ondata=ye,ft([De,Ae,function(){return[ke,me,Nt]}],this,0,function(){var Fe=new Nt;onmessage=ke(Fe)},9)}return fe}();function Lt(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[De,Ae,function(){return[st]}],function(nt){return ce(st(nt.data[0]))},3,Fe)}function st(fe,ye){return B(fe.subarray(It(fe),-8),ye||new _(He(fe)))}var rt=function(){function fe(ye,Fe){this.c=xe(),this.v=1,ut.call(this,ye,Fe)}return fe.prototype.push=function(ye,Fe){ut.prototype.push.call(this,ye,Fe)},fe.prototype.p=function(ye,Fe){this.c.p(ye);var nt=Oe(ye,this.o,this.v&&2,Fe&&4,!Fe);this.v&&(At(nt,this.o),this.v=0),Fe&&yt(nt,nt.length-4,this.c.d()),this.ondata(nt,Fe)},fe}(),et=function(){function fe(ye,Fe){ft([Qe,re,function(){return[ke,ut,rt]}],this,Ze.call(this,ye,Fe),function(nt){var $e=new rt(nt.data);onmessage=ke($e)},10)}return fe}();function Ce(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[Qe,re,function(){return[Ue]}],function(nt){return ce(Ue(nt.data[0],nt.data[1]))},4,Fe)}function Ue(fe,ye){ye===void 0&&(ye={});var Fe=xe();Fe.p(fe);var nt=Oe(fe,ye,2,4);return At(nt,ye),yt(nt,nt.length-4,Fe.d()),nt}var ct=function(){function fe(ye){this.v=1,me.call(this,ye)}return fe.prototype.push=function(ye,Fe){if(me.prototype.e.call(this,ye),this.v){if(this.p.length<2&&!Fe)return;this.p=this.p.subarray(2),this.v=0}if(Fe){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}me.prototype.c.call(this,Fe)},fe}(),at=function(){function fe(ye){this.ondata=ye,ft([De,ie,function(){return[ke,me,ct]}],this,0,function(){var Fe=new ct;onmessage=ke(Fe)},11)}return fe}();function Tt(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return Re(fe,ye,[De,ie,function(){return[Ct]}],function(nt){return ce(Ct(nt.data[0],Be(nt.data[1])))},5,Fe)}function Ct(fe,ye){return B((mt(fe),fe.subarray(2,-4)),ye)}var qe=function(){function fe(ye){this.G=Nt,this.I=me,this.Z=ct,this.ondata=ye}return fe.prototype.push=function(ye,Fe){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ye,Fe);else{if(this.p&&this.p.length){var nt=new _(this.p.length+ye.length);nt.set(this.p),nt.set(ye,this.p.length)}else this.p=ye;if(this.p.length>2){var $e=this,Rt=function(){$e.ondata.apply($e,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Rt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Rt):new this.Z(Rt),this.s.push(this.p,Fe),this.p=null}}},fe}(),St=function(){function fe(ye){this.G=ht,this.I=Ee,this.Z=at,this.ondata=ye}return fe.prototype.push=function(ye,Fe){qe.prototype.push.call(this,ye,Fe)},fe}();function Ht(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";return fe[0]==31&&fe[1]==139&&fe[2]==8?Lt(fe,ye,Fe):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?ge(fe,ye,Fe):Tt(fe,ye,Fe)}function Pt(fe,ye){return fe[0]==31&&fe[1]==139&&fe[2]==8?st(fe,ye):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?we(fe,ye):Ct(fe,ye)}var zt=function(fe,ye,Fe,nt){for(var $e in fe){var Rt=fe[$e],$=ye+$e;Rt instanceof _?Fe[$]=[Rt,nt]:Array.isArray(Rt)?Fe[$]=[Rt[0],Ne(nt,Rt[1])]:zt(Rt,$+"/",Fe,nt)}};function Ir(fe,ye){var Fe=fe.length;if(!ye&&typeof TextEncoder!="undefined")return new TextEncoder().encode(fe);for(var nt=new _(fe.length+(fe.length>>>1)),$e=0,Rt=function(q){nt[$e++]=q},$=0;$<Fe;++$){if($e+5>nt.length){var F=new _($e+8+(Fe-$<<1));F.set(nt),nt=F}var P=fe.charCodeAt($);P<128||ye?Rt(P):P<2048?(Rt(192|P>>>6),Rt(128|P&63)):P>55295&&P<57344?(P=65536+(P&1023<<10)|fe.charCodeAt(++$)&1023,Rt(240|P>>>18),Rt(128|P>>>12&63),Rt(128|P>>>6&63),Rt(128|P&63)):(Rt(224|P>>>12),Rt(128|P>>>6&63),Rt(128|P&63))}return L(nt,0,$e)}function Rr(fe,ye){var Fe="";if(!ye&&typeof TextDecoder!="undefined")return new TextDecoder().decode(fe);for(var nt=0;nt<fe.length;){var $e=fe[nt++];$e<128||ye?Fe+=String.fromCharCode($e):$e<224?Fe+=String.fromCharCode(($e&31)<<6|fe[nt++]&63):$e<240?Fe+=String.fromCharCode(($e&15)<<12|(fe[nt++]&63)<<6|fe[nt++]&63):($e=(($e&15)<<18|(fe[nt++]&63)<<12|(fe[nt++]&63)<<6|fe[nt++]&63)-65536,Fe+=String.fromCharCode(55296|$e>>10,56320|$e&1023))}return Fe}var yr=function(fe,ye){return ye+30+pt(fe,ye+26)+pt(fe,ye+28)},jt=function(fe,ye,Fe){var nt=pt(fe,ye+28),$e=Rr(fe.subarray(ye+46,ye+46+nt),!(pt(fe,ye+8)&2048)),Rt=ye+46+nt,$=Fe?Mr(fe,Rt):[bt(fe,ye+20),bt(fe,ye+24),bt(fe,ye+42)],F=$[0],P=$[1],q=$[2];return[pt(fe,ye+10),F,P,$e,Rt+pt(fe,ye+30)+pt(fe,ye+32),q]},Mr=function(fe,ye){for(;pt(fe,ye)!=1;ye+=4+pt(fe,ye+2));return[bt(fe,ye+12),bt(fe,ye+4),bt(fe,ye+20)]},Wr=function(fe,ye,Fe,nt,$e,Rt,$,F,P,q){var le=Rt.length,te=nt.length;yt(fe,ye,P!=null?33639248:67324752),ye+=4,P!=null&&(fe[ye]=20,ye+=2),fe[ye]=20,ye+=2,fe[ye++]=q==8&&(F.level==1?6:F.level<6?4:F.level==9?2:0),fe[ye++]=$&&8,fe[ye]=q,ye+=2;var je=new Date(F.mtime||Date.now()),xt=je.getFullYear()-1980;if(xt<0||xt>119)throw"date not in range 1980-2099";yt(fe,ye,(xt<<24)*2|je.getMonth()+1<<21|je.getDate()<<16|je.getHours()<<11|je.getMinutes()<<5|je.getSeconds()>>>1),ye+=4,yt(fe,ye,Fe),yt(fe,ye+4,te),yt(fe,ye+8,$e),yt(fe,ye+12,le),ye+=16,P!=null&&(yt(fe,ye+=10,P),ye+=4),fe.set(Rt,ye),ye+=le,P==null&&fe.set(nt,ye)},Ur=function(fe,ye,Fe,nt,$e){yt(fe,ye,101010256),yt(fe,ye+8,Fe),yt(fe,ye+10,Fe),yt(fe,ye+12,nt),yt(fe,ye+16,$e)};function mr(fe,ye,Fe){if(Fe||(Fe=ye,ye={}),typeof Fe!="function")throw"no callback";var nt={};zt(fe,"",nt,ye);var $e=Object.keys(nt),Rt=$e.length,$=0,F=0,P=Rt,q=new Array(Rt),le=[],te=function(){for(var kt=0;kt<le.length;++kt)le[kt]()},je=function(){var kt=new _(F+22),wt=$,Yt=F-$;F=0;for(var Gt=0;Gt<P;++Gt){var Jt=q[Gt];try{Wr(kt,F,Jt.c,Jt.d,Jt.m,Jt.n,Jt.u,Jt.p,null,Jt.t),Wr(kt,$,Jt.c,Jt.d,Jt.m,Jt.n,Jt.u,Jt.p,F,Jt.t),$+=46+Jt.n.length,F+=30+Jt.n.length+Jt.d.length}catch(hr){return Fe(hr,null)}}Ur(kt,$,q.length,Yt,wt),Fe(null,kt)};Rt||je();for(var xt=function(kt){var wt=$e[kt],Yt=nt[wt],Gt=Yt[0],Jt=Yt[1],hr=be(),Fr=Gt.length;hr.p(Gt);var gr=Ir(wt),Lr=gr.length,fr=Jt.level==0?0:8,Hr=function(Pr,on){if(Pr)te(),Fe(Pr,null);else{var Yr=on.length;q[kt]={t:fr,d:on,m:Fr,c:hr.d(),u:wt.length!=Yr,n:gr,p:Jt},$+=30+Lr+Yr,F+=76+2*Lr+Yr,--Rt||je()}};if(gr.length>65535&&Hr("filename too long",null),!fr)Hr(null,Gt);else if(Fr<16e4)try{Hr(null,Me(Gt,Jt))}catch(Pr){Hr(Pr,null)}else le.push(Ie(Gt,Jt,Hr))},ot=0;ot<P;++ot)xt(ot);return te}function Sr(fe,ye){ye===void 0&&(ye={});var Fe={},nt=[];zt(fe,"",Fe,ye);var $e=0,Rt=0;for(var $ in Fe){var F=Fe[$],P=F[0],q=F[1],le=q.level==0?0:8,te=Ir($),je=te.length;if(te.length>65535)throw"filename too long";var xt=le?Me(P,q):P,ot=xt.length,kt=be();kt.p(P),nt.push({t:le,d:xt,m:P.length,c:kt.d(),u:$.length!=je,n:te,o:$e,p:q}),$e+=30+je+ot,Rt+=76+2*je+ot}for(var wt=new _(Rt+22),Yt=$e,Gt=Rt-$e,Jt=0;Jt<nt.length;++Jt){var hr=nt[Jt];Wr(wt,hr.o,hr.c,hr.d,hr.m,hr.n,hr.u,hr.p,null,hr.t),Wr(wt,$e,hr.c,hr.d,hr.m,hr.n,hr.u,hr.p,hr.o,hr.t),$e+=46+hr.n.length}return Ur(wt,$e,nt.length,Gt,Yt),wt}function Cn(fe,ye){if(typeof ye!="function")throw"no callback";for(var Fe=[],nt=function(){for(var je=0;je<Fe.length;++je)Fe[je]()},$e={},Rt=fe.length-22;bt(fe,Rt)!=101010256;--Rt)if(!Rt||fe.length-Rt>65558){ye("invalid zip file",null);return}var $=pt(fe,Rt+8);$||ye(null,{});var F=$,P=bt(fe,Rt+16),q=P==4294967295;if(q){if(Rt=bt(fe,Rt-12),bt(fe,Rt)!=101075792)throw"invalid zip file";F=$=bt(fe,Rt+32),P=bt(fe,Rt+48)}for(var le=function(je){var xt=jt(fe,P,q),ot=xt[0],kt=xt[1],wt=xt[2],Yt=xt[3],Gt=xt[4],Jt=xt[5],hr=yr(fe,Jt);P=Gt;var Fr=function(Lr,fr){Lr?(nt(),ye(Lr,null)):($e[Yt]=fr,--$||ye(null,$e))};if(!ot)Fr(null,L(fe,hr,hr+kt));else if(ot==8){var gr=fe.subarray(hr,hr+kt);if(kt<32e4)try{Fr(null,we(gr,new _(wt)))}catch(Lr){Fr(Lr,null)}else Fe.push(ge(gr,{size:wt},Fr))}else Fr("unknown compression type "+ot,null)},te=0;te<F;++te)le(te);return nt}function dn(fe){for(var ye={},Fe=fe.length-22;bt(fe,Fe)!=101010256;--Fe)if(!Fe||fe.length-Fe>65558)throw"invalid zip file";var nt=pt(fe,Fe+8);if(!nt)return{};var $e=bt(fe,Fe+16),Rt=$e==4294967295;if(Rt){if(Fe=bt(fe,Fe-12),bt(fe,Fe)!=101075792)throw"invalid zip file";nt=bt(fe,Fe+32),$e=bt(fe,Fe+48)}for(var $=0;$<nt;++$){var F=jt(fe,$e,Rt),P=F[0],q=F[1],le=F[2],te=F[3],je=F[4],xt=F[5],ot=yr(fe,xt);if($e=je,!P)ye[te]=L(fe,ot,ot+q);else if(P==8)ye[te]=we(fe.subarray(ot,ot+q),new _(le));else throw"unknown compression type "+P}return ye}},dMvE:function(Xe,pe){var W={linear:function(N){return N},quadraticIn:function(N){return N*N},quadraticOut:function(N){return N*(2-N)},quadraticInOut:function(N){return(N*=2)<1?.5*N*N:-.5*(--N*(N-2)-1)},cubicIn:function(N){return N*N*N},cubicOut:function(N){return--N*N*N+1},cubicInOut:function(N){return(N*=2)<1?.5*N*N*N:.5*((N-=2)*N*N+2)},quarticIn:function(N){return N*N*N*N},quarticOut:function(N){return 1- --N*N*N*N},quarticInOut:function(N){return(N*=2)<1?.5*N*N*N*N:-.5*((N-=2)*N*N*N-2)},quinticIn:function(N){return N*N*N*N*N},quinticOut:function(N){return--N*N*N*N*N+1},quinticInOut:function(N){return(N*=2)<1?.5*N*N*N*N*N:.5*((N-=2)*N*N*N*N+2)},sinusoidalIn:function(N){return 1-Math.cos(N*Math.PI/2)},sinusoidalOut:function(N){return Math.sin(N*Math.PI/2)},sinusoidalInOut:function(N){return .5*(1-Math.cos(Math.PI*N))},exponentialIn:function(N){return N===0?0:Math.pow(1024,N-1)},exponentialOut:function(N){return N===1?1:1-Math.pow(2,-10*N)},exponentialInOut:function(N){return N===0?0:N===1?1:(N*=2)<1?.5*Math.pow(1024,N-1):.5*(-Math.pow(2,-10*(N-1))+2)},circularIn:function(N){return 1-Math.sqrt(1-N*N)},circularOut:function(N){return Math.sqrt(1- --N*N)},circularInOut:function(N){return(N*=2)<1?-.5*(Math.sqrt(1-N*N)-1):.5*(Math.sqrt(1-(N-=2)*N)+1)},elasticIn:function(N){var _,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,_=R/4):_=R*Math.asin(1/Q)/(2*Math.PI),-(Q*Math.pow(2,10*(N-=1))*Math.sin((N-_)*(2*Math.PI)/R)))},elasticOut:function(N){var _,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,_=R/4):_=R*Math.asin(1/Q)/(2*Math.PI),Q*Math.pow(2,-10*N)*Math.sin((N-_)*(2*Math.PI)/R)+1)},elasticInOut:function(N){var _,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,_=R/4):_=R*Math.asin(1/Q)/(2*Math.PI),(N*=2)<1?-.5*(Q*Math.pow(2,10*(N-=1))*Math.sin((N-_)*(2*Math.PI)/R)):Q*Math.pow(2,-10*(N-=1))*Math.sin((N-_)*(2*Math.PI)/R)*.5+1)},backIn:function(N){var _=1.70158;return N*N*((_+1)*N-_)},backOut:function(N){var _=1.70158;return--N*N*((_+1)*N+_)+1},backInOut:function(N){var _=1.70158*1.525;return(N*=2)<1?.5*(N*N*((_+1)*N-_)):.5*((N-=2)*N*((_+1)*N+_)+2)},bounceIn:function(N){return 1-W.bounceOut(1-N)},bounceOut:function(N){return N<1/2.75?7.5625*N*N:N<2/2.75?7.5625*(N-=1.5/2.75)*N+.75:N<2.5/2.75?7.5625*(N-=2.25/2.75)*N+.9375:7.5625*(N-=2.625/2.75)*N+.984375},bounceInOut:function(N){return N<.5?W.bounceIn(N*2)*.5:W.bounceOut(N*2-1)*.5+.5}},X=W;Xe.exports=X},dQei:function(Xe,pe){for(var W={glog:function(N){if(N<1)throw new Error("glog("+N+")");return W.LOG_TABLE[N]},gexp:function(N){for(;N<0;)N+=255;for(;N>=256;)N-=255;return W.EXP_TABLE[N]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},X=0;X<8;X++)W.EXP_TABLE[X]=1<<X;for(var X=8;X<256;X++)W.EXP_TABLE[X]=W.EXP_TABLE[X-4]^W.EXP_TABLE[X-5]^W.EXP_TABLE[X-6]^W.EXP_TABLE[X-8];for(var X=0;X<255;X++)W.LOG_TABLE[W.EXP_TABLE[X]]=X;Xe.exports=W},dWSS:function(Xe,pe,W){var X=W("dQei");function N(_,Q){if(_.length==null)throw new Error(_.length+"/"+Q);for(var R=0;R<_.length&&_[R]==0;)R++;this.num=new Array(_.length-R+Q);for(var E=0;E<_.length-R;E++)this.num[E]=_[E+R]}N.prototype={get:function(_){return this.num[_]},getLength:function(){return this.num.length},multiply:function(_){for(var Q=new Array(this.getLength()+_.getLength()-1),R=0;R<this.getLength();R++)for(var E=0;E<_.getLength();E++)Q[R+E]^=X.gexp(X.glog(this.get(R))+X.glog(_.get(E)));return new N(Q,0)},mod:function(_){if(this.getLength()-_.getLength()<0)return this;for(var Q=X.glog(this.get(0))-X.glog(_.get(0)),R=new Array(this.getLength()),E=0;E<this.getLength();E++)R[E]=this.get(E);for(var E=0;E<_.getLength();E++)R[E]^=X.gexp(X.glog(_.get(E))+Q);return new N(R,0).mod(_)}},Xe.exports=N},dejd:function(Xe,pe,W){},dmUQ:function(Xe,pe,W){"use strict";var X=W("Ff2n"),N=W("rePB"),_=W("1OyB"),Q=W("vuIU"),R=W("Ji7U"),E=W("md7G"),S=W("foSv"),s=W("q1tI"),p=W.n(s),v=W("TSYQ"),i=W.n(v),A=W("4IlW");function O(n,l){var L=Object.keys(n);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(n);l&&(B=B.filter(function(h){return Object.getOwnPropertyDescriptor(n,h).enumerable})),L.push.apply(L,B)}return L}function w(n){for(var l=1;l<arguments.length;l++){var L=arguments[l]!=null?arguments[l]:{};l%2?O(Object(L),!0).forEach(function(B){Object(N.a)(n,B,L[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(L)):O(Object(L)).forEach(function(B){Object.defineProperty(n,B,Object.getOwnPropertyDescriptor(L,B))})}return n}function g(n){var l=C();return function(){var B=Object(S.a)(n),h;if(l){var I=Object(S.a)(this).constructor;h=Reflect.construct(B,arguments,I)}else h=B.apply(this,arguments);return Object(E.a)(this,h)}}function C(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}function c(){}function a(n){n.preventDefault()}var u=function(l){return l.replace(/[^\w.-]+/g,"")},m=200,y=600,T=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(l){return l!=null},M=function(l,L){return L===l||typeof L=="number"&&typeof l=="number"&&isNaN(L)&&isNaN(l)},b=function(n){Object(R.a)(L,n);var l=g(L);function L(B){var h;Object(_.a)(this,L),h=l.call(this,B),h.onKeyDown=function(z){var Z=h.props,Y=Z.onKeyDown,G=Z.onPressEnter;if(z.keyCode===A.a.UP){var ee=h.getRatio(z);h.up(z,ee,null),h.stop()}else if(z.keyCode===A.a.DOWN){var J=h.getRatio(z);h.down(z,J,null),h.stop()}else z.keyCode===A.a.ENTER&&G&&G(z);if(h.recordCursorPosition(),h.lastKeyCode=z.keyCode,Y){for(var oe=arguments.length,se=new Array(oe>1?oe-1:0),Te=1;Te<oe;Te++)se[Te-1]=arguments[Te];Y.apply(void 0,[z].concat(se))}},h.onKeyUp=function(z){var Z=h.props.onKeyUp;if(h.stop(),h.recordCursorPosition(),Z){for(var Y=arguments.length,G=new Array(Y>1?Y-1:0),ee=1;ee<Y;ee++)G[ee-1]=arguments[ee];Z.apply(void 0,[z].concat(G))}},h.onChange=function(z){var Z=h.props.onChange;h.state.focused&&(h.inputting=!0),h.rawInput=h.props.parser(h.getValueFromEvent(z)),h.setState({inputValue:h.rawInput}),Z(h.toNumber(h.rawInput))},h.onMouseUp=function(){var z=h.props.onMouseUp;h.recordCursorPosition(),z&&z.apply(void 0,arguments)},h.onFocus=function(){var z;h.setState({focused:!0}),(z=h.props).onFocus.apply(z,arguments)},h.onBlur=function(){var z=h.props.onBlur;h.inputting=!1,h.setState({focused:!1});var Z=h.getCurrentValidValue(h.state.inputValue),Y=h.setValue(Z,c);if(z){var G=h.input.value,ee=h.getInputDisplayValue({focus:!1,value:Y});h.input.value=ee&&Number(ee),z.apply(void 0,arguments),h.input.value=G}},h.getRatio=function(z){var Z=1;return z.metaKey||z.ctrlKey?Z=.1:z.shiftKey&&(Z=10),Z},h.getFullNum=function(z){return isNaN(z)?z:/e/i.test(String(z))?Number(z).toFixed(18).replace(/\.?0+$/,""):z},h.getPrecision=function(z){if(x(h.props.precision))return h.props.precision;var Z=String(z);if(Z.indexOf("e-")>=0)return parseInt(Z.slice(Z.indexOf("e-")+2),10);var Y=0;return Z.indexOf(".")>=0&&(Y=Z.length-Z.indexOf(".")-1),Y},h.getInputDisplayValue=function(z){var Z=z||h.state,Y=Z.focused,G=Z.inputValue,ee=Z.value,J;Y?J=G:J=h.toPrecisionAsStep(ee),J==null&&(J="");var oe=h.formatWrapper(J);return x(h.props.decimalSeparator)&&(oe=oe.toString().replace(".",h.props.decimalSeparator)),oe},h.recordCursorPosition=function(){try{h.cursorStart=h.input.selectionStart,h.cursorEnd=h.input.selectionEnd,h.currentValue=h.input.value,h.cursorBefore=h.input.value.substring(0,h.cursorStart),h.cursorAfter=h.input.value.substring(h.cursorEnd)}catch(z){}},h.restoreByAfter=function(z){if(z===void 0)return!1;var Z=h.input.value,Y=Z.lastIndexOf(z);if(Y===-1)return!1;var G=h.cursorBefore.length;return h.lastKeyCode===A.a.DELETE&&h.cursorBefore.charAt(G-1)===z[0]?(h.fixCaret(G,G),!0):Y+z.length===Z.length?(h.fixCaret(Y,Y),!0):!1},h.partRestoreByAfter=function(z){return z===void 0?!1:Array.prototype.some.call(z,function(Z,Y){var G=z.substring(Y);return h.restoreByAfter(G)})},h.isNotCompleteNumber=function(z){return isNaN(z)||z===""||z===null||z&&z.toString().indexOf(".")===z.toString().length-1},h.stop=function(){h.autoStepTimer&&clearTimeout(h.autoStepTimer)},h.down=function(z,Z,Y){h.pressingUpOrDown=!0,h.step("down",z,Z,Y)},h.up=function(z,Z,Y){h.pressingUpOrDown=!0,h.step("up",z,Z,Y)},h.saveInput=function(z){h.input=z};var I=B.value;I===void 0&&(I=B.defaultValue),h.state={focused:B.autoFocus};var H=h.getValidValue(h.toNumber(I));return h.state=w(w({},h.state),{},{inputValue:h.toPrecisionAsStep(H),value:H}),h}return Object(Q.a)(L,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(h){var I=this.props,H=I.value,z=I.onChange,Z=I.max,Y=I.min,G=this.state.focused;if(h){if(!M(h.value,H)||!M(h.max,Z)||!M(h.min,Y)){var ee=G?H:this.getValidValue(H),J;this.pressingUpOrDown?J=ee:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(ee),this.setState({value:ee,inputValue:J})}var oe="value"in this.props?H:this.state.value;"max"in this.props&&h.max!==Z&&typeof oe=="number"&&oe>Z&&z&&z(Z),"min"in this.props&&h.min!==Y&&typeof oe=="number"&&oe<Y&&z&&z(Y)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var se=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===A.a.BACKSPACE?se=this.cursorStart-1:this.lastKeyCode===A.a.DELETE&&(se=this.cursorStart):se=this.input.value.length,this.fixCaret(se,se)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case A.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case A.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Te){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(h){var I=h;return I===""?I="":this.isNotCompleteNumber(parseFloat(I))?I=this.state.value:I=this.getValidValue(I),this.toNumber(I)}},{key:"getValueFromEvent",value:function(h){var I=h.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(I=I.replace(this.props.decimalSeparator,".")),I}},{key:"getValidValue",value:function(h){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,z=parseFloat(h);return isNaN(z)?h:(z<I&&(z=I),z>H&&(z=H),z)}},{key:"setValue",value:function(h,I){var H=this.props.precision,z=this.isNotCompleteNumber(parseFloat(h))?null:parseFloat(h),Z=this.state.value,Y=Z===void 0?null:Z,G=this.state.inputValue,ee=G===void 0?null:G,J=typeof z=="number"?z.toFixed(H):"".concat(z),oe=z!==Y||J!=="".concat(ee);return"value"in this.props?(ee=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:ee},I)):this.setState({value:z,inputValue:this.toPrecisionAsStep(h)},I),oe&&this.props.onChange(z),z}},{key:"getMaxPrecision",value:function(h){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,z=H.precision,Z=H.step;if(x(z))return z;var Y=this.getPrecision(I),G=this.getPrecision(Z),ee=this.getPrecision(h);return h?Math.max(ee,Y+G):Y+G}},{key:"getPrecisionFactor",value:function(h){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(h,I);return Math.pow(10,H)}},{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(h){return this.props.formatter?this.props.formatter(h):h}},{key:"toPrecisionAsStep",value:function(h){if(this.isNotCompleteNumber(h)||h==="")return h;var I=Math.abs(this.getMaxPrecision(h));return isNaN(I)?h.toString():Number(h).toFixed(I)}},{key:"toNumber",value:function(h){var I=this.props.precision,H=this.state.focused,z=h&&h.length>16&&H;return this.isNotCompleteNumber(h)||z?h:x(I)?Math.round(h*Math.pow(10,I))/Math.pow(10,I):Number(h)}},{key:"upStep",value:function(h,I){var H=this.props.step,z=this.getPrecisionFactor(h,I),Z=Math.abs(this.getMaxPrecision(h,I)),Y=((z*h+z*H*I)/z).toFixed(Z);return this.toNumber(Y)}},{key:"downStep",value:function(h,I){var H=this.props.step,z=this.getPrecisionFactor(h,I),Z=Math.abs(this.getMaxPrecision(h,I)),Y=((z*h-z*H*I)/z).toFixed(Z);return this.toNumber(Y)}},{key:"step",value:function(h,I){var H=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Z=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var Y=this.props;if(Y.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var ee=this["".concat(h,"Step")](G,z),J=ee>Y.max||ee<Y.min;if(ee>Y.max?ee=Y.max:ee<Y.min&&(ee=Y.min),this.setValue(ee,null),this.setState({focused:!0},function(){H.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){H[h](I,z,!0)},Z?m:y)}},{key:"fixCaret",value:function(h,I){if(h===void 0||I===void 0||!this.input||!this.input.value)return;try{var H=this.input.selectionStart,z=this.input.selectionEnd;(h!==H||I!==z)&&this.input.setSelectionRange(h,I)}catch(Z){}}},{key:"render",value:function(){var h,I=this.props,H=I.prefixCls,z=I.disabled,Z=I.readOnly,Y=I.useTouch,G=I.autoComplete,ee=I.upHandler,J=I.downHandler,oe=I.className,se=I.max,Te=I.min,be=I.style,xe=I.title,Oe=I.onMouseEnter,Ne=I.onMouseLeave,Le=I.onMouseOver,Se=I.onMouseOut,tt=I.required,Bt=I.onClick,De=I.tabIndex,Qe=I.type,it=I.placeholder,Ae=I.id,re=I.inputMode,ie=I.pattern,ce=I.step,Be=I.maxLength,Re=I.autoFocus,ke=I.name,ft=I.onPaste,pt=I.onInput,bt=Object(X.a)(I,["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"]),yt=this.state,_t=yt.value,It=yt.focused,He=i()(H,(h={},Object(N.a)(h,oe,!!oe),Object(N.a)(h,"".concat(H,"-disabled"),z),Object(N.a)(h,"".concat(H,"-focused"),It),h)),Pe={};Object.keys(bt).forEach(function(we){(we.substr(0,5)==="data-"||we.substr(0,5)==="aria-"||we==="role")&&(Pe[we]=bt[we])});var At=!Z&&!z,mt=this.getInputDisplayValue(null),Ze=(_t||_t===0)&&(isNaN(_t)||Number(_t)>=se),ut=(_t||_t===0)&&(isNaN(_t)||Number(_t)<=Te),Ke=Ze||z||Z,Ie=ut||z||Z,Me=i()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(N.a)({},"".concat(H,"-handler-up-disabled"),Ke)),me=i()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(N.a)({},"".concat(H,"-handler-down-disabled"),Ie)),Ee=Y?{onTouchStart:Ke?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ke?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ge=Y?{onTouchStart:Ie?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Ie?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:He,style:be,title:xe,onMouseEnter:Oe,onMouseLeave:Ne,onMouseOver:Le,onMouseOut:Se,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(H,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":Ke,className:Me}),ee||p.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:a})),p.a.createElement("span",Object.assign({unselectable:"on"},ge,{role:"button","aria-label":"Decrease Value","aria-disabled":Ie,className:me}),J||p.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:a}))),p.a.createElement("div",{className:"".concat(H,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Te,"aria-valuemax":se,"aria-valuenow":_t,required:tt,type:Qe,placeholder:it,onPaste:ft,onClick:Bt,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:De,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:At?this.onKeyDown:c,onKeyUp:At?this.onKeyUp:c,autoFocus:Re,maxLength:Be,readOnly:Z,disabled:z,max:se,min:Te,step:ce,name:ke,title:xe,id:Ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(mt),pattern:ie,inputMode:re,onInput:pt},Pe))))}}]),L}(p.a.Component);b.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:T,min:-T,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:u,required:!1,autoComplete:"off"};var o=b,r=pe.a=o},dqUG:function(Xe,pe,W){var X=W("Gev7"),N=W("bYtY"),_=W("6GrX"),Q=W("pzxd"),R=W("gut8"),E=R.ContextCachedBy,S=function(p){X.call(this,p)};S.prototype={constructor:S,type:"text",brush:function(p,v){var i=this.style;this.__dirty&&Q.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var A=i.text;if(A!=null&&(A+=""),!Q.needDrawText(A,i)){p.__attrCachedBy=E.NONE;return}this.setTransform(p),Q.renderText(this,p,A,i,null,v),this.restoreTransform(p)},getBoundingRect:function(){var p=this.style;if(this.__dirty&&Q.normalizeTextStyle(p,!0),!this._rect){var v=p.text;v!=null?v+="":v="";var i=_.getBoundingRect(p.text+"",p.font,p.textAlign,p.textVerticalAlign,p.textPadding,p.textLineHeight,p.rich);if(i.x+=p.x||0,i.y+=p.y||0,Q.getStroke(p.textStroke,p.textStrokeWidth)){var A=p.textStrokeWidth;i.x-=A/2,i.y-=A/2,i.width+=A,i.height+=A}this._rect=i}return this._rect}},N.inherits(S,X);var s=S;Xe.exports=s},f4xo:function(Xe,pe,W){var X=W("nVVt");function N(_){this.mode=X.MODE_8BIT_BYTE,this.data=_}N.prototype={getLength:function(_){return this.data.length},write:function(_){for(var Q=0;Q<this.data.length;Q++)_.put(this.data.charCodeAt(Q),8)}},Xe.exports=N},fW2E:function(Xe,pe){var W={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function X(N,_,Q){return W.hasOwnProperty(_)?Q*=N.dpr:Q}Xe.exports=X},fyJ8:function(Xe,pe,W){"use strict";var X=W("rePB"),N=W("VTBJ"),_=W("Ff2n"),Q=W("U8pU"),R=W("q1tI"),E=W.n(R),S=W("TSYQ"),s=W.n(S),p=W("c+Xe"),v=W("sR1s");function i(C){return C&&Object(Q.a)(C)==="object"&&!Array.isArray(C)&&!R.isValidElement(C)}function A(C){return typeof C=="string"?!0:Object(p.c)(C)}function O(C,c){var a,u=C.prefixCls,m=C.className,y=C.record,T=C.index,x=C.dataIndex,M=C.render,b=C.children,o=C.component,r=o===void 0?"td":o,n=C.colSpan,l=C.rowSpan,L=C.fixLeft,B=C.fixRight,h=C.firstFixLeft,I=C.lastFixLeft,H=C.firstFixRight,z=C.lastFixRight,Z=C.appendNode,Y=C.additionalProps,G=Y===void 0?{}:Y,ee=C.ellipsis,J=C.align,oe=C.rowType,se=C.isSticky,Te="".concat(u,"-cell"),be,xe;if(b)xe=b;else{var Oe=Object(v.b)(y,x);if(xe=Oe,M){var Ne=M(Oe,y,T);i(Ne)?(xe=Ne.children,be=Ne.props):xe=Ne}}Object(Q.a)(xe)==="object"&&!Array.isArray(xe)&&!R.isValidElement(xe)&&(xe=null),ee&&(I||H)&&(xe=R.createElement("span",{className:"".concat(Te,"-content")},xe));var Le=be||{},Se=Le.colSpan,tt=Le.rowSpan,Bt=Le.style,De=Le.className,Qe=Object(_.a)(Le,["colSpan","rowSpan","style","className"]),it=Se!==void 0?Se:n,Ae=tt!==void 0?tt:l;if(it===0||Ae===0)return null;var re={},ie=typeof L=="number",ce=typeof B=="number";ie&&(re.position="sticky",re.left=L),ce&&(re.position="sticky",re.right=B);var Be={};J&&(Be.textAlign=J);var Re,ke=ee===!0?{showTitle:!0}:ee;ke&&(ke.showTitle||oe==="header")&&(typeof xe=="string"||typeof xe=="number"?Re=xe.toString():R.isValidElement(xe)&&typeof xe.props.children=="string"&&(Re=xe.props.children));var ft=Object(N.a)(Object(N.a)(Object(N.a)({title:Re},Qe),G),{},{colSpan:it&&it!==1?it:null,rowSpan:Ae&&Ae!==1?Ae:null,className:s()(Te,m,(a={},Object(X.a)(a,"".concat(Te,"-fix-left"),ie),Object(X.a)(a,"".concat(Te,"-fix-left-first"),h),Object(X.a)(a,"".concat(Te,"-fix-left-last"),I),Object(X.a)(a,"".concat(Te,"-fix-right"),ce),Object(X.a)(a,"".concat(Te,"-fix-right-first"),H),Object(X.a)(a,"".concat(Te,"-fix-right-last"),z),Object(X.a)(a,"".concat(Te,"-ellipsis"),ee),Object(X.a)(a,"".concat(Te,"-with-append"),Z),Object(X.a)(a,"".concat(Te,"-fix-sticky"),(ie||ce)&&se),a),G.className,De),style:Object(N.a)(Object(N.a)(Object(N.a)(Object(N.a)({},G.style),Be),re),Bt),ref:A(r)?c:null});return R.createElement(r,Object.assign({},ft),Z,xe)}var w=R.forwardRef(O);w.displayName="Cell";var g=R.memo(w,function(C,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,C.record):!1});pe.a=g},gut8:function(Xe,pe){var W={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},X=9;pe.ContextCachedBy=W,pe.WILL_BE_RESTORED=X},h7HQ:function(Xe,pe,W){var X=W("y+Vt"),N=W("T6xi"),_=X.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(Q,R){N.buildPath(Q,R,!0)}});Xe.exports=_},hOwI:function(Xe,pe){var W=Math.log(2);function X(_,Q,R,E,S,s){var p=E+"-"+S,v=_.length;if(s.hasOwnProperty(p))return s[p];if(Q===1){var i=Math.round(Math.log((1<<v)-1&~S)/W);return _[R][i]}for(var A=E|1<<R,O=R+1;E&1<<O;)O++;for(var w=0,g=0,C=0;g<v;g++){var c=1<<g;c&S||(w+=(C%2?-1:1)*_[R][g]*X(_,Q-1,O,A,S|c,s),C++)}return s[p]=w,w}function N(_,Q){var R=[[_[0],_[1],1,0,0,0,-Q[0]*_[0],-Q[0]*_[1]],[0,0,0,_[0],_[1],1,-Q[1]*_[0],-Q[1]*_[1]],[_[2],_[3],1,0,0,0,-Q[2]*_[2],-Q[2]*_[3]],[0,0,0,_[2],_[3],1,-Q[3]*_[2],-Q[3]*_[3]],[_[4],_[5],1,0,0,0,-Q[4]*_[4],-Q[4]*_[5]],[0,0,0,_[4],_[5],1,-Q[5]*_[4],-Q[5]*_[5]],[_[6],_[7],1,0,0,0,-Q[6]*_[6],-Q[6]*_[7]],[0,0,0,_[6],_[7],1,-Q[7]*_[6],-Q[7]*_[7]]],E={},S=X(R,8,0,0,0,E);if(S===0)return;for(var s=[],p=0;p<8;p++)for(var v=0;v<8;v++)s[v]==null&&(s[v]=0),s[v]+=((p+v)%2?-1:1)*X(R,7,p===0?1:0,1<<p,1<<v,E)/S*Q[p];return function(i,A,O){var w=A*s[6]+O*s[7]+1;i[0]=(A*s[0]+O*s[1]+s[2])/w,i[1]=(A*s[3]+O*s[4]+s[5])/w}}pe.buildTransformer=N},hW8S:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return Q}),W.d(pe,"c",function(){return R}),W.d(pe,"b",function(){return E});var X=W("VTBJ"),N=W("Ff2n"),_=W("Kwbf"),Q="RC_TABLE_INTERNAL_COL_DEFINE";function R(S){var s=S.expandable,p=Object(N.a)(S,["expandable"]);return"expandable"in S?Object(X.a)(Object(X.a)({},p),s):p}function E(S){return Object.keys(S).reduce(function(s,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(s[p]=S[p]),s},{})}},hX1E:function(Xe,pe){var W=Math.PI*2;function X(N){return N%=W,N<0&&(N+=W),N}pe.normalizeRadian=X},hydK:function(Xe,pe){var W="http://www.w3.org/2000/svg";function X(N){return document.createElementNS(W,N)}pe.createElement=X},hyiK:function(Xe,pe){function W(X,N,_,Q,R,E){if(E>N&&E>Q||E<N&&E<Q)return 0;if(Q===N)return 0;var S=Q<N?1:-1,s=(E-N)/(Q-N);(s===1||s===0)&&(S=Q<N?.5:-.5);var p=s*(_-X)+X;return p===R?Infinity:p>R?S:0}Xe.exports=W},iXp4:function(Xe,pe,W){var X=W("ItGF"),N=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function _(Q){return X.browser.ie&&X.browser.version>=11?function(){var R=this.__clipPaths,E=this.style,S;if(R)for(var s=0;s<R.length;s++){var p=R[s],v=p&&p.shape,i=p&&p.type;if(v&&(i==="sector"&&v.startAngle===v.endAngle||i==="rect"&&(!v.width||!v.height))){for(var A=0;A<N.length;A++)N[A][2]=E[N[A][0]],E[N[A][0]]=N[A][1];S=!0;break}}if(Q.apply(this,arguments),S)for(var A=0;A<N.length;A++)E[N[A][0]]=N[A][2]}:Q}Xe.exports=_},j5sG:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var X=N(W("NohK"));function N(Q){return Q&&Q.__esModule?Q:{default:Q}}var _=function(R){var E=void 0,S=[],s=(0,X.default)(function(){S.forEach(function(O){O(R)})}),p=function(){var w=new ResizeObserver(s);return w.observe(R),s(),w},v=function(w){E||(E=p()),S.indexOf(w)===-1&&S.push(w)},i=function(){E.disconnect(),S=[],E=void 0},A=function(w){var g=S.indexOf(w);g!==-1&&S.splice(g,1),S.length===0&&E&&i()};return{element:R,bind:v,destroy:i,unbind:A}};pe.createSensor=_},jTL6:function(Xe,pe,W){var X=W("y+Vt"),N=X.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(_,Q){var R=Q.cx,E=Q.cy,S=Math.max(Q.r,0),s=Q.startAngle,p=Q.endAngle,v=Q.clockwise,i=Math.cos(s),A=Math.sin(s);_.moveTo(i*S+R,A*S+E),_.arc(R,E,S,s,p,!v)}});Xe.exports=N},juDX:function(Xe,pe,W){W("P47w");var X=W("aX58"),N=X.registerPainter,_=W("3CBa");N("svg",_)},kSUc:function(Xe,pe,W){},"kVK+":function(Xe,pe){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */pe.read=function(W,X,N,_,Q){var R,E,S=Q*8-_-1,s=(1<<S)-1,p=s>>1,v=-7,i=N?Q-1:0,A=N?-1:1,O=W[X+i];for(i+=A,R=O&(1<<-v)-1,O>>=-v,v+=S;v>0;R=R*256+W[X+i],i+=A,v-=8);for(E=R&(1<<-v)-1,R>>=-v,v+=_;v>0;E=E*256+W[X+i],i+=A,v-=8);if(R===0)R=1-p;else{if(R===s)return E?NaN:(O?-1:1)*Infinity;E=E+Math.pow(2,_),R=R-p}return(O?-1:1)*E*Math.pow(2,R-_)},pe.write=function(W,X,N,_,Q,R){var E,S,s,p=R*8-Q-1,v=(1<<p)-1,i=v>>1,A=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=_?0:R-1,w=_?1:-1,g=X<0||X===0&&1/X<0?1:0;for(X=Math.abs(X),isNaN(X)||X===Infinity?(S=isNaN(X)?1:0,E=v):(E=Math.floor(Math.log(X)/Math.LN2),X*(s=Math.pow(2,-E))<1&&(E--,s*=2),E+i>=1?X+=A/s:X+=A*Math.pow(2,1-i),X*s>=2&&(E++,s/=2),E+i>=v?(S=0,E=v):E+i>=1?(S=(X*s-1)*Math.pow(2,Q),E=E+i):(S=X*Math.pow(2,i-1)*Math.pow(2,Q),E=0));Q>=8;W[N+O]=S&255,O+=w,S/=256,Q-=8);for(E=E<<Q|S,p+=Q;p>0;W[N+O]=E&255,O+=w,E/=256,p-=8);W[N+O-w]|=g*128}},lZu9:function(Xe,pe,W){(function(X){X(W("VrN/"),W("1eCo"),W("8EBN"))})(function(X){"use strict";X.defineMode("markdown",function(N,_){var Q=X.getMode(N,"text/html"),R=Q.name=="null";function E(Y){if(X.findModeByName){var G=X.findModeByName(Y);G&&(Y=G.mime||G.mimes[0])}var ee=X.getMode(N,Y);return ee.name=="null"?null:ee}_.highlightFormatting===void 0&&(_.highlightFormatting=!1),_.maxBlockquoteDepth===void 0&&(_.maxBlockquoteDepth=0),_.taskLists===void 0&&(_.taskLists=!1),_.strikethrough===void 0&&(_.strikethrough=!1),_.emoji===void 0&&(_.emoji=!1),_.fencedCodeBlockHighlighting===void 0&&(_.fencedCodeBlockHighlighting=!0),_.fencedCodeBlockDefaultMode===void 0&&(_.fencedCodeBlockDefaultMode="text/plain"),_.xml===void 0&&(_.xml=!0),_.tokenTypeOverrides===void 0&&(_.tokenTypeOverrides={});var S={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 s in S)S.hasOwnProperty(s)&&_.tokenTypeOverrides[s]&&(S[s]=_.tokenTypeOverrides[s]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,v=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,A=_.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,O=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,g=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,C=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,a=" ";function u(Y,G,ee){return G.f=G.inline=ee,ee(Y,G)}function m(Y,G,ee){return G.f=G.block=ee,ee(Y,G)}function y(Y){return!Y||!/\S/.test(Y.string)}function T(Y){if(Y.linkTitle=!1,Y.linkHref=!1,Y.linkText=!1,Y.em=!1,Y.strong=!1,Y.strikethrough=!1,Y.quote=0,Y.indentedCode=!1,Y.f==M){var G=R;if(!G){var ee=X.innerMode(Q,Y.htmlState);G=ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText}G&&(Y.f=n,Y.block=x,Y.htmlState=null)}return Y.trailingSpace=0,Y.trailingSpaceNewLine=!1,Y.prevLine=Y.thisLine,Y.thisLine={stream:null},null}function x(Y,G){var ee=Y.column()===G.indentation,J=y(G.prevLine.stream),oe=G.indentedCode,se=G.prevLine.hr,Te=G.list!==!1,be=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var xe=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,Te)){for(G.list=null;xe<G.listStack[G.listStack.length-1];)G.listStack.pop(),G.listStack.length?G.indentation=G.listStack[G.listStack.length-1]:G.list=!1;G.list!==!1&&(G.indentationDiff=xe-G.listStack[G.listStack.length-1])}var Oe=!J&&!se&&!G.prevLine.header&&(!Te||!oe)&&!G.prevLine.fencedCodeEnd,Ne=(G.list===!1||se||J)&&G.indentation<=be&&Y.match(p),Le=null;if(G.indentationDiff>=4&&(oe||G.prevLine.fencedCodeEnd||G.prevLine.header||J))return Y.skipToEnd(),G.indentedCode=!0,S.code;if(Y.eatSpace())return null;if(ee&&G.indentation<=be&&(Le=Y.match(A))&&Le[1].length<=6)return G.quote=0,G.header=Le[1].length,G.thisLine.header=!0,_.highlightFormatting&&(G.formatting="header"),G.f=G.inline,o(G);if(G.indentation<=be&&Y.eat(">"))return G.quote=ee?1:G.quote+1,_.highlightFormatting&&(G.formatting="quote"),Y.eatSpace(),o(G);if(!Ne&&!G.setext&&ee&&G.indentation<=be&&(Le=Y.match(v))){var Se=Le[1]?"ol":"ul";return G.indentation=xe+Y.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,_.taskLists&&Y.match(i,!1)&&(G.taskList=!0),G.f=G.inline,_.highlightFormatting&&(G.formatting=["list","list-"+Se]),o(G)}else{if(ee&&G.indentation<=be&&(Le=Y.match(g,!0)))return G.quote=0,G.fencedEndRE=new RegExp(Le[1]+"+ *$"),G.localMode=_.fencedCodeBlockHighlighting&&E(Le[2]||_.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=X.startState(G.localMode)),G.f=G.block=b,_.highlightFormatting&&(G.formatting="code-block"),G.code=-1,o(G);if(G.setext||(!Oe||!Te)&&!G.quote&&G.list===!1&&!G.code&&!Ne&&!C.test(Y.string)&&(Le=Y.lookAhead(1))&&(Le=Le.match(O)))return G.setext?(G.header=G.setext,G.setext=0,Y.skipToEnd(),_.highlightFormatting&&(G.formatting="header")):(G.header=Le[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,o(G);if(Ne)return Y.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,S.hr;if(Y.peek()==="[")return u(Y,G,I)}return u(Y,G,G.inline)}function M(Y,G){var ee=Q.token(Y,G.htmlState);if(!R){var J=X.innerMode(Q,G.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||G.md_inside&&Y.current().indexOf(">")>-1)&&(G.f=n,G.block=x,G.htmlState=null)}return ee}function b(Y,G){var ee=G.listStack[G.listStack.length-1]||0,J=G.indentation<ee,oe=ee+3;if(G.fencedEndRE&&G.indentation<=oe&&(J||Y.match(G.fencedEndRE))){_.highlightFormatting&&(G.formatting="code-block");var se;return J||(se=o(G)),G.localMode=G.localState=null,G.block=x,G.f=n,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,J?m(Y,G,G.block):se}else return G.localMode?G.localMode.token(Y,G.localState):(Y.skipToEnd(),S.code)}function o(Y){var G=[];if(Y.formatting){G.push(S.formatting),typeof Y.formatting=="string"&&(Y.formatting=[Y.formatting]);for(var ee=0;ee<Y.formatting.length;ee++)G.push(S.formatting+"-"+Y.formatting[ee]),Y.formatting[ee]==="header"&&G.push(S.formatting+"-"+Y.formatting[ee]+"-"+Y.header),Y.formatting[ee]==="quote"&&(!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=Y.quote?G.push(S.formatting+"-"+Y.formatting[ee]+"-"+Y.quote):G.push("error"))}if(Y.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(Y.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(Y.linkHref?G.push(S.linkHref,"url"):(Y.strong&&G.push(S.strong),Y.em&&G.push(S.em),Y.strikethrough&&G.push(S.strikethrough),Y.emoji&&G.push(S.emoji),Y.linkText&&G.push(S.linkText),Y.code&&G.push(S.code),Y.image&&G.push(S.image),Y.imageAltText&&G.push(S.imageAltText,"link"),Y.imageMarker&&G.push(S.imageMarker)),Y.header&&G.push(S.header,S.header+"-"+Y.header),Y.quote&&(G.push(S.quote),!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=Y.quote?G.push(S.quote+"-"+Y.quote):G.push(S.quote+"-"+_.maxBlockquoteDepth)),Y.list!==!1){var J=(Y.listStack.length-1)%3;J?J===1?G.push(S.list2):G.push(S.list3):G.push(S.list1)}return Y.trailingSpaceNewLine?G.push("trailing-space-new-line"):Y.trailingSpace&&G.push("trailing-space-"+(Y.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function r(Y,G){return Y.match(w,!0)?o(G):void 0}function n(Y,G){var ee=G.text(Y,G);if(typeof ee!="undefined")return ee;if(G.list)return G.list=null,o(G);if(G.taskList){var J=Y.match(i,!0)[1]===" ";return J?G.taskOpen=!0:G.taskClosed=!0,_.highlightFormatting&&(G.formatting="task"),G.taskList=!1,o(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&Y.match(/^#+$/,!0))return _.highlightFormatting&&(G.formatting="header"),o(G);var oe=Y.next();if(G.linkTitle){G.linkTitle=!1;var se=oe;oe==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(Y.match(new RegExp(Te),!0))return S.linkHref}if(oe==="`"){var be=G.formatting;_.highlightFormatting&&(G.formatting="code"),Y.eatWhile("`");var xe=Y.current().length;if(G.code==0&&(!G.quote||xe==1))return G.code=xe,o(G);if(xe==G.code){var Oe=o(G);return G.code=0,Oe}else return G.formatting=be,o(G)}else if(G.code)return o(G);if(oe==="\\"&&(Y.next(),_.highlightFormatting)){var Ne=o(G),Le=S.formatting+"-escape";return Ne?Ne+" "+Le:Le}if(oe==="!"&&Y.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,_.highlightFormatting&&(G.formatting="image"),o(G);if(oe==="["&&G.imageMarker&&Y.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,_.highlightFormatting&&(G.formatting="image"),o(G);if(oe==="]"&&G.imageAltText){_.highlightFormatting&&(G.formatting="image");var Ne=o(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=L,Ne}if(oe==="["&&!G.image)return G.linkText&&Y.match(/^.*?\]/)||(G.linkText=!0,_.highlightFormatting&&(G.formatting="link")),o(G);if(oe==="]"&&G.linkText){_.highlightFormatting&&(G.formatting="link");var Ne=o(G);return G.linkText=!1,G.inline=G.f=Y.match(/\(.*?\)| ?\[.*?\]/,!1)?L:n,Ne}if(oe==="<"&&Y.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=l,_.highlightFormatting&&(G.formatting="link");var Ne=o(G);return Ne?Ne+=" ":Ne="",Ne+S.linkInline}if(oe==="<"&&Y.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=l,_.highlightFormatting&&(G.formatting="link");var Ne=o(G);return Ne?Ne+=" ":Ne="",Ne+S.linkEmail}if(_.xml&&oe==="<"&&Y.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Se=Y.string.indexOf(">",Y.pos);if(Se!=-1){var tt=Y.string.substring(Y.start,Se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(G.md_inside=!0)}return Y.backUp(1),G.htmlState=X.startState(Q),m(Y,G,M)}if(_.xml&&oe==="<"&&Y.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var Bt=1,De=Y.pos==1?" ":Y.string.charAt(Y.pos-2);Bt<3&&Y.eat(oe);)Bt++;var Qe=Y.peek()||" ",it=!/\s/.test(Qe)&&(!c.test(Qe)||/\s/.test(De)||c.test(De)),Ae=!/\s/.test(De)&&(!c.test(De)||/\s/.test(Qe)||c.test(Qe)),re=null,ie=null;if(Bt%2&&(!G.em&&it&&(oe==="*"||!Ae||c.test(De))?re=!0:G.em==oe&&Ae&&(oe==="*"||!it||c.test(Qe))&&(re=!1)),Bt>1&&(!G.strong&&it&&(oe==="*"||!Ae||c.test(De))?ie=!0:G.strong==oe&&Ae&&(oe==="*"||!it||c.test(Qe))&&(ie=!1)),ie!=null||re!=null){_.highlightFormatting&&(G.formatting=re==null?"strong":ie==null?"em":"strong em"),re===!0&&(G.em=oe),ie===!0&&(G.strong=oe);var Oe=o(G);return re===!1&&(G.em=!1),ie===!1&&(G.strong=!1),Oe}}else if(oe===" "&&(Y.eat("*")||Y.eat("_"))){if(Y.peek()===" ")return o(G);Y.backUp(1)}if(_.strikethrough){if(oe==="~"&&Y.eatWhile(oe)){if(G.strikethrough){_.highlightFormatting&&(G.formatting="strikethrough");var Oe=o(G);return G.strikethrough=!1,Oe}else if(Y.match(/^[^\s]/,!1))return G.strikethrough=!0,_.highlightFormatting&&(G.formatting="strikethrough"),o(G)}else if(oe===" "&&Y.match(/^~~/,!0)){if(Y.peek()===" ")return o(G);Y.backUp(2)}}if(_.emoji&&oe===":"&&Y.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,_.highlightFormatting&&(G.formatting="emoji");var ce=o(G);return G.emoji=!1,ce}return oe===" "&&(Y.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),o(G)}function l(Y,G){var ee=Y.next();if(ee===">"){G.f=G.inline=n,_.highlightFormatting&&(G.formatting="link");var J=o(G);return J?J+=" ":J="",J+S.linkInline}return Y.match(/^[^>]+/,!0),S.linkInline}function L(Y,G){if(Y.eatSpace())return null;var ee=Y.next();return ee==="("||ee==="["?(G.f=G.inline=h(ee==="("?")":"]"),_.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,o(G)):"error"}var B={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function h(Y){return function(G,ee){var J=G.next();if(J===Y){ee.f=ee.inline=n,_.highlightFormatting&&(ee.formatting="link-string");var oe=o(ee);return ee.linkHref=!1,oe}return G.match(B[Y]),ee.linkHref=!0,o(ee)}}function I(Y,G){return Y.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=H,Y.next(),_.highlightFormatting&&(G.formatting="link"),G.linkText=!0,o(G)):u(Y,G,n)}function H(Y,G){if(Y.match(/^\]:/,!0)){G.f=G.inline=z,_.highlightFormatting&&(G.formatting="link");var ee=o(G);return G.linkText=!1,ee}return Y.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function z(Y,G){return Y.eatSpace()?null:(Y.match(/^[^\s]+/,!0),Y.peek()===void 0?G.linkTitle=!0:Y.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=n,S.linkHref+" url")}var Z={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:n,text:r,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(Y){return{f:Y.f,prevLine:Y.prevLine,thisLine:Y.thisLine,block:Y.block,htmlState:Y.htmlState&&X.copyState(Q,Y.htmlState),indentation:Y.indentation,localMode:Y.localMode,localState:Y.localMode?X.copyState(Y.localMode,Y.localState):null,inline:Y.inline,text:Y.text,formatting:!1,linkText:Y.linkText,linkTitle:Y.linkTitle,linkHref:Y.linkHref,code:Y.code,em:Y.em,strong:Y.strong,strikethrough:Y.strikethrough,emoji:Y.emoji,header:Y.header,setext:Y.setext,hr:Y.hr,taskList:Y.taskList,list:Y.list,listStack:Y.listStack.slice(0),quote:Y.quote,indentedCode:Y.indentedCode,trailingSpace:Y.trailingSpace,trailingSpaceNewLine:Y.trailingSpaceNewLine,md_inside:Y.md_inside,fencedEndRE:Y.fencedEndRE}},token:function(Y,G){if(G.formatting=!1,Y!=G.thisLine.stream){if(G.header=0,G.hr=!1,Y.match(/^\s*$/,!0))return T(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:Y},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=M)){var ee=Y.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(G.indentation=ee,G.indentationDiff=null,ee>0)return null}}return G.f(Y,G)},innerMode:function(Y){return Y.block==M?{state:Y.htmlState,mode:Q}:Y.localState?{state:Y.localState,mode:Y.localMode}:{state:Y,mode:Z}},indent:function(Y,G,ee){return Y.block==M&&Q.indent?Q.indent(Y.htmlState,G,ee):Y.localState&&Y.localMode.indent?Y.localMode.indent(Y.localState,G,ee):X.Pass},blankLine:T,getType:o,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Z},"xml"),X.defineMIME("text/markdown","markdown"),X.defineMIME("text/x-markdown","markdown")})},loD1:function(Xe,pe){function W(X,N,_,Q,R,E,S){if(R===0)return!1;var s=R,p=0,v=X;if(S>N+s&&S>Q+s||S<N-s&&S<Q-s||E>X+s&&E>_+s||E<X-s&&E<_-s)return!1;if(X!==_)p=(N-Q)/(X-_),v=(X*Q-_*N)/(X-_);else return Math.abs(E-X)<=s/2;var i=p*E-S+v,A=i*i/(p*p+1);return A<=s/2*s/2}pe.containStroke=W},mFDi:function(Xe,pe,W){var X=W("QBsz"),N=W("Fofx"),_=X.applyTransform,Q=Math.min,R=Math.max;function E(s,p,v,i){v<0&&(s=s+v,v=-v),i<0&&(p=p+i,i=-i),this.x=s,this.y=p,this.width=v,this.height=i}E.prototype={constructor:E,union:function(s){var p=Q(s.x,this.x),v=Q(s.y,this.y);this.width=R(s.x+s.width,this.x+this.width)-p,this.height=R(s.y+s.height,this.y+this.height)-v,this.x=p,this.y=v},applyTransform:function(){var s=[],p=[],v=[],i=[];return function(A){if(!A)return;s[0]=v[0]=this.x,s[1]=i[1]=this.y,p[0]=i[0]=this.x+this.width,p[1]=v[1]=this.y+this.height,_(s,s,A),_(p,p,A),_(v,v,A),_(i,i,A),this.x=Q(s[0],p[0],v[0],i[0]),this.y=Q(s[1],p[1],v[1],i[1]);var O=R(s[0],p[0],v[0],i[0]),w=R(s[1],p[1],v[1],i[1]);this.width=O-this.x,this.height=w-this.y}}(),calculateTransform:function(s){var p=this,v=s.width/p.width,i=s.height/p.height,A=N.create();return N.translate(A,A,[-p.x,-p.y]),N.scale(A,A,[v,i]),N.translate(A,A,[s.x,s.y]),A},intersect:function(s){if(!s)return!1;s instanceof E||(s=E.create(s));var p=this,v=p.x,i=p.x+p.width,A=p.y,O=p.y+p.height,w=s.x,g=s.x+s.width,C=s.y,c=s.y+s.height;return!(i<w||g<v||O<C||c<A)},contain:function(s,p){var v=this;return s>=v.x&&s<=v.x+v.width&&p>=v.y&&p<=v.y+v.height},clone:function(){return new E(this.x,this.y,this.width,this.height)},copy:function(s){this.x=s.x,this.y=s.y,this.width=s.width,this.height=s.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},E.create=function(s){return new E(s.x,s.y,s.width,s.height)};var S=E;Xe.exports=S},mLcG:function(Xe,pe){var W=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(X){setTimeout(X,16)};Xe.exports=W},n1HI:function(Xe,pe,W){var X=W("hX1E"),N=X.normalizeRadian,_=Math.PI*2;function Q(R,E,S,s,p,v,i,A,O){if(i===0)return!1;var w=i;A-=R,O-=E;var g=Math.sqrt(A*A+O*O);if(g-w>S||g+w<S)return!1;if(Math.abs(s-p)%_<1e-4)return!0;if(v){var C=s;s=N(p),p=N(C)}else s=N(s),p=N(p);s>p&&(p+=_);var c=Math.atan2(O,A);return c<0&&(c+=_),c>=s&&c<=p||c+_>=s&&c+_<=p}pe.containStroke=Q},n6Mw:function(Xe,pe,W){var X=W("SrGk"),N=W("bYtY"),_=W("Fofx");function Q(E,S){X.call(this,E,S,"clipPath","__clippath_in_use__")}N.inherits(Q,X),Q.prototype.update=function(E){var S=this.getSvgElement(E);S&&this.updateDom(S,E.__clipPaths,!1);var s=this.getTextSvgElement(E);s&&this.updateDom(s,E.__clipPaths,!0),this.markUsed(E)},Q.prototype.updateDom=function(E,S,s){if(S&&S.length>0){var p=this.getDefs(!0),v=S[0],i,A,O=s?"_textDom":"_dom";v[O]?(A=v[O].getAttribute("id"),i=v[O],p.contains(i)||p.appendChild(i)):(A="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",A),p.appendChild(i),v[O]=i);var w=this.getSvgProxy(v);if(v.transform&&v.parent.invTransform&&!s){var g=Array.prototype.slice.call(v.transform);_.mul(v.transform,v.parent.invTransform,v.transform),w.brush(v),v.transform=g}else w.brush(v);var C=this.getSvgElement(v);i.innerHTML="",i.appendChild(C.cloneNode()),E.setAttribute("clip-path","url(#"+A+")"),S.length>1&&this.updateDom(i,S.slice(1),s)}else E&&E.setAttribute("clip-path","none")},Q.prototype.markUsed=function(E){var S=this;E.__clipPaths&&N.each(E.__clipPaths,function(s){s._dom&&X.prototype.markUsed.call(S,s._dom),s._textDom&&X.prototype.markUsed.call(S,s._textDom)})};var R=Q;Xe.exports=R},n6Qo:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return s});var X=W("q1tI"),N=W("biw7"),_=W("fyJ8");function Q(p){var v=p.className,i=p.index,A=p.children,O=p.colSpan,w=p.rowSpan,g=X.useContext(N.a),C=g.prefixCls,c=g.fixedInfoList,a=c[i];return X.createElement(_.a,Object.assign({className:v,index:i,component:"td",prefixCls:C,record:null,dataIndex:null,render:function(){return{children:A,props:{colSpan:O,rowSpan:w}}}},a))}function R(p){return X.createElement("tr",Object.assign({},p))}function E(p){var v=p.children,i=X.useContext(N.a),A=i.prefixCls;return X.createElement("tfoot",{className:"".concat(A,"-summary")},v)}var S=pe.b=E,s={Cell:Q,Row:R}},nCxF:function(Xe,pe,W){var X=W("QBsz"),N=X.min,_=X.max,Q=X.scale,R=X.distance,E=X.add,S=X.clone,s=X.sub;function p(v,i,A,O){var w=[],g=[],C=[],c=[],a,u,m,y;if(O){m=[Infinity,Infinity],y=[-Infinity,-Infinity];for(var T=0,x=v.length;T<x;T++)N(m,m,v[T]),_(y,y,v[T]);N(m,m,O[0]),_(y,y,O[1])}for(var T=0,x=v.length;T<x;T++){var M=v[T];if(A)a=v[T?T-1:x-1],u=v[(T+1)%x];else if(T===0||T===x-1){w.push(S(v[T]));continue}else a=v[T-1],u=v[T+1];s(g,u,a),Q(g,g,i);var b=R(M,a),o=R(M,u),r=b+o;r!==0&&(b/=r,o/=r),Q(C,g,-b),Q(c,g,o);var n=E([],M,C),l=E([],M,c);O&&(_(n,n,m),N(n,n,y),_(l,l,m),N(l,l,y)),w.push(n),w.push(l)}return A&&w.push(w.shift()),w}Xe.exports=p},nPnh:function(Xe,pe){var W=Math.round;function X(Q,R,E){if(!R)return;var S=R.x1,s=R.x2,p=R.y1,v=R.y2;Q.x1=S,Q.x2=s,Q.y1=p,Q.y2=v;var i=E&&E.lineWidth;if(!i)return;W(S*2)===W(s*2)&&(Q.x1=Q.x2=_(S,i,!0)),W(p*2)===W(v*2)&&(Q.y1=Q.y2=_(p,i,!0))}function N(Q,R,E){if(!R)return;var S=R.x,s=R.y,p=R.width,v=R.height;Q.x=S,Q.y=s,Q.width=p,Q.height=v;var i=E&&E.lineWidth;if(!i)return;Q.x=_(S,i,!0),Q.y=_(s,i,!0),Q.width=Math.max(_(S+p,i,!1)-Q.x,p===0?0:1),Q.height=Math.max(_(s+v,i,!1)-Q.y,v===0?0:1)}function _(Q,R,E){if(!R)return Q;var S=W(Q*2);return(S+W(R))%2===0?S/2:(S+(E?1:-1))/2}pe.subPixelOptimizeLine=X,pe.subPixelOptimizeRect=N,pe.subPixelOptimize=_},nVVt:function(Xe,pe){Xe.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},ni6a:function(Xe,pe,W){var X=W("pzxd"),N=W("mFDi"),_=W("gut8"),Q=_.WILL_BE_RESTORED,R=new N,E=function(){};E.prototype={constructor:E,drawRectText:function(s,p){var v=this.style;p=v.textRect||p,this.__dirty&&X.normalizeTextStyle(v,!0);var i=v.text;if(i!=null&&(i+=""),!X.needDrawText(i,v))return;s.save();var A=this.transform;v.transformText?this.setTransform(s):A&&(R.copy(p),R.applyTransform(A),p=R),X.renderText(this,s,i,v,p,Q),s.restore()}};var S=E;Xe.exports=S},osHv:function(Xe,pe,W){(function(X){X(W("VrN/"))})(function(X){"use strict";var N=X.Pos;function _(c,a){return c.line-a.line||c.ch-a.ch}var Q="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",R=Q+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",E=new RegExp("<(/?)(["+Q+"]["+R+"]*)","g");function S(c,a,u,m){this.line=a,this.ch=u,this.cm=c,this.text=c.getLine(a),this.min=m?Math.max(m.from,c.firstLine()):c.firstLine(),this.max=m?Math.min(m.to-1,c.lastLine()):c.lastLine()}function s(c,a){var u=c.cm.getTokenTypeAt(N(c.line,a));return u&&/\btag\b/.test(u)}function p(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function v(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function i(c){for(;;){var a=c.text.indexOf(">",c.ch);if(a==-1){if(p(c))continue;return}if(!s(c,a+1)){c.ch=a+1;continue}var u=c.text.lastIndexOf("/",a),m=u>-1&&!/\S/.test(c.text.slice(u+1,a));return c.ch=a+1,m?"selfClose":"regular"}}function A(c){for(;;){var a=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(a==-1){if(v(c))continue;return}if(!s(c,a+1)){c.ch=a;continue}E.lastIndex=a,c.ch=a;var u=E.exec(c.text);if(u&&u.index==a)return u}}function O(c){for(;;){E.lastIndex=c.ch;var a=E.exec(c.text);if(!a){if(p(c))continue;return}if(!s(c,a.index+1)){c.ch=a.index+1;continue}return c.ch=a.index+a[0].length,a}}function w(c){for(;;){var a=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(a==-1){if(v(c))continue;return}if(!s(c,a+1)){c.ch=a;continue}var u=c.text.lastIndexOf("/",a),m=u>-1&&!/\S/.test(c.text.slice(u+1,a));return c.ch=a+1,m?"selfClose":"regular"}}function g(c,a){for(var u=[];;){var m=O(c),y,T=c.line,x=c.ch-(m?m[0].length:0);if(!m||!(y=i(c)))return;if(y=="selfClose")continue;if(m[1]){for(var M=u.length-1;M>=0;--M)if(u[M]==m[2]){u.length=M;break}if(M<0&&(!a||a==m[2]))return{tag:m[2],from:N(T,x),to:N(c.line,c.ch)}}else u.push(m[2])}}function C(c,a){for(var u=[];;){var m=w(c);if(!m)return;if(m=="selfClose"){A(c);continue}var y=c.line,T=c.ch,x=A(c);if(!x)return;if(x[1])u.push(x[2]);else{for(var M=u.length-1;M>=0;--M)if(u[M]==x[2]){u.length=M;break}if(M<0&&(!a||a==x[2]))return{tag:x[2],from:N(c.line,c.ch),to:N(y,T)}}}}X.registerHelper("fold","xml",function(c,a){for(var u=new S(c,a.line,0);;){var m=O(u);if(!m||u.line!=a.line)return;var y=i(u);if(!y)return;if(!m[1]&&y!="selfClose"){var T=N(u.line,u.ch),x=g(u,m[2]);return x&&_(x.from,T)>0?{from:T,to:x.from}:null}}}),X.findMatchingTag=function(c,a,u){var m=new S(c,a.line,a.ch,u);if(m.text.indexOf(">")==-1&&m.text.indexOf("<")==-1)return;var y=i(m),T=y&&N(m.line,m.ch),x=y&&A(m);if(!y||!x||_(m,a)>0)return;var M={from:N(m.line,m.ch),to:T,tag:x[2]};return y=="selfClose"?{open:M,close:null,at:"open"}:x[1]?{open:C(m,x[2]),close:M,at:"close"}:(m=new S(c,T.line,T.ch,u),{open:M,close:g(m,x[2]),at:"open"})},X.findEnclosingTag=function(c,a,u,m){for(var y=new S(c,a.line,a.ch,u);;){var T=C(y,m);if(!T)break;var x=new S(c,a.line,a.ch,u),M=g(x,T.tag);if(M)return{open:T,close:M}}},X.scanForClosingTag=function(c,a,u,m){var y=new S(c,a.line,a.ch,m?{from:0,to:m}:null);return g(y,u)}})},p5ED:function(Xe,pe,W){"use strict";var X=W("+L6B"),N=W("2/Rp"),_=W("5Dmo"),Q=W("3S7+"),R=W("k1fw"),E=W("tJVT"),S=W("q1tI"),s=W.n(S),p=W("vHTk"),v=W.n(p),i=W("yEEn"),A=W("ZW9T"),O=W("1vsH");pe.a=function(w){var g=w.name,C=w.data,c=w.theme,a=w.type,u=w.filename,m=w.monacoEditor,y=w.className,T=w.style,x=w.close,M=w.onClose,b=w.hasMask,o=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),r=Object(E.a)(o,2),n=r[0],l=r[1],L=Object(S.useState)(""),B=Object(E.a)(L,2),h=B[0],I=B[1],H=Object(S.useRef)();u&&(m.filename=u),Object(S.useEffect)(function(){var Y,G,ee=(Y=document.cookie)===null||Y===void 0||((G=Y.replace(/\s/g,""))===null||G===void 0)?void 0:G.split(";");ee==null||ee.map(function(J){var oe=J.split("=");oe[0]==="_educoder_session"&&I(oe[1])})},[]);var z=function(){if(C.startsWith("http")||C.startsWith("/")){Z();return}Object(O.x)(u||"educoder",C,u)},Z=function(){Object(O.v)(u||g,C)};return console.log("data:",C,"fileanme:",u," name:",g),s.a.createElement("div",{style:Object(R.a)({},T||{}),className:"".concat(b&&v.a.bgBlack," ").concat(a?v.a.wrp:"hide")},x&&s.a.createElement("div",{className:v.a.close,ref:H},s.a.createElement(Q.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return H.current}},s.a.createElement("span",{onClick:Z},s.a.createElement("i",{className:"icon-quxiaozhiding"}))),s.a.createElement(Q.a,{title:"\u5173\u95ED",getPopupContainer:function(){return H.current}},s.a.createElement("span",{className:"",onClick:M},s.a.createElement("i",{className:"icon-guanbi1"})))),s.a.createElement("div",{className:"".concat(v.a[y]," ").concat(y," ").concat(v.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&s.a.createElement(A.b,m)),a==="audio"&&s.a.createElement("audio",{src:"".concat(C!=null&&C.startsWith("/")||(C==null?void 0:C.indexOf("https://"))>-1?C:"data:audio/mp3;base64,").concat(C),autoPlay:!0}),a==="video"&&s.a.createElement(s.a.Fragment,null,C!=null&&C.startsWith("/")?s.a.createElement("video",{controls:!0,src:"".concat(C),autoPlay:!0}):s.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})),a==="html"&&s.a.createElement("iframe",{src:C+"&disposition=inline"}),a==="pdf"&&s.a.createElement("embed",{className:v.a.embed,src:C}),a==="image"&&s.a.createElement(s.a.Fragment,null,s.a.createElement("img",{src:"".concat(C!=null&&C.startsWith("/")||(C==null?void 0:C.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(C)})),a==="other"&&s.a.createElement("div",null,s.a.createElement(N.a,{type:"primary",size:"large",onClick:z},s.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&s.a.createElement(N.a,{type:"primary",size:"large",onClick:z},s.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Xe,pe,W){},pzxd:function(Xe,pe,W){var X=W("bYtY"),N=X.retrieve2,_=X.retrieve3,Q=X.each,R=X.normalizeCssArray,E=X.isString,S=X.isObject,s=W("6GrX"),p=W("VpOo"),v=W("Xnb7"),i=W("fW2E"),A=W("gut8"),O=A.ContextCachedBy,w=A.WILL_BE_RESTORED,g=s.DEFAULT_FONT,C={left:1,right:1,center:1},c={top:1,bottom:1,middle:1},a=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],u={},m={};function y(ee){return T(ee),Q(ee.rich,T),ee}function T(ee){if(ee){ee.font=s.makeFont(ee);var J=ee.textAlign;J==="middle"&&(J="center"),ee.textAlign=J==null||C[J]?J:"left";var oe=ee.textVerticalAlign||ee.textBaseline;oe==="center"&&(oe="middle"),ee.textVerticalAlign=oe==null||c[oe]?oe:"top";var se=ee.textPadding;se&&(ee.textPadding=R(ee.textPadding))}}function x(ee,J,oe,se,Te,be){se.rich?b(ee,J,oe,se,Te,be):M(ee,J,oe,se,Te,be)}function M(ee,J,oe,se,Te,be){"use strict";var xe=l(se),Oe,Ne=!1,Le=J.__attrCachedBy===O.PLAIN_TEXT;be!==w?(be&&(Oe=be.style,Ne=!xe&&Le&&Oe),J.__attrCachedBy=xe?O.NONE:O.PLAIN_TEXT):Le&&(J.__attrCachedBy=O.NONE);var Se=se.font||g;(!Ne||Se!==(Oe.font||g))&&(J.font=Se);var tt=ee.__computedFont;ee.__styleFont!==Se&&(ee.__styleFont=Se,tt=ee.__computedFont=J.font);var Bt=se.textPadding,De=se.textLineHeight,Qe=ee.__textCotentBlock;(!Qe||ee.__dirtyText)&&(Qe=ee.__textCotentBlock=s.parsePlainText(oe,tt,Bt,De,se.truncate));var it=Qe.outerHeight,Ae=Qe.lines,re=Qe.lineHeight,ie=h(m,ee,se,Te),ce=ie.baseX,Be=ie.baseY,Re=ie.textAlign||"left",ke=ie.textVerticalAlign;r(J,se,Te,ce,Be);var ft=s.adjustTextY(Be,it,ke),pt=ce,bt=ft;if(xe||Bt){var yt=s.getWidth(oe,tt),_t=yt;Bt&&(_t+=Bt[1]+Bt[3]);var It=s.adjustTextX(ce,_t,Re);xe&&L(ee,J,se,It,ft,_t,it),Bt&&(pt=Y(ce,Re,Bt),bt+=Bt[0])}J.textAlign=Re,J.textBaseline="middle",J.globalAlpha=se.opacity||1;for(var He=0;He<a.length;He++){var Pe=a[He],At=Pe[0],mt=Pe[1],Ze=se[At];(!Ne||Ze!==Oe[At])&&(J[mt]=i(J,mt,Ze||Pe[2]))}bt+=re/2;var ut=se.textStrokeWidth,Ke=Ne?Oe.textStrokeWidth:null,Ie=!Ne||ut!==Ke,Me=!Ne||Ie||se.textStroke!==Oe.textStroke,me=H(se.textStroke,ut),Ee=z(se.textFill);if(me&&(Ie&&(J.lineWidth=ut),Me&&(J.strokeStyle=me)),Ee&&((!Ne||se.textFill!==Oe.textFill)&&(J.fillStyle=Ee)),Ae.length===1)me&&J.strokeText(Ae[0],pt,bt),Ee&&J.fillText(Ae[0],pt,bt);else for(var He=0;He<Ae.length;He++)me&&J.strokeText(Ae[He],pt,bt),Ee&&J.fillText(Ae[He],pt,bt),bt+=re}function b(ee,J,oe,se,Te,be){be!==w&&(J.__attrCachedBy=O.NONE);var xe=ee.__textCotentBlock;(!xe||ee.__dirtyText)&&(xe=ee.__textCotentBlock=s.parseRichText(oe,se)),o(ee,J,xe,se,Te)}function o(ee,J,oe,se,Te){var be=oe.width,xe=oe.outerWidth,Oe=oe.outerHeight,Ne=se.textPadding,Le=h(m,ee,se,Te),Se=Le.baseX,tt=Le.baseY,Bt=Le.textAlign,De=Le.textVerticalAlign;r(J,se,Te,Se,tt);var Qe=s.adjustTextX(Se,xe,Bt),it=s.adjustTextY(tt,Oe,De),Ae=Qe,re=it;Ne&&(Ae+=Ne[3],re+=Ne[0]);var ie=Ae+be;l(se)&&L(ee,J,se,Qe,it,xe,Oe);for(var ce=0;ce<oe.lines.length;ce++){for(var Be=oe.lines[ce],Re=Be.tokens,ke=Re.length,ft=Be.lineHeight,pt=Be.width,bt=0,yt=Ae,_t=ie,It=ke-1,He;bt<ke&&(He=Re[bt],!He.textAlign||He.textAlign==="left");)n(ee,J,He,se,ft,re,yt,"left"),pt-=He.width,yt+=He.width,bt++;for(;It>=0&&(He=Re[It],He.textAlign==="right");)n(ee,J,He,se,ft,re,_t,"right"),pt-=He.width,_t-=He.width,It--;for(yt+=(be-(yt-Ae)-(ie-_t)-pt)/2;bt<=It;)He=Re[bt],n(ee,J,He,se,ft,re,yt+He.width/2,"center"),yt+=He.width,bt++;re+=ft}}function r(ee,J,oe,se,Te){if(oe&&J.textRotation){var be=J.textOrigin;be==="center"?(se=oe.width/2+oe.x,Te=oe.height/2+oe.y):be&&(se=be[0]+oe.x,Te=be[1]+oe.y),ee.translate(se,Te),ee.rotate(-J.textRotation),ee.translate(-se,-Te)}}function n(ee,J,oe,se,Te,be,xe,Oe){var Ne=se.rich[oe.styleName]||{};Ne.text=oe.text;var Le=oe.textVerticalAlign,Se=be+Te/2;Le==="top"?Se=be+oe.height/2:Le==="bottom"&&(Se=be+Te-oe.height/2),!oe.isLineHolder&&l(Ne)&&L(ee,J,Ne,Oe==="right"?xe-oe.width:Oe==="center"?xe-oe.width/2:xe,Se-oe.height/2,oe.width,oe.height);var tt=oe.textPadding;tt&&(xe=Y(xe,Oe,tt),Se-=oe.height/2-tt[2]-oe.textHeight/2),I(J,"shadowBlur",_(Ne.textShadowBlur,se.textShadowBlur,0)),I(J,"shadowColor",Ne.textShadowColor||se.textShadowColor||"transparent"),I(J,"shadowOffsetX",_(Ne.textShadowOffsetX,se.textShadowOffsetX,0)),I(J,"shadowOffsetY",_(Ne.textShadowOffsetY,se.textShadowOffsetY,0)),I(J,"textAlign",Oe),I(J,"textBaseline","middle"),I(J,"font",oe.font||g);var Bt=H(Ne.textStroke||se.textStroke,Qe),De=z(Ne.textFill||se.textFill),Qe=N(Ne.textStrokeWidth,se.textStrokeWidth);Bt&&(I(J,"lineWidth",Qe),I(J,"strokeStyle",Bt),J.strokeText(oe.text,xe,Se)),De&&(I(J,"fillStyle",De),J.fillText(oe.text,xe,Se))}function l(ee){return!!(ee.textBackgroundColor||ee.textBorderWidth&&ee.textBorderColor)}function L(ee,J,oe,se,Te,be,xe){var Oe=oe.textBackgroundColor,Ne=oe.textBorderWidth,Le=oe.textBorderColor,Se=E(Oe);if(I(J,"shadowBlur",oe.textBoxShadowBlur||0),I(J,"shadowColor",oe.textBoxShadowColor||"transparent"),I(J,"shadowOffsetX",oe.textBoxShadowOffsetX||0),I(J,"shadowOffsetY",oe.textBoxShadowOffsetY||0),Se||Ne&&Le){J.beginPath();var tt=oe.textBorderRadius;tt?p.buildPath(J,{x:se,y:Te,width:be,height:xe,r:tt}):J.rect(se,Te,be,xe),J.closePath()}if(Se)if(I(J,"fillStyle",Oe),oe.fillOpacity!=null){var Bt=J.globalAlpha;J.globalAlpha=oe.fillOpacity*oe.opacity,J.fill(),J.globalAlpha=Bt}else J.fill();else if(S(Oe)){var De=Oe.image;De=v.createOrUpdateImage(De,null,ee,B,Oe),De&&v.isImageReady(De)&&J.drawImage(De,se,Te,be,xe)}if(Ne&&Le)if(I(J,"lineWidth",Ne),I(J,"strokeStyle",Le),oe.strokeOpacity!=null){var Bt=J.globalAlpha;J.globalAlpha=oe.strokeOpacity*oe.opacity,J.stroke(),J.globalAlpha=Bt}else J.stroke()}function B(ee,J){J.image=ee}function h(ee,J,oe,se){var Te=oe.x||0,be=oe.y||0,xe=oe.textAlign,Oe=oe.textVerticalAlign;if(se){var Ne=oe.textPosition;if(Ne instanceof Array)Te=se.x+Z(Ne[0],se.width),be=se.y+Z(Ne[1],se.height);else{var Le=J&&J.calculateTextPosition?J.calculateTextPosition(u,oe,se):s.calculateTextPosition(u,oe,se);Te=Le.x,be=Le.y,xe=xe||Le.textAlign,Oe=Oe||Le.textVerticalAlign}var Se=oe.textOffset;Se&&(Te+=Se[0],be+=Se[1])}return ee=ee||{},ee.baseX=Te,ee.baseY=be,ee.textAlign=xe,ee.textVerticalAlign=Oe,ee}function I(ee,J,oe){return ee[J]=i(ee,J,oe),ee[J]}function H(ee,J){return ee==null||J<=0||ee==="transparent"||ee==="none"?null:ee.image||ee.colorStops?"#000":ee}function z(ee){return ee==null||ee==="none"?null:ee.image||ee.colorStops?"#000":ee}function Z(ee,J){return typeof ee=="string"?ee.lastIndexOf("%")>=0?parseFloat(ee)/100*J:parseFloat(ee):ee}function Y(ee,J,oe){return J==="right"?ee-oe[1]:J==="center"?ee+oe[3]/2-oe[1]/2:ee+oe[3]}function G(ee,J){return ee!=null&&(ee||J.textBackgroundColor||J.textBorderWidth&&J.textBorderColor||J.textPadding)}pe.normalizeTextStyle=y,pe.renderText=x,pe.getBoxPosition=h,pe.getStroke=H,pe.getFill=z,pe.parsePercent=Z,pe.needDrawText=G},qH13:function(Xe,pe,W){var X=W("ItGF"),N=W("QBsz"),_=N.applyTransform,Q=W("mFDi"),R=W("Qe9p"),E=W("6GrX"),S=W("pzxd"),s=W("ni6a"),p=W("Gev7"),v=W("Dagg"),i=W("dqUG"),A=W("y+Vt"),O=W("IMiH"),w=W("QuXc"),g=W("06Qe"),C=O.CMD,c=Math.round,a=Math.sqrt,u=Math.abs,m=Math.cos,y=Math.sin,T=Math.max;if(!X.canvasSupported){var x=",",M="progid:DXImageTransform.Microsoft",b=21600,o=b/2,r=1e5,n=1e3,l=function(ce){ce.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ce.coordsize=b+","+b,ce.coordorigin="0,0"},L=function(ce){return String(ce).replace(/&/g,"&").replace(/"/g,""")},B=function(ce,Be,Re){return"rgb("+[ce,Be,Re].join(",")+")"},h=function(ce,Be){Be&&ce&&Be.parentNode!==ce&&ce.appendChild(Be)},I=function(ce,Be){Be&&ce&&Be.parentNode===ce&&ce.removeChild(Be)},H=function(ce,Be,Re){return(parseFloat(ce)||0)*r+(parseFloat(Be)||0)*n+Re},z=S.parsePercent,Z=function(ce,Be,Re){var ke=R.parse(Be);Re=+Re,isNaN(Re)&&(Re=1),ke&&(ce.color=B(ke[0],ke[1],ke[2]),ce.opacity=Re*ke[3])},Y=function(ce){var Be=R.parse(ce);return[B(Be[0],Be[1],Be[2]),Be[3]]},G=function(ce,Be,Re){var ke=Be.fill;if(ke!=null)if(ke instanceof w){var ft,pt=0,bt=[0,0],yt=0,_t=1,It=Re.getBoundingRect(),He=It.width,Pe=It.height;if(ke.type==="linear"){ft="gradient";var At=Re.transform,mt=[ke.x*He,ke.y*Pe],Ze=[ke.x2*He,ke.y2*Pe];At&&(_(mt,mt,At),_(Ze,Ze,At));var ut=Ze[0]-mt[0],Ke=Ze[1]-mt[1];pt=Math.atan2(ut,Ke)*180/Math.PI,pt<0&&(pt+=360),pt<1e-6&&(pt=0)}else{ft="gradientradial";var mt=[ke.x*He,ke.y*Pe],At=Re.transform,Ie=Re.scale,Me=He,me=Pe;bt=[(mt[0]-It.x)/Me,(mt[1]-It.y)/me],At&&_(mt,mt,At),Me/=Ie[0]*b,me/=Ie[1]*b;var Ee=T(Me,me);yt=2*0/Ee,_t=2*ke.r/Ee-yt}var ge=ke.colorStops.slice();ge.sort(function(et,Ce){return et.offset-Ce.offset});for(var we=ge.length,ze=[],Je=[],Et=0;Et<we;Et++){var Ft=ge[Et],Nt=Y(Ft.color);Je.push(Ft.offset*_t+yt+" "+Nt[0]),(Et===0||Et===we-1)&&ze.push(Nt)}if(we>=2){var ht=ze[0][0],Lt=ze[1][0],st=ze[0][1]*Be.opacity,rt=ze[1][1]*Be.opacity;ce.type=ft,ce.method="none",ce.focus="100%",ce.angle=pt,ce.color=ht,ce.color2=Lt,ce.colors=Je.join(","),ce.opacity=rt,ce.opacity2=st}ft==="radial"&&(ce.focusposition=bt.join(","))}else Z(ce,ke,Be.opacity)},ee=function(ce,Be){Be.lineDash&&(ce.dashstyle=Be.lineDash.join(" ")),Be.stroke!=null&&!(Be.stroke instanceof w)&&Z(ce,Be.stroke,Be.opacity)},J=function(ce,Be,Re,ke){var ft=Be==="fill",pt=ce.getElementsByTagName(Be)[0];Re[Be]!=null&&Re[Be]!=="none"&&(ft||!ft&&Re.lineWidth)?(ce[ft?"filled":"stroked"]="true",Re[Be]instanceof w&&I(ce,pt),pt||(pt=g.createNode(Be)),ft?G(pt,Re,ke):ee(pt,Re),h(ce,pt)):(ce[ft?"filled":"stroked"]="false",I(ce,pt))},oe=[[],[],[]],se=function(ce,Be){var Re=C.M,ke=C.C,ft=C.L,pt=C.A,bt=C.Q,yt=[],_t,It,He,Pe,At,mt,Ze=ce.data,ut=ce.len();for(Pe=0;Pe<ut;){He=Ze[Pe++],It="",_t=0;switch(He){case Re:It=" m ",_t=1,At=Ze[Pe++],mt=Ze[Pe++],oe[0][0]=At,oe[0][1]=mt;break;case ft:It=" l ",_t=1,At=Ze[Pe++],mt=Ze[Pe++],oe[0][0]=At,oe[0][1]=mt;break;case bt:case ke:It=" c ",_t=3;var Ke=Ze[Pe++],Ie=Ze[Pe++],Me=Ze[Pe++],me=Ze[Pe++],Ee,ge;He===bt?(Ee=Me,ge=me,Me=(Me+2*Ke)/3,me=(me+2*Ie)/3,Ke=(At+2*Ke)/3,Ie=(mt+2*Ie)/3):(Ee=Ze[Pe++],ge=Ze[Pe++]),oe[0][0]=Ke,oe[0][1]=Ie,oe[1][0]=Me,oe[1][1]=me,oe[2][0]=Ee,oe[2][1]=ge,At=Ee,mt=ge;break;case pt:var we=0,ze=0,Je=1,Et=1,Ft=0;Be&&(we=Be[4],ze=Be[5],Je=a(Be[0]*Be[0]+Be[1]*Be[1]),Et=a(Be[2]*Be[2]+Be[3]*Be[3]),Ft=Math.atan2(-Be[1]/Et,Be[0]/Je));var Nt=Ze[Pe++],ht=Ze[Pe++],Lt=Ze[Pe++],st=Ze[Pe++],rt=Ze[Pe++]+Ft,et=Ze[Pe++]+rt+Ft;Pe++;var Ce=Ze[Pe++],Ue=Nt+m(rt)*Lt,ct=ht+y(rt)*st,Ke=Nt+m(et)*Lt,Ie=ht+y(et)*st,at=Ce?" wa ":" at ";Math.abs(Ue-Ke)<1e-4&&(Math.abs(et-rt)>.01?Ce&&(Ue+=270/b):Math.abs(ct-ht)<1e-4?Ce&&Ue<Nt||!Ce&&Ue>Nt?Ie-=270/b:Ie+=270/b:Ce&&ct<ht||!Ce&&ct>ht?Ke+=270/b:Ke-=270/b),yt.push(at,c(((Nt-Lt)*Je+we)*b-o),x,c(((ht-st)*Et+ze)*b-o),x,c(((Nt+Lt)*Je+we)*b-o),x,c(((ht+st)*Et+ze)*b-o),x,c((Ue*Je+we)*b-o),x,c((ct*Et+ze)*b-o),x,c((Ke*Je+we)*b-o),x,c((Ie*Et+ze)*b-o)),At=Ke,mt=Ie;break;case C.R:var Tt=oe[0],Ct=oe[1];Tt[0]=Ze[Pe++],Tt[1]=Ze[Pe++],Ct[0]=Tt[0]+Ze[Pe++],Ct[1]=Tt[1]+Ze[Pe++],Be&&(_(Tt,Tt,Be),_(Ct,Ct,Be)),Tt[0]=c(Tt[0]*b-o),Ct[0]=c(Ct[0]*b-o),Tt[1]=c(Tt[1]*b-o),Ct[1]=c(Ct[1]*b-o),yt.push(" m ",Tt[0],x,Tt[1]," l ",Ct[0],x,Tt[1]," l ",Ct[0],x,Ct[1]," l ",Tt[0],x,Ct[1]);break;case C.Z:yt.push(" x ")}if(_t>0){yt.push(It);for(var qe=0;qe<_t;qe++){var St=oe[qe];Be&&_(St,St,Be),yt.push(c(St[0]*b-o),x,c(St[1]*b-o),qe<_t-1?x:"")}}}return yt.join("")};A.prototype.brushVML=function(ce){var Be=this.style,Re=this._vmlEl;Re||(Re=g.createNode("shape"),l(Re),this._vmlEl=Re),J(Re,"fill",Be,this),J(Re,"stroke",Be,this);var ke=this.transform,ft=ke!=null,pt=Re.getElementsByTagName("stroke")[0];if(pt){var bt=Be.lineWidth;if(ft&&!Be.strokeNoScale){var yt=ke[0]*ke[3]-ke[1]*ke[2];bt*=a(u(yt))}pt.weight=bt+"px"}var _t=this.path||(this.path=new O);this.__dirtyPath&&(_t.beginPath(),_t.subPixelOptimize=!1,this.buildPath(_t,this.shape),_t.toStatic(),this.__dirtyPath=!1),Re.path=se(_t,this.transform),Re.style.zIndex=H(this.zlevel,this.z,this.z2),h(ce,Re),Be.text!=null?this.drawRectText(ce,this.getBoundingRect()):this.removeRectText(ce)},A.prototype.onRemove=function(ce){I(ce,this._vmlEl),this.removeRectText(ce)},A.prototype.onAdd=function(ce){h(ce,this._vmlEl),this.appendRectText(ce)};var Te=function(ce){return typeof ce=="object"&&ce.tagName&&ce.tagName.toUpperCase()==="IMG"};v.prototype.brushVML=function(ce){var Be=this.style,Re=Be.image,ke,ft;if(Te(Re)){var pt=Re.src;if(pt===this._imageSrc)ke=this._imageWidth,ft=this._imageHeight;else{var bt=Re.runtimeStyle,yt=bt.width,_t=bt.height;bt.width="auto",bt.height="auto",ke=Re.width,ft=Re.height,bt.width=yt,bt.height=_t,this._imageSrc=pt,this._imageWidth=ke,this._imageHeight=ft}Re=pt}else Re===this._imageSrc&&(ke=this._imageWidth,ft=this._imageHeight);if(!Re)return;var It=Be.x||0,He=Be.y||0,Pe=Be.width,At=Be.height,mt=Be.sWidth,Ze=Be.sHeight,ut=Be.sx||0,Ke=Be.sy||0,Ie=mt&&Ze,Me=this._vmlEl;Me||(Me=g.doc.createElement("div"),l(Me),this._vmlEl=Me);var me=Me.style,Ee=!1,ge,we=1,ze=1;if(this.transform&&(ge=this.transform,we=a(ge[0]*ge[0]+ge[1]*ge[1]),ze=a(ge[2]*ge[2]+ge[3]*ge[3]),Ee=ge[1]||ge[2]),Ee){var Je=[It,He],Et=[It+Pe,He],Ft=[It,He+At],Nt=[It+Pe,He+At];_(Je,Je,ge),_(Et,Et,ge),_(Ft,Ft,ge),_(Nt,Nt,ge);var ht=T(Je[0],Et[0],Ft[0],Nt[0]),Lt=T(Je[1],Et[1],Ft[1],Nt[1]),st=[];st.push("M11=",ge[0]/we,x,"M12=",ge[2]/ze,x,"M21=",ge[1]/we,x,"M22=",ge[3]/ze,x,"Dx=",c(It*we+ge[4]),x,"Dy=",c(He*ze+ge[5])),me.padding="0 "+c(ht)+"px "+c(Lt)+"px 0",me.filter=M+".Matrix("+st.join("")+", SizingMethod=clip)"}else ge&&(It=It*we+ge[4],He=He*ze+ge[5]),me.filter="",me.left=c(It)+"px",me.top=c(He)+"px";var rt=this._imageEl,et=this._cropEl;rt||(rt=g.doc.createElement("div"),this._imageEl=rt);var Ce=rt.style;if(Ie){if(ke&&ft)Ce.width=c(we*ke*Pe/mt)+"px",Ce.height=c(ze*ft*At/Ze)+"px";else{var Ue=new Image,ct=this;Ue.onload=function(){Ue.onload=null,ke=Ue.width,ft=Ue.height,Ce.width=c(we*ke*Pe/mt)+"px",Ce.height=c(ze*ft*At/Ze)+"px",ct._imageWidth=ke,ct._imageHeight=ft,ct._imageSrc=Re},Ue.src=Re}et||(et=g.doc.createElement("div"),et.style.overflow="hidden",this._cropEl=et);var at=et.style;at.width=c((Pe+ut*Pe/mt)*we),at.height=c((At+Ke*At/Ze)*ze),at.filter=M+".Matrix(Dx="+-ut*Pe/mt*we+",Dy="+-Ke*At/Ze*ze+")",et.parentNode||Me.appendChild(et),rt.parentNode!==et&&et.appendChild(rt)}else Ce.width=c(we*Pe)+"px",Ce.height=c(ze*At)+"px",Me.appendChild(rt),et&&et.parentNode&&(Me.removeChild(et),this._cropEl=null);var Tt="",Ct=Be.opacity;Ct<1&&(Tt+=".Alpha(opacity="+c(Ct*100)+") "),Tt+=M+".AlphaImageLoader(src="+Re+", SizingMethod=scale)",Ce.filter=Tt,Me.style.zIndex=H(this.zlevel,this.z,this.z2),h(ce,Me),Be.text!=null&&this.drawRectText(ce,this.getBoundingRect())},v.prototype.onRemove=function(ce){I(ce,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ce)},v.prototype.onAdd=function(ce){h(ce,this._vmlEl),this.appendRectText(ce)};var be="normal",xe={},Oe=0,Ne=100,Le=document.createElement("div"),Se=function(ce){var Be=xe[ce];if(!Be){Oe>Ne&&(Oe=0,xe={});var Re=Le.style,ke;try{Re.font=ce,ke=Re.fontFamily.split(",")[0]}catch(ft){}Be={style:Re.fontStyle||be,variant:Re.fontVariant||be,weight:Re.fontWeight||be,size:parseFloat(Re.fontSize||12)|0,family:ke||"Microsoft YaHei"},xe[ce]=Be,Oe++}return Be},tt;E.$override("measureText",function(ce,Be){var Re=g.doc;tt||(tt=Re.createElement("div"),tt.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",g.doc.body.appendChild(tt));try{tt.style.font=Be}catch(ke){}return tt.innerHTML="",tt.appendChild(Re.createTextNode(ce)),{width:tt.offsetWidth}});for(var Bt=new Q,De=function(ce,Be,Re,ke){var ft=this.style;this.__dirty&&S.normalizeTextStyle(ft,!0);var pt=ft.text;if(pt!=null&&(pt+=""),!pt)return;if(ft.rich){var bt=E.parseRichText(pt,ft);pt=[];for(var yt=0;yt<bt.lines.length;yt++){for(var _t=bt.lines[yt].tokens,It=[],He=0;He<_t.length;He++)It.push(_t[He].text);pt.push(It.join(""))}pt=pt.join(`
|
|
`)}var Pe,At,mt=ft.textAlign,Ze=ft.textVerticalAlign,ut=Se(ft.font),Ke=ut.style+" "+ut.variant+" "+ut.weight+" "+ut.size+'px "'+ut.family+'"';Re=Re||E.getBoundingRect(pt,Ke,mt,Ze,ft.textPadding,ft.textLineHeight);var Ie=this.transform;if(Ie&&!ke&&(Bt.copy(Be),Bt.applyTransform(Ie),Be=Bt),ke)Pe=Be.x,At=Be.y;else{var Me=ft.textPosition;if(Me instanceof Array)Pe=Be.x+z(Me[0],Be.width),At=Be.y+z(Me[1],Be.height),mt=mt||"left";else{var me=this.calculateTextPosition?this.calculateTextPosition({},ft,Be):E.calculateTextPosition({},ft,Be);Pe=me.x,At=me.y,mt=mt||me.textAlign,Ze=Ze||me.textVerticalAlign}}Pe=E.adjustTextX(Pe,Re.width,mt),At=E.adjustTextY(At,Re.height,Ze),At+=Re.height/2;var Ee=g.createNode,ge=this._textVmlEl,we,ze,Je;ge?(Je=ge.firstChild,we=Je.nextSibling,ze=we.nextSibling):(ge=Ee("line"),we=Ee("path"),ze=Ee("textpath"),Je=Ee("skew"),ze.style["v-text-align"]="left",l(ge),we.textpathok=!0,ze.on=!0,ge.from="0 0",ge.to="1000 0.05",h(ge,Je),h(ge,we),h(ge,ze),this._textVmlEl=ge);var Et=[Pe,At],Ft=ge.style;Ie&&ke?(_(Et,Et,Ie),Je.on=!0,Je.matrix=Ie[0].toFixed(3)+x+Ie[2].toFixed(3)+x+Ie[1].toFixed(3)+x+Ie[3].toFixed(3)+",0,0",Je.offset=(c(Et[0])||0)+","+(c(Et[1])||0),Je.origin="0 0",Ft.left="0px",Ft.top="0px"):(Je.on=!1,Ft.left=c(Pe)+"px",Ft.top=c(At)+"px"),ze.string=L(pt);try{ze.style.font=Ke}catch(Nt){}J(ge,"fill",{fill:ft.textFill,opacity:ft.opacity},this),J(ge,"stroke",{stroke:ft.textStroke,opacity:ft.opacity,lineDash:ft.lineDash||null},this),ge.style.zIndex=H(this.zlevel,this.z,this.z2),h(ce,ge)},Qe=function(ce){I(ce,this._textVmlEl),this._textVmlEl=null},it=function(ce){h(ce,this._textVmlEl)},Ae=[s,p,v,A,i],re=0;re<Ae.length;re++){var ie=Ae[re].prototype;ie.drawRectText=De,ie.removeRectText=Qe,ie.appendRectText=it}i.prototype.brushVML=function(ce){var Be=this.style;Be.text!=null?this.drawRectText(ce,{x:Be.x||0,y:Be.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ce)},i.prototype.onRemove=function(ce){this.removeRectText(ce)},i.prototype.onAdd=function(ce){this.appendRectText(ce)}}},r6Bn:function(Xe,pe,W){var X=W("bYtY"),N=W("ItGF"),_=W("4fz+"),Q=W("BPZU");function R(s,p){return s.zlevel===p.zlevel?s.z===p.z?s.z2-p.z2:s.z-p.z:s.zlevel-p.zlevel}var E=function(){this._roots=[],this._displayList=[],this._displayListLen=0};E.prototype={constructor:E,traverse:function(s,p){for(var v=0;v<this._roots.length;v++)this._roots[v].traverse(s,p)},getDisplayList:function(s,p){return p=p||!1,s&&this.updateDisplayList(p),this._displayList},updateDisplayList:function(s){this._displayListLen=0;for(var p=this._roots,v=this._displayList,i=0,A=p.length;i<A;i++)this._updateAndAddDisplayable(p[i],null,s);v.length=this._displayListLen,N.canvasSupported&&Q(v,R)},_updateAndAddDisplayable:function(s,p,v){if(s.ignore&&!v)return;s.beforeUpdate(),s.__dirty&&s.update(),s.afterUpdate();var i=s.clipPath;if(i){p?p=p.slice():p=[];for(var A=i,O=s;A;)A.parent=O,A.updateTransform(),p.push(A),O=A,A=A.clipPath}if(s.isGroup){for(var w=s._children,g=0;g<w.length;g++){var C=w[g];s.__dirty&&(C.__dirty=!0),this._updateAndAddDisplayable(C,p,v)}s.__dirty=!1}else s.__clipPaths=p,this._displayList[this._displayListLen++]=s},addRoot:function(s){if(s.__storage===this)return;s instanceof _&&s.addChildrenToStorage(this),this.addToStorage(s),this._roots.push(s)},delRoot:function(s){if(s==null){for(var p=0;p<this._roots.length;p++){var v=this._roots[p];v instanceof _&&v.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(s instanceof Array){for(var p=0,i=s.length;p<i;p++)this.delRoot(s[p]);return}var A=X.indexOf(this._roots,s);A>=0&&(this.delFromStorage(s),this._roots.splice(A,1),s instanceof _&&s.delChildrenFromStorage(this))},addToStorage:function(s){return s&&(s.__storage=this,s.dirty(!1)),this},delFromStorage:function(s){return s&&(s.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:R};var S=E;Xe.exports=S},rA99:function(Xe,pe,W){var X=W("y+Vt"),N=W("QBsz"),_=W("Sj9i"),Q=_.quadraticSubdivide,R=_.cubicSubdivide,E=_.quadraticAt,S=_.cubicAt,s=_.quadraticDerivativeAt,p=_.cubicDerivativeAt,v=[];function i(O,w,g){var C=O.cpx2,c=O.cpy2;return C===null||c===null?[(g?p:S)(O.x1,O.cpx1,O.cpx2,O.x2,w),(g?p:S)(O.y1,O.cpy1,O.cpy2,O.y2,w)]:[(g?s:E)(O.x1,O.cpx1,O.x2,w),(g?s:E)(O.y1,O.cpy1,O.y2,w)]}var A=X.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(O,w){var g=w.x1,C=w.y1,c=w.x2,a=w.y2,u=w.cpx1,m=w.cpy1,y=w.cpx2,T=w.cpy2,x=w.percent;if(x===0)return;O.moveTo(g,C),y==null||T==null?(x<1&&(Q(g,u,c,x,v),u=v[1],c=v[2],Q(C,m,a,x,v),m=v[1],a=v[2]),O.quadraticCurveTo(u,m,c,a)):(x<1&&(R(g,u,y,c,x,v),u=v[1],y=v[2],c=v[3],R(C,m,T,a,x,v),m=v[1],T=v[2],a=v[3]),O.bezierCurveTo(u,m,y,T,c,a))},pointAt:function(O){return i(this.shape,O,!1)},tangentAt:function(O){var w=i(this.shape,O,!0);return N.normalize(w,w)}});Xe.exports=A},"rAM+":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return N});var X=W("Qw5x");function N(_,Q){var R;if(typeof Symbol=="undefined"||_[Symbol.iterator]==null){if(Array.isArray(_)||(R=Object(X.a)(_))||Q&&_&&typeof _.length=="number"){R&&(_=R);var E=0,S=function(){};return{s:S,n:function(){return E>=_.length?{done:!0}:{done:!1,value:_[E++]}},e:function(A){throw A},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,p=!1,v;return{s:function(){R=_[Symbol.iterator]()},n:function(){var A=R.next();return s=A.done,A},e:function(A){p=!0,v=A},f:function(){try{!s&&R.return!=null&&R.return()}finally{if(p)throw v}}}}},rUJ1:function(Xe,pe){const W=/[&<>"']/,X=/[&<>"']/g,N=/[<>"']|&(?!#?\w+;)/,_=/[<>"']|&(?!#?\w+;)/g,Q={"&":"&","<":"<",">":">",'"':""","'":"'"},R=b=>Q[b];function E(b,o){if(o){if(W.test(b))return b.replace(X,R)}else if(N.test(b))return b.replace(_,R);return b}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(b){return b.replace(S,(o,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const p=/(^|[^\[])\^/g;function v(b,o){b=b.source||b,o=o||"";const r={replace:(n,l)=>(l=l.source||l,l=l.replace(p,"$1"),b=b.replace(n,l),r),getRegex:()=>new RegExp(b,o)};return r}const i=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(b,o,r){if(b){let n;try{n=decodeURIComponent(s(r)).replace(i,"").toLowerCase()}catch(l){return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}o&&!A.test(r)&&(r=a(o,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(n){return null}return r}const w={},g=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(b,o){w[" "+b]||(g.test(b)?w[" "+b]=b+"/":w[" "+b]=T(b,"/",!0)),b=w[" "+b];const r=b.indexOf(":")===-1;return o.substring(0,2)==="//"?r?o:b.replace(C,"$1")+o:o.charAt(0)==="/"?r?o:b.replace(c,"$1")+o:b+o}const u={exec:function(){}};function m(b){let o=1,r,n;for(;o<arguments.length;o++){r=arguments[o];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(b[n]=r[n])}return b}function y(b,o){const r=b.replace(/\|/g,(L,B,h)=>{let I=!1,H=B;for(;--H>=0&&h[H]==="\\";)I=!I;return I?"|":" |"}),n=r.split(/ \|/);let l=0;if(n.length>o)n.splice(o);else for(;n.length<o;)n.push("");for(;l<n.length;l++)n[l]=n[l].trim().replace(/\\\|/g,"|");return n}function T(b,o,r){const n=b.length;if(n===0)return"";let l=0;for(;l<n;){const L=b.charAt(n-l-1);if(L===o&&!r)l++;else if(L!==o&&r)l++;else break}return b.substr(0,n-l)}function x(b,o){if(b.indexOf(o[1])===-1)return-1;const r=b.length;let n=0,l=0;for(;l<r;l++)if(b[l]==="\\")l++;else if(b[l]===o[0])n++;else if(b[l]===o[1]&&(n--,n<0))return l;return-1}function M(b){b&&b.sanitize&&!b.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")}Xe.exports={escape:E,unescape:s,edit:v,cleanUrl:O,resolveUrl:a,noopTest:u,merge:m,splitCells:y,rtrim:T,findClosingBracket:x,checkSanitizeDeprecation:M}},rcnY:function(Xe,pe,W){var X=W("aRTE");function N(_,Q){this.totalCount=_,this.dataCount=Q}N.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],N.getRSBlocks=function(_,Q){var R=N.getRsBlockTable(_,Q);if(R==null)throw new Error("bad rs block @ typeNumber:"+_+"/errorCorrectLevel:"+Q);for(var E=R.length/3,S=new Array,s=0;s<E;s++)for(var p=R[s*3+0],v=R[s*3+1],i=R[s*3+2],A=0;A<p;A++)S.push(new N(v,i));return S},N.getRsBlockTable=function(_,Q){switch(Q){case X.L:return N.RS_BLOCK_TABLE[(_-1)*4+0];case X.M:return N.RS_BLOCK_TABLE[(_-1)*4+1];case X.Q:return N.RS_BLOCK_TABLE[(_-1)*4+2];case X.H:return N.RS_BLOCK_TABLE[(_-1)*4+3];default:return}},Xe.exports=N},rmlV:function(Xe,pe,W){var X=W("y+Vt"),N=X.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(_,Q){var R=.5522848,E=Q.cx,S=Q.cy,s=Q.rx,p=Q.ry,v=s*R,i=p*R;_.moveTo(E-s,S),_.bezierCurveTo(E-s,S-i,E-v,S-p,E,S-p),_.bezierCurveTo(E+v,S-p,E+s,S-i,E+s,S),_.bezierCurveTo(E+s,S+i,E+v,S+p,E,S+p),_.bezierCurveTo(E-v,S+p,E-s,S+i,E-s,S),_.closePath()}});Xe.exports=N},sR1s:function(Xe,pe,W){"use strict";W.d(pe,"b",function(){return Q}),W.d(pe,"a",function(){return R}),W.d(pe,"c",function(){return E}),W.d(pe,"d",function(){return S});var X=W("U8pU"),N="RC_TABLE_KEY";function _(s){return s==null?[]:Array.isArray(s)?s:[s]}function Q(s,p){if(!p&&typeof p!="number")return s;for(var v=_(p),i=s,A=0;A<v.length;A+=1){if(!i)return null;var O=v[A];i=i[O]}return i}function R(s){var p=[],v={};return s.forEach(function(i){for(var A=i||{},O=A.key,w=A.dataIndex,g=O||_(w).join("-")||N;v[g];)g="".concat(g,"_next");v[g]=!0,p.push(g)}),p}function E(){var s={};function p(O,w){w&&Object.keys(w).forEach(function(g){var C=w[g];C&&Object(X.a)(C)==="object"?(O[g]=O[g]||{},p(O[g],C)):O[g]=C})}for(var v=arguments.length,i=new Array(v),A=0;A<v;A++)i[A]=arguments[A];return i.forEach(function(O){p(s,O)}),s}function S(s){return s!=null}},"sW+o":function(Xe,pe,W){var X=W("SrGk"),N=W("bYtY"),_=W("SUKs"),Q=W("Qe9p");function R(S,s){X.call(this,S,s,["linearGradient","radialGradient"],"__gradient_in_use__")}N.inherits(R,X),R.prototype.addWithoutUpdate=function(S,s){if(s&&s.style){var p=this;N.each(["fill","stroke"],function(v){if(s.style[v]&&(s.style[v].type==="linear"||s.style[v].type==="radial")){var i=s.style[v],A=p.getDefs(!0),O;i._dom?(O=i._dom,A.contains(i._dom)||p.addDom(O)):O=p.add(i),p.markUsed(s);var w=O.getAttribute("id");S.setAttribute(v,"url(#"+w+")")}})}},R.prototype.add=function(S){var s;if(S.type==="linear")s=this.createElement("linearGradient");else if(S.type==="radial")s=this.createElement("radialGradient");else return _("Illegal gradient type."),null;return S.id=S.id||this.nextId++,s.setAttribute("id","zr"+this._zrId+"-gradient-"+S.id),this.updateDom(S,s),this.addDom(s),s},R.prototype.update=function(S){var s=this;X.prototype.update.call(this,S,function(){var p=S.type,v=S._dom.tagName;p==="linear"&&v==="linearGradient"||p==="radial"&&v==="radialGradient"?s.updateDom(S,S._dom):(s.removeDom(S),s.add(S))})},R.prototype.updateDom=function(S,s){if(S.type==="linear")s.setAttribute("x1",S.x),s.setAttribute("y1",S.y),s.setAttribute("x2",S.x2),s.setAttribute("y2",S.y2);else if(S.type==="radial")s.setAttribute("cx",S.x),s.setAttribute("cy",S.y),s.setAttribute("r",S.r);else{_("Illegal gradient type.");return}S.global?s.setAttribute("gradientUnits","userSpaceOnUse"):s.setAttribute("gradientUnits","objectBoundingBox"),s.innerHTML="";for(var p=S.colorStops,v=0,i=p.length;v<i;++v){var A=this.createElement("stop");A.setAttribute("offset",p[v].offset*100+"%");var O=p[v].color;if(O.indexOf("rgba">-1)){var w=Q.parse(O)[3],g=Q.toHex(O);A.setAttribute("stop-color","#"+g),A.setAttribute("stop-opacity",w)}else A.setAttribute("stop-color",p[v].color);s.appendChild(A)}S._dom=s},R.prototype.markUsed=function(S){if(S.style){var s=S.style.fill;s&&s._dom&&X.prototype.markUsed.call(this,s._dom),s=S.style.stroke,s&&s._dom&&X.prototype.markUsed.call(this,s._dom)}};var E=R;Xe.exports=E},sboe:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return _});var X=W("q1tI"),N=W.n(X),_=X.createContext(null)},t23M:function(Xe,pe,W){"use strict";var X=W("VTBJ"),N=W("1OyB"),_=W("vuIU"),Q=W("Ji7U"),R=W("LK+K"),E=W("q1tI"),S=W.n(E),s=W("m+aA"),p=W("Zm9Q"),v=W("Kwbf"),i=W("c+Xe"),A=W("bdgK"),O="rc-observer-key",w=function(g){Object(Q.a)(c,g);var C=Object(R.a)(c);function c(){var a;return Object(N.a)(this,c),a=C.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(u){var m=a.props.onResize,y=u[0].target,T=y.getBoundingClientRect(),x=T.width,M=T.height,b=y.offsetWidth,o=y.offsetHeight,r=Math.floor(x),n=Math.floor(M);if(a.state.width!==r||a.state.height!==n||a.state.offsetWidth!==b||a.state.offsetHeight!==o){var l={width:r,height:n,offsetWidth:b,offsetHeight:o};a.setState(l),m&&Promise.resolve().then(function(){m(Object(X.a)(Object(X.a)({},l),{},{offsetWidth:b,offsetHeight:o}))})}},a.setChildNode=function(u){a.childNode=u},a}return Object(_.a)(c,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var u=this.props.disabled;if(u){this.destroyObserver();return}var m=Object(s.a)(this.childNode||this),y=m!==this.currentElement;y&&(this.destroyObserver(),this.currentElement=m),!this.resizeObserver&&m&&(this.resizeObserver=new A.default(this.onResize),this.resizeObserver.observe(m))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var u=this.props.children,m=Object(p.a)(u);if(m.length>1)Object(v.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(m.length===0)return Object(v.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=m[0];if(E.isValidElement(y)&&Object(i.c)(y)){var T=y.ref;m[0]=E.cloneElement(y,{ref:Object(i.a)(T,this.setChildNode)})}return m.length===1?m[0]:m.map(function(x,M){return!E.isValidElement(x)||"key"in x&&x.key!==null?x:E.cloneElement(x,{key:"".concat(O,"-").concat(M)})})}}]),c}(E.Component);w.displayName="ResizeObserver",pe.a=w},u3os:function(Xe,pe,W){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.ver=pe.clear=pe.bind=void 0;var X=W("P4Qj"),N=function(E,S){var s=(0,X.getSensor)(E);return s.bind(S),function(){s.unbind(S)}};pe.bind=N;var _=function(E){var S=(0,X.getSensor)(E);(0,X.removeSensor)(S)};pe.clear=_;var Q="1.0.1";pe.ver=Q},ulZh:function(Xe,pe,W){typeof window!="undefined"&&function(N,_){Xe.exports=_()}(this,function(){return function(X){var N={};function _(Q){if(N[Q])return N[Q].exports;var R=N[Q]={i:Q,l:!1,exports:{}};return X[Q].call(R.exports,R,R.exports,_),R.l=!0,R.exports}return _.m=X,_.c=N,_.d=function(Q,R,E){_.o(Q,R)||Object.defineProperty(Q,R,{enumerable:!0,get:E})},_.r=function(Q){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},_.t=function(Q,R){if(R&1&&(Q=_(Q)),R&8)return Q;if(R&4&&typeof Q=="object"&&Q&&Q.__esModule)return Q;var E=Object.create(null);if(_.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:Q}),R&2&&typeof Q!="string")for(var S in Q)_.d(E,S,function(s){return Q[s]}.bind(null,S));return E},_.n=function(Q){var R=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return _.d(R,"a",R),R},_.o=function(Q,R){return Object.prototype.hasOwnProperty.call(Q,R)},_.p="/dist/",_(_.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(X,N,_){"use strict";var Q=Object.prototype.hasOwnProperty,R="~";function E(){}Object.create&&(E.prototype=Object.create(null),new E().__proto__||(R=!1));function S(i,A,O){this.fn=i,this.context=A,this.once=O||!1}function s(i,A,O,w,g){if(typeof O!="function")throw new TypeError("The listener must be a function");var C=new S(O,w||i,g),c=R?R+A:A;return i._events[c]?i._events[c].fn?i._events[c]=[i._events[c],C]:i._events[c].push(C):(i._events[c]=C,i._eventsCount++),i}function p(i,A){--i._eventsCount===0?i._events=new E:delete i._events[A]}function v(){this._events=new E,this._eventsCount=0}v.prototype.eventNames=function(){var A=[],O,w;if(this._eventsCount===0)return A;for(w in O=this._events)Q.call(O,w)&&A.push(R?w.slice(1):w);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(O)):A},v.prototype.listeners=function(A){var O=R?R+A:A,w=this._events[O];if(!w)return[];if(w.fn)return[w.fn];for(var g=0,C=w.length,c=new Array(C);g<C;g++)c[g]=w[g].fn;return c},v.prototype.listenerCount=function(A){var O=R?R+A:A,w=this._events[O];return w?w.fn?1:w.length:0},v.prototype.emit=function(A,O,w,g,C,c){var a=R?R+A:A;if(!this._events[a])return!1;var u=this._events[a],m=arguments.length,y,T;if(u.fn){u.once&&this.removeListener(A,u.fn,void 0,!0);switch(m){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,O),!0;case 3:return u.fn.call(u.context,O,w),!0;case 4:return u.fn.call(u.context,O,w,g),!0;case 5:return u.fn.call(u.context,O,w,g,C),!0;case 6:return u.fn.call(u.context,O,w,g,C,c),!0}for(T=1,y=new Array(m-1);T<m;T++)y[T-1]=arguments[T];u.fn.apply(u.context,y)}else{var x=u.length,M;for(T=0;T<x;T++){u[T].once&&this.removeListener(A,u[T].fn,void 0,!0);switch(m){case 1:u[T].fn.call(u[T].context);break;case 2:u[T].fn.call(u[T].context,O);break;case 3:u[T].fn.call(u[T].context,O,w);break;case 4:u[T].fn.call(u[T].context,O,w,g);break;default:if(!y)for(M=1,y=new Array(m-1);M<m;M++)y[M-1]=arguments[M];u[T].fn.apply(u[T].context,y)}}}return!0},v.prototype.on=function(A,O,w){return s(this,A,O,w,!1)},v.prototype.once=function(A,O,w){return s(this,A,O,w,!0)},v.prototype.removeListener=function(A,O,w,g){var C=R?R+A:A;if(!this._events[C])return this;if(!O)return p(this,C),this;var c=this._events[C];if(c.fn)c.fn===O&&(!g||c.once)&&(!w||c.context===w)&&p(this,C);else{for(var a=0,u=[],m=c.length;a<m;a++)(c[a].fn!==O||g&&!c[a].once||w&&c[a].context!==w)&&u.push(c[a]);u.length?this._events[C]=u.length===1?u[0]:u:p(this,C)}return this},v.prototype.removeAllListeners=function(A){var O;return A?(O=R?R+A:A,this._events[O]&&p(this,O)):(this._events=new E,this._eventsCount=0),this},v.prototype.off=v.prototype.removeListener,v.prototype.addListener=v.prototype.on,v.prefixed=R,v.EventEmitter=v,X.exports=v},"./node_modules/url-toolkit/src/url-toolkit.js":function(X,N,_){(function(Q){var R=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,E=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,p={buildAbsoluteURL:function(v,i,A){if(A=A||{},v=v.trim(),i=i.trim(),!i){if(!A.alwaysNormalize)return v;var O=p.parseURL(v);if(!O)throw new Error("Error trying to parse base URL.");return O.path=p.normalizePath(O.path),p.buildURLFromParts(O)}var w=p.parseURL(i);if(!w)throw new Error("Error trying to parse relative URL.");if(w.scheme)return A.alwaysNormalize?(w.path=p.normalizePath(w.path),p.buildURLFromParts(w)):i;var g=p.parseURL(v);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var C=E.exec(g.path);g.netLoc=C[1],g.path=C[2]}g.netLoc&&!g.path&&(g.path="/");var c={scheme:g.scheme,netLoc:w.netLoc,path:null,params:w.params,query:w.query,fragment:w.fragment};if(!w.netLoc&&(c.netLoc=g.netLoc,w.path[0]!=="/"))if(!w.path)c.path=g.path,w.params||(c.params=g.params,w.query||(c.query=g.query));else{var a=g.path,u=a.substring(0,a.lastIndexOf("/")+1)+w.path;c.path=p.normalizePath(u)}return c.path===null&&(c.path=A.alwaysNormalize?p.normalizePath(w.path):w.path),p.buildURLFromParts(c)},parseURL:function(v){var i=R.exec(v);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(v){for(v=v.split("").reverse().join("").replace(S,"");v.length!==(v=v.replace(s,"")).length;);return v.split("").reverse().join("")},buildURLFromParts:function(v){return v.scheme+v.netLoc+v.path+v.params+v.query+v.fragment}};X.exports=p})(this)},"./node_modules/webworkify-webpack/index.js":function(X,N,_){function Q(A){var O={};function w(C){if(O[C])return O[C].exports;var c=O[C]={i:C,l:!1,exports:{}};return A[C].call(c.exports,c,c.exports,w),c.l=!0,c.exports}w.m=A,w.c=O,w.i=function(C){return C},w.d=function(C,c,a){w.o(C,c)||Object.defineProperty(C,c,{configurable:!1,enumerable:!0,get:a})},w.r=function(C){Object.defineProperty(C,"__esModule",{value:!0})},w.n=function(C){var c=C&&C.__esModule?function(){return C.default}:function(){return C};return w.d(c,"a",c),c},w.o=function(C,c){return Object.prototype.hasOwnProperty.call(C,c)},w.p="/",w.oe=function(C){throw console.error(C),C};var g=w(w.s=ENTRY_MODULE);return g.default||g}var R="[\\.|\\-|\\+|\\w|/|@]+",E="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+R+").*?\\)";function S(A){return(A+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(A){return!isNaN(1*A)}function p(A,O,w){var g={};g[w]=[];var C=O.toString(),c=C.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return g;for(var a=c[1],u=new RegExp("(\\\\n|\\W)"+S(a)+E,"g"),m;m=u.exec(C);){if(m[3]==="dll-reference")continue;g[w].push(m[3])}for(u=new RegExp("\\("+S(a)+'\\("(dll-reference\\s('+R+'))"\\)\\)'+E,"g");m=u.exec(C);)A[m[2]]||(g[w].push(m[1]),A[m[2]]=_(m[1]).m),g[m[2]]=g[m[2]]||[],g[m[2]].push(m[4]);for(var y=Object.keys(g),T=0;T<y.length;T++)for(var x=0;x<g[y[T]].length;x++)s(g[y[T]][x])&&(g[y[T]][x]=1*g[y[T]][x]);return g}function v(A){var O=Object.keys(A);return O.reduce(function(w,g){return w||A[g].length>0},!1)}function i(A,O){for(var w={main:[O]},g={main:[]},C={main:{}};v(w);)for(var c=Object.keys(w),a=0;a<c.length;a++){var u=c[a],m=w[u],y=m.pop();if(C[u]=C[u]||{},C[u][y]||!A[u][y])continue;C[u][y]=!0,g[u]=g[u]||[],g[u].push(y);for(var T=p(A,A[u][y],u),x=Object.keys(T),M=0;M<x.length;M++)w[x[M]]=w[x[M]]||[],w[x[M]]=w[x[M]].concat(T[x[M]])}return g}X.exports=function(A,O){O=O||{};var w={main:_.m},g=O.all?{main:Object.keys(w.main)}:i(w,A),C="";Object.keys(g).filter(function(y){return y!=="main"}).forEach(function(y){for(var T=0;g[y][T];)T++;g[y].push(T),w[y][T]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",C=C+"var "+y+" = ("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(T))+")({"+g[y].map(function(x){return""+JSON.stringify(x)+": "+w[y][x].toString()}).join(",")+`});
|
|
`}),C=C+"new (("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+g.main.map(function(y){return""+JSON.stringify(y)+": "+w.main[y].toString()}).join(",")+"}))(self);";var c=new window.Blob([C],{type:"text/javascript"});if(O.bare)return c;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,u=a.createObjectURL(c),m=new window.Worker(u);return m.objectURL=u,m}},"./src/config.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"hlsDefaultConfig",function(){return M}),_.d(N,"mergeConfig",function(){return o}),_.d(N,"enableStreamingMode",function(){return r});var Q=_("./src/controller/abr-controller.ts"),R=_("./src/controller/audio-stream-controller.ts"),E=_("./src/controller/audio-track-controller.ts"),S=_("./src/controller/subtitle-stream-controller.ts"),s=_("./src/controller/subtitle-track-controller.ts"),p=_("./src/controller/buffer-controller.ts"),v=_("./src/controller/timeline-controller.ts"),i=_("./src/controller/cap-level-controller.ts"),A=_("./src/controller/fps-controller.ts"),O=_("./src/controller/eme-controller.ts"),w=_("./src/controller/cmcd-controller.ts"),g=_("./src/utils/xhr-loader.ts"),C=_("./src/utils/fetch-loader.ts"),c=_("./src/utils/cues.ts"),a=_("./src/utils/mediakeys-helper.ts"),u=_("./src/utils/logger.ts");function m(){return m=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var L=arguments[l];for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&(n[B]=L[B])}return n},m.apply(this,arguments)}function y(n,l){var L=Object.keys(n);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(n);l&&(B=B.filter(function(h){return Object.getOwnPropertyDescriptor(n,h).enumerable})),L.push.apply(L,B)}return L}function T(n){for(var l=1;l<arguments.length;l++){var L=arguments[l]!=null?arguments[l]:{};l%2?y(Object(L),!0).forEach(function(B){x(n,B,L[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(L)):y(Object(L)).forEach(function(B){Object.defineProperty(n,B,Object.getOwnPropertyDescriptor(L,B))})}return n}function x(n,l,L){return l in n?Object.defineProperty(n,l,{value:L,enumerable:!0,configurable:!0,writable:!0}):n[l]=L,n}var M=T(T({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,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:g.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Q.default,bufferController:p.default,capLevelController:i.default,fpsController:A.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},b()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:s.default,timelineController:v.TimelineController,audioStreamController:R.default,audioTrackController:E.default,emeController:O.default,cmcdController:w.default});function b(){return{cueHandler:c.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}}function o(n,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return m({},n,l)}function r(n){var l=n.loader;if(l!==C.default&&l!==g.default)u.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),n.progressive=!1;else{var L=Object(C.fetchSupported)();L&&(n.loader=C.default,n.progressive=!0,n.enableSoftwareAES=!0,u.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/ewma-bandwidth-estimator.ts"),E=_("./src/events.ts"),S=_("./src/utils/buffer-helper.ts"),s=_("./src/errors.ts"),p=_("./src/types/loader.ts"),v=_("./src/utils/logger.ts");function i(w,g){for(var C=0;C<g.length;C++){var c=g[C];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(w,c.key,c)}}function A(w,g,C){return g&&i(w.prototype,g),C&&i(w,C),w}var O=function(){function w(C){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=C;var c=C.config;this.bwEstimator=new R.default(c.abrEwmaSlowVoD,c.abrEwmaFastVoD,c.abrEwmaDefaultEstimate),this.registerListeners()}var g=w.prototype;return g.registerListeners=function(){var c=this.hls;c.on(E.Events.FRAG_LOADING,this.onFragLoading,this),c.on(E.Events.FRAG_LOADED,this.onFragLoaded,this),c.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(E.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var c=this.hls;c.off(E.Events.FRAG_LOADING,this.onFragLoading,this),c.off(E.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(E.Events.ERROR,this.onError,this)},g.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},g.onFragLoading=function(c,a){var u=a.frag;if(u.type===p.PlaylistLevelType.MAIN&&!this.timer){var m;this.fragCurrent=u,this.partCurrent=(m=a.part)!=null?m:null,this.timer=self.setInterval(this.onCheck,100)}},g.onLevelLoaded=function(c,a){var u=this.hls.config;a.details.live?this.bwEstimator.update(u.abrEwmaSlowLive,u.abrEwmaFastLive):this.bwEstimator.update(u.abrEwmaSlowVoD,u.abrEwmaFastVoD)},g._abandonRulesCheck=function(){var c=this.fragCurrent,a=this.partCurrent,u=this.hls,m=u.autoLevelEnabled,y=u.config,T=u.media;if(!c||!T)return;var x=a?a.stats:c.stats,M=a?a.duration:c.duration;if(x.aborted){v.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!m||T.paused||!T.playbackRate||!T.readyState)return;var b=performance.now()-x.loading.start,o=Math.abs(T.playbackRate);if(b<=500*M/o)return;var r=u.levels,n=u.minAutoLevel,l=r[c.level],L=x.total||Math.max(x.loaded,Math.round(M*l.maxBitrate/8)),B=Math.max(1,x.bwEstimate?x.bwEstimate/8:x.loaded*1e3/b),h=(L-x.loaded)/B,I=T.currentTime,H=(S.BufferHelper.bufferInfo(T,I,y.maxBufferHole).end-I)/o;if(H>=2*M/o||h<=H)return;var z=Number.POSITIVE_INFINITY,Z;for(Z=c.level-1;Z>n;Z--){var Y=r[Z].maxBitrate;if(z=M*Y/(8*.8*B),z<H)break}if(z>=h)return;var G=this.bwEstimator.getEstimate();v.logger.warn("Fragment "+c.sn+(a?" part "+a.index:"")+" of level "+c.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Z+`
|
|
Current BW estimate: `+(Object(Q.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+h.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+z.toFixed(3)+` s
|
|
Time to underbuffer: `+H.toFixed(3)+" s"),u.nextLoadLevel=Z,this.bwEstimator.sample(b,x.loaded),this.clearTimer(),c.loader&&(this.fragCurrent=this.partCurrent=null,c.loader.abort()),u.trigger(E.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:c,part:a,stats:x})},g.onFragLoaded=function(c,a){var u=a.frag,m=a.part;if(u.type===p.PlaylistLevelType.MAIN&&Object(Q.isFiniteNumber)(u.sn)){var y=m?m.stats:u.stats,T=m?m.duration:u.duration;if(this.clearTimer(),this.lastLoadedFragLevel=u.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[u.level],M=(x.loaded?x.loaded.bytes:0)+y.loaded,b=(x.loaded?x.loaded.duration:0)+T;x.loaded={bytes:M,duration:b},x.realBitrate=Math.round(8*M/b)}if(u.bitrateTest){var o={stats:y,frag:u,part:m,id:u.type};this.onFragBuffered(E.Events.FRAG_BUFFERED,o),u.bitrateTest=!1}}},g.onFragBuffered=function(c,a){var u=a.frag,m=a.part,y=m?m.stats:u.stats;if(y.aborted)return;if(u.type!==p.PlaylistLevelType.MAIN||u.sn==="initSegment")return;var T=y.parsing.end-y.loading.start;this.bwEstimator.sample(T,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),u.bitrateTest?this.bitrateTestDelay=T/1e3:this.bitrateTestDelay=0},g.onError=function(c,a){switch(a.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},g.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},g.getNextABRAutoLevel=function(){var c=this.fragCurrent,a=this.partCurrent,u=this.hls,m=u.maxAutoLevel,y=u.config,T=u.minAutoLevel,x=u.media,M=a?a.duration:c?c.duration:0,b=x?x.currentTime:0,o=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,n=(S.BufferHelper.bufferInfo(x,b,y.maxBufferHole).end-b)/o,l=this.findBestLevel(r,T,m,n,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(l>=0)return l;v.logger.trace((n?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var L=M?Math.min(M,y.maxStarvationDelay):y.maxStarvationDelay,B=y.abrBandWidthFactor,h=y.abrBandWidthUpFactor;if(!n){var I=this.bitrateTestDelay;if(I){var H=M?Math.min(M,y.maxLoadingDelay):y.maxLoadingDelay;L=H-I,v.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*L)+" ms"),B=h=1}}return l=this.findBestLevel(r,T,m,n+L,B,h),Math.max(l,0)},g.findBestLevel=function(c,a,u,m,y,T){for(var x,M=this.fragCurrent,b=this.partCurrent,o=this.lastLoadedFragLevel,r=this.hls.levels,n=r[o],l=!!(n!=null&&(x=n.details)!==null&&x!==void 0&&x.live),L=n==null?void 0:n.codecSet,B=b?b.duration:M?M.duration:0,h=u;h>=a;h--){var I=r[h];if(!I||L&&I.codecSet!==L)continue;var H=I.details,z=(b?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||B,Z=void 0;h<=o?Z=y*c:Z=T*c;var Y=r[h].maxBitrate,G=Y*z/Z;if(v.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+h+"/"+Math.round(Z)+"/"+Y+"/"+z+"/"+m+"/"+G),Z>Y&&(!G||l&&!this.bitrateTestDelay||G<m))return h}return-1},A(w,[{key:"nextAutoLevel",get:function(){var c=this._nextAutoLevel,a=this.bwEstimator;if(c!==-1&&(!a||!a.canEstimate()))return c;var u=this.getNextABRAutoLevel();return c!==-1&&(u=Math.min(c,u)),u},set:function(c){this._nextAutoLevel=c}}]),w}();N.default=O},"./src/controller/audio-stream-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/polyfills/number.ts"),R=_("./src/controller/base-stream-controller.ts"),E=_("./src/events.ts"),S=_("./src/utils/buffer-helper.ts"),s=_("./src/controller/fragment-tracker.ts"),p=_("./src/types/level.ts"),v=_("./src/types/loader.ts"),i=_("./src/loader/fragment.ts"),A=_("./src/demux/chunk-cache.ts"),O=_("./src/demux/transmuxer-interface.ts"),w=_("./src/types/transmuxer.ts"),g=_("./src/controller/fragment-finders.ts"),C=_("./src/utils/discontinuities.ts"),c=_("./src/errors.ts"),a=_("./src/utils/logger.ts");function u(){return u=Object.assign||function(M){for(var b=1;b<arguments.length;b++){var o=arguments[b];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(M[r]=o[r])}return M},u.apply(this,arguments)}function m(M,b){M.prototype=Object.create(b.prototype),M.prototype.constructor=M,y(M,b)}function y(M,b){return y=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},y(M,b)}var T=100,x=function(M){m(b,M);function b(r,n){var l;return l=M.call(this,r,n,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var o=b.prototype;return o.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},o._registerListeners=function(){var n=this.hls;n.on(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.on(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.on(E.Events.ERROR,this.onError,this),n.on(E.Events.BUFFER_RESET,this.onBufferReset,this),n.on(E.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},o._unregisterListeners=function(){var n=this.hls;n.off(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.off(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.off(E.Events.ERROR,this.onError,this),n.off(E.Events.BUFFER_RESET,this.onBufferReset,this),n.off(E.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},o.onInitPtsFound=function(n,l){var L=l.frag,B=l.id,h=l.initPTS;if(B==="main"){var I=L.cc;this.initPTS[L.cc]=h,this.log("InitPTS for cc: "+I+" found from main: "+h),this.videoTrackCC=I,this.state===R.State.WAITING_INIT_PTS&&this.tick()}},o.startLoad=function(n){if(!this.levels){this.startPosition=n,this.state=R.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(T),this.fragLoadError=0,l>0&&n===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=R.State.IDLE):(this.loadedmetadata=!1,this.state=R.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()},o.doTick=function(){switch(this.state){case R.State.IDLE:this.doTickIdle();break;case R.State.WAITING_TRACK:{var n,l=this.levels,L=this.trackId,B=l==null||((n=l[L])===null||n===void 0)?void 0:n.details;if(B){if(this.waitForCdnTuneIn(B))break;this.state=R.State.WAITING_INIT_PTS}break}case R.State.FRAG_LOADING_WAITING_RETRY:{var h,I=performance.now(),H=this.retryDate;(!H||I>=H||(h=this.media)!==null&&h!==void 0&&h.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=R.State.IDLE);break}case R.State.WAITING_INIT_PTS:{var z=this.waitingData;if(z){var Z=z.frag,Y=z.part,G=z.cache,ee=z.complete;if(this.initPTS[Z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=R.State.FRAG_LOADING;var J=G.flush(),oe={frag:Z,part:Y,payload:J,networkDetails:null};this._handleFragmentLoadProgress(oe),ee&&M.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+Z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),Te=S.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),be=Object(g.fragmentWithinToleranceTest)(Te.end,this.config.maxFragLookUpTolerance,Z);be<0&&(a.logger.log("Waiting fragment cc ("+Z.cc+") @ "+Z.start+" cancelled because another fragment at "+Te.end+" is needed"),this.clearWaitingFragment())}}else this.state=R.State.IDLE}}this.onTickEnd()},o.clearWaitingFragment=function(){var n=this.waitingData;n&&(this.fragmentTracker.removeFragment(n.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=R.State.IDLE)},o.onTickEnd=function(){var n=this.media;if(!n||!n.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:n,L=l.buffered;!this.loadedmetadata&&L.length&&(this.loadedmetadata=!0),this.lastCurrentTime=n.currentTime},o.doTickIdle=function(){var n,l,L=this.hls,B=this.levels,h=this.media,I=this.trackId,H=L.config;if(!B||!B[I])return;if(!h&&(this.startFragRequested||!H.startFragPrefetch))return;var z=B[I],Z=z.details;if(!Z||Z.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(Z)){this.state=R.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,v.PlaylistLevelType.AUDIO));var Y=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,v.PlaylistLevelType.AUDIO);if(Y===null)return;var G=Y.len,ee=this.getMaxBufferLength(),J=this.audioSwitch;if(G>=ee&&!J)return;if(!J&&this._streamEnded(Y,Z)){L.trigger(E.Events.BUFFER_EOS,{type:"audio"}),this.state=R.State.ENDED;return}var oe=Z.fragments,se=oe[0].start,Te=Y.end;if(J){var be=this.getLoadPosition();Te=be,Z.PTSKnown&&be<se&&((Y.end>se||Y.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),h.currentTime=se+.05))}var xe=this.getNextFragment(Te,Z);if(!xe){this.bufferFlushed=!0;return}((n=xe.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((l=xe.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(xe,Z):this.loadFragment(xe,Z,Te)},o.getMaxBufferLength=function(){var n=M.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,v.PlaylistLevelType.MAIN);return l===null?n:Math.max(n,l.len)},o.onMediaDetaching=function(){this.videoBuffer=null,M.prototype.onMediaDetaching.call(this)},o.onAudioTracksUpdated=function(n,l){var L=l.audioTracks;this.resetTransmuxer(),this.levels=L.map(function(B){return new p.Level(B)})},o.onAudioTrackSwitching=function(n,l){var L=!!l.url;this.trackId=l.id;var B=this.fragCurrent;B!=null&&B.loader&&B.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),L?this.setInterval(T):this.resetTransmuxer(),L?(this.audioSwitch=!0,this.state=R.State.IDLE):this.state=R.State.STOPPED,this.tick()},o.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},o.onLevelLoaded=function(n,l){this.mainDetails=l.details},o.onAudioTrackLoaded=function(n,l){var L,B=this.levels,h=l.details,I=l.id;if(!B){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+h.startSN+","+h.endSN+"],duration:"+h.totalduration);var H=B[I],z=0;if(h.live||(L=H.details)!==null&&L!==void 0&&L.live){var Z=this.mainDetails;if(h.fragments[0]||(h.deltaUpdateFailed=!0),h.deltaUpdateFailed||!Z)return;!H.details&&h.hasProgramDateTime&&Z.hasProgramDateTime?(Object(C.alignMediaPlaylistByPDT)(h,Z),z=h.fragments[0].start):z=this.alignPlaylists(h,H.details)}H.details=h,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!h.live)&&this.setStartPosition(H.details,z),this.state===R.State.WAITING_TRACK&&!this.waitForCdnTuneIn(h)&&(this.state=R.State.IDLE),this.tick()},o._handleFragmentLoadProgress=function(n){var l,L=n.frag,B=n.part,h=n.payload,I=this.config,H=this.trackId,z=this.levels;if(!z){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+L.sn+" of level "+L.level+" will not be buffered");return}var Z=z[H];console.assert(Z,"Audio track is defined on fragment load progress");var Y=Z.details;console.assert(Y,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||Z.audioCodec||"mp4a.40.2",ee=this.transmuxer;ee||(ee=this.transmuxer=new O.default(this.hls,v.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[L.cc],oe=(l=L.initSegment)===null||l===void 0?void 0:l.data;if(J!==void 0){var se=!1,Te=B?B.index:-1,be=Te!==-1,xe=new w.ChunkMetadata(L.level,L.sn,L.stats.chunkCount,h.byteLength,Te,be);ee.push(h,oe,G,"",L,B,Y.totalduration,se,xe,J)}else{a.logger.log("Unknown video PTS for cc "+L.cc+", waiting for video PTS before demuxing audio frag "+L.sn+" of ["+Y.startSN+" ,"+Y.endSN+"],track "+H);var Oe=this.waitingData=this.waitingData||{frag:L,part:B,cache:new A.default,complete:!1},Ne=Oe.cache;Ne.push(new Uint8Array(h)),this.waitingVideoCC=this.videoTrackCC,this.state=R.State.WAITING_INIT_PTS}},o._handleFragmentLoadComplete=function(n){if(this.waitingData){this.waitingData.complete=!0;return}M.prototype._handleFragmentLoadComplete.call(this,n)},o.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},o.onBufferCreated=function(n,l){var L=l.tracks.audio;L&&(this.mediaBuffer=L.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},o.onFragBuffered=function(n,l){var L=l.frag,B=l.part;if(L.type!==v.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(L)){this.warn("Fragment "+L.sn+(B?" p: "+B.index:"")+" of level "+L.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}L.sn!=="initSegment"&&(this.fragPrevious=L,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(E.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(L,B)},o.onError=function(n,l){switch(l.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(v.PlaylistLevelType.AUDIO,l);break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==R.State.ERROR&&this.state!==R.State.STOPPED&&(this.state=l.fatal?R.State.ERROR:R.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===R.State.PARSING||this.state===R.State.PARSED)){var L=!0,B=this.getFwdBufferInfo(this.mediaBuffer,v.PlaylistLevelType.AUDIO);B&&B.len>.5&&(L=!this.reduceMaxBufferLength(B.len)),L&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},o.onBufferFlushed=function(n,l){var L=l.type;L===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},o._handleTransmuxComplete=function(n){var l,L="audio",B=this.hls,h=n.remuxResult,I=n.chunkMeta,H=this.getCurrentContext(I);if(!H){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var z=H.frag,Z=H.part,Y=h.audio,G=h.text,ee=h.id3,J=h.initSegment;if(this.fragContextChanged(z))return;if(this.state=R.State.PARSING,this.audioSwitch&&Y&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,z,I),B.trigger(E.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:L,tracks:J.tracks})),Y){var oe=Y.startPTS,se=Y.endPTS,Te=Y.startDTS,be=Y.endDTS;Z&&(Z.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:se,startDTS:Te,endDTS:be}),z.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,oe,se,Te,be),this.bufferFragmentData(Y,z,Z,I)}if(ee!=null&&(l=ee.samples)!==null&&l!==void 0&&l.length){var xe=u({frag:z,id:L},ee);B.trigger(E.Events.FRAG_PARSING_METADATA,xe)}if(G){var Oe=u({frag:z,id:L},G);B.trigger(E.Events.FRAG_PARSING_USERDATA,Oe)}},o._bufferInitSegment=function(n,l,L){if(this.state!==R.State.PARSING)return;n.video&&delete n.video;var B=n.audio;if(!B)return;B.levelCodec=B.codec,B.id="audio",this.log("Init audio buffer, container:"+B.container+", codecs[parsed]=["+B.codec+"]"),this.hls.trigger(E.Events.BUFFER_CODECS,n);var h=B.initSegment;if(h!=null&&h.byteLength){var I={type:"audio",frag:l,part:null,chunkMeta:L,parent:l.type,data:h};this.hls.trigger(E.Events.BUFFER_APPENDING,I)}this.tick()},o.loadFragment=function(n,l,L){var B=this.fragmentTracker.getState(n);this.fragCurrent=n,(this.audioSwitch||B===s.FragmentState.NOT_LOADED||B===s.FragmentState.PARTIAL)&&(n.sn==="initSegment"?this._loadInitSegment(n):l.live&&!Object(Q.isFiniteNumber)(this.initPTS[n.cc])?(this.log("Waiting for video PTS in continuity counter "+n.cc+" of live stream before loading audio fragment "+n.sn+" of level "+this.trackId),this.state=R.State.WAITING_INIT_PTS):(this.startFragRequested=!0,M.prototype.loadFragment.call(this,n,l,L)))},o.completeAudioSwitch=function(){var n=this.hls,l=this.media,L=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,n.trigger(E.Events.AUDIO_TRACK_SWITCHED,{id:L})},b}(R.default);N.default=x},"./src/controller/audio-track-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts"),R=_("./src/errors.ts"),E=_("./src/controller/base-playlist-controller.ts"),S=_("./src/types/loader.ts");function s(O,w){for(var g=0;g<w.length;g++){var C=w[g];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(O,C.key,C)}}function p(O,w,g){return w&&s(O.prototype,w),g&&s(O,g),O}function v(O,w){O.prototype=Object.create(w.prototype),O.prototype.constructor=O,i(O,w)}function i(O,w){return i=Object.setPrototypeOf||function(C,c){return C.__proto__=c,C},i(O,w)}var A=function(O){v(w,O);function w(C){var c;return c=O.call(this,C,"[audio-track-controller]")||this,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.trackName="",c.selectDefaultTrack=!0,c.registerListeners(),c}var g=w.prototype;return g.registerListeners=function(){var c=this.hls;c.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.on(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.on(Q.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var c=this.hls;c.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.off(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.off(Q.Events.ERROR,this.onError,this)},g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,O.prototype.destroy.call(this)},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},g.onManifestParsed=function(c,a){this.tracks=a.audioTracks||[]},g.onAudioTrackLoaded=function(c,a){var u=a.id,m=a.details,y=this.tracksInGroup[u];if(!y){this.warn("Invalid audio track id "+u);return}var T=y.details;y.details=a.details,this.log("audioTrack "+u+" loaded ["+m.startSN+"-"+m.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,a,T))},g.onLevelLoading=function(c,a){this.switchLevel(a.level)},g.onLevelSwitching=function(c,a){this.switchLevel(a.level)},g.switchLevel=function(c){var a=this.hls.levels[c];if(!(a!=null&&a.audioGroupIds))return;var u=a.audioGroupIds[a.urlId];if(this.groupId!==u){this.groupId=u;var m=this.tracks.filter(function(T){return!u||T.groupId===u});this.selectDefaultTrack&&!m.some(function(T){return T.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=m;var y={audioTracks:m};this.log("Updating audio tracks, "+m.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(Q.Events.AUDIO_TRACKS_UPDATED,y),this.selectInitialTrack()}},g.onError=function(c,a){if(O.prototype.onError.call(this,c,a),a.fatal||!a.context)return;a.context.type===S.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},g.setAudioTrack=function(c){var a=this.tracksInGroup;if(c<0||c>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var u=a[this.trackId];this.log("Now switching to audio-track index "+c);var m=a[c],y=m.id,T=m.groupId,x=T===void 0?"":T,M=m.name,b=m.type,o=m.url;if(this.trackId=c,this.trackName=M,this.selectDefaultTrack=!1,this.hls.trigger(Q.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:x,name:M,type:b,url:o}),m.details&&!m.details.live)return;var r=this.switchParams(m.url,u==null?void 0:u.details);this.loadPlaylist(r)},g.selectInitialTrack=function(){var c=this.tracksInGroup;console.assert(c.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,u=this.findTrackId(a)||this.findTrackId();u!==-1?this.setAudioTrack(u):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},g.findTrackId=function(c){for(var a=this.tracksInGroup,u=0;u<a.length;u++){var m=a[u];if((!this.selectDefaultTrack||m.default)&&(!c||c===m.name))return m.id}return-1},g.loadPlaylist=function(c){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var u=a.id,m=a.groupId,y=a.url;if(c)try{y=c.addDirectives(y)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("loading audio-track playlist for id: "+u),this.clearTimer(),this.hls.trigger(Q.Events.AUDIO_TRACK_LOADING,{url:y,id:u,groupId:m,deliveryDirectives:c||null})}},p(w,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(c){this.selectDefaultTrack=!1,this.setAudioTrack(c)}}]),w}(E.default);N.default=A},"./src/controller/base-playlist-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return p});var Q=_("./src/polyfills/number.ts"),R=_("./src/types/level.ts"),E=_("./src/controller/level-helper.ts"),S=_("./src/utils/logger.ts"),s=_("./src/errors.ts"),p=function(){function v(A,O){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=S.logger.log.bind(S.logger,O+":"),this.warn=S.logger.warn.bind(S.logger,O+":"),this.hls=A}var i=v.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(O,w){w.fatal&&w.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(O,w){var g=w==null?void 0:w.renditionReports;if(g)for(var C=0;C<g.length;C++){var c=g[C],a=""+c.URI;if(a===O.substr(-a.length)){var u=parseInt(c["LAST-MSN"]),m=parseInt(c["LAST-PART"]);if(w&&this.hls.config.lowLatencyMode){var y=Math.min(w.age-w.partTarget,w.targetduration);m!==void 0&&y>w.partTarget&&(m+=1)}if(Object(Q.isFiniteNumber)(u))return new R.HlsUrlParameters(u,Object(Q.isFiniteNumber)(m)?m:void 0,R.HlsSkip.No)}}},i.loadPlaylist=function(O){},i.shouldLoadTrack=function(O){return this.canLoad&&O&&!!O.url&&(!O.details||O.details.live)},i.playlistLoaded=function(O,w,g){var C=this,c=w.details,a=w.stats,u=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(c.advancedDateTime=Date.now()-u,c.live||g!=null&&g.live){if(c.reloaded(g),g&&this.log("live playlist "+O+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:"MISSED")),g&&c.fragments.length>0&&Object(E.mergeDetails)(g,c),!this.canLoad||!c.live)return;var m,y=void 0,T=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var x=this.hls.config.lowLatencyMode,M=c.lastPartSn,b=c.endSN,o=c.lastPartIndex,r=o!==-1,n=M===b,l=x?0:o;r?(y=n?b+1:M,T=n?l:o+1):y=b+1;var L=c.age,B=L+c.ageHeader,h=Math.min(B-c.partTarget,c.targetduration*1.5);if(h>0){if(g&&h>g.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+g.tuneInGoal+" to: "+h+" with playlist age: "+c.age),h=0;else{var I=Math.floor(h/c.targetduration);if(y+=I,T!==void 0){var H=Math.round(h%c.targetduration/c.partTarget);T+=H}this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+L.toFixed(2)+"s goal: "+h+" skip sn "+I+" to part "+T)}c.tuneInGoal=h}if(m=this.getDeliveryDirectives(c,w.deliveryDirectives,y,T),x||!n){this.loadPlaylist(m);return}}else m=this.getDeliveryDirectives(c,w.deliveryDirectives,y,T);var z=Object(E.computeReloadInterval)(c,a);y!==void 0&&c.canBlockReload&&(z-=c.partTarget||1),this.log("reload live playlist "+O+" in "+Math.round(z)+" ms"),this.timer=self.setTimeout(function(){return C.loadPlaylist(m)},z)}else this.clearTimer()},i.getDeliveryDirectives=function(O,w,g,C){var c=Object(R.getSkipValue)(O,g);return w!=null&&w.skip&&O.deltaUpdateFailed&&(g=w.msn,C=w.part,c=R.HlsSkip.No),new R.HlsUrlParameters(g,C,c)},i.retryLoadingOrFail=function(O){var w=this,g=this.hls.config,C=this.retryCount<g.levelLoadingMaxRetry;if(C){var c;if(this.retryCount++,O.details.indexOf("LoadTimeOut")>-1&&(c=O.context)!==null&&c!==void 0&&c.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+O.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*g.levelLoadingRetryDelay,g.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return w.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+O.details+'"')}}else this.warn('cannot recover from error "'+O.details+'"'),this.clearTimer(),O.fatal=!0;return C},v}()},"./src/controller/base-stream-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"State",function(){return b}),_.d(N,"default",function(){return o});var Q=_("./src/polyfills/number.ts"),R=_("./src/task-loop.ts"),E=_("./src/controller/fragment-tracker.ts"),S=_("./src/utils/buffer-helper.ts"),s=_("./src/utils/logger.ts"),p=_("./src/events.ts"),v=_("./src/errors.ts"),i=_("./src/types/transmuxer.ts"),A=_("./src/utils/mp4-tools.ts"),O=_("./src/utils/discontinuities.ts"),w=_("./src/controller/fragment-finders.ts"),g=_("./src/controller/level-helper.ts"),C=_("./src/loader/fragment-loader.ts"),c=_("./src/crypt/decrypter.ts"),a=_("./src/utils/time-ranges.ts"),u=_("./src/types/loader.ts");function m(r,n){for(var l=0;l<n.length;l++){var L=n[l];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(r,L.key,L)}}function y(r,n,l){return n&&m(r.prototype,n),l&&m(r,l),r}function T(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function x(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,M(r,n)}function M(r,n){return M=Object.setPrototypeOf||function(L,B){return L.__proto__=B,L},M(r,n)}var b={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"},o=function(r){x(n,r);function n(L,B,h){var I;return I=r.call(this)||this,I.hls=void 0,I.fragPrevious=null,I.fragCurrent=null,I.fragmentTracker=void 0,I.transmuxer=null,I._state=b.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=h,I.log=s.logger.log.bind(s.logger,h+":"),I.warn=s.logger.warn.bind(s.logger,h+":"),I.hls=L,I.fragmentLoader=new C.default(L.config),I.fragmentTracker=B,I.config=L.config,I.decrypter=new c.default(L,L.config),L.on(p.Events.KEY_LOADED,I.onKeyLoaded,T(I)),I}var l=n.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(B){},l.stopLoad=function(){this.fragmentLoader.abort();var B=this.fragCurrent;B&&this.fragmentTracker.removeFragment(B),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=b.STOPPED},l._streamEnded=function(B,h){var I=this.fragCurrent,H=this.fragmentTracker;if(!h.live&&I&&I.sn===h.endSN&&!B.nextStart){var z=H.getState(I);return z===E.FragmentState.PARTIAL||z===E.FragmentState.OK}return!1},l.onMediaAttached=function(B,h){var I=this.media=this.mediaBuffer=h.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),I.addEventListener("seeking",this.onvseeking),I.addEventListener("ended",this.onvended);var H=this.config;this.levels&&H.autoStartLoad&&this.state===b.STOPPED&&this.startLoad(H.startPosition)},l.onMediaDetaching=function(){var B=this.media;B!=null&&B.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),B&&(B.removeEventListener("seeking",this.onvseeking),B.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var B=this.config,h=this.fragCurrent,I=this.media,H=this.mediaBuffer,z=this.state,Z=I?I.currentTime:0,Y=S.BufferHelper.bufferInfo(H||I,Z,B.maxBufferHole);if(this.log("media seeking to "+(Object(Q.isFiniteNumber)(Z)?Z.toFixed(3):Z)+", state: "+z),z===b.ENDED)this.resetLoadingState();else if(h&&!Y.len){var G=B.maxFragLookUpTolerance,ee=h.start-G,J=h.start+h.duration+G,oe=Z>J;(Z<ee||oe)&&(oe&&h.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),h.loader.abort()),this.resetLoadingState())}I&&(this.lastCurrentTime=Z),!this.loadedmetadata&&!Y.len&&(this.nextLoadPosition=this.startPosition=Z),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(B,h){if(this.state!==b.KEY_LOADING||h.frag!==this.fragCurrent||!this.levels)return;this.state=b.IDLE;var I=this.levels[h.frag.level].details;I&&this.loadFragment(h.frag,I,h.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),r.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=b.STOPPED,this.hls.off(p.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,r.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(B,h){this.log("Loading key for "+B.sn+" of ["+h.startSN+"-"+h.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+B.level),this.state=b.KEY_LOADING,this.fragCurrent=B,this.hls.trigger(p.Events.KEY_LOADING,{frag:B})},l.loadFragment=function(B,h,I){this._loadFragForPlayback(B,h,I)},l._loadFragForPlayback=function(B,h,I){var H=this,z=function(Y){if(H.fragContextChanged(B)){H.warn("Fragment "+B.sn+(Y.part?" p: "+Y.part.index:"")+" of level "+B.level+" was dropped during download."),H.fragmentTracker.removeFragment(B);return}B.stats.chunkCount++,H._handleFragmentLoadProgress(Y)};this._doFragLoad(B,h,I,z).then(function(Z){if(!Z)return;H.fragLoadError=0;var Y=H.state;if(H.fragContextChanged(B)){(Y===b.FRAG_LOADING||Y===b.BACKTRACKING||!H.fragCurrent&&Y===b.PARSING)&&(H.fragmentTracker.removeFragment(B),H.state=b.IDLE);return}if("payload"in Z&&(H.log("Loaded fragment "+B.sn+" of level "+B.level),H.hls.trigger(p.Events.FRAG_LOADED,Z),H.state===b.BACKTRACKING)){H.fragmentTracker.backtrack(B,Z),H.resetFragmentLoading(B);return}H._handleFragmentLoadComplete(Z)}).catch(function(Z){H.warn(Z),H.resetFragmentLoading(B)})},l.flushMainBuffer=function(B,h,I){if(I===void 0&&(I=null),!(B-h))return;var H={startOffset:B,endOffset:h,type:I};this.fragLoadError=0,this.hls.trigger(p.Events.BUFFER_FLUSHING,H)},l._loadInitSegment=function(B){var h=this;this._doFragLoad(B).then(function(I){if(!I||h.fragContextChanged(B)||!h.levels)throw new Error("init load aborted");return I}).then(function(I){var H=h.hls,z=I.payload,Z=B.decryptdata;if(z&&z.byteLength>0&&Z&&Z.key&&Z.iv&&Z.method==="AES-128"){var Y=self.performance.now();return h.decrypter.webCryptoDecrypt(new Uint8Array(z),Z.key.buffer,Z.iv.buffer).then(function(G){var ee=self.performance.now();return H.trigger(p.Events.FRAG_DECRYPTED,{frag:B,payload:G,stats:{tstart:Y,tdecrypt:ee}}),I.payload=G,I})}return I}).then(function(I){var H=h.fragCurrent,z=h.hls,Z=h.levels;if(!Z)throw new Error("init load aborted, missing levels");var Y=Z[B.level].details;console.assert(Y,"Level details are defined when init segment is loaded");var G=B.stats;h.state=b.IDLE,h.fragLoadError=0,B.data=new Uint8Array(I.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),I.frag===H&&z.trigger(p.Events.FRAG_BUFFERED,{stats:G,frag:H,part:null,id:B.type}),h.tick()}).catch(function(I){h.warn(I),h.resetFragmentLoading(B)})},l.fragContextChanged=function(B){var h=this.fragCurrent;return!B||!h||B.level!==h.level||B.sn!==h.sn||B.urlId!==h.urlId},l.fragBufferedComplete=function(B,h){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+B.type+" sn: "+B.sn+(h?" part: "+h.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+B.level+" "+a.default.toString(S.BufferHelper.getBuffered(I))),this.state=b.IDLE,this.tick()},l._handleFragmentLoadComplete=function(B){var h=this.transmuxer;if(!h)return;var I=B.frag,H=B.part,z=B.partsLoaded,Z=!z||z.length===0||z.some(function(G){return!G}),Y=new i.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,H?H.index:-1,!Z);h.flush(Y)},l._handleFragmentLoadProgress=function(B){},l._doFragLoad=function(B,h,I,H){var z=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(B.start,I||0),this.config.lowLatencyMode&&h){var Z=h.partList;if(Z&&H){I>B.end&&h.fragmentHint&&(B=h.fragmentHint);var Y=this.getNextPart(Z,B,I);if(Y>-1){var G=Z[Y];return this.log("Loading part sn: "+B.sn+" p: "+G.index+" cc: "+B.cc+" of playlist ["+h.startSN+"-"+h.endSN+"] parts [0-"+Y+"-"+(Z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+B.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=b.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:B,part:Z[Y],targetBufferTime:I}),this.doFragPartsLoad(B,Z,Y,H).catch(function(ee){return z.handleFragLoadError(ee)})}else if(!B.url||this.loadedEndOfParts(Z,I))return Promise.resolve(null)}}return this.log("Loading fragment "+B.sn+" cc: "+B.cc+" "+(h?"of ["+h.startSN+"-"+h.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+B.level+", target: "+parseFloat(I.toFixed(3))),Object(Q.isFiniteNumber)(B.sn)&&!this.bitrateTest&&(this.nextLoadPosition=B.start+B.duration),this.state=b.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:B,targetBufferTime:I}),this.fragmentLoader.load(B,H).catch(function(ee){return z.handleFragLoadError(ee)})},l.doFragPartsLoad=function(B,h,I,H){var z=this;return new Promise(function(Z,Y){var G=[],ee=function J(oe){var se=h[oe];z.fragmentLoader.loadPart(B,se,H).then(function(Te){G[se.index]=Te;var be=Te.part;z.hls.trigger(p.Events.FRAG_LOADED,Te);var xe=h[oe+1];if(xe&&xe.fragment===B)J(oe+1);else return Z({frag:B,part:be,partsLoaded:G})}).catch(Y)};ee(I)})},l.handleFragLoadError=function(B){var h=B.data;return h&&h.details===v.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(h.frag,h.part):this.hls.trigger(p.Events.ERROR,h),null},l._handleTransmuxerFlush=function(B){var h=this.getCurrentContext(B);if(!h||this.state!==b.PARSING){this.fragCurrent||(this.state=b.IDLE);return}var I=h.frag,H=h.part,z=h.level,Z=self.performance.now();I.stats.parsing.end=Z,H&&(H.stats.parsing.end=Z),this.updateLevelTiming(I,H,z,B.partial)},l.getCurrentContext=function(B){var h=this.levels,I=B.level,H=B.sn,z=B.part;if(!h||!h[I])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+I+". The current chunk will not be buffered."),null;var Z=h[I],Y=z>-1?Object(g.getPartWith)(Z,H,z):null,G=Y?Y.fragment:Object(g.getFragmentWithSN)(Z,H,this.fragCurrent);return G?{frag:G,part:Y,level:Z}:null},l.bufferFragmentData=function(B,h,I,H){if(!B||this.state!==b.PARSING)return;var z=B.data1,Z=B.data2,Y=z;if(z&&Z&&(Y=Object(A.appendUint8Array)(z,Z)),!Y||!Y.length)return;var G={type:B.type,frag:h,part:I,chunkMeta:H,parent:h.type,data:Y};this.hls.trigger(p.Events.BUFFER_APPENDING,G),B.dropped&&B.independent&&!I&&this.flushBufferGap(h)},l.flushBufferGap=function(B){var h=this.media;if(!h)return;if(!S.BufferHelper.isBuffered(h,h.currentTime)){this.flushMainBuffer(0,B.start);return}var I=h.currentTime,H=S.BufferHelper.bufferInfo(h,I,0),z=B.duration,Z=Math.min(this.config.maxFragLookUpTolerance*2,z*.25),Y=Math.max(Math.min(B.start-Z,H.end-Z),I+Z);B.start-Y>Z&&this.flushMainBuffer(Y,B.start)},l.getFwdBufferInfo=function(B,h){var I=this.config,H=this.getLoadPosition();if(!Object(Q.isFiniteNumber)(H))return null;var z=S.BufferHelper.bufferInfo(B,H,I.maxBufferHole);if(z.len===0&&z.nextStart!==void 0){var Z=this.fragmentTracker.getBufferedFrag(H,h);if(Z&&z.nextStart<Z.end)return S.BufferHelper.bufferInfo(B,H,Math.max(z.nextStart,I.maxBufferHole))}return z},l.getMaxBufferLength=function(B){var h=this.config,I;return B?I=Math.max(8*h.maxBufferSize/B,h.maxBufferLength):I=h.maxBufferLength,Math.min(I,h.maxMaxBufferLength)},l.reduceMaxBufferLength=function(B){var h=this.config,I=B||h.maxBufferLength;return h.maxMaxBufferLength>=I?(h.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+h.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(B,h){var I,H,z=h.fragments,Z=z.length;if(!Z)return null;var Y=this.config,G=z[0].start,ee;if(h.live){var J=Y.initialLiveManifestSize;if(Z<J)return this.warn("Not enough fragments to start playback (have: "+Z+", need: "+J+")"),null;!h.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(ee=this.getInitialLiveFragment(h,z),this.startPosition=ee?this.hls.liveSyncPosition||ee.start:B)}else B<=G&&(ee=z[0]);if(!ee){var oe=Y.lowLatencyMode?h.partEnd:h.fragmentEnd;ee=this.getFragmentAtPosition(B,oe,h)}return(I=ee)!==null&&I!==void 0&&I.initSegment&&!((H=ee)!==null&&H!==void 0&&H.initSegment.data)&&!this.bitrateTest&&(ee=ee.initSegment),ee},l.getNextPart=function(B,h,I){for(var H=-1,z=!1,Z=!0,Y=0,G=B.length;Y<G;Y++){var ee=B[Y];if(Z=Z&&!ee.independent,H>-1&&I<ee.start)break;var J=ee.loaded;!J&&(z||ee.independent||Z)&&ee.fragment===h&&(H=Y),z=J}return H},l.loadedEndOfParts=function(B,h){var I=B[B.length-1];return I&&h>I.start&&I.loaded},l.getInitialLiveFragment=function(B,h){var I=this.fragPrevious,H=null;if(I){if(B.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),H=Object(w.findFragmentByPDT)(h,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var z=I.sn+1;if(z>=B.startSN&&z<=B.endSN){var Z=h[z-B.startSN];I.cc===Z.cc&&(H=Z,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(w.findFragWithCC)(h,I.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var Y=this.hls.liveSyncPosition;Y!==null&&(H=this.getFragmentAtPosition(Y,this.bitrateTest?B.fragmentEnd:B.edge,B))}return H},l.getFragmentAtPosition=function(B,h,I){var H=this.config,z=this.fragPrevious,Z=I.fragments,Y=I.endSN,G=I.fragmentHint,ee=H.maxFragLookUpTolerance,J=!!(H.lowLatencyMode&&I.partList&&G);J&&G&&!this.bitrateTest&&(Z=Z.concat(G),Y=G.sn);var oe;if(B<h){var se=B>h-ee?0:ee;oe=Object(w.findFragmentByPTS)(z,Z,B,se)}else oe=Z[Z.length-1];if(oe){var Te=oe.sn-I.startSN,be=z&&oe.level===z.level,xe=Z[Te+1],Oe=this.fragmentTracker.getState(oe);if(Oe===E.FragmentState.BACKTRACKED){oe=null;for(var Ne=Te;Z[Ne]&&this.fragmentTracker.getState(Z[Ne])===E.FragmentState.BACKTRACKED;)z?oe=Z[Ne--]:oe=Z[--Ne];oe||(oe=xe)}else z&&oe.sn===z.sn&&!J&&(be&&(oe.sn<Y&&this.fragmentTracker.getState(xe)!==E.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+xe.sn),oe=xe):oe=null))}return oe},l.synchronizeToLiveEdge=function(B){var h=this.config,I=this.media;if(!I)return;var H=this.hls.liveSyncPosition,z=I.currentTime,Z=B.fragments[0].start,Y=B.edge,G=z>=Z-h.maxFragLookUpTolerance&&z<=Y;if(H!==null&&I.duration>H&&(z<H||!G)){var ee=h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:h.liveMaxLatencyDurationCount*B.targetduration;(!G&&I.readyState<4||z<Y-ee)&&(this.loadedmetadata||(this.nextLoadPosition=H),I.readyState&&(this.warn("Playback: "+z.toFixed(3)+" is located too far from the end of live sliding playlist: "+Y+", reset currentTime to : "+H.toFixed(3)),I.currentTime=H))}},l.alignPlaylists=function(B,h){var I=this.levels,H=this.levelLastLoaded,z=this.fragPrevious,Z=H!==null?I[H]:null,Y=B.fragments.length;if(!Y)return this.warn("No fragments in live playlist"),0;var G=B.fragments[0].start,ee=!h,J=B.alignedSliding&&Object(Q.isFiniteNumber)(G);if(ee||!J&&!G){Object(O.alignStream)(z,Z,B);var oe=B.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(h?h.startSN:"na")+"->"+B.startSN+" prev-sn: "+(z?z.sn:"na")+" fragments: "+Y),oe}return G},l.waitForCdnTuneIn=function(B){var h=3;return B.live&&B.canBlockReload&&B.tuneInGoal>Math.max(B.partHoldBack,B.partTarget*h)},l.setStartPosition=function(B,h){var I=this.startPosition;if(I<h&&(I=-1),I===-1||this.lastCurrentTime===-1){var H=B.startTimeOffset;Object(Q.isFiniteNumber)(H)?(I=h+H,H<0&&(I+=B.totalduration),I=Math.min(Math.max(h,I),h+B.totalduration),this.log("Start time offset "+H+" found in playlist, adjust startPosition to "+I),this.startPosition=I):B.live?I=this.hls.liveSyncPosition||h:this.startPosition=I=0,this.lastCurrentTime=I}this.nextLoadPosition=I},l.getLoadPosition=function(){var B=this.media,h=0;return this.loadedmetadata&&B?h=B.currentTime:this.nextLoadPosition&&(h=this.nextLoadPosition),h},l.handleFragLoadAborted=function(B,h){this.transmuxer&&B.sn!=="initSegment"&&B.stats.aborted&&(this.warn("Fragment "+B.sn+(h?" part"+h.index:"")+" of level "+B.level+" was aborted"),this.resetFragmentLoading(B))},l.resetFragmentLoading=function(B){(!this.fragCurrent||!this.fragContextChanged(B))&&(this.state=b.IDLE)},l.onFragmentOrKeyLoadError=function(B,h){if(h.fatal)return;var I=h.frag;if(!I||I.type!==B)return;var H=this.fragCurrent;console.assert(H&&I.sn===H.sn&&I.level===H.level&&I.urlId===H.urlId,"Frag load error must match current frag to retry");var z=this.config;if(this.fragLoadError+1<=z.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var Z=Math.min(Math.pow(2,this.fragLoadError)*z.fragLoadingRetryDelay,z.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+B+" "+I.level+" failed to load, retrying in "+Z+"ms"),this.retryDate=self.performance.now()+Z,this.fragLoadError++,this.state=b.FRAG_LOADING_WAITING_RETRY}else h.levelRetry?(B===u.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=b.IDLE):(s.logger.error(h.details+" reaches max retry, redispatch as fatal ..."),h.fatal=!0,this.hls.stopLoad(),this.state=b.ERROR)},l.afterBufferFlushed=function(B,h,I){if(!B)return;var H=S.BufferHelper.getBuffered(B);this.fragmentTracker.detectEvictedFragments(h,H,I),this.state===b.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=b.IDLE},l.resetLiveStartWhenNotLoaded=function(B){if(!this.loadedmetadata){this.startFragRequested=!1;var h=this.levels?this.levels[B].details:null;if(h!=null&&h.live)return this.startPosition=-1,this.setStartPosition(h,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(B,h,I,H){var z=this,Z=I.details;console.assert(!!Z,"level.details must be defined");var Y=Object.keys(B.elementaryStreams).reduce(function(G,ee){var J=B.elementaryStreams[ee];if(J){var oe=J.endPTS-J.startPTS;if(oe<=0)return z.warn("Could not parse fragment "+B.sn+" "+ee+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),z.resetTransmuxer(),G||!1;var se=H?0:Object(g.updateFragPTSDTS)(Z,B,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return z.hls.trigger(p.Events.LEVEL_PTS_UPDATED,{details:Z,level:I,drift:se,type:ee,frag:B,start:J.startPTS,end:J.endPTS}),!0}return G},!1);Y?(this.state=b.PARSED,this.hls.trigger(p.Events.FRAG_PARSED,{frag:B,part:h})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},y(n,[{key:"state",get:function(){return this._state},set:function(B){var h=this._state;h!==B&&(this._state=B,this.log(h+"->"+B))}}]),n}(R.default)},"./src/controller/buffer-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return w});var Q=_("./src/polyfills/number.ts"),R=_("./src/events.ts"),E=_("./src/utils/logger.ts"),S=_("./src/errors.ts"),s=_("./src/utils/buffer-helper.ts"),p=_("./src/utils/mediasource-helper.ts"),v=_("./src/loader/fragment.ts"),i=_("./src/controller/buffer-operation-queue.ts"),A=Object(p.getMediaSource)(),O=/([ha]vc.)(?:\.[^.,]+)+/,w=function(){function g(c){var a=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 u=a.hls,m=a.media,y=a.mediaSource;E.logger.log("[buffer-controller]: Media source opened"),m&&(a.updateMediaElementDuration(),u.trigger(R.Events.MEDIA_ATTACHED,{media:m})),y&&y.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){E.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){E.logger.log("[buffer-controller]: Media source ended")},this.hls=c,this._initSourceBuffer(),this.registerListeners()}var C=g.prototype;return C.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},C.destroy=function(){this.unregisterListeners(),this.details=null},C.registerListeners=function(){var a=this.hls;a.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(R.Events.BUFFER_RESET,this.onBufferReset,this),a.on(R.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(R.Events.BUFFER_EOS,this.onBufferEos,this),a.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(R.Events.FRAG_PARSED,this.onFragParsed,this),a.on(R.Events.FRAG_CHANGED,this.onFragChanged,this)},C.unregisterListeners=function(){var a=this.hls;a.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(R.Events.BUFFER_RESET,this.onBufferReset,this),a.off(R.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(R.Events.BUFFER_EOS,this.onBufferEos,this),a.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(R.Events.FRAG_PARSED,this.onFragParsed,this),a.off(R.Events.FRAG_CHANGED,this.onFragChanged,this)},C._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},C.onManifestParsed=function(a,u){var m=2;(u.audio&&!u.video||!u.altAudio)&&(m=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=m,this.details=null,E.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},C.onMediaAttaching=function(a,u){var m=this.media=u.media;if(m&&A){var y=this.mediaSource=new A;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),m.src=self.URL.createObjectURL(y),this._objectUrl=m.src}},C.onMediaDetaching=function(){var a=this.media,u=this.mediaSource,m=this._objectUrl;if(u){if(E.logger.log("[buffer-controller]: media source detaching"),u.readyState==="open")try{u.endOfStream()}catch(y){E.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),u.removeEventListener("sourceopen",this._onMediaSourceOpen),u.removeEventListener("sourceended",this._onMediaSourceEnded),u.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(m&&self.URL.revokeObjectURL(m),a.src===m?(a.removeAttribute("src"),a.load()):E.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(R.Events.MEDIA_DETACHED,void 0)},C.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(u){var m=a.sourceBuffer[u];try{m&&(a.removeBufferListeners(u),a.mediaSource&&a.mediaSource.removeSourceBuffer(m),a.sourceBuffer[u]=void 0)}catch(y){E.logger.warn("[buffer-controller]: Failed to reset the "+u+" buffer",y)}}),this._initSourceBuffer()},C.onBufferCodecs=function(a,u){var m=this,y=this.getSourceBufferTypes().length;if(Object.keys(u).forEach(function(T){if(y){var x=m.tracks[T];if(x&&typeof x.buffer.changeType=="function"){var M=u[T],b=M.codec,o=M.levelCodec,r=M.container,n=(x.levelCodec||x.codec).replace(O,"$1"),l=(o||b).replace(O,"$1");if(n!==l){var L=r+";codecs="+(o||b);m.appendChangeType(T,L)}}}else m.pendingTracks[T]=u[T]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},C.appendChangeType=function(a,u){var m=this,y=this.operationQueue,T={execute:function(){var M=m.sourceBuffer[a];M&&(E.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+u),M.changeType(u)),y.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(M){E.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",M)}};y.append(T,a)},C.onBufferAppending=function(a,u){var m=this,y=this.hls,T=this.operationQueue,x=this.tracks,M=u.data,b=u.type,o=u.frag,r=u.part,n=u.chunkMeta,l=n.buffering[b],L=self.performance.now();l.start=L;var B=o.stats.buffering,h=r?r.stats.buffering:null;B.start===0&&(B.start=L),h&&h.start===0&&(h.start=L);var I=x.audio,H=b==="audio"&&n.id===1&&(I==null?void 0:I.container)==="audio/mpeg",z={execute:function(){if(l.executeStart=self.performance.now(),H){var Y=m.sourceBuffer[b];if(Y){var G=o.start-Y.timestampOffset;Math.abs(G)>=.1&&(E.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+o.start+" (delta: "+G+") sn: "+o.sn+")"),Y.timestampOffset=o.start)}}m.appendExecutor(M,b)},onStart:function(){},onComplete:function(){var Y=self.performance.now();l.executeEnd=l.end=Y,B.first===0&&(B.first=Y),h&&h.first===0&&(h.first=Y);var G=m.sourceBuffer,ee={};for(var J in G)ee[J]=s.BufferHelper.getBuffered(G[J]);m.appendError=0,m.hls.trigger(R.Events.BUFFER_APPENDED,{type:b,frag:o,part:r,chunkMeta:n,parent:o.type,timeRanges:ee})},onError:function(Y){E.logger.error("[buffer-controller]: Error encountered while trying to append to the "+b+" SourceBuffer",Y);var G={type:S.ErrorTypes.MEDIA_ERROR,parent:o.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:Y,fatal:!1};Y.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=S.ErrorDetails.BUFFER_FULL_ERROR:(m.appendError++,G.details=S.ErrorDetails.BUFFER_APPEND_ERROR,m.appendError>y.config.appendErrorMaxRetry&&(E.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),y.trigger(R.Events.ERROR,G)}};T.append(z,b)},C.onBufferFlushing=function(a,u){var m=this,y=this.operationQueue,T=function(M){return{execute:m.removeExecutor.bind(m,M,u.startOffset,u.endOffset),onStart:function(){},onComplete:function(){m.hls.trigger(R.Events.BUFFER_FLUSHED,{type:M})},onError:function(o){E.logger.warn("[buffer-controller]: Failed to remove from "+M+" SourceBuffer",o)}}};u.type?y.append(T(u.type),u.type):this.getSourceBufferTypes().forEach(function(x){y.append(T(x),x)})},C.onFragParsed=function(a,u){var m=this,y=u.frag,T=u.part,x=[],M=T?T.elementaryStreams:y.elementaryStreams;M[v.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(M[v.ElementaryStreamTypes.AUDIO]&&x.push("audio"),M[v.ElementaryStreamTypes.VIDEO]&&x.push("video"));var b=function(){var r=self.performance.now();y.stats.buffering.end=r,T&&(T.stats.buffering.end=r);var n=T?T.stats:y.stats;m.hls.trigger(R.Events.FRAG_BUFFERED,{frag:y,part:T,stats:n,id:y.type})};x.length===0&&E.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(b,x)},C.onFragChanged=function(a,u){this.flushBackBuffer()},C.onBufferEos=function(a,u){var m=this,y=this.getSourceBufferTypes().reduce(function(T,x){var M=m.sourceBuffer[x];return(!u.type||u.type===x)&&(M&&!M.ended&&(M.ended=!0,E.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),T&&!!(!M||M.ended)},!0);y&&this.blockBuffers(function(){var T=m.mediaSource;if(!T||T.readyState!=="open")return;T.endOfStream()})},C.onLevelUpdated=function(a,u){var m=u.details;if(!m.fragments.length)return;this.details=m,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},C.flushBackBuffer=function(){var a=this.hls,u=this.details,m=this.media,y=this.sourceBuffer;if(!m||u===null)return;var T=this.getSourceBufferTypes();if(!T.length)return;var x=u.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(Q.isFiniteNumber)(x)||x<0)return;var M=m.currentTime,b=u.levelTargetDuration,o=Math.max(x,b),r=Math.floor(M/b)*b-o;T.forEach(function(n){var l=y[n];if(l){var L=s.BufferHelper.getBuffered(l);L.length>0&&r>L.start(0)&&(a.trigger(R.Events.BACK_BUFFER_REACHED,{bufferEnd:r}),u.live&&a.trigger(R.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r}),a.trigger(R.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n}))}})},C.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,u=this.hls,m=this.media,y=this.mediaSource,T=a.fragments[0].start+a.totalduration,x=m.duration,M=Object(Q.isFiniteNumber)(y.duration)?y.duration:0;a.live&&u.config.liveDurationInfinity?(E.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(a)):(T>M&&T>x||!Object(Q.isFiniteNumber)(x))&&(E.logger.log("[buffer-controller]: Updating Media Source duration to "+T.toFixed(3)),y.duration=T)},C.updateSeekableRange=function(a){var u=this.mediaSource,m=a.fragments,y=m.length;if(y&&a.live&&u!==null&&u!==void 0&&u.setLiveSeekableRange){var T=Math.max(0,m[0].start),x=Math.max(T,T+a.totalduration);u.setLiveSeekableRange(T,x)}},C.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,u=this.operationQueue,m=this.pendingTracks,y=Object.keys(m).length;if(y&&!a||y===2){this.createSourceBuffers(m),this.pendingTracks={};var T=this.getSourceBufferTypes();if(T.length===0){this.hls.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}T.forEach(function(x){u.executeNext(x)})}},C.createSourceBuffers=function(a){var u=this.sourceBuffer,m=this.mediaSource;if(!m)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var T in a)if(!u[T]){var x=a[T];if(!x)throw Error("source buffer exists for track "+T+", however track does not");var M=x.levelCodec||x.codec,b=x.container+";codecs="+M;E.logger.log("[buffer-controller]: creating sourceBuffer("+b+")");try{var o=u[T]=m.addSourceBuffer(b),r=T;this.addBufferListener(r,"updatestart",this._onSBUpdateStart),this.addBufferListener(r,"updateend",this._onSBUpdateEnd),this.addBufferListener(r,"error",this._onSBUpdateError),this.tracks[T]={buffer:o,codec:M,container:x.container,levelCodec:x.levelCodec,id:x.id},y++}catch(n){E.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+n.message),this.hls.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:n,mimeType:b})}}y&&this.hls.trigger(R.Events.BUFFER_CREATED,{tracks:this.tracks})},C._onSBUpdateStart=function(a){var u=this.operationQueue,m=u.current(a);m.onStart()},C._onSBUpdateEnd=function(a){var u=this.operationQueue,m=u.current(a);m.onComplete(),u.shiftAndExecuteNext(a)},C._onSBUpdateError=function(a,u){E.logger.error("[buffer-controller]: "+a+" SourceBuffer error",u),this.hls.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var m=this.operationQueue.current(a);m&&m.onError(u)},C.removeExecutor=function(a,u,m){var y=this.media,T=this.mediaSource,x=this.operationQueue,M=this.sourceBuffer,b=M[a];if(!y||!T||!b){E.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(a);return}var o=Object(Q.isFiniteNumber)(y.duration)?y.duration:Infinity,r=Object(Q.isFiniteNumber)(T.duration)?T.duration:Infinity,n=Math.max(0,u),l=Math.min(m,o,r);l>n?(E.logger.log("[buffer-controller]: Removing ["+n+","+l+"] from the "+a+" SourceBuffer"),console.assert(!b.updating,a+" sourceBuffer must not be updating"),b.remove(n,l)):x.shiftAndExecuteNext(a)},C.appendExecutor=function(a,u){var m=this.operationQueue,y=this.sourceBuffer,T=y[u];if(!T){E.logger.warn("[buffer-controller]: Attempting to append to the "+u+" SourceBuffer, but it does not exist"),m.shiftAndExecuteNext(u);return}T.ended=!1,console.assert(!T.updating,u+" sourceBuffer must not be updating"),T.appendBuffer(a)},C.blockBuffers=function(a,u){var m=this;if(u===void 0&&(u=this.getSourceBufferTypes()),!u.length){E.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var y=this.operationQueue,T=u.map(function(x){return y.appendBlocker(x)});Promise.all(T).then(function(){a(),u.forEach(function(x){var M=m.sourceBuffer[x];(!M||!M.updating)&&y.shiftAndExecuteNext(x)})})},C.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},C.addBufferListener=function(a,u,m){var y=this.sourceBuffer[a];if(!y)return;var T=m.bind(this,a);this.listeners[a].push({event:u,listener:T}),y.addEventListener(u,T)},C.removeBufferListeners=function(a){var u=this.sourceBuffer[a];if(!u)return;this.listeners[a].forEach(function(m){u.removeEventListener(m.event,m.listener)})},g}()},"./src/controller/buffer-operation-queue.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return R});var Q=_("./src/utils/logger.ts"),R=function(){function E(s){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=s}var S=E.prototype;return S.append=function(p,v){var i=this.queues[v];i.push(p),i.length===1&&this.buffers[v]&&this.executeNext(v)},S.insertAbort=function(p,v){var i=this.queues[v];i.unshift(p),this.executeNext(v)},S.appendBlocker=function(p){var v,i=new Promise(function(O){v=O}),A={execute:v,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(A,p),i},S.executeNext=function(p){var v=this.buffers,i=this.queues,A=v[p],O=i[p];if(O.length){var w=O[0];try{w.execute()}catch(g){Q.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),w.onError(g),(!A||!A.updating)&&(O.shift(),this.executeNext(p))}}},S.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},S.current=function(p){return this.queues[p][0]},E}()},"./src/controller/cap-level-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts");function R(s,p){for(var v=0;v<p.length;v++){var i=p[v];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function E(s,p,v){return p&&R(s.prototype,p),v&&R(s,v),s}var S=function(){function s(v){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=v,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var p=s.prototype;return p.setStreamController=function(i){this.streamController=i},p.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},p.registerListeners=function(){var i=this.hls;i.on(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.unregisterListener=function(){var i=this.hls;i.off(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.onFpsDropLevelCapping=function(i,A){s.isLevelAllowed(A.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(A.droppedLevel)},p.onMediaAttaching=function(i,A){this.media=A.media instanceof HTMLVideoElement?A.media:null},p.onManifestParsed=function(i,A){var O=this.hls;this.restrictedLevels=[],this.firstLevel=A.firstLevel,O.config.capLevelToPlayerSize&&A.video&&this.startCapping()},p.onBufferCodecs=function(i,A){var O=this.hls;O.config.capLevelToPlayerSize&&A.video&&this.startCapping()},p.onMediaDetaching=function(){this.stopCapping()},p.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var A=this.hls;A.autoLevelCapping=this.getMaxLevel(i.length-1),A.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=A.autoLevelCapping}}},p.getMaxLevel=function(i){var A=this,O=this.hls.levels;if(!O.length)return-1;var w=O.filter(function(g,C){return s.isLevelAllowed(C,A.restrictedLevels)&&C<=i});return this.clientRect=null,s.getMaxLevelByMediaSize(w,this.mediaWidth,this.mediaHeight)},p.startCapping=function(){if(this.timer)return;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()},p.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},p.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,A={width:0,height:0};if(i){var O=i.getBoundingClientRect();A.width=O.width,A.height=O.height,!A.width&&!A.height&&(A.width=O.right-O.left||i.width||0,A.height=O.bottom-O.top||i.height||0)}return this.clientRect=A,A},s.isLevelAllowed=function(i,A){return A===void 0&&(A=[]),A.indexOf(i)===-1},s.getMaxLevelByMediaSize=function(i,A,O){if(!i||!i.length)return-1;for(var w=function(u,m){return m?u.width!==m.width||u.height!==m.height:!0},g=i.length-1,C=0;C<i.length;C+=1){var c=i[C];if((c.width>=A||c.height>=O)&&w(c,i[C+1])){g=C;break}}return g},E(s,[{key:"mediaWidth",get:function(){return this.getDimensions().width*s.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*s.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(A){}return i}}]),s}();N.default=S},"./src/controller/cmcd-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return w});var Q=_("./src/events.ts"),R=_("./src/types/cmcd.ts"),E=_("./src/utils/buffer-helper.ts"),S=_("./src/utils/logger.ts");function s(g,C){for(var c=0;c<C.length;c++){var a=C[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(g,a.key,a)}}function p(g,C,c){return C&&s(g.prototype,C),c&&s(g,c),g}function v(g,C){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=i(g))||C&&g&&typeof g.length=="number"){c&&(g=c);var a=0;return function(){return a>=g.length?{done:!0}:{done:!1,value:g[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(g,C){if(!g)return;if(typeof g=="string")return A(g,C);var c=Object.prototype.toString.call(g).slice(8,-1);if(c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set")return Array.from(g);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return A(g,C)}function A(g,C){(C==null||C>g.length)&&(C=g.length);for(var c=0,a=new Array(C);c<C;c++)a[c]=g[c];return a}function O(){return O=Object.assign||function(g){for(var C=1;C<arguments.length;C++){var c=arguments[C];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(g[a]=c[a])}return g},O.apply(this,arguments)}var w=function(){function g(c){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(y){try{a.apply(y,{ot:R.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(T){S.logger.warn("Could not generate manifest CMCD data.",T)}},this.applyFragmentData=function(y){try{var T=y.frag,x=a.hls.levels[T.level],M=a.getObjectType(T),b={d:T.duration*1e3,ot:M};(M===R.CMCDObjectType.VIDEO||M===R.CMCDObjectType.AUDIO||M==R.CMCDObjectType.MUXED)&&(b.br=x.bitrate/1e3,b.tb=a.getTopBandwidth(M),b.bl=a.getBufferLength(M)),a.apply(y,b)}catch(o){S.logger.warn("Could not generate segment CMCD data.",o)}},this.hls=c;var u=this.config=c.config,m=u.cmcd;m!=null&&(u.pLoader=this.createPlaylistLoader(),u.fLoader=this.createFragmentLoader(),this.sid=m.sessionId||g.uuid(),this.cid=m.contentId,this.useHeaders=m.useHeaders===!0,this.registerListeners())}var C=g.prototype;return C.registerListeners=function(){var a=this.hls;a.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(Q.Events.BUFFER_CREATED,this.onBufferCreated,this)},C.unregisterListeners=function(){var a=this.hls;a.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(Q.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},C.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},C.onMediaAttached=function(a,u){this.media=u.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},C.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},C.onBufferCreated=function(a,u){var m,y;this.audioBuffer=(m=u.tracks.audio)===null||m===void 0?void 0:m.buffer,this.videoBuffer=(y=u.tracks.video)===null||y===void 0?void 0:y.buffer},C.createData=function(){var a;return{v:R.CMCDVersion,sf:R.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},C.apply=function(a,u){u===void 0&&(u={}),O(u,this.createData());var m=u.ot===R.CMCDObjectType.INIT||u.ot===R.CMCDObjectType.VIDEO||u.ot===R.CMCDObjectType.MUXED;if(this.starved&&m&&(u.bs=!0,u.su=!0,this.starved=!1),u.su==null&&(u.su=this.buffering),this.useHeaders){var y=g.toHeaders(u);if(!Object.keys(y).length)return;a.headers||(a.headers={}),O(a.headers,y)}else{var T=g.toQuery(u);if(!T)return;a.url=g.appendQueryToUri(a.url,T)}},C.getObjectType=function(a){var u=a.type;return u==="subtitle"?R.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?R.CMCDObjectType.INIT:u==="audio"?R.CMCDObjectType.AUDIO:u==="main"?this.hls.audioTracks.length?R.CMCDObjectType.VIDEO:R.CMCDObjectType.MUXED:void 0},C.getTopBandwidth=function(a){for(var u=0,m=a===R.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,y=v(m),T;!(T=y()).done;){var x=T.value;x.bitrate>u&&(u=x.bitrate)}return u>0?u:NaN},C.getBufferLength=function(a){var u=this.hls.media,m=a===R.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!m||!u)return NaN;var y=E.BufferHelper.bufferInfo(m,u.currentTime,this.config.maxBufferHole);return y.len*1e3},C.createPlaylistLoader=function(){var a=this.config.pLoader,u=this.applyPlaylistData,m=a||this.config.loader;return function(){function y(x){this.loader=void 0,this.loader=new m(x)}var T=y.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(M,b,o){u(M),this.loader.load(M,b,o)},p(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},C.createFragmentLoader=function(){var a=this.config.fLoader,u=this.applyFragmentData,m=a||this.config.loader;return function(){function y(x){this.loader=void 0,this.loader=new m(x)}var T=y.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(M,b,o){u(M),this.loader.load(M,b,o)},p(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},g.uuid=function(){var a=URL.createObjectURL(new Blob),u=a.toString();return URL.revokeObjectURL(a),u.substr(u.lastIndexOf("/")+1)},g.serialize=function(a){for(var u=[],m=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},y=function(H){return Math.round(H)},T=function(H){return y(H/100)*100},x=function(H){return encodeURIComponent(H)},M={br:y,d:y,bl:T,dl:T,mtp:T,nor:x,rtp:T,tb:y},b=Object.keys(a||{}).sort(),o=v(b),r;!(r=o()).done;){var n=r.value,l=a[n];if(!m(l))continue;if(n==="v"&&l===1)continue;if(n=="pr"&&l===1)continue;var L=M[n];L&&(l=L(l));var B=typeof l,h=void 0;n==="ot"||n==="sf"||n==="st"?h=n+"="+l:B==="boolean"?h=n:B==="number"?h=n+"="+l:h=n+"="+JSON.stringify(l),u.push(h)}return u.join(",")},g.toHeaders=function(a){for(var u=Object.keys(a),m={},y=["Object","Request","Session","Status"],T=[{},{},{},{}],x={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},M=0,b=u;M<b.length;M++){var o=b[M],r=x[o]!=null?x[o]:1;T[r][o]=a[o]}for(var n=0;n<T.length;n++){var l=g.serialize(T[n]);l&&(m["CMCD-"+y[n]]=l)}return m},g.toQuery=function(a){return"CMCD="+encodeURIComponent(g.serialize(a))},g.appendQueryToUri=function(a,u){if(!u)return a;var m=a.includes("?")?"&":"?";return""+a+m+u},g}()},"./src/controller/eme-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts"),R=_("./src/errors.ts"),E=_("./src/utils/logger.ts"),S=_("./src/utils/mediakeys-helper.ts");function s(w,g){for(var C=0;C<g.length;C++){var c=g[C];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(w,c.key,c)}}function p(w,g,C){return g&&s(w.prototype,g),C&&s(w,C),w}var v=3,i=function(g,C,c){var a={audioCapabilities:[],videoCapabilities:[]};return g.forEach(function(u){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+u+'"',robustness:c.audioRobustness||""})}),C.forEach(function(u){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+u+'"',robustness:c.videoRobustness||""})}),[a]},A=function(g,C,c,a){switch(g){case S.KeySystems.WIDEVINE:return i(C,c,a);default:throw new Error("Unknown key-system: "+g)}},O=function(){function w(C){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=C,this._config=C.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 g=w.prototype;return g.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},g._registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},g._unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},g.getLicenseServerUrl=function(c){switch(c){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+c+'"')},g._attemptKeySystemAccess=function(c,a,u){var m=this,y=A(c,a,u,this._drmSystemOptions);E.logger.log("Requesting encrypted media key-system access");var T=this.requestMediaKeySystemAccess(c,y);this.mediaKeysPromise=T.then(function(x){return m._onMediaKeySystemAccessObtained(c,x)}),T.catch(function(x){E.logger.error('Failed to obtain key-system "'+c+'" access:',x)})},g._onMediaKeySystemAccessObtained=function(c,a){var u=this;E.logger.log('Access for key-system "'+c+'" obtained');var m={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:c};this._mediaKeysList.push(m);var y=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(T){return m.mediaKeys=T,E.logger.log('Media-keys created for key-system "'+c+'"'),u._onMediaKeysCreated(),T});return y.catch(function(T){E.logger.error("Failed to create media-keys:",T)}),y},g._onMediaKeysCreated=function(){var c=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),c._onNewMediaKeySession(a.mediaKeysSession))})},g._onNewMediaKeySession=function(c){var a=this;E.logger.log("New key-system session "+c.sessionId),c.addEventListener("message",function(u){a._onKeySessionMessage(c,u.message)},!1)},g._onKeySessionMessage=function(c,a){E.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(u){E.logger.log("Received license data (length: "+(u&&u.byteLength)+"), updating key-session"),c.update(u)})},g.onMediaEncrypted=function(c){var a=this;if(E.logger.log('Media is encrypted using "'+c.initDataType+'" init data type'),!this.mediaKeysPromise){E.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var u=function(y){if(!a._media)return;a._attemptSetMediaKeys(y),a._generateRequestWithPreferredKeySession(c.initDataType,c.initData)};this.mediaKeysPromise.then(u).catch(u)},g._attemptSetMediaKeys=function(c){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){E.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}E.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},g._generateRequestWithPreferredKeySession=function(c,a){var u=this,m=this._mediaKeysList[0];if(!m){E.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(m.mediaKeysSessionInitialized){E.logger.warn("Key-Session already initialized but requested again");return}var y=m.mediaKeysSession;if(!y){E.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){E.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}E.logger.log('Generating key-session request for "'+c+'" init data type'),m.mediaKeysSessionInitialized=!0,y.generateRequest(c,a).then(function(){E.logger.debug("Key-session generation succeeded")}).catch(function(T){E.logger.error("Error generating key-session request:",T),u.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},g._createLicenseXhr=function(c,a,u){var m=new XMLHttpRequest;m.responseType="arraybuffer",m.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,m,c,a,u);var y=this._licenseXhrSetup;if(y)try{y.call(this.hls,m,c),y=void 0}catch(T){E.logger.error(T)}try{m.readyState||m.open("POST",c,!0),y&&y.call(this.hls,m,c)}catch(T){throw new Error("issue setting up KeySystem license XHR "+T)}return m},g._onLicenseRequestReadyStageChange=function(c,a,u,m){switch(c.readyState){case 4:if(c.status===200){this._requestLicenseFailureCount=0,E.logger.log("License request succeeded");var y=c.response,T=this._licenseResponseCallback;if(T)try{y=T.call(this.hls,c,a)}catch(M){E.logger.error(M)}m(y)}else{if(E.logger.error("License Request XHR failed ("+a+"). Status: "+c.status+" ("+c.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>v){this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var x=v-this._requestLicenseFailureCount+1;E.logger.warn("Retrying license request, "+x+" attempts left"),this._requestLicense(u,m)}break}},g._generateLicenseRequestChallenge=function(c,a){switch(c.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+c.mediaKeySystemDomain)},g._requestLicense=function(c,a){E.logger.log("Requesting content license for key-system");var u=this._mediaKeysList[0];if(!u){E.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var m=this.getLicenseServerUrl(u.mediaKeySystemDomain),y=this._createLicenseXhr(m,c,a);E.logger.log("Sending license request to URL: "+m);var T=this._generateLicenseRequestChallenge(u,c);y.send(T)}catch(x){E.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},g.onMediaAttached=function(c,a){if(!this._emeEnabled)return;var u=a.media;this._media=u,u.addEventListener("encrypted",this._onMediaEncrypted)},g.onMediaDetached=function(){var c=this._media,a=this._mediaKeysList;if(!c)return;c.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(u){if(u.mediaKeysSession)return u.mediaKeysSession.close().catch(function(){})})).then(function(){return c.setMediaKeys(null)}).catch(function(){})},g.onManifestParsed=function(c,a){if(!this._emeEnabled)return;var u=a.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),m=a.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,u,m)},p(w,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),w}();N.default=O},"./src/controller/fps-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts"),R=_("./src/utils/logger.ts"),E=function(){function S(p){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=p,this.registerListeners()}var s=S.prototype;return s.setStreamController=function(v){this.streamController=v},s.registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},s.unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching)},s.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},s.onMediaAttaching=function(v,i){var A=this.hls.config;if(A.capLevelOnFPSDrop){var O=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=O,O&&typeof O.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),A.fpsDroppedMonitoringPeriod)}},s.checkFPS=function(v,i,A){var O=performance.now();if(i){if(this.lastTime){var w=O-this.lastTime,g=A-this.lastDroppedFrames,C=i-this.lastDecodedFrames,c=1e3*g/w,a=this.hls;if(a.trigger(Q.Events.FPS_DROP,{currentDropped:g,currentDecoded:C,totalDroppedFrames:A}),c>0&&g>a.config.fpsDroppedMonitoringThreshold*C){var u=a.currentLevel;R.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=u)&&(u=u-1,a.trigger(Q.Events.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:a.currentLevel}),a.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=O,this.lastDroppedFrames=A,this.lastDecodedFrames=i}},s.checkFPSInterval=function(){var v=this.media;if(v)if(this.isVideoPlaybackQualityAvailable){var i=v.getVideoPlaybackQuality();this.checkFPS(v,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(v,v.webkitDecodedFrameCount,v.webkitDroppedFrameCount)},S}();N.default=E},"./src/controller/fragment-finders.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"findFragmentByPDT",function(){return E}),_.d(N,"findFragmentByPTS",function(){return S}),_.d(N,"fragmentWithinToleranceTest",function(){return s}),_.d(N,"pdtWithinToleranceTest",function(){return p}),_.d(N,"findFragWithCC",function(){return v});var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/binary-search.ts");function E(i,A,O){if(A===null||!Array.isArray(i)||!i.length||!Object(Q.isFiniteNumber)(A))return null;var w=i[0].programDateTime;if(A<(w||0))return null;var g=i[i.length-1].endProgramDateTime;if(A>=(g||0))return null;O=O||0;for(var C=0;C<i.length;++C){var c=i[C];if(p(A,O,c))return c}return null}function S(i,A,O,w){O===void 0&&(O=0),w===void 0&&(w=0);var g=null;if(i?g=A[i.sn-A[0].sn+1]||null:O===0&&A[0].start===0&&(g=A[0]),g&&s(O,w,g)===0)return g;var C=R.default.search(A,s.bind(null,O,w));return C||g}function s(i,A,O){i===void 0&&(i=0),A===void 0&&(A=0);var w=Math.min(A,O.duration+(O.deltaPTS?O.deltaPTS:0));return O.start+O.duration-w<=i?1:O.start-w>i&&O.start?-1:0}function p(i,A,O){var w=Math.min(A,O.duration+(O.deltaPTS?O.deltaPTS:0))*1e3,g=O.endProgramDateTime||0;return g-w>i}function v(i,A){return R.default.search(i,function(O){return O.cc<A?1:O.cc>A?-1:0})}},"./src/controller/fragment-tracker.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"FragmentState",function(){return E}),_.d(N,"FragmentTracker",function(){return S});var Q=_("./src/events.ts"),R=_("./src/types/loader.ts"),E;(function(v){v.NOT_LOADED="NOT_LOADED",v.BACKTRACKED="BACKTRACKED",v.APPENDING="APPENDING",v.PARTIAL="PARTIAL",v.OK="OK"})(E||(E={}));var S=function(){function v(A){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=A,this._registerListeners()}var i=v.prototype;return i._registerListeners=function(){var O=this.hls;O.on(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),O.on(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),O.on(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var O=this.hls;O.off(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),O.off(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),O.off(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(O,w){if(w===R.PlaylistLevelType.MAIN){var g=this.activeFragment,C=this.activeParts;if(!g)return null;if(C)for(var c=C.length;c--;){var a=C[c],u=a?a.end:g.appendedPTS;if(a.start<=O&&u!==void 0&&O<=u)return c>9&&(this.activeParts=C.slice(c-9)),a}else if(g.start<=O&&g.appendedPTS!==void 0&&O<=g.appendedPTS)return g}return this.getBufferedFrag(O,w)},i.getBufferedFrag=function(O,w){for(var g=this.fragments,C=Object.keys(g),c=C.length;c--;){var a=g[C[c]];if((a==null?void 0:a.body.type)===w&&a.buffered){var u=a.body;if(u.start<=O&&O<=u.end)return u}}return null},i.detectEvictedFragments=function(O,w,g){var C=this;Object.keys(this.fragments).forEach(function(c){var a=C.fragments[c];if(!a)return;if(!a.buffered){a.body.type===g&&C.removeFragment(a.body);return}var u=a.range[O];if(!u)return;u.time.some(function(m){var y=!C.isTimeBuffered(m.startPTS,m.endPTS,w);return y&&C.removeFragment(a.body),y})})},i.detectPartialFragments=function(O){var w=this,g=this.timeRanges,C=O.frag,c=O.part;if(!g||C.sn==="initSegment")return;var a=p(C),u=this.fragments[a];if(!u)return;Object.keys(g).forEach(function(m){var y=C.elementaryStreams[m];if(!y)return;var T=g[m],x=c!==null||y.partial===!0;u.range[m]=w.getBufferedTimes(C,c,x,T)}),u.backtrack=u.loaded=null,Object.keys(u.range).length?u.buffered=!0:this.removeFragment(u.body)},i.fragBuffered=function(O){var w=p(O),g=this.fragments[w];g&&(g.backtrack=g.loaded=null,g.buffered=!0)},i.getBufferedTimes=function(O,w,g,C){for(var c={time:[],partial:g},a=w?w.start:O.start,u=w?w.end:O.end,m=O.minEndPTS||u,y=O.maxStartPTS||a,T=0;T<C.length;T++){var x=C.start(T)-this.bufferPadding,M=C.end(T)+this.bufferPadding;if(y>=x&&m<=M){c.time.push({startPTS:Math.max(a,C.start(T)),endPTS:Math.min(u,C.end(T))});break}else if(a<M&&u>x)c.partial=!0,c.time.push({startPTS:Math.max(a,C.start(T)),endPTS:Math.min(u,C.end(T))});else if(u<=x)break}return c},i.getPartialFragment=function(O){var w=null,g,C,c,a=0,u=this.bufferPadding,m=this.fragments;return Object.keys(m).forEach(function(y){var T=m[y];if(!T)return;s(T)&&(C=T.body.start-u,c=T.body.end+u,O>=C&&O<=c&&(g=Math.min(O-C,c-O),a<=g&&(w=T.body,a=g)))}),w},i.getState=function(O){var w=p(O),g=this.fragments[w];return g?g.buffered?s(g)?E.PARTIAL:E.OK:g.backtrack?E.BACKTRACKED:E.APPENDING:E.NOT_LOADED},i.backtrack=function(O,w){var g=p(O),C=this.fragments[g];if(!C||C.backtrack)return null;var c=C.backtrack=w||C.loaded;return C.loaded=null,c},i.getBacktrackData=function(O){var w=p(O),g=this.fragments[w];if(g){var C,c=g.backtrack;if(c!=null&&(C=c.payload)!==null&&C!==void 0&&C.byteLength)return c;this.removeFragment(O)}return null},i.isTimeBuffered=function(O,w,g){for(var C,c,a=0;a<g.length;a++){if(C=g.start(a)-this.bufferPadding,c=g.end(a)+this.bufferPadding,O>=C&&w<=c)return!0;if(w<=C)return!1}return!1},i.onFragLoaded=function(O,w){var g=w.frag,C=w.part;if(g.sn==="initSegment"||g.bitrateTest||C)return;var c=p(g);this.fragments[c]={body:g,loaded:w,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(O,w){var g=this,C=w.frag,c=w.part,a=w.timeRanges;if(C.type===R.PlaylistLevelType.MAIN)if(this.activeFragment=C,c){var u=this.activeParts;u||(this.activeParts=u=[]),u.push(c)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(m){var y=a[m];if(g.detectEvictedFragments(m,y),!c)for(var T=0;T<y.length;T++)C.appendedPTS=Math.max(y.end(T),C.appendedPTS||0)})},i.onFragBuffered=function(O,w){this.detectPartialFragments(w)},i.hasFragment=function(O){var w=p(O);return!!this.fragments[w]},i.removeFragmentsInRange=function(O,w,g){var C=this;Object.keys(this.fragments).forEach(function(c){var a=C.fragments[c];if(!a)return;if(a.buffered){var u=a.body;u.type===g&&u.start<w&&u.end>O&&C.removeFragment(u)}})},i.removeFragment=function(O){var w=p(O);O.stats.loaded=0,O.clearElementaryStreamInfo(),delete this.fragments[w]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},v}();function s(v){var i,A;return v.buffered&&(((i=v.range.video)===null||i===void 0?void 0:i.partial)||((A=v.range.audio)===null||A===void 0?void 0:A.partial))}function p(v){return v.type+"_"+v.level+"_"+v.urlId+"_"+v.sn}},"./src/controller/gap-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"STALL_MINIMUM_DURATION_MS",function(){return s}),_.d(N,"MAX_START_GAP_JUMP",function(){return p}),_.d(N,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return v}),_.d(N,"SKIP_BUFFER_RANGE_START",function(){return i}),_.d(N,"default",function(){return A});var Q=_("./src/utils/buffer-helper.ts"),R=_("./src/errors.ts"),E=_("./src/events.ts"),S=_("./src/utils/logger.ts"),s=250,p=2,v=.1,i=.05,A=function(){function O(g,C,c,a){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=g,this.media=C,this.fragmentTracker=c,this.hls=a}var w=O.prototype;return w.destroy=function(){this.hls=this.fragmentTracker=this.media=null},w.poll=function(C){var c=this.config,a=this.media,u=this.stalled,m=a.currentTime,y=a.seeking,T=this.seeking&&!y,x=!this.seeking&&y;if(this.seeking=y,m!==C){if(this.moved=!0,u!==null){if(this.stallReported){var M=self.performance.now()-u;S.logger.warn("playback not stuck anymore @"+m+", after "+Math.round(M)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||T)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!Q.BufferHelper.getBuffered(a).length)return;var b=Q.BufferHelper.bufferInfo(a,m,0),o=b.len>0,r=b.nextStart||0;if(!o&&!r)return;if(y){var n=b.len>p,l=!r||r-m>p&&!this.fragmentTracker.getPartialFragment(m);if(n||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var L,B=Math.max(r,b.start||0)-m,h=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=h==null||((L=h.details)===null||L===void 0)?void 0:L.live,H=I?h.details.targetduration*2:p;if(B>0&&B<=H){this._trySkipBufferHole(null);return}}var z=self.performance.now();if(u===null){this.stalled=z;return}var Z=z-u;!y&&Z>=s&&this._reportStall(b.len);var Y=Q.BufferHelper.bufferInfo(a,m,c.maxBufferHole);this._tryFixBufferStall(Y,Z)},w._tryFixBufferStall=function(C,c){var a=this.config,u=this.fragmentTracker,m=this.media,y=m.currentTime,T=u.getPartialFragment(y);if(T){var x=this._trySkipBufferHole(T);if(x)return}C.len>a.maxBufferHole&&c>a.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},w._reportStall=function(C){var c=this.hls,a=this.media,u=this.stallReported;u||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+C+")"),c.trigger(E.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:C}))},w._trySkipBufferHole=function(C){for(var c=this.config,a=this.hls,u=this.media,m=u.currentTime,y=0,T=Q.BufferHelper.getBuffered(u),x=0;x<T.length;x++){var M=T.start(x);if(m+c.maxBufferHole>=y&&m<M){var b=Math.max(M+i,u.currentTime+v);return S.logger.warn("skipping hole, adjusting currentTime from "+m+" to "+b),this.moved=!0,this.stalled=null,u.currentTime=b,C&&a.trigger(E.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+m+" to "+b,frag:C}),b}y=T.end(x)}return 0},w._tryNudgeBuffer=function(){var C=this.config,c=this.hls,a=this.media,u=a.currentTime,m=(this.nudgeRetry||0)+1;if(this.nudgeRetry=m,m<C.nudgeMaxRetry){var y=u+m*C.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+u+" to "+y),a.currentTime=y,c.trigger(E.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+u+" after "+C.nudgeMaxRetry+" nudges"),c.trigger(E.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},O}()},"./src/controller/id3-track-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts"),R=_("./src/utils/texttrack-utils.ts"),E=_("./src/demux/id3.ts"),S=.25,s=function(){function p(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var v=p.prototype;return v.destroy=function(){this._unregisterListeners()},v._registerListeners=function(){var A=this.hls;A.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var A=this.hls;A.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.onMediaAttached=function(A,O){this.media=O.media},v.onMediaDetaching=function(){if(!this.id3Track)return;Object(R.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},v.getID3Track=function(A){if(!this.media)return;for(var O=0;O<A.length;O++){var w=A[O];if(w.kind==="metadata"&&w.label==="id3")return Object(R.sendAddTrackEvent)(w,this.media),w}return this.media.addTextTrack("metadata","id3")},v.onFragParsingMetadata=function(A,O){if(!this.media)return;var w=O.frag,g=O.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var C=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,c=0;c<g.length;c++){var a=E.getID3Frames(g[c].data);if(a){var u=g[c].pts,m=c<g.length-1?g[c+1].pts:w.end,y=m-u;y<=0&&(m=u+S);for(var T=0;T<a.length;T++){var x=a[T];if(!E.isTimeStampFrame(x)){var M=new C(u,m,"");M.value=x,this.id3Track.addCue(M)}}}}},v.onBufferFlushing=function(A,O){var w=O.startOffset,g=O.endOffset,C=O.type;if(!C||C==="audio"){var c=this.id3Track;c&&Object(R.removeCuesInRange)(c,w,g)}},p}();N.default=s},"./src/controller/latency-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return p});var Q=_("./src/errors.ts"),R=_("./src/events.ts"),E=_("./src/utils/logger.ts");function S(v,i){for(var A=0;A<i.length;A++){var O=i[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}function s(v,i,A){return i&&S(v.prototype,i),A&&S(v,A),v}var p=function(){function v(A){var O=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 O.timeupdate()},this.hls=A,this.config=A.config,this.registerListeners()}var i=v.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(R.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(R.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(R.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(R.Events.ERROR,this.onError)},i.onMediaAttached=function(O,w){this.media=w.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(O,w){var g=w.details;this.levelDetails=g,g.advanced&&this.timeupdate(),!g.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(O,w){if(w.details!==Q.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,E.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var O=this.media,w=this.levelDetails;if(!O||!w)return;this.currentTime=O.currentTime;var g=this.computeLatency();if(g===null)return;this._latency=g;var C=this.config,c=C.lowLatencyMode,a=C.maxLiveSyncPlaybackRate;if(!c||a===1)return;var u=this.targetLatency;if(u===null)return;var m=g-u,y=Math.min(this.maxLatency,u+w.targetduration),T=m<y;if(w.live&&T&&m>.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,a)),M=Math.round(2/(1+Math.exp(-.75*m-this.edgeStalled))*20)/20;O.playbackRate=Math.min(x,Math.max(1,M))}else O.playbackRate!==1&&O.playbackRate!==0&&(O.playbackRate=1)},i.estimateLiveEdge=function(){var O=this.levelDetails;return O===null?null:O.edge+O.age},i.computeLatency=function(){var O=this.estimateLiveEdge();return O===null?null:O-this.currentTime},s(v,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var O=this.config,w=this.levelDetails;return O.liveMaxLatencyDuration!==void 0?O.liveMaxLatencyDuration:w?O.liveMaxLatencyDurationCount*w.targetduration:0}},{key:"targetLatency",get:function(){var O=this.levelDetails;if(O===null)return null;var w=O.holdBack,g=O.partHoldBack,C=O.targetduration,c=this.config,a=c.liveSyncDuration,u=c.liveSyncDurationCount,m=c.lowLatencyMode,y=this.hls.userConfig,T=m&&g||w;(y.liveSyncDuration||y.liveSyncDurationCount||T===0)&&(T=a!==void 0?a:u*C);var x=C,M=1;return T+Math.min(this.stallCount*M,x)}},{key:"liveSyncPosition",get:function(){var O=this.estimateLiveEdge(),w=this.targetLatency,g=this.levelDetails;if(O===null||w===null||g===null)return null;var C=g.edge,c=O-w-this.edgeStalled,a=C-g.totalduration,u=C-(this.config.lowLatencyMode&&g.partTarget||g.targetduration);return Math.min(Math.max(a,c),u)}},{key:"drift",get:function(){var O=this.levelDetails;return O===null?1:O.drift}},{key:"edgeStalled",get:function(){var O=this.levelDetails;if(O===null)return 0;var w=(this.config.lowLatencyMode&&O.partTarget||O.targetduration)*3;return Math.max(O.age-w,0)}},{key:"forwardBufferLength",get:function(){var O=this.media,w=this.levelDetails;if(!O||!w)return 0;var g=O.buffered.length;return g?O.buffered.end(g-1):w.edge-this.currentTime}}]),v}()},"./src/controller/level-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return c});var Q=_("./src/types/level.ts"),R=_("./src/events.ts"),E=_("./src/errors.ts"),S=_("./src/utils/codecs.ts"),s=_("./src/controller/level-helper.ts"),p=_("./src/controller/base-playlist-controller.ts"),v=_("./src/types/loader.ts");function i(){return i=Object.assign||function(a){for(var u=1;u<arguments.length;u++){var m=arguments[u];for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(a[y]=m[y])}return a},i.apply(this,arguments)}function A(a,u){for(var m=0;m<u.length;m++){var y=u[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function O(a,u,m){return u&&A(a.prototype,u),m&&A(a,m),a}function w(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,g(a,u)}function g(a,u){return g=Object.setPrototypeOf||function(y,T){return y.__proto__=T,y},g(a,u)}var C=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),c=function(a){w(u,a);function u(y){var T;return T=a.call(this,y,"[level-controller]")||this,T._levels=[],T._firstLevel=-1,T._startLevel=void 0,T.currentLevelIndex=-1,T.manualLevelIndex=-1,T.onParsedComplete=void 0,T._registerListeners(),T}var m=u.prototype;return m._registerListeners=function(){var T=this.hls;T.on(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),T.on(R.Events.ERROR,this.onError,this)},m._unregisterListeners=function(){var T=this.hls;T.off(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),T.off(R.Events.ERROR,this.onError,this)},m.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},m.startLoad=function(){var T=this._levels;T.forEach(function(x){x.loadError=0}),a.prototype.startLoad.call(this)},m.onManifestLoaded=function(T,x){var M=[],b=[],o=[],r,n={},l,L=!1,B=!1,h=!1;if(x.levels.forEach(function(Z){var Y=Z.attrs;L=L||!!(Z.width&&Z.height),B=B||!!Z.videoCodec,h=h||!!Z.audioCodec,C&&Z.audioCodec&&Z.audioCodec.indexOf("mp4a.40.34")!==-1&&(Z.audioCodec=void 0);var G=Z.bitrate+"-"+Z.attrs.RESOLUTION+"-"+Z.attrs.CODECS;l=n[G],l?l.url.push(Z.url):(l=new Q.Level(Z),n[G]=l,M.push(l)),Y&&(Y.AUDIO&&Object(s.addGroupId)(l,"audio",Y.AUDIO),Y.SUBTITLES&&Object(s.addGroupId)(l,"text",Y.SUBTITLES))}),(L||B)&&h&&(M=M.filter(function(Z){var Y=Z.videoCodec,G=Z.width,ee=Z.height;return!!Y||!!(G&&ee)})),M=M.filter(function(Z){var Y=Z.audioCodec,G=Z.videoCodec;return(!Y||Object(S.isCodecSupportedInMp4)(Y,"audio"))&&(!G||Object(S.isCodecSupportedInMp4)(G,"video"))}),x.audioTracks&&(b=x.audioTracks.filter(function(Z){return!Z.audioCodec||Object(S.isCodecSupportedInMp4)(Z.audioCodec,"audio")}),Object(s.assignTrackIdsByGroup)(b)),x.subtitles&&(o=x.subtitles,Object(s.assignTrackIdsByGroup)(o)),M.length>0){r=M[0].bitrate,M.sort(function(Z,Y){return Z.bitrate-Y.bitrate}),this._levels=M;for(var I=0;I<M.length;I++)if(M[I].bitrate===r){this._firstLevel=I,this.log("manifest loaded, "+M.length+" level(s) found, first bitrate: "+r);break}var H=h&&!B,z={levels:M,audioTracks:b,subtitleTracks:o,firstLevel:this._firstLevel,stats:x.stats,audio:h,video:B,altAudio:!H&&b.some(function(Z){return!!Z.url})};this.hls.trigger(R.Events.MANIFEST_PARSED,z),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(R.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:x.url,reason:"no level with compatible codecs found in manifest"})},m.onError=function(T,x){if(a.prototype.onError.call(this,T,x),x.fatal)return;var M=x.context,b=this._levels[this.currentLevelIndex];if(M&&(M.type===v.PlaylistContextType.AUDIO_TRACK&&b.audioGroupIds&&M.groupId===b.audioGroupIds[b.urlId]||M.type===v.PlaylistContextType.SUBTITLE_TRACK&&b.textGroupIds&&M.groupId===b.textGroupIds[b.urlId])){this.redundantFailover(this.currentLevelIndex);return}var o=!1,r=!0,n;switch(x.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:if(x.frag){var l=this._levels[x.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(n=x.frag.level)):n=x.frag.level}break;case E.ErrorDetails.LEVEL_LOAD_ERROR:case E.ErrorDetails.LEVEL_LOAD_TIMEOUT:M&&(M.deliveryDirectives&&(r=!1),n=M.level),o=!0;break;case E.ErrorDetails.REMUX_ALLOC_ERROR:n=x.level,o=!0;break}n!==void 0&&this.recoverLevel(x,n,o,r)},m.recoverLevel=function(T,x,M,b){var o=T.details,r=this._levels[x];if(r.loadError++,M){var n=this.retryLoadingOrFail(T);if(n)T.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(b){var l=r.url.length;if(l>1&&r.loadError<l)T.levelRetry=!0,this.redundantFailover(x);else if(this.manualLevelIndex===-1){var L=x===0?this._levels.length-1:x-1;this.currentLevelIndex!==L&&this._levels[L].loadError===0&&(this.warn(o+": switch to "+L),T.levelRetry=!0,this.hls.nextAutoLevel=L)}}},m.redundantFailover=function(T){var x=this._levels[T],M=x.url.length;if(M>1){var b=(x.urlId+1)%M;this.warn("Switching to redundant URL-id "+b),this._levels.forEach(function(o){o.urlId=b}),this.level=T}},m.onFragLoaded=function(T,x){var M=x.frag;if(M!==void 0&&M.type===v.PlaylistLevelType.MAIN){var b=this._levels[M.level];b!==void 0&&(b.fragmentError=0,b.loadError=0)}},m.onLevelLoaded=function(T,x){var M,b=x.level,o=x.details,r=this._levels[b];if(!r){var n;this.warn("Invalid level index "+b),(n=x.deliveryDirectives)!==null&&n!==void 0&&n.skip&&(o.deltaUpdateFailed=!0);return}b===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0,this.retryCount=0),this.playlistLoaded(b,x,r.details)):(M=x.deliveryDirectives)!==null&&M!==void 0&&M.skip&&(o.deltaUpdateFailed=!0)},m.onAudioTrackSwitched=function(T,x){var M=this.hls.levels[this.currentLevelIndex];if(!M)return;if(M.audioGroupIds){for(var b=-1,o=this.hls.audioTracks[x.id].groupId,r=0;r<M.audioGroupIds.length;r++)if(M.audioGroupIds[r]===o){b=r;break}b!==M.urlId&&(M.urlId=b,this.startLoad())}},m.loadPlaylist=function(T){var x=this.currentLevelIndex,M=this._levels[x];if(this.canLoad&&M&&M.url.length>0){var b=M.urlId,o=M.url[b];if(T)try{o=T.addDirectives(o)}catch(r){this.warn("Could not construct new URL with HLS Delivery Directives: "+r)}this.log("Attempt loading level index "+x+(T?" at sn "+T.msn+" part "+T.part:"")+" with URL-id "+b+" "+o),this.clearTimer(),this.hls.trigger(R.Events.LEVEL_LOADING,{url:o,level:x,id:b,deliveryDirectives:T||null})}},m.removeLevel=function(T,x){var M=function(r,n){return n!==x},b=this._levels.filter(function(o,r){return r!==T?!0:o.url.length>1&&x!==void 0?(o.url=o.url.filter(M),o.audioGroupIds&&(o.audioGroupIds=o.audioGroupIds.filter(M)),o.textGroupIds&&(o.textGroupIds=o.textGroupIds.filter(M)),o.urlId=0,!0):!1}).map(function(o,r){var n=o.details;return n!=null&&n.fragments&&n.fragments.forEach(function(l){l.level=r}),o});this._levels=b,this.hls.trigger(R.Events.LEVELS_UPDATED,{levels:b})},O(u,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(T){var x,M=this._levels;if(M.length===0)return;if(this.currentLevelIndex===T&&(x=M[T])!==null&&x!==void 0&&x.details)return;if(T<0||T>=M.length){var b=T<0;if(this.hls.trigger(R.Events.ERROR,{type:E.ErrorTypes.OTHER_ERROR,details:E.ErrorDetails.LEVEL_SWITCH_ERROR,level:T,fatal:b,reason:"invalid level idx"}),b)return;T=Math.min(T,M.length-1)}this.clearTimer();var o=this.currentLevelIndex,r=M[o],n=M[T];this.log("switching to level "+T+" from "+o),this.currentLevelIndex=T;var l=i({},n,{level:T,maxBitrate:n.maxBitrate,uri:n.uri,urlId:n.urlId});delete l._urlId,this.hls.trigger(R.Events.LEVEL_SWITCHING,l);var L=n.details;if(!L||L.live){var B=this.switchParams(n.uri,r==null?void 0:r.details);this.loadPlaylist(B)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(T){this.manualLevelIndex=T,this._startLevel===void 0&&(this._startLevel=T),T!==-1&&(this.level=T)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(T){this._firstLevel=T}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var T=this.hls.config.startLevel;return T!==void 0?T:this._firstLevel}else return this._startLevel},set:function(T){this._startLevel=T}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(T){this.level=T,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=T)}}]),u}(p.default)},"./src/controller/level-helper.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"addGroupId",function(){return E}),_.d(N,"assignTrackIdsByGroup",function(){return S}),_.d(N,"updatePTS",function(){return s}),_.d(N,"updateFragPTSDTS",function(){return v}),_.d(N,"mergeDetails",function(){return i}),_.d(N,"mapPartIntersection",function(){return A}),_.d(N,"mapFragmentIntersection",function(){return O}),_.d(N,"adjustSliding",function(){return w}),_.d(N,"addSliding",function(){return g}),_.d(N,"computeReloadInterval",function(){return C}),_.d(N,"getFragmentWithSN",function(){return c}),_.d(N,"getPartWith",function(){return a});var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/logger.ts");function E(u,m,y){switch(m){case"audio":u.audioGroupIds||(u.audioGroupIds=[]),u.audioGroupIds.push(y);break;case"text":u.textGroupIds||(u.textGroupIds=[]),u.textGroupIds.push(y);break}}function S(u){var m={};u.forEach(function(y){var T=y.groupId||"";y.id=m[T]=m[T]||0,m[T]++})}function s(u,m,y){var T=u[m],x=u[y];p(T,x)}function p(u,m){var y=m.startPTS;if(Object(Q.isFiniteNumber)(y)){var T=0,x;m.sn>u.sn?(T=y-u.start,x=u):(T=u.start-y,x=m),x.duration!==T&&(x.duration=T)}else if(m.sn>u.sn){var M=u.cc===m.cc;M&&u.minEndPTS?m.start=u.start+(u.minEndPTS-u.start):m.start=u.start+u.duration}else m.start=Math.max(u.start-m.duration,0)}function v(u,m,y,T,x,M){var b=T-y;b<=0&&(R.logger.warn("Fragment should have a positive duration",m),T=y+m.duration,M=x+m.duration);var o=y,r=T,n=m.startPTS,l=m.endPTS;if(Object(Q.isFiniteNumber)(n)){var L=Math.abs(n-y);Object(Q.isFiniteNumber)(m.deltaPTS)?m.deltaPTS=Math.max(L,m.deltaPTS):m.deltaPTS=L,o=Math.max(y,n),y=Math.min(y,n),x=Math.min(x,m.startDTS),r=Math.min(T,l),T=Math.max(T,l),M=Math.max(M,m.endDTS)}m.duration=T-y;var B=y-m.start;m.appendedPTS=T,m.start=m.startPTS=y,m.maxStartPTS=o,m.startDTS=x,m.endPTS=T,m.minEndPTS=r,m.endDTS=M;var h=m.sn;if(!u||h<u.startSN||h>u.endSN)return 0;var I,H=h-u.startSN,z=u.fragments;for(z[H]=m,I=H;I>0;I--)p(z[I],z[I-1]);for(I=H;I<z.length-1;I++)p(z[I],z[I+1]);return u.fragmentHint&&p(z[z.length-1],u.fragmentHint),u.PTSKnown=u.alignedSliding=!0,B}function i(u,m){for(var y=null,T=u.fragments,x=T.length-1;x>=0;x--){var M=T[x].initSegment;if(M){y=M;break}}u.fragmentHint&&delete u.fragmentHint.endPTS;var b=0,o;if(O(u,m,function(I,H){I.relurl&&(b=I.cc-H.cc),Object(Q.isFiniteNumber)(I.startPTS)&&Object(Q.isFiniteNumber)(I.endPTS)&&(H.start=H.startPTS=I.startPTS,H.startDTS=I.startDTS,H.appendedPTS=I.appendedPTS,H.maxStartPTS=I.maxStartPTS,H.endPTS=I.endPTS,H.endDTS=I.endDTS,H.minEndPTS=I.minEndPTS,H.duration=I.endPTS-I.startPTS,H.duration&&(o=H),m.PTSKnown=m.alignedSliding=!0),H.elementaryStreams=I.elementaryStreams,H.loader=I.loader,H.stats=I.stats,H.urlId=I.urlId,I.initSegment&&(H.initSegment=I.initSegment,y=I.initSegment)}),y){var r=m.fragmentHint?m.fragments.concat(m.fragmentHint):m.fragments;r.forEach(function(I){var H;(!I.initSegment||I.initSegment.relurl===((H=y)===null||H===void 0?void 0:H.relurl))&&(I.initSegment=y)})}if(m.skippedSegments&&(m.deltaUpdateFailed=m.fragments.some(function(I){return!I}),m.deltaUpdateFailed)){R.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var n=m.skippedSegments;n--;)m.fragments.shift();m.startSN=m.fragments[0].sn,m.startCC=m.fragments[0].cc}var l=m.fragments;if(b){R.logger.warn("discontinuity sliding from playlist, take drift into account");for(var L=0;L<l.length;L++)l[L].cc+=b}m.skippedSegments&&(m.startCC=m.fragments[0].cc),A(u.partList,m.partList,function(I,H){H.elementaryStreams=I.elementaryStreams,H.stats=I.stats}),o?v(m,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):w(u,m),l.length&&(m.totalduration=m.edge-l[0].start),m.driftStartTime=u.driftStartTime,m.driftStart=u.driftStart;var B=m.advancedDateTime;if(m.advanced&&B){var h=m.edge;m.driftStart||(m.driftStartTime=B,m.driftStart=h),m.driftEndTime=B,m.driftEnd=h}else m.driftEndTime=u.driftEndTime,m.driftEnd=u.driftEnd,m.advancedDateTime=u.advancedDateTime}function A(u,m,y){if(u&&m)for(var T=0,x=0,M=u.length;x<=M;x++){var b=u[x],o=m[x+T];b&&o&&b.index===o.index&&b.fragment.sn===o.fragment.sn?y(b,o):T--}}function O(u,m,y){for(var T=m.skippedSegments,x=Math.max(u.startSN,m.startSN)-m.startSN,M=(u.fragmentHint?1:0)+(T?m.endSN:Math.min(u.endSN,m.endSN))-m.startSN,b=m.startSN-u.startSN,o=m.fragmentHint?m.fragments.concat(m.fragmentHint):m.fragments,r=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,n=x;n<=M;n++){var l=r[b+n],L=o[n];T&&!L&&n<T&&(L=m.fragments[n]=l),l&&L&&y(l,L)}}function w(u,m){var y=m.startSN+m.skippedSegments-u.startSN,T=u.fragments;if(y<0||y>=T.length)return;g(m,T[y].start)}function g(u,m){if(m){for(var y=u.fragments,T=u.skippedSegments;T<y.length;T++)y[T].start+=m;u.fragmentHint&&(u.fragmentHint.start+=m)}}function C(u,m){var y=1e3*u.levelTargetDuration,T=y/2,x=u.age,M=x>0&&x<y*3,b=m.loading.end-m.loading.start,o,r=u.availabilityDelay;if(u.updated===!1)if(M){var n=333*u.misses;o=Math.max(Math.min(T,b*2),n),u.availabilityDelay=(u.availabilityDelay||0)+o}else o=T;else M?(r=Math.min(r||y/2,x),u.availabilityDelay=r,o=r+y-x):o=y-b;return Math.round(o)}function c(u,m,y){if(!u||!u.details)return null;var T=u.details,x=T.fragments[m-T.startSN];return x||(x=T.fragmentHint,x&&x.sn===m?x:m<T.startSN&&y&&y.sn===m?y:null)}function a(u,m,y){if(!u||!u.details)return null;var T=u.details.partList;if(T)for(var x=T.length;x--;){var M=T[x];if(M.index===y&&M.fragment.sn===m)return M}return null}},"./src/controller/stream-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return T});var Q=_("./src/polyfills/number.ts"),R=_("./src/controller/base-stream-controller.ts"),E=_("./src/is-supported.ts"),S=_("./src/events.ts"),s=_("./src/utils/buffer-helper.ts"),p=_("./src/controller/fragment-tracker.ts"),v=_("./src/types/loader.ts"),i=_("./src/loader/fragment.ts"),A=_("./src/demux/transmuxer-interface.ts"),O=_("./src/types/transmuxer.ts"),w=_("./src/controller/gap-controller.ts"),g=_("./src/errors.ts"),C=_("./src/utils/logger.ts");function c(x,M){for(var b=0;b<M.length;b++){var o=M[b];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(x,o.key,o)}}function a(x,M,b){return M&&c(x.prototype,M),b&&c(x,b),x}function u(x,M){x.prototype=Object.create(M.prototype),x.prototype.constructor=x,m(x,M)}function m(x,M){return m=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},m(x,M)}var y=100,T=function(x){u(M,x);function M(o,r){var n;return n=x.call(this,o,r,"[stream-controller]")||this,n.audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.stalled=!1,n.couldBacktrack=!1,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}var b=M.prototype;return b._registerListeners=function(){var r=this.hls;r.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(S.Events.ERROR,this.onError,this),r.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var r=this.hls;r.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(S.Events.ERROR,this.onError,this),r.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},b.startLoad=function(r){if(this.levels){var n=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(y),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var L=l.startLevel;L===-1&&(l.config.testBandwidth?(L=0,this.bitrateTest=!0):L=l.nextAutoLevel),this.level=l.nextLoadLevel=L,this.loadedmetadata=!1}n>0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+n.toFixed(3)),r=n),this.state=R.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=R.State.STOPPED},b.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},b.doTick=function(){switch(this.state){case R.State.IDLE:this.doTickIdle();break;case R.State.WAITING_LEVEL:{var r,n=this.levels,l=this.level,L=n==null||((r=n[l])===null||r===void 0)?void 0:r.details;if(L&&(!L.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(L))break;this.state=R.State.IDLE;break}break}case R.State.FRAG_LOADING_WAITING_RETRY:{var B,h=self.performance.now(),I=this.retryDate;(!I||h>=I||(B=this.media)!==null&&B!==void 0&&B.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=R.State.IDLE)}break;default:break}this.onTickEnd()},b.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},b.doTickIdle=function(){var r,n,l=this.hls,L=this.levelLastLoaded,B=this.levels,h=this.media,I=l.config,H=l.nextLoadLevel;if(L===null||!h&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!B||!B[H])return;var z=B[H];this.level=l.nextLoadLevel=H;var Z=z.details;if(!Z||this.state===R.State.WAITING_LEVEL||Z.live&&this.levelLastLoaded!==H){this.state=R.State.WAITING_LEVEL;return}var Y=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:h,v.PlaylistLevelType.MAIN);if(Y===null)return;var G=Y.len,ee=this.getMaxBufferLength(z.maxBitrate);if(G>=ee)return;if(this._streamEnded(Y,Z)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,J),this.state=R.State.ENDED;return}var oe=Y.end,se=this.getNextFragment(oe,Z);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var Te=se.sn-Z.startSN;Te>1&&(se=Z.fragments[Te-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===p.FragmentState.OK&&this.nextLoadPosition>oe){var be=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(h,be,v.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,Z)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((r=se.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((n=se.decryptdata)!==null&&n!==void 0&&n.key)?this.loadKey(se,Z):this.loadFragment(se,Z,oe)},b.loadFragment=function(r,n,l){var L,B=this.fragmentTracker.getState(r);if(this.fragCurrent=r,B===p.FragmentState.BACKTRACKED){var h=this.fragmentTracker.getBacktrackData(r);if(h){this._handleFragmentLoadProgress(h),this._handleFragmentLoadComplete(h);return}else B=p.FragmentState.NOT_LOADED}B===p.FragmentState.NOT_LOADED||B===p.FragmentState.PARTIAL?r.sn==="initSegment"?this._loadInitSegment(r):this.bitrateTest?(r.bitrateTest=!0,this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r)):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,r,n,l)):B===p.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((L=this.media)===null||L===void 0?void 0:L.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},b.getAppendedFrag=function(r){var n=this.fragmentTracker.getAppendedFrag(r,v.PlaylistLevelType.MAIN);return n&&"fragment"in n?n.fragment:n},b.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,v.PlaylistLevelType.MAIN)},b.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},b.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},b.nextLevelSwitch=function(){var r=this.levels,n=this.media;if(n!=null&&n.readyState){var l,L=this.getAppendedFrag(n.currentTime);if(L&&L.start>1&&this.flushMainBuffer(0,L.start-1),!n.paused&&r){var B=this.hls.nextLoadLevel,h=r[B],I=this.fragLastKbps;I&&this.fragCurrent?l=this.fragCurrent.duration*h.maxBitrate/(1e3*I)+1:l=0}else l=0;var H=this.getBufferedFrag(n.currentTime+l);if(H){var z=this.followingBufferedFrag(H);if(z){this.abortCurrentFrag();var Z=z.maxStartPTS?z.maxStartPTS:z.start,Y=z.duration,G=Math.max(H.end,Z+Math.min(Math.max(Y-this.config.maxFragLookUpTolerance,Y*.5),Y*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},b.abortCurrentFrag=function(){var r=this.fragCurrent;this.fragCurrent=null,r!=null&&r.loader&&r.loader.abort(),this.state===R.State.KEY_LOADING&&(this.state=R.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},b.flushMainBuffer=function(r,n){x.prototype.flushMainBuffer.call(this,r,n,this.altAudio?"video":null)},b.onMediaAttached=function(r,n){x.prototype.onMediaAttached.call(this,r,n);var l=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new w.default(this.config,l,this.fragmentTracker,this.hls)},b.onMediaDetaching=function(){var r=this.media;r&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),x.prototype.onMediaDetaching.call(this)},b.onMediaPlaying=function(){this.tick()},b.onMediaSeeked=function(){var r=this.media,n=r?r.currentTime:null;Object(Q.isFiniteNumber)(n)&&this.log("Media seeked to "+n.toFixed(3)),this.tick()},b.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},b.onManifestParsed=function(r,n){var l=!1,L=!1,B;n.levels.forEach(function(h){B=h.audioCodec,B&&(B.indexOf("mp4a.40.2")!==-1&&(l=!0),B.indexOf("mp4a.40.5")!==-1&&(L=!0))}),this.audioCodecSwitch=l&&L&&!Object(E.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=n.levels,this.startFragRequested=!1},b.onLevelLoading=function(r,n){var l=this.levels;if(!l||this.state!==R.State.IDLE)return;var L=l[n.level];(!L.details||L.details.live&&this.levelLastLoaded!==n.level||this.waitForCdnTuneIn(L.details))&&(this.state=R.State.WAITING_LEVEL)},b.onLevelLoaded=function(r,n){var l,L=this.levels,B=n.level,h=n.details,I=h.totalduration;if(!L){this.warn("Levels were reset while loading level "+B);return}this.log("Level "+B+" loaded ["+h.startSN+","+h.endSN+"], cc ["+h.startCC+", "+h.endCC+"] duration:"+I);var H=this.fragCurrent;H&&(this.state===R.State.FRAG_LOADING||this.state===R.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==n.level&&H.loader&&(this.state=R.State.IDLE,H.loader.abort()));var z=L[B],Z=0;if(h.live||(l=z.details)!==null&&l!==void 0&&l.live){if(h.fragments[0]||(h.deltaUpdateFailed=!0),h.deltaUpdateFailed)return;Z=this.alignPlaylists(h,z.details)}if(z.details=h,this.levelLastLoaded=B,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:h,level:B}),this.state===R.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(h))return;this.state=R.State.IDLE}this.startFragRequested?h.live&&this.synchronizeToLiveEdge(h):this.setStartPosition(h,Z),this.tick()},b._handleFragmentLoadProgress=function(r){var n,l=r.frag,L=r.part,B=r.payload,h=this.levels;if(!h){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var I=h[l.level],H=I.details;if(!H){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var z=I.videoCodec,Z=H.PTSKnown||!H.live,Y=(n=l.initSegment)===null||n===void 0?void 0:n.data,G=this._getAudioCodec(I),ee=this.transmuxer=this.transmuxer||new A.default(this.hls,v.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=L?L.index:-1,oe=J!==-1,se=new O.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,B.byteLength,J,oe),Te=this.initPTS[l.cc];ee.push(B,Y,G,z,l,L,H.totalduration,Z,se,Te)},b.onAudioTrackSwitching=function(r,n){var l=this.altAudio,L=!!n.url,B=n.id;if(!L){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var h=this.fragCurrent;h!=null&&h.loader&&(this.log("Switching to main audio track, cancel main fragment load"),h.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;l&&I.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:B})}},b.onAudioTrackSwitched=function(r,n){var l=n.id,L=!!this.hls.audioTracks[l].url;if(L){var B=this.videoBuffer;B&&this.mediaBuffer!==B&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=B)}this.altAudio=L,this.tick()},b.onBufferCreated=function(r,n){var l=n.tracks,L,B,h=!1;for(var I in l){var H=l[I];if(H.id==="main"){if(B=I,L=H,I==="video"){var z=l[I];z&&(this.videoBuffer=z.buffer)}}else h=!0}h&&L?(this.log("Alternate track found, use "+B+".buffered to schedule main fragment loading"),this.mediaBuffer=L.buffer):this.mediaBuffer=this.media},b.onFragBuffered=function(r,n){var l=n.frag,L=n.part;if(l&&l.type!==v.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(L?" p: "+L.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===R.State.PARSED&&(this.state=R.State.IDLE);return}var B=L?L.stats:l.stats;this.fragLastKbps=Math.round(8*B.total/(B.buffering.end-B.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,L)},b.onError=function(r,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(v.PlaylistLevelType.MAIN,n);break;case g.ErrorDetails.LEVEL_LOAD_ERROR:case g.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==R.State.ERROR&&(n.fatal?(this.warn(""+n.details),this.state=R.State.ERROR):!n.levelRetry&&this.state===R.State.WAITING_LEVEL&&(this.state=R.State.IDLE));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if(n.parent==="main"&&(this.state===R.State.PARSING||this.state===R.State.PARSED)){var l=!0,L=this.getFwdBufferInfo(this.media,v.PlaylistLevelType.MAIN);L&&L.len>.5&&(l=!this.reduceMaxBufferLength(L.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},b.checkBuffer=function(){var r=this.media,n=this.gapController;if(!r||!n||!r.readyState)return;var l=s.BufferHelper.getBuffered(r);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):n.poll(this.lastCurrentTime),this.lastCurrentTime=r.currentTime},b.onFragLoadEmergencyAborted=function(){this.state=R.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},b.onBufferFlushed=function(r,n){var l=n.type;if(l!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var L=(l===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(L,l,v.PlaylistLevelType.MAIN)}},b.onLevelsUpdated=function(r,n){this.levels=n.levels},b.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},b.seekToStartPos=function(){var r=this.media,n=r.currentTime,l=this.startPosition;if(l>=0&&n<l){if(r.seeking){C.logger.log("could not seek to "+l+", already seeking at "+n);return}var L=s.BufferHelper.getBuffered(r),B=L.length?L.start(0):0,h=B-l;h>0&&(h<this.config.maxBufferHole||h<this.config.maxFragLookUpTolerance)&&(C.logger.log("adjusting start position by "+h+" to match buffer start"),l+=h,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+n),r.currentTime=l}},b._getAudioCodec=function(r){var n=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&n&&(this.log("Swapping audio codec"),n.indexOf("mp4a.40.5")!==-1?n="mp4a.40.2":n="mp4a.40.5"),n},b._loadBitrateTestFrag=function(r){var n=this;this._doFragLoad(r).then(function(l){var L=n.hls;if(!l||L.nextLoadLevel||n.fragContextChanged(r))return;n.fragLoadError=0,n.state=R.State.IDLE,n.startFragRequested=!1,n.bitrateTest=!1;var B=r.stats;B.parsing.start=B.parsing.end=B.buffering.start=B.buffering.end=self.performance.now(),L.trigger(S.Events.FRAG_LOADED,l)})},b._handleTransmuxComplete=function(r){var n,l="main",L=this.hls,B=r.remuxResult,h=r.chunkMeta,I=this.getCurrentContext(h);if(!I){this.warn("The loading context changed while buffering fragment "+h.sn+" of level "+h.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(h.level);return}var H=I.frag,z=I.part,Z=I.level,Y=B.video,G=B.text,ee=B.id3,J=B.initSegment,oe=this.altAudio?void 0:B.audio;if(this.fragContextChanged(H))return;if(this.state=R.State.PARSING,J){J.tracks&&(this._bufferInitSegment(Z,J.tracks,H,h),L.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:l,tracks:J.tracks}));var se=J.initPTS,Te=J.timescale;Object(Q.isFiniteNumber)(se)&&(this.initPTS[H.cc]=se,L.trigger(S.Events.INIT_PTS_FOUND,{frag:H,id:l,initPTS:se,timescale:Te}))}if(Y&&B.independent!==!1){if(Z.details){var be=Y.startPTS,xe=Y.endPTS,Oe=Y.startDTS,Ne=Y.endDTS;if(z)z.elementaryStreams[Y.type]={startPTS:be,endPTS:xe,startDTS:Oe,endDTS:Ne};else if(Y.firstKeyFrame&&Y.independent&&(this.couldBacktrack=!0),Y.dropped&&Y.independent){var Le=this.getLoadPosition()+this.config.maxBufferHole;if(Le<be){this.backtrack(H);return}H.setElementaryStreamInfo(Y.type,H.start,xe,H.start,Ne,!0)}H.setElementaryStreamInfo(Y.type,be,xe,Oe,Ne),this.bufferFragmentData(Y,H,z,h)}}else if(B.independent===!1){this.backtrack(H);return}if(oe){var Se=oe.startPTS,tt=oe.endPTS,Bt=oe.startDTS,De=oe.endDTS;z&&(z.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:Se,endPTS:tt,startDTS:Bt,endDTS:De}),H.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,Se,tt,Bt,De),this.bufferFragmentData(oe,H,z,h)}if(ee!=null&&(n=ee.samples)!==null&&n!==void 0&&n.length){var Qe={frag:H,id:l,samples:ee.samples};L.trigger(S.Events.FRAG_PARSING_METADATA,Qe)}if(G){var it={frag:H,id:l,samples:G.samples};L.trigger(S.Events.FRAG_PARSING_USERDATA,it)}},b._bufferInitSegment=function(r,n,l,L){var B=this;if(this.state!==R.State.PARSING)return;this.audioOnly=!!n.audio&&!n.video,this.altAudio&&!this.audioOnly&&delete n.audio;var h=n.audio,I=n.video,H=n.audiovideo;if(h){var z=r.audioCodec,Z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(z&&(z.indexOf("mp4a.40.5")!==-1?z="mp4a.40.2":z="mp4a.40.5"),h.metadata.channelCount!==1&&Z.indexOf("firefox")===-1&&(z="mp4a.40.5")),Z.indexOf("android")!==-1&&h.container!=="audio/mpeg"&&(z="mp4a.40.2",this.log("Android: force audio codec to "+z)),r.audioCodec&&r.audioCodec!==z&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+z+'"'),h.levelCodec=z,h.id="main",this.log("Init audio buffer, container:"+h.container+", codecs[selected/level/parsed]=["+(z||"")+"/"+(r.audioCodec||"")+"/"+h.codec+"]")}I&&(I.levelCodec=r.videoCodec,I.id="main",this.log("Init video buffer, container:"+I.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+I.codec+"]")),H&&this.log("Init audiovideo buffer, container:"+H.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+H.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,n),Object.keys(n).forEach(function(Y){var G=n[Y],ee=G.initSegment;ee!=null&&ee.byteLength&&B.hls.trigger(S.Events.BUFFER_APPENDING,{type:Y,data:ee,frag:l,part:null,chunkMeta:L,parent:l.type})}),this.tick()},b.backtrack=function(r){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(r);var n=this.fragmentTracker.backtrack(r);this.fragPrevious=null,this.nextLoadPosition=r.start,n?this.resetFragmentLoading(r):this.state=R.State.BACKTRACKING},b.checkFragmentChanged=function(){var r=this.media,n=null;if(r&&r.readyState>1&&r.seeking===!1){var l=r.currentTime;if(s.BufferHelper.isBuffered(r,l)?n=this.getAppendedFrag(l):s.BufferHelper.isBuffered(r,l+.1)&&(n=this.getAppendedFrag(l+.1)),n){var L=this.fragPlaying,B=n.level;(!L||n.sn!==L.sn||L.level!==B||n.urlId!==L.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:n}),(!L||L.level!==B)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:B}),this.fragPlaying=n)}}},a(M,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentLevel",get:function(){var r=this.media;if(r){var n=this.getAppendedFrag(r.currentTime);if(n)return n.level}return-1}},{key:"nextBufferedFrag",get:function(){var r=this.media;if(r){var n=this.getAppendedFrag(r.currentTime);return this.followingBufferedFrag(n)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),M}(R.default)},"./src/controller/subtitle-stream-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"SubtitleStreamController",function(){return u});var Q=_("./src/events.ts"),R=_("./src/utils/logger.ts"),E=_("./src/utils/buffer-helper.ts"),S=_("./src/controller/fragment-finders.ts"),s=_("./src/utils/discontinuities.ts"),p=_("./src/controller/level-helper.ts"),v=_("./src/controller/fragment-tracker.ts"),i=_("./src/controller/base-stream-controller.ts"),A=_("./src/types/loader.ts"),O=_("./src/types/level.ts");function w(m,y){for(var T=0;T<y.length;T++){var x=y[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}function g(m,y,T){return y&&w(m.prototype,y),T&&w(m,T),m}function C(m,y){m.prototype=Object.create(y.prototype),m.prototype.constructor=m,c(m,y)}function c(m,y){return c=Object.setPrototypeOf||function(x,M){return x.__proto__=M,x},c(m,y)}var a=500,u=function(m){C(y,m);function y(x,M){var b;return b=m.call(this,x,M,"[subtitle-stream-controller]")||this,b.levels=[],b.currentTrackId=-1,b.tracksBuffered=[],b.mainDetails=null,b._registerListeners(),b}var T=y.prototype;return T.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},T._registerListeners=function(){var M=this.hls;M.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.on(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.on(Q.Events.ERROR,this.onError,this),M.on(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.on(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.on(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T._unregisterListeners=function(){var M=this.hls;M.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.off(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.off(Q.Events.ERROR,this.onError,this),M.off(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.off(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.off(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(a),this.tick()},T.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},T.onLevelLoaded=function(M,b){this.mainDetails=b.details},T.onSubtitleFragProcessed=function(M,b){var o=b.frag,r=b.success;if(this.fragPrevious=o,this.state=i.State.IDLE,!r)return;var n=this.tracksBuffered[this.currentTrackId];if(!n)return;for(var l,L=o.start,B=0;B<n.length;B++)if(L>=n[B].start&&L<=n[B].end){l=n[B];break}var h=o.start+o.duration;l?l.end=h:(l={start:L,end:h},n.push(l)),this.fragmentTracker.fragBuffered(o)},T.onBufferFlushing=function(M,b){var o=b.startOffset,r=b.endOffset;if(o===0&&r!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,l=this.levels;if(!l.length||!l[n]||!l[n].details)return;var L=l[n].details,B=L.targetduration,h=r-B;if(h<=0)return;b.endOffsetSubtitles=Math.max(0,h),this.tracksBuffered.forEach(function(I){for(var H=0;H<I.length;){if(I[H].end<=h){I.shift();continue}else if(I[H].start<h)I[H].start=h;else break;H++}}),this.fragmentTracker.removeFragmentsInRange(o,h,A.PlaylistLevelType.SUBTITLE)}},T.onError=function(M,b){var o,r=b.frag;if(!r||r.type!==A.PlaylistLevelType.SUBTITLE)return;(o=this.fragCurrent)!==null&&o!==void 0&&o.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},T.onSubtitleTracksUpdated=function(M,b){var o=this,r=b.subtitleTracks;this.tracksBuffered=[],this.levels=r.map(function(n){return new O.Level(n)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(n){o.tracksBuffered[n.id]=[]}),this.mediaBuffer=null},T.onSubtitleTrackSwitch=function(M,b){if(this.currentTrackId=b.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var o=this.levels[this.currentTrackId];o!=null&&o.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,o&&this.setInterval(a)},T.onSubtitleTrackLoaded=function(M,b){var o,r=b.details,n=b.id,l=this.currentTrackId,L=this.levels;if(!L.length)return;var B=L[l];if(n>=L.length||n!==l||!B)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||(o=B.details)!==null&&o!==void 0&&o.live){var h=this.mainDetails;if(r.deltaUpdateFailed||!h)return;var I=h.fragments[0];if(!B.details)r.hasProgramDateTime&&h.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,h):I&&Object(p.addSliding)(r,I.start);else{var H=this.alignPlaylists(r,B.details);H===0&&I&&Object(p.addSliding)(r,I.start)}}if(B.details=r,this.levelLastLoaded=n,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var z=Object(S.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0);z||(this.warn("Subtitle playlist not aligned with playback"),B.details=void 0)}},T._handleFragmentLoadComplete=function(M){var b=M.frag,o=M.payload,r=b.decryptdata,n=this.hls;if(this.fragContextChanged(b))return;if(o&&o.byteLength>0&&r&&r.key&&r.iv&&r.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(o),r.key.buffer,r.iv.buffer).then(function(L){var B=performance.now();n.trigger(Q.Events.FRAG_DECRYPTED,{frag:b,payload:L,stats:{tstart:l,tdecrypt:B}})})}},T.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var M,b=this.currentTrackId,o=this.levels;if(!o.length||!o[b]||!o[b].details)return;var r=o[b].details,n=r.targetduration,l=this.config,L=this.media,B=E.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,L.currentTime-n,l.maxBufferHole),h=B.end,I=B.len,H=this.getMaxBufferLength()+n;if(I>H)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var z=r.fragments,Z=z.length,Y=r.edge,G,ee=this.fragPrevious;if(h<Y){var J=l.maxFragLookUpTolerance;ee&&r.hasProgramDateTime&&(G=Object(S.findFragmentByPDT)(z,ee.endProgramDateTime,J)),G||(G=Object(S.findFragmentByPTS)(ee,z,h,J),!G&&ee&&ee.start<z[0].start&&(G=z[0]))}else G=z[Z-1];(M=G)!==null&&M!==void 0&&M.encrypted?(R.logger.log("Loading key for "+G.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(Q.Events.KEY_LOADING,{frag:G})):G&&this.fragmentTracker.getState(G)===v.FragmentState.NOT_LOADED&&this.loadFragment(G,r,h)}},T.loadFragment=function(M,b,o){this.fragCurrent=M,m.prototype.loadFragment.call(this,M,b,o)},g(y,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),y}(i.default)},"./src/controller/subtitle-track-controller.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/events.ts"),R=_("./src/utils/texttrack-utils.ts"),E=_("./src/controller/base-playlist-controller.ts"),S=_("./src/types/loader.ts");function s(w,g){for(var C=0;C<g.length;C++){var c=g[C];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(w,c.key,c)}}function p(w,g,C){return g&&s(w.prototype,g),C&&s(w,C),w}function v(w,g){w.prototype=Object.create(g.prototype),w.prototype.constructor=w,i(w,g)}function i(w,g){return i=Object.setPrototypeOf||function(c,a){return c.__proto__=a,c},i(w,g)}var A=function(w){v(g,w);function g(c){var a;return a=w.call(this,c,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var C=g.prototype;return C.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,w.prototype.destroy.call(this)},C.registerListeners=function(){var a=this.hls;a.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(Q.Events.ERROR,this.onError,this)},C.unregisterListeners=function(){var a=this.hls;a.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(Q.Events.ERROR,this.onError,this)},C.onMediaAttached=function(a,u){if(this.media=u.media,!this.media)return;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)},C.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},C.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=O(this.media.textTracks);a.forEach(function(u){Object(R.clearCurrentCues)(u)}),this.subtitleTrack=-1,this.media=null},C.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},C.onManifestParsed=function(a,u){this.tracks=u.subtitleTracks},C.onSubtitleTrackLoaded=function(a,u){var m=u.id,y=u.details,T=this.trackId,x=this.tracksInGroup[T];if(!x){this.warn("Invalid subtitle track id "+m);return}var M=x.details;x.details=u.details,this.log("subtitle track "+m+" loaded ["+y.startSN+"-"+y.endSN+"]"),m===this.trackId&&(this.retryCount=0,this.playlistLoaded(m,u,M))},C.onLevelLoading=function(a,u){this.switchLevel(u.level)},C.onLevelSwitching=function(a,u){this.switchLevel(u.level)},C.switchLevel=function(a){var u=this.hls.levels[a];if(!(u!=null&&u.textGroupIds))return;var m=u.textGroupIds[u.urlId];if(this.groupId!==m){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,T=this.tracks.filter(function(b){return!m||b.groupId===m});this.tracksInGroup=T;var x=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=m;var M={subtitleTracks:T};this.log("Updating subtitle tracks, "+T.length+' track(s) found in "'+m+'" group-id'),this.hls.trigger(Q.Events.SUBTITLE_TRACKS_UPDATED,M),x!==-1&&this.setSubtitleTrack(x,y)}},C.findTrackId=function(a){for(var u=this.tracksInGroup,m=0;m<u.length;m++){var y=u[m];if((!this.selectDefaultTrack||y.default)&&(!a||a===y.name))return y.id}return-1},C.onError=function(a,u){if(w.prototype.onError.call(this,a,u),u.fatal||!u.context)return;u.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},C.loadPlaylist=function(a){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var m=u.id,y=u.groupId,T=u.url;if(a)try{T=a.addDirectives(T)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+m),this.hls.trigger(Q.Events.SUBTITLE_TRACK_LOADING,{url:T,id:m,groupId:y,deliveryDirectives:a||null})}},C.toggleTrackModes=function(a){var u=this,m=this.media,y=this.subtitleDisplay,T=this.trackId;if(!m)return;var x=O(m.textTracks),M=x.filter(function(r){return r.groupId===u.groupId});if(a===-1)[].slice.call(x).forEach(function(r){r.mode="disabled"});else{var b=M[T];b&&(b.mode="disabled")}var o=M[a];o&&(o.mode=y?"showing":"hidden")},C.setSubtitleTrack=function(a,u){var m,y=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(m=y[a])!==null&&m!==void 0&&m.details)||a<-1||a>=y.length)return;this.clearTimer();var T=y[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,T){var x=T.id,M=T.groupId,b=M===void 0?"":M,o=T.name,r=T.type,n=T.url;this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:b,name:o,type:r,url:n});var l=this.switchParams(T.url,u==null?void 0:u.details);this.loadPlaylist(l)}else this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:a})},C.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,u=O(this.media.textTracks),m=0;m<u.length;m++)if(u[m].mode==="hidden")a=m;else if(u[m].mode==="showing"){a=m;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},p(g,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var u=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,u)}}]),g}(E.default);function O(w){for(var g=[],C=0;C<w.length;C++){var c=w[C];c.kind==="subtitles"&&c.label&&g.push(w[C])}return g}N.default=A},"./src/controller/timeline-controller.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"TimelineController",function(){return O});var Q=_("./src/polyfills/number.ts"),R=_("./src/events.ts"),E=_("./src/utils/cea-608-parser.ts"),S=_("./src/utils/output-filter.ts"),s=_("./src/utils/webvtt-parser.ts"),p=_("./src/utils/texttrack-utils.ts"),v=_("./src/utils/imsc1-ttml-parser.ts"),i=_("./src/types/loader.ts"),A=_("./src/utils/logger.ts"),O=function(){function c(u){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=C(),this.captionsProperties=void 0,this.hls=u,this.config=u.config,this.Cues=u.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 m=new S.default(this,"textTrack1"),y=new S.default(this,"textTrack2"),T=new S.default(this,"textTrack3"),x=new S.default(this,"textTrack4");this.cea608Parser1=new E.default(1,m,y),this.cea608Parser2=new E.default(3,T,x)}u.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.on(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.on(R.Events.FRAG_LOADING,this.onFragLoading,this),u.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(R.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.on(R.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.on(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.on(R.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=c.prototype;return a.destroy=function(){var m=this.hls;m.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),m.off(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),m.off(R.Events.FRAG_LOADING,this.onFragLoading,this),m.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),m.off(R.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),m.off(R.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),m.off(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),m.off(R.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),m.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(m,y,T,x,M){for(var b=!1,o=M.length;o--;){var r=M[o],n=g(r[0],r[1],y,T);if(n>=0&&(r[0]=Math.min(r[0],y),r[1]=Math.max(r[1],T),b=!0,n/(T-y)>.5))return}if(b||M.push([y,T]),this.config.renderTextTracksNatively){var l=this.captionsTracks[m];this.Cues.newCue(l,y,T,x)}else{var L=this.Cues.newCue(null,y,T,x);this.hls.trigger(R.Events.CUES_PARSED,{type:"captions",cues:L,track:m})}},a.onInitPtsFound=function(m,y){var T=this,x=y.frag,M=y.id,b=y.initPTS,o=y.timescale,r=this.unparsedVttFrags;M==="main"&&(this.initPTS[x.cc]=b,this.timescale[x.cc]=o),r.length&&(this.unparsedVttFrags=[],r.forEach(function(n){T.onFragLoaded(R.Events.FRAG_LOADED,n)}))},a.getExistingTrack=function(m){var y=this.media;if(y)for(var T=0;T<y.textTracks.length;T++){var x=y.textTracks[T];if(x[m])return x}return null},a.createCaptionsTrack=function(m){this.config.renderTextTracksNatively?this.createNativeTrack(m):this.createNonNativeTrack(m)},a.createNativeTrack=function(m){if(this.captionsTracks[m])return;var y=this.captionsProperties,T=this.captionsTracks,x=this.media,M=y[m],b=M.label,o=M.languageCode,r=this.getExistingTrack(m);if(r)T[m]=r,Object(p.clearCurrentCues)(T[m]),Object(p.sendAddTrackEvent)(T[m],x);else{var n=this.createTextTrack("captions",b,o);n&&(n[m]=!0,T[m]=n)}},a.createNonNativeTrack=function(m){if(this.nonNativeCaptionsTracks[m])return;var y=this.captionsProperties[m];if(!y)return;var T=y.label,x={_id:m,label:T,kind:"captions",default:y.media?!!y.media.default:!1,closedCaptions:y.media};this.nonNativeCaptionsTracks[m]=x,this.hls.trigger(R.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[x]})},a.createTextTrack=function(m,y,T){var x=this.media;return x?x.addTextTrack(m,y,T):void 0},a.onMediaAttaching=function(m,y){this.media=y.media,this._cleanTracks()},a.onMediaDetaching=function(){var m=this.captionsTracks;Object.keys(m).forEach(function(y){Object(p.clearCurrentCues)(m[y]),delete m[y]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=C(),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())},a._cleanTracks=function(){var m=this.media;if(!m)return;var y=m.textTracks;if(y)for(var T=0;T<y.length;T++)Object(p.clearCurrentCues)(y[T])},a.onSubtitleTracksUpdated=function(m,y){var T=this;this.textTracks=[];var x=y.subtitleTracks||[],M=x.some(function(n){return n.textCodec===v.IMSC1_CODEC});if(this.config.enableWebVTT||M&&this.config.enableIMSC1){var b=this.tracks&&x&&this.tracks.length===x.length;if(this.tracks=x||[],this.config.renderTextTracksNatively){var o=this.media?this.media.textTracks:[];this.tracks.forEach(function(n,l){var L;if(l<o.length){for(var B=null,h=0;h<o.length;h++)if(w(o[h],n)){B=o[h];break}B&&(L=B)}L?Object(p.clearCurrentCues)(L):(L=T.createTextTrack("subtitles",n.name,n.lang),L&&(L.mode="disabled")),L&&(L.groupId=n.groupId,T.textTracks.push(L))})}else if(!b&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(n){return{label:n.name,kind:n.type.toLowerCase(),default:n.default,subtitleTrack:n}});this.hls.trigger(R.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},a.onManifestLoaded=function(m,y){var T=this;this.config.enableCEA708Captions&&y.captions&&y.captions.forEach(function(x){var M=/(?:CC|SERVICE)([1-4])/.exec(x.instreamId);if(!M)return;var b="textTrack"+M[1],o=T.captionsProperties[b];if(!o)return;o.label=x.name,x.lang&&(o.languageCode=x.lang),o.media=x})},a.onFragLoading=function(m,y){var T=this.cea608Parser1,x=this.cea608Parser2,M=this.lastSn,b=this.lastPartIndex;if(!this.enabled||!(T&&x))return;if(y.frag.type===i.PlaylistLevelType.MAIN){var o,r,n=y.frag.sn,l=(o=y==null||((r=y.part)===null||r===void 0)?void 0:r.index)!=null?o:-1;n===M+1||n===M&&l===b+1||(T.reset(),x.reset()),this.lastSn=n,this.lastPartIndex=l}},a.onFragLoaded=function(m,y){var T=y.frag,x=y.payload,M=this.initPTS,b=this.unparsedVttFrags;if(T.type===i.PlaylistLevelType.SUBTITLE)if(x.byteLength){if(!Object(Q.isFiniteNumber)(M[T.cc])){b.push(y),M.length&&this.hls.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Missing initial subtitle PTS")});return}var o=T.decryptdata;if(o==null||o.key==null||o.method!=="AES-128"){var r=this.tracks[T.level],n=this.vttCCs;n[T.cc]||(n[T.cc]={start:T.start,prevCC:this.prevCC,new:!0},this.prevCC=T.cc),r&&r.textCodec===v.IMSC1_CODEC?this._parseIMSC1(T,x):this._parseVTTs(T,x,n)}}else this.hls.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(m,y){var T=this,x=this.hls;Object(v.parseIMSC1)(y,this.initPTS[m.cc],this.timescale[m.cc],function(M){T._appendCues(M,m.level),x.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(M){A.logger.log("Failed to parse IMSC1: "+M),x.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:M})})},a._parseVTTs=function(m,y,T){var x=this,M=this.hls;Object(s.parseWebVTT)(y,this.initPTS[m.cc],this.timescale[m.cc],T,m.cc,m.start,function(b){x._appendCues(b,m.level),M.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(b){x._fallbackToIMSC1(m,y),A.logger.log("Failed to parse VTT cue: "+b),M.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:b})})},a._fallbackToIMSC1=function(m,y){var T=this,x=this.tracks[m.level];x.textCodec||Object(v.parseIMSC1)(y,this.initPTS[m.cc],this.timescale[m.cc],function(){x.textCodec=v.IMSC1_CODEC,T._parseIMSC1(m,y)},function(){x.textCodec="wvtt"})},a._appendCues=function(m,y){var T=this.hls;if(this.config.renderTextTracksNatively){var x=this.textTracks[y];if(x.mode==="disabled")return;m.forEach(function(o){return Object(p.addCueToTrack)(x,o)})}else{var M=this.tracks[y],b=M.default?"default":"subtitles"+y;T.trigger(R.Events.CUES_PARSED,{type:"subtitles",cues:m,track:b})}},a.onFragDecrypted=function(m,y){var T=y.frag;if(T.type===i.PlaylistLevelType.SUBTITLE){if(!Object(Q.isFiniteNumber)(this.initPTS[T.cc])){this.unparsedVttFrags.push(y);return}this.onFragLoaded(R.Events.FRAG_LOADED,y)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(m,y){var T=this.cea608Parser1,x=this.cea608Parser2;if(!this.enabled||!(T&&x))return;for(var M=0;M<y.samples.length;M++){var b=y.samples[M].bytes;if(b){var o=this.extractCea608Data(b);T.addData(y.samples[M].pts,o[0]),x.addData(y.samples[M].pts,o[1])}}},a.onBufferFlushing=function(m,y){var T=y.startOffset,x=y.endOffset,M=y.endOffsetSubtitles,b=y.type,o=this.media;if(!o||o.currentTime<x)return;if(!b||b==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(l){return Object(p.removeCuesInRange)(r[l],T,x)})}if(this.config.renderTextTracksNatively&&(T===0&&M!==void 0)){var n=this.textTracks;Object.keys(n).forEach(function(l){return Object(p.removeCuesInRange)(n[l],T,M)})}},a.extractCea608Data=function(m){for(var y=m[0]&31,T=2,x=[[],[]],M=0;M<y;M++){var b=m[T++],o=127&m[T++],r=127&m[T++],n=(4&b)!==0,l=3&b;if(o===0&&r===0)continue;n&&((l===0||l===1)&&(x[l].push(o),x[l].push(r)))}return x},c}();function w(c,a){return c&&c.label===a.name&&!(c.textTrack1||c.textTrack2)}function g(c,a,u,m){return Math.min(a,m)-Math.max(c,u)}function C(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return Q});var Q=function(){function R(S,s){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=s}var E=R.prototype;return E.decrypt=function(s,p){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},p,s)},R}()},"./src/crypt/aes-decryptor.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"removePadding",function(){return R}),_.d(N,"default",function(){return E});var Q=_("./src/utils/typed-array.ts");function R(S){var s=S.byteLength,p=s&&new DataView(S.buffer).getUint8(s-1);return p?Object(Q.sliceUint8)(S,0,s-p):S}var E=function(){function S(){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 s=S.prototype;return s.uint8ArrayToUint32Array_=function(v){for(var i=new DataView(v),A=new Uint32Array(4),O=0;O<4;O++)A[O]=i.getUint32(O*4);return A},s.initTable=function(){var v=this.sBox,i=this.invSBox,A=this.subMix,O=A[0],w=A[1],g=A[2],C=A[3],c=this.invSubMix,a=c[0],u=c[1],m=c[2],y=c[3],T=new Uint32Array(256),x=0,M=0,b=0;for(b=0;b<256;b++)b<128?T[b]=b<<1:T[b]=b<<1^283;for(b=0;b<256;b++){var o=M^M<<1^M<<2^M<<3^M<<4;o=o>>>8^o&255^99,v[x]=o,i[o]=x;var r=T[x],n=T[r],l=T[n],L=T[o]*257^o*16843008;O[x]=L<<24|L>>>8,w[x]=L<<16|L>>>16,g[x]=L<<8|L>>>24,C[x]=L,L=l*16843009^n*65537^r*257^x*16843008,a[o]=L<<24|L>>>8,u[o]=L<<16|L>>>16,m[o]=L<<8|L>>>24,y[o]=L,x?(x=r^T[T[T[l^r]]],M^=T[T[M]]):x=M=1}},s.expandKey=function(v){for(var i=this.uint8ArrayToUint32Array_(v),A=!0,O=0;O<i.length&&A;)A=i[O]===this.key[O],O++;if(A)return;this.key=i;var w=this.keySize=i.length;if(w!==4&&w!==6&&w!==8)throw new Error("Invalid aes key size="+w);var g=this.ksRows=(w+6+1)*4,C,c,a=this.keySchedule=new Uint32Array(g),u=this.invKeySchedule=new Uint32Array(g),m=this.sBox,y=this.rcon,T=this.invSubMix,x=T[0],M=T[1],b=T[2],o=T[3],r,n;for(C=0;C<g;C++){if(C<w){r=a[C]=i[C];continue}n=r,C%w===0?(n=n<<8|n>>>24,n=m[n>>>24]<<24|m[n>>>16&255]<<16|m[n>>>8&255]<<8|m[n&255],n^=y[C/w|0]<<24):w>6&&C%w===4&&(n=m[n>>>24]<<24|m[n>>>16&255]<<16|m[n>>>8&255]<<8|m[n&255]),a[C]=r=(a[C-w]^n)>>>0}for(c=0;c<g;c++)C=g-c,c&3?n=a[C]:n=a[C-4],c<4||C<=4?u[c]=n:u[c]=x[m[n>>>24]]^M[m[n>>>16&255]]^b[m[n>>>8&255]]^o[m[n&255]],u[c]=u[c]>>>0},s.networkToHostOrderSwap=function(v){return v<<24|(v&65280)<<8|(v&16711680)>>8|v>>>24},s.decrypt=function(v,i,A){for(var O=this.keySize+6,w=this.invKeySchedule,g=this.invSBox,C=this.invSubMix,c=C[0],a=C[1],u=C[2],m=C[3],y=this.uint8ArrayToUint32Array_(A),T=y[0],x=y[1],M=y[2],b=y[3],o=new Int32Array(v),r=new Int32Array(o.length),n,l,L,B,h,I,H,z,Z,Y,G,ee,J,oe,se=this.networkToHostOrderSwap;i<o.length;){for(Z=se(o[i]),Y=se(o[i+1]),G=se(o[i+2]),ee=se(o[i+3]),h=Z^w[0],I=ee^w[1],H=G^w[2],z=Y^w[3],J=4,oe=1;oe<O;oe++)n=c[h>>>24]^a[I>>16&255]^u[H>>8&255]^m[z&255]^w[J],l=c[I>>>24]^a[H>>16&255]^u[z>>8&255]^m[h&255]^w[J+1],L=c[H>>>24]^a[z>>16&255]^u[h>>8&255]^m[I&255]^w[J+2],B=c[z>>>24]^a[h>>16&255]^u[I>>8&255]^m[H&255]^w[J+3],h=n,I=l,H=L,z=B,J=J+4;n=g[h>>>24]<<24^g[I>>16&255]<<16^g[H>>8&255]<<8^g[z&255]^w[J],l=g[I>>>24]<<24^g[H>>16&255]<<16^g[z>>8&255]<<8^g[h&255]^w[J+1],L=g[H>>>24]<<24^g[z>>16&255]<<16^g[h>>8&255]<<8^g[I&255]^w[J+2],B=g[z>>>24]<<24^g[h>>16&255]<<16^g[I>>8&255]<<8^g[H&255]^w[J+3],r[i]=se(n^T),r[i+1]=se(B^x),r[i+2]=se(L^M),r[i+3]=se(l^b),T=Z,x=Y,M=G,b=ee,i=i+4}return r.buffer},S}()},"./src/crypt/decrypter.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return i});var Q=_("./src/crypt/aes-crypto.ts"),R=_("./src/crypt/fast-aes-key.ts"),E=_("./src/crypt/aes-decryptor.ts"),S=_("./src/utils/logger.ts"),s=_("./src/utils/mp4-tools.ts"),p=_("./src/utils/typed-array.ts"),v=16,i=function(){function A(w,g,C){var c=C===void 0?{}:C,a=c.removePKCS7Padding,u=a===void 0?!0:a;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=w,this.config=g,this.removePKCS7Padding=u,u)try{var m=self.crypto;m&&(this.subtle=m.subtle||m.webkitSubtle)}catch(y){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var O=A.prototype;return O.destroy=function(){this.observer=null},O.isSync=function(){return this.config.enableSoftwareAES},O.flush=function(){var g=this.currentResult;if(!g){this.reset();return}var C=new Uint8Array(g);return this.reset(),this.removePKCS7Padding?Object(E.removePadding)(C):C},O.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},O.decrypt=function(g,C,c,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(g),C,c);var u=this.flush();u&&a(u.buffer)}else this.webCryptoDecrypt(new Uint8Array(g),C,c).then(a)},O.softwareDecrypt=function(g,C,c){var a=this.currentIV,u=this.currentResult,m=this.remainderData;this.logOnce("JS AES decrypt"),m&&(g=Object(s.appendUint8Array)(m,g),this.remainderData=null);var y=this.getValidChunk(g);if(!y.length)return null;a&&(c=a);var T=this.softwareDecrypter;T||(T=this.softwareDecrypter=new E.default),T.expandKey(C);var x=u;return this.currentResult=T.decrypt(y.buffer,0,c),this.currentIV=Object(p.sliceUint8)(y,-16).buffer,x||null},O.webCryptoDecrypt=function(g,C,c){var a=this,u=this.subtle;return(this.key!==C||!this.fastAesKey)&&(this.key=C,this.fastAesKey=new R.default(u,C)),this.fastAesKey.expandKey().then(function(m){if(!u)return Promise.reject(new Error("web crypto not initialized"));var y=new Q.default(u,c);return y.decrypt(g.buffer,m)}).catch(function(m){return a.onWebCryptoError(m,g,C,c)})},O.onWebCryptoError=function(g,C,c,a){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",g),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(C,c,a)},O.getValidChunk=function(g){var C=g,c=g.length-g.length%v;return c!==g.length&&(C=Object(p.sliceUint8)(g,0,c),this.remainderData=Object(p.sliceUint8)(g,c)),C},O.logOnce=function(g){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+g),this.logEnabled=!1},A}()},"./src/crypt/fast-aes-key.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return Q});var Q=function(){function R(S,s){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=s}var E=R.prototype;return E.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},R}()},"./src/demux/aacdemuxer.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/demux/base-audio-demuxer.ts"),R=_("./src/demux/adts.ts"),E=_("./src/utils/logger.ts"),S=_("./src/demux/id3.ts");function s(i,A){i.prototype=Object.create(A.prototype),i.prototype.constructor=i,p(i,A)}function p(i,A){return p=Object.setPrototypeOf||function(w,g){return w.__proto__=g,w},p(i,A)}var v=function(i){s(A,i);function A(w,g){var C;return C=i.call(this)||this,C.observer=void 0,C.config=void 0,C.observer=w,C.config=g,C}var O=A.prototype;return O.resetInitSegment=function(g,C,c){i.prototype.resetInitSegment.call(this,g,C,c),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:g,duration:c,inputTimeScale:9e4,dropped:0}},A.probe=function(g){if(!g)return!1;for(var C=S.getID3Data(g,0)||[],c=C.length,a=g.length;c<a;c++)if(R.probe(g,c))return E.logger.log("ADTS sync word found !"),!0;return!1},O.canParse=function(g,C){return R.canParse(g,C)},O.appendFrame=function(g,C,c){R.initTrackConfig(g,this.observer,C,c,g.manifestCodec);var a=R.appendFrame(g,C,c,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},A}(Q.default);v.minProbeByteLength=9,N.default=v},"./src/demux/adts.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"getAudioConfig",function(){return S}),_.d(N,"isHeaderPattern",function(){return s}),_.d(N,"getHeaderLength",function(){return p}),_.d(N,"getFullFrameLength",function(){return v}),_.d(N,"canGetFrameLength",function(){return i}),_.d(N,"isHeader",function(){return A}),_.d(N,"canParse",function(){return O}),_.d(N,"probe",function(){return w}),_.d(N,"initTrackConfig",function(){return g}),_.d(N,"getFrameDuration",function(){return C}),_.d(N,"parseFrameHeader",function(){return c}),_.d(N,"appendFrame",function(){return a});var Q=_("./src/utils/logger.ts"),R=_("./src/errors.ts"),E=_("./src/events.ts");function S(u,m,y,T){var x,M,b,o,r=navigator.userAgent.toLowerCase(),n=T,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];x=((m[y+2]&192)>>>6)+1;var L=(m[y+2]&60)>>>2;if(L>l.length-1){u.trigger(E.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+L});return}return b=(m[y+2]&1)<<2,b|=(m[y+3]&192)>>>6,Q.logger.log("manifest codec:"+T+", ADTS type:"+x+", samplingIndex:"+L),/firefox/i.test(r)?L>=6?(x=5,o=new Array(4),M=L-3):(x=2,o=new Array(2),M=L):r.indexOf("android")!==-1?(x=2,o=new Array(2),M=L):(x=5,o=new Array(4),T&&(T.indexOf("mp4a.40.29")!==-1||T.indexOf("mp4a.40.5")!==-1)||!T&&L>=6?M=L-3:((T&&T.indexOf("mp4a.40.2")!==-1&&(L>=6&&b===1||/vivaldi/i.test(r))||!T&&b===1)&&(x=2,o=new Array(2)),M=L)),o[0]=x<<3,o[0]|=(L&14)>>1,o[1]|=(L&1)<<7,o[1]|=b<<3,x===5&&(o[1]|=(M&14)>>1,o[2]=(M&1)<<7,o[2]|=2<<2,o[3]=0),{config:o,samplerate:l[L],channelCount:b,codec:"mp4a.40."+x,manifestCodec:n}}function s(u,m){return u[m]===255&&(u[m+1]&246)===240}function p(u,m){return u[m+1]&1?7:9}function v(u,m){return(u[m+3]&3)<<11|u[m+4]<<3|(u[m+5]&224)>>>5}function i(u,m){return m+5<u.length}function A(u,m){return m+1<u.length&&s(u,m)}function O(u,m){return i(u,m)&&s(u,m)&&v(u,m)<=u.length-m}function w(u,m){if(A(u,m)){var y=p(u,m);if(m+y>=u.length)return!1;var T=v(u,m);if(T<=y)return!1;var x=m+T;return x===u.length||A(u,x)}return!1}function g(u,m,y,T,x){if(!u.samplerate){var M=S(m,y,T,x);if(!M)return;u.config=M.config,u.samplerate=M.samplerate,u.channelCount=M.channelCount,u.codec=M.codec,u.manifestCodec=M.manifestCodec,Q.logger.log("parsed codec:"+u.codec+", rate:"+M.samplerate+", channels:"+M.channelCount)}}function C(u){return 1024*9e4/u}function c(u,m,y,T,x){var M=p(u,m),b=v(u,m);if(b-=M,b>0){var o=y+T*x;return{headerLength:M,frameLength:b,stamp:o}}}function a(u,m,y,T,x){var M=C(u.samplerate),b=c(m,y,T,x,M);if(b){var o=b.frameLength,r=b.headerLength,n=b.stamp,l=r+o,L=Math.max(0,y+l-m.length),B;L?(B=new Uint8Array(l-r),B.set(m.subarray(y+r,m.length),0)):B=m.subarray(y+r,y+l);var h={unit:B,pts:n};return L||u.samples.push(h),{sample:h,length:l,missing:L}}}},"./src/demux/base-audio-demuxer.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"initPTSFn",function(){return v});var Q=_("./src/polyfills/number.ts"),R=_("./src/demux/id3.ts"),E=_("./src/demux/dummy-demuxed-track.ts"),S=_("./src/utils/mp4-tools.ts"),s=_("./src/utils/typed-array.ts"),p=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var A=i.prototype;return A.resetInitSegment=function(w,g,C){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},A.resetTimeStamp=function(){},A.resetContiguity=function(){},A.canParse=function(w,g){return!1},A.appendFrame=function(w,g,C){},A.demux=function(w,g){this.cachedData&&(w=Object(S.appendUint8Array)(this.cachedData,w),this.cachedData=null);var C=R.getID3Data(w,0),c=C?C.length:0,a,u,m=this._audioTrack,y=this._id3Track,T=C?R.getTimeStamp(C):void 0,x=w.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=v(T,g)),C&&C.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:C}),u=this.initPTS;c<x;){if(this.canParse(w,c)){var M=this.appendFrame(m,w,c);M?(this.frameIndex++,u=M.sample.pts,c+=M.length,a=c):c=x}else R.canParse(w,c)?(C=R.getID3Data(w,c),y.samples.push({pts:u,dts:u,data:C}),c+=C.length,a=c):c++;if(c===x&&a!==x){var b=Object(s.sliceUint8)(w,a);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,b):this.cachedData=b}}return{audioTrack:m,avcTrack:Object(E.dummyTrack)(),id3Track:y,textTrack:Object(E.dummyTrack)()}},A.demuxSampleAes=function(w,g,C){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},A.flush=function(w){var g=this.cachedData;return g&&(this.cachedData=null,this.demux(g,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(E.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(E.dummyTrack)()}},A.destroy=function(){},i}(),v=function(A,O){return Object(Q.isFiniteNumber)(A)?A*90:O*9e4};N.default=p},"./src/demux/chunk-cache.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return Q});var Q=function(){function E(){this.chunks=[],this.dataLength=0}var S=E.prototype;return S.push=function(p){this.chunks.push(p),this.dataLength+=p.length},S.flush=function(){var p=this.chunks,v=this.dataLength,i;if(p.length)p.length===1?i=p[0]:i=R(p,v);else return new Uint8Array(0);return this.reset(),i},S.reset=function(){this.chunks.length=0,this.dataLength=0},E}();function R(E,S){for(var s=new Uint8Array(S),p=0,v=0;v<E.length;v++){var i=E[v];s.set(i,p),p+=i.length}return s}},"./src/demux/dummy-demuxed-track.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"dummyTrack",function(){return Q});function Q(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/utils/logger.ts"),R=function(){function E(s){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=s,this.bytesAvailable=s.byteLength,this.word=0,this.bitsAvailable=0}var S=E.prototype;return S.loadWord=function(){var p=this.data,v=this.bytesAvailable,i=p.byteLength-v,A=new Uint8Array(4),O=Math.min(4,v);if(O===0)throw new Error("no bytes available");A.set(p.subarray(i,i+O)),this.word=new DataView(A.buffer).getUint32(0),this.bitsAvailable=O*8,this.bytesAvailable-=O},S.skipBits=function(p){var v;this.bitsAvailable>p?(this.word<<=p,this.bitsAvailable-=p):(p-=this.bitsAvailable,v=p>>3,p-=v>>3,this.bytesAvailable-=v,this.loadWord(),this.word<<=p,this.bitsAvailable-=p)},S.readBits=function(p){var v=Math.min(this.bitsAvailable,p),i=this.word>>>32-v;return p>32&&Q.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=v,this.bitsAvailable>0?this.word<<=v:this.bytesAvailable>0&&this.loadWord(),v=p-v,v>0&&this.bitsAvailable?i<<v|this.readBits(v):i},S.skipLZ=function(){var p;for(p=0;p<this.bitsAvailable;++p)if((this.word&2147483648>>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},S.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(p){for(var v=8,i=8,A,O=0;O<p;O++)i!==0&&(A=this.readEG(),i=(v+A+256)%256),v=i===0?v:i},S.readSPS=function(){var p=0,v=0,i=0,A=0,O,w,g,C=this.readUByte.bind(this),c=this.readBits.bind(this),a=this.readUEG.bind(this),u=this.readBoolean.bind(this),m=this.skipBits.bind(this),y=this.skipEG.bind(this),T=this.skipUEG.bind(this),x=this.skipScalingList.bind(this);C();var M=C();if(c(5),m(3),C(),T(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){var b=a();if(b===3&&m(1),T(),T(),m(1),u())for(w=b!==3?8:12,g=0;g<w;g++)u()&&(g<6?x(16):x(64))}T();var o=a();if(o===0)a();else if(o===1)for(m(1),y(),y(),O=a(),g=0;g<O;g++)y();T(),m(1);var r=a(),n=a(),l=c(1);l===0&&m(1),m(1),u()&&(p=a(),v=a(),i=a(),A=a());var L=[1,1];if(u()&&u()){var B=C();switch(B){case 1:L=[1,1];break;case 2:L=[12,11];break;case 3:L=[10,11];break;case 4:L=[16,11];break;case 5:L=[40,33];break;case 6:L=[24,11];break;case 7:L=[20,11];break;case 8:L=[32,11];break;case 9:L=[80,33];break;case 10:L=[18,11];break;case 11:L=[15,11];break;case 12:L=[64,33];break;case 13:L=[160,99];break;case 14:L=[4,3];break;case 15:L=[3,2];break;case 16:L=[2,1];break;case 255:{L=[C()<<8|C(),C()<<8|C()];break}}}return{width:Math.ceil((r+1)*16-p*2-v*2),height:(2-l)*(n+1)*16-(l?2:4)*(i+A),pixelRatio:L}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},E}();N.default=R},"./src/demux/id3.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"isHeader",function(){return Q}),_.d(N,"isFooter",function(){return R}),_.d(N,"getID3Data",function(){return E}),_.d(N,"canParse",function(){return s}),_.d(N,"getTimeStamp",function(){return p}),_.d(N,"isTimeStampFrame",function(){return v}),_.d(N,"getID3Frames",function(){return A}),_.d(N,"decodeFrame",function(){return O}),_.d(N,"utf8ArrayToStr",function(){return a}),_.d(N,"testables",function(){return u});var Q=function(x,M){return M+10<=x.length&&(x[M]===73&&x[M+1]===68&&x[M+2]===51&&(x[M+3]<255&&x[M+4]<255&&(x[M+6]<128&&x[M+7]<128&&x[M+8]<128&&x[M+9]<128)))},R=function(x,M){return M+10<=x.length&&(x[M]===51&&x[M+1]===68&&x[M+2]===73&&(x[M+3]<255&&x[M+4]<255&&(x[M+6]<128&&x[M+7]<128&&x[M+8]<128&&x[M+9]<128)))},E=function(x,M){for(var b=M,o=0;Q(x,M);){o+=10;var r=S(x,M+6);o+=r,R(x,M+10)&&(o+=10),M+=o}return o>0?x.subarray(b,b+o):void 0},S=function(x,M){var b=0;return b=(x[M]&127)<<21,b|=(x[M+1]&127)<<14,b|=(x[M+2]&127)<<7,b|=x[M+3]&127,b},s=function(x,M){return Q(x,M)&&S(x,M+6)+10<=x.length-M},p=function(x){for(var M=A(x),b=0;b<M.length;b++){var o=M[b];if(v(o))return c(o)}return},v=function(x){return x&&x.key==="PRIV"&&x.info==="com.apple.streaming.transportStreamTimestamp"},i=function(x){var M=String.fromCharCode(x[0],x[1],x[2],x[3]),b=S(x,4),o=10;return{type:M,size:b,data:x.subarray(o,o+b)}},A=function(x){for(var M=0,b=[];Q(x,M);){var o=S(x,M+6);M+=10;for(var r=M+o;M+8<r;){var n=i(x.subarray(M)),l=O(n);l&&b.push(l),M+=n.size+10}R(x,M)&&(M+=10)}return b},O=function(x){return x.type==="PRIV"?w(x):x.type[0]==="W"?C(x):g(x)},w=function(x){if(x.size<2)return;var M=a(x.data,!0),b=new Uint8Array(x.data.subarray(M.length+1));return{key:x.type,info:M,data:b.buffer}},g=function(x){if(x.size<2)return;if(x.type==="TXXX"){var M=1,b=a(x.data.subarray(M),!0);M+=b.length+1;var o=a(x.data.subarray(M));return{key:x.type,info:b,data:o}}var r=a(x.data.subarray(1));return{key:x.type,data:r}},C=function(x){if(x.type==="WXXX"){if(x.size<2)return;var M=1,b=a(x.data.subarray(M),!0);M+=b.length+1;var o=a(x.data.subarray(M));return{key:x.type,info:b,data:o}}var r=a(x.data);return{key:x.type,data:r}},c=function(x){if(x.data.byteLength===8){var M=new Uint8Array(x.data),b=M[3]&1,o=(M[4]<<23)+(M[5]<<15)+(M[6]<<7)+M[7];return o/=45,b&&(o+=4772185884e-2),Math.round(o)}return},a=function(x,M){M===void 0&&(M=!1);var b=y();if(b){var o=b.decode(x);if(M){var r=o.indexOf("\0");return r!==-1?o.substring(0,r):o}return o.replace(/\0/g,"")}for(var n=x.length,l,L,B,h="",I=0;I<n;){if(l=x[I++],l===0&&M)return h;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:h+=String.fromCharCode(l);break;case 12:case 13:L=x[I++],h+=String.fromCharCode((l&31)<<6|L&63);break;case 14:L=x[I++],B=x[I++],h+=String.fromCharCode((l&15)<<12|(L&63)<<6|(B&63)<<0);break;default:}}return h},u={decodeTextFrame:g},m;function y(){return!m&&typeof self.TextDecoder!="undefined"&&(m=new self.TextDecoder("utf-8")),m}},"./src/demux/mp3demuxer.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/demux/base-audio-demuxer.ts"),R=_("./src/demux/id3.ts"),E=_("./src/utils/logger.ts"),S=_("./src/demux/mpegaudio.ts");function s(i,A){i.prototype=Object.create(A.prototype),i.prototype.constructor=i,p(i,A)}function p(i,A){return p=Object.setPrototypeOf||function(w,g){return w.__proto__=g,w},p(i,A)}var v=function(i){s(A,i);function A(){return i.apply(this,arguments)||this}var O=A.prototype;return O.resetInitSegment=function(g,C,c){i.prototype.resetInitSegment.call(this,g,C,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:g,duration:c,inputTimeScale:9e4,dropped:0}},A.probe=function(g){if(!g)return!1;for(var C=R.getID3Data(g,0)||[],c=C.length,a=g.length;c<a;c++)if(S.probe(g,c))return E.logger.log("MPEG Audio sync word found !"),!0;return!1},O.canParse=function(g,C){return S.canParse(g,C)},O.appendFrame=function(g,C,c){return this.initPTS===null?void 0:S.appendFrame(g,C,c,this.initPTS,this.frameIndex)},A}(Q.default);v.minProbeByteLength=4,N.default=v},"./src/demux/mp4demuxer.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/utils/mp4-tools.ts"),R=_("./src/demux/dummy-demuxed-track.ts"),E=function(){function S(p,v){this.remainderData=null,this.config=void 0,this.config=v}var s=S.prototype;return s.resetTimeStamp=function(){},s.resetInitSegment=function(){},s.resetContiguity=function(){},S.probe=function(v){return Object(Q.findBox)({data:v,start:0,end:Math.min(v.length,16384)},["moof"]).length>0},s.demux=function(v){var i=v,A=Object(R.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(Q.appendUint8Array)(this.remainderData,v));var O=Object(Q.segmentValidRange)(i);this.remainderData=O.remainder,A.samples=O.valid||new Uint8Array}else A.samples=i;return{audioTrack:Object(R.dummyTrack)(),avcTrack:A,id3Track:Object(R.dummyTrack)(),textTrack:Object(R.dummyTrack)()}},s.flush=function(){var v=Object(R.dummyTrack)();return v.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(R.dummyTrack)(),avcTrack:v,id3Track:Object(R.dummyTrack)(),textTrack:Object(R.dummyTrack)()}},s.demuxSampleAes=function(v,i,A){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},s.destroy=function(){},S}();E.minProbeByteLength=1024,N.default=E},"./src/demux/mpegaudio.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"appendFrame",function(){return p}),_.d(N,"parseHeader",function(){return v}),_.d(N,"isHeaderPattern",function(){return i}),_.d(N,"isHeader",function(){return A}),_.d(N,"canParse",function(){return O}),_.d(N,"probe",function(){return w});var Q=null,R=[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],E=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function p(g,C,c,a,u){if(c+24>C.length)return;var m=v(C,c);if(m&&c+m.frameLength<=C.length){var y=m.samplesPerFrame*9e4/m.sampleRate,T=a+u*y,x={unit:C.subarray(c,c+m.frameLength),pts:T,dts:T};return g.config=[],g.channelCount=m.channelCount,g.samplerate=m.sampleRate,g.samples.push(x),{sample:x,length:m.frameLength,missing:0}}}function v(g,C){var c=g[C+1]>>3&3,a=g[C+1]>>1&3,u=g[C+2]>>4&15,m=g[C+2]>>2&3;if(c!==1&&u!==0&&u!==15&&m!==3){var y=g[C+2]>>1&1,T=g[C+3]>>6,x=c===3?3-a:a===3?3:4,M=R[x*14+u-1]*1e3,b=c===3?0:c===2?1:2,o=E[b*3+m],r=T===3?1:2,n=S[c][a],l=s[a],L=n*8*l,B=Math.floor(n*M/o+y)*l;if(Q===null){var h=navigator.userAgent||"",I=h.match(/Chrome\/(\d+)/i);Q=I?parseInt(I[1]):0}var H=!!Q&&Q<=87;return H&&a===2&&M>=224e3&&T===0&&(g[C+3]=g[C+3]|128),{sampleRate:o,channelCount:r,frameLength:B,samplesPerFrame:L}}}function i(g,C){return g[C]===255&&(g[C+1]&224)===224&&(g[C+1]&6)!==0}function A(g,C){return C+1<g.length&&i(g,C)}function O(g,C){var c=4;return i(g,C)&&c<=g.length-C}function w(g,C){if(C+1<g.length&&i(g,C)){var c=4,a=v(g,C),u=c;a!=null&&a.frameLength&&(u=a.frameLength);var m=C+u;return m===g.length||A(g,m)}return!1}},"./src/demux/sample-aes.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/crypt/decrypter.ts"),R=_("./src/demux/tsdemuxer.ts"),E=function(){function S(p,v,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Q.default(p,v,{removePKCS7Padding:!1})}var s=S.prototype;return s.decryptBuffer=function(v,i){this.decrypter.decrypt(v,this.keyData.key.buffer,this.keyData.iv.buffer,i)},s.decryptAacSample=function(v,i,A,O){var w=v[i].unit,g=w.subarray(16,w.length-w.length%16),C=g.buffer.slice(g.byteOffset,g.byteOffset+g.length),c=this;this.decryptBuffer(C,function(a){var u=new Uint8Array(a);w.set(u,16),O||c.decryptAacSamples(v,i+1,A)})},s.decryptAacSamples=function(v,i,A){for(;;i++){if(i>=v.length){A();return}if(v[i].unit.length<32)continue;var O=this.decrypter.isSync();if(this.decryptAacSample(v,i,A,O),!O)return}},s.getAvcEncryptedData=function(v){for(var i=Math.floor((v.length-48)/160)*16+16,A=new Int8Array(i),O=0,w=32;w<=v.length-16;w+=160,O+=16)A.set(v.subarray(w,w+16),O);return A},s.getAvcDecryptedUnit=function(v,i){for(var A=new Uint8Array(i),O=0,w=32;w<=v.length-16;w+=160,O+=16)v.set(A.subarray(O,O+16),w);return v},s.decryptAvcSample=function(v,i,A,O,w,g){var C=Object(R.discardEPB)(w.data),c=this.getAvcEncryptedData(C),a=this;this.decryptBuffer(c.buffer,function(u){w.data=a.getAvcDecryptedUnit(C,u),g||a.decryptAvcSamples(v,i,A+1,O)})},s.decryptAvcSamples=function(v,i,A,O){if(v instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,A=0){if(i>=v.length){O();return}for(var w=v[i].units;!(A>=w.length);A++){var g=w[A];if(g.data.length<=48||g.type!==1&&g.type!==5)continue;var C=this.decrypter.isSync();if(this.decryptAvcSample(v,i,A,O,g,C),!C)return}}},S}();N.default=E},"./src/demux/transmuxer-interface.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return w});var Q=_("./node_modules/webworkify-webpack/index.js"),R=_.n(Q),E=_("./src/events.ts"),S=_("./src/demux/transmuxer.ts"),s=_("./src/utils/logger.ts"),p=_("./src/errors.ts"),v=_("./src/utils/mediasource-helper.ts"),i=_("./node_modules/eventemitter3/index.js"),A=_.n(i),O=Object(v.getMediaSource)()||{isTypeSupported:function(){return!1}},w=function(){function g(c,a,u,m){var y=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=c,this.id=a,this.onTransmuxComplete=u,this.onFlush=m;var T=c.config,x=function(n,l){l=l||{},l.frag=y.frag,l.id=y.id,c.trigger(n,l)};this.observer=new i.EventEmitter,this.observer.on(E.Events.FRAG_DECRYPTED,x),this.observer.on(E.Events.ERROR,x);var M={mp4:O.isTypeSupported("video/mp4"),mpeg:O.isTypeSupported("audio/mpeg"),mp3:O.isTypeSupported('audio/mp4; codecs="mp3"')},b=navigator.vendor;if(T.enableWorker&&typeof Worker!="undefined"){s.logger.log("demuxing in webworker");var o;try{o=this.worker=Q("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),o.addEventListener("message",this.onwmsg),o.onerror=function(r){c.trigger(E.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(r.message+" ("+r.filename+":"+r.lineno+")")})},o.postMessage({cmd:"init",typeSupported:M,vendor:b,id:a,config:JSON.stringify(T)})}catch(r){s.logger.warn("Error in worker:",r),s.logger.error("Error while initializing DemuxerWorker, fallback to inline"),o&&self.URL.revokeObjectURL(o.objectURL),this.transmuxer=new S.default(this.observer,M,T,b,a),this.worker=null}}else this.transmuxer=new S.default(this.observer,M,T,b,a)}var C=g.prototype;return C.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var u=this.transmuxer;u&&(u.destroy(),this.transmuxer=null)}var m=this.observer;m&&m.removeAllListeners(),this.observer=null},C.push=function(a,u,m,y,T,x,M,b,o,r){var n=this;o.transmuxing.start=self.performance.now();var l=this.transmuxer,L=this.worker,B=x?x.start:T.start,h=T.decryptdata,I=this.frag,H=!(I&&T.cc===I.cc),z=!(I&&o.level===I.level),Z=I?o.sn-I.sn:-1,Y=this.part?o.part-this.part.index:1,G=!z&&(Z===1||Z===0&&Y===1),ee=self.performance.now();(z||Z||T.stats.parsing.start===0)&&(T.stats.parsing.start=ee),x&&(Y||!G)&&(x.stats.parsing.start=ee);var J=new S.TransmuxState(H,G,b,z,B);if(!G||H){s.logger.log("[transmuxer-interface, "+T.type+"]: Starting new transmux session for sn: "+o.sn+" p: "+o.part+" level: "+o.level+" id: "+o.id+`
|
|
discontinuity: `+H+`
|
|
trackSwitch: `+z+`
|
|
contiguous: `+G+`
|
|
accurateTimeOffset: `+b+`
|
|
timeOffset: `+B);var oe=new S.TransmuxConfig(m,y,u,M,r);this.configureTransmuxer(oe)}if(this.frag=T,this.part=x,L)L.postMessage({cmd:"demux",data:a,decryptdata:h,chunkMeta:o,state:J},a instanceof ArrayBuffer?[a]:[]);else if(l){var se=l.push(a,h,o,J);Object(S.isPromise)(se)?se.then(function(Te){n.handleTransmuxComplete(Te)}):this.handleTransmuxComplete(se)}},C.flush=function(a){var u=this;a.transmuxing.start=self.performance.now();var m=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:a});else if(m){var T=m.flush(a);Object(S.isPromise)(T)?T.then(function(x){u.handleFlushResult(x,a)}):this.handleFlushResult(T,a)}},C.handleFlushResult=function(a,u){var m=this;a.forEach(function(y){m.handleTransmuxComplete(y)}),this.onFlush(u)},C.onWorkerMessage=function(a){var u=a.data,m=this.hls;switch(u.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.id=this.id,m.trigger(u.event,u.data);break}}},C.configureTransmuxer=function(a){var u=this.worker,m=this.transmuxer;u?u.postMessage({cmd:"configure",config:a}):m&&m.configure(a)},C.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},g}()},"./src/demux/transmuxer-worker.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return p});var Q=_("./src/demux/transmuxer.ts"),R=_("./src/events.ts"),E=_("./src/utils/logger.ts"),S=_("./node_modules/eventemitter3/index.js"),s=_.n(S);function p(w){var g=new S.EventEmitter,C=function(a,u){w.postMessage({event:a,data:u})};g.on(R.Events.FRAG_DECRYPTED,C),g.on(R.Events.ERROR,C),w.addEventListener("message",function(c){var a=c.data;switch(a.cmd){case"init":{var u=JSON.parse(a.config);w.transmuxer=new Q.default(g,a.typeSupported,u,a.vendor,a.id),Object(E.enableLogs)(u.debug),C("init",null);break}case"configure":{w.transmuxer.configure(a.config);break}case"demux":{var m=w.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(Q.isPromise)(m)?m.then(function(x){v(w,x)}):v(w,m);break}case"flush":{var y=a.chunkMeta,T=w.transmuxer.flush(y);Object(Q.isPromise)(T)?T.then(function(x){A(w,x,y)}):A(w,T,y);break}default:break}})}function v(w,g){if(O(g.remuxResult))return;var C=[],c=g.remuxResult,a=c.audio,u=c.video;a&&i(C,a),u&&i(C,u),w.postMessage({event:"transmuxComplete",data:g},C)}function i(w,g){g.data1&&w.push(g.data1.buffer),g.data2&&w.push(g.data2.buffer)}function A(w,g,C){g.forEach(function(c){v(w,c)}),w.postMessage({event:"flush",data:C})}function O(w){return!w.audio&&!w.video&&!w.text&&!w.id3&&!w.initSegment}},"./src/demux/transmuxer.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return u}),_.d(N,"isPromise",function(){return T}),_.d(N,"TransmuxConfig",function(){return x}),_.d(N,"TransmuxState",function(){return M});var Q=_("./src/events.ts"),R=_("./src/errors.ts"),E=_("./src/crypt/decrypter.ts"),S=_("./src/demux/aacdemuxer.ts"),s=_("./src/demux/mp4demuxer.ts"),p=_("./src/demux/tsdemuxer.ts"),v=_("./src/demux/mp3demuxer.ts"),i=_("./src/remux/mp4-remuxer.ts"),A=_("./src/remux/passthrough-remuxer.ts"),O=_("./src/demux/chunk-cache.ts"),w=_("./src/utils/mp4-tools.ts"),g=_("./src/utils/logger.ts"),C;try{C=self.performance.now.bind(self.performance)}catch(b){g.logger.debug("Unable to use Performance API on this environment"),C=self.Date.now}var c=[{demux:p.default,remux:i.default},{demux:s.default,remux:A.default},{demux:S.default,remux:i.default},{demux:v.default,remux:i.default}],a=1024;c.forEach(function(b){var o=b.demux;a=Math.max(a,o.minProbeByteLength)});var u=function(){function b(r,n,l,L,B){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 O.default,this.observer=r,this.typeSupported=n,this.config=l,this.vendor=L,this.id=B}var o=b.prototype;return o.configure=function(n){this.transmuxConfig=n,this.decrypter&&this.decrypter.reset()},o.push=function(n,l,L,B){var h=this,I=L.transmuxing;I.executeStart=C();var H=new Uint8Array(n),z=this.cache,Z=this.config,Y=this.currentTransmuxState,G=this.transmuxConfig;B&&(this.currentTransmuxState=B);var ee=m(H,l);if(ee&&ee.method==="AES-128"){var J=this.getDecrypter();if(Z.enableSoftwareAES){var oe=J.softwareDecrypt(H,ee.key.buffer,ee.iv.buffer);if(!oe)return I.executeEnd=C(),y(L);H=new Uint8Array(oe)}else return this.decryptionPromise=J.webCryptoDecrypt(H,ee.key.buffer,ee.iv.buffer).then(function(re){var ie=h.push(re,null,L);return h.decryptionPromise=null,ie}),this.decryptionPromise}var se=B||Y,Te=se.contiguous,be=se.discontinuity,xe=se.trackSwitch,Oe=se.accurateTimeOffset,Ne=se.timeOffset,Le=G.audioCodec,Se=G.videoCodec,tt=G.defaultInitPts,Bt=G.duration,De=G.initSegmentData;if((be||xe)&&this.resetInitSegment(De,Le,Se,Bt),be&&this.resetInitialTimestamp(tt),Te||this.resetContiguity(),this.needsProbing(H,be,xe)){if(z.dataLength){var Qe=z.flush();H=Object(w.appendUint8Array)(Qe,H)}this.configureTransmuxer(H,G)}var it=this.transmux(H,ee,Ne,Oe,L),Ae=this.currentTransmuxState;return Ae.contiguous=!0,Ae.discontinuity=!1,Ae.trackSwitch=!1,I.executeEnd=C(),it},o.flush=function(n){var l=this,L=n.transmuxing;L.executeStart=C();var B=this.decrypter,h=this.cache,I=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return l.flush(n)});var z=[],Z=I.timeOffset;if(B){var Y=B.flush();Y&&z.push(this.push(Y,null,n))}var G=h.dataLength;h.reset();var ee=this.demuxer,J=this.remuxer;if(!ee||!J)return G>=a&&this.observer.emit(Q.Events.ERROR,Q.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),L.executeEnd=C(),[y(n)];var oe=ee.flush(Z);return T(oe)?oe.then(function(se){return l.flushRemux(z,se,n),z}):(this.flushRemux(z,oe,n),z)},o.flushRemux=function(n,l,L){var B=l.audioTrack,h=l.avcTrack,I=l.id3Track,H=l.textTrack,z=this.currentTransmuxState,Z=z.accurateTimeOffset,Y=z.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+L.sn+(L.part>-1?" p: "+L.part:"")+" of level "+L.level);var G=this.remuxer.remux(B,h,I,H,Y,Z,!0,this.id);n.push({remuxResult:G,chunkMeta:L}),L.transmuxing.executeEnd=C()},o.resetInitialTimestamp=function(n){var l=this.demuxer,L=this.remuxer;if(!l||!L)return;l.resetTimeStamp(n),L.resetTimeStamp(n)},o.resetContiguity=function(){var n=this.demuxer,l=this.remuxer;if(!n||!l)return;n.resetContiguity(),l.resetNextTimestamp()},o.resetInitSegment=function(n,l,L,B){var h=this.demuxer,I=this.remuxer;if(!h||!I)return;h.resetInitSegment(l,L,B),I.resetInitSegment(n,l,L)},o.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},o.transmux=function(n,l,L,B,h){var I;return l&&l.method==="SAMPLE-AES"?I=this.transmuxSampleAes(n,l,L,B,h):I=this.transmuxUnencrypted(n,L,B,h),I},o.transmuxUnencrypted=function(n,l,L,B){var h=this.demuxer.demux(n,l,!1,!this.config.progressive),I=h.audioTrack,H=h.avcTrack,z=h.id3Track,Z=h.textTrack,Y=this.remuxer.remux(I,H,z,Z,l,L,!1,this.id);return{remuxResult:Y,chunkMeta:B}},o.transmuxSampleAes=function(n,l,L,B,h){var I=this;return this.demuxer.demuxSampleAes(n,l,L).then(function(H){var z=I.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,L,B,!1,I.id);return{remuxResult:z,chunkMeta:h}})},o.configureTransmuxer=function(n,l){for(var L=this.config,B=this.observer,h=this.typeSupported,I=this.vendor,H=l.audioCodec,z=l.defaultInitPts,Z=l.duration,Y=l.initSegmentData,G=l.videoCodec,ee,J=0,oe=c.length;J<oe;J++)if(c[J].demux.probe(n)){ee=c[J];break}ee||(g.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),ee={demux:s.default,remux:A.default});var se=this.demuxer,Te=this.remuxer,be=ee.remux,xe=ee.demux;(!Te||!(Te instanceof be))&&(this.remuxer=new be(B,L,h,I)),(!se||!(se instanceof xe))&&(this.demuxer=new xe(B,L,h),this.probe=xe.probe),this.resetInitSegment(Y,H,G,Z),this.resetInitialTimestamp(z)},o.needsProbing=function(n,l,L){return!this.demuxer||!this.remuxer||l||L},o.getDecrypter=function(){var n=this.decrypter;return n||(n=this.decrypter=new E.default(this.observer,this.config)),n},b}();function m(b,o){var r=null;return b.byteLength>0&&o!=null&&o.key!=null&&o.iv!==null&&o.method!=null&&(r=o),r}var y=function(o){return{remuxResult:{},chunkMeta:o}};function T(b){return"then"in b&&b.then instanceof Function}var x=function(o,r,n,l,L){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=o,this.videoCodec=r,this.initSegmentData=n,this.duration=l,this.defaultInitPts=L},M=function(o,r,n,l,L){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=o,this.contiguous=r,this.accurateTimeOffset=n,this.trackSwitch=l,this.timeOffset=L}},"./src/demux/tsdemuxer.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"discardEPB",function(){return y});var Q=_("./src/demux/adts.ts"),R=_("./src/demux/mpegaudio.ts"),E=_("./src/demux/exp-golomb.ts"),S=_("./src/demux/id3.ts"),s=_("./src/demux/sample-aes.ts"),p=_("./src/events.ts"),v=_("./src/utils/mp4-tools.ts"),i=_("./src/utils/logger.ts"),A=_("./src/errors.ts"),O={video:1,audio:2,id3:3,text:4},w=function(){function T(M,b,o){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=M,this.config=b,this.typeSupported=o}T.probe=function(b){var o=T.syncOffset(b);return o<0?!1:(o&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+o+", junk ahead ?"),!0)},T.syncOffset=function(b){for(var o=Math.min(1e3,b.length-3*188),r=0;r<o;){if(b[r]===71&&b[r+188]===71&&b[r+2*188]===71)return r;r++}return-1},T.createTrack=function(b,o){return{container:b==="video"||b==="audio"?"video/mp2t":void 0,type:b,id:O[b],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:b==="audio"?o:void 0}};var x=T.prototype;return x.resetInitSegment=function(b,o,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=b,this.videoCodec=o,this._duration=r},x.resetTimeStamp=function(){},x.resetContiguity=function(){var b=this._audioTrack,o=this._avcTrack,r=this._id3Track;b&&(b.pesData=null),o&&(o.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},x.demux=function(b,o,r,n){r===void 0&&(r=!1),n===void 0&&(n=!1),r||(this.sampleAes=null);var l,L=this._avcTrack,B=this._audioTrack,h=this._id3Track,I=L.pid,H=L.pesData,z=B.pid,Z=h.pid,Y=B.pesData,G=h.pesData,ee=!1,J=this.pmtParsed,oe=this._pmtId,se=b.length;if(this.remainderData&&(b=Object(v.appendUint8Array)(this.remainderData,b),se=b.length,this.remainderData=null),se<188&&!n)return this.remainderData=b,{audioTrack:B,avcTrack:L,id3Track:h,textTrack:this._txtTrack};var Te=Math.max(0,T.syncOffset(b));se-=(se+Te)%188,se<b.byteLength&&!n&&(this.remainderData=new Uint8Array(b.buffer,se,b.buffer.byteLength-se));for(var be=Te;be<se;be+=188)if(b[be]===71){var xe=!!(b[be+1]&64),Oe=((b[be+1]&31)<<8)+b[be+2],Ne=(b[be+3]&48)>>4,Le=void 0;if(Ne>1){if(Le=be+5+b[be+4],Le===be+188)continue}else Le=be+4;switch(Oe){case I:xe&&(H&&(l=a(H))&&this.parseAVCPES(l,!1),H={data:[],size:0}),H&&(H.data.push(b.subarray(Le,be+188)),H.size+=be+188-Le);break;case z:xe&&(Y&&(l=a(Y))&&(B.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),Y={data:[],size:0}),Y&&(Y.data.push(b.subarray(Le,be+188)),Y.size+=be+188-Le);break;case Z:xe&&(G&&(l=a(G))&&this.parseID3PES(l),G={data:[],size:0}),G&&(G.data.push(b.subarray(Le,be+188)),G.size+=be+188-Le);break;case 0:xe&&(Le+=b[Le]+1),oe=this._pmtId=C(b,Le);break;case oe:{xe&&(Le+=b[Le]+1);var Se=c(b,Le,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,r);I=Se.avc,I>0&&(L.pid=I),z=Se.audio,z>0&&(B.pid=z,B.isAAC=Se.isAAC),Z=Se.id3,Z>0&&(h.pid=Z),ee&&!J&&(i.logger.log("reparse from beginning"),ee=!1,be=Te-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:ee=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});L.pesData=H,B.pesData=Y,h.pesData=G;var tt={audioTrack:B,avcTrack:L,id3Track:h,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(tt),tt},x.flush=function(){var b=this.remainderData;this.remainderData=null;var o;return b?o=this.demux(b,-1,!1,!0):o={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(o),this.sampleAes?this.decrypt(o,this.sampleAes):o},x.extractRemainingSamples=function(b){var o=b.audioTrack,r=b.avcTrack,n=b.id3Track,l=r.pesData,L=o.pesData,B=n.pesData,h;l&&(h=a(l))?(this.parseAVCPES(h,!0),r.pesData=null):r.pesData=l,L&&(h=a(L))?(o.isAAC?this.parseAACPES(h):this.parseMPEGPES(h),o.pesData=null):(L!=null&&L.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),o.pesData=L),B&&(h=a(B))?(this.parseID3PES(h),n.pesData=null):n.pesData=B},x.demuxSampleAes=function(b,o,r){var n=this.demux(b,r,!0,!this.config.progressive),l=this.sampleAes=new s.default(this.observer,this.config,o);return this.decrypt(n,l)},x.decrypt=function(b,o){return new Promise(function(r){var n=b.audioTrack,l=b.avcTrack;n.samples&&n.isAAC?o.decryptAacSamples(n.samples,0,function(){l.samples?o.decryptAvcSamples(l.samples,0,0,function(){r(b)}):r(b)}):l.samples&&o.decryptAvcSamples(l.samples,0,0,function(){r(b)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(b,o){var r=this,n=this._avcTrack,l=this.parseAVCNALu(b.data),L=!1,B=this.avcSample,h,I=!1;b.data=null,B&&l.length&&!n.audFound&&(u(B,n),B=this.avcSample=g(!1,b.pts,b.dts,"")),l.forEach(function(H){switch(H.type){case 1:{h=!0,B||(B=r.avcSample=g(!0,b.pts,b.dts,"")),L&&(B.debug+="NDR "),B.frame=!0;var z=H.data;if(I&&z.length>4){var Z=new E.default(z).readSliceType();(Z===2||Z===4||Z===7||Z===9)&&(B.key=!0)}break}case 5:h=!0,B||(B=r.avcSample=g(!0,b.pts,b.dts,"")),L&&(B.debug+="IDR "),B.key=!0,B.frame=!0;break;case 6:{h=!0,L&&B&&(B.debug+="SEI ");var Y=new E.default(y(H.data));Y.readUByte();for(var G=0,ee=0,J=!1,oe=0;!J&&Y.bytesAvailable>1;){G=0;do oe=Y.readUByte(),G+=oe;while(oe===255);ee=0;do oe=Y.readUByte(),ee+=oe;while(oe===255);if(G===4&&Y.bytesAvailable!==0){J=!0;var se=Y.readUByte();if(se===181){var Te=Y.readUShort();if(Te===49){var be=Y.readUInt();if(be===1195456820){var xe=Y.readUByte();if(xe===3){for(var Oe=Y.readUByte(),Ne=Y.readUByte(),Le=31&Oe,Se=[Oe,Ne],tt=0;tt<Le;tt++)Se.push(Y.readUByte()),Se.push(Y.readUByte()),Se.push(Y.readUByte());m(r._txtTrack.samples,{type:3,pts:b.pts,bytes:Se})}}}}}else if(G===5&&Y.bytesAvailable!==0){if(J=!0,ee>16){for(var Bt=[],De=0;De<16;De++)Bt.push(Y.readUByte().toString(16)),(De===3||De===5||De===7||De===9)&&Bt.push("-");for(var Qe=ee-16,it=new Uint8Array(Qe),Ae=0;Ae<Qe;Ae++)it[Ae]=Y.readUByte();m(r._txtTrack.samples,{pts:b.pts,payloadType:G,uuid:Bt.join(""),userData:Object(S.utf8ArrayToStr)(it),userDataBytes:it})}}else if(ee<Y.bytesAvailable)for(var re=0;re<ee;re++)Y.readUByte()}break}case 7:if(h=!0,I=!0,L&&B&&(B.debug+="SPS "),!n.sps){var ie=new E.default(H.data),ce=ie.readSPS();n.width=ce.width,n.height=ce.height,n.pixelRatio=ce.pixelRatio,n.sps=[H.data],n.duration=r._duration;for(var Be=H.data.subarray(1,4),Re="avc1.",ke=0;ke<3;ke++){var ft=Be[ke].toString(16);ft.length<2&&(ft="0"+ft),Re+=ft}n.codec=Re}break;case 8:h=!0,L&&B&&(B.debug+="PPS "),n.pps||(n.pps=[H.data]);break;case 9:h=!1,n.audFound=!0,B&&u(B,n),B=r.avcSample=g(!1,b.pts,b.dts,L?"AUD ":"");break;case 12:h=!1;break;default:h=!1,B&&(B.debug+="unknown NAL "+H.type+" ");break}if(B&&h){var pt=B.units;pt.push(H)}}),o&&B&&(u(B,n),this.avcSample=null)},x.getLastNalUnit=function(){var b,o=this.avcSample,r;if(!o||o.units.length===0){var n=this._avcTrack.samples;o=n[n.length-1]}if((b=o)!==null&&b!==void 0&&b.units){var l=o.units;r=l[l.length-1]}return r},x.parseAVCNALu=function(b){var o=b.byteLength,r=this._avcTrack,n=r.naluState||0,l=n,L=[],B=0,h,I,H,z=-1,Z=0;for(n===-1&&(z=0,Z=b[0]&31,n=0,B=1);B<o;){if(h=b[B++],!n){n=h?0:1;continue}if(n===1){n=h?0:2;continue}if(!h)n=3;else if(h===1){if(z>=0){var Y={data:b.subarray(z,B-n-1),type:Z};L.push(Y)}else{var G=this.getLastNalUnit();if(G&&(l&&B<=4-l&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-l))),I=B-n-1,I>0)){var ee=new Uint8Array(G.data.byteLength+I);ee.set(G.data,0),ee.set(b.subarray(0,I),G.data.byteLength),G.data=ee,G.state=0}}B<o?(H=b[B]&31,z=B,Z=H,n=0):n=-1}else n=0}if(z>=0&&n>=0){var J={data:b.subarray(z,o),type:Z,state:n};L.push(J)}if(L.length===0){var oe=this.getLastNalUnit();if(oe){var se=new Uint8Array(oe.data.byteLength+b.byteLength);se.set(oe.data,0),se.set(b,oe.data.byteLength),oe.data=se}}return r.naluState=n,L},x.parseAACPES=function(b){var o=0,r=this._audioTrack,n=this.aacOverFlow,l=b.data;if(n){this.aacOverFlow=null;var L=n.sample.unit.byteLength,B=Math.min(n.missing,L),h=L-B;n.sample.unit.set(l.subarray(0,B),h),r.samples.push(n.sample),o=n.missing}var I,H;for(I=o,H=l.length;I<H-1&&!Q.isHeader(l,I);I++);if(I!==o){var z,Z;if(I<H-1?(z="AAC PES did not start with ADTS header,offset:"+I,Z=!1):(z="no ADTS header found in AAC PES",Z=!0),i.logger.warn("parsing error:"+z),this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:Z,reason:z}),Z)return}Q.initTrackConfig(r,this.observer,l,I,this.audioCodec);var Y;if(b.pts!==void 0)Y=b.pts;else if(n){var G=Q.getFrameDuration(r.samplerate);Y=n.sample.pts+G}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var ee=0;I<H;)if(Q.isHeader(l,I)){if(I+5<H){var J=Q.appendFrame(r,l,I,Y,ee);if(J)if(J.missing)this.aacOverFlow=J;else{I+=J.length,ee++;continue}}break}else I++},x.parseMPEGPES=function(b){var o=b.data,r=o.length,n=0,l=0,L=b.pts;if(L===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<r;)if(R.isHeader(o,l)){var B=R.appendFrame(this._audioTrack,o,l,L,n);if(B)l+=B.length,n++;else break}else l++},x.parseID3PES=function(b){if(b.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(b)},T}();w.minProbeByteLength=188;function g(T,x,M,b){return{key:T,frame:!1,pts:x,dts:M,units:[],debug:b,length:0}}function C(T,x){return(T[x+10]&31)<<8|T[x+11]}function c(T,x,M,b){var o={audio:-1,avc:-1,id3:-1,isAAC:!0},r=(T[x+1]&15)<<8|T[x+2],n=x+3+r-4,l=(T[x+10]&15)<<8|T[x+11];for(x+=12+l;x<n;){var L=(T[x+1]&31)<<8|T[x+2];switch(T[x]){case 207:if(!b){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:o.audio===-1&&(o.audio=L);break;case 21:o.id3===-1&&(o.id3=L);break;case 219:if(!b){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:o.avc===-1&&(o.avc=L);break;case 3:case 4:M?o.audio===-1&&(o.audio=L,o.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}x+=((T[x+3]&15)<<8|T[x+4])+5}return o}function a(T){var x=0,M,b,o,r,n,l=T.data;if(!T||T.size===0)return null;for(;l[0].length<19&&l.length>1;){var L=new Uint8Array(l[0].length+l[1].length);L.set(l[0]),L.set(l[1],l[0].length),l[0]=L,l.splice(1,1)}M=l[0];var B=(M[0]<<16)+(M[1]<<8)+M[2];if(B===1){if(b=(M[4]<<8)+M[5],b&&b>T.size-6)return null;var h=M[7];h&192&&(r=(M[9]&14)*536870912+(M[10]&255)*4194304+(M[11]&254)*16384+(M[12]&255)*128+(M[13]&254)/2,h&64?(n=(M[14]&14)*536870912+(M[15]&255)*4194304+(M[16]&254)*16384+(M[17]&255)*128+(M[18]&254)/2,r-n>60*9e4&&(i.logger.warn(Math.round((r-n)/9e4)+"s delta between PTS and DTS, align them"),r=n)):n=r),o=M[8];var I=o+9;if(T.size<=I)return null;T.size-=I;for(var H=new Uint8Array(T.size),z=0,Z=l.length;z<Z;z++){M=l[z];var Y=M.byteLength;if(I)if(I>Y){I-=Y;continue}else M=M.subarray(I),Y-=I,I=0;H.set(M,x),x+=Y}return b&&(b-=o+3),{data:H,pts:r,dts:n,len:b}}return null}function u(T,x){if(T.units.length&&T.frame){if(T.pts===void 0){var M=x.samples,b=M.length;if(b){var o=M[b-1];T.pts=o.pts,T.dts=o.dts}else{x.dropped++;return}}x.samples.push(T)}T.debug.length&&i.logger.log(T.pts+"/"+T.dts+":"+T.debug)}function m(T,x){var M=T.length;if(M>0){if(x.pts>=T[M-1].pts)T.push(x);else for(var b=M-1;b>=0;b--)if(x.pts<T[b].pts){T.splice(b,0,x);break}}else T.push(x)}function y(T){for(var x=T.byteLength,M=[],b=1;b<x-2;)T[b]===0&&T[b+1]===0&&T[b+2]===3?(M.push(b+2),b+=2):b++;if(M.length===0)return T;var o=x-M.length,r=new Uint8Array(o),n=0;for(b=0;b<o;n++,b++)n===M[0]&&(n++,M.shift()),r[b]=T[n];return r}N.default=w},"./src/errors.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"ErrorTypes",function(){return Q}),_.d(N,"ErrorDetails",function(){return R});var Q;(function(E){E.NETWORK_ERROR="networkError",E.MEDIA_ERROR="mediaError",E.KEY_SYSTEM_ERROR="keySystemError",E.MUX_ERROR="muxError",E.OTHER_ERROR="otherError"})(Q||(Q={}));var R;(function(E){E.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",E.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",E.KEY_SYSTEM_NO_SESSION="keySystemNoSession",E.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",E.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",E.MANIFEST_LOAD_ERROR="manifestLoadError",E.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",E.MANIFEST_PARSING_ERROR="manifestParsingError",E.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",E.LEVEL_EMPTY_ERROR="levelEmptyError",E.LEVEL_LOAD_ERROR="levelLoadError",E.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",E.LEVEL_SWITCH_ERROR="levelSwitchError",E.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",E.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",E.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",E.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",E.FRAG_LOAD_ERROR="fragLoadError",E.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",E.FRAG_DECRYPT_ERROR="fragDecryptError",E.FRAG_PARSING_ERROR="fragParsingError",E.REMUX_ALLOC_ERROR="remuxAllocError",E.KEY_LOAD_ERROR="keyLoadError",E.KEY_LOAD_TIMEOUT="keyLoadTimeOut",E.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",E.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",E.BUFFER_APPEND_ERROR="bufferAppendError",E.BUFFER_APPENDING_ERROR="bufferAppendingError",E.BUFFER_STALLED_ERROR="bufferStalledError",E.BUFFER_FULL_ERROR="bufferFullError",E.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",E.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",E.INTERNAL_EXCEPTION="internalException",E.INTERNAL_ABORTED="aborted",E.UNKNOWN="unknown"})(R||(R={}))},"./src/events.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"Events",function(){return Q});var Q;(function(R){R.MEDIA_ATTACHING="hlsMediaAttaching",R.MEDIA_ATTACHED="hlsMediaAttached",R.MEDIA_DETACHING="hlsMediaDetaching",R.MEDIA_DETACHED="hlsMediaDetached",R.BUFFER_RESET="hlsBufferReset",R.BUFFER_CODECS="hlsBufferCodecs",R.BUFFER_CREATED="hlsBufferCreated",R.BUFFER_APPENDING="hlsBufferAppending",R.BUFFER_APPENDED="hlsBufferAppended",R.BUFFER_EOS="hlsBufferEos",R.BUFFER_FLUSHING="hlsBufferFlushing",R.BUFFER_FLUSHED="hlsBufferFlushed",R.MANIFEST_LOADING="hlsManifestLoading",R.MANIFEST_LOADED="hlsManifestLoaded",R.MANIFEST_PARSED="hlsManifestParsed",R.LEVEL_SWITCHING="hlsLevelSwitching",R.LEVEL_SWITCHED="hlsLevelSwitched",R.LEVEL_LOADING="hlsLevelLoading",R.LEVEL_LOADED="hlsLevelLoaded",R.LEVEL_UPDATED="hlsLevelUpdated",R.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",R.LEVELS_UPDATED="hlsLevelsUpdated",R.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",R.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",R.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",R.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",R.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",R.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",R.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",R.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",R.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",R.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",R.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",R.CUES_PARSED="hlsCuesParsed",R.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",R.INIT_PTS_FOUND="hlsInitPtsFound",R.FRAG_LOADING="hlsFragLoading",R.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",R.FRAG_LOADED="hlsFragLoaded",R.FRAG_DECRYPTED="hlsFragDecrypted",R.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",R.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",R.FRAG_PARSING_METADATA="hlsFragParsingMetadata",R.FRAG_PARSED="hlsFragParsed",R.FRAG_BUFFERED="hlsFragBuffered",R.FRAG_CHANGED="hlsFragChanged",R.FPS_DROP="hlsFpsDrop",R.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",R.ERROR="hlsError",R.DESTROYING="hlsDestroying",R.KEY_LOADING="hlsKeyLoading",R.KEY_LOADED="hlsKeyLoaded",R.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",R.BACK_BUFFER_REACHED="hlsBackBufferReached"})(Q||(Q={}))},"./src/hls.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return T});var Q=_("./node_modules/url-toolkit/src/url-toolkit.js"),R=_.n(Q),E=_("./src/loader/playlist-loader.ts"),S=_("./src/loader/key-loader.ts"),s=_("./src/controller/id3-track-controller.ts"),p=_("./src/controller/latency-controller.ts"),v=_("./src/controller/level-controller.ts"),i=_("./src/controller/fragment-tracker.ts"),A=_("./src/controller/stream-controller.ts"),O=_("./src/is-supported.ts"),w=_("./src/utils/logger.ts"),g=_("./src/config.ts"),C=_("./node_modules/eventemitter3/index.js"),c=_.n(C),a=_("./src/events.ts"),u=_("./src/errors.ts");function m(x,M){for(var b=0;b<M.length;b++){var o=M[b];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(x,o.key,o)}}function y(x,M,b){return M&&m(x.prototype,M),b&&m(x,b),x}var T=function(){x.isSupported=function(){return Object(O.isSupported)()};function x(b){b===void 0&&(b={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new C.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 o=this.config=Object(g.mergeConfig)(x.DefaultConfig,b);this.userConfig=b,Object(w.enableLogs)(o.debug),this._autoLevelCapping=-1,o.progressive&&Object(g.enableStreamingMode)(o);var r=o.abrController,n=o.bufferController,l=o.capLevelController,L=o.fpsController,B=this.abrController=new r(this),h=this.bufferController=new n(this),I=this.capLevelController=new l(this),H=new L(this),z=new E.default(this),Z=new S.default(this),Y=new s.default(this),G=this.levelController=new v.default(this),ee=new i.FragmentTracker(this),J=this.streamController=new A.default(this,ee);I.setStreamController(J),H.setStreamController(J);var oe=[G,J];this.networkControllers=oe;var se=[z,Z,B,h,I,H,Y,ee];this.audioTrackController=this.createController(o.audioTrackController,null,oe),this.createController(o.audioStreamController,ee,oe),this.subtitleTrackController=this.createController(o.subtitleTrackController,null,oe),this.createController(o.subtitleStreamController,ee,oe),this.createController(o.timelineController,null,se),this.emeController=this.createController(o.emeController,null,se),this.cmcdController=this.createController(o.cmcdController,null,se),this.latencyController=this.createController(p.default,null,se),this.coreComponents=se}var M=x.prototype;return M.createController=function(o,r,n){if(o){var l=r?new o(this,r):new o(this);return n&&n.push(l),l}return null},M.on=function(o,r,n){n===void 0&&(n=this),this._emitter.on(o,r,n)},M.once=function(o,r,n){n===void 0&&(n=this),this._emitter.once(o,r,n)},M.removeAllListeners=function(o){this._emitter.removeAllListeners(o)},M.off=function(o,r,n,l){n===void 0&&(n=this),this._emitter.off(o,r,n,l)},M.listeners=function(o){return this._emitter.listeners(o)},M.emit=function(o,r,n){return this._emitter.emit(o,r,n)},M.trigger=function(o,r){if(this.config.debug)return this.emit(o,o,r);try{return this.emit(o,o,r)}catch(n){w.logger.error("An internal error happened while handling event "+o+'. Error message: "'+n.message+'". Here is a stacktrace:',n),this.trigger(a.Events.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:o,error:n})}return!1},M.listenerCount=function(o){return this._emitter.listenerCount(o)},M.destroy=function(){w.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(o){return o.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(o){return o.destroy()}),this.coreComponents.length=0},M.attachMedia=function(o){w.logger.log("attachMedia"),this._media=o,this.trigger(a.Events.MEDIA_ATTACHING,{media:o})},M.detachMedia=function(){w.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},M.loadSource=function(o){this.stopLoad();var r=this.media,n=this.url,l=this.url=Q.buildAbsoluteURL(self.location.href,o,{alwaysNormalize:!0});w.logger.log("loadSource:"+l),r&&n&&n!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(r)),this.trigger(a.Events.MANIFEST_LOADING,{url:o})},M.startLoad=function(o){o===void 0&&(o=-1),w.logger.log("startLoad("+o+")"),this.networkControllers.forEach(function(r){r.startLoad(o)})},M.stopLoad=function(){w.logger.log("stopLoad"),this.networkControllers.forEach(function(o){o.stopLoad()})},M.swapAudioCodec=function(){w.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},M.recoverMediaError=function(){w.logger.log("recoverMediaError");var o=this._media;this.detachMedia(),o&&this.attachMedia(o)},M.removeLevel=function(o,r){r===void 0&&(r=0),this.levelController.removeLevel(o,r)},y(x,[{key:"levels",get:function(){var o=this.levelController.levels;return o||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(o){w.logger.log("set currentLevel:"+o),this.loadLevel=o,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(o){w.logger.log("set nextLevel:"+o),this.levelController.manualLevel=o,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(o){w.logger.log("set loadLevel:"+o),this.levelController.manualLevel=o}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(o){this.levelController.nextLoadLevel=o}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(o){w.logger.log("set firstLevel:"+o),this.levelController.firstLevel=o}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(o){w.logger.log("set startLevel:"+o),o!==-1&&(o=Math.max(o,this.minAutoLevel)),this.levelController.startLevel=o}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(o){var r=!!o;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(o){this._autoLevelCapping!==o&&(w.logger.log("set autoLevelCapping:"+o),this._autoLevelCapping=o)}},{key:"bandwidthEstimate",get:function(){var o=this.abrController.bwEstimator;return o?o.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var o=this.levels,r=this.config.minAutoBitrate;if(!o)return 0;for(var n=o.length,l=0;l<n;l++)if(o[l].maxBitrate>r)return l;return 0}},{key:"maxAutoLevel",get:function(){var o=this.levels,r=this.autoLevelCapping,n;return r===-1&&o&&o.length?n=o.length-1:n=r,n}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(o){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,o)}},{key:"audioTracks",get:function(){var o=this.audioTrackController;return o?o.audioTracks:[]}},{key:"audioTrack",get:function(){var o=this.audioTrackController;return o?o.audioTrack:-1},set:function(o){var r=this.audioTrackController;r&&(r.audioTrack=o)}},{key:"subtitleTracks",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var o=this.subtitleTrackController;return o?o.subtitleTrack:-1},set:function(o){var r=this.subtitleTrackController;r&&(r.subtitleTrack=o)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var o=this.subtitleTrackController;return o?o.subtitleDisplay:!1},set:function(o){var r=this.subtitleTrackController;r&&(r.subtitleDisplay=o)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(o){this.config.lowLatencyMode=o}},{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}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return u.ErrorTypes}},{key:"ErrorDetails",get:function(){return u.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:g.hlsDefaultConfig},set:function(o){x.defaultConfig=o}}]),x}();T.defaultConfig=void 0},"./src/is-supported.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"isSupported",function(){return E}),_.d(N,"changeTypeSupported",function(){return S});var Q=_("./src/utils/mediasource-helper.ts");function R(){return self.SourceBuffer||self.WebKitSourceBuffer}function E(){var s=Object(Q.getMediaSource)();if(!s)return!1;var p=R(),v=s&&typeof s.isTypeSupported=="function"&&s.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!v&&!!i}function S(){var s,p=R();return typeof(p==null||((s=p.prototype)===null||s===void 0)?void 0:s.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return w}),_.d(N,"LoadError",function(){return C});var Q=_("./src/polyfills/number.ts"),R=_("./src/errors.ts");function E(c,a){c.prototype=Object.create(a.prototype),c.prototype.constructor=c,i(c,a)}function S(c){var a=typeof Map=="function"?new Map:void 0;return S=function(m){if(m===null||!v(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(m))return a.get(m);a.set(m,y)}function y(){return s(m,arguments,A(this).constructor)}return y.prototype=Object.create(m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),i(y,m)},S(c)}function s(c,a,u){return p()?s=Reflect.construct:s=function(y,T,x){var M=[null];M.push.apply(M,T);var b=Function.bind.apply(y,M),o=new b;return x&&i(o,x.prototype),o},s.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function v(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function i(c,a){return i=Object.setPrototypeOf||function(m,y){return m.__proto__=y,m},i(c,a)}function A(c){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},A(c)}var O=Math.pow(2,17),w=function(){function c(u){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=u}var a=c.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(m,y){var T=this,x=m.url;if(!x)return Promise.reject(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var M=this.config,b=M.fLoader,o=M.loader;return new Promise(function(r,n){T.loader&&T.loader.destroy();var l=T.loader=m.loader=b?new b(M):new o(M),L=g(m),B={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:O};m.stats=l.stats,l.load(L,B,{onSuccess:function(I,H,z,Z){T.resetLoader(m,l),r({frag:m,part:null,payload:I.data,networkDetails:Z})},onError:function(I,H,z){T.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,response:I,networkDetails:z}))},onAbort:function(I,H,z){T.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,networkDetails:z}))},onTimeout:function(I,H,z){T.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,networkDetails:z}))},onProgress:function(I,H,z,Z){y&&y({frag:m,part:null,payload:z,networkDetails:Z})}})})},a.loadPart=function(m,y,T){var x=this;this.abort();var M=this.config,b=M.fLoader,o=M.loader;return new Promise(function(r,n){x.loader&&x.loader.destroy();var l=x.loader=m.loader=b?new b(M):new o(M),L=g(m,y),B={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:O};y.stats=l.stats,l.load(L,B,{onSuccess:function(I,H,z,Z){x.resetLoader(m,l),x.updateStatsFromPart(m,y);var Y={frag:m,part:y,payload:I.data,networkDetails:Z};T(Y),r(Y)},onError:function(I,H,z){x.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,part:y,response:I,networkDetails:z}))},onAbort:function(I,H,z){m.stats.aborted=y.stats.aborted,x.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,part:y,networkDetails:z}))},onTimeout:function(I,H,z){x.resetLoader(m,l),n(new C({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,part:y,networkDetails:z}))}})})},a.updateStatsFromPart=function(m,y){var T=m.stats,x=y.stats,M=x.total;if(T.loaded+=x.loaded,M){var b=Math.round(m.duration/y.duration),o=Math.min(Math.round(T.loaded/M),b),r=b-o,n=r*Math.round(T.loaded/o);T.total=T.loaded+n}else T.total=Math.max(T.loaded,T.total);var l=T.loading,L=x.loading;l.start?l.first+=L.first-L.start:(l.start=L.start,l.first=L.first),l.end=L.end},a.resetLoader=function(m,y){m.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},c}();function g(c,a){a===void 0&&(a=null);var u=a||c,m={frag:c,part:a,responseType:"arraybuffer",url:u.url,headers:{},rangeStart:0,rangeEnd:0},y=u.byteRangeStartOffset,T=u.byteRangeEndOffset;return Object(Q.isFiniteNumber)(y)&&Object(Q.isFiniteNumber)(T)&&(m.rangeStart=y,m.rangeEnd=T),m}var C=function(c){E(a,c);function a(u){for(var m,y=arguments.length,T=new Array(y>1?y-1:0),x=1;x<y;x++)T[x-1]=arguments[x];return m=c.call.apply(c,[this].concat(T))||this,m.data=void 0,m.data=u,m}return a}(S(Error))},"./src/loader/fragment.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"ElementaryStreamTypes",function(){return w}),_.d(N,"BaseSegment",function(){return g}),_.d(N,"Fragment",function(){return C}),_.d(N,"Part",function(){return c});var Q=_("./src/polyfills/number.ts"),R=_("./node_modules/url-toolkit/src/url-toolkit.js"),E=_.n(R),S=_("./src/utils/logger.ts"),s=_("./src/loader/level-key.ts"),p=_("./src/loader/load-stats.ts");function v(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,i(a,u)}function i(a,u){return i=Object.setPrototypeOf||function(y,T){return y.__proto__=T,y},i(a,u)}function A(a,u){for(var m=0;m<u.length;m++){var y=u[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function O(a,u,m){return u&&A(a.prototype,u),m&&A(a,m),a}var w;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(w||(w={}));var g=function(){function a(m){var y;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(y={},y[w.AUDIO]=null,y[w.VIDEO]=null,y[w.AUDIOVIDEO]=null,y),this.baseurl=m}var u=a.prototype;return u.setByteRange=function(y,T){var x=y.split("@",2),M=[];x.length===1?M[0]=T?T.byteRangeEndOffset:0:M[0]=parseInt(x[1]),M[1]=parseInt(x[0])+M[0],this._byteRange=M},O(a,[{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(R.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(y){this._url=y}}]),a}(),C=function(a){v(u,a);function u(y,T){var x;return x=a.call(this,T)||this,x._decryptdata=null,x.rawProgramDateTime=null,x.programDateTime=null,x.tagList=[],x.duration=0,x.sn=0,x.levelkey=void 0,x.type=void 0,x.loader=null,x.level=-1,x.cc=0,x.startPTS=void 0,x.endPTS=void 0,x.appendedPTS=void 0,x.startDTS=void 0,x.endDTS=void 0,x.start=0,x.deltaPTS=void 0,x.maxStartPTS=void 0,x.minEndPTS=void 0,x.stats=new p.LoadStats,x.urlId=0,x.data=void 0,x.bitrateTest=!1,x.title=null,x.initSegment=null,x.type=y,x}var m=u.prototype;return m.createInitializationVector=function(T){for(var x=new Uint8Array(16),M=12;M<16;M++)x[M]=T>>8*(15-M)&255;return x},m.setDecryptDataFromLevelKey=function(T,x){var M=T;return(T==null?void 0:T.method)==="AES-128"&&T.uri&&!T.iv&&(M=s.LevelKey.fromURI(T.uri),M.method=T.method,M.iv=this.createInitializationVector(x),M.keyFormat="identity"),M},m.setElementaryStreamInfo=function(T,x,M,b,o,r){r===void 0&&(r=!1);var n=this.elementaryStreams,l=n[T];if(!l){n[T]={startPTS:x,endPTS:M,startDTS:b,endDTS:o,partial:r};return}l.startPTS=Math.min(l.startPTS,x),l.endPTS=Math.max(l.endPTS,M),l.startDTS=Math.min(l.startDTS,b),l.endDTS=Math.max(l.endDTS,o)},m.clearElementaryStreamInfo=function(){var T=this.elementaryStreams;T[w.AUDIO]=null,T[w.VIDEO]=null,T[w.AUDIOVIDEO]=null},O(u,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var T=this.sn;typeof T!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.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(this.programDateTime===null)return null;if(!Object(Q.isFiniteNumber)(this.programDateTime))return null;var T=Object(Q.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+T*1e3}},{key:"encrypted",get:function(){var T;return!!((T=this.decryptdata)!==null&&T!==void 0&&T.keyFormat&&this.decryptdata.uri)}}]),u}(g),c=function(a){v(u,a);function u(m,y,T,x,M){var b;b=a.call(this,T)||this,b.fragOffset=0,b.duration=0,b.gap=!1,b.independent=!1,b.relurl=void 0,b.fragment=void 0,b.index=void 0,b.stats=new p.LoadStats,b.duration=m.decimalFloatingPoint("DURATION"),b.gap=m.bool("GAP"),b.independent=m.bool("INDEPENDENT"),b.relurl=m.enumeratedString("URI"),b.fragment=y,b.index=x;var o=m.enumeratedString("BYTERANGE");return o&&b.setByteRange(o,M),M&&(b.fragOffset=M.fragOffset+M.duration),b}return O(u,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),u}(g)},"./src/loader/key-loader.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return S});var Q=_("./src/events.ts"),R=_("./src/errors.ts"),E=_("./src/utils/logger.ts"),S=function(){function s(v){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=v,this._registerListeners()}var p=s.prototype;return p._registerListeners=function(){this.hls.on(Q.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(Q.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var A=this.loaders[i];A&&A.destroy()}this.loaders={}},p.onKeyLoading=function(i,A){var O=A.frag,w=O.type,g=this.loaders[w];if(!O.decryptdata){E.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var C=O.decryptdata.uri;if(C!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(g&&(E.logger.warn("abort previous key loader for type:"+w),g.abort()),!C){E.logger.warn("key uri is falsy");return}var a=c.loader,u=O.loader=this.loaders[w]=new a(c);this.decrypturl=C,this.decryptkey=null;var m={url:C,frag:O,responseType:"arraybuffer"},y={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(m,y,T)}else this.decryptkey&&(O.decryptdata.key=this.decryptkey,this.hls.trigger(Q.Events.KEY_LOADED,{frag:O}))},p.loadsuccess=function(i,A,O){var w=O.frag;if(!w.decryptdata){E.logger.error("after key load, decryptdata unset");return}this.decryptkey=w.decryptdata.key=new Uint8Array(i.data),w.loader=null,delete this.loaders[w.type],this.hls.trigger(Q.Events.KEY_LOADED,{frag:w})},p.loaderror=function(i,A){var O=A.frag,w=O.loader;w&&w.abort(),delete this.loaders[O.type],this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:O,response:i})},p.loadtimeout=function(i,A){var O=A.frag,w=O.loader;w&&w.abort(),delete this.loaders[O.type],this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:O})},s}()},"./src/loader/level-details.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"LevelDetails",function(){return s});var Q=_("./src/polyfills/number.ts");function R(p,v){for(var i=0;i<v.length;i++){var A=v[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(p,A.key,A)}}function E(p,v,i){return v&&R(p.prototype,v),i&&R(p,i),p}var S=10,s=function(){function p(i){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=i}var v=p.prototype;return v.reloaded=function(A){if(!A){this.advanced=!0,this.updated=!0;return}var O=this.lastPartSn-A.lastPartSn,w=this.lastPartIndex-A.lastPartIndex;this.updated=this.endSN!==A.endSN||!!w||!!O,this.advanced=this.endSN>A.endSN||O>0||O===0&&w>0,this.updated||this.advanced?this.misses=Math.floor(A.misses*.6):this.misses=A.misses+1,this.availabilityDelay=A.availabilityDelay},E(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(Q.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var A=this.driftEndTime-this.driftStartTime;if(A>0){var O=this.driftEnd-this.driftStart;return O*1e3/A}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var A;return(A=this.fragments)!==null&&A!==void 0&&A.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 A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"LevelKey",function(){return s});var Q=_("./node_modules/url-toolkit/src/url-toolkit.js"),R=_.n(Q);function E(p,v){for(var i=0;i<v.length;i++){var A=v[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(p,A.key,A)}}function S(p,v,i){return v&&E(p.prototype,v),i&&E(p,i),p}var s=function(){p.fromURL=function(i,A){return new p(i,A)},p.fromURI=function(i){return new p(i)};function p(v,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(Q.buildAbsoluteURL)(v,i,{alwaysNormalize:!0}):this._uri=v}return S(p,[{key:"uri",get:function(){return this._uri}}]),p}()},"./src/loader/load-stats.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"LoadStats",function(){return Q});var Q=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":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return u});var Q=_("./src/polyfills/number.ts"),R=_("./node_modules/url-toolkit/src/url-toolkit.js"),E=_.n(R),S=_("./src/loader/fragment.ts"),s=_("./src/loader/level-details.ts"),p=_("./src/loader/level-key.ts"),v=_("./src/utils/attr-list.ts"),i=_("./src/utils/logger.ts"),A=_("./src/utils/codecs.ts"),O=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,w=/#EXT-X-MEDIA:(.*)/g,g=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),C=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("|")),c=/\.(mp4|m4s|m4v|m4a)$/i;function a(M){var b,o;return c.test((b=(o=R.parseURL(M))===null||o===void 0?void 0:o.path)!=null?b:"")}var u=function(){function M(){}return M.findGroup=function(o,r){for(var n=0;n<o.length;n++){var l=o[n];if(l.id===r)return l}},M.convertAVC1ToAVCOTI=function(o){var r=o.split(".");if(r.length>2){var n=r.shift()+".";return n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).substr(-4),n}return o},M.resolve=function(o,r){return R.buildAbsoluteURL(r,o,{alwaysNormalize:!0})},M.parseMasterPlaylist=function(o,r){var n=[],l={},L=!1;O.lastIndex=0;for(var B;(B=O.exec(o))!=null;)if(B[1]){var h=new v.AttrList(B[1]),I={attrs:h,bitrate:h.decimalInteger("AVERAGE-BANDWIDTH")||h.decimalInteger("BANDWIDTH"),name:h.NAME,url:M.resolve(B[2],r)},H=h.decimalResolution("RESOLUTION");H&&(I.width=H.width,I.height=H.height),m((h.CODECS||"").split(/[ ,]+/).filter(function(Z){return Z}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=M.convertAVC1ToAVCOTI(I.videoCodec)),n.push(I)}else if(B[3]){var z=new v.AttrList(B[3]);z["DATA-ID"]&&(L=!0,l[z["DATA-ID"]]=z)}return{levels:n,sessionData:L?l:null}},M.parseMasterPlaylistMedia=function(o,r,n,l){l===void 0&&(l=[]);var L,B=[],h=0;for(w.lastIndex=0;(L=w.exec(o))!==null;){var I=new v.AttrList(L[1]);if(I.TYPE===n){var H={attrs:I,bitrate:0,id:h++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:n,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?M.resolve(I.URI,r):""};if(l.length){var z=M.findGroup(l,H.groupId)||l[0];y(H,z,"audioCodec"),y(H,z,"textCodec")}B.push(H)}}return B},M.parseLevelPlaylist=function(o,r,n,l,L){var B=new s.LevelDetails(r),h=B.fragments,I=null,H=0,z=0,Z=0,Y=0,G=null,ee=new S.Fragment(l,r),J,oe,se,Te=-1,be=!1;for(g.lastIndex=0,B.m3u8=o;(J=g.exec(o))!==null;){be&&(be=!1,ee=new S.Fragment(l,r),ee.start=Z,ee.sn=H,ee.cc=Y,ee.level=n,I&&(ee.initSegment=I,ee.rawProgramDateTime=I.rawProgramDateTime));var xe=J[1];if(xe){ee.duration=parseFloat(xe);var Oe=(" "+J[2]).slice(1);ee.title=Oe||null,ee.tagList.push(Oe?["INF",xe,Oe]:["INF",xe])}else if(J[3])Object(Q.isFiniteNumber)(ee.duration)&&(ee.start=Z,se&&(ee.levelkey=se),ee.sn=H,ee.level=n,ee.cc=Y,ee.urlId=L,h.push(ee),ee.relurl=(" "+J[3]).slice(1),x(ee,G),G=ee,Z+=ee.duration,H++,z=0,be=!0);else if(J[4]){var Ne=(" "+J[4]).slice(1);G?ee.setByteRange(Ne,G):ee.setByteRange(Ne)}else if(J[5])ee.rawProgramDateTime=(" "+J[5]).slice(1),ee.tagList.push(["PROGRAM-DATE-TIME",ee.rawProgramDateTime]),Te===-1&&(Te=h.length);else{if(J=J[0].match(C),!J){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<J.length&&!(typeof J[oe]!="undefined");oe++);var Le=(" "+J[oe]).slice(1),Se=(" "+J[oe+1]).slice(1),tt=J[oe+2]?(" "+J[oe+2]).slice(1):"";switch(Le){case"PLAYLIST-TYPE":B.type=Se.toUpperCase();break;case"MEDIA-SEQUENCE":H=B.startSN=parseInt(Se);break;case"SKIP":{var Bt=new v.AttrList(Se),De=Bt.decimalInteger("SKIPPED-SEGMENTS");if(Object(Q.isFiniteNumber)(De)){B.skippedSegments=De;for(var Qe=De;Qe--;)h.unshift(null);H+=De}var it=Bt.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(B.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":B.targetduration=parseFloat(Se);break;case"VERSION":B.version=parseInt(Se);break;case"EXTM3U":break;case"ENDLIST":B.live=!1;break;case"#":(Se||tt)&&ee.tagList.push(tt?[Se,tt]:[Se]);break;case"DIS":Y++;case"GAP":ee.tagList.push([Le]);break;case"BITRATE":ee.tagList.push([Le,Se]);break;case"DISCONTINUITY-SEQ":Y=parseInt(Se);break;case"KEY":{var Ae,re=new v.AttrList(Se),ie=re.enumeratedString("METHOD"),ce=re.URI,Be=re.hexadecimalInteger("IV"),Re=re.enumeratedString("KEYFORMATVERSIONS"),ke=re.enumeratedString("KEYID"),ft=(Ae=re.enumeratedString("KEYFORMAT"))!=null?Ae:"identity",pt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(pt.indexOf(ft)>-1){i.logger.warn("Keyformat "+ft+" is not supported from the manifest");continue}else if(ft!=="identity")continue;ie&&(se=p.LevelKey.fromURL(r,ce),ce&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ie)>=0&&(se.method=ie,se.keyFormat=ft,ke&&(se.keyID=ke),Re&&(se.keyFormatVersions=Re),se.iv=Be));break}case"START":{var bt=new v.AttrList(Se),yt=bt.decimalFloatingPoint("TIME-OFFSET");Object(Q.isFiniteNumber)(yt)&&(B.startTimeOffset=yt);break}case"MAP":{var _t=new v.AttrList(Se);ee.relurl=_t.URI,_t.BYTERANGE&&ee.setByteRange(_t.BYTERANGE),ee.level=n,ee.sn="initSegment",se&&(ee.levelkey=se),ee.initSegment=null,I=ee,be=!0;break}case"SERVER-CONTROL":{var It=new v.AttrList(Se);B.canBlockReload=It.bool("CAN-BLOCK-RELOAD"),B.canSkipUntil=It.optionalFloat("CAN-SKIP-UNTIL",0),B.canSkipDateRanges=B.canSkipUntil>0&&It.bool("CAN-SKIP-DATERANGES"),B.partHoldBack=It.optionalFloat("PART-HOLD-BACK",0),B.holdBack=It.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new v.AttrList(Se);B.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=B.partList;Pe||(Pe=B.partList=[]);var At=z>0?Pe[Pe.length-1]:void 0,mt=z++,Ze=new S.Part(new v.AttrList(Se),ee,r,mt,At);Pe.push(Ze),ee.duration+=Ze.duration;break}case"PRELOAD-HINT":{var ut=new v.AttrList(Se);B.preloadHint=ut;break}case"RENDITION-REPORT":{var Ke=new v.AttrList(Se);B.renditionReports=B.renditionReports||[],B.renditionReports.push(Ke);break}default:i.logger.warn("line parsed but not handled: "+J);break}}}G&&!G.relurl?(h.pop(),Z-=G.duration,B.partList&&(B.fragmentHint=G)):B.partList&&(x(ee,G),ee.cc=Y,B.fragmentHint=ee);var Ie=h.length,Me=h[0],me=h[Ie-1];if(Z+=B.skippedSegments*B.targetduration,Z>0&&Ie&&me){B.averagetargetduration=Z/Ie;var Ee=me.sn;B.endSN=Ee!=="initSegment"?Ee:0,Me&&(B.startCC=Me.cc,Me.initSegment||B.fragments.every(function(ge){return ge.relurl&&a(ge.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),ee=new S.Fragment(l,r),ee.relurl=me.relurl,ee.level=n,ee.sn="initSegment",Me.initSegment=ee,B.needSidxRanges=!0))}else B.endSN=0,B.startCC=0;return B.fragmentHint&&(Z+=B.fragmentHint.duration),B.totalduration=Z,B.endCC=Y,Te>0&&T(h,Te),B},M}();function m(M,b){["video","audio","text"].forEach(function(o){var r=M.filter(function(l){return Object(A.isCodecType)(l,o)});if(r.length){var n=r.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});b[o+"Codec"]=n.length>0?n[0]:r[0],M=M.filter(function(l){return r.indexOf(l)===-1})}}),b.unknownCodecs=M}function y(M,b,o){var r=b[o];r&&(M[o]=r)}function T(M,b){for(var o=M[b],r=b;r--;){var n=M[r];if(!n)return;n.programDateTime=o.programDateTime-n.duration*1e3,o=n}}function x(M,b){M.rawProgramDateTime?M.programDateTime=Date.parse(M.rawProgramDateTime):b!=null&&b.programDateTime&&(M.programDateTime=b.endProgramDateTime),Object(Q.isFiniteNumber)(M.programDateTime)||(M.programDateTime=null,M.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/polyfills/number.ts"),R=_("./src/events.ts"),E=_("./src/errors.ts"),S=_("./src/utils/logger.ts"),s=_("./src/utils/mp4-tools.ts"),p=_("./src/loader/m3u8-parser.ts"),v=_("./src/types/loader.ts"),i=_("./src/utils/attr-list.ts");function A(g){var C=g.type;switch(C){case v.PlaylistContextType.AUDIO_TRACK:return v.PlaylistLevelType.AUDIO;case v.PlaylistContextType.SUBTITLE_TRACK:return v.PlaylistLevelType.SUBTITLE;default:return v.PlaylistLevelType.MAIN}}function O(g,C){var c=g.url;return(c===void 0||c.indexOf("data:")===0)&&(c=C.url),c}var w=function(){function g(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var C=g.prototype;return C.registerListeners=function(){var a=this.hls;a.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(R.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(R.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},C.unregisterListeners=function(){var a=this.hls;a.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(R.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(R.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},C.createInternalLoader=function(a){var u=this.hls.config,m=u.pLoader,y=u.loader,T=m||y,x=new T(u);return a.loader=x,this.loaders[a.type]=x,x},C.getInternalLoader=function(a){return this.loaders[a.type]},C.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},C.destroyInternalLoaders=function(){for(var a in this.loaders){var u=this.loaders[a];u&&u.destroy(),this.resetInternalLoader(a)}},C.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},C.onManifestLoading=function(a,u){var m=u.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:v.PlaylistContextType.MANIFEST,url:m,deliveryDirectives:null})},C.onLevelLoading=function(a,u){var m=u.id,y=u.level,T=u.url,x=u.deliveryDirectives;this.load({id:m,groupId:null,level:y,responseType:"text",type:v.PlaylistContextType.LEVEL,url:T,deliveryDirectives:x})},C.onAudioTrackLoading=function(a,u){var m=u.id,y=u.groupId,T=u.url,x=u.deliveryDirectives;this.load({id:m,groupId:y,level:null,responseType:"text",type:v.PlaylistContextType.AUDIO_TRACK,url:T,deliveryDirectives:x})},C.onSubtitleTrackLoading=function(a,u){var m=u.id,y=u.groupId,T=u.url,x=u.deliveryDirectives;this.load({id:m,groupId:y,level:null,responseType:"text",type:v.PlaylistContextType.SUBTITLE_TRACK,url:T,deliveryDirectives:x})},C.load=function(a){var u,m=this.hls.config,y=this.getInternalLoader(a);if(y){var T=y.context;if(T&&T.url===a.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),y.abort()}var x,M,b,o;switch(a.type){case v.PlaylistContextType.MANIFEST:x=m.manifestLoadingMaxRetry,M=m.manifestLoadingTimeOut,b=m.manifestLoadingRetryDelay,o=m.manifestLoadingMaxRetryTimeout;break;case v.PlaylistContextType.LEVEL:case v.PlaylistContextType.AUDIO_TRACK:case v.PlaylistContextType.SUBTITLE_TRACK:x=0,M=m.levelLoadingTimeOut;break;default:x=m.levelLoadingMaxRetry,M=m.levelLoadingTimeOut,b=m.levelLoadingRetryDelay,o=m.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(a),(u=a.deliveryDirectives)!==null&&u!==void 0&&u.part){var r;if(a.type===v.PlaylistContextType.LEVEL&&a.level!==null?r=this.hls.levels[a.level].details:a.type===v.PlaylistContextType.AUDIO_TRACK&&a.id!==null?r=this.hls.audioTracks[a.id].details:a.type===v.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(r=this.hls.subtitleTracks[a.id].details),r){var n=r.partTarget,l=r.targetduration;n&&l&&(M=Math.min(Math.max(n*3,l*.8)*1e3,M))}}var L={timeout:M,maxRetry:x,retryDelay:b,maxRetryDelay:o,highWaterMark:0},B={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(a,L,B)},C.loadsuccess=function(a,u,m,y){if(y===void 0&&(y=null),m.isSidxRequest){this.handleSidxRequest(a,m),this.handlePlaylistLoaded(a,u,m,y);return}this.resetInternalLoader(m.type);var T=a.data;if(T.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,m,"no EXTM3U delimiter",y);return}u.parsing.start=performance.now(),T.indexOf("#EXTINF:")>0||T.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,u,m,y):this.handleMasterPlaylist(a,u,m,y)},C.loaderror=function(a,u,m){m===void 0&&(m=null),this.handleNetworkError(u,m,!1,a)},C.loadtimeout=function(a,u,m){m===void 0&&(m=null),this.handleNetworkError(u,m,!0)},C.handleMasterPlaylist=function(a,u,m,y){var T=this.hls,x=a.data,M=O(a,m),b=p.default.parseMasterPlaylist(x,M),o=b.levels,r=b.sessionData;if(!o.length){this.handleManifestParsingError(a,m,"no level found in manifest",y);return}var n=o.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),l=o.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),L=p.default.parseMasterPlaylistMedia(x,M,"AUDIO",n),B=p.default.parseMasterPlaylistMedia(x,M,"SUBTITLES",l),h=p.default.parseMasterPlaylistMedia(x,M,"CLOSED-CAPTIONS");if(L.length){var I=L.some(function(H){return!H.url});!I&&o[0].audioCodec&&!o[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),L.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new i.AttrList({}),bitrate:0,url:""}))}T.trigger(R.Events.MANIFEST_LOADED,{levels:o,audioTracks:L,subtitles:B,captions:h,url:M,stats:u,networkDetails:y,sessionData:r})},C.handleTrackOrLevelPlaylist=function(a,u,m,y){var T=this.hls,x=m.id,M=m.level,b=m.type,o=O(a,m),r=Object(Q.isFiniteNumber)(x)?x:0,n=Object(Q.isFiniteNumber)(M)?M:r,l=A(m),L=p.default.parseLevelPlaylist(a.data,o,n,l,r);if(!L.fragments.length){T.trigger(R.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:o,reason:"no fragments found in level",level:typeof m.level=="number"?m.level:void 0});return}if(b===v.PlaylistContextType.MANIFEST){var B={attrs:new i.AttrList({}),bitrate:0,details:L,name:"",url:o};T.trigger(R.Events.MANIFEST_LOADED,{levels:[B],audioTracks:[],url:o,stats:u,networkDetails:y,sessionData:null})}if(u.parsing.end=performance.now(),L.needSidxRanges){var h,I=(h=L.fragments[0].initSegment)===null||h===void 0?void 0:h.url;this.load({url:I,isSidxRequest:!0,type:b,level:M,levelDetails:L,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}m.levelDetails=L,this.handlePlaylistLoaded(a,u,m,y)},C.handleSidxRequest=function(a,u){var m=Object(s.parseSegmentIndex)(new Uint8Array(a.data));if(!m)return;var y=m.references,T=u.levelDetails;y.forEach(function(x,M){var b=x.info,o=T.fragments[M];o.byteRange.length===0&&o.setByteRange(String(1+b.end-b.start)+"@"+String(b.start)),o.initSegment&&o.initSegment.setByteRange(String(m.moovEndOffset)+"@0")})},C.handleManifestParsingError=function(a,u,m,y){this.hls.trigger(R.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:u.type===v.PlaylistContextType.MANIFEST,url:a.url,reason:m,response:a,context:u,networkDetails:y})},C.handleNetworkError=function(a,u,m,y){m===void 0&&(m=!1),S.logger.warn("[playlist-loader]: A network "+(m?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var T=E.ErrorDetails.UNKNOWN,x=!1,M=this.getInternalLoader(a);switch(a.type){case v.PlaylistContextType.MANIFEST:T=m?E.ErrorDetails.MANIFEST_LOAD_TIMEOUT:E.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case v.PlaylistContextType.LEVEL:T=m?E.ErrorDetails.LEVEL_LOAD_TIMEOUT:E.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case v.PlaylistContextType.AUDIO_TRACK:T=m?E.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case v.PlaylistContextType.SUBTITLE_TRACK:T=m?E.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:E.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}M&&this.resetInternalLoader(a.type);var b={type:E.ErrorTypes.NETWORK_ERROR,details:T,fatal:x,url:a.url,loader:M,context:a,networkDetails:u};y&&(b.response=y),this.hls.trigger(R.Events.ERROR,b)},C.handlePlaylistLoaded=function(a,u,m,y){var T=m.type,x=m.level,M=m.id,b=m.groupId,o=m.loader,r=m.levelDetails,n=m.deliveryDirectives;if(!(r!=null&&r.targetduration)){this.handleManifestParsingError(a,m,"invalid target duration",y);return}if(!o)return;r.live&&(o.getCacheAge&&(r.ageHeader=o.getCacheAge()||0),(!o.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0));switch(T){case v.PlaylistContextType.MANIFEST:case v.PlaylistContextType.LEVEL:this.hls.trigger(R.Events.LEVEL_LOADED,{details:r,level:x||0,id:M||0,stats:u,networkDetails:y,deliveryDirectives:n});break;case v.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(R.Events.AUDIO_TRACK_LOADED,{details:r,id:M||0,groupId:b||"",stats:u,networkDetails:y,deliveryDirectives:n});break;case v.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(R.Events.SUBTITLE_TRACK_LOADED,{details:r,id:M||0,groupId:b||"",stats:u,networkDetails:y,deliveryDirectives:n});break}},g}();N.default=w},"./src/polyfills/number.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"isFiniteNumber",function(){return Q}),_.d(N,"MAX_SAFE_INTEGER",function(){return R});var Q=Number.isFinite||function(E){return typeof E=="number"&&isFinite(E)},R=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(X,N,_){"use strict";_.r(N);var Q=function(){function R(){}return R.getSilentFrame=function(S,s){switch(S){case"mp4a.40.2":if(s===1)return new Uint8Array([0,200,0,128,35,128]);if(s===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(s===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(s===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(s===5)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(s===6)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(s===1)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(s===2)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(s===3)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]);break}return},R}();N.default=Q},"./src/remux/mp4-generator.ts":function(X,N,_){"use strict";_.r(N);var Q=Math.pow(2,32)-1,R=function(){function E(){}return E.init=function(){E.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:[]};var s;for(s in E.types)E.types.hasOwnProperty(s)&&(E.types[s]=[s.charCodeAt(0),s.charCodeAt(1),s.charCodeAt(2),s.charCodeAt(3)]);var p=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]),v=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]);E.HDLR_TYPES={video:p,audio:v};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]);E.STTS=E.STSC=E.STCO=A,E.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),E.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),E.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),E.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var O=new Uint8Array([105,115,111,109]),w=new Uint8Array([97,118,99,49]),g=new Uint8Array([0,0,0,1]);E.FTYP=E.box(E.types.ftyp,O,g,O,w),E.DINF=E.box(E.types.dinf,E.box(E.types.dref,i))},E.box=function(s){for(var p=8,v=arguments.length,i=new Array(v>1?v-1:0),A=1;A<v;A++)i[A-1]=arguments[A];for(var O=i.length,w=O;O--;)p+=i[O].byteLength;var g=new Uint8Array(p);for(g[0]=p>>24&255,g[1]=p>>16&255,g[2]=p>>8&255,g[3]=p&255,g.set(s,4),O=0,p=8;O<w;O++)g.set(i[O],p),p+=i[O].byteLength;return g},E.hdlr=function(s){return E.box(E.types.hdlr,E.HDLR_TYPES[s])},E.mdat=function(s){return E.box(E.types.mdat,s)},E.mdhd=function(s,p){p*=s;var v=Math.floor(p/(Q+1)),i=Math.floor(p%(Q+1));return E.box(E.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,s>>24&255,s>>16&255,s>>8&255,s&255,v>>24,v>>16&255,v>>8&255,v&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},E.mdia=function(s){return E.box(E.types.mdia,E.mdhd(s.timescale,s.duration),E.hdlr(s.type),E.minf(s))},E.mfhd=function(s){return E.box(E.types.mfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255]))},E.minf=function(s){return s.type==="audio"?E.box(E.types.minf,E.box(E.types.smhd,E.SMHD),E.DINF,E.stbl(s)):E.box(E.types.minf,E.box(E.types.vmhd,E.VMHD),E.DINF,E.stbl(s))},E.moof=function(s,p,v){return E.box(E.types.moof,E.mfhd(s),E.traf(v,p))},E.moov=function(s){for(var p=s.length,v=[];p--;)v[p]=E.trak(s[p]);return E.box.apply(null,[E.types.moov,E.mvhd(s[0].timescale,s[0].duration)].concat(v).concat(E.mvex(s)))},E.mvex=function(s){for(var p=s.length,v=[];p--;)v[p]=E.trex(s[p]);return E.box.apply(null,[E.types.mvex].concat(v))},E.mvhd=function(s,p){p*=s;var v=Math.floor(p/(Q+1)),i=Math.floor(p%(Q+1)),A=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,s>>24&255,s>>16&255,s>>8&255,s&255,v>>24,v>>16&255,v>>8&255,v&255,i>>24,i>>16&255,i>>8&255,i&255,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 E.box(E.types.mvhd,A)},E.sdtp=function(s){var p=s.samples||[],v=new Uint8Array(4+p.length),i,A;for(i=0;i<p.length;i++)A=p[i].flags,v[i+4]=A.dependsOn<<4|A.isDependedOn<<2|A.hasRedundancy;return E.box(E.types.sdtp,v)},E.stbl=function(s){return E.box(E.types.stbl,E.stsd(s),E.box(E.types.stts,E.STTS),E.box(E.types.stsc,E.STSC),E.box(E.types.stsz,E.STSZ),E.box(E.types.stco,E.STCO))},E.avc1=function(s){var p=[],v=[],i,A,O;for(i=0;i<s.sps.length;i++)A=s.sps[i],O=A.byteLength,p.push(O>>>8&255),p.push(O&255),p=p.concat(Array.prototype.slice.call(A));for(i=0;i<s.pps.length;i++)A=s.pps[i],O=A.byteLength,v.push(O>>>8&255),v.push(O&255),v=v.concat(Array.prototype.slice.call(A));var w=E.box(E.types.avcC,new Uint8Array([1,p[3],p[4],p[5],252|3,224|s.sps.length].concat(p).concat([s.pps.length]).concat(v))),g=s.width,C=s.height,c=s.pixelRatio[0],a=s.pixelRatio[1];return E.box(E.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,g>>8&255,g&255,C>>8&255,C&255,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]),w,E.box(E.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),E.box(E.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,a>>24,a>>16&255,a>>8&255,a&255])))},E.esds=function(s){var p=s.config.length;return new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(s.config).concat([6,1,2]))},E.mp4a=function(s){var p=s.samplerate;return E.box(E.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]),E.box(E.types.esds,E.esds(s)))},E.mp3=function(s){var p=s.samplerate;return E.box(E.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]))},E.stsd=function(s){return s.type==="audio"?!s.isAAC&&s.codec==="mp3"?E.box(E.types.stsd,E.STSD,E.mp3(s)):E.box(E.types.stsd,E.STSD,E.mp4a(s)):E.box(E.types.stsd,E.STSD,E.avc1(s))},E.tkhd=function(s){var p=s.id,v=s.duration*s.timescale,i=s.width,A=s.height,O=Math.floor(v/(Q+1)),w=Math.floor(v%(Q+1));return E.box(E.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,0,0,0,0,O>>24,O>>16&255,O>>8&255,O&255,w>>24,w>>16&255,w>>8&255,w&255,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,i>>8&255,i&255,0,0,A>>8&255,A&255,0,0]))},E.traf=function(s,p){var v=E.sdtp(s),i=s.id,A=Math.floor(p/(Q+1)),O=Math.floor(p%(Q+1));return E.box(E.types.traf,E.box(E.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),E.box(E.types.tfdt,new Uint8Array([1,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,O>>24,O>>16&255,O>>8&255,O&255])),E.trun(s,v.length+16+20+8+16+8+8),v)},E.trak=function(s){return s.duration=s.duration||4294967295,E.box(E.types.trak,E.tkhd(s),E.mdia(s))},E.trex=function(s){var p=s.id;return E.box(E.types.trex,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},E.trun=function(s,p){var v=s.samples||[],i=v.length,A=12+16*i,O=new Uint8Array(A),w,g,C,c,a,u;for(p+=8+A,O.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),w=0;w<i;w++)g=v[w],C=g.duration,c=g.size,a=g.flags,u=g.cts,O.set([C>>>24&255,C>>>16&255,C>>>8&255,C&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,u>>>24&255,u>>>16&255,u>>>8&255,u&255],12+16*w);return E.box(E.types.trun,O)},E.initSegment=function(s){E.types||E.init();var p=E.moov(s),v=new Uint8Array(E.FTYP.byteLength+p.byteLength);return v.set(E.FTYP),v.set(p,E.FTYP.byteLength),v},E}();R.types=void 0,R.HDLR_TYPES=void 0,R.STTS=void 0,R.STSC=void 0,R.STCO=void 0,R.STSZ=void 0,R.VMHD=void 0,R.SMHD=void 0,R.STSD=void 0,R.FTYP=void 0,R.DINF=void 0,N.default=R},"./src/remux/mp4-remuxer.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return u}),_.d(N,"normalizePts",function(){return m});var Q=_("./src/polyfills/number.ts"),R=_("./src/remux/aac-helper.ts"),E=_("./src/remux/mp4-generator.ts"),S=_("./src/events.ts"),s=_("./src/errors.ts"),p=_("./src/utils/logger.ts"),v=_("./src/types/loader.ts"),i=_("./src/utils/timescale-conversion.ts");function A(){return A=Object.assign||function(M){for(var b=1;b<arguments.length;b++){var o=arguments[b];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(M[r]=o[r])}return M},A.apply(this,arguments)}var O=10*1e3,w=1024,g=1152,C=null,c=null,a=!1,u=function(){function M(o,r,n,l){if(l===void 0&&(l=""),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=o,this.config=r,this.typeSupported=n,this.ISGenerated=!1,C===null){var L=navigator.userAgent||"",B=L.match(/Chrome\/(\d+)/i);C=B?parseInt(B[1]):0}if(c===null){var h=navigator.userAgent.match(/Safari\/(\d+)/i);c=h?parseInt(h[1]):0}a=!!C&&C<75||!!c&&c<600}var b=M.prototype;return b.destroy=function(){},b.resetTimeStamp=function(r){p.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},b.resetNextTimestamp=function(){p.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},b.resetInitSegment=function(){p.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},b.getVideoStartPts=function(r){var n=!1,l=r.reduce(function(L,B){var h=B.pts-L;return h<-4294967296?(n=!0,m(L,B.pts)):h>0?L:B.pts},r[0].pts);return n&&p.logger.debug("PTS rollover detected"),l},b.remux=function(r,n,l,L,B,h,I,H){var z,Z,Y,G,ee,J,oe=B,se=B,Te=r.pid>-1,be=n.pid>-1,xe=n.samples.length,Oe=r.samples.length>0,Ne=xe>1,Le=(!Te||Oe)&&(!be||Ne)||this.ISGenerated||I;if(Le){this.ISGenerated||(Y=this.generateIS(r,n,B));var Se=this.isVideoContiguous,tt=-1;if(Ne&&(tt=y(n.samples),!Se&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,tt>0){p.logger.warn("[mp4-remuxer]: Dropped "+tt+" out of "+xe+" video samples due to a missing keyframe");var Bt=this.getVideoStartPts(n.samples);n.samples=n.samples.slice(tt),n.dropped+=tt,se+=(n.samples[0].pts-Bt)/(n.timescale||9e4)}else tt===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+xe+" video samples"),J=!1);if(this.ISGenerated){if(Oe&&Ne){var De=this.getVideoStartPts(n.samples),Qe=m(r.samples[0].pts,De)-De,it=Qe/n.inputTimeScale;oe+=Math.max(0,it),se+=Math.max(0,-it)}if(Oe){if(r.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),Y=this.generateIS(r,n,B)),Z=this.remuxAudio(r,oe,this.isAudioContiguous,h,be||Ne||H===v.PlaylistLevelType.AUDIO?se:void 0),Ne){var Ae=Z?Z.endPTS-Z.startPTS:0;n.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),Y=this.generateIS(r,n,B)),z=this.remuxVideo(n,se,Se,Ae)}}else Ne&&(z=this.remuxVideo(n,se,Se,0));z&&(z.firstKeyFrame=tt,z.independent=tt!==-1)}}return this.ISGenerated&&(l.samples.length&&(ee=this.remuxID3(l,B)),L.samples.length&&(G=this.remuxText(L,B))),{audio:Z,video:z,initSegment:Y,independent:J,text:G,id3:ee}},b.generateIS=function(r,n,l){var L=r.samples,B=n.samples,h=this.typeSupported,I={},H=!Object(Q.isFiniteNumber)(this._initPTS),z="audio/mp4",Z,Y,G;if(H&&(Z=Y=Infinity),r.config&&L.length&&(r.timescale=r.samplerate,r.isAAC||(h.mpeg?(z="audio/mpeg",r.codec=""):h.mp3&&(r.codec="mp3")),I.audio={id:"audio",container:z,codec:r.codec,initSegment:!r.isAAC&&h.mpeg?new Uint8Array(0):E.default.initSegment([r]),metadata:{channelCount:r.channelCount}},H&&(G=r.inputTimeScale,Z=Y=L[0].pts-Math.round(G*l))),n.sps&&n.pps&&B.length&&(n.timescale=n.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:n.codec,initSegment:E.default.initSegment([n]),metadata:{width:n.width,height:n.height}},H)){G=n.inputTimeScale;var ee=this.getVideoStartPts(B),J=Math.round(G*l);Y=Math.min(Y,m(B[0].dts,ee)-J),Z=Math.min(Z,ee-J)}if(Object.keys(I).length)return this.ISGenerated=!0,H&&(this._initPTS=Z,this._initDTS=Y),{tracks:I,initPTS:Z,timescale:G}},b.remuxVideo=function(r,n,l,L){var B=r.inputTimeScale,h=r.samples,I=[],H=h.length,z=this._initPTS,Z=this.nextAvcDts,Y=8,G,ee,J,oe=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,Te=0,be=!1;if(!l||Z===null){var xe=n*B,Oe=h[0].pts-m(h[0].dts,h[0].pts);Z=xe-Oe}for(var Ne=0;Ne<H;Ne++){var Le=h[Ne];if(Le.pts=m(Le.pts-z,Z),Le.dts=m(Le.dts-z,Z),Le.dts>Le.pts){var Se=9e4*.2;Te=Math.max(Math.min(Te,Le.pts-Le.dts),-1*Se)}Le.dts<h[Ne>0?Ne-1:Ne].dts&&(be=!0)}be&&h.sort(function(Lt,st){var rt=Lt.dts-st.dts,et=Lt.pts-st.pts;return rt||et}),ee=h[0].dts,J=h[h.length-1].dts;var tt=Math.round((J-ee)/(H-1));if(Te<0){if(Te<tt*-2){p.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-tt,!0)+" ms");for(var Bt=Te,De=0;De<H;De++)h[De].dts=Bt=Math.max(Bt,h[De].pts-tt),h[De].pts=Math.max(Bt,h[De].pts)}else{p.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(Te,!0)+" ms to overcome this issue");for(var Qe=0;Qe<H;Qe++)h[Qe].dts=h[Qe].dts+Te}ee=h[0].dts}if(l){var it=ee-Z,Ae=it>tt,re=it<-1;if(Ae||re){Ae?p.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),ee=Z;var ie=h[0].pts-it;h[0].dts=ee,h[0].pts=ie,p.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(ie,!0)+"/"+Object(i.toMsFromMpegTsClock)(ee,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(it,!0)+" ms")}}a&&(ee=Math.max(0,ee));for(var ce=0,Be=0,Re=0;Re<H;Re++){for(var ke=h[Re],ft=ke.units,pt=ft.length,bt=0,yt=0;yt<pt;yt++)bt+=ft[yt].data.length;Be+=bt,ce+=pt,ke.length=bt,ke.dts=Math.max(ke.dts,ee),ke.pts=Math.max(ke.pts,ke.dts,0),oe=Math.min(ke.pts,oe),se=Math.max(ke.pts,se)}J=h[H-1].dts;var _t=Be+4*ce+8,It;try{It=new Uint8Array(_t)}catch(Lt){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:_t,reason:"fail allocating video mdat "+_t});return}var He=new DataView(It.buffer);He.setUint32(0,_t),It.set(E.default.types.mdat,4);for(var Pe=0;Pe<H;Pe++){for(var At=h[Pe],mt=At.units,Ze=0,ut=0,Ke=mt.length;ut<Ke;ut++){var Ie=mt[ut],Me=Ie.data,me=Ie.data.byteLength;He.setUint32(Y,me),Y+=4,It.set(Me,Y),Y+=me,Ze+=4+me}if(Pe<H-1)G=h[Pe+1].dts-At.dts;else{var Ee=this.config,ge=At.dts-h[Pe>0?Pe-1:Pe].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var we=Math.floor(Ee.maxBufferHole*B),ze=(L?oe+L*B:this.nextAudioPts)-At.pts;ze>we?(G=ze-ge,G<0&&(G=ge),p.logger.log("[mp4-remuxer]: It is approximately "+ze/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=ge}else G=ge}var Je=Math.round(At.pts-At.dts);I.push(new T(At.key,G,Ze,Je))}if(I.length&&C&&C<70){var Et=I[0].flags;Et.dependsOn=2,Et.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Z=J+G,this.isVideoContiguous=!0;var Ft=E.default.moof(r.sequenceNumber++,ee,A({},r,{samples:I})),Nt="video",ht={data1:Ft,data2:It,startPTS:oe/B,endPTS:(se+G)/B,startDTS:ee/B,endDTS:Z/B,type:Nt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(It.length,"MDAT length must not be zero"),ht},b.remuxAudio=function(r,n,l,L,B){var h=r.inputTimeScale,I=r.samplerate?r.samplerate:h,H=h/I,z=r.isAAC?w:g,Z=z*H,Y=this._initPTS,G=!r.isAAC&&this.typeSupported.mpeg,ee=[],J=r.samples,oe=G?0:8,se=this.nextAudioPts||-1,Te=n*h;if(this.isAudioContiguous=l=l||J.length&&se>0&&(L&&Math.abs(Te-se)<9e3||Math.abs(m(J[0].pts-Y,Te)-se)<20*Z),J.forEach(function(Me){Me.pts=m(Me.pts-Y,Te)}),!l||se<0){if(J=J.filter(function(Me){return Me.pts>=0}),!J.length)return;B===0?se=0:L?se=Math.max(0,Te):se=J[0].pts}if(r.isAAC)for(var be=B!==void 0,xe=this.config.maxAudioFramesDrift,Oe=0,Ne=se;Oe<J.length;Oe++){var Le=J[Oe],Se=Le.pts,tt=Se-Ne,Bt=Math.abs(1e3*tt/h);if(tt<=-xe*Z&&be)Oe===0&&(p.logger.warn("Audio frame @ "+(Se/h).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*tt/h)+" ms."),this.nextAudioPts=se=Ne=Se);else if(tt>=xe*Z&&Bt<O&&be){var De=Math.round(tt/Z);Ne=Se-De*Z,Ne<0&&(De--,Ne+=Z),Oe===0&&(this.nextAudioPts=se=Ne),p.logger.warn("[mp4-remuxer]: Injecting "+De+" audio frame @ "+(Ne/h).toFixed(3)+"s due to "+Math.round(1e3*tt/h)+" ms gap.");for(var Qe=0;Qe<De;Qe++){var it=Math.max(Ne,0),Ae=R.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);Ae||(p.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ae=Le.unit.subarray()),J.splice(Oe,0,{unit:Ae,pts:it}),Ne+=Z,Oe++}}Le.pts=Ne,Ne+=Z}for(var re=null,ie=null,ce,Be=0,Re=J.length;Re--;)Be+=J[Re].unit.byteLength;for(var ke=0,ft=J.length;ke<ft;ke++){var pt=J[ke],bt=pt.unit,yt=pt.pts;if(ie!==null){var _t=ee[ke-1];_t.duration=Math.round((yt-ie)/H)}else if(l&&r.isAAC&&(yt=se),re=yt,Be>0){Be+=oe;try{ce=new Uint8Array(Be)}catch(Me){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Be,reason:"fail allocating audio mdat "+Be});return}if(!G){var It=new DataView(ce.buffer);It.setUint32(0,Be),ce.set(E.default.types.mdat,4)}}else return;ce.set(bt,oe);var He=bt.byteLength;oe+=He,ee.push(new T(!0,z,He,0)),ie=yt}var Pe=ee.length;if(!Pe)return;var At=ee[ee.length-1];this.nextAudioPts=se=ie+H*At.duration;var mt=G?new Uint8Array(0):E.default.moof(r.sequenceNumber++,re/H,A({},r,{samples:ee}));r.samples=[];var Ze=re/h,ut=se/h,Ke="audio",Ie={data1:mt,data2:ce,startPTS:Ze,endPTS:ut,startDTS:Ze,endDTS:ut,type:Ke,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(ce.length,"MDAT length must not be zero"),Ie},b.remuxEmptyAudio=function(r,n,l,L){var B=r.inputTimeScale,h=r.samplerate?r.samplerate:B,I=B/h,H=this.nextAudioPts,z=(H!==null?H:L.startDTS*B)+this._initDTS,Z=L.endDTS*B+this._initDTS,Y=I*w,G=Math.ceil((Z-z)/Y),ee=R.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!ee){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],oe=0;oe<G;oe++){var se=z+oe*Y;J.push({unit:ee,pts:se,dts:se})}return r.samples=J,this.remuxAudio(r,n,l,!1)},b.remuxID3=function(r,n){var l=r.samples.length;if(!l)return;for(var L=r.inputTimeScale,B=this._initPTS,h=this._initDTS,I=0;I<l;I++){var H=r.samples[I];H.pts=m(H.pts-B,n*L)/L,H.dts=m(H.dts-h,n*L)/L}var z=r.samples;return r.samples=[],{samples:z}},b.remuxText=function(r,n){var l=r.samples.length;if(!l)return;for(var L=r.inputTimeScale,B=this._initPTS,h=0;h<l;h++){var I=r.samples[h];I.pts=m(I.pts-B,n*L)/L}r.samples.sort(function(z,Z){return z.pts-Z.pts});var H=r.samples;return r.samples=[],{samples:H}},M}();function m(M,b){var o;if(b===null)return M;for(b<M?o=-8589934592:o=8589934592;Math.abs(M-b)>4294967296;)M+=o;return M}function y(M){for(var b=0;b<M.length;b++)if(M[b].key)return b;return-1}var T=function(b,o,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=o,this.size=r,this.cts=n,this.flags=new x(b)},x=function(b){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=b?2:1,this.isNonSync=b?0:1}},"./src/remux/passthrough-remuxer.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/mp4-tools.ts"),E=_("./src/loader/fragment.ts"),S=_("./src/utils/logger.ts"),s=function(){function i(){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 A=i.prototype;return A.destroy=function(){},A.resetTimeStamp=function(w){this.initPTS=w,this.lastEndDTS=null},A.resetNextTimestamp=function(){this.lastEndDTS=null},A.resetInitSegment=function(w,g,C){this.audioCodec=g,this.videoCodec=C,this.generateInitSegment(w),this.emitInitSegment=!0},A.generateInitSegment=function(w){var g=this.audioCodec,C=this.videoCodec;if(!w||!w.byteLength){this.initTracks=void 0,this.initData=void 0;return}var c=this.initData=Object(R.parseInitSegment)(w);g||(g=v(c.audio,E.ElementaryStreamTypes.AUDIO)),C||(C=v(c.video,E.ElementaryStreamTypes.VIDEO));var a={};c.audio&&c.video?a.audiovideo={container:"video/mp4",codec:g+","+C,initSegment:w,id:"main"}:c.audio?a.audio={container:"audio/mp4",codec:g,initSegment:w,id:"audio"}:c.video?a.video={container:"video/mp4",codec:C,initSegment:w,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},A.remux=function(w,g,C,c,a){var u=this.initPTS,m=this.lastEndDTS,y={audio:void 0,video:void 0,text:c,id3:C,initSegment:void 0};Object(Q.isFiniteNumber)(m)||(m=this.lastEndDTS=a||0);var T=g.samples;if(!T||!T.length)return y;var x={initPTS:void 0,timescale:1},M=this.initData;if((!M||!M.length)&&(this.generateInitSegment(T),M=this.initData),!M||!M.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),y;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1),Object(Q.isFiniteNumber)(u)||(this.initPTS=x.initPTS=u=p(M,T,m));var b=Object(R.getDuration)(T,M),o=m,r=b+o;Object(R.offsetStartDTS)(M,T,u),b>0?this.lastEndDTS=r:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var n=!!M.audio,l=!!M.video,L="";n&&(L+="audio"),l&&(L+="video");var B={data1:T,startPTS:o,startDTS:o,endPTS:r,endDTS:r,type:L,hasAudio:n,hasVideo:l,nb:1,dropped:0};return y.audio=B.type==="audio"?B:void 0,y.video=B.type!=="audio"?B:void 0,y.text=c,y.id3=C,y.initSegment=x,y},i}(),p=function(A,O,w){return Object(R.getStartDTS)(A,O)-w};function v(i,A){var O=i==null?void 0:i.codec;return O&&O.length>4?O:O==="hvc1"?"hvc1.1.c.L120.90":O==="av01"?"av01.0.04M.08":O==="avc1"||A===E.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}N.default=s},"./src/task-loop.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return Q});var Q=function(){function R(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var E=R.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(s){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,s),!0)},E.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},E.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},E.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(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(){},R}()},"./src/types/cmcd.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"CMCDVersion",function(){return Q}),_.d(N,"CMCDObjectType",function(){return R}),_.d(N,"CMCDStreamingFormat",function(){return E}),_.d(N,"CMCDStreamType",function(){return S});var Q=1,R;(function(s){s.MANIFEST="m",s.AUDIO="a",s.VIDEO="v",s.MUXED="av",s.INIT="i",s.CAPTION="c",s.TIMED_TEXT="tt",s.KEY="k",s.OTHER="o"})(R||(R={}));var E;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(E||(E={}));var S;(function(s){s.VOD="v",s.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"HlsSkip",function(){return E}),_.d(N,"getSkipValue",function(){return S}),_.d(N,"HlsUrlParameters",function(){return s}),_.d(N,"Level",function(){return p});function Q(v,i){for(var A=0;A<i.length;A++){var O=i[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}function R(v,i,A){return i&&Q(v.prototype,i),A&&Q(v,A),v}var E;(function(v){v.No="",v.Yes="YES",v.v2="v2"})(E||(E={}));function S(v,i){var A=v.canSkipUntil,O=v.canSkipDateRanges,w=v.endSN,g=i!==void 0?i-w:0;return A&&g<A?O?E.v2:E.Yes:E.No}var s=function(){function v(A,O,w){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=A,this.part=O,this.skip=w}var i=v.prototype;return i.addDirectives=function(O){var w=new self.URL(O);return this.msn!==void 0&&w.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&w.searchParams.set("_HLS_part",this.part.toString()),this.skip&&w.searchParams.set("_HLS_skip",this.skip),w.toString()},v}(),p=function(){function v(i){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=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(A){return A}).join(",").replace(/\.[^.,]+/g,"")}return R(v,[{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(A){var O=A%this.url.length;this._urlId!==O&&(this.details=void 0,this._urlId=O)}}]),v}()},"./src/types/loader.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"PlaylistContextType",function(){return Q}),_.d(N,"PlaylistLevelType",function(){return R});var Q;(function(E){E.MANIFEST="manifest",E.LEVEL="level",E.AUDIO_TRACK="audioTrack",E.SUBTITLE_TRACK="subtitleTrack"})(Q||(Q={}));var R;(function(E){E.MAIN="main",E.AUDIO="audio",E.SUBTITLE="subtitle"})(R||(R={}))},"./src/types/transmuxer.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"ChunkMetadata",function(){return Q});var Q=function(S,s,p,v,i,A){v===void 0&&(v=0),i===void 0&&(i=-1),A===void 0&&(A=!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=R(),this.buffering={audio:R(),video:R(),audiovideo:R()},this.level=S,this.sn=s,this.id=p,this.size=v,this.part=i,this.partial=A};function R(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"AttrList",function(){return E});var Q=/^(\d+)x(\d+)$/,R=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,E=function(){function S(p){typeof p=="string"&&(p=S.parseAttrList(p));for(var v in p)p.hasOwnProperty(v)&&(this[v]=p[v])}var s=S.prototype;return s.decimalInteger=function(v){var i=parseInt(this[v],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},s.hexadecimalInteger=function(v){if(this[v]){var i=(this[v]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var A=new Uint8Array(i.length/2),O=0;O<i.length/2;O++)A[O]=parseInt(i.slice(O*2,O*2+2),16);return A}else return null},s.hexadecimalIntegerAsNumber=function(v){var i=parseInt(this[v],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},s.decimalFloatingPoint=function(v){return parseFloat(this[v])},s.optionalFloat=function(v,i){var A=this[v];return A?parseFloat(A):i},s.enumeratedString=function(v){return this[v]},s.bool=function(v){return this[v]==="YES"},s.decimalResolution=function(v){var i=Q.exec(this[v]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},S.parseAttrList=function(v){var i,A={},O='"';for(R.lastIndex=0;(i=R.exec(v))!==null;){var w=i[2];w.indexOf(O)===0&&w.lastIndexOf(O)===w.length-1&&(w=w.slice(1,-1)),A[i[1]]=w}return A},S}()},"./src/utils/binary-search.ts":function(X,N,_){"use strict";_.r(N);var Q={search:function(E,S){for(var s=0,p=E.length-1,v=null,i=null;s<=p;){v=(s+p)/2|0,i=E[v];var A=S(i);if(A>0)s=v+1;else if(A<0)p=v-1;else return i}return null}};N.default=Q},"./src/utils/buffer-helper.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"BufferHelper",function(){return E});var Q=_("./src/utils/logger.ts"),R={length:0,start:function(){return 0},end:function(){return 0}},E=function(){function S(){}return S.isBuffered=function(p,v){try{if(p){for(var i=S.getBuffered(p),A=0;A<i.length;A++)if(v>=i.start(A)&&v<=i.end(A))return!0}}catch(O){}return!1},S.bufferInfo=function(p,v,i){try{if(p){var A=S.getBuffered(p),O=[],w;for(w=0;w<A.length;w++)O.push({start:A.start(w),end:A.end(w)});return this.bufferedInfo(O,v,i)}}catch(g){}return{len:0,start:v,end:v,nextStart:void 0}},S.bufferedInfo=function(p,v,i){v=Math.max(0,v),p.sort(function(x,M){var b=x.start-M.start;return b||M.end-x.end});var A=[];if(i)for(var O=0;O<p.length;O++){var w=A.length;if(w){var g=A[w-1].end;p[O].start-g<i?p[O].end>g&&(A[w-1].end=p[O].end):A.push(p[O])}else A.push(p[O])}else A=p;for(var C=0,c,a=v,u=v,m=0;m<A.length;m++){var y=A[m].start,T=A[m].end;if(v+i>=y&&v<T)a=y,u=T,C=u-v;else if(v+i<y){c=y;break}}return{len:C,start:a||0,end:u||0,nextStart:c}},S.getBuffered=function(p){try{return p.buffered}catch(v){return Q.logger.log("failed to get media.buffered",v),R}},S}()},"./src/utils/cea-608-parser.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"Row",function(){return u}),_.d(N,"CaptionScreen",function(){return m});var Q=_("./src/utils/logger.ts"),R={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},E=function(r){var n=r;return R.hasOwnProperty(r)&&(n=R[r]),String.fromCharCode(n)},S=15,s=100,p={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},v={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},A={25:2,26:4,29:6,30:8,31:10,27:13,28:15},O=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],w;(function(o){o[o.ERROR=0]="ERROR",o[o.TEXT=1]="TEXT",o[o.WARNING=2]="WARNING",o[o.INFO=2]="INFO",o[o.DEBUG=3]="DEBUG",o[o.DATA=3]="DATA"})(w||(w={}));var g=function(){function o(){this.time=null,this.verboseLevel=w.ERROR}var r=o.prototype;return r.log=function(l,L){this.verboseLevel>=l&&Q.logger.log(this.time+" ["+l+"] "+L)},o}(),C=function(r){for(var n=[],l=0;l<r.length;l++)n.push(r[l].toString(16));return n},c=function(){function o(n,l,L,B,h){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=n||"white",this.underline=l||!1,this.italics=L||!1,this.background=B||"black",this.flash=h||!1}var r=o.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(l){for(var L=["foreground","underline","italics","background","flash"],B=0;B<L.length;B++){var h=L[B];l.hasOwnProperty(h)&&(this[h]=l[h])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},r.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},o}(),a=function(){function o(n,l,L,B,h,I){this.uchar=void 0,this.penState=void 0,this.uchar=n||" ",this.penState=new c(l,L,B,h,I)}var r=o.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(l,L){this.uchar=l,this.penState.copy(L)},r.setPenState=function(l){this.penState.copy(l)},r.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},r.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},o}(),u=function(){function o(n){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<s;l++)this.chars.push(new a);this.logger=n,this.pos=0,this.currPenState=new c}var r=o.prototype;return r.equals=function(l){for(var L=!0,B=0;B<s;B++)if(!this.chars[B].equals(l.chars[B])){L=!1;break}return L},r.copy=function(l){for(var L=0;L<s;L++)this.chars[L].copy(l.chars[L])},r.isEmpty=function(){for(var l=!0,L=0;L<s;L++)if(!this.chars[L].isEmpty()){l=!1;break}return l},r.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(w.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>s&&(this.logger.log(w.DEBUG,"Too large cursor position "+this.pos),this.pos=s)},r.moveCursor=function(l){var L=this.pos+l;if(l>1)for(var B=this.pos+1;B<L+1;B++)this.chars[B].setPenState(this.currPenState);this.setCursor(L)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(l){l>=144&&this.backSpace();var L=E(l);if(this.pos>=s){this.logger.log(w.ERROR,"Cannot insert "+l.toString(16)+" ("+L+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(L,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(l){var L;for(L=l;L<s;L++)this.chars[L].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var l=[],L=!0,B=0;B<s;B++){var h=this.chars[B].uchar;h!==" "&&(L=!1),l.push(h)}return L?"":l.join("")},r.setPenStyles=function(l){this.currPenState.setStyles(l);var L=this.chars[this.pos];L.setPenState(this.currPenState)},o}(),m=function(){function o(n){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<S;l++)this.rows.push(new u(n));this.logger=n,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=o.prototype;return r.reset=function(){for(var l=0;l<S;l++)this.rows[l].clear();this.currRow=S-1},r.equals=function(l){for(var L=!0,B=0;B<S;B++)if(!this.rows[B].equals(l.rows[B])){L=!1;break}return L},r.copy=function(l){for(var L=0;L<S;L++)this.rows[L].copy(l.rows[L])},r.isEmpty=function(){for(var l=!0,L=0;L<S;L++)if(!this.rows[L].isEmpty()){l=!1;break}return l},r.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},r.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},r.insertChar=function(l){var L=this.rows[this.currRow];L.insertChar(l)},r.setPen=function(l){var L=this.rows[this.currRow];L.setPenStyles(l)},r.moveCursor=function(l){var L=this.rows[this.currRow];L.moveCursor(l)},r.setCursor=function(l){this.logger.log(w.INFO,"setCursor: "+l);var L=this.rows[this.currRow];L.setCursor(l)},r.setPAC=function(l){this.logger.log(w.INFO,"pacData = "+JSON.stringify(l));var L=l.row-1;if(this.nrRollUpRows&&L<this.nrRollUpRows-1&&(L=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==L){for(var B=0;B<S;B++)this.rows[B].clear();var h=this.currRow+1-this.nrRollUpRows,I=this.lastOutputScreen;if(I){var H=I.rows[h].cueStartTime,z=this.logger.time;if(H&&z!==null&&H<z)for(var Z=0;Z<this.nrRollUpRows;Z++)this.rows[L-this.nrRollUpRows+Z+1].copy(I.rows[h+Z])}}this.currRow=L;var Y=this.rows[this.currRow];if(l.indent!==null){var G=l.indent,ee=Math.max(G-1,0);Y.setCursor(l.indent),l.color=Y.chars[ee].penState.foreground}var J={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(J)},r.setBkgData=function(l){this.logger.log(w.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},r.setRollUpRows=function(l){this.nrRollUpRows=l},r.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(w.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(w.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,L=this.rows.splice(l,1)[0];L.clear(),this.rows.splice(this.currRow,0,L),this.logger.log(w.INFO,"Rolling up")},r.getDisplayText=function(l){l=l||!1;for(var L=[],B="",h=-1,I=0;I<S;I++){var H=this.rows[I].getTextString();H&&(h=I+1,l?L.push("Row "+h+": '"+H+"'"):L.push(H.trim()))}return L.length>0&&(l?B="["+L.join(" | ")+"]":B=L.join(`
|
|
`)),B},r.getTextAndFormat=function(){return this.rows},o}(),y=function(){function o(n,l,L){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=n,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new m(L),this.nonDisplayedMemory=new m(L),this.lastOutputScreen=new m(L),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=L}var r=o.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(l){this.outputFilter=l},r.setPAC=function(l){this.writeScreen.setPAC(l)},r.setBkgData=function(l){this.writeScreen.setBkgData(l)},r.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(w.INFO,"MODE="+l),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=l},r.insertChars=function(l){for(var L=0;L<l.length;L++)this.writeScreen.insertChar(l[L]);var B=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(w.INFO,B+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(w.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(w.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){if(this.logger.log(w.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(w.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(l){this.logger.log(w.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},r.ccFON=function(){this.logger.log(w.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(w.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(w.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(w.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(w.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(w.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(w.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){if(this.logger.log(w.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(w.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},r.ccTO=function(l){this.logger.log(w.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},r.ccMIDROW=function(l){var L={flash:!1};if(L.underline=l%2===1,L.italics=l>=46,L.italics)L.foreground="white";else{var B=Math.floor(l/2)-16,h=["white","green","blue","cyan","red","yellow","magenta"];L.foreground=h[B]}this.logger.log(w.INFO,"MIDROW: "+JSON.stringify(L)),this.writeScreen.setPen(L)},r.outputDataUpdate=function(l){l===void 0&&(l=!1);var L=this.logger.time;if(L===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=L:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,L,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:L),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},o}(),T=function(){function o(n,l,L){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var B=new g;this.channels=[null,new y(n,l,B),new y(n+1,L,B)],this.cmdHistory=b(),this.logger=B}var r=o.prototype;return r.getHandler=function(l){return this.channels[l].getHandler()},r.setHandler=function(l,L){this.channels[l].setHandler(L)},r.addData=function(l,L){var B,h,I,H=!1;this.logger.time=l;for(var z=0;z<L.length;z+=2){if(h=L[z]&127,I=L[z+1]&127,h===0&&I===0)continue;if(this.logger.log(w.DATA,"["+C([L[z],L[z+1]])+"] -> ("+C([h,I])+")"),B=this.parseCmd(h,I),B||(B=this.parseMidrow(h,I)),B||(B=this.parsePAC(h,I)),B||(B=this.parseBackgroundAttributes(h,I)),!B&&(H=this.parseChars(h,I),H)){var Z=this.currentChannel;if(Z&&Z>0){var Y=this.channels[Z];Y.insertChars(H)}else this.logger.log(w.WARNING,"No channel found yet. TEXT-MODE?")}!B&&!H&&this.logger.log(w.WARNING,"Couldn't parse cleaned data "+C([h,I])+" orig: "+C([L[z],L[z+1]]))}},r.parseCmd=function(l,L){var B=this.cmdHistory,h=(l===20||l===28||l===21||l===29)&&L>=32&&L<=47,I=(l===23||l===31)&&L>=33&&L<=35;if(!(h||I))return!1;if(M(l,L,B))return x(null,null,B),this.logger.log(w.DEBUG,"Repeated command ("+C([l,L])+") is dropped"),!0;var H=l===20||l===21||l===23?1:2,z=this.channels[H];return l===20||l===21||l===28||l===29?L===32?z.ccRCL():L===33?z.ccBS():L===34?z.ccAOF():L===35?z.ccAON():L===36?z.ccDER():L===37?z.ccRU(2):L===38?z.ccRU(3):L===39?z.ccRU(4):L===40?z.ccFON():L===41?z.ccRDC():L===42?z.ccTR():L===43?z.ccRTD():L===44?z.ccEDM():L===45?z.ccCR():L===46?z.ccENM():L===47&&z.ccEOC():z.ccTO(L-32),x(l,L,B),this.currentChannel=H,!0},r.parseMidrow=function(l,L){var B=0;if((l===17||l===25)&&L>=32&&L<=47){if(l===17?B=1:B=2,B!==this.currentChannel)return this.logger.log(w.ERROR,"Mismatch channel in midrow parsing"),!1;var h=this.channels[B];return h?(h.ccMIDROW(L),this.logger.log(w.DEBUG,"MIDROW ("+C([l,L])+")"),!0):!1}return!1},r.parsePAC=function(l,L){var B,h=this.cmdHistory,I=(l>=17&&l<=23||l>=25&&l<=31)&&L>=64&&L<=127,H=(l===16||l===24)&&L>=64&&L<=95;if(!(I||H))return!1;if(M(l,L,h))return x(null,null,h),!0;var z=l<=23?1:2;L>=64&&L<=95?B=z===1?p[l]:i[l]:B=z===1?v[l]:A[l];var Z=this.channels[z];return Z?(Z.setPAC(this.interpretPAC(B,L)),x(l,L,h),this.currentChannel=z,!0):!1},r.interpretPAC=function(l,L){var B,h={color:null,italics:!1,indent:null,underline:!1,row:l};return L>95?B=L-96:B=L-64,h.underline=(B&1)===1,B<=13?h.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(B/2)]:B<=15?(h.italics=!0,h.color="white"):h.indent=Math.floor((B-16)/2)*4,h},r.parseChars=function(l,L){var B,h=null,I=null;if(l>=25?(B=2,I=l-8):(B=1,I=l),I>=17&&I<=19){var H;I===17?H=L+80:I===18?H=L+112:H=L+144,this.logger.log(w.INFO,"Special char '"+E(H)+"' in channel "+B),h=[H]}else l>=32&&l<=127&&(h=L===0?[l]:[l,L]);if(h){var z=C(h);this.logger.log(w.DEBUG,"Char codes = "+z.join(",")),x(l,L,this.cmdHistory)}return h},r.parseBackgroundAttributes=function(l,L){var B=(l===16||l===24)&&L>=32&&L<=47,h=(l===23||l===31)&&L>=45&&L<=47;if(!(B||h))return!1;var I,H={};l===16||l===24?(I=Math.floor((L-32)/2),H.background=O[I],L%2===1&&(H.background=H.background+"_semi")):L===45?H.background="transparent":(H.foreground="black",L===47&&(H.underline=!0));var z=l<=23?1:2,Z=this.channels[z];return Z.setBkgData(H),x(l,L,this.cmdHistory),!0},r.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var L=this.channels[l];L&&L.reset()}this.cmdHistory=b()},r.cueSplitAtTime=function(l){for(var L=0;L<this.channels.length;L++){var B=this.channels[L];B&&B.cueSplitAtTime(l)}},o}();function x(o,r,n){n.a=o,n.b=r}function M(o,r,n){return n.a===o&&n.b===r}function b(){return{a:null,b:null}}N.default=T},"./src/utils/codecs.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"isCodecType",function(){return R}),_.d(N,"isCodecSupportedInMp4",function(){return E});var Q={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 R(S,s){var p=Q[s];return!!p&&p[S.slice(0,4)]===!0}function E(S,s){return MediaSource.isTypeSupported((s||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/utils/vttparser.ts"),R=_("./src/utils/webvtt-parser.ts"),E=_("./src/utils/texttrack-utils.ts"),S=/\s/,s={newCue:function(v,i,A,O){for(var w=[],g,C,c,a,u,m=self.VTTCue||self.TextTrackCue,y=0;y<O.rows.length;y++)if(g=O.rows[y],c=!0,a=0,u="",!g.isEmpty()){for(var T=0;T<g.chars.length;T++)S.test(g.chars[T].uchar)&&c?a++:(u+=g.chars[T].uchar,c=!1);g.cueStartTime=i,i===A&&(A+=1e-4),a>=16?a--:a++;var x=Object(Q.fixLineBreaks)(u.trim()),M=Object(R.generateCueId)(i,A,x);(!v||!v.cues||!v.cues.getCueById(M))&&(C=new m(i,A,x),C.id=M,C.line=y+1,C.align="left",C.position=10+Math.min(80,Math.floor(a*8/32)*10),w.push(C))}return v&&w.length&&(w.sort(function(b,o){return b.line==="auto"||o.line==="auto"?0:b.line>8&&o.line>8?o.line-b.line:b.line-o.line}),w.forEach(function(b){return Object(E.addCueToTrack)(v,b)})),w}};N.default=s},"./src/utils/discontinuities.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"findFirstFragWithCC",function(){return S}),_.d(N,"shouldAlignOnDiscontinuities",function(){return s}),_.d(N,"findDiscontinuousReferenceFrag",function(){return p}),_.d(N,"adjustSlidingStart",function(){return i}),_.d(N,"alignStream",function(){return A}),_.d(N,"alignPDT",function(){return w}),_.d(N,"alignFragmentByPDTDelta",function(){return g}),_.d(N,"alignMediaPlaylistByPDT",function(){return C});var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/logger.ts"),E=_("./src/controller/level-helper.ts");function S(c,a){for(var u=null,m=0,y=c.length;m<y;m++){var T=c[m];if(T&&T.cc===a){u=T;break}}return u}function s(c,a,u){return!!(a.details&&(u.endCC>u.startCC||c&&c.cc<u.startCC))}function p(c,a){var u=c.fragments,m=a.fragments;if(!m.length||!u.length){R.logger.log("No fragments to align");return}var y=S(u,m[0].cc);if(!y||y&&!y.startPTS){R.logger.log("No frag in previous level to align on");return}return y}function v(c,a){if(c){var u=c.start+a;c.start=c.startPTS=u,c.endPTS=u+c.duration}}function i(c,a){for(var u=a.fragments,m=0,y=u.length;m<y;m++)v(u[m],c);a.fragmentHint&&v(a.fragmentHint,c),a.alignedSliding=!0}function A(c,a,u){if(!a)return;O(c,u,a),!u.alignedSliding&&a.details&&w(u,a.details),!u.alignedSliding&&a.details&&!u.skippedSegments&&Object(E.adjustSliding)(a.details,u)}function O(c,a,u){if(s(c,u,a)){var m=p(u.details,a);m&&Object(Q.isFiniteNumber)(m.start)&&(R.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),i(m.start,a))}}function w(c,a){if(!a.fragments.length||!c.hasProgramDateTime||!a.hasProgramDateTime)return;var u=a.fragments[0].programDateTime,m=c.fragments[0].programDateTime,y=(m-u)/1e3+a.fragments[0].start;y&&Object(Q.isFiniteNumber)(y)&&(R.logger.log("Adjusting PTS using programDateTime delta "+(m-u)+"ms, sliding:"+y.toFixed(3)+" "+c.url+" "),i(y,c))}function g(c,a){var u=c.programDateTime;if(!u)return;var m=(u-a)/1e3;c.start=c.startPTS=m,c.endPTS=m+c.duration}function C(c,a){if(!a.fragments.length||!c.hasProgramDateTime||!a.hasProgramDateTime)return;var u=a.fragments[0].programDateTime,m=a.fragments[0].start,y=u-m*1e3;c.fragments.forEach(function(T){g(T,y)}),c.fragmentHint&&g(c.fragmentHint,y),c.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/utils/ewma.ts"),R=function(){function E(s,p,v){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=v,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Q.default(s),this.fast_=new Q.default(p)}var S=E.prototype;return S.update=function(p,v){var i=this.slow_,A=this.fast_;this.slow_.halfLife!==p&&(this.slow_=new Q.default(p,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==v&&(this.fast_=new Q.default(v,A.getEstimate(),A.getTotalWeight()))},S.sample=function(p,v){p=Math.max(p,this.minDelayMs_);var i=8*v,A=p/1e3,O=i/A;this.fast_.sample(A,O),this.slow_.sample(A,O)},S.canEstimate=function(){var p=this.fast_;return p&&p.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},E}();N.default=R},"./src/utils/ewma.ts":function(X,N,_){"use strict";_.r(N);var Q=function(){function R(S,s,p){s===void 0&&(s=0),p===void 0&&(p=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=s,this.totalWeight_=p}var E=R.prototype;return E.sample=function(s,p){var v=Math.pow(this.alpha_,s);this.estimate_=p*(1-v)+v*this.estimate_,this.totalWeight_+=s},E.getTotalWeight=function(){return this.totalWeight_},E.getEstimate=function(){if(this.alpha_){var s=1-Math.pow(this.alpha_,this.totalWeight_);if(s)return this.estimate_/s}return this.estimate_},R}();N.default=Q},"./src/utils/fetch-loader.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"fetchSupported",function(){return g});var Q=_("./src/polyfills/number.ts"),R=_("./src/loader/load-stats.ts"),E=_("./src/demux/chunk-cache.ts");function S(m,y){m.prototype=Object.create(y.prototype),m.prototype.constructor=m,A(m,y)}function s(m){var y=typeof Map=="function"?new Map:void 0;return s=function(x){if(x===null||!i(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(x))return y.get(x);y.set(x,M)}function M(){return p(x,arguments,O(this).constructor)}return M.prototype=Object.create(x.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),A(M,x)},s(m)}function p(m,y,T){return v()?p=Reflect.construct:p=function(M,b,o){var r=[null];r.push.apply(r,b);var n=Function.bind.apply(M,r),l=new n;return o&&A(l,o.prototype),l},p.apply(null,arguments)}function v(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(m){return!1}}function i(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function A(m,y){return A=Object.setPrototypeOf||function(x,M){return x.__proto__=M,x},A(m,y)}function O(m){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},O(m)}function w(){return w=Object.assign||function(m){for(var y=1;y<arguments.length;y++){var T=arguments[y];for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(m[x]=T[x])}return m},w.apply(this,arguments)}function g(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(m){}return!1}var C=function(){function m(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||a,this.controller=new self.AbortController,this.stats=new R.LoadStats}var y=m.prototype;return y.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},y.abortInternal=function(){var x=this.response;(!x||!x.ok)&&(this.stats.aborted=!0,this.controller.abort())},y.abort=function(){var x;this.abortInternal(),(x=this.callbacks)!==null&&x!==void 0&&x.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},y.load=function(x,M,b){var o=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var n=c(x,this.controller.signal),l=b.onProgress,L=x.responseType==="arraybuffer",B=L?"byteLength":"length";this.context=x,this.config=M,this.callbacks=b,this.request=this.fetchSetup(x,n),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){o.abortInternal(),b.onTimeout(r,x,o.response)},M.timeout),self.fetch(this.request).then(function(h){if(o.response=o.loader=h,!h.ok){var I=h.status,H=h.statusText;throw new u(H||"fetch, bad network response",I,h)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(h.headers.get("Content-Length")||"0"),l&&Object(Q.isFiniteNumber)(M.highWaterMark)?o.loadProgressively(h,r,x,M.highWaterMark,l):L?h.arrayBuffer():h.text()}).then(function(h){var I=o.response;self.clearTimeout(o.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first),r.loaded=r.total=h[B];var H={url:I.url,data:h};l&&!Object(Q.isFiniteNumber)(M.highWaterMark)&&l(r,x,h,I),b.onSuccess(H,r,x,I)}).catch(function(h){if(self.clearTimeout(o.requestTimeout),r.aborted)return;var I=h.code||0;b.onError({code:I,text:h.message},x,h.details)})},y.getCacheAge=function(){var x=null;if(this.response){var M=this.response.headers.get("age");x=M?parseFloat(M):null}return x},y.loadProgressively=function(x,M,b,o,r){o===void 0&&(o=0);var n=new E.default,l=x.body.getReader(),L=function B(){return l.read().then(function(h){if(h.done)return n.dataLength&&r(M,b,n.flush(),x),Promise.resolve(new ArrayBuffer(0));var I=h.value,H=I.length;return M.loaded+=H,H<o||n.dataLength?(n.push(I),n.dataLength>=o&&r(M,b,n.flush(),x)):r(M,b,I,x),B()}).catch(function(){return Promise.reject()})};return L()},m}();function c(m,y){var T={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(w({},m.headers))};return m.rangeEnd&&T.headers.set("Range","bytes="+m.rangeStart+"-"+String(m.rangeEnd-1)),T}function a(m,y){return new self.Request(m.url,y)}var u=function(m){S(y,m);function y(T,x,M){var b;return b=m.call(this,T)||this,b.code=void 0,b.details=void 0,b.code=x,b.details=M,b}return y}(s(Error));N.default=C},"./src/utils/imsc1-ttml-parser.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"IMSC1_CODEC",function(){return i}),_.d(N,"parseIMSC1",function(){return g});var Q=_("./src/utils/mp4-tools.ts"),R=_("./src/utils/vttparser.ts"),E=_("./src/utils/vttcue.ts"),S=_("./src/demux/id3.ts"),s=_("./src/utils/timescale-conversion.ts"),p=_("./src/utils/webvtt-parser.ts");function v(){return v=Object.assign||function(o){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(o[l]=n[l])}return o},v.apply(this,arguments)}var i="stpp.ttml.im1t",A=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,O=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,w={left:"start",center:"center",right:"end",start:"start",end:"end"};function g(o,r,n,l,L){var B=Object(Q.findBox)(new Uint8Array(o),["mdat"]);if(B.length===0){L(new Error("Could not parse IMSC1 mdat"));return}var h=B[0],I=Object(S.utf8ArrayToStr)(new Uint8Array(o,h.start,h.end-h.start)),H=Object(s.toTimescaleFromScale)(r,1,n);try{l(C(I,H))}catch(z){L(z)}}function C(o,r){var n=new DOMParser,l=n.parseFromString(o,"text/xml"),L=l.getElementsByTagName("tt")[0];if(!L)throw new Error("Invalid ttml");var B={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},h=Object.keys(B).reduce(function(Y,G){return Y[G]=L.getAttribute("ttp:"+G)||B[G],Y},{}),I=L.getAttribute("xml:space")!=="preserve",H=a(c(L,"styling","style")),z=a(c(L,"layout","region")),Z=c(L,"body","[begin]");return[].map.call(Z,function(Y){var G=u(Y,I);if(!G||!Y.hasAttribute("begin"))return null;var ee=x(Y.getAttribute("begin"),h),J=x(Y.getAttribute("dur"),h),oe=x(Y.getAttribute("end"),h);if(ee===null)throw T(Y);if(oe===null){if(J===null)throw T(Y);oe=ee+J}var se=new E.default(ee-r,oe-r,G);se.id=Object(p.generateCueId)(se.startTime,se.endTime,se.text);var Te=z[Y.getAttribute("region")],be=H[Y.getAttribute("style")];se.position=10,se.size=80;var xe=m(Te,be),Oe=xe.textAlign;if(Oe){var Ne=w[Oe];Ne&&(se.lineAlign=Ne),se.align=Oe}return v(se,xe),se}).filter(function(Y){return Y!==null})}function c(o,r,n){var l=o.getElementsByTagName(r)[0];return l?[].slice.call(l.querySelectorAll(n)):[]}function a(o){return o.reduce(function(r,n){var l=n.getAttribute("xml:id");return l&&(r[l]=n),r},{})}function u(o,r){return[].slice.call(o.childNodes).reduce(function(n,l,L){var B;return l.nodeName==="br"&&L?n+`
|
|
`:(B=l.childNodes)!==null&&B!==void 0&&B.length?u(l,r):r?n+l.textContent.trim().replace(/\s+/g," "):n+l.textContent},"")}function m(o,r){var n="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(L,B){var h=y(r,n,B)||y(o,n,B);return h&&(L[B]=h),L},{})}function y(o,r,n){return o.hasAttributeNS(r,n)?o.getAttributeNS(r,n):null}function T(o){return new Error("Could not parse ttml timestamp "+o)}function x(o,r){if(!o)return null;var n=Object(R.parseTimeStamp)(o);return n===null&&(A.test(o)?n=M(o,r):O.test(o)&&(n=b(o,r))),n}function M(o,r){var n=A.exec(o),l=(n[4]|0)+(n[5]|0)/r.subFrameRate;return(n[1]|0)*3600+(n[2]|0)*60+(n[3]|0)+l/r.frameRate}function b(o,r){var n=O.exec(o),l=Number(n[1]),L=n[2];switch(L){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/r.frameRate;case"t":return l/r.tickRate}return l}},"./src/utils/logger.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"enableLogs",function(){return p}),_.d(N,"logger",function(){return v});var Q=function(){},R={trace:Q,debug:Q,log:Q,warn:Q,info:Q,error:Q},E=R;function S(i){var A=self.console[i];return A?A.bind(self.console,"["+i+"] >"):Q}function s(i){for(var A=arguments.length,O=new Array(A>1?A-1:0),w=1;w<A;w++)O[w-1]=arguments[w];O.forEach(function(g){E[g]=i[g]?i[g].bind(i):S(g)})}function p(i){if(self.console&&i===!0||typeof i=="object"){s(i,"debug","log","info","warn","error");try{E.log()}catch(A){E=R}}else E=R}var v=E},"./src/utils/mediakeys-helper.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"KeySystems",function(){return Q}),_.d(N,"requestMediaKeySystemAccess",function(){return R});var Q;(function(E){E.WIDEVINE="com.widevine.alpha",E.PLAYREADY="com.microsoft.playready"})(Q||(Q={}));var R=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"getMediaSource",function(){return Q});function Q(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"bin2str",function(){return s}),_.d(N,"readUint16",function(){return p}),_.d(N,"readUint32",function(){return v}),_.d(N,"writeUint32",function(){return i}),_.d(N,"findBox",function(){return A}),_.d(N,"parseSegmentIndex",function(){return O}),_.d(N,"parseInitSegment",function(){return w}),_.d(N,"getStartDTS",function(){return g}),_.d(N,"getDuration",function(){return C}),_.d(N,"computeRawDurationFromSamples",function(){return c}),_.d(N,"offsetStartDTS",function(){return a}),_.d(N,"segmentValidRange",function(){return u}),_.d(N,"appendUint8Array",function(){return m});var Q=_("./src/utils/typed-array.ts"),R=_("./src/loader/fragment.ts"),E=Math.pow(2,32)-1,S=[].push;function s(y){return String.fromCharCode.apply(null,y)}function p(y,T){"data"in y&&(T+=y.start,y=y.data);var x=y[T]<<8|y[T+1];return x<0?65536+x:x}function v(y,T){"data"in y&&(T+=y.start,y=y.data);var x=y[T]<<24|y[T+1]<<16|y[T+2]<<8|y[T+3];return x<0?4294967296+x:x}function i(y,T,x){"data"in y&&(T+=y.start,y=y.data),y[T]=x>>24,y[T+1]=x>>16&255,y[T+2]=x>>8&255,y[T+3]=x&255}function A(y,T){var x=[];if(!T.length)return x;var M,b,o;"data"in y?(M=y.data,b=y.start,o=y.end):(M=y,b=0,o=M.byteLength);for(var r=b;r<o;){var n=v(M,r),l=s(M.subarray(r+4,r+8)),L=n>1?r+n:o;if(l===T[0])if(T.length===1)x.push({data:M,start:r+8,end:L});else{var B=A({data:M,start:r+8,end:L},T.slice(1));B.length&&S.apply(x,B)}r=L}return x}function O(y){var T=A(y,["moov"]),x=T[0],M=x?x.end:null,b=A(y,["sidx"]);if(!b||!b[0])return null;var o=[],r=b[0],n=r.data[0],l=n===0?8:16,L=v(r,l);l+=4;var B=0,h=0;n===0?l+=8:l+=16,l+=2;var I=r.end+h,H=p(r,l);l+=2;for(var z=0;z<H;z++){var Z=l,Y=v(r,Z);Z+=4;var G=Y&2147483647,ee=(Y&2147483648)>>>31;if(ee===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=v(r,Z);Z+=4,o.push({referenceSize:G,subsegmentDuration:J,info:{duration:J/L,start:I,end:I+G-1}}),I+=G,Z+=4,l=Z}return{earliestPresentationTime:B,timescale:L,version:n,referencesCount:H,references:o,moovEndOffset:M}}function w(y){for(var T=[],x=A(y,["moov","trak"]),M=0;M<x.length;M++){var b=x[M],o=A(b,["tkhd"])[0];if(o){var r=o.data[o.start],n=r===0?12:20,l=v(o,n),L=A(b,["mdia","mdhd"])[0];if(L){r=L.data[L.start],n=r===0?12:20;var B=v(L,n),h=A(b,["mdia","hdlr"])[0];if(h){var I=s(h.data.subarray(h.start+8,h.start+12)),H={soun:R.ElementaryStreamTypes.AUDIO,vide:R.ElementaryStreamTypes.VIDEO}[I];if(H){var z=A(b,["mdia","minf","stbl","stsd"])[0],Z=void 0;z&&(Z=s(z.data.subarray(z.start+12,z.start+16))),T[l]={timescale:B,type:H},T[H]={timescale:B,id:l,codec:Z}}}}}}var Y=A(y,["moov","mvex","trex"]);return Y.forEach(function(G){var ee=v(G,4),J=T[ee];J&&(J.default={duration:v(G,12),flags:v(G,20)})}),T}function g(y,T){return A(T,["moof","traf"]).reduce(function(x,M){var b=A(M,["tfdt"])[0],o=b.data[b.start],r=A(M,["tfhd"]).reduce(function(n,l){var L=v(l,4),B=y[L];if(B){var h=v(b,4);o===1&&(h*=Math.pow(2,32),h+=v(b,8));var I=B.timescale||9e4,H=h/I;if(isFinite(H)&&(n===null||H<n))return H}return n},null);return r!==null&&isFinite(r)&&(x===null||r<x)?r:x},null)||0}function C(y,T){for(var x=0,M=0,b=0,o=A(y,["moof","traf"]),r=0;r<o.length;r++){var n=o[r],l=A(n,["tfhd"])[0],L=v(l,4),B=T[L];if(!B)continue;var h=B.default,I=v(l,0)|(h==null?void 0:h.flags),H=h==null?void 0:h.duration;I&8&&(I&2?H=v(l,12):H=v(l,8));for(var z=B.timescale||9e4,Z=A(n,["trun"]),Y=0;Y<Z.length;Y++){if(H){var G=v(Z[Y],4);x=H*G}else x=c(Z[Y]);B.type===R.ElementaryStreamTypes.VIDEO?M+=x/z:B.type===R.ElementaryStreamTypes.AUDIO&&(b+=x/z)}}if(M===0&&b===0){var ee=O(y);if(ee!=null&&ee.references)return ee.references.reduce(function(J,oe){return J+oe.info.duration||0},0)}return M||b}function c(y){var T=v(y,0),x=8;T&1&&(x+=4),T&4&&(x+=4);for(var M=0,b=v(y,4),o=0;o<b;o++){if(T&256){var r=v(y,x);M+=r,x+=4}T&512&&(x+=4),T&1024&&(x+=4),T&2048&&(x+=4)}return M}function a(y,T,x){A(T,["moof","traf"]).forEach(function(M){A(M,["tfhd"]).forEach(function(b){var o=v(b,4),r=y[o];if(!r)return;var n=r.timescale||9e4;A(M,["tfdt"]).forEach(function(l){var L=l.data[l.start],B=v(l,4);if(L===0)i(l,4,B-x*n);else{B*=Math.pow(2,32),B+=v(l,8),B-=x*n,B=Math.max(B,0);var h=Math.floor(B/(E+1)),I=Math.floor(B%(E+1));i(l,4,h),i(l,8,I)}})})})}function u(y){var T={valid:null,remainder:null},x=A(y,["moof"]);if(x){if(x.length<2)return T.remainder=y,T}else return T;var M=x[x.length-1];return T.valid=Object(Q.sliceUint8)(y,0,M.start-8),T.remainder=Object(Q.sliceUint8)(y,M.start-8),T}function m(y,T){var x=new Uint8Array(y.length+T.length);return x.set(y),x.set(T,y.length),x}},"./src/utils/output-filter.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"default",function(){return Q});var Q=function(){function R(S,s){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=s}var E=R.prototype;return E.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},E.newCue=function(s,p,v){(this.startTime===null||this.startTime>s)&&(this.startTime=s),this.endTime=p,this.screen=v,this.timelineController.createCaptionsTrack(this.trackName)},E.reset=function(){this.cueRanges=[]},R}()},"./src/utils/texttrack-utils.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"sendAddTrackEvent",function(){return R}),_.d(N,"addCueToTrack",function(){return E}),_.d(N,"clearCurrentCues",function(){return S}),_.d(N,"removeCuesInRange",function(){return s}),_.d(N,"getCuesInRange",function(){return v});var Q=_("./src/utils/logger.ts");function R(i,A){var O;try{O=new Event("addtrack")}catch(w){O=document.createEvent("Event"),O.initEvent("addtrack",!1,!1)}O.track=i,A.dispatchEvent(O)}function E(i,A){var O=i.mode;if(O==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(A.id))try{if(i.addCue(A),!i.cues.getCueById(A.id))throw new Error("addCue is failed for: "+A)}catch(g){Q.logger.debug("[texttrack-utils]: "+g);var w=new self.TextTrackCue(A.startTime,A.endTime,A.text);w.id=A.id,i.addCue(w)}O==="disabled"&&(i.mode=O)}function S(i){var A=i.mode;if(A==="disabled"&&(i.mode="hidden"),i.cues)for(var O=i.cues.length;O--;)i.removeCue(i.cues[O]);A==="disabled"&&(i.mode=A)}function s(i,A,O){var w=i.mode;if(w==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var g=v(i.cues,A,O),C=0;C<g.length;C++)i.removeCue(g[C]);w==="disabled"&&(i.mode=w)}function p(i,A){if(A<i[0].startTime)return 0;var O=i.length-1;if(A>i[O].endTime)return-1;for(var w=0,g=O;w<=g;){var C=Math.floor((g+w)/2);if(A<i[C].startTime)g=C-1;else if(A>i[C].startTime&&w<O)w=C+1;else return C}return i[w].startTime-A<A-i[g].startTime?w:g}function v(i,A,O){var w=[],g=p(i,A);if(g>-1)for(var C=g,c=i.length;C<c;C++){var a=i[C];if(a.startTime>=A&&a.endTime<=O)w.push(a);else if(a.startTime>O)return w}return w}},"./src/utils/time-ranges.ts":function(X,N,_){"use strict";_.r(N);var Q={toString:function(E){for(var S="",s=E.length,p=0;p<s;p++)S+="["+E.start(p).toFixed(3)+","+E.end(p).toFixed(3)+"]";return S}};N.default=Q},"./src/utils/timescale-conversion.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"toTimescaleFromBase",function(){return R}),_.d(N,"toTimescaleFromScale",function(){return E}),_.d(N,"toMsFromMpegTsClock",function(){return S}),_.d(N,"toMpegTsClockFromTimescale",function(){return s});var Q=9e4;function R(p,v,i,A){i===void 0&&(i=1),A===void 0&&(A=!1);var O=p*v*i;return A?Math.round(O):O}function E(p,v,i,A){return i===void 0&&(i=1),A===void 0&&(A=!1),R(p,v,1/i,A)}function S(p,v){return v===void 0&&(v=!1),R(p,1e3,1/Q,v)}function s(p,v){return v===void 0&&(v=1),R(p,Q,1/v)}},"./src/utils/typed-array.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"sliceUint8",function(){return Q});function Q(R,E,S){return Uint8Array.prototype.slice?R.slice(E,S):new Uint8Array(Array.prototype.slice.call(R,E,S))}},"./src/utils/vttcue.ts":function(X,N,_){"use strict";_.r(N),N.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Q=["","lr","rl"],R=["start","middle","end","left","right"];function E(i,A){if(typeof A!="string")return!1;if(!Array.isArray(i))return!1;var O=A.toLowerCase();return~i.indexOf(O)?O:!1}function S(i){return E(Q,i)}function s(i){return E(R,i)}function p(i){for(var A=arguments.length,O=new Array(A>1?A-1:0),w=1;w<A;w++)O[w-1]=arguments[w];for(var g=1;g<arguments.length;g++){var C=arguments[g];for(var c in C)i[c]=C[c]}return i}function v(i,A,O){var w=this,g={enumerable:!0};w.hasBeenReset=!1;var C="",c=!1,a=i,u=A,m=O,y=null,T="",x=!0,M="auto",b="start",o=50,r="middle",n=50,l="middle";Object.defineProperty(w,"id",p({},g,{get:function(){return C},set:function(B){C=""+B}})),Object.defineProperty(w,"pauseOnExit",p({},g,{get:function(){return c},set:function(B){c=!!B}})),Object.defineProperty(w,"startTime",p({},g,{get:function(){return a},set:function(B){if(typeof B!="number")throw new TypeError("Start time must be set to a number.");a=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"endTime",p({},g,{get:function(){return u},set:function(B){if(typeof B!="number")throw new TypeError("End time must be set to a number.");u=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"text",p({},g,{get:function(){return m},set:function(B){m=""+B,this.hasBeenReset=!0}})),Object.defineProperty(w,"region",p({},g,{get:function(){return y},set:function(B){y=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"vertical",p({},g,{get:function(){return T},set:function(B){var h=S(B);if(h===!1)throw new SyntaxError("An invalid or illegal string was specified.");T=h,this.hasBeenReset=!0}})),Object.defineProperty(w,"snapToLines",p({},g,{get:function(){return x},set:function(B){x=!!B,this.hasBeenReset=!0}})),Object.defineProperty(w,"line",p({},g,{get:function(){return M},set:function(B){if(typeof B!="number"&&B!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");M=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"lineAlign",p({},g,{get:function(){return b},set:function(B){var h=s(B);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");b=h,this.hasBeenReset=!0}})),Object.defineProperty(w,"position",p({},g,{get:function(){return o},set:function(B){if(B<0||B>100)throw new Error("Position must be between 0 and 100.");o=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"positionAlign",p({},g,{get:function(){return r},set:function(B){var h=s(B);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");r=h,this.hasBeenReset=!0}})),Object.defineProperty(w,"size",p({},g,{get:function(){return n},set:function(B){if(B<0||B>100)throw new Error("Size must be between 0 and 100.");n=B,this.hasBeenReset=!0}})),Object.defineProperty(w,"align",p({},g,{get:function(){return l},set:function(B){var h=s(B);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");l=h,this.hasBeenReset=!0}})),w.displayState=void 0}return v.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},v}()},"./src/utils/vttparser.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"parseTimeStamp",function(){return E}),_.d(N,"fixLineBreaks",function(){return A}),_.d(N,"VTTParser",function(){return O});var Q=_("./src/utils/vttcue.ts"),R=function(){function w(){}var g=w.prototype;return g.decode=function(c,a){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},w}();function E(w){function g(c,a,u,m){return(c|0)*3600+(a|0)*60+(u|0)+parseFloat(m||0)}var C=w.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return C?parseFloat(C[2])>59?g(C[2],C[3],0,C[4]):g(C[1],C[2],C[3],C[4]):null}var S=function(){function w(){this.values=Object.create(null)}var g=w.prototype;return g.set=function(c,a){!this.get(c)&&a!==""&&(this.values[c]=a)},g.get=function(c,a,u){return u?this.has(c)?this.values[c]:a[u]:this.has(c)?this.values[c]:a},g.has=function(c){return c in this.values},g.alt=function(c,a,u){for(var m=0;m<u.length;++m)if(a===u[m]){this.set(c,a);break}},g.integer=function(c,a){/^-?\d+$/.test(a)&&this.set(c,parseInt(a,10))},g.percent=function(c,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var u=parseFloat(a);if(u>=0&&u<=100)return this.set(c,u),!0}return!1},w}();function s(w,g,C,c){var a=c?w.split(c):[w];for(var u in a){if(typeof a[u]!="string")continue;var m=a[u].split(C);if(m.length!==2)continue;var y=m[0],T=m[1];g(y,T)}}var p=new Q.default(0,0,""),v=p.align==="middle"?"middle":"center";function i(w,g,C){var c=w;function a(){var y=E(w);if(y===null)throw new Error("Malformed timestamp: "+c);return w=w.replace(/^[^\sa-zA-Z-]+/,""),y}function u(y,T){var x=new S;s(y,function(o,r){var n;switch(o){case"region":for(var l=C.length-1;l>=0;l--)if(C[l].id===r){x.set(o,C[l].region);break}break;case"vertical":x.alt(o,r,["rl","lr"]);break;case"line":n=r.split(","),x.integer(o,n[0]),x.percent(o,n[0])&&x.set("snapToLines",!1),x.alt(o,n[0],["auto"]),n.length===2&&x.alt("lineAlign",n[1],["start",v,"end"]);break;case"position":n=r.split(","),x.percent(o,n[0]),n.length===2&&x.alt("positionAlign",n[1],["start",v,"end","line-left","line-right","auto"]);break;case"size":x.percent(o,r);break;case"align":x.alt(o,r,["start",v,"end","left","right"]);break}},/:/,/\s/),T.region=x.get("region",null),T.vertical=x.get("vertical","");var M=x.get("line","auto");M==="auto"&&p.line===-1&&(M=-1),T.line=M,T.lineAlign=x.get("lineAlign","start"),T.snapToLines=x.get("snapToLines",!0),T.size=x.get("size",100),T.align=x.get("align",v);var b=x.get("position","auto");b==="auto"&&p.position===50&&(b=T.align==="start"||T.align==="left"?0:T.align==="end"||T.align==="right"?100:50),T.position=b}function m(){w=w.replace(/^\s+/,"")}if(m(),g.startTime=a(),m(),w.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);w=w.substr(3),m(),g.endTime=a(),m(),u(w,g)}function A(w){return w.replace(/<br(?: \/)?>/gi,`
|
|
`)}var O=function(){function w(){this.state="INITIAL",this.buffer="",this.decoder=new R,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var g=w.prototype;return g.parse=function(c){var a=this;c&&(a.buffer+=a.decoder.decode(c,{stream:!0}));function u(){var b=a.buffer,o=0;for(b=A(b);o<b.length&&b[o]!=="\r"&&b[o]!==`
|
|
`;)++o;var r=b.substr(0,o);return b[o]==="\r"&&++o,b[o]===`
|
|
`&&++o,a.buffer=b.substr(o),r}function m(b){s(b,function(o,r){},/:/)}try{var y="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;y=u();var T=y.match(/^()?WEBVTT([ \t].*)?$/);if(!T||!T[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var x=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;x?x=!1:y=u();switch(a.state){case"HEADER":/:/.test(y)?m(y):y||(a.state="ID");continue;case"NOTE":y||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(y)){a.state="NOTE";break}if(!y)continue;if(a.cue=new Q.default(0,0,""),a.state="CUE",y.indexOf("-->")===-1){a.cue.id=y;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{i(y,a.cue,a.regionList)}catch(b){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var M=y.indexOf("-->")!==-1;if(!y||M&&(x=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=y}continue;case"BADCUE":y||(a.state="ID")}}}catch(b){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},g.flush=function(){var c=this;try{if((c.cue||c.state==="HEADER")&&(c.buffer+=`
|
|
|
|
`,c.parse()),c.state==="INITIAL"||c.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){c.onparsingerror&&c.onparsingerror(a)}return c.onflush&&c.onflush(),this},w}()},"./src/utils/webvtt-parser.ts":function(X,N,_){"use strict";_.r(N),_.d(N,"generateCueId",function(){return O}),_.d(N,"parseWebVTT",function(){return g});var Q=_("./src/polyfills/number.ts"),R=_("./src/utils/vttparser.ts"),E=_("./src/demux/id3.ts"),S=_("./src/utils/timescale-conversion.ts"),s=_("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,v=function(c,a,u){return u===void 0&&(u=0),c.substr(u,a.length)===a},i=function(c){var a=parseInt(c.substr(-3)),u=parseInt(c.substr(-6,2)),m=parseInt(c.substr(-9,2)),y=c.length>9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(Q.isFiniteNumber)(a)||!Object(Q.isFiniteNumber)(u)||!Object(Q.isFiniteNumber)(m)||!Object(Q.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return a+=1e3*u,a+=60*1e3*m,a+=60*60*1e3*y,a},A=function(c){for(var a=5381,u=c.length;u;)a=a*33^c.charCodeAt(--u);return(a>>>0).toString()};function O(C,c,a){return A(C.toString())+A(c.toString())+A(a)}var w=function(c,a,u){var m=c[a],y=c[m.prevCC];if(!y||!y.new&&m.new){c.ccOffset=c.presentationOffset=m.start,m.new=!1;return}for(;(T=y)!==null&&T!==void 0&&T.new;){var T;c.ccOffset+=m.start-y.start,m.new=!1,m=y,y=c[m.prevCC]}c.presentationOffset=u};function g(C,c,a,u,m,y,T,x){var M=new R.VTTParser,b=Object(E.utf8ArrayToStr)(new Uint8Array(C)).trim().replace(p,`
|
|
`).split(`
|
|
`),o=[],r=Object(S.toMpegTsClockFromTimescale)(c,a),n="00:00.000",l=0,L=0,B,h=!0,I=!1;M.oncue=function(H){var z=u[m],Z=u.ccOffset,Y=(l-r)/9e4;if(z!=null&&z.new&&(L!==void 0?Z=u.ccOffset=z.start:w(u,m,Y)),Y&&(Z=Y-u.presentationOffset),I){var G=H.endTime-H.startTime,ee=Object(s.normalizePts)((H.startTime+Z-L)*9e4,y*9e4)/9e4;H.startTime=ee,H.endTime=ee+G}var J=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(J)),H.id||(H.id=O(H.startTime,H.endTime,J)),H.endTime>0&&o.push(H)},M.onparsingerror=function(H){B=H},M.onflush=function(){if(B){x(B);return}T(o)},b.forEach(function(H){if(h)if(v(H,"X-TIMESTAMP-MAP=")){h=!1,I=!0,H.substr(16).split(",").forEach(function(z){v(z,"LOCAL:")?n=z.substr(6):v(z,"MPEGTS:")&&(l=parseInt(z.substr(7)))});try{L=i(n)/1e3}catch(z){I=!1,B=z}return}else H===""&&(h=!1);M.parse(H+`
|
|
`)}),M.flush()}},"./src/utils/xhr-loader.ts":function(X,N,_){"use strict";_.r(N);var Q=_("./src/utils/logger.ts"),R=_("./src/loader/load-stats.ts"),E=/^age:\s*[\d.]+\s*$/m,S=function(){function s(v){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=v?v.xhrSetup:null,this.stats=new R.LoadStats,this.retryDelay=0}var p=s.prototype;return p.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},p.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},p.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(i,A,O){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=A,this.callbacks=O,this.retryDelay=A.retryDelay,this.loadInternal()},p.loadInternal=function(){var i=this.config,A=this.context;if(!i)return;var O=this.loader=new self.XMLHttpRequest,w=this.stats;w.loading.first=0,w.loaded=0;var g=this.xhrSetup;try{if(g)try{g(O,A.url)}catch(a){O.open("GET",A.url,!0),g(O,A.url)}O.readyState||O.open("GET",A.url,!0);var C=this.context.headers;if(C)for(var c in C)O.setRequestHeader(c,C[c])}catch(a){this.callbacks.onError({code:O.status,text:a.message},A,O);return}A.rangeEnd&&O.setRequestHeader("Range","bytes="+A.rangeStart+"-"+(A.rangeEnd-1)),O.onreadystatechange=this.readystatechange.bind(this),O.onprogress=this.loadprogress.bind(this),O.responseType=A.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),O.send()},p.readystatechange=function(){var i=this.context,A=this.loader,O=this.stats;if(!i||!A)return;var w=A.readyState,g=this.config;if(O.aborted)return;if(w>=2)if(self.clearTimeout(this.requestTimeout),O.loading.first===0&&(O.loading.first=Math.max(self.performance.now(),O.loading.start)),w===4){A.onreadystatechange=null,A.onprogress=null;var C=A.status;if(C>=200&&C<300){O.loading.end=Math.max(self.performance.now(),O.loading.first);var c,a;if(i.responseType==="arraybuffer"?(c=A.response,a=c.byteLength):(c=A.responseText,a=c.length),O.loaded=O.total=a,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(O,i,c,A),!this.callbacks)return;var m={url:A.responseURL,data:c};this.callbacks.onSuccess(m,O,i,A)}else O.retry>=g.maxRetry||C>=400&&C<499?(Q.logger.error(C+" while loading "+i.url),this.callbacks.onError({code:C,text:A.statusText},i,A)):(Q.logger.warn(C+" while loading "+i.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,g.maxRetryDelay),O.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout)},p.loadtimeout=function(){Q.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(i){var A=this.stats;A.loaded=i.loaded,i.lengthComputable&&(A.total=i.total)},p.getCacheAge=function(){var i=null;if(this.loader&&E.test(this.loader.getAllResponseHeaders())){var A=this.loader.getResponseHeader("age");i=A?parseFloat(A):null}return i},s}();N.default=S}}).default})},vHTk:function(Xe,pe,W){Xe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(Xe,pe,W){var X=W("SrGk"),N=W("bYtY");function _(E,S){X.call(this,E,S,["filter"],"__filter_in_use__","_shadowDom")}N.inherits(_,X),_.prototype.addWithoutUpdate=function(E,S){if(S&&Q(S.style)){var s;if(S._shadowDom){s=S._shadowDom;var p=this.getDefs(!0);p.contains(S._shadowDom)||this.addDom(s)}else s=this.add(S);this.markUsed(S);var v=s.getAttribute("id");E.style.filter="url(#"+v+")"}},_.prototype.add=function(E){var S=this.createElement("filter");return E._shadowDomId=E._shadowDomId||this.nextId++,S.setAttribute("id","zr"+this._zrId+"-shadow-"+E._shadowDomId),this.updateDom(E,S),this.addDom(S),S},_.prototype.update=function(E,S){var s=S.style;if(Q(s)){var p=this;X.prototype.update.call(this,S,function(){p.updateDom(S,S._shadowDom)})}else this.remove(E,S)},_.prototype.remove=function(E,S){S._shadowDomId!=null&&(this.removeDom(E),E.style.filter="")},_.prototype.updateDom=function(E,S){var s=S.getElementsByTagName("feDropShadow");s.length===0?s=this.createElement("feDropShadow"):s=s[0];var p=E.style,v=E.scale&&E.scale[0]||1,i=E.scale&&E.scale[1]||1,A,O,w,g;if(p.shadowBlur||p.shadowOffsetX||p.shadowOffsetY)A=p.shadowOffsetX||0,O=p.shadowOffsetY||0,w=p.shadowBlur,g=p.shadowColor;else if(p.textShadowBlur)A=p.textShadowOffsetX||0,O=p.textShadowOffsetY||0,w=p.textShadowBlur,g=p.textShadowColor;else{this.removeDom(S,p);return}s.setAttribute("dx",A/v),s.setAttribute("dy",O/i),s.setAttribute("flood-color",g);var C=w/2/v,c=w/2/i,a=C+" "+c;s.setAttribute("stdDeviation",a),S.setAttribute("x","-100%"),S.setAttribute("y","-100%"),S.setAttribute("width",Math.ceil(w/2*200)+"%"),S.setAttribute("height",Math.ceil(w/2*200)+"%"),S.appendChild(s),E._shadowDom=S},_.prototype.markUsed=function(E){E._shadowDom&&X.prototype.markUsed.call(this,E._shadowDom)};function Q(E){return E&&(E.shadowBlur||E.shadowOffsetX||E.shadowOffsetY||E.textShadowBlur||E.textShadowOffsetX||E.textShadowOffsetY)}var R=_;Xe.exports=R},vWvF:function(Xe,pe,W){var X=W("Bq2U"),N=W("SUKs"),_=W("bYtY"),Q=_.isString,R=_.isFunction,E=_.isObject,S=_.isArrayLike,s=_.indexOf,p=function(){this.animators=[]};p.prototype={constructor:p,animate:function(w,g){var C,c=!1,a=this,u=this.__zr;if(w){var m=w.split("."),y=a;c=m[0]==="shape";for(var T=0,x=m.length;T<x;T++){if(!y)continue;y=y[m[T]]}y&&(C=y)}else C=a;if(!C){N('Property "'+w+'" is not existed in element '+a.id);return}var M=a.animators,b=new X(C,g);return b.during(function(o){a.dirty(c)}).done(function(){M.splice(s(M,b),1)}),M.push(b),u&&u.animation.addAnimator(b),b},stopAnimation:function(w){for(var g=this.animators,C=g.length,c=0;c<C;c++)g[c].stop(w);return g.length=0,this},animateTo:function(w,g,C,c,a,u){v(this,w,g,C,c,a,u)},animateFrom:function(w,g,C,c,a,u){v(this,w,g,C,c,a,u,!0)}};function v(w,g,C,c,a,u,m,y){Q(c)?(u=a,a=c,c=0):R(a)?(u=a,a="linear",c=0):R(c)?(u=c,c=0):R(C)?(u=C,C=500):C||(C=500),w.stopAnimation(),i(w,"",w,g,C,c,y);var T=w.animators.slice(),x=T.length;function M(){x--,x||u&&u()}x||u&&u();for(var b=0;b<T.length;b++)T[b].done(M).start(a,m)}function i(w,g,C,c,a,u,m){var y={},T=0;for(var x in c){if(!c.hasOwnProperty(x))continue;C[x]!=null?E(c[x])&&!S(c[x])?i(w,g?g+"."+x:x,C[x],c[x],a,u,m):(m?(y[x]=C[x],A(w,g,x,c[x])):y[x]=c[x],T++):c[x]!=null&&!m&&A(w,g,x,c[x])}T>0&&w.animate(g,!1).when(a==null?500:a,y).delay(u||0)}function A(w,g,C,c){if(!g)w.attr(C,c);else{var a={};a[g]={},a[g][C]=c,w.attr(a)}}var O=p;Xe.exports=O},wCXF:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return bt});var X=W("rePB"),N=W("VTBJ"),_=W("KQm4"),Q=W("U8pU"),R=W("ODXe"),E=W("q1tI"),S=W("TSYQ"),s=W.n(S),p=W("Gytx"),v=W.n(p),i=W("Kwbf"),A=W("t23M"),O=W("qx4F"),w=W("6eGT"),g=W("IBYe"),C=W("Ff2n"),c=W("c+Xe"),a=W("fyJ8"),u=W("biw7");function m(He,Pe,At,mt,Ze){var ut=At[He]||{},Ke=At[Pe]||{},Ie,Me;ut.fixed==="left"?Ie=mt.left[He]:Ke.fixed==="right"&&(Me=mt.right[Pe]);var me=!1,Ee=!1,ge=!1,we=!1,ze=At[Pe+1],Je=At[He-1];if(Ze==="rtl"){if(Ie!==void 0){var Et=Je&&Je.fixed==="left";we=!Et}else if(Me!==void 0){var Ft=ze&&ze.fixed==="right";ge=!Ft}}else if(Ie!==void 0){var Nt=ze&&ze.fixed==="left";me=!Nt}else if(Me!==void 0){var ht=Je&&Je.fixed==="right";Ee=!ht}return{fixLeft:Ie,fixRight:Me,lastFixLeft:me,firstFixRight:Ee,lastFixRight:ge,firstFixLeft:we,isSticky:mt.isSticky}}var y=W("sR1s");function T(He){var Pe=He.cells,At=He.stickyOffsets,mt=He.flattenColumns,Ze=He.rowComponent,ut=He.cellComponent,Ke=He.onHeaderRow,Ie=He.index,Me=E.useContext(u.a),me=Me.prefixCls,Ee=Me.direction,ge;Ke&&(ge=Ke(Pe.map(function(ze){return ze.column}),Ie));var we=Object(y.a)(Pe.map(function(ze){return ze.column}));return E.createElement(Ze,Object.assign({},ge),Pe.map(function(ze,Je){var Et=ze.column,Ft=m(ze.colStart,ze.colEnd,mt,At,Ee),Nt;return Et&&Et.onHeaderCell&&(Nt=ze.column.onHeaderCell(Et)),E.createElement(a.a,Object.assign({},ze,{ellipsis:Et.ellipsis,align:Et.align,component:ut,prefixCls:me,key:we[Je]},Ft,{additionalProps:Nt,rowType:"header"}))}))}T.displayName="HeaderRow";var x=T;function M(He){var Pe=[];function At(Ke,Ie){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[Me]=Pe[Me]||[];var me=Ie,Ee=Ke.filter(Boolean).map(function(ge){var we={key:ge.key,className:ge.className||"",children:ge.title,column:ge,colStart:me},ze=1,Je=ge.children;return Je&&Je.length>0&&(ze=At(Je,me,Me+1).reduce(function(Et,Ft){return Et+Ft},0),we.hasSubColumns=!0),"colSpan"in ge&&(ze=ge.colSpan),"rowSpan"in ge&&(we.rowSpan=ge.rowSpan),we.colSpan=ze,we.colEnd=we.colStart+ze-1,Pe[Me].push(we),me+=ze,ze});return Ee}At(He,0);for(var mt=Pe.length,Ze=function(Ie){Pe[Ie].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=mt-Ie)})},ut=0;ut<mt;ut+=1)Ze(ut);return Pe}function b(He){var Pe=He.stickyOffsets,At=He.columns,mt=He.flattenColumns,Ze=He.onHeaderRow,ut=E.useContext(u.a),Ke=ut.prefixCls,Ie=ut.getComponent,Me=E.useMemo(function(){return M(At)},[At]),me=Ie(["header","wrapper"],"thead"),Ee=Ie(["header","row"],"tr"),ge=Ie(["header","cell"],"th");return E.createElement(me,{className:"".concat(Ke,"-thead")},Me.map(function(we,ze){var Je=E.createElement(x,{key:ze,flattenColumns:mt,cells:we,stickyOffsets:Pe,rowComponent:Ee,cellComponent:ge,onHeaderRow:Ze,index:ze});return Je}))}var o=b,r=W("hW8S");function n(He){for(var Pe=He.colWidths,At=He.columns,mt=He.columCount,Ze=[],ut=mt||At.length,Ke=!1,Ie=ut-1;Ie>=0;Ie-=1){var Me=Pe[Ie],me=At&&At[Ie],Ee=me&&me[r.a];(Me||Ee||Ke)&&(Ze.unshift(E.createElement("col",Object.assign({key:Ie,style:{width:Me,minWidth:Me}},Ee))),Ke=!0)}return E.createElement("colgroup",null,Ze)}var l=n;function L(He,Pe){return Object(E.useMemo)(function(){for(var At=[],mt=0;mt<Pe;mt+=1){var Ze=He[mt];if(Ze!==void 0)At[mt]=Ze;else return null}return At},[He.join("_"),Pe])}var B=E.forwardRef(function(He,Pe){var At=He.noData,mt=He.columns,Ze=He.flattenColumns,ut=He.colWidths,Ke=He.columCount,Ie=He.stickyOffsets,Me=He.direction,me=He.fixHeader,Ee=He.offsetHeader,ge=He.stickyClassName,we=He.onScroll,ze=Object(C.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Je=E.useContext(u.a),Et=Je.prefixCls,Ft=Je.scrollbarSize,Nt=Je.isSticky,ht=Nt&&!me?0:Ft,Lt=E.useRef(null),st=E.useCallback(function(Tt){Object(c.b)(Pe,Tt),Object(c.b)(Lt,Tt)},[]);E.useEffect(function(){var Tt;function Ct(qe){var St=qe.currentTarget,Ht=qe.deltaX;Ht&&(we({currentTarget:St,scrollLeft:St.scrollLeft+Ht}),qe.preventDefault())}return(Tt=Lt.current)===null||Tt===void 0||Tt.addEventListener("wheel",Ct),function(){var qe;(qe=Lt.current)===null||qe===void 0||qe.removeEventListener("wheel",Ct)}},[]);var rt=Ze[Ze.length-1],et={fixed:rt?rt.fixed:null,onHeaderCell:function(){return{className:"".concat(Et,"-cell-scrollbar")}}},Ce=Object(E.useMemo)(function(){return ht?[].concat(Object(_.a)(mt),[et]):mt},[ht,mt]),Ue=Object(E.useMemo)(function(){return ht?[].concat(Object(_.a)(Ze),[et]):Ze},[ht,Ze]),ct=Object(E.useMemo)(function(){var Tt=Ie.right,Ct=Ie.left;return Object(N.a)(Object(N.a)({},Ie),{},{left:Me==="rtl"?[].concat(Object(_.a)(Ct.map(function(qe){return qe+ht})),[0]):Ct,right:Me==="rtl"?Tt:[].concat(Object(_.a)(Tt.map(function(qe){return qe+ht})),[0]),isSticky:Nt})},[ht,Ie,Nt]),at=L(ut,Ke);return E.createElement("div",{style:Object(N.a)({overflow:"hidden"},Nt?{top:Ee}:{}),ref:st,className:s()("".concat(Et,"-header"),Object(X.a)({},ge,!!ge))},E.createElement("table",{style:{tableLayout:"fixed",visibility:At||at?null:"hidden"}},E.createElement(l,{colWidths:at?[].concat(Object(_.a)(at),[ht]):[],columCount:Ke+1,columns:Ue}),E.createElement(o,Object.assign({},ze,{stickyOffsets:ct,columns:Ce,flattenColumns:Ue}))))});B.displayName="FixedHeader";var h=B,I=E.createContext(null),H=I;function z(He){var Pe=He.prefixCls,At=He.children,mt=He.component,Ze=He.cellComponent,ut=He.fixHeader,Ke=He.fixColumn,Ie=He.horizonScroll,Me=He.className,me=He.expanded,Ee=He.componentWidth,ge=He.colSpan,we=E.useContext(u.a),ze=we.scrollbarSize;return E.useMemo(function(){var Je=At;return Ke&&(Je=E.createElement("div",{style:{width:Ee-(ut?ze:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},Je)),E.createElement(mt,{className:Me,style:{display:me?null:"none"}},E.createElement(a.a,{component:Ze,prefixCls:Pe,colSpan:ge},Je))},[At,mt,ut,Ie,Me,me,Ee,ge,ze])}var Z=z;function Y(He){var Pe=He.className,At=He.style,mt=He.record,Ze=He.index,ut=He.rowKey,Ke=He.getRowKey,Ie=He.rowExpandable,Me=He.expandedKeys,me=He.onRow,Ee=He.indent,ge=Ee===void 0?0:Ee,we=He.rowComponent,ze=He.cellComponent,Je=He.childrenColumnName,Et=E.useContext(u.a),Ft=Et.prefixCls,Nt=Et.fixedInfoList,ht=E.useContext(H),Lt=ht.fixHeader,st=ht.fixColumn,rt=ht.horizonScroll,et=ht.componentWidth,Ce=ht.flattenColumns,Ue=ht.expandableType,ct=ht.expandRowByClick,at=ht.onTriggerExpand,Tt=ht.rowClassName,Ct=ht.expandedRowClassName,qe=ht.indentSize,St=ht.expandIcon,Ht=ht.expandedRowRender,Pt=ht.expandIconColumnIndex,zt=E.useState(!1),Ir=Object(R.a)(zt,2),Rr=Ir[0],yr=Ir[1],jt=Me&&Me.has(He.recordKey);E.useEffect(function(){jt&&yr(!0)},[jt]);var Mr=Ue==="row"&&(!Ie||Ie(mt)),Wr=Ue==="nest",Ur=Je&&mt&&mt[Je],mr=Mr||Wr,Sr;me&&(Sr=me(mt,Ze));var Cn=function(F){if(ct&&mr&&at(mt,F),Sr&&Sr.onClick){for(var P,q=arguments.length,le=new Array(q>1?q-1:0),te=1;te<q;te++)le[te-1]=arguments[te];(P=Sr).onClick.apply(P,[F].concat(le))}},dn;typeof Tt=="string"?dn=Tt:typeof Tt=="function"&&(dn=Tt(mt,Ze,ge));var fe=Object(y.a)(Ce),ye=E.createElement(we,Object.assign({},Sr,{"data-row-key":ut,className:s()(Pe,"".concat(Ft,"-row"),"".concat(Ft,"-row-level-").concat(ge),dn,Sr&&Sr.className),style:Object(N.a)(Object(N.a)({},At),Sr?Sr.style:null),onClick:Cn}),Ce.map(function($,F){var P=$.render,q=$.dataIndex,le=$.className,te=fe[F],je=Nt[F],xt;F===(Pt||0)&&Wr&&(xt=E.createElement(E.Fragment,null,E.createElement("span",{style:{paddingLeft:"".concat(qe*ge,"px")},className:"".concat(Ft,"-row-indent indent-level-").concat(ge)}),St({prefixCls:Ft,expanded:jt,expandable:Ur,record:mt,onExpand:at})));var ot;return $.onCell&&(ot=$.onCell(mt,Ze)),E.createElement(a.a,Object.assign({className:le,ellipsis:$.ellipsis,align:$.align,component:ze,prefixCls:Ft,key:te,record:mt,index:Ze,dataIndex:q,render:P,shouldCellUpdate:$.shouldCellUpdate},je,{appendNode:xt,additionalProps:ot}))})),Fe;if(Mr&&(Rr||jt)){var nt=Ht(mt,Ze,ge+1,jt),$e=Ct&&Ct(mt,Ze,ge);Fe=E.createElement(Z,{expanded:jt,className:s()("".concat(Ft,"-expanded-row"),"".concat(Ft,"-expanded-row-level-").concat(ge+1),$e),prefixCls:Ft,fixHeader:Lt,fixColumn:st,horizonScroll:rt,component:we,componentWidth:et,cellComponent:ze,colSpan:Ce.length},nt)}var Rt;return Ur&&jt&&(Rt=(mt[Je]||[]).map(function($,F){var P=Ke($,F);return E.createElement(Y,Object.assign({},He,{key:P,rowKey:P,record:$,recordKey:P,index:F,indent:ge+1}))})),E.createElement(E.Fragment,null,ye,Fe,Rt)}Y.displayName="BodyRow";var G=Y,ee=E.createContext(null),J=ee;function oe(He){var Pe=He.columnKey,At=He.onColumnResize,mt=E.useRef();return E.useEffect(function(){mt.current&&At(Pe,mt.current.offsetWidth)},[]),E.createElement(A.a,{onResize:function(ut){var Ke=ut.offsetWidth;At(Pe,Ke)}},E.createElement("td",{ref:mt,style:{padding:0,border:0,height:0}},E.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function se(He){var Pe=He.data,At=He.getRowKey,mt=He.measureColumnWidth,Ze=He.expandedKeys,ut=He.onRow,Ke=He.rowExpandable,Ie=He.emptyNode,Me=He.childrenColumnName,me=E.useContext(J),Ee=me.onColumnResize,ge=E.useContext(u.a),we=ge.prefixCls,ze=ge.getComponent,Je=E.useContext(H),Et=Je.fixHeader,Ft=Je.horizonScroll,Nt=Je.flattenColumns,ht=Je.componentWidth;return E.useMemo(function(){var Lt=ze(["body","wrapper"],"tbody"),st=ze(["body","row"],"tr"),rt=ze(["body","cell"],"td"),et;Pe.length?et=Pe.map(function(Ue,ct){var at=At(Ue,ct);return E.createElement(G,{key:at,rowKey:at,record:Ue,recordKey:at,index:ct,rowComponent:st,cellComponent:rt,expandedKeys:Ze,onRow:ut,getRowKey:At,rowExpandable:Ke,childrenColumnName:Me})}):et=E.createElement(Z,{expanded:!0,className:"".concat(we,"-placeholder"),prefixCls:we,fixHeader:Et,fixColumn:Ft,horizonScroll:Ft,component:st,componentWidth:ht,cellComponent:rt,colSpan:Nt.length},Ie);var Ce=Object(y.a)(Nt);return E.createElement(Lt,{className:"".concat(we,"-tbody")},mt&&E.createElement("tr",{"aria-hidden":"true",className:"".concat(we,"-measure-row"),style:{height:0}},Ce.map(function(Ue){return E.createElement(oe,{key:Ue,columnKey:Ue,onColumnResize:Ee})})),et)},[Pe,we,ut,mt,Ze,At,ze,ht,Ie,Nt])}var Te=E.memo(se);Te.displayName="Body";var be=Te,xe=W("wRmb"),Oe=W("xEkU"),Ne=W.n(Oe);function Le(He){var Pe=Object(E.useRef)(He),At=Object(E.useState)({}),mt=Object(R.a)(At,2),Ze=mt[1],ut=Object(E.useRef)(null),Ke=Object(E.useRef)([]);function Ie(Me){ut.current===null&&(Ke.current=[],ut.current=Ne()(function(){Ke.current.forEach(function(me){Pe.current=me(Pe.current)}),ut.current=null,Ze({})})),Ke.current.push(Me)}return Object(E.useEffect)(function(){return function(){Ne.a.cancel(ut.current)}},[]),[Pe.current,Ie]}function Se(He){var Pe=Object(E.useRef)(He),At=Object(E.useRef)(null);function mt(){window.clearTimeout(At.current)}function Ze(Ke){Pe.current=Ke,mt(),At.current=window.setTimeout(function(){Pe.current=null,At.current=null},100)}function ut(){return Pe.current}return Object(E.useEffect)(function(){return mt},[]),[Ze,ut]}function tt(He,Pe,At){var mt=Object(E.useMemo)(function(){for(var Ze=[],ut=[],Ke=0,Ie=0,Me=0;Me<Pe;Me+=1)if(At==="rtl"){ut[Me]=Ie,Ie+=He[Me]||0;var me=Pe-Me-1;Ze[me]=Ke,Ke+=He[me]||0}else{Ze[Me]=Ke,Ke+=He[Me]||0;var Ee=Pe-Me-1;ut[Ee]=Ie,Ie+=He[Ee]||0}return{left:Ze,right:ut}},[He,Pe,At]);return mt}var Bt=tt;function De(He){var Pe=He.className,At=He.children;return E.createElement("div",{className:Pe},At)}var Qe=De,it=W("n6Qo");function Ae(He){var Pe,At=He.prefixCls,mt=He.record,Ze=He.onExpand,ut=He.expanded,Ke=He.expandable,Ie="".concat(At,"-row-expand-icon");if(!Ke)return E.createElement("span",{className:s()(Ie,"".concat(At,"-row-spaced"))});var Me=function(Ee){Ze(mt,Ee),Ee.stopPropagation()};return E.createElement("span",{className:s()(Ie,(Pe={},Object(X.a)(Pe,"".concat(At,"-row-expanded"),ut),Object(X.a)(Pe,"".concat(At,"-row-collapsed"),!ut),Pe)),onClick:Me})}function re(He,Pe,At){var mt=[];function Ze(ut){(ut||[]).forEach(function(Ke,Ie){mt.push(Pe(Ke,Ie)),Ze(Ke[At])})}return Ze(He),mt}var ie=W("zT1h"),ce=W("y0+3"),Be=function(Pe,At){var mt,Ze,ut=Pe.scrollBodyRef,Ke=Pe.onScroll,Ie=Pe.offsetScroll,Me=E.useContext(u.a),me=Me.prefixCls,Ee=((mt=ut.current)===null||mt===void 0?void 0:mt.scrollWidth)||0,ge=((Ze=ut.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,we=Ee&&ge*(ge/Ee),ze=E.useRef(),Je=Le({scrollLeft:0,isHiddenScrollBar:!1}),Et=Object(R.a)(Je,2),Ft=Et[0],Nt=Et[1],ht=E.useRef({delta:0,x:0}),Lt=E.useState(!1),st=Object(R.a)(Lt,2),rt=st[0],et=st[1],Ce=function(){et(!1)},Ue=function(qe){qe.persist(),ht.current.delta=qe.pageX-Ft.scrollLeft,ht.current.x=0,et(!0),qe.preventDefault()},ct=function(qe){var St,Ht=qe||((St=window)===null||St===void 0?void 0:St.event),Pt=Ht.buttons;if(!rt||Pt===0){rt&&et(!1);return}var zt=ht.current.x+qe.pageX-ht.current.x-ht.current.delta;zt<=0&&(zt=0),zt+we>=ge&&(zt=ge-we),Ke({scrollLeft:zt/ge*(Ee+2)}),ht.current.x=qe.pageX},at=function(){var qe=Object(ce.b)(ut.current).top,St=qe+ut.current.offsetHeight,Ht=document.documentElement.scrollTop+window.innerHeight;St-Object(O.a)()<=Ht||qe>=Ht-Ie?Nt(function(Pt){return Object(N.a)(Object(N.a)({},Pt),{},{isHiddenScrollBar:!0})}):Nt(function(Pt){return Object(N.a)(Object(N.a)({},Pt),{},{isHiddenScrollBar:!1})})},Tt=function(qe){Nt(function(St){return Object(N.a)(Object(N.a)({},St),{},{scrollLeft:qe/Ee*ge||0})})};return E.useImperativeHandle(At,function(){return{setScrollLeft:Tt}}),E.useEffect(function(){var Ct=Object(ie.a)(document.body,"mouseup",Ce,!1),qe=Object(ie.a)(document.body,"mousemove",ct,!1);return at(),function(){Ct.remove(),qe.remove()}},[we,rt]),E.useEffect(function(){var Ct=Object(ie.a)(window,"scroll",at,!1),qe=Object(ie.a)(window,"resize",at,!1);return function(){Ct.remove(),qe.remove()}},[]),E.useEffect(function(){Ft.isHiddenScrollBar||Nt(function(Ct){var qe,St;return Object(N.a)(Object(N.a)({},Ct),{},{scrollLeft:ut.current.scrollLeft/((qe=ut.current)===null||qe===void 0?void 0:qe.scrollWidth)*((St=ut.current)===null||St===void 0?void 0:St.clientWidth)})})},[Ft.isHiddenScrollBar]),Ee<=ge||!we||Ft.isHiddenScrollBar?null:E.createElement("div",{style:{height:Object(O.a)(),width:ge,bottom:Ie},className:"".concat(me,"-sticky-scroll")},E.createElement("div",{onMouseDown:Ue,ref:ze,className:s()("".concat(me,"-sticky-scroll-bar"),Object(X.a)({},"".concat(me,"-sticky-scroll-bar-active"),rt)),style:{width:"".concat(we,"px"),transform:"translate3d(".concat(Ft.scrollLeft,"px, 0, 0)")}}))},Re=E.forwardRef(Be);function ke(He,Pe){return E.useMemo(function(){var At=!!He;return{isSticky:At,stickyClassName:At?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(Q.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(Q.a)(He)==="object"&&He.offsetScroll||0}},[He,Pe])}var ft=[],pt={},bt="rc-table-internal-hook",yt=E.memo(function(He){var Pe=He.children;return Pe},function(He,Pe){return v()(He.props,Pe.props)?He.pingLeft!==Pe.pingLeft||He.pingRight!==Pe.pingRight:!1});function _t(He){var Pe,At=He.prefixCls,mt=He.className,Ze=He.rowClassName,ut=He.style,Ke=He.data,Ie=He.rowKey,Me=He.scroll,me=He.tableLayout,Ee=He.direction,ge=He.title,we=He.footer,ze=He.summary,Je=He.id,Et=He.showHeader,Ft=He.components,Nt=He.emptyText,ht=He.onRow,Lt=He.onHeaderRow,st=He.internalHooks,rt=He.transformColumns,et=He.internalRefs,Ce=He.sticky,Ue=Ke||ft,ct=!!Ue.length,at=E.useState(0),Tt=Object(R.a)(at,2),Ct=Tt[0],qe=Tt[1];E.useEffect(function(){qe(Object(O.a)())});var St=E.useMemo(function(){return Object(y.c)(Ft,{})},[Ft]),Ht=E.useCallback(function(dr,xr){return Object(y.b)(St,dr)||xr},[St]),Pt=E.useMemo(function(){return typeof Ie=="function"?Ie:function(dr){var xr=dr&&dr[Ie];return xr}},[Ie]),zt=Object(r.c)(He),Ir=zt.expandIcon,Rr=zt.expandedRowKeys,yr=zt.defaultExpandedRowKeys,jt=zt.defaultExpandAllRows,Mr=zt.expandedRowRender,Wr=zt.onExpand,Ur=zt.onExpandedRowsChange,mr=zt.expandRowByClick,Sr=zt.rowExpandable,Cn=zt.expandIconColumnIndex,dn=zt.expandedRowClassName,fe=zt.childrenColumnName,ye=zt.indentSize,Fe=Ir||Ae,nt=fe||"children",$e=E.useMemo(function(){return Mr?"row":He.expandable&&st===bt&&He.expandable.__PARENT_RENDER_ICON__||Ue.some(function(dr){return dr&&Object(Q.a)(dr)==="object"&&dr[nt]})?"nest":!1},[!!Mr,Ue]),Rt=E.useState(function(){return yr||(jt?re(Ue,Pt,nt):[])}),$=Object(R.a)(Rt,2),F=$[0],P=$[1],q=E.useMemo(function(){return new Set(Rr||F||[])},[Rr,F]),le=E.useCallback(function(dr){var xr=Pt(dr,Ue.indexOf(dr)),Tr,_n=q.has(xr);_n?(q.delete(xr),Tr=Object(_.a)(q)):Tr=[].concat(Object(_.a)(q),[xr]),P(Tr),Wr&&Wr(!_n,dr),Ur&&Ur(Tr)},[Pt,q,Ue,Wr,Ur]),te=E.useState(0),je=Object(R.a)(te,2),xt=je[0],ot=je[1],kt=Object(xe.b)(Object(N.a)(Object(N.a)(Object(N.a)({},He),zt),{},{expandable:!!Mr,expandedKeys:q,getRowKey:Pt,onTriggerExpand:le,expandIcon:Fe,expandIconColumnIndex:Cn,direction:Ee}),st===bt?rt:null),wt=Object(R.a)(kt,2),Yt=wt[0],Gt=wt[1],Jt=E.useMemo(function(){return{columns:Yt,flattenColumns:Gt}},[Yt,Gt]),hr=E.useRef(),Fr=E.useRef(),gr=E.useRef(),Lr=E.useState(!1),fr=Object(R.a)(Lr,2),Hr=fr[0],Pr=fr[1],on=E.useState(!1),Yr=Object(R.a)(on,2),tn=Yr[0],sn=Yr[1],Gr=Le(new Map),rn=Object(R.a)(Gr,2),ln=rn[0],$r=rn[1],un=Object(y.a)(Gt),Er=un.map(function(dr){return ln.get(dr)}),cr=E.useMemo(function(){return Er},[Er.join("_")]),nr=Bt(cr,Gt.length,Ee),tr=Me&&Object(y.d)(Me.y),$t=Me&&Object(y.d)(Me.x),vr=$t&&Gt.some(function(dr){var xr=dr.fixed;return xr}),Cr=E.useRef(),_r=ke(Ce,At),wr=_r.isSticky,kn=_r.offsetHeader,Vr=_r.offsetScroll,nn=_r.stickyClassName,Dn,wn,Jr;tr&&(wn={overflowY:"scroll",maxHeight:Me.y}),$t&&(Dn={overflowX:"auto"},tr||(wn={overflowY:"hidden"}),Jr={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var Jn=E.useCallback(function(dr,xr){$r(function(Tr){var _n=new Map(Tr);return _n.set(dr,xr),_n})},[]),In=Se(null),Vn=Object(R.a)(In,2),Rn=Vn[0],si=Vn[1];function Ln(dr,xr){if(!xr)return;typeof xr=="function"?xr(dr):xr.scrollLeft!==dr&&(xr.scrollLeft=dr)}var hn=function(xr){var Tr=xr.currentTarget,_n=xr.scrollLeft,xi=typeof _n=="number"?_n:Tr.scrollLeft,Xi=Tr||pt;if(!si()||si()===Xi){var Za;Rn(Xi),Ln(xi,Fr.current),Ln(xi,gr.current),Ln(xi,(Za=Cr.current)===null||Za===void 0?void 0:Za.setScrollLeft)}if(Tr){var Io=Tr.scrollWidth,hs=Tr.clientWidth;Pr(xi>0),sn(xi<Io-hs)}},Nn=function(){gr.current&&hn({currentTarget:gr.current})},ui=function(xr){var Tr=xr.width;Nn(),ot(hr.current?hr.current.offsetWidth:Tr)};E.useEffect(function(){return Nn},[]),E.useEffect(function(){$t&&Nn()},[$t]),E.useEffect(function(){st===bt&&et&&(et.body.current=gr.current)});var hi=Ht(["table"],"table"),gn=E.useMemo(function(){return me||(vr?Me.x==="max-content"?"auto":"fixed":tr||Gt.some(function(dr){var xr=dr.ellipsis;return xr})?"fixed":"auto")},[tr,vr,Gt,me]),Fn,Zn={colWidths:cr,columCount:Gt.length,stickyOffsets:nr,onHeaderRow:Lt,fixHeader:tr},er=E.useMemo(function(){return ct?null:typeof Nt=="function"?Nt():Nt},[ct,Nt]),Ar=E.createElement(be,{data:Ue,measureColumnWidth:tr||$t||wr,expandedKeys:q,rowExpandable:Sr,getRowKey:Pt,onRow:ht,emptyNode:er,childrenColumnName:nt}),lr=E.createElement(l,{colWidths:Gt.map(function(dr){var xr=dr.width;return xr}),columns:Gt}),Or=ze&&E.createElement(it.b,null,ze(Ue)),Qr=Ht(["body"]);if(tr||wr){var Zr;typeof Qr=="function"?(Zr=Qr(Ue,{scrollbarSize:Ct,ref:gr,onScroll:hn}),Zn.colWidths=Gt.map(function(dr,xr){var Tr=dr.width,_n=xr===Yt.length-1?Tr-Ct:Tr;return typeof _n=="number"&&!Number.isNaN(_n)?_n:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Zr=E.createElement("div",{style:Object(N.a)(Object(N.a)({},Dn),wn),onScroll:hn,ref:gr,className:s()("".concat(At,"-body"))},E.createElement(hi,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:gn})},lr,Ar,Or),wr&&E.createElement(Re,{ref:Cr,offsetScroll:Vr,scrollBodyRef:gr,onScroll:hn})),Fn=E.createElement(E.Fragment,null,Et!==!1&&E.createElement(h,Object.assign({noData:!Ue.length},Zn,Jt,{direction:Ee,offsetHeader:kn,stickyClassName:nn,ref:Fr,onScroll:hn})),Zr)}else Fn=E.createElement("div",{style:Object(N.a)(Object(N.a)({},Dn),wn),className:s()("".concat(At,"-content")),onScroll:hn,ref:gr},E.createElement(hi,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:gn})},lr,Et!==!1&&E.createElement(o,Object.assign({},Zn,Jt)),Ar,Or));var Dr=Object(r.b)(He),vn=E.createElement("div",Object.assign({className:s()(At,mt,(Pe={},Object(X.a)(Pe,"".concat(At,"-rtl"),Ee==="rtl"),Object(X.a)(Pe,"".concat(At,"-ping-left"),Hr),Object(X.a)(Pe,"".concat(At,"-ping-right"),tn),Object(X.a)(Pe,"".concat(At,"-layout-fixed"),me==="fixed"),Object(X.a)(Pe,"".concat(At,"-fixed-header"),tr),Object(X.a)(Pe,"".concat(At,"-fixed-column"),vr),Object(X.a)(Pe,"".concat(At,"-scroll-horizontal"),$t),Object(X.a)(Pe,"".concat(At,"-has-fix-left"),Gt[0]&&Gt[0].fixed),Object(X.a)(Pe,"".concat(At,"-has-fix-right"),Gt[Gt.length-1]&&Gt[Gt.length-1].fixed==="right"),Pe)),style:ut,id:Je,ref:hr},Dr),E.createElement(yt,{pingLeft:Hr,pingRight:tn,props:Object(N.a)(Object(N.a)({},He),{},{stickyOffsets:nr,mergedExpandedKeys:q})},ge&&E.createElement(Qe,{className:"".concat(At,"-title")},ge(Ue)),E.createElement("div",{className:"".concat(At,"-container")},Fn),we&&E.createElement(Qe,{className:"".concat(At,"-footer")},we(Ue))));$t&&(vn=E.createElement(A.a,{onResize:ui},vn));var Un=E.useMemo(function(){return{prefixCls:At,getComponent:Ht,scrollbarSize:Ct,direction:Ee,fixedInfoList:Gt.map(function(dr,xr){return m(xr,xr,Gt,nr,Ee)}),isSticky:wr}},[At,Ht,Ct,Ee,Gt,nr,Ee,wr]),Nr=E.useMemo(function(){return Object(N.a)(Object(N.a)({},Jt),{},{tableLayout:gn,rowClassName:Ze,expandedRowClassName:dn,componentWidth:xt,fixHeader:tr,fixColumn:vr,horizonScroll:$t,expandIcon:Fe,expandableType:$e,expandRowByClick:mr,expandedRowRender:Mr,onTriggerExpand:le,expandIconColumnIndex:Cn,indentSize:ye})},[Jt,gn,Ze,dn,xt,tr,vr,$t,Fe,$e,mr,Mr,le,Cn,ye]),Pi=E.useMemo(function(){return{onColumnResize:Jn}},[Jn]);return E.createElement(u.a.Provider,{value:Un},E.createElement(H.Provider,{value:Nr},E.createElement(J.Provider,{value:Pi},vn)))}_t.Column=g.a,_t.ColumnGroup=w.a,_t.Summary=it.a,_t.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var It=pe.b=_t},wOnQ:function(Xe,pe,W){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(X,N){Xe.exports=N()})(this,function(){"use strict";/*! *****************************************************************************
|
|
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.
|
|
***************************************************************************** */var X=function(k,U){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,j){K.__proto__=j}||function(K,j){for(var ae in j)Object.prototype.hasOwnProperty.call(j,ae)&&(K[ae]=j[ae])},X(k,U)};function N(k,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");X(k,U);function K(){this.constructor=k}k.prototype=U===null?Object.create(U):(K.prototype=U.prototype,new K)}var _=function(){return _=Object.assign||function(U){for(var K,j=1,ae=arguments.length;j<ae;j++){K=arguments[j];for(var he in K)Object.prototype.hasOwnProperty.call(K,he)&&(U[he]=K[he])}return U},_.apply(this,arguments)};function Q(k,U,K,j){function ae(he){return he instanceof K?he:new K(function(_e){_e(he)})}return new(K||(K=Promise))(function(he,_e){function Ge(vt){try{lt(j.next(vt))}catch(Ot){_e(Ot)}}function We(vt){try{lt(j.throw(vt))}catch(Ot){_e(Ot)}}function lt(vt){vt.done?he(vt.value):ae(vt.value).then(Ge,We)}lt((j=j.apply(k,U||[])).next())})}function R(k,U){var K={label:0,sent:function(){if(he[0]&1)throw he[1];return he[1]},trys:[],ops:[]},j,ae,he,_e;return _e={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function Ge(lt){return function(vt){return We([lt,vt])}}function We(lt){if(j)throw new TypeError("Generator is already executing.");for(;K;)try{if(j=1,ae&&(he=lt[0]&2?ae.return:lt[0]?ae.throw||((he=ae.return)&&he.call(ae),0):ae.next)&&!(he=he.call(ae,lt[1])).done)return he;(ae=0,he)&&(lt=[lt[0]&2,he.value]);switch(lt[0]){case 0:case 1:he=lt;break;case 4:return K.label++,{value:lt[1],done:!1};case 5:K.label++,ae=lt[1],lt=[0];continue;case 7:lt=K.ops.pop(),K.trys.pop();continue;default:if(!(he=K.trys,he=he.length>0&&he[he.length-1])&&(lt[0]===6||lt[0]===2)){K=0;continue}if(lt[0]===3&&(!he||lt[1]>he[0]&<[1]<he[3])){K.label=lt[1];break}if(lt[0]===6&&K.label<he[1]){K.label=he[1],he=lt;break}if(he&&K.label<he[2]){K.label=he[2],K.ops.push(lt);break}he[2]&&K.ops.pop(),K.trys.pop();continue}lt=U.call(k,K)}catch(vt){lt=[6,vt],ae=0}finally{j=he=0}if(lt[0]&5)throw lt[1];return{value:lt[0]?lt[1]:void 0,done:!0}}}function E(k,U,K){if(K||arguments.length===2)for(var j=0,ae=U.length,he;j<ae;j++)(he||!(j in U))&&(he||(he=Array.prototype.slice.call(U,0,j)),he[j]=U[j]);return k.concat(he||U)}for(var S=function(){function k(U,K,j,ae){this.left=U,this.top=K,this.width=j,this.height=ae}return k.prototype.add=function(U,K,j,ae){return new k(this.left+U,this.top+K,this.width+j,this.height+ae)},k.fromClientRect=function(U,K){return new k(K.left+U.windowBounds.left,K.top+U.windowBounds.top,K.width,K.height)},k.fromDOMRectList=function(U,K){var j=Array.from(K).find(function(ae){return ae.width!==0});return j?new k(j.left+U.windowBounds.left,j.top+U.windowBounds.top,j.width,j.height):k.EMPTY},k.EMPTY=new k(0,0,0,0),k}(),s=function(k,U){return S.fromClientRect(k,U.getBoundingClientRect())},p=function(k){var U=k.body,K=k.documentElement;if(!U||!K)throw new Error("Unable to get document size");var j=Math.max(Math.max(U.scrollWidth,K.scrollWidth),Math.max(U.offsetWidth,K.offsetWidth),Math.max(U.clientWidth,K.clientWidth)),ae=Math.max(Math.max(U.scrollHeight,K.scrollHeight),Math.max(U.offsetHeight,K.offsetHeight),Math.max(U.clientHeight,K.clientHeight));return new S(0,0,j,ae)},v=function(k){for(var U=[],K=0,j=k.length;K<j;){var ae=k.charCodeAt(K++);if(ae>=55296&&ae<=56319&&K<j){var he=k.charCodeAt(K++);(he&64512)===56320?U.push(((ae&1023)<<10)+(he&1023)+65536):(U.push(ae),K--)}else U.push(ae)}return U},i=function(){for(var k=[],U=0;U<arguments.length;U++)k[U]=arguments[U];if(String.fromCodePoint)return String.fromCodePoint.apply(String,k);var K=k.length;if(!K)return"";for(var j=[],ae=-1,he="";++ae<K;){var _e=k[ae];_e<=65535?j.push(_e):(_e-=65536,j.push((_e>>10)+55296,_e%1024+56320)),(ae+1===K||j.length>16384)&&(he+=String.fromCharCode.apply(String,j),j.length=0)}return he},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),w=0;w<A.length;w++)O[A.charCodeAt(w)]=w;for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),c=0;c<g.length;c++)C[g.charCodeAt(c)]=c;for(var a=function(k){var U=k.length*.75,K=k.length,j,ae=0,he,_e,Ge,We;k[k.length-1]==="="&&(U--,k[k.length-2]==="="&&U--);var lt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(U):new Array(U),vt=Array.isArray(lt)?lt:new Uint8Array(lt);for(j=0;j<K;j+=4)he=C[k.charCodeAt(j)],_e=C[k.charCodeAt(j+1)],Ge=C[k.charCodeAt(j+2)],We=C[k.charCodeAt(j+3)],vt[ae++]=he<<2|_e>>4,vt[ae++]=(_e&15)<<4|Ge>>2,vt[ae++]=(Ge&3)<<6|We&63;return lt},u=function(k){for(var U=k.length,K=[],j=0;j<U;j+=2)K.push(k[j+1]<<8|k[j]);return K},m=function(k){for(var U=k.length,K=[],j=0;j<U;j+=4)K.push(k[j+3]<<24|k[j+2]<<16|k[j+1]<<8|k[j]);return K},y=5,T=6+5,x=2,M=T-y,b=65536>>y,o=1<<y,r=o-1,n=1024>>y,l=b+n,L=l,B=2048>>6,h=L+B,I=65536>>T,H=1<<M,z=H-1,Z=function(k,U,K){return k.slice?k.slice(U,K):new Uint16Array(Array.prototype.slice.call(k,U,K))},Y=function(k,U,K){return k.slice?k.slice(U,K):new Uint32Array(Array.prototype.slice.call(k,U,K))},G=function(k,U){var K=a(k),j=Array.isArray(K)?m(K):new Uint32Array(K),ae=Array.isArray(K)?u(K):new Uint16Array(K),he=24,_e=Z(ae,he/2,j[4]/2),Ge=j[5]===2?Z(ae,(he+j[4])/2):Y(j,Math.ceil((he+j[4])/4));return new ee(j[0],j[1],j[2],j[3],_e,Ge)},ee=function(){function k(U,K,j,ae,he,_e){this.initialValue=U,this.errorValue=K,this.highStart=j,this.highValueIndex=ae,this.index=he,this.data=_e}return k.prototype.get=function(U){var K;if(U>=0){if(U<55296||U>56319&&U<=65535)return K=this.index[U>>y],K=(K<<x)+(U&r),this.data[K];if(U<=65535)return K=this.index[b+(U-55296>>y)],K=(K<<x)+(U&r),this.data[K];if(U<this.highStart)return K=h-I+(U>>T),K=this.index[K],K+=U>>y&z,K=this.index[K],K=(K<<x)+(U&r),this.data[K];if(U<=1114111)return this.data[this.highValueIndex]}return this.errorValue},k}(),J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oe=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),se=0;se<J.length;se++)oe[J.charCodeAt(se)]=se;var Te="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",be=50,xe=1,Oe=2,Ne=3,Le=4,Se=5,tt=7,Bt=8,De=9,Qe=10,it=11,Ae=12,re=13,ie=14,ce=15,Be=16,Re=17,ke=18,ft=19,pt=20,bt=21,yt=22,_t=23,It=24,He=25,Pe=26,At=27,mt=28,Ze=29,ut=30,Ke=31,Ie=32,Me=33,me=34,Ee=35,ge=36,we=37,ze=38,Je=39,Et=40,Ft=41,Nt=42,ht=43,Lt=[9001,65288],st="!",rt="\xD7",et="\xF7",Ce=G(Te),Ue=[ut,ge],ct=[xe,Oe,Ne,Se],at=[Qe,Bt],Tt=[At,Pe],Ct=ct.concat(at),qe=[ze,Je,Et,me,Ee],St=[ce,re],Ht=function(k,U){U===void 0&&(U="strict");var K=[],j=[],ae=[];return k.forEach(function(he,_e){var Ge=Ce.get(he);if(Ge>be?(ae.push(!0),Ge-=be):ae.push(!1),["normal","auto","loose"].indexOf(U)!==-1&&[8208,8211,12316,12448].indexOf(he)!==-1)return j.push(_e),K.push(Be);if(Ge===Le||Ge===it){if(_e===0)return j.push(_e),K.push(ut);var We=K[_e-1];return Ct.indexOf(We)===-1?(j.push(j[_e-1]),K.push(We)):(j.push(_e),K.push(ut))}if(j.push(_e),Ge===Ke)return K.push(U==="strict"?bt:we);if(Ge===Nt)return K.push(ut);if(Ge===Ze)return K.push(ut);if(Ge===ht)return he>=131072&&he<=196605||he>=196608&&he<=262141?K.push(we):K.push(ut);K.push(Ge)}),[j,K,ae]},Pt=function(k,U,K,j){var ae=j[K];if(Array.isArray(k)?k.indexOf(ae)!==-1:k===ae)for(var he=K;he<=j.length;){he++;var _e=j[he];if(_e===U)return!0;if(_e!==Qe)break}if(ae===Qe)for(var he=K;he>0;){he--;var Ge=j[he];if(Array.isArray(k)?k.indexOf(Ge)!==-1:k===Ge)for(var We=K;We<=j.length;){We++;var _e=j[We];if(_e===U)return!0;if(_e!==Qe)break}if(Ge!==Qe)break}return!1},zt=function(k,U){for(var K=k;K>=0;){var j=U[K];if(j===Qe)K--;else return j}return 0},Ir=function(k,U,K,j,ae){if(K[j]===0)return rt;var he=j-1;if(Array.isArray(ae)&&ae[he]===!0)return rt;var _e=he-1,Ge=he+1,We=U[he],lt=_e>=0?U[_e]:0,vt=U[Ge];if(We===Oe&&vt===Ne)return rt;if(ct.indexOf(We)!==-1)return st;if(ct.indexOf(vt)!==-1)return rt;if(at.indexOf(vt)!==-1)return rt;if(zt(he,U)===Bt)return et;if(Ce.get(k[he])===it)return rt;if((We===Ie||We===Me)&&Ce.get(k[Ge])===it)return rt;if(We===tt||vt===tt)return rt;if(We===De)return rt;if([Qe,re,ce].indexOf(We)===-1&&vt===De)return rt;if([Re,ke,ft,It,mt].indexOf(vt)!==-1)return rt;if(zt(he,U)===yt)return rt;if(Pt(_t,yt,he,U))return rt;if(Pt([Re,ke],bt,he,U))return rt;if(Pt(Ae,Ae,he,U))return rt;if(We===Qe)return et;if(We===_t||vt===_t)return rt;if(vt===Be||We===Be)return et;if([re,ce,bt].indexOf(vt)!==-1||We===ie)return rt;if(lt===ge&&St.indexOf(We)!==-1)return rt;if(We===mt&&vt===ge)return rt;if(vt===pt)return rt;if(Ue.indexOf(vt)!==-1&&We===He||Ue.indexOf(We)!==-1&&vt===He)return rt;if(We===At&&[we,Ie,Me].indexOf(vt)!==-1||[we,Ie,Me].indexOf(We)!==-1&&vt===Pe)return rt;if(Ue.indexOf(We)!==-1&&Tt.indexOf(vt)!==-1||Tt.indexOf(We)!==-1&&Ue.indexOf(vt)!==-1)return rt;if([At,Pe].indexOf(We)!==-1&&(vt===He||[yt,ce].indexOf(vt)!==-1&&U[Ge+1]===He)||[yt,ce].indexOf(We)!==-1&&vt===He||We===He&&[He,mt,It].indexOf(vt)!==-1)return rt;if([He,mt,It,Re,ke].indexOf(vt)!==-1)for(var Ot=he;Ot>=0;){var Dt=U[Ot];if(Dt===He)return rt;if([mt,It].indexOf(Dt)!==-1)Ot--;else break}if([At,Pe].indexOf(vt)!==-1)for(var Ot=[Re,ke].indexOf(We)!==-1?_e:he;Ot>=0;){var Dt=U[Ot];if(Dt===He)return rt;if([mt,It].indexOf(Dt)!==-1)Ot--;else break}if(ze===We&&[ze,Je,me,Ee].indexOf(vt)!==-1||[Je,me].indexOf(We)!==-1&&[Je,Et].indexOf(vt)!==-1||[Et,Ee].indexOf(We)!==-1&&vt===Et)return rt;if(qe.indexOf(We)!==-1&&[pt,Pe].indexOf(vt)!==-1||qe.indexOf(vt)!==-1&&We===At)return rt;if(Ue.indexOf(We)!==-1&&Ue.indexOf(vt)!==-1)return rt;if(We===It&&Ue.indexOf(vt)!==-1)return rt;if(Ue.concat(He).indexOf(We)!==-1&&vt===yt&&Lt.indexOf(k[Ge])===-1||Ue.concat(He).indexOf(vt)!==-1&&We===ke)return rt;if(We===Ft&&vt===Ft){for(var or=K[he],Kt=1;or>0&&(or--,U[or]===Ft);)Kt++;if(Kt%2!==0)return rt}return We===Ie&&vt===Me?rt:et},Rr=function(k,U){U||(U={lineBreak:"normal",wordBreak:"normal"});var K=Ht(k,U.lineBreak),j=K[0],ae=K[1],he=K[2];(U.wordBreak==="break-all"||U.wordBreak==="break-word")&&(ae=ae.map(function(Ge){return[He,ut,Nt].indexOf(Ge)!==-1?we:Ge}));var _e=U.wordBreak==="keep-all"?he.map(function(Ge,We){return Ge&&k[We]>=19968&&k[We]<=40959}):void 0;return[j,ae,_e]},yr=function(){function k(U,K,j,ae){this.codePoints=U,this.required=K===st,this.start=j,this.end=ae}return k.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},k}(),jt=function(k,U){var K=v(k),j=Rr(K,U),ae=j[0],he=j[1],_e=j[2],Ge=K.length,We=0,lt=0;return{next:function(){if(lt>=Ge)return{done:!0,value:null};for(var vt=rt;lt<Ge&&(vt=Ir(K,he,ae,++lt,_e))===rt;);if(vt!==rt||lt===Ge){var Ot=new yr(K,vt,We,lt);return We=lt,{value:Ot,done:!1}}return{done:!0,value:null}}}},Mr=1<<0,Wr=1<<1,Ur=1<<2,mr=1<<3,Sr=10,Cn=47,dn=92,fe=9,ye=32,Fe=34,nt=61,$e=35,Rt=36,$=37,F=39,P=40,q=41,le=95,te=45,je=33,xt=60,ot=62,kt=64,wt=91,Yt=93,Gt=61,Jt=123,hr=63,Fr=125,gr=124,Lr=126,fr=128,Hr=65533,Pr=42,on=43,Yr=44,tn=58,sn=59,Gr=46,rn=0,ln=8,$r=11,un=14,Er=31,cr=127,nr=-1,tr=48,$t=97,vr=101,Cr=102,_r=117,wr=122,kn=65,Vr=69,nn=70,Dn=85,wn=90,Jr=function(k){return k>=tr&&k<=57},Jn=function(k){return k>=55296&&k<=57343},In=function(k){return Jr(k)||k>=kn&&k<=nn||k>=$t&&k<=Cr},Vn=function(k){return k>=$t&&k<=wr},Rn=function(k){return k>=kn&&k<=wn},si=function(k){return Vn(k)||Rn(k)},Ln=function(k){return k>=fr},hn=function(k){return k===Sr||k===fe||k===ye},Nn=function(k){return si(k)||Ln(k)||k===le},ui=function(k){return Nn(k)||Jr(k)||k===te},hi=function(k){return k>=rn&&k<=ln||k===$r||k>=un&&k<=Er||k===cr},gn=function(k,U){return k!==dn?!1:U!==Sr},Fn=function(k,U,K){return k===te?Nn(U)||gn(U,K):Nn(k)?!0:!!(k===dn&&gn(k,U))},Zn=function(k,U,K){return k===on||k===te?Jr(U)?!0:U===Gr&&Jr(K):k===Gr?Jr(U):Jr(k)},er=function(k){var U=0,K=1;(k[U]===on||k[U]===te)&&(k[U]===te&&(K=-1),U++);for(var j=[];Jr(k[U]);)j.push(k[U++]);var ae=j.length?parseInt(i.apply(void 0,j),10):0;k[U]===Gr&&U++;for(var he=[];Jr(k[U]);)he.push(k[U++]);var _e=he.length,Ge=_e?parseInt(i.apply(void 0,he),10):0;(k[U]===Vr||k[U]===vr)&&U++;var We=1;(k[U]===on||k[U]===te)&&(k[U]===te&&(We=-1),U++);for(var lt=[];Jr(k[U]);)lt.push(k[U++]);var vt=lt.length?parseInt(i.apply(void 0,lt),10):0;return K*(ae+Ge*Math.pow(10,-_e))*Math.pow(10,We*vt)},Ar={type:2},lr={type:3},Or={type:4},Qr={type:13},Zr={type:8},Dr={type:21},vn={type:9},Un={type:10},Nr={type:11},Pi={type:12},dr={type:14},xr={type:23},Tr={type:1},_n={type:25},xi={type:24},Xi={type:26},Za={type:27},Io={type:28},hs={type:29},fs={type:31},Ro={type:32},nl=function(){function k(){this._value=[]}return k.prototype.write=function(U){this._value=this._value.concat(v(U))},k.prototype.read=function(){for(var U=[],K=this.consumeToken();K!==Ro;)U.push(K),K=this.consumeToken();return U},k.prototype.consumeToken=function(){var U=this.consumeCodePoint();switch(U){case Fe:return this.consumeStringToken(Fe);case $e:var K=this.peekCodePoint(0),j=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(ui(K)||gn(j,ae)){var he=Fn(K,j,ae)?Wr:Mr,_e=this.consumeName();return{type:5,value:_e,flags:he}}break;case Rt:if(this.peekCodePoint(0)===nt)return this.consumeCodePoint(),Qr;break;case F:return this.consumeStringToken(F);case P:return Ar;case q:return lr;case Pr:if(this.peekCodePoint(0)===nt)return this.consumeCodePoint(),dr;break;case on:if(Zn(U,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(U),this.consumeNumericToken();break;case Yr:return Or;case te:var Ge=U,We=this.peekCodePoint(0),lt=this.peekCodePoint(1);if(Zn(Ge,We,lt))return this.reconsumeCodePoint(U),this.consumeNumericToken();if(Fn(Ge,We,lt))return this.reconsumeCodePoint(U),this.consumeIdentLikeToken();if(We===te&<===ot)return this.consumeCodePoint(),this.consumeCodePoint(),xi;break;case Gr:if(Zn(U,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(U),this.consumeNumericToken();break;case Cn:if(this.peekCodePoint(0)===Pr)for(this.consumeCodePoint();;){var vt=this.consumeCodePoint();if(vt===Pr&&(vt=this.consumeCodePoint(),vt===Cn))return this.consumeToken();if(vt===nr)return this.consumeToken()}break;case tn:return Xi;case sn:return Za;case xt:if(this.peekCodePoint(0)===je&&this.peekCodePoint(1)===te&&this.peekCodePoint(2)===te)return this.consumeCodePoint(),this.consumeCodePoint(),_n;break;case kt:var Ot=this.peekCodePoint(0),Dt=this.peekCodePoint(1),or=this.peekCodePoint(2);if(Fn(Ot,Dt,or)){var _e=this.consumeName();return{type:7,value:_e}}break;case wt:return Io;case dn:if(gn(U,this.peekCodePoint(0)))return this.reconsumeCodePoint(U),this.consumeIdentLikeToken();break;case Yt:return hs;case Gt:if(this.peekCodePoint(0)===nt)return this.consumeCodePoint(),Zr;break;case Jt:return Nr;case Fr:return Pi;case _r:case Dn:var Kt=this.peekCodePoint(0),qt=this.peekCodePoint(1);return Kt===on&&(In(qt)||qt===hr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(U),this.consumeIdentLikeToken();case gr:if(this.peekCodePoint(0)===nt)return this.consumeCodePoint(),vn;if(this.peekCodePoint(0)===gr)return this.consumeCodePoint(),Dr;break;case Lr:if(this.peekCodePoint(0)===nt)return this.consumeCodePoint(),Un;break;case nr:return Ro}return hn(U)?(this.consumeWhiteSpace(),fs):Jr(U)?(this.reconsumeCodePoint(U),this.consumeNumericToken()):Nn(U)?(this.reconsumeCodePoint(U),this.consumeIdentLikeToken()):{type:6,value:i(U)}},k.prototype.consumeCodePoint=function(){var U=this._value.shift();return typeof U=="undefined"?-1:U},k.prototype.reconsumeCodePoint=function(U){this._value.unshift(U)},k.prototype.peekCodePoint=function(U){return U>=this._value.length?-1:this._value[U]},k.prototype.consumeUnicodeRangeToken=function(){for(var U=[],K=this.consumeCodePoint();In(K)&&U.length<6;)U.push(K),K=this.consumeCodePoint();for(var j=!1;K===hr&&U.length<6;)U.push(K),K=this.consumeCodePoint(),j=!0;if(j){var ae=parseInt(i.apply(void 0,U.map(function(We){return We===hr?tr:We})),16),he=parseInt(i.apply(void 0,U.map(function(We){return We===hr?nn:We})),16);return{type:30,start:ae,end:he}}var _e=parseInt(i.apply(void 0,U),16);if(this.peekCodePoint(0)===te&&In(this.peekCodePoint(1))){this.consumeCodePoint(),K=this.consumeCodePoint();for(var Ge=[];In(K)&&Ge.length<6;)Ge.push(K),K=this.consumeCodePoint();var he=parseInt(i.apply(void 0,Ge),16);return{type:30,start:_e,end:he}}else return{type:30,start:_e,end:_e}},k.prototype.consumeIdentLikeToken=function(){var U=this.consumeName();return U.toLowerCase()==="url"&&this.peekCodePoint(0)===P?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===P?(this.consumeCodePoint(),{type:19,value:U}):{type:20,value:U}},k.prototype.consumeUrlToken=function(){var U=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===nr)return{type:22,value:""};var K=this.peekCodePoint(0);if(K===F||K===Fe){var j=this.consumeStringToken(this.consumeCodePoint());return j.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===nr||this.peekCodePoint(0)===q)?(this.consumeCodePoint(),{type:22,value:j.value}):(this.consumeBadUrlRemnants(),xr)}for(;;){var ae=this.consumeCodePoint();if(ae===nr||ae===q)return{type:22,value:i.apply(void 0,U)};if(hn(ae))return this.consumeWhiteSpace(),this.peekCodePoint(0)===nr||this.peekCodePoint(0)===q?(this.consumeCodePoint(),{type:22,value:i.apply(void 0,U)}):(this.consumeBadUrlRemnants(),xr);if(ae===Fe||ae===F||ae===P||hi(ae))return this.consumeBadUrlRemnants(),xr;if(ae===dn)if(gn(ae,this.peekCodePoint(0)))U.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),xr;else U.push(ae)}},k.prototype.consumeWhiteSpace=function(){for(;hn(this.peekCodePoint(0));)this.consumeCodePoint()},k.prototype.consumeBadUrlRemnants=function(){for(;;){var U=this.consumeCodePoint();if(U===q||U===nr)return;gn(U,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},k.prototype.consumeStringSlice=function(U){for(var K=5e4,j="";U>0;){var ae=Math.min(K,U);j+=i.apply(void 0,this._value.splice(0,ae)),U-=ae}return this._value.shift(),j},k.prototype.consumeStringToken=function(U){var K="",j=0;do{var ae=this._value[j];if(ae===nr||ae===void 0||ae===U)return K+=this.consumeStringSlice(j),{type:0,value:K};if(ae===Sr)return this._value.splice(0,j),Tr;if(ae===dn){var he=this._value[j+1];he!==nr&&he!==void 0&&(he===Sr?(K+=this.consumeStringSlice(j),j=-1,this._value.shift()):gn(ae,he)&&(K+=this.consumeStringSlice(j),K+=i(this.consumeEscapedCodePoint()),j=-1))}j++}while(!0)},k.prototype.consumeNumber=function(){var U=[],K=Ur,j=this.peekCodePoint(0);for((j===on||j===te)&&U.push(this.consumeCodePoint());Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());j=this.peekCodePoint(0);var ae=this.peekCodePoint(1);if(j===Gr&&Jr(ae))for(U.push(this.consumeCodePoint(),this.consumeCodePoint()),K=mr;Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());j=this.peekCodePoint(0),ae=this.peekCodePoint(1);var he=this.peekCodePoint(2);if((j===Vr||j===vr)&&((ae===on||ae===te)&&Jr(he)||Jr(ae)))for(U.push(this.consumeCodePoint(),this.consumeCodePoint()),K=mr;Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());return[er(U),K]},k.prototype.consumeNumericToken=function(){var U=this.consumeNumber(),K=U[0],j=U[1],ae=this.peekCodePoint(0),he=this.peekCodePoint(1),_e=this.peekCodePoint(2);if(Fn(ae,he,_e)){var Ge=this.consumeName();return{type:15,number:K,flags:j,unit:Ge}}return ae===$?(this.consumeCodePoint(),{type:16,number:K,flags:j}):{type:17,number:K,flags:j}},k.prototype.consumeEscapedCodePoint=function(){var U=this.consumeCodePoint();if(In(U)){for(var K=i(U);In(this.peekCodePoint(0))&&K.length<6;)K+=i(this.consumeCodePoint());hn(this.peekCodePoint(0))&&this.consumeCodePoint();var j=parseInt(K,16);return j===0||Jn(j)||j>1114111?Hr:j}return U===nr?Hr:U},k.prototype.consumeName=function(){for(var U="";;){var K=this.consumeCodePoint();if(ui(K))U+=i(K);else if(gn(K,this.peekCodePoint(0)))U+=i(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(K),U}},k}(),il=function(){function k(U){this._tokens=U}return k.create=function(U){var K=new nl;return K.write(U),new k(K.read())},k.parseValue=function(U){return k.create(U).parseComponentValue()},k.parseValues=function(U){return k.create(U).parseComponentValues()},k.prototype.parseComponentValue=function(){for(var U=this.consumeToken();U.type===31;)U=this.consumeToken();if(U.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(U);var K=this.consumeComponentValue();do U=this.consumeToken();while(U.type===31);if(U.type===32)return K;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},k.prototype.parseComponentValues=function(){for(var U=[];;){var K=this.consumeComponentValue();if(K.type===32)return U;U.push(K),U.push()}},k.prototype.consumeComponentValue=function(){var U=this.consumeToken();switch(U.type){case 11:case 28:case 2:return this.consumeSimpleBlock(U.type);case 19:return this.consumeFunction(U)}return U},k.prototype.consumeSimpleBlock=function(U){for(var K={type:U,values:[]},j=this.consumeToken();;){if(j.type===32||Di(j,U))return K;this.reconsumeToken(j),K.values.push(this.consumeComponentValue()),j=this.consumeToken()}},k.prototype.consumeFunction=function(U){for(var K={name:U.value,values:[],type:18};;){var j=this.consumeToken();if(j.type===32||j.type===3)return K;this.reconsumeToken(j),K.values.push(this.consumeComponentValue())}},k.prototype.consumeToken=function(){var U=this._tokens.shift();return typeof U=="undefined"?Ro:U},k.prototype.reconsumeToken=function(U){this._tokens.unshift(U)},k}(),_a=function(k){return k.type===15},Aa=function(k){return k.type===17},yn=function(k){return k.type===20},$a=function(k){return k.type===0},Bi=function(k,U){return yn(k)&&k.value===U},qa=function(k){return k.type!==31},Yi=function(k){return k.type!==31&&k.type!==4},Ti=function(k){var U=[],K=[];return k.forEach(function(j){if(j.type===4){if(K.length===0)throw new Error("Error parsing function args, zero tokens for arg");U.push(K),K=[];return}j.type!==31&&K.push(j)}),K.length&&U.push(K),U},Di=function(k,U){return U===11&&k.type===12||U===28&&k.type===29?!0:U===2&&k.type===3},Ai=function(k){return k.type===17||k.type===15},Mn=function(k){return k.type===16||Ai(k)},al=function(k){return k.length>1?[k[0],k[1]]:[k[0]]},Xn={type:17,number:0,flags:Ur},ps={type:16,number:50,flags:Ur},ki={type:16,number:100,flags:Ur},ca=function(k,U,K){var j=k[0],ae=k[1];return[an(j,U),an(typeof ae!="undefined"?ae:j,K)]},an=function(k,U){if(k.type===16)return k.number/100*U;if(_a(k))switch(k.unit){case"rem":case"em":return 16*k.number;case"px":default:return k.number}return k.number},Si="deg",ms="grad",gs="rad",ol="turn",Mo={name:"angle",parse:function(k,U){if(U.type===15)switch(U.unit){case Si:return Math.PI*U.number/180;case ms:return Math.PI/200*U.number;case gs:return U.number;case ol:return Math.PI*2*U.number}throw new Error("Unsupported angle type")}},sl=function(k){return k.type===15&&(k.unit===Si||k.unit===ms||k.unit===gs||k.unit===ol)},vs=function(k){var U=k.filter(yn).map(function(K){return K.value}).join(" ");switch(U){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Xn,Xn];case"to top":case"bottom":return fi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Xn,ki];case"to right":case"left":return fi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ki,ki];case"to bottom":case"top":return fi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ki,Xn];case"to left":case"right":return fi(270)}return 0},fi=function(k){return Math.PI*k/180},bi={name:"color",parse:function(k,U){if(U.type===18){var K=ll[U.name];if(typeof K=="undefined")throw new Error('Attempting to parse an unsupported color function "'+U.name+'"');return K(k,U.values)}if(U.type===5){if(U.value.length===3){var j=U.value.substring(0,1),ae=U.value.substring(1,2),he=U.value.substring(2,3);return Ii(parseInt(j+j,16),parseInt(ae+ae,16),parseInt(he+he,16),1)}if(U.value.length===4){var j=U.value.substring(0,1),ae=U.value.substring(1,2),he=U.value.substring(2,3),_e=U.value.substring(3,4);return Ii(parseInt(j+j,16),parseInt(ae+ae,16),parseInt(he+he,16),parseInt(_e+_e,16)/255)}if(U.value.length===6){var j=U.value.substring(0,2),ae=U.value.substring(2,4),he=U.value.substring(4,6);return Ii(parseInt(j,16),parseInt(ae,16),parseInt(he,16),1)}if(U.value.length===8){var j=U.value.substring(0,2),ae=U.value.substring(2,4),he=U.value.substring(4,6),_e=U.value.substring(6,8);return Ii(parseInt(j,16),parseInt(ae,16),parseInt(he,16),parseInt(_e,16)/255)}}if(U.type===20){var Ge=Li[U.value.toUpperCase()];if(typeof Ge!="undefined")return Ge}return Li.TRANSPARENT}},Ni=function(k){return(255&k)===0},Kn=function(k){var U=255&k,K=255&k>>8,j=255&k>>16,ae=255&k>>24;return U<255?"rgba("+ae+","+j+","+K+","+U/255+")":"rgb("+ae+","+j+","+K+")"},Ii=function(k,U,K,j){return(k<<24|U<<16|K<<8|Math.round(j*255)<<0)>>>0},eo=function(k,U){if(k.type===17)return k.number;if(k.type===16){var K=U===3?1:255;return U===3?k.number/100*K:Math.round(k.number/100*K)}return 0},ys=function(k,U){var K=U.filter(Yi);if(K.length===3){var j=K.map(eo),ae=j[0],he=j[1],_e=j[2];return Ii(ae,he,_e,1)}if(K.length===4){var Ge=K.map(eo),ae=Ge[0],he=Ge[1],_e=Ge[2],We=Ge[3];return Ii(ae,he,_e,We)}return 0};function to(k,U,K){return K<0&&(K+=1),K>=1&&(K-=1),K<1/6?(U-k)*K*6+k:K<1/2?U:K<2/3?(U-k)*6*(2/3-K)+k:k}var Ei=function(k,U){var K=U.filter(Yi),j=K[0],ae=K[1],he=K[2],_e=K[3],Ge=(j.type===17?fi(j.number):Mo.parse(k,j))/(Math.PI*2),We=Mn(ae)?ae.number/100:0,lt=Mn(he)?he.number/100:0,vt=typeof _e!="undefined"&&Mn(_e)?an(_e,1):1;if(We===0)return Ii(lt*255,lt*255,lt*255,1);var Ot=lt<=.5?lt*(We+1):lt+We-lt*We,Dt=lt*2-Ot,or=to(Dt,Ot,Ge+1/3),Kt=to(Dt,Ot,Ge),qt=to(Dt,Ot,Ge-1/3);return Ii(or*255,Kt*255,qt*255,vt)},ll={hsl:Ei,hsla:Ei,rgb:ys,rgba:ys},da=function(k,U){return bi.parse(k,il.create(U).parseComponentValue())},Li={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ul={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(k,U){return U.map(function(K){if(yn(K))switch(K.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Al={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oa=function(k,U){var K=bi.parse(k,U[0]),j=U[1];return j&&Mn(j)?{color:K,stop:j}:{color:K,stop:null}},cl=function(k,U){var K=k[0],j=k[k.length-1];K.stop===null&&(K.stop=Xn),j.stop===null&&(j.stop=ki);for(var ae=[],he=0,_e=0;_e<k.length;_e++){var Ge=k[_e].stop;if(Ge!==null){var We=an(Ge,U);We>he?ae.push(We):ae.push(he),he=We}else ae.push(null)}for(var lt=null,_e=0;_e<ae.length;_e++){var vt=ae[_e];if(vt===null)lt===null&&(lt=_e);else if(lt!==null){for(var Ot=_e-lt,Dt=ae[lt-1],or=(vt-Dt)/(Ot+1),Kt=1;Kt<=Ot;Kt++)ae[lt+Kt-1]=or*Kt;lt=null}}return k.map(function(qt,Br){var ar=qt.color;return{color:ar,stop:Math.max(Math.min(1,ae[Br]/U),0)}})},vu=function(k,U,K){var j=U/2,ae=K/2,he=an(k[0],U)-j,_e=ae-an(k[1],K);return(Math.atan2(_e,he)+Math.PI*2)%(Math.PI*2)},yu=function(k,U,K){var j=typeof k=="number"?k:vu(k,U,K),ae=Math.abs(U*Math.sin(j))+Math.abs(K*Math.cos(j)),he=U/2,_e=K/2,Ge=ae/2,We=Math.sin(j-Math.PI/2)*Ge,lt=Math.cos(j-Math.PI/2)*Ge;return[ae,he-lt,he+lt,_e-We,_e+We]},$n=function(k,U){return Math.sqrt(k*k+U*U)},ha=function(k,U,K,j,ae){var he=[[0,0],[0,U],[k,0],[k,U]];return he.reduce(function(_e,Ge){var We=Ge[0],lt=Ge[1],vt=$n(K-We,j-lt);return(ae?vt<_e.optimumDistance:vt>_e.optimumDistance)?{optimumCorner:Ge,optimumDistance:vt}:_e},{optimumDistance:ae?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Da=function(k,U,K,j,ae){var he=0,_e=0;switch(k.size){case 0:k.shape===0?he=_e=Math.min(Math.abs(U),Math.abs(U-j),Math.abs(K),Math.abs(K-ae)):k.shape===1&&(he=Math.min(Math.abs(U),Math.abs(U-j)),_e=Math.min(Math.abs(K),Math.abs(K-ae)));break;case 2:if(k.shape===0)he=_e=Math.min($n(U,K),$n(U,K-ae),$n(U-j,K),$n(U-j,K-ae));else if(k.shape===1){var Ge=Math.min(Math.abs(K),Math.abs(K-ae))/Math.min(Math.abs(U),Math.abs(U-j)),We=ha(j,ae,U,K,!0),lt=We[0],vt=We[1];he=$n(lt-U,(vt-K)/Ge),_e=Ge*he}break;case 1:k.shape===0?he=_e=Math.max(Math.abs(U),Math.abs(U-j),Math.abs(K),Math.abs(K-ae)):k.shape===1&&(he=Math.max(Math.abs(U),Math.abs(U-j)),_e=Math.max(Math.abs(K),Math.abs(K-ae)));break;case 3:if(k.shape===0)he=_e=Math.max($n(U,K),$n(U,K-ae),$n(U-j,K),$n(U-j,K-ae));else if(k.shape===1){var Ge=Math.max(Math.abs(K),Math.abs(K-ae))/Math.max(Math.abs(U),Math.abs(U-j)),Ot=ha(j,ae,U,K,!1),lt=Ot[0],vt=Ot[1];he=$n(lt-U,(vt-K)/Ge),_e=Ge*he}break}return Array.isArray(k.size)&&(he=an(k.size[0],j),_e=k.size.length===2?an(k.size[1],ae):he),[he,_e]},bs=function(k,U){var K=fi(180),j=[];return Ti(U).forEach(function(ae,he){if(he===0){var _e=ae[0];if(_e.type===20&&_e.value==="to"){K=vs(ae);return}else if(sl(_e)){K=Mo.parse(k,_e);return}}var Ge=Oa(k,ae);j.push(Ge)}),{angle:K,stops:j,type:1}},Ia=function(k,U){var K=fi(180),j=[];return Ti(U).forEach(function(ae,he){if(he===0){var _e=ae[0];if(_e.type===20&&["top","left","right","bottom"].indexOf(_e.value)!==-1){K=vs(ae);return}else if(sl(_e)){K=(Mo.parse(k,_e)+fi(270))%fi(360);return}}var Ge=Oa(k,ae);j.push(Ge)}),{angle:K,stops:j,type:1}},dl=function(k,U){var K=fi(180),j=[],ae=1,he=0,_e=3,Ge=[];return Ti(U).forEach(function(We,lt){var vt=We[0];if(lt===0){if(yn(vt)&&vt.value==="linear"){ae=1;return}else if(yn(vt)&&vt.value==="radial"){ae=2;return}}if(vt.type===18){if(vt.name==="from"){var Ot=bi.parse(k,vt.values[0]);j.push({stop:Xn,color:Ot})}else if(vt.name==="to"){var Ot=bi.parse(k,vt.values[0]);j.push({stop:ki,color:Ot})}else if(vt.name==="color-stop"){var Dt=vt.values.filter(Yi);if(Dt.length===2){var Ot=bi.parse(k,Dt[1]),or=Dt[0];Aa(or)&&j.push({stop:{type:16,number:or.number*100,flags:or.flags},color:Ot})}}}}),ae===1?{angle:(K+fi(180))%fi(360),stops:j,type:ae}:{size:_e,shape:he,stops:j,position:Ge,type:ae}},Fo="closest-side",Ji="farthest-side",Zi="closest-corner",ri="farthest-corner",Hi="circle",Qi="ellipse",ro="cover",hl="contain",fl=function(k,U){var K=0,j=3,ae=[],he=[];return Ti(U).forEach(function(_e,Ge){var We=!0;if(Ge===0){var lt=!1;We=_e.reduce(function(Ot,Dt){if(lt)if(yn(Dt))switch(Dt.value){case"center":return he.push(ps),Ot;case"top":case"left":return he.push(Xn),Ot;case"right":case"bottom":return he.push(ki),Ot}else(Mn(Dt)||Ai(Dt))&&he.push(Dt);else if(yn(Dt))switch(Dt.value){case Hi:return K=0,!1;case Qi:return K=1,!1;case"at":return lt=!0,!1;case Fo:return j=0,!1;case ro:case Ji:return j=1,!1;case hl:case Zi:return j=2,!1;case ri:return j=3,!1}else if(Ai(Dt)||Mn(Dt))return Array.isArray(j)||(j=[]),j.push(Dt),!1;return Ot},We)}if(We){var vt=Oa(k,_e);ae.push(vt)}}),{size:j,shape:K,stops:ae,position:he,type:2}},$i=function(k,U){var K=0,j=3,ae=[],he=[];return Ti(U).forEach(function(_e,Ge){var We=!0;if(Ge===0?We=_e.reduce(function(vt,Ot){if(yn(Ot))switch(Ot.value){case"center":return he.push(ps),!1;case"top":case"left":return he.push(Xn),!1;case"right":case"bottom":return he.push(ki),!1}else if(Mn(Ot)||Ai(Ot))return he.push(Ot),!1;return vt},We):Ge===1&&(We=_e.reduce(function(vt,Ot){if(yn(Ot))switch(Ot.value){case Hi:return K=0,!1;case Qi:return K=1,!1;case hl:case Fo:return j=0,!1;case Ji:return j=1,!1;case Zi:return j=2,!1;case ro:case ri:return j=3,!1}else if(Ai(Ot)||Mn(Ot))return Array.isArray(j)||(j=[]),j.push(Ot),!1;return vt},We)),We){var lt=Oa(k,_e);ae.push(lt)}}),{size:j,shape:K,stops:ae,position:he,type:2}},pl=function(k){return k.type===1},ml=function(k){return k.type===2},Ra={name:"image",parse:function(k,U){if(U.type===22){var K={url:U.value,type:0};return k.cache.addImage(U.value),K}if(U.type===18){var j=Uo[U.name];if(typeof j=="undefined")throw new Error('Attempting to parse an unsupported image function "'+U.name+'"');return j(k,U.values)}throw new Error("Unsupported image type "+U.type)}};function bu(k){return!(k.type===20&&k.value==="none")&&(k.type!==18||!!Uo[k.name])}var Uo={"linear-gradient":bs,"-moz-linear-gradient":Ia,"-ms-linear-gradient":Ia,"-o-linear-gradient":Ia,"-webkit-linear-gradient":Ia,"radial-gradient":fl,"-moz-radial-gradient":$i,"-ms-radial-gradient":$i,"-o-radial-gradient":$i,"-webkit-radial-gradient":$i,"-webkit-gradient":dl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(k,U){if(U.length===0)return[];var K=U[0];return K.type===20&&K.value==="none"?[]:U.filter(function(j){return Yi(j)&&bu(j)}).map(function(j){return Ra.parse(k,j)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(k,U){return U.map(function(K){if(yn(K))switch(K.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Es={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(k,U){return Ti(U).map(function(K){return K.filter(Mn)}).map(al)}},Ma={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(k,U){return Ti(U).map(function(K){return K.filter(yn).map(function(j){return j.value}).join(" ")}).map(Po)}},Po=function(k){switch(k){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},fa;(function(k){k.AUTO="auto",k.CONTAIN="contain",k.COVER="cover"})(fa||(fa={}));var ko={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(k,U){return Ti(U).map(function(K){return K.filter(Eu)})}},Eu=function(k){return yn(k)||Mn(k)},No=function(k){return{name:"border-"+k+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Cu=No("top"),Cs=No("right"),ws=No("bottom"),Fa=No("left"),qi=function(k){return{name:"border-radius-"+k,initialValue:"0 0",prefix:!1,type:1,parse:function(U,K){return al(K.filter(Mn))}}},wu=qi("top-left"),Ho=qi("top-right"),yl=qi("bottom-right"),no=qi("bottom-left"),io=function(k){return{name:"border-"+k+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(U,K){switch(K){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},pa=io("top"),ao=io("right"),ma=io("bottom"),oo=io("left"),ji=function(k){return{name:"border-"+k+"-width",initialValue:"0",type:0,prefix:!1,parse:function(U,K){return _a(K)?K.number:0}}},bl=ji("top"),El=ji("right"),Cl=ji("bottom"),xu=ji("left"),ga={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},va={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(k,U){switch(U){case"rtl":return 1;case"ltr":default:return 0}}},Bu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(k,U){return U.filter(yn).reduce(function(K,j){return K|Tu(j.value)},0)}},Tu=function(k){switch(k){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Su={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(k,U){switch(U){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Lu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(k,U){return U.type===20&&U.value==="normal"?0:U.type===17||U.type===15?U.number:0}},Qo;(function(k){k.NORMAL="normal",k.STRICT="strict"})(Qo||(Qo={}));var _u={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(k,U){switch(U){case"strict":return Qo.STRICT;case"normal":default:return Qo.NORMAL}}},ci={name:"line-height",initialValue:"normal",prefix:!1,type:4},Hn=function(k,U){return yn(k)&&k.value==="normal"?1.2*U:k.type===17?U*k.number:Mn(k)?an(k,U):U},ni={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(k,U){return U.type===20&&U.value==="none"?null:Ra.parse(k,U)}},zn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(k,U){switch(U){case"inside":return 0;case"outside":default:return 1}}},ya={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(k,U){switch(U){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},jo=function(k){return{name:"margin-"+k,initialValue:"0",prefix:!1,type:4}},Ko=jo("top"),Ou=jo("right"),Du=jo("bottom"),Iu=jo("left"),xs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(k,U){return U.filter(yn).map(function(K){switch(K.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},wl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(k,U){switch(U){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ua=function(k){return{name:"padding-"+k,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ru=Ua("top"),Bs=Ua("right"),Ts=Ua("bottom"),xl=Ua("left"),Bl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(k,U){switch(U){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ss={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(k,U){switch(U){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Tl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(k,U){return U.length===1&&Bi(U[0],"none")?[]:Ti(U).map(function(K){for(var j={color:Li.TRANSPARENT,offsetX:Xn,offsetY:Xn,blur:Xn},ae=0,he=0;he<K.length;he++){var _e=K[he];Ai(_e)?(ae===0?j.offsetX=_e:ae===1?j.offsetY=_e:j.blur=_e,ae++):j.color=bi.parse(k,_e)}return j})}},so={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(k,U){switch(U){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mu={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(k,U){if(U.type===20&&U.value==="none")return null;if(U.type===18){var K=Sl[U.name];if(typeof K=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+U.name+'"');return K(U.values)}return null}},zo=function(k){var U=k.filter(function(K){return K.type===17}).map(function(K){return K.number});return U.length===6?U:null},pi=function(k){var U=k.filter(function(We){return We.type===17}).map(function(We){return We.number}),K=U[0],j=U[1];U[2],U[3];var ae=U[4],he=U[5];U[6],U[7],U[8],U[9],U[10],U[11];var _e=U[12],Ge=U[13];return U[14],U[15],U.length===16?[K,j,ae,he,_e,Ge]:null},Sl={matrix:zo,matrix3d:pi},Ll={type:16,number:50,flags:Ur},_l=[Ll,Ll],mi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(k,U){var K=U.filter(Mn);return K.length!==2?_l:[K[0],K[1]]}},qr={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(k,U){switch(U){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},li;(function(k){k.NORMAL="normal",k.BREAK_ALL="break-all",k.KEEP_ALL="keep-all"})(li||(li={}));for(var ea={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(k,U){switch(U){case"break-all":return li.BREAK_ALL;case"keep-all":return li.KEEP_ALL;case"normal":default:return li.NORMAL}}},ta={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(k,U){if(U.type===20)return{auto:!0,order:0};if(Aa(U))return{auto:!1,order:U.number};throw new Error("Invalid z-index number parsed")}},Ls={name:"time",parse:function(k,U){if(U.type===15)switch(U.unit.toLowerCase()){case"s":return 1e3*U.number;case"ms":return U.number}throw new Error("Unsupported time type")}},_s={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(k,U){return Aa(U)?U.number:1}},Ol={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fu={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(k,U){return U.filter(yn).map(function(K){switch(K.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(K){return K!==0})}},Os={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(k,U){var K=[],j=[];return U.forEach(function(ae){switch(ae.type){case 20:case 0:K.push(ae.value);break;case 17:K.push(ae.number.toString());break;case 4:j.push(K.join(" ")),K.length=0;break}}),K.length&&j.push(K.join(" ")),j.map(function(ae){return ae.indexOf(" ")===-1?ae:"'"+ae+"'"})}},lo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Dl={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(k,U){if(Aa(U))return U.number;if(yn(U))switch(U.value){case"bold":return 700;case"normal":default:return 400}return 400}},Ds={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(k,U){return U.filter(yn).map(function(K){return K.value})}},ra={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(k,U){switch(U){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Qn=function(k,U){return(k&U)!==0},Il={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(k,U){if(U.length===0)return[];var K=U[0];return K.type===20&&K.value==="none"?[]:U}},Uu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(k,U){if(U.length===0)return null;var K=U[0];if(K.type===20&&K.value==="none")return null;for(var j=[],ae=U.filter(qa),he=0;he<ae.length;he++){var _e=ae[he],Ge=ae[he+1];if(_e.type===20){var We=Ge&&Aa(Ge)?Ge.number:1;j.push({counter:_e.value,increment:We})}}return j}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(k,U){if(U.length===0)return[];for(var K=[],j=U.filter(qa),ae=0;ae<j.length;ae++){var he=j[ae],_e=j[ae+1];if(yn(he)&&he.value!=="none"){var Ge=_e&&Aa(_e)?_e.number:0;K.push({counter:he.value,reset:Ge})}}return K}},Is={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(k,U){return U.filter(_a).map(function(K){return Ls.parse(k,K)})}},Rl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(k,U){if(U.length===0)return null;var K=U[0];if(K.type===20&&K.value==="none")return null;var j=[],ae=U.filter($a);if(ae.length%2!==0)return null;for(var he=0;he<ae.length;he+=2){var _e=ae[he].value,Ge=ae[he+1].value;j.push({open:_e,close:Ge})}return j}},Ml=function(k,U,K){if(!k)return"";var j=k[Math.min(U,k.length-1)];return j?K?j.open:j.close:""},Fl={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(k,U){return U.length===1&&Bi(U[0],"none")?[]:Ti(U).map(function(K){for(var j={color:255,offsetX:Xn,offsetY:Xn,blur:Xn,spread:Xn,inset:!1},ae=0,he=0;he<K.length;he++){var _e=K[he];Bi(_e,"inset")?j.inset=!0:Ai(_e)?(ae===0?j.offsetX=_e:ae===1?j.offsetY=_e:ae===2?j.blur=_e:j.spread=_e,ae++):j.color=bi.parse(k,_e)}return j})}},Pu={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(k,U){var K=[0,1,2],j=[];return U.filter(yn).forEach(function(ae){switch(ae.value){case"stroke":j.push(1);break;case"fill":j.push(0);break;case"markers":j.push(2);break}}),K.forEach(function(ae){j.indexOf(ae)===-1&&j.push(ae)}),j}},ku={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Go={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(k,U){return _a(U)?U.number:0}},Ul=function(){function k(U,K){var j,ae;this.animationDuration=ir(U,Is,K.animationDuration),this.backgroundClip=ir(U,ul,K.backgroundClip),this.backgroundColor=ir(U,Al,K.backgroundColor),this.backgroundImage=ir(U,gl,K.backgroundImage),this.backgroundOrigin=ir(U,vl,K.backgroundOrigin),this.backgroundPosition=ir(U,Es,K.backgroundPosition),this.backgroundRepeat=ir(U,Ma,K.backgroundRepeat),this.backgroundSize=ir(U,ko,K.backgroundSize),this.borderTopColor=ir(U,Cu,K.borderTopColor),this.borderRightColor=ir(U,Cs,K.borderRightColor),this.borderBottomColor=ir(U,ws,K.borderBottomColor),this.borderLeftColor=ir(U,Fa,K.borderLeftColor),this.borderTopLeftRadius=ir(U,wu,K.borderTopLeftRadius),this.borderTopRightRadius=ir(U,Ho,K.borderTopRightRadius),this.borderBottomRightRadius=ir(U,yl,K.borderBottomRightRadius),this.borderBottomLeftRadius=ir(U,no,K.borderBottomLeftRadius),this.borderTopStyle=ir(U,pa,K.borderTopStyle),this.borderRightStyle=ir(U,ao,K.borderRightStyle),this.borderBottomStyle=ir(U,ma,K.borderBottomStyle),this.borderLeftStyle=ir(U,oo,K.borderLeftStyle),this.borderTopWidth=ir(U,bl,K.borderTopWidth),this.borderRightWidth=ir(U,El,K.borderRightWidth),this.borderBottomWidth=ir(U,Cl,K.borderBottomWidth),this.borderLeftWidth=ir(U,xu,K.borderLeftWidth),this.boxShadow=ir(U,Fl,K.boxShadow),this.color=ir(U,ga,K.color),this.direction=ir(U,va,K.direction),this.display=ir(U,Bu,K.display),this.float=ir(U,Su,K.cssFloat),this.fontFamily=ir(U,Os,K.fontFamily),this.fontSize=ir(U,lo,K.fontSize),this.fontStyle=ir(U,ra,K.fontStyle),this.fontVariant=ir(U,Ds,K.fontVariant),this.fontWeight=ir(U,Dl,K.fontWeight),this.letterSpacing=ir(U,Lu,K.letterSpacing),this.lineBreak=ir(U,_u,K.lineBreak),this.lineHeight=ir(U,ci,K.lineHeight),this.listStyleImage=ir(U,ni,K.listStyleImage),this.listStylePosition=ir(U,zn,K.listStylePosition),this.listStyleType=ir(U,ya,K.listStyleType),this.marginTop=ir(U,Ko,K.marginTop),this.marginRight=ir(U,Ou,K.marginRight),this.marginBottom=ir(U,Du,K.marginBottom),this.marginLeft=ir(U,Iu,K.marginLeft),this.opacity=ir(U,_s,K.opacity);var he=ir(U,xs,K.overflow);this.overflowX=he[0],this.overflowY=he[he.length>1?1:0],this.overflowWrap=ir(U,wl,K.overflowWrap),this.paddingTop=ir(U,Ru,K.paddingTop),this.paddingRight=ir(U,Bs,K.paddingRight),this.paddingBottom=ir(U,Ts,K.paddingBottom),this.paddingLeft=ir(U,xl,K.paddingLeft),this.paintOrder=ir(U,Pu,K.paintOrder),this.position=ir(U,Ss,K.position),this.textAlign=ir(U,Bl,K.textAlign),this.textDecorationColor=ir(U,Ol,(j=K.textDecorationColor)!==null&&j!==void 0?j:K.color),this.textDecorationLine=ir(U,Fu,(ae=K.textDecorationLine)!==null&&ae!==void 0?ae:K.textDecoration),this.textShadow=ir(U,Tl,K.textShadow),this.textTransform=ir(U,so,K.textTransform),this.transform=ir(U,Mu,K.transform),this.transformOrigin=ir(U,mi,K.transformOrigin),this.visibility=ir(U,qr,K.visibility),this.webkitTextStrokeColor=ir(U,ku,K.webkitTextStrokeColor),this.webkitTextStrokeWidth=ir(U,Go,K.webkitTextStrokeWidth),this.wordBreak=ir(U,ea,K.wordBreak),this.zIndex=ir(U,ta,K.zIndex)}return k.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},k.prototype.isTransparent=function(){return Ni(this.backgroundColor)},k.prototype.isTransformed=function(){return this.transform!==null},k.prototype.isPositioned=function(){return this.position!==0},k.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},k.prototype.isFloating=function(){return this.float!==0},k.prototype.isInlineLevel=function(){return Qn(this.display,4)||Qn(this.display,33554432)||Qn(this.display,268435456)||Qn(this.display,536870912)||Qn(this.display,67108864)||Qn(this.display,134217728)},k}(),Nu=function(){function k(U,K){this.content=ir(U,Il,K.content),this.quotes=ir(U,Rl,K.quotes)}return k}(),Pl=function(){function k(U,K){this.counterIncrement=ir(U,Uu,K.counterIncrement),this.counterReset=ir(U,Wo,K.counterReset)}return k}(),ir=function(k,U,K){var j=new nl,ae=K!==null&&typeof K!="undefined"?K.toString():U.initialValue;j.write(ae);var he=new il(j.read());switch(U.type){case 2:var _e=he.parseComponentValue();return U.parse(k,yn(_e)?_e.value:U.initialValue);case 0:return U.parse(k,he.parseComponentValue());case 1:return U.parse(k,he.parseComponentValues());case 4:return he.parseComponentValue();case 3:switch(U.format){case"angle":return Mo.parse(k,he.parseComponentValue());case"color":return bi.parse(k,he.parseComponentValue());case"image":return Ra.parse(k,he.parseComponentValue());case"length":var Ge=he.parseComponentValue();return Ai(Ge)?Ge:Xn;case"length-percentage":var We=he.parseComponentValue();return Mn(We)?We:Xn;case"time":return Ls.parse(k,he.parseComponentValue())}break}},Pa="data-html2canvas-debug",Rs=function(k){var U=k.getAttribute(Pa);switch(U){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ka=function(k,U){var K=Rs(k);return K===1||U===K},_i=function(){function k(U,K){if(this.context=U,this.textNodes=[],this.elements=[],this.flags=0,ka(K,3))debugger;this.styles=new Ul(U,window.getComputedStyle(K,null)),os(K)&&(this.styles.animationDuration.some(function(j){return j>0})&&(K.style.animationDuration="0s"),this.styles.transform!==null&&(K.style.transform="none")),this.bounds=s(this.context,K),ka(K,4)&&(this.flags|=16)}return k}(),Ms="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ao=0;Ao<Fs.length;Ao++)uo[Fs.charCodeAt(Ao)]=Ao;for(var qn=function(k){var U=k.length*.75,K=k.length,j,ae=0,he,_e,Ge,We;k[k.length-1]==="="&&(U--,k[k.length-2]==="="&&U--);var lt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(U):new Array(U),vt=Array.isArray(lt)?lt:new Uint8Array(lt);for(j=0;j<K;j+=4)he=uo[k.charCodeAt(j)],_e=uo[k.charCodeAt(j+1)],Ge=uo[k.charCodeAt(j+2)],We=uo[k.charCodeAt(j+3)],vt[ae++]=he<<2|_e>>4,vt[ae++]=(_e&15)<<4|Ge>>2,vt[ae++]=(Ge&3)<<6|We&63;return lt},Vo=function(k){for(var U=k.length,K=[],j=0;j<U;j+=2)K.push(k[j+1]<<8|k[j]);return K},kl=function(k){for(var U=k.length,K=[],j=0;j<U;j+=4)K.push(k[j+3]<<24|k[j+2]<<16|k[j+1]<<8|k[j]);return K},na=5,Xo=6+5,ia=2,Yo=Xo-na,Us=65536>>na,Nl=1<<na,Jo=Nl-1,Na=1024>>na,Hl=Us+Na,Zo=Hl,Ql=2048>>6,co=Zo+Ql,Hu=65536>>Xo,Ha=1<<Yo,jl=Ha-1,Ps=function(k,U,K){return k.slice?k.slice(U,K):new Uint16Array(Array.prototype.slice.call(k,U,K))},Kl=function(k,U,K){return k.slice?k.slice(U,K):new Uint32Array(Array.prototype.slice.call(k,U,K))},ho=function(k,U){var K=qn(k),j=Array.isArray(K)?kl(K):new Uint32Array(K),ae=Array.isArray(K)?Vo(K):new Uint16Array(K),he=24,_e=Ps(ae,he/2,j[4]/2),Ge=j[5]===2?Ps(ae,(he+j[4])/2):Kl(j,Math.ceil((he+j[4])/4));return new fo(j[0],j[1],j[2],j[3],_e,Ge)},fo=function(){function k(U,K,j,ae,he,_e){this.initialValue=U,this.errorValue=K,this.highStart=j,this.highValueIndex=ae,this.index=he,this.data=_e}return k.prototype.get=function(U){var K;if(U>=0){if(U<55296||U>56319&&U<=65535)return K=this.index[U>>na],K=(K<<ia)+(U&Jo),this.data[K];if(U<=65535)return K=this.index[Us+(U-55296>>na)],K=(K<<ia)+(U&Jo),this.data[K];if(U<this.highStart)return K=co-Hu+(U>>Xo),K=this.index[K],K+=U>>na&jl,K=this.index[K],K=(K<<ia)+(U&Jo),this.data[K];if(U<=1114111)return this.data[this.highValueIndex]}return this.errorValue},k}(),Qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",po=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),mo=0;mo<Qa.length;mo++)po[Qa.charCodeAt(mo)]=mo;var Qu=1,$o=2,Ri=3,ba=4,ja=5,ju=7,ks=8,Ns=9,Hs=10,zl=11,ii=12,Qs=13,Wl=14,js=15,Ku=function(k){for(var U=[],K=0,j=k.length;K<j;){var ae=k.charCodeAt(K++);if(ae>=55296&&ae<=56319&&K<j){var he=k.charCodeAt(K++);(he&64512)===56320?U.push(((ae&1023)<<10)+(he&1023)+65536):(U.push(ae),K--)}else U.push(ae)}return U},Gl=function(){for(var k=[],U=0;U<arguments.length;U++)k[U]=arguments[U];if(String.fromCodePoint)return String.fromCodePoint.apply(String,k);var K=k.length;if(!K)return"";for(var j=[],ae=-1,he="";++ae<K;){var _e=k[ae];_e<=65535?j.push(_e):(_e-=65536,j.push((_e>>10)+55296,_e%1024+56320)),(ae+1===K||j.length>16384)&&(he+=String.fromCharCode.apply(String,j),j.length=0)}return he},Vl=ho(Ms),gi="\xD7",Ks="\xF7",zu=function(k){return Vl.get(k)},Wu=function(k,U,K){var j=K-2,ae=U[j],he=U[K-1],_e=U[K];if(he===$o&&_e===Ri)return gi;if(he===$o||he===Ri||he===ba)return Ks;if(_e===$o||_e===Ri||_e===ba)return Ks;if(he===ks&&[ks,Ns,zl,ii].indexOf(_e)!==-1)return gi;if((he===zl||he===Ns)&&(_e===Ns||_e===Hs))return gi;if((he===ii||he===Hs)&&_e===Hs)return gi;if(_e===Qs||_e===ja)return gi;if(_e===ju)return gi;if(he===Qu)return gi;if(he===Qs&&_e===Wl){for(;ae===ja;)ae=U[--j];if(ae===Wl)return gi}if(he===js&&_e===js){for(var Ge=0;ae===js;)Ge++,ae=U[--j];if(Ge%2===0)return gi}return Ks},aa=function(k){var U=Ku(k),K=U.length,j=0,ae=0,he=U.map(zu);return{next:function(){if(j>=K)return{done:!0,value:null};for(var _e=gi;j<K&&(_e=Wu(U,he,++j))===gi;);if(_e!==gi||j===K){var Ge=Gl.apply(null,U.slice(ae,j));return ae=j,{value:Ge,done:!1}}return{done:!0,value:null}}}},go=function(k){for(var U=aa(k),K=[],j;!(j=U.next()).done;)j.value&&K.push(j.value.slice());return K},qo=function(k){var U=123;if(k.createRange){var K=k.createRange();if(K.getBoundingClientRect){var j=k.createElement("boundtest");j.style.height=U+"px",j.style.display="block",k.body.appendChild(j),K.selectNode(j);var ae=K.getBoundingClientRect(),he=Math.round(ae.height);if(k.body.removeChild(j),he===U)return!0}}return!1},vo=function(k){var U=k.createElement("boundtest");U.style.width="50px",U.style.display="block",U.style.fontSize="12px",U.style.letterSpacing="0px",U.style.wordSpacing="0px",k.body.appendChild(U);var K=k.createRange();U.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var j=U.firstChild,ae=v(j.data).map(function(We){return i(We)}),he=0,_e={},Ge=ae.every(function(We,lt){K.setStart(j,he),K.setEnd(j,he+We.length);var vt=K.getBoundingClientRect();he+=We.length;var Ot=vt.x>_e.x||vt.y>_e.y;return _e=vt,lt===0?!0:Ot});return k.body.removeChild(U),Ge},Ki=function(){return typeof new Image().crossOrigin!="undefined"},Gu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(k){var U=new Image,K=k.createElement("canvas"),j=K.getContext("2d");if(!j)return!1;U.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{j.drawImage(U,0,0),K.toDataURL()}catch(ae){return!1}return!0},Ea=function(k){return k[0]===0&&k[1]===255&&k[2]===0&&k[3]===255},Xl=function(k){var U=k.createElement("canvas"),K=100;U.width=K,U.height=K;var j=U.getContext("2d");if(!j)return Promise.reject(!1);j.fillStyle="rgb(0, 255, 0)",j.fillRect(0,0,K,K);var ae=new Image,he=U.toDataURL();ae.src=he;var _e=es(K,K,0,0,ae);return j.fillStyle="red",j.fillRect(0,0,K,K),zs(_e).then(function(Ge){j.drawImage(Ge,0,0);var We=j.getImageData(0,0,K,K).data;j.fillStyle="red",j.fillRect(0,0,K,K);var lt=k.createElement("div");return lt.style.backgroundImage="url("+he+")",lt.style.height=K+"px",Ea(We)?zs(es(K,K,0,0,lt)):Promise.reject(!1)}).then(function(Ge){return j.drawImage(Ge,0,0),Ea(j.getImageData(0,0,K,K).data)}).catch(function(){return!1})},es=function(k,U,K,j,ae){var he="http://www.w3.org/2000/svg",_e=document.createElementNS(he,"svg"),Ge=document.createElementNS(he,"foreignObject");return _e.setAttributeNS(null,"width",k.toString()),_e.setAttributeNS(null,"height",U.toString()),Ge.setAttributeNS(null,"width","100%"),Ge.setAttributeNS(null,"height","100%"),Ge.setAttributeNS(null,"x",K.toString()),Ge.setAttributeNS(null,"y",j.toString()),Ge.setAttributeNS(null,"externalResourcesRequired","true"),_e.appendChild(Ge),Ge.appendChild(ae),_e},zs=function(k){return new Promise(function(U,K){var j=new Image;j.onload=function(){return U(j)},j.onerror=K,j.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(k))})},jn={get SUPPORT_RANGE_BOUNDS(){var k=qo(document);return Object.defineProperty(jn,"SUPPORT_RANGE_BOUNDS",{value:k}),k},get SUPPORT_WORD_BREAKING(){var k=jn.SUPPORT_RANGE_BOUNDS&&vo(document);return Object.defineProperty(jn,"SUPPORT_WORD_BREAKING",{value:k}),k},get SUPPORT_SVG_DRAWING(){var k=Vu(document);return Object.defineProperty(jn,"SUPPORT_SVG_DRAWING",{value:k}),k},get SUPPORT_FOREIGNOBJECT_DRAWING(){var k=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(jn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:k}),k},get SUPPORT_CORS_IMAGES(){var k=Ki();return Object.defineProperty(jn,"SUPPORT_CORS_IMAGES",{value:k}),k},get SUPPORT_RESPONSE_TYPE(){var k=Gu();return Object.defineProperty(jn,"SUPPORT_RESPONSE_TYPE",{value:k}),k},get SUPPORT_CORS_XHR(){var k="withCredentials"in new XMLHttpRequest;return Object.defineProperty(jn,"SUPPORT_CORS_XHR",{value:k}),k},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var k=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(jn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:k}),k}},Mi=function(){function k(U,K){this.text=U,this.bounds=K}return k}(),Ws=function(k,U,K,j){var ae=Yl(U,K),he=[],_e=0;return ae.forEach(function(Ge){if(K.textDecorationLine.length||Ge.trim().length>0)if(jn.SUPPORT_RANGE_BOUNDS){var We=ts(j,_e,Ge.length).getClientRects();if(We.length>1){var lt=Vs(Ge),vt=0;lt.forEach(function(Dt){he.push(new Mi(Dt,S.fromDOMRectList(k,ts(j,vt+_e,Dt.length).getClientRects()))),vt+=Dt.length})}else he.push(new Mi(Ge,S.fromDOMRectList(k,We)))}else{var Ot=j.splitText(Ge.length);he.push(new Mi(Ge,Gs(k,j))),j=Ot}else jn.SUPPORT_RANGE_BOUNDS||(j=j.splitText(Ge.length));_e+=Ge.length}),he},Gs=function(k,U){var K=U.ownerDocument;if(K){var j=K.createElement("html2canvaswrapper");j.appendChild(U.cloneNode(!0));var ae=U.parentNode;if(ae){ae.replaceChild(j,U);var he=s(k,j);return j.firstChild&&ae.replaceChild(j.firstChild,j),he}}return S.EMPTY},ts=function(k,U,K){var j=k.ownerDocument;if(!j)throw new Error("Node has no owner document");var ae=j.createRange();return ae.setStart(k,U),ae.setEnd(k,U+K),ae},Vs=function(k){if(jn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var U=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(U.segment(k)).map(function(K){return K.segment})}return go(k)},yo=function(k,U){if(jn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var K=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(K.segment(k)).map(function(j){return j.segment})}return Jl(k,U)},Yl=function(k,U){return U.letterSpacing!==0?Vs(k):yo(k,U)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(k,U){for(var K=jt(k,{lineBreak:U.lineBreak,wordBreak:U.overflowWrap==="break-word"?"break-word":U.wordBreak}),j=[],ae,he=function(){if(ae.value){var _e=ae.value.slice(),Ge=v(_e),We="";Ge.forEach(function(lt){Xu.indexOf(lt)===-1?We+=i(lt):(We.length&&j.push(We),j.push(i(lt)),We="")}),We.length&&j.push(We)}};!(ae=K.next()).done;)he();return j},rs=function(){function k(U,K,j){this.text=Yu(K.data,j.textTransform),this.textBounds=Ws(U,this.text,j,K)}return k}(),Yu=function(k,U){switch(U){case 1:return k.toLowerCase();case 3:return k.replace(Ju,bo);case 2:return k.toUpperCase();default:return k}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,bo=function(k,U,K){return k.length>0?U+K.toUpperCase():k},Xs=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.src=j.currentSrc||j.src,ae.intrinsicWidth=j.naturalWidth,ae.intrinsicHeight=j.naturalHeight,ae.context.cache.addImage(ae.src),ae}return U}(_i),Ys=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.canvas=j,ae.intrinsicWidth=j.width,ae.intrinsicHeight=j.height,ae}return U}(_i),Zl=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this,he=new XMLSerializer,_e=s(K,j);return j.setAttribute("width",_e.width+"px"),j.setAttribute("height",_e.height+"px"),ae.svg="data:image/svg+xml,"+encodeURIComponent(he.serializeToString(j)),ae.intrinsicWidth=j.width.baseVal.value,ae.intrinsicHeight=j.height.baseVal.value,ae.context.cache.addImage(ae.svg),ae}return U}(_i),ns=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.value=j.value,ae}return U}(_i),is=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.start=j.start,ae.reversed=typeof j.reversed=="boolean"&&j.reversed===!0,ae}return U}(_i),Zu=[{type:15,flags:0,unit:"px",number:3}],$l=[{type:16,flags:0,number:50}],ql=function(k){return k.width>k.height?new S(k.left+(k.width-k.height)/2,k.top,k.height,k.height):k.width<k.height?new S(k.left,k.top+(k.height-k.width)/2,k.width,k.width):k},$u=function(k){var U=k.type===Eo?new Array(k.value.length+1).join("\u2022"):k.value;return U.length===0?k.placeholder||"":U},Ka="checkbox",oa="radio",Eo="password",eu=707406591,as=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;ae.type=j.type.toLowerCase(),ae.checked=j.checked,ae.value=$u(j),(ae.type===Ka||ae.type===oa)&&(ae.styles.backgroundColor=3739148031,ae.styles.borderTopColor=ae.styles.borderRightColor=ae.styles.borderBottomColor=ae.styles.borderLeftColor=2779096575,ae.styles.borderTopWidth=ae.styles.borderRightWidth=ae.styles.borderBottomWidth=ae.styles.borderLeftWidth=1,ae.styles.borderTopStyle=ae.styles.borderRightStyle=ae.styles.borderBottomStyle=ae.styles.borderLeftStyle=1,ae.styles.backgroundClip=[0],ae.styles.backgroundOrigin=[0],ae.bounds=ql(ae.bounds));switch(ae.type){case Ka:ae.styles.borderTopRightRadius=ae.styles.borderTopLeftRadius=ae.styles.borderBottomRightRadius=ae.styles.borderBottomLeftRadius=Zu;break;case oa:ae.styles.borderTopRightRadius=ae.styles.borderTopLeftRadius=ae.styles.borderBottomRightRadius=ae.styles.borderBottomLeftRadius=$l;break}return ae}return U}(_i),tu=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this,he=j.options[j.selectedIndex||0];return ae.value=he&&he.text||"",ae}return U}(_i),ru=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.value=j.value,ae}return U}(_i),nu=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;ae.src=j.src,ae.width=parseInt(j.width,10)||0,ae.height=parseInt(j.height,10)||0,ae.backgroundColor=ae.styles.backgroundColor;try{if(j.contentWindow&&j.contentWindow.document&&j.contentWindow.document.documentElement){ae.tree=au(K,j.contentWindow.document.documentElement);var he=j.contentWindow.document.documentElement?da(K,getComputedStyle(j.contentWindow.document.documentElement).backgroundColor):Li.TRANSPARENT,_e=j.contentWindow.document.body?da(K,getComputedStyle(j.contentWindow.document.body).backgroundColor):Li.TRANSPARENT;ae.backgroundColor=Ni(he)?Ni(_e)?ae.styles.backgroundColor:_e:he}}catch(Ge){}return ae}return U}(_i),qu=["OL","UL","MENU"],Co=function(k,U,K,j){for(var ae=U.firstChild,he=void 0;ae;ae=he)if(he=ae.nextSibling,Zs(ae)&&ae.data.trim().length>0)K.textNodes.push(new rs(k,ae,K.styles));else if(za(ae))if(qs(ae)&&ae.assignedNodes)ae.assignedNodes().forEach(function(Ge){return Co(k,Ge,K,j)});else{var _e=iu(k,ae);_e.styles.isVisible()&&(ou(ae,_e,j)?_e.flags|=4:Js(_e.styles)&&(_e.flags|=2),qu.indexOf(ae.tagName)!==-1&&(_e.flags|=8),K.elements.push(_e),ae.slot,ae.shadowRoot?Co(k,ae.shadowRoot,_e,j):!xo(ae)&&!lu(ae)&&!Bo(ae)&&Co(k,ae,_e,j))}},iu=function(k,U){return Ca(U)?new Xs(k,U):uu(U)?new Ys(k,U):lu(U)?new Zl(k,U):su(U)?new ns(k,U):ss(U)?new is(k,U):eA(U)?new as(k,U):Bo(U)?new tu(k,U):xo(U)?new ru(k,U):Ci(U)?new nu(k,U):new _i(k,U)},au=function(k,U){var K=iu(k,U);return K.flags|=4,Co(k,U,K,K),K},ou=function(k,U,K){return U.styles.isPositionedWithZIndex()||U.styles.opacity<1||U.styles.isTransformed()||En(k)&&K.styles.isTransparent()},Js=function(k){return k.isPositioned()||k.isFloating()},Zs=function(k){return k.nodeType===Node.TEXT_NODE},za=function(k){return k.nodeType===Node.ELEMENT_NODE},os=function(k){return za(k)&&typeof k.style!="undefined"&&!zi(k)},zi=function(k){return typeof k.className=="object"},su=function(k){return k.tagName==="LI"},ss=function(k){return k.tagName==="OL"},eA=function(k){return k.tagName==="INPUT"},tA=function(k){return k.tagName==="HTML"},lu=function(k){return k.tagName==="svg"},En=function(k){return k.tagName==="BODY"},uu=function(k){return k.tagName==="CANVAS"},ls=function(k){return k.tagName==="VIDEO"},Ca=function(k){return k.tagName==="IMG"},Ci=function(k){return k.tagName==="IFRAME"},wo=function(k){return k.tagName==="STYLE"},$s=function(k){return k.tagName==="SCRIPT"},xo=function(k){return k.tagName==="TEXTAREA"},Bo=function(k){return k.tagName==="SELECT"},qs=function(k){return k.tagName==="SLOT"},el=function(k){return k.tagName.indexOf("-")>0},Au=function(){function k(){this.counters={}}return k.prototype.getCounterValue=function(U){var K=this.counters[U];return K&&K.length?K[K.length-1]:1},k.prototype.getCounterValues=function(U){var K=this.counters[U];return K||[]},k.prototype.pop=function(U){var K=this;U.forEach(function(j){return K.counters[j].pop()})},k.prototype.parse=function(U){var K=this,j=U.counterIncrement,ae=U.counterReset,he=!0;j!==null&&j.forEach(function(Ge){var We=K.counters[Ge.counter];We&&Ge.increment!==0&&(he=!1,We.length||We.push(1),We[Math.max(0,We.length-1)]+=Ge.increment)});var _e=[];return he&&ae.forEach(function(Ge){var We=K.counters[Ge.counter];_e.push(Ge.counter),We||(We=K.counters[Ge.counter]=[]),We.push(Ge.reset)}),_e},k}(),cu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},us={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},du={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},An={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},wa=function(k,U,K,j,ae,he){return k<U||k>K?f(k,ae,he.length>0):j.integers.reduce(function(_e,Ge,We){for(;k>=Ge;)k-=Ge,_e+=j.values[We];return _e},"")+he},hu=function(k,U,K,j){var ae="";do K||k--,ae=j(k)+ae,k/=U;while(k*U>=U);return ae},xn=function(k,U,K,j,ae){var he=K-U+1;return(k<0?"-":"")+(hu(Math.abs(k),he,j,function(_e){return i(Math.floor(_e%he)+U)})+ae)},xa=function(k,U,K){K===void 0&&(K=". ");var j=U.length;return hu(Math.abs(k),j,!1,function(ae){return U[Math.floor(ae%j)]})+K},Wi=1<<0,sa=1<<1,fn=1<<2,To=1<<3,Gi=function(k,U,K,j,ae,he){if(k<-9999||k>9999)return f(k,4,ae.length>0);var _e=Math.abs(k),Ge=ae;if(_e===0)return U[0]+Ge;for(var We=0;_e>0&&We<=4;We++){var lt=_e%10;lt===0&&Qn(he,Wi)&&Ge!==""?Ge=U[lt]+Ge:lt>1||lt===1&&We===0||lt===1&&We===1&&Qn(he,sa)||lt===1&&We===1&&Qn(he,fn)&&k>100||lt===1&&We>1&&Qn(he,To)?Ge=U[lt]+(We>0?K[We-1]:"")+Ge:lt===1&&We>0&&(Ge=K[We-1]+Ge),_e=Math.floor(_e/10)}return(k<0?j:"")+Ge},fu="\u5341\u767E\u5343\u842C",So="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",t="\uB9C8\uC774\uB108\uC2A4",f=function(k,U,K){var j=K?". ":"",ae=K?"\u3001":"",he=K?", ":"",_e=K?" ":"";switch(U){case 0:return"\u2022"+_e;case 1:return"\u25E6"+_e;case 2:return"\u25FE"+_e;case 5:var Ge=xn(k,48,57,!0,j);return Ge.length<4?"0"+Ge:Ge;case 4:return xa(k,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ae);case 6:return wa(k,1,3999,cu,3,j).toLowerCase();case 7:return wa(k,1,3999,cu,3,j);case 8:return xn(k,945,969,!1,j);case 9:return xn(k,97,122,!1,j);case 10:return xn(k,65,90,!1,j);case 11:return xn(k,1632,1641,!0,j);case 12:case 49:return wa(k,1,9999,us,3,j);case 35:return wa(k,1,9999,us,3,j).toLowerCase();case 13:return xn(k,2534,2543,!0,j);case 14:case 30:return xn(k,6112,6121,!0,j);case 15:return xa(k,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",ae);case 16:return xa(k,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",ae);case 17:case 48:return Gi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",ae,sa|fn|To);case 47:return Gi(k,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",So,"\u8CA0",ae,Wi|sa|fn|To);case 42:return Gi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",ae,sa|fn|To);case 41:return Gi(k,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",So,"\u8D1F",ae,Wi|sa|fn|To);case 26:return Gi(k,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,ae,0);case 25:return Gi(k,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,ae,Wi|sa|fn);case 31:return Gi(k,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",t,he,Wi|sa|fn);case 33:return Gi(k,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",t,he,0);case 32:return Gi(k,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",t,he,Wi|sa|fn);case 18:return xn(k,2406,2415,!0,j);case 20:return wa(k,1,19999,An,3,j);case 21:return xn(k,2790,2799,!0,j);case 22:return xn(k,2662,2671,!0,j);case 22:return wa(k,1,10999,du,3,j);case 23:return xa(k,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return xa(k,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return xn(k,3302,3311,!0,j);case 28:return xa(k,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",ae);case 29:return xa(k,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",ae);case 34:return xn(k,3792,3801,!0,j);case 37:return xn(k,6160,6169,!0,j);case 38:return xn(k,4160,4169,!0,j);case 39:return xn(k,2918,2927,!0,j);case 40:return xn(k,1776,1785,!0,j);case 43:return xn(k,3046,3055,!0,j);case 44:return xn(k,3174,3183,!0,j);case 45:return xn(k,3664,3673,!0,j);case 46:return xn(k,3872,3881,!0,j);case 3:default:return xn(k,48,57,!0,j)}},d="data-html2canvas-ignore",D=function(){function k(U,K,j){if(this.context=U,this.options=j,this.scrolledElements=[],this.referenceElement=K,this.counters=new Au,this.quoteDepth=0,!K.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(K.ownerDocument.documentElement,!1)}return k.prototype.toIFrame=function(U,K){var j=this,ae=ne(U,K);if(!ae.contentWindow)return Promise.reject("Unable to find iframe window");var he=U.defaultView.pageXOffset,_e=U.defaultView.pageYOffset,Ge=ae.contentWindow,We=Ge.document,lt=ve(ae).then(function(){return Q(j,void 0,void 0,function(){var vt,Ot;return R(this,function(Dt){switch(Dt.label){case 0:return this.scrolledElements.forEach(Mt),Ge&&(Ge.scrollTo(K.left,K.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ge.scrollY!==K.top||Ge.scrollX!==K.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ge.scrollX-K.left,Ge.scrollY-K.top,0,0))),vt=this.options.onclone,Ot=this.clonedReferenceElement,typeof Ot=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:We.fonts&&We.fonts.ready?[4,We.fonts.ready]:[3,2];case 1:Dt.sent(),Dt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,de(We)]:[3,4];case 3:Dt.sent(),Dt.label=4;case 4:return typeof vt=="function"?[2,Promise.resolve().then(function(){return vt(We,Ot)}).then(function(){return ae})]:[2,ae]}})})});return We.open(),We.write(gt(document.doctype)+"<html></html>"),dt(this.referenceElement.ownerDocument,he,_e),We.replaceChild(We.adoptNode(this.documentElement),We.documentElement),We.close(),lt},k.prototype.createElementClone=function(U){if(ka(U,2))debugger;if(uu(U))return this.createCanvasClone(U);if(ls(U))return this.createVideoClone(U);if(wo(U))return this.createStyleClone(U);var K=U.cloneNode(!1);return Ca(K)&&(Ca(U)&&U.currentSrc&&U.currentSrc!==U.src&&(K.src=U.currentSrc,K.srcset=""),K.loading==="lazy"&&(K.loading="eager")),el(K)?this.createCustomElementClone(K):K},k.prototype.createCustomElementClone=function(U){var K=document.createElement("html2canvascustomelement");return Ye(U.style,K),K},k.prototype.createStyleClone=function(U){try{var K=U.sheet;if(K&&K.cssRules){var j=[].slice.call(K.cssRules,0).reduce(function(he,_e){return _e&&typeof _e.cssText=="string"?he+_e.cssText:he},""),ae=U.cloneNode(!1);return ae.textContent=j,ae}}catch(he){if(this.context.logger.error("Unable to access cssRules property",he),he.name!=="SecurityError")throw he}return U.cloneNode(!1)},k.prototype.createCanvasClone=function(U){var K;if(this.options.inlineImages&&U.ownerDocument){var j=U.ownerDocument.createElement("img");try{return j.src=U.toDataURL(),j}catch(lt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",U)}}var ae=U.cloneNode(!1);try{ae.width=U.width,ae.height=U.height;var he=U.getContext("2d"),_e=ae.getContext("2d");if(_e)if(!this.options.allowTaint&&he)_e.putImageData(he.getImageData(0,0,U.width,U.height),0,0);else{var Ge=(K=U.getContext("webgl2"))!==null&&K!==void 0?K:U.getContext("webgl");if(Ge){var We=Ge.getContextAttributes();(We==null?void 0:We.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",U)}_e.drawImage(U,0,0)}return ae}catch(lt){this.context.logger.info("Unable to clone canvas as it is tainted",U)}return ae},k.prototype.createVideoClone=function(U){var K=U.ownerDocument.createElement("canvas");K.width=U.offsetWidth,K.height=U.offsetHeight;var j=K.getContext("2d");try{return j&&(j.drawImage(U,0,0,K.width,K.height),this.options.allowTaint||j.getImageData(0,0,K.width,K.height)),K}catch(he){this.context.logger.info("Unable to clone video as it is tainted",U)}var ae=U.ownerDocument.createElement("canvas");return ae.width=U.offsetWidth,ae.height=U.offsetHeight,ae},k.prototype.appendChildNode=function(U,K,j){(!za(K)||!$s(K)&&!K.hasAttribute(d)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(K)))&&((!this.options.copyStyles||!za(K)||!wo(K))&&U.appendChild(this.cloneNode(K,j)))},k.prototype.cloneChildNodes=function(U,K,j){for(var ae=this,he=U.shadowRoot?U.shadowRoot.firstChild:U.firstChild;he;he=he.nextSibling)if(za(he)&&qs(he)&&typeof he.assignedNodes=="function"){var _e=he.assignedNodes();_e.length&&_e.forEach(function(Ge){return ae.appendChildNode(K,Ge,j)})}else this.appendChildNode(K,he,j)},k.prototype.cloneNode=function(U,K){if(Zs(U))return document.createTextNode(U.data);if(!U.ownerDocument)return U.cloneNode(!1);var j=U.ownerDocument.defaultView;if(j&&za(U)&&(os(U)||zi(U))){var ae=this.createElementClone(U);ae.style.transitionProperty="none";var he=j.getComputedStyle(U),_e=j.getComputedStyle(U,":before"),Ge=j.getComputedStyle(U,":after");this.referenceElement===U&&os(ae)&&(this.clonedReferenceElement=ae),En(ae)&&rr(ae);var We=this.counters.parse(new Pl(this.context,he)),lt=this.resolvePseudoContent(U,ae,_e,V.BEFORE);el(U)&&(K=!0),ls(U)||this.cloneChildNodes(U,ae,K),lt&&ae.insertBefore(lt,ae.firstChild);var vt=this.resolvePseudoContent(U,ae,Ge,V.AFTER);return vt&&ae.appendChild(vt),this.counters.pop(We),(he&&(this.options.copyStyles||zi(U))&&!Ci(U)||K)&&Ye(he,ae),(U.scrollTop!==0||U.scrollLeft!==0)&&this.scrolledElements.push([ae,U.scrollLeft,U.scrollTop]),(xo(U)||Bo(U))&&(xo(ae)||Bo(ae))&&(ae.value=U.value),ae}return U.cloneNode(!1)},k.prototype.resolvePseudoContent=function(U,K,j,ae){var he=this;if(!j)return;var _e=j.content,Ge=K.ownerDocument;if(!Ge||!_e||_e==="none"||_e==="-moz-alt-content"||j.display==="none")return;this.counters.parse(new Pl(this.context,j));var We=new Nu(this.context,j),lt=Ge.createElement("html2canvaspseudoelement");Ye(j,lt),We.content.forEach(function(Ot){if(Ot.type===0)lt.appendChild(Ge.createTextNode(Ot.value));else if(Ot.type===22){var Dt=Ge.createElement("img");Dt.src=Ot.value,Dt.style.opacity="1",lt.appendChild(Dt)}else if(Ot.type===18){if(Ot.name==="attr"){var or=Ot.values.filter(yn);or.length&<.appendChild(Ge.createTextNode(U.getAttribute(or[0].value)||""))}else if(Ot.name==="counter"){var Kt=Ot.values.filter(Yi),qt=Kt[0],Br=Kt[1];if(qt&&yn(qt)){var ar=he.counters.getCounterValue(qt.value),ur=Br&&yn(Br)?ya.parse(he.context,Br.value):3;lt.appendChild(Ge.createTextNode(f(ar,ur,!1)))}}else if(Ot.name==="counters"){var en=Ot.values.filter(Yi),qt=en[0],zr=en[1],Br=en[2];if(qt&&yn(qt)){var pn=he.counters.getCounterValues(qt.value),sr=Br&&yn(Br)?ya.parse(he.context,Br.value):3,cn=zr&&zr.type===0?zr.value:"",mn=pn.map(function(yi){return f(yi,sr,!1)}).join(cn);lt.appendChild(Ge.createTextNode(mn))}}}else if(Ot.type===20)switch(Ot.value){case"open-quote":lt.appendChild(Ge.createTextNode(Ml(We.quotes,he.quoteDepth++,!0)));break;case"close-quote":lt.appendChild(Ge.createTextNode(Ml(We.quotes,--he.quoteDepth,!1)));break;default:lt.appendChild(Ge.createTextNode(Ot.value))}}),lt.className=Vt+" "+Zt;var vt=ae===V.BEFORE?" "+Vt:" "+Zt;return zi(K)?K.className.baseValue+=vt:K.className+=vt,lt},k.destroy=function(U){return U.parentNode?(U.parentNode.removeChild(U),!0):!1},k}(),V;(function(k){k[k.BEFORE=0]="BEFORE",k[k.AFTER=1]="AFTER"})(V||(V={}));var ne=function(k,U){var K=k.createElement("iframe");return K.className="html2canvas-container",K.style.visibility="hidden",K.style.position="fixed",K.style.left="-10000px",K.style.top="0px",K.style.border="0",K.width=U.width.toString(),K.height=U.height.toString(),K.scrolling="no",K.setAttribute(d,"true"),k.body.appendChild(K),K},ue=function(k){return new Promise(function(U){if(k.complete){U();return}if(!k.src){U();return}k.onload=U,k.onerror=U})},de=function(k){return Promise.all([].slice.call(k.images,0).map(ue))},ve=function(k){return new Promise(function(U,K){var j=k.contentWindow;if(!j)return K("No window assigned for iframe");var ae=j.document;j.onload=k.onload=function(){j.onload=k.onload=null;var he=setInterval(function(){ae.body.childNodes.length>0&&ae.readyState==="complete"&&(clearInterval(he),U(k))},50)}})},Ve=["all","d","content"],Ye=function(k,U){for(var K=k.length-1;K>=0;K--){var j=k.item(K);Ve.indexOf(j)===-1&&U.style.setProperty(j,k.getPropertyValue(j))}return U},gt=function(k){var U="";return k&&(U+="<!DOCTYPE ",k.name&&(U+=k.name),k.internalSubset&&(U+=k.internalSubset),k.publicId&&(U+='"'+k.publicId+'"'),k.systemId&&(U+='"'+k.systemId+'"'),U+=">"),U},dt=function(k,U,K){k&&k.defaultView&&(U!==k.defaultView.pageXOffset||K!==k.defaultView.pageYOffset)&&k.defaultView.scrollTo(U,K)},Mt=function(k){var U=k[0],K=k[1],j=k[2];U.scrollLeft=K,U.scrollTop=j},Ut=":before",Qt=":after",Vt="___html2canvas___pseudoelement_before",Zt="___html2canvas___pseudoelement_after",Xt=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,rr=function(k){br(k,"."+Vt+Ut+Xt+`
|
|
.`+Zt+Qt+Xt)},br=function(k,U){var K=k.ownerDocument;if(K){var j=K.createElement("style");j.textContent=U,k.appendChild(j)}},pr=function(){function k(){}return k.getOrigin=function(U){var K=k._link;return K?(K.href=U,K.href=K.href,K.protocol+K.hostname+K.port):"about:blank"},k.isSameOrigin=function(U){return k.getOrigin(U)===k._origin},k.setContext=function(U){k._link=U.document.createElement("a"),k._origin=k.getOrigin(U.location.href)},k._origin="about:blank",k}(),kr=function(){function k(U,K){this.context=U,this._options=K,this._cache={}}return k.prototype.addImage=function(U){var K=Promise.resolve();return this.has(U)||(ti(U)||di(U))&&(this._cache[U]=this.loadImage(U)).catch(function(){}),K},k.prototype.match=function(U){return this._cache[U]},k.prototype.loadImage=function(U){return Q(this,void 0,void 0,function(){var K,j,ae,he,_e=this;return R(this,function(Ge){switch(Ge.label){case 0:return K=pr.isSameOrigin(U),j=!ei(U)&&this._options.useCORS===!0&&jn.SUPPORT_CORS_IMAGES&&!K,ae=!ei(U)&&!K&&!ti(U)&&typeof this._options.proxy=="string"&&jn.SUPPORT_CORS_XHR&&!j,!K&&this._options.allowTaint===!1&&!ei(U)&&!ti(U)&&!ae&&!j?[2]:(he=U,ae?[4,this.proxy(he)]:[3,2]);case 1:he=Ge.sent(),Ge.label=2;case 2:return this.context.logger.debug("Added image "+U.substring(0,256)),[4,new Promise(function(We,lt){var vt=new Image;vt.onload=function(){return We(vt)},vt.onerror=lt,(Pn(he)||j)&&(vt.crossOrigin="anonymous"),vt.src=he,vt.complete===!0&&setTimeout(function(){return We(vt)},500),_e._options.imageTimeout>0&&setTimeout(function(){return lt("Timed out ("+_e._options.imageTimeout+"ms) loading image")},_e._options.imageTimeout)})];case 3:return[2,Ge.sent()]}})})},k.prototype.has=function(U){return typeof this._cache[U]!="undefined"},k.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},k.prototype.proxy=function(U){var K=this,j=this._options.proxy;if(!j)throw new Error("No proxy defined");var ae=U.substring(0,256);return new Promise(function(he,_e){var Ge=jn.SUPPORT_RESPONSE_TYPE?"blob":"text",We=new XMLHttpRequest;We.onload=function(){if(We.status===200)if(Ge==="text")he(We.response);else{var Ot=new FileReader;Ot.addEventListener("load",function(){return he(Ot.result)},!1),Ot.addEventListener("error",function(Dt){return _e(Dt)},!1),Ot.readAsDataURL(We.response)}else _e("Failed to proxy resource "+ae+" with status code "+We.status)},We.onerror=_e;var lt=j.indexOf("?")>-1?"&":"?";if(We.open("GET",""+j+lt+"url="+encodeURIComponent(U)+"&responseType="+Ge),Ge!=="text"&&We instanceof XMLHttpRequest&&(We.responseType=Ge),K._options.imageTimeout){var vt=K._options.imageTimeout;We.timeout=vt,We.ontimeout=function(){return _e("Timed out ("+vt+"ms) proxying "+ae)}}We.send()})},k}(),bn=/^data:image\/svg\+xml/i,Wn=/^data:image\/.*;base64,/i,On=/^data:image\/.*/i,di=function(k){return jn.SUPPORT_SVG_DRAWING||!Yn(k)},ei=function(k){return On.test(k)},Pn=function(k){return Wn.test(k)},ti=function(k){return k.substr(0,4)==="blob"},Yn=function(k){return k.substr(-3).toLowerCase()==="svg"||bn.test(k)},Wt=function(){function k(U,K){this.type=0,this.x=U,this.y=K}return k.prototype.add=function(U,K){return new k(this.x+U,this.y+K)},k}(),Bn=function(k,U,K){return new Wt(k.x+(U.x-k.x)*K,k.y+(U.y-k.y)*K)},Tn=function(){function k(U,K,j,ae){this.type=1,this.start=U,this.startControl=K,this.endControl=j,this.end=ae}return k.prototype.subdivide=function(U,K){var j=Bn(this.start,this.startControl,U),ae=Bn(this.startControl,this.endControl,U),he=Bn(this.endControl,this.end,U),_e=Bn(j,ae,U),Ge=Bn(ae,he,U),We=Bn(_e,Ge,U);return K?new k(this.start,j,_e,We):new k(We,Ge,he,this.end)},k.prototype.add=function(U,K){return new k(this.start.add(U,K),this.startControl.add(U,K),this.endControl.add(U,K),this.end.add(U,K))},k.prototype.reverse=function(){return new k(this.end,this.endControl,this.startControl,this.start)},k}(),Sn=function(k){return k.type===1},Wa=function(){function k(U){var K=U.styles,j=U.bounds,ae=ca(K.borderTopLeftRadius,j.width,j.height),he=ae[0],_e=ae[1],Ge=ca(K.borderTopRightRadius,j.width,j.height),We=Ge[0],lt=Ge[1],vt=ca(K.borderBottomRightRadius,j.width,j.height),Ot=vt[0],Dt=vt[1],or=ca(K.borderBottomLeftRadius,j.width,j.height),Kt=or[0],qt=or[1],Br=[];Br.push((he+We)/j.width),Br.push((Kt+Ot)/j.width),Br.push((_e+qt)/j.height),Br.push((lt+Dt)/j.height);var ar=Math.max.apply(Math,Br);ar>1&&(he/=ar,_e/=ar,We/=ar,lt/=ar,Ot/=ar,Dt/=ar,Kt/=ar,qt/=ar);var ur=j.width-We,en=j.height-Dt,zr=j.width-Ot,pn=j.height-qt,sr=K.borderTopWidth,cn=K.borderRightWidth,mn=K.borderBottomWidth,Kr=K.borderLeftWidth,wi=an(K.paddingTop,U.bounds.width),yi=an(K.paddingRight,U.bounds.width),Oi=an(K.paddingBottom,U.bounds.width),oi=an(K.paddingLeft,U.bounds.width);this.topLeftBorderDoubleOuterBox=he>0||_e>0?jr(j.left+Kr/3,j.top+sr/3,he-Kr/3,_e-sr/3,Xr.TOP_LEFT):new Wt(j.left+Kr/3,j.top+sr/3),this.topRightBorderDoubleOuterBox=he>0||_e>0?jr(j.left+ur,j.top+sr/3,We-cn/3,lt-sr/3,Xr.TOP_RIGHT):new Wt(j.left+j.width-cn/3,j.top+sr/3),this.bottomRightBorderDoubleOuterBox=Ot>0||Dt>0?jr(j.left+zr,j.top+en,Ot-cn/3,Dt-mn/3,Xr.BOTTOM_RIGHT):new Wt(j.left+j.width-cn/3,j.top+j.height-mn/3),this.bottomLeftBorderDoubleOuterBox=Kt>0||qt>0?jr(j.left+Kr/3,j.top+pn,Kt-Kr/3,qt-mn/3,Xr.BOTTOM_LEFT):new Wt(j.left+Kr/3,j.top+j.height-mn/3),this.topLeftBorderDoubleInnerBox=he>0||_e>0?jr(j.left+Kr*2/3,j.top+sr*2/3,he-Kr*2/3,_e-sr*2/3,Xr.TOP_LEFT):new Wt(j.left+Kr*2/3,j.top+sr*2/3),this.topRightBorderDoubleInnerBox=he>0||_e>0?jr(j.left+ur,j.top+sr*2/3,We-cn*2/3,lt-sr*2/3,Xr.TOP_RIGHT):new Wt(j.left+j.width-cn*2/3,j.top+sr*2/3),this.bottomRightBorderDoubleInnerBox=Ot>0||Dt>0?jr(j.left+zr,j.top+en,Ot-cn*2/3,Dt-mn*2/3,Xr.BOTTOM_RIGHT):new Wt(j.left+j.width-cn*2/3,j.top+j.height-mn*2/3),this.bottomLeftBorderDoubleInnerBox=Kt>0||qt>0?jr(j.left+Kr*2/3,j.top+pn,Kt-Kr*2/3,qt-mn*2/3,Xr.BOTTOM_LEFT):new Wt(j.left+Kr*2/3,j.top+j.height-mn*2/3),this.topLeftBorderStroke=he>0||_e>0?jr(j.left+Kr/2,j.top+sr/2,he-Kr/2,_e-sr/2,Xr.TOP_LEFT):new Wt(j.left+Kr/2,j.top+sr/2),this.topRightBorderStroke=he>0||_e>0?jr(j.left+ur,j.top+sr/2,We-cn/2,lt-sr/2,Xr.TOP_RIGHT):new Wt(j.left+j.width-cn/2,j.top+sr/2),this.bottomRightBorderStroke=Ot>0||Dt>0?jr(j.left+zr,j.top+en,Ot-cn/2,Dt-mn/2,Xr.BOTTOM_RIGHT):new Wt(j.left+j.width-cn/2,j.top+j.height-mn/2),this.bottomLeftBorderStroke=Kt>0||qt>0?jr(j.left+Kr/2,j.top+pn,Kt-Kr/2,qt-mn/2,Xr.BOTTOM_LEFT):new Wt(j.left+Kr/2,j.top+j.height-mn/2),this.topLeftBorderBox=he>0||_e>0?jr(j.left,j.top,he,_e,Xr.TOP_LEFT):new Wt(j.left,j.top),this.topRightBorderBox=We>0||lt>0?jr(j.left+ur,j.top,We,lt,Xr.TOP_RIGHT):new Wt(j.left+j.width,j.top),this.bottomRightBorderBox=Ot>0||Dt>0?jr(j.left+zr,j.top+en,Ot,Dt,Xr.BOTTOM_RIGHT):new Wt(j.left+j.width,j.top+j.height),this.bottomLeftBorderBox=Kt>0||qt>0?jr(j.left,j.top+pn,Kt,qt,Xr.BOTTOM_LEFT):new Wt(j.left,j.top+j.height),this.topLeftPaddingBox=he>0||_e>0?jr(j.left+Kr,j.top+sr,Math.max(0,he-Kr),Math.max(0,_e-sr),Xr.TOP_LEFT):new Wt(j.left+Kr,j.top+sr),this.topRightPaddingBox=We>0||lt>0?jr(j.left+Math.min(ur,j.width-cn),j.top+sr,ur>j.width+cn?0:Math.max(0,We-cn),Math.max(0,lt-sr),Xr.TOP_RIGHT):new Wt(j.left+j.width-cn,j.top+sr),this.bottomRightPaddingBox=Ot>0||Dt>0?jr(j.left+Math.min(zr,j.width-Kr),j.top+Math.min(en,j.height-mn),Math.max(0,Ot-cn),Math.max(0,Dt-mn),Xr.BOTTOM_RIGHT):new Wt(j.left+j.width-cn,j.top+j.height-mn),this.bottomLeftPaddingBox=Kt>0||qt>0?jr(j.left+Kr,j.top+Math.min(pn,j.height-mn),Math.max(0,Kt-Kr),Math.max(0,qt-mn),Xr.BOTTOM_LEFT):new Wt(j.left+Kr,j.top+j.height-mn),this.topLeftContentBox=he>0||_e>0?jr(j.left+Kr+oi,j.top+sr+wi,Math.max(0,he-(Kr+oi)),Math.max(0,_e-(sr+wi)),Xr.TOP_LEFT):new Wt(j.left+Kr+oi,j.top+sr+wi),this.topRightContentBox=We>0||lt>0?jr(j.left+Math.min(ur,j.width+Kr+oi),j.top+sr+wi,ur>j.width+Kr+oi?0:We-Kr+oi,lt-(sr+wi),Xr.TOP_RIGHT):new Wt(j.left+j.width-(cn+yi),j.top+sr+wi),this.bottomRightContentBox=Ot>0||Dt>0?jr(j.left+Math.min(zr,j.width-(Kr+oi)),j.top+Math.min(en,j.height+sr+wi),Math.max(0,Ot-(cn+yi)),Dt-(mn+Oi),Xr.BOTTOM_RIGHT):new Wt(j.left+j.width-(cn+yi),j.top+j.height-(mn+Oi)),this.bottomLeftContentBox=Kt>0||qt>0?jr(j.left+Kr+oi,j.top+pn,Math.max(0,Kt-(Kr+oi)),qt-(mn+Oi),Xr.BOTTOM_LEFT):new Wt(j.left+Kr+oi,j.top+j.height-(mn+Oi))}return k}(),Xr;(function(k){k[k.TOP_LEFT=0]="TOP_LEFT",k[k.TOP_RIGHT=1]="TOP_RIGHT",k[k.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",k[k.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Xr||(Xr={}));var jr=function(k,U,K,j,ae){var he=4*((Math.sqrt(2)-1)/3),_e=K*he,Ge=j*he,We=k+K,lt=U+j;switch(ae){case Xr.TOP_LEFT:return new Tn(new Wt(k,lt),new Wt(k,lt-Ge),new Wt(We-_e,U),new Wt(We,U));case Xr.TOP_RIGHT:return new Tn(new Wt(k,U),new Wt(k+_e,U),new Wt(We,lt-Ge),new Wt(We,lt));case Xr.BOTTOM_RIGHT:return new Tn(new Wt(We,U),new Wt(We,U+Ge),new Wt(k+_e,lt),new Wt(k,lt));case Xr.BOTTOM_LEFT:default:return new Tn(new Wt(We,lt),new Wt(We-_e,lt),new Wt(k,U+Ge),new Wt(k,U))}},vi=function(k){return[k.topLeftBorderBox,k.topRightBorderBox,k.bottomRightBorderBox,k.bottomLeftBorderBox]},Gn=function(k){return[k.topLeftContentBox,k.topRightContentBox,k.bottomRightContentBox,k.bottomLeftContentBox]},Ga=function(k){return[k.topLeftPaddingBox,k.topRightPaddingBox,k.bottomRightPaddingBox,k.bottomLeftPaddingBox]},Vi=function(){function k(U,K,j){this.offsetX=U,this.offsetY=K,this.matrix=j,this.type=0,this.target=2|4}return k}(),Fi=function(){function k(U,K){this.path=U,this.target=K,this.type=1}return k}(),Ba=function(){function k(U){this.opacity=U,this.type=2,this.target=2|4}return k}(),ai=function(k){return k.type===0},Ta=function(k){return k.type===1},tl=function(k){return k.type===2},iA=function(k,U){return k.length===U.length?k.some(function(K,j){return K===U[j]}):!1},dA=function(k,U,K,j,ae){return k.map(function(he,_e){switch(_e){case 0:return he.add(U,K);case 1:return he.add(U+j,K);case 2:return he.add(U+j,K+ae);case 3:return he.add(U,K+ae)}return he})},aA=function(){function k(U){this.element=U,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return k}(),oA=function(){function k(U,K){if(this.container=U,this.parent=K,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new Ba(this.container.styles.opacity)),this.container.styles.transform!==null){var j=this.container.bounds.left+this.container.styles.transformOrigin[0].number,ae=this.container.bounds.top+this.container.styles.transformOrigin[1].number,he=this.container.styles.transform;this.effects.push(new Vi(j,ae,he))}if(this.container.styles.overflowX!==0){var _e=vi(this.curves),Ge=Ga(this.curves);iA(_e,Ge)?this.effects.push(new Fi(_e,2|4)):(this.effects.push(new Fi(_e,2)),this.effects.push(new Fi(Ge,4)))}}return k.prototype.getEffects=function(U){for(var K=[2,3].indexOf(this.container.styles.position)===-1,j=this.parent,ae=this.effects.slice(0);j;){var he=j.effects.filter(function(We){return!Ta(We)});if(K||j.container.styles.position!==0||!j.parent){if(ae.unshift.apply(ae,he),K=[2,3].indexOf(j.container.styles.position)===-1,j.container.styles.overflowX!==0){var _e=vi(j.curves),Ge=Ga(j.curves);iA(_e,Ge)||ae.unshift(new Fi(Ge,2|4))}}else ae.unshift.apply(ae,he);j=j.parent}return ae.filter(function(We){return Qn(We.target,U)})},k}(),rA=function(k,U,K,j){k.container.elements.forEach(function(ae){var he=Qn(ae.flags,4),_e=Qn(ae.flags,2),Ge=new oA(ae,k);Qn(ae.styles.display,2048)&&j.push(Ge);var We=Qn(ae.flags,8)?[]:j;if(he||_e){var lt=he||ae.styles.isPositioned()?K:U,vt=new aA(Ge);if(ae.styles.isPositioned()||ae.styles.opacity<1||ae.styles.isTransformed()){var Ot=ae.styles.zIndex.order;if(Ot<0){var Dt=0;lt.negativeZIndex.some(function(Kt,qt){return Ot>Kt.element.container.styles.zIndex.order?(Dt=qt,!1):Dt>0}),lt.negativeZIndex.splice(Dt,0,vt)}else if(Ot>0){var or=0;lt.positiveZIndex.some(function(Kt,qt){return Ot>=Kt.element.container.styles.zIndex.order?(or=qt+1,!1):or>0}),lt.positiveZIndex.splice(or,0,vt)}else lt.zeroOrAutoZIndexOrTransformedOrOpacity.push(vt)}else ae.styles.isFloating()?lt.nonPositionedFloats.push(vt):lt.nonPositionedInlineLevel.push(vt);rA(Ge,vt,he?vt:K,We)}else ae.styles.isInlineLevel()?U.inlineLevel.push(Ge):U.nonInlineLevel.push(Ge),rA(Ge,U,K,We);Qn(ae.flags,8)&&sA(ae,We)})},sA=function(k,U){for(var K=k instanceof is?k.start:1,j=k instanceof is?k.reversed:!1,ae=0;ae<U.length;ae++){var he=U[ae];he.container instanceof ns&&typeof he.container.value=="number"&&he.container.value!==0&&(K=he.container.value),he.listValue=f(K,he.container.styles.listStyleType,!0),K+=j?-1:1}},hA=function(k){var U=new oA(k,null),K=new aA(U),j=[];return rA(U,K,K,j),sA(U.container,j),K},lA=function(k,U){switch(U){case 0:return Ui(k.topLeftBorderBox,k.topLeftPaddingBox,k.topRightBorderBox,k.topRightPaddingBox);case 1:return Ui(k.topRightBorderBox,k.topRightPaddingBox,k.bottomRightBorderBox,k.bottomRightPaddingBox);case 2:return Ui(k.bottomRightBorderBox,k.bottomRightPaddingBox,k.bottomLeftBorderBox,k.bottomLeftPaddingBox);case 3:default:return Ui(k.bottomLeftBorderBox,k.bottomLeftPaddingBox,k.topLeftBorderBox,k.topLeftPaddingBox)}},fA=function(k,U){switch(U){case 0:return Ui(k.topLeftBorderBox,k.topLeftBorderDoubleOuterBox,k.topRightBorderBox,k.topRightBorderDoubleOuterBox);case 1:return Ui(k.topRightBorderBox,k.topRightBorderDoubleOuterBox,k.bottomRightBorderBox,k.bottomRightBorderDoubleOuterBox);case 2:return Ui(k.bottomRightBorderBox,k.bottomRightBorderDoubleOuterBox,k.bottomLeftBorderBox,k.bottomLeftBorderDoubleOuterBox);case 3:default:return Ui(k.bottomLeftBorderBox,k.bottomLeftBorderDoubleOuterBox,k.topLeftBorderBox,k.topLeftBorderDoubleOuterBox)}},pA=function(k,U){switch(U){case 0:return Ui(k.topLeftBorderDoubleInnerBox,k.topLeftPaddingBox,k.topRightBorderDoubleInnerBox,k.topRightPaddingBox);case 1:return Ui(k.topRightBorderDoubleInnerBox,k.topRightPaddingBox,k.bottomRightBorderDoubleInnerBox,k.bottomRightPaddingBox);case 2:return Ui(k.bottomRightBorderDoubleInnerBox,k.bottomRightPaddingBox,k.bottomLeftBorderDoubleInnerBox,k.bottomLeftPaddingBox);case 3:default:return Ui(k.bottomLeftBorderDoubleInnerBox,k.bottomLeftPaddingBox,k.topLeftBorderDoubleInnerBox,k.topLeftPaddingBox)}},mA=function(k,U){switch(U){case 0:return pu(k.topLeftBorderStroke,k.topRightBorderStroke);case 1:return pu(k.topRightBorderStroke,k.bottomRightBorderStroke);case 2:return pu(k.bottomRightBorderStroke,k.bottomLeftBorderStroke);case 3:default:return pu(k.bottomLeftBorderStroke,k.topLeftBorderStroke)}},pu=function(k,U){var K=[];return Sn(k)?K.push(k.subdivide(.5,!1)):K.push(k),Sn(U)?K.push(U.subdivide(.5,!0)):K.push(U),K},Ui=function(k,U,K,j){var ae=[];return Sn(k)?ae.push(k.subdivide(.5,!1)):ae.push(k),Sn(K)?ae.push(K.subdivide(.5,!0)):ae.push(K),Sn(j)?ae.push(j.subdivide(.5,!0).reverse()):ae.push(j),Sn(U)?ae.push(U.subdivide(.5,!1).reverse()):ae.push(U),ae},uA=function(k){var U=k.bounds,K=k.styles;return U.add(K.borderLeftWidth,K.borderTopWidth,-(K.borderRightWidth+K.borderLeftWidth),-(K.borderTopWidth+K.borderBottomWidth))},mu=function(k){var U=k.styles,K=k.bounds,j=an(U.paddingLeft,K.width),ae=an(U.paddingRight,K.width),he=an(U.paddingTop,K.width),_e=an(U.paddingBottom,K.width);return K.add(j+U.borderLeftWidth,he+U.borderTopWidth,-(U.borderRightWidth+U.borderLeftWidth+j+ae),-(U.borderTopWidth+U.borderBottomWidth+he+_e))},gA=function(k,U){return k===0?U.bounds:k===2?mu(U):uA(U)},vA=function(k,U){return k===0?U.bounds:k===2?mu(U):uA(U)},nA=function(k,U,K){var j=gA(cs(k.styles.backgroundOrigin,U),k),ae=vA(cs(k.styles.backgroundClip,U),k),he=yA(cs(k.styles.backgroundSize,U),K,j),_e=he[0],Ge=he[1],We=ca(cs(k.styles.backgroundPosition,U),j.width-_e,j.height-Ge),lt=bA(cs(k.styles.backgroundRepeat,U),We,he,j,ae),vt=Math.round(j.left+We[0]),Ot=Math.round(j.top+We[1]);return[lt,vt,Ot,_e,Ge]},As=function(k){return yn(k)&&k.value===fa.AUTO},gu=function(k){return typeof k=="number"},yA=function(k,U,K){var j=U[0],ae=U[1],he=U[2],_e=k[0],Ge=k[1];if(!_e)return[0,0];if(Mn(_e)&&Ge&&Mn(Ge))return[an(_e,K.width),an(Ge,K.height)];var We=gu(he);if(yn(_e)&&(_e.value===fa.CONTAIN||_e.value===fa.COVER)){if(gu(he)){var lt=K.width/K.height;return lt<he!==(_e.value===fa.COVER)?[K.width,K.width/he]:[K.height*he,K.height]}return[K.width,K.height]}var vt=gu(j),Ot=gu(ae),Dt=vt||Ot;if(As(_e)&&(!Ge||As(Ge))){if(vt&&Ot)return[j,ae];if(!We&&!Dt)return[K.width,K.height];if(Dt&&We){var or=vt?j:ae*he,Kt=Ot?ae:j/he;return[or,Kt]}var qt=vt?j:K.width,Br=Ot?ae:K.height;return[qt,Br]}if(We){var ar=0,ur=0;return Mn(_e)?ar=an(_e,K.width):Mn(Ge)&&(ur=an(Ge,K.height)),As(_e)?ar=ur*he:(!Ge||As(Ge))&&(ur=ar/he),[ar,ur]}var en=null,zr=null;if(Mn(_e)?en=an(_e,K.width):Ge&&Mn(Ge)&&(zr=an(Ge,K.height)),en!==null&&(!Ge||As(Ge))&&(zr=vt&&Ot?en/j*ae:K.height),zr!==null&&As(_e)&&(en=vt&&Ot?zr/ae*j:K.width),en!==null&&zr!==null)return[en,zr];throw new Error("Unable to calculate background-size for element")},cs=function(k,U){var K=k[U];return typeof K=="undefined"?k[0]:K},bA=function(k,U,K,j,ae){var he=U[0],_e=U[1],Ge=K[0],We=K[1];switch(k){case 2:return[new Wt(Math.round(j.left),Math.round(j.top+_e)),new Wt(Math.round(j.left+j.width),Math.round(j.top+_e)),new Wt(Math.round(j.left+j.width),Math.round(We+j.top+_e)),new Wt(Math.round(j.left),Math.round(We+j.top+_e))];case 3:return[new Wt(Math.round(j.left+he),Math.round(j.top)),new Wt(Math.round(j.left+he+Ge),Math.round(j.top)),new Wt(Math.round(j.left+he+Ge),Math.round(j.height+j.top)),new Wt(Math.round(j.left+he),Math.round(j.height+j.top))];case 1:return[new Wt(Math.round(j.left+he),Math.round(j.top+_e)),new Wt(Math.round(j.left+he+Ge),Math.round(j.top+_e)),new Wt(Math.round(j.left+he+Ge),Math.round(j.top+_e+We)),new Wt(Math.round(j.left+he),Math.round(j.top+_e+We))];default:return[new Wt(Math.round(ae.left),Math.round(ae.top)),new Wt(Math.round(ae.left+ae.width),Math.round(ae.top)),new Wt(Math.round(ae.left+ae.width),Math.round(ae.height+ae.top)),new Wt(Math.round(ae.left),Math.round(ae.height+ae.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",CA=function(){function k(U){this._data={},this._document=U}return k.prototype.parseMetrics=function(U,K){var j=this._document.createElement("div"),ae=this._document.createElement("img"),he=this._document.createElement("span"),_e=this._document.body;j.style.visibility="hidden",j.style.fontFamily=U,j.style.fontSize=K,j.style.margin="0",j.style.padding="0",j.style.whiteSpace="nowrap",_e.appendChild(j),ae.src=EA,ae.width=1,ae.height=1,ae.style.margin="0",ae.style.padding="0",ae.style.verticalAlign="baseline",he.style.fontFamily=U,he.style.fontSize=K,he.style.margin="0",he.style.padding="0",he.appendChild(this._document.createTextNode(AA)),j.appendChild(he),j.appendChild(ae);var Ge=ae.offsetTop-he.offsetTop+2;j.removeChild(he),j.appendChild(this._document.createTextNode(AA)),j.style.lineHeight="normal",ae.style.verticalAlign="super";var We=ae.offsetTop-j.offsetTop+2;return _e.removeChild(j),{baseline:Ge,middle:We}},k.prototype.getMetrics=function(U,K){var j=U+" "+K;return typeof this._data[j]=="undefined"&&(this._data[j]=this.parseMetrics(U,K)),this._data[j]},k}(),cA=function(){function k(U,K){this.context=U,this.options=K}return k}(),wA=1e4,xA=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae._activeEffects=[],ae.canvas=j.canvas?j.canvas:document.createElement("canvas"),ae.ctx=ae.canvas.getContext("2d"),j.canvas||(ae.canvas.width=Math.floor(j.width*j.scale),ae.canvas.height=Math.floor(j.height*j.scale),ae.canvas.style.width=j.width+"px",ae.canvas.style.height=j.height+"px"),ae.fontMetrics=new CA(document),ae.ctx.scale(ae.options.scale,ae.options.scale),ae.ctx.translate(-j.x,-j.y),ae.ctx.textBaseline="bottom",ae._activeEffects=[],ae.context.logger.debug("Canvas renderer initialized ("+j.width+"x"+j.height+") with scale "+j.scale),ae}return U.prototype.applyEffects=function(K){for(var j=this;this._activeEffects.length;)this.popEffect();K.forEach(function(ae){return j.applyEffect(ae)})},U.prototype.applyEffect=function(K){this.ctx.save(),tl(K)&&(this.ctx.globalAlpha=K.opacity),ai(K)&&(this.ctx.translate(K.offsetX,K.offsetY),this.ctx.transform(K.matrix[0],K.matrix[1],K.matrix[2],K.matrix[3],K.matrix[4],K.matrix[5]),this.ctx.translate(-K.offsetX,-K.offsetY)),Ta(K)&&(this.path(K.path),this.ctx.clip()),this._activeEffects.push(K)},U.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},U.prototype.renderStack=function(K){return Q(this,void 0,void 0,function(){var j;return R(this,function(ae){switch(ae.label){case 0:return j=K.element.container.styles,j.isVisible()?[4,this.renderStackContent(K)]:[3,2];case 1:ae.sent(),ae.label=2;case 2:return[2]}})})},U.prototype.renderNode=function(K){return Q(this,void 0,void 0,function(){return R(this,function(j){switch(j.label){case 0:if(Qn(K.container.flags,16))debugger;return K.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(K)]:[3,3];case 1:return j.sent(),[4,this.renderNodeContent(K)];case 2:j.sent(),j.label=3;case 3:return[2]}})})},U.prototype.renderTextWithLetterSpacing=function(K,j,ae){var he=this;if(j===0)this.ctx.fillText(K.text,K.bounds.left,K.bounds.top+ae);else{var _e=Vs(K.text);_e.reduce(function(Ge,We){return he.ctx.fillText(We,Ge,K.bounds.top+ae),Ge+he.ctx.measureText(We).width},K.bounds.left)}},U.prototype.createFontStyle=function(K){var j=K.fontVariant.filter(function(_e){return _e==="normal"||_e==="small-caps"}).join(""),ae=_A(K.fontFamily).join(", "),he=_a(K.fontSize)?""+K.fontSize.number+K.fontSize.unit:K.fontSize.number+"px";return[[K.fontStyle,j,K.fontWeight,he,ae].join(" "),ae,he]},U.prototype.renderTextNode=function(K,j){return Q(this,void 0,void 0,function(){var ae,he,_e,Ge,We,lt,vt,Ot,Dt=this;return R(this,function(or){return ae=this.createFontStyle(j),he=ae[0],_e=ae[1],Ge=ae[2],this.ctx.font=he,this.ctx.direction=j.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",We=this.fontMetrics.getMetrics(_e,Ge),lt=We.baseline,vt=We.middle,Ot=j.paintOrder,K.textBounds.forEach(function(Kt){Ot.forEach(function(qt){switch(qt){case 0:Dt.ctx.fillStyle=Kn(j.color),Dt.renderTextWithLetterSpacing(Kt,j.letterSpacing,lt);var Br=j.textShadow;Br.length&&Kt.text.trim().length&&(Br.slice(0).reverse().forEach(function(ar){Dt.ctx.shadowColor=Kn(ar.color),Dt.ctx.shadowOffsetX=ar.offsetX.number*Dt.options.scale,Dt.ctx.shadowOffsetY=ar.offsetY.number*Dt.options.scale,Dt.ctx.shadowBlur=ar.blur.number,Dt.renderTextWithLetterSpacing(Kt,j.letterSpacing,lt)}),Dt.ctx.shadowColor="",Dt.ctx.shadowOffsetX=0,Dt.ctx.shadowOffsetY=0,Dt.ctx.shadowBlur=0),j.textDecorationLine.length&&(Dt.ctx.fillStyle=Kn(j.textDecorationColor||j.color),j.textDecorationLine.forEach(function(ar){switch(ar){case 1:Dt.ctx.fillRect(Kt.bounds.left,Math.round(Kt.bounds.top+lt),Kt.bounds.width,1);break;case 2:Dt.ctx.fillRect(Kt.bounds.left,Math.round(Kt.bounds.top),Kt.bounds.width,1);break;case 3:Dt.ctx.fillRect(Kt.bounds.left,Math.ceil(Kt.bounds.top+vt),Kt.bounds.width,1);break}}));break;case 1:j.webkitTextStrokeWidth&&Kt.text.trim().length&&(Dt.ctx.strokeStyle=Kn(j.webkitTextStrokeColor),Dt.ctx.lineWidth=j.webkitTextStrokeWidth,Dt.ctx.lineJoin=window.chrome?"miter":"round",Dt.ctx.strokeText(Kt.text,Kt.bounds.left,Kt.bounds.top+lt)),Dt.ctx.strokeStyle="",Dt.ctx.lineWidth=0,Dt.ctx.lineJoin="miter";break}})}),[2]})})},U.prototype.renderReplacedElement=function(K,j,ae){if(ae&&K.intrinsicWidth>0&&K.intrinsicHeight>0){var he=mu(K),_e=Ga(j);this.path(_e),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(ae,0,0,K.intrinsicWidth,K.intrinsicHeight,he.left,he.top,he.width,he.height),this.ctx.restore()}},U.prototype.renderNodeContent=function(K){return Q(this,void 0,void 0,function(){var j,ae,he,_e,Ge,We,lt,lt,vt,Ot,Dt,or,Kt,qt,Br,ar,ur,en,zr,lt,pn,Kt,ar;return R(this,function(sr){switch(sr.label){case 0:this.applyEffects(K.getEffects(4)),j=K.container,ae=K.curves,he=j.styles,_e=0,Ge=j.textNodes,sr.label=1;case 1:return _e<Ge.length?(We=Ge[_e],[4,this.renderTextNode(We,he)]):[3,4];case 2:sr.sent(),sr.label=3;case 3:return _e++,[3,1];case 4:if(!(j instanceof Xs))return[3,8];sr.label=5;case 5:return sr.trys.push([5,7,,8]),[4,this.context.cache.match(j.src)];case 6:return lt=sr.sent(),this.renderReplacedElement(j,ae,lt),[3,8];case 7:return sr.sent(),this.context.logger.error("Error loading image "+j.src),[3,8];case 8:if(j instanceof Ys&&this.renderReplacedElement(j,ae,j.canvas),!(j instanceof Zl))return[3,12];sr.label=9;case 9:return sr.trys.push([9,11,,12]),[4,this.context.cache.match(j.svg)];case 10:return lt=sr.sent(),this.renderReplacedElement(j,ae,lt),[3,12];case 11:return sr.sent(),this.context.logger.error("Error loading svg "+j.svg.substring(0,255)),[3,12];case 12:return j instanceof nu&&j.tree?(vt=new U(this.context,{scale:this.options.scale,backgroundColor:j.backgroundColor,x:0,y:0,width:j.width,height:j.height}),[4,vt.render(j.tree)]):[3,14];case 13:Ot=sr.sent(),j.width&&j.height&&this.ctx.drawImage(Ot,0,0,j.width,j.height,j.bounds.left,j.bounds.top,j.bounds.width,j.bounds.height),sr.label=14;case 14:if(j instanceof as&&(Dt=Math.min(j.bounds.width,j.bounds.height),j.type===Ka?j.checked&&(this.ctx.save(),this.path([new Wt(j.bounds.left+Dt*.39363,j.bounds.top+Dt*.79),new Wt(j.bounds.left+Dt*.16,j.bounds.top+Dt*.5549),new Wt(j.bounds.left+Dt*.27347,j.bounds.top+Dt*.44071),new Wt(j.bounds.left+Dt*.39694,j.bounds.top+Dt*.5649),new Wt(j.bounds.left+Dt*.72983,j.bounds.top+Dt*.23),new Wt(j.bounds.left+Dt*.84,j.bounds.top+Dt*.34085),new Wt(j.bounds.left+Dt*.39363,j.bounds.top+Dt*.79)]),this.ctx.fillStyle=Kn(eu),this.ctx.fill(),this.ctx.restore()):j.type===oa&&(j.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(j.bounds.left+Dt/2,j.bounds.top+Dt/2,Dt/4,0,Math.PI*2,!0),this.ctx.fillStyle=Kn(eu),this.ctx.fill(),this.ctx.restore()))),BA(j)&&j.value.length){or=this.createFontStyle(he),Kt=or[0],qt=or[1],Br=this.fontMetrics.getMetrics(Kt,qt).baseline,this.ctx.font=Kt,this.ctx.fillStyle=Kn(he.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=SA(j.styles.textAlign),ar=mu(j),ur=0;switch(j.styles.textAlign){case 1:ur+=ar.width/2;break;case 2:ur+=ar.width;break}en=ar.add(ur,0,0,-ar.height/2+1),this.ctx.save(),this.path([new Wt(ar.left,ar.top),new Wt(ar.left+ar.width,ar.top),new Wt(ar.left+ar.width,ar.top+ar.height),new Wt(ar.left,ar.top+ar.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Mi(j.value,en),he.letterSpacing,Br),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Qn(j.styles.display,2048))return[3,20];if(!(j.styles.listStyleImage!==null))return[3,19];if(zr=j.styles.listStyleImage,!(zr.type===0))return[3,18];lt=void 0,pn=zr.url,sr.label=15;case 15:return sr.trys.push([15,17,,18]),[4,this.context.cache.match(pn)];case 16:return lt=sr.sent(),this.ctx.drawImage(lt,j.bounds.left-(lt.width+10),j.bounds.top),[3,18];case 17:return sr.sent(),this.context.logger.error("Error loading list-style-image "+pn),[3,18];case 18:return[3,20];case 19:K.listValue&&j.styles.listStyleType!==-1&&(Kt=this.createFontStyle(he)[0],this.ctx.font=Kt,this.ctx.fillStyle=Kn(he.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",ar=new S(j.bounds.left,j.bounds.top+an(j.styles.paddingTop,j.bounds.width),j.bounds.width,Hn(he.lineHeight,he.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Mi(K.listValue,ar),he.letterSpacing,Hn(he.lineHeight,he.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),sr.label=20;case 20:return[2]}})})},U.prototype.renderStackContent=function(K){return Q(this,void 0,void 0,function(){var j,ae,he,_e,Ge,he,We,lt,he,vt,Ot,he,Dt,or,he,Kt,qt,he,Br,ar,he;return R(this,function(ur){switch(ur.label){case 0:if(Qn(K.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(K.element)];case 1:ur.sent(),j=0,ae=K.negativeZIndex,ur.label=2;case 2:return j<ae.length?(he=ae[j],[4,this.renderStack(he)]):[3,5];case 3:ur.sent(),ur.label=4;case 4:return j++,[3,2];case 5:return[4,this.renderNodeContent(K.element)];case 6:ur.sent(),_e=0,Ge=K.nonInlineLevel,ur.label=7;case 7:return _e<Ge.length?(he=Ge[_e],[4,this.renderNode(he)]):[3,10];case 8:ur.sent(),ur.label=9;case 9:return _e++,[3,7];case 10:We=0,lt=K.nonPositionedFloats,ur.label=11;case 11:return We<lt.length?(he=lt[We],[4,this.renderStack(he)]):[3,14];case 12:ur.sent(),ur.label=13;case 13:return We++,[3,11];case 14:vt=0,Ot=K.nonPositionedInlineLevel,ur.label=15;case 15:return vt<Ot.length?(he=Ot[vt],[4,this.renderStack(he)]):[3,18];case 16:ur.sent(),ur.label=17;case 17:return vt++,[3,15];case 18:Dt=0,or=K.inlineLevel,ur.label=19;case 19:return Dt<or.length?(he=or[Dt],[4,this.renderNode(he)]):[3,22];case 20:ur.sent(),ur.label=21;case 21:return Dt++,[3,19];case 22:Kt=0,qt=K.zeroOrAutoZIndexOrTransformedOrOpacity,ur.label=23;case 23:return Kt<qt.length?(he=qt[Kt],[4,this.renderStack(he)]):[3,26];case 24:ur.sent(),ur.label=25;case 25:return Kt++,[3,23];case 26:Br=0,ar=K.positiveZIndex,ur.label=27;case 27:return Br<ar.length?(he=ar[Br],[4,this.renderStack(he)]):[3,30];case 28:ur.sent(),ur.label=29;case 29:return Br++,[3,27];case 30:return[2]}})})},U.prototype.mask=function(K){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(K.slice(0).reverse()),this.ctx.closePath()},U.prototype.path=function(K){this.ctx.beginPath(),this.formatPath(K),this.ctx.closePath()},U.prototype.formatPath=function(K){var j=this;K.forEach(function(ae,he){var _e=Sn(ae)?ae.start:ae;he===0?j.ctx.moveTo(_e.x,_e.y):j.ctx.lineTo(_e.x,_e.y),Sn(ae)&&j.ctx.bezierCurveTo(ae.startControl.x,ae.startControl.y,ae.endControl.x,ae.endControl.y,ae.end.x,ae.end.y)})},U.prototype.renderRepeat=function(K,j,ae,he){this.path(K),this.ctx.fillStyle=j,this.ctx.translate(ae,he),this.ctx.fill(),this.ctx.translate(-ae,-he)},U.prototype.resizeImage=function(K,j,ae){var he;if(K.width===j&&K.height===ae)return K;var _e=(he=this.canvas.ownerDocument)!==null&&he!==void 0?he:document,Ge=_e.createElement("canvas");Ge.width=Math.max(1,j),Ge.height=Math.max(1,ae);var We=Ge.getContext("2d");return We.drawImage(K,0,0,K.width,K.height,0,0,j,ae),Ge},U.prototype.renderBackgroundImage=function(K){return Q(this,void 0,void 0,function(){var j,ae,he,_e,Ge,We;return R(this,function(lt){switch(lt.label){case 0:j=K.styles.backgroundImage.length-1,ae=function(vt){var Ot,Dt,or,Kt,qt,Br,ar,ur,en,zr,Kt,qt,Br,ar,ur,pn,sr,cn,mn,Kr,wi,yi,Oi,oi,en,la,Kt,Va,Xa,ar,ur,Ya,qt,Br,Lo,ua,Ja,_o,Oo,Sa,Do,La;return R(this,function(ds){switch(ds.label){case 0:if(!(vt.type===0))return[3,5];Ot=void 0,Dt=vt.url,ds.label=1;case 1:return ds.trys.push([1,3,,4]),[4,he.context.cache.match(Dt)];case 2:return Ot=ds.sent(),[3,4];case 3:return ds.sent(),he.context.logger.error("Error loading background-image "+Dt),[3,4];case 4:return Ot&&(or=nA(K,j,[Ot.width,Ot.height,Ot.width/Ot.height]),Kt=or[0],qt=or[1],Br=or[2],ar=or[3],ur=or[4],en=he.ctx.createPattern(he.resizeImage(Ot,ar,ur),"repeat"),he.renderRepeat(Kt,en,qt,Br)),[3,6];case 5:pl(vt)?(zr=nA(K,j,[null,null,null]),Kt=zr[0],qt=zr[1],Br=zr[2],ar=zr[3],ur=zr[4],pn=yu(vt.angle,ar,ur),sr=pn[0],cn=pn[1],mn=pn[2],Kr=pn[3],wi=pn[4],yi=document.createElement("canvas"),yi.width=ar,yi.height=ur,Oi=yi.getContext("2d"),oi=Oi.createLinearGradient(cn,Kr,mn,wi),cl(vt.stops,sr).forEach(function(rl){return oi.addColorStop(rl.stop,Kn(rl.color))}),Oi.fillStyle=oi,Oi.fillRect(0,0,ar,ur),ar>0&&ur>0&&(en=he.ctx.createPattern(yi,"repeat"),he.renderRepeat(Kt,en,qt,Br))):ml(vt)&&(la=nA(K,j,[null,null,null]),Kt=la[0],Va=la[1],Xa=la[2],ar=la[3],ur=la[4],Ya=vt.position.length===0?[ps]:vt.position,qt=an(Ya[0],ar),Br=an(Ya[Ya.length-1],ur),Lo=Da(vt,qt,Br,ar,ur),ua=Lo[0],Ja=Lo[1],ua>0&&Ja>0&&(_o=he.ctx.createRadialGradient(Va+qt,Xa+Br,0,Va+qt,Xa+Br,ua),cl(vt.stops,ua*2).forEach(function(rl){return _o.addColorStop(rl.stop,Kn(rl.color))}),he.path(Kt),he.ctx.fillStyle=_o,ua!==Ja?(Oo=K.bounds.left+.5*K.bounds.width,Sa=K.bounds.top+.5*K.bounds.height,Do=Ja/ua,La=1/Do,he.ctx.save(),he.ctx.translate(Oo,Sa),he.ctx.transform(1,0,0,Do,0,0),he.ctx.translate(-Oo,-Sa),he.ctx.fillRect(Va,La*(Xa-Sa)+Sa,ar,ur*La),he.ctx.restore()):he.ctx.fill())),ds.label=6;case 6:return j--,[2]}})},he=this,_e=0,Ge=K.styles.backgroundImage.slice(0).reverse(),lt.label=1;case 1:return _e<Ge.length?(We=Ge[_e],[5,ae(We)]):[3,4];case 2:lt.sent(),lt.label=3;case 3:return _e++,[3,1];case 4:return[2]}})})},U.prototype.renderSolidBorder=function(K,j,ae){return Q(this,void 0,void 0,function(){return R(this,function(he){return this.path(lA(ae,j)),this.ctx.fillStyle=Kn(K),this.ctx.fill(),[2]})})},U.prototype.renderDoubleBorder=function(K,j,ae,he){return Q(this,void 0,void 0,function(){var _e,Ge;return R(this,function(We){switch(We.label){case 0:return j<3?[4,this.renderSolidBorder(K,ae,he)]:[3,2];case 1:return We.sent(),[2];case 2:return _e=fA(he,ae),this.path(_e),this.ctx.fillStyle=Kn(K),this.ctx.fill(),Ge=pA(he,ae),this.path(Ge),this.ctx.fill(),[2]}})})},U.prototype.renderNodeBackgroundAndBorders=function(K){return Q(this,void 0,void 0,function(){var j,ae,he,_e,Ge,We,lt,vt,Ot=this;return R(this,function(Dt){switch(Dt.label){case 0:return this.applyEffects(K.getEffects(2)),j=K.container.styles,ae=!Ni(j.backgroundColor)||j.backgroundImage.length,he=[{style:j.borderTopStyle,color:j.borderTopColor,width:j.borderTopWidth},{style:j.borderRightStyle,color:j.borderRightColor,width:j.borderRightWidth},{style:j.borderBottomStyle,color:j.borderBottomColor,width:j.borderBottomWidth},{style:j.borderLeftStyle,color:j.borderLeftColor,width:j.borderLeftWidth}],_e=TA(cs(j.backgroundClip,0),K.curves),ae||j.boxShadow.length?(this.ctx.save(),this.path(_e),this.ctx.clip(),Ni(j.backgroundColor)||(this.ctx.fillStyle=Kn(j.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(K.container)]):[3,2];case 1:Dt.sent(),this.ctx.restore(),j.boxShadow.slice(0).reverse().forEach(function(or){Ot.ctx.save();var Kt=vi(K.curves),qt=or.inset?0:wA,Br=dA(Kt,-qt+(or.inset?1:-1)*or.spread.number,(or.inset?1:-1)*or.spread.number,or.spread.number*(or.inset?-2:2),or.spread.number*(or.inset?-2:2));or.inset?(Ot.path(Kt),Ot.ctx.clip(),Ot.mask(Br)):(Ot.mask(Kt),Ot.ctx.clip(),Ot.path(Br)),Ot.ctx.shadowOffsetX=or.offsetX.number+qt,Ot.ctx.shadowOffsetY=or.offsetY.number,Ot.ctx.shadowColor=Kn(or.color),Ot.ctx.shadowBlur=or.blur.number,Ot.ctx.fillStyle=or.inset?Kn(or.color):"rgba(0,0,0,1)",Ot.ctx.fill(),Ot.ctx.restore()}),Dt.label=2;case 2:Ge=0,We=0,lt=he,Dt.label=3;case 3:return We<lt.length?(vt=lt[We],vt.style!==0&&!Ni(vt.color)&&vt.width>0?vt.style===2?[4,this.renderDashedDottedBorder(vt.color,vt.width,Ge,K.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Dt.sent(),[3,11];case 5:return vt.style===3?[4,this.renderDashedDottedBorder(vt.color,vt.width,Ge,K.curves,3)]:[3,7];case 6:return Dt.sent(),[3,11];case 7:return vt.style===4?[4,this.renderDoubleBorder(vt.color,vt.width,Ge,K.curves)]:[3,9];case 8:return Dt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(vt.color,Ge,K.curves)];case 10:Dt.sent(),Dt.label=11;case 11:Ge++,Dt.label=12;case 12:return We++,[3,3];case 13:return[2]}})})},U.prototype.renderDashedDottedBorder=function(K,j,ae,he,_e){return Q(this,void 0,void 0,function(){var Ge,We,lt,vt,Ot,Dt,or,Kt,qt,Br,ar,ur,en,zr,pn,sr,pn,sr;return R(this,function(cn){return this.ctx.save(),Ge=mA(he,ae),We=lA(he,ae),_e===2&&(this.path(We),this.ctx.clip()),Sn(We[0])?(lt=We[0].start.x,vt=We[0].start.y):(lt=We[0].x,vt=We[0].y),Sn(We[1])?(Ot=We[1].end.x,Dt=We[1].end.y):(Ot=We[1].x,Dt=We[1].y),ae===0||ae===2?or=Math.abs(lt-Ot):or=Math.abs(vt-Dt),this.ctx.beginPath(),_e===3?this.formatPath(Ge):this.formatPath(We.slice(0,2)),Kt=j<3?j*3:j*2,qt=j<3?j*2:j,_e===3&&(Kt=j,qt=j),Br=!0,or<=Kt*2?Br=!1:or<=Kt*2+qt?(ar=or/(2*Kt+qt),Kt*=ar,qt*=ar):(ur=Math.floor((or+qt)/(Kt+qt)),en=(or-ur*Kt)/(ur-1),zr=(or-(ur+1)*Kt)/ur,qt=zr<=0||Math.abs(qt-en)<Math.abs(qt-zr)?en:zr),Br&&(_e===3?this.ctx.setLineDash([0,Kt+qt]):this.ctx.setLineDash([Kt,qt])),_e===3?(this.ctx.lineCap="round",this.ctx.lineWidth=j):this.ctx.lineWidth=j*2+1.1,this.ctx.strokeStyle=Kn(K),this.ctx.stroke(),this.ctx.setLineDash([]),_e===2&&(Sn(We[0])&&(pn=We[3],sr=We[0],this.ctx.beginPath(),this.formatPath([new Wt(pn.end.x,pn.end.y),new Wt(sr.start.x,sr.start.y)]),this.ctx.stroke()),Sn(We[1])&&(pn=We[1],sr=We[2],this.ctx.beginPath(),this.formatPath([new Wt(pn.end.x,pn.end.y),new Wt(sr.start.x,sr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},U.prototype.render=function(K){return Q(this,void 0,void 0,function(){var j;return R(this,function(ae){switch(ae.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Kn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),j=hA(K),[4,this.renderStack(j)];case 1:return ae.sent(),this.applyEffects([]),[2,this.canvas]}})})},U}(cA),BA=function(k){return k instanceof ru||k instanceof tu?!0:k instanceof as&&k.type!==oa&&k.type!==Ka},TA=function(k,U){switch(k){case 0:return vi(U);case 2:return Gn(U);case 1:default:return Ga(U)}},SA=function(k){switch(k){case 1:return"center";case 2:return"right";case 0:default:return"left"}},LA=["-apple-system","system-ui"],_A=function(k){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?k.filter(function(U){return LA.indexOf(U)===-1}):k},OA=function(k){N(U,k);function U(K,j){var ae=k.call(this,K,j)||this;return ae.canvas=j.canvas?j.canvas:document.createElement("canvas"),ae.ctx=ae.canvas.getContext("2d"),ae.options=j,ae.canvas.width=Math.floor(j.width*j.scale),ae.canvas.height=Math.floor(j.height*j.scale),ae.canvas.style.width=j.width+"px",ae.canvas.style.height=j.height+"px",ae.ctx.scale(ae.options.scale,ae.options.scale),ae.ctx.translate(-j.x,-j.y),ae.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+j.width+"x"+j.height+" at "+j.x+","+j.y+") with scale "+j.scale),ae}return U.prototype.render=function(K){return Q(this,void 0,void 0,function(){var j,ae;return R(this,function(he){switch(he.label){case 0:return j=es(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,K),[4,DA(j)];case 1:return ae=he.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Kn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(ae,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},U}(cA),DA=function(k){return new Promise(function(U,K){var j=new Image;j.onload=function(){U(j)},j.onerror=K,j.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(k))})},IA=function(){function k(U){var K=U.id,j=U.enabled;this.id=K,this.enabled=j,this.start=Date.now()}return k.prototype.debug=function(){for(var U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,E([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},k.prototype.getTime=function(){return Date.now()-this.start},k.prototype.info=function(){for(var U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,E([this.id,this.getTime()+"ms"],U)))},k.prototype.warn=function(){for(var U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,E([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},k.prototype.error=function(){for(var U=[],K=0;K<arguments.length;K++)U[K]=arguments[K];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,E([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},k.instances={},k}(),RA=function(){function k(U,K){var j;this.windowBounds=K,this.instanceName="#"+k.instanceCount++,this.logger=new IA({id:this.instanceName,enabled:U.logging}),this.cache=(j=U.cache)!==null&&j!==void 0?j:new kr(this,U)}return k.instanceCount=1,k}(),MA=function(k,U){return U===void 0&&(U={}),FA(k,U)};typeof window!="undefined"&&pr.setContext(window);var FA=function(k,U){return Q(void 0,void 0,void 0,function(){var K,j,ae,he,_e,Ge,We,lt,vt,Ot,Dt,or,Kt,qt,Br,ar,ur,en,zr,pn,sr,cn,sr,mn,Kr,wi,yi,Oi,oi,la,Va,Xa,Ya,Lo,ua,Ja,_o,Oo,Sa,Do;return R(this,function(La){switch(La.label){case 0:if(!k||typeof k!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(K=k.ownerDocument,!K)throw new Error("Element is not attached to a Document");if(j=K.defaultView,!j)throw new Error("Document is not attached to a Window");return ae={allowTaint:(mn=U.allowTaint)!==null&&mn!==void 0?mn:!1,imageTimeout:(Kr=U.imageTimeout)!==null&&Kr!==void 0?Kr:15e3,proxy:U.proxy,useCORS:(wi=U.useCORS)!==null&&wi!==void 0?wi:!1},he=_({logging:(yi=U.logging)!==null&&yi!==void 0?yi:!0,cache:U.cache},ae),_e={windowWidth:(Oi=U.windowWidth)!==null&&Oi!==void 0?Oi:j.innerWidth,windowHeight:(oi=U.windowHeight)!==null&&oi!==void 0?oi:j.innerHeight,scrollX:(la=U.scrollX)!==null&&la!==void 0?la:j.pageXOffset,scrollY:(Va=U.scrollY)!==null&&Va!==void 0?Va:j.pageYOffset},Ge=new S(_e.scrollX,_e.scrollY,_e.windowWidth,_e.windowHeight),We=new RA(he,Ge),lt=(Xa=U.foreignObjectRendering)!==null&&Xa!==void 0?Xa:!1,vt={allowTaint:(Ya=U.allowTaint)!==null&&Ya!==void 0?Ya:!1,onclone:U.onclone,ignoreElements:U.ignoreElements,inlineImages:lt,copyStyles:lt},We.logger.debug("Starting document clone with size "+Ge.width+"x"+Ge.height+" scrolled to "+-Ge.left+","+-Ge.top),Ot=new D(We,k,vt),Dt=Ot.clonedReferenceElement,Dt?[4,Ot.toIFrame(K,Ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return or=La.sent(),Kt=En(Dt)||tA(Dt)?p(Dt.ownerDocument):s(We,Dt),qt=Kt.width,Br=Kt.height,ar=Kt.left,ur=Kt.top,en=UA(We,Dt,U.backgroundColor),zr={canvas:U.canvas,backgroundColor:en,scale:(ua=(Lo=U.scale)!==null&&Lo!==void 0?Lo:j.devicePixelRatio)!==null&&ua!==void 0?ua:1,x:((Ja=U.x)!==null&&Ja!==void 0?Ja:0)+ar,y:((_o=U.y)!==null&&_o!==void 0?_o:0)+ur,width:(Oo=U.width)!==null&&Oo!==void 0?Oo:Math.ceil(qt),height:(Sa=U.height)!==null&&Sa!==void 0?Sa:Math.ceil(Br)},lt?(We.logger.debug("Document cloned, using foreign object rendering"),sr=new OA(We,zr),[4,sr.render(Dt)]):[3,3];case 2:return pn=La.sent(),[3,5];case 3:return We.logger.debug("Document cloned, element located at "+ar+","+ur+" with size "+qt+"x"+Br+" using computed rendering"),We.logger.debug("Starting DOM parsing"),cn=au(We,Dt),en===cn.styles.backgroundColor&&(cn.styles.backgroundColor=Li.TRANSPARENT),We.logger.debug("Starting renderer for element at "+zr.x+","+zr.y+" with size "+zr.width+"x"+zr.height),sr=new xA(We,zr),[4,sr.render(cn)];case 4:pn=La.sent(),La.label=5;case 5:return((Do=U.removeContainer)!==null&&Do!==void 0?Do:!0)&&(D.destroy(or)||We.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),We.logger.debug("Finished rendering"),[2,pn]}})})},UA=function(k,U,K){var j=U.ownerDocument,ae=j.documentElement?da(k,getComputedStyle(j.documentElement).backgroundColor):Li.TRANSPARENT,he=j.body?da(k,getComputedStyle(j.body).backgroundColor):Li.TRANSPARENT,_e=typeof K=="string"?da(k,K):K===null?Li.TRANSPARENT:4294967295;return U===j.documentElement?Ni(ae)?Ni(he)?_e:he:ae:_e};return MA})},wRmb:function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return v});var X=W("rePB"),N=W("KQm4"),_=W("VTBJ"),Q=W("Ff2n"),R=W("q1tI"),E=W.n(R),S=W("Kwbf"),s=W("Zm9Q"),p=W("hW8S");function v(g){return Object(s.a)(g).filter(function(C){return R.isValidElement(C)}).map(function(C){var c=C.key,a=C.props,u=a.children,m=Object(Q.a)(a,["children"]),y=Object(_.a)({key:c},m);return u&&(y.children=v(u)),y})}function i(g){return g.reduce(function(C,c){var a=c.fixed,u=a===!0?"left":a,m=c.children;return m&&m.length>0?[].concat(Object(N.a)(C),Object(N.a)(i(m).map(function(y){return Object(_.a)({fixed:u},y)}))):[].concat(Object(N.a)(C),[Object(_.a)(Object(_.a)({},c),{},{fixed:u})])},[])}function A(g){for(var C=!0,c=0;c<g.length;c+=1){var a=g[c];if(C&&a.fixed!=="left")C=!1;else if(!C&&a.fixed==="left"){Object(S.a)(!1,"Index ".concat(c-1," of `columns` missing `fixed='left'` prop."));break}}for(var u=!0,m=g.length-1;m>=0;m-=1){var y=g[m];if(u&&y.fixed!=="right")u=!1;else if(!u&&y.fixed==="right"){Object(S.a)(!1,"Index ".concat(m+1," of `columns` missing `fixed='right'` prop."));break}}}function O(g){return g.map(function(C){var c=C.fixed,a=Object(Q.a)(C,["fixed"]),u=c;return c==="left"?u="right":c==="right"&&(u="left"),Object(_.a)({fixed:u},a)})}function w(g,C){var c=g.prefixCls,a=g.columns,u=g.children,m=g.expandable,y=g.expandedKeys,T=g.getRowKey,x=g.onTriggerExpand,M=g.expandIcon,b=g.rowExpandable,o=g.expandIconColumnIndex,r=g.direction,n=g.expandRowByClick,l=R.useMemo(function(){return a||v(u)},[a,u]),L=R.useMemo(function(){if(m){var I,H=o||0,z=l[H],Z=(I={},Object(X.a)(I,p.a,{className:"".concat(c,"-expand-icon-col")}),Object(X.a)(I,"title",""),Object(X.a)(I,"fixed",z?z.fixed:null),Object(X.a)(I,"className","".concat(c,"-row-expand-icon-cell")),Object(X.a)(I,"render",function(ee,J,oe){var se=T(J,oe),Te=y.has(se),be=b?b(J):!0,xe=M({prefixCls:c,expanded:Te,expandable:be,record:J,onExpand:x});return n?R.createElement("span",{onClick:function(Ne){return Ne.stopPropagation()}},xe):xe}),I),Y=l.slice();return H>=0&&Y.splice(H,0,Z),Y}return l},[m,l,T,y,M,r]),B=R.useMemo(function(){var I=L;return C&&(I=C(I)),I.length||(I=[{render:function(){return null}}]),I},[C,L,r]),h=R.useMemo(function(){return r==="rtl"?O(i(B)):i(B)},[B,r]);return[B,h]}pe.b=w},wU8J:function(Xe,pe){function W(){this.buffer=new Array,this.length=0}W.prototype={get:function(X){var N=Math.floor(X/8);return(this.buffer[N]>>>7-X%8&1)==1},put:function(X,N){for(var _=0;_<N;_++)this.putBit((X>>>N-_-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(X){var N=Math.floor(this.length/8);this.buffer.length<=N&&this.buffer.push(0),X&&(this.buffer[N]|=128>>>this.length%8),this.length++}},Xe.exports=W},x6Kt:function(Xe,pe,W){var X=W("y+Vt"),N=W("VpOo"),_=W("nPnh"),Q=_.subPixelOptimizeRect,R={},E=X.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(S,s){var p,v,i,A;this.subPixelOptimize?(Q(R,s,this.style),p=R.x,v=R.y,i=R.width,A=R.height,R.r=s.r,s=R):(p=s.x,v=s.y,i=s.width,A=s.height),s.r?N.buildPath(S,s):S.rect(p,v,i,A),S.closePath();return}});Xe.exports=E},"y+Vt":function(Xe,pe,W){var X=W("Gev7"),N=W("bYtY"),_=W("IMiH"),Q=W("2DNl"),R=W("3C/r"),E=R.prototype.getCanvasPattern,S=Math.abs,s=new _(!0);function p(i){X.call(this,i),this.path=null}p.prototype={constructor:p,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,A){var O=this.style,w=this.path||s,g=O.hasStroke(),C=O.hasFill(),c=O.fill,a=O.stroke,u=C&&!!c.colorStops,m=g&&!!a.colorStops,y=C&&!!c.image,T=g&&!!a.image;if(O.bind(i,this,A),this.setTransform(i),this.__dirty){var x;u&&(x=x||this.getBoundingRect(),this._fillGradient=O.getGradient(i,c,x)),m&&(x=x||this.getBoundingRect(),this._strokeGradient=O.getGradient(i,a,x))}u?i.fillStyle=this._fillGradient:y&&(i.fillStyle=E.call(c,i)),m?i.strokeStyle=this._strokeGradient:T&&(i.strokeStyle=E.call(a,i));var M=O.lineDash,b=O.lineDashOffset,o=!!i.setLineDash,r=this.getGlobalScale();if(w.setScale(r[0],r[1],this.segmentIgnoreThreshold),this.__dirtyPath||M&&!o&&g?(w.beginPath(i),M&&!o&&(w.setLineDash(M),w.setLineDashOffset(b)),this.buildPath(w,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),C)if(O.fillOpacity!=null){var n=i.globalAlpha;i.globalAlpha=O.fillOpacity*O.opacity,w.fill(i),i.globalAlpha=n}else w.fill(i);if(M&&o&&(i.setLineDash(M),i.lineDashOffset=b),g)if(O.strokeOpacity!=null){var n=i.globalAlpha;i.globalAlpha=O.strokeOpacity*O.opacity,w.stroke(i),i.globalAlpha=n}else w.stroke(i);M&&o&&i.setLineDash([]),O.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,A,O){},createPathProxy:function(){this.path=new _},getBoundingRect:function(){var i=this._rect,A=this.style,O=!i;if(O){var w=this.path;w||(w=this.path=new _),this.__dirtyPath&&(w.beginPath(),this.buildPath(w,this.shape,!1)),i=w.getBoundingRect()}if(this._rect=i,A.hasStroke()){var g=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||O){g.copy(i);var C=A.lineWidth,c=A.strokeNoScale?this.getLineScale():1;A.hasFill()||(C=Math.max(C,this.strokeContainThreshold||4)),c>1e-10&&(g.width+=C/c,g.height+=C/c,g.x-=C/c/2,g.y-=C/c/2)}return g}return i},contain:function(i,A){var O=this.transformCoordToLocal(i,A),w=this.getBoundingRect(),g=this.style;if(i=O[0],A=O[1],w.contain(i,A)){var C=this.path.data;if(g.hasStroke()){var c=g.lineWidth,a=g.strokeNoScale?this.getLineScale():1;if(a>1e-10&&(g.hasFill()||(c=Math.max(c,this.strokeContainThreshold)),Q.containStroke(C,c/a,i,A)))return!0}if(g.hasFill())return Q.contain(C,i,A)}return!1},dirty:function(i){i==null&&(i=!0),i&&(this.__dirtyPath=i,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(i){return this.animate("shape",i)},attrKV:function(i,A){i==="shape"?(this.setShape(A),this.__dirtyPath=!0,this._rect=null):X.prototype.attrKV.call(this,i,A)},setShape:function(i,A){var O=this.shape;if(O){if(N.isObject(i))for(var w in i)i.hasOwnProperty(w)&&(O[w]=i[w]);else O[i]=A;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&S(i[0]-1)>1e-10&&S(i[3]-1)>1e-10?Math.sqrt(S(i[0]*i[3]-i[2]*i[1])):1}},p.extend=function(i){var A=function(w){p.call(this,w),i.style&&this.style.extendFrom(i.style,!1);var g=i.shape;if(g){this.shape=this.shape||{};var C=this.shape;for(var c in g)!C.hasOwnProperty(c)&&g.hasOwnProperty(c)&&(C[c]=g[c])}i.init&&i.init.call(this,w)};N.inherits(A,p);for(var O in i)O!=="style"&&O!=="shape"&&(A.prototype[O]=i[O]);return A},N.inherits(p,X);var v=p;Xe.exports=v},"y0+3":function(Xe,pe,W){"use strict";W.d(pe,"a",function(){return i}),W.d(pe,"b",function(){return O});var X=/margin|padding|width|height|max|min|offset/,N={left:!0,top:!0},_={cssFloat:1,styleFloat:1,float:1};function Q(w){return w.nodeType===1?w.ownerDocument.defaultView.getComputedStyle(w,null):{}}function R(w,g,C){if(g=g.toLowerCase(),C==="auto"){if(g==="height")return w.offsetHeight;if(g==="width")return w.offsetWidth}return g in N||(N[g]=X.test(g)),N[g]?parseFloat(C)||0:C}function E(w,g){var C=arguments.length,c=Q(w);return g=_[g]?"cssFloat"in w.style?"cssFloat":"styleFloat":g,C===1?c:R(w,g,c[g]||w.style[g])}function S(w,g,C){var c=arguments.length;if(g=_[g]?"cssFloat"in w.style?"cssFloat":"styleFloat":g,c===3)return typeof C=="number"&&X.test(g)&&(C="".concat(C,"px")),w.style[g]=C,C;for(var a in g)g.hasOwnProperty(a)&&S(w,a,g[a]);return Q(w)}function s(w){return w===document.body?document.documentElement.clientWidth:w.offsetWidth}function p(w){return w===document.body?window.innerHeight||document.documentElement.clientHeight:w.offsetHeight}function v(){var w=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:w,height:g}}function i(){var w=document.documentElement.clientWidth,g=window.innerHeight||document.documentElement.clientHeight;return{width:w,height:g}}function A(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function O(w){var g=w.getBoundingClientRect(),C=document.documentElement;return{left:g.left+(window.pageXOffset||C.scrollLeft)-(C.clientLeft||document.body.clientLeft||0),top:g.top+(window.pageYOffset||C.scrollTop)-(C.clientTop||document.body.clientTop||0)}}},y23F:function(Xe,pe){function W(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}W.prototype={constructor:W,_dragStart:function(_){for(var Q=_.target;Q&&!Q.draggable;)Q=Q.parent;Q&&(this._draggingTarget=Q,Q.dragging=!0,this._x=_.offsetX,this._y=_.offsetY,this.dispatchToElement(X(Q,_),"dragstart",_.event))},_drag:function(_){var Q=this._draggingTarget;if(Q){var R=_.offsetX,E=_.offsetY,S=R-this._x,s=E-this._y;this._x=R,this._y=E,Q.drift(S,s,_),this.dispatchToElement(X(Q,_),"drag",_.event);var p=this.findHover(R,E,Q).target,v=this._dropTarget;this._dropTarget=p,Q!==p&&(v&&p!==v&&this.dispatchToElement(X(v,_),"dragleave",_.event),p&&p!==v&&this.dispatchToElement(X(p,_),"dragenter",_.event))}},_dragEnd:function(_){var Q=this._draggingTarget;Q&&(Q.dragging=!1),this.dispatchToElement(X(Q,_),"dragend",_.event),this._dropTarget&&this.dispatchToElement(X(this._dropTarget,_),"drop",_.event),this._draggingTarget=null,this._dropTarget=null}};function X(_,Q){return{target:_,topTarget:Q&&Q.topTarget}}var N=W;Xe.exports=N},yxFR:function(Xe,pe,W){var X=W("y+Vt"),N=W("nPnh"),_=N.subPixelOptimizeLine,Q={},R=X.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(E,S){var s,p,v,i;this.subPixelOptimize?(_(Q,S,this.style),s=Q.x1,p=Q.y1,v=Q.x2,i=Q.y2):(s=S.x1,p=S.y1,v=S.x2,i=S.y2);var A=S.percent;if(A===0)return;E.moveTo(s,p),A<1&&(v=s*(1-A)+v*A,i=p*(1-A)+i*A),E.lineTo(v,i)},pointAt:function(E){var S=this.shape;return[S.x1*(1-E)+S.x2*E,S.y1*(1-E)+S.y2*E]}});Xe.exports=R},z9Ch:function(Xe,pe,W){Xe.exports={flex_box_center:"flex_box_center___3OoGm",flex_space_between:"flex_space_between___1T26N",flex_box_vertical_center:"flex_box_vertical_center___1ToJb",flex_box_center_end:"flex_box_center_end___3yWc3",flex_box_column:"flex_box_column___2DqGp",title:"title___27RYc",export:"export___23HFM",title1_right:"title1_right___QCRrC",userPic:"userPic___1IO2N",userInfo:"userInfo___1tmSz",listItem:"listItem___j4sdw",rightInfo:"rightInfo___163Ic",shixunTitle:"shixunTitle___15lHO",shixunWrp:"shixunWrp___O2H0q",footerBar:"footerBar___NH_yZ",footerBarStatic:"footerBarStatic___2dJUI",exitComment:"exitComment___2O-uT",nextComment:"nextComment___2fkhG",modal:"modal___LOSk6"}},zarK:function(Xe,pe,W){var X=W("YH21"),N=X.addEventListener,_=X.removeEventListener,Q=X.normalizeEvent,R=X.getNativeEvent,E=W("bYtY"),S=W("H6uX"),s=W("ItGF"),p=300,v=s.domSupported,i=function(){var h=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],I=["touchstart","touchend","touchmove"],H={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},z=E.map(h,function(Z){var Y=Z.replace("mouse","pointer");return H.hasOwnProperty(Y)?Y:Z});return{mouse:h,touch:I,pointer:z}}(),A={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function O(h){return h==="mousewheel"&&s.browser.firefox?"DOMMouseScroll":h}function w(h){var I=h.pointerType;return I==="pen"||I==="touch"}function g(h){h.touching=!0,h.touchTimer!=null&&(clearTimeout(h.touchTimer),h.touchTimer=null),h.touchTimer=setTimeout(function(){h.touching=!1,h.touchTimer=null},700)}function C(h){h&&(h.zrByTouch=!0)}function c(h,I){return Q(h.dom,new u(h,I),!0)}function a(h,I){for(var H=I,z=!1;H&&H.nodeType!==9&&!(z=H.domBelongToZr||H!==I&&H===h.painterRoot);)H=H.parentNode;return z}function u(h,I){this.type=I.type,this.target=this.currentTarget=h.dom,this.pointerType=I.pointerType,this.clientX=I.clientX,this.clientY=I.clientY}var m=u.prototype;m.stopPropagation=m.stopImmediatePropagation=m.preventDefault=E.noop;var y={mousedown:function(h){h=Q(this.dom,h),this._mayPointerCapture=[h.zrX,h.zrY],this.trigger("mousedown",h)},mousemove:function(h){h=Q(this.dom,h);var I=this._mayPointerCapture;I&&(h.zrX!==I[0]||h.zrY!==I[1])&&r(this,!0),this.trigger("mousemove",h)},mouseup:function(h){h=Q(this.dom,h),r(this,!1),this.trigger("mouseup",h)},mouseout:function(h){h=Q(this.dom,h),this._pointerCapturing&&(h.zrEventControl="no_globalout");var I=h.toElement||h.relatedTarget;h.zrIsToLocalDOM=a(this,I),this.trigger("mouseout",h)},touchstart:function(h){h=Q(this.dom,h),C(h),this._lastTouchMoment=new Date,this.handler.processGesture(h,"start"),y.mousemove.call(this,h),y.mousedown.call(this,h)},touchmove:function(h){h=Q(this.dom,h),C(h),this.handler.processGesture(h,"change"),y.mousemove.call(this,h)},touchend:function(h){h=Q(this.dom,h),C(h),this.handler.processGesture(h,"end"),y.mouseup.call(this,h),+new Date-this._lastTouchMoment<p&&y.click.call(this,h)},pointerdown:function(h){y.mousedown.call(this,h)},pointermove:function(h){w(h)||y.mousemove.call(this,h)},pointerup:function(h){y.mouseup.call(this,h)},pointerout:function(h){w(h)||y.mouseout.call(this,h)}};E.each(["click","mousewheel","dblclick","contextmenu"],function(h){y[h]=function(I){I=Q(this.dom,I),this.trigger(h,I)}});var T={pointermove:function(h){w(h)||T.mousemove.call(this,h)},pointerup:function(h){T.mouseup.call(this,h)},mousemove:function(h){this.trigger("mousemove",h)},mouseup:function(h){var I=this._pointerCapturing;r(this,!1),this.trigger("mouseup",h),I&&(h.zrEventControl="only_globalout",this.trigger("mouseout",h))}};function x(h,I){var H=I.domHandlers;s.pointerEventsSupported?E.each(i.pointer,function(z){b(I,z,function(Z){H[z].call(h,Z)})}):(s.touchEventsSupported&&E.each(i.touch,function(z){b(I,z,function(Z){H[z].call(h,Z),g(I)})}),E.each(i.mouse,function(z){b(I,z,function(Z){Z=R(Z),I.touching||H[z].call(h,Z)})}))}function M(h,I){s.pointerEventsSupported?E.each(A.pointer,H):s.touchEventsSupported||E.each(A.mouse,H);function H(z){function Z(Y){Y=R(Y),a(h,Y.target)||(Y=c(h,Y),I.domHandlers[z].call(h,Y))}b(I,z,Z,{capture:!0})}}function b(h,I,H,z){h.mounted[I]=H,h.listenerOpts[I]=z,N(h.domTarget,O(I),H,z)}function o(h){var I=h.mounted;for(var H in I)I.hasOwnProperty(H)&&_(h.domTarget,O(H),I[H],h.listenerOpts[H]);h.mounted={}}function r(h,I){if(h._mayPointerCapture=null,v&&h._pointerCapturing^I){h._pointerCapturing=I;var H=h._globalHandlerScope;I?M(h,H):o(H)}}function n(h,I){this.domTarget=h,this.domHandlers=I,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function l(h,I){S.call(this),this.dom=h,this.painterRoot=I,this._localHandlerScope=new n(h,y),v&&(this._globalHandlerScope=new n(document,T)),this._pointerCapturing=!1,this._mayPointerCapture=null,x(this,this._localHandlerScope)}var L=l.prototype;L.dispose=function(){o(this._localHandlerScope),v&&o(this._globalHandlerScope)},L.setCursor=function(h){this.dom.style&&(this.dom.style.cursor=h||"default")},E.mixin(l,S);var B=l;Xe.exports=B}}]);
|