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

445 lines
1.4 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[69,3,5,6,7,8,9],{"+NIl":function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(z,N){"use strict";function V(d,u){d.cmdState.push(u)}function W(d){return d.cmdState.length>0?d.cmdState[d.cmdState.length-1]:null}function M(d){var u=d.cmdState.pop();u&&u.closeBracket()}function K(d){for(var u=d.cmdState,c=u.length-1;c>=0;c--){var o=u[c];if(o.name=="DEFAULT")continue;return o}return{styleIdentifier:function(){return null}}}function H(d,u,c){return function(){this.name=d,this.bracketNo=0,this.style=u,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 n={};n.importmodule=H("importmodule","tag",["string","builtin"]),n.documentclass=H("documentclass","tag",["","atom"]),n.usepackage=H("usepackage","tag",["atom"]),n.begin=H("begin","tag",["atom"]),n.end=H("end","tag",["atom"]),n.label=H("label","tag",["atom"]),n.ref=H("ref","tag",["atom"]),n.eqref=H("eqref","tag",["atom"]),n.cite=H("cite","tag",["atom"]),n.bibitem=H("bibitem","tag",["atom"]),n.Bibitem=H("Bibitem","tag",["atom"]),n.RBibitem=H("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(d,u){d.f=u}function b(d,u){var c;if(d.match(/^\\[a-zA-Z@]+/)){var o=d.current().slice(1);return c=n.hasOwnProperty(o)?n[o]:n.DEFAULT,c=new c,V(u,c),D(u,f),c.style}if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/\\]/))return"tag";if(d.match("\\["))return D(u,function(a,i){return m(a,i,"\\]")}),"keyword";if(d.match("\\("))return D(u,function(a,i){return m(a,i,"\\)")}),"keyword";if(d.match("$$"))return D(u,function(a,i){return m(a,i,"$$")}),"keyword";if(d.match("$"))return D(u,function(a,i){return m(a,i,"$")}),"keyword";var l=d.next();if(l=="%")return d.skipToEnd(),"comment";if(l=="}"||l=="]"){if(c=W(u),c)c.closeBracket(l),D(u,f);else return"error";return"bracket"}else return l=="{"||l=="["?(c=n.DEFAULT,c=new c,V(u,c),"bracket"):/\d/.test(l)?(d.eatWhile(/[\w.%]/),"atom"):(d.eatWhile(/[\w\-_]/),c=K(u),c.name=="begin"&&(c.argument=d.current()),c.styleIdentifier())}function m(d,u,c){if(d.eatSpace())return null;if(c&&d.match(c))return D(u,b),"keyword";if(d.match(/^\\[a-zA-Z@]+/))return"tag";if(d.match(/^[a-zA-Z]+/))return"variable-2";if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/]/))return"tag";if(d.match(/^[\^_&]/))return"tag";if(d.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(d.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var o=d.next();return o=="{"||o=="}"||o=="["||o=="]"||o=="("||o==")"?"bracket":o=="%"?(d.skipToEnd(),"comment"):"error"}function f(d,u){var c=d.peek(),o;return c=="{"||c=="["?(o=W(u),o.openBracket(c),d.eat(c),D(u,b),"bracket"):/[ \t\r]/.test(c)?(d.eat(c),null):(D(u,b),M(u),b(d,u))}return{startState:function(){var d=N.inMathMode?function(u,c){return m(u,c)}:b;return{cmdState:[],f:d}},copyState:function(d){return{cmdState:d.cmdState.slice(),f:d.f}},token:function(d,u){return u.f(d,u)},blankLine:function(d){d.f=b,d.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+ua5":function(Ve,se,U){},"/GNS":function(Ve,se,U){Ve.exports=U.p+"static/search1.c4136dd4.png"},"/cxE":function(Ve,se,U){"use strict";U.d(se,"f",function(){return N}),U.d(se,"g",function(){return V}),U.d(se,"h",function(){return W}),U.d(se,"e",function(){return K}),U.d(se,"b",function(){return H}),U.d(se,"c",function(){return n}),U.d(se,"d",function(){return D}),U.d(se,"a",function(){return b});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(f=>{f(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const z=new Z;function N(m){K(m)||z.onUnexpectedError(m);return}function V(m){K(m)||z.onUnexpectedExternalError(m);return}function W(m){if(m instanceof Error){let{name:f,message:d}=m;const u=m.stacktrace||m.stack;return{$isError:!0,name:f,message:d,stack:u}}return m}const M="Canceled";function K(m){return m instanceof Error&&m.name===M&&m.message===M}function H(){const m=new Error(M);return m.name=m.message,m}function n(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function D(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class b extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(H,n,D){var b=D&&D!=Z.Init;if(n&&!b)H.on("blur",W),H.on("change",M),H.on("swapDoc",M),Z.on(H.getInputField(),"compositionupdate",H.state.placeholderCompose=function(){V(H)}),M(H);else if(!n&&b){H.off("blur",W),H.off("change",M),H.off("swapDoc",M),Z.off(H.getInputField(),"compositionupdate",H.state.placeholderCompose),z(H);var m=H.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}n&&!H.hasFocus()&&W(H)});function z(H){H.state.placeholder&&(H.state.placeholder.parentNode.removeChild(H.state.placeholder),H.state.placeholder=null)}function N(H){z(H);var n=H.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=H.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var D=H.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),n.appendChild(D),H.display.lineSpace.insertBefore(n,H.display.lineSpace.firstChild)}function V(H){setTimeout(function(){var n=!1,D=H.getInputField();D.nodeName=="TEXTAREA"?n=!D.value:H.lineCount()==1&&(n=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),n?N(H):z(H)},20)}function W(H){K(H)&&N(H)}function M(H){var n=H.getWrapperElement(),D=K(H);n.className=n.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?N(H):z(H)}function K(H){return H.lineCount()===1&&H.getLine(0)===""}})},"1eCo":function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){"use strict";var z={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},N={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(V,W){var M=V.indentUnit,K={},H=W.htmlMode?z:N;for(var n in H)K[n]=H[n];for(var n in W)K[n]=W[n];var D,b;function m(h,A){function _(x){return A.tokenize=x,x(h,A)}var v=h.next();if(v=="<")return h.eat("!")?h.eat("[")?h.match("CDATA[")?_(u("atom","]]>")):null:h.match("--")?_(u("comment","-->")):h.match("DOCTYPE",!0,!0)?(h.eatWhile(/[\w\._\-]/),_(c(1))):null:h.eat("?")?(h.eatWhile(/[\w\._\-]/),A.tokenize=u("meta","?>"),"meta"):(D=h.eat("/")?"closeTag":"openTag",A.tokenize=f,"tag bracket");if(v=="&"){var P;return h.eat("#")?h.eat("x")?P=h.eatWhile(/[a-fA-F\d]/)&&h.eat(";"):P=h.eatWhile(/[\d]/)&&h.eat(";"):P=h.eatWhile(/[\w\.\-:]/)&&h.eat(";"),P?"atom":"error"}else return h.eatWhile(/[^&<]/),null}m.isInText=!0;function f(h,A){var _=h.next();if(_==">"||_=="/"&&h.eat(">"))return A.tokenize=m,D=_==">"?"endTag":"selfcloseTag","tag bracket";if(_=="=")return D="equals",null;if(_=="<"){A.tokenize=m,A.state=i,A.tagName=A.tagStart=null;var v=A.tokenize(h,A);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(_)?(A.tokenize=d(_),A.stringStartCol=h.column(),A.tokenize(h,A)):(h.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(h){var A=function(_,v){for(;!_.eol();)if(_.next()==h){v.tokenize=f;break}return"string"};return A.isInAttribute=!0,A}function u(h,A){return function(_,v){for(;!_.eol();){if(_.match(A)){v.tokenize=m;break}_.next()}return h}}function c(h){return function(A,_){for(var v;(v=A.next())!=null;){if(v=="<")return _.tokenize=c(h+1),_.tokenize(A,_);if(v==">")if(h==1){_.tokenize=m;break}else return _.tokenize=c(h-1),_.tokenize(A,_)}return"meta"}}function o(h,A,_){this.prev=h.context,this.tagName=A,this.indent=h.indented,this.startOfLine=_,(K.doNotIndent.hasOwnProperty(A)||h.context&&h.context.noIndent)&&(this.noIndent=!0)}function l(h){h.context&&(h.context=h.context.prev)}function a(h,A){for(var _;;){if(!h.context)return;if(_=h.context.tagName,!K.contextGrabbers.hasOwnProperty(_)||!K.contextGrabbers[_].hasOwnProperty(A))return;l(h)}}function i(h,A,_){return h=="openTag"?(_.tagStart=A.column(),R):h=="closeTag"?S:i}function R(h,A,_){return h=="word"?(_.tagName=A.current(),b="tag",O):K.allowMissingTagName&&h=="endTag"?(b="tag bracket",O(h,A,_)):(b="error",R)}function S(h,A,_){if(h=="word"){var v=A.current();return _.context&&_.context.tagName!=v&&K.implicitlyClosed.hasOwnProperty(_.context.tagName)&&l(_),_.context&&_.context.tagName==v||K.matchClosing===!1?(b="tag",T):(b="tag error",I)}else return K.allowMissingTagName&&h=="endTag"?(b="tag bracket",T(h,A,_)):(b="error",I)}function T(h,A,_){return h!="endTag"?(b="error",T):(l(_),i)}function I(h,A,_){return b="error",T(h,A,_)}function O(h,A,_){if(h=="word")return b="attribute",E;if(h=="endTag"||h=="selfcloseTag"){var v=_.tagName,P=_.tagStart;return _.tagName=_.tagStart=null,h=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(v)?a(_,v):(a(_,v),_.context=new o(_,v,P==_.indented)),i}return b="error",O}function E(h,A,_){return h=="equals"?y:(K.allowMissing||(b="error"),O(h,A,_))}function y(h,A,_){return h=="string"?p:h=="word"&&K.allowUnquoted?(b="string",O):(b="error",O(h,A,_))}function p(h,A,_){return h=="string"?p:O(h,A,_)}return{startState:function(h){var A={tokenize:m,state:i,indented:h||0,tagName:null,tagStart:null,context:null};return h!=null&&(A.baseIndent=h),A},token:function(h,A){if(!A.tagName&&h.sol()&&(A.indented=h.indentation()),h.eatSpace())return null;D=null;var _=A.tokenize(h,A);return(_||D)&&_!="comment"&&(b=null,A.state=A.state(D||_,h,A),b&&(_=b=="error"?_+" error":b)),_},indent:function(h,A,_){var v=h.context;if(h.tokenize.isInAttribute)return h.tagStart==h.indented?h.stringStartCol+1:h.indented+M;if(v&&v.noIndent)return Z.Pass;if(h.tokenize!=f&&h.tokenize!=m)return _?_.match(/^(\s*)/)[0].length:0;if(h.tagName)return K.multilineTagIndentPastTag!==!1?h.tagStart+h.tagName.length+2:h.tagStart+M*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/<!\[CDATA\[/.test(A))return 0;var P=A&&/^<(\/)?([\w_:\.-]*)/.exec(A);if(P&&P[1])for(;v;)if(v.tagName==P[2]){v=v.prev;break}else if(K.implicitlyClosed.hasOwnProperty(v.tagName))v=v.prev;else break;else if(P)for(;v;){var x=K.contextGrabbers[v.tagName];if(x&&x.hasOwnProperty(P[2]))v=v.prev;else break}for(;v&&v.prev&&!v.startOfLine;)v=v.prev;return v?v.indent+M:h.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(h){h.state==y&&(h.state=O)},xmlCurrentTag:function(h){return h.tagName?{name:h.tagName,close:h.type=="closeTag"}:null},xmlCurrentContext:function(h){for(var A=[],_=h.context;_;_=_.prev)_.tagName&&A.push(_.tagName);return A.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Ve,se,U){"use strict";U.d(se,"d",function(){return rt}),U.d(se,"b",function(){return Te}),U.d(se,"c",function(){return ot}),U.d(se,"a",function(){return Ot});var Z=U("VTBJ"),z=U("1OyB"),N=U("vuIU"),V=U("JX7q"),W=U("Ji7U"),M=U("LK+K"),K=U("q1tI"),H=U("I8Z2"),n=U("BGR+"),D=U("wx14"),b=U("rePB"),m=U("4IlW"),f=U("2GS6"),d=U("Gytx"),u=U.n(d),c=U("TSYQ"),o=U.n(c),l=U("U8pU"),a=U("ODXe"),i=/iPhone/i,R=/iPod/i,S=/iPad/i,T=/\bAndroid(?:.+)Mobile\b/i,I=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,E=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,y=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,h=/BlackBerry/i,A=/BB10/i,_=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i;function x(vt,qe){return vt.test(qe)}function C(vt){var qe=vt||(typeof navigator!="undefined"?navigator.userAgent:""),Qe=qe.split("[FBAN");if(typeof Qe[1]!="undefined"){var Ue=Qe,le=Object(a.a)(Ue,1);qe=le[0]}if(Qe=qe.split("Twitter"),typeof Qe[1]!="undefined"){var pe=Qe,$e=Object(a.a)(pe,1);qe=$e[0]}var je={apple:{phone:x(i,qe)&&!x(y,qe),ipod:x(R,qe),tablet:!x(i,qe)&&x(S,qe)&&!x(y,qe),device:(x(i,qe)||x(R,qe)||x(S,qe))&&!x(y,qe)},amazon:{phone:x(O,qe),tablet:!x(O,qe)&&x(E,qe),device:x(O,qe)||x(E,qe)},android:{phone:!x(y,qe)&&x(O,qe)||!x(y,qe)&&x(T,qe),tablet:!x(y,qe)&&!x(O,qe)&&!x(T,qe)&&(x(E,qe)||x(I,qe)),device:!x(y,qe)&&(x(O,qe)||x(E,qe)||x(T,qe)||x(I,qe))||x(/\bokhttp\b/i,qe)},windows:{phone:x(y,qe),tablet:x(p,qe),device:x(y,qe)||x(p,qe)},other:{blackberry:x(h,qe),blackberry10:x(A,qe),opera:x(_,qe),firefox:x(P,qe),chrome:x(v,qe),device:x(h,qe)||x(A,qe)||x(_,qe)||x(P,qe)||x(v,qe)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var j=Object(Z.a)(Object(Z.a)({},C()),{},{isMobile:C}),B=j;function w(){}function Y(vt,qe,Qe){var Ue=qe||"";return vt.key||"".concat(Ue,"item_").concat(Qe)}function $(vt){return"".concat(vt,"-menu-")}function oe(vt,qe){var Qe=-1;K.Children.forEach(vt,function(Ue){Qe+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?K.Children.forEach(Ue.props.children,function(le){Qe+=1,qe(le,Qe)}):qe(Ue,Qe)})}function de(vt,qe,Qe){if(!vt||Qe.find)return;K.Children.forEach(vt,function(Ue){if(Ue){var le=Ue.type;if(!le||!(le.isSubMenu||le.isMenuItem||le.isMenuItemGroup))return;qe.indexOf(Ue.key)!==-1?Qe.find=!0:Ue.props.children&&de(Ue.props.children,qe,Qe)}})}var Be=["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"],Ae=function(qe){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=qe&&typeof qe.getBoundingClientRect=="function"&&qe.getBoundingClientRect().width;if(Ue){if(Qe){var le=getComputedStyle(qe),pe=le.marginLeft,$e=le.marginRight;Ue+=+pe.replace("px","")+ +$e.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},Re=function(qe,Qe,Ue){qe&&Object(l.a)(qe.style)==="object"&&(qe.style[Qe]=Ue)},Le=function(){return B.any},Fe=U("KQm4"),me=U("Ff2n"),fe=U("i8i4"),ne=U("bdgK"),xe=U("uciX"),ce=U("8XRh"),Ne={adjustX:1,adjustY:1},He={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},ke={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},Ye=He,et=0,ue={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_e=function(qe,Qe,Ue){var le=$(Qe),pe=qe.getState();qe.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},pe.defaultActiveFirst),{},Object(b.a)({},le,Ue))})},Oe=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(Ue){var le;Object(z.a)(this,Qe),le=qe.call(this,Ue),le.onDestroy=function(We){le.props.onDestroy(We)},le.onKeyDown=function(We){var it=We.keyCode,st=le.menuInstance,ct=le.props,bt=ct.isOpen,jt=ct.store;if(it===m.a.ENTER)return le.onTitleClick(We),_e(jt,le.props.eventKey,!0),!0;if(it===m.a.RIGHT)return bt?st.onKeyDown(We):(le.triggerOpenChange(!0),_e(jt,le.props.eventKey,!0)),!0;if(it===m.a.LEFT){var en;if(bt)en=st.onKeyDown(We);else return;return en||(le.triggerOpenChange(!1),en=!0),en}return bt&&(it===m.a.UP||it===m.a.DOWN)?st.onKeyDown(We):void 0},le.onOpenChange=function(We){le.props.onOpenChange(We)},le.onPopupVisibleChange=function(We){le.triggerOpenChange(We,We?"mouseenter":"mouseleave")},le.onMouseEnter=function(We){var it=le.props,st=it.eventKey,ct=it.onMouseEnter,bt=it.store;_e(bt,le.props.eventKey,!1),ct({key:st,domEvent:We})},le.onMouseLeave=function(We){var it=le.props,st=it.parentMenu,ct=it.eventKey,bt=it.onMouseLeave;st.subMenuInstance=Object(V.a)(le),bt({key:ct,domEvent:We})},le.onTitleMouseEnter=function(We){var it=le.props,st=it.eventKey,ct=it.onItemHover,bt=it.onTitleMouseEnter;ct({key:st,hover:!0}),bt({key:st,domEvent:We})},le.onTitleMouseLeave=function(We){var it=le.props,st=it.parentMenu,ct=it.eventKey,bt=it.onItemHover,jt=it.onTitleMouseLeave;st.subMenuInstance=Object(V.a)(le),bt({key:ct,hover:!1}),jt({key:ct,domEvent:We})},le.onTitleClick=function(We){var it=Object(V.a)(le),st=it.props;if(st.onTitleClick({key:st.eventKey,domEvent:We}),st.triggerSubMenuAction==="hover")return;le.triggerOpenChange(!st.isOpen,"click"),_e(st.store,le.props.eventKey,!1)},le.onSubMenuClick=function(We){typeof le.props.onClick=="function"&&le.props.onClick(le.addKeyPath(We))},le.onSelect=function(We){le.props.onSelect(We)},le.onDeselect=function(We){le.props.onDeselect(We)},le.getPrefixCls=function(){return"".concat(le.props.rootPrefixCls,"-submenu")},le.getActiveClassName=function(){return"".concat(le.getPrefixCls(),"-active")},le.getDisabledClassName=function(){return"".concat(le.getPrefixCls(),"-disabled")},le.getSelectedClassName=function(){return"".concat(le.getPrefixCls(),"-selected")},le.getOpenClassName=function(){return"".concat(le.props.rootPrefixCls,"-submenu-open")},le.saveMenuInstance=function(We){le.menuInstance=We},le.addKeyPath=function(We){return Object(Z.a)(Object(Z.a)({},We),{},{keyPath:(We.keyPath||[]).concat(le.props.eventKey)})},le.triggerOpenChange=function(We,it){var st=le.props.eventKey,ct=function(){le.onOpenChange({key:st,item:Object(V.a)(le),trigger:it,open:We})};it==="mouseenter"?le.mouseenterTimeout=setTimeout(function(){ct()},0):ct()},le.isChildrenSelected=function(){var We={find:!1};return de(le.props.children,le.props.selectedKeys,We),We.find},le.isOpen=function(){return le.props.openKeys.indexOf(le.props.eventKey)!==-1},le.adjustWidth=function(){if(!le.subMenuTitle||!le.menuInstance)return;var We=fe.findDOMNode(le.menuInstance);if(We.offsetWidth>=le.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(le.subMenuTitle.offsetWidth,"px")},le.saveSubMenuTitle=function(We){le.subMenuTitle=We},le.getBaseProps=function(){var We=Object(V.a)(le),it=We.props;return{mode:it.mode==="horizontal"?"vertical":it.mode,visible:le.props.isOpen,level:it.level+1,inlineIndent:it.inlineIndent,focusable:!1,onClick:le.onSubMenuClick,onSelect:le.onSelect,onDeselect:le.onDeselect,onDestroy:le.onDestroy,selectedKeys:it.selectedKeys,eventKey:"".concat(it.eventKey,"-menu-"),openKeys:it.openKeys,motion:it.motion,onOpenChange:le.onOpenChange,subMenuOpenDelay:it.subMenuOpenDelay,parentMenu:Object(V.a)(le),subMenuCloseDelay:it.subMenuCloseDelay,forceSubMenuRender:it.forceSubMenuRender,triggerSubMenuAction:it.triggerSubMenuAction,builtinPlacements:it.builtinPlacements,defaultActiveFirst:it.store.getState().defaultActiveFirst[$(it.eventKey)],multiple:it.multiple,prefixCls:it.rootPrefixCls,id:le.internalMenuId,manualRef:le.saveMenuInstance,itemIcon:it.itemIcon,expandIcon:it.expandIcon,direction:it.direction}},le.getMotion=function(We,it){var st=Object(V.a)(le),ct=st.haveRendered,bt=le.props,jt=bt.motion,en=bt.rootPrefixCls,Yt=Object(Z.a)(Object(Z.a)({},jt),{},{leavedClassName:"".concat(en,"-hidden"),removeOnLeave:!1,motionAppear:ct||!it||We!=="inline"});return Yt};var pe=Ue.store,$e=Ue.eventKey,je=pe.getState(),Je=je.defaultActiveFirst;le.isRootMenu=!1;var mt=!1;return Je&&(mt=Je[$e]),_e(pe,$e,mt),le}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var le=this,pe=this.props,$e=pe.mode,je=pe.parentMenu,Je=pe.manualRef;if(Je&&Je(this),$e!=="horizontal"||!je.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return le.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var le=this.props,pe=le.onDestroy,$e=le.eventKey;pe&&pe($e),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(le){var pe=this,$e=this.getBaseProps(),je=this.getMotion($e.mode,$e.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||$e.visible||$e.forceSubMenuRender,!this.haveOpened)return K.createElement("div",null);var Je=$e.direction;return K.createElement(ce.default,Object.assign({visible:$e.visible},je),function(mt){var We=mt.className,it=mt.style,st=o()("".concat($e.prefixCls,"-sub"),We,Object(b.a)({},"".concat($e.prefixCls,"-rtl"),Je==="rtl"));return K.createElement(Se,Object.assign({},$e,{id:pe.internalMenuId,className:st,style:it}),le)})}},{key:"render",value:function(){var le,pe=Object(Z.a)({},this.props),$e=pe.isOpen,je=this.getPrefixCls(),Je=pe.mode==="inline",mt=o()(je,"".concat(je,"-").concat(pe.mode),(le={},Object(b.a)(le,pe.className,!!pe.className),Object(b.a)(le,this.getOpenClassName(),$e),Object(b.a)(le,this.getActiveClassName(),pe.active||$e&&!Je),Object(b.a)(le,this.getDisabledClassName(),pe.disabled),Object(b.a)(le,this.getSelectedClassName(),this.isChildrenSelected()),le));this.internalMenuId||(pe.eventKey?this.internalMenuId="".concat(pe.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var We={},it={},st={};pe.disabled||(We={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},it={onClick:this.onTitleClick},st={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var ct={},bt=pe.direction;Je&&(bt==="rtl"?ct.paddingRight=pe.inlineIndent*pe.level:ct.paddingLeft=pe.inlineIndent*pe.level);var jt={};this.props.isOpen&&(jt={"aria-owns":this.internalMenuId});var en=null;pe.mode!=="horizontal"&&(en=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(en=K.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var Yt=K.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:ct,className:"".concat(je,"-title"),role:"button"},st,it,{"aria-expanded":$e},jt,{"aria-haspopup":"true",title:typeof pe.title=="string"?pe.title:void 0}),pe.title,en||K.createElement("i",{className:"".concat(je,"-arrow")})),Ct=this.renderChildren(pe.children),pn=pe.parentMenu.isRootMenu?pe.parentMenu.props.getPopupContainer:function(Pn){return Pn.parentNode},Rt=ue[pe.mode],zt=pe.popupOffset?{offset:pe.popupOffset}:{},Pt=pe.mode==="inline"?"":pe.popupClassName;Pt+=bt==="rtl"?" ".concat(je,"-rtl"):"";var qt=pe.disabled,yn=pe.triggerSubMenuAction,wn=pe.subMenuOpenDelay,yt=pe.forceSubMenuRender,Vt=pe.subMenuCloseDelay,Mn=pe.builtinPlacements;Be.forEach(function(Pn){return delete pe[Pn]}),delete pe.onClick;var Un=bt==="rtl"?Object.assign({},ke,Mn):Object.assign({},He,Mn);return delete pe.direction,K.createElement("li",Object.assign({},pe,We,{className:mt,role:"menuitem"}),Je&&Yt,Je&&Ct,!Je&&K.createElement(xe.a,{prefixCls:je,popupClassName:o()("".concat(je,"-popup"),Pt),getPopupContainer:pn,builtinPlacements:Un,popupPlacement:Rt,popupVisible:$e,popupAlign:zt,popup:Ct,action:qt?[]:[yn],mouseEnterDelay:wn,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:yt},Yt))}}]),Qe}(K.Component);Oe.defaultProps={onMouseEnter:w,onMouseLeave:w,onTitleMouseEnter:w,onTitleMouseLeave:w,onTitleClick:w,manualRef:w,mode:"vertical",title:""};var Me=Object(H.b)(function(vt,qe){var Qe=vt.openKeys,Ue=vt.activeKey,le=vt.selectedKeys,pe=qe.eventKey,$e=qe.subMenuKey;return{isOpen:Qe.indexOf(pe)>-1,active:Ue[$e]===pe,selectedKeys:le}})(Oe);Me.isSubMenu=!0;var rt=Me,dt="menuitem-overflowed",pt=.5,ut=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(){var Ue;return Object(z.a)(this,Qe),Ue=qe.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.getMenuItemNodes=function(){var le=Ue.props.prefixCls,pe=fe.findDOMNode(Object(V.a)(Ue));return pe?[].slice.call(pe.children).filter(function($e){return $e.className.split(" ").indexOf("".concat(le,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(le,pe,$e){var je=Ue.props,Je=je.overflowedIndicator,mt=je.level,We=je.mode,it=je.prefixCls,st=je.theme;if(mt!==1||We!=="horizontal")return null;var ct=Ue.props.children[0],bt=ct.props,jt=bt.children,en=bt.title,Yt=bt.style,Ct=Object(me.a)(bt,["children","title","style"]),pn=Object(Z.a)({},Yt),Rt="".concat(le,"-overflowed-indicator"),zt="".concat(le,"-overflowed-indicator");pe.length===0&&$e!==!0?pn=Object(Z.a)(Object(Z.a)({},pn),{},{display:"none"}):$e&&(pn=Object(Z.a)(Object(Z.a)({},pn),{},{visibility:"hidden",position:"absolute"}),Rt="".concat(Rt,"-placeholder"),zt="".concat(zt,"-placeholder"));var Pt=st?"".concat(it,"-").concat(st):"",qt={};return Be.forEach(function(yn){Ct[yn]!==void 0&&(qt[yn]=Ct[yn])}),K.createElement(rt,Object.assign({title:Je,className:"".concat(it,"-overflowed-submenu"),popupClassName:Pt},qt,{key:Rt,eventKey:zt,disabled:!1,style:pn}),pe)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var le=fe.findDOMNode(Object(V.a)(Ue));if(!le)return;var pe=le.children;if(!pe||pe.length===0)return;var $e=le.children[pe.length-1];Re($e,"display","inline-block");var je=Ue.getMenuItemNodes(),Je=je.filter(function(mt){return mt.className.split(" ").indexOf(dt)>=0});Je.forEach(function(mt){Re(mt,"display","inline-block")}),Ue.menuItemSizes=je.map(function(mt){return Ae(mt,!0)}),Je.forEach(function(mt){Re(mt,"display","none")}),Ue.overflowedIndicatorWidth=Ae(le.children[le.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function(mt,We){return mt+We},0),Ue.handleResize(),Re($e,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var le=fe.findDOMNode(Object(V.a)(Ue));if(!le)return;var pe=Ae(le);Ue.overflowedItems=[];var $e=0,je;Ue.originalTotalWidth>pe+pt&&(je=-1,Ue.menuItemSizes.forEach(function(Je){$e+=Je,$e+Ue.overflowedIndicatorWidth<=pe&&(je+=1)})),Ue.setState({lastVisibleIndex:je})},Ue}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){var le=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var pe=fe.findDOMNode(this);if(!pe)return;this.resizeObserver=new ne.default(function($e){$e.forEach(function(){var je=le.cancelFrameId;cancelAnimationFrame(je),le.cancelFrameId=requestAnimationFrame(le.setChildrenWidthAndResize)})}),[].slice.call(pe.children).concat(pe).forEach(function($e){le.resizeObserver.observe($e)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){le.resizeObserver.disconnect(),[].slice.call(pe.children).concat(pe).forEach(function($e){le.resizeObserver.observe($e)}),le.setChildrenWidthAndResize()}),this.mutationObserver.observe(pe,{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(le){var pe=this,$e=this.state.lastVisibleIndex;return(le||[]).reduce(function(je,Je,mt){var We=Je;if(pe.props.mode==="horizontal"){var it=pe.getOverflowedSubMenuItem(Je.props.eventKey,[]);$e!==void 0&&pe.props.className.indexOf("".concat(pe.props.prefixCls,"-root"))!==-1&&(mt>$e&&(We=K.cloneElement(Je,{style:{display:"none"},eventKey:"".concat(Je.props.eventKey,"-hidden"),className:"".concat(dt)})),mt===$e+1&&(pe.overflowedItems=le.slice($e+1).map(function(ct){return K.cloneElement(ct,{key:ct.props.eventKey,mode:"vertical-left"})}),it=pe.getOverflowedSubMenuItem(Je.props.eventKey,pe.overflowedItems)));var st=[].concat(Object(Fe.a)(je),[it,We]);return mt===le.length-1&&st.push(pe.getOverflowedSubMenuItem(Je.props.eventKey,[],!0)),st}return[].concat(Object(Fe.a)(je),[We])},[])}},{key:"render",value:function(){var le=this.props,pe=le.visible,$e=le.prefixCls,je=le.overflowedIndicator,Je=le.mode,mt=le.level,We=le.tag,it=le.children,st=le.theme,ct=Object(me.a)(le,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),bt=We;return K.createElement(bt,Object.assign({},ct),this.renderChildren(it))}}]),Qe}(K.Component);ut.defaultProps={tag:"div",className:""};var _t=ut;function Tt(vt){return vt.length?vt.every(function(qe){return!!qe.props.disabled}):!0}function Pe(vt,qe,Qe){var Ue=vt.getState();vt.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.activeKey),{},Object(b.a)({},qe,Qe))})}function Ce(vt){return vt.eventKey||"0-menu-"}function tt(vt,qe){var Qe=qe,Ue=vt.children,le=vt.eventKey;if(Qe){var pe;if(oe(Ue,function($e,je){$e&&$e.props&&!$e.props.disabled&&Qe===Y($e,le,je)&&(pe=!0)}),pe)return Qe}return Qe=null,vt.defaultActiveFirst&&oe(Ue,function($e,je){!Qe&&$e&&!$e.props.disabled&&(Qe=Y($e,le,je))}),Qe}function lt(vt){if(vt){var qe=this.instanceArray.indexOf(vt);qe!==-1?this.instanceArray[qe]=vt:this.instanceArray.push(vt)}}var Ke=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(Ue){var le;return Object(z.a)(this,Qe),le=qe.call(this,Ue),le.onKeyDown=function(pe,$e){var je=pe.keyCode,Je;if(le.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(Je=We.onKeyDown(pe))}),Je)return 1;var mt=null;return(je===m.a.UP||je===m.a.DOWN)&&(mt=le.step(je===m.a.UP?-1:1)),mt?(pe.preventDefault(),Pe(le.props.store,Ce(le.props),mt.props.eventKey),typeof $e=="function"&&$e(mt),1):void 0},le.onItemHover=function(pe){var $e=pe.key,je=pe.hover;Pe(le.props.store,Ce(le.props),je?$e:null)},le.onDeselect=function(pe){le.props.onDeselect(pe)},le.onSelect=function(pe){le.props.onSelect(pe)},le.onClick=function(pe){le.props.onClick(pe)},le.onOpenChange=function(pe){le.props.onOpenChange(pe)},le.onDestroy=function(pe){le.props.onDestroy(pe)},le.getFlatInstanceArray=function(){return le.instanceArray},le.step=function(pe){var $e=le.getFlatInstanceArray(),je=le.props.store.getState().activeKey[Ce(le.props)],Je=$e.length;if(!Je)return null;pe<0&&($e=$e.concat().reverse());var mt=-1;if($e.every(function(ct,bt){return ct&&ct.props.eventKey===je?(mt=bt,!1):!0}),!le.props.defaultActiveFirst&&mt!==-1&&Tt($e.slice(mt,Je-1)))return;var We=(mt+1)%Je,it=We;do{var st=$e[it];if(!st||st.props.disabled)it=(it+1)%Je;else return st}while(it!==We);return null},le.renderCommonMenuItem=function(pe,$e,je){var Je=le.props.store.getState(),mt=Object(V.a)(le),We=mt.props,it=Y(pe,We.eventKey,$e),st=pe.props;if(!st||typeof pe.type=="string")return pe;var ct=it===Je.activeKey,bt=Object(Z.a)(Object(Z.a)({mode:st.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:le.renderMenuItem,rootPrefixCls:We.prefixCls,index:$e,parentMenu:We.parentMenu,manualRef:st.disabled?void 0:Object(f.a)(pe.ref,lt.bind(Object(V.a)(le))),eventKey:it,active:!st.disabled&&ct,multiple:We.multiple,onClick:function(en){(st.onClick||w)(en),le.onClick(en)},onItemHover:le.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:le.onOpenChange,onDeselect:le.onDeselect,onSelect:le.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:st.itemIcon||le.props.itemIcon,expandIcon:st.expandIcon||le.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Le())&&(bt.triggerSubMenuAction="click"),K.cloneElement(pe,bt)},le.renderMenuItem=function(pe,$e,je){if(!pe)return null;var Je=le.props.store.getState(),mt={openKeys:Je.openKeys,selectedKeys:Je.selectedKeys,triggerSubMenuAction:le.props.triggerSubMenuAction,subMenuKey:je};return le.renderCommonMenuItem(pe,$e,mt)},Ue.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},Ue.store.getState().activeKey),{},Object(b.a)({},Ue.eventKey,tt(Ue,Ue.activeKey)))}),le.instanceArray=[],le}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(le){return this.props.visible||le.visible||this.props.className!==le.className||!u()(this.props.style,le.style)}},{key:"componentDidUpdate",value:function(le){var pe=this.props,$e="activeKey"in pe?pe.activeKey:pe.store.getState().activeKey[Ce(pe)],je=tt(pe,$e);if(je!==$e)Pe(pe.store,Ce(pe),je);else if("activeKey"in le){var Je=tt(le,le.activeKey);je!==Je&&Pe(pe.store,Ce(pe),je)}}},{key:"render",value:function(){var le=this,pe=Object(D.a)({},this.props);this.instanceArray=[];var $e=o()(pe.prefixCls,pe.className,"".concat(pe.prefixCls,"-").concat(pe.mode)),je={className:$e,role:pe.role||"menu"};pe.id&&(je.id=pe.id),pe.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Je=pe.prefixCls,mt=pe.eventKey,We=pe.visible,it=pe.level,st=pe.mode,ct=pe.overflowedIndicator,bt=pe.theme;return Be.forEach(function(jt){return delete pe[jt]}),delete pe.onClick,K.createElement(_t,Object.assign({},pe,{prefixCls:Je,mode:st,tag:"ul",level:it,theme:bt,visible:We,overflowedIndicator:ct},je),K.Children.map(pe.children,function(jt,en){return le.renderMenuItem(jt,en,mt||"0-menu-")}))}}]),Qe}(K.Component);Ke.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:w};var Xe=Object(H.b)()(Ke),Se=Xe,ge=U("Kwbf");function Ee(vt,qe,Qe){var Ue=vt.prefixCls,le=vt.motion,pe=vt.defaultMotions,$e=pe===void 0?{}:pe,je=vt.openAnimation,Je=vt.openTransitionName,mt=qe.switchingModeFromInline;if(le)return le;if(Object(l.a)(je)==="object"&&je)Object(ge.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ue,"-open-").concat(je)};if(Je)return{motionName:Je};var We=$e[Qe];return We||(mt?null:$e.other)}var ie=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(Ue){var le;Object(z.a)(this,Qe),le=qe.call(this,Ue),le.inlineOpenKeys=[],le.onSelect=function(je){var Je=Object(V.a)(le),mt=Je.props;if(mt.selectable){var We=le.store.getState(),it=We.selectedKeys,st=je.key;mt.multiple?it=it.concat([st]):it=[st],"selectedKeys"in mt||le.store.setState({selectedKeys:it}),mt.onSelect(Object(Z.a)(Object(Z.a)({},je),{},{selectedKeys:it}))}},le.onClick=function(je){var Je=le.getRealMenuMode(),mt=Object(V.a)(le),We=mt.store,it=mt.props.onOpenChange;Je!=="inline"&&!("openKeys"in le.props)&&(We.setState({openKeys:[]}),it([])),le.props.onClick(je)},le.onKeyDown=function(je,Je){le.innerMenu.getWrappedInstance().onKeyDown(je,Je)},le.onOpenChange=function(je){var Je=Object(V.a)(le),mt=Je.props,We=le.store.getState().openKeys.concat(),it=!1,st=function(bt){var jt=!1;if(bt.open)jt=We.indexOf(bt.key)===-1,jt&&We.push(bt.key);else{var en=We.indexOf(bt.key);jt=en!==-1,jt&&We.splice(en,1)}it=it||jt};Array.isArray(je)?je.forEach(st):st(je),it&&("openKeys"in le.props||le.store.setState({openKeys:We}),mt.onOpenChange(We))},le.onDeselect=function(je){var Je=Object(V.a)(le),mt=Je.props;if(mt.selectable){var We=le.store.getState().selectedKeys.concat(),it=je.key,st=We.indexOf(it);st!==-1&&We.splice(st,1),"selectedKeys"in mt||le.store.setState({selectedKeys:We}),mt.onDeselect(Object(Z.a)(Object(Z.a)({},je),{},{selectedKeys:We}))}},le.onMouseEnter=function(je){le.restoreModeVerticalFromInline();var Je=le.props.onMouseEnter;Je&&Je(je)},le.onTransitionEnd=function(je){var Je=je.propertyName==="width"&&je.target===je.currentTarget,mt=je.target.className,We=Object.prototype.toString.call(mt)==="[object SVGAnimatedString]"?mt.animVal:mt,it=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(Je||it)&&le.restoreModeVerticalFromInline()},le.setInnerMenu=function(je){le.innerMenu=je},le.isRootMenu=!0;var pe=Ue.defaultSelectedKeys,$e=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(pe=Ue.selectedKeys||[]),"openKeys"in Ue&&($e=Ue.openKeys||[]),le.store=Object(H.c)({selectedKeys:pe,openKeys:$e,activeKey:{"0-menu-":tt(Ue,Ue.activeKey)}}),le.state={switchingModeFromInline:!1},le}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(le){this.updateOpentKeysWhenSwitchMode(le),this.updateMiniStore();var pe=this.props,$e=pe.siderCollapsed,je=pe.inlineCollapsed,Je=pe.onOpenChange;(!le.inlineCollapsed&&je||!le.siderCollapsed&&$e)&&Je([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(le){var pe=this.props,$e=this.store,je=this.inlineOpenKeys,Je=$e.getState(),mt={};le.mode==="inline"&&pe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in pe||((pe.inlineCollapsed&&!le.inlineCollapsed||pe.siderCollapsed&&!le.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Je.openKeys.concat(),mt.openKeys=[]),(!pe.inlineCollapsed&&le.inlineCollapsed||!pe.siderCollapsed&&le.siderCollapsed)&&(mt.openKeys=je,this.inlineOpenKeys=[])),Object.keys(mt).length&&$e.setState(mt)}},{key:"updateMenuDisplay",value:function(){var le=this.props.collapsedWidth,pe=this.store,$e=this.prevOpenKeys,je=this.getInlineCollapsed()&&(le===0||le==="0"||le==="0px");je?(this.prevOpenKeys=pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):$e&&(this.store.setState({openKeys:$e}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var le=this.props.mode,pe=this.state.switchingModeFromInline,$e=this.getInlineCollapsed();return pe&&$e?"inline":$e?"vertical":le}},{key:"getInlineCollapsed",value:function(){var le=this.props,pe=le.inlineCollapsed,$e=le.siderCollapsed;return $e!==void 0?$e:pe}},{key:"restoreModeVerticalFromInline",value:function(){var le=this.state.switchingModeFromInline;le&&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 le=Object(Z.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),pe=this.getRealMenuMode();return le.className+=" ".concat(le.prefixCls,"-root"),le.direction==="rtl"&&(le.className+=" ".concat(le.prefixCls,"-rtl")),le=Object(Z.a)(Object(Z.a)({},le),{},{mode:pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ee(this.props,this.state,pe)}),delete le.openAnimation,delete le.openTransitionName,K.createElement(H.a,{store:this.store},K.createElement(Se,Object.assign({},le,{ref:this.setInnerMenu}),this.props.children))}}]),Qe}(K.Component);ie.defaultProps={selectable:!0,onClick:w,onSelect:w,onOpenChange:w,onDeselect:w,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:K.createElement("span",null,"\xB7\xB7\xB7")};var ae=ie,he=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(){var Ue;return Object(z.a)(this,Qe),Ue=qe.apply(this,arguments),Ue.onKeyDown=function(le){var pe=le.keyCode;return pe===m.a.ENTER?(Ue.onClick(le),!0):void 0},Ue.onMouseLeave=function(le){var pe=Ue.props,$e=pe.eventKey,je=pe.onItemHover,Je=pe.onMouseLeave;je({key:$e,hover:!1}),Je({key:$e,domEvent:le})},Ue.onMouseEnter=function(le){var pe=Ue.props,$e=pe.eventKey,je=pe.onItemHover,Je=pe.onMouseEnter;je({key:$e,hover:!0}),Je({key:$e,domEvent:le})},Ue.onClick=function(le){var pe=Ue.props,$e=pe.eventKey,je=pe.multiple,Je=pe.onClick,mt=pe.onSelect,We=pe.onDeselect,it=pe.isSelected,st={key:$e,keyPath:[$e],item:Object(V.a)(Ue),domEvent:le};Je(st),je?it?We(st):mt(st):it||mt(st)},Ue.saveNode=function(le){Ue.node=le},Ue}return Object(N.a)(Qe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var le=this.props;le.onDestroy&&le.onDestroy(le.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 le,pe=Object(Z.a)({},this.props),$e=o()(this.getPrefixCls(),pe.className,(le={},Object(b.a)(le,this.getActiveClassName(),!pe.disabled&&pe.active),Object(b.a)(le,this.getSelectedClassName(),pe.isSelected),Object(b.a)(le,this.getDisabledClassName(),pe.disabled),le)),je=Object(Z.a)(Object(Z.a)({},pe.attribute),{},{title:typeof pe.title=="string"?pe.title:void 0,className:$e,role:pe.role||"menuitem","aria-disabled":pe.disabled});pe.role==="option"?je=Object(Z.a)(Object(Z.a)({},je),{},{role:"option","aria-selected":pe.isSelected}):(pe.role===null||pe.role==="none")&&(je.role="none");var Je={onClick:pe.disabled?null:this.onClick,onMouseLeave:pe.disabled?null:this.onMouseLeave,onMouseEnter:pe.disabled?null:this.onMouseEnter},mt=Object(Z.a)({},pe.style);pe.mode==="inline"&&(pe.direction==="rtl"?mt.paddingRight=pe.inlineIndent*pe.level:mt.paddingLeft=pe.inlineIndent*pe.level),Be.forEach(function(it){return delete pe[it]}),delete pe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=K.createElement(this.props.itemIcon,this.props)),K.createElement("li",Object.assign({},Object(n.default)(pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Je,{style:mt,ref:this.saveNode}),pe.children,We)}}]),Qe}(K.Component);he.isMenuItem=!0,he.defaultProps={onSelect:w,onMouseEnter:w,onMouseLeave:w,manualRef:w};var ve=Object(H.b)(function(vt,qe){var Qe=vt.activeKey,Ue=vt.selectedKeys,le=qe.eventKey,pe=qe.subMenuKey;return{active:Qe[pe]===le,isSelected:Ue.indexOf(le)!==-1}})(he),Te=ve,Ge=function(vt){Object(W.a)(Qe,vt);var qe=Object(M.a)(Qe);function Qe(){var Ue;return Object(z.a)(this,Qe),Ue=qe.apply(this,arguments),Ue.renderInnerMenuItem=function(le){var pe=Ue.props,$e=pe.renderMenuItem,je=pe.index;return $e(le,je,Ue.props.subMenuKey)},Ue}return Object(N.a)(Qe,[{key:"render",value:function(){var le=Object(D.a)({},this.props),pe=le.className,$e=pe===void 0?"":pe,je=le.rootPrefixCls,Je="".concat(je,"-item-group-title"),mt="".concat(je,"-item-group-list"),We=le.title,it=le.children;return Be.forEach(function(st){return delete le[st]}),delete le.onClick,delete le.direction,K.createElement("li",Object.assign({},le,{className:"".concat($e," ").concat(je,"-item-group")}),K.createElement("div",{className:Je,title:typeof We=="string"?We:void 0},We),K.createElement("ul",{className:mt},K.Children.map(it,this.renderInnerMenuItem)))}}]),Qe}(K.Component);Ge.isMenuItemGroup=!0,Ge.defaultProps={disabled:!0};var ot=Ge,xt=function(qe){var Qe=qe.className,Ue=qe.rootPrefixCls,le=qe.style;return K.createElement("li",{className:"".concat(Qe," ").concat(Ue,"-item-divider"),style:le})};xt.defaultProps={disabled:!0,className:"",style:{}};var Ot=xt,wt=se.e=ae},"24hK":function(Ve,se,U){"use strict";U.d(se,"a",function(){return z});class Z{constructor(N){this.element=N,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class z{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let N=this._first;for(;N!==Z.Undefined;){const V=N.next;N.prev=Z.Undefined,N.next=Z.Undefined,N=V}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(N){return this._insert(N,!1)}push(N){return this._insert(N,!0)}_insert(N,V){const W=new Z(N);if(this._first===Z.Undefined)this._first=W,this._last=W;else if(V){const K=this._last;this._last=W,W.prev=K,K.next=W}else{const K=this._first;this._first=W,W.next=K,K.prev=W}this._size+=1;let M=!1;return()=>{M||(M=!0,this._remove(W))}}shift(){if(this._first===Z.Undefined)return;{const N=this._first.element;return this._remove(this._first),N}}pop(){if(this._last===Z.Undefined)return;{const N=this._last.element;return this._remove(this._last),N}}_remove(N){if(N.prev!==Z.Undefined&&N.next!==Z.Undefined){const V=N.prev;V.next=N.next,N.next.prev=V}else N.prev===Z.Undefined&&N.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):N.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):N.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let N=this._first;for(;N!==Z.Undefined;)yield N.element,N=N.next}}},"3/fG":function(Ve,se,U){"use strict";U.d(se,"a",function(){return z});function Z(N,V){let W;return V.length===0?W=N:W=N.replace(/\{(\d+)\}/g,function(M,K){const H=K[0];return typeof V[H]!="undefined"?V[H]:M}),W}function z(N,V,...W){return Z(V,W)}},"4qgm":function(Ve,se){Ve.exports="data:image/png;base64,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"},"4u4S":function(Ve,se){Ve.exports="data:image/png;base64,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"},"55Ip":function(Ve,se,U){"use strict";U.d(se,"a",function(){return a});var Z=U("Ty5D"),z=U("dI71"),N=U("q1tI"),V=U.n(N),W=U("YS25"),M=U("17x9"),K=U.n(M),H=U("wx14"),n=U("zLVn"),D=U("9R94"),b=function(y){Object(z.a)(p,y);function p(){for(var A,_=arguments.length,v=new Array(_),P=0;P<_;P++)v[P]=arguments[P];return A=y.call.apply(y,[this].concat(v))||this,A.history=Object(W.a)(A.props),A}var h=p.prototype;return h.render=function(){return V.a.createElement(Z.c,{history:this.history,children:this.props.children})},p}(V.a.Component),m=function(y){Object(z.a)(p,y);function p(){for(var A,_=arguments.length,v=new Array(_),P=0;P<_;P++)v[P]=arguments[P];return A=y.call.apply(y,[this].concat(v))||this,A.history=Object(W.b)(A.props),A}var h=p.prototype;return h.render=function(){return V.a.createElement(Z.c,{history:this.history,children:this.props.children})},p}(V.a.Component),f=function(p,h){return typeof p=="function"?p(h):p},d=function(p,h){return typeof p=="string"?Object(W.c)(p,null,null,h):p},u=function(p){return p},c=V.a.forwardRef;typeof c=="undefined"&&(c=u);function o(y){return!!(y.metaKey||y.altKey||y.ctrlKey||y.shiftKey)}var l=c(function(y,p){var h=y.innerRef,A=y.navigate,_=y.onClick,v=Object(n.a)(y,["innerRef","navigate","onClick"]),P=v.target,x=Object(H.a)({},v,{onClick:function(j){try{_&&_(j)}catch(B){throw j.preventDefault(),B}!j.defaultPrevented&&j.button===0&&(!P||P==="_self")&&!o(j)&&(j.preventDefault(),A())}});return u!==c?x.ref=p||h:x.ref=h,V.a.createElement("a",x)}),a=c(function(y,p){var h=y.component,A=h===void 0?l:h,_=y.replace,v=y.to,P=y.innerRef,x=Object(n.a)(y,["component","replace","to","innerRef"]);return V.a.createElement(Z.e.Consumer,null,function(C){C||Object(D.a)(!1);var j=C.history,B=d(f(v,C.location),C.location),w=B?j.createHref(B):"",Y=Object(H.a)({},x,{href:w,navigate:function(){var oe=f(v,C.location),de=_?j.replace:j.push;de(oe)}});return u!==c?Y.ref=p||P:Y.innerRef=P,V.a.createElement(A,Y)})});if(!1)var i,R;var S=function(p){return p},T=V.a.forwardRef;typeof T=="undefined"&&(T=S);function I(){for(var y=arguments.length,p=new Array(y),h=0;h<y;h++)p[h]=arguments[h];return p.filter(function(A){return A}).join(" ")}var O=T(function(y,p){var h=y["aria-current"],A=h===void 0?"page":h,_=y.activeClassName,v=_===void 0?"active":_,P=y.activeStyle,x=y.className,C=y.exact,j=y.isActive,B=y.location,w=y.sensitive,Y=y.strict,$=y.style,oe=y.to,de=y.innerRef,Be=Object(n.a)(y,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return V.a.createElement(Z.e.Consumer,null,function(Ae){Ae||Object(D.a)(!1);var Re=B||Ae.location,Le=d(f(oe,Re),Re),Fe=Le.pathname,me=Fe&&Fe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),fe=me?Object(Z.f)(Re.pathname,{path:me,exact:C,sensitive:w,strict:Y}):null,ne=!!(j?j(fe,Re):fe),xe=ne?I(x,v):x,ce=ne?Object(H.a)({},$,{},P):$,Ne=Object(H.a)({"aria-current":ne&&A||null,className:xe,style:ce,to:Le},Be);return S!==T?Ne.ref=p||de:Ne.innerRef=de,V.a.createElement(a,Ne)})});if(!1)var E},"5D2P":function(Ve,se){Ve.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"5VLF":function(Ve,se,U){"use strict";var Z,z;function N(V,W,M){var K=function(H,n){return V.js_beautify(H,n)};return K.js=V.js_beautify,K.css=W.css_beautify,K.html=M.html_beautify,K.js_beautify=V.js_beautify,K.css_beautify=W.css_beautify,K.html_beautify=M.html_beautify,K}!(Z=[U("6UM0"),U("TXwP"),U("psGv")],z=function(V,W,M){return N(V,W,M)}.apply(se,Z),z!==void 0&&(Ve.exports=z))},"5Y4S":function(Ve,se,U){"use strict";U.d(se,"a",function(){return N});var Z=U("MNsG");const z=Z.b.performance&&typeof Z.b.performance.now=="function";class N{constructor(V){this._highResolution=z&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new N(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Z.b.performance.now():Date.now()}}},"6+eU":function(Ve,se,U){"use strict";U.d(se,"a",function(){return T});var Z=U("wx14"),z=U("rePB"),N=U("VTBJ"),V=U("1OyB"),W=U("vuIU"),M=U("Ji7U"),K=U("LK+K"),H=U("q1tI"),n=U.n(H),D=U("TSYQ"),b=U.n(D),m=function(O){var E,y="".concat(O.rootPrefixCls,"-item"),p=b()(y,"".concat(y,"-").concat(O.page),(E={},Object(z.a)(E,"".concat(y,"-active"),O.active),Object(z.a)(E,O.className,!!O.className),Object(z.a)(E,"".concat(y,"-disabled"),!O.page),E)),h=function(){O.onClick(O.page)},A=function(v){O.onKeyPress(v,O.onClick,O.page)};return n.a.createElement("li",{title:O.showTitle?O.page:null,className:p,onClick:h,onKeyPress:A,tabIndex:"0"},O.itemRender(O.page,"page",n.a.createElement("a",{rel:"nofollow"},O.page)))},f=m,d={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},u=function(I){Object(M.a)(E,I);var O=Object(K.a)(E);function E(){var y;Object(V.a)(this,E);for(var p=arguments.length,h=new Array(p),A=0;A<p;A++)h[A]=arguments[A];return y=O.call.apply(O,[this].concat(h)),y.state={goInputText:""},y.buildOptionText=function(_){return"".concat(_," ").concat(y.props.locale.items_per_page)},y.changeSize=function(_){y.props.changeSize(Number(_))},y.handleChange=function(_){y.setState({goInputText:_.target.value})},y.handleBlur=function(_){var v=y.props,P=v.goButton,x=v.quickGo,C=v.rootPrefixCls,j=y.state.goInputText;if(P||j==="")return;if(_.relatedTarget&&(_.relatedTarget.className.indexOf("".concat(C,"-prev"))>=0||_.relatedTarget.className.indexOf("".concat(C,"-next"))>=0))return;y.setState({goInputText:""}),x(y.getValidValue())},y.go=function(_){var v=y.state.goInputText;if(v==="")return;(_.keyCode===d.ENTER||_.type==="click")&&(y.setState({goInputText:""}),y.props.quickGo(y.getValidValue()))},y}return Object(W.a)(E,[{key:"getValidValue",value:function(){var p=this.state,h=p.goInputText,A=p.current;return!h||isNaN(h)?A:Number(h)}},{key:"getPageSizeOptions",value:function(){var p=this.props,h=p.pageSize,A=p.pageSizeOptions;return A.some(function(_){return _.toString()===h.toString()})?A:A.concat([h.toString()]).sort(function(_,v){var P=isNaN(Number(_))?0:Number(_),x=isNaN(Number(v))?0:Number(v);return P-x})}},{key:"render",value:function(){var p=this,h=this.props,A=h.pageSize,_=h.locale,v=h.rootPrefixCls,P=h.changeSize,x=h.quickGo,C=h.goButton,j=h.selectComponentClass,B=h.buildOptionText,w=h.selectPrefixCls,Y=h.disabled,$=this.state.goInputText,oe="".concat(v,"-options"),de=j,Be=null,Ae=null,Re=null;if(!P&&!x)return null;var Le=this.getPageSizeOptions();if(P&&de){var Fe=Le.map(function(me,fe){return n.a.createElement(de.Option,{key:fe,value:me.toString()},(B||p.buildOptionText)(me))});Be=n.a.createElement(de,{disabled:Y,prefixCls:w,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(A||Le[0]).toString(),onChange:this.changeSize,getPopupContainer:function(fe){return fe.parentNode}},Fe)}return x&&(C&&(Re=typeof C=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(oe,"-quick-jumper-button")},_.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},C)),Ae=n.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},_.jump_to,n.a.createElement("input",{disabled:Y,type:"text",value:$,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),_.page,Re)),n.a.createElement("li",{className:"".concat(oe)},Be,Ae)}}]),E}(n.a.Component);u.defaultProps={pageSizeOptions:["10","20","50","100"]};var c=u,o=U("N2Kk");function l(){}function a(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I}function i(I,O,E){return E}function R(I,O,E){var y=typeof I=="undefined"?O.pageSize:I;return Math.floor((E.total-1)/y)+1}var S=function(I){Object(M.a)(E,I);var O=Object(K.a)(E);function E(y){var p;Object(V.a)(this,E),p=O.call(this,y),p.getJumpPrevPage=function(){return Math.max(1,p.state.current-(p.props.showLessItems?3:5))},p.getJumpNextPage=function(){return Math.min(R(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(P,x){var C=p.props.prefixCls,j=P||n.a.createElement("button",{type:"button","aria-label":x,className:"".concat(C,"-item-link")});return typeof P=="function"&&(j=n.a.createElement(P,Object(N.a)({},p.props))),j},p.savePaginationNode=function(P){p.paginationNode=P},p.isValid=function(P){return a(P)&&P!==p.state.current},p.shouldDisplayQuickJumper=function(){var P=p.props,x=P.showQuickJumper,C=P.pageSize,j=P.total;return j<=C?!1:x},p.handleKeyDown=function(P){(P.keyCode===d.ARROW_UP||P.keyCode===d.ARROW_DOWN)&&P.preventDefault()},p.handleKeyUp=function(P){var x=p.getValidValue(P),C=p.state.currentInputValue;x!==C&&p.setState({currentInputValue:x}),P.keyCode===d.ENTER?p.handleChange(x):P.keyCode===d.ARROW_UP?p.handleChange(x-1):P.keyCode===d.ARROW_DOWN&&p.handleChange(x+1)},p.changePageSize=function(P){var x=p.state.current,C=R(P,p.state,p.props);x=x>C?C:x,C===0&&(x=p.state.current),typeof P=="number"&&("pageSize"in p.props||p.setState({pageSize:P}),"current"in p.props||p.setState({current:x,currentInputValue:x})),p.props.onShowSizeChange(x,P),"onChange"in p.props&&p.props.onChange&&p.props.onChange(x,P)},p.handleChange=function(P){var x=p.props.disabled,C=P;if(p.isValid(C)&&!x){var j=R(void 0,p.state,p.props);C>j?C=j:C<1&&(C=1),"current"in p.props||p.setState({current:C,currentInputValue:C});var B=p.state.pageSize;return p.props.onChange(C,B),C}return p.state.current},p.prev=function(){p.hasPrev()&&p.handleChange(p.state.current-1)},p.next=function(){p.hasNext()&&p.handleChange(p.state.current+1)},p.jumpPrev=function(){p.handleChange(p.getJumpPrevPage())},p.jumpNext=function(){p.handleChange(p.getJumpNextPage())},p.hasPrev=function(){return p.state.current>1},p.hasNext=function(){return p.state.current<R(void 0,p.state,p.props)},p.runIfEnter=function(P,x){if(P.key==="Enter"||P.charCode===13){for(var C=arguments.length,j=new Array(C>2?C-2:0),B=2;B<C;B++)j[B-2]=arguments[B];x.apply(void 0,j)}},p.runIfEnterPrev=function(P){p.runIfEnter(P,p.prev)},p.runIfEnterNext=function(P){p.runIfEnter(P,p.next)},p.runIfEnterJumpPrev=function(P){p.runIfEnter(P,p.jumpPrev)},p.runIfEnterJumpNext=function(P){p.runIfEnter(P,p.jumpNext)},p.handleGoTO=function(P){(P.keyCode===d.ENTER||P.type==="click")&&p.handleChange(p.state.currentInputValue)};var h=y.onChange!==l,A="current"in y;A&&!h&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var _=y.defaultCurrent;"current"in y&&(_=y.current);var v=y.defaultPageSize;return"pageSize"in y&&(v=y.pageSize),_=Math.min(_,R(v,void 0,y)),p.state={current:_,currentInputValue:_,pageSize:v},p}return Object(W.a)(E,[{key:"componentDidUpdate",value:function(p,h){var A=this.props.prefixCls;if(h.current!==this.state.current&&this.paginationNode){var _=this.paginationNode.querySelector(".".concat(A,"-item-").concat(h.current));_&&document.activeElement===_&&_.blur()}}},{key:"getValidValue",value:function(p){var h=p.target.value,A=R(void 0,this.state,this.props),_=this.state.currentInputValue,v;return h===""?v=h:isNaN(Number(h))?v=_:h>=A?v=A:v=Number(h),v}},{key:"getShowSizeChanger",value:function(){var p=this.props,h=p.showSizeChanger,A=p.total,_=p.totalBoundaryShowSizeChanger;return typeof h!="undefined"?h:A>_}},{key:"renderPrev",value:function(p){var h=this.props,A=h.prevIcon,_=h.itemRender,v=_(p,"prev",this.getItemIcon(A,"prev page")),P=!this.hasPrev();return Object(H.isValidElement)(v)?Object(H.cloneElement)(v,{disabled:P}):v}},{key:"renderNext",value:function(p){var h=this.props,A=h.nextIcon,_=h.itemRender,v=_(p,"next",this.getItemIcon(A,"next page")),P=!this.hasNext();return Object(H.isValidElement)(v)?Object(H.cloneElement)(v,{disabled:P}):v}},{key:"render",value:function(){var p=this,h=this.props,A=h.prefixCls,_=h.className,v=h.style,P=h.disabled,x=h.hideOnSinglePage,C=h.total,j=h.locale,B=h.showQuickJumper,w=h.showLessItems,Y=h.showTitle,$=h.showTotal,oe=h.simple,de=h.itemRender,Be=h.showPrevNextJumpers,Ae=h.jumpPrevIcon,Re=h.jumpNextIcon,Le=h.selectComponentClass,Fe=h.selectPrefixCls,me=h.pageSizeOptions,fe=this.state,ne=fe.current,xe=fe.pageSize,ce=fe.currentInputValue;if(x===!0&&C<=xe)return null;var Ne=R(void 0,this.state,this.props),He=[],ke=null,Ye=null,et=null,ue=null,_e=null,Oe=B&&B.goButton,Me=w?1:2,rt=ne-1>0?ne-1:0,dt=ne+1<Ne?ne+1:Ne,pt=Object.keys(this.props).reduce(function(ie,ae){return(ae.substr(0,5)==="data-"||ae.substr(0,5)==="aria-"||ae==="role")&&(ie[ae]=p.props[ae]),ie},{});if(oe)return Oe&&(typeof Oe=="boolean"?_e=n.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},j.jump_to_confirm):_e=n.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Oe),_e=n.a.createElement("li",{title:Y?"".concat(j.jump_to).concat(ne,"/").concat(Ne):null,className:"".concat(A,"-simple-pager")},_e)),n.a.createElement("ul",Object(Z.a)({className:b()(A,"".concat(A,"-simple"),Object(z.a)({},"".concat(A,"-disabled"),P),_),style:v,ref:this.savePaginationNode},pt),n.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:b()("".concat(A,"-prev"),Object(z.a)({},"".concat(A,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(rt)),n.a.createElement("li",{title:Y?"".concat(ne,"/").concat(Ne):null,className:"".concat(A,"-simple-pager")},n.a.createElement("input",{type:"text",value:ce,disabled:P,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),n.a.createElement("span",{className:"".concat(A,"-slash")},"/"),Ne),n.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:b()("".concat(A,"-next"),Object(z.a)({},"".concat(A,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(dt)),_e);if(Ne<=3+Me*2){var ut={locale:j,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:de};Ne||He.push(n.a.createElement(f,Object(Z.a)({},ut,{key:"noPager",page:Ne,className:"".concat(A,"-disabled")})));for(var _t=1;_t<=Ne;_t+=1){var Tt=ne===_t;He.push(n.a.createElement(f,Object(Z.a)({},ut,{key:_t,page:_t,active:Tt})))}}else{var Pe=w?j.prev_3:j.prev_5,Ce=w?j.next_3:j.next_5;Be&&(ke=n.a.createElement("li",{title:Y?Pe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:b()("".concat(A,"-jump-prev"),Object(z.a)({},"".concat(A,"-jump-prev-custom-icon"),!!Ae))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ae,"prev page"))),Ye=n.a.createElement("li",{title:Y?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:b()("".concat(A,"-jump-next"),Object(z.a)({},"".concat(A,"-jump-next-custom-icon"),!!Re))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(Re,"next page")))),ue=n.a.createElement(f,{locale:j,last:!0,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:!1,showTitle:Y,itemRender:de}),et=n.a.createElement(f,{locale:j,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:de});var tt=Math.max(1,ne-Me),lt=Math.min(ne+Me,Ne);ne-1<=Me&&(lt=1+Me*2),Ne-ne<=Me&&(tt=Ne-Me*2);for(var Ke=tt;Ke<=lt;Ke+=1){var Xe=ne===Ke;He.push(n.a.createElement(f,{locale:j,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ke,page:Ke,active:Xe,showTitle:Y,itemRender:de}))}ne-1>=Me*2&&ne!==1+2&&(He[0]=Object(H.cloneElement)(He[0],{className:"".concat(A,"-item-after-jump-prev")}),He.unshift(ke)),Ne-ne>=Me*2&&ne!==Ne-2&&(He[He.length-1]=Object(H.cloneElement)(He[He.length-1],{className:"".concat(A,"-item-before-jump-next")}),He.push(Ye)),tt!==1&&He.unshift(et),lt!==Ne&&He.push(ue)}var Se=null;$&&(Se=n.a.createElement("li",{className:"".concat(A,"-total-text")},$(C,[C===0?0:(ne-1)*xe+1,ne*xe>C?C:ne*xe])));var ge=!this.hasPrev()||!Ne,Ee=!this.hasNext()||!Ne;return n.a.createElement("ul",Object(Z.a)({className:b()(A,_,Object(z.a)({},"".concat(A,"-disabled"),P)),style:v,unselectable:"unselectable",ref:this.savePaginationNode},pt),Se,n.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:ge?null:0,onKeyPress:this.runIfEnterPrev,className:b()("".concat(A,"-prev"),Object(z.a)({},"".concat(A,"-disabled"),ge)),"aria-disabled":ge},this.renderPrev(rt)),He,n.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:Ee?null:0,onKeyPress:this.runIfEnterNext,className:b()("".concat(A,"-next"),Object(z.a)({},"".concat(A,"-disabled"),Ee)),"aria-disabled":Ee},this.renderNext(dt)),n.a.createElement(c,{disabled:P,locale:j,rootPrefixCls:A,selectComponentClass:Le,selectPrefixCls:Fe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ne,pageSize:xe,pageSizeOptions:me,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Oe}))}}],[{key:"getDerivedStateFromProps",value:function(p,h){var A={};if("current"in p&&(A.current=p.current,p.current!==h.current&&(A.currentInputValue=A.current)),"pageSize"in p&&p.pageSize!==h.pageSize){var _=h.current,v=R(p.pageSize,h,p);_=_>v?v:_,"current"in p||(A.current=_,A.currentInputValue=_),A.pageSize=p.pageSize}return A}}]),E}(n.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:l,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:l,locale:o.a,style:{},itemRender:i,totalBoundaryShowSizeChanger:50};var T=S},"6RRn":function(Ve,se,U){"use strict";var Z=U("wCXF"),z=U("n6Qo");U.d(se,"b",function(){return z.a});var N=U("IBYe"),V=U("6eGT"),W=U("hW8S");U.d(se,"a",function(){return W.a}),se.c=Z.b},"6UM0":function(Ve,se,U){var Z,z;(function(){var N;(function(){"use strict";var W=[function(n,D,b){var m=b(1).Beautifier,f=b(5).Options;function d(u,c){var o=new m(u,c);return o.beautify()}n.exports=d,n.exports.defaultOptions=function(){return new f}},function(n,D,b){var m=b(2).Output,f=b(3).Token,d=b(4),u=b(5).Options,c=b(7).Tokenizer,o=b(7).line_starters,l=b(7).positionable_operators,a=b(7).TOKEN;function i(w,Y){return Y.indexOf(w)!==-1}function R(w){return w.replace(/^\s+/g,"")}function S(w){for(var Y={},$=0;$<w.length;$++)Y[w[$].replace(/-/g,"_")]=w[$];return Y}function T(w,Y){return w&&w.type===a.RESERVED&&w.text===Y}function I(w,Y){return w&&w.type===a.RESERVED&&i(w.text,Y)}var O=["case","return","do","if","throw","else","await","break","continue","async"],E=["before-newline","after-newline","preserve-newline"],y=S(E),p=[y.before_newline,y.preserve_newline],h={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function A(w,Y){if(Y.multiline_frame||Y.mode===h.ForInitializer||Y.mode===h.Conditional)return;w.remove_indent(Y.start_line_index)}function _(w){w=w.replace(d.allLineBreaks,`
`);for(var Y=[],$=w.indexOf(`
`);$!==-1;)Y.push(w.substring(0,$)),w=w.substring($+1),$=w.indexOf(`
`);return w.length&&Y.push(w),Y}function v(w){return w===h.ArrayLiteral}function P(w){return i(w,[h.Expression,h.ForInitializer,h.Conditional])}function x(w,Y){for(var $=0;$<w.length;$++){var oe=w[$].trim();if(oe.charAt(0)!==Y)return!1}return!0}function C(w,Y){for(var $=0,oe=w.length,de;$<oe;$++)if(de=w[$],de&&de.indexOf(Y)!==0)return!1;return!0}function j(w,Y){Y=Y||{},this._source_text=w||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new u(Y)}j.prototype.create_flags=function(w,Y){var $=0;w&&($=w.indentation_level,!this._output.just_added_newline()&&w.line_indent_level>$&&($=w.line_indent_level));var oe={mode:Y,parent:w,last_token:w?w.last_token:new f(a.START_BLOCK,""),last_word:w?w.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:w?w.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},j.prototype._reset=function(w){var Y=w.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(h.BlockStatement);var $=new c(w,this._options);return this._tokens=$.tokenize(),w},j.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w,Y=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=`
`,Y&&d.lineBreak.test(Y||"")&&($=Y.match(d.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return w=this._output.get_code($),w},j.prototype.handle_token=function(w,Y){w.type===a.START_EXPR?this.handle_start_expr(w):w.type===a.END_EXPR?this.handle_end_expr(w):w.type===a.START_BLOCK?this.handle_start_block(w):w.type===a.END_BLOCK?this.handle_end_block(w):w.type===a.WORD?this.handle_word(w):w.type===a.RESERVED?this.handle_word(w):w.type===a.SEMICOLON?this.handle_semicolon(w):w.type===a.STRING?this.handle_string(w):w.type===a.EQUALS?this.handle_equals(w):w.type===a.OPERATOR?this.handle_operator(w):w.type===a.COMMA?this.handle_comma(w):w.type===a.BLOCK_COMMENT?this.handle_block_comment(w,Y):w.type===a.COMMENT?this.handle_comment(w,Y):w.type===a.DOT?this.handle_dot(w):w.type===a.EOF?this.handle_eof(w):w.type===a.UNKNOWN?this.handle_unknown(w,Y):this.handle_unknown(w,Y)},j.prototype.handle_whitespace_and_comments=function(w,Y){var $=w.newlines,oe=this._options.keep_array_indentation&&v(this._flags.mode);if(w.comments_before)for(var de=w.comments_before.next();de;)this.handle_whitespace_and_comments(de,Y),this.handle_token(de,Y),de=w.comments_before.next();if(oe)for(var Be=0;Be<$;Be+=1)this.print_newline(Be>0,Y);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,Y);for(var Ae=1;Ae<$;Ae+=1)this.print_newline(!0,Y)}};var B=["async","break","continue","return","throw","yield"];j.prototype.allow_wrap_or_preserved_newline=function(w,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&w.newlines||Y,oe=i(this._flags.last_token.text,l)||i(w.text,l);if(oe){var de=i(this._flags.last_token.text,l)&&i(this._options.operator_position,p)||i(w.text,l);$=$&&de}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(I(this._flags.last_token,B))return;this._output.set_wrap_point()}},j.prototype.print_newline=function(w,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&T($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(w)&&(this._flags.multiline_frame=!0)},j.prototype.print_token_line_indentation=function(w){this._output.just_added_newline()&&(this._options.keep_array_indentation&&w.newlines&&(w.text==="["||v(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(w.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},j.prototype.print_token=function(w){if(this._output.raw){this._output.add_raw_token(w);return}if(this._options.comma_first&&w.previous&&w.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(w),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(w),this._output.non_breaking_space=!0,this._output.add_token(w.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},j.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.set_mode=function(w){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,w),this._flags=this.create_flags(this._previous_flags,w),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h.Statement&&A(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.start_of_object_property=function(){return this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||I(this._flags.last_token,["get","set"]))},j.prototype.start_of_statement=function(w){var Y=!1;return Y=Y||I(this._flags.last_token,["var","let","const"])&&w.type===a.WORD,Y=Y||T(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement)&&I(this._flags.last_token,B)&&!w.newlines,Y=Y||T(this._flags.last_token,"else")&&!(T(w,"if")&&!w.comments_before),Y=Y||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===h.ForInitializer||this._previous_flags.mode===h.Conditional),Y=Y||this._flags.last_token.type===a.WORD&&this._flags.mode===h.BlockStatement&&!this._flags.in_case&&!(w.text==="--"||w.text==="++")&&this._last_last_text!=="function"&&w.type!==a.WORD&&w.type!==a.RESERVED,Y=Y||this._flags.mode===h.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||I(this._flags.last_token,["get","set"])),Y?(this.set_mode(h.Statement),this.indent(),this.handle_whitespace_and_comments(w,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w,I(w,["do","for","if","while"])),!0):!1},j.prototype.handle_start_expr=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w);var Y=h.Expression;if(w.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){I(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(w),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=h.ArrayLiteral,v(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),i(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=h.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=h.Conditional):i(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&w.whitespace_before===""?this._output.space_before_token=!1:(i(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var oe=this._tokens.peek(-4);I($,["async","function"])||$.text==="*"&&I(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===h.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(w);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&i(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(w,w.newlines),this.print_token(w),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},j.prototype.handle_end_expr=function(w){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(w,w.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(w),this.restore_mode(),A(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===h.Conditional&&(this._previous_flags.mode=h.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},j.prototype.handle_start_block=function(w){this.handle_whitespace_and_comments(w);var Y=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(h.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(h.BlockStatement):$&&(i($.text,[":",","])&&i(Y.type,[a.STRING,a.WORD,a.RESERVED])||i(Y.text,["get","set","..."])&&i($.type,[a.WORD,a.RESERVED]))?i(this._last_last_text,["class","interface"])&&!i($.text,[":",","])?this.set_mode(h.BlockStatement):this.set_mode(h.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(h.BlockStatement):i(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||I(this._flags.last_token,["return","throw","import","default"])?this.set_mode(h.ObjectLiteral):this.set_mode(h.BlockStatement),this._flags.last_token&&(I(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!Y.comments_before&&Y.text==="}",de=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var Be=0,Ae=null;this._flags.inline_frame=!0;do if(Be+=1,Ae=this._tokens.peek(Be-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==a.EOF&&!(Ae.type===a.END_BLOCK&&Ae.opened===w))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(de||this._flags.last_token.type===a.EQUALS||I(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(v(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(w),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(w),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},j.prototype.handle_end_block=function(w){for(this.handle_whitespace_and_comments(w);this._flags.mode===h.Statement;)this.restore_mode();var Y=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(v(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(w)},j.prototype.handle_word=function(w){if(w.type===a.RESERVED){if(i(w.text,["set","get"])&&this._flags.mode!==h.ObjectLiteral)w.type=a.WORD;else if(w.text==="import"&&i(this._tokens.peek().text,["(","."]))w.type=a.WORD;else if(i(w.text,["as","from"])&&!this._flags.import_block)w.type=a.WORD;else if(this._flags.mode===h.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(w.type=a.WORD)}}if(this.start_of_statement(w)?I(this._flags.last_token,["var","let","const"])&&w.type===a.WORD&&(this._flags.declaration_statement=!0):w.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!I(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(w),this.print_newline()):this.handle_whitespace_and_comments(w),this._flags.do_block&&!this._flags.do_while)if(T(w,"while")){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&T(w,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&I(w,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(w),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w)),T(w,"function")){(i(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(i(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!w.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?I(this._flags.last_token,["get","set","new","export"])||I(this._flags.last_token,B)?this._output.space_before_token=!0:T(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||v(this._flags.mode))||this.print_newline(),this.print_token(w),this._flags.last_word=w.text;return}var $="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":I(w,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===h.BlockStatement?$="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&P(this._flags.mode)?$="SPACE":this._flags.last_token.type===a.STRING?$="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&i(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),I(w,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),I(w,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===h.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?I(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&I(w,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!I(w,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(w,"if")&&T(w.previous,"else")?this._output.space_before_token=!0:this.print_newline()):I(w,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&v(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);w.previous&&(w.previous.type===a.WORD||w.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(w),this._flags.last_word=w.text,w.type===a.RESERVED&&(w.text==="do"?this._flags.do_block=!0:w.text==="if"?this._flags.if_block=!0:w.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(w,"from")&&(this._flags.import_block=!1))},j.prototype.handle_semicolon=function(w){this.start_of_statement(w)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(w);for(var Y=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&T(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(w)},j.prototype.handle_string=function(w){w.text.startsWith("`")&&w.newlines===0&&w.whitespace_before===""&&(w.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(w)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(w),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w):w.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(w.previous.text==="]"||w.previous.text===")")&&w.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(w)},j.prototype.handle_equals=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0},j.prototype.handle_comma=function(w){this.handle_whitespace_and_comments(w,!0),this.print_token(w),this._output.space_before_token=!0,this._flags.declaration_statement?(P(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)):this._flags.mode===h.ObjectLiteral||this._flags.mode===h.Statement&&this._flags.parent.mode===h.ObjectLiteral?(this._flags.mode===h.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)},j.prototype.handle_operator=function(w){var Y=w.text==="*"&&(I(this._flags.last_token,["function","yield"])||i(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),$=i(w.text,["-","+"])&&(i(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||i(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(w)){var oe=!Y;this.handle_whitespace_and_comments(w,oe)}if(w.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(w);return}if(w.text==="::"){this.print_token(w);return}if(this._flags.last_token.type===a.OPERATOR&&i(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(w),w.text===":"&&this._flags.in_case){this.print_token(w),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var de=!0,Be=!0,Ae=!1;if(w.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Ae=!0):w.text==="?"&&(this._flags.ternary_depth+=1),!$&&!Y&&this._options.preserve_newlines&&i(w.text,l)){var Re=w.text===":",Le=Re&&Ae,Fe=Re&&!Ae;switch(this._options.operator_position){case y.before_newline:this._output.space_before_token=!Fe,this.print_token(w),(!Re||Le)&&this.allow_wrap_or_preserved_newline(w),this._output.space_before_token=!0;return;case y.after_newline:this._output.space_before_token=!0,!Re||Le?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(w):this._output.space_before_token=!1,this.print_token(w),this._output.space_before_token=!0;return;case y.preserve_newline:Fe||this.allow_wrap_or_preserved_newline(w),de=!(this._output.just_added_newline()||Fe),this._output.space_before_token=de,this.print_token(w),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(w),de=!1;var me=this._tokens.peek();Be=me&&i(me.type,[a.WORD,a.RESERVED])}else if(w.text==="...")this.allow_wrap_or_preserved_newline(w),de=this._flags.last_token.type===a.START_BLOCK,Be=!1;else if(i(w.text,["--","++","!","~"])||$){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(w),de=!1,Be=!1,w.newlines&&(w.text==="--"||w.text==="++"||w.text==="~")){var fe=I(this._flags.last_token,O)&&w.newlines;fe&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(fe,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(de=!0),this._flags.last_token.type===a.RESERVED?de=!0:this._flags.last_token.type===a.END_EXPR?de=!(this._flags.last_token.text==="]"&&(w.text==="--"||w.text==="++")):this._flags.last_token.type===a.OPERATOR&&(de=i(w.text,["--","-","++","+"])&&i(this._flags.last_token.text,["--","-","++","+"]),i(w.text,["+","-"])&&i(this._flags.last_token.text,["--","++"])&&(Be=!0)),(this._flags.mode===h.BlockStatement&&!this._flags.inline_frame||this._flags.mode===h.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(w),this._output.space_before_token=Be},j.prototype.handle_block_comment=function(w,Y){if(this._output.raw){this._output.add_raw_token(w),w.directives&&w.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(w.directives){this.print_newline(!1,Y),this.print_token(w),w.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!d.newline.test(w.text)&&!w.newlines){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0;return}else this.print_block_commment(w,Y)},j.prototype.print_block_commment=function(w,Y){var $=_(w.text),oe,de=!1,Be=!1,Ae=w.whitespace_before,Re=Ae.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(w),this._output.add_token($[0]),this.print_newline(!1,Y),$.length>1){for($=$.slice(1),de=x($,"*"),Be=C($,Ae),de&&(this._flags.alignment=1),oe=0;oe<$.length;oe++)de?(this.print_token_line_indentation(w),this._output.add_token(R($[oe]))):Be&&$[oe]?(this.print_token_line_indentation(w),this._output.add_token($[oe].substring(Re))):(this._output.current_line.set_indent(-1),this._output.add_token($[oe])),this.print_newline(!1,Y);this._flags.alignment=0}},j.prototype.handle_comment=function(w,Y){w.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(w),this.print_newline(!1,Y)},j.prototype.handle_dot=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),I(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(w,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(w)},j.prototype.handle_unknown=function(w,Y){this.print_token(w),w.text[w.text.length-1]===`
`&&this.print_newline(!1,Y)},j.prototype.handle_eof=function(w){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w)},n.exports.Beautifier=j},function(n){function D(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}D.prototype.clone_empty=function(){var f=new D(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},D.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},D.prototype.has_match=function(f){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(f))return!0;return!1},D.prototype.set_indent=function(f,d){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(f){this.__items.push(f);var d=f.lastIndexOf(`
`);d!==-1?this.__character_count=f.length-d:this.__character_count+=f.length},D.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function b(f,d){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),d=d||"",f.indent_level>0&&(d=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}b.prototype.get_indent_size=function(f,d){var u=this.__base_string_length;return d=d||0,f<0&&(u=0),u+=f*this.__indent_size,u+=d,u},b.prototype.get_indent_string=function(f,d){var u=this.__base_string;return d=d||0,f<0&&(f=0,u=""),d+=f*this.__indent_size,this.__ensure_cache(d),u+=this.__cache[d],u},b.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var f=this.__cache.length,d=0,u="";this.__indent_size&&f>=this.__indent_size&&(d=Math.floor(f/this.__indent_size),f-=d*this.__indent_size,u=new Array(d+1).join(this.__indent_string)),f&&(u+=new Array(f+1).join(" ")),this.__cache.push(u)};function m(f,d){this.__indent_cache=new b(f,d),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(f,d){return this.__indent_cache.get_indent_string(f,d)},m.prototype.get_indent_size=function(f,d){return this.__indent_cache.get_indent_size(f,d)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(f){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(`
`);return f!==`
`&&(u=u.replace(/[\n]/g,f)),u},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(f,d){return f=f||0,d=d||0,this.next_line.set_indent(f,d),this.__lines.length>1?(this.current_line.set_indent(f,d),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(f){for(var d=0;d<f.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},m.prototype.remove_indent=function(f){for(var d=this.__lines.length;f<d;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(f,d){for(var u=this.__lines.length-2;u>=0;){var c=this.__lines[u];if(c.is_empty())break;if(c.item(0).indexOf(f)!==0&&c.item(-1)!==d){this.__lines.splice(u+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},n.exports.Output=m},function(n){function D(b,m,f,d){this.type=b,this.text=m,this.comments_before=null,this.newlines=f||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=D},function(n,D){var b="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",d="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",u="(?:\\\\u[0-9a-fA-F]{4}|["+b+f+"])",c="(?:\\\\u[0-9a-fA-F]{4}|["+m+f+d+"])*";D.identifier=new RegExp(u+c,"g"),D.identifierStart=new RegExp(u),D.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+f+d+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;D.newline=/[\n\r\u2028\u2029]/,D.lineBreak=new RegExp(`\r
|`+D.newline.source),D.allLineBreaks=new RegExp(D.lineBreak.source,"g")},function(n,D,b){var m=b(6).Options,f=["before-newline","after-newline","preserve-newline"];function d(u){m.call(this,u,"js");var c=this.raw_options.brace_style||null;c==="expand-strict"?this.raw_options.brace_style="expand":c==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l<o.length;l++)o[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[l];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",f),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}d.prototype=new m,n.exports.Options=d},function(n){function D(f,d){this.raw_options=b(f,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}D.prototype._get_array=function(f,d){var u=this.raw_options[f],c=d||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(c=u.concat()):typeof u=="string"&&(c=u.split(/[^a-zA-Z0-9_\/\-]+/)),c},D.prototype._get_boolean=function(f,d){var u=this.raw_options[f],c=u===void 0?!!d:!!u;return c},D.prototype._get_characters=function(f,d){var u=this.raw_options[f],c=d||"";return typeof u=="string"&&(c=u.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),c},D.prototype._get_number=function(f,d){var u=this.raw_options[f];d=parseInt(d,10),isNaN(d)&&(d=0);var c=parseInt(u,10);return isNaN(c)&&(c=d),c},D.prototype._get_selection=function(f,d,u){var c=this._get_selection_list(f,d,u);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[f]+"'");return c[0]},D.prototype._get_selection_list=function(f,d,u){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[d[0]],!this._is_valid_selection(u,d))throw new Error("Invalid Default Value!");var c=this._get_array(f,u);if(!this._is_valid_selection(c,d))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[f]+"'");return c},D.prototype._is_valid_selection=function(f,d){return f.length&&d.length&&!f.some(function(u){return d.indexOf(u)===-1})};function b(f,d){var u={};f=m(f);var c;for(c in f)c!==d&&(u[c]=f[c]);if(d&&f[d])for(c in f[d])u[c]=f[d][c];return u}function m(f){var d={},u;for(u in f){var c=u.replace(/-/g,"_");d[c]=f[u]}return d}n.exports.Options=D,n.exports.normalizeOpts=m,n.exports.mergeOpts=b},function(n,D,b){var m=b(8).InputScanner,f=b(9).Tokenizer,d=b(9).TOKEN,u=b(13).Directives,c=b(4),o=b(12).Pattern,l=b(14).TemplatablePattern;function a(x,C){return C.indexOf(x)!==-1}var i={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:d.START,RAW:d.RAW,EOF:d.EOF},R=new u(/\/\*/,/\*\//),S=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,T=/[0-9]/,I=/[^\d\.]/,O=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),E=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";E=E.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),E="\\?\\.(?!\\d) "+E,E=E.replace(/ /g,"|");var y=new RegExp(E),p="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),h=p.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),A=new RegExp("^(?:"+h.join("|")+")$"),_,v=function(x,C){f.call(this,x,C),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var j=new o(this._input),B=new l(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(c.identifier).matching(c.identifierMatch),number:j.matching(S),punct:j.matching(y),comment:j.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:j.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:j.matching(/<!--/),html_comment_end:j.matching(/-->/),include:j.starting_with(/#include/).until_after(c.lineBreak),shebang:j.starting_with(/#!/).until_after(c.lineBreak),xml:j.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};v.prototype=new f,v.prototype._is_comment=function(x){return x.type===i.COMMENT||x.type===i.BLOCK_COMMENT||x.type===i.UNKNOWN},v.prototype._is_opening=function(x){return x.type===i.START_BLOCK||x.type===i.START_EXPR},v.prototype._is_closing=function(x,C){return(x.type===i.END_BLOCK||x.type===i.END_EXPR)&&C&&(x.text==="]"&&C.text==="["||x.text===")"&&C.text==="("||x.text==="}"&&C.text==="{")},v.prototype._reset=function(){_=!1},v.prototype._get_next_token=function(x,C){var j=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(i.EOF,""):(j=j||this._read_non_javascript(B),j=j||this._read_string(B),j=j||this._read_word(x),j=j||this._read_singles(B),j=j||this._read_comment(B),j=j||this._read_regexp(B,x),j=j||this._read_xml(B,x),j=j||this._read_punctuation(),j=j||this._create_token(i.UNKNOWN,this._input.next()),j)},v.prototype._read_word=function(x){var C;if(C=this.__patterns.identifier.read(),C!=="")return C=C.replace(c.allLineBreaks,`
`),!(x.type===i.DOT||x.type===i.RESERVED&&(x.text==="set"||x.text==="get"))&&A.test(C)?(C==="in"||C==="of")&&(x.type===i.WORD||x.type===i.STRING)?this._create_token(i.OPERATOR,C):this._create_token(i.RESERVED,C):this._create_token(i.WORD,C);if(C=this.__patterns.number.read(),C!=="")return this._create_token(i.WORD,C)},v.prototype._read_singles=function(x){var C=null;return x==="("||x==="["?C=this._create_token(i.START_EXPR,x):x===")"||x==="]"?C=this._create_token(i.END_EXPR,x):x==="{"?C=this._create_token(i.START_BLOCK,x):x==="}"?C=this._create_token(i.END_BLOCK,x):x===";"?C=this._create_token(i.SEMICOLON,x):x==="."&&I.test(this._input.peek(1))?C=this._create_token(i.DOT,x):x===","&&(C=this._create_token(i.COMMA,x)),C&&this._input.next(),C},v.prototype._read_punctuation=function(){var x=this.__patterns.punct.read();if(x!=="")return x==="="?this._create_token(i.EQUALS,x):x==="?."?this._create_token(i.DOT,x):this._create_token(i.OPERATOR,x)},v.prototype._read_non_javascript=function(x){var C="";if(x==="#"){if(this._is_first_token()&&(C=this.__patterns.shebang.read(),C))return this._create_token(i.UNKNOWN,C.trim()+`
`);if(C=this.__patterns.include.read(),C)return this._create_token(i.UNKNOWN,C.trim()+`
`);x=this._input.next();var j="#";if(this._input.hasNext()&&this._input.testChar(T)){do x=this._input.next(),j+=x;while(this._input.hasNext()&&x!=="#"&&x!=="=");return x==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(j+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(j+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,j)}this._input.back()}else if(x==="<"&&this._is_first_token()){if(C=this.__patterns.html_comment_start.read(),C){for(;this._input.hasNext()&&!this._input.testChar(c.newline);)C+=this._input.next();return _=!0,this._create_token(i.COMMENT,C)}}else if(_&&x==="-"&&(C=this.__patterns.html_comment_end.read(),C))return _=!1,this._create_token(i.COMMENT,C);return null},v.prototype._read_comment=function(x){var C=null;if(x==="/"){var j="";if(this._input.peek(1)==="*"){j=this.__patterns.block_comment.read();var B=R.get_directives(j);B&&B.ignore==="start"&&(j+=R.readIgnored(this._input)),j=j.replace(c.allLineBreaks,`
`),C=this._create_token(i.BLOCK_COMMENT,j),C.directives=B}else this._input.peek(1)==="/"&&(j=this.__patterns.comment.read(),C=this._create_token(i.COMMENT,j))}return C},v.prototype._read_string=function(x){if(x==="`"||x==="'"||x==='"'){var C=this._input.next();return this.has_char_escapes=!1,x==="`"?C+=this._read_string_recursive("`",!0,"${"):C+=this._read_string_recursive(x),this.has_char_escapes&&this._options.unescape_strings&&(C=P(C)),this._input.peek()===x&&(C+=this._input.next()),C=C.replace(c.allLineBreaks,`
`),this._create_token(i.STRING,C)}return null},v.prototype._allow_regexp_or_xml=function(x){return x.type===i.RESERVED&&a(x.text,["return","case","throw","else","do","typeof","yield"])||x.type===i.END_EXPR&&x.text===")"&&x.opened.previous.type===i.RESERVED&&a(x.opened.previous.text,["if","while","for"])||a(x.type,[i.COMMENT,i.START_EXPR,i.START_BLOCK,i.START,i.END_BLOCK,i.OPERATOR,i.EQUALS,i.EOF,i.SEMICOLON,i.COMMA])},v.prototype._read_regexp=function(x,C){if(x==="/"&&this._allow_regexp_or_xml(C)){for(var j=this._input.next(),B=!1,w=!1;this._input.hasNext()&&(B||w||this._input.peek()!==x)&&!this._input.testChar(c.newline);)j+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?w=!0:this._input.peek()==="]"&&(w=!1)),this._input.next();return this._input.peek()===x&&(j+=this._input.next(),j+=this._input.read(c.identifier)),this._create_token(i.STRING,j)}return null},v.prototype._read_xml=function(x,C){if(this._options.e4x&&x==="<"&&this._allow_regexp_or_xml(C)){var j="",B=this.__patterns.xml.read_match();if(B){for(var w=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=w.indexOf("{")===0,$=0;B;){var oe=!!B[1],de=B[2],Be=!!B[B.length-1]||de.slice(0,8)==="![CDATA[";if(!Be&&(de===w||Y&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--$:++$),j+=B[0],$<=0)break;B=this.__patterns.xml.read_match()}return B||(j+=this._input.match(/[\s\S]*/g)[0]),j=j.replace(c.allLineBreaks,`
`),this._create_token(i.STRING,j)}}return null};function P(x){for(var C="",j=0,B=new m(x),w=null;B.hasNext();)if(w=B.match(/([\s]|[^\\]|\\\\)+/g),w&&(C+=w[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")w=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")w=B.match(/u([0-9A-Fa-f]{4})/g);else{C+="\\",B.hasNext()&&(C+=B.next());continue}if(!w)return x;if(j=parseInt(w[1],16),j>126&&j<=255&&w[0].indexOf("x")===0)return x;if(j>=0&&j<32){C+="\\"+w[0];continue}else j===34||j===39||j===92?C+="\\"+String.fromCharCode(j):C+=String.fromCharCode(j)}return C}v.prototype._read_string_recursive=function(x,C,j){var B,w;x==="'"?w=this.__patterns.single_quote:x==='"'?w=this.__patterns.double_quote:x==="`"?w=this.__patterns.template_text:x==="}"&&(w=this.__patterns.template_expression);for(var Y=w.read(),$="";this._input.hasNext();){if($=this._input.next(),$===x||!C&&c.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===`
`&&this._input.next(),$+=this._input.next()):j&&(j==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),j===$&&(x==="`"?$+=this._read_string_recursive("}",C,"`"):$+=this._read_string_recursive("`",C,"${"),this._input.hasNext()&&($+=this._input.next())));$+=w.read(),Y+=$}return Y},n.exports.Tokenizer=v,n.exports.TOKEN=i,n.exports.positionable_operators=O.slice(),n.exports.line_starters=p.slice()},function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function b(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position<this.__input_length},b.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},b.prototype.peek=function(m){var f=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(f=this.__input.charAt(m)),f},b.prototype.__match=function(m,f){m.lastIndex=f;var d=m.exec(this.__input);return d&&!(D&&m.sticky)&&(d.index!==f&&(d=null)),d},b.prototype.test=function(m,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(m,f):!1},b.prototype.testChar=function(m,f){var d=this.peek(f);return m.lastIndex=0,d!==null&&m.test(d)},b.prototype.match=function(m){var f=this.__match(m,this.__position);return f?this.__position+=f[0].length:f=null,f},b.prototype.read=function(m,f,d){var u="",c;return m&&(c=this.match(m),c&&(u+=c[0])),f&&(c||!m)&&(u+=this.readUntil(f,d)),u},b.prototype.readUntil=function(m,f){var d="",u=this.__position;m.lastIndex=this.__position;var c=m.exec(this.__input);return c?(u=c.index,f&&(u+=c[0].length)):u=this.__input_length,d=this.__input.substring(this.__position,u),this.__position=u,d},b.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},b.prototype.get_regexp=function(m,f){var d=null,u="g";return f&&D&&(u="y"),typeof m=="string"&&m!==""?d=new RegExp(m,u):m&&(d=new RegExp(m.source,u)),d},b.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},b.prototype.peekUntilAfter=function(m){var f=this.__position,d=this.readUntilAfter(m);return this.__position=f,d},b.prototype.lookBack=function(m){var f=this.__position-1;return f>=m.length&&this.__input.substring(f-m.length,f).toLowerCase()===m},n.exports.InputScanner=b},function(n,D,b){var m=b(8).InputScanner,f=b(3).Token,d=b(10).TokenStream,u=b(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(l,a){this._input=new m(l),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var l,a=new f(c.START,""),i=null,R=[],S=new d;a.type!==c.EOF;){for(l=this._get_next_token(a,i);this._is_comment(l);)S.add(l),l=this._get_next_token(a,i);S.isEmpty()||(l.comments_before=S,S=new d),l.parent=i,this._is_opening(l)?(R.push(i),i=l):i&&this._is_closing(l,i)&&(l.opened=i,i.closed=l,i=R.pop(),l.parent=i),l.previous=a,a.next=l,this.__tokens.add(l),a=l}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(l,a){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(c.RAW,i):this._create_token(c.EOF,"")},o.prototype._is_comment=function(l){return!1},o.prototype._is_opening=function(l){return!1},o.prototype._is_closing=function(l,a){return!1},o.prototype._create_token=function(l,a){var i=new f(l,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return i},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=o,n.exports.TOKEN=c},function(n){function D(b){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=b}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position<this.__tokens_length},D.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__tokens[this.__position],this.__position+=1),b},D.prototype.peek=function(b){var m=null;return b=b||0,b+=this.__position,b>=0&&b<this.__tokens_length&&(m=this.__tokens[b]),m},D.prototype.add=function(b){this.__parent_token&&(b.parent=this.__parent_token),this.__tokens.push(b),this.__tokens_length+=1},n.exports.TokenStream=D},function(n,D,b){var m=b(12).Pattern;function f(d,u){m.call(this,d,u),u?this._line_regexp=this._input.get_regexp(u._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}f.prototype=new m,f.prototype.__set_whitespace_patterns=function(d,u){d+="\\t ",u+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+u+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+u+"]")},f.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var u=this.__split(this._newline_regexp,d);this.newline_count=u.length-1,this.whitespace_before_token=u[this.newline_count]}return d},f.prototype.matching=function(d,u){var c=this._create();return c.__set_whitespace_patterns(d,u),c._update(),c},f.prototype._create=function(){return new f(this._input,this)},f.prototype.__split=function(d,u){d.lastIndex=0;for(var c=0,o=[],l=d.exec(u);l;)o.push(u.substring(c,l.index)),c=l.index+l[0].length,l=d.exec(u);return c<u.length?o.push(u.substring(c,u.length)):o.push(""),o},n.exports.WhitespacePattern=f},function(n){function D(b,m){this._input=b,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,m&&(this._starting_pattern=this._input.get_regexp(m._starting_pattern,!0),this._match_pattern=this._input.get_regexp(m._match_pattern,!0),this._until_pattern=this._input.get_regexp(m._until_pattern),this._until_after=m._until_after)}D.prototype.read=function(){var b=this._input.read(this._starting_pattern);return(!this._starting_pattern||b)&&(b+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),b},D.prototype.read_match=function(){return this._input.match(this._match_pattern)},D.prototype.until_after=function(b){var m=this._create();return m._until_after=!0,m._until_pattern=this._input.get_regexp(b),m._update(),m},D.prototype.until=function(b){var m=this._create();return m._until_after=!1,m._until_pattern=this._input.get_regexp(b),m._update(),m},D.prototype.starting_with=function(b){var m=this._create();return m._starting_pattern=this._input.get_regexp(b,!0),m._update(),m},D.prototype.matching=function(b){var m=this._create();return m._match_pattern=this._input.get_regexp(b,!0),m._update(),m},D.prototype._create=function(){return new D(this._input,this)},D.prototype._update=function(){},n.exports.Pattern=D},function(n){function D(b,m){b=typeof b=="string"?b:b.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(b+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(b+/\sbeautify\signore:end\s/.source+m,"g")}D.prototype.get_directives=function(b){if(!b.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(b);f;)m[f[1]]=f[2],f=this.__directive_pattern.exec(b);return m},D.prototype.readIgnored=function(b){return b.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=D},function(n,D,b){var m=b(12).Pattern,f={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(u,c){m.call(this,u,c),this.__template_pattern=null,this._disabled=Object.assign({},f),this._excluded=Object.assign({},f),c&&(this.__template_pattern=this._input.get_regexp(c.__template_pattern),this._excluded=Object.assign(this._excluded,c._excluded),this._disabled=Object.assign(this._disabled,c._disabled));var o=new m(u);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new m,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(u){var c=this._create();return c._disabled[u]=!0,c._update(),c},d.prototype.read_options=function(u){var c=this._create();for(var o in f)c._disabled[o]=u.templating.indexOf(o)===-1;return c._update(),c},d.prototype.exclude=function(u){var c=this._create();return c._excluded[u]=!0,c._update(),c},d.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),u+=c,c=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},d.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},d.prototype._read_template=function(){var u="",c=this._input.peek();if(c==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(u=u||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},n.exports.TemplatablePattern=d}],M={};function K(n){var D=M[n];if(D!==void 0)return D.exports;var b=M[n]={exports:{}};return W[n](b,b.exports,K),b.exports}var H=K(0);N=H})();var V=N;!(Z=[],z=function(){return{js_beautify:V}}.apply(se,Z),z!==void 0&&(Ve.exports=z))})()},"6eGT":function(Ve,se,U){"use strict";function Z(z){return null}se.a=Z},"746U":function(Ve,se,U){"use strict";U.d(se,"f",function(){return Z}),U.d(se,"l",function(){return z}),U.d(se,"k",function(){return N}),U.d(se,"j",function(){return V}),U.d(se,"g",function(){return W}),U.d(se,"m",function(){return M}),U.d(se,"h",function(){return K}),U.d(se,"n",function(){return H}),U.d(se,"c",function(){return n}),U.d(se,"a",function(){return D}),U.d(se,"i",function(){return b}),U.d(se,"o",function(){return m}),U.d(se,"e",function(){return u}),U.d(se,"d",function(){return c}),U.d(se,"p",function(){return o}),U.d(se,"b",function(){return l});function Z(a){return Array.isArray(a)}function z(a){return typeof a=="string"}function N(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&!(a instanceof RegExp)&&!(a instanceof Date)}function V(a){return typeof a=="number"&&!isNaN(a)}function W(a){return a===!0||a===!1}function M(a){return typeof a=="undefined"}function K(a){return!H(a)}function H(a){return M(a)||a===null}function n(a,i){if(!a)throw new Error(i?`Unexpected type, expected '${i}'`:"Unexpected type")}function D(a){if(H(a))throw new Error("Assertion Failed: argument is undefined or null");return a}function b(a){return typeof a=="function"}function m(a,i){const R=Math.min(a.length,i.length);for(let S=0;S<R;S++)f(a[S],i[S])}function f(a,i){if(z(i)){if(typeof a!==i)throw new Error(`argument does not match constraint: typeof ${i}`)}else if(b(i)){try{if(a instanceof i)return}catch(R){}if(!H(a)&&a.constructor===i)return;if(i.length===1&&i.call(void 0,a)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function d(a){let i=[],R=Object.getPrototypeOf(a);for(;Object.prototype!==R;)i=i.concat(Object.getOwnPropertyNames(R)),R=Object.getPrototypeOf(R);return i}function u(a){const i=[];for(const R of d(a))typeof a[R]=="function"&&i.push(R);return i}function c(a,i){const R=T=>function(){const I=Array.prototype.slice.call(arguments,0);return i(T,I)};let S={};for(const T of a)S[T]=R(T);return S}function o(a){return a===null?void 0:a}function l(a,i="Unreachable"){throw new Error(i)}},"7Cbv":function(Ve,se,U){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),z=new Uint8Array(16);function N(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(z)}var V=/^(?:[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 W(f){return typeof f=="string"&&V.test(f)}for(var M=W,K=[],H=0;H<256;++H)K.push((H+256).toString(16).substr(1));function n(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=(K[f[d+0]]+K[f[d+1]]+K[f[d+2]]+K[f[d+3]]+"-"+K[f[d+4]]+K[f[d+5]]+"-"+K[f[d+6]]+K[f[d+7]]+"-"+K[f[d+8]]+K[f[d+9]]+"-"+K[f[d+10]]+K[f[d+11]]+K[f[d+12]]+K[f[d+13]]+K[f[d+14]]+K[f[d+15]]).toLowerCase();if(!M(u))throw TypeError("Stringified UUID is invalid");return u}var D=n;function b(f,d,u){f=f||{};var c=f.random||(f.rng||N)();if(c[6]=c[6]&15|64,c[8]=c[8]&63|128,d){u=u||0;for(var o=0;o<16;++o)d[u+o]=c[o];return d}return D(c)}var m=se.a=b},"7ZXX":function(Ve,se,U){Ve.exports=U.p+"static/err.6e7c5817.png"},"7ahc":function(Ve,se,U){"use strict";U.d(se,"a",function(){return R});var Z=U("k1fw"),z=U("0Owb"),N=U("+L6B"),V=U("2/Rp"),W=U("y8nQ"),M=U("Vl3Y"),K=U("tJVT"),H=U("OaEy"),n=U("2fM7"),D=U("q1tI"),b=U.n(D),m=U("VrN/"),f=U.n(m),d=U("p77/"),u=U.n(d),c=U("c5Ni"),o=U.n(c),l=n.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},i={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"]};se.b=function(S){var T=S.callback,I=S.onCancel,O=Object(D.useState)("python"),E=Object(K.a)(O,2),y=E[0],p=E[1];function h(_){p(i[_][1])}function A(_){T(_)}return b.a.createElement(M.a,Object(z.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:A}),b.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(n.a,{onChange:h},Object.keys(i).map(function(_){return b.a.createElement(l,{key:_,value:_},i[_][0])}))),b.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(R,{mode:y})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(V.a,{type:"ghost",onClick:I},"\u53D6\u6D88")))};function R(S){var T=S.value,I=S.onChange,O=S.mode,E=S.options,y=E===void 0?{}:E,p=Object(D.useRef)(),h=Object(D.useState)(),A=Object(K.a)(h,2),_=A[0],v=A[1];return Object(D.useEffect)(function(){if(_){function P(x){var C=x.getValue();I&&I(C)}return _.on("change",P),function(){_.off("change",P)}}},[_,I]),Object(D.useEffect)(function(){_&&_.setOption("mode",O)},[_,O]),Object(D.useEffect)(function(){_&&((T!==_.getValue()||T==="")&&setTimeout(function(){_.setValue(T||" ")},300))},[_,T]),Object(D.useEffect)(function(){if(p.current&&!_){var P=f.a.fromTextArea(p.current,Object(Z.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},y));v(P)}},[p.current,_]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:p}))}},"7ixt":function(Ve,se,U){"use strict";U.d(se,"a",function(){return N});var Z={adjustX:1,adjustY:1},z=[0,0],N={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:z}},V=N},"7v3h":function(Ve,se,U){Ve.exports=U.p+"static/empty2.dd73f390.png"},"8/bI":function(Ve,se,U){Ve.exports=U.p+"static/empty.8918e228.png"},"815F":function(Ve,se,U){"use strict";U.d(se,"e",function(){return K}),U.d(se,"c",function(){return n}),U.d(se,"d",function(){return D}),U.d(se,"a",function(){return m}),U.d(se,"f",function(){return f}),U.d(se,"b",function(){return d});var Z=U("KQm4"),z=U("VTBJ"),N=U("Ff2n"),V=U("Zm9Q"),W=U("Kwbf"),M=U("OZM5");function K(u,c){return u!=null?u:c}function H(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=new Map;function o(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(l||[]).forEach(function(i){var R=i.key,S=i.children;Object(W.a)(R!=null,"Tree node must have a certain key: [".concat(a).concat(R,"]"));var T=String(R);Object(W.a)(!c.has(T)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(T)),c.set(T,!0),o(S,"".concat(a).concat(T," > "))})}o(u)}function n(u){function c(o){var l=Object(V.a)(o);return l.map(function(a){if(!Object(M.i)(a))return Object(W.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var i=a.key,R=a.props,S=R.children,T=Object(N.a)(R,["children"]),I=Object(z.a)({key:i},T),O=c(S);return O.length&&(I.children=O),I}).filter(function(a){return a})}return c(u)}function D(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=new Set(c===!0?[]:c),l=[];function a(i){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return i.map(function(S,T){var I=Object(M.h)(R?R.pos:"0",T),O=K(S.key,I),E=Object(z.a)(Object(z.a)({},S),{},{parent:R,pos:I,children:null,data:S,isStart:[].concat(Object(Z.a)(R?R.isStart:[]),[T===0]),isEnd:[].concat(Object(Z.a)(R?R.isEnd:[]),[T===i.length-1])});return l.push(E),c===!0||o.has(O)?E.children=a(S.children||[],E):E.children=[],E})}return a(u),l}function b(u,c,o){var l;o?typeof o=="string"?l=function(R){return R[o]}:typeof o=="function"&&(l=function(R){return o(R)}):l=function(R,S){return K(R.key,S)};function a(i,R,S){var T=i?i.children:u,I=i?Object(M.h)(S.pos,R):"0";if(i){var O=l(i,I),E={node:i,index:R,pos:I,key:O,parentPos:S.node?S.pos:null,level:S.level+1};c(E)}T&&T.forEach(function(y,p){a(y,p,{node:i,pos:I,level:S?S.level+1:-1})})}a(null)}function m(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=c.initWrapper,l=c.processEntity,a=c.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,R={},S={},T={posEntities:R,keyEntities:S};return o&&(T=o(T)||T),b(u,function(I){var O=I.node,E=I.index,y=I.pos,p=I.key,h=I.parentPos,A=I.level,_={node:O,index:E,key:p,pos:y,level:A},v=K(p,y);R[y]=_,S[v]=_,_.parent=R[h],_.parent&&(_.parent.children=_.parent.children||[],_.parent.children.push(_)),l&&l(_,T)},i),a&&a(T),T}function f(u,c){var o=c.expandedKeys,l=c.selectedKeys,a=c.loadedKeys,i=c.loadingKeys,R=c.checkedKeys,S=c.halfCheckedKeys,T=c.dragOverNodeKey,I=c.dropPosition,O=c.keyEntities,E=O[u],y={eventKey:u,expanded:o.indexOf(u)!==-1,selected:l.indexOf(u)!==-1,loaded:a.indexOf(u)!==-1,loading:i.indexOf(u)!==-1,checked:R.indexOf(u)!==-1,halfChecked:S.indexOf(u)!==-1,pos:String(E?E.pos:""),dragOver:T===u&&I===0,dragOverGapTop:T===u&&I===-1,dragOverGapBottom:T===u&&I===1};return y}function d(u){var c=u.data,o=u.expanded,l=u.selected,a=u.checked,i=u.loaded,R=u.loading,S=u.halfChecked,T=u.dragOver,I=u.dragOverGapTop,O=u.dragOverGapBottom,E=u.pos,y=u.active,p=Object(z.a)(Object(z.a)({},c),{},{expanded:o,selected:l,checked:a,loaded:i,loading:R,halfChecked:S,dragOver:T,dragOverGapTop:I,dragOverGapBottom:O,pos:E,active:y});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(W.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),u}}),p}},"8EBN":function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){"use strict";Z.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 z=0;z<Z.modeInfo.length;z++){var N=Z.modeInfo[z];N.mimes&&(N.mime=N.mimes[0])}Z.findModeByMIME=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.mime==V)return M;if(M.mimes){for(var K=0;K<M.mimes.length;K++)if(M.mimes[K]==V)return M}}if(/\+xml$/.test(V))return Z.findModeByMIME("application/xml");if(/\+json$/.test(V))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.ext){for(var K=0;K<M.ext.length;K++)if(M.ext[K]==V)return M}}},Z.findModeByFileName=function(V){for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.file&&M.file.test(V))return M}var K=V.lastIndexOf("."),H=K>-1&&V.substring(K+1,V.length);if(H)return Z.findModeByExtension(H)},Z.findModeByName=function(V){V=V.toLowerCase();for(var W=0;W<Z.modeInfo.length;W++){var M=Z.modeInfo[W];if(M.name.toLowerCase()==V)return M;if(M.alias){for(var K=0;K<M.alias.length;K++)if(M.alias[K].toLowerCase()==V)return M}}}})},"8HAY":function(Ve,se,U){"use strict";U.d(se,"a",function(){return W}),U.d(se,"b",function(){return M}),U.d(se,"d",function(){return K}),U.d(se,"e",function(){return H}),U.d(se,"c",function(){return n});var Z=U("MI8n"),z=U("pmY6"),N=U("3/fG"),V=function(D,b,m,f){function d(u){return u instanceof m?u:new m(function(c){c(u)})}return new(m||(m=Promise))(function(u,c){function o(i){try{a(f.next(i))}catch(R){c(R)}}function l(i){try{a(f.throw(i))}catch(R){c(R)}}function a(i){i.done?u(i.value):d(i.value).then(o,l)}a((f=f.apply(D,b||[])).next())})};class W extends z.a{constructor(D,b="",m="",f=!0,d){super();this._onDidChange=this._register(new Z.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=D,this._label=b,this._cssClass=m,this._enabled=f,this._actionCallback=d}get id(){return this._id}get label(){return this._label}set label(D){this._setLabel(D)}_setLabel(D){this._label!==D&&(this._label=D,this._onDidChange.fire({label:D}))}get tooltip(){return this._tooltip||""}set tooltip(D){this._setTooltip(D)}_setTooltip(D){this._tooltip!==D&&(this._tooltip=D,this._onDidChange.fire({tooltip:D}))}get class(){return this._cssClass}set class(D){this._setClass(D)}_setClass(D){this._cssClass!==D&&(this._cssClass=D,this._onDidChange.fire({class:D}))}get enabled(){return this._enabled}set enabled(D){this._setEnabled(D)}_setEnabled(D){this._enabled!==D&&(this._enabled=D,this._onDidChange.fire({enabled:D}))}get checked(){return this._checked}set checked(D){this._setChecked(D)}_setChecked(D){this._checked!==D&&(this._checked=D,this._onDidChange.fire({checked:D}))}run(D,b){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(D))})}}class M extends z.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Z.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Z.b),this.onDidRun=this._onDidRun.event}run(D,b){return V(this,void 0,void 0,function*(){if(!D.enabled)return;this._onBeforeRun.fire({action:D});let m;try{yield this.runAction(D,b)}catch(f){m=f}this._onDidRun.fire({action:D,error:m})})}runAction(D,b){return V(this,void 0,void 0,function*(){yield D.run(b)})}}class K extends W{constructor(D){super(K.ID,D,D?"separator text":"separator");this.checked=!1,this.enabled=!1}}K.ID="vs.actions.separator";class H{constructor(D,b,m,f){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=D,this.label=b,this.class=f,this._actions=m}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class n extends W{constructor(){super(n.ID,N.a("submenu.empty","(empty)"),void 0,!1)}}n.ID="vs.actions.empty"},"8hTe":function(Ve,se,U){Ve.exports={button:"button___1wy9m"}},"9Bee":function(Ve,se,U){"use strict";var Z=U("DYRE"),z=U("zeV3"),N=U("+L6B"),V=U("2/Rp"),W=U("k1fw"),M=U("9og8"),K=U("tJVT"),H=U("WmNS"),n=U.n(H),D=U("q1tI"),b=U.n(D),m=U("vg9a"),f=U("DlQD"),d=U.n(f),u=U("rUJ1");function c(Q,L){var k=Q.match(/^(\s+)(?:```)/);if(k===null)return L;var G=k[1];return L.split(`
`).map(function(te){var J=te.match(/^\s+/);if(J===null)return te;var Ie=Object(K.a)(J,1),at=Ie[0];return at.length>=G.length?te.slice(G.length):te}).join(`
`)}var o=[],l=["<ul>"],a=new d.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){o.length=0,l=["<ul>"]}var S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(Q,L,k,G){if(L>=Q.length||Q[L].level<=k)return L;var te=Q[L];G.push("<li><a href='#"+te.anchor+"'>"+te.text+"</a>"),L++;var J=[];return L=T(Q,L,te.level,J),J.length>0&&(G.push("<ul>"),J.forEach(function(Ie){G.push(Ie)}),G.push("</ul>")),G.push("</li>"),L=T(Q,L,k,G),L}function I(){return T(o,0,0,l),l.push("</ul>"),l.join("")}var O={heading:function(L){var k=i.exec(L);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(L){var k=this.rules.block.fences.exec(L);if(k){var G=k[0],te=c(G,k[3]||""),J=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(J)>=0){var Ie=p(),at=te;te=Ie,h[Ie]={type:"block",expression:at}}return{type:"code",raw:G,lang:J,text:te}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,y=0,p=function(){return"__special_katext_id_".concat(y++,"__")},h={};function A(){return h}function _(){y=0,h={}}function v(Q){return Q=Q.replace(E,function(L,k){var G=p();return h[G]={type:"inline",expression:k},G}),Q}var P=a.listitem;a.listitem=function(Q){return P(v(Q))};var x=a.paragraph;a.paragraph=function(Q){return x(v(Q))};var C=a.tablecell;a.tablecell=function(Q,L){return C(v(Q),L)},a.code=function(Q,L,k){var G=(L||"").match(/\S*/)[0];return G?["latex","katex","math"].indexOf(G)>=0?"<p class='editormd-tex'>".concat(Q,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(L,'">').concat(k?Q:Object(u.escape)(Q,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(k?Q:Object(u.escape)(Q,!0))+"</code></pre>"},a.heading=function(Q,L,k){var G=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:G,level:L,text:Q}),"<h"+L+' id="'+G+'">'+Q+"</h"+L+">"},d.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),d.a.use({tokenizer:O,renderer:a});var j=d.a,B=U("SJMd"),w=U("ulZh"),Y=U.n(w),$=U("m3rI"),oe=U("Oy/b"),de=U("p5ED"),Be=U("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 Ae=function(Q,L){return(Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,G){k.__proto__=G}||function(k,G){for(var te in G)Object.prototype.hasOwnProperty.call(G,te)&&(k[te]=G[te])})(Q,L)};function Re(Q,L){function k(){this.constructor=Q}Ae(Q,L),Q.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function Le(Q,L,k,G){return new(k||(k=Promise))(function(te,J){function Ie(Ft){try{St(G.next(Ft))}catch(ye){J(ye)}}function at(Ft){try{St(G.throw(Ft))}catch(ye){J(ye)}}function St(Ft){var ye;Ft.done?te(Ft.value):(ye=Ft.value,ye instanceof k?ye:new k(function(Ut){Ut(ye)})).then(Ie,at)}St((G=G.apply(Q,L||[])).next())})}function Fe(Q,L){var k,G,te,J,Ie={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return J={next:at(0),throw:at(1),return:at(2)},typeof Symbol=="function"&&(J[Symbol.iterator]=function(){return this}),J;function at(St){return function(Ft){return function(ye){if(k)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(k=1,G&&(te=2&ye[0]?G.return:ye[0]?G.throw||((te=G.return)&&te.call(G),0):G.next)&&!(te=te.call(G,ye[1])).done)return te;switch(G=0,te&&(ye=[2&ye[0],te.value]),ye[0]){case 0:case 1:te=ye;break;case 4:return Ie.label++,{value:ye[1],done:!1};case 5:Ie.label++,G=ye[1],ye=[0];continue;case 7:ye=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(te=Ie.trys,(te=te.length>0&&te[te.length-1])||ye[0]!==6&&ye[0]!==2)){Ie=0;continue}if(ye[0]===3&&(!te||ye[1]>te[0]&&ye[1]<te[3])){Ie.label=ye[1];break}if(ye[0]===6&&Ie.label<te[1]){Ie.label=te[1],te=ye;break}if(te&&Ie.label<te[2]){Ie.label=te[2],Ie.ops.push(ye);break}te[2]&&Ie.ops.pop(),Ie.trys.pop();continue}ye=L.call(Q,Ie)}catch(Ut){ye=[6,Ut],G=0}finally{k=te=0}if(5&ye[0])throw ye[1];return{value:ye[0]?ye[1]:void 0,done:!0}}([St,Ft])}}}function me(){for(var Q=0,L=0,k=arguments.length;L<k;L++)Q+=arguments[L].length;var G=Array(Q),te=0;for(L=0;L<k;L++)for(var J=arguments[L],Ie=0,at=J.length;Ie<at;Ie++,te++)G[te]=J[Ie];return G}var fe=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(L,k){for(var G=0,te=k;G<te.length;G++){var J=te[G],Ie=J[0],at=J[1];L.setAttribute(Ie,at)}},Q.createRect=function(L,k,G){var te=document.createElementNS("http://www.w3.org/2000/svg","rect");return te.setAttribute("width",L.toString()),te.setAttribute("height",k.toString()),G&&Q.setAttributes(te,G),te},Q.createLine=function(L,k,G,te,J){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",L.toString()),Ie.setAttribute("y1",k.toString()),Ie.setAttribute("x2",G.toString()),Ie.setAttribute("y2",te.toString()),J&&Q.setAttributes(Ie,J),Ie},Q.createPolygon=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","polygon");return G.setAttribute("points",L),k&&Q.setAttributes(G,k),G},Q.createCircle=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","circle");return G.setAttribute("cx",(L/2).toString()),G.setAttribute("cy",(L/2).toString()),G.setAttribute("r",L.toString()),k&&Q.setAttributes(G,k),G},Q.createEllipse=function(L,k,G){var te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return te.setAttribute("cx",(L/2).toString()),te.setAttribute("cy",(k/2).toString()),te.setAttribute("rx",(L/2).toString()),te.setAttribute("ry",(k/2).toString()),G&&Q.setAttributes(te,G),te},Q.createGroup=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","g");return L&&Q.setAttributes(k,L),k},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(L,k,G,te,J,Ie,at){var St=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(St,[["id",L],["orient",k],["markerWidth",G.toString()],["markerHeight",te.toString()],["refX",J.toString()],["refY",Ie.toString()]]),St.appendChild(at),St},Q.createText=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","text");return k.setAttribute("x","0"),k.setAttribute("y","0"),L&&Q.setAttributes(k,L),k},Q.createTSpan=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","tspan");return G.textContent=L,k&&Q.setAttributes(G,k),G},Q.createImage=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","image");return L&&Q.setAttributes(k,L),k},Q.createPoint=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return G.x=L,G.y=k,G},Q.createPath=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","path");return G.setAttribute("d",L),k&&Q.setAttributes(G,k),G},Q}(),ne=function(){function Q(){}return Q.addKey=function(L){Q.key=L},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),xe=function(){function Q(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Q.prototype.rasterize=function(L,k,G){var te=this;return new Promise(function(J){var Ie=G!==void 0?G:document.createElement("canvas");L===null&&(te.markersOnly=!0,te.naturalSize=!1);var at=document.createElementNS("http://www.w3.org/2000/svg","svg");at.setAttribute("xmlns","http://www.w3.org/2000/svg"),at.setAttribute("width",k.width.baseVal.valueAsString),at.setAttribute("height",k.height.baseVal.valueAsString),at.setAttribute("viewBox","0 0 "+k.viewBox.baseVal.width.toString()+" "+k.viewBox.baseVal.height.toString()),at.innerHTML=k.innerHTML,te.naturalSize===!0?(at.width.baseVal.value=L.naturalWidth,at.height.baseVal.value=L.naturalHeight):te.width!==void 0&&te.height!==void 0&&(at.width.baseVal.value=te.width,at.height.baseVal.value=te.height),Ie.width=at.width.baseVal.value,Ie.height=at.height.baseVal.value;var St=at.outerHTML,Ft=Ie.getContext("2d");te.markersOnly!==!0&&Ft.drawImage(L,0,0,Ie.width,Ie.height);var ye=window.URL,Ut=new Image(Ie.width,Ie.height);Ut.setAttribute("crossOrigin","anonymous");var $t=new Blob([St],{type:"image/svg+xml"}),Sn=ye.createObjectURL($t);Ut.onload=function(){Ft.drawImage(Ut,0,0),ye.revokeObjectURL(Sn);var Hn=Ie.toDataURL(te.imageType,te.imageQuality);J(Hn)},Ut.src=Sn})},Q}(),ce=function(){},Ne=function(){function Q(L){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+L+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.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(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(L){return this.styleSheet===void 0&&this.addStyleSheet(),L.name=""+this.classNamePrefix+L.localName,this.classes.push(L),this.styleSheet.sheet.insertRule("."+L.name+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length),L},Q.prototype.addRule=function(L){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(L),this.styleSheet.sheet.insertRule(L.selector+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var L;this.styleSheet=document.createElement("style"),((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).appendChild(this.styleSheet),this.addRule(new He("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new He("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new He("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ke("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ke("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Q.prototype.removeStyleSheet=function(){var L;this.styleSheet&&(((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),He=function(Q,L){this.selector=Q,this.style=L},ke=function(Q,L){this.localName=Q,this.style=L},Ye=function(){function Q(L,k,G,te,J){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=L,this.displayMode=k,this.markerItems=G,this.uiStyleSettings=te,this.styles=J,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Q.prototype.show=function(L){var k=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var G=document.createElement("div");G.className=this.toolbarBlockStyleClass.name,G.style.whiteSpace="nowrap",this.uiContainer.appendChild(G),this.addActionButton(G,'<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(G,'<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(G,'<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(G,'<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(G,'<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(G,'<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(G,'<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(G,'<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(J){var Ie=document.createElement("div");Ie.className=""+k.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",J.typeName),Ie.innerHTML=J.icon,Ie.addEventListener("click",function(){k.markerToolbarButtonClicked(Ie,J)}),k.buttons.push(Ie),k.markerButtons.push(Ie)}),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 te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",te.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(te),this.addActionButton(te,'<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(te,'<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()},Q.prototype.addButtonClickListener=function(L){this.buttonClickListeners.push(L)},Q.prototype.removeButtonClickListener=function(L){this.buttonClickListeners.indexOf(L)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(L),1)},Q.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Q.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var L=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var k=0;k<this.markerButtons.length;k++)k<L||k===L&&this.markerButtons.length-1===L?this.markerButtonBlock.appendChild(this.markerButtons[k]):(k===L&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[k]))}},Q.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")},Q.prototype.resetButtonStyles=function(){var L=this;this.buttons.forEach(function(k){k.className=k.className.replace(L.uiStyleSettings.toolbarButtonStyleColorsClassName?L.uiStyleSettings.toolbarButtonStyleColorsClassName:L.toolbarButtonStyleColorsClass.name,"").trim(),k.className=k.className.replace(L.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?L.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:L.toolbarActiveButtonStyleColorsClass.name,"").trim(),k.className+=" "+(L.uiStyleSettings.toolbarButtonStyleColorsClassName?L.uiStyleSettings.toolbarButtonStyleColorsClassName:L.toolbarButtonStyleColorsClass.name)})},Q.prototype.addActionButton=function(L,k,G){var te=this,J=document.createElement("div");switch(J.className=""+this.toolbarButtonStyleClass.name,J.innerHTML=k,J.setAttribute("data-action",G),J.addEventListener("click",function(){te.actionToolbarButtonClicked(J,G)}),G){case"select":J.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":J.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":J.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":J.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":J.style.fill=this.uiStyleSettings.closeButtonColor}L.appendChild(J),this.buttons.push(J)},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ke("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 ke("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ke("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ke("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 ke("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var L=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ke("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
padding: `+L+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ke("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ke("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Q.prototype.markerToolbarButtonClicked=function(L,k){this.setActiveButton(L),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(G){return G("marker",k)}),this.markerButtonOverflowBlock.style.display="none"},Q.prototype.actionToolbarButtonClicked=function(L,k){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(G){return G("action",k)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Q.prototype.setActiveButton=function(L){this.resetButtonStyles(),L.className=L.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),L.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Q.prototype.setActiveMarkerButton=function(L){var k=this.markerButtons.find(function(G){return G.getAttribute("data-type-name")===L});k&&this.setActiveButton(k)},Q.prototype.setCurrentMarker=function(L){var k=this;this.currentMarker=L,this.buttons.filter(function(G){return/delete|notes/.test(G.getAttribute("data-action"))}).forEach(function(G){k.currentMarker===void 0?(G.style.fillOpacity="0.4",G.style.pointerEvents="none"):(G.style.fillOpacity="1",G.style.pointerEvents="all")})},Q}(),et=function(){function Q(L,k,G,te){this.panels=[],this.panelButtons=[],this.markerjsContainer=L,this.displayMode=k,this.uiStyleSettings=G,this.styles=te,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Q.prototype.addStyles=function(){var L;this.toolboxStyleClass=this.styles.addClass(new ke("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 ke("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var k=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ke("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ke("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ke("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 ke("toolbox-panel-row_colors",`
background-color: `+((L=this.uiStyleSettings.toolboxBackgroundColor)!==null&&L!==void 0?L:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ke("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
padding: `+k+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ke("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ke("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Q.prototype.show=function(L){var k;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=L,this.uiContainer.className=this.toolboxStyleClass.name+" "+((k=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Q.prototype.setPanelButtons=function(L){var k,G,te=this;this.panels=L,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((G=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&G!==void 0?G:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(J){var Ie;J.uiStyleSettings=te.uiStyleSettings;var at=document.createElement("div");at.className=te.toolboxButtonStyleClass.name+" "+((Ie=te.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:te.toolboxButtonStyleColorsClass.name),at.innerHTML=J.icon,at.title=J.title,at.addEventListener("click",function(){te.panelButtonClick(J)}),te.panelButtons.push(at),te.buttonRow.appendChild(at)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Q.prototype.panelButtonClick=function(L){var k=this,G=-1;if(L!==this.activePanel){G=this.panels.indexOf(L),this.panelRow.innerHTML="";var te=L.getUi();te.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(te),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=L}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){k.displayMode==="inline"?k.panelRow.style.display="none":k.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(J,Ie){var at,St;J.className=k.toolboxButtonStyleClass.name+" "+(Ie===G?""+((at=k.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&at!==void 0?at:k.toolboxActiveButtonStyleColorsClass.name):""+((St=k.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&St!==void 0?St:k.toolboxButtonStyleColorsClass.name))})},Q}(),ue=function(Q,L){this.title=Q,this.icon=L},_e=function(Q){function L(k,G,te,J){var Ie=Q.call(this,k,J||'<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 Ie.colors=[],Ie.addTransparent=!1,Ie.colorBoxes=[],Ie.colors=G,Ie.currentColor=te,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");return G.style.overflow="hidden",G.style.whiteSpace="nowrap",this.colors.forEach(function(te){var J=k.getColorBox(te);G.appendChild(J),k.colorBoxes.push(J)}),G},L.prototype.getColorBox=function(k){var G=this,te=this.uiStyleSettings.toolbarHeight/4,J=this.uiStyleSettings.toolbarHeight-te,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=J-2+"px",Ie.style.height=J-2+"px",Ie.style.padding="1px",Ie.style.marginRight="2px",Ie.style.marginBottom="2px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderRadius=(J+2)/2+"px",Ie.style.borderColor=k===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){G.setCurrentColor(k,Ie)});var at=document.createElement("div");return at.style.display="inline-block",at.style.width=J-2+"px",at.style.height=J-2+"px",at.style.backgroundColor=k,at.style.borderRadius=J/2+"px",k==="transparent"&&(at.style.fill=this.uiStyleSettings.toolboxAccentColor,at.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>`),Ie.appendChild(at),Ie},L.prototype.setCurrentColor=function(k,G){var te=this;this.currentColor=k,this.colorBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},L}(ue),Oe=function(){function Q(L,k,G){this._state="new",this._isSelected=!1,this._container=L,this._overlayContainer=k,this.globalSettings=G,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Q.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Q.prototype.ownsTarget=function(L){return!1},Object.defineProperty(Q.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Q.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Q.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Q.prototype.pointerDown=function(L,k){},Q.prototype.dblClick=function(L,k){},Q.prototype.manipulate=function(L){},Q.prototype.pointerUp=function(L){this.stateChanged()},Q.prototype.dispose=function(){},Q.prototype.addMarkerVisualToContainer=function(L){this.container.childNodes.length>0?this.container.insertBefore(L,this.container.childNodes[0]):this.container.appendChild(L)},Q.prototype.getState=function(){return{typeName:Q.typeName,state:this.state,notes:this.notes}},Q.prototype.restoreState=function(L){this._state=L.state,this.notes=L.notes},Q.prototype.scale=function(L,k){},Q.prototype.colorChanged=function(L){this.onColorChanged&&this.onColorChanged(L),this.stateChanged()},Q.prototype.fillColorChanged=function(L){this.onFillColorChanged&&this.onFillColorChanged(L),this.stateChanged()},Q.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var L=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),L.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(L)&&this.onStateChanged(this)}},Q.typeName="MarkerBase",Q}(),Me=function(){function Q(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Q.prototype.findGripByVisual=function(L){return this.topLeft.ownsTarget(L)?this.topLeft:this.topCenter.ownsTarget(L)?this.topCenter:this.topRight.ownsTarget(L)?this.topRight:this.centerLeft.ownsTarget(L)?this.centerLeft:this.centerRight.ownsTarget(L)?this.centerRight:this.bottomLeft.ownsTarget(L)?this.bottomLeft:this.bottomCenter.ownsTarget(L)?this.bottomCenter:this.bottomRight.ownsTarget(L)?this.bottomRight:void 0},Q}(),rt=function(){function Q(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Q}(),dt=function(){function Q(){}return Q.toITransformMatrix=function(L){return{a:L.a,b:L.b,c:L.c,d:L.d,e:L.e,f:L.f}},Q.toSVGMatrix=function(L,k){return L.a=k.a,L.b=k.b,L.c=k.c,L.d=k.d,L.e=k.e,L.f=k.f,L},Q}(),pt=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.left=0,J.top=0,J.width=0,J.height=0,J.defaultSize={x:50,y:20},J.offsetX=0,J.offsetY=0,J.rotationAngle=0,J.CB_DISTANCE=10,J._suppressMarkerCreateEvent=!1,J.container.transform.baseVal.appendItem(fe.createTransform()),J.setupControlBox(),J}return Re(L,Q),Object.defineProperty(L.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var G=fe.createTransform();this._visual.transform.baseVal.appendItem(G)},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(k){return!!Q.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var te=this.unrotatePoint(k);if(this.manipulationStartX=te.x,this.manipulationStartY=te.y,this.offsetX=te.x-this.left,this.offsetY=te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(G),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(G)){this.activeGrip=this.rotatorGrip;var J=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=J.x-this.width/2,this.top=J.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},L.prototype.pointerUp=function(k){var G=this.state;Q.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",G==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},L.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},L.prototype.manipulate=function(k){var G=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(G.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(G.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(G):this.state==="rotate"&&this.rotate(k)},L.prototype.resize=function(k){var G=this.manipulationStartLeft,te=this.manipulationStartWidth,J=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:G=this.manipulationStartLeft+k.x-this.manipulationStartX,te=this.manipulationStartWidth+this.manipulationStartLeft-G;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:te=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:J=this.manipulationStartTop+k.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-J;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+k.y-this.manipulationStartY}te>=0?(this.left=G,this.width=te):(this.left=G+te,this.width=-te),Ie>=0?(this.top=J,this.height=Ie):(this.top=J+Ie,this.height=-Ie),this.setSize()},L.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},L.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var G=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*G,this.applyRotation()}},L.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},L.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var G=this.container.getCTM(),te=fe.createPoint(k.x,k.y);return{x:(te=te.matrixTransform(G)).x,y:te.y}},L.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var G=this.container.getCTM();G=G.inverse();var te=fe.createPoint(k.x,k.y);return{x:(te=te.matrixTransform(G)).x,y:te.y}},L.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var k=fe.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=fe.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=fe.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 Me,this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,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()},L.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()},L.prototype.createGrip=function(){var k=new rt;return k.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,G=-k/2,te=G,J=(this.width+this.CB_DISTANCE)/2-k/2,Ie=(this.height+this.CB_DISTANCE)/2-k/2,at=this.height+this.CB_DISTANCE-k/2,St=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,G,te),this.positionGrip(this.controlGrips.topCenter.visual,J,te),this.positionGrip(this.controlGrips.topRight.visual,St,te),this.positionGrip(this.controlGrips.centerLeft.visual,G,Ie),this.positionGrip(this.controlGrips.centerRight.visual,St,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,G,at),this.positionGrip(this.controlGrips.bottomCenter.visual,J,at),this.positionGrip(this.controlGrips.bottomRight.visual,St,at),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,J,te-3*this.CB_DISTANCE)},L.prototype.positionGrip=function(k,G,te){var J=k.transform.baseVal.getItem(0);J.setTranslate(G,te),k.transform.baseVal.replaceItem(J,0)},L.prototype.hideControlBox=function(){this.controlBox.style.display="none"},L.prototype.showControlBox=function(){this.controlBox.style.display=""},L.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:dt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:dt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var G=k;this.left=G.left,this.top=G.top,this.width=G.width,this.height=G.height,this.rotationAngle=G.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(dt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,G.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(dt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,G.containerTransformMatrix))},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G);var te=this.rotatePoint({x:this.left,y:this.top}),J=this.unrotatePoint({x:te.x*k,y:te.y*G});this.left=J.x,this.top=J.y,this.width=this.width*k,this.height=this.height*G,this.adjustControlBox()},L}(Oe),ut=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.fillColor="transparent",J.strokeColor="transparent",J.strokeWidth=0,J.strokeDasharray="",J.opacity=1,J.setStrokeColor=J.setStrokeColor.bind(J),J.setFillColor=J.setFillColor.bind(J),J.setStrokeWidth=J.setStrokeWidth.bind(J),J.setStrokeDasharray=J.setStrokeDasharray.bind(J),J.createVisual=J.createVisual.bind(J),J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual)},L.prototype.createVisual=function(){this.visual=fe.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)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.setSize()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){Q.prototype.pointerUp.call(this,k),this.setSize()},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},L.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){var G=k;this.fillColor=G.fillColor,this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.opacity=G.opacity,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.setSize()},L.title="Rectangle marker",L}(pt),_t=function(Q){function L(k,G,te,J){var Ie=Q.call(this,k,J||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ie.widths=[],Ie.widthBoxes=[],Ie.widths=G,Ie.currentWidth=te,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",this.widths.forEach(function(te){var J=document.createElement("div");J.style.display="flex",J.style.flexGrow="2",J.style.alignItems="center",J.style.justifyContent="space-between",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.borderColor=te===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){k.setCurrentWidth(te,J)}),G.appendChild(J);var Ie=document.createElement("div");Ie.innerText=te.toString(),Ie.style.marginRight="5px",J.appendChild(Ie);var at=document.createElement("div");at.style.minHeight="20px",at.style.flexGrow="2",at.style.display="flex",at.style.alignItems="center";var St=document.createElement("hr");St.style.minWidth="20px",St.style.border="0px",St.style.borderTop=te+"px solid "+k.uiStyleSettings.toolboxColor,St.style.flexGrow="2",at.appendChild(St),J.appendChild(at),k.widthBoxes.push(J)}),G},L.prototype.setCurrentWidth=function(k,G){var te=this;this.currentWidth=k,this.widthBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},L}(ue),Tt=function(Q){function L(k,G,te,J){var Ie=Q.call(this,k,J||'<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 Ie.styles=[],Ie.styleBoxes=[],Ie.styles=G,Ie.currentStyle=te,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",this.styles.forEach(function(te){var J=document.createElement("div");J.style.display="flex",J.style.alignItems="center",J.style.justifyContent="space-between",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.overflow="hidden",J.style.maxWidth=100/k.styles.length-5+"%",J.style.borderColor=te===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){k.setCurrentStyle(te,J)}),G.appendChild(J);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var at=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+k.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(te!==""?'stroke-dasharray="'+te+'"':"")+` />
</svg>`;Ie.innerHTML=at,J.appendChild(Ie),k.styleBoxes.push(J)}),G},L.prototype.setCurrentStyle=function(k,G){var te=this;this.currentStyle=k,this.styleBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},L}(ue),Pe=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.strokeColor=te.defaultColor,J.strokeWidth=te.defaultStrokeWidth,J.strokeDasharray=te.defaultStrokeDasharray,J.strokePanel=new _e("Line color",te.defaultColorSet,te.defaultColor),J.strokePanel.onColorChanged=J.setStrokeColor,J.strokeWidthPanel=new _t("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),J.strokeWidthPanel.onWidthChanged=J.setStrokeWidth,J.strokeStylePanel=new Tt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),J.strokeStylePanel.onStyleChanged=J.setStrokeDasharray,J}return Re(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="FrameMarker",L.title="Frame marker",L.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',L}(ut),Ce=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},tt=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.x1=0,J.y1=0,J.x2=0,J.y2=0,J.defaultLength=50,J.manipulationStartX=0,J.manipulationStartY=0,J.manipulationStartX1=0,J.manipulationStartY1=0,J.manipulationStartX2=0,J.manipulationStartY2=0,J.setupControlBox(),J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!!Q.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.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(G)?this.activeGrip=this.grip1:this.grip2.ownsTarget(G)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},L.prototype.pointerUp=function(k){var G=this.state;Q.prototype.pointerUp.call(this,k),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(k),this._state="select",G==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},L.prototype.adjustVisual=function(){},L.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},L.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},L.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},L.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},L.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},L.prototype.adjustControlBox=function(){this.positionGrips()},L.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},L.prototype.createGrip=function(){var k=new rt;return k.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(k.visual),k},L.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},L.prototype.positionGrip=function(k,G,te){var J=k.transform.baseVal.getItem(0);J.setTranslate(G,te),k.transform.baseVal.replaceItem(J,0)},L.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Q.prototype.getState.call(this))},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var G=k;this.x1=G.x1,this.y1=G.y1,this.x2=G.x2,this.y2=G.y2},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.x1=this.x1*k,this.y1=this.y1*G,this.x2=this.x2*k,this.y2=this.y2*G,this.adjustVisual(),this.adjustControlBox()},L}(Oe),lt=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.strokeColor="transparent",J.strokeWidth=0,J.strokeDasharray="",J.setStrokeColor=J.setStrokeColor.bind(J),J.setStrokeWidth=J.setStrokeWidth.bind(J),J.setStrokeDasharray=J.setStrokeDasharray.bind(J),J.strokeColor=te.defaultColor,J.strokeWidth=te.defaultStrokeWidth,J.strokeDasharray=te.defaultStrokeDasharray,J.strokePanel=new _e("Line color",te.defaultColorSet,te.defaultColor),J.strokePanel.onColorChanged=J.setStrokeColor,J.strokeWidthPanel=new _t("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),J.strokeWidthPanel.onWidthChanged=J.setStrokeWidth,J.strokeStylePanel=new Tt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),J.strokeStylePanel.onStyleChanged=J.setStrokeDasharray,J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},L.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.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)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},L.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()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var G=k;this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.createVisual(),this.adjustVisual()},L.typeName="LineMarker",L.title="Line marker",L.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',L}(tt),Ke=function(Q){function L(k,G,te,J){var Ie=Q.call(this,k,J||'<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 Ie.fonts=[],Ie.fontBoxes=[],Ie.fonts=G,Ie.currentFont=te,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");return G.style.overflow="hidden",G.style.flexGrow="2",this.fonts.forEach(function(te){var J=document.createElement("div");J.style.display="inline-block",J.style.alignItems="center",J.style.justifyContent="space-between",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.overflow="hidden",J.style.maxWidth=100/k.fonts.length-5+"%",J.style.borderColor=te===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){k.setCurrentFont(te,J)}),G.appendChild(J);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=te,Ie.style.overflow="hidden";var at=document.createElement("div");at.style.whiteSpace="nowrap",at.style.overflow="hidden",at.style.textOverflow="ellipsis",at.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(at),J.appendChild(Ie),k.fontBoxes.push(J)}),G},L.prototype.setCurrentFont=function(k,G){var te=this;this.currentFont=k,this.fontBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},L}(ue),Xe=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.color="transparent",J.padding=5,J.DEFAULT_TEXT="your text here",J.text=J.DEFAULT_TEXT,J.isMoved=!1,J.color=te.defaultColor,J.fontFamily=te.defaultFontFamily,J.defaultSize={x:100,y:30},J.setColor=J.setColor.bind(J),J.setFont=J.setFont.bind(J),J.renderText=J.renderText.bind(J),J.sizeText=J.sizeText.bind(J),J.textEditDivClicked=J.textEditDivClicked.bind(J),J.showTextEditor=J.showTextEditor.bind(J),J.setSize=J.setSize.bind(J),J.positionTextEditor=J.positionTextEditor.bind(J),J.colorPanel=new _e("Color",te.defaultColorSet,te.defaultColor),J.colorPanel.onColorChanged=J.setColor,J.fontFamilyPanel=new Ke("Font",te.defaultFontFamilies,te.defaultFontFamily),J.fontFamilyPanel.onFontChanged=J.setFont,J}return Re(L,Q),L.prototype.ownsTarget=function(k){if(Q.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var G=!1;return this.textElement.childNodes.forEach(function(te){te===k&&(G=!0)}),G},L.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.renderText=function(){var k=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(G){k.textElement.appendChild(fe.createTSpan(G.trim()===""?" ":G.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},L.prototype.getTextScale=function(){var k=this.textElement.getBBox(),G=1;if(k.width>0&&k.height>0){var te=(1*this.width-this.width*this.padding*2/100)/k.width,J=(1*this.height-this.height*this.padding*2/100)/k.height;G=Math.min(te,J)}return G},L.prototype.getTextPosition=function(k){var G=this.textElement.getBBox(),te=0,J=0;return G.width>0&&G.height>0&&(te=(this.width-G.width*k)/2,J=this.height/2-G.height*k/2),{x:te,y:J}},L.prototype.sizeText=function(){var k=this.textElement.getBBox(),G=this.getTextScale(),te=this.getTextPosition(G);te.y-=k.y*G,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+te.x+"px, "+te.y+"px) scale("+G+", "+G+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(te.x,te.y),this.textElement.transform.baseVal.getItem(1).setScale(G,G))},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},L.prototype.pointerUp=function(k){var G=this.state;G==="creating"&&(this._suppressMarkerCreateEvent=!0),Q.prototype.pointerUp.call(this,k),this.setSize(),(G==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},L.prototype.showTextEditor=function(){var k=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(G){G.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var G=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&G>.9;)G-=.1,k.textEditor.style.fontSize=Math.max(G,.9)+"em"}),this.textEditor.addEventListener("keyup",function(G){G.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(G){if(G.clipboardData){var te=G.clipboardData.getData("text"),J=window.getSelection();if(!J.rangeCount)return!1;J.deleteFromDocument(),J.getRangeAt(0).insertNode(document.createTextNode(te)),G.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},L.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),G=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),te=this.textElement.getBBox(),J={x:te.width*k,y:te.height*k};G.x-=J.x/2,G.y-=J.y/2,this.textEditor.style.top=G.y+"px",this.textEditor.style.left=G.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-G.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},L.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},L.prototype.select=function(){Q.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},L.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Q.prototype.deselect.call(this)},L.prototype.dblClick=function(k,G){Q.prototype.dblClick.call(this,k,G),this.showTextEditor()},L.prototype.setColor=function(k){this.textElement&&fe.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},L.prototype.setFont=function(k){this.textElement&&fe.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},L.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},L.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var G=k;this.color=G.color,this.fontFamily=G.fontFamily,this.padding=G.padding,this.text=G.text,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.setSize(),this.sizeText(),this.positionTextEditor()},L.typeName="TextMarker",L.title="Text marker",L.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>',L}(pt),Se=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.color="transparent",J.lineWidth=3,J.drawing=!1,J.pixelRatio=1,J.color=te.defaultColor,J.lineWidth=te.defaultStrokeWidth,J.pixelRatio=te.freehandPixelRatio,J.setColor=J.setColor.bind(J),J.addCanvas=J.addCanvas.bind(J),J.finishCreation=J.finishCreation.bind(J),J.setLineWidth=J.setLineWidth.bind(J),J.colorPanel=new _e("Color",te.defaultColorSet,te.defaultColor),J.colorPanel.onColorChanged=J.setColor,J.lineWidthPanel=new _t("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),J.lineWidthPanel.onWidthChanged=J.setLineWidth,J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},L.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var k=fe.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},L.prototype.pointerDown=function(k,G){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(k.x,k.y),this.drawing=!0):Q.prototype.pointerDown.call(this,k,G)},L.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},L.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Q.prototype.pointerUp.call(this,k)},L.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)},L.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.select.call(this)},L.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.deselect.call(this)},L.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),G=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],te=G[0],J=G[1],Ie=G[2],at=G[3],St=!1,Ft=0;Ft<this.canvasElement.height;Ft++)for(var ye=0;ye<this.canvasElement.width;ye++)k.data[Ft*this.canvasElement.width*4+4*ye+3]>0&&(St=!0,Ft<J&&(J=Ft),ye<te&&(te=ye),Ft>at&&(at=Ft),ye>Ie&&(Ie=ye));if(St){this.left=te/this.pixelRatio,this.top=J/this.pixelRatio,this.width=(Ie-te)/this.pixelRatio,this.height=(at-J)/this.pixelRatio;var Ut=document.createElement("canvas");Ut.width=Ie-te,Ut.height=at-J,Ut.getContext("2d").putImageData(this.canvasContext.getImageData(te,J,Ie-te,at-J),0,0),this.drawingImgUrl=Ut.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},L.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},L.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},L.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){this.createVisual(),Q.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.setDrawingImage()},L.typeName="FreehandMarker",L.title="Freehand marker",L.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>',L}(pt),ge=function(Q){function L(k,G,te){var J=Q.call(this,k,te||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return J.typeBoxes=[],J.currentType=G,J.setCurrentType=J.setCurrentType.bind(J),J}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2";for(var te=function(at){var St="both";switch(at){case 0:St="both";break;case 1:St="start";break;case 2:St="end";break;case 3:St="none"}var Ft=document.createElement("div");if(Ft.style.display="flex",Ft.style.flexGrow="2",Ft.style.alignItems="center",Ft.style.justifyContent="space-between",Ft.style.padding="5px",Ft.style.borderWidth="2px",Ft.style.borderStyle="solid",Ft.style.borderColor=St===J.currentType?J.uiStyleSettings.toolboxAccentColor:"transparent",Ft.addEventListener("click",function(){k.setCurrentType(St,Ft)}),G.appendChild(Ft),St==="both"||St==="start"){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.minHeight="20px",ye.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="`+(J.uiStyleSettings!==void 0?J.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ye.style.marginLeft="5px",Ft.appendChild(ye)}var Ut=document.createElement("div");Ut.style.display="flex",Ut.style.alignItems="center",Ut.style.minHeight="20px",Ut.style.flexGrow="2";var $t=document.createElement("hr");if($t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop="3px solid "+(J.uiStyleSettings!==void 0?J.uiStyleSettings.toolboxColor:"#eeeeee"),$t.style.flexGrow="2",Ut.appendChild($t),Ft.appendChild(Ut),St==="both"||St==="end"){var Sn=document.createElement("div");Sn.style.display="flex",Sn.style.alignItems="center",Sn.style.minHeight="20px",Sn.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="`+(J.uiStyleSettings!==void 0?J.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Sn.style.marginRight="5px",Ft.appendChild(Sn)}J.typeBoxes.push(Ft)},J=this,Ie=0;Ie<4;Ie++)te(Ie);return G},L.prototype.setCurrentType=function(k,G){var te=this;this.currentType=k,this.typeBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},L}(ue),Ee=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.arrowType="end",J.arrowBaseHeight=10,J.arrowBaseWidth=10,J.getArrowPoints=J.getArrowPoints.bind(J),J.setArrowType=J.setArrowType.bind(J),J.arrowTypePanel=new ge("Arrow type","end"),J.arrowTypePanel.onArrowTypeChanged=J.setArrowType,J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},L.prototype.getArrowPoints=function(k,G){var te=this.arrowBaseWidth+2*this.strokeWidth,J=this.arrowBaseHeight+2*this.strokeWidth;return k-te/2+","+(G+J/2)+" "+k+","+(G-J/2)+" "+(k+te/2)+","+(G+J/2)},L.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(Q.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",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),G=this.arrow1.transform.baseVal.getItem(0);G.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(G,0);var te=this.arrow2.transform.baseVal.getItem(0);te.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(te,0)}},L.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var G=k;this.arrowType=G.arrowType,this.createTips(),this.adjustVisual()},L.typeName="ArrowMarker",L.title="Arrow marker",L.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',L}(lt),ie=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.fillColor=te.defaultFillColor,J.strokeWidth=0,J.fillPanel=new _e("Color",te.defaultColorSet,te.defaultFillColor),J.fillPanel.onColorChanged=J.setFillColor,J}return Re(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="CoverMarker",L.title="Cover marker",L.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',L}(ut),ae=function(Q){function L(k,G,te,J){var Ie=Q.call(this,k,J||'<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 Ie.opacities=[],Ie.opacityBoxes=[],Ie.opacities=G,Ie.currentOpacity=te,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return Re(L,Q),L.prototype.getUi=function(){var k=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",G.style.justifyContent="space-between",this.opacities.forEach(function(te){var J=document.createElement("div");J.style.display="flex",J.style.alignItems="center",J.style.justifyContent="center",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.borderColor=te===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){k.setCurrentOpacity(te,J)}),G.appendChild(J);var Ie=document.createElement("div");Ie.innerText=100*te+"%",J.appendChild(Ie),k.opacityBoxes.push(J)}),G},L.prototype.setCurrentOpacity=function(k,G){var te=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(J){J.style.borderColor=J===G?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},L}(ue),he=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.setOpacity=J.setOpacity.bind(J),J.fillColor=te.defaultHighlightColor,J.strokeWidth=0,J.opacity=te.defaultHighlightOpacity,J.fillPanel=new _e("Color",te.defaultColorSet,J.fillColor),J.fillPanel.onColorChanged=J.setFillColor,J.opacityPanel=new ae("Opacity",te.defaultOpacitySteps,J.opacity),J.opacityPanel.onOpacityChanged=J.setOpacity,J}return Re(L,Q),L.prototype.setOpacity=function(k){this.opacity=k,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="HighlightMarker",L.title="Highlight marker",L.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>',L}(ie),ve='<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>',Te=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.bgColor="transparent",J.tipPosition={x:0,y:0},J.tipBase1Position={x:0,y:0},J.tipBase2Position={x:0,y:0},J.tipMoving=!1,J.color=te.defaultStrokeColor,J.bgColor=te.defaultFillColor,J.fontFamily=te.defaultFontFamily,J.defaultSize={x:100,y:30},J.setBgColor=J.setBgColor.bind(J),J.getTipPoints=J.getTipPoints.bind(J),J.positionTip=J.positionTip.bind(J),J.setTipPoints=J.setTipPoints.bind(J),J.colorPanel=new _e("Text color",te.defaultColorSet,J.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>'),J.colorPanel.onColorChanged=J.setColor,J.bgColorPanel=new _e("Fill color",te.defaultColorSet,J.bgColor,ve),J.bgColorPanel.onColorChanged=J.setBgColor,J.fontFamilyPanel=new Ke("Font",te.defaultFontFamilies,te.defaultFontFamily),J.fontFamilyPanel.onFontChanged=J.setFont,J.tipGrip=new rt,J.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),J.controlBox.appendChild(J.tipGrip.visual),J}return Re(L,Q),L.prototype.ownsTarget=function(k){return Q.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},L.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},L.prototype.pointerDown=function(k,G){this.state==="new"&&Q.prototype.pointerDown.call(this,k,G),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(G)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Q.prototype.pointerDown.call(this,k,G)},L.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Q.prototype.pointerUp.call(this,k);else{var G=this.state==="creating";Q.prototype.pointerUp.call(this,k),this.setTipPoints(G),this.positionTip()}},L.prototype.manipulate=function(k){if(this.tipMoving){var G=this.unrotatePoint(k);this.tipPosition={x:G.x-this.manipulationStartLeft,y:G.y-this.manipulationStartTop},this.positionTip()}else Q.prototype.manipulate.call(this,k)},L.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",k]]),fe.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},L.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},L.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var G=Math.min(this.height/2,15),te=this.height/5;k&&(this.tipPosition={x:G+te/2,y:this.height+20});var J=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?J<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(te=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:G,y:0},this.tipBase2Position={x:G+te,y:0}):(this.tipBase1Position={x:0,y:G},this.tipBase2Position={x:0,y:G+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?J<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(te=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-G-te,y:0},this.tipBase2Position={x:this.width-G,y:0}):(this.tipBase1Position={x:this.width,y:G},this.tipBase2Position={x:this.width,y:G+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?J<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(te=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-G-te,y:this.height},this.tipBase2Position={x:this.width-G,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-G-te},this.tipBase2Position={x:this.width,y:this.height-G}):J<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(te=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:G,y:this.height},this.tipBase2Position={x:G+te,y:this.height}):(this.tipBase1Position={x:0,y:this.height-G},this.tipBase2Position={x:0,y:this.height-G-te})},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.positionTip()},L.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var k=this.tipGrip.visual.transform.baseVal.getItem(0);k.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(k,0)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),L.prototype.select=function(){this.positionTip(),Q.prototype.select.call(this)},L.prototype.getState=function(){var k=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var G=k;this.bgColor=G.bgColor,this.tipPosition=G.tipPosition,Q.prototype.restoreState.call(this,k),this.createTip(),this.setTipPoints()},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.tipPosition={x:this.tipPosition.x*k,y:this.tipPosition.y*G},this.positionTip()},L.typeName="CalloutMarker",L.title="Callout marker",L.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>',L}(Xe),Ge=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.fillColor="transparent",J.strokeColor="transparent",J.strokeWidth=0,J.strokeDasharray="",J.opacity=1,J.strokeColor=te.defaultColor,J.strokeWidth=te.defaultStrokeWidth,J.strokeDasharray=te.defaultStrokeDasharray,J.fillColor=te.defaultFillColor,J.setStrokeColor=J.setStrokeColor.bind(J),J.setFillColor=J.setFillColor.bind(J),J.setStrokeWidth=J.setStrokeWidth.bind(J),J.setStrokeDasharray=J.setStrokeDasharray.bind(J),J.setOpacity=J.setOpacity.bind(J),J.createVisual=J.createVisual.bind(J),J.strokePanel=new _e("Line color",me(te.defaultColorSet,["transparent"]),te.defaultColor),J.strokePanel.onColorChanged=J.setStrokeColor,J.fillPanel=new _e("Fill color",me(te.defaultColorSet,["transparent"]),J.fillColor,ve),J.fillPanel.onColorChanged=J.setFillColor,J.strokeWidthPanel=new _t("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),J.strokeWidthPanel.onWidthChanged=J.setStrokeWidth,J.strokeStylePanel=new Tt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),J.strokeStylePanel.onStyleChanged=J.setStrokeDasharray,J.opacityPanel=new ae("Opacity",te.defaultOpacitySteps,J.opacity),J.opacityPanel.onOpacityChanged=J.setOpacity,J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual)},L.prototype.createVisual=function(){this.visual=fe.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)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},L.prototype.manipulate=function(k){Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){Q.prototype.resize.call(this,k),this.setSize()},L.prototype.setSize=function(){Q.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},L.prototype.pointerUp=function(k){Q.prototype.pointerUp.call(this,k),this.setSize()},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},L.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(k),this.stateChanged()},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},L.prototype.setOpacity=function(k){this.opacity=k,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){var G=k;this.fillColor=G.fillColor,this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.opacity=G.opacity,this.createVisual(),Q.prototype.restoreState.call(this,k),this.setSize()},L.prototype.scale=function(k,G){Q.prototype.scale.call(this,k,G),this.setSize()},L.typeName="EllipseMarker",L.title="Ellipse marker",L.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>',L}(pt),ot=function(Q){function L(k,G,te){return Q.call(this,k,G,te)||this}return Re(L,Q),Object.defineProperty(L.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.tip1&&k!==this.tip2)},L.prototype.createTips=function(){this.tip1=fe.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(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.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(fe.createTransform()),this.visual.appendChild(this.tip2)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.state==="creating"&&this.createTips()},L.prototype.adjustVisual=function(){if(Q.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.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()]]),fe.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 k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),G=this.tip1.transform.baseVal.getItem(0);G.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(G,0);var te=this.tip2.transform.baseVal.getItem(0);te.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(te,0)}},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},L.typeName="MeasurementMarker",L.title="Measurement marker",L.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>',L}(lt),xt=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.strokePanel.colors=te.defaultColorSet,J.fillColor="transparent",J}return Re(L,Q),Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Q.prototype.getState.call(this);return k.typeName=L.typeName,k},L.typeName="EllipseFrameMarker",L.title="Ellipse frame marker",L.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>',L}(Ge),Ot=function(){function Q(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Q.prototype.addUndoStep=function(L){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(L)||(this.undoStack.push(L),JSON.stringify(this.lastRedoStep)!==JSON.stringify(L)&&this.redoStack.splice(0,this.redoStack.length))},Q.prototype.replaceLastUndoStep=function(L){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=L)},Q.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Q.prototype.undo=function(){if(this.undoStack.length>1){var L=this.undoStack.pop();return L!==void 0&&this.redoStack.push(L),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Q.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Q}(),wt=function(Q){function L(k,G,te){var J=Q.call(this,k,G,te)||this;return J.strokeColor="transparent",J.strokeWidth=0,J.strokeDasharray="",J.curveX=0,J.curveY=0,J.manipulationStartCurveX=0,J.manipulationStartCurveY=0,J.setStrokeColor=J.setStrokeColor.bind(J),J.setStrokeWidth=J.setStrokeWidth.bind(J),J.setStrokeDasharray=J.setStrokeDasharray.bind(J),J.positionGrips=J.positionGrips.bind(J),J.addControlGrips=J.addControlGrips.bind(J),J.adjustVisual=J.adjustVisual.bind(J),J.setupControlBox=J.setupControlBox.bind(J),J.resize=J.resize.bind(J),J.strokeColor=te.defaultColor,J.strokeWidth=te.defaultStrokeWidth,J.strokeDasharray=te.defaultStrokeDasharray,J.strokePanel=new _e("Line color",te.defaultColorSet,te.defaultColor),J.strokePanel.onColorChanged=J.setStrokeColor,J.strokeWidthPanel=new _t("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),J.strokeWidthPanel.onWidthChanged=J.setStrokeWidth,J.strokeStylePanel=new Tt("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),J.strokeStylePanel.onStyleChanged=J.setStrokeDasharray,J}return Re(L,Q),L.prototype.ownsTarget=function(k){return!(!Q.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},L.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},L.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.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)},L.prototype.pointerDown=function(k,G){Q.prototype.pointerDown.call(this,k,G),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(G)&&(this.activeGrip=this.curveGrip,this._state="resize")},L.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},L.prototype.setupControlBox=function(){Q.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.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)},L.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Q.prototype.addControlGrips.call(this)},L.prototype.positionGrips=function(){Q.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/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()))},L.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),Q.prototype.manipulate.call(this,k)},L.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),Q.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},L.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},L.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},L.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},L.prototype.scale=function(k,G){this.curveX=this.curveX*k,this.curveY=this.curveY*G,Q.prototype.scale.call(this,k,G)},Object.defineProperty(L.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),L.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Q.prototype.getState.call(this));return k.typeName=L.typeName,k},L.prototype.restoreState=function(k){Q.prototype.restoreState.call(this,k);var G=k;this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.curveX=G.curveX,this.curveY=G.curveY,this.createVisual(),this.adjustVisual()},L.typeName="CurveMarker",L.title="Curve marker",L.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>',L}(tt),vt=function(){function Q(L,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=L,this.cancelable=k}return Object.defineProperty(Q.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Q.prototype.preventDefault=function(){this._defaultPrevented=!0},Q}(),qe=function(Q){function L(k,G,te){var J=Q.call(this,k,!1)||this;return J.dataUrl=G,J.state=te,J}return Re(L,Q),L}(vt),Qe=function(Q){function L(k,G,te){te===void 0&&(te=!1);var J=Q.call(this,k,te)||this;return J.marker=G,J}return Re(L,Q),L}(vt),Ue=function(){function Q(){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 Q.prototype.addEventListener=function(L,k){this[L].push(k)},Q.prototype.removeEventListener=function(L,k){var G=this[L].indexOf(k);G>-1&&this[L].splice(G,1)},Q}(),le=function(){function Q(L){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new Ot,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 Ue,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Q.instanceCounter++,this.styles=new Ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=L,this.targetRoot=document.body,this.width=L.clientWidth,this.height=L.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(Q.prototype,"ALL_MARKER_TYPES",{get:function(){return[Pe,Se,Ee,Xe,xt,Ge,he,Te,ot,ie,lt,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Pe,Se,Ee,Xe,Ge,he,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Pe,Se,Ee,Xe,he]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(L){var k=this;this._availableMarkerTypes.splice(0),L.forEach(function(G){if(typeof G=="string"){var te=k.ALL_MARKER_TYPES.find(function(J){return J.typeName===G});te!==void 0&&k._availableMarkerTypes.push(te)}else k._availableMarkerTypes.push(G)})},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(L){this._zoomLevel=L,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Q.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Q.prototype.show=function(){var L=this;this.styles.styleSheetRoot===void 0&&ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new vt(L))})},Q.prototype.render=function(){return Le(this,void 0,void 0,function(){var L;return Fe(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(L=new xe).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.markersOnly=this.renderMarkersOnly,L.width=this.renderWidth,L.height=this.renderHeight,[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,L.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},Q.prototype.close=function(L){var k=this;if(L===void 0&&(L=!1),this.isOpen){var G=!1;L||this.eventListeners.beforeclose.forEach(function(te){var J=new vt(k,!0);te(J),J.defaultPrevented&&(G=!0)}),G||(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(te){return te(new vt(k))}),this.detachEvents(),this._isOpen=!1)}},Q.prototype.addMarkersToToolbar=function(){for(var L,k=[],G=0;G<arguments.length;G++)k[G]=arguments[G];(L=this._availableMarkerTypes).push.apply(L,k)},Q.prototype.addRenderEventListener=function(L){this.addEventListener("render",function(k){L(k.dataUrl,k.state)})},Q.prototype.removeRenderEventListener=function(L){},Q.prototype.addCloseEventListener=function(L){this.addEventListener("close",function(){L()})},Q.prototype.removeCloseEventListener=function(L){},Q.prototype.setupResizeObserver=function(){var L=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return L.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Q.prototype.onPopupTargetResize=function(){var L=1*this.target.clientWidth/this.target.clientHeight,k=this.editorCanvas.clientWidth/L>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*L:this.editorCanvas.clientWidth,G=k<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/L;this.resize(k,G)},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.prototype.resize=function(L,k){this._isResizing=!0;var G=L/this.imageWidth,te=k/this.imageHeight;this.imageWidth=Math.round(L),this.imageHeight=Math.round(k),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(G,te),this._isResizing=!1},Q.prototype.scaleMarkers=function(L,k){var G,te=this;this._currentMarker&&this._currentMarker instanceof Xe?this._currentMarker.scale(L,k):(G=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(J){J!==te._currentMarker&&J.scale(L,k)}),G!==void 0&&this.setCurrentMarker(G)},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"},Q.prototype.setTopLeft=function(){var L=this.editingTarget.getBoundingClientRect(),k=this.editorCanvas.getBoundingClientRect();this.left=L.left-k.left,this.top=L.top-k.top},Q.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)},Q.prototype.addDefs=function(){for(var L,k=[],G=0;G<arguments.length;G++)k[G]=arguments[G];this.defs=fe.createDefs(),this.addDefsToImage(),(L=this.defs).append.apply(L,k)},Q.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Q.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)},Q.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Q.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Q.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)},Q.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Q.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)},Q.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 L=document.createElement("a");L.href="https://markerjs.com/",L.target="_blank",L.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>',L.title="Powered by marker.js",L.style.display="grid",L.style.alignItems="center",L.style.justifyItems="center",L.style.padding="3px",L.style.width="20px",L.style.height="20px",this.logoUI.appendChild(L),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Q.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")},Q.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"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.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 L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"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 Ye(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 et(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Q.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.removeMarker=function(L){this.markerImage.removeChild(L.container),this.markers.indexOf(L)>-1&&this.markers.splice(this.markers.indexOf(L),1),L.dispose()},Q.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())},Q.prototype.toolbarButtonClicked=function(L,k){if(L==="marker"&&k!==void 0)this.createNewMarker(k);else if(L==="action")switch(k){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()}},Q.prototype.deleteSelectedMarker=function(){var L=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(te){var J=new Qe(L,L._currentMarker,!0);te(J),J.defaultPrevented&&(k=!0)}),!k){var G=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(te){return te(new Qe(L,G))})}}},Q.prototype.clear=function(){var L=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var at=new Qe(L,void 0,!0);Ie(at),at.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var G=function(Ie){var at=te.markers[Ie];te.setCurrentMarker(te.markers[Ie]),te._currentMarker.dispose(),te.markerImage.removeChild(te._currentMarker.container),te.markers.splice(te.markers.indexOf(te._currentMarker),1),te.eventListeners.markerdelete.forEach(function(St){return St(new Qe(L,at))})},te=this,J=this.markers.length-1;J>=0;J--)G(J);this.addUndoStep()}},Object.defineProperty(Q.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Q.prototype.showNotesEditor=function(){var L;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=(L=this._currentMarker.notes)!==null&&L!==void 0?L:"",this.overlayContainer.appendChild(this.notesArea))},Q.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)},Q.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Q.prototype.addUndoStep=function(){var L=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),G=this.undoRedoManager.getLastUndoStep();if(!G||G.width===k.width&&G.height===k.height){var te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),te<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(J){return J(new vt(L))})}else this.undoRedoManager.replaceLastUndoStep(k),this.eventListeners.statechange.forEach(function(J){return J(new vt(L))})}},Q.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Q.prototype.undoStep=function(){var L=this,k=this.undoRedoManager.undo();k!==void 0&&(this.restoreState(k),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(G){return G(new vt(L))}))},Q.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Q.prototype.redoStep=function(){var L=this,k=this.undoRedoManager.redo();k!==void 0&&(this.restoreState(k),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(G){return G(new vt(L))}))},Q.prototype.stepZoom=function(){var L=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=L<this.zoomSteps.length-1?this.zoomSteps[L+1]:this.zoomSteps[0]},Q.prototype.panTo=function(L){this.contentDiv.scrollBy({left:this.prevPanPoint.x-L.x,top:this.prevPanPoint.y-L.y}),this.prevPanPoint=L},Q.prototype.startRenderAndClose=function(){return Le(this,void 0,void 0,function(){var L,k,G=this;return Fe(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return L=te.sent(),k=this.getState(),this.eventListeners.render.forEach(function(J){return J(new qe(G,L,k))}),this.close(!0),[2]}})})},Q.prototype.getState=function(L){L===!0&&this.setCurrentMarker();var k={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(G){return k.markers.push(G.getState())}),k},Q.prototype.restoreState=function(L){var k=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);L.markers.forEach(function(G){var te=k._availableMarkerTypes.find(function(Ie){return Ie.typeName===G.typeName});if(te!==void 0){var J=k.addNewMarker(te);J.restoreState(G),k.markers.push(J)}}),L.width&&L.height&&(L.width!==this.imageWidth||L.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/L.width,this.imageHeight/L.height),this.eventListeners.restorestate.forEach(function(G){return G(new vt(k))})},Q.prototype.addNewMarker=function(L){var k=fe.createGroup();return this.markerImage.appendChild(k),new L(k,this.overlayContainer,this.settings)},Q.prototype.createNewMarker=function(L){var k,G=this;(k=typeof L=="string"?this._availableMarkerTypes.find(function(te){return te.typeName===L}):L)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(k),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(k.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(te){return te(new Qe(G,G._currentMarker))}))},Q.prototype.markerCreated=function(L){var k=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(L),this.setCurrentMarker(L),L instanceof Se&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Se):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(G){return G(new Qe(k,k._currentMarker))})},Q.prototype.colorChanged=function(L){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=L,this.settings.defaultStrokeColor=L)},Q.prototype.fillColorChanged=function(L){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=L)},Q.prototype.markerStateChanged=function(L){var k=this;this.eventListeners.markerchange.forEach(function(G){return G(new Qe(k,L))})},Q.prototype.setCurrentMarker=function(L){var k=this;this._currentMarker!==L&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(G){return G(new Qe(k,k._currentMarker))})),this._currentMarker=L,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(G){return G(new Qe(k,k._currentMarker))}))},Q.prototype.onPointerDown=function(L){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||L.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var k=this.markers.find(function(G){return G.ownsTarget(L.target)});k!==void 0?(this.setCurrentMarker(k),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(L.clientX,L.clientY),L.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:L.clientX,y:L.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(L.clientX,L.clientY))},Q.prototype.onDblClick=function(L){if(this._isFocused||this.focus(),this.mode==="select"){var k=this.markers.find(function(G){return G.ownsTarget(L.target)});k!==void 0&&k!==this._currentMarker&&this.setCurrentMarker(k),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(L.clientX,L.clientY),L.target):this.setCurrentMarker()}},Q.prototype.onPointerMove=function(L){this.touchPoints!==1&&L.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||L.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(L.clientX,L.clientY)):this.zoomLevel>1&&this.panTo({x:L.clientX,y:L.clientY}))},Q.prototype.onPointerUp=function(L){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(L.clientX,L.clientY)),this.isDragging=!1,this.addUndoStep()},Q.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Q.prototype.onKeyUp=function(L){this._currentMarker===void 0||this.notesArea!==void 0||L.key!=="Delete"&&L.key!=="Backspace"||this.deleteSelectedMarker()},Q.prototype.clientToLocalCoordinates=function(L,k){var G=this.markerImage.getBoundingClientRect();return{x:(L-G.left)/this.zoomLevel,y:(k-G.top)/this.zoomLevel}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var L=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=L+"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()},Q.prototype.addLicenseKey=function(L){ne.addKey(L)},Q.prototype.addEventListener=function(L,k){this.eventListeners.addEventListener(L,k)},Q.prototype.removeEventListener=function(L,k){this.eventListeners.removeEventListener(L,k)},Q.prototype.renderState=function(L){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(L),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Q.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Q.prototype.focus=function(){var L=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new vt(L))}))},Q.prototype.blur=function(){var L=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new vt(L))}))},Q.instanceCounter=0,Q}();/* **********************************
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 pe=function(Q,L){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,G){k.__proto__=G}||function(k,G){for(var te in G)Object.prototype.hasOwnProperty.call(G,te)&&(k[te]=G[te])})(Q,L)};function $e(Q,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function k(){this.constructor=Q}pe(Q,L),Q.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}function je(Q,L,k,G){return new(k||(k=Promise))(function(te,J){function Ie(Ft){try{St(G.next(Ft))}catch(ye){J(ye)}}function at(Ft){try{St(G.throw(Ft))}catch(ye){J(ye)}}function St(Ft){var ye;Ft.done?te(Ft.value):(ye=Ft.value,ye instanceof k?ye:new k(function(Ut){Ut(ye)})).then(Ie,at)}St((G=G.apply(Q,L||[])).next())})}function Je(Q,L){var k,G,te,J,Ie={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return J={next:at(0),throw:at(1),return:at(2)},typeof Symbol=="function"&&(J[Symbol.iterator]=function(){return this}),J;function at(St){return function(Ft){return function(ye){if(k)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(k=1,G&&(te=2&ye[0]?G.return:ye[0]?G.throw||((te=G.return)&&te.call(G),0):G.next)&&!(te=te.call(G,ye[1])).done)return te;switch(G=0,te&&(ye=[2&ye[0],te.value]),ye[0]){case 0:case 1:te=ye;break;case 4:return Ie.label++,{value:ye[1],done:!1};case 5:Ie.label++,G=ye[1],ye=[0];continue;case 7:ye=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(te=Ie.trys,(te=te.length>0&&te[te.length-1])||ye[0]!==6&&ye[0]!==2)){Ie=0;continue}if(ye[0]===3&&(!te||ye[1]>te[0]&&ye[1]<te[3])){Ie.label=ye[1];break}if(ye[0]===6&&Ie.label<te[1]){Ie.label=te[1],te=ye;break}if(te&&Ie.label<te[2]){Ie.label=te[2],Ie.ops.push(ye);break}te[2]&&Ie.ops.pop(),Ie.trys.pop();continue}ye=L.call(Q,Ie)}catch(Ut){ye=[6,Ut],G=0}finally{k=te=0}if(5&ye[0])throw ye[1];return{value:ye[0]?ye[1]:void 0,done:!0}}([St,Ft])}}}var mt=function(){function Q(){}return Q.addKey=function(L){Q.key=L},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),We=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(L,k){for(var G=0,te=k;G<te.length;G++){var J=te[G],Ie=J[0],at=J[1];L.setAttribute(Ie,at)}},Q.createRect=function(L,k,G){var te=document.createElementNS("http://www.w3.org/2000/svg","rect");return te.setAttribute("width",L.toString()),te.setAttribute("height",k.toString()),G&&Q.setAttributes(te,G),te},Q.createLine=function(L,k,G,te,J){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",L.toString()),Ie.setAttribute("y1",k.toString()),Ie.setAttribute("x2",G.toString()),Ie.setAttribute("y2",te.toString()),J&&Q.setAttributes(Ie,J),Ie},Q.createPolygon=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","polygon");return G.setAttribute("points",L),k&&Q.setAttributes(G,k),G},Q.createCircle=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","circle");return G.setAttribute("cx",(L/2).toString()),G.setAttribute("cy",(L/2).toString()),G.setAttribute("r",L.toString()),k&&Q.setAttributes(G,k),G},Q.createEllipse=function(L,k,G){var te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return te.setAttribute("cx",(L/2).toString()),te.setAttribute("cy",(k/2).toString()),te.setAttribute("rx",(L/2).toString()),te.setAttribute("ry",(k/2).toString()),G&&Q.setAttributes(te,G),te},Q.createGroup=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","g");return L&&Q.setAttributes(k,L),k},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(L,k,G,te,J,Ie,at){var St=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(St,[["id",L],["orient",k],["markerWidth",G.toString()],["markerHeight",te.toString()],["refX",J.toString()],["refY",Ie.toString()]]),St.appendChild(at),St},Q.createText=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","text");return k.setAttribute("x","0"),k.setAttribute("y","0"),L&&Q.setAttributes(k,L),k},Q.createTSpan=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","tspan");return G.textContent=L,k&&Q.setAttributes(G,k),G},Q.createImage=function(L){var k=document.createElementNS("http://www.w3.org/2000/svg","image");return L&&Q.setAttributes(k,L),k},Q.createPoint=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return G.x=L,G.y=k,G},Q.createPath=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg","path");return G.setAttribute("d",L),k&&Q.setAttributes(G,k),G},Q.createElement=function(L,k){var G=document.createElementNS("http://www.w3.org/2000/svg",L);return k&&Q.setAttributes(G,k),G},Q.getHollowRectanglePath=function(L,k,G,te,J,Ie,at,St){return"M"+L+","+k+"V"+(k+te)+"H"+(L+G)+"V"+k+"H"+J+"V"+Ie+"H"+(J+at)+"V"+(Ie+St)+"H"+J+"V"+k+"Z"},Q}(),it=function(){function Q(L){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+L+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.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(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(L){return this.styleSheet===void 0&&this.addStyleSheet(),L.name=""+this.classNamePrefix+L.localName,this.classes.push(L),this.styleSheet.sheet.insertRule("."+L.name+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length),L},Q.prototype.addRule=function(L){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(L),this.styleSheet.sheet.insertRule(L.selector+" {"+L.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var L;this.styleSheet=document.createElement("style"),((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).appendChild(this.styleSheet),this.addRule(new st("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ct("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ct("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Q.prototype.removeStyleSheet=function(){var L;this.styleSheet&&(((L=this.styleSheetRoot)!==null&&L!==void 0?L:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),st=function(Q,L){this.selector=Q,this.style=L},ct=function(Q,L){this.localName=Q,this.style=L},bt=function(){function Q(){this.blocks=[],this.display=""}return Q.prototype.addButtonBlock=function(L){L.className=this.blockClassName,L.buttonClassName=this.buttonClassName,L.buttonColorsClassName=this.buttonColorsClassName,L.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(L)},Q.prototype.addElementBlock=function(L){L.className===void 0&&(L.className=this.blockClassName),this.blocks.push(L)},Q.prototype.getUI=function(){var L=document.createElement("div");return L.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,L.style.display=this.display,this.blocks.forEach(function(k){return L.appendChild(k.getUI())}),L},Q}(),jt=function(){function Q(){}return Q.prototype.getUI=function(){var L=document.createElement("div");if(L.className=this.className,this.minWidth!==void 0&&(L.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":L.style.justifyContent="flex-start";break;case"center":L.style.justifyContent="center";break;case"end":L.style.justifyContent="flex-end"}return L.style.whiteSpace="nowrap",L},Q}(),en=function(Q){function L(){var k=Q!==null&&Q.apply(this,arguments)||this;return k.buttons=[],k}return $e(L,Q),L.prototype.addButton=function(k){k.className=this.buttonClassName,k.colorsClassName=this.buttonColorsClassName,k.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(k)},L.prototype.getUI=function(){var k=Q.prototype.getUI.call(this);return this.buttons.forEach(function(G){return k.appendChild(G.getUI())}),k},L}(jt),Yt=function(){function Q(L,k){this._isActive=!1,this._isHidden=!1,this._icon=L,this.title=k,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Q.prototype,"icon",{get:function(){return this._icon},set:function(L){this._icon=L,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isActive",{get:function(){return this._isActive},set:function(L){this._isActive=L,this.adjustClassName()},enumerable:!1,configurable:!0}),Q.prototype.getUI=function(){var L=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 L.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Q.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,"")))},Q.prototype.hide=function(){this._isHidden=!0},Q}(),Ct=function(Q){function L(){var k=Q!==null&&Q.apply(this,arguments)||this;return k.elements=[],k}return $e(L,Q),L.prototype.addElement=function(k){this.elements.push(k)},L.prototype.getUI=function(){var k=Q.prototype.getUI.call(this);return this.elements.forEach(function(G){return k.appendChild(G)}),k},L}(jt),pn=function(){function Q(L,k){this.horizontal=L,this.vertical=k}return Object.defineProperty(Q.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Q.prototype.getVerticalLength=function(L){return L/this.ratio},Q.prototype.getHorizontalLength=function(L){return L*this.ratio},Q}(),Rt=function(){function Q(){}return Q.getIcon=function(L,k){if(L>0&&k>0){var G=new pn(L,k),te=G.ratio>=1?20:G.getHorizontalLength(20),J=G.ratio<1?20:G.getVerticalLength(20),Ie=document.createElementNS("http://www.w3.org/2000/svg","svg");Ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ie);var at=We.createDefs();Ie.appendChild(at);var St=We.createElement("clipPath",[["id","text-bg-clip"]]);at.appendChild(St);var Ft=We.createPath(We.getHollowRectanglePath((24-te)/2,(24-J)/2,te,J,(24-te)/2+2,(24-J)/2+2,te-4,J-4));Ie.appendChild(Ft);var ye=We.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ye.appendChild(We.createTSpan(L+":"+k)),Ie.appendChild(ye);var Ut=ye.getBBox();We.setAttributes(ye,[["x",((24-Ut.width)/2).toString()],["y",((24-Ut.height)/2-Ut.y).toString()]]);var $t=We.createPath(We.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ut.width))/2,(24-Math.ceil(Ut.height))/2,Math.ceil(Ut.width),Math.ceil(Ut.height)));return St.appendChild($t),We.setAttributes(Ft,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ie),Ie.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>'},Q}(),zt=function(Q){function L(k,G,te){var J=Q.call(this,k,G)||this;return J.isDropdownOpen=!1,J.onClick=J.dropdownButtonClicked,J.dropdownButtons=te,J}return $e(L,Q),L.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(G){G.className=k.className,G.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(G.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},L.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},L.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},L.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},L.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},L.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},L}(Yt),Pt=function(){function Q(L,k){this.GRIP_SIZE=10,this.color=L,this.fillColor=k,this.visual=We.createGroup(),this.visual.appendChild(We.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(We.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(L){return L===this.visual||L===this.visual.childNodes[0]||L===this.visual.childNodes[1]},Q.prototype.setCenter=function(L,k){this.visual.childNodes.forEach(function(G){return We.setAttributes(G,[["cx",L.toString()],["cy",k.toString()]])})},Q}(),qt=function(){function Q(L,k,G,te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=L,this.canvasHeight=k,this.margin=G,this.container=te,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(Q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(L){this._aspectRatio=L,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.gridContainer&&We.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(L){this._zoomFactor=L,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Q.prototype.open=function(){var L=this;this.cropShadeElement=We.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=We.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;k<this.numberOfGridLines;k++)this.horizontalGridLines.push(We.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(We.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(G){return L.gridContainer.appendChild(G)}),this.verticalGridLines.forEach(function(G){return L.gridContainer.appendChild(G)}),this.cropRectElement=We.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Pt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Pt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Pt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Pt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Q.prototype.setCropRectangle=function(L){this.cropRect=L;var k=Object.assign({},this.cropRect);this.zoomFactor!==1&&(k.width=this.cropRect.width*this.zoomFactor,k.height=this.cropRect.height*this.zoomFactor,k.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-k.width/2,k.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),We.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var G=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(J,Ie){var at=k.y+G*(Ie+1);We.setAttributes(J,[["x1",""+k.x],["y1",""+at],["x2",""+(k.x+k.width)],["y2",""+at]])});var te=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(J,Ie){var at=k.x+te*(Ie+1);We.setAttributes(J,[["x1",""+at],["y1",""+k.y],["x2",""+at],["y2",""+(k.y+k.height)]])}),We.setAttributes(this.cropShadeElement,[["d",We.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Q.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)},Q.prototype.clientToLocalCoordinates=function(L,k){var G=this.container.getBoundingClientRect();return{x:L-G.left+this.margin,y:k-G.top+this.margin}},Q.prototype.onPointerDown=function(L){this.container.setPointerCapture(L.pointerId),this.previousPoint=this.clientToLocalCoordinates(L.clientX,L.clientY),this.cropRectElement===L.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(L.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(L.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(L.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(L.target)&&(this.activeGrip=this.bottomRightGrip)},Q.prototype.onPointerMove=function(L){if(this.isMoving)this.move(this.clientToLocalCoordinates(L.clientX,L.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(L.clientX,L.clientY);this.resize(k)}L.preventDefault()},Q.prototype.onPointerUp=function(L){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(L.pointerId)},Q.prototype.move=function(L){var k=L.x-this.previousPoint.x,G=L.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,G=-G/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+G),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=L},Q.prototype.resize=function(L){var k=Object.assign({},this.cropRect),G=L.x-this.previousPoint.x,te=L.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+G<this.margin&&(G=this.margin-k.x),k.x+=G,k.width=this.cropRect.x+this.cropRect.width-k.x;break;case this.bottomRightGrip:case this.topRightGrip:k.width+G>this.canvasWidth*this.zoomFactor&&(G=this.canvasWidth*this.zoomFactor-k.width),k.width+=G}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(G),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=te,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=te}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=L,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var L=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,G=this.aspectRatio.getHorizontalLength(this.cropRect.height),te=this.aspectRatio.getVerticalLength(this.cropRect.width);G/this.canvasWidth<te/this.canvasHeight?this.cropRect.width=G:this.cropRect.height=te,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=L-this.cropRect.width/2,this.cropRect.y=k-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)}},Q.prototype.getRescaledRect=function(L,k,G,te,J,Ie){var at=G/L,St=te/k;return{x:(J.x-Ie)*at+Ie,y:(J.y-Ie)*St+Ie,width:J.width*at,height:J.height*St}},Q.prototype.scaleCanvas=function(L,k){var G=this.getRescaledRect(this.canvasWidth,this.canvasHeight,L,k,this.cropRect,this.margin);this.canvasWidth=L,this.canvasHeight=k,this.onCropChange&&this.onCropChange(G),this.setCropRectangle(G)},Q}(),yn=function(){function Q(L){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=L,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(Q.prototype,"angle",{get:function(){return this._angle},set:function(L){this._angle=L,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Q.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},Q.prototype.onPointerDown=function(L){this.controlContainer.setPointerCapture(L.pointerId),this.isDragging=!0,this.previousPoint={x:L.clientX,y:L.clientY}},Q.prototype.onPointerMove=function(L){this.isDragging&&(this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.previousPoint.x=L.clientX)},Q.prototype.onPointerUp=function(L){this.isDragging&&this.onAngleChange&&this.onAngleChange((L.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(L.pointerId)},Q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var L=this.angleLabelText.getBBox();We.setAttributes(this.angleLabelElement,[["x",((this.width-L.width)/2).toString()],["y",(this.height/2).toString()]])}},Q.prototype.positionScaleShape=function(){if(this.scaleShape){var L=this.scaleShape.transform.baseVal.getItem(0);L.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(L,0)}},Q.prototype.getVisual=function(){var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.setAttribute("xmlns","http://www.w3.org/2000/svg"),L.setAttribute("width",this.width+"px"),L.setAttribute("height",this.height+"px"),L.setAttribute("viewBox","0 0 "+this.width+" "+this.height),L.style.flexShrink="0",document.body.appendChild(L);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,G=1;G<=this.width/5+10;G++){var te=G%5==0?this.height/3:this.height/6;k+="h4v"+-te+"h1v"+te}k+="v1H0Z",this.scaleShape=We.createPath(k);var J=We.createTransform();this.scaleShape.transform.baseVal.appendItem(J),L.appendChild(this.scaleShape),this.angleLabelElement=We.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=We.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ie=We.createTSpan("");return Ie.innerHTML="&deg;",this.angleLabelElement.appendChild(Ie),L.appendChild(this.angleLabelElement),document.body.removeChild(L),L},Q}(),wn=function(){function Q(){this.naturalSize=!1,this.imageType="image/png"}return Q.prototype.rasterize=function(L,k,G,te,J,Ie,at){var St=this;return new Promise(function(Ft){var ye=document.createElement("canvas");ye.width=L.width.baseVal.value-2*te,ye.height=L.height.baseVal.value-2*te;var Ut=1,$t=1;St.naturalSize===!0?(Ut=k.naturalWidth/(L.width.baseVal.value-2*te)/Ie,$t=k.naturalHeight/(L.height.baseVal.value-2*te)/at,ye.width=k.naturalWidth/Ie,ye.height=k.naturalHeight/at):St.width!==void 0&&St.height!==void 0&&(Ut=St.width/G.width,$t=St.height/G.height,ye.width*=Ut,ye.height*=$t);var Sn=ye.getContext("2d");Sn.translate(ye.width/2,ye.height/2),Sn.rotate(J*Math.PI/180),Sn.scale(Ie,at),Sn.translate(-ye.width/2,-ye.height/2),Sn.drawImage(k,0,0,ye.width,ye.height);var Hn=document.createElement("canvas");Hn.width=G.width*Ut,Hn.height=G.height*$t,Hn.getContext("2d").putImageData(Sn.getImageData((G.x-te)*Ut,(G.y-te)*$t,G.width*Ut,G.height*$t),0,0),Ft(Hn.toDataURL(St.imageType,St.imageQuality))})},Q}(),yt=function(){function Q(L){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=Q.instanceCounter++,this.styles=new it(this.instanceNo),this.target=L,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(L){this._zoomToCropEnabled=L,L?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(L){this._isGridVisible=L,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(L){this._gridLines=L,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(L){this._rotationAngle=L,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"aspectRatio",{get:function(){var L;return(L=this._aspectRatio)!==null&&L!==void 0?L:this.aspectRatios[0]},set:function(L){this._aspectRatio=L},enumerable:!1,configurable:!0}),Q.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},Q.prototype.show=function(){this.showUI(),this.open()},Q.prototype.close=function(L){L===void 0&&(L=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),L||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},Q.prototype.addRenderEventListener=function(L){this.renderEventListeners.push(L)},Q.prototype.removeRenderEventListener=function(L){this.renderEventListeners.indexOf(L)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(L),1)},Q.prototype.addCloseEventListener=function(L){this.closeEventListeners.push(L)},Q.prototype.removeCloseEventListener=function(L){this.closeEventListeners.indexOf(L)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(L),1)},Q.prototype.setupResizeObserver=function(){var L=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){L.resize(L.target.clientWidth,L.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))},Q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var L=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/L>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*L:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,G=k+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/L;this.resize(k,G)}},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.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",We.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Q.prototype.resize=function(L,k){this.imageWidth=Math.round(L),this.imageHeight=Math.round(k),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()},Q.prototype.setEditingTarget=function(){var L=document.createElement("canvas");L.width=this.target.naturalWidth,L.height=this.target.naturalHeight,L.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var k=L.toDataURL();We.setAttributes(this.editingTarget,[["href",k]]),this.setEditingTargetSize()},Q.prototype.setTopLeft=function(){var L=this.target.getBoundingClientRect(),k=this.editorCanvas.getBoundingClientRect();this.left=L.left-k.left-this.CANVAS_MARGIN,this.top=L.top-k.top-this.CANVAS_MARGIN},Q.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=We.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=We.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=We.createGroup(),this.editingTargetRotationScaleContainer=We.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var L=We.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(L);var k=We.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(k),this.editingTargetContainer=We.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)},Q.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Q.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=We.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new qt(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()},Q.prototype.zoomToCrop=function(){if(this.cropRect){var L=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,k=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=L+"px "+k+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-L+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-k+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Q.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)},Q.prototype.cropRectChanged=function(L){this.cropRect=L,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Q.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},Q.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"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.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 L=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,k=this.target.offsetTop>L+this.CANVAS_MARGIN?this.target.offsetTop-(L+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"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},Q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Q.prototype.addTopToolbar=function(){var L=this;this.topToolbar=new bt,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 k=new en;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var G=[];this.aspectRatios.forEach(function($t){var Sn=new Yt(Rt.getIcon($t.horizontal,$t.vertical),$t.horizontal===0&&$t.vertical===0?"FREE":$t.horizontal+":"+$t.vertical);Sn.onClick=function(){return L.ratioButtonClicked($t)},G.push(Sn)}),this.aspectRatioButton=new zt(Rt.getIcon(0,0),"Aspect ratio",G),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var te=new Yt('<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");te.isActive=this.isGridVisible,te.onClick=function(){L.isGridVisible=!L.isGridVisible,te.isActive=L.isGridVisible},k.addButton(te);var J=new Yt('<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(J.isActive=this.zoomToCropEnabled,J.onClick=function(){L.zoomToCropEnabled=!L.zoomToCropEnabled,J.isActive=L.zoomToCropEnabled},k.addButton(J),!mt.isLicensed){var Ie=new Ct;this.topToolbar.addElementBlock(Ie);var at=document.createElement("div");at.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var St=document.createElement("a");St.style.color="currentColor",St.href="https://markerjs.com/products/cropro",St.target="_blank",St.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>',at.appendChild(St),Ie.addElement(at)}var Ft=new en;Ft.minWidth=3*this.toolbarHeight+"px",Ft.contentAlign="end",this.topToolbar.addButtonBlock(Ft);var ye=new Yt('<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");ye.onClick=this.startRenderAndClose,Ft.addButton(ye),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ye.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ut=new Yt('<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");Ut.onClick=this.close,Ft.addButton(Ut),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ut.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Q.prototype.addBottomToolbar=function(){var L=this;this.bottomToolbar=new bt,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 k=new en;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var G=new Yt('<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");G.onClick=this.rotateLeftButtonClicked,k.addButton(G);var te=new Yt('<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");te.onClick=this.rotateRightButtonClicked,k.addButton(te);var J=new Ct;J.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(J),this.straightener=new yn("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(Ft){L.rotateBy(Ft),L.straightener.angle=L.rotationAngle},J.addElement(this.straightener.getUI());var Ie=new en;Ie.minWidth=2*this.toolbarHeight+"px",Ie.contentAlign="end",this.bottomToolbar.addButtonBlock(Ie);var at=new Yt('<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");at.onClick=this.flipHorizontallyButtonClicked,Ie.addButton(at);var St=new Yt('<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");St.onClick=this.flipVerticallyButtonClicked,Ie.addButton(St)},Q.prototype.ratioButtonClicked=function(L){this.aspectRatio=L,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Rt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new pn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Q.prototype.restoreState=function(L){if(L){var k=this.cropLayer.getRescaledRect(L.width,L.height,this.imageWidth,this.imageHeight,L.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=L.flippedHorizontally,this.flippedVertically=L.flippedVertically,this.applyFlip(),this.rotationAngle=L.rotationAngle,this.applyRotation()}},Q.prototype.clientToLocalCoordinates=function(L,k){var G=this.cropImage.getBoundingClientRect();return{x:L-G.left,y:k-G.top}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var L=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=L+"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()},Q.prototype.rotateLeftButtonClicked=function(){var L=this.rotationAngle-90;this.rotationAngle%90!=0&&(L+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(L)},Q.prototype.rotateRightButtonClicked=function(){var L=this.rotationAngle+90;this.rotationAngle%90!=0&&(L-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(L)},Q.prototype.rotateTo=function(L){L=(L=L>180?L-360:L)<=-180?L+360:L,this.rotationAngle=L,this.applyRotation()},Q.prototype.rotateBy=function(L){this.rotateTo((this.rotationAngle+L)%360)},Q.prototype.applyRotation=function(){var L=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var G=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/G.width,this.imageHeight/G.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=L},Q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Q.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,function(){var L,k;return Je(this,function(G){switch(G.label){case 0:return[4,this.render()];case 1:return L=G.sent(),k=this.getState(),this.renderEventListeners.forEach(function(te){return te(L,k)}),this.close(!0),[2]}})})},Q.prototype.render=function(){return je(this,void 0,void 0,function(){var L;return Je(this,function(k){switch(k.label){case 0:return(L=new wn).naturalSize=this.renderAtNaturalSize,L.imageType=this.renderImageType,L.imageQuality=this.renderImageQuality,L.width=this.renderWidth,L.height=this.renderHeight,this.unzoomFromCrop(),We.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,L.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 k.sent(),[4,L.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,k.sent()]}})})},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ct("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 ct("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ct("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var L=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ct("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*L)+`px;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ct("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ct("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new ct("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 ct("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new ct("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 ct("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*L)+`px;
padding: `+L+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new ct("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},Q.instanceCounter=0,Q}(),Vt=U("8hTe"),Mn=U.n(Vt),Un=/<pre[^>]*>/g;function Pn(Q){var L=document.createElement("div");return L.innerHTML=Q,L.childNodes.length===0?"":L.childNodes[0].nodeValue}var Vn=se.a=function(Q){var L=Q.value,k=L===void 0?"":L,G=Q.edit,te=G===void 0?!1:G,J=Q.className,Ie=Q.showTextOnly,at=Q.showLines,St=Q.replaces,Ft=Q.zoomImg,ye=Q.hasMask,Ut=Q.style,$t=Ut===void 0?{}:Ut,Sn=Q.stylesPrev,Hn=Sn===void 0?{}:Sn,Kn=String(k),In=Object(D.useRef)(),pr=Object(D.useRef)(),ur=Object(D.useState)(""),Bn=Object(K.a)(ur,2),cr=Bn[0],Ar=Bn[1],Cr=Object(D.useState)("office"),Yn=Object(K.a)(Cr,2),Wr=Yn[0],Pr=Yn[1],yr=function(){var sn=new yt(pr.current);sn.displayMode="popup",sn.addRenderEventListener(function(){var Ln=Object(M.a)(n.a.mark(function un(Rn){var bn;return n.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:return In.current.style.display="none",jn.next=3,Object(Be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Rn}});case 3:bn=jn.sent,bn!=null&&bn.id&&St(pr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(bn==null?void 0:bn.id,"?type=").concat(bn.content_type));case 5:case"end":return jn.stop()}},un)}));return function(un){return Ln.apply(this,arguments)}}()),sn.show()},Qr=function(){var sn=new le(pr.current);sn.settings.displayMode="popup",sn.addEventListener("render",function(){var Ln=Object(M.a)(n.a.mark(function un(Rn){var bn;return n.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(In.current.style.display="none",!pr.current){jn.next=6;break}return jn.next=4,Object(Be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Rn.dataUrl}});case 4:bn=jn.sent,bn!=null&&bn.id&&St(pr.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(bn==null?void 0:bn.id,"?type=").concat(bn.content_type));case 6:case"end":return jn.stop()}},un)}));return function(un){return Ln.apply(this,arguments)}}()),sn.show(),window.markerArea=sn},br=Object(D.useMemo)(function(){In.current&&(In.current.style.zIndex=-1);try{var _n=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ln=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Kn=Kn.replace(_n,"("+$.a.API_SERVER+"/api/attachments/").replace(sn,'"'+$.a.API_SERVER+"/api/attachments/").replace(Ln,'"'+$.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,`
`)}catch(Or){}var un=j(Kn),Rn=A();if(Kn.match(/\[TOC\]/)&&(un=un.replace("<p>[TOC]</p>",I()),R()),un=un.replace(/(__special_katext_id_\d+__)/g,function(Or,jn){var Xn=Rn[jn],Kr=Xn.type,Rr=Xn.expression;return Object(oe.renderToString)(Pn(Rr)||"",{displayMode:Kr==="block",throwOnError:!1,output:"html"})}),un=un.replace(/▁/g,"\u2581\u2581\u2581"),_(),Ie){var bn=document.createElement("div");return bn.innerHTML=un,bn.innerText}return setTimeout(function(){return Hr()},500),un},[Kn]),dr=Object(D.useRef)();S.WebkitLineClamp=at,at&&($t=Object(W.a)(Object(W.a)({},$t),S));function Nr(_n){var sn=_n.target;if(sn.tagName.toUpperCase()==="IMG"){if(Ft){var Ln=sn.getAttribute("src");Ar(Ln),Pr("image")}}else if(sn.tagName.toUpperCase()==="A"){var un=sn.getAttribute("href");if(un.indexOf("office")>-1)_n.preventDefault(),Ar(un),Pr("office");else if(un.indexOf("application/pdf")>-1)_n.preventDefault(),Ar(un),Pr("pdf");else if(un.indexOf("text/html")>-1)_n.preventDefault(),Ar(un),Pr("html");else if(un.startsWith("#")){_n.preventDefault();var Rn=document.getElementById(un.replace("#",""));Rn&&Rn.scrollIntoView(!0)}}}var Hr=function(){var sn,Ln=(sn=dr.current)===null||sn===void 0?void 0:sn.querySelectorAll("video");Ln==null||Ln.forEach(function(un){if(un.oncontextmenu=function(){return!1},un.src.indexOf(".m3u8")>-1&&!un.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var Rn=new Y.a;Rn.loadSource(un.src),Rn.attachMedia(un)}}})};Object(D.useEffect)(function(){if(dr.current&&br&&(br.match(Un)&&window.PR.prettyPrint()),dr.current)return dr.current.addEventListener("click",Nr),function(){dr.current.removeEventListener("click",Nr),_(),R()}},[br,dr.current,Nr]);var Er=function(sn){if(!te)return;sn.target.nodeName==="IMG"?(In.current.style.zIndex=1,In.current.style.display="flex",In.current.style.width=sn.target.clientWidth+"px",In.current.style.height=sn.target.clientHeight+"px",In.current.style.top=sn.target.offsetTop+"px",In.current.style.left=sn.target.offsetLeft+"px",pr.current.src=sn.target.getAttribute("src")):In.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:dr,style:Object(W.a)({},$t),className:"".concat(J||""," markdown-body ").concat(Mn.a.mdBody),onMouseOver:Er,dangerouslySetInnerHTML:{__html:br}}),b.a.createElement("div",{ref:In,className:Mn.a.button},b.a.createElement(z.a,null,b.a.createElement(V.a,{onClick:function(){return yr()}},"\u88C1\u526A"),b.a.createElement(V.a,{onClick:function(){return Qr()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:pr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),b.a.createElement(de.a,{close:!0,data:cr,type:cr!=null&&cr.length?Wr:"",style:Object(W.a)({},Hn),onClose:function(){return Ar("")}}))}},"9GDu":function(Ve,se,U){Ve.exports={flex_box_center:"flex_box_center___2Dduc",flex_space_between:"flex_space_between___2Le2r",flex_box_vertical_center:"flex_box_vertical_center___2KZsK",flex_box_center_end:"flex_box_center_end___1aosz",flex_box_column:"flex_box_column___cFN2D",bg:"bg___ka_0p",title:"title___3M9-E",questionIcons:"questionIcons___VjWTs",green:"green___2q3Jn",orange:"orange___KXt8o",greenTip:"greenTip___1nV5h",redTip:"redTip___3QDm4",orangeTip:"orangeTip___3F21W",pollDesc:"pollDesc___3Jb8Y",answered:"answered___1tbR8",unanswer:"unanswer___2Jts9",anchor:"anchor___3_nBp",answerFlag:"answerFlag___32KcB",flagActive:"flagActive___3ac8b",flagHalf:"flagHalf___1AvT6",answerStudentFlag:"answerStudentFlag___UbvlB",answerStudentActive:"answerStudentActive___27het",questionItem:"questionItem___3nBk4",itemType:"itemType___3NNh-",itemFlag:"itemFlag___2fz1F",answerWrap:"answerWrap___23vJg",answerSubjective:"answerSubjective___1i3N-",otherInput:"otherInput___gQ5U6",submitButton:"submitButton___RAvWu",randomFlag:"randomFlag___1J_UJ",answerTrue:"answerTrue___1cUgp",answerFalse:"answerFalse___Q16xV",answerHalf:"answerHalf___2I-fp",renderHtml:"renderHtml___1O15z",simpleText:"simpleText___1-h1E",answerYes:"answerYes___3w-7A",answerNo:"answerNo___2TuuH",answerInfo:"answerInfo___3KPDJ",answerSheet:"answerSheet___1UuGf",active:"active___2njWQ",countDown:"countDown___ViVY-",red:"red___RmODq",fold:"fold___ZVRBm",cardList:"cardList___1KJD0",iframe:"iframe___8V6GW"}},"9VGf":function(Ve,se,U){"use strict";U.d(se,"a",function(){return N});var Z=U("q1tI"),z=U.n(Z);function N(V,W){var M=Object(Z.useRef)();Object(Z.useEffect)(function(){M.current=V}),Object(Z.useEffect)(function(){function K(){M.current()}if(W!==null){var H=setInterval(K,W);return function(){return clearInterval(H)}}},[W])}},"A/g1":function(Ve,se){Ve.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoI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"},BU3w:function(Ve,se,U){"use strict";U.d(se,"a",function(){return M});var Z=U("MNnm"),z="rc-util-key";function N(K){if(K.attachTo)return K.attachTo;var H=document.querySelector("head");return H||document.body}function V(K){var H,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var D=document.createElement("style");if((H=n.csp)===null||H===void 0?void 0:H.nonce){var b;D.nonce=(b=n.csp)===null||b===void 0?void 0:b.nonce}D.innerHTML=K;var m=N(n),f=m.firstChild;return n.prepend&&m.prepend?m.prepend(D):n.prepend&&f?m.insertBefore(D,f):m.appendChild(D),D}var W=new Map;function M(K,H){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=N(n);if(!W.has(D)){var b=V("",n),m=b.parentNode;W.set(D,m),m.removeChild(b)}var f=Array.from(W.get(D).children).find(function(l){return l.tagName==="STYLE"&&l[z]===H});if(f){var d,u;if(((d=n.csp)===null||d===void 0?void 0:d.nonce)&&f.nonce!==((u=n.csp)===null||u===void 0?void 0:u.nonce)){var c;f.nonce=(c=n.csp)===null||c===void 0?void 0:c.nonce}return f.innerHTML!==K&&(f.innerHTML=K),f}var o=V(K,n);return o[z]=H,o}},Bd2K:function(Ve,se,U){(function(Z){Z(U("VrN/"),U("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(n,D,b){if(b!=Z.Init&&b&&n.removeKeyMap("autoCloseTags"),!D)return;var m={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(m["'/'"]=function(f){return M(f)}),(typeof D!="object"||D.whenOpening!==!1)&&(m["'>'"]=function(f){return V(f)}),n.addKeyMap(m)});var z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],N=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function V(n){if(n.getOption("disableInput"))return Z.Pass;for(var D=n.listSelections(),b=[],m=n.getOption("autoCloseTags"),f=0;f<D.length;f++){if(!D[f].empty())return Z.Pass;var d=D[f].head,u=n.getTokenAt(d),c=Z.innerMode(n.getMode(),u.state),o=c.state,l=c.mode.xmlCurrentTag&&c.mode.xmlCurrentTag(o),a=l&&l.name;if(!a)return Z.Pass;var i=c.mode.configuration=="html",R=typeof m=="object"&&m.dontCloseTags||i&&z,S=typeof m=="object"&&m.indentTags||i&&N;u.end>d.ch&&(a=a.slice(0,a.length-u.end+d.ch));var T=a.toLowerCase();if(!a||u.type=="string"&&(u.end!=d.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&l.close||u.string.indexOf("/")==d.ch-u.start-1||R&&K(R,T)>-1||H(n,c.mode.xmlCurrentContext&&c.mode.xmlCurrentContext(o)||[],a,d,!0))return Z.Pass;var I=typeof m=="object"&&m.emptyTags;if(I&&K(I,a)>-1){b[f]={text:"/>",newPos:Z.Pos(d.line,d.ch+2)};continue}var O=S&&K(S,T)>-1;b[f]={indent:O,text:">"+(O?`
`:"")+"</"+a+">",newPos:O?Z.Pos(d.line+1,0):Z.Pos(d.line,d.ch+1)}}for(var E=typeof m=="object"&&m.dontIndentOnAutoClose,f=D.length-1;f>=0;f--){var y=b[f];n.replaceRange(y.text,D[f].head,D[f].anchor,"+insert");var p=n.listSelections().slice(0);p[f]={head:y.newPos,anchor:y.newPos},n.setSelections(p),!E&&y.indent&&(n.indentLine(y.newPos.line,null,!0),n.indentLine(y.newPos.line+1,null,!0))}}function W(n,D){for(var b=n.listSelections(),m=[],f=D?"/":"</",d=n.getOption("autoCloseTags"),u=typeof d=="object"&&d.dontIndentOnSlash,c=0;c<b.length;c++){if(!b[c].empty())return Z.Pass;var o=b[c].head,l=n.getTokenAt(o),a=Z.innerMode(n.getMode(),l.state),i=a.state;if(D&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=o.ch-1))return Z.Pass;var R,S=a.mode.name!="xml"&&n.getMode().name=="htmlmixed";if(S&&a.mode.name=="javascript")R=f+"script";else if(S&&a.mode.name=="css")R=f+"style";else{var T=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(i);if(!T||T.length&&H(n,T,T[T.length-1],o))return Z.Pass;R=f+T[T.length-1]}n.getLine(o.line).charAt(l.end)!=">"&&(R+=">"),m[c]=R}if(n.replaceSelections(m),b=n.listSelections(),!u)for(var c=0;c<b.length;c++)(c==b.length-1||b[c].head.line<b[c+1].head.line)&&n.indentLine(b[c].head.line)}function M(n){return n.getOption("disableInput")?Z.Pass:W(n,!0)}Z.commands.closeTag=function(n){return W(n)};function K(n,D){if(n.indexOf)return n.indexOf(D);for(var b=0,m=n.length;b<m;++b)if(n[b]==D)return b;return-1}function H(n,D,b,m,f){if(!Z.scanForClosingTag)return!1;var d=Math.min(n.lastLine()+1,m.line+500),u=Z.scanForClosingTag(n,m,null,d);if(!u||u.tag!=b)return!1;for(var c=f?1:0,o=D.length-1;o>=0&&D[o]==b;o--)++c;m=u.to;for(var o=1;o<c;o++){var l=Z.scanForClosingTag(n,m,null,d);if(!l||l.tag!=b)return!1;m=l.to}return!0}})},BjJ7:function(Ve,se,U){"use strict";U.d(se,"d",function(){return z}),U.d(se,"c",function(){return N}),U.d(se,"e",function(){return V}),U.d(se,"b",function(){return W}),U.d(se,"a",function(){return K});var Z=U("m3rI");function z(H){var n=!0;if(H.length>0){for(var D=0;D<H.length;D++)if(H[D].compile_success==0||!H[D].compile_success){n=!1;break}}else n=!1;return n}function N(H){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",D=[],b=0;b<H.length;b++){var m=H[b],f=n?"".concat(n,"/").concat(m.name):"".concat(m.name);D.push({title:m.name,isLeaf:!(m.type==="tree"),key:f})}return D}function V(H,n,D){for(var b=0;b<H.length;b++){var m=H[b];if(m.key===n){m.children=D;break}m.children&&V(m.children,n,D)}return H}function W(H,n,D){var b;return function(){var m=this,f=arguments,d=function(){b=null,D||H.apply(m,f)},u=D&&!b;clearTimeout(b),b=setTimeout(d,n),u&&H.apply(m,f)}}var M=!0,K=Z.a.API_SERVER},BlwA:function(Ve,se,U){"use strict";var Z=U("9og8"),z=U("miYZ"),N=U("tsqr"),V=U("tJVT"),W=U("WmNS"),M=U.n(W),K=U("q1tI"),H=U.n(K),n=U("Ty5D"),D=U("ErOA"),b=U("m3rI"),m=U("DR4n"),f=U.n(m),d=function(o,l){for(var a=o.split(","),i=a[0].match(/:(.*?);/)[1],R=atob(a[1]),S=R.length,T=new Uint8Array(S);S--;)T[S]=R.charCodeAt(S);return new Blob([T],{type:i})},u=Object(K.forwardRef)(function(c,o){var l=c.time,a=c.number,i=c.supportCamera,R=c.take_photo,S=c.update,T=c.id,I=Object(K.useRef)(),O=Object(K.useRef)(),E=Object(n.i)(),y=Object(K.useState)([]),p=Object(V.a)(y,2),h=p[0],A=p[1],_=Object(K.useState)(0),v=Object(V.a)(_,2),P=v[0],x=v[1],C=Object(K.useState)(""),j=Object(V.a)(C,2),B=j[0],w=j[1],Y=Object(K.useState)(),$=Object(V.a)(Y,2),oe=$[0],de=$[1],Be=Object(K.useState)(0),Ae=Object(V.a)(Be,2),Re=Ae[0],Le=Ae[1];Object(K.useEffect)(function(){return fe(),function(){xe(),Fe()}},[]),Object(K.useEffect)(function(){P===2&&l&&a>0&&(me(),Le(1))},[l]),Object(K.useEffect)(function(){if(Re===0)return;if(Re===2)clearInterval(oe);else{var Ne=0,He=setInterval(function(){h.includes(Ne)&&ne(),Ne++},1e3);de(He)}return function(){return clearInterval(oe)}},[Re]),Object(K.useImperativeHandle)(o,function(){return{handlePhoto:ne}});var Fe=function(){Le(2)},me=function(){var He=l/a,ke=[];function Ye(et,ue){return parseInt(Math.floor(Math.random()*(ue-et+1))+et)}new Array(a).fill(0).map(function(et,ue){R?ke.push(Ye(He*ue,He*(ue+1))):ue==0?ke.push(0):ke.push(Ye(He*ue,He*(ue+1)))}),h=ke,A([].concat(ke)),console.log(ke)},fe=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(He){var ke=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return ke?new Promise(function(Ye,et){ke.call(navigator,He,Ye,et)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then(function(He){i&&i(2),x(2),"srcObject"in I.current?I.current.srcObject=He:I.current.src=window.URL.createObjectURL(He),I.current.onloadedmetadata=function(ke){I.current.play()},I.current.addEventListener("ended",function(){console.log("\u64AD\u653E\u7ED3\u675F"),Fe(),N.b.error({content:"\u60A8\u5DF2\u7ECF\u5173\u95ED\u4E86\u6444\u50CF\u5934\uFF0C\u8BF7\u572810\u79D2\u949F\u5185\u6062\u590D\u6444\u50CF\u5934\uFF0C\u5426\u5219\u5C06\u63A8\u51FA\u8003\u8BD5",duration:10,key:9998})},!1)}).catch(function(He){x(1),i&&i(1),He.message==="Permission denied"||He.name==="NotAllowedError"?N.b.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):N.b.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"),console.log("errname: "+He.name),console.log("err: "+He.message)})},ne=function(){try{O.current.width=I.current.videoWidth,O.current.height=I.current.videoHeight;var He=O.current.getContext("2d");He.drawImage(I.current,0,0,O.current.width,O.current.height),w(O.current.toDataURL("image/png")),ce(O.current.toDataURL("image/png"))}catch(ke){}},xe=function(){try{var He=I.current.srcObject,ke=He.getTracks();ke.forEach(function(Ye){Ye.stop()}),I.current.srcObject=null}catch(Ye){}},ce=function(){var Ne=Object(Z.a)(M.a.mark(function He(ke){var Ye,et;return M.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:Ye=new FormData,Ye.append("file",d(ke,"1")),Ye.append("1","123"),et=new window.XMLHttpRequest,et.withCredentials=!0,et.addEventListener("load",function(Oe){var Me=JSON.parse(Oe.target.responseText);Object(D.a)("/api/exercises/".concat(T,"/upload_photo.json"),{method:"post",body:{attachment_id:Me.id}})},!1),et.addEventListener("error",function(Oe){console.error(Oe)},!1),et.open("POST","".concat(b.a.API_SERVER,"/api/attachments.json")),et.send(Ye);case 9:case"end":return _e.stop()}},He)}));return function(ke){return Ne.apply(this,arguments)}}();return H.a.createElement(H.a.Fragment,null,P!==3&&H.a.createElement("aside",{className:f.a.video,id:"screenshot"},P===0&&H.a.createElement("span",null,"\u6B63\u5728\u5F00\u542F\u6444\u50CF\u5934..."),P===1&&H.a.createElement("span",null,"\u6444\u50CF\u5934\u5F00\u542F\u5931\u8D25"),P===2&&H.a.createElement("div",null,H.a.createElement("video",{width:"288",ref:I,autoPlay:!0}),H.a.createElement("canvas",{style:{display:"none"},ref:O}))))});se.a=u},"C+DQ":function(Ve,se,U){},"C/vA":function(Ve,se,U){"use strict";U.d(se,"a",function(){return Z});function Z(z){const N=this;let V=!1,W;return function(){return V||(V=!0,W=z.apply(N,arguments)),W}}},"Cg/j":function(Ve,se,U){"use strict";U.d(se,"b",function(){return Z}),U.d(se,"a",function(){return z}),U.d(se,"c",function(){return V}),U.d(se,"d",function(){return W});var Z;(function(M){M.serviceIds=new Map,M.DI_TARGET="$di$target",M.DI_DEPENDENCIES="$di$dependencies";function K(H){return H[M.DI_DEPENDENCIES]||[]}M.getServiceDependencies=K})(Z||(Z={}));const z=V("instantiationService");function N(M,K,H,n){K[Z.DI_TARGET]===K?K[Z.DI_DEPENDENCIES].push({id:M,index:H,optional:n}):(K[Z.DI_DEPENDENCIES]=[{id:M,index:H,optional:n}],K[Z.DI_TARGET]=K)}function V(M){if(Z.serviceIds.has(M))return Z.serviceIds.get(M);const K=function(H,n,D){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");N(K,H,D,!1)};return K.toString=()=>M,Z.serviceIds.set(M,K),K}function W(M){return function(K,H,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");N(M,K,n,!0)}}},DR4n:function(Ve,se,U){Ve.exports={flex_box_center:"flex_box_center___2zmmW",flex_space_between:"flex_space_between___3nCIw",flex_box_vertical_center:"flex_box_vertical_center___1PFij",flex_box_center_end:"flex_box_center_end___2FA05",flex_box_column:"flex_box_column___2k0kx",video:"video___1mYnG"}},DlQD:function(Ve,se,U){(function(Z,z){Ve.exports=z()})(this,function(){"use strict";function Z(Se,ge){for(var Ee=0;Ee<ge.length;Ee++){var ie=ge[Ee];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(Se,ie.key,ie)}}function z(Se,ge,Ee){return ge&&Z(Se.prototype,ge),Ee&&Z(Se,Ee),Se}function N(Se,ge){if(!Se)return;if(typeof Se=="string")return V(Se,ge);var Ee=Object.prototype.toString.call(Se).slice(8,-1);if(Ee==="Object"&&Se.constructor&&(Ee=Se.constructor.name),Ee==="Map"||Ee==="Set")return Array.from(Se);if(Ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return V(Se,ge)}function V(Se,ge){(ge==null||ge>Se.length)&&(ge=Se.length);for(var Ee=0,ie=new Array(ge);Ee<ge;Ee++)ie[Ee]=Se[Ee];return ie}function W(Se,ge){var Ee;if(typeof Symbol=="undefined"||Se[Symbol.iterator]==null){if(Array.isArray(Se)||(Ee=N(Se))||ge&&Se&&typeof Se.length=="number"){Ee&&(Se=Ee);var ie=0;return function(){return ie>=Se.length?{done:!0}:{done:!1,value:Se[ie++]}}}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 Ee=Se[Symbol.iterator](),Ee.next.bind(Ee)}function M(Se,ge){return ge={exports:{}},Se(ge,ge.exports),ge.exports}var K=M(function(Se){function ge(){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 Ee(ie){Se.exports.defaults=ie}Se.exports={defaults:ge(),getDefaults:ge,changeDefaults:Ee}}),H=K.defaults,n=K.getDefaults,D=K.changeDefaults,b=/[&<>"']/,m=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(ge){return u[ge]};function o(Se,ge){if(ge){if(b.test(Se))return Se.replace(m,c)}else if(f.test(Se))return Se.replace(d,c);return Se}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Se){return Se.replace(l,function(ge,Ee){return Ee=Ee.toLowerCase(),Ee==="colon"?":":Ee.charAt(0)==="#"?Ee.charAt(1)==="x"?String.fromCharCode(parseInt(Ee.substring(2),16)):String.fromCharCode(+Ee.substring(1)):""})}var i=/(^|[^\[])\^/g;function R(Se,ge){Se=Se.source||Se,ge=ge||"";var Ee={replace:function(ae,he){return he=he.source||he,he=he.replace(i,"$1"),Se=Se.replace(ae,he),Ee},getRegex:function(){return new RegExp(Se,ge)}};return Ee}var S=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function I(Se,ge,Ee){if(Se){var ie;try{ie=decodeURIComponent(a(Ee)).replace(S,"").toLowerCase()}catch(ae){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}ge&&!T.test(Ee)&&(Ee=h(ge,Ee));try{Ee=encodeURI(Ee).replace(/%25/g,"%")}catch(ae){return null}return Ee}var O={},E=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function h(Se,ge){O[" "+Se]||(E.test(Se)?O[" "+Se]=Se+"/":O[" "+Se]=P(Se,"/",!0)),Se=O[" "+Se];var Ee=Se.indexOf(":")===-1;return ge.substring(0,2)==="//"?Ee?ge:Se.replace(y,"$1")+ge:ge.charAt(0)==="/"?Ee?ge:Se.replace(p,"$1")+ge:Se+ge}var A={exec:function(){}};function _(Se){for(var ge=1,Ee,ie;ge<arguments.length;ge++){Ee=arguments[ge];for(ie in Ee)Object.prototype.hasOwnProperty.call(Ee,ie)&&(Se[ie]=Ee[ie])}return Se}function v(Se,ge){var Ee=Se.replace(/\|/g,function(he,ve,Te){for(var Ge=!1,ot=ve;--ot>=0&&Te[ot]==="\\";)Ge=!Ge;return Ge?"|":" |"}),ie=Ee.split(/ \|/),ae=0;if(ie.length>ge)ie.splice(ge);else for(;ie.length<ge;)ie.push("");for(;ae<ie.length;ae++)ie[ae]=ie[ae].trim().replace(/\\\|/g,"|");return ie}function P(Se,ge,Ee){var ie=Se.length;if(ie===0)return"";for(var ae=0;ae<ie;){var he=Se.charAt(ie-ae-1);if(he===ge&&!Ee)ae++;else if(he!==ge&&Ee)ae++;else break}return Se.substr(0,ie-ae)}function x(Se,ge){if(Se.indexOf(ge[1])===-1)return-1;for(var Ee=Se.length,ie=0,ae=0;ae<Ee;ae++)if(Se[ae]==="\\")ae++;else if(Se[ae]===ge[0])ie++;else if(Se[ae]===ge[1]&&(ie--,ie<0))return ae;return-1}function C(Se){Se&&Se.sanitize&&!Se.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 j={escape:o,unescape:a,edit:R,cleanUrl:I,resolveUrl:h,noopTest:A,merge:_,splitCells:v,rtrim:P,findClosingBracket:x,checkSanitizeDeprecation:C},B=K.defaults,w=j.rtrim,Y=j.splitCells,$=j.escape,oe=j.findClosingBracket;function de(Se,ge,Ee){var ie=ge.href,ae=ge.title?$(ge.title):null,he=Se[1].replace(/\\([\[\]])/g,"$1");return Se[0].charAt(0)!=="!"?{type:"link",raw:Ee,href:ie,title:ae,text:he}:{type:"image",raw:Ee,href:ie,title:ae,text:$(he)}}function Be(Se,ge){var Ee=Se.match(/^(\s+)(?:```)/);if(Ee===null)return ge;var ie=Ee[1];return ge.split(`
`).map(function(ae){var he=ae.match(/^\s+/);if(he===null)return ae;var ve=he[0];return ve.length>=ie.length?ae.slice(ie.length):ae}).join(`
`)}var Ae=function(){function Se(Ee){this.options=Ee||B}var ge=Se.prototype;return ge.space=function(ie){var ae=this.rules.block.newline.exec(ie);if(ae)return ae[0].length>1?{type:"space",raw:ae[0]}:{raw:`
`}},ge.code=function(ie,ae){var he=this.rules.block.code.exec(ie);if(he){var ve=ae[ae.length-1];if(ve&&ve.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var Te=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?Te:w(Te,`
`)}}},ge.fences=function(ie){var ae=this.rules.block.fences.exec(ie);if(ae){var he=ae[0],ve=Be(he,ae[3]||"");return{type:"code",raw:he,lang:ae[2]?ae[2].trim():ae[2],text:ve}}},ge.heading=function(ie){var ae=this.rules.block.heading.exec(ie);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},ge.nptable=function(ie){var ae=this.rules.block.nptable.exec(ie);if(ae){var he={type:"table",header:Y(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[],raw:ae[0]};if(he.header.length===he.align.length){var ve=he.align.length,Te;for(Te=0;Te<ve;Te++)/^ *-+: *$/.test(he.align[Te])?he.align[Te]="right":/^ *:-+: *$/.test(he.align[Te])?he.align[Te]="center":/^ *:-+ *$/.test(he.align[Te])?he.align[Te]="left":he.align[Te]=null;for(ve=he.cells.length,Te=0;Te<ve;Te++)he.cells[Te]=Y(he.cells[Te],he.header.length);return he}}},ge.hr=function(ie){var ae=this.rules.block.hr.exec(ie);if(ae)return{type:"hr",raw:ae[0]}},ge.blockquote=function(ie){var ae=this.rules.block.blockquote.exec(ie);if(ae){var he=ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ae[0],text:he}}},ge.list=function(ie){var ae=this.rules.block.list.exec(ie);if(ae){for(var he=ae[0],ve=ae[2],Te=ve.length>1,Ge=ve[ve.length-1]===")",ot={type:"list",raw:he,ordered:Te,start:Te?+ve.slice(0,-1):"",loose:!1,items:[]},xt=ae[0].match(this.rules.block.item),Ot=!1,wt,vt,qe,Qe,Ue,le,pe,$e=xt.length,je=0;je<$e;je++)wt=xt[je],he=wt,vt=wt.length,wt=wt.replace(/^ *([*+-]|\d+[.)]) */,""),~wt.indexOf(`
`)&&(vt-=wt.length,wt=this.options.pedantic?wt.replace(/^ {1,4}/gm,""):wt.replace(new RegExp("^ {1,"+vt+"}","gm"),"")),je!==$e-1&&(qe=this.rules.block.bullet.exec(xt[je+1])[0],(Te?qe.length===1||!Ge&&qe[qe.length-1]===")":qe.length>1||this.options.smartLists&&qe!==ve)&&(Qe=xt.slice(je+1).join(`
`),ot.raw=ot.raw.substring(0,ot.raw.length-Qe.length),je=$e-1)),Ue=Ot||/\n\n(?!\s*$)/.test(wt),je!==$e-1&&(Ot=wt.charAt(wt.length-1)===`
`,Ue||(Ue=Ot)),Ue&&(ot.loose=!0),le=/^\[[ xX]\] /.test(wt),pe=void 0,le&&(pe=wt[1]!==" ",wt=wt.replace(/^\[[ xX]\] +/,"")),ot.items.push({type:"list_item",raw:he,task:le,checked:pe,loose:Ue,text:wt});return ot}},ge.html=function(ie){var ae=this.rules.block.html.exec(ie);if(ae)return{type:this.options.sanitize?"paragraph":"html",raw:ae[0],pre:!this.options.sanitizer&&(ae[1]==="pre"||ae[1]==="script"||ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):$(ae[0]):ae[0]}},ge.def=function(ie){var ae=this.rules.block.def.exec(ie);if(ae){ae[3]&&(ae[3]=ae[3].substring(1,ae[3].length-1));var he=ae[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:ae[0],href:ae[2],title:ae[3]}}},ge.table=function(ie){var ae=this.rules.block.table.exec(ie);if(ae){var he={type:"table",header:Y(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=ae[0];var ve=he.align.length,Te;for(Te=0;Te<ve;Te++)/^ *-+: *$/.test(he.align[Te])?he.align[Te]="right":/^ *:-+: *$/.test(he.align[Te])?he.align[Te]="center":/^ *:-+ *$/.test(he.align[Te])?he.align[Te]="left":he.align[Te]=null;for(ve=he.cells.length,Te=0;Te<ve;Te++)he.cells[Te]=Y(he.cells[Te].replace(/^ *\| *| *\| *$/g,""),he.header.length);return he}}},ge.lheading=function(ie){var ae=this.rules.block.lheading.exec(ie);if(ae)return{type:"heading",raw:ae[0],depth:ae[2].charAt(0)==="="?1:2,text:ae[1]}},ge.paragraph=function(ie){var ae=this.rules.block.paragraph.exec(ie);if(ae)return{type:"paragraph",raw:ae[0],text:ae[1].charAt(ae[1].length-1)===`
`?ae[1].slice(0,-1):ae[1]}},ge.text=function(ie,ae){var he=this.rules.block.text.exec(ie);if(he){var ve=ae[ae.length-1];return ve&&ve.type==="text"?{raw:he[0],text:he[0]}:{type:"text",raw:he[0],text:he[0]}}},ge.escape=function(ie){var ae=this.rules.inline.escape.exec(ie);if(ae)return{type:"escape",raw:ae[0],text:$(ae[1])}},ge.tag=function(ie,ae,he){var ve=this.rules.inline.tag.exec(ie);if(ve)return!ae&&/^<a /i.test(ve[0])?ae=!0:ae&&/^<\/a>/i.test(ve[0])&&(ae=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(ve[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ve[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:ve[0],inLink:ae,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):$(ve[0]):ve[0]}},ge.link=function(ie){var ae=this.rules.inline.link.exec(ie);if(ae){var he=oe(ae[2],"()");if(he>-1){var ve=ae[0].indexOf("!")===0?5:4,Te=ve+ae[1].length+he;ae[2]=ae[2].substring(0,he),ae[0]=ae[0].substring(0,Te).trim(),ae[3]=""}var Ge=ae[2],ot="";if(this.options.pedantic){var xt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ge);xt?(Ge=xt[1],ot=xt[3]):ot=""}else ot=ae[3]?ae[3].slice(1,-1):"";Ge=Ge.trim().replace(/^<([\s\S]*)>$/,"$1");var Ot=de(ae,{href:Ge&&Ge.replace(this.rules.inline._escapes,"$1"),title:ot&&ot.replace(this.rules.inline._escapes,"$1")},ae[0]);return Ot}},ge.reflink=function(ie,ae){var he;if((he=this.rules.inline.reflink.exec(ie))||(he=this.rules.inline.nolink.exec(ie))){var ve=(he[2]||he[1]).replace(/\s+/g," ");if(ve=ae[ve.toLowerCase()],!ve||!ve.href){var Te=he[0].charAt(0);return{type:"text",raw:Te,text:Te}}var Ge=de(he,ve,he[0]);return Ge}},ge.strong=function(ie,ae,he){he===void 0&&(he="");var ve=this.rules.inline.strong.start.exec(ie);if(ve&&(!ve[1]||ve[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ae=ae.slice(-1*ie.length);var Te=ve[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Te.lastIndex=0;for(var Ge;(ve=Te.exec(ae))!=null;)if(Ge=this.rules.inline.strong.middle.exec(ae.slice(0,ve.index+3)),Ge)return{type:"strong",raw:ie.slice(0,Ge[0].length),text:ie.slice(2,Ge[0].length-2)}}},ge.em=function(ie,ae,he){he===void 0&&(he="");var ve=this.rules.inline.em.start.exec(ie);if(ve&&(!ve[1]||ve[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ae=ae.slice(-1*ie.length);var Te=ve[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Te.lastIndex=0;for(var Ge;(ve=Te.exec(ae))!=null;)if(Ge=this.rules.inline.em.middle.exec(ae.slice(0,ve.index+2)),Ge)return{type:"em",raw:ie.slice(0,Ge[0].length),text:ie.slice(1,Ge[0].length-1)}}},ge.codespan=function(ie){var ae=this.rules.inline.code.exec(ie);if(ae){var he=ae[2].replace(/\n/g," "),ve=/[^ ]/.test(he),Te=he.startsWith(" ")&&he.endsWith(" ");return ve&&Te&&(he=he.substring(1,he.length-1)),he=$(he,!0),{type:"codespan",raw:ae[0],text:he}}},ge.br=function(ie){var ae=this.rules.inline.br.exec(ie);if(ae)return{type:"br",raw:ae[0]}},ge.del=function(ie){var ae=this.rules.inline.del.exec(ie);if(ae)return{type:"del",raw:ae[0],text:ae[1]}},ge.autolink=function(ie,ae){var he=this.rules.inline.autolink.exec(ie);if(he){var ve,Te;return he[2]==="@"?(ve=$(this.options.mangle?ae(he[1]):he[1]),Te="mailto:"+ve):(ve=$(he[1]),Te=ve),{type:"link",raw:he[0],text:ve,href:Te,tokens:[{type:"text",raw:ve,text:ve}]}}},ge.url=function(ie,ae){var he;if(he=this.rules.inline.url.exec(ie)){var ve,Te;if(he[2]==="@")ve=$(this.options.mangle?ae(he[0]):he[0]),Te="mailto:"+ve;else{var Ge;do Ge=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Ge!==he[0]);ve=$(he[0]),he[1]==="www."?Te="http://"+ve:Te=ve}return{type:"link",raw:he[0],text:ve,href:Te,tokens:[{type:"text",raw:ve,text:ve}]}}},ge.inlineText=function(ie,ae,he){var ve=this.rules.inline.text.exec(ie);if(ve){var Te;return ae?Te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):$(ve[0]):ve[0]:Te=$(this.options.smartypants?he(ve[0]):ve[0]),{type:"text",raw:ve[0],text:Te}}},Se}(),Re=j.noopTest,Le=j.edit,Fe=j.merge,me={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:Re,table:Re,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};me._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,me._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,me.def=Le(me.def).replace("label",me._label).replace("title",me._title).getRegex(),me.bullet=/(?:[*+-]|\d{1,9}[.)])/,me.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,me.item=Le(me.item,"gm").replace(/bull/g,me.bullet).getRegex(),me.list=Le(me.list).replace(/bull/g,me.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+me.def.source+")").getRegex(),me._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",me._comment=/<!--(?!-?>)[\s\S]*?-->/,me.html=Le(me.html,"i").replace("comment",me._comment).replace("tag",me._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me.paragraph=Le(me._paragraph).replace("hr",me.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",me._tag).getRegex(),me.blockquote=Le(me.blockquote).replace("paragraph",me.paragraph).getRegex(),me.normal=Fe({},me),me.gfm=Fe({},me.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*|$)"}),me.gfm.nptable=Le(me.gfm.nptable).replace("hr",me.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",me._tag).getRegex(),me.gfm.table=Le(me.gfm.table).replace("hr",me.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",me._tag).getRegex(),me.pedantic=Fe({},me.normal,{html:Le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",me._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:Re,paragraph:Le(me.normal._paragraph).replace("hr",me.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",me.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Re,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:Re,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};fe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",fe.punctuation=Le(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex(),fe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",fe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",fe.em.start=Le(fe.em.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.middle=Le(fe.em.middle).replace(/punctuation/g,fe._punctuation).replace(/overlapSkip/g,fe._overlapSkip).getRegex(),fe.em.endAst=Le(fe.em.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.endUnd=Le(fe.em.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.start=Le(fe.strong.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.middle=Le(fe.strong.middle).replace(/punctuation/g,fe._punctuation).replace(/blockSkip/g,fe._blockSkip).getRegex(),fe.strong.endAst=Le(fe.strong.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.endUnd=Le(fe.strong.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.blockSkip=Le(fe._blockSkip,"g").getRegex(),fe.overlapSkip=Le(fe._overlapSkip,"g").getRegex(),fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,fe._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])?)+(?![-_])/,fe.autolink=Le(fe.autolink).replace("scheme",fe._scheme).replace("email",fe._email).getRegex(),fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,fe.tag=Le(fe.tag).replace("comment",me._comment).replace("attribute",fe._attribute).getRegex(),fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,fe.link=Le(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex(),fe.reflink=Le(fe.reflink).replace("label",fe._label).getRegex(),fe.reflinkSearch=Le(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex(),fe.normal=Fe({},fe),fe.pedantic=Fe({},fe.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:Le(/^!?\[(label)\]\((.*?)\)/).replace("label",fe._label).getRegex(),reflink:Le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()}),fe.gfm=Fe({},fe.normal,{escape:Le(fe.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),fe.gfm.url=Le(fe.gfm.url,"i").replace("email",fe.gfm._extended_email).getRegex(),fe.breaks=Fe({},fe.gfm,{br:Le(fe.br).replace("{2,}","*").getRegex(),text:Le(fe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ne={block:me,inline:fe},xe=K.defaults,ce=ne.block,Ne=ne.inline;function He(Se){return Se.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 ke(Se){var ge="",Ee,ie,ae=Se.length;for(Ee=0;Ee<ae;Ee++)ie=Se.charCodeAt(Ee),Math.random()>.5&&(ie="x"+ie.toString(16)),ge+="&#"+ie+";";return ge}var Ye=function(){function Se(Ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ee||xe,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:ce.normal,inline:Ne.normal};this.options.pedantic?(ie.block=ce.pedantic,ie.inline=Ne.pedantic):this.options.gfm&&(ie.block=ce.gfm,this.options.breaks?ie.inline=Ne.breaks:ie.inline=Ne.gfm),this.tokenizer.rules=ie}Se.lex=function(ie,ae){var he=new Se(ae);return he.lex(ie)};var ge=Se.prototype;return ge.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(ie,ae,he){ae===void 0&&(ae=[]),he===void 0&&(he=!0),ie=ie.replace(/^ +$/gm,"");for(var ve,Te,Ge,ot;ie;){if(ve=this.tokenizer.space(ie)){ie=ie.substring(ve.raw.length),ve.type&&ae.push(ve);continue}if(ve=this.tokenizer.code(ie,ae)){ie=ie.substring(ve.raw.length),ve.type?ae.push(ve):(ot=ae[ae.length-1],ot.raw+=`
`+ve.raw,ot.text+=`
`+ve.text);continue}if(ve=this.tokenizer.fences(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.heading(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.nptable(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.hr(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.blockquote(ie)){ie=ie.substring(ve.raw.length),ve.tokens=this.blockTokens(ve.text,[],he),ae.push(ve);continue}if(ve=this.tokenizer.list(ie)){for(ie=ie.substring(ve.raw.length),Ge=ve.items.length,Te=0;Te<Ge;Te++)ve.items[Te].tokens=this.blockTokens(ve.items[Te].text,[],!1);ae.push(ve);continue}if(ve=this.tokenizer.html(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(he&&(ve=this.tokenizer.def(ie))){ie=ie.substring(ve.raw.length),this.tokens.links[ve.tag]||(this.tokens.links[ve.tag]={href:ve.href,title:ve.title});continue}if(ve=this.tokenizer.table(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.lheading(ie)){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(he&&(ve=this.tokenizer.paragraph(ie))){ie=ie.substring(ve.raw.length),ae.push(ve);continue}if(ve=this.tokenizer.text(ie,ae)){ie=ie.substring(ve.raw.length),ve.type?ae.push(ve):(ot=ae[ae.length-1],ot.raw+=`
`+ve.raw,ot.text+=`
`+ve.text);continue}if(ie){var xt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(xt);break}else throw new Error(xt)}}return ae},ge.inline=function(ie){var ae,he,ve,Te,Ge,ot,xt=ie.length;for(ae=0;ae<xt;ae++){ot=ie[ae];switch(ot.type){case"paragraph":case"text":case"heading":{ot.tokens=[],this.inlineTokens(ot.text,ot.tokens);break}case"table":{for(ot.tokens={header:[],cells:[]},Te=ot.header.length,he=0;he<Te;he++)ot.tokens.header[he]=[],this.inlineTokens(ot.header[he],ot.tokens.header[he]);for(Te=ot.cells.length,he=0;he<Te;he++)for(Ge=ot.cells[he],ot.tokens.cells[he]=[],ve=0;ve<Ge.length;ve++)ot.tokens.cells[he][ve]=[],this.inlineTokens(Ge[ve],ot.tokens.cells[he][ve]);break}case"blockquote":{this.inline(ot.tokens);break}case"list":{for(Te=ot.items.length,he=0;he<Te;he++)this.inline(ot.items[he].tokens);break}}}return ie},ge.inlineTokens=function(ie,ae,he,ve,Te){ae===void 0&&(ae=[]),he===void 0&&(he=!1),ve===void 0&&(ve=!1),Te===void 0&&(Te="");var Ge,ot=ie,xt;if(this.tokens.links){var Ot=Object.keys(this.tokens.links);if(Ot.length>0)for(;(xt=this.tokenizer.rules.inline.reflinkSearch.exec(ot))!=null;)Ot.includes(xt[0].slice(xt[0].lastIndexOf("[")+1,-1))&&(ot=ot.slice(0,xt.index)+"["+"a".repeat(xt[0].length-2)+"]"+ot.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(xt=this.tokenizer.rules.inline.blockSkip.exec(ot))!=null;)ot=ot.slice(0,xt.index)+"["+"a".repeat(xt[0].length-2)+"]"+ot.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(Ge=this.tokenizer.escape(ie)){ie=ie.substring(Ge.raw.length),ae.push(Ge);continue}if(Ge=this.tokenizer.tag(ie,he,ve)){ie=ie.substring(Ge.raw.length),he=Ge.inLink,ve=Ge.inRawBlock,ae.push(Ge);continue}if(Ge=this.tokenizer.link(ie)){ie=ie.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,ve)),ae.push(Ge);continue}if(Ge=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,ve)),ae.push(Ge);continue}if(Ge=this.tokenizer.strong(ie,ot,Te)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],he,ve),ae.push(Ge);continue}if(Ge=this.tokenizer.em(ie,ot,Te)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],he,ve),ae.push(Ge);continue}if(Ge=this.tokenizer.codespan(ie)){ie=ie.substring(Ge.raw.length),ae.push(Ge);continue}if(Ge=this.tokenizer.br(ie)){ie=ie.substring(Ge.raw.length),ae.push(Ge);continue}if(Ge=this.tokenizer.del(ie)){ie=ie.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],he,ve),ae.push(Ge);continue}if(Ge=this.tokenizer.autolink(ie,ke)){ie=ie.substring(Ge.raw.length),ae.push(Ge);continue}if(!he&&(Ge=this.tokenizer.url(ie,ke))){ie=ie.substring(Ge.raw.length),ae.push(Ge);continue}if(Ge=this.tokenizer.inlineText(ie,ve,He)){ie=ie.substring(Ge.raw.length),Te=Ge.raw.slice(-1),ae.push(Ge);continue}if(ie){var wt="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(wt);break}else throw new Error(wt)}}return ae},z(Se,null,[{key:"rules",get:function(){return{block:ce,inline:Ne}}}]),Se}(),et=K.defaults,ue=j.cleanUrl,_e=j.escape,Oe=function(){function Se(Ee){this.options=Ee||et}var ge=Se.prototype;return ge.code=function(ie,ae,he){var ve=(ae||"").match(/\S*/)[0];if(this.options.highlight){var Te=this.options.highlight(ie,ve);Te!=null&&Te!==ie&&(he=!0,ie=Te)}return ve?'<pre><code class="'+this.options.langPrefix+_e(ve,!0)+'">'+(he?ie:_e(ie,!0))+`</code></pre>
`:"<pre><code>"+(he?ie:_e(ie,!0))+`</code></pre>
`},ge.blockquote=function(ie){return`<blockquote>
`+ie+`</blockquote>
`},ge.html=function(ie){return ie},ge.heading=function(ie,ae,he,ve){return this.options.headerIds?"<h"+ae+' id="'+this.options.headerPrefix+ve.slug(he)+'">'+ie+"</h"+ae+`>
`:"<h"+ae+">"+ie+"</h"+ae+`>
`},ge.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ge.list=function(ie,ae,he){var ve=ae?"ol":"ul",Te=ae&&he!==1?' start="'+he+'"':"";return"<"+ve+Te+`>
`+ie+"</"+ve+`>
`},ge.listitem=function(ie){return"<li>"+ie+`</li>
`},ge.checkbox=function(ie){return"<input "+(ie?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ge.paragraph=function(ie){return"<p>"+ie+`</p>
`},ge.table=function(ie,ae){return ae&&(ae="<tbody>"+ae+"</tbody>"),`<table>
<thead>
`+ie+`</thead>
`+ae+`</table>
`},ge.tablerow=function(ie){return`<tr>
`+ie+`</tr>
`},ge.tablecell=function(ie,ae){var he=ae.header?"th":"td",ve=ae.align?"<"+he+' align="'+ae.align+'">':"<"+he+">";return ve+ie+"</"+he+`>
`},ge.strong=function(ie){return"<strong>"+ie+"</strong>"},ge.em=function(ie){return"<em>"+ie+"</em>"},ge.codespan=function(ie){return"<code>"+ie+"</code>"},ge.br=function(){return this.options.xhtml?"<br/>":"<br>"},ge.del=function(ie){return"<del>"+ie+"</del>"},ge.link=function(ie,ae,he){if(ie=ue(this.options.sanitize,this.options.baseUrl,ie),ie===null)return he;var ve='<a href="'+_e(ie)+'"';return ae&&(ve+=' title="'+ae+'"'),ve+=">"+he+"</a>",ve},ge.image=function(ie,ae,he){if(ie=ue(this.options.sanitize,this.options.baseUrl,ie),ie===null)return he;var ve='<img src="'+ie+'" alt="'+he+'"';return ae&&(ve+=' title="'+ae+'"'),ve+=this.options.xhtml?"/>":">",ve},ge.text=function(ie){return ie},Se}(),Me=function(){function Se(){}var ge=Se.prototype;return ge.strong=function(ie){return ie},ge.em=function(ie){return ie},ge.codespan=function(ie){return ie},ge.del=function(ie){return ie},ge.html=function(ie){return ie},ge.text=function(ie){return ie},ge.link=function(ie,ae,he){return""+he},ge.image=function(ie,ae,he){return""+he},ge.br=function(){return""},Se}(),rt=function(){function Se(){this.seen={}}var ge=Se.prototype;return ge.slug=function(ie){var ae=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ae)){var he=ae;do this.seen[he]++,ae=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(ae))}return this.seen[ae]=0,ae},Se}(),dt=K.defaults,pt=j.unescape,ut=function(){function Se(Ee){this.options=Ee||dt,this.options.renderer=this.options.renderer||new Oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me,this.slugger=new rt}Se.parse=function(ie,ae){var he=new Se(ae);return he.parse(ie)};var ge=Se.prototype;return ge.parse=function(ie,ae){ae===void 0&&(ae=!0);var he="",ve,Te,Ge,ot,xt,Ot,wt,vt,qe,Qe,Ue,le,pe,$e,je,Je,mt,We,it=ie.length;for(ve=0;ve<it;ve++){Qe=ie[ve];switch(Qe.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(Qe.tokens),Qe.depth,pt(this.parseInline(Qe.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(Qe.text,Qe.lang,Qe.escaped);continue}case"table":{for(vt="",wt="",ot=Qe.header.length,Te=0;Te<ot;Te++)wt+=this.renderer.tablecell(this.parseInline(Qe.tokens.header[Te]),{header:!0,align:Qe.align[Te]});for(vt+=this.renderer.tablerow(wt),qe="",ot=Qe.cells.length,Te=0;Te<ot;Te++){for(Ot=Qe.tokens.cells[Te],wt="",xt=Ot.length,Ge=0;Ge<xt;Ge++)wt+=this.renderer.tablecell(this.parseInline(Ot[Ge]),{header:!1,align:Qe.align[Ge]});qe+=this.renderer.tablerow(wt)}he+=this.renderer.table(vt,qe);continue}case"blockquote":{qe=this.parse(Qe.tokens),he+=this.renderer.blockquote(qe);continue}case"list":{for(Ue=Qe.ordered,le=Qe.start,pe=Qe.loose,ot=Qe.items.length,qe="",Te=0;Te<ot;Te++)je=Qe.items[Te],Je=je.checked,mt=je.task,$e="",je.task&&(We=this.renderer.checkbox(Je),pe?je.tokens.length>0&&je.tokens[0].type==="text"?(je.tokens[0].text=We+" "+je.tokens[0].text,je.tokens[0].tokens&&je.tokens[0].tokens.length>0&&je.tokens[0].tokens[0].type==="text"&&(je.tokens[0].tokens[0].text=We+" "+je.tokens[0].tokens[0].text)):je.tokens.unshift({type:"text",text:We}):$e+=We),$e+=this.parse(je.tokens,pe),qe+=this.renderer.listitem($e,mt,Je);he+=this.renderer.list(qe,Ue,le);continue}case"html":{he+=this.renderer.html(Qe.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(Qe.tokens));continue}case"text":{for(qe=Qe.tokens?this.parseInline(Qe.tokens):Qe.text;ve+1<it&&ie[ve+1].type==="text";)Qe=ie[++ve],qe+=`
`+(Qe.tokens?this.parseInline(Qe.tokens):Qe.text);he+=ae?this.renderer.paragraph(qe):qe;continue}default:{var st='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error(st);return}else throw new Error(st)}}}return he},ge.parseInline=function(ie,ae){ae=ae||this.renderer;var he="",ve,Te,Ge=ie.length;for(ve=0;ve<Ge;ve++){Te=ie[ve];switch(Te.type){case"escape":{he+=ae.text(Te.text);break}case"html":{he+=ae.html(Te.text);break}case"link":{he+=ae.link(Te.href,Te.title,this.parseInline(Te.tokens,ae));break}case"image":{he+=ae.image(Te.href,Te.title,Te.text);break}case"strong":{he+=ae.strong(this.parseInline(Te.tokens,ae));break}case"em":{he+=ae.em(this.parseInline(Te.tokens,ae));break}case"codespan":{he+=ae.codespan(Te.text);break}case"br":{he+=ae.br();break}case"del":{he+=ae.del(this.parseInline(Te.tokens,ae));break}case"text":{he+=ae.text(Te.text);break}default:{var ot='Token with "'+Te.type+'" type was not found.';if(this.options.silent){console.error(ot);return}else throw new Error(ot)}}}return he},Se}(),_t=j.merge,Tt=j.checkSanitizeDeprecation,Pe=j.escape,Ce=K.getDefaults,tt=K.changeDefaults,lt=K.defaults;function Ke(Se,ge,Ee){if(typeof Se=="undefined"||Se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");if(typeof ge=="function"&&(Ee=ge,ge=null),ge=_t({},Ke.defaults,ge||{}),Tt(ge),Ee){var ie=ge.highlight,ae;try{ae=Ye.lex(Se,ge)}catch(Ge){return Ee(Ge)}var he=function(ot){var xt;if(!ot)try{xt=ut.parse(ae,ge)}catch(Ot){ot=Ot}return ge.highlight=ie,ot?Ee(ot):Ee(null,xt)};if(!ie||ie.length<3)return he();if(delete ge.highlight,!ae.length)return he();var ve=0;Ke.walkTokens(ae,function(Ge){Ge.type==="code"&&(ve++,setTimeout(function(){ie(Ge.text,Ge.lang,function(ot,xt){if(ot)return he(ot);xt!=null&&xt!==Ge.text&&(Ge.text=xt,Ge.escaped=!0),ve--,ve===0&&he()})},0))}),ve===0&&he();return}try{var Te=Ye.lex(Se,ge);return ge.walkTokens&&Ke.walkTokens(Te,ge.walkTokens),ut.parse(Te,ge)}catch(Ge){if(Ge.message+=`
Please report this to https://github.com/markedjs/marked.`,ge.silent)return"<p>An error occurred:</p><pre>"+Pe(Ge.message+"",!0)+"</pre>";throw Ge}}Ke.options=Ke.setOptions=function(Se){return _t(Ke.defaults,Se),tt(Ke.defaults),Ke},Ke.getDefaults=Ce,Ke.defaults=lt,Ke.use=function(Se){var ge=_t({},Se);if(Se.renderer&&function(){var ie=Ke.defaults.renderer||new Oe,ae=function(Te){var Ge=ie[Te];ie[Te]=function(){for(var ot=arguments.length,xt=new Array(ot),Ot=0;Ot<ot;Ot++)xt[Ot]=arguments[Ot];var wt=Se.renderer[Te].apply(ie,xt);return wt===!1&&(wt=Ge.apply(ie,xt)),wt}};for(var he in Se.renderer)ae(he);ge.renderer=ie}(),Se.tokenizer&&function(){var ie=Ke.defaults.tokenizer||new Ae,ae=function(Te){var Ge=ie[Te];ie[Te]=function(){for(var ot=arguments.length,xt=new Array(ot),Ot=0;Ot<ot;Ot++)xt[Ot]=arguments[Ot];var wt=Se.tokenizer[Te].apply(ie,xt);return wt===!1&&(wt=Ge.apply(ie,xt)),wt}};for(var he in Se.tokenizer)ae(he);ge.tokenizer=ie}(),Se.walkTokens){var Ee=Ke.defaults.walkTokens;ge.walkTokens=function(ie){Se.walkTokens(ie),Ee&&Ee(ie)}}Ke.setOptions(ge)},Ke.walkTokens=function(Se,ge){for(var Ee=W(Se),ie;!(ie=Ee()).done;){var ae=ie.value;ge(ae);switch(ae.type){case"table":{for(var he=W(ae.tokens.header),ve;!(ve=he()).done;){var Te=ve.value;Ke.walkTokens(Te,ge)}for(var Ge=W(ae.tokens.cells),ot;!(ot=Ge()).done;)for(var xt=ot.value,Ot=W(xt),wt;!(wt=Ot()).done;){var vt=wt.value;Ke.walkTokens(vt,ge)}break}case"list":{Ke.walkTokens(ae.items,ge);break}default:ae.tokens&&Ke.walkTokens(ae.tokens,ge)}}},Ke.Parser=ut,Ke.parser=ut.parse,Ke.Renderer=Oe,Ke.TextRenderer=Me,Ke.Lexer=Ye,Ke.lexer=Ye.lex,Ke.Tokenizer=Ae,Ke.Slugger=rt,Ke.parse=Ke;var Xe=Ke;return Xe})},E7E6:function(Ve,se){Ve.exports="data:image/png;base64,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"},ELLl:function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){var z={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},N=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(u,c,o){o&&o!=Z.Init&&(u.removeKeyMap(W),u.state.closeBrackets=null),c&&(M(V(c,"pairs")),u.state.closeBrackets=c,u.addKeyMap(W))});function V(u,c){return c=="pairs"&&typeof u=="string"?u:typeof u=="object"&&u[c]!=null?u[c]:z[c]}var W={Backspace:n,Enter:D};function M(u){for(var c=0;c<u.length;c++){var o=u.charAt(c),l="'"+o+"'";W[l]||(W[l]=K(o))}}M(z.pairs+"`");function K(u){return function(c){return m(c,u)}}function H(u){var c=u.state.closeBrackets;if(!c||c.override)return c;var o=u.getModeAt(u.getCursor());return o.closeBrackets||c}function n(u){var c=H(u);if(!c||u.getOption("disableInput"))return Z.Pass;for(var o=V(c,"pairs"),l=u.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return Z.Pass;var i=f(u,l[a].head);if(!i||o.indexOf(i)%2!=0)return Z.Pass}for(var a=l.length-1;a>=0;a--){var R=l[a].head;u.replaceRange("",N(R.line,R.ch-1),N(R.line,R.ch+1),"+delete")}}function D(u){var c=H(u),o=c&&V(c,"explode");if(!o||u.getOption("disableInput"))return Z.Pass;for(var l=u.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return Z.Pass;var i=f(u,l[a].head);if(!i||o.indexOf(i)%2!=0)return Z.Pass}u.operation(function(){var R=u.lineSeparator()||`
`;u.replaceSelection(R+R,null),u.execCommand("goCharLeft"),l=u.listSelections();for(var S=0;S<l.length;S++){var T=l[S].head.line;u.indentLine(T,null,!0),u.indentLine(T+1,null,!0)}})}function b(u){var c=Z.cmpPos(u.anchor,u.head)>0;return{anchor:new N(u.anchor.line,u.anchor.ch+(c?-1:1)),head:new N(u.head.line,u.head.ch+(c?1:-1))}}function m(u,c){var o=H(u);if(!o||u.getOption("disableInput"))return Z.Pass;var l=V(o,"pairs"),a=l.indexOf(c);if(a==-1)return Z.Pass;for(var i=V(o,"closeBefore"),R=V(o,"triples"),S=l.charAt(a+1)==c,T=u.listSelections(),I=a%2==0,O,E=0;E<T.length;E++){var y=T[E],p=y.head,h,A=u.getRange(p,N(p.line,p.ch+1));if(I&&!y.empty())h="surround";else if((S||!I)&&A==c)S&&d(u,p)?h="both":R.indexOf(c)>=0&&u.getRange(p,N(p.line,p.ch+3))==c+c+c?h="skipThree":h="skip";else if(S&&p.ch>1&&R.indexOf(c)>=0&&u.getRange(N(p.line,p.ch-2),p)==c+c){if(p.ch>2&&/\bstring/.test(u.getTokenTypeAt(N(p.line,p.ch-2))))return Z.Pass;h="addFour"}else if(S){var _=p.ch==0?" ":u.getRange(N(p.line,p.ch-1),p);if(!Z.isWordChar(A)&&_!=c&&!Z.isWordChar(_))h="both";else return Z.Pass}else if(I&&(A.length===0||/\s/.test(A)||i.indexOf(A)>-1))h="both";else return Z.Pass;if(!O)O=h;else if(O!=h)return Z.Pass}var v=a%2?l.charAt(a-1):c,P=a%2?c:l.charAt(a+1);u.operation(function(){if(O=="skip")u.execCommand("goCharRight");else if(O=="skipThree")for(var x=0;x<3;x++)u.execCommand("goCharRight");else if(O=="surround"){for(var C=u.getSelections(),x=0;x<C.length;x++)C[x]=v+C[x]+P;u.replaceSelections(C,"around"),C=u.listSelections().slice();for(var x=0;x<C.length;x++)C[x]=b(C[x]);u.setSelections(C)}else O=="both"?(u.replaceSelection(v+P,null),u.triggerElectric(v+P),u.execCommand("goCharLeft")):O=="addFour"&&(u.replaceSelection(v+v+v+v,"before"),u.execCommand("goCharRight"))})}function f(u,c){var o=u.getRange(N(c.line,c.ch-1),N(c.line,c.ch+1));return o.length==2?o:null}function d(u,c){var o=u.getTokenAt(N(c.line,c.ch+1));return/\bstring/.test(o.type)&&o.start==c.ch&&(c.ch==0||!/\bstring/.test(u.getTokenTypeAt(c)))}})},FOrL:function(Ve,se,U){Ve.exports=U.p+"static/nodata.a6b3f948.png"},FPkq:function(Ve,se,U){Ve.exports=U.p+"static/qrCode.dd0fe9b2.png"},FWmy:function(Ve,se,U){"use strict";U.d(se,"a",function(){return Z});function Z(z,N){if(!z)throw new Error(N?`Assertion failed (${N})`:"Assertion Failed")}},GABl:function(Ve,se){Ve.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(Ve,se){Ve.exports=function(Z,z,N,V){var W=N?N.call(V,Z,z):void 0;if(W!==void 0)return!!W;if(Z===z)return!0;if(typeof Z!="object"||!Z||typeof z!="object"||!z)return!1;var M=Object.keys(Z),K=Object.keys(z);if(M.length!==K.length)return!1;for(var H=Object.prototype.hasOwnProperty.bind(z),n=0;n<M.length;n++){var D=M[n];if(!H(D))return!1;var b=Z[D],m=z[D];if(W=N?N.call(V,b,m,D):void 0,W===!1||W===void 0&&b!==m)return!1}return!0}},HmJG:function(Ve,se,U){},HpTS:function(Ve,se,U){Ve.exports=U.p+"static/small_program.f74069ec.png"},I8Z2:function(Ve,se,U){"use strict";U.d(se,"a",function(){return V}),U.d(se,"b",function(){return f}),U.d(se,"c",function(){return u});var Z=U("q1tI"),z=function(){var c=function(o,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var R in i)i.hasOwnProperty(R)&&(a[R]=i[R])},c(o,l)};return function(o,l){c(o,l);function a(){this.constructor=o}o.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}}(),N=Z.createContext(null),V=function(c){z(o,c);function o(){return c!==null&&c.apply(this,arguments)||this}return o.prototype.render=function(){return Z.createElement(N.Provider,{value:this.props.store},this.props.children)},o}(Z.Component),W=U("Gytx"),M=U.n(W),K=U("2mql"),H=U.n(K),n=function(){var c=function(o,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var R in i)i.hasOwnProperty(R)&&(a[R]=i[R])},c(o,l)};return function(o,l){c(o,l);function a(){this.constructor=o}o.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}}(),D=function(){return D=Object.assign||function(c){for(var o,l=1,a=arguments.length;l<a;l++){o=arguments[l];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(c[i]=o[i])}return c},D.apply(this,arguments)};function b(c){return c.displayName||c.name||"Component"}var m=function(){return{}};function f(c,o){o===void 0&&(o={});var l=!!c,a=c||m;return function(R){var S=function(I){n(O,I);function O(E,y){var p=I.call(this,E,y)||this;return p.unsubscribe=null,p.handleChange=function(){if(!p.unsubscribe)return;var h=a(p.store.getState(),p.props);p.setState({subscribed:h})},p.store=p.context,p.state={subscribed:a(p.store.getState(),E),store:p.store,props:E},p}return O.getDerivedStateFromProps=function(E,y){return c&&c.length===2&&E!==y.props?{subscribed:a(y.store.getState(),E),props:E}:{props:E}},O.prototype.componentDidMount=function(){this.trySubscribe()},O.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},O.prototype.shouldComponentUpdate=function(E,y){return!M()(this.props,E)||!M()(this.state.subscribed,y.subscribed)},O.prototype.trySubscribe=function(){l&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},O.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},O.prototype.render=function(){var E=D(D(D({},this.props),this.state.subscribed),{store:this.store});return Z.createElement(R,D({},E,{ref:this.props.miniStoreForwardedRef}))},O.displayName="Connect("+b(R)+")",O.contextType=N,O}(Z.Component);if(o.forwardRef){var T=Z.forwardRef(function(I,O){return Z.createElement(S,D({},I,{miniStoreForwardedRef:O}))});return H()(T,R)}return H()(S,R)}}var d=function(){return d=Object.assign||function(c){for(var o,l=1,a=arguments.length;l<a;l++){o=arguments[l];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(c[i]=o[i])}return c},d.apply(this,arguments)};function u(c){var o=c,l=[];function a(S){o=d(d({},o),S);for(var T=0;T<l.length;T++)l[T]()}function i(){return o}function R(S){return l.push(S),function(){var I=l.indexOf(S);l.splice(I,1)}}return{setState:a,getState:i,subscribe:R}}},IBYe:function(Ve,se,U){"use strict";function Z(z){return null}se.a=Z},J66h:function(Ve,se,U){(function(Z){var z,N;(function(V,W){Ve.exports=W(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Z!="undefined"?Z:this,function(V){"use strict";V=V||{};var W=V.Base64,M="2.6.4",K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=function(v){for(var P={},x=0,C=v.length;x<C;x++)P[v.charAt(x)]=x;return P}(K),n=String.fromCharCode,D=function(v){if(v.length<2){var P=v.charCodeAt(0);return P<128?v:P<2048?n(192|P>>>6)+n(128|P&63):n(224|P>>>12&15)+n(128|P>>>6&63)+n(128|P&63)}else{var P=65536+(v.charCodeAt(0)-55296)*1024+(v.charCodeAt(1)-56320);return n(240|P>>>18&7)+n(128|P>>>12&63)+n(128|P>>>6&63)+n(128|P&63)}},b=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,m=function(v){return v.replace(b,D)},f=function(v){var P=[0,2,1][v.length%3],x=v.charCodeAt(0)<<16|(v.length>1?v.charCodeAt(1):0)<<8|(v.length>2?v.charCodeAt(2):0),C=[K.charAt(x>>>18),K.charAt(x>>>12&63),P>=2?"=":K.charAt(x>>>6&63),P>=1?"=":K.charAt(x&63)];return C.join("")},d=V.btoa&&typeof V.btoa=="function"?function(v){return V.btoa(v)}:function(v){if(v.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return v.replace(/[\s\S]{1,3}/g,f)},u=function(v){return d(m(String(v)))},c=function(v){return v.replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).replace(/=/g,"")},o=function(v,P){return P?c(u(v)):u(v)},l=function(v){return o(v,!0)},a;V.Uint8Array&&(a=function(v,P){for(var x="",C=0,j=v.length;C<j;C+=3){var B=v[C],w=v[C+1],Y=v[C+2],$=B<<16|w<<8|Y;x+=K.charAt($>>>18)+K.charAt($>>>12&63)+(typeof w!="undefined"?K.charAt($>>>6&63):"=")+(typeof Y!="undefined"?K.charAt($&63):"=")}return P?c(x):x});var i=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=function(v){switch(v.length){case 4:var P=(7&v.charCodeAt(0))<<18|(63&v.charCodeAt(1))<<12|(63&v.charCodeAt(2))<<6|63&v.charCodeAt(3),x=P-65536;return n((x>>>10)+55296)+n((x&1023)+56320);case 3:return n((15&v.charCodeAt(0))<<12|(63&v.charCodeAt(1))<<6|63&v.charCodeAt(2));default:return n((31&v.charCodeAt(0))<<6|63&v.charCodeAt(1))}},S=function(v){return v.replace(i,R)},T=function(v){var P=v.length,x=P%4,C=(P>0?H[v.charAt(0)]<<18:0)|(P>1?H[v.charAt(1)]<<12:0)|(P>2?H[v.charAt(2)]<<6:0)|(P>3?H[v.charAt(3)]:0),j=[n(C>>>16),n(C>>>8&255),n(C&255)];return j.length-=[0,0,2,1][x],j.join("")},I=V.atob&&typeof V.atob=="function"?function(v){return V.atob(v)}:function(v){return v.replace(/\S{1,4}/g,T)},O=function(v){return I(String(v).replace(/[^A-Za-z0-9\+\/]/g,""))},E=function(v){return S(I(v))},y=function(v){return String(v).replace(/[-_]/g,function(P){return P=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},p=function(v){return E(y(v))},h;V.Uint8Array&&(h=function(v){return Uint8Array.from(O(y(v)),function(P){return P.charCodeAt(0)})});var A=function(){var v=V.Base64;return V.Base64=W,v};if(V.Base64={VERSION:M,atob:O,btoa:d,fromBase64:p,toBase64:o,utob:m,encode:o,encodeURI:l,btou:S,decode:p,noConflict:A,fromUint8Array:a,toUint8Array:h},typeof Object.defineProperty=="function"){var _=function(v){return{value:v,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_(function(){return p(this)})),Object.defineProperty(String.prototype,"toBase64",_(function(v){return o(this,v)})),Object.defineProperty(String.prototype,"toBase64URI",_(function(){return o(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),Ve.exports?Ve.exports.Base64=V.Base64:!(z=[],N=function(){return V.Base64}.apply(se,z),N!==void 0&&(Ve.exports=N)),{Base64:V.Base64}})}).call(this,U("IyRk"))},JWDV:function(Ve,se,U){Ve.exports=U.p+"static/charpter-white.5fa14f93.svg"},JYp7:function(Ve,se,U){"use strict";U.d(se,"a",function(){return Z});var Z;(function(z){function N(i){return i&&typeof i=="object"&&typeof i[Symbol.iterator]=="function"}z.is=N;const V=Object.freeze([]);function W(){return V}z.empty=W;function*M(i){yield i}z.single=M;function K(i){return i||V}z.from=K;function H(i){return!i||i[Symbol.iterator]().next().done===!0}z.isEmpty=H;function n(i){return i[Symbol.iterator]().next().value}z.first=n;function D(i,R){for(const S of i)if(R(S))return!0;return!1}z.some=D;function b(i,R){for(const S of i)if(R(S))return S;return}z.find=b;function*m(i,R){for(const S of i)R(S)&&(yield S)}z.filter=m;function*f(i,R){let S=0;for(const T of i)yield R(T,S++)}z.map=f;function*d(...i){for(const R of i)for(const S of R)yield S}z.concat=d;function*u(i){for(const R of i)for(const S of R)yield S}z.concatNested=u;function c(i,R,S){let T=S;for(const I of i)T=R(T,I);return T}z.reduce=c;function*o(i,R,S=i.length){for(R<0&&(R+=i.length),S<0?S+=i.length:S>i.length&&(S=i.length);R<S;R++)yield i[R]}z.slice=o;function l(i,R=Number.POSITIVE_INFINITY){const S=[];if(R===0)return[S,i];const T=i[Symbol.iterator]();for(let I=0;I<R;I++){const O=T.next();if(O.done)return[S,z.empty()];S.push(O.value)}return[S,{[Symbol.iterator](){return T}}]}z.consume=l;function a(i,R,S=(T,I)=>T===I){const T=i[Symbol.iterator](),I=R[Symbol.iterator]();for(;;){const O=T.next(),E=I.next();if(O.done!==E.done)return!1;if(O.done)return!0;if(!S(O.value,E.value))return!1}}z.equals=a})(Z||(Z={}))},JeFH:function(Ve,se){Ve.exports="data:image/png;base64,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"},Jq4h:function(Ve,se,U){Ve.exports=U.p+"static/qrcode.2267e4d5.png"},LdHM:function(Ve,se,U){"use strict";U.d(se,"b",function(){return i}),U.d(se,"a",function(){return S});var Z=U("1OyB"),z=U("vuIU"),N=U("Ji7U"),V=U("LK+K"),W=U("q1tI"),M=U("rePB"),K=U("Ff2n"),H=U("ODXe"),n=U("4IlW"),D=U("bX4T"),b=U("YrtM"),m=U("TSYQ"),f=U.n(m),d=U("+nKL"),u=U("8OUc"),c=function(Y,$){var oe=Y.prefixCls,de=Y.id,Be=Y.flattenOptions,Ae=Y.childrenAsData,Re=Y.values,Le=Y.searchValue,Fe=Y.multiple,me=Y.defaultActiveFirstOption,fe=Y.height,ne=Y.itemHeight,xe=Y.notFoundContent,ce=Y.open,Ne=Y.menuItemSelectedIcon,He=Y.virtual,ke=Y.onSelect,Ye=Y.onToggleOpen,et=Y.onActiveValue,ue=Y.onScroll,_e=Y.onMouseEnter,Oe="".concat(oe,"-item"),Me=Object(b.a)(function(){return Be},[ce,Be],function(Xe,Se){return Se[0]&&Xe[1]!==Se[1]}),rt=W.useRef(null),dt=function(Se){Se.preventDefault()},pt=function(Se){rt.current&&rt.current.scrollTo({index:Se})},ut=function(Se){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ee=Me.length,ie=0;ie<Ee;ie+=1){var ae=(Se+ie*ge+Ee)%Ee,he=Me[ae],ve=he.group,Te=he.data;if(!ve&&!Te.disabled)return ae}return-1},_t=W.useState(function(){return ut(0)}),Tt=Object(H.a)(_t,2),Pe=Tt[0],Ce=Tt[1],tt=function(Se){Ce(Se);var ge=Me[Se];if(!ge){et(null,-1);return}et(ge.data.value,Se)};W.useEffect(function(){tt(me!==!1?ut(0):-1)},[Me.length,Le]),W.useEffect(function(){var Xe=setTimeout(function(){if(!Fe&&ce&&Re.size===1){var Se=Array.from(Re)[0],ge=Me.findIndex(function(Ee){var ie=Ee.data;return ie.value===Se});tt(ge),pt(ge)}});return function(){return clearTimeout(Xe)}},[ce]);var lt=function(Se){Se!==void 0&&ke(Se,{selected:!Re.has(Se)}),Fe||Ye(!1)};if(W.useImperativeHandle($,function(){return{onKeyDown:function(Se){var ge=Se.which;switch(ge){case n.a.UP:case n.a.DOWN:{var Ee=0;if(ge===n.a.UP?Ee=-1:ge===n.a.DOWN&&(Ee=1),Ee!==0){var ie=ut(Pe+Ee,Ee);pt(ie),tt(ie)}break}case n.a.ENTER:{var ae=Me[Pe];ae&&!ae.data.disabled?lt(ae.data.value):lt(void 0),ce&&Se.preventDefault();break}case n.a.ESC:Ye(!1)}},onKeyUp:function(){},scrollTo:function(Se){pt(Se)}}}),Me.length===0)return W.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(Oe,"-empty"),onMouseDown:dt},xe);function Ke(Xe){var Se=Me[Xe];if(!Se)return null;var ge=Se.data||{},Ee=ge.value,ie=ge.label,ae=ge.children,he=Object(D.a)(ge,!0),ve=Ae?ae:ie;return Se?W.createElement("div",Object.assign({"aria-label":typeof ve=="string"?ve:null},he,{key:Xe,role:"option",id:"".concat(de,"_list_").concat(Xe),"aria-selected":Re.has(Ee)}),Ee):null}return W.createElement(W.Fragment,null,W.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ke(Pe-1),Ke(Pe),Ke(Pe+1)),W.createElement(d.a,{itemKey:"key",ref:rt,data:Me,height:fe,itemHeight:ne,fullHeight:!1,onMouseDown:dt,onScroll:ue,virtual:He,onMouseEnter:_e},function(Xe,Se){var ge,Ee=Xe.group,ie=Xe.groupOption,ae=Xe.data,he=ae.label,ve=ae.key;if(Ee)return W.createElement("div",{className:f()(Oe,"".concat(Oe,"-group"))},he!==void 0?he:ve);var Te=ae.disabled,Ge=ae.value,ot=ae.title,xt=ae.children,Ot=ae.style,wt=ae.className,vt=Object(K.a)(ae,["disabled","value","title","children","style","className"]),qe=Re.has(Ge),Qe="".concat(Oe,"-option"),Ue=f()(Oe,Qe,wt,(ge={},Object(M.a)(ge,"".concat(Qe,"-grouped"),ie),Object(M.a)(ge,"".concat(Qe,"-active"),Pe===Se&&!Te),Object(M.a)(ge,"".concat(Qe,"-disabled"),Te),Object(M.a)(ge,"".concat(Qe,"-selected"),qe),ge)),le=Ae?xt:he,pe=!Ne||typeof Ne=="function"||qe;return W.createElement("div",Object.assign({},vt,{"aria-selected":qe,className:Ue,title:ot,onMouseMove:function(){if(Pe===Se||Te)return;tt(Se)},onClick:function(){Te||lt(Ge)},style:Ot}),W.createElement("div",{className:"".concat(Qe,"-content")},le||Ge),W.isValidElement(Ne)||qe,pe&&W.createElement(u.a,{className:"".concat(Oe,"-option-state"),customizeIcon:Ne,customizeIconProps:{isSelected:qe}},qe?"\u2713":null))}))},o=W.forwardRef(c);o.displayName="OptionList";var l=o,a=function(){return null};a.isSelectOption=!0;var i=a,R=function(){return null};R.isSelectOptGroup=!0;var S=R,T=U("VTBJ"),I=U("Zm9Q");function O(w){var Y=w.key,$=w.props,oe=$.children,de=$.value,Be=Object(K.a)($,["children","value"]);return Object(T.a)({key:Y,value:de!==void 0?de:Y,children:oe},Be)}function E(w){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(I.a)(w).map(function($,oe){if(!W.isValidElement($)||!$.type)return null;var de=$.type.isSelectOptGroup,Be=$.key,Ae=$.props,Re=Ae.children,Le=Object(K.a)(Ae,["children"]);return Y||!de?O($):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(Be===null?oe:Be,"__"),label:Be},Le),{},{options:E(Re)})}).filter(function($){return $})}var y=U("2Qr1"),p=U("qNPg"),h=U("U8pU"),A=U("Kwbf"),_=U("WKfj");function v(w){var Y=w.mode,$=w.options,oe=w.children,de=w.backfill,Be=w.allowClear,Ae=w.placeholder,Re=w.getInputElement,Le=w.showSearch,Fe=w.onSearch,me=w.defaultOpen,fe=w.autoFocus,ne=w.labelInValue,xe=w.value,ce=w.inputValue,Ne=w.optionLabelProp,He=Y==="multiple"||Y==="tags",ke=Le!==void 0?Le:He||Y==="combobox",Ye=$||E(oe);if(Object(A.a)(Y!=="tags"||Ye.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var et=Ye.some(function(Oe){return Oe.options?Oe.options.some(function(Me){return typeof("value"in Me?Me.value:Me.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});Object(A.a)(!et,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(A.a)(Y!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(A.a)(Y==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(A.a)(Y==="combobox"||!Re,"`getInputElement` only work with `combobox` mode."),Object(A.b)(Y!=="combobox"||!Re||!Be||!Ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fe&&!ke&&Y!=="combobox"&&Y!=="tags"&&Object(A.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(A.b)(!me||fe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),xe!=null){var ue=Object(_.d)(xe);Object(A.a)(!ne||ue.every(function(Oe){return Object(h.a)(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(A.a)(!He||Array.isArray(xe),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var _e=null;Object(I.a)(oe).some(function(Oe){if(!W.isValidElement(Oe)||!Oe.type)return!1;var Me=Oe.type;if(Me.isSelectOption)return!1;if(Me.isSelectOptGroup){var rt=Object(I.a)(Oe.props.children).every(function(dt){return!W.isValidElement(dt)||!Oe.type||dt.type.isSelectOption?!0:(_e=dt.type,!1)});return!rt}return _e=Me,!0}),_e&&Object(A.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),Object(A.a)(ce===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=v,x=Object(p.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:E,flattenOptions:y.d,getLabeledValue:y.e,filterOptions:y.b,isValueDisabled:y.g,findValueOption:y.c,warningProps:P,fillOptionsWithMissingValue:y.a}),C=function(w){Object(N.a)($,w);var Y=Object(V.a)($);function $(){var oe;return Object(Z.a)(this,$),oe=Y.apply(this,arguments),oe.selectRef=W.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(z.a)($,[{key:"render",value:function(){return W.createElement(x,Object.assign({ref:this.selectRef},this.props))}}]),$}(W.Component);C.Option=i,C.OptGroup=S;var j=C,B=se.c=j},M8RZ:function(Ve,se,U){"use strict";U.d(se,"a",function(){return n});var Z=U("fWQN"),z=U("mtLc"),N=U("yKVA"),V=U("879j"),W=U("q1tI"),M=U.n(W),K=U("i8i4"),H=U.n(K),n=function(D){Object(N.a)(m,D);var b=Object(V.a)(m);function m(f){var d;Object(Z.a)(this,m),d=b.call(this,f);var u=window.document;return d.node=u.createElement("div"),u.body.appendChild(d.node),d}return Object(z.a)(m,[{key:"render",value:function(){var d=this.props.children;return Object(K.createPortal)(d,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(M.a.Component)},MI8n:function(Ve,se,U){"use strict";U.d(se,"c",function(){return W}),U.d(se,"b",function(){return n}),U.d(se,"e",function(){return D}),U.d(se,"a",function(){return b}),U.d(se,"d",function(){return m}),U.d(se,"f",function(){return f});var Z=U("/cxE"),z=U("pmY6"),N=U("24hK"),V=U("5Y4S"),W;(function(d){d.None=()=>z.a.None;function u(v){return(P,x=null,C)=>{let j=!1,B;return B=v(w=>j?void 0:(B?B.dispose():j=!0,P.call(x,w)),null,C),j&&B.dispose(),B}}d.once=u;function c(v,P){return S((x,C=null,j)=>v(B=>x.call(C,P(B)),null,j))}d.map=c;function o(v,P){return S((x,C=null,j)=>v(B=>{P(B),x.call(C,B)},null,j))}d.forEach=o;function l(v,P){return S((x,C=null,j)=>v(B=>P(B)&&x.call(C,B),null,j))}d.filter=l;function a(v){return v}d.signal=a;function i(...v){return(P,x=null,C)=>Object(z.e)(...v.map(j=>j(B=>P.call(x,B),null,C)))}d.any=i;function R(v,P,x){let C=x;return c(v,j=>(C=P(C,j),C))}d.reduce=R;function S(v){let P;const x=new n({onFirstListenerAdd(){P=v(x.fire,x)},onLastListenerRemove(){P.dispose()}});return x.event}function T(v,P,x=100,C=!1,j){let B,w,Y,$=0;const oe=new n({leakWarningThreshold:j,onFirstListenerAdd(){B=v(de=>{$++,w=P(w,de),C&&!Y&&(oe.fire(w),w=void 0),clearTimeout(Y),Y=setTimeout(()=>{const Be=w;w=void 0,Y=void 0,(!C||$>1)&&oe.fire(Be),$=0},x)})},onLastListenerRemove(){B.dispose()}});return oe.event}d.debounce=T;function I(v,P=(x,C)=>x===C){let x=!0,C;return l(v,j=>{const B=x||!P(j,C);return x=!1,C=j,B})}d.latch=I;function O(v,P){return[d.filter(v,P),d.filter(v,x=>!P(x))]}d.split=O;function E(v,P=!1,x=[]){let C=x.slice(),j=v(Y=>{C?C.push(Y):w.fire(Y)});const B=()=>{C&&C.forEach(Y=>w.fire(Y)),C=null},w=new n({onFirstListenerAdd(){j||(j=v(Y=>w.fire(Y)))},onFirstListenerDidAdd(){C&&(P?setTimeout(B):B())},onLastListenerRemove(){j&&j.dispose(),j=null}});return w.event}d.buffer=E;class y{constructor(v){this.event=v}map(v){return new y(c(this.event,v))}forEach(v){return new y(o(this.event,v))}filter(v){return new y(l(this.event,v))}reduce(v,P){return new y(R(this.event,v,P))}latch(){return new y(I(this.event))}debounce(v,P=100,x=!1,C){return new y(T(this.event,v,P,x,C))}on(v,P,x){return this.event(v,P,x)}once(v,P,x){return u(this.event)(v,P,x)}}function p(v){return new y(v)}d.chain=p;function h(v,P,x=C=>C){const C=(...Y)=>w.fire(x(...Y)),j=()=>v.on(P,C),B=()=>v.removeListener(P,C),w=new n({onFirstListenerAdd:j,onLastListenerRemove:B});return w.event}d.fromNodeEventEmitter=h;function A(v,P,x=C=>C){const C=(...Y)=>w.fire(x(...Y)),j=()=>v.addEventListener(P,C),B=()=>v.removeEventListener(P,C),w=new n({onFirstListenerAdd:j,onLastListenerRemove:B});return w.event}d.fromDOMEventEmitter=A;function _(v){return new Promise(P=>u(v)(P))}d.toPromise=_})(W||(W={}));class M{constructor(d){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${d}_${M._idPool++}`}start(d){this._stopWatch=new V.a(!0),this._listenerCount=d}stop(){if(this._stopWatch){const d=this._stopWatch.elapsed();this._elapsedOverall+=d,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${d.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let K=-1;class H{constructor(d,u=Math.random().toString(18).slice(2,5)){this.customThreshold=d,this.name=u,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(d){let u=K;if(typeof this.customThreshold=="number"&&(u=this.customThreshold),u<=0||d<u)return;this._stacks||(this._stacks=new Map);const c=new Error().stack.split(`
`).slice(3).join(`
`),o=this._stacks.get(c)||0;if(this._stacks.set(c,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=u*.5;let l,a=0;for(const[i,R]of this._stacks)(!l||a<R)&&(l=i,a=R);console.warn(`[${this.name}] potential listener LEAK detected, having ${d} listeners already. MOST frequent listener (${a}):`),console.warn(l)}return()=>{const l=this._stacks.get(c)||0;this._stacks.set(c,l-1)}}}class n{constructor(d){var u;this._disposed=!1,this._options=d,this._leakageMon=K>0?new H(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((u=this._options)===null||u===void 0?void 0:u._profName)?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(d,u,c)=>{var o;this._listeners||(this._listeners=new N.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(u?[d,u]:d);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,d,u);const i=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),R=Object(z.i)(()=>{if(i&&i(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const S=this._listeners&&!this._listeners.isEmpty();S||this._options.onLastListenerRemove(this)}});return c instanceof z.b?c.add(R):Array.isArray(c)&&c.push(R),R}),this._event}fire(d){var u,c;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new N.a);for(let o of this._listeners)this._deliveryQueue.push([o,d]);for((u=this._perfMon)===null||u===void 0||u.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,l]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,l):o[0].call(o[1],l)}catch(a){Object(Z.f)(a)}}(c=this._perfMon)===null||c===void 0||c.stop()}}dispose(){var d,u,c,o,l;this._disposed||(this._disposed=!0,(d=this._listeners)===null||d===void 0||d.clear(),(u=this._deliveryQueue)===null||u===void 0||u.clear(),(o=(c=this._options)===null||c===void 0?void 0:c.onLastListenerRemove)===null||o===void 0||o.call(c),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class D extends n{constructor(d){super(d);this._isPaused=0,this._eventQueue=new N.a,this._mergeFn=d==null?void 0:d.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const d=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(d))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(d){this._listeners&&(this._isPaused!==0?this._eventQueue.push(d):super.fire(d))}}class b extends D{constructor(d){var u;super(d);this._delay=(u=d.delay)!==null&&u!==void 0?u:100}fire(d){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(d)}}class m{constructor(){this.buffers=[]}wrapEvent(d){return(u,c,o)=>d(l=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>u.call(c,l)):u.call(c,l)},void 0,o)}bufferEvents(d){const u=[];this.buffers.push(u);const c=d();return this.buffers.pop(),u.forEach(o=>o()),c}}class f{constructor(){this.listening=!1,this.inputEvent=W.None,this.inputEventListener=z.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(d){this.inputEvent=d,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=d(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Ve,se,U){"use strict";(function(Z,z){U.d(se,"b",function(){return c}),U.d(se,"i",function(){return i}),U.d(se,"f",function(){return R}),U.d(se,"d",function(){return S}),U.d(se,"g",function(){return T}),U.d(se,"h",function(){return I}),U.d(se,"c",function(){return O}),U.d(se,"k",function(){return E}),U.d(se,"j",function(){return y}),U.d(se,"a",function(){return p}),U.d(se,"e",function(){return _});var N;const V="en";let W=!1,M=!1,K=!1,H=!1,n=!1,D=!1,b=!1,m,f=V,d,u;const c=typeof self=="object"?self:typeof Z=="object"?Z:{};let o;typeof c.vscode!="undefined"&&typeof c.vscode.process!="undefined"?o=c.vscode.process:typeof z!="undefined"&&(o=z);const l=typeof((N=o==null?void 0:o.versions)===null||N===void 0?void 0:N.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!l)u=navigator.userAgent,W=u.indexOf("Windows")>=0,M=u.indexOf("Macintosh")>=0,b=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=u.indexOf("Linux")>=0,D=!0,m=navigator.language,f=m;else if(typeof o=="object"){W=o.platform==="win32",M=o.platform==="darwin",K=o.platform==="linux",H=K&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,m=V,f=V;const v=o.env.VSCODE_NLS_CONFIG;if(v)try{const P=JSON.parse(v),x=P.availableLanguages["*"];m=P.locale,f=x||V,d=P._translationsConfigFile}catch(P){}n=!0}else console.error("Unable to resolve platform.");let a=0;M?a=1:W?a=3:K&&(a=2);const i=W,R=M,S=K,T=n,I=D,O=b,E=u,y=function(){if(c.setImmediate)return c.setImmediate.bind(c);if(typeof c.postMessage=="function"&&!c.importScripts){let x=[];c.addEventListener("message",j=>{if(j.data&&j.data.vscodeSetImmediateId)for(let B=0,w=x.length;B<w;B++){const Y=x[B];if(Y.id===j.data.vscodeSetImmediateId){x.splice(B,1),Y.callback();return}}});let C=0;return j=>{const B=++C;x.push({id:B,callback:j}),c.postMessage({vscodeSetImmediateId:B},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const P=Promise.resolve();return x=>P.then(x)}(),p=M||b?2:W?1:3;let h=!0,A=!1;function _(){if(!A){A=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const P=new Uint16Array(v.buffer);h=P[0]===(2<<8)+1}return h}}).call(this,U("IyRk"),U("Q2Ig"))},N0LK:function(Ve,se,U){"use strict";U.d(se,"C",function(){return Z}),U.d(se,"v",function(){return N}),U.d(se,"s",function(){return V}),U.d(se,"t",function(){return W}),U.d(se,"U",function(){return M}),U.d(se,"J",function(){return K}),U.d(se,"O",function(){return H}),U.d(se,"p",function(){return n}),U.d(se,"T",function(){return D}),U.d(se,"q",function(){return b}),U.d(se,"N",function(){return m}),U.d(se,"M",function(){return f}),U.d(se,"Q",function(){return d}),U.d(se,"u",function(){return u}),U.d(se,"x",function(){return c}),U.d(se,"I",function(){return o}),U.d(se,"f",function(){return l}),U.d(se,"h",function(){return a}),U.d(se,"g",function(){return i}),U.d(se,"i",function(){return R}),U.d(se,"G",function(){return S}),U.d(se,"H",function(){return T}),U.d(se,"r",function(){return I}),U.d(se,"R",function(){return O}),U.d(se,"d",function(){return E}),U.d(se,"e",function(){return y}),U.d(se,"E",function(){return p}),U.d(se,"F",function(){return h}),U.d(se,"j",function(){return A}),U.d(se,"z",function(){return _}),U.d(se,"K",function(){return P}),U.d(se,"L",function(){return x}),U.d(se,"m",function(){return j}),U.d(se,"k",function(){return w}),U.d(se,"A",function(){return $}),U.d(se,"a",function(){return oe}),U.d(se,"n",function(){return de}),U.d(se,"l",function(){return Be}),U.d(se,"D",function(){return Ae}),U.d(se,"B",function(){return Re}),U.d(se,"b",function(){return Le}),U.d(se,"S",function(){return Fe}),U.d(se,"o",function(){return me}),U.d(se,"P",function(){return fe}),U.d(se,"w",function(){return ne}),U.d(se,"c",function(){return xe}),U.d(se,"y",function(){return He});function Z(ue){return!ue||typeof ue!="string"?!0:ue.trim().length===0}const z=/{(\d+)}/g;function N(ue,..._e){return _e.length===0?ue:ue.replace(z,function(Oe,Me){const rt=parseInt(Me,10);return isNaN(rt)||rt<0||rt>=_e.length?Oe:_e[rt]})}function V(ue){return ue.replace(/[<>&]/g,function(_e){switch(_e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return _e}})}function W(ue){return ue.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(ue,_e=" "){const Oe=K(ue,_e);return H(Oe,_e)}function K(ue,_e){if(!ue||!_e)return ue;const Oe=_e.length;if(Oe===0||ue.length===0)return ue;let Me=0;for(;ue.indexOf(_e,Me)===Me;)Me=Me+Oe;return ue.substring(Me)}function H(ue,_e){if(!ue||!_e)return ue;const Oe=_e.length,Me=ue.length;if(Oe===0||Me===0)return ue;let rt=Me,dt=-1;for(;!(dt=ue.lastIndexOf(_e,rt-1),dt===-1||dt+Oe!==rt);){if(dt===0)return"";rt=dt}return ue.substring(0,rt)}function n(ue){return ue.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function D(ue){return ue.replace(/\*/g,"")}function b(ue,_e,Oe={}){if(!ue)throw new Error("Cannot create regex from empty string");_e||(ue=W(ue)),Oe.wholeWord&&(/\B/.test(ue.charAt(0))||(ue="\\b"+ue),/\B/.test(ue.charAt(ue.length-1))||(ue=ue+"\\b"));let Me="";return Oe.global&&(Me+="g"),Oe.matchCase||(Me+="i"),Oe.multiline&&(Me+="m"),Oe.unicode&&(Me+="u"),new RegExp(ue,Me)}function m(ue){if(ue.source==="^"||ue.source==="^$"||ue.source==="$"||ue.source==="^\\s*$")return!1;const _e=ue.exec("");return!!(_e&&ue.lastIndex===0)}function f(ue){return(ue.global?"g":"")+(ue.ignoreCase?"i":"")+(ue.multiline?"m":"")+(ue.unicode?"u":"")}function d(ue){return ue.split(/\r\n|\r|\n/)}function u(ue){for(let _e=0,Oe=ue.length;_e<Oe;_e++){const Me=ue.charCodeAt(_e);if(Me!==32&&Me!==9)return _e}return-1}function c(ue,_e=0,Oe=ue.length){for(let Me=_e;Me<Oe;Me++){const rt=ue.charCodeAt(Me);if(rt!==32&&rt!==9)return ue.substring(_e,Me)}return ue.substring(_e,Oe)}function o(ue,_e=ue.length-1){for(let Oe=_e;Oe>=0;Oe--){const Me=ue.charCodeAt(Oe);if(Me!==32&&Me!==9)return Oe}return-1}function l(ue,_e){return ue<_e?-1:ue>_e?1:0}function a(ue,_e,Oe=0,Me=ue.length,rt=0,dt=_e.length){for(;Oe<Me&&rt<dt;Oe++,rt++){let _t=ue.charCodeAt(Oe),Tt=_e.charCodeAt(rt);if(_t<Tt)return-1;if(_t>Tt)return 1}const pt=Me-Oe,ut=dt-rt;return pt<ut?-1:pt>ut?1:0}function i(ue,_e){return R(ue,_e,0,ue.length,0,_e.length)}function R(ue,_e,Oe=0,Me=ue.length,rt=0,dt=_e.length){for(;Oe<Me&&rt<dt;Oe++,rt++){let _t=ue.charCodeAt(Oe),Tt=_e.charCodeAt(rt);if(_t===Tt)continue;if(_t>=128||Tt>=128)return a(ue.toLowerCase(),_e.toLowerCase(),Oe,Me,rt,dt);S(_t)&&(_t-=32),S(Tt)&&(Tt-=32);const Pe=_t-Tt;if(Pe===0)continue;return Pe}const pt=Me-Oe,ut=dt-rt;return pt<ut?-1:pt>ut?1:0}function S(ue){return ue>=97&&ue<=122}function T(ue){return ue>=65&&ue<=90}function I(ue,_e){return ue.length===_e.length&&R(ue,_e)===0}function O(ue,_e){const Oe=_e.length;return _e.length>ue.length?!1:R(ue,_e,0,Oe)===0}function E(ue,_e){let Oe,Me=Math.min(ue.length,_e.length);for(Oe=0;Oe<Me;Oe++)if(ue.charCodeAt(Oe)!==_e.charCodeAt(Oe))return Oe;return Me}function y(ue,_e){let Oe,Me=Math.min(ue.length,_e.length);const rt=ue.length-1,dt=_e.length-1;for(Oe=0;Oe<Me;Oe++)if(ue.charCodeAt(rt-Oe)!==_e.charCodeAt(dt-Oe))return Oe;return Me}function p(ue){return 55296<=ue&&ue<=56319}function h(ue){return 56320<=ue&&ue<=57343}function A(ue,_e){return(ue-55296<<10)+(_e-56320)+65536}function _(ue,_e,Oe){const Me=ue.charCodeAt(Oe);if(p(Me)&&Oe+1<_e){const rt=ue.charCodeAt(Oe+1);if(h(rt))return A(Me,rt)}return Me}function v(ue,_e){const Oe=ue.charCodeAt(_e-1);if(h(Oe)&&_e>1){const Me=ue.charCodeAt(_e-2);if(p(Me))return A(Me,Oe)}return Oe}function P(ue,_e){const Oe=ce.getInstance(),Me=_e,rt=ue.length,dt=_(ue,rt,_e);_e+=dt>=65536?2:1;let pt=Oe.getGraphemeBreakType(dt);for(;_e<rt;){const ut=_(ue,rt,_e),_t=Oe.getGraphemeBreakType(ut);if(xe(pt,_t))break;_e+=ut>=65536?2:1,pt=_t}return _e-Me}function x(ue,_e){const Oe=ce.getInstance(),Me=_e,rt=v(ue,_e);_e-=rt>=65536?2:1;let dt=Oe.getGraphemeBreakType(rt);for(;_e>0;){const pt=v(ue,_e),ut=Oe.getGraphemeBreakType(pt);if(xe(ut,dt))break;_e-=pt>=65536?2:1,dt=ut}return Me-_e}const C=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function j(ue){return C.test(ue)}const B=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function w(ue){return B.test(ue)}const Y=/^[\t\n\r\x20-\x7E]*$/;function $(ue){return Y.test(ue)}const oe=/[\u2028\u2029]/;function de(ue){return oe.test(ue)}function Be(ue){for(let _e=0,Oe=ue.length;_e<Oe;_e++)if(Ae(ue.charCodeAt(_e)))return!0;return!1}function Ae(ue){return ue=+ue,ue>=11904&&ue<=55215||ue>=63744&&ue<=64255||ue>=65281&&ue<=65374}function Re(ue){return ue>=127462&&ue<=127487||ue===8986||ue===8987||ue===9200||ue===9203||ue>=9728&&ue<=10175||ue===11088||ue===11093||ue>=127744&&ue<=128591||ue>=128640&&ue<=128764||ue>=128992&&ue<=129003||ue>=129280&&ue<=129535||ue>=129648&&ue<=129750}const Le=String.fromCharCode(65279);function Fe(ue){return!!(ue&&ue.length>0&&ue.charCodeAt(0)===65279)}function me(ue,_e=!1){return ue?(_e&&(ue=ue.replace(/\\./g,"")),ue.toLowerCase()!==ue):!1}function fe(ue){const _e=90-65+1;return ue=ue%(2*_e),ue<_e?String.fromCharCode(97+ue):String.fromCharCode(65+ue-_e)}function ne(ue){const _e=ce.getInstance();return _e.getGraphemeBreakType(ue)}function xe(ue,_e){return ue===0?_e!==5&&_e!==7:ue===2&&_e===3?!1:ue===4||ue===2||ue===3||(_e===4||_e===2||_e===3)?!0:ue===8&&(_e===8||_e===9||_e===11||_e===12)||((ue===11||ue===9)&&(_e===9||_e===10)||((ue===12||ue===10)&&_e===10||(_e===5||_e===13||(_e===7||(ue===1||ue===13&&_e===14)))))?!1:!(ue===6&&_e===6)}class ce{constructor(){this._data=Ne()}static getInstance(){return ce._INSTANCE||(ce._INSTANCE=new ce),ce._INSTANCE}getGraphemeBreakType(ue){if(ue<32)return ue===10?3:ue===13?2:4;if(ue<127)return 0;const _e=this._data,Oe=_e.length/3;let Me=1;for(;Me<=Oe;)if(ue<_e[3*Me])Me=2*Me;else if(ue>_e[3*Me+1])Me=2*Me+1;else return _e[3*Me+2];return 0}}ce._INSTANCE=null;function Ne(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function He(ue,_e){if(ue===0)return 0;const Oe=ke(ue,_e);if(Oe!==void 0)return Oe;const Me=v(_e,ue);return ue-=Ye(Me),ue}function ke(ue,_e){let Oe=v(_e,ue);for(ue-=Ye(Oe);et(Oe)||Oe===65039||Oe===8419;){if(ue===0)return;Oe=v(_e,ue),ue-=Ye(Oe)}if(!Re(Oe))return;if(ue>=0){const Me=v(_e,ue);Me===8205&&(ue-=Ye(Me))}return ue}function Ye(ue){return ue>=65536?2:1}function et(ue){return 127995<=ue&&ue<=127999}},Nmxd:function(Ve,se){Ve.exports="data:image/png;base64,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"},NvD2:function(Ve,se,U){"use strict";U.d(se,"a",function(){return M});var Z=U("Kwbf");function z(K,H){var n=new Set;return K.forEach(function(D){H.has(D)||n.add(D)}),n}function N(K){var H=K||{},n=H.disabled,D=H.disableCheckbox,b=H.checkable;return!!(n||D)||b===!1}function V(K,H,n,D){for(var b=new Set(K),m=new Set,f=0;f<=n;f+=1){var d=H.get(f)||new Set;d.forEach(function(l){var a=l.key,i=l.node,R=l.children,S=R===void 0?[]:R;b.has(a)&&!D(i)&&S.filter(function(T){return!D(T.node)}).forEach(function(T){b.add(T.key)})})}for(var u=new Set,c=n;c>=0;c-=1){var o=H.get(c)||new Set;o.forEach(function(l){var a=l.parent,i=l.node;if(D(i)||!l.parent||u.has(l.parent.key))return;if(D(l.parent.node)){u.add(a.key);return}var R=!0,S=!1;(a.children||[]).filter(function(T){return!D(T.node)}).forEach(function(T){var I=T.key,O=b.has(I);R&&!O&&(R=!1),!S&&(O||m.has(I))&&(S=!0)}),R&&b.add(a.key),S&&m.add(a.key),u.add(a.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(z(m,b))}}function W(K,H,n,D,b){for(var m=new Set(K),f=new Set(H),d=0;d<=D;d+=1){var u=n.get(d)||new Set;u.forEach(function(a){var i=a.key,R=a.node,S=a.children,T=S===void 0?[]:S;!m.has(i)&&!f.has(i)&&!b(R)&&T.filter(function(I){return!b(I.node)}).forEach(function(I){m.delete(I.key)})})}f=new Set;for(var c=new Set,o=D;o>=0;o-=1){var l=n.get(o)||new Set;l.forEach(function(a){var i=a.parent,R=a.node;if(b(R)||!a.parent||c.has(a.parent.key))return;if(b(a.parent.node)){c.add(i.key);return}var S=!0,T=!1;(i.children||[]).filter(function(I){return!b(I.node)}).forEach(function(I){var O=I.key,E=m.has(O);S&&!E&&(S=!1),!T&&(E||f.has(O))&&(T=!0)}),S||m.delete(i.key),T&&f.add(i.key),c.add(i.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(z(f,m))}}function M(K,H,n,D){var b=[],m;D?m=D:m=N;var f=new Set(K.filter(function(o){var l=!!n[o];return l||b.push(o),l})),d=new Map,u=0;Object.keys(n).forEach(function(o){var l=n[o],a=l.level,i=d.get(a);i||(i=new Set,d.set(a,i)),i.add(l),u=Math.max(u,a)}),Object(Z.a)(!b.length,"Tree missing follow keys: ".concat(b.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var c;return H===!0?c=V(f,d,u,m):c=W(f,H.halfCheckedKeys,d,u,m),c}},OLES:function(Ve,se,U){"use strict";var Z=U("U8pU"),z=U("VTBJ"),N=U("Ff2n"),V=U("q1tI"),W=U("uciX"),M=U("7ixt"),K=function(f){var d=f.overlay,u=f.prefixCls,c=f.id,o=f.overlayInnerStyle;return V.createElement("div",{className:"".concat(u,"-inner"),id:c,role:"tooltip",style:o},typeof d=="function"?d():d)},H=K,n=function(f,d){var u=f.overlayClassName,c=f.trigger,o=c===void 0?["hover"]:c,l=f.mouseEnterDelay,a=l===void 0?0:l,i=f.mouseLeaveDelay,R=i===void 0?.1:i,S=f.overlayStyle,T=f.prefixCls,I=T===void 0?"rc-tooltip":T,O=f.children,E=f.onVisibleChange,y=f.afterVisibleChange,p=f.transitionName,h=f.animation,A=f.placement,_=A===void 0?"right":A,v=f.align,P=v===void 0?{}:v,x=f.destroyTooltipOnHide,C=x===void 0?!1:x,j=f.defaultVisible,B=f.getTooltipContainer,w=f.overlayInnerStyle,Y=Object(N.a)(f,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),$=Object(V.useRef)(null);Object(V.useImperativeHandle)(d,function(){return $.current});var oe=Object(z.a)({},Y);"visible"in f&&(oe.popupVisible=f.visible);var de=function(){var Fe=f.arrowContent,me=Fe===void 0?null:Fe,fe=f.overlay,ne=f.id;return[V.createElement("div",{className:"".concat(I,"-arrow"),key:"arrow"},me),V.createElement(H,{key:"content",prefixCls:I,id:ne,overlay:fe,overlayInnerStyle:w})]},Be=!1,Ae=!1;if(typeof C=="boolean")Be=C;else if(C&&Object(Z.a)(C)==="object"){var Re=C.keepParent;Be=Re===!0,Ae=Re===!1}return V.createElement(W.a,Object.assign({popupClassName:u,prefixCls:I,popup:de,action:o,builtinPlacements:M.a,popupPlacement:_,ref:$,popupAlign:P,getPopupContainer:B,onPopupVisibleChange:E,afterPopupVisibleChange:y,popupTransitionName:p,popupAnimation:h,defaultPopupVisible:j,destroyPopupOnHide:Be,autoDestroy:Ae,mouseLeaveDelay:R,popupStyle:S,mouseEnterDelay:a},oe),O)},D=Object(V.forwardRef)(n),b=se.a=D},OZM5:function(Ve,se,U){"use strict";U.d(se,"b",function(){return D}),U.d(se,"a",function(){return b}),U.d(se,"k",function(){return m}),U.d(se,"h",function(){return f}),U.d(se,"i",function(){return d}),U.d(se,"g",function(){return u}),U.d(se,"c",function(){return c}),U.d(se,"d",function(){return o}),U.d(se,"j",function(){return i}),U.d(se,"e",function(){return R}),U.d(se,"f",function(){return S});var Z=U("KQm4"),z=U("U8pU"),N=U("Ff2n"),V=U("q1tI"),W=U.n(V),M=U("Kwbf"),K=U("WaYH"),H=.25,n=2;function D(T,I){var O=T.slice(),E=O.indexOf(I);return E>=0&&O.splice(E,1),O}function b(T,I){var O=T.slice();return O.indexOf(I)===-1&&O.push(I),O}function m(T){return T.split("-")}function f(T,I){return"".concat(T,"-").concat(I)}function d(T){return T&&T.type&&T.type.isTreeNode}function u(T,I){var O=[T],E=I[T];function y(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(h){var A=h.key,_=h.children;O.push(A),y(_)})}return y(E.children),O}function c(T,I){var O=T.clientY,E=I.selectHandle.getBoundingClientRect(),y=E.top,p=E.bottom,h=E.height,A=Math.max(h*H,n);return O<=y+A?-1:O>=p-A?1:0}function o(T,I){if(!T)return;var O=I.multiple;return O?T.slice():T.length?[T[0]]:T}var l=function(I){return I};function a(T,I){if(!T)return[];var O=I||{},E=O.processProps,y=E===void 0?l:E,p=Array.isArray(T)?T:[T];return p.map(function(h){var A=h.children,_=Object(N.a)(h,["children"]),v=a(A,I);return W.a.createElement(K.a,Object.assign({},y(_)),v)})}function i(T){if(!T)return null;var I;if(Array.isArray(T))I={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(z.a)(T)==="object")I={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(M.a)(!1,"`checkedKeys` is not an array or an object"),null;return I}function R(T,I){var O=new Set;function E(y){if(O.has(y))return;var p=I[y];if(!p)return;O.add(y);var h=p.parent,A=p.node;if(A.disabled)return;h&&E(h.key)}return(T||[]).forEach(function(y){E(y)}),Object(Z.a)(O)}function S(T){var I={};return Object.keys(T).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(I[O]=T[O])}),I}},Ohmc:function(Ve,se,U){Ve.exports=U.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(Ve,se,U){"use strict";var Z=U("2qtc"),z=U("kLXV"),N=U("rAM+"),V=U("miYZ"),W=U("tsqr"),M=U("9og8"),K=U("tJVT"),H=U("jrin"),n=U("WmNS"),D=U.n(n),b=U("q1tI"),m=U.n(b),f=U("VrN/"),d=U.n(f),u=U("bdgK"),c=U("p77/"),o=U("Bd2K"),l=U("ELLl"),a=U("19Vz"),i=U("lZu9"),R=U("+NIl"),S=U("kSUc"),T=U("9Bee"),I=function(Te){var Ge=Te.value,ot=Ge===void 0?"":Ge,xt=Te.className,Ot=Te.showTextOnly,wt=Te.showLines,vt=Te.style,qe=vt===void 0?{}:vt,Qe=Object(b.useMemo)(function(){return""},[ot]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:Qe}}))},O=U("0Owb"),E=U("dejd"),y=U("C+DQ"),p=U("1vsH"),h=U("m3rI"),A=[{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 _(Te){var Ge=Te.onActionCallback,ot=Te.title,xt=Te.icon,Ot=Te.actionName,wt=Te.className,vt=wt===void 0?"":wt,qe=Te.children;function Qe(){Ge(Ot)}return m.a.createElement("a",{title:ot,className:vt,onClick:Qe},m.a.createElement("i",{className:"md-iconfont ".concat(xt)}),qe)}var v=function(Te){var Ge=Te.watch,ot=Te.showNullButton,xt=Te.onActionCallback,Ot=Te.fullScreen,wt=Te.insertTemp,vt=Te.hidetoolBar,qe=Te.uuid,Qe=Te.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(p.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(p.F)("_educoder_session"),"&key=").concat(qe,"&api=").concat(encodeURIComponent(h.a.PROXY_SERVER)));var Ue=[].concat(A,[{title:"".concat(Ge?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ge?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!vt&&Ue.map(function(le,pe){return m.a.createElement("li",{key:pe},le.actionName?m.a.createElement(_,Object(O.a)({},le,{onActionCallback:xt})):m.a.createElement("span",{className:"v-line"}))}),ot?m.a.createElement("li",null,m.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:xt},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,wt&&m.a.createElement("li",null,m.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(wt),onActionCallback:xt},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(_,{icon:"".concat(Ot?"icon-shrink":"icon-enlarge"),title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:xt})))},P=U("M8RZ"),x=U("+L6B"),C=U("2/Rp"),j=U("y8nQ"),B=U("Vl3Y"),w=U("5NDa"),Y=U("5rEg"),$={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Te){var Ge=Te.callback,ot=Te.onCancel;function xt(Ot){Ge(Ot)}return m.a.createElement(B.a,Object(O.a)({},$,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:xt}),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(Y.a,null)),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(Y.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(C.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},de=U("7ahc"),Be=U("HmJG"),Ae=U("BjJ7"),Re=B.a.useForm,Le={width:280,marginRight:10},Fe={labelCol:{span:5},wrapperCol:{span:19}},me=function(Te){var Ge=Te.callback,ot=Te.onCancel,xt=Re(),Ot=Object(K.a)(xt,1),wt=Ot[0];function vt(Ue){Ge(Ue)}function qe(Ue,le){if(Ue.status===-1){W.b.error(Ue.message);return}wt.setFieldsValue({src:"/api/attachments/".concat(Ue.id),type:le.type})}function Qe(Ue){var le=Ue.target.files[0];ne(le,qe)}return m.a.createElement(B.a,Object(O.a)({form:wt},Fe,{className:"upload-image-panel",onFinish:vt}),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(Y.a,{style:Le})),m.a.createElement(fe,{onFileChange:Qe}))),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(Y.a,{style:{width:264}})),m.a.createElement(B.a.Item,{style:{textAlign:"right"}},m.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(C.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))};function fe(Te){var Ge=Te.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Ge}))}function ne(Te,Ge){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");var ot=new FormData;ot.append("editormd-image-file",Te),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var xt=new window.XMLHttpRequest;xt.withCredentials=!0,xt.addEventListener("load",function(Ot){Ge(JSON.parse(Ot.target.responseText),Te)},!1),xt.addEventListener("error",function(Ot){console.error(Ot)},!1),xt.open("POST","".concat(Ae.a,"/api/attachments.json")),xt.send(ot)}var xe=U("giR+"),ce=U("fyUT"),Ne=U("7Kak"),He=U("9yH6"),ke=He.a.Group,Ye={margin:"0 8px"},et=function(Te){var Ge=Te.callback,ot=Te.onCancel;function xt(Ot){Ge(Ot)}return m.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:xt},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Ye},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Ye},"\u884C\u6570"),m.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(ce.a,null)),m.a.createElement("span",{style:Ye},"\u5217\u6570"),m.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(ce.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Ye},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(B.a.Item,{name:"align"},m.a.createElement(ke,null,m.a.createElement(He.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(He.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(He.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(He.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(C.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},ue=U("ErOA"),_e=U("7Cbv"),Oe="link",Me="upload-image",rt="code-block",dt="add-table",pt="------------",ut={default:pt,left:":".concat(pt),center:":".concat(pt,":"),right:"".concat(pt,":")},_t=U("9VGf"),Tt,Pe;function Ce(){}var tt=0,lt=1e4,Ke="\u2581",Xe=`
**\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 Se(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ee=ge?"Cmd":"Ctrl",ie=["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"],ae=(Tt={},Object(H.a)(Tt,Ee+"-B","bold"),Object(H.a)(Tt,Ee+"-I","italic"),Tt),he=(Pe={},Object(H.a)(Pe,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(H.a)(Pe,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(H.a)(Pe,Me,"\u6DFB\u52A0\u6587\u4EF6"),Object(H.a)(Pe,dt,"\u6DFB\u52A0\u8868\u683C"),Pe),ve=se.a=function(Te){var Ge=Te.defaultValue,ot=Ge===void 0?"":Ge,xt=Te.onChange,Ot=Te.width,wt=Ot===void 0?"100%":Ot,vt=Te.height,qe=vt===void 0?400:vt,Qe=Te.miniToolbar,Ue=Qe===void 0?!1:Qe,le=Te.isFocus,pe=le===void 0?!1:le,$e=Te.watch,je=Te.insertTemp,Je=Te.mode,mt=Je===void 0?"markdown":Je,We=Te.id,it=We===void 0?"markdown-editor-id":We,st=Te.showResizeBar,ct=st===void 0?!1:st,bt=Te.noStorage,jt=bt===void 0?!1:bt,en=Te.showNullButton,Yt=en===void 0?!1:en,Ct=Te.hidetoolBar,pn=Ct===void 0?!1:Ct,Rt=Te.fullScreen,zt=Rt===void 0?!1:Rt,Pt=Te.onBlur,qt=Te.onCMBeforeChange,yn=Te.onFullScreen,wn=Te.className,yt=wn===void 0?"":wn,Vt=Te.disablePaste,Mn=Vt===void 0?!1:Vt,Un=Te.placeholder,Pn=Un===void 0?"":Un,Vn=Te.values,Q=Vn===void 0?"":Vn,L=Object(b.useState)(null),k=Object(K.a)(L,2),G=k[0],te=k[1],J=Object(b.useState)(ot),Ie=Object(K.a)(J,2),at=Ie[0],St=Ie[1],Ft=Object(b.useState)($e),ye=Object(K.a)(Ft,2),Ut=ye[0],$t=ye[1],Sn=Object(b.useState)(zt),Hn=Object(K.a)(Sn,2),Kn=Hn[0],In=Hn[1],pr=Object(b.useState)(""),ur=Object(K.a)(pr,2),Bn=ur[0],cr=ur[1],Ar=Object(b.useState)(0),Cr=Object(K.a)(Ar,2),Yn=Cr[0],Wr=Cr[1],Pr=Object(b.useState)(qe),yr=Object(K.a)(Pr,2),Qr=yr[0],br=yr[1],dr=Object(b.useState)(!1),Nr=Object(K.a)(dr,2),Hr=Nr[0],Er=Nr[1],_n=Object(b.useRef)(Object(_e.a)()),sn=Object(b.useRef)(!1),Ln=Object(b.useRef)(),un=Object(b.useRef)(),Rn=Object(b.useRef)(),bn=Object(b.useRef)(),Or=Object(b.useRef)(),jn=function(){var Gt=Object(M.a)(D.a.mark(function tn(){var Xt,on;return D.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(ue.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:_n.current}});case 2:on=An.sent,on!=null&&(Xt=on.attachments)!==null&&Xt!==void 0&&Xt.length&&(console.log("cm:",G,un),on.attachments.map(function(hn){hn.content_type.indexOf("image")>-1?G.replaceSelection("![,](/api/attachments/".concat(hn.id,"?type=").concat(hn.content_type,")")):hn.content_type.indexOf("video")>-1?G.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):hn.content_type.indexOf("pdf")>-1?G.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(hn.id,"?type=").concat(hn.content_type,'&disposition=inline" target="_blank">').concat(hn.name,"</a>")):G.replaceSelection("[".concat(hn.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(hn.id,"?type=").concat(hn.content_type,")"))}));case 4:case"end":return An.stop()}},tn)}));return function(){return Gt.apply(this,arguments)}}();Object(b.useEffect)(function(){St(Q),G==null||G.setValue(Q)},[Q]),Object(b.useEffect)(function(){yn==null||yn(Kn)},[Kn]),Object(b.useEffect)(function(){if(un.current){var Gt=d.a.fromTextArea(un.current,{mode:mt,lineNumbers:!Ue,lineWrapping:!0,value:ot,autoCloseTags:!0,autoCloseBrackets:!0});pe&&Gt.focus();function tn(Xt,on){if(Mn){on.preventDefault();return}var dn=on.clipboardData;if(dn){var An=dn.types.toString(),hn=dn.items;if(An==="Files"||dn.types.indexOf("Files")>-1){if(on.preventDefault(),mt=="stex")return;try{var kn,qn=hn[1];((kn=hn[0])===null||kn===void 0?void 0:kn.kind)==="file"&&(qn=hn[0]);var ln=qn.getAsFile(),rn=ln.name.split(".").pop();ne(ln,function(mn){if(mn.id){var Qn,Gn,an;(ln==null||((Qn=ln.type)===null||Qn===void 0)?void 0:Qn.indexOf("image"))>-1?Gt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(ln==null||((Gn=ln.type)===null||Gn===void 0)?void 0:Gn.indexOf("video"))>-1?Gt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,'"></video>')):(ln==null||((an=ln.type)===null||an===void 0)?void 0:an.indexOf("pdf"))>-1?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(ln.type,'&disposition=inline" target="_blank">').concat(ln.name,"</a>")):ie.includes(rn)?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,'?type=office&disposition=inline" target="_blank">').concat(ln.name,"</a>")):Gt.replaceSelection("[".concat(ln.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})}catch(mn){W.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Gt.on("paste",tn),Gt.on("dragleave",function(Xt,on){Rn.current.classList.remove("mouse-hover-md")}),Gt.on("dragover",function(Xt,on){Rn.current.classList.add("mouse-hover-md")}),Gt.on("drop",function(Xt,on){Rn.current.classList.add("mouse-hover-md");var dn;if(dn=on.dataTransfer.files,dn.length>0){on.preventDefault(),on.stopPropagation();for(var An=function(qn){var ln=dn[qn],rn=ln.name.split(".").pop();ne(ln,function(mn){if(mn.id){var Qn,Gn,an;(ln==null||((Qn=ln.type)===null||Qn===void 0)?void 0:Qn.indexOf("image"))>-1?Gt.replaceSelection("![,](/api/attachments/".concat(mn.id,"?type=").concat(mn.content_type,")")):(ln==null||((Gn=ln.type)===null||Gn===void 0)?void 0:Gn.indexOf("video"))>-1?Gt.replaceSelection('<video width="100%" controls src="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,'"></video>')):(ln==null||((an=ln.type)===null||an===void 0)?void 0:an.indexOf("pdf"))>-1?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(ln.type,'&disposition=inline" target="_blank">').concat(ln.name,"</a>")):ie.includes(rn)?Gt.replaceSelection('<a href="'.concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,'?type=office&disposition=inline" target="_blank">').concat(ln.name,"</a>")):Gt.replaceSelection("[".concat(ln.name,"](").concat(h.a.API_SERVER,"/api/attachments/").concat(mn.id,"?type=").concat(mn.content_type,")"))}else(mn==null?void 0:mn.status)===401&&(document.location.href="/user/login")})},hn=0;hn<dn.length;hn++)An(hn)}}),te(Gt),function(){Gt.off("paste",tn)}}},[]);var Xn=Object(b.useCallback)(function(){if(Rn.current)try{}catch(Gt){console.log(Gt,"---- to set md editor body height")}},[Qr,Rn,Kn]);Object(b.useEffect)(function(){function Gt(){var Xt=new u.default(function(on){var dn=Object(N.a)(on),An;try{for(dn.s();!(An=dn.n()).done;){var hn=An.value;(hn.target.offsetHeight>0||hn.target.offsetWidth>0)&&(Xn(),G.setSize("100%","100%"),G.refresh())}}catch(kn){dn.e(kn)}finally{dn.f()}});return Xt.observe(un.current.parentElement),Xt}if(G){var tn=Gt();return function(){tn.unobserve(un.current.parentElement)}}},[G,Xn]),Object(b.useEffect)(function(){if(G){for(var Gt=[],tn=function(){var hn=on[Xt];dn=Object(K.a)(hn,2);var kn=dn[0],qn=dn[1],ln=Object(H.a)({},kn,function(){Kr(qn)});Gt.push(ln),G.addKeyMap(ln)},Xt=0,on=Object.entries(ae);Xt<on.length;Xt++){var dn;tn()}return Ln.current=setInterval(function(){sn.current&&jn()},4e3),function(){clearInterval(Ln.current);var An=Object(N.a)(Gt),hn;try{for(An.s();!(hn=An.n()).done;){var kn=hn.value;G.removeKeyMap(kn)}}catch(qn){An.e(qn)}finally{An.f()}}}},[G]),Object(b.useEffect)(function(){zt!==Kn&&In(zt)},[zt]),Object(_t.a)(function(){if(!jt&&Yn>0){var Gt=new Date().getTime(),tn=window.sessionStorage.getItem(it);Gt>=Yn+lt&&(!tn||tn!==at)&&(window.sessionStorage.setItem(it,at),Er(!0))}},lt),Object(b.useEffect)(function(){$t($e)},[G,$e]),Object(b.useEffect)(function(){G&&(pe&&G.focus())},[G,pe]),Object(b.useEffect)(function(){if(Ut&&G){var Gt=G.getScrollerElement();function tn(Xt){var on=Xt.target;if(Or.current){var dn=on.scrollTop/on.scrollHeight;Or.current.scrollTop=Or.current.scrollHeight*dn}}return Gt.addEventListener("scroll",tn),function(){Gt.removeEventListener("scroll",tn)}}},[G,Ut]),Object(b.useEffect)(function(){if(G&&qt){function Gt(tn,Xt){qt(tn,Xt)}return G.on("beforeChange",Gt),function(){G.off("beforeChange",Gt)}}},[G,qt]),Object(b.useEffect)(function(){if(G&&Pt){function Gt(){Pt(G.getValue())}return G.on("blur",Gt),function(){G.off("blur",Gt)}}},[G,Pt]),Object(b.useEffect)(function(){if(G){function Gt(tn){var Xt=tn.getValue();St(Xt),Wr(new Date().getTime()),tn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),xt&&xt(Xt)}return G.on("change",Gt),function(){G.off("change",Gt)}}},[G,xt]),Object(b.useEffect)(function(){G&&(ot==null?(G.setValue(""),St("")):ot!==G.getValue()&&(G.setValue(ot),St(ot),G.setCursor(G.lineCount(),0)))},[G,ot]);var Kr=Object(b.useCallback)(function(Gt){var tn=G.getCursor(),Xt=G.getSelection(),on=Xt.split(`
`);switch(Gt){case"bold":return G.replaceSelection("**"+Xt+"**"),Xt===""&&G.setCursor(tn.line,tn.ch+2),G.focus();case"italic":return G.replaceSelection("*"+Xt+"*"),Xt===""&&G.setCursor(tn.line,tn.ch+1),G.focus();case"code":return G.replaceSelection("`"+Xt+"`"),Xt===""&&G.setCursor(tn.line,tn.ch+1),G.focus();case"inline-latex":return G.replaceSelection("`$$"+Xt+"$$`"),Xt===""&&G.setCursor(tn.line,tn.ch+3),G.focus();case"latex":return G.replaceSelection("```latex\n"+Xt+"\n```"),G.setCursor(tn.line+1,Xt.length+1),G.focus();case"line-break":return G.replaceSelection(`<br/>
`),G.focus();case"list-ul":return Xt===""?G.replaceSelection("- "+Xt):G.replaceSelection(on.map(function(dn){return dn===""?"":"- ".concat(dn)}).join(`
`)),G.focus();case"list-ol":return Xt===""?G.replaceSelection("1. "+Xt):G.replaceSelection(on.map(function(dn,An){return dn===""?"":"".concat(An+1,". ").concat(dn)}).join(`
`)),G.focus();case"add-null-ch":return Xt===""&&G.setCursor(tn.line,tn.ch+1),G.replaceSelection(Ke),G.focus();case"inster-template-1":return Xt===""&&G.setCursor(tn.line,tn.ch),G.replaceSelection(Xe),G.focus();case"eraser":return G.setValue(""),G.focus();case"trigger-watch":return $t(!Ut),G.focus();case"trigger-full-screen":return In(!Kn),G.focus();case Oe:cr(Oe);return;case rt:cr(rt);return;case Me:cr(Me);return;case dt:cr(dt);return;default:throw new Error}},[G,Ut,Kn]),Rr=Object(b.useCallback)(function(Gt){cr("");switch(Bn){case Oe:var tn=Gt.title,Xt=Gt.link;return G.replaceSelection("[".concat(tn,"](").concat(Xt,")")),G.focus();case rt:var on=Gt.language,dn=Gt.content;return G.replaceSelection(["```"+on,dn,"```"].join(`
`)),G.focus();case Me:var An=Gt.src,hn=Gt.alt;return hn?G.replaceSelection("![ ".concat(hn," ]( ").concat(An,' "').concat(hn,'" )')):G.replaceSelection("![,](".concat(An,")")),G.focus();case dt:for(var kn=Gt.row,qn=Gt.col,ln=Gt.align,rn=`
`,mn=0;mn<kn;mn++){for(var Qn=[],Gn=[],an=0;an<qn;an++)mn===1&&Gn.push(ut[ln]),Qn.push(" ");mn===1&&(rn+="| ".concat(Gn.join(" | "),` |
`)),rn+="| ".concat(Qn.join(qn===1?"":" | "),` |
`)}return G.replaceSelection(rn+`
`),G.focus();default:throw new Error}},[G,Bn]),Gr=Object(b.useMemo)(function(){switch(Bn){case Oe:return m.a.createElement(oe,{callback:Rr,onCancel:Ir});case rt:return m.a.createElement(de.b,{callback:Rr,onCancel:Ir});case Me:return m.a.createElement(me,{callback:Rr,onCancel:Ir});case dt:return m.a.createElement(et,{callback:Rr,onCancel:Ir});default:return null}},[Bn]);function Ir(){cr("")}Object(b.useEffect)(function(){if(bn.current){var Gt=bn.current,tn=!1,Xt=0;function on(hn){tn=!0,Xt=hn.pageY}function dn(){tn=!1}function An(hn){if(tn){var kn=hn.pageY-Xt;kn<0&&(kn=0),kn>300&&(kn=300);var qn=qe+kn+"px";br(qn)}}return Gt.addEventListener("mousedown",on),document.addEventListener("mousemove",An),document.addEventListener("mouseup",dn),function(){Gt.removeEventListener("mousedown",on),document.removeEventListener("mousemove",An),document.removeEventListener("mouseup",dn)}}},[G,bn]),Object(b.useEffect)(function(){br(qe)},[qe]);var Dr=Se(wt),jr=Se(Qr),_r={width:Dr,height:jr},zr=Object(b.useMemo)(function(){if(Yn){var Gt=new Date(Yn),tn=Gt.getHours(),Xt=Gt.getMinutes(),on=Gt.getSeconds();return tn=tn<10?"0"+tn:tn,Xt=Xt<10?"0"+Xt:Xt,on=on<10?"0"+on:on,"".concat(tn,":").concat(Xt,":").concat(on)}return 0},[Yn]);function Jr(){window.sessionStorage.removeItem(it),Er(!1),Wr(0)}function sr(){Er(!1),Wr(0),G.setValue(window.sessionStorage.getItem(it))}function ri(Gt,tn){var Xt=G.getValue();Xt=Xt.replace(Gt,tn),St(Xt),G==null||G.setValue(Xt)}return m.a.createElement(b.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:Rn},m.a.createElement("div",{className:"markdown-editor-container ".concat(yt," ").concat(Ut?"on-preview":""," ").concat(Ue?"mini":""," ").concat(Kn?"full-screen":""),style:_r},m.a.createElement(v,{insertTemp:je,watch:Ut,fullScreen:Kn,showNullButton:Yt,onActionCallback:Kr,hidetoolBar:pn,uuid:_n.current,setOpenPhones:function(){sn.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:un,placeholder:Pn})),Ut?m.a.createElement("div",{ref:Or,className:"preview-container"},mt==="stex"&&m.a.createElement(I,{value:at}),mt!=="stex"&&m.a.createElement(T.a,{edit:!0,value:at,replaces:ri})):null))),ct?m.a.createElement("a",{ref:bn,className:"editor-resize"}):null,m.a.createElement(P.a,null,he[Bn]?m.a.createElement(z.a,{centered:!0,title:he[Bn],visible:!0,onCancel:Ir,footer:null,className:"markdown-popup-form"},Gr):null))}},RMFE:function(Ve,se){Ve.exports="data:image/png;base64,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"},"SA+Z":function(Ve,se,U){var Z=U("wTVA"),z=U("EbDI"),N=U("ZhPi"),V=U("wkBT");function W(M){return Z(M)||z(M)||N(M)||V()}Ve.exports=W,Ve.exports.__esModule=!0,Ve.exports.default=Ve.exports},SJMd:function(Ve,se){/**
* @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 U,Z,z,N=!1,V,W;window.PR_SHOULD_USE_CONTINUATION=!0;var M,K;(function(){var H=window,n=["break,continue,do,else,for,if,return,while"],D=[n,"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"],b=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[b,"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"],f=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],d=[b,"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"],u="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=[b,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[n,"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"],a=[n,"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"],i=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[m,d,f,c,o,l,a,i],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",I="kwd",O="com",E="typ",y="lit",p="pun",h="pln",A="tag",_="dec",v="src",P="atn",x="atv",C="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ke){for(var Ye=0,et=!1,ue=!1,_e=0,Oe=ke.length;_e<Oe;++_e){var Me=ke[_e];if(Me.ignoreCase)ue=!0;else if(/[a-z]/i.test(Me.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){et=!0,ue=!1;break}}var rt={b:8,t:9,n:10,v:11,f:12,r:13};function dt(Pe){var Ce=Pe.charCodeAt(0);if(Ce!==92)return Ce;var tt=Pe.charAt(1);return Ce=rt[tt],Ce||("0"<=tt&&tt<="7"?parseInt(Pe.substring(1),8):tt==="u"||tt==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function pt(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ce=String.fromCharCode(Pe);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function ut(Pe){var Ce=Pe.substring(1,Pe.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")),tt=[],lt=Ce[0]==="^",Ke=["["];lt&&Ke.push("^");for(var Xe=lt?1:0,Se=Ce.length;Xe<Se;++Xe){var ge=Ce[Xe];if(/\\[bdsw]/i.test(ge))Ke.push(ge);else{var Ee=dt(ge),ie;Xe+2<Se&&Ce[Xe+1]==="-"?(ie=dt(Ce[Xe+2]),Xe+=2):ie=Ee,tt.push([Ee,ie]),ie<65||Ee>122||(ie<65||Ee>90||tt.push([Math.max(65,Ee)|32,Math.min(ie,90)|32]),ie<97||Ee>122||tt.push([Math.max(97,Ee)&~32,Math.min(ie,122)&~32]))}}tt.sort(function(Te,Ge){return Te[0]-Ge[0]||Ge[1]-Te[1]});for(var ae=[],he=[],Xe=0;Xe<tt.length;++Xe){var ve=tt[Xe];ve[0]<=he[1]+1?he[1]=Math.max(he[1],ve[1]):ae.push(he=ve)}for(var Xe=0;Xe<ae.length;++Xe){var ve=ae[Xe];Ke.push(pt(ve[0])),ve[1]>ve[0]&&(ve[1]+1>ve[0]&&Ke.push("-"),Ke.push(pt(ve[1])))}return Ke.push("]"),Ke.join("")}function _t(Pe){for(var Ce=Pe.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")),tt=Ce.length,lt=[],Ke=0,Xe=0;Ke<tt;++Ke){var Se=Ce[Ke];if(Se==="(")++Xe;else if(Se.charAt(0)==="\\"){var ge=+Se.substring(1);ge&&(ge<=Xe?lt[ge]=-1:Ce[Ke]=pt(ge))}}for(var Ke=1;Ke<lt.length;++Ke)lt[Ke]===-1&&(lt[Ke]=++Ye);for(var Ke=0,Xe=0;Ke<tt;++Ke){var Se=Ce[Ke];if(Se==="(")++Xe,lt[Xe]||(Ce[Ke]="(?:");else if(Se.charAt(0)==="\\"){var ge=+Se.substring(1);ge&&ge<=Xe&&(Ce[Ke]="\\"+lt[ge])}}for(var Ke=0;Ke<tt;++Ke)Ce[Ke]==="^"&&Ce[Ke+1]!=="^"&&(Ce[Ke]="");if(Pe.ignoreCase&&et)for(var Ke=0;Ke<tt;++Ke){var Se=Ce[Ke],Ee=Se.charAt(0);Se.length>=2&&Ee==="["?Ce[Ke]=ut(Se):Ee!=="\\"&&(Ce[Ke]=Se.replace(/[a-zA-Z]/g,function(he){var ve=he.charCodeAt(0);return"["+String.fromCharCode(ve&~32,ve|32)+"]"}))}return Ce.join("")}for(var Tt=[],_e=0,Oe=ke.length;_e<Oe;++_e){var Me=ke[_e];if(Me.global||Me.multiline)throw new Error(""+Me);Tt.push("(?:"+_t(Me)+")")}return new RegExp(Tt.join("|"),ue?"gi":"g")}function w(ke,Ye){var et=/(?:^|\s)nocode(?:\s|$)/,ue=[],_e=0,Oe=[],Me=0;function rt(dt){var pt=dt.nodeType;if(pt==1){if(et.test(dt.className))return;for(var ut=dt.firstChild;ut;ut=ut.nextSibling)rt(ut);var _t=dt.nodeName.toLowerCase();(_t==="br"||_t==="li")&&(ue[Me]=`
`,Oe[Me<<1]=_e++,Oe[Me++<<1|1]=dt)}else if(pt==3||pt==4){var Tt=dt.nodeValue;Tt.length&&(Ye?Tt=Tt.replace(/\r\n?/g,`
`):Tt=Tt.replace(/[ \t\r\n]+/g," "),ue[Me]=Tt,Oe[Me<<1]=_e,_e+=Tt.length,Oe[Me++<<1|1]=dt)}}return rt(ke),{sourceCode:ue.join("").replace(/\n$/,""),spans:Oe}}function Y(ke,Ye,et,ue,_e){if(!et)return;var Oe={sourceNode:ke,pre:1,langExtension:null,numberLines:null,sourceCode:et,spans:null,basePos:Ye,decorations:null};ue(Oe),_e.push.apply(_e,Oe.decorations)}var $=/\S/;function oe(ke){for(var Ye=void 0,et=ke.firstChild;et;et=et.nextSibling){var ue=et.nodeType;Ye=ue===1?Ye?ke:et:ue===3&&$.test(et.nodeValue)?ke:Ye}return Ye===ke?void 0:Ye}function de(ke,Ye){var et={},ue;(function(){for(var Me=ke.concat(Ye),rt=[],dt={},pt=0,ut=Me.length;pt<ut;++pt){var _t=Me[pt],Tt=_t[3];if(Tt)for(var Pe=Tt.length;--Pe>=0;)et[Tt.charAt(Pe)]=_t;var Ce=_t[1],tt=""+Ce;dt.hasOwnProperty(tt)||(rt.push(Ce),dt[tt]=null)}rt.push(/[\0-\uffff]/),ue=B(rt)})();var _e=Ye.length,Oe=function(Me){for(var rt=Me.sourceCode,dt=Me.basePos,pt=Me.sourceNode,ut=[dt,h],_t=0,Tt=rt.match(ue)||[],Pe={},Ce=0,tt=Tt.length;Ce<tt;++Ce){var lt=Tt[Ce],Ke=Pe[lt],Xe=void 0,Se;if(typeof Ke=="string")Se=!1;else{var ge=et[lt.charAt(0)];if(ge)Xe=lt.match(ge[1]),Ke=ge[0];else{for(var Ee=0;Ee<_e;++Ee)if(ge=Ye[Ee],Xe=lt.match(ge[1]),Xe){Ke=ge[0];break}Xe||(Ke=h)}Se=Ke.length>=5&&Ke.substring(0,5)==="lang-",Se&&!(Xe&&typeof Xe[1]=="string")&&(Se=!1,Ke=v),Se||(Pe[lt]=Ke)}var ie=_t;if(_t+=lt.length,!Se)ut.push(dt+ie,Ke);else{var ae=Xe[1],he=lt.indexOf(ae),ve=he+ae.length;Xe[2]&&(ve=lt.length-Xe[2].length,he=ve-ae.length);var Te=Ke.substring(5);Y(pt,dt+ie,lt.substring(0,he),Oe,ut),Y(pt,dt+ie+he,ae,fe(Te,ae),ut),Y(pt,dt+ie+ve,lt.substring(ve),Oe,ut)}}Me.decorations=ut};return Oe}function Be(ke){var Ye=[],et=[];ke.tripleQuotedStrings?Ye.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ke.multiLineStrings?Ye.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ye.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ke.verbatimStrings&&et.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ue=ke.hashComments;ue&&(ke.cStyleComments?(ue>1?Ye.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ye.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),et.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ye.push([O,/^#[^\r\n]*/,null,"#"])),ke.cStyleComments&&(et.push([O,/^\/\/[^\r\n]*/,null]),et.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var _e=ke.regexLiterals;if(_e){var Oe=_e>1?"":`
\r`,Me=Oe?".":"[\\S\\s]",rt="/(?=[^/*"+Oe+"])(?:[^/\\x5B\\x5C"+Oe+"]|\\x5C"+Me+"|\\x5B(?:[^\\x5C\\x5D"+Oe+"]|\\x5C"+Me+")*(?:\\x5D|$))+/";et.push(["lang-regex",RegExp("^"+j+"("+rt+")")])}var dt=ke.types;dt&&et.push([E,dt]);var pt=(""+ke.keywords).replace(/^ | $/g,"");pt.length&&et.push([I,new RegExp("^(?:"+pt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ye.push([h,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return ke.regexLiterals&&(ut+="(?!s*/)"),et.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[E,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[h,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[h,/^\\[\s\S]?/,null],[p,new RegExp(ut),null]),de(Ye,et)}var Ae=Be({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Re(ke,Ye,et){for(var ue=/(?:^|\s)nocode(?:\s|$)/,_e=/\r\n?|\n/,Oe=ke.ownerDocument,Me=Oe.createElement("li");ke.firstChild;)Me.appendChild(ke.firstChild);var rt=[Me];function dt(Ce){var tt=Ce.nodeType;if(tt==1&&!ue.test(Ce.className))if(Ce.nodeName==="br")pt(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var lt=Ce.firstChild;lt;lt=lt.nextSibling)dt(lt);else if((tt==3||tt==4)&&et){var Ke=Ce.nodeValue,Xe=Ke.match(_e);if(Xe){var Se=Ke.substring(0,Xe.index);Ce.nodeValue=Se;var ge=Ke.substring(Xe.index+Xe[0].length);if(ge){var Ee=Ce.parentNode;Ee.insertBefore(Oe.createTextNode(ge),Ce.nextSibling)}pt(Ce),Se||Ce.parentNode.removeChild(Ce)}}}function pt(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function tt(Xe,Se){var ge=Se?Xe.cloneNode(!1):Xe,Ee=Xe.parentNode;if(Ee){var ie=tt(Ee,1),ae=Xe.nextSibling;ie.appendChild(ge);for(var he=ae;he;he=ae)ae=he.nextSibling,ie.appendChild(he)}return ge}for(var lt=tt(Ce.nextSibling,0),Ke;(Ke=lt.parentNode)&&Ke.nodeType===1;)lt=Ke;rt.push(lt)}for(var ut=0;ut<rt.length;++ut)dt(rt[ut]);Ye===(Ye|0)&&rt[0].setAttribute("value",Ye);var _t=Oe.createElement("ol");_t.className="linenums";for(var Tt=Math.max(0,Ye-1|0)||0,ut=0,Pe=rt.length;ut<Pe;++ut)Me=rt[ut],Me.className="L"+(ut+Tt)%10,Me.firstChild||Me.appendChild(Oe.createTextNode("\xA0")),_t.appendChild(Me);ke.appendChild(_t)}function Le(ke){var Ye=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ye=Ye&&+Ye[1]<=8;var et=/\n/g,ue=ke.sourceCode,_e=ue.length,Oe=0,Me=ke.spans,rt=Me.length,dt=0,pt=ke.decorations,ut=pt.length,_t=0;pt[ut]=_e;var Tt,Pe;for(Pe=Tt=0;Pe<ut;)pt[Pe]!==pt[Pe+2]?(pt[Tt++]=pt[Pe++],pt[Tt++]=pt[Pe++]):Pe+=2;for(ut=Tt,Pe=Tt=0;Pe<ut;){for(var Ce=pt[Pe],tt=pt[Pe+1],lt=Pe+2;lt+2<=ut&&pt[lt+1]===tt;)lt+=2;pt[Tt++]=Ce,pt[Tt++]=tt,Pe=lt}ut=pt.length=Tt;var Ke=ke.sourceNode,Xe="";Ke&&(Xe=Ke.style.display,Ke.style.display="none");try{for(var Se=null;dt<rt;){var ge=Me[dt],Ee=Me[dt+2]||_e,ie=pt[_t+2]||_e,lt=Math.min(Ee,ie),ae=Me[dt+1],he;if(ae.nodeType!==1&&(he=ue.substring(Oe,lt))){Ye&&(he=he.replace(et,"\r")),ae.nodeValue=he;var ve=ae.ownerDocument,Te=ve.createElement("span");Te.className=pt[_t+1];var Ge=ae.parentNode;Ge.replaceChild(Te,ae),Te.appendChild(ae),Oe<Ee&&(Me[dt+1]=ae=ve.createTextNode(ue.substring(lt,Ee)),Ge.insertBefore(ae,Te.nextSibling))}Oe=lt,Oe>=Ee&&(dt+=2),Oe>=ie&&(_t+=2)}}finally{Ke&&(Ke.style.display=Xe)}}var Fe={};function me(ke,Ye){for(var et=Ye.length;--et>=0;){var ue=Ye[et];Fe.hasOwnProperty(ue)?H.console&&console.warn("cannot override language handler %s",ue):Fe[ue]=ke}}function fe(ke,Ye){return ke&&Fe.hasOwnProperty(ke)||(ke=/^\s*</.test(Ye)?"default-markup":"default-code"),Fe[ke]}me(Ae,["default-code"]),me(de([],[[h,/^[^<?]+/],[_,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["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"]),me(de([[h,/^[\s]+/,null,` \r
`],[x,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[A,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["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"]),me(de([],[[x,/^[\s\S]+/]]),["uq.val"]),me(Be({keywords:m,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),me(Be({keywords:"null,true,false"}),["json"]),me(Be({keywords:d,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),me(Be({keywords:f,cStyleComments:!0}),["java"]),me(Be({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),me(Be({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),me(Be({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),me(Be({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),me(Be({keywords:c,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),me(Be({keywords:u,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),me(de([],[[T,/^[\s\S]+/]]),["regex"]);function ne(ke){var Ye=ke.langExtension;try{var et=w(ke.sourceNode,ke.pre),ue=et.sourceCode;ke.sourceCode=ue,ke.spans=et.spans,ke.basePos=0,fe(Ye,ue)(ke),Le(ke)}catch(_e){H.console&&console.log(_e&&_e.stack||_e)}}function xe(ke,Ye,et){var ue=et||!1,_e=Ye||null,Oe=document.createElement("div");Oe.innerHTML="<pre>"+ke+"</pre>",Oe=Oe.firstChild,ue&&Re(Oe,ue,!0);var Me={langExtension:_e,numberLines:ue,sourceNode:Oe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ne(Me),Oe.innerHTML}function ce(ke,Ye){var et=Ye||document.body,ue=et.ownerDocument||document;function _e(ge){return et.getElementsByTagName(ge)}for(var Oe=[_e("pre"),_e("code"),_e("xmp")],Me=[],rt=0;rt<Oe.length;++rt)for(var dt=0,pt=Oe[rt].length;dt<pt;++dt)Me.push(Oe[rt][dt]);Oe=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var _t=0,Tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,tt=/pre|xmp/i,lt=/^code$/i,Ke=/^(?:pre|code|xmp)$/i,Xe={};function Se(){for(var ge=H.PR_SHOULD_USE_CONTINUATION?ut.now()+250:Infinity;_t<Me.length&&ut.now()<ge;_t++){for(var Ee=Me[_t],ie=Xe,ae=Ee;ae=ae.previousSibling;){var he=ae.nodeType,ve=(he===7||he===8)&&ae.nodeValue;if(ve?!/^\??prettify\b/.test(ve):he!==3||/\S/.test(ae.nodeValue))break;if(ve){ie={},ve.replace(/\b(\w+)=([\w:.%+-]+)/g,function($e,je,Je){ie[je]=Je});break}}var Te=Ee.className;if((ie!==Xe||Pe.test(Te))&&!Ce.test(Te)){for(var Ge=!1,ot=Ee.parentNode;ot;ot=ot.parentNode){var xt=ot.tagName;if(Ke.test(xt)&&ot.className&&Pe.test(ot.className)){Ge=!0;break}}if(!Ge){Ee.className+=" prettyprinted";var Ot=ie.lang;if(!Ot){Ot=Te.match(Tt);var wt;!Ot&&(wt=oe(Ee))&&lt.test(wt.tagName)&&(Ot=wt.className.match(Tt)),Ot&&(Ot=Ot[1])}var vt;if(tt.test(Ee.tagName))vt=1;else{var qe=Ee.currentStyle,Qe=ue.defaultView,Ue=qe?qe.whiteSpace:Qe&&Qe.getComputedStyle?Qe.getComputedStyle(Ee,null).getPropertyValue("white-space"):0;vt=Ue&&Ue.substring(0,3)==="pre"}var le=ie.linenums;(le=le==="true"||+le)||(le=Te.match(/\blinenums\b(?::(\d+))?/),le=le?le[1]&&le[1].length?+le[1]:!0:!1),le&&Re(Ee,le,vt);var pe={langExtension:Ot,sourceNode:Ee,numberLines:le,pre:vt,sourceCode:null,basePos:null,spans:null,decorations:null};ne(pe)}}}_t<Me.length?H.setTimeout(Se,250):typeof ke=="function"&&ke()}Se()}var Ne=H.PR={createSimpleLexer:de,registerLangHandler:me,sourceDecorator:Be,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:x,PR_COMMENT:O,PR_DECLARATION:_,PR_KEYWORD:I,PR_LITERAL:y,PR_NOCODE:C,PR_PLAIN:h,PR_PUNCTUATION:p,PR_SOURCE:v,PR_STRING:T,PR_TAG:A,PR_TYPE:E,prettyPrintOne:N?H.prettyPrintOne=xe:M=xe,prettyPrint:K=N?H.prettyPrint=ce:K=ce},He=H.define;typeof He=="function"&&He.amd&&He("google-code-prettify",[],function(){return Ne})})()},SMhR:function(Ve,se){Ve.exports="data:image/png;base64,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"},T8No:function(Ve,se,U){"use strict";U.d(se,"a",function(){return K}),U.d(se,"e",function(){return H}),U.d(se,"c",function(){return p}),U.d(se,"b",function(){return h}),U.d(se,"d",function(){return A}),U.d(se,"f",function(){return P});var Z=U("MNsG"),z=U("N0LK"),N=U("Cg/j");let V=Z.k||"";const W=new Map;W.set("false",!1),W.set("true",!0),W.set("isMac",Z.f),W.set("isLinux",Z.d),W.set("isWindows",Z.i),W.set("isWeb",Z.h),W.set("isMacNative",Z.f&&!Z.h),W.set("isEdge",V.indexOf("Edg/")>=0),W.set("isFirefox",V.indexOf("Firefox")>=0),W.set("isChrome",V.indexOf("Chrome")>=0),W.set("isSafari",V.indexOf("Safari")>=0);const M=Object.prototype.hasOwnProperty;class K{static has(C){return m.create(C)}static equals(C,j){return f.create(C,j)}static regex(C,j){return T.create(C,j)}static not(C){return o.create(C)}static and(...C){return E.create(C,null)}static or(...C){return y.create(C,null,!0)}static deserialize(C,j=!1){return C?this._deserializeOrExpression(C,j):void 0}static _deserializeOrExpression(C,j){let B=C.split("||");return y.create(B.map(w=>this._deserializeAndExpression(w,j)),null,!0)}static _deserializeAndExpression(C,j){let B=C.split("&&");return E.create(B.map(w=>this._deserializeOne(w,j)),null)}static _deserializeOne(C,j){if(C=C.trim(),C.indexOf("!=")>=0){let B=C.split("!=");return c.create(B[0].trim(),this._deserializeValue(B[1],j))}if(C.indexOf("==")>=0){let B=C.split("==");return f.create(B[0].trim(),this._deserializeValue(B[1],j))}if(C.indexOf("=~")>=0){let B=C.split("=~");return T.create(B[0].trim(),this._deserializeRegexValue(B[1],j))}if(C.indexOf(" in ")>=0){let B=C.split(" in ");return d.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(C)){const B=C.split(">=");return i.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(C)){const B=C.split(">");return a.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(C)){const B=C.split("<=");return S.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(C)){const B=C.split("<");return R.create(B[0].trim(),B[1].trim())}return/^\!\s*/.test(C)?o.create(C.substr(1).trim()):m.create(C)}static _deserializeValue(C,j){if(C=C.trim(),C==="true")return!0;if(C==="false")return!1;let B=/^'([^']*)'$/.exec(C);return B?B[1].trim():C}static _deserializeRegexValue(C,j){if(Object(z.C)(C)){if(j)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let B=C.indexOf("/"),w=C.lastIndexOf("/");if(B===w||B<0){if(j)throw new Error(`bad regexp-value '${C}', missing /-enclosure`);return console.warn(`bad regexp-value '${C}', missing /-enclosure`),null}let Y=C.slice(B+1,w),$=C[w+1]==="i"?"i":"";try{return new RegExp(Y,$)}catch(oe){if(j)throw new Error(`bad regexp-value '${C}', parse error: ${oe}`);return console.warn(`bad regexp-value '${C}', parse error: ${oe}`),null}}}function H(C,j){const B=C?C.substituteConstants():void 0,w=j?j.substituteConstants():void 0;return!B&&!w?!0:!B||!w?!1:B.equals(w)}function n(C,j){return C.cmp(j)}class D{constructor(){this.type=0}cmp(C){return this.type-C.type}equals(C){return C.type===this.type}substituteConstants(){return this}evaluate(C){return!1}serialize(){return"false"}keys(){return[]}negate(){return b.INSTANCE}}D.INSTANCE=new D;class b{constructor(){this.type=1}cmp(C){return this.type-C.type}equals(C){return C.type===this.type}substituteConstants(){return this}evaluate(C){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}b.INSTANCE=new b;class m{constructor(C,j){this.key=C,this.negated=j,this.type=2}static create(C,j=null){const B=W.get(C);return typeof B=="boolean"?B?b.INSTANCE:D.INSTANCE:new m(C,j)}cmp(C){return C.type!==this.type?this.type-C.type:_(this.key,C.key)}equals(C){return C.type===this.type?this.key===C.key:!1}substituteConstants(){const C=W.get(this.key);return typeof C=="boolean"?C?b.INSTANCE:D.INSTANCE:this}evaluate(C){return!!C.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class f{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=4}static create(C,j,B=null){if(typeof j=="boolean")return j?m.create(C,B):o.create(C,B);const w=W.get(C);if(typeof w=="boolean"){const Y=w?"true":"false";return j===Y?b.INSTANCE:D.INSTANCE}return new f(C,j,B)}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){const C=W.get(this.key);if(typeof C=="boolean"){const j=C?"true":"false";return this.value===j?b.INSTANCE:D.INSTANCE}return this}evaluate(C){return C.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this.value,this)),this.negated}}class d{constructor(C,j){this.key=C,this.valueKey=j,this.type=10,this.negated=null}static create(C,j){return new d(C,j)}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.valueKey,C.key,C.valueKey)}equals(C){return C.type===this.type?this.key===C.key&&this.valueKey===C.valueKey:!1}substituteConstants(){return this}evaluate(C){const j=C.getValue(this.valueKey),B=C.getValue(this.key);return Array.isArray(j)?j.indexOf(B)>=0:typeof B=="string"&&typeof j=="object"&&j!==null?M.call(j,B):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=u.create(this)),this.negated}}class u{constructor(C){this._actual=C,this.type=11}static create(C){return new u(C)}cmp(C){return C.type!==this.type?this.type-C.type:this._actual.cmp(C._actual)}equals(C){return C.type===this.type?this._actual.equals(C._actual):!1}substituteConstants(){return this}evaluate(C){return!this._actual.evaluate(C)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class c{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=5}static create(C,j,B=null){if(typeof j=="boolean")return j?o.create(C,B):m.create(C,B);const w=W.get(C);if(typeof w=="boolean"){const Y=w?"true":"false";return j===Y?D.INSTANCE:b.INSTANCE}return new c(C,j,B)}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){const C=W.get(this.key);if(typeof C=="boolean"){const j=C?"true":"false";return this.value===j?D.INSTANCE:b.INSTANCE}return this}evaluate(C){return C.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class o{constructor(C,j){this.key=C,this.negated=j,this.type=3}static create(C,j=null){const B=W.get(C);return typeof B=="boolean"?B?D.INSTANCE:b.INSTANCE:new o(C,j)}cmp(C){return C.type!==this.type?this.type-C.type:_(this.key,C.key)}equals(C){return C.type===this.type?this.key===C.key:!1}substituteConstants(){const C=W.get(this.key);return typeof C=="boolean"?C?D.INSTANCE:b.INSTANCE:this}evaluate(C){return!C.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function l(C,j){if(typeof C=="string"){const B=parseFloat(C);isNaN(B)||(C=B)}return typeof C=="string"||typeof C=="number"?j(C):D.INSTANCE}class a{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=12}static create(C,j,B=null){return l(j,w=>new a(C,w,B))}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){return this}evaluate(C){return typeof this.value=="string"?!1:parseFloat(C.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class i{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=13}static create(C,j,B=null){return l(j,w=>new i(C,w,B))}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){return this}evaluate(C){return typeof this.value=="string"?!1:parseFloat(C.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class R{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=14}static create(C,j,B=null){return l(j,w=>new R(C,w,B))}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){return this}evaluate(C){return typeof this.value=="string"?!1:parseFloat(C.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class S{constructor(C,j,B){this.key=C,this.value=j,this.negated=B,this.type=15}static create(C,j,B=null){return l(j,w=>new S(C,w,B))}cmp(C){return C.type!==this.type?this.type-C.type:v(this.key,this.value,C.key,C.value)}equals(C){return C.type===this.type?this.key===C.key&&this.value===C.value:!1}substituteConstants(){return this}evaluate(C){return typeof this.value=="string"?!1:parseFloat(C.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class T{constructor(C,j){this.key=C,this.regexp=j,this.type=7,this.negated=null}static create(C,j){return new T(C,j)}cmp(C){if(C.type!==this.type)return this.type-C.type;if(this.key<C.key)return-1;if(this.key>C.key)return 1;const j=this.regexp?this.regexp.source:"",B=C.regexp?C.regexp.source:"";return j<B?-1:j>B?1:0}equals(C){if(C.type===this.type){const j=this.regexp?this.regexp.source:"",B=C.regexp?C.regexp.source:"";return this.key===C.key&&j===B}return!1}substituteConstants(){return this}evaluate(C){let j=C.getValue(this.key);return this.regexp?this.regexp.test(j):!1}serialize(){const C=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${C}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this)),this.negated}}class I{constructor(C){this._actual=C,this.type=8}static create(C){return new I(C)}cmp(C){return C.type!==this.type?this.type-C.type:this._actual.cmp(C._actual)}equals(C){return C.type===this.type?this._actual.equals(C._actual):!1}substituteConstants(){return this}evaluate(C){return!this._actual.evaluate(C)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(C){let j=null;for(let B=0,w=C.length;B<w;B++){const Y=C[B].substituteConstants();if(C[B]!==Y&&j===null){j=[];for(let $=0;$<B;$++)j[$]=C[$]}j!==null&&(j[B]=Y)}return j===null?C:j}class E{constructor(C,j){this.expr=C,this.negated=j,this.type=6}static create(C,j){return E._normalizeArr(C,j)}cmp(C){if(C.type!==this.type)return this.type-C.type;if(this.expr.length<C.expr.length)return-1;if(this.expr.length>C.expr.length)return 1;for(let j=0,B=this.expr.length;j<B;j++){const w=n(this.expr[j],C.expr[j]);if(w!==0)return w}return 0}equals(C){if(C.type===this.type){if(this.expr.length!==C.expr.length)return!1;for(let j=0,B=this.expr.length;j<B;j++)if(!this.expr[j].equals(C.expr[j]))return!1;return!0}return!1}substituteConstants(){const C=O(this.expr);return C===this.expr?this:E.create(C,this.negated)}evaluate(C){for(let j=0,B=this.expr.length;j<B;j++)if(!this.expr[j].evaluate(C))return!1;return!0}static _normalizeArr(C,j){const B=[];let w=!1;for(const Y of C){if(!Y)continue;if(Y.type===1){w=!0;continue}if(Y.type===0)return D.INSTANCE;if(Y.type===6){B.push(...Y.expr);continue}B.push(Y)}if(B.length===0&&w)return b.INSTANCE;if(B.length===0)return;if(B.length===1)return B[0];B.sort(n);for(let Y=1;Y<B.length;Y++)B[Y-1].equals(B[Y])&&(B.splice(Y,1),Y--);if(B.length===1)return B[0];for(;B.length>1;){const Y=B[B.length-1];if(Y.type!==9)break;B.pop();const $=B.pop(),oe=B.length===0,de=y.create(Y.expr.map(Be=>E.create([Be,$],null)),null,oe);de&&(B.push(de),B.sort(n))}return B.length===1?B[0]:new E(B,j)}serialize(){return this.expr.map(C=>C.serialize()).join(" && ")}keys(){const C=[];for(let j of this.expr)C.push(...j.keys());return C}negate(){if(!this.negated){const C=[];for(let j of this.expr)C.push(j.negate());this.negated=y.create(C,this,!0)}return this.negated}}class y{constructor(C,j){this.expr=C,this.negated=j,this.type=9}static create(C,j,B){return y._normalizeArr(C,j,B)}cmp(C){if(C.type!==this.type)return this.type-C.type;if(this.expr.length<C.expr.length)return-1;if(this.expr.length>C.expr.length)return 1;for(let j=0,B=this.expr.length;j<B;j++){const w=n(this.expr[j],C.expr[j]);if(w!==0)return w}return 0}equals(C){if(C.type===this.type){if(this.expr.length!==C.expr.length)return!1;for(let j=0,B=this.expr.length;j<B;j++)if(!this.expr[j].equals(C.expr[j]))return!1;return!0}return!1}substituteConstants(){const C=O(this.expr);return C===this.expr?this:y.create(C,this.negated,!1)}evaluate(C){for(let j=0,B=this.expr.length;j<B;j++)if(this.expr[j].evaluate(C))return!0;return!1}static _normalizeArr(C,j,B){let w=[],Y=!1;if(C){for(let $=0,oe=C.length;$<oe;$++){const de=C[$];if(!de)continue;if(de.type===0){Y=!0;continue}if(de.type===1)return b.INSTANCE;if(de.type===9){w=w.concat(de.expr);continue}w.push(de)}if(w.length===0&&Y)return D.INSTANCE;w.sort(n)}if(w.length===0)return;if(w.length===1)return w[0];for(let $=1;$<w.length;$++)w[$-1].equals(w[$])&&(w.splice($,1),$--);if(w.length===1)return w[0];if(B){for(let $=0;$<w.length;$++)for(let oe=$+1;oe<w.length;oe++)P(w[$],w[oe])&&(w.splice(oe,1),oe--);if(w.length===1)return w[0]}return new y(w,j)}serialize(){return this.expr.map(C=>C.serialize()).join(" || ")}keys(){const C=[];for(let j of this.expr)C.push(...j.keys());return C}negate(){if(!this.negated){let C=[];for(let j of this.expr)C.push(j.negate());for(;C.length>1;){const j=C.shift(),B=C.shift(),w=[];for(const $ of x(j))for(const oe of x(B))w.push(E.create([$,oe],null));const Y=C.length===0;C.unshift(y.create(w,null,Y))}this.negated=C[0]}return this.negated}}class p extends m{constructor(C,j,B){super(C,null);this._defaultValue=j,typeof B=="object"?p._info.push(Object.assign(Object.assign({},B),{key:C})):B!==!0&&p._info.push({key:C,description:B,type:j!=null?typeof j:void 0})}static all(){return p._info.values()}bindTo(C){return C.createKey(this.key,this._defaultValue)}getValue(C){return C.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(C){return f.create(this.key,C)}}p._info=[];const h=Object(N.c)("contextKeyService"),A="setContext";function _(C,j){return C<j?-1:C>j?1:0}function v(C,j,B,w){return C<B?-1:C>B?1:j<w?-1:j>w?1:0}function P(C,j){if(j.type===6&&C.type!==9&&C.type!==6){for(const Y of j.expr)if(C.equals(Y))return!0}const B=C.negate(),w=x(B).concat(x(j));w.sort(n);for(let Y=0;Y<w.length;Y++){const $=w[Y],oe=$.negate();for(let de=Y+1;de<w.length;de++){const Be=w[de];if(oe.equals(Be))return!0}}return!1}function x(C){return C.type===9?C.expr:[C]}},TGq3:function(Ve,se,U){Ve.exports=U.p+"static/lockclose.365036e8.svg"},TXwP:function(Ve,se,U){var Z,z;(function(){var N;(function(){"use strict";var W=[,,function(n){function D(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}D.prototype.clone_empty=function(){var f=new D(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},D.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},D.prototype.has_match=function(f){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(f))return!0;return!1},D.prototype.set_indent=function(f,d){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(f){this.__items.push(f);var d=f.lastIndexOf(`
`);d!==-1?this.__character_count=f.length-d:this.__character_count+=f.length},D.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function b(f,d){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),d=d||"",f.indent_level>0&&(d=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}b.prototype.get_indent_size=function(f,d){var u=this.__base_string_length;return d=d||0,f<0&&(u=0),u+=f*this.__indent_size,u+=d,u},b.prototype.get_indent_string=function(f,d){var u=this.__base_string;return d=d||0,f<0&&(f=0,u=""),d+=f*this.__indent_size,this.__ensure_cache(d),u+=this.__cache[d],u},b.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var f=this.__cache.length,d=0,u="";this.__indent_size&&f>=this.__indent_size&&(d=Math.floor(f/this.__indent_size),f-=d*this.__indent_size,u=new Array(d+1).join(this.__indent_string)),f&&(u+=new Array(f+1).join(" ")),this.__cache.push(u)};function m(f,d){this.__indent_cache=new b(f,d),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(f,d){return this.__indent_cache.get_indent_string(f,d)},m.prototype.get_indent_size=function(f,d){return this.__indent_cache.get_indent_size(f,d)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(f){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(`
`);return f!==`
`&&(u=u.replace(/[\n]/g,f)),u},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(f,d){return f=f||0,d=d||0,this.next_line.set_indent(f,d),this.__lines.length>1?(this.current_line.set_indent(f,d),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(f){for(var d=0;d<f.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},m.prototype.remove_indent=function(f){for(var d=this.__lines.length;f<d;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(f,d){for(var u=this.__lines.length-2;u>=0;){var c=this.__lines[u];if(c.is_empty())break;if(c.item(0).indexOf(f)!==0&&c.item(-1)!==d){this.__lines.splice(u+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},n.exports.Output=m},,,,function(n){function D(f,d){this.raw_options=b(f,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}D.prototype._get_array=function(f,d){var u=this.raw_options[f],c=d||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(c=u.concat()):typeof u=="string"&&(c=u.split(/[^a-zA-Z0-9_\/\-]+/)),c},D.prototype._get_boolean=function(f,d){var u=this.raw_options[f],c=u===void 0?!!d:!!u;return c},D.prototype._get_characters=function(f,d){var u=this.raw_options[f],c=d||"";return typeof u=="string"&&(c=u.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),c},D.prototype._get_number=function(f,d){var u=this.raw_options[f];d=parseInt(d,10),isNaN(d)&&(d=0);var c=parseInt(u,10);return isNaN(c)&&(c=d),c},D.prototype._get_selection=function(f,d,u){var c=this._get_selection_list(f,d,u);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[f]+"'");return c[0]},D.prototype._get_selection_list=function(f,d,u){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[d[0]],!this._is_valid_selection(u,d))throw new Error("Invalid Default Value!");var c=this._get_array(f,u);if(!this._is_valid_selection(c,d))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[f]+"'");return c},D.prototype._is_valid_selection=function(f,d){return f.length&&d.length&&!f.some(function(u){return d.indexOf(u)===-1})};function b(f,d){var u={};f=m(f);var c;for(c in f)c!==d&&(u[c]=f[c]);if(d&&f[d])for(c in f[d])u[c]=f[d][c];return u}function m(f){var d={},u;for(u in f){var c=u.replace(/-/g,"_");d[c]=f[u]}return d}n.exports.Options=D,n.exports.normalizeOpts=m,n.exports.mergeOpts=b},,function(n){var D=RegExp.prototype.hasOwnProperty("sticky");function b(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position<this.__input_length},b.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},b.prototype.peek=function(m){var f=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(f=this.__input.charAt(m)),f},b.prototype.__match=function(m,f){m.lastIndex=f;var d=m.exec(this.__input);return d&&!(D&&m.sticky)&&(d.index!==f&&(d=null)),d},b.prototype.test=function(m,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(m,f):!1},b.prototype.testChar=function(m,f){var d=this.peek(f);return m.lastIndex=0,d!==null&&m.test(d)},b.prototype.match=function(m){var f=this.__match(m,this.__position);return f?this.__position+=f[0].length:f=null,f},b.prototype.read=function(m,f,d){var u="",c;return m&&(c=this.match(m),c&&(u+=c[0])),f&&(c||!m)&&(u+=this.readUntil(f,d)),u},b.prototype.readUntil=function(m,f){var d="",u=this.__position;m.lastIndex=this.__position;var c=m.exec(this.__input);return c?(u=c.index,f&&(u+=c[0].length)):u=this.__input_length,d=this.__input.substring(this.__position,u),this.__position=u,d},b.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},b.prototype.get_regexp=function(m,f){var d=null,u="g";return f&&D&&(u="y"),typeof m=="string"&&m!==""?d=new RegExp(m,u):m&&(d=new RegExp(m.source,u)),d},b.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},b.prototype.peekUntilAfter=function(m){var f=this.__position,d=this.readUntilAfter(m);return this.__position=f,d},b.prototype.lookBack=function(m){var f=this.__position-1;return f>=m.length&&this.__input.substring(f-m.length,f).toLowerCase()===m},n.exports.InputScanner=b},,,,,function(n){function D(b,m){b=typeof b=="string"?b:b.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(b+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(b+/\sbeautify\signore:end\s/.source+m,"g")}D.prototype.get_directives=function(b){if(!b.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(b);f;)m[f[1]]=f[2],f=this.__directive_pattern.exec(b);return m},D.prototype.readIgnored=function(b){return b.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=D},,function(n,D,b){var m=b(16).Beautifier,f=b(17).Options;function d(u,c){var o=new m(u,c);return o.beautify()}n.exports=d,n.exports.defaultOptions=function(){return new f}},function(n,D,b){var m=b(17).Options,f=b(2).Output,d=b(8).InputScanner,u=b(13).Directives,c=new u(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,a=/\s/,i=/(?:\s|\n)+/g,R=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,S=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function T(I,O){this._source_text=I||"",this._options=new m(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}T.prototype.eatString=function(I){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(I.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return O},T.prototype.eatWhitespace=function(I){for(var O=a.test(this._input.peek()),E=0;a.test(this._input.peek());)this._ch=this._input.next(),I&&this._ch===`
`&&((E===0||E<this._options.max_preserve_newlines)&&(E++,this._output.add_new_line(!0)));return O},T.prototype.foundNestedPseudoClass=function(){for(var I=0,O=1,E=this._input.peek(O);E;){if(E==="{")return!0;if(E==="(")I+=1;else if(E===")"){if(I===0)return!1;I-=1}else if(E===";"||E==="}")return!1;O++,E=this._input.peek(O)}return!1},T.prototype.print_string=function(I){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(I)},T.prototype.preserveSingleSpace=function(I){I&&(this._output.space_before_token=!0)},T.prototype.indent=function(){this._indentLevel++},T.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var I=this._source_text,O=this._options.eol;O==="auto"&&(O=`
`,I&&o.test(I||"")&&(O=I.match(o)[0])),I=I.replace(l,`
`);var E=I.match(/^[\t ]*/)[0];this._output=new f(this._options,E),this._input=new d(I),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var y=0,p=!1,h=!1,A=!1,_=!1,v=!1,P=!1,x=this._ch,C=!1,j,B,w;j=this._input.read(i),B=j!=="",w=x,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),x=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(R),$=c.get_directives(Y);$&&$.ignore==="start"&&(Y+=c.readIgnored(this._input)),this.print_string(Y),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(S)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(B),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?_=!0:oe==="import"&&(v=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(A=!0)):!p&&y===0&&oe.indexOf(":")!==-1&&(h=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(B),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")h&&(h=!1,this.outdent()),A?(A=!1,p=this._indentLevel>=this._nestedLevel):p=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&p&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(w==="("?this._output.space_before_token=!1:w!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),w==="{"&&this._output.trim(!0),v=!1,_=!1,h&&(this.outdent(),h=!1),this.print_string(this._ch),p=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){C=!0;break}(p||A)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!_&&y===0?(this.print_string(":"),h||(h=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Be=w==='"'||w==="'";this.preserveSingleSpace(Be||B),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")C=!1,y===0?(h&&(this.outdent(),h=!1),_=!1,v=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),y++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),y&&(y--,this.outdent()));else{var Ae=!1;this._input.lookBack("with")&&(Ae=!0),this.preserveSingleSpace(B||Ae),this.print_string(this._ch),h&&w==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),P=!0):(this.eatWhitespace(),y++,this.indent())}else if(this._ch===")")y&&(y--,this.outdent()),P&&this._input.peek()===";"&&this._options.selector_separator_newline&&(P=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!h||P)&&y===0&&!v&&!_?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!h&&y===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(B),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Re=w==='"'||w==="'";this.preserveSingleSpace(Re||B),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&C&&this._output.add_new_line()}var Le=this._output.get_code(O);return Le},n.exports.Beautifier=T},function(n,D,b){var m=b(6).Options;function f(d){m.call(this,d,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var u=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||u;var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<c.length;o++)c[o]!=="expand"?this.brace_style="collapse":this.brace_style=c[o]}f.prototype=new m,n.exports.Options=f}],M={};function K(n){var D=M[n];if(D!==void 0)return D.exports;var b=M[n]={exports:{}};return W[n](b,b.exports,K),b.exports}var H=K(15);N=H})();var V=N;!(Z=[],z=function(){return{css_beautify:V}}.apply(se,Z),z!==void 0&&(Ve.exports=z))})()},Vhoy:function(Ve,se,U){"use strict";U.d(se,"d",function(){return V}),U.d(se,"e",function(){return W}),U.d(se,"c",function(){return M}),U.d(se,"b",function(){return K}),U.d(se,"a",function(){return H});var Z=U("MI8n");class z{constructor(){this._icons=new Map,this._onDidRegister=new Z.b}add(n){const D=this._icons.get(n.id);D?n.description?D.description=n.description:console.error(`Duplicate registration of codicon ${n.id}`):(this._icons.set(n.id,n),this._onDidRegister.fire(n))}get(n){return this._icons.get(n)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const N=new z,V=N;function W(n,D){return new K(n,D)}function M(n){return n?n.replace(/\$\((.*?)\)/g,(D,b)=>` ${b} `).trim():""}class K{constructor(n,D,b){this.id=n,this.definition=D,this.description=b,N.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var H;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const D=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function b(d){if(d instanceof K)return["codicon","codicon-"+d.id];const u=D.exec(d.id);if(!u)return b(K.error);let[,c,o]=u;const l=["codicon","codicon-"+c];return o&&l.push("codicon-modifier-"+o.substr(1)),l}n.asClassNameArray=b;function m(d){return b(d).join(" ")}n.asClassName=m;function f(d){return"."+b(d).join(".")}n.asCSSSelector=f})(H||(H={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(K||(K={}))},"VrN/":function(Ve,se,U){(function(Z,z){Ve.exports=z()})(this,function(){"use strict";var Z=navigator.userAgent,z=navigator.platform,N=/gecko\/\d/i.test(Z),V=/MSIE \d/.test(Z),W=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),M=/Edge\/(\d+)/.exec(Z),K=V||W||M,H=K&&(V?document.documentMode||6:+(M||W)[1]),n=!M&&/WebKit\//.test(Z),D=n&&/Qt\/\d+\.\d+/.test(Z),b=!M&&/Chrome\//.test(Z),m=/Opera\//.test(Z),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),u=/PhantomJS/.test(Z),c=!M&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),o=/Android/.test(Z),l=c||o||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),a=c||/Mac/.test(z),i=/\bCrOS\b/.test(Z),R=/win/i.test(z),S=m&&Z.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(m=!1,n=!0);var T=a&&(D||m&&(S==null||S<12.11)),I=N||K&&H>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E=function(e,t){var s=e.className,r=O(t).exec(s);if(r){var g=s.slice(r.index+r[0].length);e.className=s.slice(0,r.index)+(g?r[1]+g:"")}};function y(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function p(e,t){return y(e).appendChild(t)}function h(e,t,s,r){var g=document.createElement(e);if(s&&(g.className=s),r&&(g.style.cssText=r),typeof t=="string")g.appendChild(document.createTextNode(t));else if(t)for(var F=0;F<t.length;++F)g.appendChild(t[F]);return g}function A(e,t,s,r){var g=h(e,t,s,r);return g.setAttribute("role","presentation"),g}var _;document.createRange?_=function(e,t,s,r){var g=document.createRange();return g.setEnd(r||e,s),g.setStart(e,t),g}:_=function(e,t,s){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(g){return r}return r.collapse(!0),r.moveEnd("character",s),r.moveStart("character",t),r};function v(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 P(){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 x(e,t){var s=e.className;O(t).test(s)||(e.className+=(s?" ":"")+t)}function C(e,t){for(var s=e.split(" "),r=0;r<s.length;r++)s[r]&&!O(s[r]).test(t)&&(t+=" "+s[r]);return t}var j=function(e){e.select()};c?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:K&&(j=function(e){try{e.select()}catch(t){}});function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function w(e,t,s){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(s!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Y(e,t,s,r,g){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var F=r||0,X=g||0;;){var q=e.indexOf(" ",F);if(q<0||q>=t)return X+(t-F);X+=q-F,X+=s-X%s,F=q+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var s=+new Date+e;(!this.id||s<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=s)};function oe(e,t){for(var s=0;s<e.length;++s)if(e[s]==t)return s;return-1}var de=50,Be={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},Re={origin:"*mouse"},Le={origin:"+move"};function Fe(e,t,s){for(var r=0,g=0;;){var F=e.indexOf(" ",r);F==-1&&(F=e.length);var X=F-r;if(F==e.length||g+X>=t)return r+Math.min(X,t-g);if(g+=F-r,g+=s-g%s,r=F+1,g>=t)return r}}var me=[""];function fe(e){for(;me.length<=e;)me.push(ne(me)+" ");return me[e]}function ne(e){return e[e.length-1]}function xe(e,t){for(var s=[],r=0;r<e.length;r++)s[r]=t(e[r],r);return s}function ce(e,t,s){for(var r=0,g=s(t);r<e.length&&s(e[r])<=g;)r++;e.splice(r,0,t)}function Ne(){}function He(e,t){var s;return Object.create?s=Object.create(e):(Ne.prototype=e,s=new Ne),t&&w(t,s),s}var ke=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ye(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ke.test(e))}function et(e,t){return t?t.source.indexOf("\\w")>-1&&Ye(e)?!0:t.test(e):Ye(e)}function ue(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var _e=/[\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 Oe(e){return e.charCodeAt(0)>=768&&_e.test(e)}function Me(e,t,s){for(;(s<0?t>0:t<e.length)&&Oe(e.charAt(t));)t+=s;return t}function rt(e,t,s){for(var r=t>s?-1:1;;){if(t==s)return t;var g=(t+s)/2,F=r<0?Math.ceil(g):Math.floor(g);if(F==t)return e(F)?t:s;e(F)?s=F:t=F+r}}function dt(e,t,s,r){if(!e)return r(t,s,"ltr",0);for(var g=!1,F=0;F<e.length;++F){var X=e[F];(X.from<s&&X.to>t||t==s&&X.to==t)&&(r(Math.max(X.from,t),Math.min(X.to,s),X.level==1?"rtl":"ltr",F),g=!0)}g||r(t,s,"ltr")}var pt=null;function ut(e,t,s){var r;pt=null;for(var g=0;g<e.length;++g){var F=e[g];if(F.from<t&&F.to>t)return g;F.to==t&&(F.from!=F.to&&s=="before"?r=g:pt=g),F.from==t&&(F.from!=F.to&&s!="before"?r=g:pt=g)}return r!=null?r:pt}var _t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function s(re){return re<=247?e.charAt(re):1424<=re&&re<=1524?"R":1536<=re&&re<=1785?t.charAt(re-1536):1774<=re&&re<=2220?"r":8192<=re&&re<=8203?"w":re==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,g=/[stwN]/,F=/[LRr]/,X=/[Lb1n]/,q=/[1n]/;function ee(re,we,De){this.level=re,this.from=we,this.to=De}return function(re,we){var De=we=="ltr"?"L":"R";if(re.length==0||we=="ltr"&&!r.test(re))return!1;for(var Ze=re.length,ze=[],ht=0;ht<Ze;++ht)ze.push(s(re.charCodeAt(ht)));for(var Et=0,At=De;Et<Ze;++Et){var Dt=ze[Et];Dt=="m"?ze[Et]=At:At=Dt}for(var Bt=0,Lt=De;Bt<Ze;++Bt){var Ht=ze[Bt];Ht=="1"&&Lt=="r"?ze[Bt]="n":F.test(Ht)&&(Lt=Ht,Ht=="r"&&(ze[Bt]="R"))}for(var nn=1,Zt=ze[0];nn<Ze-1;++nn){var fn=ze[nn];fn=="+"&&Zt=="1"&&ze[nn+1]=="1"?ze[nn]="1":fn==","&&Zt==ze[nn+1]&&(Zt=="1"||Zt=="n")&&(ze[nn]=Zt),Zt=fn}for(var Dn=0;Dn<Ze;++Dn){var ir=ze[Dn];if(ir==",")ze[Dn]="N";else if(ir=="%"){var Fn=void 0;for(Fn=Dn+1;Fn<Ze&&ze[Fn]=="%";++Fn);for(var kr=Dn&&ze[Dn-1]=="!"||Fn<Ze&&ze[Fn]=="1"?"1":"N",Tr=Dn;Tr<Fn;++Tr)ze[Tr]=kr;Dn=Fn-1}}for(var Jn=0,wr=De;Jn<Ze;++Jn){var lr=ze[Jn];wr=="L"&&lr=="1"?ze[Jn]="L":F.test(lr)&&(wr=lr)}for(var tr=0;tr<Ze;++tr)if(g.test(ze[tr])){var Zn=void 0;for(Zn=tr+1;Zn<Ze&&g.test(ze[Zn]);++Zn);for(var Wn=(tr?ze[tr-1]:De)=="L",Sr=(Zn<Ze?ze[Zn]:De)=="L",Hi=Wn==Sr?Wn?"L":"R":De,vi=tr;vi<Zn;++vi)ze[vi]=Hi;tr=Zn-1}for(var fr=[],ni,ar=0;ar<Ze;)if(X.test(ze[ar])){var Os=ar;for(++ar;ar<Ze&&X.test(ze[ar]);++ar);fr.push(new ee(0,Os,ar))}else{var oi=ar,wi=fr.length,Si=we=="rtl"?1:0;for(++ar;ar<Ze&&ze[ar]!="L";++ar);for(var vr=oi;vr<ar;)if(q.test(ze[vr])){oi<vr&&(fr.splice(wi,0,new ee(1,oi,vr)),wi+=Si);var Ki=vr;for(++vr;vr<ar&&q.test(ze[vr]);++vr);fr.splice(wi,0,new ee(2,Ki,vr)),wi+=Si,oi=vr}else++vr;oi<ar&&fr.splice(wi,0,new ee(1,oi,ar))}return we=="ltr"&&(fr[0].level==1&&(ni=re.match(/^\s+/))&&(fr[0].from=ni[0].length,fr.unshift(new ee(0,0,ni[0].length))),ne(fr).level==1&&(ni=re.match(/\s+$/))&&(ne(fr).to-=ni[0].length,fr.push(new ee(0,Ze-ni[0].length,Ze)))),we=="rtl"?fr.reverse():fr}}();function Tt(e,t){var s=e.order;return s==null&&(s=e.order=_t(e.text,t)),s}var Pe=[],Ce=function(e,t,s){if(e.addEventListener)e.addEventListener(t,s,!1);else if(e.attachEvent)e.attachEvent("on"+t,s);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Pe).concat(s)}};function tt(e,t){return e._handlers&&e._handlers[t]||Pe}function lt(e,t,s){if(e.removeEventListener)e.removeEventListener(t,s,!1);else if(e.detachEvent)e.detachEvent("on"+t,s);else{var r=e._handlers,g=r&&r[t];if(g){var F=oe(g,s);F>-1&&(r[t]=g.slice(0,F).concat(g.slice(F+1)))}}}function Ke(e,t){var s=tt(e,t);if(!s.length)return;for(var r=Array.prototype.slice.call(arguments,2),g=0;g<s.length;++g)s[g].apply(null,r)}function Xe(e,t,s){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ke(e,s||t.type,e,t),he(t)||t.codemirrorIgnore}function Se(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var s=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)oe(s,t[r])==-1&&s.push(t[r])}function ge(e,t){return tt(e,t).length>0}function Ee(e){e.prototype.on=function(t,s){Ce(this,t,s)},e.prototype.off=function(t,s){lt(this,t,s)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function he(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ve(e){ie(e),ae(e)}function Te(e){return e.target||e.srcElement}function Ge(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),a&&e.ctrlKey&&t==1&&(t=3),t}var ot=function(){if(K&&H<9)return!1;var e=h("div");return"draggable"in e||"dragDrop"in e}(),xt;function Ot(e){if(xt==null){var t=h("span","\u200B");p(e,h("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(xt=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&H<8))}var s=xt?h("span","\u200B"):h("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return s.setAttribute("cm-text",""),s}var wt;function vt(e){if(wt!=null)return wt;var t=p(e,document.createTextNode("A\u062EA")),s=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return y(e),!s||s.left==s.right?!1:wt=r.right-s.right<3}var qe=`
b`.split(/\n/).length!=3?function(e){for(var t=0,s=[],r=e.length;t<=r;){var g=e.indexOf(`
`,t);g==-1&&(g=e.length);var F=e.slice(t,e.charAt(g-1)=="\r"?g-1:g),X=F.indexOf("\r");X!=-1?(s.push(F.slice(0,X)),t+=X+1):(s.push(F),t=g+1)}return s}:function(e){return e.split(/\r\n?|\n/)},Qe=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(s){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ue=function(){var e=h("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),le=null;function pe(e){if(le!=null)return le;var t=p(e,h("span","x")),s=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return le=Math.abs(s.left-r.left)>1}var $e={},je={};function Je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$e[e]=t}function mt(e,t){je[e]=t}function We(e){if(typeof e=="string"&&je.hasOwnProperty(e))e=je[e];else if(e&&typeof e.name=="string"&&je.hasOwnProperty(e.name)){var t=je[e.name];typeof t=="string"&&(t={name:t}),e=He(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return We("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return We("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function it(e,t){t=We(t);var s=$e[t.name];if(!s)return it(e,"text/plain");var r=s(e,t);if(st.hasOwnProperty(t.name)){var g=st[t.name];for(var F in g){if(!g.hasOwnProperty(F))continue;r.hasOwnProperty(F)&&(r["_"+F]=r[F]),r[F]=g[F]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var X in t.modeProps)r[X]=t.modeProps[X];return r}var st={};function ct(e,t){var s=st.hasOwnProperty(e)?st[e]:st[e]={};w(t,s)}function bt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var s={};for(var r in t){var g=t[r];g instanceof Array&&(g=g.concat([])),s[r]=g}return s}function jt(e,t){for(var s;e.innerMode&&!(s=e.innerMode(t),!s||s.mode==e);)t=s.state,e=s.mode;return s||{mode:e,state:t}}function en(e,t,s){return e.startState?e.startState(t,s):!0}var Yt=function(e,t,s){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=s};Yt.prototype.eol=function(){return this.pos>=this.string.length},Yt.prototype.sol=function(){return this.pos==this.lineStart},Yt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Yt.prototype.eat=function(e){var t=this.string.charAt(this.pos),s;if(typeof e=="string"?s=t==e:s=t&&(e.test?e.test(t):e(t)),s)return++this.pos,t},Yt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Yt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Yt.prototype.skipToEnd=function(){this.pos=this.string.length},Yt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Yt.prototype.backUp=function(e){this.pos-=e},Yt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Y(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Yt.prototype.indentation=function(){return Y(this.string,null,this.tabSize)-(this.lineStart?Y(this.string,this.lineStart,this.tabSize):0)},Yt.prototype.match=function(e,t,s){if(typeof e=="string"){var r=function(X){return s?X.toLowerCase():X},g=this.string.substr(this.pos,e.length);if(r(g)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var F=this.string.slice(this.pos).match(e);return F&&F.index>0?null:(F&&t!==!1&&(this.pos+=F[0].length),F)}},Yt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Yt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Yt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ct(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 s=e;!s.lines;)for(var r=0;;++r){var g=s.children[r],F=g.chunkSize();if(t<F){s=g;break}t-=F}return s.lines[t]}function pn(e,t,s){var r=[],g=t.line;return e.iter(t.line,s.line+1,function(F){var X=F.text;g==s.line&&(X=X.slice(0,s.ch)),g==t.line&&(X=X.slice(t.ch)),r.push(X),++g}),r}function Rt(e,t,s){var r=[];return e.iter(t,s,function(g){r.push(g.text)}),r}function zt(e,t){var s=t-e.height;if(s)for(var r=e;r;r=r.parent)r.height+=s}function Pt(e){if(e.parent==null)return null;for(var t=e.parent,s=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var g=0;!(r.children[g]==t);++g)s+=r.children[g].chunkSize();return s+t.first}function qt(e,t){var s=e.first;e:do{for(var r=0;r<e.children.length;++r){var g=e.children[r],F=g.height;if(t<F){e=g;continue e}t-=F,s+=g.chunkSize()}return s}while(!e.lines);for(var X=0;X<e.lines.length;++X){var q=e.lines[X],ee=q.height;if(t<ee)break;t-=ee}return s+X}function yn(e,t){return t>=e.first&&t<e.first+e.size}function wn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function yt(e,t,s){if(s===void 0&&(s=null),!(this instanceof yt))return new yt(e,t,s);this.line=e,this.ch=t,this.sticky=s}function Vt(e,t){return e.line-t.line||e.ch-t.ch}function Mn(e,t){return e.sticky==t.sticky&&Vt(e,t)==0}function Un(e){return yt(e.line,e.ch)}function Pn(e,t){return Vt(e,t)<0?t:e}function Vn(e,t){return Vt(e,t)<0?e:t}function Q(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function L(e,t){if(t.line<e.first)return yt(e.first,0);var s=e.first+e.size-1;return t.line>s?yt(s,Ct(e,s).text.length):k(t,Ct(e,t.line).text.length)}function k(e,t){var s=e.ch;return s==null||s>t?yt(e.line,t):s<0?yt(e.line,0):e}function G(e,t){for(var s=[],r=0;r<t.length;r++)s[r]=L(e,t[r]);return s}var te=function(e,t){this.state=e,this.lookAhead=t},J=function(e,t,s,r){this.state=t,this.doc=e,this.line=s,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};J.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},J.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}},J.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},J.fromSaved=function(e,t,s){return t instanceof te?new J(e,bt(e.mode,t.state),s,t.lookAhead):new J(e,bt(e.mode,t),s)},J.prototype.save=function(e){var t=e!==!1?bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new te(t,this.maxLookAhead):t};function Ie(e,t,s,r){var g=[e.state.modeGen],F={};Kn(e,t.text,e.doc.mode,s,function(re,we){return g.push(re,we)},F,r);for(var X=s.state,q=function(re){s.baseTokens=g;var we=e.state.overlays[re],De=1,Ze=0;s.state=!0,Kn(e,t.text,we.mode,s,function(ze,ht){for(var Et=De;Ze<ze;){var At=g[De];At>ze&&g.splice(De,1,ze,g[De+1],At),De+=2,Ze=Math.min(ze,At)}if(!ht)return;if(we.opaque)g.splice(Et,De-Et,ze,"overlay "+ht),De=Et+2;else for(;Et<De;Et+=2){var Dt=g[Et+1];g[Et+1]=(Dt?Dt+" ":"")+"overlay "+ht}},F),s.state=X,s.baseTokens=null,s.baseTokenPos=1},ee=0;ee<e.state.overlays.length;++ee)q(ee);return{styles:g,classes:F.bgClass||F.textClass?F:null}}function at(e,t,s){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=St(e,Pt(t)),g=t.text.length>e.options.maxHighlightLength&&bt(e.doc.mode,r.state),F=Ie(e,t,r);g&&(r.state=g),t.stateAfter=r.save(!g),t.styles=F.styles,F.classes?t.styleClasses=F.classes:t.styleClasses&&(t.styleClasses=null),s===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,s){var r=e.doc,g=e.display;if(!r.mode.startState)return new J(r,!0,t);var F=In(e,t,s),X=F>r.first&&Ct(r,F-1).stateAfter,q=X?J.fromSaved(r,X,F):new J(r,en(r.mode),F);return r.iter(F,t,function(ee){Ft(e,ee.text,q);var re=q.line;ee.stateAfter=re==t-1||re%5==0||re>=g.viewFrom&&re<g.viewTo?q.save():null,q.nextLine()}),s&&(r.modeFrontier=q.line),q}function Ft(e,t,s,r){var g=e.doc.mode,F=new Yt(t,e.options.tabSize,s);for(F.start=F.pos=r||0,t==""&&ye(g,s.state);!F.eol();)Ut(g,F,s.state),F.start=F.pos}function ye(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var s=jt(e,t);if(s.mode.blankLine)return s.mode.blankLine(s.state)}function Ut(e,t,s,r){for(var g=0;g<10;g++){r&&(r[0]=jt(e,s).mode);var F=e.token(t,s);if(t.pos>t.start)return F}throw new Error("Mode "+e.name+" failed to advance stream.")}var $t=function(e,t,s){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=s};function Sn(e,t,s,r){var g=e.doc,F=g.mode,X;t=L(g,t);var q=Ct(g,t.line),ee=St(e,t.line,s),re=new Yt(q.text,e.options.tabSize,ee),we;for(r&&(we=[]);(r||re.pos<t.ch)&&!re.eol();)re.start=re.pos,X=Ut(F,re,ee.state),r&&we.push(new $t(re,X,bt(g.mode,ee.state)));return r?we:new $t(re,X,ee.state)}function Hn(e,t){if(e)for(;;){var s=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!s)break;e=e.slice(0,s.index)+e.slice(s.index+s[0].length);var r=s[1]?"bgClass":"textClass";t[r]==null?t[r]=s[2]:new RegExp("(?:^|\\s)"+s[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+s[2])}return e}function Kn(e,t,s,r,g,F,X){var q=s.flattenSpans;q==null&&(q=e.options.flattenSpans);var ee=0,re=null,we=new Yt(t,e.options.tabSize,r),De,Ze=e.options.addModeClass&&[null];for(t==""&&Hn(ye(s,r.state),F);!we.eol();){if(we.pos>e.options.maxHighlightLength?(q=!1,X&&Ft(e,t,r,we.pos),we.pos=t.length,De=null):De=Hn(Ut(s,we,r.state,Ze),F),Ze){var ze=Ze[0].name;ze&&(De="m-"+(De?ze+" "+De:ze))}if(!q||re!=De){for(;ee<we.start;)ee=Math.min(we.start,ee+5e3),g(ee,re);re=De}we.start=we.pos}for(;ee<we.pos;){var ht=Math.min(we.pos,ee+5e3);g(ht,re),ee=ht}}function In(e,t,s){for(var r,g,F=e.doc,X=s?-1:t-(e.doc.mode.innerMode?1e3:100),q=t;q>X;--q){if(q<=F.first)return F.first;var ee=Ct(F,q-1),re=ee.stateAfter;if(re&&(!s||q+(re instanceof te?re.lookAhead:0)<=F.modeFrontier))return q;var we=Y(ee.text,null,e.options.tabSize);(g==null||r>we)&&(g=q-1,r=we)}return g}function pr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var s=e.first,r=t-1;r>s;r--){var g=Ct(e,r).stateAfter;if(g&&(!(g instanceof te)||r+g.lookAhead<t)){s=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,s)}var ur=!1,Bn=!1;function cr(){ur=!0}function Ar(){Bn=!0}function Cr(e,t,s){this.marker=e,this.from=t,this.to=s}function Yn(e,t){if(e)for(var s=0;s<e.length;++s){var r=e[s];if(r.marker==t)return r}}function Wr(e,t){for(var s,r=0;r<e.length;++r)e[r]!=t&&(s||(s=[])).push(e[r]);return s}function Pr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function yr(e,t,s){var r;if(e)for(var g=0;g<e.length;++g){var F=e[g],X=F.marker,q=F.from==null||(X.inclusiveLeft?F.from<=t:F.from<t);if(q||F.from==t&&X.type=="bookmark"&&(!s||!F.marker.insertLeft)){var ee=F.to==null||(X.inclusiveRight?F.to>=t:F.to>t);(r||(r=[])).push(new Cr(X,F.from,ee?null:F.to))}}return r}function Qr(e,t,s){var r;if(e)for(var g=0;g<e.length;++g){var F=e[g],X=F.marker,q=F.to==null||(X.inclusiveRight?F.to>=t:F.to>t);if(q||F.from==t&&X.type=="bookmark"&&(!s||F.marker.insertLeft)){var ee=F.from==null||(X.inclusiveLeft?F.from<=t:F.from<t);(r||(r=[])).push(new Cr(X,ee?null:F.from-t,F.to==null?null:F.to-t))}}return r}function br(e,t){if(t.full)return null;var s=yn(e,t.from.line)&&Ct(e,t.from.line).markedSpans,r=yn(e,t.to.line)&&Ct(e,t.to.line).markedSpans;if(!s&&!r)return null;var g=t.from.ch,F=t.to.ch,X=Vt(t.from,t.to)==0,q=yr(s,g,X),ee=Qr(r,F,X),re=t.text.length==1,we=ne(t.text).length+(re?g:0);if(q)for(var De=0;De<q.length;++De){var Ze=q[De];if(Ze.to==null){var ze=Yn(ee,Ze.marker);ze?re&&(Ze.to=ze.to==null?null:ze.to+we):Ze.to=g}}if(ee)for(var ht=0;ht<ee.length;++ht){var Et=ee[ht];if(Et.to!=null&&(Et.to+=we),Et.from==null){var At=Yn(q,Et.marker);At||(Et.from=we,re&&(q||(q=[])).push(Et))}else Et.from+=we,re&&(q||(q=[])).push(Et)}q&&(q=dr(q)),ee&&ee!=q&&(ee=dr(ee));var Dt=[q];if(!re){var Bt=t.text.length-2,Lt;if(Bt>0&&q)for(var Ht=0;Ht<q.length;++Ht)q[Ht].to==null&&(Lt||(Lt=[])).push(new Cr(q[Ht].marker,null,null));for(var nn=0;nn<Bt;++nn)Dt.push(Lt);Dt.push(ee)}return Dt}function dr(e){for(var t=0;t<e.length;++t){var s=e[t];s.from!=null&&s.from==s.to&&s.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Nr(e,t,s){var r=null;if(e.iter(t.line,s.line+1,function(ze){if(ze.markedSpans)for(var ht=0;ht<ze.markedSpans.length;++ht){var Et=ze.markedSpans[ht].marker;Et.readOnly&&(!r||oe(r,Et)==-1)&&(r||(r=[])).push(Et)}}),!r)return null;for(var g=[{from:t,to:s}],F=0;F<r.length;++F)for(var X=r[F],q=X.find(0),ee=0;ee<g.length;++ee){var re=g[ee];if(Vt(re.to,q.from)<0||Vt(re.from,q.to)>0)continue;var we=[ee,1],De=Vt(re.from,q.from),Ze=Vt(re.to,q.to);(De<0||!X.inclusiveLeft&&!De)&&we.push({from:re.from,to:q.from}),(Ze>0||!X.inclusiveRight&&!Ze)&&we.push({from:q.to,to:re.to}),g.splice.apply(g,we),ee+=we.length-3}return g}function Hr(e){var t=e.markedSpans;if(!t)return;for(var s=0;s<t.length;++s)t[s].marker.detachLine(e);e.markedSpans=null}function Er(e,t){if(!t)return;for(var s=0;s<t.length;++s)t[s].marker.attachLine(e);e.markedSpans=t}function _n(e){return e.inclusiveLeft?-1:0}function sn(e){return e.inclusiveRight?1:0}function Ln(e,t){var s=e.lines.length-t.lines.length;if(s!=0)return s;var r=e.find(),g=t.find(),F=Vt(r.from,g.from)||_n(e)-_n(t);if(F)return-F;var X=Vt(r.to,g.to)||sn(e)-sn(t);return X||t.id-e.id}function un(e,t){var s=Bn&&e.markedSpans,r;if(s)for(var g=void 0,F=0;F<s.length;++F)g=s[F],g.marker.collapsed&&(t?g.from:g.to)==null&&(!r||Ln(r,g.marker)<0)&&(r=g.marker);return r}function Rn(e){return un(e,!0)}function bn(e){return un(e,!1)}function Or(e,t){var s=Bn&&e.markedSpans,r;if(s)for(var g=0;g<s.length;++g){var F=s[g];F.marker.collapsed&&(F.from==null||F.from<t)&&(F.to==null||F.to>t)&&(!r||Ln(r,F.marker)<0)&&(r=F.marker)}return r}function jn(e,t,s,r,g){var F=Ct(e,t),X=Bn&&F.markedSpans;if(X)for(var q=0;q<X.length;++q){var ee=X[q];if(!ee.marker.collapsed)continue;var re=ee.marker.find(0),we=Vt(re.from,s)||_n(ee.marker)-_n(g),De=Vt(re.to,r)||sn(ee.marker)-sn(g);if(we>=0&&De<=0||we<=0&&De>=0)continue;if(we<=0&&(ee.marker.inclusiveRight&&g.inclusiveLeft?Vt(re.to,s)>=0:Vt(re.to,s)>0)||we>=0&&(ee.marker.inclusiveRight&&g.inclusiveLeft?Vt(re.from,r)<=0:Vt(re.from,r)<0))return!0}}function Xn(e){for(var t;t=Rn(e);)e=t.find(-1,!0).line;return e}function Kr(e){for(var t;t=bn(e);)e=t.find(1,!0).line;return e}function Rr(e){for(var t,s;t=bn(e);)e=t.find(1,!0).line,(s||(s=[])).push(e);return s}function Gr(e,t){var s=Ct(e,t),r=Xn(s);return s==r?t:Pt(r)}function Ir(e,t){if(t>e.lastLine())return t;var s=Ct(e,t),r;if(!Dr(e,s))return t;for(;r=bn(s);)s=r.find(1,!0).line;return Pt(s)+1}function Dr(e,t){var s=Bn&&t.markedSpans;if(s)for(var r=void 0,g=0;g<s.length;++g){if(r=s[g],!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.marker.widgetNode)continue;if(r.from==0&&r.marker.inclusiveLeft&&jr(e,t,r))return!0}}function jr(e,t,s){if(s.to==null){var r=s.marker.find(1,!0);return jr(e,r.line,Yn(r.line.markedSpans,s.marker))}if(s.marker.inclusiveRight&&s.to==t.text.length)return!0;for(var g=void 0,F=0;F<t.markedSpans.length;++F)if(g=t.markedSpans[F],g.marker.collapsed&&!g.marker.widgetNode&&g.from==s.to&&(g.to==null||g.to!=s.from)&&(g.marker.inclusiveLeft||s.marker.inclusiveRight)&&jr(e,t,g))return!0}function _r(e){e=Xn(e);for(var t=0,s=e.parent,r=0;r<s.lines.length;++r){var g=s.lines[r];if(g==e)break;t+=g.height}for(var F=s.parent;F;s=F,F=s.parent)for(var X=0;X<F.children.length;++X){var q=F.children[X];if(q==s)break;t+=q.height}return t}function zr(e){if(e.height==0)return 0;for(var t=e.text.length,s,r=e;s=Rn(r);){var g=s.find(0,!0);r=g.from.line,t+=g.from.ch-g.to.ch}for(r=e;s=bn(r);){var F=s.find(0,!0);t-=r.text.length-F.from.ch,r=F.to.line,t+=r.text.length-F.to.ch}return t}function Jr(e){var t=e.display,s=e.doc;t.maxLine=Ct(s,s.first),t.maxLineLength=zr(t.maxLine),t.maxLineChanged=!0,s.iter(function(r){var g=zr(r);g>t.maxLineLength&&(t.maxLineLength=g,t.maxLine=r)})}var sr=function(e,t,s){this.text=e,Er(this,t),this.height=s?s(this):1};sr.prototype.lineNo=function(){return Pt(this)},Ee(sr);function ri(e,t,s,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Hr(e),Er(e,s);var g=r?r(e):1;g!=e.height&&zt(e,g)}function Gt(e){e.parent=null,Hr(e)}var tn={},Xt={};function on(e,t){if(!e||/^\s*$/.test(e))return null;var s=t.addModeClass?Xt:tn;return s[e]||(s[e]=e.replace(/\S+/g,"cm-$&"))}function dn(e,t){var s=A("span",null,null,n?"padding-right: .1px":null),r={pre:A("pre",[s],"CodeMirror-line"),content:s,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var g=0;g<=(t.rest?t.rest.length:0);g++){var F=g?t.rest[g-1]:t.line,X=void 0;r.pos=0,r.addToken=hn,vt(e.display.measure)&&(X=Tt(F,e.doc.direction))&&(r.addToken=qn(r.addToken,X)),r.map=[];var q=t!=e.display.externalMeasured&&Pt(F);rn(F,r,at(e,F,q)),F.styleClasses&&(F.styleClasses.bgClass&&(r.bgClass=C(F.styleClasses.bgClass,r.bgClass||"")),F.styleClasses.textClass&&(r.textClass=C(F.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Ot(e.display.measure))),g==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var ee=r.content.lastChild;(/\bcm-tab\b/.test(ee.className)||ee.querySelector&&ee.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ke(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=C(r.pre.className,r.textClass||"")),r}function An(e){var t=h("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hn(e,t,s,r,g,F,X){if(!t)return;var q=e.splitSpaces?kn(t,e.trailingSpace):t,ee=e.cm.state.specialChars,re=!1,we;if(!ee.test(t))e.col+=t.length,we=document.createTextNode(q),e.map.push(e.pos,e.pos+t.length,we),K&&H<9&&(re=!0),e.pos+=t.length;else{we=document.createDocumentFragment();for(var De=0;;){ee.lastIndex=De;var Ze=ee.exec(t),ze=Ze?Ze.index-De:t.length-De;if(ze){var ht=document.createTextNode(q.slice(De,De+ze));K&&H<9?we.appendChild(h("span",[ht])):we.appendChild(ht),e.map.push(e.pos,e.pos+ze,ht),e.col+=ze,e.pos+=ze}if(!Ze)break;De+=ze+1;var Et=void 0;if(Ze[0]==" "){var At=e.cm.options.tabSize,Dt=At-e.col%At;Et=we.appendChild(h("span",fe(Dt),"cm-tab")),Et.setAttribute("role","presentation"),Et.setAttribute("cm-text"," "),e.col+=Dt}else Ze[0]=="\r"||Ze[0]==`
`?(Et=we.appendChild(h("span",Ze[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Et.setAttribute("cm-text",Ze[0]),e.col+=1):(Et=e.cm.options.specialCharPlaceholder(Ze[0]),Et.setAttribute("cm-text",Ze[0]),K&&H<9?we.appendChild(h("span",[Et])):we.appendChild(Et),e.col+=1);e.map.push(e.pos,e.pos+1,Et),e.pos++}}if(e.trailingSpace=q.charCodeAt(t.length-1)==32,s||r||g||re||F||X){var Bt=s||"";r&&(Bt+=r),g&&(Bt+=g);var Lt=h("span",[we],Bt,F);if(X)for(var Ht in X)X.hasOwnProperty(Ht)&&Ht!="style"&&Ht!="class"&&Lt.setAttribute(Ht,X[Ht]);return e.content.appendChild(Lt)}e.content.appendChild(we)}function kn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var s=t,r="",g=0;g<e.length;g++){var F=e.charAt(g);F==" "&&s&&(g==e.length-1||e.charCodeAt(g+1)==32)&&(F="\xA0"),r+=F,s=F==" "}return r}function qn(e,t){return function(s,r,g,F,X,q,ee){g=g?g+" cm-force-border":"cm-force-border";for(var re=s.pos,we=re+r.length;;){for(var De=void 0,Ze=0;Ze<t.length&&!(De=t[Ze],De.to>re&&De.from<=re);Ze++);if(De.to>=we)return e(s,r,g,F,X,q,ee);e(s,r.slice(0,De.to-re),g,F,null,q,ee),F=null,r=r.slice(De.to-re),re=De.to}}}function ln(e,t,s,r){var g=!r&&s.widgetNode;g&&e.map.push(e.pos,e.pos+t,g),!r&&e.cm.display.input.needsContentAttribute&&(g||(g=e.content.appendChild(document.createElement("span"))),g.setAttribute("cm-marker",s.id)),g&&(e.cm.display.input.setUneditable(g),e.content.appendChild(g)),e.pos+=t,e.trailingSpace=!1}function rn(e,t,s){var r=e.markedSpans,g=e.text,F=0;if(!r){for(var X=1;X<s.length;X+=2)t.addToken(t,g.slice(F,F=s[X]),on(s[X+1],t.cm.options));return}for(var q=g.length,ee=0,re=1,we="",De,Ze,ze=0,ht,Et,At,Dt,Bt;;){if(ze==ee){ht=Et=At=Ze="",Bt=null,Dt=null,ze=Infinity;for(var Lt=[],Ht=void 0,nn=0;nn<r.length;++nn){var Zt=r[nn],fn=Zt.marker;if(fn.type=="bookmark"&&Zt.from==ee&&fn.widgetNode)Lt.push(fn);else if(Zt.from<=ee&&(Zt.to==null||Zt.to>ee||fn.collapsed&&Zt.to==ee&&Zt.from==ee)){if(Zt.to!=null&&Zt.to!=ee&&ze>Zt.to&&(ze=Zt.to,Et=""),fn.className&&(ht+=" "+fn.className),fn.css&&(Ze=(Ze?Ze+";":"")+fn.css),fn.startStyle&&Zt.from==ee&&(At+=" "+fn.startStyle),fn.endStyle&&Zt.to==ze&&(Ht||(Ht=[])).push(fn.endStyle,Zt.to),fn.title&&((Bt||(Bt={})).title=fn.title),fn.attributes)for(var Dn in fn.attributes)(Bt||(Bt={}))[Dn]=fn.attributes[Dn];fn.collapsed&&(!Dt||Ln(Dt.marker,fn)<0)&&(Dt=Zt)}else Zt.from>ee&&ze>Zt.from&&(ze=Zt.from)}if(Ht)for(var ir=0;ir<Ht.length;ir+=2)Ht[ir+1]==ze&&(Et+=" "+Ht[ir]);if(!Dt||Dt.from==ee)for(var Fn=0;Fn<Lt.length;++Fn)ln(t,0,Lt[Fn]);if(Dt&&(Dt.from||0)==ee){if(ln(t,(Dt.to==null?q+1:Dt.to)-ee,Dt.marker,Dt.from==null),Dt.to==null)return;Dt.to==ee&&(Dt=!1)}}if(ee>=q)break;for(var kr=Math.min(q,ze);;){if(we){var Tr=ee+we.length;if(!Dt){var Jn=Tr>kr?we.slice(0,kr-ee):we;t.addToken(t,Jn,De?De+ht:ht,At,ee+Jn.length==ze?Et:"",Ze,Bt)}if(Tr>=kr){we=we.slice(kr-ee),ee=kr;break}ee=Tr,At=""}we=g.slice(F,F=s[re++]),De=on(s[re++],t.cm.options)}}}function mn(e,t,s){this.line=t,this.rest=Rr(t),this.size=this.rest?Pt(ne(this.rest))-s+1:1,this.node=this.text=null,this.hidden=Dr(e,t)}function Qn(e,t,s){for(var r=[],g,F=t;F<s;F=g){var X=new mn(e.doc,Ct(e.doc,F),F);g=F+X.size,r.push(X)}return r}var Gn=null;function an(e){Gn?Gn.ops.push(e):e.ownsGroup=Gn={ops:[e],delayedCallbacks:[]}}function Zr(e){var t=e.delayedCallbacks,s=0;do{for(;s<t.length;s++)t[s].call(null);for(var r=0;r<e.ops.length;r++){var g=e.ops[r];if(g.cursorActivityHandlers)for(;g.cursorActivityCalled<g.cursorActivityHandlers.length;)g.cursorActivityHandlers[g.cursorActivityCalled++].call(null,g.cm)}}while(s<t.length)}function xn(e,t){var s=e.ownsGroup;if(!s)return;try{Zr(s)}finally{Gn=null,t(s)}}var gn=null;function En(e,t){var s=tt(e,t);if(!s.length)return;var r=Array.prototype.slice.call(arguments,2),g;Gn?g=Gn.delayedCallbacks:gn?g=gn:(g=gn=[],setTimeout($n,0));for(var F=function(q){g.push(function(){return s[q].apply(null,r)})},X=0;X<s.length;++X)F(X)}function $n(){var e=gn;gn=null;for(var t=0;t<e.length;++t)e[t]()}function qr(e,t,s,r){for(var g=0;g<t.changes.length;g++){var F=t.changes[g];F=="text"?Gi(e,t):F=="gutter"?zi(e,t,s,r):F=="class"?Ci(e,t):F=="widget"&&Vi(e,t,r)}t.changes=null}function Vr(e){return e.node==e.text&&(e.node=h("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),K&&H<8&&(e.node.style.zIndex=2)),e.node}function $r(e,t){var s=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(s&&(s+=" CodeMirror-linebackground"),t.background)s?t.background.className=s:(t.background.parentNode.removeChild(t.background),t.background=null);else if(s){var r=Vr(t);t.background=r.insertBefore(h("div",null,s),r.firstChild),e.display.input.setUneditable(t.background)}}function Ai(e,t){var s=e.display.externalMeasured;return s&&s.line==t.line?(e.display.externalMeasured=null,t.measure=s.measure,s.built):dn(e,t)}function Gi(e,t){var s=t.text.className,r=Ai(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ci(e,t)):s&&(t.text.className=s)}function Ci(e,t){$r(e,t),t.line.wrapClass?Vr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var s=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=s||""}function zi(e,t,s,r){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 g=Vr(t);t.gutterBackground=h("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),g.insertBefore(t.gutterBackground,t.text)}var F=t.line.gutterMarkers;if(e.options.lineNumbers||F){var X=Vr(t),q=t.gutter=h("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(q),X.insertBefore(q,t.text),t.line.gutterClass&&(q.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!F||!F["CodeMirror-linenumbers"])&&(t.lineNumber=q.appendChild(h("div",wn(e.options,s),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),F)for(var ee=0;ee<e.display.gutterSpecs.length;++ee){var re=e.display.gutterSpecs[ee].className,we=F.hasOwnProperty(re)&&F[re];we&&q.appendChild(h("div",[we],"CodeMirror-gutter-elt","left: "+r.gutterLeft[re]+"px; width: "+r.gutterWidth[re]+"px"))}}}function Vi(e,t,s){t.alignable&&(t.alignable=null);for(var r=O("CodeMirror-linewidget"),g=t.node.firstChild,F=void 0;g;g=F)F=g.nextSibling,r.test(g.className)&&t.node.removeChild(g);Yi(e,t,s)}function Ja(e,t,s,r){var g=Ai(e,t);return t.text=t.node=g.pre,g.bgClass&&(t.bgClass=g.bgClass),g.textClass&&(t.textClass=g.textClass),Ci(e,t),zi(e,t,s,r),Yi(e,t,r),t.node}function Yi(e,t,s){if(Xi(e,t.line,t,s,!0),t.rest)for(var r=0;r<t.rest.length;r++)Xi(e,t.rest[r],t,s,!1)}function Xi(e,t,s,r,g){if(!t.widgets)return;for(var F=Vr(s),X=0,q=t.widgets;X<q.length;++X){var ee=q[X],re=h("div",[ee.node],"CodeMirror-linewidget"+(ee.className?" "+ee.className:""));ee.handleMouseEvents||re.setAttribute("cm-ignore-events","true"),Za(ee,re,s,r),e.display.input.setUneditable(re),g&&ee.above?F.insertBefore(re,s.gutter||s.text):F.appendChild(re),En(ee,"redraw")}}function Za(e,t,s,r){if(e.noHScroll){(s.alignable||(s.alignable=[])).push(t);var g=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(g-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=g+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function li(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!v(document.body,e.node)){var s="position: relative;";e.coverGutter&&(s+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(s+="width: "+t.display.wrapper.clientWidth+"px;"),p(t.display.measure,h("div",[e.node],null,s))}return e.height=e.node.parentNode.offsetHeight}function ei(e,t){for(var s=Te(t);s!=e.wrapper;s=s.parentNode)if(!s||s.nodeType==1&&s.getAttribute("cm-ignore-events")=="true"||s.parentNode==e.sizer&&s!=e.mover)return!0}function Oi(e){return e.lineSpace.offsetTop}function ti(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=p(e.measure,h("pre","x","CodeMirror-line-like")),s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(s.paddingLeft),right:parseInt(s.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function mr(e){return de-e.display.nativeBarWidth}function ii(e){return e.display.scroller.clientWidth-mr(e)-e.display.barWidth}function yi(e){return e.display.scroller.clientHeight-mr(e)-e.display.barHeight}function $a(e,t,s){var r=e.options.lineWrapping,g=r&&ii(e);if(!t.measure.heights||r&&t.measure.width!=g){var F=t.measure.heights=[];if(r){t.measure.width=g;for(var X=t.text.firstChild.getClientRects(),q=0;q<X.length-1;q++){var ee=X[q],re=X[q+1];Math.abs(ee.bottom-re.bottom)>2&&F.push((ee.bottom+re.top)/2-s.top)}}F.push(s.bottom-s.top)}}function Qi(e,t,s){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var g=0;g<e.rest.length;g++)if(Pt(e.rest[g])>s)return{map:e.measure.maps[g],cache:e.measure.caches[g],before:!0}}function es(e,t){t=Xn(t);var s=Pt(t),r=e.display.externalMeasured=new mn(e.doc,t,s);r.lineN=s;var g=r.built=dn(e,r);return r.text=g.pre,p(e.display.lineMeasure,g.pre),r}function _a(e,t,s,r){return Ur(e,ui(e,t),s,r)}function ai(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Tn(e,t)];var s=e.display.externalMeasured;if(s&&t>=s.lineN&&t<s.lineN+s.size)return s}function ui(e,t){var s=Pt(t),r=ai(e,s);r&&!r.text?r=null:r&&r.changes&&(qr(e,r,s,kt(e)),e.curOp.forceUpdate=!0),r||(r=es(e,t));var g=Qi(r,t,s);return{line:t,view:r,rect:null,map:g.map,cache:g.cache,before:g.before,hasHeights:!1}}function Ur(e,t,s,r,g){t.before&&(s=-1);var F=s+(r||""),X;return t.cache.hasOwnProperty(F)?X=t.cache[F]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||($a(e,t.view,t.rect),t.hasHeights=!0),X=ns(e,t,s,r),X.bogus||(t.cache[F]=X)),{left:X.left,right:X.right,top:g?X.rtop:X.top,bottom:g?X.rbottom:X.bottom}}var xa={left:0,right:0,top:0,bottom:0};function bi(e,t,s){for(var r,g,F,X,q,ee,re=0;re<e.length;re+=3)if(q=e[re],ee=e[re+1],t<q?(g=0,F=1,X="left"):t<ee?(g=t-q,F=g+1):(re==e.length-3||t==ee&&e[re+3]>t)&&(F=ee-q,g=F-1,t>=ee&&(X="right")),g!=null){if(r=e[re+2],q==ee&&s==(r.insertLeft?"left":"right")&&(X=s),s=="left"&&g==0)for(;re&&e[re-2]==e[re-3]&&e[re-1].insertLeft;)r=e[(re-=3)+2],X="left";if(s=="right"&&g==ee-q)for(;re<e.length-3&&e[re+3]==e[re+4]&&!e[re+5].insertLeft;)r=e[(re+=3)+2],X="right";break}return{node:r,start:g,end:F,collapse:X,coverStart:q,coverEnd:ee}}function ts(e,t){var s=xa;if(t=="left")for(var r=0;r<e.length&&!((s=e[r]).left!=s.right);r++);else for(var g=e.length-1;g>=0&&!((s=e[g]).left!=s.right);g--);return s}function ns(e,t,s,r){var g=bi(t.map,s,r),F=g.node,X=g.start,q=g.end,ee=g.collapse,re;if(F.nodeType==3){for(var we=0;we<4;we++){for(;X&&Oe(t.line.text.charAt(g.coverStart+X));)--X;for(;g.coverStart+q<g.coverEnd&&Oe(t.line.text.charAt(g.coverStart+q));)++q;if(K&&H<9&&X==0&&q==g.coverEnd-g.coverStart?re=F.parentNode.getBoundingClientRect():re=ts(_(F,X,q).getClientRects(),r),re.left||re.right||X==0)break;q=X,X=X-1,ee="right"}K&&H<11&&(re=rs(e.display.measure,re))}else{X>0&&(ee=r="right");var De;e.options.lineWrapping&&(De=F.getClientRects()).length>1?re=De[r=="right"?De.length-1:0]:re=F.getBoundingClientRect()}if(K&&H<9&&!X&&(!re||!re.left&&!re.right)){var Ze=F.parentNode.getClientRects()[0];Ze?re={left:Ze.left,right:Ze.left+Nt(e.display),top:Ze.top,bottom:Ze.bottom}:re=xa}for(var ze=re.top-t.rect.top,ht=re.bottom-t.rect.top,Et=(ze+ht)/2,At=t.view.measure.heights,Dt=0;Dt<At.length-1&&!(Et<At[Dt]);Dt++);var Bt=Dt?At[Dt-1]:0,Lt=At[Dt],Ht={left:(ee=="right"?re.right:re.left)-t.rect.left,right:(ee=="left"?re.left:re.right)-t.rect.left,top:Bt,bottom:Lt};return!re.left&&!re.right&&(Ht.bogus=!0),e.options.singleCursorHeightPerLine||(Ht.rtop=ze,Ht.rbottom=ht),Ht}function rs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!pe(e))return t;var s=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*s,right:t.right*s,top:t.top*r,bottom:t.bottom*r}}function Ta(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 wa(e){e.display.externalMeasure=null,y(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Ta(e.display.view[t])}function ci(e){wa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Sa(){return b&&o?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Aa(){return b&&o?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ji(e){var t=0;if(e.widgets)for(var s=0;s<e.widgets.length;++s)e.widgets[s].above&&(t+=li(e.widgets[s]));return t}function Ri(e,t,s,r,g){if(!g){var F=Ji(t);s.top+=F,s.bottom+=F}if(r=="line")return s;r||(r="local");var X=_r(t);if(r=="local"?X+=Oi(e.display):X-=e.display.viewOffset,r=="page"||r=="window"){var q=e.display.lineSpace.getBoundingClientRect();X+=q.top+(r=="window"?0:Aa());var ee=q.left+(r=="window"?0:Sa());s.left+=ee,s.right+=ee}return s.top+=X,s.bottom+=X,s}function Ca(e,t,s){if(s=="div")return t;var r=t.left,g=t.top;if(s=="page")r-=Sa(),g-=Aa();else if(s=="local"||!s){var F=e.display.sizer.getBoundingClientRect();r+=F.left,g+=F.top}var X=e.display.lineSpace.getBoundingClientRect();return{left:r-X.left,top:g-X.top}}function Zi(e,t,s,r,g){return r||(r=Ct(e.doc,t.line)),Ri(e,r,_a(e,r,t.ch,g),s)}function er(e,t,s,r,g,F){r=r||Ct(e.doc,t.line),g||(g=ui(e,r));function X(ht,Et){var At=Ur(e,g,ht,Et?"right":"left",F);return Et?At.left=At.right:At.right=At.left,Ri(e,r,At,s)}var q=Tt(r,e.doc.direction),ee=t.ch,re=t.sticky;if(ee>=r.text.length?(ee=r.text.length,re="before"):ee<=0&&(ee=0,re="after"),!q)return X(re=="before"?ee-1:ee,re=="before");function we(ht,Et,At){var Dt=q[Et],Bt=Dt.level==1;return X(At?ht-1:ht,Bt!=At)}var De=ut(q,ee,re),Ze=pt,ze=we(ee,De,re=="before");return Ze!=null&&(ze.other=we(ee,Ze,re!="before")),ze}function Oa(e,t){var s=0;t=L(e.doc,t),e.options.lineWrapping||(s=Nt(e.display)*t.ch);var r=Ct(e.doc,t.line),g=_r(r)+Oi(e.display);return{left:s,right:s,top:g,bottom:g+r.height}}function qi(e,t,s,r,g){var F=yt(e,t,s);return F.xRel=g,r&&(F.outside=r),F}function $i(e,t,s){var r=e.doc;if(s+=e.display.viewOffset,s<0)return qi(r.first,0,null,-1,-1);var g=qt(r,s),F=r.first+r.size-1;if(g>F)return qi(r.first+r.size-1,Ct(r,F).text.length,null,1,1);t<0&&(t=0);for(var X=Ct(r,g);;){var q=ft(e,X,g,t,s),ee=Or(X,q.ch+(q.xRel>0||q.outside>0?1:0));if(!ee)return q;var re=ee.find(1);if(re.line==g)return re;X=Ct(r,g=re.line)}}function Ra(e,t,s,r){r-=Ji(t);var g=t.text.length,F=rt(function(X){return Ur(e,s,X-1).bottom<=r},g,0);return g=rt(function(X){return Ur(e,s,X).top>r},F,g),{begin:F,end:g}}function Wt(e,t,s,r){s||(s=ui(e,t));var g=Ri(e,t,Ur(e,s,r),"line").top;return Ra(e,t,s,g)}function be(e,t,s,r){return e.bottom<=s?!1:e.top>s?!0:(r?e.left:e.right)>t}function ft(e,t,s,r,g){g-=_r(t);var F=ui(e,t),X=Ji(t),q=0,ee=t.text.length,re=!0,we=Tt(t,e.doc.direction);if(we){var De=(e.options.lineWrapping?Mt:nt)(e,t,s,F,we,r,g);re=De.level!=1,q=re?De.from:De.to-1,ee=re?De.to:De.from-1}var Ze=null,ze=null,ht=rt(function(nn){var Zt=Ur(e,F,nn);return Zt.top+=X,Zt.bottom+=X,be(Zt,r,g,!1)?(Zt.top<=g&&Zt.left<=r&&(Ze=nn,ze=Zt),!0):!1},q,ee),Et,At,Dt=!1;if(ze){var Bt=r-ze.left<ze.right-r,Lt=Bt==re;ht=Ze+(Lt?0:1),At=Lt?"after":"before",Et=Bt?ze.left:ze.right}else{!re&&(ht==ee||ht==q)&&ht++,At=ht==0?"after":ht==t.text.length?"before":Ur(e,F,ht-(re?1:0)).bottom+X<=g==re?"after":"before";var Ht=er(e,yt(s,ht,At),"line",t,F);Et=Ht.left,Dt=g<Ht.top?-1:g>=Ht.bottom?1:0}return ht=Me(t.text,ht,1),qi(s,ht,At,Dt,r-Et)}function nt(e,t,s,r,g,F,X){var q=rt(function(De){var Ze=g[De],ze=Ze.level!=1;return be(er(e,yt(s,ze?Ze.to:Ze.from,ze?"before":"after"),"line",t,r),F,X,!0)},0,g.length-1),ee=g[q];if(q>0){var re=ee.level!=1,we=er(e,yt(s,re?ee.from:ee.to,re?"after":"before"),"line",t,r);be(we,F,X,!0)&&we.top>X&&(ee=g[q-1])}return ee}function Mt(e,t,s,r,g,F,X){var q=Ra(e,t,r,X),ee=q.begin,re=q.end;/\s/.test(t.text.charAt(re-1))&&re--;for(var we=null,De=null,Ze=0;Ze<g.length;Ze++){var ze=g[Ze];if(ze.from>=re||ze.to<=ee)continue;var ht=ze.level!=1,Et=Ur(e,r,ht?Math.min(re,ze.to)-1:Math.max(ee,ze.from)).right,At=Et<F?F-Et+1e9:Et-F;(!we||De>At)&&(we=ze,De=At)}return we||(we=g[g.length-1]),we.from<ee&&(we={from:ee,to:we.to,level:we.level}),we.to>re&&(we={from:we.from,to:re,level:we.level}),we}var gt;function It(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(gt==null){gt=h("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)gt.appendChild(document.createTextNode("x")),gt.appendChild(h("br"));gt.appendChild(document.createTextNode("x"))}p(e.measure,gt);var s=gt.offsetHeight/50;return s>3&&(e.cachedTextHeight=s),y(e.measure),s||1}function Nt(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=h("span","xxxxxxxxxx"),s=h("pre",[t],"CodeMirror-line-like");p(e.measure,s);var r=t.getBoundingClientRect(),g=(r.right-r.left)/10;return g>2&&(e.cachedCharWidth=g),g||10}function kt(e){for(var t=e.display,s={},r={},g=t.gutters.clientLeft,F=t.gutters.firstChild,X=0;F;F=F.nextSibling,++X){var q=e.display.gutterSpecs[X].className;s[q]=F.offsetLeft+F.clientLeft+g,r[q]=F.clientWidth}return{fixedPos:Qt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:s,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Qt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Kt(e){var t=It(e.display),s=e.options.lineWrapping,r=s&&Math.max(5,e.display.scroller.clientWidth/Nt(e.display)-3);return function(g){if(Dr(e.doc,g))return 0;var F=0;if(g.widgets)for(var X=0;X<g.widgets.length;X++)g.widgets[X].height&&(F+=g.widgets[X].height);return s?F+(Math.ceil(g.text.length/r)||1)*t:F+t}}function Jt(e){var t=e.doc,s=Kt(e);t.iter(function(r){var g=s(r);g!=r.height&&zt(r,g)})}function vn(e,t,s,r){var g=e.display;if(!s&&Te(t).getAttribute("cm-not-content")=="true")return null;var F,X,q=g.lineSpace.getBoundingClientRect();try{F=t.clientX-q.left,X=t.clientY-q.top}catch(De){return null}var ee=$i(e,F,X),re;if(r&&ee.xRel>0&&(re=Ct(e.doc,ee.line).text).length==ee.ch){var we=Y(re,re.length,e.options.tabSize)-re.length;ee=yt(ee.line,Math.max(0,Math.round((F-qa(e.display).left)/Nt(e.display))-we))}return ee}function Tn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var s=e.display.view,r=0;r<s.length;r++)if(t-=s[r].size,t<0)return r}function cn(e,t,s,r){t==null&&(t=e.doc.first),s==null&&(s=e.doc.first+e.doc.size),r||(r=0);var g=e.display;if(r&&s<g.viewTo&&(g.updateLineNumbers==null||g.updateLineNumbers>t)&&(g.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=g.viewTo)Bn&&Gr(e.doc,t)<g.viewTo&&Lr(e);else if(s<=g.viewFrom)Bn&&Ir(e.doc,s+r)>g.viewFrom?Lr(e):(g.viewFrom+=r,g.viewTo+=r);else if(t<=g.viewFrom&&s>=g.viewTo)Lr(e);else if(t<=g.viewFrom){var F=di(e,s,s+r,1);F?(g.view=g.view.slice(F.index),g.viewFrom=F.lineN,g.viewTo+=r):Lr(e)}else if(s>=g.viewTo){var X=di(e,t,t,-1);X?(g.view=g.view.slice(0,X.index),g.viewTo=X.lineN):Lr(e)}else{var q=di(e,t,t,-1),ee=di(e,s,s+r,1);q&&ee?(g.view=g.view.slice(0,q.index).concat(Qn(e,q.lineN,ee.lineN)).concat(g.view.slice(ee.index)),g.viewTo+=r):Lr(e)}var re=g.externalMeasured;re&&(s<re.lineN?re.lineN+=r:t<re.lineN+re.size&&(g.externalMeasured=null))}function or(e,t,s){e.curOp.viewChanged=!0;var r=e.display,g=e.display.externalMeasured;if(g&&t>=g.lineN&&t<g.lineN+g.size&&(r.externalMeasured=null),t<r.viewFrom||t>=r.viewTo)return;var F=r.view[Tn(e,t)];if(F.node==null)return;var X=F.changes||(F.changes=[]);oe(X,s)==-1&&X.push(s)}function Lr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function di(e,t,s,r){var g=Tn(e,t),F,X=e.display.view;if(!Bn||s==e.doc.first+e.doc.size)return{index:g,lineN:s};for(var q=e.display.viewFrom,ee=0;ee<g;ee++)q+=X[ee].size;if(q!=t){if(r>0){if(g==X.length-1)return null;F=q+X[g].size-t,g++}else F=q-t;t+=F,s+=F}for(;Gr(e.doc,s)!=s;){if(g==(r<0?0:X.length-1))return null;s+=r*X[g-(r<0?1:0)].size,g+=r}return{index:g,lineN:s}}function Ia(e,t,s){var r=e.display,g=r.view;g.length==0||t>=r.viewTo||s<=r.viewFrom?(r.view=Qn(e,t,s),r.viewFrom=t):(r.viewFrom>t?r.view=Qn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Tn(e,t))),r.viewFrom=t,r.viewTo<s?r.view=r.view.concat(Qn(e,r.viewTo,s)):r.viewTo>s&&(r.view=r.view.slice(0,Tn(e,s)))),r.viewTo=s}function Is(e){for(var t=e.display.view,s=0,r=0;r<t.length;r++){var g=t[r];!g.hidden&&(!g.node||g.changes)&&++s}return s}function ea(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ds(e,t){t===void 0&&(t=!0);for(var s=e.doc,r={},g=r.cursors=document.createDocumentFragment(),F=r.selection=document.createDocumentFragment(),X=0;X<s.sel.ranges.length;X++){if(!t&&X==s.sel.primIndex)continue;var q=s.sel.ranges[X];if(q.from().line>=e.display.viewTo||q.to().line<e.display.viewFrom)continue;var ee=q.empty();(ee||e.options.showCursorWhenSelecting)&&Ls(e,q.head,g),ee||Yo(e,q,F)}return r}function Ls(e,t,s){var r=er(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),g=s.appendChild(h("div","\xA0","CodeMirror-cursor"));if(g.style.left=r.left+"px",g.style.top=r.top+"px",g.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var F=s.appendChild(h("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));F.style.display="",F.style.left=r.other.left+"px",F.style.top=r.other.top+"px",F.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Da(e,t){return e.top-t.top||e.left-t.left}function Yo(e,t,s){var r=e.display,g=e.doc,F=document.createDocumentFragment(),X=qa(e.display),q=X.left,ee=Math.max(r.sizerWidth,ii(e)-r.sizer.offsetLeft)-X.right,re=g.direction=="ltr";function we(Lt,Ht,nn,Zt){Ht<0&&(Ht=0),Ht=Math.round(Ht),Zt=Math.round(Zt),F.appendChild(h("div",null,"CodeMirror-selected","position: absolute; left: "+Lt+`px;
top: `+Ht+"px; width: "+(nn==null?ee-Lt:nn)+`px;
height: `+(Zt-Ht)+"px"))}function De(Lt,Ht,nn){var Zt=Ct(g,Lt),fn=Zt.text.length,Dn,ir;function Fn(Jn,wr){return Zi(e,yt(Lt,Jn),"div",Zt,wr)}function kr(Jn,wr,lr){var tr=Wt(e,Zt,null,Jn),Zn=wr=="ltr"==(lr=="after")?"left":"right",Wn=lr=="after"?tr.begin:tr.end-(/\s/.test(Zt.text.charAt(tr.end-1))?2:1);return Fn(Wn,Zn)[Zn]}var Tr=Tt(Zt,g.direction);return dt(Tr,Ht||0,nn==null?fn:nn,function(Jn,wr,lr,tr){var Zn=lr=="ltr",Wn=Fn(Jn,Zn?"left":"right"),Sr=Fn(wr-1,Zn?"right":"left"),Hi=Ht==null&&Jn==0,vi=nn==null&&wr==fn,fr=tr==0,ni=!Tr||tr==Tr.length-1;if(Sr.top-Wn.top<=3){var ar=(re?Hi:vi)&&fr,Os=(re?vi:Hi)&&ni,oi=ar?q:(Zn?Wn:Sr).left,wi=Os?ee:(Zn?Sr:Wn).right;we(oi,Wn.top,wi-oi,Wn.bottom)}else{var Si,vr,Ki,Rs;Zn?(Si=re&&Hi&&fr?q:Wn.left,vr=re?ee:kr(Jn,lr,"before"),Ki=re?q:kr(wr,lr,"after"),Rs=re&&vi&&ni?ee:Sr.right):(Si=re?kr(Jn,lr,"before"):q,vr=!re&&Hi&&fr?ee:Wn.right,Ki=!re&&vi&&ni?q:Sr.left,Rs=re?kr(wr,lr,"after"):ee),we(Si,Wn.top,vr-Si,Wn.bottom),Wn.bottom<Sr.top&&we(q,Wn.bottom,null,Sr.top),we(Ki,Sr.top,Rs-Ki,Sr.bottom)}(!Dn||Da(Wn,Dn)<0)&&(Dn=Wn),Da(Sr,Dn)<0&&(Dn=Sr),(!ir||Da(Wn,ir)<0)&&(ir=Wn),Da(Sr,ir)<0&&(ir=Sr)}),{start:Dn,end:ir}}var Ze=t.from(),ze=t.to();if(Ze.line==ze.line)De(Ze.line,Ze.ch,ze.ch);else{var ht=Ct(g,Ze.line),Et=Ct(g,ze.line),At=Xn(ht)==Xn(Et),Dt=De(Ze.line,Ze.ch,At?ht.text.length+1:null).end,Bt=De(ze.line,At?0:null,ze.ch).start;At&&(Dt.top<Bt.top-2?(we(Dt.right,Dt.top,null,Dt.bottom),we(q,Bt.top,Bt.left,Bt.bottom)):we(Dt.right,Dt.top,Bt.left-Dt.right,Dt.bottom)),Dt.bottom<Bt.top&&we(q,Dt.bottom,null,Bt.top)}s.appendChild(F)}function is(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var s=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(s=!s)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ms(e){e.state.focused||(e.display.input.focus(),as(e))}function ks(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function as(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ke(e,"focus",e,t),e.state.focused=!0,x(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),is(e)}function Ii(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ke(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function La(e){for(var t=e.display,s=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var g=t.view[r],F=e.options.lineWrapping,X=void 0,q=0;if(g.hidden)continue;if(K&&H<8){var ee=g.node.offsetTop+g.node.offsetHeight;X=ee-s,s=ee}else{var re=g.node.getBoundingClientRect();X=re.bottom-re.top,!F&&g.text.firstChild&&(q=g.text.firstChild.getBoundingClientRect().right-re.left-1)}var we=g.line.height-X;if((we>.005||we<-.005)&&(zt(g.line,X),Ps(g.line),g.rest))for(var De=0;De<g.rest.length;De++)Ps(g.rest[De]);if(q>e.display.sizerWidth){var Ze=Math.ceil(q/Nt(e.display));Ze>e.display.maxLineLength&&(e.display.maxLineLength=Ze,e.display.maxLine=g.line,e.display.maxLineChanged=!0)}}}function Ps(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var s=e.widgets[t],r=s.node.parentNode;r&&(s.height=r.offsetHeight)}}function Ma(e,t,s){var r=s&&s.top!=null?Math.max(0,s.top):e.scroller.scrollTop;r=Math.floor(r-Oi(e));var g=s&&s.bottom!=null?s.bottom:r+e.wrapper.clientHeight,F=qt(t,r),X=qt(t,g);if(s&&s.ensure){var q=s.ensure.from.line,ee=s.ensure.to.line;q<F?(F=q,X=qt(t,_r(Ct(t,q))+e.wrapper.clientHeight)):Math.min(ee,t.lastLine())>=X&&(F=qt(t,_r(Ct(t,ee))-e.wrapper.clientHeight),X=ee)}return{from:F,to:Math.max(X,F+1)}}function Xo(e,t){if(Xe(e,"scrollCursorIntoView"))return;var s=e.display,r=s.sizer.getBoundingClientRect(),g=null;if(t.top+r.top<0?g=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(g=!1),g!=null&&!u){var F=h("div","\u200B",null,`position: absolute;
top: `+(t.top-s.viewOffset-Oi(e.display))+`px;
height: `+(t.bottom-t.top+mr(e)+s.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(F),F.scrollIntoView(g),e.display.lineSpace.removeChild(F)}}function Qo(e,t,s,r){r==null&&(r=0);var g;!e.options.lineWrapping&&t==s&&(t=t.ch?yt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,s=t.sticky=="before"?yt(t.line,t.ch+1,"before"):t);for(var F=0;F<5;F++){var X=!1,q=er(e,t),ee=!s||s==t?q:er(e,s);g={left:Math.min(q.left,ee.left),top:Math.min(q.top,ee.top)-r,right:Math.max(q.left,ee.left),bottom:Math.max(q.bottom,ee.bottom)+r};var re=ss(e,g),we=e.doc.scrollTop,De=e.doc.scrollLeft;if(re.scrollTop!=null&&(na(e,re.scrollTop),Math.abs(e.doc.scrollTop-we)>1&&(X=!0)),re.scrollLeft!=null&&(Ei(e,re.scrollLeft),Math.abs(e.doc.scrollLeft-De)>1&&(X=!0)),!X)break}return g}function Jo(e,t){var s=ss(e,t);s.scrollTop!=null&&na(e,s.scrollTop),s.scrollLeft!=null&&Ei(e,s.scrollLeft)}function ss(e,t){var s=e.display,r=It(e.display);t.top<0&&(t.top=0);var g=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,F=yi(e),X={};t.bottom-t.top>F&&(t.bottom=t.top+F);var q=e.doc.height+ti(s),ee=t.top<r,re=t.bottom>q-r;if(t.top<g)X.scrollTop=ee?0:t.top;else if(t.bottom>g+F){var we=Math.min(t.top,(re?q:t.bottom)-F);we!=g&&(X.scrollTop=we)}var De=e.options.fixedGutter?0:s.gutters.offsetWidth,Ze=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft-De,ze=ii(e)-s.gutters.offsetWidth,ht=t.right-t.left>ze;return ht&&(t.right=t.left+ze),t.left<10?X.scrollLeft=0:t.left<Ze?X.scrollLeft=Math.max(0,t.left+De-(ht?0:10)):t.right>ze+Ze-3&&(X.scrollLeft=t.right+(ht?0:10)-ze),X}function os(e,t){if(t==null)return;ka(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Di(e){ka(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ta(e,t,s){(t!=null||s!=null)&&ka(e),t!=null&&(e.curOp.scrollLeft=t),s!=null&&(e.curOp.scrollTop=s)}function Zo(e,t){ka(e),e.curOp.scrollToPos=t}function ka(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var s=Oa(e,t.from),r=Oa(e,t.to);Ns(e,s,r,t.margin)}}function Ns(e,t,s,r){var g=ss(e,{left:Math.min(t.left,s.left),top:Math.min(t.top,s.top)-r,right:Math.max(t.right,s.right),bottom:Math.max(t.bottom,s.bottom)+r});ta(e,g.scrollLeft,g.scrollTop)}function na(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;N||us(e,{top:t}),Us(e,t,!0),N&&us(e),aa(e,100)}function Us(e,t,s){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!s)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ei(e,t,s,r){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(s?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)return;e.doc.scrollLeft=t,Hs(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ra(e){var t=e.display,s=t.gutters.offsetWidth,r=Math.round(e.doc.height+ti(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?s:0,docHeight:r,scrollHeight:r+mr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:s}}var _i=function(e,t,s){this.cm=s;var r=this.vert=h("div",[h("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),g=this.horiz=h("div",[h("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=g.tabIndex=-1,e(r),e(g),Ce(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ce(g,"scroll",function(){g.clientWidth&&t(g.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,K&&H<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_i.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,s=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(s){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var g=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+g)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=s?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var F=e.viewWidth-e.barLeft-(s?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+F)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:s?r:0,bottom:t?r:0}},_i.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_i.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_i.prototype.zeroWidthHack=function(){var e=a&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},_i.prototype.enableZeroWidthBar=function(e,t,s){e.style.pointerEvents="auto";function r(){var g=e.getBoundingClientRect(),F=s=="vert"?document.elementFromPoint(g.right-1,(g.top+g.bottom)/2):document.elementFromPoint((g.right+g.left)/2,g.bottom-1);F!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},_i.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ia=function(){};ia.prototype.update=function(){return{bottom:0,right:0}},ia.prototype.setScrollLeft=function(){},ia.prototype.setScrollTop=function(){},ia.prototype.clear=function(){};function Li(e,t){t||(t=ra(e));var s=e.display.barWidth,r=e.display.barHeight;Bs(e,t);for(var g=0;g<4&&s!=e.display.barWidth||r!=e.display.barHeight;g++)s!=e.display.barWidth&&e.options.lineWrapping&&La(e),Bs(e,ra(e)),s=e.display.barWidth,r=e.display.barHeight}function Bs(e,t){var s=e.display,r=s.scrollbars.update(t);s.sizer.style.paddingRight=(s.barWidth=r.right)+"px",s.sizer.style.paddingBottom=(s.barHeight=r.bottom)+"px",s.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(s.scrollbarFiller.style.display="block",s.scrollbarFiller.style.height=r.bottom+"px",s.scrollbarFiller.style.width=r.right+"px"):s.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(s.gutterFiller.style.display="block",s.gutterFiller.style.height=r.bottom+"px",s.gutterFiller.style.width=t.gutterWidth+"px"):s.gutterFiller.style.display=""}var Fs={native:_i,null:ia};function js(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Fs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,s){s=="horizontal"?Ei(e,t):na(e,t)},e),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)}var qo=0;function xi(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:++qo},an(e.curOp)}function Ti(e){var t=e.curOp;t&&xn(t,function(s){for(var r=0;r<s.ops.length;r++)s.ops[r].cm.curOp=null;$o(s)})}function $o(e){for(var t=e.ops,s=0;s<t.length;s++)el(t[s]);for(var r=0;r<t.length;r++)tl(t[r]);for(var g=0;g<t.length;g++)nl(t[g]);for(var F=0;F<t.length;F++)rl(t[F]);for(var X=0;X<t.length;X++)il(t[X])}function el(e){var t=e.cm,s=t.display;sl(t),e.updateMaxLine&&Jr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<s.viewFrom||e.scrollToPos.to.line>=s.viewTo)||s.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Pa(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&ls(e.cm,e.update)}function nl(e){var t=e.cm,s=t.display;e.updatedDisplay&&La(t),e.barMeasure=ra(t),s.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_a(t,s.maxLine,s.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(s.scroller.clientWidth,s.sizer.offsetLeft+e.adjustWidthTo+mr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,s.sizer.offsetLeft+e.adjustWidthTo-ii(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=s.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ei(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var s=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,s),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Li(t,e.barMeasure),e.updatedDisplay&&ds(t,e.barMeasure),e.selectionChanged&&is(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),s&&Ms(e.cm)}function il(e){var t=e.cm,s=t.display,r=t.doc;if(e.updatedDisplay&&Ws(t,e.update),s.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(s.wheelStartX=s.wheelStartY=null),e.scrollTop!=null&&Us(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ei(t,e.scrollLeft,!0,!0),e.scrollToPos){var g=Qo(t,L(r,e.scrollToPos.from),L(r,e.scrollToPos.to),e.scrollToPos.margin);Xo(t,g)}var F=e.maybeHiddenMarkers,X=e.maybeUnhiddenMarkers;if(F)for(var q=0;q<F.length;++q)F[q].lines.length||Ke(F[q],"hide");if(X)for(var ee=0;ee<X.length;++ee)X[ee].lines.length&&Ke(X[ee],"unhide");s.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ke(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Mr(e,t){if(e.curOp)return t();xi(e);try{return t()}finally{Ti(e)}}function nr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);xi(e);try{return t.apply(e,arguments)}finally{Ti(e)}}}function gr(e){return function(){if(this.curOp)return e.apply(this,arguments);xi(this);try{return e.apply(this,arguments)}finally{Ti(this)}}}function rr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);xi(t);try{return e.apply(this,arguments)}finally{Ti(t)}}}function aa(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var s=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),g=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(F){if(r.line>=e.display.viewFrom){var X=F.styles,q=F.text.length>e.options.maxHighlightLength?bt(t.mode,r.state):null,ee=Ie(e,F,r,!0);q&&(r.state=q),F.styles=ee.styles;var re=F.styleClasses,we=ee.classes;we?F.styleClasses=we:re&&(F.styleClasses=null);for(var De=!X||X.length!=F.styles.length||re!=we&&(!re||!we||re.bgClass!=we.bgClass||re.textClass!=we.textClass),Ze=0;!De&&Ze<X.length;++Ze)De=X[Ze]!=F.styles[Ze];De&&g.push(r.line),F.stateAfter=r.save(),r.nextLine()}else F.text.length<=e.options.maxHighlightLength&&Ft(e,F.text,r),F.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>s)return aa(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),g.length&&Mr(e,function(){for(var F=0;F<g.length;F++)or(e,g[F],"text")})}var Pa=function(e,t,s){var r=e.display;this.viewport=t,this.visible=Ma(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=ii(e),this.force=s,this.dims=kt(e),this.events=[]};Pa.prototype.signal=function(e,t){ge(e,t)&&this.events.push(arguments)},Pa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ke.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=mr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=mr(e)+"px",t.scrollbarsClipped=!0)}function ol(e){if(e.hasFocus())return null;var t=P();if(!t||!v(e.display.lineDiv,t))return null;var s={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&v(e.display.lineDiv,r.anchorNode)&&(s.anchorNode=r.anchorNode,s.anchorOffset=r.anchorOffset,s.focusNode=r.focusNode,s.focusOffset=r.focusOffset)}return s}function ll(e){if(!e||!e.activeElt||e.activeElt==P())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&v(document.body,e.anchorNode)&&v(document.body,e.focusNode)){var t=window.getSelection(),s=document.createRange();s.setEnd(e.anchorNode,e.anchorOffset),s.collapse(!1),t.removeAllRanges(),t.addRange(s),t.extend(e.focusNode,e.focusOffset)}}function ls(e,t){var s=e.display,r=e.doc;if(t.editorIsHidden)return Lr(e),!1;if(!t.force&&t.visible.from>=s.viewFrom&&t.visible.to<=s.viewTo&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo)&&s.renderedView==s.view&&Is(e)==0)return!1;Ks(e)&&(Lr(e),t.dims=kt(e));var g=r.first+r.size,F=Math.max(t.visible.from-e.options.viewportMargin,r.first),X=Math.min(g,t.visible.to+e.options.viewportMargin);s.viewFrom<F&&F-s.viewFrom<20&&(F=Math.max(r.first,s.viewFrom)),s.viewTo>X&&s.viewTo-X<20&&(X=Math.min(g,s.viewTo)),Bn&&(F=Gr(e.doc,F),X=Ir(e.doc,X));var q=F!=s.viewFrom||X!=s.viewTo||s.lastWrapHeight!=t.wrapperHeight||s.lastWrapWidth!=t.wrapperWidth;Ia(e,F,X),s.viewOffset=_r(Ct(e.doc,s.viewFrom)),e.display.mover.style.top=s.viewOffset+"px";var ee=Is(e);if(!q&&ee==0&&!t.force&&s.renderedView==s.view&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo))return!1;var re=ol(e);return ee>4&&(s.lineDiv.style.display="none"),ul(e,s.updateLineNumbers,t.dims),ee>4&&(s.lineDiv.style.display=""),s.renderedView=s.view,ll(re),y(s.cursorDiv),y(s.selectionDiv),s.gutters.style.height=s.sizer.style.minHeight=0,q&&(s.lastWrapHeight=t.wrapperHeight,s.lastWrapWidth=t.wrapperWidth,aa(e,400)),s.updateLineNumbers=null,!0}function Ws(e,t){for(var s=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==ii(e)){if(s&&s.top!=null&&(s={top:Math.min(e.doc.height+ti(e.display)-yi(e),s.top)}),t.visible=Ma(e.display,e.doc,s),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Ma(e.display,e.doc,s));if(!ls(e,t))break;La(e);var g=ra(e);ea(e),Li(e,g),ds(e,g),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 us(e,t){var s=new Pa(e,t);if(ls(e,s)){La(e),Ws(e,s);var r=ra(e);ea(e),Li(e,r),ds(e,r),s.finish()}}function ul(e,t,s){var r=e.display,g=e.options.lineNumbers,F=r.lineDiv,X=F.firstChild;function q(ht){var Et=ht.nextSibling;return n&&a&&e.display.currentWheelTarget==ht?ht.style.display="none":ht.parentNode.removeChild(ht),Et}for(var ee=r.view,re=r.viewFrom,we=0;we<ee.length;we++){var De=ee[we];if(!De.hidden)if(!De.node||De.node.parentNode!=F){var Ze=Ja(e,De,re,s);F.insertBefore(Ze,X)}else{for(;X!=De.node;)X=q(X);var ze=g&&t!=null&&t<=re&&De.lineNumber;De.changes&&(oe(De.changes,"gutter")>-1&&(ze=!1),qr(e,De,re,s)),ze&&(y(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(wn(e.options,re)))),X=De.node.nextSibling}re+=De.size}for(;X;)X=q(X)}function cs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ds(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+mr(e)+"px"}function Hs(e){var t=e.display,s=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Qt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,g=t.gutters.offsetWidth,F=r+"px",X=0;X<s.length;X++)if(!s[X].hidden){e.options.fixedGutter&&(s[X].gutter&&(s[X].gutter.style.left=F),s[X].gutterBackground&&(s[X].gutterBackground.style.left=F));var q=s[X].alignable;if(q)for(var ee=0;ee<q.length;ee++)q[ee].style.left=F}e.options.fixedGutter&&(t.gutters.style.left=r+g+"px")}function Ks(e){if(!e.options.lineNumbers)return!1;var t=e.doc,s=wn(e.options,t.first+t.size-1),r=e.display;if(s.length!=r.lineNumChars){var g=r.measure.appendChild(h("div",[h("div",s)],"CodeMirror-linenumber CodeMirror-gutter-elt")),F=g.firstChild.offsetWidth,X=g.offsetWidth-F;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(F,r.lineGutter.offsetWidth-X)+1,r.lineNumWidth=r.lineNumInnerWidth+X,r.lineNumChars=r.lineNumInnerWidth?s.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",cs(e.display),!0}return!1}function hs(e,t){for(var s=[],r=!1,g=0;g<e.length;g++){var F=e[g],X=null;if(typeof F!="string"&&(X=F.style,F=F.className),F=="CodeMirror-linenumbers")if(t)r=!0;else continue;s.push({className:F,style:X})}return t&&!r&&s.push({className:"CodeMirror-linenumbers",style:null}),s}function Gs(e){var t=e.gutters,s=e.gutterSpecs;y(t),e.lineGutter=null;for(var r=0;r<s.length;++r){var g=s[r],F=g.className,X=g.style,q=t.appendChild(h("div",null,"CodeMirror-gutter "+F));X&&(q.style.cssText=X),F=="CodeMirror-linenumbers"&&(e.lineGutter=q,q.style.width=(e.lineNumWidth||1)+"px")}t.style.display=s.length?"":"none",cs(e)}function sa(e){Gs(e.display),cn(e),Hs(e)}function cl(e,t,s,r){var g=this;this.input=s,g.scrollbarFiller=h("div",null,"CodeMirror-scrollbar-filler"),g.scrollbarFiller.setAttribute("cm-not-content","true"),g.gutterFiller=h("div",null,"CodeMirror-gutter-filler"),g.gutterFiller.setAttribute("cm-not-content","true"),g.lineDiv=A("div",null,"CodeMirror-code"),g.selectionDiv=h("div",null,null,"position: relative; z-index: 1"),g.cursorDiv=h("div",null,"CodeMirror-cursors"),g.measure=h("div",null,"CodeMirror-measure"),g.lineMeasure=h("div",null,"CodeMirror-measure"),g.lineSpace=A("div",[g.measure,g.lineMeasure,g.selectionDiv,g.cursorDiv,g.lineDiv],null,"position: relative; outline: none");var F=A("div",[g.lineSpace],"CodeMirror-lines");g.mover=h("div",[F],null,"position: relative"),g.sizer=h("div",[g.mover],"CodeMirror-sizer"),g.sizerWidth=null,g.heightForcer=h("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),g.gutters=h("div",null,"CodeMirror-gutters"),g.lineGutter=null,g.scroller=h("div",[g.sizer,g.heightForcer,g.gutters],"CodeMirror-scroll"),g.scroller.setAttribute("tabIndex","-1"),g.wrapper=h("div",[g.scrollbarFiller,g.gutterFiller,g.scroller],"CodeMirror"),K&&H<8&&(g.gutters.style.zIndex=-1,g.scroller.style.paddingRight=0),!n&&!(N&&l)&&(g.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(g.wrapper):e(g.wrapper)),g.viewFrom=g.viewTo=t.first,g.reportedViewFrom=g.reportedViewTo=t.first,g.view=[],g.renderedView=null,g.externalMeasured=null,g.viewOffset=0,g.lastWrapHeight=g.lastWrapWidth=0,g.updateLineNumbers=null,g.nativeBarWidth=g.barHeight=g.barWidth=0,g.scrollbarsClipped=!1,g.lineNumWidth=g.lineNumInnerWidth=g.lineNumChars=null,g.alignWidgets=!1,g.cachedCharWidth=g.cachedTextHeight=g.cachedPaddingH=null,g.maxLine=null,g.maxLineLength=0,g.maxLineChanged=!1,g.wheelDX=g.wheelDY=g.wheelStartX=g.wheelStartY=null,g.shift=!1,g.selForContextMenu=null,g.activeTouch=null,g.gutterSpecs=hs(r.gutters,r.lineNumbers),Gs(g),s.init(g)}var Na=0,Br=null;K?Br=-.53:N?Br=15:b?Br=-.7:f&&(Br=-1/3);function zs(e){var t=e.wheelDeltaX,s=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),s==null&&e.detail&&e.axis==e.VERTICAL_AXIS?s=e.detail:s==null&&(s=e.wheelDelta),{x:t,y:s}}function dl(e){var t=zs(e);return t.x*=Br,t.y*=Br,t}function Vs(e,t){var s=zs(t),r=s.x,g=s.y,F=e.display,X=F.scroller,q=X.scrollWidth>X.clientWidth,ee=X.scrollHeight>X.clientHeight;if(!(r&&q||g&&ee))return;if(g&&a&&n){e:for(var re=t.target,we=F.view;re!=X;re=re.parentNode)for(var De=0;De<we.length;De++)if(we[De].node==re){e.display.currentWheelTarget=re;break e}}if(r&&!N&&!m&&Br!=null){g&&ee&&na(e,Math.max(0,X.scrollTop+g*Br)),Ei(e,Math.max(0,X.scrollLeft+r*Br)),(!g||g&&ee)&&ie(t),F.wheelStartX=null;return}if(g&&Br!=null){var Ze=g*Br,ze=e.doc.scrollTop,ht=ze+F.wrapper.clientHeight;Ze<0?ze=Math.max(0,ze+Ze-50):ht=Math.min(e.doc.height,ht+Ze+50),us(e,{top:ze,bottom:ht})}Na<20&&(F.wheelStartX==null?(F.wheelStartX=X.scrollLeft,F.wheelStartY=X.scrollTop,F.wheelDX=r,F.wheelDY=g,setTimeout(function(){if(F.wheelStartX==null)return;var Et=X.scrollLeft-F.wheelStartX,At=X.scrollTop-F.wheelStartY,Dt=At&&F.wheelDY&&At/F.wheelDY||Et&&F.wheelDX&&Et/F.wheelDX;if(F.wheelStartX=F.wheelStartY=null,!Dt)return;Br=(Br*Na+Dt)/(Na+1),++Na},200)):(F.wheelDX+=r,F.wheelDY+=g))}var Fr=function(e,t){this.ranges=e,this.primIndex=t};Fr.prototype.primary=function(){return this.ranges[this.primIndex]},Fr.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 s=this.ranges[t],r=e.ranges[t];if(!Mn(s.anchor,r.anchor)||!Mn(s.head,r.head))return!1}return!0},Fr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Cn(Un(this.ranges[t].anchor),Un(this.ranges[t].head));return new Fr(e,this.primIndex)},Fr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Fr.prototype.contains=function(e,t){t||(t=e);for(var s=0;s<this.ranges.length;s++){var r=this.ranges[s];if(Vt(t,r.from())>=0&&Vt(e,r.to())<=0)return s}return-1};var Cn=function(e,t){this.anchor=e,this.head=t};Cn.prototype.from=function(){return Vn(this.anchor,this.head)},Cn.prototype.to=function(){return Pn(this.anchor,this.head)},Cn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yr(e,t,s){var r=e&&e.options.selectionsMayTouch,g=t[s];t.sort(function(Ze,ze){return Vt(Ze.from(),ze.from())}),s=oe(t,g);for(var F=1;F<t.length;F++){var X=t[F],q=t[F-1],ee=Vt(q.to(),X.from());if(r&&!X.empty()?ee>0:ee>=0){var re=Vn(q.from(),X.from()),we=Pn(q.to(),X.to()),De=q.empty()?X.from()==X.head:q.from()==q.head;F<=s&&--s,t.splice(--F,2,new Cn(De?we:re,De?re:we))}}return new Fr(t,s)}function hi(e,t){return new Fr([new Cn(e,t||e)],0)}function fi(e){return e.text?yt(e.from.line+e.text.length-1,ne(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ys(e,t){if(Vt(e,t.from)<0)return e;if(Vt(e,t.to)<=0)return fi(t);var s=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fi(t).ch-t.to.ch),yt(s,r)}function fs(e,t){for(var s=[],r=0;r<e.sel.ranges.length;r++){var g=e.sel.ranges[r];s.push(new Cn(Ys(g.anchor,t),Ys(g.head,t)))}return Yr(e.cm,s,e.sel.primIndex)}function Xs(e,t,s){return e.line==t.line?yt(s.line,e.ch-t.ch+s.ch):yt(s.line+(e.line-t.line),e.ch)}function hl(e,t,s){for(var r=[],g=yt(e.first,0),F=g,X=0;X<t.length;X++){var q=t[X],ee=Xs(q.from,g,F),re=Xs(fi(q),g,F);if(g=q.to,F=re,s=="around"){var we=e.sel.ranges[X],De=Vt(we.head,we.anchor)<0;r[X]=new Cn(De?re:ee,De?ee:re)}else r[X]=new Cn(ee,ee)}return new Fr(r,e.sel.primIndex)}function ps(e){e.doc.mode=it(e.options,e.doc.modeOption),oa(e)}function oa(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,aa(e,100),e.state.modeGen++,e.curOp&&cn(e)}function Qs(e,t){return t.from.ch==0&&t.to.ch==0&&ne(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ms(e,t,s,r){function g(Bt){return s?s[Bt]:null}function F(Bt,Lt,Ht){ri(Bt,Lt,Ht,r),En(Bt,"change",Bt,t)}function X(Bt,Lt){for(var Ht=[],nn=Bt;nn<Lt;++nn)Ht.push(new sr(re[nn],g(nn),r));return Ht}var q=t.from,ee=t.to,re=t.text,we=Ct(e,q.line),De=Ct(e,ee.line),Ze=ne(re),ze=g(re.length-1),ht=ee.line-q.line;if(t.full)e.insert(0,X(0,re.length)),e.remove(re.length,e.size-re.length);else if(Qs(e,t)){var Et=X(0,re.length-1);F(De,De.text,ze),ht&&e.remove(q.line,ht),Et.length&&e.insert(q.line,Et)}else if(we==De)if(re.length==1)F(we,we.text.slice(0,q.ch)+Ze+we.text.slice(ee.ch),ze);else{var At=X(1,re.length-1);At.push(new sr(Ze+we.text.slice(ee.ch),ze,r)),F(we,we.text.slice(0,q.ch)+re[0],g(0)),e.insert(q.line+1,At)}else if(re.length==1)F(we,we.text.slice(0,q.ch)+re[0]+De.text.slice(ee.ch),g(0)),e.remove(q.line+1,ht);else{F(we,we.text.slice(0,q.ch)+re[0],g(0)),F(De,Ze+De.text.slice(ee.ch),ze);var Dt=X(1,re.length-1);ht>1&&e.remove(q.line+1,ht-1),e.insert(q.line+1,Dt)}En(e,"change",e,t)}function pi(e,t,s){function r(g,F,X){if(g.linked)for(var q=0;q<g.linked.length;++q){var ee=g.linked[q];if(ee.doc==F)continue;var re=X&&ee.sharedHist;if(s&&!re)continue;t(ee.doc,re),r(ee.doc,g,re)}}r(e,null,!0)}function Js(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Jt(e),ps(e),Zs(e),e.options.lineWrapping||Jr(e),e.options.mode=t.modeOption,cn(e)}function Zs(e){(e.doc.direction=="rtl"?x:E)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Mr(e,function(){Zs(e),cn(e)})}function Ua(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 gs(e,t){var s={from:Un(t.from),to:fi(t),text:pn(e,t.from,t.to)};return eo(e,s,t.from.line,t.to.line+1),pi(e,function(r){return eo(r,s,t.from.line,t.to.line+1)},!0),s}function qs(e){for(;e.length;){var t=ne(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return qs(e.done),ne(e.done);if(e.done.length&&!ne(e.done).ranges)return ne(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ne(e.done)}function $s(e,t,s,r){var g=e.history;g.undone.length=0;var F=+new Date,X,q;if((g.lastOp==r||g.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&g.lastModTime>F-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(X=pl(g,g.lastOp==r)))q=ne(X.changes),Vt(t.from,t.to)==0&&Vt(t.from,q.to)==0?q.to=fi(t):X.changes.push(gs(e,t));else{var ee=ne(g.done);for((!ee||!ee.ranges)&&Ba(e.sel,g.done),X={changes:[gs(e,t)],generation:g.generation},g.done.push(X);g.done.length>g.undoDepth;)g.done.shift(),g.done[0].ranges||g.done.shift()}g.done.push(s),g.generation=++g.maxGeneration,g.lastModTime=g.lastSelTime=F,g.lastOp=g.lastSelOp=r,g.lastOrigin=g.lastSelOrigin=t.origin,q||Ke(e,"historyAdded")}function ml(e,t,s,r){var g=t.charAt(0);return g=="*"||g=="+"&&s.ranges.length==r.ranges.length&&s.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,s,r){var g=e.history,F=r&&r.origin;s==g.lastSelOp||F&&g.lastSelOrigin==F&&(g.lastModTime==g.lastSelTime&&g.lastOrigin==F||ml(e,F,ne(g.done),t))?g.done[g.done.length-1]=t:Ba(t,g.done),g.lastSelTime=+new Date,g.lastSelOrigin=F,g.lastSelOp=s,r&&r.clearRedo!==!1&&qs(g.undone)}function Ba(e,t){var s=ne(t);s&&s.ranges&&s.equals(e)||t.push(e)}function eo(e,t,s,r){var g=t["spans_"+e.id],F=0;e.iter(Math.max(e.first,s),Math.min(e.first+e.size,r),function(X){X.markedSpans&&((g||(g=t["spans_"+e.id]={}))[F]=X.markedSpans),++F})}function vl(e){if(!e)return null;for(var t,s=0;s<e.length;++s)e[s].marker.explicitlyCleared?t||(t=e.slice(0,s)):t&&t.push(e[s]);return t?t.length?t:null:e}function yl(e,t){var s=t["spans_"+e.id];if(!s)return null;for(var r=[],g=0;g<t.text.length;++g)r.push(vl(s[g]));return r}function to(e,t){var s=yl(e,t),r=br(e,t);if(!s)return r;if(!r)return s;for(var g=0;g<s.length;++g){var F=s[g],X=r[g];if(F&&X){e:for(var q=0;q<X.length;++q){for(var ee=X[q],re=0;re<F.length;++re)if(F[re].marker==ee.marker)continue e;F.push(ee)}}else X&&(s[g]=X)}return s}function Mi(e,t,s){for(var r=[],g=0;g<e.length;++g){var F=e[g];if(F.ranges){r.push(s?Fr.prototype.deepCopy.call(F):F);continue}var X=F.changes,q=[];r.push({changes:q});for(var ee=0;ee<X.length;++ee){var re=X[ee],we=void 0;if(q.push({from:re.from,to:re.to,text:re.text}),t)for(var De in re)(we=De.match(/^spans_(\d+)$/))&&(oe(t,Number(we[1]))>-1&&(ne(q)[De]=re[De],delete re[De]))}}return r}function vs(e,t,s,r){if(r){var g=e.anchor;if(s){var F=Vt(t,g)<0;F!=Vt(s,g)<0?(g=t,t=s):F!=Vt(t,s)<0&&(t=s)}return new Cn(g,t)}else return new Cn(s||t,t)}function Fa(e,t,s,r,g){g==null&&(g=e.cm&&(e.cm.display.shift||e.extend)),hr(e,new Fr([vs(e.sel.primary(),t,s,g)],0),r)}function no(e,t,s){for(var r=[],g=e.cm&&(e.cm.display.shift||e.extend),F=0;F<e.sel.ranges.length;F++)r[F]=vs(e.sel.ranges[F],t[F],null,g);var X=Yr(e.cm,r,e.sel.primIndex);hr(e,X,s)}function ys(e,t,s,r){var g=e.sel.ranges.slice(0);g[t]=s,hr(e,Yr(e.cm,g,e.sel.primIndex),r)}function ro(e,t,s,r){hr(e,hi(t,s),r)}function bl(e,t,s){var r={ranges:t.ranges,update:function(g){this.ranges=[];for(var F=0;F<g.length;F++)this.ranges[F]=new Cn(L(e,g[F].anchor),L(e,g[F].head))},origin:s&&s.origin};return Ke(e,"beforeSelectionChange",e,r),e.cm&&Ke(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Yr(e.cm,r.ranges,r.ranges.length-1):t}function io(e,t,s){var r=e.history.done,g=ne(r);g&&g.ranges?(r[r.length-1]=t,ja(e,t,s)):hr(e,t,s)}function hr(e,t,s){ja(e,t,s),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,s)}function ja(e,t,s){(ge(e,"beforeSelectionChange")||e.cm&&ge(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,s));var r=s&&s.bias||(Vt(t.primary().head,e.sel.primary().head)<0?-1:1);ao(e,oo(e,t,r,!0)),!(s&&s.scroll===!1)&&e.cm&&Di(e.cm)}function ao(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Se(e.cm)),En(e,"cursorActivity",e)}function so(e){ao(e,oo(e,e.sel,null,!1))}function oo(e,t,s,r){for(var g,F=0;F<t.ranges.length;F++){var X=t.ranges[F],q=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[F],ee=Wa(e,X.anchor,q&&q.anchor,s,r),re=Wa(e,X.head,q&&q.head,s,r);(g||ee!=X.anchor||re!=X.head)&&(g||(g=t.ranges.slice(0,F)),g[F]=new Cn(ee,re))}return g?Yr(e.cm,g,t.primIndex):t}function ki(e,t,s,r,g){var F=Ct(e,t.line);if(F.markedSpans)for(var X=0;X<F.markedSpans.length;++X){var q=F.markedSpans[X],ee=q.marker,re="selectLeft"in ee?!ee.selectLeft:ee.inclusiveLeft,we="selectRight"in ee?!ee.selectRight:ee.inclusiveRight;if((q.from==null||(re?q.from<=t.ch:q.from<t.ch))&&(q.to==null||(we?q.to>=t.ch:q.to>t.ch))){if(g&&(Ke(ee,"beforeCursorEnter"),ee.explicitlyCleared))if(F.markedSpans){--X;continue}else break;if(!ee.atomic)continue;if(s){var De=ee.find(r<0?1:-1),Ze=void 0;if((r<0?we:re)&&(De=lo(e,De,-r,De&&De.line==t.line?F:null)),De&&De.line==t.line&&(Ze=Vt(De,s))&&(r<0?Ze<0:Ze>0))return ki(e,De,t,r,g)}var ze=ee.find(r<0?-1:1);return(r<0?re:we)&&(ze=lo(e,ze,r,ze.line==t.line?F:null)),ze?ki(e,ze,t,r,g):null}}return t}function Wa(e,t,s,r,g){var F=r||1,X=ki(e,t,s,F,g)||!g&&ki(e,t,s,F,!0)||ki(e,t,s,-F,g)||!g&&ki(e,t,s,-F,!0);return X||(e.cantEdit=!0,yt(e.first,0))}function lo(e,t,s,r){return s<0&&t.ch==0?t.line>e.first?L(e,yt(t.line-1)):null:s>0&&t.ch==(r||Ct(e,t.line)).text.length?t.line<e.first+e.size-1?yt(t.line+1,0):null:new yt(t.line,t.ch+s)}function uo(e){e.setSelection(yt(e.firstLine(),0),yt(e.lastLine()),Ae)}function co(e,t,s){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return s&&(r.update=function(g,F,X,q){g&&(r.from=L(e,g)),F&&(r.to=L(e,F)),X&&(r.text=X),q!==void 0&&(r.origin=q)}),Ke(e,"beforeChange",e,r),e.cm&&Ke(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Pi(e,t,s){if(e.cm){if(!e.cm.curOp)return nr(e.cm,Pi)(e,t,s);if(e.cm.state.suppressEdits)return}if((ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"))&&(t=co(e,t,!0),!t))return;var r=ur&&!s&&Nr(e,t.from,t.to);if(r)for(var g=r.length-1;g>=0;--g)ho(e,{from:r[g].from,to:r[g].to,text:g?[""]:t.text,origin:t.origin});else ho(e,t)}function ho(e,t){if(t.text.length==1&&t.text[0]==""&&Vt(t.from,t.to)==0)return;var s=fs(e,t);$s(e,t,s,e.cm?e.cm.curOp.id:NaN),la(e,t,s,br(e,t));var r=[];pi(e,function(g,F){!F&&oe(r,g.history)==-1&&(go(g.history,t),r.push(g.history)),la(g,t,null,br(g,t))})}function Ha(e,t,s){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!s)return;for(var g=e.history,F,X=e.sel,q=t=="undo"?g.done:g.undone,ee=t=="undo"?g.undone:g.done,re=0;re<q.length&&!(F=q[re],s?F.ranges&&!F.equals(e.sel):!F.ranges);re++);if(re==q.length)return;for(g.lastOrigin=g.lastSelOrigin=null;;)if(F=q.pop(),F.ranges){if(Ba(F,ee),s&&!F.equals(e.sel)){hr(e,F,{clearRedo:!1});return}X=F}else if(r){q.push(F);return}else break;var we=[];Ba(X,ee),ee.push({changes:we,generation:g.generation}),g.generation=F.generation||++g.maxGeneration;for(var De=ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"),Ze=function(Et){var At=F.changes[Et];if(At.origin=t,De&&!co(e,At,!1))return q.length=0,{};we.push(gs(e,At));var Dt=Et?fs(e,At):ne(q);la(e,At,Dt,to(e,At)),!Et&&e.cm&&e.cm.scrollIntoView({from:At.from,to:fi(At)});var Bt=[];pi(e,function(Lt,Ht){!Ht&&oe(Bt,Lt.history)==-1&&(go(Lt.history,At),Bt.push(Lt.history)),la(Lt,At,null,to(Lt,At))})},ze=F.changes.length-1;ze>=0;--ze){var ht=Ze(ze);if(ht)return ht.v}}function fo(e,t){if(t==0)return;if(e.first+=t,e.sel=new Fr(xe(e.sel.ranges,function(g){return new Cn(yt(g.anchor.line+t,g.anchor.ch),yt(g.head.line+t,g.head.ch))}),e.sel.primIndex),e.cm){cn(e.cm,e.first,e.first-t,t);for(var s=e.cm.display,r=s.viewFrom;r<s.viewTo;r++)or(e.cm,r,"gutter")}}function la(e,t,s,r){if(e.cm&&!e.cm.curOp)return nr(e.cm,la)(e,t,s,r);if(t.to.line<e.first){fo(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 g=t.text.length-1-(e.first-t.from.line);fo(e,g),t={from:yt(e.first,0),to:yt(t.to.line+g,t.to.ch),text:[ne(t.text)],origin:t.origin}}var F=e.lastLine();t.to.line>F&&(t={from:t.from,to:yt(F,Ct(e,F).text.length),text:[t.text[0]],origin:t.origin}),t.removed=pn(e,t.from,t.to),s||(s=fs(e,t)),e.cm?El(e.cm,t,r):ms(e,t,r),ja(e,s,Ae),e.cantEdit&&Wa(e,yt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,s){var r=e.doc,g=e.display,F=t.from,X=t.to,q=!1,ee=F.line;e.options.lineWrapping||(ee=Pt(Xn(Ct(r,F.line))),r.iter(ee,X.line+1,function(ze){if(ze==g.maxLine)return q=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Se(e),ms(r,t,s,Kt(e)),e.options.lineWrapping||(r.iter(ee,F.line+t.text.length,function(ze){var ht=zr(ze);ht>g.maxLineLength&&(g.maxLine=ze,g.maxLineLength=ht,g.maxLineChanged=!0,q=!1)}),q&&(e.curOp.updateMaxLine=!0)),pr(r,F.line),aa(e,400);var re=t.text.length-(X.line-F.line)-1;t.full?cn(e):F.line==X.line&&t.text.length==1&&!Qs(e.doc,t)?or(e,F.line,"text"):cn(e,F.line,X.line+1,re);var we=ge(e,"changes"),De=ge(e,"change");if(De||we){var Ze={from:F,to:X,text:t.text,removed:t.removed,origin:t.origin};De&&En(e,"change",e,Ze),we&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ze)}e.display.selForContextMenu=null}function Ni(e,t,s,r,g){var F;r||(r=s),Vt(r,s)<0&&(F=[r,s],s=F[0],r=F[1]),typeof t=="string"&&(t=e.splitLines(t)),Pi(e,{from:s,to:r,text:t,origin:g})}function po(e,t,s,r){s<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function mo(e,t,s,r){for(var g=0;g<e.length;++g){var F=e[g],X=!0;if(F.ranges){F.copied||(F=e[g]=F.deepCopy(),F.copied=!0);for(var q=0;q<F.ranges.length;q++)po(F.ranges[q].anchor,t,s,r),po(F.ranges[q].head,t,s,r);continue}for(var ee=0;ee<F.changes.length;++ee){var re=F.changes[ee];if(s<re.from.line)re.from=yt(re.from.line+r,re.from.ch),re.to=yt(re.to.line+r,re.to.ch);else if(t<=re.to.line){X=!1;break}}X||(e.splice(0,g+1),g=0)}}function go(e,t){var s=t.from.line,r=t.to.line,g=t.text.length-(r-s)-1;mo(e.done,s,r,g),mo(e.undone,s,r,g)}function ua(e,t,s,r){var g=t,F=t;return typeof t=="number"?F=Ct(e,Q(e,t)):g=Pt(t),g==null?null:(r(F,g)&&e.cm&&or(e.cm,g,s),F)}function ca(e){this.lines=e,this.parent=null;for(var t=0,s=0;s<e.length;++s)e[s].parent=this,t+=e[s].height;this.height=t}ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var s=e,r=e+t;s<r;++s){var g=this.lines[s];this.height-=g.height,Gt(g),En(g,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,s){this.height+=s,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,s){for(var r=e+t;e<r;++e)if(s(this.lines[e]))return!0}};function da(e){this.children=e;for(var t=0,s=0,r=0;r<e.length;++r){var g=e[r];t+=g.chunkSize(),s+=g.height,g.parent=this}this.size=t,this.height=s,this.parent=null}da.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var s=0;s<this.children.length;++s){var r=this.children[s],g=r.chunkSize();if(e<g){var F=Math.min(t,g-e),X=r.height;if(r.removeInner(e,F),this.height-=X-r.height,g==F&&(this.children.splice(s--,1),r.parent=null),(t-=F)==0)break;e=0}else e-=g}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var q=[];this.collapse(q),this.children=[new ca(q)],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,s){this.size+=t.length,this.height+=s;for(var r=0;r<this.children.length;++r){var g=this.children[r],F=g.chunkSize();if(e<=F){if(g.insertInner(e,t,s),g.lines&&g.lines.length>50){for(var X=g.lines.length%25+25,q=X;q<g.lines.length;){var ee=new ca(g.lines.slice(q,q+=25));g.height-=ee.height,this.children.splice(++r,0,ee),ee.parent=this}g.lines=g.lines.slice(0,X),this.maybeSpill()}break}e-=F}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),s=new da(t);if(e.parent){e.size-=s.size,e.height-=s.height;var g=oe(e.parent.children,e);e.parent.children.splice(g+1,0,s)}else{var r=new da(e.children);r.parent=e,e.children=[r,s],e=r}s.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,s){for(var r=0;r<this.children.length;++r){var g=this.children[r],F=g.chunkSize();if(e<F){var X=Math.min(t,F-e);if(g.iterN(e,X,s))return!0;if((t-=X)==0)break;e=0}else e-=F}}};var ha=function(e,t,s){if(s)for(var r in s)s.hasOwnProperty(r)&&(this[r]=s[r]);this.doc=e,this.node=t};ha.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,s=this.line,r=Pt(s);if(r==null||!t)return;for(var g=0;g<t.length;++g)t[g]==this&&t.splice(g--,1);t.length||(s.widgets=null);var F=li(this);zt(s,Math.max(0,s.height-F)),e&&(Mr(e,function(){vo(e,s,-F),or(e,r,"widget")}),En(e,"lineWidgetCleared",e,this,r))},ha.prototype.changed=function(){var e=this,t=this.height,s=this.doc.cm,r=this.line;this.height=null;var g=li(this)-t;if(!g)return;Dr(this.doc,r)||zt(r,r.height+g),s&&Mr(s,function(){s.curOp.forceUpdate=!0,vo(s,r,g),En(s,"lineWidgetChanged",s,e,Pt(r))})},Ee(ha);function vo(e,t,s){_r(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&os(e,s)}function _l(e,t,s,r){var g=new ha(e,s,r),F=e.cm;return F&&g.noHScroll&&(F.display.alignWidgets=!0),ua(e,t,"widget",function(X){var q=X.widgets||(X.widgets=[]);if(g.insertAt==null?q.push(g):q.splice(Math.min(q.length-1,Math.max(0,g.insertAt)),0,g),g.line=X,F&&!Dr(e,X)){var ee=_r(X)<e.scrollTop;zt(X,X.height+li(g)),ee&&os(F,g.height),F.curOp.forceUpdate=!0}return!0}),F&&En(F,"lineWidgetAdded",F,g,typeof t=="number"?t:Pt(t)),g}var yo=0,mi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yo};mi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&xi(e),ge(this,"clear")){var s=this.find();s&&En(this,"clear",s.from,s.to)}for(var r=null,g=null,F=0;F<this.lines.length;++F){var X=this.lines[F],q=Yn(X.markedSpans,this);e&&!this.collapsed?or(e,Pt(X),"text"):e&&(q.to!=null&&(g=Pt(X)),q.from!=null&&(r=Pt(X))),X.markedSpans=Wr(X.markedSpans,q),q.from==null&&this.collapsed&&!Dr(this.doc,X)&&e&&zt(X,It(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ee=0;ee<this.lines.length;++ee){var re=Xn(this.lines[ee]),we=zr(re);we>e.display.maxLineLength&&(e.display.maxLine=re,e.display.maxLineLength=we,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&cn(e,r,g+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&so(e.doc)),e&&En(e,"markerCleared",e,this,r,g),t&&Ti(e),this.parent&&this.parent.clear()},mi.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var s,r,g=0;g<this.lines.length;++g){var F=this.lines[g],X=Yn(F.markedSpans,this);if(X.from!=null&&(s=yt(t?F:Pt(F),X.from),e==-1))return s;if(X.to!=null&&(r=yt(t?F:Pt(F),X.to),e==1))return r}return s&&{from:s,to:r}},mi.prototype.changed=function(){var e=this,t=this.find(-1,!0),s=this,r=this.doc.cm;if(!t||!r)return;Mr(r,function(){var g=t.line,F=Pt(t.line),X=ai(r,F);if(X&&(Ta(X),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Dr(s.doc,g)&&s.height!=null){var q=s.height;s.height=null;var ee=li(s)-q;ee&&zt(g,g.height+ee)}En(r,"markerChanged",r,e)})},mi.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)},mi.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)}},Ee(mi);function Ui(e,t,s,r,g){if(r&&r.shared)return xl(e,t,s,r,g);if(e.cm&&!e.cm.curOp)return nr(e.cm,Ui)(e,t,s,r,g);var F=new mi(e,g),X=Vt(t,s);if(r&&w(r,F,!1),X>0||X==0&&F.clearWhenEmpty!==!1)return F;if(F.replacedWith&&(F.collapsed=!0,F.widgetNode=A("span",[F.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||F.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(F.widgetNode.insertLeft=!0)),F.collapsed){if(jn(e,t.line,t,s,F)||t.line!=s.line&&jn(e,s.line,t,s,F))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ar()}F.addToHistory&&$s(e,{from:t,to:s,origin:"markText"},e.sel,NaN);var q=t.line,ee=e.cm,re;if(e.iter(q,s.line+1,function(De){ee&&F.collapsed&&!ee.options.lineWrapping&&Xn(De)==ee.display.maxLine&&(re=!0),F.collapsed&&q!=t.line&&zt(De,0),Pr(De,new Cr(F,q==t.line?t.ch:null,q==s.line?s.ch:null)),++q}),F.collapsed&&e.iter(t.line,s.line+1,function(De){Dr(e,De)&&zt(De,0)}),F.clearOnEnter&&Ce(F,"beforeCursorEnter",function(){return F.clear()}),F.readOnly&&(cr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),F.collapsed&&(F.id=++yo,F.atomic=!0),ee){if(re&&(ee.curOp.updateMaxLine=!0),F.collapsed)cn(ee,t.line,s.line+1);else if(F.className||F.startStyle||F.endStyle||F.css||F.attributes||F.title)for(var we=t.line;we<=s.line;we++)or(ee,we,"text");F.atomic&&so(ee.doc),En(ee,"markerAdded",ee,F)}return F}var fa=function(e,t){this.markers=e,this.primary=t;for(var s=0;s<e.length;++s)e[s].parent=this};fa.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();En(this,"clear")},fa.prototype.find=function(e,t){return this.primary.find(e,t)},Ee(fa);function xl(e,t,s,r,g){r=w(r),r.shared=!1;var F=[Ui(e,t,s,r,g)],X=F[0],q=r.widgetNode;return pi(e,function(ee){q&&(r.widgetNode=q.cloneNode(!0)),F.push(Ui(ee,L(ee,t),L(ee,s),r,g));for(var re=0;re<ee.linked.length;++re)if(ee.linked[re].isParent)return;X=ne(F)}),new fa(F,X)}function bo(e){return e.findMarks(yt(e.first,0),e.clipPos(yt(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var s=0;s<t.length;s++){var r=t[s],g=r.find(),F=e.clipPos(g.from),X=e.clipPos(g.to);if(Vt(F,X)){var q=Ui(e,F,X,r.primary,r.primary.type);r.markers.push(q),q.parent=r}}}function wl(e){for(var t=function(r){var g=e[r],F=[g.primary.doc];pi(g.primary.doc,function(ee){return F.push(ee)});for(var X=0;X<g.markers.length;X++){var q=g.markers[X];oe(F,q.doc)==-1&&(q.parent=null,g.markers.splice(X--,1))}},s=0;s<e.length;s++)t(s)}var Sl=0,xr=function(e,t,s,r,g){if(!(this instanceof xr))return new xr(e,t,s,r,g);s==null&&(s=0),da.call(this,[new ca([new sr("",null)])]),this.first=s,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=s;var F=yt(s,0);this.sel=hi(F),this.history=new Ua(null),this.id=++Sl,this.modeOption=t,this.lineSep=r,this.direction=g=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ms(this,{from:F,to:F,text:e}),hr(this,hi(F),Ae)};xr.prototype=He(da.prototype,{constructor:xr,iter:function(e,t,s){s?this.iterN(e-this.first,t-e,s):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var s=0,r=0;r<t.length;++r)s+=t[r].height;this.insertInner(e-this.first,t,s)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Rt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:rr(function(e){var t=yt(this.first,0),s=this.first+this.size-1;Pi(this,{from:t,to:yt(s,Ct(this,s).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ta(this.cm,0,0),hr(this,hi(t),Ae)}),replaceRange:function(e,t,s,r){t=L(this,t),s=s?L(this,s):t,Ni(this,e,t,s,r)},getRange:function(e,t,s){var r=pn(this,L(this,e),L(this,t));return s===!1?r:r.join(s||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(yn(this,e))return Ct(this,e)},getLineNumber:function(e){return Pt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ct(this,e)),Xn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return L(this,e)},getCursor:function(e){var t=this.sel.primary(),s;return e==null||e=="head"?s=t.head:e=="anchor"?s=t.anchor:e=="end"||e=="to"||e===!1?s=t.to():s=t.from(),s},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:rr(function(e,t,s){ro(this,L(this,typeof e=="number"?yt(e,t||0):e),null,s)}),setSelection:rr(function(e,t,s){ro(this,L(this,e),L(this,t||e),s)}),extendSelection:rr(function(e,t,s){Fa(this,L(this,e),t&&L(this,t),s)}),extendSelections:rr(function(e,t){no(this,G(this,e),t)}),extendSelectionsBy:rr(function(e,t){var s=xe(this.sel.ranges,e);no(this,G(this,s),t)}),setSelections:rr(function(e,t,s){if(!e.length)return;for(var r=[],g=0;g<e.length;g++)r[g]=new Cn(L(this,e[g].anchor),L(this,e[g].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),hr(this,Yr(this.cm,r,t),s)}),addSelection:rr(function(e,t,s){var r=this.sel.ranges.slice(0);r.push(new Cn(L(this,e),L(this,t||e))),hr(this,Yr(this.cm,r,r.length-1),s)}),getSelection:function(e){for(var t=this.sel.ranges,s,r=0;r<t.length;r++){var g=pn(this,t[r].from(),t[r].to());s=s?s.concat(g):g}return e===!1?s:s.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],s=this.sel.ranges,r=0;r<s.length;r++){var g=pn(this,s[r].from(),s[r].to());e!==!1&&(g=g.join(e||this.lineSeparator())),t[r]=g}return t},replaceSelection:function(e,t,s){for(var r=[],g=0;g<this.sel.ranges.length;g++)r[g]=e;this.replaceSelections(r,t,s||"+input")},replaceSelections:rr(function(e,t,s){for(var r=[],g=this.sel,F=0;F<g.ranges.length;F++){var X=g.ranges[F];r[F]={from:X.from(),to:X.to(),text:this.splitLines(e[F]),origin:s}}for(var q=t&&t!="end"&&hl(this,r,t),ee=r.length-1;ee>=0;ee--)Pi(this,r[ee]);q?io(this,q):this.cm&&Di(this.cm)}),undo:rr(function(){Ha(this,"undo")}),redo:rr(function(){Ha(this,"redo")}),undoSelection:rr(function(){Ha(this,"undo",!0)}),redoSelection:rr(function(){Ha(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,s=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var g=0;g<e.undone.length;g++)e.undone[g].ranges||++s;return{undo:t,redo:s}},clearHistory:function(){var e=this;this.history=new Ua(this.history.maxGeneration),pi(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:Mi(this.history.done),undone:Mi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ua(this.history.maxGeneration);t.done=Mi(e.done.slice(0),null,!0),t.undone=Mi(e.undone.slice(0),null,!0)},setGutterMarker:rr(function(e,t,s){return ua(this,e,"gutter",function(r){var g=r.gutterMarkers||(r.gutterMarkers={});return g[t]=s,!s&&ue(g)&&(r.gutterMarkers=null),!0})}),clearGutter:rr(function(e){var t=this;this.iter(function(s){s.gutterMarkers&&s.gutterMarkers[e]&&ua(t,s,"gutter",function(){return s.gutterMarkers[e]=null,ue(s.gutterMarkers)&&(s.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!yn(this,e))return null;if(t=e,e=Ct(this,e),!e)return null}else if(t=Pt(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:rr(function(e,t,s){return ua(this,e,t=="gutter"?"gutter":"class",function(r){var g=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[g])r[g]=s;else{if(O(s).test(r[g]))return!1;r[g]+=" "+s}return!0})}),removeLineClass:rr(function(e,t,s){return ua(this,e,t=="gutter"?"gutter":"class",function(r){var g=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",F=r[g];if(F)if(s==null)r[g]=null;else{var X=F.match(O(s));if(!X)return!1;var q=X.index+X[0].length;r[g]=F.slice(0,X.index)+(!X.index||q==F.length?"":" ")+F.slice(q)||null}else return!1;return!0})}),addLineWidget:rr(function(e,t,s){return _l(this,e,t,s)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,s){return Ui(this,L(this,e),L(this,t),s,s&&s.type||"range")},setBookmark:function(e,t){var s={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=L(this,e),Ui(this,e,e,s,"bookmark")},findMarksAt:function(e){e=L(this,e);var t=[],s=Ct(this,e.line).markedSpans;if(s)for(var r=0;r<s.length;++r){var g=s[r];(g.from==null||g.from<=e.ch)&&(g.to==null||g.to>=e.ch)&&t.push(g.marker.parent||g.marker)}return t},findMarks:function(e,t,s){e=L(this,e),t=L(this,t);var r=[],g=e.line;return this.iter(e.line,t.line+1,function(F){var X=F.markedSpans;if(X)for(var q=0;q<X.length;q++){var ee=X[q];!(ee.to!=null&&g==e.line&&e.ch>=ee.to||ee.from==null&&g!=e.line||ee.from!=null&&g==t.line&&ee.from>=t.ch)&&(!s||s(ee.marker))&&r.push(ee.marker.parent||ee.marker)}++g}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var s=t.markedSpans;if(s)for(var r=0;r<s.length;++r)s[r].from!=null&&e.push(s[r].marker)}),e},posFromIndex:function(e){var t,s=this.first,r=this.lineSeparator().length;return this.iter(function(g){var F=g.text.length+r;if(F>e)return t=e,!0;e-=F,++s}),L(this,yt(s,t))},indexFromPos:function(e){e=L(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var s=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+s}),t},copy:function(e){var t=new xr(Rt(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,s=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<s&&(s=e.to);var r=new xr(Rt(this,t,s),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(r,bo(this)),r},unlinkDoc:function(e){if(e instanceof Nn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var s=this.linked[t];if(s.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(bo(this));break}if(e.history==this.history){var r=[e.id];pi(e,function(g){return r.push(g.id)},!0),e.history=new Ua(null),e.history.done=Mi(this.history.done,r),e.history.undone=Mi(this.history.undone,r)}},iterLinkedDocs:function(e){pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):qe(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:rr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),xr.prototype.eachLine=xr.prototype.iter;var Eo=0;function Al(e){var t=this;if(_o(t),Xe(t,e)||ei(t.display,e))return;ie(e),K&&(Eo=+new Date);var s=vn(t,e,!0),r=e.dataTransfer.files;if(!s||t.isReadOnly())return;if(r&&r.length&&window.FileReader&&window.File)for(var g=r.length,F=Array(g),X=0,q=function(){++X==g&&nr(t,function(){s=L(t.doc,s);var ze={from:s,to:s,text:t.doc.splitLines(F.filter(function(ht){return ht!=null}).join(t.doc.lineSeparator())),origin:"paste"};Pi(t.doc,ze),io(t.doc,hi(L(t.doc,s),L(t.doc,fi(ze))))})()},ee=function(ze,ht){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,ze.type)==-1){q();return}var Et=new FileReader;Et.onerror=function(){return q()},Et.onload=function(){var At=Et.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(At)){q();return}F[ht]=At,q()},Et.readAsText(ze)},re=0;re<r.length;re++)ee(r[re],re);else{if(t.state.draggingText&&t.doc.sel.contains(s)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var we=e.dataTransfer.getData("Text");if(we){var De;if(t.state.draggingText&&!t.state.draggingText.copy&&(De=t.listSelections()),ja(t.doc,hi(s,s)),De)for(var Ze=0;Ze<De.length;++Ze)Ni(t.doc,"",De[Ze].anchor,De[Ze].head,"drag");t.replaceSelection(we,"around","paste"),t.display.input.focus()}}catch(ze){}}}function Cl(e,t){if(K&&(!e.state.draggingText||+new Date-Eo<100)){ve(t);return}if(Xe(e,t)||ei(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f){var s=h("img",null,null,"position: fixed; left: 0; top: 0;");s.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(s.width=s.height=1,e.display.wrapper.appendChild(s),s._top=s.offsetTop),t.dataTransfer.setDragImage(s,0,0),m&&s.parentNode.removeChild(s)}}function Ol(e,t){var s=vn(e,t);if(!s)return;var r=document.createDocumentFragment();Ls(e,s,r),e.display.dragCursor||(e.display.dragCursor=h("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),p(e.display.dragCursor,r)}function _o(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function xo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),s=[],r=0;r<t.length;r++){var g=t[r].CodeMirror;g&&s.push(g)}s.length&&s[0].operation(function(){for(var F=0;F<s.length;F++)e(s[F])})}var To=!1;function Rl(){if(To)return;Il(),To=!0}function Il(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,xo(Dl)},100))}),Ce(window,"blur",function(){return xo(Ii)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var gi={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"},pa=0;pa<10;pa++)gi[pa+48]=gi[pa+96]=String(pa);for(var Ka=65;Ka<=90;Ka++)gi[Ka]=String.fromCharCode(Ka);for(var ma=1;ma<=12;ma++)gi[ma+111]=gi[ma+63235]="F"+ma;var si={};si.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"},si.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"},si.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"},si.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"]},si.default=a?si.macDefault:si.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var s,r,g,F,X=0;X<t.length-1;X++){var q=t[X];if(/^(cmd|meta|m)$/i.test(q))F=!0;else if(/^a(lt)?$/i.test(q))s=!0;else if(/^(c|ctrl|control)$/i.test(q))r=!0;else if(/^s(hift)?$/i.test(q))g=!0;else throw new Error("Unrecognized modifier name: "+q)}return s&&(e="Alt-"+e),r&&(e="Ctrl-"+e),F&&(e="Cmd-"+e),g&&(e="Shift-"+e),e}function Ml(e){var t={};for(var s in e)if(e.hasOwnProperty(s)){var r=e[s];if(/^(name|fallthrough|(de|at)tach)$/.test(s))continue;if(r=="..."){delete e[s];continue}for(var g=xe(s.split(" "),Ll),F=0;F<g.length;F++){var X=void 0,q=void 0;F==g.length-1?(q=g.join(" "),X=r):(q=g.slice(0,F+1).join(" "),X="...");var ee=t[q];if(!ee)t[q]=X;else if(ee!=X)throw new Error("Inconsistent bindings for "+q)}delete e[s]}for(var re in t)e[re]=t[re];return e}function Bi(e,t,s,r){t=Ga(t);var g=t.call?t.call(e,r):t[e];if(g===!1)return"nothing";if(g==="...")return"multi";if(g!=null&&s(g))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Bi(e,t.fallthrough,s,r);for(var F=0;F<t.fallthrough.length;F++){var X=Bi(e,t.fallthrough[F],s,r);if(X)return X}}}function wo(e){var t=typeof e=="string"?e:gi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function So(e,t,s){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(T?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(T?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!s&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Ao(e,t){if(m&&e.keyCode==34&&e.char)return!1;var s=gi[e.keyCode];return s==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(s=e.code),So(s,e,t))}function Ga(e){return typeof e=="string"?si[e]:e}function Fi(e,t){for(var s=e.doc.sel.ranges,r=[],g=0;g<s.length;g++){for(var F=t(s[g]);r.length&&Vt(F.from,ne(r).to)<=0;){var X=r.pop();if(Vt(X.from,F.from)<0){F.from=X.from;break}}r.push(F)}Mr(e,function(){for(var q=r.length-1;q>=0;q--)Ni(e.doc,"",r[q].from,r[q].to,"+delete");Di(e)})}function bs(e,t,s){var r=Me(e.text,t+s,s);return r<0||r>e.text.length?null:r}function Es(e,t,s){var r=bs(e,t.ch,s);return r==null?null:new yt(t.line,r,s<0?"after":"before")}function _s(e,t,s,r,g){if(e){t.doc.direction=="rtl"&&(g=-g);var F=Tt(s,t.doc.direction);if(F){var X=g<0?ne(F):F[0],q=g<0==(X.level==1),ee=q?"after":"before",re;if(X.level>0||t.doc.direction=="rtl"){var we=ui(t,s);re=g<0?s.text.length-1:0;var De=Ur(t,we,re).top;re=rt(function(Ze){return Ur(t,we,Ze).top==De},g<0==(X.level==1)?X.from:X.to-1,re),ee=="before"&&(re=bs(s,re,1))}else re=g<0?X.to:X.from;return new yt(r,re,ee)}}return new yt(r,g<0?s.text.length:0,g<0?"before":"after")}function kl(e,t,s,r){var g=Tt(t,e.doc.direction);if(!g)return Es(t,s,r);s.ch>=t.text.length?(s.ch=t.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var F=ut(g,s.ch,s.sticky),X=g[F];if(e.doc.direction=="ltr"&&X.level%2==0&&(r>0?X.to>s.ch:X.from<s.ch))return Es(t,s,r);var q=function(Dt,Bt){return bs(t,Dt instanceof yt?Dt.ch:Dt,Bt)},ee,re=function(Dt){return e.options.lineWrapping?(ee=ee||ui(e,t),Wt(e,t,ee,Dt)):{begin:0,end:t.text.length}},we=re(s.sticky=="before"?q(s,-1):s.ch);if(e.doc.direction=="rtl"||X.level==1){var De=X.level==1==r<0,Ze=q(s,De?1:-1);if(Ze!=null&&(De?Ze<=X.to&&Ze<=we.end:Ze>=X.from&&Ze>=we.begin)){var ze=De?"before":"after";return new yt(s.line,Ze,ze)}}var ht=function(Dt,Bt,Lt){for(var Ht=function(Dn,ir){return ir?new yt(s.line,q(Dn,1),"before"):new yt(s.line,Dn,"after")};Dt>=0&&Dt<g.length;Dt+=Bt){var nn=g[Dt],Zt=Bt>0==(nn.level!=1),fn=Zt?Lt.begin:q(Lt.end,-1);if(nn.from<=fn&&fn<nn.to)return Ht(fn,Zt);if(fn=Zt?nn.from:q(nn.to,-1),Lt.begin<=fn&&fn<Lt.end)return Ht(fn,Zt)}},Et=ht(F+r,r,we);if(Et)return Et;var At=r>0?we.end:q(we.begin,-1);return At!=null&&!(r>0&&At==t.text.length)&&(Et=ht(r>0?0:g.length-1,r,re(At)),Et)?Et:null}var ga={selectAll:uo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ae)},killLine:function(e){return Fi(e,function(t){if(t.empty()){var s=Ct(e.doc,t.head.line).text.length;return t.head.ch==s&&t.head.line<e.lastLine()?{from:t.head,to:yt(t.head.line+1,0)}:{from:t.head,to:yt(t.head.line,s)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Fi(e,function(t){return{from:yt(t.from().line,0),to:L(e.doc,yt(t.to().line+1,0))}})},delLineLeft:function(e){return Fi(e,function(t){return{from:yt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Fi(e,function(t){var s=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:s},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Fi(e,function(t){var s=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"div");return{from:t.from(),to:r}})},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(yt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(yt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Co(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Oo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var s=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"div")},Le)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var s=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:s},"div")},Le)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var s=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:s},"div");return r.ch<e.getLine(r.line).search(/\S/)?Oo(e,t.head):r},Le)},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=[],s=e.listSelections(),r=e.options.tabSize,g=0;g<s.length;g++){var F=s[g].from(),X=Y(e.getLine(F.line),F.ch,r);t.push(fe(r-X%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Mr(e,function(){for(var t=e.listSelections(),s=[],r=0;r<t.length;r++){if(!t[r].empty())continue;var g=t[r].head,F=Ct(e.doc,g.line).text;if(F){if(g.ch==F.length&&(g=new yt(g.line,g.ch-1)),g.ch>0)g=new yt(g.line,g.ch+1),e.replaceRange(F.charAt(g.ch-1)+F.charAt(g.ch-2),yt(g.line,g.ch-2),g,"+transpose");else if(g.line>e.doc.first){var X=Ct(e.doc,g.line-1).text;X&&(g=new yt(g.line,1),e.replaceRange(F.charAt(0)+e.doc.lineSeparator()+X.charAt(X.length-1),yt(g.line-1,X.length-1),g,"+transpose"))}}s.push(new Cn(g,g))}e.setSelections(s)})},newlineAndIndent:function(e){return Mr(e,function(){for(var t=e.listSelections(),s=t.length-1;s>=0;s--)e.replaceRange(e.doc.lineSeparator(),t[s].anchor,t[s].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Di(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Co(e,t){var s=Ct(e.doc,t),r=Xn(s);return r!=s&&(t=Pt(r)),_s(!0,e,r,t,1)}function Pl(e,t){var s=Ct(e.doc,t),r=Kr(s);return r!=s&&(t=Pt(r)),_s(!0,e,s,t,-1)}function Oo(e,t){var s=Co(e,t.line),r=Ct(e.doc,s.line),g=Tt(r,e.doc.direction);if(!g||g[0].level==0){var F=Math.max(s.ch,r.text.search(/\S/)),X=t.line==s.line&&t.ch<=F&&t.ch;return yt(s.line,X?0:F,s.sticky)}return s}function za(e,t,s){if(typeof t=="string"&&(t=ga[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,g=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s&&(e.display.shift=!1),g=t(e)!=Be}finally{e.display.shift=r,e.state.suppressEdits=!1}return g}function Nl(e,t,s){for(var r=0;r<e.state.keyMaps.length;r++){var g=Bi(t,e.state.keyMaps[r],s,e);if(g)return g}return e.options.extraKeys&&Bi(t,e.options.extraKeys,s,e)||Bi(t,e.options.keyMap,s,e)}var Ul=new $;function va(e,t,s,r){var g=e.state.keySeq;if(g){if(wo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==g&&(e.state.keySeq=null,e.display.input.reset())}),Ro(e,g+" "+t,s,r))return!0}return Ro(e,t,s,r)}function Ro(e,t,s,r){var g=Nl(e,t,r);return g=="multi"&&(e.state.keySeq=t),g=="handled"&&En(e,"keyHandled",e,t,s),(g=="handled"||g=="multi")&&(ie(s),is(e)),!!g}function Io(e,t){var s=Ao(t,!0);return s?t.shiftKey&&!e.state.keySeq?va(e,"Shift-"+s,t,function(r){return za(e,r,!0)})||va(e,s,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return za(e,r)}):va(e,s,t,function(r){return za(e,r)}):!1}function Bl(e,t,s){return va(e,"'"+s+"'",t,function(r){return za(e,r,!0)})}var xs=null;function Do(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=P(),Xe(t,e))return;K&&H<11&&e.keyCode==27&&(e.returnValue=!1);var s=e.keyCode;t.display.shift=s==16||e.shiftKey;var r=Io(t,e);m&&(xs=r?s:null,!r&&s==88&&!Ue&&(a?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),N&&!a&&!r&&s==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),s==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;x(t,"CodeMirror-crosshair");function s(r){(r.keyCode==18||!r.altKey)&&(E(t,"CodeMirror-crosshair"),lt(document,"keyup",s),lt(document,"mouseover",s))}Ce(document,"keyup",s),Ce(document,"mouseover",s)}function Lo(e){e.keyCode==16&&(this.doc.sel.shift=!1),Xe(this,e)}function Mo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(ei(t.display,e)||Xe(t,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var s=e.keyCode,r=e.charCode;if(m&&s==xs){xs=null,ie(e);return}if(m&&(!e.which||e.which<10)&&Io(t,e))return;var g=String.fromCharCode(r==null?s:r);if(g=="\b")return;if(Bl(t,e,g))return;t.display.input.onKeyPress(e)}var jl=400,Ts=function(e,t,s){this.time=e,this.pos=t,this.button=s};Ts.prototype.compare=function(e,t,s){return this.time+jl>e&&Vt(t,this.pos)==0&&s==this.button};var ya,ba;function Wl(e,t){var s=+new Date;return ba&&ba.compare(s,e,t)?(ya=ba=null,"triple"):ya&&ya.compare(s,e,t)?(ba=new Ts(s,e,t),ya=null,"double"):(ya=new Ts(s,e,t),ba=null,"single")}function ko(e){var t=this,s=t.display;if(Xe(t,e)||s.activeTouch&&s.input.supportsTouch())return;if(s.input.ensurePolled(),s.shift=e.shiftKey,ei(s,e)){n||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));return}if(ws(t,e))return;var r=vn(t,e),g=Ge(e),F=r?Wl(r,g):"single";if(window.focus(),g==1&&t.state.selectingText&&t.state.selectingText(e),r&&Hl(t,g,r,F,e))return;g==1?r?Gl(t,r,F,e):Te(e)==s.scroller&&ie(e):g==2?(r&&Fa(t.doc,r),setTimeout(function(){return s.input.focus()},20)):g==3&&(I?t.display.input.onContextMenu(e):ks(t))}function Hl(e,t,s,r,g){var F="Click";return r=="double"?F="Double"+F:r=="triple"&&(F="Triple"+F),F=(t==1?"Left":t==2?"Middle":"Right")+F,va(e,So(F,g),g,function(X){if(typeof X=="string"&&(X=ga[X]),!X)return!1;var q=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),q=X(e,s)!=Be}finally{e.state.suppressEdits=!1}return q})}function Kl(e,t,s){var r=e.getOption("configureMouse"),g=r?r(e,t,s):{};if(g.unit==null){var F=i?s.shiftKey&&s.metaKey:s.altKey;g.unit=F?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(g.extend==null||e.doc.extend)&&(g.extend=e.doc.extend||s.shiftKey),g.addNew==null&&(g.addNew=a?s.metaKey:s.ctrlKey),g.moveOnDrag==null&&(g.moveOnDrag=!(a?s.altKey:s.ctrlKey)),g}function Gl(e,t,s,r){K?setTimeout(B(Ms,e),0):e.curOp.focus=P();var g=Kl(e,s,r),F=e.doc.sel,X;e.options.dragDrop&&ot&&!e.isReadOnly()&&s=="single"&&(X=F.contains(t))>-1&&(Vt((X=F.ranges[X]).from(),t)<0||t.xRel>0)&&(Vt(X.to(),t)>0||t.xRel<0)?zl(e,r,t,g):Vl(e,r,t,g)}function zl(e,t,s,r){var g=e.display,F=!1,X=nr(e,function(re){n&&(g.scroller.draggable=!1),e.state.draggingText=!1,lt(g.wrapper.ownerDocument,"mouseup",X),lt(g.wrapper.ownerDocument,"mousemove",q),lt(g.scroller,"dragstart",ee),lt(g.scroller,"drop",X),F||(ie(re),r.addNew||Fa(e.doc,s,null,null,r.extend),n&&!f||K&&H==9?setTimeout(function(){g.wrapper.ownerDocument.body.focus({preventScroll:!0}),g.input.focus()},20):g.input.focus())}),q=function(re){F=F||Math.abs(t.clientX-re.clientX)+Math.abs(t.clientY-re.clientY)>=10},ee=function(){return F=!0};n&&(g.scroller.draggable=!0),e.state.draggingText=X,X.copy=!r.moveOnDrag,g.scroller.dragDrop&&g.scroller.dragDrop(),Ce(g.wrapper.ownerDocument,"mouseup",X),Ce(g.wrapper.ownerDocument,"mousemove",q),Ce(g.scroller,"dragstart",ee),Ce(g.scroller,"drop",X),ks(e),setTimeout(function(){return g.input.focus()},20)}function Po(e,t,s){if(s=="char")return new Cn(t,t);if(s=="word")return e.findWordAt(t);if(s=="line")return new Cn(yt(t.line,0),L(e.doc,yt(t.line+1,0)));var r=s(e,t);return new Cn(r.from,r.to)}function Vl(e,t,s,r){var g=e.display,F=e.doc;ie(t);var X,q,ee=F.sel,re=ee.ranges;if(r.addNew&&!r.extend?(q=F.sel.contains(s),q>-1?X=re[q]:X=new Cn(s,s)):(X=F.sel.primary(),q=F.sel.primIndex),r.unit=="rectangle")r.addNew||(X=new Cn(s,s)),s=vn(e,t,!0,!0),q=-1;else{var we=Po(e,s,r.unit);r.extend?X=vs(X,we.anchor,we.head,r.extend):X=we}r.addNew?q==-1?(q=re.length,hr(F,Yr(e,re.concat([X]),q),{scroll:!1,origin:"*mouse"})):re.length>1&&re[q].empty()&&r.unit=="char"&&!r.extend?(hr(F,Yr(e,re.slice(0,q).concat(re.slice(q+1)),0),{scroll:!1,origin:"*mouse"}),ee=F.sel):ys(F,q,X,Re):(q=0,hr(F,new Fr([X],0),Re),ee=F.sel);var De=s;function Ze(Lt){if(Vt(De,Lt)==0)return;if(De=Lt,r.unit=="rectangle"){for(var Ht=[],nn=e.options.tabSize,Zt=Y(Ct(F,s.line).text,s.ch,nn),fn=Y(Ct(F,Lt.line).text,Lt.ch,nn),Dn=Math.min(Zt,fn),ir=Math.max(Zt,fn),Fn=Math.min(s.line,Lt.line),kr=Math.min(e.lastLine(),Math.max(s.line,Lt.line));Fn<=kr;Fn++){var Tr=Ct(F,Fn).text,Jn=Fe(Tr,Dn,nn);Dn==ir?Ht.push(new Cn(yt(Fn,Jn),yt(Fn,Jn))):Tr.length>Jn&&Ht.push(new Cn(yt(Fn,Jn),yt(Fn,Fe(Tr,ir,nn))))}Ht.length||Ht.push(new Cn(s,s)),hr(F,Yr(e,ee.ranges.slice(0,q).concat(Ht),q),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Lt)}else{var wr=X,lr=Po(e,Lt,r.unit),tr=wr.anchor,Zn;Vt(lr.anchor,tr)>0?(Zn=lr.head,tr=Vn(wr.from(),lr.anchor)):(Zn=lr.anchor,tr=Pn(wr.to(),lr.head));var Wn=ee.ranges.slice(0);Wn[q]=Yl(e,new Cn(L(F,tr),Zn)),hr(F,Yr(e,Wn,q),Re)}}var ze=g.wrapper.getBoundingClientRect(),ht=0;function Et(Lt){var Ht=++ht,nn=vn(e,Lt,!0,r.unit=="rectangle");if(!nn)return;if(Vt(nn,De)!=0){e.curOp.focus=P(),Ze(nn);var Zt=Ma(g,F);(nn.line>=Zt.to||nn.line<Zt.from)&&setTimeout(nr(e,function(){ht==Ht&&Et(Lt)}),150)}else{var fn=Lt.clientY<ze.top?-20:Lt.clientY>ze.bottom?20:0;fn&&setTimeout(nr(e,function(){if(ht!=Ht)return;g.scroller.scrollTop+=fn,Et(Lt)}),50)}}function At(Lt){e.state.selectingText=!1,ht=Infinity,Lt&&(ie(Lt),g.input.focus()),lt(g.wrapper.ownerDocument,"mousemove",Dt),lt(g.wrapper.ownerDocument,"mouseup",Bt),F.history.lastSelOrigin=null}var Dt=nr(e,function(Lt){Lt.buttons===0||!Ge(Lt)?At(Lt):Et(Lt)}),Bt=nr(e,At);e.state.selectingText=Bt,Ce(g.wrapper.ownerDocument,"mousemove",Dt),Ce(g.wrapper.ownerDocument,"mouseup",Bt)}function Yl(e,t){var s=t.anchor,r=t.head,g=Ct(e.doc,s.line);if(Vt(s,r)==0&&s.sticky==r.sticky)return t;var F=Tt(g);if(!F)return t;var X=ut(F,s.ch,s.sticky),q=F[X];if(q.from!=s.ch&&q.to!=s.ch)return t;var ee=X+(q.from==s.ch==(q.level!=1)?0:1);if(ee==0||ee==F.length)return t;var re;if(r.line!=s.line)re=(r.line-s.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var we=ut(F,r.ch,r.sticky),De=we-X||(r.ch-s.ch)*(q.level==1?-1:1);we==ee-1||we==ee?re=De<0:re=De>0}var Ze=F[ee+(re?-1:0)],ze=re==(Ze.level==1),ht=ze?Ze.from:Ze.to,Et=ze?"after":"before";return s.ch==ht&&s.sticky==Et?t:new Cn(new yt(s.line,ht,Et),r)}function No(e,t,s,r){var g,F;if(t.touches)g=t.touches[0].clientX,F=t.touches[0].clientY;else try{g=t.clientX,F=t.clientY}catch(Ze){return!1}if(g>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ie(t);var X=e.display,q=X.lineDiv.getBoundingClientRect();if(F>q.bottom||!ge(e,s))return he(t);F-=q.top-X.viewOffset;for(var ee=0;ee<e.display.gutterSpecs.length;++ee){var re=X.gutters.childNodes[ee];if(re&&re.getBoundingClientRect().right>=g){var we=qt(e.doc,F),De=e.display.gutterSpecs[ee];return Ke(e,s,e,we,De.className,t),he(t)}}}function ws(e,t){return No(e,t,"gutterClick",!0)}function Uo(e,t){if(ei(e.display,t)||Xl(e,t))return;if(Xe(e,t,"contextmenu"))return;I||e.display.input.onContextMenu(t)}function Xl(e,t){return ge(e,"gutterContextMenu")?No(e,t,"gutterContextMenu",!1):!1}function Bo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ci(e)}var ji={toString:function(){return"CodeMirror.Init"}},Fo={},Va={};function Ql(e){var t=e.optionHandlers;function s(r,g,F,X){e.defaults[r]=g,F&&(t[r]=X?function(q,ee,re){re!=ji&&F(q,ee,re)}:F)}e.defineOption=s,e.Init=ji,s("value","",function(r,g){return r.setValue(g)},!0),s("mode",null,function(r,g){r.doc.modeOption=g,ps(r)},!0),s("indentUnit",2,ps,!0),s("indentWithTabs",!1),s("smartIndent",!0),s("tabSize",4,function(r){oa(r),ci(r),cn(r)},!0),s("lineSeparator",null,function(r,g){if(r.doc.lineSep=g,!g)return;var F=[],X=r.doc.first;r.doc.iter(function(ee){for(var re=0;;){var we=ee.text.indexOf(g,re);if(we==-1)break;re=we+g.length,F.push(yt(X,we))}X++});for(var q=F.length-1;q>=0;q--)Ni(r.doc,g,F[q],yt(F[q].line,F[q].ch+g.length))}),s("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,g,F){r.state.specialChars=new RegExp(g.source+(g.test(" ")?"":"| "),"g"),F!=ji&&r.refresh()}),s("specialCharPlaceholder",An,function(r){return r.refresh()},!0),s("electricChars",!0),s("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),s("spellcheck",!1,function(r,g){return r.getInputField().spellcheck=g},!0),s("autocorrect",!1,function(r,g){return r.getInputField().autocorrect=g},!0),s("autocapitalize",!1,function(r,g){return r.getInputField().autocapitalize=g},!0),s("rtlMoveVisually",!R),s("wholeLineUpdateBefore",!0),s("theme","default",function(r){Bo(r),sa(r)},!0),s("keyMap","default",function(r,g,F){var X=Ga(g),q=F!=ji&&Ga(F);q&&q.detach&&q.detach(r,X),X.attach&&X.attach(r,q||null)}),s("extraKeys",null),s("configureMouse",null),s("lineWrapping",!1,Zl,!0),s("gutters",[],function(r,g){r.display.gutterSpecs=hs(g,r.options.lineNumbers),sa(r)},!0),s("fixedGutter",!0,function(r,g){r.display.gutters.style.left=g?Qt(r.display)+"px":"0",r.refresh()},!0),s("coverGutterNextToScrollbar",!1,function(r){return Li(r)},!0),s("scrollbarStyle","native",function(r){js(r),Li(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),s("lineNumbers",!1,function(r,g){r.display.gutterSpecs=hs(r.options.gutters,g),sa(r)},!0),s("firstLineNumber",1,sa,!0),s("lineNumberFormatter",function(r){return r},sa,!0),s("showCursorWhenSelecting",!1,ea,!0),s("resetSelectionOnContextMenu",!0),s("lineWiseCopyCut",!0),s("pasteLinesPerSelection",!0),s("selectionsMayTouch",!1),s("readOnly",!1,function(r,g){g=="nocursor"&&(Ii(r),r.display.input.blur()),r.display.input.readOnlyChanged(g)}),s("screenReaderLabel",null,function(r,g){g=g===""?null:g,r.display.input.screenReaderLabelChanged(g)}),s("disableInput",!1,function(r,g){g||r.display.input.reset()},!0),s("dragDrop",!0,Jl),s("allowDropFileTypes",null),s("cursorBlinkRate",530),s("cursorScrollMargin",0),s("cursorHeight",1,ea,!0),s("singleCursorHeightPerLine",!0,ea,!0),s("workTime",100),s("workDelay",100),s("flattenSpans",!0,oa,!0),s("addModeClass",!1,oa,!0),s("pollInterval",100),s("undoDepth",200,function(r,g){return r.doc.history.undoDepth=g}),s("historyEventDelay",1250),s("viewportMargin",10,function(r){return r.refresh()},!0),s("maxHighlightLength",1e4,oa,!0),s("moveInputWithCursor",!0,function(r,g){g||r.display.input.resetPosition()}),s("tabindex",null,function(r,g){return r.display.input.getField().tabIndex=g||""}),s("autofocus",null),s("direction","ltr",function(r,g){return r.doc.setDirection(g)},!0),s("phrases",null)}function Jl(e,t,s){var r=s&&s!=ji;if(!t!=!r){var g=e.display.dragFunctions,F=t?Ce:lt;F(e.display.scroller,"dragstart",g.start),F(e.display.scroller,"dragenter",g.enter),F(e.display.scroller,"dragover",g.over),F(e.display.scroller,"dragleave",g.leave),F(e.display.scroller,"drop",g.drop)}}function Zl(e){e.options.lineWrapping?(x(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Jr(e)),Jt(e),cn(e),ci(e),setTimeout(function(){return Li(e)},100)}function Nn(e,t){var s=this;if(!(this instanceof Nn))return new Nn(e,t);this.options=t=t?w(t):{},w(Fo,t,!1);var r=t.value;typeof r=="string"?r=new xr(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var g=new Nn.inputStyles[t.inputStyle](this),F=this.display=new cl(e,r,g,t);F.wrapper.CodeMirror=this,Bo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),js(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 $,keySeq:null,specialChars:null},t.autofocus&&!l&&F.input.focus(),K&&H<11&&setTimeout(function(){return s.display.input.reset(!0)},20),ql(this),Rl(),xi(this),this.curOp.forceUpdate=!0,Js(this,r),t.autofocus&&!l||this.hasFocus()?setTimeout(function(){s.hasFocus()&&!s.state.focused&&as(s)},20):Ii(this);for(var X in Va)Va.hasOwnProperty(X)&&Va[X](this,t[X],ji);Ks(this),t.finishInit&&t.finishInit(this);for(var q=0;q<Ss.length;++q)Ss[q](this);Ti(this),n&&t.lineWrapping&&getComputedStyle(F.lineDiv).textRendering=="optimizelegibility"&&(F.lineDiv.style.textRendering="auto")}Nn.defaults=Fo,Nn.optionHandlers=Va;function ql(e){var t=e.display;Ce(t.scroller,"mousedown",nr(e,ko)),K&&H<11?Ce(t.scroller,"dblclick",nr(e,function(ee){if(Xe(e,ee))return;var re=vn(e,ee);if(!re||ws(e,ee)||ei(e.display,ee))return;ie(ee);var we=e.findWordAt(re);Fa(e.doc,we.anchor,we.head)})):Ce(t.scroller,"dblclick",function(ee){return Xe(e,ee)||ie(ee)}),Ce(t.scroller,"contextmenu",function(ee){return Uo(e,ee)}),Ce(t.input.getField(),"contextmenu",function(ee){t.scroller.contains(ee.target)||Uo(e,ee)});var s,r={end:0};function g(){t.activeTouch&&(s=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function F(ee){if(ee.touches.length!=1)return!1;var re=ee.touches[0];return re.radiusX<=1&&re.radiusY<=1}function X(ee,re){if(re.left==null)return!0;var we=re.left-ee.left,De=re.top-ee.top;return we*we+De*De>20*20}Ce(t.scroller,"touchstart",function(ee){if(!Xe(e,ee)&&!F(ee)&&!ws(e,ee)){t.input.ensurePolled(),clearTimeout(s);var re=+new Date;t.activeTouch={start:re,moved:!1,prev:re-r.end<=300?r:null},ee.touches.length==1&&(t.activeTouch.left=ee.touches[0].pageX,t.activeTouch.top=ee.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(ee){var re=t.activeTouch;if(re&&!ei(t,ee)&&re.left!=null&&!re.moved&&new Date-re.start<300){var we=e.coordsChar(t.activeTouch,"page"),De;!re.prev||X(re,re.prev)?De=new Cn(we,we):!re.prev.prev||X(re,re.prev.prev)?De=e.findWordAt(we):De=new Cn(yt(we.line,0),L(e.doc,yt(we.line+1,0))),e.setSelection(De.anchor,De.head),e.focus(),ie(ee)}g()}),Ce(t.scroller,"touchcancel",g),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(na(e,t.scroller.scrollTop),Ei(e,t.scroller.scrollLeft,!0),Ke(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(ee){return Vs(e,ee)}),Ce(t.scroller,"DOMMouseScroll",function(ee){return Vs(e,ee)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ee){Xe(e,ee)||ve(ee)},over:function(ee){Xe(e,ee)||(Ol(e,ee),ve(ee))},start:function(ee){return Cl(e,ee)},drop:nr(e,Al),leave:function(ee){Xe(e,ee)||_o(e)}};var q=t.input.getField();Ce(q,"keyup",function(ee){return Lo.call(e,ee)}),Ce(q,"keydown",nr(e,Do)),Ce(q,"keypress",nr(e,Mo)),Ce(q,"focus",function(ee){return as(e,ee)}),Ce(q,"blur",function(ee){return Ii(e,ee)})}var Ss=[];Nn.defineInitHook=function(e){return Ss.push(e)};function Ea(e,t,s,r){var g=e.doc,F;s==null&&(s="add"),s=="smart"&&(g.mode.indent?F=St(e,t).state:s="prev");var X=e.options.tabSize,q=Ct(g,t),ee=Y(q.text,null,X);q.stateAfter&&(q.stateAfter=null);var re=q.text.match(/^\s*/)[0],we;if(!r&&!/\S/.test(q.text))we=0,s="not";else if(s=="smart"&&(we=g.mode.indent(F,q.text.slice(re.length),q.text),we==Be||we>150)){if(!r)return;s="prev"}s=="prev"?t>g.first?we=Y(Ct(g,t-1).text,null,X):we=0:s=="add"?we=ee+e.options.indentUnit:s=="subtract"?we=ee-e.options.indentUnit:typeof s=="number"&&(we=ee+s),we=Math.max(0,we);var De="",Ze=0;if(e.options.indentWithTabs)for(var ze=Math.floor(we/X);ze;--ze)Ze+=X,De+=" ";if(Ze<we&&(De+=fe(we-Ze)),De!=re)return Ni(g,De,yt(t,0),yt(t,re.length),"+input"),q.stateAfter=null,!0;for(var ht=0;ht<g.sel.ranges.length;ht++){var Et=g.sel.ranges[ht];if(Et.head.line==t&&Et.head.ch<re.length){var At=yt(t,re.length);ys(g,ht,new Cn(At,At));break}}}var Xr=null;function Ya(e){Xr=e}function As(e,t,s,r,g){var F=e.doc;e.display.shift=!1,r||(r=F.sel);var X=+new Date-200,q=g=="paste"||e.state.pasteIncoming>X,ee=qe(t),re=null;if(q&&r.ranges.length>1)if(Xr&&Xr.text.join(`
`)==t){if(r.ranges.length%Xr.text.length==0){re=[];for(var we=0;we<Xr.text.length;we++)re.push(F.splitLines(Xr.text[we]))}}else ee.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(re=xe(ee,function(Dt){return[Dt]}));for(var De=e.curOp.updateInput,Ze=r.ranges.length-1;Ze>=0;Ze--){var ze=r.ranges[Ze],ht=ze.from(),Et=ze.to();ze.empty()&&(s&&s>0?ht=yt(ht.line,ht.ch-s):e.state.overwrite&&!q?Et=yt(Et.line,Math.min(Ct(F,Et.line).text.length,Et.ch+ne(ee).length)):q&&Xr&&Xr.lineWise&&Xr.text.join(`
`)==ee.join(`
`)&&(ht=Et=yt(ht.line,0)));var At={from:ht,to:Et,text:re?re[Ze%re.length]:ee,origin:g||(q?"paste":e.state.cutIncoming>X?"cut":"+input")};Pi(e.doc,At),En(e,"inputRead",e,At)}t&&!q&&Wo(e,t),Di(e),e.curOp.updateInput<2&&(e.curOp.updateInput=De),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function jo(e,t){var s=e.clipboardData&&e.clipboardData.getData("Text");if(s)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Mr(t,function(){return As(t,s,0,null,"paste")}),!0}function Wo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var s=e.doc.sel,r=s.ranges.length-1;r>=0;r--){var g=s.ranges[r];if(g.head.ch>100||r&&s.ranges[r-1].head.line==g.head.line)continue;var F=e.getModeAt(g.head),X=!1;if(F.electricChars){for(var q=0;q<F.electricChars.length;q++)if(t.indexOf(F.electricChars.charAt(q))>-1){X=Ea(e,g.head.line,"smart");break}}else F.electricInput&&(F.electricInput.test(Ct(e.doc,g.head.line).text.slice(0,g.head.ch))&&(X=Ea(e,g.head.line,"smart")));X&&En(e,"electricInput",e,g.head.line)}}function Ho(e){for(var t=[],s=[],r=0;r<e.doc.sel.ranges.length;r++){var g=e.doc.sel.ranges[r].head.line,F={anchor:yt(g,0),head:yt(g+1,0)};s.push(F),t.push(e.getRange(F.anchor,F.head))}return{text:t,ranges:s}}function Ko(e,t,s,r){e.setAttribute("autocorrect",s?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Go(){var e=h("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=h("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return n?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(e.style.border="1px solid black"),Ko(e),t}function $l(e){var t=e.optionHandlers,s=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,g){var F=this.options,X=F[r];if(F[r]==g&&r!="mode")return;F[r]=g,t.hasOwnProperty(r)&&nr(this,t[r])(this,g,X),Ke(this,"optionChange",this,r)},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,g){this.state.keyMaps[g?"push":"unshift"](Ga(r))},removeKeyMap:function(r){for(var g=this.state.keyMaps,F=0;F<g.length;++F)if(g[F]==r||g[F].name==r)return g.splice(F,1),!0},addOverlay:gr(function(r,g){var F=r.token?r:e.getMode(this.options,r);if(F.startState)throw new Error("Overlays may not be stateful.");ce(this.state.overlays,{mode:F,modeSpec:r,opaque:g&&g.opaque,priority:g&&g.priority||0},function(X){return X.priority}),this.state.modeGen++,cn(this)}),removeOverlay:gr(function(r){for(var g=this.state.overlays,F=0;F<g.length;++F){var X=g[F].modeSpec;if(X==r||typeof r=="string"&&X.name==r){g.splice(F,1),this.state.modeGen++,cn(this);return}}}),indentLine:gr(function(r,g,F){typeof g!="string"&&typeof g!="number"&&(g==null?g=this.options.smartIndent?"smart":"prev":g=g?"add":"subtract"),yn(this.doc,r)&&Ea(this,r,g,F)}),indentSelection:gr(function(r){for(var g=this.doc.sel.ranges,F=-1,X=0;X<g.length;X++){var q=g[X];if(q.empty())q.head.line>F&&(Ea(this,q.head.line,r,!0),F=q.head.line,X==this.doc.sel.primIndex&&Di(this));else{var ee=q.from(),re=q.to(),we=Math.max(F,ee.line);F=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var De=we;De<F;++De)Ea(this,De,r);var Ze=this.doc.sel.ranges;ee.ch==0&&g.length==Ze.length&&Ze[X].from().ch>0&&ys(this.doc,X,new Cn(ee,Ze[X].to()),Ae)}}}),getTokenAt:function(r,g){return Sn(this,r,g)},getLineTokens:function(r,g){return Sn(this,yt(r),g,!0)},getTokenTypeAt:function(r){r=L(this.doc,r);var g=at(this,Ct(this.doc,r.line)),F=0,X=(g.length-1)/2,q=r.ch,ee;if(q==0)ee=g[2];else for(;;){var re=F+X>>1;if((re?g[re*2-1]:0)>=q)X=re;else if(g[re*2+1]<q)F=re+1;else{ee=g[re*2+2];break}}var we=ee?ee.indexOf("overlay "):-1;return we<0?ee:we==0?null:ee.slice(0,we-1)},getModeAt:function(r){var g=this.doc.mode;return g.innerMode?e.innerMode(g,this.getTokenAt(r).state).mode:g},getHelper:function(r,g){return this.getHelpers(r,g)[0]},getHelpers:function(r,g){var F=[];if(!s.hasOwnProperty(g))return F;var X=s[g],q=this.getModeAt(r);if(typeof q[g]=="string")X[q[g]]&&F.push(X[q[g]]);else if(q[g])for(var ee=0;ee<q[g].length;ee++){var re=X[q[g][ee]];re&&F.push(re)}else q.helperType&&X[q.helperType]?F.push(X[q.helperType]):X[q.name]&&F.push(X[q.name]);for(var we=0;we<X._global.length;we++){var De=X._global[we];De.pred(q,this)&&oe(F,De.val)==-1&&F.push(De.val)}return F},getStateAfter:function(r,g){var F=this.doc;return r=Q(F,r==null?F.first+F.size-1:r),St(this,r+1,g).state},cursorCoords:function(r,g){var F,X=this.doc.sel.primary();return r==null?F=X.head:typeof r=="object"?F=L(this.doc,r):F=r?X.from():X.to(),er(this,F,g||"page")},charCoords:function(r,g){return Zi(this,L(this.doc,r),g||"page")},coordsChar:function(r,g){return r=Ca(this,r,g||"page"),$i(this,r.left,r.top)},lineAtHeight:function(r,g){return r=Ca(this,{top:r,left:0},g||"page").top,qt(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,g,F){var X=!1,q;if(typeof r=="number"){var ee=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>ee&&(r=ee,X=!0),q=Ct(this.doc,r)}else q=r;return Ri(this,q,{top:0,left:0},g||"page",F||X).top+(X?this.doc.height-_r(q):0)},defaultTextHeight:function(){return It(this.display)},defaultCharWidth:function(){return Nt(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,g,F,X,q){var ee=this.display;r=er(this,L(this.doc,r));var re=r.bottom,we=r.left;if(g.style.position="absolute",g.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(g),ee.sizer.appendChild(g),X=="over")re=r.top;else if(X=="above"||X=="near"){var De=Math.max(ee.wrapper.clientHeight,this.doc.height),Ze=Math.max(ee.sizer.clientWidth,ee.lineSpace.clientWidth);(X=="above"||r.bottom+g.offsetHeight>De)&&r.top>g.offsetHeight?re=r.top-g.offsetHeight:r.bottom+g.offsetHeight<=De&&(re=r.bottom),we+g.offsetWidth>Ze&&(we=Ze-g.offsetWidth)}g.style.top=re+"px",g.style.left=g.style.right="",q=="right"?(we=ee.sizer.clientWidth-g.offsetWidth,g.style.right="0px"):(q=="left"?we=0:q=="middle"&&(we=(ee.sizer.clientWidth-g.offsetWidth)/2),g.style.left=we+"px"),F&&Jo(this,{left:we,top:re,right:we+g.offsetWidth,bottom:re+g.offsetHeight})},triggerOnKeyDown:gr(Do),triggerOnKeyPress:gr(Mo),triggerOnKeyUp:Lo,triggerOnMouseDown:gr(ko),execCommand:function(r){if(ga.hasOwnProperty(r))return ga[r].call(null,this)},triggerElectric:gr(function(r){Wo(this,r)}),findPosH:function(r,g,F,X){var q=1;g<0&&(q=-1,g=-g);for(var ee=L(this.doc,r),re=0;re<g&&!(ee=Cs(this.doc,ee,q,F,X),ee.hitSide);++re);return ee},moveH:gr(function(r,g){var F=this;this.extendSelectionsBy(function(X){return F.display.shift||F.doc.extend||X.empty()?Cs(F.doc,X.head,r,g,F.options.rtlMoveVisually):r<0?X.from():X.to()},Le)}),deleteH:gr(function(r,g){var F=this.doc.sel,X=this.doc;F.somethingSelected()?X.replaceSelection("",null,"+delete"):Fi(this,function(q){var ee=Cs(X,q.head,r,g,!1);return r<0?{from:ee,to:q.head}:{from:q.head,to:ee}})}),findPosV:function(r,g,F,X){var q=1,ee=X;g<0&&(q=-1,g=-g);for(var re=L(this.doc,r),we=0;we<g;++we){var De=er(this,re,"div");if(ee==null?ee=De.left:De.left=ee,re=zo(this,De,q,F),re.hitSide)break}return re},moveV:gr(function(r,g){var F=this,X=this.doc,q=[],ee=!this.display.shift&&!X.extend&&X.sel.somethingSelected();if(X.extendSelectionsBy(function(we){if(ee)return r<0?we.from():we.to();var De=er(F,we.head,"div");we.goalColumn!=null&&(De.left=we.goalColumn),q.push(De.left);var Ze=zo(F,De,r,g);return g=="page"&&we==X.sel.primary()&&os(F,Zi(F,Ze,"div").top-De.top),Ze},Le),q.length)for(var re=0;re<X.sel.ranges.length;re++)X.sel.ranges[re].goalColumn=q[re]}),findWordAt:function(r){var g=this.doc,F=Ct(g,r.line).text,X=r.ch,q=r.ch;if(F){var ee=this.getHelper(r,"wordChars");(r.sticky=="before"||q==F.length)&&X?--X:++q;for(var re=F.charAt(X),we=et(re,ee)?function(De){return et(De,ee)}:/\s/.test(re)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!et(De)};X>0&&we(F.charAt(X-1));)--X;for(;q<F.length&&we(F.charAt(q));)++q}return new Cn(yt(r.line,X),yt(r.line,q))},toggleOverwrite:function(r){if(r!=null&&r==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?x(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),Ke(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:gr(function(r,g){ta(this,r,g)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-mr(this)-this.display.barHeight,width:r.scrollWidth-mr(this)-this.display.barWidth,clientHeight:yi(this),clientWidth:ii(this)}},scrollIntoView:gr(function(r,g){r==null?(r={from:this.doc.sel.primary().head,to:null},g==null&&(g=this.options.cursorScrollMargin)):typeof r=="number"?r={from:yt(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=g||0,r.from.line!=null?Zo(this,r):Ns(this,r.from,r.to,r.margin)}),setSize:gr(function(r,g){var F=this,X=function(ee){return typeof ee=="number"||/^\d+$/.test(String(ee))?ee+"px":ee};r!=null&&(this.display.wrapper.style.width=X(r)),g!=null&&(this.display.wrapper.style.height=X(g)),this.options.lineWrapping&&wa(this);var q=this.display.viewFrom;this.doc.iter(q,this.display.viewTo,function(ee){if(ee.widgets){for(var re=0;re<ee.widgets.length;re++)if(ee.widgets[re].noHScroll){or(F,q,"widget");break}}++q}),this.curOp.forceUpdate=!0,Ke(this,"refresh",this)}),operation:function(r){return Mr(this,r)},startOperation:function(){return xi(this)},endOperation:function(){return Ti(this)},refresh:gr(function(){var r=this.display.cachedTextHeight;cn(this),this.curOp.forceUpdate=!0,ci(this),ta(this,this.doc.scrollLeft,this.doc.scrollTop),cs(this.display),(r==null||Math.abs(r-It(this.display))>.5||this.options.lineWrapping)&&Jt(this),Ke(this,"refresh",this)}),swapDoc:gr(function(r){var g=this.doc;return g.cm=null,this.state.selectingText&&this.state.selectingText(),Js(this,r),ci(this),this.display.input.reset(),ta(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,En(this,"swapDoc",this,g),g}),phrase:function(r){var g=this.options.phrases;return g&&Object.prototype.hasOwnProperty.call(g,r)?g[r]:r},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}},Ee(e),e.registerHelper=function(r,g,F){s.hasOwnProperty(r)||(s[r]=e[r]={_global:[]}),s[r][g]=F},e.registerGlobalHelper=function(r,g,F,X){e.registerHelper(r,g,X),s[r]._global.push({pred:F,val:X})}}function Cs(e,t,s,r,g){var F=t,X=s,q=Ct(e,t.line),ee=g&&e.direction=="rtl"?-s:s;function re(){var Bt=t.line+ee;return Bt<e.first||Bt>=e.first+e.size?!1:(t=new yt(Bt,t.ch,t.sticky),q=Ct(e,Bt))}function we(Bt){var Lt;if(r=="codepoint"){var Ht=q.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(Ht)?Lt=null:Lt=new yt(t.line,Math.max(0,Math.min(q.text.length,t.ch+s*(Ht>=55296&&Ht<56320?2:1))),-s)}else g?Lt=kl(e.cm,q,t,s):Lt=Es(q,t,s);if(Lt==null)if(!Bt&&re())t=_s(g,e.cm,q,t.line,ee);else return!1;else t=Lt;return!0}if(r=="char"||r=="codepoint")we();else if(r=="column")we(!0);else if(r=="word"||r=="group")for(var De=null,Ze=r=="group",ze=e.cm&&e.cm.getHelper(t,"wordChars"),ht=!0;!(s<0&&!we(!ht));ht=!1){var Et=q.text.charAt(t.ch)||`
`,At=et(Et,ze)?"w":Ze&&Et==`
`?"n":!Ze||/\s/.test(Et)?null:"p";if(Ze&&!ht&&!At&&(At="s"),De&&De!=At){s<0&&(s=1,we(),t.sticky="after");break}if(At&&(De=At),s>0&&!we(!ht))break}var Dt=Wa(e,t,F,X,!0);return Mn(F,Dt)&&(Dt.hitSide=!0),Dt}function zo(e,t,s,r){var g=e.doc,F=t.left,X;if(r=="page"){var q=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ee=Math.max(q-.5*It(e.display),3);X=(s>0?t.bottom:t.top)+s*ee}else r=="line"&&(X=s>0?t.bottom+3:t.top-3);for(var re;!(re=$i(e,F,X),!re.outside);){if(s<0?X<=0:X>=g.height){re.hitSide=!0;break}X+=s*5}return re}var On=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};On.prototype.init=function(e){var t=this,s=this,r=s.cm,g=s.div=e.lineDiv;Ko(g,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function F(q){for(var ee=q.target;ee;ee=ee.parentNode){if(ee==g)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ee.className))break}return!1}Ce(g,"paste",function(q){if(!F(q)||Xe(r,q)||jo(q,r))return;H<=11&&setTimeout(nr(r,function(){return t.updateFromDOM()}),20)}),Ce(g,"compositionstart",function(q){t.composing={data:q.data,done:!1}}),Ce(g,"compositionupdate",function(q){t.composing||(t.composing={data:q.data,done:!1})}),Ce(g,"compositionend",function(q){t.composing&&(q.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(g,"touchstart",function(){return s.forceCompositionEnd()}),Ce(g,"input",function(){t.composing||t.readFromDOMSoon()});function X(q){if(!F(q)||Xe(r,q))return;if(r.somethingSelected())Ya({lineWise:!1,text:r.getSelections()}),q.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var ee=Ho(r);Ya({lineWise:!0,text:ee.text}),q.type=="cut"&&r.operation(function(){r.setSelections(ee.ranges,0,Ae),r.replaceSelection("",null,"cut")})}else return;if(q.clipboardData){q.clipboardData.clearData();var re=Xr.text.join(`
`);if(q.clipboardData.setData("Text",re),q.clipboardData.getData("Text")==re){q.preventDefault();return}}var we=Go(),De=we.firstChild;r.display.lineSpace.insertBefore(we,r.display.lineSpace.firstChild),De.value=Xr.text.join(`
`);var Ze=document.activeElement;j(De),setTimeout(function(){r.display.lineSpace.removeChild(we),Ze.focus(),Ze==g&&s.showPrimarySelection()},50)}Ce(g,"copy",X),Ce(g,"cut",X)},On.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},On.prototype.prepareSelection=function(){var e=Ds(this.cm,!1);return e.focus=document.activeElement==this.div,e},On.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},On.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},On.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,s=t.doc.sel.primary(),r=s.from(),g=s.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||g.line<t.display.viewFrom){e.removeAllRanges();return}var F=Xa(t,e.anchorNode,e.anchorOffset),X=Xa(t,e.focusNode,e.focusOffset);if(F&&!F.bad&&X&&!X.bad&&Vt(Vn(F,X),r)==0&&Vt(Pn(F,X),g)==0)return;var q=t.display.view,ee=r.line>=t.display.viewFrom&&Vo(t,r)||{node:q[0].measure.map[2],offset:0},re=g.line<t.display.viewTo&&Vo(t,g);if(!re){var we=q[q.length-1].measure,De=we.maps?we.maps[we.maps.length-1]:we.map;re={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!ee||!re){e.removeAllRanges();return}var Ze=e.rangeCount&&e.getRangeAt(0),ze;try{ze=_(ee.node,ee.offset,re.offset,re.node)}catch(ht){}ze&&(!N&&t.state.focused?(e.collapse(ee.node,ee.offset),ze.collapsed||(e.removeAllRanges(),e.addRange(ze))):(e.removeAllRanges(),e.addRange(ze)),Ze&&e.anchorNode==null?e.addRange(Ze):N&&this.startGracePeriod()),this.rememberSelection()},On.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)},On.prototype.showMultipleSelections=function(e){p(this.cm.display.cursorDiv,e.cursors),p(this.cm.display.selectionDiv,e.selection)},On.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},On.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return v(this.div,t)},On.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},On.prototype.blur=function(){this.div.blur()},On.prototype.getField=function(){return this.div},On.prototype.supportsTouch=function(){return!0},On.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Mr(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)},On.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},On.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(o&&b&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var s=Xa(t,e.anchorNode,e.anchorOffset),r=Xa(t,e.focusNode,e.focusOffset);s&&r&&Mr(t,function(){hr(t.doc,hi(s,r),Ae),(s.bad||r.bad)&&(t.curOp.selectionChanged=!0)})},On.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,s=e.doc.sel.primary(),r=s.from(),g=s.to();if(r.ch==0&&r.line>e.firstLine()&&(r=yt(r.line-1,Ct(e.doc,r.line-1).length)),g.ch==Ct(e.doc,g.line).text.length&&g.line<e.lastLine()&&(g=yt(g.line+1,0)),r.line<t.viewFrom||g.line>t.viewTo-1)return!1;var F,X,q;r.line==t.viewFrom||(F=Tn(e,r.line))==0?(X=Pt(t.view[0].line),q=t.view[0].node):(X=Pt(t.view[F].line),q=t.view[F-1].node.nextSibling);var ee=Tn(e,g.line),re,we;if(ee==t.view.length-1?(re=t.viewTo-1,we=t.lineDiv.lastChild):(re=Pt(t.view[ee+1].line)-1,we=t.view[ee+1].node.previousSibling),!q)return!1;for(var De=e.doc.splitLines(tu(e,q,we,X,re)),Ze=pn(e.doc,yt(X,0),yt(re,Ct(e.doc,re).text.length));De.length>1&&Ze.length>1;)if(ne(De)==ne(Ze))De.pop(),Ze.pop(),re--;else if(De[0]==Ze[0])De.shift(),Ze.shift(),X++;else break;for(var ze=0,ht=0,Et=De[0],At=Ze[0],Dt=Math.min(Et.length,At.length);ze<Dt&&Et.charCodeAt(ze)==At.charCodeAt(ze);)++ze;for(var Bt=ne(De),Lt=ne(Ze),Ht=Math.min(Bt.length-(De.length==1?ze:0),Lt.length-(Ze.length==1?ze:0));ht<Ht&&Bt.charCodeAt(Bt.length-ht-1)==Lt.charCodeAt(Lt.length-ht-1);)++ht;if(De.length==1&&Ze.length==1&&X==r.line)for(;ze&&ze>r.ch&&Bt.charCodeAt(Bt.length-ht-1)==Lt.charCodeAt(Lt.length-ht-1);)ze--,ht++;De[De.length-1]=Bt.slice(0,Bt.length-ht).replace(/^\u200b+/,""),De[0]=De[0].slice(ze).replace(/\u200b+$/,"");var nn=yt(X,ze),Zt=yt(re,Ze.length?ne(Ze).length-ht:0);if(De.length>1||De[0]||Vt(nn,Zt))return Ni(e.doc,De,nn,Zt,"+input"),!0},On.prototype.ensurePolled=function(){this.forceCompositionEnd()},On.prototype.reset=function(){this.forceCompositionEnd()},On.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},On.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)},On.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Mr(this.cm,function(){return cn(e.cm)})},On.prototype.setUneditable=function(e){e.contentEditable="false"},On.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||nr(this.cm,As)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},On.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},On.prototype.onContextMenu=function(){},On.prototype.resetPosition=function(){},On.prototype.needsContentAttribute=!0;function Vo(e,t){var s=ai(e,t.line);if(!s||s.hidden)return null;var r=Ct(e.doc,t.line),g=Qi(s,r,t.line),F=Tt(r,e.doc.direction),X="left";if(F){var q=ut(F,t.ch);X=q%2?"right":"left"}var ee=bi(g.map,t.ch,X);return ee.offset=ee.collapse=="right"?ee.end:ee.start,ee}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Wi(e,t){return t&&(e.bad=!0),e}function tu(e,t,s,r,g){var F="",X=!1,q=e.doc.lineSeparator(),ee=!1;function re(ze){return function(ht){return ht.id==ze}}function we(){X&&(F+=q,ee&&(F+=q),X=ee=!1)}function De(ze){ze&&(we(),F+=ze)}function Ze(ze){if(ze.nodeType==1){var ht=ze.getAttribute("cm-text");if(ht){De(ht);return}var Et=ze.getAttribute("cm-marker"),At;if(Et){var Dt=e.findMarks(yt(r,0),yt(g+1,0),re(+Et));Dt.length&&(At=Dt[0].find(0))&&De(pn(e.doc,At.from,At.to).join(q));return}if(ze.getAttribute("contenteditable")=="false")return;var Bt=/^(pre|div|p|li|table|br)$/i.test(ze.nodeName);if(!/^br$/i.test(ze.nodeName)&&ze.textContent.length==0)return;Bt&&we();for(var Lt=0;Lt<ze.childNodes.length;Lt++)Ze(ze.childNodes[Lt]);/^(pre|p)$/i.test(ze.nodeName)&&(ee=!0),Bt&&(X=!0)}else ze.nodeType==3&&De(ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ze(t),t==s);)t=t.nextSibling,ee=!1;return F}function Xa(e,t,s){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[s],!r)return Wi(e.clipPos(yt(e.display.viewTo-1)),!0);t=null,s=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var g=0;g<e.display.view.length;g++){var F=e.display.view[g];if(F.node==r)return nu(F,t,s)}}function nu(e,t,s){var r=e.text.firstChild,g=!1;if(!t||!v(r,t))return Wi(yt(Pt(e.line),0),!0);if(t==r&&(g=!0,t=r.childNodes[s],s=0,!t)){var F=e.rest?ne(e.rest):e.line;return Wi(yt(Pt(F),F.text.length),g)}var X=t.nodeType==3?t:null,q=t;for(!X&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(X=t.firstChild,s&&(s=X.nodeValue.length));q.parentNode!=r;)q=q.parentNode;var ee=e.measure,re=ee.maps;function we(At,Dt,Bt){for(var Lt=-1;Lt<(re?re.length:0);Lt++)for(var Ht=Lt<0?ee.map:re[Lt],nn=0;nn<Ht.length;nn+=3){var Zt=Ht[nn+2];if(Zt==At||Zt==Dt){var fn=Pt(Lt<0?e.line:e.rest[Lt]),Dn=Ht[nn]+Bt;return(Bt<0||Zt!=At)&&(Dn=Ht[nn+(Bt?1:0)]),yt(fn,Dn)}}}var De=we(X,q,s);if(De)return Wi(De,g);for(var Ze=q.nextSibling,ze=X?X.nodeValue.length-s:0;Ze;Ze=Ze.nextSibling){if(De=we(Ze,Ze.firstChild,0),De)return Wi(yt(De.line,De.ch-ze),g);ze+=Ze.textContent.length}for(var ht=q.previousSibling,Et=s;ht;ht=ht.previousSibling){if(De=we(ht,ht.firstChild,-1),De)return Wi(yt(De.line,De.ch+Et),g);Et+=ht.textContent.length}}var zn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};zn.prototype.init=function(e){var t=this,s=this,r=this.cm;this.createField(e);var g=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),c&&(g.style.width="0px"),Ce(g,"input",function(){K&&H>=9&&t.hasSelection&&(t.hasSelection=null),s.poll()}),Ce(g,"paste",function(X){if(Xe(r,X)||jo(X,r))return;r.state.pasteIncoming=+new Date,s.fastPoll()});function F(X){if(Xe(r,X))return;if(r.somethingSelected())Ya({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var q=Ho(r);Ya({lineWise:!0,text:q.text}),X.type=="cut"?r.setSelections(q.ranges,null,Ae):(s.prevInput="",g.value=q.text.join(`
`),j(g))}else return;X.type=="cut"&&(r.state.cutIncoming=+new Date)}Ce(g,"cut",F),Ce(g,"copy",F),Ce(e.scroller,"paste",function(X){if(ei(e,X)||Xe(r,X))return;if(!g.dispatchEvent){r.state.pasteIncoming=+new Date,s.focus();return}var q=new Event("paste");q.clipboardData=X.clipboardData,g.dispatchEvent(q)}),Ce(e.lineSpace,"selectstart",function(X){ei(e,X)||ie(X)}),Ce(g,"compositionstart",function(){var X=r.getCursor("from");s.composing&&s.composing.range.clear(),s.composing={start:X,range:r.markText(X,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(g,"compositionend",function(){s.composing&&(s.poll(),s.composing.range.clear(),s.composing=null)})},zn.prototype.createField=function(e){this.wrapper=Go(),this.textarea=this.wrapper.firstChild},zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},zn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,s=e.doc,r=Ds(e);if(e.options.moveInputWithCursor){var g=er(e,s.sel.primary().head,"div"),F=t.wrapper.getBoundingClientRect(),X=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,g.top+X.top-F.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,g.left+X.left-F.left))}return r},zn.prototype.showSelection=function(e){var t=this.cm,s=t.display;p(s.cursorDiv,e.cursors),p(s.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},zn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var s=t.getSelection();this.textarea.value=s,t.state.focused&&j(this.textarea),K&&H>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",K&&H>=9&&(this.hasSelection=null))},zn.prototype.getField=function(){return this.textarea},zn.prototype.supportsTouch=function(){return!1},zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},zn.prototype.blur=function(){this.textarea.blur()},zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},zn.prototype.receivedFocus=function(){this.slowPoll()},zn.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()})},zn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function s(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,s)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,s)},zn.prototype.poll=function(){var e=this,t=this.cm,s=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Qe(s)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var g=s.value;if(g==r&&!t.somethingSelected())return!1;if(K&&H>=9&&this.hasSelection===g||a&&/[\uf700-\uf7ff]/.test(g))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var F=g.charCodeAt(0);if(F==8203&&!r&&(r="\u200B"),F==8666)return this.reset(),this.cm.execCommand("undo")}for(var X=0,q=Math.min(r.length,g.length);X<q&&r.charCodeAt(X)==g.charCodeAt(X);)++X;return Mr(t,function(){As(t,g.slice(X),r.length-X,null,e.composing?"*compose":null),g.length>1e3||g.indexOf(`
`)>-1?s.value=e.prevInput="":e.prevInput=g,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},zn.prototype.onKeyPress=function(){K&&H>=9&&(this.hasSelection=null),this.fastPoll()},zn.prototype.onContextMenu=function(e){var t=this,s=t.cm,r=s.display,g=t.textarea;t.contextMenuPending&&t.contextMenuPending();var F=vn(s,e),X=r.scroller.scrollTop;if(!F||m)return;var q=s.options.resetSelectionOnContextMenu;q&&s.doc.sel.contains(F)==-1&&nr(s,hr)(s.doc,hi(F),Ae);var ee=g.style.cssText,re=t.wrapper.style.cssText,we=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",g.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-we.top-5)+"px; left: "+(e.clientX-we.left-5)+`px;
z-index: 1000; background: `+(K?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;n&&(De=window.scrollY),r.input.focus(),n&&window.scrollTo(null,De),r.input.reset(),s.somethingSelected()||(g.value=t.prevInput=" "),t.contextMenuPending=ze,r.selForContextMenu=s.doc.sel,clearTimeout(r.detectingSelectAll);function Ze(){if(g.selectionStart!=null){var Et=s.somethingSelected(),At="\u200B"+(Et?g.value:"");g.value="\u21DA",g.value=At,t.prevInput=Et?"":"\u200B",g.selectionStart=1,g.selectionEnd=At.length,r.selForContextMenu=s.doc.sel}}function ze(){if(t.contextMenuPending!=ze)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=re,g.style.cssText=ee,K&&H<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=X),g.selectionStart!=null){(!K||K&&H<9)&&Ze();var Et=0,At=function(){r.selForContextMenu==s.doc.sel&&g.selectionStart==0&&g.selectionEnd>0&&t.prevInput=="\u200B"?nr(s,uo)(s):Et++<10?r.detectingSelectAll=setTimeout(At,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(At,200)}}if(K&&H>=9&&Ze(),I){ve(e);var ht=function(){lt(window,"mouseup",ht),setTimeout(ze,20)};Ce(window,"mouseup",ht)}else setTimeout(ze,50)},zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},zn.prototype.setUneditable=function(){},zn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?w(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 s=P();t.autofocus=s==e||e.getAttribute("autofocus")!=null&&s==document.body}function r(){e.value=q.getValue()}var g;if(e.form&&(Ce(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var F=e.form;g=F.submit;try{var X=F.submit=function(){r(),F.submit=g,F.submit(),F.submit=X}}catch(ee){}}t.finishInit=function(ee){ee.save=r,ee.getTextArea=function(){return e},ee.toTextArea=function(){ee.toTextArea=isNaN,r(),e.parentNode.removeChild(ee.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=g))}},e.style.display="none";var q=Nn(function(ee){return e.parentNode.insertBefore(ee,e.nextSibling)},t);return q}function iu(e){e.off=lt,e.on=Ce,e.wheelEventPixels=dl,e.Doc=xr,e.splitLines=qe,e.countColumn=Y,e.findColumn=Fe,e.isWordChar=Ye,e.Pass=Be,e.signal=Ke,e.Line=sr,e.changeEnd=fi,e.scrollbarModel=Fs,e.Pos=yt,e.cmpPos=Vt,e.modes=$e,e.mimeModes=je,e.resolveMode=We,e.getMode=it,e.modeExtensions=st,e.extendMode=ct,e.copyState=bt,e.startState=en,e.innerMode=jt,e.commands=ga,e.keyMap=si,e.keyName=Ao,e.isModifierKey=wo,e.lookupKey=Bi,e.normalizeKeyMap=Ml,e.StringStream=Yt,e.SharedTextMarker=fa,e.TextMarker=mi,e.LineWidget=ha,e.e_preventDefault=ie,e.e_stopPropagation=ae,e.e_stop=ve,e.addClass=x,e.contains=v,e.rmClass=E,e.keyNames=gi}Ql(Nn),$l(Nn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Qa in xr.prototype)xr.prototype.hasOwnProperty(Qa)&&oe(au,Qa)<0&&(Nn.prototype[Qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(xr.prototype[Qa]));return Ee(xr),Nn.inputStyles={textarea:zn,contenteditable:On},Nn.defineMode=function(e){!Nn.defaults.mode&&e!="null"&&(Nn.defaults.mode=e),Je.apply(this,arguments)},Nn.defineMIME=mt,Nn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nn.defineMIME("text/plain","null"),Nn.defineExtension=function(e,t){Nn.prototype[e]=t},Nn.defineDocExtension=function(e,t){xr.prototype[e]=t},Nn.fromTextArea=ru,iu(Nn),Nn.version="5.58.2",Nn})},W6BS:function(Ve,se){Ve.exports="data:image/png;base64,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"},WaYH:function(Ve,se,U){"use strict";var Z=U("rePB"),z=U("Ff2n"),N=U("VTBJ"),V=U("1OyB"),W=U("vuIU"),M=U("JX7q"),K=U("Ji7U"),H=U("LK+K"),n=U("q1tI"),D=U("TSYQ"),b=U.n(D),m=U("sboe"),f=U("OZM5"),d=function(I){var O=I.prefixCls,E=I.level,y=I.isStart,p=I.isEnd;if(!E)return null;for(var h="".concat(O,"-indent-unit"),A=[],_=0;_<E;_+=1){var v;A.push(n.createElement("span",{key:_,className:b()(h,(v={},Object(Z.a)(v,"".concat(h,"-start"),y[_+1]),Object(Z.a)(v,"".concat(h,"-end"),p[_+1]),Object(Z.a)(v,"".concat(h,"-end-first-level"),!_&&p[0]),v))}))}return n.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},A)},u=d,c=U("815F"),o="open",l="close",a="---",i=function(T){Object(K.a)(O,T);var I=Object(H.a)(O);function O(){var E;return Object(V.a)(this,O),E=I.apply(this,arguments),E.state={dragNodeHighlight:!1},E.onSelectorClick=function(y){var p=E.props.context.onNodeClick;p(y,Object(c.b)(E.props)),E.isSelectable()?E.onSelect(y):E.onCheck(y)},E.onSelectorDoubleClick=function(y){var p=E.props.context.onNodeDoubleClick;p(y,Object(c.b)(E.props))},E.onSelect=function(y){if(E.isDisabled())return;var p=E.props.context.onNodeSelect;y.preventDefault(),p(y,Object(c.b)(E.props))},E.onCheck=function(y){if(E.isDisabled())return;var p=E.props,h=p.disableCheckbox,A=p.checked,_=E.props.context.onNodeCheck;if(!E.isCheckable()||h)return;y.preventDefault();var v=!A;_(y,Object(c.b)(E.props),v)},E.onMouseEnter=function(y){var p=E.props.context.onNodeMouseEnter;p(y,Object(c.b)(E.props))},E.onMouseLeave=function(y){var p=E.props.context.onNodeMouseLeave;p(y,Object(c.b)(E.props))},E.onContextMenu=function(y){var p=E.props.context.onNodeContextMenu;p(y,Object(c.b)(E.props))},E.onDragStart=function(y){var p=E.props.context.onNodeDragStart;y.stopPropagation(),E.setState({dragNodeHighlight:!0}),p(y,Object(M.a)(E));try{y.dataTransfer.setData("text/plain","")}catch(h){}},E.onDragEnter=function(y){var p=E.props.context.onNodeDragEnter;y.preventDefault(),y.stopPropagation(),p(y,Object(M.a)(E))},E.onDragOver=function(y){var p=E.props.context.onNodeDragOver;y.preventDefault(),y.stopPropagation(),p(y,Object(M.a)(E))},E.onDragLeave=function(y){var p=E.props.context.onNodeDragLeave;y.stopPropagation(),p(y,Object(M.a)(E))},E.onDragEnd=function(y){var p=E.props.context.onNodeDragEnd;y.stopPropagation(),E.setState({dragNodeHighlight:!1}),p(y,Object(M.a)(E))},E.onDrop=function(y){var p=E.props.context.onNodeDrop;y.preventDefault(),y.stopPropagation(),E.setState({dragNodeHighlight:!1}),p(y,Object(M.a)(E))},E.onExpand=function(y){var p=E.props.context.onNodeExpand;p(y,Object(c.b)(E.props))},E.setSelectHandle=function(y){E.selectHandle=y},E.getNodeState=function(){var y=E.props.expanded;return E.isLeaf()?null:y?o:l},E.hasChildren=function(){var y=E.props.eventKey,p=E.props.context.keyEntities,h=p[y]||{},A=h.children;return!!(A||[]).length},E.isLeaf=function(){var y=E.props,p=y.isLeaf,h=y.loaded,A=E.props.context.loadData,_=E.hasChildren();return p===!1?!1:p||!A&&!_||A&&h&&!_},E.isDisabled=function(){var y=E.props.disabled,p=E.props.context.disabled;return!!(p||y)},E.isCheckable=function(){var y=E.props.checkable,p=E.props.context.checkable;return!p||y===!1?!1:p},E.syncLoadData=function(y){var p=y.expanded,h=y.loading,A=y.loaded,_=E.props.context,v=_.loadData,P=_.onNodeLoad;if(h)return;v&&p&&!E.isLeaf()&&(!E.hasChildren()&&!A&&P(Object(c.b)(E.props)))},E.renderSwitcher=function(){var y=E.props,p=y.expanded,h=y.switcherIcon,A=E.props.context,_=A.prefixCls,v=A.switcherIcon,P=h||v;if(E.isLeaf())return n.createElement("span",{className:b()("".concat(_,"-switcher"),"".concat(_,"-switcher-noop"))},typeof P=="function"?P(Object(N.a)(Object(N.a)({},E.props),{},{isLeaf:!0})):P);var x=b()("".concat(_,"-switcher"),"".concat(_,"-switcher_").concat(p?o:l));return n.createElement("span",{onClick:E.onExpand,className:x},typeof P=="function"?P(Object(N.a)(Object(N.a)({},E.props),{},{isLeaf:!1})):P)},E.renderCheckbox=function(){var y=E.props,p=y.checked,h=y.halfChecked,A=y.disableCheckbox,_=E.props.context.prefixCls,v=E.isDisabled(),P=E.isCheckable();if(!P)return null;var x=typeof P!="boolean"?P:null;return n.createElement("span",{className:b()("".concat(_,"-checkbox"),p&&"".concat(_,"-checkbox-checked"),!p&&h&&"".concat(_,"-checkbox-indeterminate"),(v||A)&&"".concat(_,"-checkbox-disabled")),onClick:E.onCheck},x)},E.renderIcon=function(){var y=E.props.loading,p=E.props.context.prefixCls;return n.createElement("span",{className:b()("".concat(p,"-iconEle"),"".concat(p,"-icon__").concat(E.getNodeState()||"docu"),y&&"".concat(p,"-icon_loading"))})},E.renderSelector=function(){var y=E.state.dragNodeHighlight,p=E.props,h=p.title,A=p.selected,_=p.icon,v=p.loading,P=p.data,x=E.props.context,C=x.prefixCls,j=x.showIcon,B=x.icon,w=x.draggable,Y=x.loadData,$=x.titleRender,oe=E.isDisabled(),de="".concat(C,"-node-content-wrapper"),Be;if(j){var Ae=_||B;Be=Ae?n.createElement("span",{className:b()("".concat(C,"-iconEle"),"".concat(C,"-icon__customize"))},typeof Ae=="function"?Ae(E.props):Ae):E.renderIcon()}else Y&&v&&(Be=E.renderIcon());var Re;typeof h=="function"?Re=h(P):$?Re=$(P):Re=h;var Le=n.createElement("span",{className:"".concat(C,"-title")},Re);return n.createElement("span",{ref:E.setSelectHandle,title:typeof h=="string"?h:"",className:b()("".concat(de),"".concat(de,"-").concat(E.getNodeState()||"normal"),!oe&&(A||y)&&"".concat(C,"-node-selected"),!oe&&w&&"draggable"),draggable:!oe&&w||void 0,"aria-grabbed":!oe&&w||void 0,onMouseEnter:E.onMouseEnter,onMouseLeave:E.onMouseLeave,onContextMenu:E.onContextMenu,onClick:E.onSelectorClick,onDoubleClick:E.onSelectorDoubleClick,onDragStart:w?E.onDragStart:void 0},Be,Le)},E}return Object(W.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var y=this.props.selectable,p=this.props.context.selectable;return typeof y=="boolean"?y:p}},{key:"render",value:function(){var y,p=this.props,h=p.eventKey,A=p.className,_=p.style,v=p.dragOver,P=p.dragOverGapTop,x=p.dragOverGapBottom,C=p.isLeaf,j=p.isStart,B=p.isEnd,w=p.expanded,Y=p.selected,$=p.checked,oe=p.halfChecked,de=p.loading,Be=p.domRef,Ae=p.active,Re=p.onMouseMove,Le=Object(z.a)(p,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Fe=this.props.context,me=Fe.prefixCls,fe=Fe.filterTreeNode,ne=Fe.draggable,xe=Fe.keyEntities,ce=this.isDisabled(),Ne=Object(f.f)(Le),He=xe[h]||{},ke=He.level,Ye=B[B.length-1];return n.createElement("div",Object.assign({ref:Be,className:b()(A,"".concat(me,"-treenode"),(y={},Object(Z.a)(y,"".concat(me,"-treenode-disabled"),ce),Object(Z.a)(y,"".concat(me,"-treenode-switcher-").concat(w?"open":"close"),!C),Object(Z.a)(y,"".concat(me,"-treenode-checkbox-checked"),$),Object(Z.a)(y,"".concat(me,"-treenode-checkbox-indeterminate"),oe),Object(Z.a)(y,"".concat(me,"-treenode-selected"),Y),Object(Z.a)(y,"".concat(me,"-treenode-loading"),de),Object(Z.a)(y,"".concat(me,"-treenode-active"),Ae),Object(Z.a)(y,"".concat(me,"-treenode-leaf-last"),Ye),Object(Z.a)(y,"drag-over",!ce&&v),Object(Z.a)(y,"drag-over-gap-top",!ce&&P),Object(Z.a)(y,"drag-over-gap-bottom",!ce&&x),Object(Z.a)(y,"filter-node",fe&&fe(Object(c.b)(this.props))),y)),style:_,onDragEnter:ne?this.onDragEnter:void 0,onDragOver:ne?this.onDragOver:void 0,onDragLeave:ne?this.onDragLeave:void 0,onDrop:ne?this.onDrop:void 0,onDragEnd:ne?this.onDragEnd:void 0,onMouseMove:Re},Ne),n.createElement(u,{prefixCls:me,level:ke,isStart:j,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(n.Component),R=function(I){return n.createElement(m.a.Consumer,null,function(O){return n.createElement(i,Object.assign({},I,{context:O}))})};R.displayName="TreeNode",R.defaultProps={title:a},R.isTreeNode=1;var S=se.a=R},Xsq0:function(Ve,se,U){Ve.exports=U.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Ve,se,U){"use strict";U.r(se),U.d(se,"ResizableTextArea",function(){return oe});var Z=U("wx14"),z=U("1OyB"),N=U("vuIU"),V=U("Ji7U"),W=U("LK+K"),M=U("q1tI"),K=U("VTBJ"),H=U("rePB"),n=U("Zm9Q"),D=U("Kwbf"),b=U("c+Xe"),m=U("m+aA"),f=U("bdgK"),d=new Map;function u(Ae){Ae.forEach(function(Re){var Le,Fe=Re.target;(Le=d.get(Fe))===null||Le===void 0||Le.forEach(function(me){return me(Fe)})})}var c=new f.default(u),o=null,l=null;function a(Ae,Re){d.has(Ae)||(d.set(Ae,new Set),c.observe(Ae)),d.get(Ae).add(Re)}function i(Ae,Re){d.has(Ae)&&(d.get(Ae).delete(Re),d.get(Ae).size||(c.unobserve(Ae),d.delete(Ae)))}var R=function(Ae){Object(V.a)(Le,Ae);var Re=Object(W.a)(Le);function Le(){return Object(z.a)(this,Le),Re.apply(this,arguments)}return Object(N.a)(Le,[{key:"render",value:function(){return this.props.children}}]),Le}(M.Component),S=M.createContext(null);function T(Ae){var Re=Ae.children,Le=Ae.onBatchResize,Fe=M.useRef(0),me=M.useRef([]),fe=M.useContext(S),ne=M.useCallback(function(xe,ce,Ne){Fe.current+=1;var He=Fe.current;me.current.push({size:xe,element:ce,data:Ne}),Promise.resolve().then(function(){He===Fe.current&&(Le==null||Le(me.current),me.current=[])}),fe==null||fe(xe,ce,Ne)},[Le,fe]);return M.createElement(S.Provider,{value:ne},Re)}function I(Ae){var Re=Ae.children,Le=Ae.disabled,Fe=M.useRef(null),me=M.useRef(null),fe=M.useContext(S),ne=M.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),xe=M.isValidElement(Re)&&Object(b.c)(Re),ce=xe?Re.ref:null,Ne=M.useMemo(function(){return Object(b.a)(ce,Fe)},[ce,Fe]),He=M.useRef(Ae);He.current=Ae;var ke=M.useCallback(function(Ye){var et=He.current,ue=et.onResize,_e=et.data,Oe=Ye.getBoundingClientRect(),Me=Oe.width,rt=Oe.height,dt=Ye.offsetWidth,pt=Ye.offsetHeight,ut=Math.floor(Me),_t=Math.floor(rt);if(ne.current.width!==ut||ne.current.height!==_t||ne.current.offsetWidth!==dt||ne.current.offsetHeight!==pt){var Tt={width:ut,height:_t,offsetWidth:dt,offsetHeight:pt};ne.current=Tt;var Pe=dt===Math.round(Me)?Me:dt,Ce=pt===Math.round(rt)?rt:pt,tt=Object(K.a)(Object(K.a)({},Tt),{},{offsetWidth:Pe,offsetHeight:Ce});fe==null||fe(tt,Ye,_e),ue&&Promise.resolve().then(function(){ue(tt,Ye)})}},[]);return M.useEffect(function(){var Ye=Object(m.a)(Fe.current)||Object(m.a)(me.current);return Ye&&!Le&&a(Ye,ke),function(){return i(Ye,ke)}},[Fe.current,Le]),M.createElement(R,{ref:me},xe?M.cloneElement(Re,{ref:Ne}):Re)}var O="rc-observer-key";function E(Ae){var Re=Ae.children,Le=Object(n.a)(Re);return Le.map(function(Fe,me){var fe=(Fe==null?void 0:Fe.key)||"".concat(O,"-").concat(me);return M.createElement(I,Object(Z.a)({},Ae,{key:fe}),Fe)})}E.Collection=T;var y=E,p=U("bT9E"),h=U("TSYQ"),A=U.n(h),_=`
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
`,v=["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"],P={},x;function C(Ae){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(Re&&P[Le])return P[Le];var Fe=window.getComputedStyle(Ae),me=Fe.getPropertyValue("box-sizing")||Fe.getPropertyValue("-moz-box-sizing")||Fe.getPropertyValue("-webkit-box-sizing"),fe=parseFloat(Fe.getPropertyValue("padding-bottom"))+parseFloat(Fe.getPropertyValue("padding-top")),ne=parseFloat(Fe.getPropertyValue("border-bottom-width"))+parseFloat(Fe.getPropertyValue("border-top-width")),xe=v.map(function(Ne){return"".concat(Ne,":").concat(Fe.getPropertyValue(Ne))}).join(";"),ce={sizingStyle:xe,paddingSize:fe,borderSize:ne,boxSizing:me};return Re&&Le&&(P[Le]=ce),ce}function j(Ae){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;x||(x=document.createElement("textarea"),x.setAttribute("tab-index","-1"),x.setAttribute("aria-hidden","true"),document.body.appendChild(x)),Ae.getAttribute("wrap")?x.setAttribute("wrap",Ae.getAttribute("wrap")):x.removeAttribute("wrap");var me=C(Ae,Re),fe=me.paddingSize,ne=me.borderSize,xe=me.boxSizing,ce=me.sizingStyle;x.setAttribute("style","".concat(ce,";").concat(_)),x.value=Ae.value||Ae.placeholder||"";var Ne=Number.MIN_SAFE_INTEGER,He=Number.MAX_SAFE_INTEGER,ke=x.scrollHeight,Ye;if(xe==="border-box"?ke+=ne:xe==="content-box"&&(ke-=fe),Le!==null||Fe!==null){x.value=" ";var et=x.scrollHeight-fe;Le!==null&&(Ne=et*Le,xe==="border-box"&&(Ne=Ne+fe+ne),ke=Math.max(Ne,ke)),Fe!==null&&(He=et*Fe,xe==="border-box"&&(He=He+fe+ne),Ye=ke>He?"":"hidden",ke=Math.min(He,ke))}return{height:ke,minHeight:Ne,maxHeight:He,overflowY:Ye,resize:"none"}}var B=U("Gytx"),w=U.n(B),Y;(function(Ae){Ae[Ae.NONE=0]="NONE",Ae[Ae.RESIZING=1]="RESIZING",Ae[Ae.RESIZED=2]="RESIZED"})(Y||(Y={}));var $=function(Ae){Object(V.a)(Le,Ae);var Re=Object(W.a)(Le);function Le(Fe){var me;return Object(z.a)(this,Le),me=Re.call(this,Fe),me.nextFrameActionId=void 0,me.resizeFrameId=void 0,me.textArea=void 0,me.saveTextArea=function(fe){me.textArea=fe},me.handleResize=function(fe){var ne=me.state.resizeStatus,xe=me.props,ce=xe.autoSize,Ne=xe.onResize;if(ne!==Y.NONE)return;typeof Ne=="function"&&Ne(fe),ce&&me.resizeOnNextFrame()},me.resizeOnNextFrame=function(){cancelAnimationFrame(me.nextFrameActionId),me.nextFrameActionId=requestAnimationFrame(me.resizeTextarea)},me.resizeTextarea=function(){var fe=me.props.autoSize;if(!fe||!me.textArea)return;var ne=fe.minRows,xe=fe.maxRows,ce=j(me.textArea,!1,ne,xe);me.setState({textareaStyles:ce,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(me.resizeFrameId),me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Y.RESIZED},function(){me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Y.NONE}),me.fixFirefoxAutoScroll()})})})})},me.renderTextArea=function(){var fe=me.props,ne=fe.prefixCls,xe=ne===void 0?"rc-textarea":ne,ce=fe.autoSize,Ne=fe.onResize,He=fe.className,ke=fe.disabled,Ye=me.state,et=Ye.textareaStyles,ue=Ye.resizeStatus,_e=Object(p.a)(me.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Oe=A()(xe,He,Object(H.a)({},"".concat(xe,"-disabled"),ke));"value"in _e&&(_e.value=_e.value||"");var Me=Object(K.a)(Object(K.a)(Object(K.a)({},me.props.style),et),ue===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return M.createElement(y,{onResize:me.handleResize,disabled:!(ce||Ne)},M.createElement("textarea",Object(Z.a)({},_e,{className:Oe,style:Me,ref:me.saveTextArea})))},me.state={textareaStyles:{},resizeStatus:Y.NONE},me}return Object(N.a)(Le,[{key:"componentDidUpdate",value:function(me){(me.value!==this.props.value||!w()(me.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 me=this.textArea.selectionStart,fe=this.textArea.selectionEnd;this.textArea.setSelectionRange(me,fe)}}catch(ne){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Le}(M.Component),oe=$,de=function(Ae){Object(V.a)(Le,Ae);var Re=Object(W.a)(Le);function Le(Fe){var me;Object(z.a)(this,Le),me=Re.call(this,Fe),me.resizableTextArea=void 0,me.focus=function(){me.resizableTextArea.textArea.focus()},me.saveTextArea=function(ne){me.resizableTextArea=ne},me.handleChange=function(ne){var xe=me.props.onChange;me.setValue(ne.target.value,function(){me.resizableTextArea.resizeTextarea()}),xe&&xe(ne)},me.handleKeyDown=function(ne){var xe=me.props,ce=xe.onPressEnter,Ne=xe.onKeyDown;ne.keyCode===13&&ce&&ce(ne),Ne&&Ne(ne)};var fe=typeof Fe.value=="undefined"||Fe.value===null?Fe.defaultValue:Fe.value;return me.state={value:fe},me}return Object(N.a)(Le,[{key:"setValue",value:function(me,fe){"value"in this.props||this.setState({value:me},fe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return M.createElement(oe,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(me){return"value"in me?{value:me.value}:null}}]),Le}(M.Component),Be=se.default=de},ZW9T:function(Ve,se,U){"use strict";U.d(se,"a",function(){return B});var Z=U("k1fw"),z=U("oBTY"),N=U("miYZ"),V=U("tsqr"),W=U("rAM+"),M=U("tJVT"),K=U("PpiC"),H=U("q1tI"),n=U.n(H),D=U("bdgK"),b=U("9og8"),m=U("WmNS"),f=U.n(m),d={keywords:["print","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"]},u={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},c={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},o={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},l=U("5VLF"),a=U.n(l),i={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},R=function(Y,$){return $.map(function(oe){return{label:oe,kind:Y.languages.CompletionItemKind.Keyword,insertText:oe}})},S=function(Y){return Object.keys(i.tables).map(function($){return{label:$,kind:Y.languages.CompletionItemKind.Variable,insertText:$}})},T=function(Y,$){var oe=i.tables[Y];return oe?oe.map(function(de){return{label:de,kind:$.languages.CompletionItemKind.Field,insertText:de}}):[]};function I(w,Y,$,oe,de){var Be=Y.getWordUntilPosition($),Ae={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Re=oe.map(function(Le){return{label:Le,kind:w.languages.CompletionItemKind.Keyword,insertText:Le,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}});return de.map(function(Le){Re.push(Object(Z.a)(Object(Z.a)({},Le),{},{range:Ae}))}),Re}var O=function(w){i.languages.map(function(de){return w.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Ae,Re,Le){return Object(b.a)(f.a.mark(function Fe(){var me;return f.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return me=a()(Ae.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),ne.abrupt("return",[{range:Ae.getFullModelRange(),text:me}]);case 2:case"end":return ne.stop()}},Fe)}))()}}),de});var Y=c.quickKey.map(function(de){return{label:de.label,kind:w.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=o.quickKey.map(function(de){return{label:de.label,kind:w.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=u.quickKey.map(function(de){return{label:de.label,kind:w.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet}});w.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Be,Ae){var Re=Be.getWordUntilPosition(Ae),Le={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:Re.startColumn,endColumn:Re.endColumn},Fe=Be.getLineContent(Ae.lineNumber).substring(Re.startColumn-2,Re.endColumn);return{suggestions:[].concat(Object(z.a)(c.keywords.map(function(me){return{label:me,kind:w.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})),Object(z.a)(c.quickKey.map(function(me){return{label:me.label,kind:w.languages.CompletionItemKind.Function,documentation:me.content,insertText:Fe.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})))}}}),w.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Be,Ae){var Re=Be.getWordUntilPosition(Ae),Le={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:Re.startColumn,endColumn:Re.endColumn};return{suggestions:Object(z.a)(d.keywords.map(function(Fe){return{label:Fe,kind:w.languages.CompletionItemKind.Function,documentation:Fe,insertText:Fe,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}}))}}}),w.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Be,Ae){var Re=Be.getWordUntilPosition(Ae),Le={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:Re.startColumn,endColumn:Re.endColumn},Fe=Be.getLineContent(Ae.lineNumber).substring(Re.startColumn-2,Re.endColumn);return{suggestions:[].concat(Object(z.a)(u.keywords.map(function(me){return{label:me,kind:w.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})),Object(z.a)(u.quickKey.map(function(me){return{label:me.label,kind:w.languages.CompletionItemKind.Function,documentation:me.content,insertText:Fe.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})))}}}),w.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Be,Ae){var Re=Be.getWordUntilPosition(Ae),Le={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:Re.startColumn,endColumn:Re.endColumn},Fe=Be.getLineContent(Ae.lineNumber).substring(Re.startColumn-2,Re.endColumn);return{suggestions:[].concat(Object(z.a)(o.keywords.map(function(me){return{label:me,kind:w.languages.CompletionItemKind.Function,documentation:me,insertText:me,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})),Object(z.a)(o.quickKey.map(function(me){return{label:me.label,kind:w.languages.CompletionItemKind.Function,documentation:me.content,insertText:Fe.startsWith("#")?me.content.replace(/#/,""):me.content,insertTextRules:w.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}})))}}})},E="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",y=U("fjLI"),p=U("LvDl"),h=U("+ua5");function A(w){return/^\d+$/.test(w)?"".concat(w,"px"):w}function _(){}var v=!1,P={"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 x(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=w;if(Array.isArray(w)){for(var $=0;$<w.length;$++){var oe=P[w[$]];if(oe)return oe}return Y[0]}return P[Y]||Y}var C=null,j=se.b=function(w){var Y=w.width,$=Y===void 0?"100%":Y,oe=w.height,de=oe===void 0?"100%":oe,Be=w.value,Ae=w.language,Re=Ae===void 0?"javascript":Ae,Le=w.style,Fe=Le===void 0?{}:Le,me=w.options,fe=me===void 0?{}:me,ne=w.overrideServices,xe=ne===void 0?{}:ne,ce=w.theme,Ne=ce===void 0?"vs-dark":ce,He=w.onEditBlur,ke=w.onSave,Ye=w.autoHeight,et=Ye===void 0?!1:Ye,ue=w.forbidCopy,_e=ue===void 0?!1:ue,Oe=w.onChange,Me=Oe===void 0?_:Oe,rt=w.editorDidMount,dt=rt===void 0?_:rt,pt=w.onFocus,ut=pt===void 0?_:pt,_t=w.filename,Tt=_t===void 0?"educoder.txt":_t,Pe=w.errorLine,Ce=w.errorContent,tt=Ce===void 0?"":Ce,lt=Object(K.a)(w,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ke=Object(H.useRef)(),Xe=Object(H.useRef)({}),Se=Object(H.useRef)(),ge=Object(H.useRef)(),Ee=Object(H.useRef)(!1),ie=Object(H.useRef)(),ae=Object(H.useState)(!1),he=Object(M.a)(ae,2),ve=he[0],Te=he[1];function Ge(){var st;return Ke.current&&(st=new D.default(function(ct){var bt=Object(W.a)(ct),jt;try{for(bt.s();!(jt=bt.n()).done;){var en=jt.value;(en.target.offsetHeight>0||en.target.offsetWidth>0)&&Xe.current.instance.layout()}}catch(Yt){bt.e(Yt)}finally{bt.f()}}),st.observe(Ke.current)),st}function ot(){V.b.warn(decodeURIComponent(E))}var xt=function(){var ct=Xe.current.instance;if(Be!=null&&ct&&ve){var bt=ct.getModel();bt&&Be!==bt.getValue()&&(v=!0,bt.setValue(Be),ct.layout(),v=!1)}};Object(H.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){xt()},500)},[Be,ve,Xe.current]),Object(H.useEffect)(function(){if(Pe&&Xe.current&&Xe.current.instance){var st=Xe.current.instance;st.changeViewZones(function(bt){var jt=document.createElement("div");jt.style.padding="10px 20px",jt.style.width="calc(100% - 20px)",jt.className="my-error-line-wrp",jt.innerHTML=tt,bt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:jt})});var ct={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};st.addOverlayWidget(ct),st.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,Xe.current,ve]);function Ot(){var st=Xe.current.instance;if(st){var ct=st.getSelection(),bt=Xe.current.pastePos||{},jt=new C.Range(bt.startLineNumber||ct.endLineNumber,bt.startColumn||ct.endColumn,bt.endLineNumber||ct.endLineNumber,bt.endColumn||ct.endColumn);setTimeout(function(){st.executeEdits("",[{range:jt,text:""}])},300)}}function wt(st){(window.navigator.platform.match("Mac")?st.metaKey:st.ctrlKey)&&st.keyCode==83&&(st.preventDefault(),ke())}var vt=function(){if(et&&Xe.current.instance){var ct=Xe.current.instance.getContentHeight();We(ct<de?de:ct)}else We(de)};function qe(st){var ct=document.createEvent("MouseEvents");ct.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),st.dispatchEvent(ct)}function Qe(st,ct){var bt=window.URL||window.webkitURL||window,jt=new Blob([ct]),en=document.createElementNS("http://www.w3.org/1999/xhtml","a");en.href=bt.createObjectURL(jt),en.download=st,qe(en)}Object(H.useEffect)(function(){vt()},[vt]),Object(H.useEffect)(function(){Ke.current&&!ve&&Promise.all([U.e(15),U.e(27)]).then(U.t.bind(null,"M/lh",7)).then(function(st){try{C=st,Xe.current.instance=C.editor.create(Ke.current,{value:Be,language:x(Re),theme:Ne,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},xe);var ct=Xe.current.instance,bt=y.d._menuItems,jt=Object(z.a)(bt).find(function(Rt){return Rt[0]._debugName=="EditorContext"}),en=jt[1],Yt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ct=function(zt,Pt){var qt=zt._first;do{var yn,wn,yt=Pt.includes((yn=qt.element)===null||yn===void 0||((wn=yn.command)===null||wn===void 0)?void 0:wn.id);yt&&zt._remove(qt)}while(qt=qt.next)};if(dt(ct,C),setTimeout(function(){vt(),Xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Qe(Tt||"educoder.txt",ct.getValue())}}),ct.getDomNode().addEventListener("input",function(){Se.current.autoFormat&&ct.getAction("editor.action.formatDocument").run()})},500),Xe.current.subscription=ct.onDidChangeModelContent(function(Rt){Ee.current?clearTimeout(ie.current):(vt(),Me(ct.getValue(),Rt)),ie.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||O(C,x(Re)),_e&&(Ct(en,Yt),Ke.current.classList.add("noCopyPaste"),ct.onKeyDown(function(Rt){var zt=Rt.keyCode,Pt=Rt.ctrlKey,qt=Rt.metaKey;(zt===33||zt===52)&&(qt||Pt)&&(ot(),Rt.preventDefault())})),window.Monaco=C,He&&ct.onDidBlurEditorWidget(function(){He(ct.getValue())}),ut&&ct.onDidFocusEditorText(function(){ut(ct.getValue())}),_e){ct.addCommand(C.KeyMod.CtrlCmd|C.KeyCode.KEY_V,function(){return ot(),null}),ct.onDidPaste(function(Rt){Xe.current.pastePos=Rt});try{window.addEventListener("paste",Ot)}catch(Rt){}}var pn=Ge();return Te(!0),function(){var Rt=Xe.current.instance;Rt.dispose();var zt=Rt.getModel();zt&&zt.dispose(),Xe.current.subscription&&Xe.current.subscription.dispose(),_e&&window.removeEventListener("paste",Ot),pn.unobserve(Ke.current)}}catch(Rt){}})},[]),Object(H.useEffect)(function(){var st=Xe.current.instance;if(st&&ve)return document.addEventListener("keydown",wt,!1),function(){document.removeEventListener("keydown",wt)}},[ke,ve]),Object(H.useEffect)(function(){var st=Xe.current.instance;if(st&&ve){var ct=x(Re);C.editor.setModelLanguage(st.getModel(),ct),console.log("language:",Re,st.getModel(),ct)}},[Re,ve]),Object(H.useEffect)(function(){var st=Xe.current.instance;st&&ve&&C.editor.setTheme(Ne)},[Ne,ve]),Object(H.useEffect)(function(){var st=Xe.current.instance;Se.current=fe,st&&ve&&(st.updateOptions(Object(Z.a)({},fe)),setTimeout(function(){st.getModel().updateOptions(Object(Z.a)({},fe))},200))},[JSON.stringify(fe),ve]),Object(H.useEffect)(function(){var st=Xe.current.instance;st&&ve&&st.layout()},[$,de,ve]);var Ue=Object(H.useState)(A($)),le=Object(M.a)(Ue,2),pe=le[0],$e=le[1],je=Object(H.useState)(A(de)),Je=Object(M.a)(je,2),mt=Je[0],We=Je[1],it=Object(Z.a)(Object(Z.a)({},Fe),{},{width:pe,height:mt});return n.a.createElement("div",{className:"my-monaco-editor",ref:Ke,style:it})};function B(w){var Y=w.width,$=Y===void 0?"100%":Y,oe=w.height,de=oe===void 0?"100%":oe,Be=w.original,Ae=w.modified,Re=w.language,Le=w.options,Fe=Le===void 0?{}:Le,me=Object(H.useRef)(),fe=Object(H.useState)(null),ne=Object(M.a)(fe,2),xe=ne[0],ce=ne[1];function Ne(et){var ue;return me.current&&(ue=new D.default(function(_e){var Oe=Object(W.a)(_e),Me;try{for(Oe.s();!(Me=Oe.n()).done;){var rt=Me.value;(rt.target.offsetHeight>0||rt.target.offsetWidth>0)&&et.layout()}}catch(dt){Oe.e(dt)}finally{Oe.f()}}),ue.observe(me.current)),ue}Object(H.useEffect)(function(){me.current&&Promise.all([U.e(15),U.e(27)]).then(U.t.bind(null,"M/lh",7)).then(function(et){C=et;var ue=C.editor.createDiffEditor(me.current,Object(Z.a)(Object(Z.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},Fe),{},{wordWrap:!0}));ce(ue);var _e=Ne(ue);return function(){ue.dispose();var Oe=ue.getModel();Oe&&Oe.dispose(),_e.unobserve(me.current)}})},[]),Object(H.useEffect)(function(){xe&&xe.setModel({original:C.editor.createModel(Be,Re),modified:C.editor.createModel(Ae,Re)})},[Be,Ae,Re,xe]);var He=A($),ke=A(de),Ye={width:He,height:ke};return n.a.createElement("div",{className:"my-diff-editor",ref:me,style:Ye})}},ZpRC:function(Ve,se,U){"use strict";function Z(b){return typeof b=="object"&&b!=null&&b.nodeType===1}function z(b,m){return(!m||b!=="hidden")&&b!=="visible"&&b!=="clip"}function N(b,m){if(b.clientHeight<b.scrollHeight||b.clientWidth<b.scrollWidth){var f=getComputedStyle(b,null);return z(f.overflowY,m)||z(f.overflowX,m)||function(d){var u=function(c){if(!c.ownerDocument||!c.ownerDocument.defaultView)return null;try{return c.ownerDocument.defaultView.frameElement}catch(o){return null}}(d);return!!u&&(u.clientHeight<d.scrollHeight||u.clientWidth<d.scrollWidth)}(b)}return!1}function V(b,m,f,d,u,c,o,l){return c<b&&o>m||c>b&&o<m?0:c<=b&&l<=f||o>=m&&l>=f?c-b-d:o>m&&l<f||c<b&&l>f?o-m+u:0}var W=function(b,m){var f=window,d=m.scrollMode,u=m.block,c=m.inline,o=m.boundary,l=m.skipOverflowHiddenElements,a=typeof o=="function"?o:function(et){return et!==o};if(!Z(b))throw new TypeError("Invalid target");for(var i=document.scrollingElement||document.documentElement,R=[],S=b;Z(S)&&a(S);){if((S=S.parentElement)===i){R.push(S);break}S!=null&&S===document.body&&N(S)&&!N(document.documentElement)||S!=null&&N(S,l)&&R.push(S)}for(var T=f.visualViewport?f.visualViewport.width:innerWidth,I=f.visualViewport?f.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,y=b.getBoundingClientRect(),p=y.height,h=y.width,A=y.top,_=y.right,v=y.bottom,P=y.left,x=u==="start"||u==="nearest"?A:u==="end"?v:A+p/2,C=c==="center"?P+h/2:c==="end"?_:P,j=[],B=0;B<R.length;B++){var w=R[B],Y=w.getBoundingClientRect(),$=Y.height,oe=Y.width,de=Y.top,Be=Y.right,Ae=Y.bottom,Re=Y.left;if(d==="if-needed"&&A>=0&&P>=0&&v<=I&&_<=T&&A>=de&&v<=Ae&&P>=Re&&_<=Be)return j;var Le=getComputedStyle(w),Fe=parseInt(Le.borderLeftWidth,10),me=parseInt(Le.borderTopWidth,10),fe=parseInt(Le.borderRightWidth,10),ne=parseInt(Le.borderBottomWidth,10),xe=0,ce=0,Ne="offsetWidth"in w?w.offsetWidth-w.clientWidth-Fe-fe:0,He="offsetHeight"in w?w.offsetHeight-w.clientHeight-me-ne:0;if(i===w)xe=u==="start"?x:u==="end"?x-I:u==="nearest"?V(E,E+I,I,me,ne,E+x,E+x+p,p):x-I/2,ce=c==="start"?C:c==="center"?C-T/2:c==="end"?C-T:V(O,O+T,T,Fe,fe,O+C,O+C+h,h),xe=Math.max(0,xe+E),ce=Math.max(0,ce+O);else{xe=u==="start"?x-de-me:u==="end"?x-Ae+ne+He:u==="nearest"?V(de,Ae,$,me,ne+He,x,x+p,p):x-(de+$/2)+He/2,ce=c==="start"?C-Re-Fe:c==="center"?C-(Re+oe/2)+Ne/2:c==="end"?C-Be+fe+Ne:V(Re,Be,oe,Fe,fe+Ne,C,C+h,h);var ke=w.scrollLeft,Ye=w.scrollTop;x+=Ye-(xe=Math.max(0,Math.min(Ye+xe,w.scrollHeight-$+He))),C+=ke-(ce=Math.max(0,Math.min(ke+ce,w.scrollWidth-oe+Ne)))}j.push({el:w,top:xe,left:ce})}return j};function M(b){return b===Object(b)&&Object.keys(b).length!==0}function K(b,m){m===void 0&&(m="auto");var f="scrollBehavior"in document.body.style;b.forEach(function(d){var u=d.el,c=d.top,o=d.left;u.scroll&&f?u.scroll({top:c,left:o,behavior:m}):(u.scrollTop=c,u.scrollLeft=o)})}function H(b){return b===!1?{block:"end",inline:"nearest"}:M(b)?b:{block:"start",inline:"nearest"}}function n(b,m){var f=!b.ownerDocument.documentElement.contains(b);if(M(m)&&typeof m.behavior=="function")return m.behavior(f?[]:W(b,m));if(f)return;var d=H(m);return K(W(b,d),d.behavior)}var D=se.a=n},Zss7:function(Ve,se,U){var Z;(function(z){var N=/^\s+/,V=/\s+$/,W=0,M=z.round,K=z.min,H=z.max,n=z.random;function D(ne,xe){if(ne=ne||"",xe=xe||{},ne instanceof D)return ne;if(!(this instanceof D))return new D(ne,xe);var ce=b(ne);this._originalInput=ne,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=M(100*this._a)/100,this._format=xe.format||ce.format,this._gradientType=xe.gradientType,this._r<1&&(this._r=M(this._r)),this._g<1&&(this._g=M(this._g)),this._b<1&&(this._b=M(this._b)),this._ok=ce.ok,this._tc_id=W++}D.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),xe,ce,Ne,He,ke,Ye;return xe=ne.r/255,ce=ne.g/255,Ne=ne.b/255,xe<=.03928?He=xe/12.92:He=z.pow((xe+.055)/1.055,2.4),ce<=.03928?ke=ce/12.92:ke=z.pow((ce+.055)/1.055,2.4),Ne<=.03928?Ye=Ne/12.92:Ye=z.pow((Ne+.055)/1.055,2.4),.2126*He+.7152*ke+.0722*Ye},setAlpha:function(ne){return this._a=j(ne),this._roundA=M(100*this._a)/100,this},toHsv:function(){var ne=u(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=u(this._r,this._g,this._b),xe=M(ne.h*360),ce=M(ne.s*100),Ne=M(ne.v*100);return this._a==1?"hsv("+xe+", "+ce+"%, "+Ne+"%)":"hsva("+xe+", "+ce+"%, "+Ne+"%, "+this._roundA+")"},toHsl:function(){var ne=f(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=f(this._r,this._g,this._b),xe=M(ne.h*360),ce=M(ne.s*100),Ne=M(ne.l*100);return this._a==1?"hsl("+xe+", "+ce+"%, "+Ne+"%)":"hsla("+xe+", "+ce+"%, "+Ne+"%, "+this._roundA+")"},toHex:function(ne){return o(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return l(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:M(this._r),g:M(this._g),b:M(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+M(this._r)+", "+M(this._g)+", "+M(this._b)+")":"rgba("+M(this._r)+", "+M(this._g)+", "+M(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:M(B(this._r,255)*100)+"%",g:M(B(this._g,255)*100)+"%",b:M(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+M(B(this._r,255)*100)+"%, "+M(B(this._g,255)*100)+"%, "+M(B(this._b,255)*100)+"%)":"rgba("+M(B(this._r,255)*100)+"%, "+M(B(this._g,255)*100)+"%, "+M(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:x[o(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var xe="#"+a(this._r,this._g,this._b,this._a),ce=xe,Ne=this._gradientType?"GradientType = 1, ":"";if(ne){var He=D(ne);ce="#"+a(He._r,He._g,He._b,He._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ne+"startColorstr="+xe+",endColorstr="+ce+")"},toString:function(ne){var xe=!!ne;ne=ne||this._format;var ce=!1,Ne=this._a<1&&this._a>=0,He=!xe&&Ne&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return He?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(ce=this.toRgbString()),ne==="prgb"&&(ce=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(ce=this.toHexString()),ne==="hex3"&&(ce=this.toHexString(!0)),ne==="hex4"&&(ce=this.toHex8String(!0)),ne==="hex8"&&(ce=this.toHex8String()),ne==="name"&&(ce=this.toName()),ne==="hsl"&&(ce=this.toHslString()),ne==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return D(this.toString())},_applyModification:function(ne,xe){var ce=ne.apply(null,[this].concat([].slice.call(xe)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(I,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(R,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(ne,xe){return ne.apply(null,[this].concat([].slice.call(xe)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(p,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},D.fromRatio=function(ne,xe){if(typeof ne=="object"){var ce={};for(var Ne in ne)ne.hasOwnProperty(Ne)&&(Ne==="a"?ce[Ne]=ne[Ne]:ce[Ne]=Be(ne[Ne]));ne=ce}return D(ne,xe)};function b(ne){var xe={r:0,g:0,b:0},ce=1,Ne=null,He=null,ke=null,Ye=!1,et=!1;return typeof ne=="string"&&(ne=me(ne)),typeof ne=="object"&&(Fe(ne.r)&&Fe(ne.g)&&Fe(ne.b)?(xe=m(ne.r,ne.g,ne.b),Ye=!0,et=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):Fe(ne.h)&&Fe(ne.s)&&Fe(ne.v)?(Ne=Be(ne.s),He=Be(ne.v),xe=c(ne.h,Ne,He),Ye=!0,et="hsv"):Fe(ne.h)&&Fe(ne.s)&&Fe(ne.l)&&(Ne=Be(ne.s),ke=Be(ne.l),xe=d(ne.h,Ne,ke),Ye=!0,et="hsl"),ne.hasOwnProperty("a")&&(ce=ne.a)),ce=j(ce),{ok:Ye,format:ne.format||et,r:K(255,H(xe.r,0)),g:K(255,H(xe.g,0)),b:K(255,H(xe.b,0)),a:ce}}function m(ne,xe,ce){return{r:B(ne,255)*255,g:B(xe,255)*255,b:B(ce,255)*255}}function f(ne,xe,ce){ne=B(ne,255),xe=B(xe,255),ce=B(ce,255);var Ne=H(ne,xe,ce),He=K(ne,xe,ce),ke,Ye,et=(Ne+He)/2;if(Ne==He)ke=Ye=0;else{var ue=Ne-He;Ye=et>.5?ue/(2-Ne-He):ue/(Ne+He);switch(Ne){case ne:ke=(xe-ce)/ue+(xe<ce?6:0);break;case xe:ke=(ce-ne)/ue+2;break;case ce:ke=(ne-xe)/ue+4;break}ke/=6}return{h:ke,s:Ye,l:et}}function d(ne,xe,ce){var Ne,He,ke;ne=B(ne,360),xe=B(xe,100),ce=B(ce,100);function Ye(_e,Oe,Me){return Me<0&&(Me+=1),Me>1&&(Me-=1),Me<1/6?_e+(Oe-_e)*6*Me:Me<1/2?Oe:Me<2/3?_e+(Oe-_e)*(2/3-Me)*6:_e}if(xe===0)Ne=He=ke=ce;else{var et=ce<.5?ce*(1+xe):ce+xe-ce*xe,ue=2*ce-et;Ne=Ye(ue,et,ne+1/3),He=Ye(ue,et,ne),ke=Ye(ue,et,ne-1/3)}return{r:Ne*255,g:He*255,b:ke*255}}function u(ne,xe,ce){ne=B(ne,255),xe=B(xe,255),ce=B(ce,255);var Ne=H(ne,xe,ce),He=K(ne,xe,ce),ke,Ye,et=Ne,ue=Ne-He;if(Ye=Ne===0?0:ue/Ne,Ne==He)ke=0;else{switch(Ne){case ne:ke=(xe-ce)/ue+(xe<ce?6:0);break;case xe:ke=(ce-ne)/ue+2;break;case ce:ke=(ne-xe)/ue+4;break}ke/=6}return{h:ke,s:Ye,v:et}}function c(ne,xe,ce){ne=B(ne,360)*6,xe=B(xe,100),ce=B(ce,100);var Ne=z.floor(ne),He=ne-Ne,ke=ce*(1-xe),Ye=ce*(1-He*xe),et=ce*(1-(1-He)*xe),ue=Ne%6,_e=[ce,Ye,ke,ke,et,ce][ue],Oe=[et,ce,ce,Ye,ke,ke][ue],Me=[ke,ke,et,ce,ce,Ye][ue];return{r:_e*255,g:Oe*255,b:Me*255}}function o(ne,xe,ce,Ne){var He=[de(M(ne).toString(16)),de(M(xe).toString(16)),de(M(ce).toString(16))];return Ne&&He[0].charAt(0)==He[0].charAt(1)&&He[1].charAt(0)==He[1].charAt(1)&&He[2].charAt(0)==He[2].charAt(1)?He[0].charAt(0)+He[1].charAt(0)+He[2].charAt(0):He.join("")}function l(ne,xe,ce,Ne,He){var ke=[de(M(ne).toString(16)),de(M(xe).toString(16)),de(M(ce).toString(16)),de(Ae(Ne))];return He&&ke[0].charAt(0)==ke[0].charAt(1)&&ke[1].charAt(0)==ke[1].charAt(1)&&ke[2].charAt(0)==ke[2].charAt(1)&&ke[3].charAt(0)==ke[3].charAt(1)?ke[0].charAt(0)+ke[1].charAt(0)+ke[2].charAt(0)+ke[3].charAt(0):ke.join("")}function a(ne,xe,ce,Ne){var He=[de(Ae(Ne)),de(M(ne).toString(16)),de(M(xe).toString(16)),de(M(ce).toString(16))];return He.join("")}D.equals=function(ne,xe){return!ne||!xe?!1:D(ne).toRgbString()==D(xe).toRgbString()},D.random=function(){return D.fromRatio({r:n(),g:n(),b:n()})};function i(ne,xe){xe=xe===0?0:xe||10;var ce=D(ne).toHsl();return ce.s-=xe/100,ce.s=w(ce.s),D(ce)}function R(ne,xe){xe=xe===0?0:xe||10;var ce=D(ne).toHsl();return ce.s+=xe/100,ce.s=w(ce.s),D(ce)}function S(ne){return D(ne).desaturate(100)}function T(ne,xe){xe=xe===0?0:xe||10;var ce=D(ne).toHsl();return ce.l+=xe/100,ce.l=w(ce.l),D(ce)}function I(ne,xe){xe=xe===0?0:xe||10;var ce=D(ne).toRgb();return ce.r=H(0,K(255,ce.r-M(255*-(xe/100)))),ce.g=H(0,K(255,ce.g-M(255*-(xe/100)))),ce.b=H(0,K(255,ce.b-M(255*-(xe/100)))),D(ce)}function O(ne,xe){xe=xe===0?0:xe||10;var ce=D(ne).toHsl();return ce.l-=xe/100,ce.l=w(ce.l),D(ce)}function E(ne,xe){var ce=D(ne).toHsl(),Ne=(ce.h+xe)%360;return ce.h=Ne<0?360+Ne:Ne,D(ce)}function y(ne){var xe=D(ne).toHsl();return xe.h=(xe.h+180)%360,D(xe)}function p(ne){var xe=D(ne).toHsl(),ce=xe.h;return[D(ne),D({h:(ce+120)%360,s:xe.s,l:xe.l}),D({h:(ce+240)%360,s:xe.s,l:xe.l})]}function h(ne){var xe=D(ne).toHsl(),ce=xe.h;return[D(ne),D({h:(ce+90)%360,s:xe.s,l:xe.l}),D({h:(ce+180)%360,s:xe.s,l:xe.l}),D({h:(ce+270)%360,s:xe.s,l:xe.l})]}function A(ne){var xe=D(ne).toHsl(),ce=xe.h;return[D(ne),D({h:(ce+72)%360,s:xe.s,l:xe.l}),D({h:(ce+216)%360,s:xe.s,l:xe.l})]}function _(ne,xe,ce){xe=xe||6,ce=ce||30;var Ne=D(ne).toHsl(),He=360/ce,ke=[D(ne)];for(Ne.h=(Ne.h-(He*xe>>1)+720)%360;--xe;)Ne.h=(Ne.h+He)%360,ke.push(D(Ne));return ke}function v(ne,xe){xe=xe||6;for(var ce=D(ne).toHsv(),Ne=ce.h,He=ce.s,ke=ce.v,Ye=[],et=1/xe;xe--;)Ye.push(D({h:Ne,s:He,v:ke})),ke=(ke+et)%1;return Ye}D.mix=function(ne,xe,ce){ce=ce===0?0:ce||50;var Ne=D(ne).toRgb(),He=D(xe).toRgb(),ke=ce/100,Ye={r:(He.r-Ne.r)*ke+Ne.r,g:(He.g-Ne.g)*ke+Ne.g,b:(He.b-Ne.b)*ke+Ne.b,a:(He.a-Ne.a)*ke+Ne.a};return D(Ye)},D.readability=function(ne,xe){var ce=D(ne),Ne=D(xe);return(z.max(ce.getLuminance(),Ne.getLuminance())+.05)/(z.min(ce.getLuminance(),Ne.getLuminance())+.05)},D.isReadable=function(ne,xe,ce){var Ne=D.readability(ne,xe),He,ke;ke=!1,He=fe(ce);switch(He.level+He.size){case"AAsmall":case"AAAlarge":ke=Ne>=4.5;break;case"AAlarge":ke=Ne>=3;break;case"AAAsmall":ke=Ne>=7;break}return ke},D.mostReadable=function(ne,xe,ce){var Ne=null,He=0,ke,Ye,et,ue;ce=ce||{},Ye=ce.includeFallbackColors,et=ce.level,ue=ce.size;for(var _e=0;_e<xe.length;_e++)ke=D.readability(ne,xe[_e]),ke>He&&(He=ke,Ne=D(xe[_e]));return D.isReadable(ne,Ne,{level:et,size:ue})||!Ye?Ne:(ce.includeFallbackColors=!1,D.mostReadable(ne,["#fff","#000"],ce))};var P=D.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=D.hexNames=C(P);function C(ne){var xe={};for(var ce in ne)ne.hasOwnProperty(ce)&&(xe[ne[ce]]=ce);return xe}function j(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function B(ne,xe){$(ne)&&(ne="100%");var ce=oe(ne);return ne=K(xe,H(0,parseFloat(ne))),ce&&(ne=parseInt(ne*xe,10)/100),z.abs(ne-xe)<1e-6?1:ne%xe/parseFloat(xe)}function w(ne){return K(1,H(0,ne))}function Y(ne){return parseInt(ne,16)}function $(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function oe(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function de(ne){return ne.length==1?"0"+ne:""+ne}function Be(ne){return ne<=1&&(ne=ne*100+"%"),ne}function Ae(ne){return z.round(parseFloat(ne)*255).toString(16)}function Re(ne){return Y(ne)/255}var Le=function(){var ne="[-\\+]?\\d+%?",xe="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+xe+")|(?:"+ne+")",Ne="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",He="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+Ne),rgba:new RegExp("rgba"+He),hsl:new RegExp("hsl"+Ne),hsla:new RegExp("hsla"+He),hsv:new RegExp("hsv"+Ne),hsva:new RegExp("hsva"+He),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Fe(ne){return!!Le.CSS_UNIT.exec(ne)}function me(ne){ne=ne.replace(N,"").replace(V,"").toLowerCase();var xe=!1;if(P[ne])ne=P[ne],xe=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Le.rgb.exec(ne))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Le.rgba.exec(ne))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Le.hsl.exec(ne))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Le.hsla.exec(ne))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Le.hsv.exec(ne))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Le.hsva.exec(ne))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Le.hex8.exec(ne))?{r:Y(ce[1]),g:Y(ce[2]),b:Y(ce[3]),a:Re(ce[4]),format:xe?"name":"hex8"}:(ce=Le.hex6.exec(ne))?{r:Y(ce[1]),g:Y(ce[2]),b:Y(ce[3]),format:xe?"name":"hex"}:(ce=Le.hex4.exec(ne))?{r:Y(ce[1]+""+ce[1]),g:Y(ce[2]+""+ce[2]),b:Y(ce[3]+""+ce[3]),a:Re(ce[4]+""+ce[4]),format:xe?"name":"hex8"}:(ce=Le.hex3.exec(ne))?{r:Y(ce[1]+""+ce[1]),g:Y(ce[2]+""+ce[2]),b:Y(ce[3]+""+ce[3]),format:xe?"name":"hex"}:!1}function fe(ne){var xe,ce;return ne=ne||{level:"AA",size:"small"},xe=(ne.level||"AA").toUpperCase(),ce=(ne.size||"small").toLowerCase(),xe!=="AA"&&xe!=="AAA"&&(xe="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:xe,size:ce}}Ve.exports?Ve.exports=D:!(Z=function(){return D}.call(se,U,se,Ve),Z!==void 0&&(Ve.exports=Z))})(Math)},bPs0:function(Ve,se,U){"use strict";U.d(se,"b",function(){return i});var Z=U("k1fw"),z=U("9og8"),N=U("2qtc"),V=U("kLXV"),W=U("tJVT"),M=U("PpiC"),K=U("aHsQ"),H=U("sGsY"),n=U("WmNS"),D=U.n(n),b=U("q1tI"),m=U.n(b),f=U("bntm"),d=U("V0Rq"),u=U("wd/R"),c=U.n(u),o=U("Ty5D"),l=U("9kvl"),a=H.a.Countdown,i=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],R=function(T){var I=T.globalSetting,O=T.loading,E=T.user,y=T.exercise,p=T.socket,h=T.dispatch,A=Object(M.a)(T,["globalSetting","loading","user","exercise","socket","dispatch"]),_=Object(b.useState)({}),v=Object(W.a)(_,2),P=v[0],x=v[1],C=V.a.useModal(),j=Object(W.a)(C,2),B=j[0],w=j[1],Y=Object(b.useRef)(),$=Object(b.useRef)(null),oe=Object(b.useRef)(null),de=Object(b.useState)(!0),Be=Object(W.a)(de,2),Ae=Be[0],Re=Be[1],Le=Object(o.h)().query,Fe=Object(o.i)();Object(b.useEffect)(function(){var ue,_e,Oe,Me,rt;if(clearTimeout($.current),document.addEventListener(Object(f.c)(),et,!1),window.addEventListener("blur",ke,!1),(ue=y.exerciseUserInfo)!==null&&ue!==void 0&&ue.screen_open&&Object(f.a)()&&(h({type:"globalSetting/headerFooterToggle",payload:!1}),Re(!1)),(_e=y.exerciseUserInfo)!==null&&_e!==void 0&&_e.screen_at&&c()().diff(c()((Oe=y.exerciseUserInfo)===null||Oe===void 0?void 0:Oe.screen_at),"seconds")>0)me();else if((Me=y.exerciseUserInfo)!==null&&Me!==void 0&&Me.screen_open&&!Object(f.a)()){var dt=document.domain==="kepukehuan.educoder.net"?30:y.exerciseUserInfo.screen_sec+10+1;Y.current=V.a.info({icon:null,content:m.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",m.a.createElement("br",null),"\u5207\u6362\u9875\u9762"," ",y.exerciseUserInfo.screen_num-y.exerciseUserInfo.used_screen_num," ","\u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",m.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:m.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",m.a.createElement("span",{style:{display:"inline-block"}},m.a.createElement(a,{onFinish:function(){var ut;me(),(ut=Y.current)===null||ut===void 0||ut.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+dt*1e3})),"S\uFF09"),onOk:function(){var ut;(ut=Y.current)===null||ut===void 0||ut.destroy(),Re(!1),Object(f.d)(document.body),document.getElementById("root").addEventListener("click",fe,!1)}})}return(rt=y.exerciseUserInfo)!==null&&rt!==void 0&&rt.screen_open&&!Object(f.a)()||document.getElementById("root").addEventListener("click",fe,!1),function(){document.getElementById("root").removeEventListener("click",fe,!1),document.removeEventListener(Object(f.c)(),et,!1),window.removeEventListener("blur",ke,!1),clearTimeout($.current)}},[]),Object(b.useEffect)(function(){setTimeout(function(){y.actionTabs.removeEventListenerExitScreen&&(clearTimeout($.current),document.getElementById("root").removeEventListener("click",fe,!1),document.removeEventListener(Object(f.c)(),et,!1))},500),ne()},[y.actionTabs]),Object(b.useEffect)(function(){setTimeout(function(){y.exerciseUserInfo.used_screen_num>y.exerciseUserInfo.screen_num?Ne():!Ae},500)},[y.exerciseUserInfo]);var me=function(){var ue=Object(z.a)(D.a.mark(function _e(){var Oe;return D.a.wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:return rt.next=2,Ye();case 2:Oe=rt.sent,setTimeout(function(){var dt,pt;(dt=Y.current)===null||dt===void 0||dt.destroy(),Y.current=V.a.info({okText:m.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:m.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",m.a.createElement("span",{className:"c-red"},Oe.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",m.a.createElement("span",{className:"c-red"},(pt=y.exerciseUserInfo)===null||pt===void 0?void 0:pt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var ut=Object(z.a)(D.a.mark(function Tt(){return D.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:Object(f.d)(document.body);case 1:case"end":return Ce.stop()}},Tt)}));function _t(){return ut.apply(this,arguments)}return _t}()})},1e3);case 4:case"end":return rt.stop()}},_e)}));return function(){return ue.apply(this,arguments)}}(),fe=function(_e){!Object(f.a)()&&_e.target.nodeName!=="A"&&_e.target.nodeName!=="BUTTON"&&_e.target.innerHTML!=="\u786E \u5B9A"&&(Object(f.d)(document.body),console.log("documentClick.full"))},ne=function(){var ue=Object(z.a)(D.a.mark(function _e(){return D.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.abrupt("return",new Promise(function(){var rt=Object(z.a)(D.a.mark(function dt(pt){var ut;return D.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,h({type:"exercise/getExerciseUserInfo",payload:Object(Z.a)({},Fe)});case 2:return ut=Tt.sent,pt(ut==null?void 0:ut.data),Tt.abrupt("return",ut==null?void 0:ut.data);case 5:case"end":return Tt.stop()}},dt)}));return function(dt){return rt.apply(this,arguments)}}()));case 1:case"end":return Me.stop()}},_e)}));return function(){return ue.apply(this,arguments)}}(),xe=function(){var ue=Object(z.a)(D.a.mark(function _e(Oe){var Me,rt,dt;return D.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:(Me=Y.current)===null||Me===void 0||((rt=Me.destroyAll)===null||rt===void 0)||rt.call(Me),Y.current=V.a.info({maskClosable:!1,keyboard:!1,okText:m.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",m.a.createElement("span",{style:{display:"inline-block"}},m.a.createElement(a,{onFinish:Ye,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(y.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:m.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",m.a.createElement("span",{className:"c-red"},Oe),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",m.a.createElement("span",{className:"c-red"},(dt=y.exerciseUserInfo)===null||dt===void 0?void 0:dt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",m.a.createElement("span",{className:"c-red"},y.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",m.a.createElement("br",null),m.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var _t=Object(z.a)(D.a.mark(function Pe(){return D.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:clearTimeout(oe.current),Object(f.d)(document.body),Y.current.destroy();case 3:case"end":return tt.stop()}},Pe)}));function Tt(){return _t.apply(this,arguments)}return Tt}()}),oe.current=setTimeout(function(){var _t;Y.current.update({okText:m.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:m.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",m.a.createElement("span",{className:"c-red"},Oe+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",m.a.createElement("span",{className:"c-red"},(_t=y.exerciseUserInfo)===null||_t===void 0?void 0:_t.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(y.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return ut.stop()}},_e)}));return function(Oe){return ue.apply(this,arguments)}}(),ce=function(){location.href="/classrooms/".concat(Fe.coursesId,"/exercise/").concat(Fe.categoryId,"/detail")},Ne=function(){var ue=Object(z.a)(D.a.mark(function _e(){var Oe,Me,rt;return D.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return(Oe=Y.current)===null||Oe===void 0||((Me=Oe.destroyAll)===null||Me===void 0)||Me.call(Oe),pt.next=3,Object(d.Z)({categoryId:Fe.categoryId,commit_method:1});case 3:if(rt=pt.sent,rt){try{p.send(JSON.stringify({type:"toggleLockExit",data:!1})),p.send(JSON.stringify({type:"network-open",data:""}))}catch(ut){}He()}case 5:case"end":return pt.stop()}},_e)}));return function(){return ue.apply(this,arguments)}}(),He=function(){var _e,Oe;document.removeEventListener(Object(f.c)(),et,!1),Object(f.b)(),(_e=Y.current)===null||_e===void 0||((Oe=_e.destroyAll)===null||Oe===void 0)||Oe.call(_e);try{p.send(JSON.stringify({type:"toggleLockExit",data:!1})),p.send(JSON.stringify({type:"network-open",data:""}))}catch(Me){}B.info({content:m.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",m.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){ce()}})},ke=function(_e){Object(f.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(f.b)()},Ye=function(){var ue=Object(z.a)(D.a.mark(function _e(){return D.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.abrupt("return",new Promise(function(){var rt=Object(z.a)(D.a.mark(function dt(pt){var ut,_t,Tt;return D.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!((ut=y.exerciseUserInfo)!==null&&ut!==void 0&&ut.screen_at)){Ce.next=3;break}return Ce.next=3,Object(d.h)(Object(Z.a)(Object(Z.a)({},Fe),{},{reset:!0}));case 3:return Ce.next=5,Object(d.R)({id:Fe.categoryId});case 5:if(_t=Ce.sent,!(_t!=null&&_t.is_commit)){Ce.next=9;break}return He(),Ce.abrupt("return");case 9:return Ce.next=11,ne();case 11:Tt=Ce.sent,pt(Tt);case 13:case"end":return Ce.stop()}},dt)}));return function(dt){return rt.apply(this,arguments)}}()));case 1:case"end":return Me.stop()}},_e)}));return function(){return ue.apply(this,arguments)}}(),et=function(){var ue=Object(z.a)(D.a.mark(function _e(){var Oe,Me,rt,dt;return D.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(Oe=!1,console.log("fullscreen change"),!Object(f.a)()){ut.next=7;break}(Me=y.exerciseUserInfo)!==null&&Me!==void 0&&Me.screen_at&&Object(d.h)(Object(Z.a)(Object(Z.a)({},Fe),{},{reset:!0})),clearTimeout($.current),ut.next=17;break;case 7:return Oe=!0,ut.next=10,Object(d.h)(Object(Z.a)({},Fe));case 10:return ut.next=12,ne();case 12:rt=ut.sent,xe(rt.used_screen_num),dt=setTimeout(Object(z.a)(D.a.mark(function _t(){return D.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:case"end":return Pe.stop()}},_t)})),y.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),$.current=dt;case 17:h({type:"globalSetting/headerFooterToggle",payload:Oe});case 18:case"end":return ut.stop()}},_e)}));return function(){return ue.apply(this,arguments)}}();return m.a.createElement("div",null,w)};se.a=Object(l.a)(function(S){var T=S.loading,I=S.user,O=S.exercise,E=S.globalSetting;return{globalSetting:E,user:I,exercise:O,loading:T.effects}})(R)},bT9E:function(Ve,se,U){"use strict";U.d(se,"a",function(){return z});var Z=U("VTBJ");function z(N,V){var W=Object(Z.a)({},N);return Array.isArray(V)&&V.forEach(function(M){delete W[M]}),W}},biw7:function(Ve,se,U){"use strict";var Z=U("q1tI"),z=U.n(Z),N=Z.createContext(null);se.a=N},c5Ni:function(Ve,se,U){},cQPA:function(Ve,se,U){"use strict";U.r(se);var Z=U("T2oS"),z=U("W9HT"),N=U("sPJy"),V=U("bE4q"),W=U("+L6B"),M=U("2/Rp"),K=U("14J3"),H=U("BMrR"),n=U("jCWc"),D=U("kPKH"),b=U("5Dmo"),m=U("3S7+"),f=U("sRBo"),d=U("kaz8"),u=U("7Kak"),c=U("9yH6"),o=U("MXD1"),l=U("CFYs"),a=U("miYZ"),i=U("tsqr"),R=U("2qtc"),S=U("kLXV"),T=U("k1fw"),I=U("9og8"),O=U("tJVT"),E=U("PpiC"),y=U("5NDa"),p=U("5rEg"),h=U("aHsQ"),A=U("sGsY"),_=U("WmNS"),v=U.n(_),P=U("q1tI"),x=U.n(P),C=U("Ty5D"),j=U("55Ip"),B=U("9kvl"),w=U("gUdW"),Y=U("xGfz"),$=U("jhfD"),oe=U("BlwA"),de=U("bPs0"),Be=U("wd/R"),Ae=U.n(Be),Re=U("9GDu"),Le=U.n(Re),Fe=U("1vsH"),me=U("s8TD"),fe=U("xKgJ"),ne=U("bntm"),xe=U("V0Rq"),ce=U("HBuW"),Ne=U("9Bee"),He=U("Ot1p"),ke=function(Qe){var Ue,le,pe,$e,je,Je=Qe.item,mt=Qe.answerData,We=Qe.onBlur,it=We===void 0?function(){}:We,st=Object(P.useState)(),ct=Object(O.a)(st,2),bt=ct[0],jt=ct[1],en=Object(P.useState)(),Yt=Object(O.a)(en,2),Ct=Yt[0],pn=Yt[1],Rt=Object(P.useState)(),zt=Object(O.a)(Rt,2),Pt=zt[0],qt=zt[1];return Object(P.useEffect)(function(){pn(Je==null?void 0:Je.a_flag)},[Je==null?void 0:Je.a_flag]),x.a.createElement("div",null,(mt==null||((Ue=mt.exercise)===null||Ue===void 0)?void 0:Ue.commit_status)===1?x.a.createElement("div",null,x.a.createElement("p",{className:"mt10 mb0"},"\u6211\u7684\u7B54\u6848\uFF1A"),x.a.createElement("div",{className:Le.a.simpleText},x.a.createElement(Ne.a,{value:Je==null||((le=Je.user_answer)===null||le===void 0)?void 0:le[0]}))):x.a.createElement("div",{className:Je.user_score&&(Je.user_score===Je.question_score?"c-green":"c-red")},Pt?x.a.createElement(He.a,{height:150,isFocus:!0,defaultValue:Je==null||((pe=Je.user_answer)===null||pe===void 0)?void 0:pe[0],id:Je==null?void 0:Je.question_id,onChange:function(wn){return jt(wn)},onBlur:function(){return it(bt)}}):x.a.createElement("div",{onClick:function(){var wn;if(!Je.repeat_answer&&(Je==null||((wn=Je.user_answer)===null||wn===void 0)?void 0:wn.length)>0)return;qt(!0)}},x.a.createElement(p.a,{disabled:!Je.repeat_answer&&(Je==null||(($e=Je.user_answer)===null||$e===void 0)?void 0:$e.length)>0&&!Je.israp,size:"large",className:"current",placeholder:"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54",readOnly:!0}))),(Je==null?void 0:Je.standard_answer)&&x.a.createElement("div",null,x.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),x.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},x.a.createElement(Ne.a,{value:Je==null||((je=Je.standard_answer)===null||je===void 0)?void 0:je[0]}))))},Ye=ke,et=U("g9YV"),ue=U("wCAj"),_e=U("5GOC"),Oe=U("JsLm"),Me=U("ZW9T"),rt=U("o/qq"),dt=U.n(rt),pt=function(Qe){var Ue,le,pe,$e,je=Qe.item,Je=Qe.answerData,mt=Object(P.useState)([]),We=Object(O.a)(mt,2),it=We[0],st=We[1],ct=Object(P.useState)([]),bt=Object(O.a)(ct,2),jt=bt[0],en=bt[1];Object(P.useEffect)(function(){var Rt;if(!(je!=null&&(Rt=je.shixun_details)!==null&&Rt!==void 0&&Rt.length))return;for(var zt=[],Pt=[],qt=0;qt<(je==null||((yn=je.shixun_details)===null||yn===void 0)?void 0:yn.length);qt++){for(var yn,wn,yt,Vt=0;Vt<(je==null?void 0:je.shixun_details[qt].stage_list.length);Vt++){var Mn,Un,Pn,Vn,Q=je==null?void 0:je.shixun_details[qt].stage_list[Vt];zt.push(Object(T.a)(Object(T.a)({},Q),{operation:je==null||((Mn=je.shixun_details)===null||Mn===void 0||((Un=Mn[qt])===null||Un===void 0||((Pn=Un.shixun_detail)===null||Pn===void 0||((Vn=Pn[0])===null||Vn===void 0))))?void 0:Vn.game_identifier}))}if(je!=null&&(wn=je.shixun_details)!==null&&wn!==void 0&&(yt=wn[qt])!==null&&yt!==void 0&&yt.shixun_detail){var L,k,G;Pt.push(je==null||((L=je.shixun_details)===null||L===void 0||((k=L[qt])===null||k===void 0||((G=k.shixun_detail)===null||G===void 0)))?void 0:G[0])}}en(Pt),st(zt)},[je==null?void 0:je.shixun_details]);var Yt=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",render:function(zt){return x.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:zt&&zt.length>25?zt:""},zt)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(zt,Pt){return x.a.createElement("span",null,Pt.evaluate_count?Pt.evaluate_count:x.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"endTime",dataIndex:"endTime",align:"center",render:function(zt,Pt){var qt=!1;return Pt.finished_time&&Je!==null&&Je!==void 0&&Je.exercise&&Je!==null&&Je!==void 0&&Je.exercise_answer_user&&((Je==null?void 0:Je.exercise.time)===-1?qt=Ae()(Je==null?void 0:Je.exercise.end_time).isBefore(Pt.finished_time):qt=Ae()(Je==null?void 0:Je.exercise_answer_user.start_at).add(Je==null?void 0:Je.exercise.time,"m").isBefore(Pt.finished_time)),x.a.createElement("span",null,Pt.finished_time||x.a.createElement("span",{className:"c-grey-999"},"--"),x.a.createElement("span",{className:"c-orange-ff9 "},qt?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(zt,Pt){return x.a.createElement("span",null,Pt.time_consuming||x.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(zt,Pt){return x.a.createElement("span",null,Pt.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u64CD\u4F5C",dataIndex:"operation",key:"operation",align:"center",render:function(zt,Pt,qt){return zt?x.a.createElement(Oe.a,{affix:!1,className:"mt10"},x.a.createElement(Oe.a.Link,{href:"#challenge_".concat(je==null?void 0:je.question_id).concat(qt),title:x.a.createElement("span",{style:{color:"#0152d9"}},"\u67E5\u770B")})):x.a.createElement("span",{className:"c-grey-999"},"--")}}],Ct=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(zt,Pt){return x.a.createElement("span",null,Pt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(zt,Pt){return x.a.createElement("span",null,Pt.error_msg?Pt.error_msg:"--")}}],pn={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return x.a.createElement("div",{className:"mt15 mb15"},(Je==null||((Ue=Je.exercise)===null||Ue===void 0)?void 0:Ue.commit_status)===0&&x.a.createElement("div",null,je.shixun.map(function(Rt,zt){return x.a.createElement(H.a,{className:"font16",gutter:[0,20]},x.a.createElement(D.a,{flex:"1"},Rt.challenge_name," (",Rt.challenge_score,"\u5206)"),x.a.createElement(D.a,{flex:"100px",className:"tr"},Rt.answer_status===0&&x.a.createElement("span",{className:"font12 tag-style-border border-orange c-orange "},"\u672A\u5B8C\u6210"),Rt.answer_status===1&&x.a.createElement("span",{className:"font12 tag-style-border border-green c-green "},"\u5DF2\u5B8C\u6210")))})),(Je==null||((le=Je.exercise)===null||le===void 0)?void 0:le.commit_status)!==0||(Je==null||((pe=Je.exercise)===null||pe===void 0)?void 0:pe.user_exercise_status)!==0?x.a.createElement(x.a.Fragment,null,!!(it!=null&&it.length)&&x.a.createElement("div",null,x.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),x.a.createElement(ue.a,{columns:Yt,dataSource:it,pagination:!1})),!!(jt!=null&&jt.length)&&x.a.createElement("div",null,x.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),jt==null?void 0:jt.map(function(Rt,zt){return x.a.createElement("div",{id:"challenge_".concat(je==null?void 0:je.question_id).concat(zt),className:"mt5"},x.a.createElement("div",null,x.a.createElement("span",{className:"font16 mr15"}," ","\u7B2C",Rt.position,"\u5173"),x.a.createElement(j.a,{className:"current c-black font16",to:"/tasks/".concat(Rt.game_identifier)},Rt.name)),(Rt==null?void 0:Rt.st)===0&&Rt.passed_code&&x.a.createElement("aside",{className:dt.a.shixunWrp},x.a.createElement("h2",null,"\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",x.a.createElement("span",{className:"c-light-black"},Rt.path)),x.a.createElement(Me.b,{height:300,language:"python",theme:"default",value:Rt.passed_code,options:pn})))}))):x.a.createElement(x.a.Fragment,null,x.a.createElement(Ne.a,{className:"c-grey-999 mt20 mb20",value:je==null?void 0:je.question_title}),je==null||(($e=je.shixun)===null||$e===void 0)?void 0:$e.map(function(Rt,zt){return x.a.createElement("p",{className:"font16 c-grey-666 mb5",key:zt},x.a.createElement("span",{className:"mr20"},"\u7B2C",Rt==null?void 0:Rt.challenge_position,"\u5173 ",Rt==null?void 0:Rt.challenge_name),x.a.createElement("span",null,Rt==null?void 0:Rt.challenge_score,"\u5206"))})))},ut=pt,_t=U("J66h"),Tt=function(Qe){var Ue=Qe.item,le=Qe.answerData,pe=Object(P.useState)([]),$e=Object(O.a)(pe,2),je=$e[0],Je=$e[1];Object(P.useEffect)(function(){var it;if((Ue==null||((it=Ue.evaluate_codes)===null||it===void 0)?void 0:it.length)>0){var st;Je(Ue==null||((st=Ue.evaluate_codes)===null||st===void 0)?void 0:st.map(function(ct,bt){return{key:bt+1,error_msg:ct!=null&&ct.error_msg?_t.Base64.decode(ct==null?void 0:ct.error_msg):""}}))}else Je([{key:"--",error_msg:"--"}])},[Ue==null?void 0:Ue.evaluate_codes]);var mt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(st,ct){return x.a.createElement("span",null,ct.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(st,ct){return x.a.createElement("span",null,ct.error_msg?ct.error_msg:"--")}}],We={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return x.a.createElement(x.a.Fragment,null,x.a.createElement("div",{className:"mt15 mb15"},x.a.createElement(Ne.a,{value:Ue==null?void 0:Ue.description})),!!(Ue!=null&&Ue.user_answer.length)&&(Ue==null?void 0:Ue.passed_code)&&x.a.createElement("aside",{className:dt.a.shixunWrp},x.a.createElement("h3",null,"\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),x.a.createElement(Me.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:Ue!=null&&Ue.passed_code?_t.Base64.decode(Ue==null?void 0:Ue.passed_code):"",options:We})))},Pe=Tt,Ce=U("oBTY"),tt=p.a.TextArea,lt=function(Qe){var Ue,le,pe=Qe.item,$e=Qe.answerData,je=Qe.onBlur,Je=je===void 0?function(){}:je,mt=Object(P.useState)([]),We=Object(O.a)(mt,2),it=We[0],st=We[1];return Object(P.useEffect)(function(){for(var ct=[],bt=function(Yt){var Ct,pn=(pe==null||((Ct=pe.user_answer)===null||Ct===void 0)?void 0:Ct.find(function(Rt){return Rt.choice_id===Yt+1}))||{choice_id:Yt+1,answer_text:""};ct.push(Object(T.a)({},pn))},jt=0;jt<(pe==null?void 0:pe.multi_count);jt++)bt(jt);st(ct)},[pe==null?void 0:pe.user_answer]),x.a.createElement("div",null,it==null?void 0:it.map(function(ct,bt){var jt;return x.a.createElement("div",{className:"mt10"},x.a.createElement("span",null,"\u6211\u7684\u7B54\u6848\uFF08\u586B\u7A7A",bt+1,"\uFF09:"),x.a.createElement("div",null,x.a.createElement(tt,{autoSize:!0,rows:4,disabled:!pe.repeat_answer&&(pe==null||((jt=pe.user_answer)===null||jt===void 0)?void 0:jt.length)>0&&!pe.israp||!!($e!=null&&$e.exercise.commit_status),value:ct==null?void 0:ct.answer_text,onChange:function(Yt){it[bt].answer_text=Yt.target.value,st(Object(Ce.a)(it))},onBlur:function(Yt){return Je(ct==null?void 0:ct.answer_text,bt+1,it)},className:"overflow_hidden ".concat(pe.user_score&&(pe.user_score===pe.question_score?"c-green":"c-red"))})))}),!!(pe!=null&&(Ue=pe.standard_answer)!==null&&Ue!==void 0&&Ue.length)&&x.a.createElement("div",null,pe==null||((le=pe.standard_answer)===null||le===void 0)?void 0:le.map(function(ct,bt){return x.a.createElement("div",null,x.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",bt+1,"\uFF09:"),x.a.createElement("div",null,x.a.createElement(tt,{autoSize:!0,disabled:!0,value:ct==null?void 0:ct.answer_text[0]})))})))},Ke=lt,Xe=U("lzim"),Se=p.a.TextArea,ge=function(Qe){var Ue=Qe.data;return x.a.createElement("div",{className:"tc mt80"},x.a.createElement("img",{width:"486",src:Xe.l})," ",x.a.createElement("br",null),Ue.status===-1&&x.a.createElement("div",{className:"c-grey-999 mt60"},"\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),Ue.status===-2&&x.a.createElement("div",{className:" c-grey-999 mt60"},"\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A",x.a.createElement("span",{className:"c-red"},Ue.ip),"\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),x.a.createElement(M.a,{className:"mt40 pl20 pr20",type:"primary"},x.a.createElement("a",{href:"/"},"\u56DE\u5230\u9996\u9875")))},Ee=ge,ie=U("m3rI"),ae=U("LvDl"),he=A.a.Countdown,ve=p.a.TextArea,Te=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ge={1:"\u672A\u53D1\u5E03",2:"\u5DF2\u53D1\u5E03",3:"\u5DF2\u622A\u6B62"},ot={1:Le.a.flagActive,2:Le.a.flagHalf},xt={0:"c-red-ee4",1:"c-green"},Ot=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],wt=function(Qe){var Ue,le,pe,$e,je,Je,mt,We,it,st,ct,bt,jt,en,Yt,Ct,pn,Rt,zt,Pt,qt,yn,wn,yt,Vt,Mn,Un,Pn,Vn,Q,L,k=Qe.globalSetting,G=Qe.loading,te=Qe.user,J=Qe.dispatch,Ie=Object(E.a)(Qe,["globalSetting","loading","user","dispatch"]),at=Object(C.i)(),St=Object(P.useState)({}),Ft=Object(O.a)(St,2),ye=Ft[0],Ut=Ft[1],$t=Object(P.useState)({}),Sn=Object(O.a)($t,2),Hn=Sn[0],Kn=Sn[1],In=Object(P.useState)({}),pr=Object(O.a)(In,2),ur=pr[0],Bn=pr[1],cr=Object(P.useState)(!1),Ar=Object(O.a)(cr,2),Cr=Ar[0],Yn=Ar[1],Wr=Object(P.useState)(!0),Pr=Object(O.a)(Wr,2),yr=Pr[0],Qr=Pr[1],br=Object(P.useState)(!1),dr=Object(O.a)(br,2),Nr=dr[0],Hr=dr[1],Er=Object(P.useState)(!1),_n=Object(O.a)(Er,2),sn=_n[0],Ln=_n[1],un=Object(P.useState)(),Rn=Object(O.a)(un,2),bn=Rn[0],Or=Rn[1],jn=Object(P.useState)(0),Xn=Object(O.a)(jn,2),Kr=Xn[0],Rr=Xn[1],Gr=Object(P.useState)(""),Ir=Object(O.a)(Gr,2),Dr=Ir[0],jr=Ir[1],_r=Object(P.useState)("none"),zr=Object(O.a)(_r,2),Jr=zr[0],sr=zr[1],ri=Object(P.useState)(""),Gt=Object(O.a)(ri,2),tn=Gt[0],Xt=Gt[1],on=Object(P.useState)({status:0}),dn=Object(O.a)(on,2),An=dn[0],hn=dn[1],kn=Object(P.useRef)(),qn=Object(P.useState)(0),ln=Object(O.a)(qn,2),rn=ln[0],mn=ln[1],Qn=Object(P.useState)(0),Gn=Object(O.a)(Qn,2),an=Gn[0],Zr=Gn[1],xn=Object(P.useState)(!1),gn=Object(O.a)(xn,2),En=gn[0],$n=gn[1],qr=Object(P.useState)(!1),Vr=Object(O.a)(qr,2),$r=Vr[0],Ai=Vr[1],Gi=Object(P.useState)(),Ci=Object(O.a)(Gi,2),zi=Ci[0],Vi=Ci[1],Ja=Object(P.useState)(),Yi=Object(O.a)(Ja,2),Xi=Yi[0],Za=Yi[1];Object(P.useEffect)(function(){return(Object(fe.c)()||Object(fe.l)()||te.userInfo.enable_simulate)&&ti(),window.addEventListener("message",li),function(){window.removeEventListener("message",li),window.removeEventListener("beforeunload",Oi),location.pathname.indexOf("/detail")>-1&&Object(ne.b)()}},[at.categoryId,te.userInfo.login]);var li=function(be){be.data==="backExercise"&&(sr("none"),jr(""),ti())},ei=function(){var Wt=Object(I.a)(v.a.mark(function be(){var ft,nt,Mt,gt,It,Nt,kt,Qt,Kt,Jt,vn;return v.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return cn.next=2,J({type:"exercise/getExerciseUserInfo",payload:Object(T.a)({},at)});case 2:if(nt=cn.sent,Kn(Object(T.a)({},nt.data)),!((nt==null||((ft=nt.data)===null||ft===void 0)?void 0:ft.ip_limit)!=="no")){cn.next=11;break}if(!((nt==null||((Mt=nt.data)===null||Mt===void 0)?void 0:Mt.ip_limit)==="inner")){cn.next=9;break}return cn.next=8,Object(me.a)({ip_limit:nt==null||((gt=nt.data)===null||gt===void 0)?void 0:gt.ip_limit});case 8:Nt=cn.sent;case 9:return cn.next=11,Object(Fe.s)({exerciseId:at.categoryId,ip:Nt,errmsgHide:!0,ip_limit:nt==null||((It=nt.data)===null||It===void 0)?void 0:It.ip_limit}).catch(function(or){hn(or)});case 11:if(!((nt==null?void 0:nt.status)==0)){cn.next=18;break}if(!((nt==null||((kt=nt.data)===null||kt===void 0)?void 0:kt.used_screen_num)>(nt==null||((Qt=nt.data)===null||Qt===void 0)?void 0:Qt.screen_num)&&nt!==null&&nt!==void 0&&(Kt=nt.data)!==null&&Kt!==void 0&&Kt.screen_open)){cn.next=15;break}return bi(),cn.abrupt("return",!1);case 15:Hr(nt==null?void 0:nt.data.check_camera),Ln(nt==null||((Jt=nt.data)===null||Jt===void 0)?void 0:Jt.screen_open),nt!=null&&(vn=nt.data)!==null&&vn!==void 0&&vn.check_camera||ti();case 18:case"end":return cn.stop()}},be)}));return function(){return Wt.apply(this,arguments)}}(),Oi=function(be){var ft="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(be||window.event).returnValue=ft,ft},ti=function(){var Wt=Object(I.a)(v.a.mark(function be(){var ft,nt,Mt,gt,It;return v.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return Yn(!0),kt.next=3,Object(xe.Y)(Object(T.a)({},at)).catch(function(){return Yn(!1)});case 3:nt=kt.sent,((ft=nt)===null||ft===void 0?void 0:ft.exercise)&&(nt.exercise.user_exercise_status=1),Yn(!1),nt&&(nt.exercise_types=((Mt=nt)===null||Mt===void 0?void 0:Mt.exercise_types)||((gt=nt)===null||gt===void 0||((It=gt.exercise_scores)===null||It===void 0)?void 0:It.exercise_types),Ut(nt));case 7:case"end":return kt.stop()}},be)}));return function(){return Wt.apply(this,arguments)}}();Object(P.useEffect)(function(){var Wt,be,ft;((Wt=ye.exercise)===null||Wt===void 0?void 0:Wt.time)===0&&bi(),((be=ye.exercise)===null||be===void 0?void 0:be.time)&&Or(Date.now()+(ye==null||((ft=ye.exercise)===null||ft===void 0)?void 0:ft.time)*1e3*60)},[(Ue=ye.exercise)===null||Ue===void 0?void 0:Ue.time]);var qa=function(){var be;(ye==null||((be=ye.exercise)===null||be===void 0)?void 0:be.exercise_status)===3?S.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:x.a.createElement("div",{className:"tc font16"},"\u622A\u6B62\u65F6\u95F4\u5DF2\u5230\uFF0C\u65E0\u6CD5\u6253\u56DE\u8BD5\u5377",x.a.createElement("br",null),"\u8BF7\u5728\u4FEE\u6539\u622A\u6B62\u65F6\u95F4\u540E\u518D\u64CD\u4F5C")}):S.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:x.a.createElement("div",{className:"tc font16"},"\u5B66\u751F\u5C06\u5F97\u5230\u4E00\u6B21\u91CD\u65B0\u7B54\u9898\u7684\u673A\u4F1A\uFF0C\u73B0\u6709\u7684\u7B54\u9898\u60C5\u51B5\u5C06\u88AB\u6E05\u7A7A",x.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u56DE\u9000TA\u7684\u8BD5\u5377\u7B54\u9898"),onOk:function(){var ft=Object(I.a)(v.a.mark(function Mt(){var gt,It;return v.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,Object(xe.S)({categoryId:at.categoryId,user_ids:[ye==null||((gt=ye.exercise_answer_user)===null||gt===void 0)?void 0:gt.user_id]});case 2:It=kt.sent,It&&(i.b.info(It==null?void 0:It.message),mr());case 4:case"end":return kt.stop()}},Mt)}));function nt(){return ft.apply(this,arguments)}return nt}()})},mr=function(){ti()},ii=function(){var Wt=Object(I.a)(v.a.mark(function be(){var ft,nt;return v.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Object(xe.ab)({categoryId:at.categoryId,commit_method:2});case 2:ft=gt.sent,(ft==null?void 0:ft.status)===0&&(S.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:x.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",x.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var It=Object(I.a)(v.a.mark(function kt(){return v.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:mr();case 1:case"end":return Kt.stop()}},kt)}));function Nt(){return It.apply(this,arguments)}return Nt}()}),i.b.info(ft==null?void 0:ft.message)),(ft==null?void 0:ft.status)===-3&&(nt=parseInt(ft==null?void 0:ft.message),ye.exercise.time=nt,Ut(Object(T.a)({},ye)));case 5:case"end":return gt.stop()}},be)}));return function(){return Wt.apply(this,arguments)}}(),yi=function(){var Wt=Object(I.a)(v.a.mark(function be(ft){var nt;return v.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Object(ce.E)({id:ft.shixun_identifier});case 2:nt=gt.sent,nt!=null&&nt.game_identifier&&(jr("/tasks/".concat(nt.game_identifier,"?type=exercises&exercisesId=").concat(at.categoryId,"&coursesId=").concat(at.coursesId,"&login=").concat(at.login,"&questionId=").concat(ft.question_id)),sr("block")),(nt==null?void 0:nt.status)===-3?Object(Fe.q)():(nt==null?void 0:nt.status)===2?$a(nt==null?void 0:nt.message,ft.question_id):(nt==null?void 0:nt.status)===3&&Qi(nt==null?void 0:nt.message);case 5:case"end":return gt.stop()}},be)}));return function(ft){return Wt.apply(this,arguments)}}(),$a=function Wt(be,ft){var nt;be=(nt=be)!==null&&nt!==void 0&&nt.includes(".json")?be:"".concat(be,".json"),S.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:x.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Mt=Object(I.a)(v.a.mark(function It(){var Nt,kt;return v.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Kt.next=2,Object(xe.T)({url:be});case 2:if(Nt=Kt.sent,Nt){Kt.next=5;break}return Kt.abrupt("return");case 5:return i.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Kt.next=8,Object(ce.E)({id:Nt.shixun_identifier});case 8:if(kt=Kt.sent,!(kt!=null&&kt.game_identifier)){Kt.next=12;break}return yi({shixun_identifier:kt==null?void 0:kt.game_identifier,question_id:ft}),Kt.abrupt("return");case 12:(kt==null?void 0:kt.status)===2?Wt(kt==null?void 0:kt.message,ft):(kt==null?void 0:kt.status)===3&&Qi(kt==null?void 0:kt.message);case 13:case"end":return Kt.stop()}},It)}));function gt(){return Mt.apply(this,arguments)}return gt}()})},Qi=function(be){S.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:x.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",be,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},es=function(be){be.redo?S.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:x.a.createElement("div",{className:"tc font16"},"\u60A8\u4E4B\u524D\u5DF2\u7ECF\u6311\u6218\u8FC7\u8BE5\u5B9E\u8BAD\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u9700\u8981\u91CD\u65B0\u6311\u6218"),onOk:function(){var ft=Object(I.a)(v.a.mark(function Mt(){var gt,It,Nt,kt;return v.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Kt.next=2,Object(xe.T)({id:be.myshixun_identifier,url:be.url});case 2:gt=Kt.sent,gt&&(It=Object(ae.cloneDeep)(ye==null?void 0:ye.exercise_question_types),Nt=It==null?void 0:It.findIndex(function(Jt){return Jt.question_type===5}),It[Nt].items.find(function(Jt){return Jt.question_id===be.question_id}).redo=!1,It[Nt].items.find(function(Jt){return Jt.question_id===be.question_id}).shixun_identifier=gt.shixun_identifier,ye.exercise_question_types=It,Ut(ye),kt=Object(T.a)(Object(T.a)({},be),{},{shixun_identifier:gt.shixun_identifier}),yi(kt));case 4:case"end":return Kt.stop()}},Mt)}));function nt(){return ft.apply(this,arguments)}return nt}()}):yi(be)},_a=function(){var Wt=Object(I.a)(v.a.mark(function be(ft){var nt;return v.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(!ft.hack_identifier){gt.next=5;break}return gt.next=3,Object(xe.X)({id:ft.hack_identifier});case 3:nt=gt.sent,(nt==null?void 0:nt.status)===0&&(jr("/myproblems/".concat(nt.identifier,"?type=exercises&exercisesId=").concat(at.categoryId,"&coursesId=").concat(at.coursesId,"&login=").concat(at.login,"&questionId=").concat(ft.question_id)),sr("block"));case 5:case"end":return gt.stop()}},be)}));return function(ft){return Wt.apply(this,arguments)}}(),ai=function(){var Wt=Object(I.a)(v.a.mark(function be(ft,nt,Mt,gt){var It,Nt;return v.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(ft){Qt.next=3;break}return console.error("handleSave no questionId params"),Qt.abrupt("return");case 3:return Qt.next=5,Object(xe.cb)({questionId:ft,exercise_choice_id:nt,answer_text:Mt});case 5:Nt=Qt.sent,(Nt==null?void 0:Nt.status)===0&&(gt&&gt());case 7:case"end":return Qt.stop()}},be)}));return function(ft,nt,Mt,gt){return Wt.apply(this,arguments)}}(),ui=function(){var Wt=Object(I.a)(v.a.mark(function be(ft){var nt,Mt;return v.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,Object(xe.V)({id:at.categoryId});case 2:if(nt=It.sent,nt){It.next=5;break}return It.abrupt("return");case 5:nt.question_undo!==0||nt.oj_undo!==0?(Mt="",nt.question_undo!==0&&nt.oj_undo!==0?Mt="\u6709 ".concat(nt.question_undo," \u9898\u672A\u5B8C\u6210\uFF0C\u5305\u542B ").concat(nt.oj_undo," \u4E2A\u7F16\u7A0B\u9898"):nt.question_undo!==0&&nt.oj_undo===0?Mt="\u6709 ".concat(nt.question_undo," \u9898\u672A\u5B8C\u6210"):nt.question_undo===0&&nt.oj_undo!==0&&(Mt="\u6709 ".concat(nt.oj_undo," \u7F16\u7A0B\u9898\u672A\u5B8C\u6210")),S.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:x.a.createElement("div",{className:"tc font16"},Mt,x.a.createElement("br",null),ft?"\u5728".concat(Ae()(nt.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var Nt=Object(I.a)(v.a.mark(function Qt(){return v.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:ft?mr():bi();case 1:case"end":return Jt.stop()}},Qt)}));function kt(){return Nt.apply(this,arguments)}return kt}()})):S.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",content:x.a.createElement("div",{className:"tc font16"},ft?"\u5728".concat(Ae()(nt.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var Nt=Object(I.a)(v.a.mark(function Qt(){return v.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:ft?mr():bi();case 1:case"end":return Jt.stop()}},Qt)}));function kt(){return Nt.apply(this,arguments)}return kt}()});case 6:case"end":return It.stop()}},be)}));return function(ft){return Wt.apply(this,arguments)}}(),Ur=function(be){return x.a.createElement("div",null,x.a.createElement(l.a,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:be}),x.a.createElement("div",{className:"c-grey-c tc mt10 mb20"},"\u6B63\u5728\u5224\u5206\u4E2D\u2026"))},xa=function(){var be=0,ft=S.a.info({title:"\u4EA4\u5377\u4E2D",icon:null,className:"modal-footer-none",content:Ur(be)}),nt=setInterval(function(){be<=100?(be+=2,ft.update({content:Ur(be)})):(ft.destroy(),clearInterval(nt))},50)},bi=function(){var Wt=Object(I.a)(v.a.mark(function be(){var ft;return v.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return xa(),Mt.next=3,Object(xe.ab)({categoryId:at.categoryId,commit_method:1});case 3:ft=Mt.sent,Object(ne.b)(),J({type:"exercise/setActionTabs",payload:Object(T.a)({},{removeEventListenerExitScreen:!0})}),(ft==null?void 0:ft.status)===0&&(i.b.success(ft==null?void 0:ft.message),Hr(!1),setTimeout(function(){S.a.info({title:"\u4EA4\u5377\u6210\u529F\uFF01",okText:"\u786E\u5B9A",onOk:function(){mr()}})},3e3));case 7:case"end":return Mt.stop()}},be)}));return function(){return Wt.apply(this,arguments)}}(),ts=function(){var Wt=Object(I.a)(v.a.mark(function be(ft,nt,Mt,gt){return v.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:ai(nt,ft,null,function(){ye.question_status.find(function(kt){return kt.ques_id===nt}).ques_status=ft?1:0,gt.user_answer=[],gt.user_answer.push(ft),gt.repeat_answer||(gt.israp=!0),Ut(Object(T.a)({},ye))});case 1:case"end":return Nt.stop()}},be)}));return function(ft,nt,Mt,gt){return Wt.apply(this,arguments)}}(),ns=function(){var Wt=Object(I.a)(v.a.mark(function be(ft,nt,Mt,gt,It){return v.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:ai(gt.question_id,ft,null,function(){var Qt,Kt,Jt;gt.user_answer=[],gt.user_answer.push(ft);var vn=It==null||((Qt=It.sub_exercise_questions)===null||Qt===void 0)?void 0:Qt.filter(function(Tn){var cn;return((cn=Tn.user_answer)===null||cn===void 0?void 0:cn.length)===0});ye.question_status.find(function(Tn){return Tn.ques_id===nt}).ques_status=(vn==null?void 0:vn.length)===(It==null||((Kt=It.sub_exercise_questions)===null||Kt===void 0)?void 0:Kt.length)?0:(vn==null?void 0:vn.length)>0&&(vn==null?void 0:vn.length)<(It==null||((Jt=It.sub_exercise_questions)===null||Jt===void 0)?void 0:Jt.length)?2:1,Ut(Object(T.a)({},ye))});case 1:case"end":return kt.stop()}},be)}));return function(ft,nt,Mt,gt,It){return Wt.apply(this,arguments)}}(),rs=function(be,ft,nt){ai(ft,be,null,function(){nt.user_answer=be,nt.repeat_answer||(nt.israp=!0),ye.question_status.find(function(Mt){return Mt.ques_id===ft}).ques_status=be!=null&&be.length?1:0,Ut(Object(T.a)({},ye))})},Ta=function(be,ft,nt,Mt,gt){ai(nt,ft,be,function(){ye.question_status.find(function(Nt){return Nt.ques_id===nt}).ques_status=Mt.every(function(Nt){return!!Nt.answer_text})?1:ye.question_status.find(function(Nt){return Nt.ques_id===nt}).ques_status=Mt.some(function(Nt){return!!Nt.answer_text})?2:0;var It={choice_id:ft,answer_text:be};gt.user_answer.filter(function(Nt){return Nt.choice_id!=ft})?gt.user_answer.splice(ft-1,1,It):gt.user_answer.push(It),gt.repeat_answer||(gt.israp=!0),Ut(Object(T.a)({},ye))})},wa=function(be,ft,nt){ai(ft,null,be,function(){ye.question_status.find(function(Mt){return Mt.ques_id===ft}).ques_status=be?1:0,nt.user_answer=[],nt.user_answer.push(be),nt.repeat_answer||(nt.israp=!0),Ut(Object(T.a)({},ye))})},ci=function(be,ft){var nt,Mt,gt,It,Nt,kt;return x.a.createElement("div",null,x.a.createElement(c.a.Group,{disabled:!!(ye!=null&&ye.exercise.commit_status),defaultValue:be==null||((nt=be.user_answer)===null||nt===void 0)?void 0:nt[0],onChange:function(Kt){return ts(Kt.target.value,be==null?void 0:be.question_id,ft,be)},className:be.user_score&&"edu-radio-".concat(be.user_score===be.question_score?"green":"red")},be==null||((Mt=be.question_choices)===null||Mt===void 0)?void 0:Mt.map(function(Qt,Kt){var Jt,vn=be.question_type==2,Tn=vn?"":"".concat(Te[Kt],".");return x.a.createElement("div",{className:Le.a.answerWrap,key:Kt},x.a.createElement(c.a,{disabled:!be.repeat_answer&&(be==null||((Jt=be.user_answer)===null||Jt===void 0)?void 0:Jt.length)>0&&!be.israp,value:Qt==null?void 0:Qt.choice_id},x.a.createElement("span",{className:"mr3"},Tn),x.a.createElement(Ne.a,{style:{width:740},className:Le.a.renderHtml,value:Qt==null?void 0:Qt.choice_text})))})),Object(fe.s)()&&(ye==null||((gt=ye.exercise)===null||gt===void 0)?void 0:gt.answer_open)&&((ye==null||((It=ye.exercise)===null||It===void 0)?void 0:It.exercise_status)==3||(ye==null||((Nt=ye.exercise)===null||Nt===void 0)?void 0:Nt.user_exercise_status)==1)&&x.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",be==null||((kt=be.standard_answer)===null||kt===void 0)?void 0:kt.map(function(Qt,Kt){return x.a.createElement("span",null,Te[Number(Qt)-1])})))},Sa=function(be,ft,nt){var Mt;return x.a.createElement("div",null,be==null||((Mt=be.sub_exercise_questions)===null||Mt===void 0)?void 0:Mt.map(function(gt,It){var Nt,kt,Qt,Kt,Jt,vn;return x.a.createElement("div",null,x.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},x.a.createElement("span",{style:{flexShrink:0},className:"font18"},nt+1+"."+(It+1),"\uFF08\u5355\u9009\u9898\uFF09"),x.a.createElement(Ne.a,{value:gt==null?void 0:gt.question_title}),x.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",gt==null?void 0:gt.question_score,"\u5206\uFF09")),x.a.createElement(c.a.Group,{disabled:!!(ye!=null&&ye.exercise.commit_status),defaultValue:gt==null||((Nt=gt.user_answer)===null||Nt===void 0)?void 0:Nt[0],onChange:function(cn){return ns(cn.target.value,be==null?void 0:be.question_id,It,gt,be)},className:gt.user_score&&"edu-radio-".concat(gt.user_score===gt.question_score?"green":"red")},gt==null||((kt=gt.question_choices)===null||kt===void 0)?void 0:kt.map(function(Tn,cn){var or,Lr=gt.question_type==2,di=Lr?"":"".concat(Te[cn],".");return x.a.createElement("div",{className:Le.a.answerWrap,key:cn},x.a.createElement(c.a,{disabled:!gt.repeat_answer&&(gt==null||((or=gt.user_answer)===null||or===void 0)?void 0:or.length)>0,value:Tn==null?void 0:Tn.choice_id},x.a.createElement("span",{className:"mr3"},di),x.a.createElement(Ne.a,{style:{width:740},className:Le.a.renderHtml,value:Tn==null?void 0:Tn.choice_text})))})),Object(fe.s)()&&(ye==null||((Qt=ye.exercise)===null||Qt===void 0)?void 0:Qt.answer_open)&&((ye==null||((Kt=ye.exercise)===null||Kt===void 0)?void 0:Kt.exercise_status)==3||(ye==null||((Jt=ye.exercise)===null||Jt===void 0)?void 0:Jt.user_exercise_status)==1)&&x.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",gt==null||((vn=gt.standard_answer)===null||vn===void 0)?void 0:vn.map(function(Tn,cn){return x.a.createElement("span",null,Te[Number(Tn)-1])})))}))},Aa=function(be,ft){var nt,Mt,gt,It;return x.a.createElement("div",null,x.a.createElement(d.a.Group,{disabled:!!(ye!=null&&ye.exercise.commit_status),defaultValue:be==null?void 0:be.user_answer,onChange:function(kt){return rs(kt,be==null?void 0:be.question_id,be)},className:be.user_score&&"edu-checkbox-".concat(be.user_score===be.question_score?"green":"red")},be==null||((nt=be.question_choices)===null||nt===void 0)?void 0:nt.map(function(Nt,kt){var Qt,Kt="".concat(Te[kt],".");return x.a.createElement("div",{className:Le.a.answerWrap},x.a.createElement(d.a,{disabled:!be.repeat_answer&&(be==null||((Qt=be.user_answer)===null||Qt===void 0)?void 0:Qt.length)>0&&!be.israp,value:Nt==null?void 0:Nt.choice_id},x.a.createElement("span",{className:"mr3"},Kt),x.a.createElement(Ne.a,{className:Le.a.renderHtml,value:Nt==null?void 0:Nt.choice_text})))})),Object(fe.s)()&&(ye==null||((Mt=ye.exercise)===null||Mt===void 0)?void 0:Mt.answer_open)&&(ye==null||((gt=ye.exercise)===null||gt===void 0)?void 0:gt.exercise_status)==3&&x.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",be==null||((It=be.standard_answer)===null||It===void 0)?void 0:It.map(function(Nt,kt){return x.a.createElement("span",null,Te[Number(Nt)-1])})))},Ji=function(be,ft){return x.a.createElement(Ke,{item:be,answerData:ye,onBlur:function(Mt,gt,It){return Ta(Mt,gt,be==null?void 0:be.question_id,It,be)}})},Ri=function(be,ft){return x.a.createElement(Ye,{item:be,answerData:ye,onBlur:function(Mt){return wa(Mt,be==null?void 0:be.question_id,be)}})},Ca=function(be,ft){return x.a.createElement(ut,{item:be,answerData:ye})},Zi=function(be,ft){return x.a.createElement(Pe,{item:be,answerData:ye})},er=function(be,ft,nt){var Mt,gt,It=ye==null||((Mt=ye.exercise_question_types)===null||Mt===void 0)?void 0:Mt.find(function(Nt){return Nt.question_type===ft});return x.a.createElement(x.a.Fragment,null,x.a.createElement("h1",{className:"font14 current",onClick:function(){ur[ft]=!ur[ft],Bn(Object(T.a)({},ur))}},!ur[ft]&&x.a.createElement(w.a,null),ur[ft]&&x.a.createElement(Y.a,null),x.a.createElement("span",{className:"ml5 c-grey-666"},be)),x.a.createElement("ul",{className:Le.a.answerSheet,key:ft},!ur[ft]&&(It==null||((gt=It.items)===null||gt===void 0)?void 0:gt.map(function(Nt,kt){if(Nt.question_type===ft){var Qt,Kt;return x.a.createElement("li",{onClick:function(){var vn;if(ye.exercise_question_types[rn].items[an].israp=!1,Ut(Object(T.a)({},ye)),!$r&&(ye==null||((vn=ye.exercise)===null||vn===void 0)?void 0:vn.user_exercise_status)===0&&Object(fe.s)()){var Tn,cn,or,Lr;if(!((Tn=ye.exercise_question_types)!==null&&Tn!==void 0&&(cn=Tn[rn])!==null&&cn!==void 0&&(or=cn.items)!==null&&or!==void 0&&(Lr=or[an])!==null&&Lr!==void 0&&Lr.repeat_answer)){$n(!0),Vi(3),Za({oneindex:nt,twoindex:kt});return}}mn(nt),Zr(kt);var di="Anchor_".concat(ft,"_").concat(kt),Ia=document.getElementById(di);Ia&&setTimeout(function(){return Ia.scrollIntoView({block:"start",behavior:"smooth"})})},key:kt,className:(ye==null||((Qt=ye.question_status)===null||Qt===void 0)?void 0:Qt.some(function(Jt){return Jt.ques_id===Nt.question_id&&(Jt==null?void 0:Jt.ques_status)===1}))&&Le.a.active},kt+1,(ye==null||((Kt=ye.question_status)===null||Kt===void 0)?void 0:Kt.some(function(Jt){return Jt.ques_id===Nt.question_id&&(Jt==null?void 0:Jt.ques_status)===2}))&&x.a.createElement("div",{style:{height:3,background:"#0152d9",position:"absolute",width:26,bottom:0}}))}}))))},Oa=function(be,ft){var nt,Mt,gt,It,Nt,kt,Qt=(be==null?void 0:be.question_type)==5?be==null?void 0:be.shixun_name:be==null?void 0:be.question_title;return x.a.createElement("div",{className:Le.a.questionItem,id:"Anchor_".concat(be==null?void 0:be.question_type,"_").concat(ft)},x.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},x.a.createElement("span",{style:{flexShrink:0},className:"font18"},ft+1,"."),x.a.createElement(Ne.a,{value:be==null?void 0:be.question_title}),x.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",(be==null?void 0:be.question_type)===7?"\u5171".concat(be==null||((nt=be.sub_exercise_questions)===null||nt===void 0)?void 0:nt.length,"\u5C0F\u9898\uFF0C"):"",be==null?void 0:be.question_score,"\u5206\uFF09"),!(be!=null&&be.repeat_answer)&&x.a.createElement("span",{style:{color:"#FA6400 ",marginLeft:10,fontSize:16}},"\u6CE8\u610F\uFF1A\u8BE5\u9898\u4E0D\u5141\u8BB8\u91CD\u590D\u7B54\u9898"),!!(be!=null&&(Mt=be.schools)!==null&&Mt!==void 0&&Mt.length)&&x.a.createElement(m.a,{title:"\u8BE5\u5B9E\u8BAD\u9898\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},x.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"}))),(be==null?void 0:be.question_type)==0&&ci(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==2&&ci(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==1&&Aa(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==3&&Ji(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==4&&Ri(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==5&&Ca(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==6&&Zi(be,be==null?void 0:be.question_type),(be==null?void 0:be.question_type)==7&&Sa(be,be==null?void 0:be.question_type,ft),!!(be!=null&&(gt=be.answer_comments)!==null&&gt!==void 0&&gt.length)&&x.a.createElement("div",{className:"mt30"},be==null||((It=be.answer_comments)===null||It===void 0)?void 0:It.map(function(Kt,Jt){var vn,Tn;return x.a.createElement("div",null,x.a.createElement(H.a,{align:"middle",gutter:[0,10]},x.a.createElement(D.a,{flex:"50px"},x.a.createElement("img",{src:ie.a.API_SERVER+"/images/"+((vn=Kt.user)===null||vn===void 0?void 0:vn.image_url),width:"40",style:{borderRadius:40}})),x.a.createElement(D.a,{flex:"1"},Kt.updated_at,x.a.createElement("br",null),(Tn=Kt.user)===null||Tn===void 0?void 0:Tn.name),x.a.createElement(D.a,{className:"c-grey-c"},Kt.shixun_chanllge_position&&x.a.createElement("span",null,"\u7B2C",Kt.shixun_chanllge_position,"\u5173"),be.question_type!==4&&x.a.createElement("span",null,"\u539F\u59CB\u5F97\u5206",Kt.origin_score,"\u5206 \uFF0C")," ","\u4FEE\u6B63\u4E3A",Kt.score,"\u5206")),Kt.comment&&x.a.createElement(H.a,{align:"middle",gutter:[0,10]},x.a.createElement(D.a,{flex:"50px"}),x.a.createElement(D.a,{flex:"1"},x.a.createElement(ve,{autoSize:!0,value:Kt.comment,disabled:!0}))))})),x.a.createElement("div",{className:Le.a.itemType},x.a.createElement(H.a,null,x.a.createElement(D.a,{flex:"1"}),x.a.createElement(D.a,null,(be==null?void 0:be.question_type)<3&&(be==null?void 0:be.standard_answer_show)&&x.a.createElement("span",{className:"font16 ml20"},"\u6B63\u786E\u7B54\u6848\uFF1A",be==null?void 0:be.standard_answer_show),x.a.createElement("span",{className:"font16 ml20"},(be==null?void 0:be.user_score)!==null&&(be==null?void 0:be.user_score)>=0&&x.a.createElement("span",null,x.a.createElement("span",{className:xt[Number(be==null?void 0:be.answer_status)]||"c-orange-ff9"},be==null?void 0:be.user_score)," ","\u5206")),(be==null?void 0:be.question_type)==5&&!((Nt=ye.exercise)!==null&&Nt!==void 0&&Nt.commit_status)&&x.a.createElement(M.a,{type:"primary",className:"font16 ml20",onClick:function(){return es(be)}},"\u8FDB\u5165\u7B54\u9898"),(be==null?void 0:be.question_type)==6&&!((kt=ye.exercise)!==null&&kt!==void 0&&kt.commit_status)&&x.a.createElement(M.a,{type:"primary",className:"font16 ml20",onClick:function(){return _a(be)}},"\u8FDB\u5165\u7B54\u9898")))))},qi=function(be,ft){return x.a.createElement(P.Fragment,null,be.question_type===0&&er("\u5355\u9009\u9898",0,ft),be.question_type===1&&er("\u591A\u9009\u9898",1,ft),be.question_type===2&&er("\u5224\u65AD\u9898",2,ft),be.question_type===3&&er("\u586B\u7A7A\u9898",3,ft),be.question_type===4&&er("\u7B80\u7B54\u9898",4,ft),be.question_type===5&&er("\u5B9E\u8BAD\u9898",5,ft),be.question_type===6&&er("\u7F16\u7A0B\u9898",6,ft),be.question_type===7&&er("\u7EC4\u5408\u9898",7,ft))},$i=function(be){var ft=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],nt=["","\u5341","\u767E","\u5343","\u4E07"];be=parseInt(be);var Mt=function(kt){for(var Qt=kt.toString().split("").reverse(),Kt="",Jt=0;Jt<Qt.length;Jt++)Kt=(Jt==0&&Qt[Jt]==0||Jt>0&&Qt[Jt]==0&&Qt[Jt-1]==0?"":ft[Qt[Jt]]+(Qt[Jt]==0?nt[0]:nt[Jt]))+Kt;return Kt},gt=Math.floor(be/1e4),It=be%1e4;return It.toString().length<4&&(It="0"+It),gt?Mt(gt)+"\u4E07"+Mt(It):Mt(be)},Ra=function(){var be,ft,nt,Mt,gt,It,Nt,kt,Qt,Kt,Jt,vn,Tn;return x.a.createElement(P.Fragment,{key:rn},x.a.createElement("div",{className:"pt20"},x.a.createElement("span",{className:"font16 c-light-primary"},$i(rn+1),"\u3001",ye==null||((be=ye.exercise_question_types)===null||be===void 0||((ft=be[rn])===null||ft===void 0))?void 0:ft.name),x.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",ye==null||((nt=ye.exercise_question_types)===null||nt===void 0||((Mt=nt[rn])===null||Mt===void 0))?void 0:Mt.count,"\u9898\uFF1B",(ye==null||((gt=ye.exercise_question_types)===null||gt===void 0||((It=gt[rn])===null||It===void 0))?void 0:It.question_type)===7?"\u5305\u542B".concat(ye==null||((Nt=ye.exercise_question_types)===null||Nt===void 0||((kt=Nt[rn])===null||kt===void 0))?void 0:kt.sub_questions_count,"\u5C0F\u9898"):""," ","\u5171",ye==null||((Qt=ye.exercise_question_types)===null||Qt===void 0||((Kt=Qt[rn])===null||Kt===void 0))?void 0:Kt.score,"\u5206\uFF09")),x.a.createElement(P.Fragment,{key:an},Oa(ye==null||((Jt=ye.exercise_question_types)===null||Jt===void 0||((vn=Jt[rn])===null||vn===void 0||((Tn=vn.items)===null||Tn===void 0)))?void 0:Tn[an],an)))};return x.a.createElement(z.a,{size:"large",spinning:Cr},sn&&x.a.createElement(de.a,{iframe:kn}),x.a.createElement("iframe",{style:{display:Jr},id:"iframeShixuns",className:Le.a.iframe,src:Dr,ref:kn,frameBorder:"0"}),x.a.createElement("section",{className:"edu-container"},x.a.createElement("section",{className:"animated fadeIn"},x.a.createElement("aside",{className:"mt10"},k.showHeaderFooter&&at.coursesId!=="coursesId"&&x.a.createElement(V.a,{separator:">"},x.a.createElement(V.a.Item,null,x.a.createElement(j.a,{to:"/classrooms/".concat(at.coursesId,"/exercise")},(le=te.userInfo)===null||le===void 0||((pe=le.course)===null||pe===void 0)?void 0:pe.course_name)),x.a.createElement(V.a.Item,null,x.a.createElement(j.a,{to:"/classrooms/".concat(at.coursesId,"/exercise")},"\u8BD5\u5377")),x.a.createElement(V.a.Item,null,x.a.createElement(j.a,{to:"/classrooms/".concat(at.coursesId,"/exercise/").concat(at.categoryId,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),x.a.createElement(V.a.Item,null,($e=te.userInfo)===null||$e===void 0?void 0:$e.real_name)),k.showHeaderFooter&&at.coursesId==="coursesId"&&x.a.createElement(V.a,{separator:">"},x.a.createElement(V.a.Item,null,x.a.createElement(j.a,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")),x.a.createElement(V.a.Item,null,(je=te.userInfo)===null||je===void 0?void 0:je.real_name))),x.a.createElement("aside",{className:[Le.a.title,"mt10"].join(" ")},x.a.createElement(H.a,{style:{width:"100%"},align:"middle"},x.a.createElement(D.a,{flex:"1"},x.a.createElement("div",{className:Le.a.title},(k==null?void 0:k.showHeaderFooter)&&x.a.createElement(j.a,{to:at.coursesId==="coursesId"?"/paperlibrary":"/classrooms/".concat(at.coursesId,"/exercise/").concat(at.categoryId,"/detail")},x.a.createElement($.a,{className:"font16 c-black"})),x.a.createElement("strong",{className:"font24 ml5"},ye==null||((Je=ye.exercise)===null||Je===void 0)?void 0:Je.exercise_name),(ye==null||((mt=ye.exercise)===null||mt===void 0)?void 0:mt.is_random)&&x.a.createElement("span",{className:Le.a.randomFlag},"\u968F\u673A"),x.a.createElement(Fe.m,{status:[Fe.c[99]]}))),x.a.createElement(D.a,{style:{display:"flex"}},(ye==null||((We=ye.user_score)===null||We===void 0)?void 0:We.length)&&x.a.createElement("div",null,"\u6A21\u62DF\u8003\u8BD5\u603B\u5F97\u5206\uFF1A",x.a.createElement("span",{className:"c-red"},ye==null?void 0:ye.user_score)," \u5206"),!!(ye!=null&&(it=ye.exercise)!==null&&it!==void 0&&it.time)&&!(ye!=null&&(st=ye.exercise)!==null&&st!==void 0&&st.commit_status)&&x.a.createElement("aside",{className:"".concat(Le.a.countDown," ").concat(tn)},"\u5269\u4F59\u65F6\u95F4:",x.a.createElement(he,{value:bn,onFinish:ii})),!(ye!=null&&(ct=ye.exercise)!==null&&ct!==void 0&&ct.commit_status)&&x.a.createElement(M.a,{className:Le.a.submitButton,style:{marginLeft:20},type:"primary",onClick:function(){return ui(!1)}},"\u4EA4\u5377"))))),An.status===0&&x.a.createElement(H.a,{className:"mt10"},x.a.createElement(D.a,{flex:yr?"316px":"16px"},x.a.createElement("section",{style:{position:"sticky",top:0,zIndex:1}},Nr&&x.a.createElement(oe.a,{number:(ye==null||((bt=ye.exercise)===null||bt===void 0)?void 0:bt.photo_count)-(ye==null||((jt=ye.exercise)===null||jt===void 0)?void 0:jt.take_photo),time:(en=ye.exercise)===null||en===void 0?void 0:en.left_time,update:ti,supportCamera:function(be){be===2?(ti(),Ln(Hn==null?void 0:Hn.screen_open)):be===1&&setTimeout(function(){return Ie.history.push("/")},3e3)}}),x.a.createElement("div",{className:"relative",style:{minHeight:236}},yr&&x.a.createElement("aside",{className:"bg-white p16"},x.a.createElement(H.a,null,x.a.createElement(D.a,{span:8},x.a.createElement("span",{className:"font16 blod"},"\u7B54\u9898\u5361")),x.a.createElement(D.a,{span:16},x.a.createElement("div",{className:"tr",style:{display:"flex",alignItems:"center",justifyContent:"end"}},x.a.createElement("span",{className:Le.a.answerYes}),"\u5DF2\u7B54",x.a.createElement("span",{style:{width:13,height:13,display:"flex",flexDirection:"column-reverse"},className:"".concat(Le.a.answerNo," ml10")},x.a.createElement("div",{style:{height:"10%",background:"#0152d9"}})),"\u90E8\u5206\u7B54\u9898",x.a.createElement("span",{className:"".concat(Le.a.answerNo," ml10")}),"\u672A\u7B54"))),x.a.createElement("aside",{className:Le.a.answerInfo},x.a.createElement(H.a,null,x.a.createElement(x.a.Fragment,null,x.a.createElement(D.a,{span:12},"\u7B54\u9898\u8FDB\u5EA6"),x.a.createElement(D.a,{span:12,className:"tr c-blue"},ye==null||((Yt=ye.question_status)===null||Yt===void 0||((Ct=Yt.filter(function(Wt){return(Wt==null?void 0:Wt.ques_status)===1}))===null||Ct===void 0))?void 0:Ct.length," ","/ ",ye==null||((pn=ye.exercise_types)===null||pn===void 0)?void 0:pn.q_counts),x.a.createElement(D.a,{span:24},x.a.createElement(l.a,{trailColor:"#c3ced2",percent:(ye==null||((Rt=ye.question_status)===null||Rt===void 0||((zt=Rt.filter(function(Wt){return(Wt==null?void 0:Wt.ques_status)===1}))===null||zt===void 0))?void 0:zt.length)/(ye==null||((Pt=ye.exercise_types)===null||Pt===void 0)?void 0:Pt.q_counts)*100,showInfo:!1}))),x.a.createElement(D.a,null,x.a.createElement("span",{className:"c-grey-333"},"\u5171"," ",x.a.createElement("span",{className:"c-blue-4ca"},(ye==null||((qt=ye.exercise_types)===null||qt===void 0)?void 0:qt.q_counts)||(ye==null||((yn=ye.exercise_scores)===null||yn===void 0||((wn=yn.exercise_types)===null||wn===void 0))?void 0:wn.q_counts))," ","\u9898\uFF1A"),x.a.createElement("span",{className:"c-grey-333"},"\u6EE1\u5206"," ",x.a.createElement("span",{className:"c-blue-4ca"},(ye==null||((yt=ye.exercise_types)===null||yt===void 0)?void 0:yt.q_scores)||(ye==null||((Vt=ye.exercise_scores)===null||Vt===void 0||((Mn=Vt.exercise_types)===null||Mn===void 0))?void 0:Mn.q_scores))," ","\u5206")))),x.a.createElement(H.a,null,x.a.createElement(D.a,{flex:"1"},x.a.createElement("aside",{className:Le.a.cardList},ye==null||((Un=ye.exercise_question_types)===null||Un===void 0)?void 0:Un.map(function(Wt,be){return x.a.createElement(P.Fragment,{key:Wt.question_type},qi(Wt,be))}))))),x.a.createElement("div",{className:Le.a.fold,onClick:function(){return Qr(!yr)}},yr&&x.a.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"}),!yr&&x.a.createElement("span",{className:"icon-youjiantou iconfont c-grey-c"}))))),x.a.createElement(D.a,{flex:"1"},x.a.createElement("section",{className:[Le.a.bg,"pl30","pr30","pb30","mb50","ml20"].join(" ")},x.a.createElement("div",{style:{maxHeight:600,overflow:"hidden auto"}},Ra()),x.a.createElement("div",{style:{marginTop:60,textAlign:"center"}},(rn!=0||an!=0)&&x.a.createElement(M.a,{className:"".concat(Le.a.submitButton," mr10"),type:"default",onClick:function(){var be;if(ye.exercise_question_types[rn].items[an].israp=!1,Ut(Object(T.a)({},ye)),!$r&&(ye==null||((be=ye.exercise)===null||be===void 0)?void 0:be.user_exercise_status)===0&&Object(fe.s)()){var ft,nt,Mt,gt;if(!((ft=ye.exercise_question_types)!==null&&ft!==void 0&&(nt=ft[rn])!==null&&nt!==void 0&&(Mt=nt.items)!==null&&Mt!==void 0&&(gt=Mt[an])!==null&&gt!==void 0&&gt.repeat_answer)){$n(!0),Vi(1);return}}an===0?(rn-=1,an=ye.exercise_question_types[rn].items.length-1):an-=1,mn(rn),Zr(an)}},"\u4E0A\u4E00\u9898"),!(rn===(ye==null||((Pn=ye.exercise_question_types)===null||Pn===void 0)?void 0:Pn.length)-1&&an===(ye==null||((Vn=ye.exercise_question_types)===null||Vn===void 0||((Q=Vn[rn])===null||Q===void 0||((L=Q.items)===null||L===void 0)))?void 0:L.length)-1)&&x.a.createElement(M.a,{className:Le.a.submitButton,type:"primary",onClick:function(){var be;if(ye.exercise_question_types[rn].items[an].israp=!1,Ut(Object(T.a)({},ye)),!$r&&(ye==null||((be=ye.exercise)===null||be===void 0)?void 0:be.user_exercise_status)===0&&Object(fe.s)()){var ft,nt,Mt,gt;if(!((ft=ye.exercise_question_types)!==null&&ft!==void 0&&(nt=ft[rn])!==null&&nt!==void 0&&(Mt=nt.items)!==null&&Mt!==void 0&&(gt=Mt[an])!==null&&gt!==void 0&&gt.repeat_answer)){$n(!0),Vi(2);return}}ye.exercise_question_types[rn].items.length-1===an?(rn=rn+1,an=0):an=an+1,mn(rn),Zr(an)}},"\u4E0B\u4E00\u9898")))),x.a.createElement(S.a,{title:"\u6CE8\u610F",visible:En,onCancel:function(){return $n(!1)},footer:!1},x.a.createElement("div",null,x.a.createElement("p",{style:{marginBottom:0}},"\u79BB\u5F00\u8BE5\u9898\u540E\u4E0D\u5141\u8BB8\u518D\u6B21\u4FEE\u6539\u7B54\u6848\uFF0C\u786E\u8BA4\u79BB\u5F00\u5417\uFF1F"),x.a.createElement("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between"}},x.a.createElement(d.a,{checked:$r,onChange:function(be){Ai(be.target.checked)}},"\u4E0B\u6B21\u4E0D\u518D\u663E\u793A"),x.a.createElement("div",null,x.a.createElement(M.a,{onClick:function(){ye.exercise_question_types[rn].items[an].israp?(ye.exercise_question_types[rn].items[an].israp=!0,Ut(Object(T.a)({},ye))):ye.exercise_question_types[rn].items[an].israp===""&&(ye.exercise_question_types[rn].items[an].israp=!0,Ut(Object(T.a)({},ye)))}},"\u6211\u518D\u60F3\u60F3"),x.a.createElement(M.a,{onClick:function(){ye.exercise_question_types[rn].items[an].israp=!1,Ut(Object(T.a)({},ye)),zi===1?(an===0?(rn-=1,an=ye.exercise_question_types[rn].items.length-1):an-=1,console.log(ye.exercise_question_types[rn].items[an],"-----"),mn(rn),Zr(an)):zi===2?(ye.exercise_question_types[rn].items.length-1===an?(rn=rn+1,an=0):an=an+1,mn(rn),Zr(an)):(mn(Xi.oneindex),Zr(Xi.twoindex)),$n(!1)},type:"primary",style:{marginLeft:30}},"\u786E\u8BA4")))))),An.status!==0&&x.a.createElement(Ee,{data:An})))},vt=se.default=Object(B.a)(function(qe){var Qe=qe.loading,Ue=qe.user,le=qe.globalSetting;return{globalSetting:le,user:Ue,loading:Qe.effects}})(wt)},cRFk:function(Ve,se,U){Ve.exports=U.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Ve,se,U){Ve.exports=U.p+"static/choose.4ad1045f.svg"},dejd:function(Ve,se,U){},djh8:function(Ve,se,U){Ve.exports=U.p+"static/qrCode.d852fdfc.png"},dmUQ:function(Ve,se,U){"use strict";var Z=U("Ff2n"),z=U("rePB"),N=U("1OyB"),V=U("vuIU"),W=U("Ji7U"),M=U("md7G"),K=U("foSv"),H=U("q1tI"),n=U.n(H),D=U("TSYQ"),b=U.n(D),m=U("4IlW");function f(p,h){var A=Object.keys(p);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(p);h&&(_=_.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),A.push.apply(A,_)}return A}function d(p){for(var h=1;h<arguments.length;h++){var A=arguments[h]!=null?arguments[h]:{};h%2?f(Object(A),!0).forEach(function(_){Object(z.a)(p,_,A[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(A)):f(Object(A)).forEach(function(_){Object.defineProperty(p,_,Object.getOwnPropertyDescriptor(A,_))})}return p}function u(p){var h=c();return function(){var _=Object(K.a)(p),v;if(h){var P=Object(K.a)(this).constructor;v=Reflect.construct(_,arguments,P)}else v=_.apply(this,arguments);return Object(M.a)(this,v)}}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(p){return!1}}function o(){}function l(p){p.preventDefault()}var a=function(h){return h.replace(/[^\w.-]+/g,"")},i=200,R=600,S=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,T=function(h){return h!=null},I=function(h,A){return A===h||typeof A=="number"&&typeof h=="number"&&isNaN(A)&&isNaN(h)},O=function(p){Object(W.a)(A,p);var h=u(A);function A(_){var v;Object(N.a)(this,A),v=h.call(this,_),v.onKeyDown=function(C){var j=v.props,B=j.onKeyDown,w=j.onPressEnter;if(C.keyCode===m.a.UP){var Y=v.getRatio(C);v.up(C,Y,null),v.stop()}else if(C.keyCode===m.a.DOWN){var $=v.getRatio(C);v.down(C,$,null),v.stop()}else C.keyCode===m.a.ENTER&&w&&w(C);if(v.recordCursorPosition(),v.lastKeyCode=C.keyCode,B){for(var oe=arguments.length,de=new Array(oe>1?oe-1:0),Be=1;Be<oe;Be++)de[Be-1]=arguments[Be];B.apply(void 0,[C].concat(de))}},v.onKeyUp=function(C){var j=v.props.onKeyUp;if(v.stop(),v.recordCursorPosition(),j){for(var B=arguments.length,w=new Array(B>1?B-1:0),Y=1;Y<B;Y++)w[Y-1]=arguments[Y];j.apply(void 0,[C].concat(w))}},v.onChange=function(C){var j=v.props.onChange;v.state.focused&&(v.inputting=!0),v.rawInput=v.props.parser(v.getValueFromEvent(C)),v.setState({inputValue:v.rawInput}),j(v.toNumber(v.rawInput))},v.onMouseUp=function(){var C=v.props.onMouseUp;v.recordCursorPosition(),C&&C.apply(void 0,arguments)},v.onFocus=function(){var C;v.setState({focused:!0}),(C=v.props).onFocus.apply(C,arguments)},v.onBlur=function(){var C=v.props.onBlur;v.inputting=!1,v.setState({focused:!1});var j=v.getCurrentValidValue(v.state.inputValue),B=v.setValue(j,o);if(C){var w=v.input.value,Y=v.getInputDisplayValue({focus:!1,value:B});v.input.value=Y&&Number(Y),C.apply(void 0,arguments),v.input.value=w}},v.getRatio=function(C){var j=1;return C.metaKey||C.ctrlKey?j=.1:C.shiftKey&&(j=10),j},v.getFullNum=function(C){return isNaN(C)?C:/e/i.test(String(C))?Number(C).toFixed(18).replace(/\.?0+$/,""):C},v.getPrecision=function(C){if(T(v.props.precision))return v.props.precision;var j=String(C);if(j.indexOf("e-")>=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var B=0;return j.indexOf(".")>=0&&(B=j.length-j.indexOf(".")-1),B},v.getInputDisplayValue=function(C){var j=C||v.state,B=j.focused,w=j.inputValue,Y=j.value,$;B?$=w:$=v.toPrecisionAsStep(Y),$==null&&($="");var oe=v.formatWrapper($);return T(v.props.decimalSeparator)&&(oe=oe.toString().replace(".",v.props.decimalSeparator)),oe},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(C){}},v.restoreByAfter=function(C){if(C===void 0)return!1;var j=v.input.value,B=j.lastIndexOf(C);if(B===-1)return!1;var w=v.cursorBefore.length;return v.lastKeyCode===m.a.DELETE&&v.cursorBefore.charAt(w-1)===C[0]?(v.fixCaret(w,w),!0):B+C.length===j.length?(v.fixCaret(B,B),!0):!1},v.partRestoreByAfter=function(C){return C===void 0?!1:Array.prototype.some.call(C,function(j,B){var w=C.substring(B);return v.restoreByAfter(w)})},v.isNotCompleteNumber=function(C){return isNaN(C)||C===""||C===null||C&&C.toString().indexOf(".")===C.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(C,j,B){v.pressingUpOrDown=!0,v.step("down",C,j,B)},v.up=function(C,j,B){v.pressingUpOrDown=!0,v.step("up",C,j,B)},v.saveInput=function(C){v.input=C};var P=_.value;P===void 0&&(P=_.defaultValue),v.state={focused:_.autoFocus};var x=v.getValidValue(v.toNumber(P));return v.state=d(d({},v.state),{},{inputValue:v.toPrecisionAsStep(x),value:x}),v}return Object(V.a)(A,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var P=this.props,x=P.value,C=P.onChange,j=P.max,B=P.min,w=this.state.focused;if(v){if(!I(v.value,x)||!I(v.max,j)||!I(v.min,B)){var Y=w?x:this.getValidValue(x),$;this.pressingUpOrDown?$=Y:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:$})}var oe="value"in this.props?x:this.state.value;"max"in this.props&&v.max!==j&&typeof oe=="number"&&oe>j&&C&&C(j),"min"in this.props&&v.min!==B&&typeof oe=="number"&&oe<B&&C&&C(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===m.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===m.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case m.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case m.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Be){}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(v){var P=v;return P===""?P="":this.isNotCompleteNumber(parseFloat(P))?P=this.state.value:P=this.getValidValue(P),this.toNumber(P)}},{key:"getValueFromEvent",value:function(v){var P=v.target.value.trim().replace(/。/g,".");return T(this.props.decimalSeparator)&&(P=P.replace(this.props.decimalSeparator,".")),P}},{key:"getValidValue",value:function(v){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,C=parseFloat(v);return isNaN(C)?v:(C<P&&(C=P),C>x&&(C=x),C)}},{key:"setValue",value:function(v,P){var x=this.props.precision,C=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),j=this.state.value,B=j===void 0?null:j,w=this.state.inputValue,Y=w===void 0?null:w,$=typeof C=="number"?C.toFixed(x):"".concat(C),oe=C!==B||$!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},P)):this.setState({value:C,inputValue:this.toPrecisionAsStep(v)},P),oe&&this.props.onChange(C),C}},{key:"getMaxPrecision",value:function(v){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,x=this.props,C=x.precision,j=x.step;if(T(C))return C;var B=this.getPrecision(P),w=this.getPrecision(j),Y=this.getPrecision(v);return v?Math.max(Y,B+w):B+w}},{key:"getPrecisionFactor",value:function(v){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,x=this.getMaxPrecision(v,P);return Math.pow(10,x)}},{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(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var P=Math.abs(this.getMaxPrecision(v));return isNaN(P)?v.toString():Number(v).toFixed(P)}},{key:"toNumber",value:function(v){var P=this.props.precision,x=this.state.focused,C=v&&v.length>16&&x;return this.isNotCompleteNumber(v)||C?v:T(P)?Math.round(v*Math.pow(10,P))/Math.pow(10,P):Number(v)}},{key:"upStep",value:function(v,P){var x=this.props.step,C=this.getPrecisionFactor(v,P),j=Math.abs(this.getMaxPrecision(v,P)),B=((C*v+C*x*P)/C).toFixed(j);return this.toNumber(B)}},{key:"downStep",value:function(v,P){var x=this.props.step,C=this.getPrecisionFactor(v,P),j=Math.abs(this.getMaxPrecision(v,P)),B=((C*v-C*x*P)/C).toFixed(j);return this.toNumber(B)}},{key:"step",value:function(v,P){var x=this,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var B=this.props;if(B.disabled)return;var w=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(w))return;var Y=this["".concat(v,"Step")](w,C),$=Y>B.max||Y<B.min;if(Y>B.max?Y=B.max:Y<B.min&&(Y=B.min),this.setValue(Y,null),this.setState({focused:!0},function(){x.pressingUpOrDown=!1}),$)return;this.autoStepTimer=setTimeout(function(){x[v](P,C,!0)},j?i:R)}},{key:"fixCaret",value:function(v,P){if(v===void 0||P===void 0||!this.input||!this.input.value)return;try{var x=this.input.selectionStart,C=this.input.selectionEnd;(v!==x||P!==C)&&this.input.setSelectionRange(v,P)}catch(j){}}},{key:"render",value:function(){var v,P=this.props,x=P.prefixCls,C=P.disabled,j=P.readOnly,B=P.useTouch,w=P.autoComplete,Y=P.upHandler,$=P.downHandler,oe=P.className,de=P.max,Be=P.min,Ae=P.style,Re=P.title,Le=P.onMouseEnter,Fe=P.onMouseLeave,me=P.onMouseOver,fe=P.onMouseOut,ne=P.required,xe=P.onClick,ce=P.tabIndex,Ne=P.type,He=P.placeholder,ke=P.id,Ye=P.inputMode,et=P.pattern,ue=P.step,_e=P.maxLength,Oe=P.autoFocus,Me=P.name,rt=P.onPaste,dt=P.onInput,pt=Object(Z.a)(P,["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"]),ut=this.state,_t=ut.value,Tt=ut.focused,Pe=b()(x,(v={},Object(z.a)(v,oe,!!oe),Object(z.a)(v,"".concat(x,"-disabled"),C),Object(z.a)(v,"".concat(x,"-focused"),Tt),v)),Ce={};Object.keys(pt).forEach(function(ve){(ve.substr(0,5)==="data-"||ve.substr(0,5)==="aria-"||ve==="role")&&(Ce[ve]=pt[ve])});var tt=!j&&!C,lt=this.getInputDisplayValue(null),Ke=(_t||_t===0)&&(isNaN(_t)||Number(_t)>=de),Xe=(_t||_t===0)&&(isNaN(_t)||Number(_t)<=Be),Se=Ke||C||j,ge=Xe||C||j,Ee=b()("".concat(x,"-handler"),"".concat(x,"-handler-up"),Object(z.a)({},"".concat(x,"-handler-up-disabled"),Se)),ie=b()("".concat(x,"-handler"),"".concat(x,"-handler-down"),Object(z.a)({},"".concat(x,"-handler-down-disabled"),ge)),ae=B?{onTouchStart:Se?o:this.up,onTouchEnd:this.stop}:{onMouseDown:Se?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=B?{onTouchStart:ge?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ge?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:Pe,style:Ae,title:Re,onMouseEnter:Le,onMouseLeave:Fe,onMouseOver:me,onMouseOut:fe,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(x,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},ae,{role:"button","aria-label":"Increase Value","aria-disabled":Se,className:Ee}),Y||n.a.createElement("span",{unselectable:"on",className:"".concat(x,"-handler-up-inner"),onClick:l})),n.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Decrease Value","aria-disabled":ge,className:ie}),$||n.a.createElement("span",{unselectable:"on",className:"".concat(x,"-handler-down-inner"),onClick:l}))),n.a.createElement("div",{className:"".concat(x,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Be,"aria-valuemax":de,"aria-valuenow":_t,required:ne,type:Ne,placeholder:He,onPaste:rt,onClick:xe,onMouseUp:this.onMouseUp,className:"".concat(x,"-input"),tabIndex:ce,autoComplete:w,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:o,onKeyUp:tt?this.onKeyUp:o,autoFocus:Oe,maxLength:_e,readOnly:j,disabled:C,max:de,min:Be,step:ue,name:Me,title:Re,id:ke,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:et,inputMode:Ye,onInput:dt},Ce))))}}]),A}(n.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:a,required:!1,autoComplete:"off"};var E=O,y=se.a=E},fjLI:function(Ve,se,U){"use strict";U.d(se,"f",function(){return f}),U.d(se,"b",function(){return d}),U.d(se,"a",function(){return u}),U.d(se,"d",function(){return c}),U.d(se,"e",function(){return o}),U.d(se,"c",function(){return l});var Z=U("8HAY"),z=U("Vhoy"),N=U("MI8n"),V=U("JYp7"),W=U("pmY6"),M=U("24hK"),K=U("nnTU"),H=U("T8No"),n=U("Cg/j"),D=U("t9D7"),b=function(a,i,R,S){var T=arguments.length,I=T<3?i:S===null?S=Object.getOwnPropertyDescriptor(i,R):S,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(a,i,R,S);else for(var E=a.length-1;E>=0;E--)(O=a[E])&&(I=(T<3?O(I):T>3?O(i,R,I):O(i,R))||I);return T>3&&I&&Object.defineProperty(i,R,I),I},m=function(a,i){return function(R,S){i(R,S,a)}};function f(a){return a.command!==void 0}class d{constructor(a){this.id=d._idPool++,this._debugName=a}}d._idPool=0,d.CommandPalette=new d("CommandPalette"),d.EditorContext=new d("EditorContext"),d.SimpleEditorContext=new d("SimpleEditorContext"),d.EditorContextCopy=new d("EditorContextCopy"),d.EditorContextPeek=new d("EditorContextPeek"),d.MenubarEditMenu=new d("MenubarEditMenu"),d.MenubarCopy=new d("MenubarCopy"),d.MenubarGoMenu=new d("MenubarGoMenu"),d.MenubarSelectionMenu=new d("MenubarSelectionMenu"),d.InlineCompletionsActions=new d("InlineCompletionsActions");const u=Object(n.c)("menuService"),c=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new N.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:a=>a===d.CommandPalette}}addCommand(a){return this.addCommands(V.a.single(a))}addCommands(a){for(const i of a)this._commands.set(i.id,i);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(W.i)(()=>{let i=!1;for(const R of a)i=this._commands.delete(R.id)||i;i&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(a){return this._commands.get(a)}getCommands(){const a=new Map;return this._commands.forEach((i,R)=>a.set(R,i)),a}appendMenuItem(a,i){return this.appendMenuItems(V.a.single({id:a,item:i}))}appendMenuItems(a){const i=new Set,R=new M.a;for(const{id:S,item:T}of a){let I=this._menuItems.get(S);I||(I=new M.a,this._menuItems.set(S,I)),R.push(I.push(T)),i.add(S)}return this._onDidChangeMenu.fire(i),Object(W.i)(()=>{if(R.size>0){for(let S of R)S();this._onDidChangeMenu.fire(i),R.clear()}})}getMenuItems(a){let i;return this._menuItems.has(a)?i=[...this._menuItems.get(a)]:i=[],a===d.CommandPalette&&this._appendImplicitItems(i),i}_appendImplicitItems(a){const i=new Set;for(const R of a)f(R)&&(i.add(R.command.id),R.alt&&i.add(R.alt.id));this._commands.forEach((R,S)=>{i.has(S)||a.push({command:R})})}};class o extends Z.e{constructor(a,i,R,S){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,[],"submenu");this.item=a,this._menuService=i,this._contextKeyService=R,this._options=S}get actions(){const a=[],i=this._menuService.createMenu(this.item.submenu,this._contextKeyService),R=i.getActions(this._options);i.dispose();for(const[,S]of R)S.length>0&&(a.push(...S),a.push(new Z.d));return a.length&&a.pop(),a}}let l=class a{constructor(i,R,S,T,I){var O,E;if(this._commandService=I,this.id=i.id,this.label=(S==null?void 0:S.renderShortTitle)&&i.shortTitle?typeof i.shortTitle=="string"?i.shortTitle:i.shortTitle.value:typeof i.title=="string"?i.title:i.title.value,this.tooltip=(E=typeof i.tooltip=="string"?i.tooltip:(O=i.tooltip)===null||O===void 0?void 0:O.value)!==null&&E!==void 0?E:"",this.enabled=!i.precondition||T.contextMatchesRules(i.precondition),this.checked=void 0,i.toggled){const y=i.toggled.condition?i.toggled:{condition:i.toggled};this.checked=T.contextMatchesRules(y.condition),this.checked&&y.tooltip&&(this.tooltip=typeof y.tooltip=="string"?y.tooltip:y.tooltip.value),y.title&&(this.label=typeof y.title=="string"?y.title:y.title.value)}this.item=i,this.alt=R?new a(R,void 0,S,T,I):void 0,this._options=S,D.d.isThemeIcon(i.icon)&&(this.class=z.a.asClassName(i.icon))}dispose(){}run(...i){var R,S;let T=[];return((R=this._options)===null||R===void 0?void 0:R.arg)&&(T=[...T,this._options.arg]),((S=this._options)===null||S===void 0?void 0:S.shouldForwardArgs)&&(T=[...T,...i]),this._commandService.executeCommand(this.id,...T)}};l=b([m(3,H.b),m(4,K.b)],l)},fyJ8:function(Ve,se,U){"use strict";var Z=U("rePB"),z=U("VTBJ"),N=U("Ff2n"),V=U("U8pU"),W=U("q1tI"),M=U.n(W),K=U("TSYQ"),H=U.n(K),n=U("c+Xe"),D=U("sR1s");function b(c){return c&&Object(V.a)(c)==="object"&&!Array.isArray(c)&&!W.isValidElement(c)}function m(c){return typeof c=="string"?!0:Object(n.c)(c)}function f(c,o){var l,a=c.prefixCls,i=c.className,R=c.record,S=c.index,T=c.dataIndex,I=c.render,O=c.children,E=c.component,y=E===void 0?"td":E,p=c.colSpan,h=c.rowSpan,A=c.fixLeft,_=c.fixRight,v=c.firstFixLeft,P=c.lastFixLeft,x=c.firstFixRight,C=c.lastFixRight,j=c.appendNode,B=c.additionalProps,w=B===void 0?{}:B,Y=c.ellipsis,$=c.align,oe=c.rowType,de=c.isSticky,Be="".concat(a,"-cell"),Ae,Re;if(O)Re=O;else{var Le=Object(D.b)(R,T);if(Re=Le,I){var Fe=I(Le,R,S);b(Fe)?(Re=Fe.children,Ae=Fe.props):Re=Fe}}Object(V.a)(Re)==="object"&&!Array.isArray(Re)&&!W.isValidElement(Re)&&(Re=null),Y&&(P||x)&&(Re=W.createElement("span",{className:"".concat(Be,"-content")},Re));var me=Ae||{},fe=me.colSpan,ne=me.rowSpan,xe=me.style,ce=me.className,Ne=Object(N.a)(me,["colSpan","rowSpan","style","className"]),He=fe!==void 0?fe:p,ke=ne!==void 0?ne:h;if(He===0||ke===0)return null;var Ye={},et=typeof A=="number",ue=typeof _=="number";et&&(Ye.position="sticky",Ye.left=A),ue&&(Ye.position="sticky",Ye.right=_);var _e={};$&&(_e.textAlign=$);var Oe,Me=Y===!0?{showTitle:!0}:Y;Me&&(Me.showTitle||oe==="header")&&(typeof Re=="string"||typeof Re=="number"?Oe=Re.toString():W.isValidElement(Re)&&typeof Re.props.children=="string"&&(Oe=Re.props.children));var rt=Object(z.a)(Object(z.a)(Object(z.a)({title:Oe},Ne),w),{},{colSpan:He&&He!==1?He:null,rowSpan:ke&&ke!==1?ke:null,className:H()(Be,i,(l={},Object(Z.a)(l,"".concat(Be,"-fix-left"),et),Object(Z.a)(l,"".concat(Be,"-fix-left-first"),v),Object(Z.a)(l,"".concat(Be,"-fix-left-last"),P),Object(Z.a)(l,"".concat(Be,"-fix-right"),ue),Object(Z.a)(l,"".concat(Be,"-fix-right-first"),x),Object(Z.a)(l,"".concat(Be,"-fix-right-last"),C),Object(Z.a)(l,"".concat(Be,"-ellipsis"),Y),Object(Z.a)(l,"".concat(Be,"-with-append"),j),Object(Z.a)(l,"".concat(Be,"-fix-sticky"),(et||ue)&&de),l),w.className,ce),style:Object(z.a)(Object(z.a)(Object(z.a)(Object(z.a)({},w.style),_e),Ye),xe),ref:m(y)?o:null});return W.createElement(y,Object.assign({},rt),j,Re)}var d=W.forwardRef(f);d.displayName="Cell";var u=W.memo(d,function(c,o){return o.shouldCellUpdate?!o.shouldCellUpdate(o.record,c.record):!1});se.a=u},h78n:function(Ve,se,U){"use strict";U.d(se,"a",function(){return v});var Z=U("q1tI"),z=U.n(Z),N=U("TSYQ"),V=U.n(N),W={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},M=function(C){var j=C.map(function(){return Object(Z.useRef)()}),B=Object(Z.useRef)();return Object(Z.useEffect)(function(){var w=Date.now(),Y=!1;Object.keys(j).forEach(function($){var oe=j[$].current;if(!oe)return;Y=!0;var de=oe.style;de.transitionDuration=".3s, .3s, .3s, .06s",B.current&&w-B.current<100&&(de.transitionDuration="0s, 0s")}),Y&&(B.current=Date.now())}),[j]};function K(){return K=Object.assign||function(x){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var B in j)Object.prototype.hasOwnProperty.call(j,B)&&(x[B]=j[B])}return x},K.apply(this,arguments)}function H(x,C){return f(x)||m(x,C)||D(x,C)||n()}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(x,C){if(!x)return;if(typeof x=="string")return b(x,C);var j=Object.prototype.toString.call(x).slice(8,-1);if(j==="Object"&&x.constructor&&(j=x.constructor.name),j==="Map"||j==="Set")return Array.from(x);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return b(x,C)}function b(x,C){(C==null||C>x.length)&&(C=x.length);for(var j=0,B=new Array(C);j<C;j++)B[j]=x[j];return B}function m(x,C){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(x)))return;var j=[],B=!0,w=!1,Y=void 0;try{for(var $=x[Symbol.iterator](),oe;!(B=(oe=$.next()).done)&&!(j.push(oe.value),C&&j.length===C);B=!0);}catch(de){w=!0,Y=de}finally{try{!B&&$.return!=null&&$.return()}finally{if(w)throw Y}}return j}function f(x){if(Array.isArray(x))return x}function d(x,C){if(x==null)return{};var j=u(x,C),B,w;if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(x);for(w=0;w<Y.length;w++){if(B=Y[w],C.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(x,B))continue;j[B]=x[B]}}return j}function u(x,C){if(x==null)return{};var j={},B=Object.keys(x),w,Y;for(Y=0;Y<B.length;Y++){if(w=B[Y],C.indexOf(w)>=0)continue;j[w]=x[w]}return j}var c=function(C){var j=C.className,B=C.percent,w=C.prefixCls,Y=C.strokeColor,$=C.strokeLinecap,oe=C.strokeWidth,de=C.style,Be=C.trailColor,Ae=C.trailWidth,Re=C.transition,Le=d(C,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Le.gapPosition;var Fe=Array.isArray(B)?B:[B],me=Array.isArray(Y)?Y:[Y],fe=M(Fe),ne=H(fe,1),xe=ne[0],ce=oe/2,Ne=100-oe/2,He="M ".concat($==="round"?ce:0,",").concat(ce,`
L `).concat($==="round"?Ne:100,",").concat(ce),ke="0 0 100 ".concat(oe),Ye=0;return z.a.createElement("svg",K({className:V()("".concat(w,"-line"),j),viewBox:ke,preserveAspectRatio:"none",style:de},Le),z.a.createElement("path",{className:"".concat(w,"-line-trail"),d:He,strokeLinecap:$,stroke:Be,strokeWidth:Ae||oe,fillOpacity:"0"}),Fe.map(function(et,ue){var _e={strokeDasharray:"".concat(et,"px, 100px"),strokeDashoffset:"-".concat(Ye,"px"),transition:Re||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Oe=me[ue]||me[me.length-1];return Ye+=et,z.a.createElement("path",{key:ue,className:"".concat(w,"-line-path"),d:He,strokeLinecap:$,stroke:Oe,strokeWidth:oe,fillOpacity:"0",ref:xe[ue],style:_e})}))};c.defaultProps=W;var o=c;function l(){return l=Object.assign||function(x){for(var C=1;C<arguments.length;C++){var j=arguments[C];for(var B in j)Object.prototype.hasOwnProperty.call(j,B)&&(x[B]=j[B])}return x},l.apply(this,arguments)}function a(x,C){return I(x)||T(x,C)||R(x,C)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R(x,C){if(!x)return;if(typeof x=="string")return S(x,C);var j=Object.prototype.toString.call(x).slice(8,-1);if(j==="Object"&&x.constructor&&(j=x.constructor.name),j==="Map"||j==="Set")return Array.from(x);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return S(x,C)}function S(x,C){(C==null||C>x.length)&&(C=x.length);for(var j=0,B=new Array(C);j<C;j++)B[j]=x[j];return B}function T(x,C){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(x)))return;var j=[],B=!0,w=!1,Y=void 0;try{for(var $=x[Symbol.iterator](),oe;!(B=(oe=$.next()).done)&&!(j.push(oe.value),C&&j.length===C);B=!0);}catch(de){w=!0,Y=de}finally{try{!B&&$.return!=null&&$.return()}finally{if(w)throw Y}}return j}function I(x){if(Array.isArray(x))return x}function O(x,C){if(x==null)return{};var j=E(x,C),B,w;if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(x);for(w=0;w<Y.length;w++){if(B=Y[w],C.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(x,B))continue;j[B]=x[B]}}return j}function E(x,C){if(x==null)return{};var j={},B=Object.keys(x),w,Y;for(Y=0;Y<B.length;Y++){if(w=B[Y],C.indexOf(w)>=0)continue;j[w]=x[w]}return j}var y=0;function p(x){return+x.replace("%","")}function h(x){return Array.isArray(x)?x:[x]}function A(x,C,j,B){var w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,Y=arguments.length>5?arguments[5]:void 0,$=50-B/2,oe=0,de=-$,Be=0,Ae=-2*$;switch(Y){case"left":oe=-$,de=0,Be=2*$,Ae=0;break;case"right":oe=$,de=0,Be=-2*$,Ae=0;break;case"bottom":de=$,Ae=2*$;break;default:}var Re="M 50,50 m ".concat(oe,",").concat(de,`
a `).concat($,",").concat($," 0 1 1 ").concat(Be,",").concat(-Ae,`
a `).concat($,",").concat($," 0 1 1 ").concat(-Be,",").concat(Ae),Le=Math.PI*2*$,Fe={stroke:j,strokeDasharray:"".concat(C/100*(Le-w),"px ").concat(Le,"px"),strokeDashoffset:"-".concat(w/2+x/100*(Le-w),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:Re,pathStyle:Fe}}var _=function(C){var j=C.prefixCls,B=C.strokeWidth,w=C.trailWidth,Y=C.gapDegree,$=C.gapPosition,oe=C.trailColor,de=C.strokeLinecap,Be=C.style,Ae=C.className,Re=C.strokeColor,Le=C.percent,Fe=O(C,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),me=Object(Z.useMemo)(function(){return y+=1,y},[]),fe=A(0,100,oe,B,Y,$),ne=fe.pathString,xe=fe.pathStyle,ce=h(Le),Ne=h(Re),He=Ne.find(function(_e){return Object.prototype.toString.call(_e)==="[object Object]"}),ke=M(ce),Ye=a(ke,1),et=Ye[0],ue=function(){var Oe=0;return ce.map(function(Me,rt){var dt=Ne[rt]||Ne[Ne.length-1],pt=Object.prototype.toString.call(dt)==="[object Object]"?"url(#".concat(j,"-gradient-").concat(me,")"):"",ut=A(Oe,Me,dt,B,Y,$);return Oe+=Me,z.a.createElement("path",{key:rt,className:"".concat(j,"-circle-path"),d:ut.pathString,stroke:pt,strokeLinecap:de,strokeWidth:B,opacity:Me===0?0:1,fillOpacity:"0",style:ut.pathStyle,ref:et[rt]})})};return z.a.createElement("svg",l({className:V()("".concat(j,"-circle"),Ae),viewBox:"0 0 100 100",style:Be},Fe),He&&z.a.createElement("defs",null,z.a.createElement("linearGradient",{id:"".concat(j,"-gradient-").concat(me),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(He).sort(function(_e,Oe){return p(_e)-p(Oe)}).map(function(_e,Oe){return z.a.createElement("stop",{key:Oe,offset:_e,stopColor:He[_e]})}))),z.a.createElement("path",{className:"".concat(j,"-circle-trail"),d:ne,stroke:oe,strokeLinecap:de,strokeWidth:w||B,fillOpacity:"0",style:xe}),ue().reverse())};_.defaultProps=W;var v=_,P={Line:o,Circle:v}},hW8S:function(Ve,se,U){"use strict";U.d(se,"a",function(){return V}),U.d(se,"c",function(){return W}),U.d(se,"b",function(){return M});var Z=U("VTBJ"),z=U("Ff2n"),N=U("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function W(K){var H=K.expandable,n=Object(z.a)(K,["expandable"]);return"expandable"in K?Object(Z.a)(Object(Z.a)({},n),H):n}function M(K){return Object.keys(K).reduce(function(H,n){return(n.substr(0,5)==="data-"||n.substr(0,5)==="aria-")&&(H[n]=K[n]),H},{})}},ic2d:function(Ve,se,U){"use strict";U.d(se,"a",function(){return V});var Z=U("FWmy"),z=U("746U");class N{constructor(){this.data=new Map}add(W,M){Z.a(z.l(W)),Z.a(z.k(M)),Z.a(!this.data.has(W),"There is already an extension with this id"),this.data.set(W,M)}as(W){return this.data.get(W)||null}}const V=new N},ji0R:function(Ve,se,U){Ve.exports=U.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(Ve,se,U){Ve.exports=U.p+"static/question.cb52bef9.gif"},kPYp:function(Ve,se){Ve.exports="data:image/png;base64,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"},kSUc:function(Ve,se,U){},l2Kq:function(Ve,se,U){Ve.exports=U.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Ve,se,U){(function(Z){Z(U("VrN/"),U("1eCo"),U("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(z,N){var V=Z.getMode(z,"text/html"),W=V.name=="null";function M(B){if(Z.findModeByName){var w=Z.findModeByName(B);w&&(B=w.mime||w.mimes[0])}var Y=Z.getMode(z,B);return Y.name=="null"?null:Y}N.highlightFormatting===void 0&&(N.highlightFormatting=!1),N.maxBlockquoteDepth===void 0&&(N.maxBlockquoteDepth=0),N.taskLists===void 0&&(N.taskLists=!1),N.strikethrough===void 0&&(N.strikethrough=!1),N.emoji===void 0&&(N.emoji=!1),N.fencedCodeBlockHighlighting===void 0&&(N.fencedCodeBlockHighlighting=!0),N.fencedCodeBlockDefaultMode===void 0&&(N.fencedCodeBlockDefaultMode="text/plain"),N.xml===void 0&&(N.xml=!0),N.tokenTypeOverrides===void 0&&(N.tokenTypeOverrides={});var K={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 H in K)K.hasOwnProperty(H)&&N.tokenTypeOverrides[H]&&(K[H]=N.tokenTypeOverrides[H]);var n=/^([*\-_])(?:\s*\1){2,}\s*$/,D=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,b=/^\[(x| )\](?=\s)/i,m=N.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,u=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,c=/^\s*\[[^\]]+?\]:.*$/,o=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,l=" ";function a(B,w,Y){return w.f=w.inline=Y,Y(B,w)}function i(B,w,Y){return w.f=w.block=Y,Y(B,w)}function R(B){return!B||!/\S/.test(B.string)}function S(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==I){var w=W;if(!w){var Y=Z.innerMode(V,B.htmlState);w=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}w&&(B.f=p,B.block=T,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function T(B,w){var Y=B.column()===w.indentation,$=R(w.prevLine.stream),oe=w.indentedCode,de=w.prevLine.hr,Be=w.list!==!1,Ae=(w.listStack[w.listStack.length-1]||0)+3;w.indentedCode=!1;var Re=w.indentation;if(w.indentationDiff===null&&(w.indentationDiff=w.indentation,Be)){for(w.list=null;Re<w.listStack[w.listStack.length-1];)w.listStack.pop(),w.listStack.length?w.indentation=w.listStack[w.listStack.length-1]:w.list=!1;w.list!==!1&&(w.indentationDiff=Re-w.listStack[w.listStack.length-1])}var Le=!$&&!de&&!w.prevLine.header&&(!Be||!oe)&&!w.prevLine.fencedCodeEnd,Fe=(w.list===!1||de||$)&&w.indentation<=Ae&&B.match(n),me=null;if(w.indentationDiff>=4&&(oe||w.prevLine.fencedCodeEnd||w.prevLine.header||$))return B.skipToEnd(),w.indentedCode=!0,K.code;if(B.eatSpace())return null;if(Y&&w.indentation<=Ae&&(me=B.match(m))&&me[1].length<=6)return w.quote=0,w.header=me[1].length,w.thisLine.header=!0,N.highlightFormatting&&(w.formatting="header"),w.f=w.inline,E(w);if(w.indentation<=Ae&&B.eat(">"))return w.quote=Y?1:w.quote+1,N.highlightFormatting&&(w.formatting="quote"),B.eatSpace(),E(w);if(!Fe&&!w.setext&&Y&&w.indentation<=Ae&&(me=B.match(D))){var fe=me[1]?"ol":"ul";return w.indentation=Re+B.current().length,w.list=!0,w.quote=0,w.listStack.push(w.indentation),w.em=!1,w.strong=!1,w.code=!1,w.strikethrough=!1,N.taskLists&&B.match(b,!1)&&(w.taskList=!0),w.f=w.inline,N.highlightFormatting&&(w.formatting=["list","list-"+fe]),E(w)}else{if(Y&&w.indentation<=Ae&&(me=B.match(u,!0)))return w.quote=0,w.fencedEndRE=new RegExp(me[1]+"+ *$"),w.localMode=N.fencedCodeBlockHighlighting&&M(me[2]||N.fencedCodeBlockDefaultMode),w.localMode&&(w.localState=Z.startState(w.localMode)),w.f=w.block=O,N.highlightFormatting&&(w.formatting="code-block"),w.code=-1,E(w);if(w.setext||(!Le||!Be)&&!w.quote&&w.list===!1&&!w.code&&!Fe&&!c.test(B.string)&&(me=B.lookAhead(1))&&(me=me.match(f)))return w.setext?(w.header=w.setext,w.setext=0,B.skipToEnd(),N.highlightFormatting&&(w.formatting="header")):(w.header=me[0].charAt(0)=="="?1:2,w.setext=w.header),w.thisLine.header=!0,w.f=w.inline,E(w);if(Fe)return B.skipToEnd(),w.hr=!0,w.thisLine.hr=!0,K.hr;if(B.peek()==="[")return a(B,w,P)}return a(B,w,w.inline)}function I(B,w){var Y=V.token(B,w.htmlState);if(!W){var $=Z.innerMode(V,w.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||w.md_inside&&B.current().indexOf(">")>-1)&&(w.f=p,w.block=T,w.htmlState=null)}return Y}function O(B,w){var Y=w.listStack[w.listStack.length-1]||0,$=w.indentation<Y,oe=Y+3;if(w.fencedEndRE&&w.indentation<=oe&&($||B.match(w.fencedEndRE))){N.highlightFormatting&&(w.formatting="code-block");var de;return $||(de=E(w)),w.localMode=w.localState=null,w.block=T,w.f=p,w.fencedEndRE=null,w.code=0,w.thisLine.fencedCodeEnd=!0,$?i(B,w,w.block):de}else return w.localMode?w.localMode.token(B,w.localState):(B.skipToEnd(),K.code)}function E(B){var w=[];if(B.formatting){w.push(K.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var Y=0;Y<B.formatting.length;Y++)w.push(K.formatting+"-"+B.formatting[Y]),B.formatting[Y]==="header"&&w.push(K.formatting+"-"+B.formatting[Y]+"-"+B.header),B.formatting[Y]==="quote"&&(!N.maxBlockquoteDepth||N.maxBlockquoteDepth>=B.quote?w.push(K.formatting+"-"+B.formatting[Y]+"-"+B.quote):w.push("error"))}if(B.taskOpen)return w.push("meta"),w.length?w.join(" "):null;if(B.taskClosed)return w.push("property"),w.length?w.join(" "):null;if(B.linkHref?w.push(K.linkHref,"url"):(B.strong&&w.push(K.strong),B.em&&w.push(K.em),B.strikethrough&&w.push(K.strikethrough),B.emoji&&w.push(K.emoji),B.linkText&&w.push(K.linkText),B.code&&w.push(K.code),B.image&&w.push(K.image),B.imageAltText&&w.push(K.imageAltText,"link"),B.imageMarker&&w.push(K.imageMarker)),B.header&&w.push(K.header,K.header+"-"+B.header),B.quote&&(w.push(K.quote),!N.maxBlockquoteDepth||N.maxBlockquoteDepth>=B.quote?w.push(K.quote+"-"+B.quote):w.push(K.quote+"-"+N.maxBlockquoteDepth)),B.list!==!1){var $=(B.listStack.length-1)%3;$?$===1?w.push(K.list2):w.push(K.list3):w.push(K.list1)}return B.trailingSpaceNewLine?w.push("trailing-space-new-line"):B.trailingSpace&&w.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),w.length?w.join(" "):null}function y(B,w){return B.match(d,!0)?E(w):void 0}function p(B,w){var Y=w.text(B,w);if(typeof Y!="undefined")return Y;if(w.list)return w.list=null,E(w);if(w.taskList){var $=B.match(b,!0)[1]===" ";return $?w.taskOpen=!0:w.taskClosed=!0,N.highlightFormatting&&(w.formatting="task"),w.taskList=!1,E(w)}if(w.taskOpen=!1,w.taskClosed=!1,w.header&&B.match(/^#+$/,!0))return N.highlightFormatting&&(w.formatting="header"),E(w);var oe=B.next();if(w.linkTitle){w.linkTitle=!1;var de=oe;oe==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Be="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(B.match(new RegExp(Be),!0))return K.linkHref}if(oe==="`"){var Ae=w.formatting;N.highlightFormatting&&(w.formatting="code"),B.eatWhile("`");var Re=B.current().length;if(w.code==0&&(!w.quote||Re==1))return w.code=Re,E(w);if(Re==w.code){var Le=E(w);return w.code=0,Le}else return w.formatting=Ae,E(w)}else if(w.code)return E(w);if(oe==="\\"&&(B.next(),N.highlightFormatting)){var Fe=E(w),me=K.formatting+"-escape";return Fe?Fe+" "+me:me}if(oe==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return w.imageMarker=!0,w.image=!0,N.highlightFormatting&&(w.formatting="image"),E(w);if(oe==="["&&w.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return w.imageMarker=!1,w.imageAltText=!0,N.highlightFormatting&&(w.formatting="image"),E(w);if(oe==="]"&&w.imageAltText){N.highlightFormatting&&(w.formatting="image");var Fe=E(w);return w.imageAltText=!1,w.image=!1,w.inline=w.f=A,Fe}if(oe==="["&&!w.image)return w.linkText&&B.match(/^.*?\]/)||(w.linkText=!0,N.highlightFormatting&&(w.formatting="link")),E(w);if(oe==="]"&&w.linkText){N.highlightFormatting&&(w.formatting="link");var Fe=E(w);return w.linkText=!1,w.inline=w.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?A:p,Fe}if(oe==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=h,N.highlightFormatting&&(w.formatting="link");var Fe=E(w);return Fe?Fe+=" ":Fe="",Fe+K.linkInline}if(oe==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=h,N.highlightFormatting&&(w.formatting="link");var Fe=E(w);return Fe?Fe+=" ":Fe="",Fe+K.linkEmail}if(N.xml&&oe==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var fe=B.string.indexOf(">",B.pos);if(fe!=-1){var ne=B.string.substring(B.start,fe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ne)&&(w.md_inside=!0)}return B.backUp(1),w.htmlState=Z.startState(V),i(B,w,I)}if(N.xml&&oe==="<"&&B.match(/^\/\w*?>/))return w.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var xe=1,ce=B.pos==1?" ":B.string.charAt(B.pos-2);xe<3&&B.eat(oe);)xe++;var Ne=B.peek()||" ",He=!/\s/.test(Ne)&&(!o.test(Ne)||/\s/.test(ce)||o.test(ce)),ke=!/\s/.test(ce)&&(!o.test(ce)||/\s/.test(Ne)||o.test(Ne)),Ye=null,et=null;if(xe%2&&(!w.em&&He&&(oe==="*"||!ke||o.test(ce))?Ye=!0:w.em==oe&&ke&&(oe==="*"||!He||o.test(Ne))&&(Ye=!1)),xe>1&&(!w.strong&&He&&(oe==="*"||!ke||o.test(ce))?et=!0:w.strong==oe&&ke&&(oe==="*"||!He||o.test(Ne))&&(et=!1)),et!=null||Ye!=null){N.highlightFormatting&&(w.formatting=Ye==null?"strong":et==null?"em":"strong em"),Ye===!0&&(w.em=oe),et===!0&&(w.strong=oe);var Le=E(w);return Ye===!1&&(w.em=!1),et===!1&&(w.strong=!1),Le}}else if(oe===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return E(w);B.backUp(1)}if(N.strikethrough){if(oe==="~"&&B.eatWhile(oe)){if(w.strikethrough){N.highlightFormatting&&(w.formatting="strikethrough");var Le=E(w);return w.strikethrough=!1,Le}else if(B.match(/^[^\s]/,!1))return w.strikethrough=!0,N.highlightFormatting&&(w.formatting="strikethrough"),E(w)}else if(oe===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return E(w);B.backUp(2)}}if(N.emoji&&oe===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){w.emoji=!0,N.highlightFormatting&&(w.formatting="emoji");var ue=E(w);return w.emoji=!1,ue}return oe===" "&&(B.match(/^ +$/,!1)?w.trailingSpace++:w.trailingSpace&&(w.trailingSpaceNewLine=!0)),E(w)}function h(B,w){var Y=B.next();if(Y===">"){w.f=w.inline=p,N.highlightFormatting&&(w.formatting="link");var $=E(w);return $?$+=" ":$="",$+K.linkInline}return B.match(/^[^>]+/,!0),K.linkInline}function A(B,w){if(B.eatSpace())return null;var Y=B.next();return Y==="("||Y==="["?(w.f=w.inline=v(Y==="("?")":"]"),N.highlightFormatting&&(w.formatting="link-string"),w.linkHref=!0,E(w)):"error"}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(B){return function(w,Y){var $=w.next();if($===B){Y.f=Y.inline=p,N.highlightFormatting&&(Y.formatting="link-string");var oe=E(Y);return Y.linkHref=!1,oe}return w.match(_[B]),Y.linkHref=!0,E(Y)}}function P(B,w){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(w.f=x,B.next(),N.highlightFormatting&&(w.formatting="link"),w.linkText=!0,E(w)):a(B,w,p)}function x(B,w){if(B.match(/^\]:/,!0)){w.f=w.inline=C,N.highlightFormatting&&(w.formatting="link");var Y=E(w);return w.linkText=!1,Y}return B.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function C(B,w){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?w.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),w.f=w.inline=p,K.linkHref+" url")}var j={startState:function(){return{f:T,prevLine:{stream:null},thisLine:{stream:null},block:T,htmlState:null,indentation:0,inline:p,text:y,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(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&Z.copyState(V,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?Z.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,w){if(w.formatting=!1,B!=w.thisLine.stream){if(w.header=0,w.hr=!1,B.match(/^\s*$/,!0))return S(w),null;if(w.prevLine=w.thisLine,w.thisLine={stream:B},w.taskList=!1,w.trailingSpace=0,w.trailingSpaceNewLine=!1,!w.localState&&(w.f=w.block,w.f!=I)){var Y=B.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(w.indentation=Y,w.indentationDiff=null,Y>0)return null}}return w.f(B,w)},innerMode:function(B){return B.block==I?{state:B.htmlState,mode:V}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:j}},indent:function(B,w,Y){return B.block==I&&V.indent?V.indent(B.htmlState,w,Y):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,w,Y):Z.Pass},blankLine:S,getType:E,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return j},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},lzim:function(Ve,se,U){"use strict";var Z=U("E7E6"),z=U.n(Z);U.d(se,"w",function(){return z.a});var N=U("/GNS"),V=U.n(N);U.d(se,"v",function(){return V.a});var W=U("FOrL"),M=U.n(W);U.d(se,"q",function(){return M.a});var K=U("HpTS"),H=U.n(K);U.d(se,"x",function(){return H.a});var n=U("tWlo"),D=U.n(n);U.d(se,"a",function(){return D.a});var b=U("7ZXX"),m=U.n(b);U.d(se,"l",function(){return m.a});var f=U("GABl"),d=U.n(f);U.d(se,"e",function(){return d.a});var u=U("onxn"),c=U.n(u);U.d(se,"n",function(){return c.a});var o=U("nKGa"),l=U.n(o);U.d(se,"m",function(){return l.a});var a=U("4qgm"),i=U.n(a);U.d(se,"z",function(){return i.a});var R=U("JeFH"),S=U.n(R);U.d(se,"b",function(){return S.a});var T=U("ji0R"),I=U.n(T);U.d(se,"i",function(){return I.a});var O=U("W6BS"),E=U.n(O);U.d(se,"A",function(){return E.a});var y=U("kPYp"),p=U.n(y);U.d(se,"B",function(){return p.a});var h=U("nukY"),A=U.n(h),_=U("4u4S"),v=U.n(_),P=U("yslc"),x=U.n(P),C=U("l2Kq"),j=U.n(C),B=U("RMFE"),w=U.n(B);U.d(se,"o",function(){return w.a});var Y=U("TGq3"),$=U.n(Y),oe=U("SMhR"),de=U.n(oe);U.d(se,"y",function(){return de.a});var Be=U("8/bI"),Ae=U.n(Be);U.d(se,"j",function(){return Ae.a});var Re=U("JWDV"),Le=U.n(Re),Fe=U("Xsq0"),me=U.n(Fe);U.d(se,"p",function(){return me.a});var fe=U("Ohmc"),ne=U.n(fe);U.d(se,"c",function(){return ne.a});var xe=U("csWT"),ce=U.n(xe);U.d(se,"d",function(){return ce.a});var Ne=U("7v3h"),He=U.n(Ne);U.d(se,"k",function(){return He.a});var ke=U("cRFk"),Ye=U.n(ke);U.d(se,"u",function(){return Ye.a});var et=U("kPWJ"),ue=U.n(et);U.d(se,"t",function(){return ue.a});var _e=U("qgvg"),Oe=U.n(_e);U.d(se,"r",function(){return Oe.a});var Me=U("FPkq"),rt=U.n(Me);U.d(se,"s",function(){return rt.a});var dt=U("A/g1"),pt=U.n(dt);U.d(se,"f",function(){return pt.a});var ut=U("Nmxd"),_t=U.n(ut);U.d(se,"g",function(){return _t.a});var Tt=U("5D2P"),Pe=U.n(Tt);U.d(se,"h",function(){return Pe.a});var Ce=U("djh8"),tt=U.n(Ce),lt=U("Jq4h"),Ke=U.n(lt)},n6Qo:function(Ve,se,U){"use strict";U.d(se,"a",function(){return H});var Z=U("q1tI"),z=U("biw7"),N=U("fyJ8");function V(n){var D=n.className,b=n.index,m=n.children,f=n.colSpan,d=n.rowSpan,u=Z.useContext(z.a),c=u.prefixCls,o=u.fixedInfoList,l=o[b];return Z.createElement(N.a,Object.assign({className:D,index:b,component:"td",prefixCls:c,record:null,dataIndex:null,render:function(){return{children:m,props:{colSpan:f,rowSpan:d}}}},l))}function W(n){return Z.createElement("tr",Object.assign({},n))}function M(n){var D=n.children,b=Z.useContext(z.a),m=b.prefixCls;return Z.createElement("tfoot",{className:"".concat(m,"-summary")},D)}var K=se.b=M,H={Cell:V,Row:W}},nEHx:function(Ve,se,U){"use strict";U.d(se,"a",function(){return Z});var Z;(function(z){z.DARK="dark",z.LIGHT="light",z.HIGH_CONTRAST="hc"})(Z||(Z={}))},nKGa:function(Ve,se,U){Ve.exports=U.p+"static/export_exercise-template.f7655c19.png"},nnTU:function(Ve,se,U){"use strict";U.d(se,"b",function(){return K}),U.d(se,"a",function(){return H});var Z=U("MI8n"),z=U("JYp7"),N=U("pmY6"),V=U("24hK"),W=U("746U"),M=U("Cg/j");const K=Object(M.c)("commandService"),H=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,D){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!D)throw new Error("invalid command");return this.registerCommand({id:n,handler:D})}if(n.description){const u=[];for(let o of n.description.args)u.push(o.constraint);const c=n.handler;n.handler=function(o,...l){return Object(W.o)(l,u),c(o,...l)}}const{id:b}=n;let m=this._commands.get(b);m||(m=new V.a,this._commands.set(b,m));let f=m.unshift(n),d=Object(N.i)(()=>{f();const u=this._commands.get(b);(u==null?void 0:u.isEmpty())&&this._commands.delete(b)});return this._onDidRegisterCommand.fire(b),d}registerCommandAlias(n,D){return H.registerCommand(n,(b,...m)=>b.get(K).executeCommand(D,...m))}getCommand(n){const D=this._commands.get(n);return!D||D.isEmpty()?void 0:z.a.first(D)}getCommands(){const n=new Map;for(const D of this._commands.keys()){const b=this.getCommand(D);b&&n.set(D,b)}return n}};H.registerCommand("noop",()=>{})},nukY:function(Ve,se){Ve.exports="data:image/png;base64,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"},"o/qq":function(Ve,se,U){Ve.exports={flex_box_center:"flex_box_center___1LYHS",flex_space_between:"flex_space_between___EmHgD",flex_box_vertical_center:"flex_box_vertical_center___8y-JO",flex_box_center_end:"flex_box_center_end___2Ow7E",flex_box_column:"flex_box_column___2_dIp",shixunWrp:"shixunWrp___2zw8A"}},onxn:function(Ve,se){Ve.exports="data:image/png;base64,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"},osHv:function(Ve,se,U){(function(Z){Z(U("VrN/"))})(function(Z){"use strict";var z=Z.Pos;function N(o,l){return o.line-l.line||o.ch-l.ch}var V="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",W=V+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",M=new RegExp("<(/?)(["+V+"]["+W+"]*)","g");function K(o,l,a,i){this.line=l,this.ch=a,this.cm=o,this.text=o.getLine(l),this.min=i?Math.max(i.from,o.firstLine()):o.firstLine(),this.max=i?Math.min(i.to-1,o.lastLine()):o.lastLine()}function H(o,l){var a=o.cm.getTokenTypeAt(z(o.line,l));return a&&/\btag\b/.test(a)}function n(o){return o.line>=o.max?void 0:(o.ch=0,o.text=o.cm.getLine(++o.line),!0)}function D(o){return o.line<=o.min?void 0:(o.text=o.cm.getLine(--o.line),o.ch=o.text.length,!0)}function b(o){for(;;){var l=o.text.indexOf(">",o.ch);if(l==-1){if(n(o))continue;return}if(!H(o,l+1)){o.ch=l+1;continue}var a=o.text.lastIndexOf("/",l),i=a>-1&&!/\S/.test(o.text.slice(a+1,l));return o.ch=l+1,i?"selfClose":"regular"}}function m(o){for(;;){var l=o.ch?o.text.lastIndexOf("<",o.ch-1):-1;if(l==-1){if(D(o))continue;return}if(!H(o,l+1)){o.ch=l;continue}M.lastIndex=l,o.ch=l;var a=M.exec(o.text);if(a&&a.index==l)return a}}function f(o){for(;;){M.lastIndex=o.ch;var l=M.exec(o.text);if(!l){if(n(o))continue;return}if(!H(o,l.index+1)){o.ch=l.index+1;continue}return o.ch=l.index+l[0].length,l}}function d(o){for(;;){var l=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(l==-1){if(D(o))continue;return}if(!H(o,l+1)){o.ch=l;continue}var a=o.text.lastIndexOf("/",l),i=a>-1&&!/\S/.test(o.text.slice(a+1,l));return o.ch=l+1,i?"selfClose":"regular"}}function u(o,l){for(var a=[];;){var i=f(o),R,S=o.line,T=o.ch-(i?i[0].length:0);if(!i||!(R=b(o)))return;if(R=="selfClose")continue;if(i[1]){for(var I=a.length-1;I>=0;--I)if(a[I]==i[2]){a.length=I;break}if(I<0&&(!l||l==i[2]))return{tag:i[2],from:z(S,T),to:z(o.line,o.ch)}}else a.push(i[2])}}function c(o,l){for(var a=[];;){var i=d(o);if(!i)return;if(i=="selfClose"){m(o);continue}var R=o.line,S=o.ch,T=m(o);if(!T)return;if(T[1])a.push(T[2]);else{for(var I=a.length-1;I>=0;--I)if(a[I]==T[2]){a.length=I;break}if(I<0&&(!l||l==T[2]))return{tag:T[2],from:z(o.line,o.ch),to:z(R,S)}}}}Z.registerHelper("fold","xml",function(o,l){for(var a=new K(o,l.line,0);;){var i=f(a);if(!i||a.line!=l.line)return;var R=b(a);if(!R)return;if(!i[1]&&R!="selfClose"){var S=z(a.line,a.ch),T=u(a,i[2]);return T&&N(T.from,S)>0?{from:S,to:T.from}:null}}}),Z.findMatchingTag=function(o,l,a){var i=new K(o,l.line,l.ch,a);if(i.text.indexOf(">")==-1&&i.text.indexOf("<")==-1)return;var R=b(i),S=R&&z(i.line,i.ch),T=R&&m(i);if(!R||!T||N(i,l)>0)return;var I={from:z(i.line,i.ch),to:S,tag:T[2]};return R=="selfClose"?{open:I,close:null,at:"open"}:T[1]?{open:c(i,T[2]),close:I,at:"close"}:(i=new K(o,S.line,S.ch,a),{open:I,close:u(i,T[2]),at:"open"})},Z.findEnclosingTag=function(o,l,a,i){for(var R=new K(o,l.line,l.ch,a);;){var S=c(R,i);if(!S)break;var T=new K(o,l.line,l.ch,a),I=u(T,S.tag);if(I)return{open:S,close:I}}},Z.scanForClosingTag=function(o,l,a,i){var R=new K(o,l.line,l.ch,i?{from:0,to:i}:null);return u(R,a)}})},p5ED:function(Ve,se,U){"use strict";var Z=U("+L6B"),z=U("2/Rp"),N=U("5Dmo"),V=U("3S7+"),W=U("k1fw"),M=U("tJVT"),K=U("q1tI"),H=U.n(K),n=U("vHTk"),D=U.n(n),b=U("yEEn"),m=U("ZW9T"),f=U("1vsH");se.a=function(d){var u=d.name,c=d.data,o=d.theme,l=d.type,a=d.filename,i=d.monacoEditor,R=d.className,S=d.style,T=d.close,I=d.onClose,O=d.hasMask,E=Object(K.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),y=Object(M.a)(E,2),p=y[0],h=y[1],A=Object(K.useState)(""),_=Object(M.a)(A,2),v=_[0],P=_[1],x,C=1024*1024,j=10*C,B=Object(K.useRef)();l==="office"&&(x=Object(f.T)(c).filesize,x>j&&(l="other")),a&&(i.filename=a),Object(K.useEffect)(function(){var $,oe,de=($=document.cookie)===null||$===void 0||((oe=$.replace(/\s/g,""))===null||oe===void 0)?void 0:oe.split(";");de==null||de.map(function(Be){var Ae=Be.split("=");Ae[0]==="_educoder_session"&&P(Ae[1])})},[]);var w=function(){if(c.startsWith("http")||c.startsWith("/")){Y();return}Object(f.z)(a||"educoder",c,a)},Y=function(){Object(f.x)(a||u,c)};return console.log("data:",c,"fileanme:",a," name:",u),H.a.createElement("div",{style:Object(W.a)({},S||{}),className:"".concat(O&&D.a.bgBlack," ").concat(l?D.a.wrp:"hide")},T&&H.a.createElement("div",{className:D.a.close,ref:B},H.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return B.current}},H.a.createElement("span",{onClick:Y},H.a.createElement("i",{className:"icon-quxiaozhiding"}))),H.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return B.current}},H.a.createElement("span",{className:"",onClick:I},H.a.createElement("i",{className:"icon-guanbi1"})))),H.a.createElement("div",{className:"".concat(D.a[R]," ").concat(R," ").concat(D.a.monaco," ").concat(l==="txt"?"show":"hide")},l==="txt"&&H.a.createElement(m.b,i)),l==="audio"&&H.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}),l==="video"&&H.a.createElement(H.a.Fragment,null,c!=null&&c.startsWith("/")?H.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):H.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),l==="html"&&H.a.createElement("iframe",{src:c+"&disposition=inline"}),l==="pdf"&&H.a.createElement("embed",{className:D.a.embed,src:c}),l==="image"&&H.a.createElement(H.a.Fragment,null,H.a.createElement("img",{src:"".concat(c!=null&&c.startsWith("/")||(c==null?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(c)})),l==="other"&&H.a.createElement("div",null,H.a.createElement(z.a,{type:"primary",size:"large",onClick:w},H.a.createElement(b.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(l==="download"||l==="office")&&H.a.createElement(z.a,{type:"primary",size:"large",onClick:w},H.a.createElement(b.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ve,se,U){},pmY6:function(Ve,se,U){"use strict";U.d(se,"h",function(){return D}),U.d(se,"g",function(){return m}),U.d(se,"f",function(){return f}),U.d(se,"e",function(){return d}),U.d(se,"i",function(){return u}),U.d(se,"b",function(){return c}),U.d(se,"a",function(){return o}),U.d(se,"d",function(){return l}),U.d(se,"c",function(){return a});var Z=U("C/vA"),z=U("JYp7");const N=!1;let V=null;function W(i){V=i}if(N){const i="__is_disposable_tracked__";W(new class{trackDisposable(R){const S=new Error("Potentially leaked disposable").stack;setTimeout(()=>{R[i]||console.log(S)},3e3)}setParent(R,S){if(R&&R!==o.None)try{R[i]=!0}catch(T){}}markAsDisposed(R){if(R&&R!==o.None)try{R[i]=!0}catch(S){}}markAsSingleton(R){}})}function M(i){return V==null||V.trackDisposable(i),i}function K(i){V==null||V.markAsDisposed(i)}function H(i,R){V==null||V.setParent(i,R)}function n(i,R){if(!V)return;for(const S of i)V.setParent(S,R)}function D(i){return V==null||V.markAsSingleton(i),i}class b extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`);this.errors=i}}function m(i){return typeof i.dispose=="function"&&i.dispose.length===0}function f(i){if(z.a.is(i)){let R=[];for(const S of i)if(S)try{S.dispose()}catch(T){R.push(T)}if(R.length===1)throw R[0];if(R.length>1)throw new b(R);return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function d(...i){const R=u(()=>f(i));return n(i,R),R}function u(i){const R=M({dispose:Object(Z.a)(()=>{K(R),i()})});return R}class c{constructor(){this._toDispose=new Set,this._isDisposed=!1,M(this)}dispose(){if(this._isDisposed)return;K(this),this._isDisposed=!0,this.clear()}clear(){try{f(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return H(i,this),this._isDisposed?c.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}}c.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new c,M(this),H(this._store,this)}dispose(){K(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}o.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,M(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var R;if(this._isDisposed||i===this._value)return;(R=this._value)===null||R===void 0||R.dispose(),i&&H(i,this),this._value=i}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,K(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}clearAndLeak(){const i=this._value;return this._value=void 0,i&&H(i,null),i}}class a{constructor(i){this.object=i}dispose(){}}},psGv:function(Ve,se,U){var Z,z;(function(){var N;(function(){"use strict";var K=[,,function(b){function m(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var u=new m(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},m.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},m.prototype.has_match=function(u){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(u))return!0;return!1},m.prototype.set_indent=function(u,c){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(u){this.__items.push(u);var c=u.lastIndexOf(`
`);c!==-1?this.__character_count=u.length-c:this.__character_count+=u.length},m.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function f(u,c){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),c=c||"",u.indent_level>0&&(c=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}f.prototype.get_indent_size=function(u,c){var o=this.__base_string_length;return c=c||0,u<0&&(o=0),o+=u*this.__indent_size,o+=c,o},f.prototype.get_indent_string=function(u,c){var o=this.__base_string;return c=c||0,u<0&&(u=0,o=""),c+=u*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},f.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var u=this.__cache.length,c=0,o="";this.__indent_size&&u>=this.__indent_size&&(c=Math.floor(u/this.__indent_size),u-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),u&&(o+=new Array(u+1).join(" ")),this.__cache.push(o)};function d(u,c){this.__indent_cache=new f(u,c),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}d.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},d.prototype.get_line_number=function(){return this.__lines.length},d.prototype.get_indent_string=function(u,c){return this.__indent_cache.get_indent_string(u,c)},d.prototype.get_indent_size=function(u,c){return this.__indent_cache.get_indent_size(u,c)},d.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},d.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},d.prototype.get_code=function(u){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return u!==`
`&&(o=o.replace(/[\n]/g,u)),o},d.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},d.prototype.set_indent=function(u,c){return u=u||0,c=c||0,this.next_line.set_indent(u,c),this.__lines.length>1?(this.current_line.set_indent(u,c),!0):(this.current_line.set_indent(),!1)},d.prototype.add_raw_token=function(u){for(var c=0;c<u.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},d.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},d.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},d.prototype.remove_indent=function(u){for(var c=this.__lines.length;u<c;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},d.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},d.prototype.just_added_newline=function(){return this.current_line.is_empty()},d.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},d.prototype.ensure_empty_line_above=function(u,c){for(var o=this.__lines.length-2;o>=0;){var l=this.__lines[o];if(l.is_empty())break;if(l.item(0).indexOf(u)!==0&&l.item(-1)!==c){this.__lines.splice(o+1,0,new m(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},b.exports.Output=d},function(b){function m(f,d,u,c){this.type=f,this.text=d,this.comments_before=null,this.newlines=u||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}b.exports.Token=m},,,function(b){function m(u,c){this.raw_options=f(u,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}m.prototype._get_array=function(u,c){var o=this.raw_options[u],l=c||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(l=o.concat()):typeof o=="string"&&(l=o.split(/[^a-zA-Z0-9_\/\-]+/)),l},m.prototype._get_boolean=function(u,c){var o=this.raw_options[u],l=o===void 0?!!c:!!o;return l},m.prototype._get_characters=function(u,c){var o=this.raw_options[u],l=c||"";return typeof o=="string"&&(l=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),l},m.prototype._get_number=function(u,c){var o=this.raw_options[u];c=parseInt(c,10),isNaN(c)&&(c=0);var l=parseInt(o,10);return isNaN(l)&&(l=c),l},m.prototype._get_selection=function(u,c,o){var l=this._get_selection_list(u,c,o);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+c+`
You passed in: '`+this.raw_options[u]+"'");return l[0]},m.prototype._get_selection_list=function(u,c,o){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[c[0]],!this._is_valid_selection(o,c))throw new Error("Invalid Default Value!");var l=this._get_array(u,o);if(!this._is_valid_selection(l,c))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+c+`
You passed in: '`+this.raw_options[u]+"'");return l},m.prototype._is_valid_selection=function(u,c){return u.length&&c.length&&!u.some(function(o){return c.indexOf(o)===-1})};function f(u,c){var o={};u=d(u);var l;for(l in u)l!==c&&(o[l]=u[l]);if(c&&u[c])for(l in u[c])o[l]=u[c][l];return o}function d(u){var c={},o;for(o in u){var l=o.replace(/-/g,"_");c[l]=u[o]}return c}b.exports.Options=m,b.exports.normalizeOpts=d,b.exports.mergeOpts=f},,function(b){var m=RegExp.prototype.hasOwnProperty("sticky");function f(d){this.__input=d||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__input.charAt(this.__position),this.__position+=1),d},f.prototype.peek=function(d){var u=null;return d=d||0,d+=this.__position,d>=0&&d<this.__input_length&&(u=this.__input.charAt(d)),u},f.prototype.__match=function(d,u){d.lastIndex=u;var c=d.exec(this.__input);return c&&!(m&&d.sticky)&&(c.index!==u&&(c=null)),c},f.prototype.test=function(d,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(d,u):!1},f.prototype.testChar=function(d,u){var c=this.peek(u);return d.lastIndex=0,c!==null&&d.test(c)},f.prototype.match=function(d){var u=this.__match(d,this.__position);return u?this.__position+=u[0].length:u=null,u},f.prototype.read=function(d,u,c){var o="",l;return d&&(l=this.match(d),l&&(o+=l[0])),u&&(l||!d)&&(o+=this.readUntil(u,c)),o},f.prototype.readUntil=function(d,u){var c="",o=this.__position;d.lastIndex=this.__position;var l=d.exec(this.__input);return l?(o=l.index,u&&(o+=l[0].length)):o=this.__input_length,c=this.__input.substring(this.__position,o),this.__position=o,c},f.prototype.readUntilAfter=function(d){return this.readUntil(d,!0)},f.prototype.get_regexp=function(d,u){var c=null,o="g";return u&&m&&(o="y"),typeof d=="string"&&d!==""?c=new RegExp(d,o):d&&(c=new RegExp(d.source,o)),c},f.prototype.get_literal_regexp=function(d){return RegExp(d.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(d){var u=this.__position,c=this.readUntilAfter(d);return this.__position=u,c},f.prototype.lookBack=function(d){var u=this.__position-1;return u>=d.length&&this.__input.substring(u-d.length,u).toLowerCase()===d},b.exports.InputScanner=f},function(b,m,f){var d=f(8).InputScanner,u=f(3).Token,c=f(10).TokenStream,o=f(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(i,R){this._input=new d(i),this._options=R||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var i,R=new u(l.START,""),S=null,T=[],I=new c;R.type!==l.EOF;){for(i=this._get_next_token(R,S);this._is_comment(i);)I.add(i),i=this._get_next_token(R,S);I.isEmpty()||(i.comments_before=I,I=new c),i.parent=S,this._is_opening(i)?(T.push(S),S=i):S&&this._is_closing(i,S)&&(i.opened=S,S.closed=i,S=T.pop(),i.parent=S),i.previous=R,R.next=i,this.__tokens.add(i),R=i}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(i,R){this._readWhitespace();var S=this._input.read(/.+/g);return S?this._create_token(l.RAW,S):this._create_token(l.EOF,"")},a.prototype._is_comment=function(i){return!1},a.prototype._is_opening=function(i){return!1},a.prototype._is_closing=function(i,R){return!1},a.prototype._create_token=function(i,R){var S=new u(i,R,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return S},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},b.exports.Tokenizer=a,b.exports.TOKEN=l},function(b){function m(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}m.prototype.restart=function(){this.__position=0},m.prototype.isEmpty=function(){return this.__tokens_length===0},m.prototype.hasNext=function(){return this.__position<this.__tokens_length},m.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__tokens[this.__position],this.__position+=1),f},m.prototype.peek=function(f){var d=null;return f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length&&(d=this.__tokens[f]),d},m.prototype.add=function(f){this.__parent_token&&(f.parent=this.__parent_token),this.__tokens.push(f),this.__tokens_length+=1},b.exports.TokenStream=m},function(b,m,f){var d=f(12).Pattern;function u(c,o){d.call(this,c,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new d,u.prototype.__set_whitespace_patterns=function(c,o){c+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},u.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var c=this._input.read(this._match_pattern);if(c===" ")this.whitespace_before_token=" ";else if(c){var o=this.__split(this._newline_regexp,c);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return c},u.prototype.matching=function(c,o){var l=this._create();return l.__set_whitespace_patterns(c,o),l._update(),l},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(c,o){c.lastIndex=0;for(var l=0,a=[],i=c.exec(o);i;)a.push(o.substring(l,i.index)),l=i.index+i[0].length,i=c.exec(o);return l<o.length?a.push(o.substring(l,o.length)):a.push(""),a},b.exports.WhitespacePattern=u},function(b){function m(f,d){this._input=f,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,d&&(this._starting_pattern=this._input.get_regexp(d._starting_pattern,!0),this._match_pattern=this._input.get_regexp(d._match_pattern,!0),this._until_pattern=this._input.get_regexp(d._until_pattern),this._until_after=d._until_after)}m.prototype.read=function(){var f=this._input.read(this._starting_pattern);return(!this._starting_pattern||f)&&(f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),f},m.prototype.read_match=function(){return this._input.match(this._match_pattern)},m.prototype.until_after=function(f){var d=this._create();return d._until_after=!0,d._until_pattern=this._input.get_regexp(f),d._update(),d},m.prototype.until=function(f){var d=this._create();return d._until_after=!1,d._until_pattern=this._input.get_regexp(f),d._update(),d},m.prototype.starting_with=function(f){var d=this._create();return d._starting_pattern=this._input.get_regexp(f,!0),d._update(),d},m.prototype.matching=function(f){var d=this._create();return d._match_pattern=this._input.get_regexp(f,!0),d._update(),d},m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){},b.exports.Pattern=m},function(b){function m(f,d){f=typeof f=="string"?f:f.source,d=typeof d=="string"?d:d.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+d,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+d,"g")}m.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var d={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(f);u;)d[u[1]]=u[2],u=this.__directive_pattern.exec(f);return d},m.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},b.exports.Directives=m},function(b,m,f){var d=f(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(o,l){d.call(this,o,l),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var a=new d(o);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new d,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(o){var l=this._create();return l._disabled[o]=!0,l._update(),l},c.prototype.read_options=function(o){var l=this._create();for(var a in u)l._disabled[a]=o.templating.indexOf(a)===-1;return l._update(),l},c.prototype.exclude=function(o){var l=this._create();return l._excluded[o]=!0,l._update(),l},c.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),o+=l,l=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},c.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},c.prototype._read_template=function(){var o="",l=this._input.peek();if(l==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(o=o||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},b.exports.TemplatablePattern=c},,,,function(b,m,f){var d=f(19).Beautifier,u=f(20).Options;function c(o,l,a,i){var R=new d(o,l,a,i);return R.beautify()}b.exports=c,b.exports.defaultOptions=function(){return new u}},function(b,m,f){var d=f(20).Options,u=f(2).Output,c=f(21).Tokenizer,o=f(21).TOKEN,l=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,i=function(A,_){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=A.max_preserve_newlines,this.preserve_newlines=A.preserve_newlines,this._output=new u(A,_)};i.prototype.current_line_has_match=function(A){return this._output.current_line.has_match(A)},i.prototype.set_space_before_token=function(A,_){this._output.space_before_token=A,this._output.non_breaking_space=_},i.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},i.prototype.add_raw_token=function(A){this._output.add_raw_token(A)},i.prototype.print_preserved_newlines=function(A){var _=0;A.type!==o.TEXT&&A.previous.type!==o.TEXT&&(_=A.newlines?1:0),this.preserve_newlines&&(_=A.newlines<this.max_preserve_newlines+1?A.newlines:this.max_preserve_newlines+1);for(var v=0;v<_;v++)this.print_newline(v>0);return _!==0},i.prototype.traverse_whitespace=function(A){return A.whitespace_before||A.newlines?(this.print_preserved_newlines(A)||(this._output.space_before_token=!0),!0):!1},i.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},i.prototype.print_newline=function(A){this._output.add_new_line(A)},i.prototype.print_token=function(A){A.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(A.text))},i.prototype.indent=function(){this.indent_level++},i.prototype.get_full_indent=function(A){return A=this.indent_level+(A||0),A<1?"":this._output.get_indent_string(A)};var R=function(A){for(var _=null,v=A.next;v.type!==o.EOF&&A.closed!==v;){if(v.type===o.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===o.EQUALS&&v.next.next&&v.next.next.type===o.VALUE&&(_=v.next.next.text);break}v=v.next}return _},S=function(A,_){var v=null,P=null;return _.closed?(A==="script"?v="text/javascript":A==="style"&&(v="text/css"),v=R(_)||v,v.search("text/css")>-1?P="css":v.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?P="javascript":v.search(/(text|application|dojo)\/(x-)?(html)/)>-1?P="html":v.search(/test\/null/)>-1&&(P="null"),P):null};function T(A,_){return _.indexOf(A)!==-1}function I(A,_,v){this.parent=A||null,this.tag=_?_.tag_name:"",this.indent_level=v||0,this.parser_token=_||null}function O(A){this._printer=A,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(A){var _=new I(this._current_frame,A,this._printer.indent_level);this._current_frame=_},O.prototype._try_pop_frame=function(A){var _=null;return A&&(_=A.parser_token,this._printer.indent_level=A.indent_level,this._current_frame=A.parent),_},O.prototype._get_frame=function(A,_){for(var v=this._current_frame;v&&!(A.indexOf(v.tag)!==-1);){if(_&&_.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},O.prototype.try_pop=function(A,_){var v=this._get_frame([A],_);return this._try_pop_frame(v)},O.prototype.indent_to_tag=function(A){var _=this._get_frame(A);_&&(this._printer.indent_level=_.indent_level)};function E(A,_,v,P){this._source_text=A||"",_=_||{},this._js_beautify=v,this._css_beautify=P,this._tag_stack=null;var x=new d(_,"html");this._options=x,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A=this._source_text,_=this._options.eol;this._options.eol==="auto"&&(_=`
`,A&&l.test(A)&&(_=A.match(l)[0])),A=A.replace(a,`
`);var v=A.match(/^[\t ]*/)[0],P={text:"",type:""},x=new y,C=new i(this._options,v),j=new c(A,this._options).tokenize();this._tag_stack=new O(C);for(var B=null,w=j.next();w.type!==o.EOF;)w.type===o.TAG_OPEN||w.type===o.COMMENT?(B=this._handle_tag_open(C,w,x,P),x=B):w.type===o.ATTRIBUTE||w.type===o.EQUALS||w.type===o.VALUE||w.type===o.TEXT&&!x.tag_complete?B=this._handle_inside_tag(C,w,x,j):w.type===o.TAG_CLOSE?B=this._handle_tag_close(C,w,x):w.type===o.TEXT?B=this._handle_text(C,w,x):C.add_raw_token(w),P=B,w=j.next();var Y=C._output.get_code(_);return Y},E.prototype._handle_tag_close=function(A,_,v){var P={text:_.text,type:_.type};return A.alignment_size=0,v.tag_complete=!0,A.set_space_before_token(_.newlines||_.whitespace_before!=="",!0),v.is_unformatted?A.add_raw_token(_):(v.tag_start_char==="<"&&(A.set_space_before_token(_.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&A.print_newline(!1)),A.print_token(_)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(A.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&A.set_wrap_point(),P},E.prototype._handle_inside_tag=function(A,_,v,P){var x=v.has_wrapped_attrs,C={text:_.text,type:_.type};if(A.set_space_before_token(_.newlines||_.whitespace_before!=="",!0),v.is_unformatted)A.add_raw_token(_);else if(v.tag_start_char==="{"&&_.type===o.TEXT)A.print_preserved_newlines(_)?(_.newlines=0,A.add_raw_token(_)):A.print_token(_);else{if(_.type===o.ATTRIBUTE?(A.set_space_before_token(!0),v.attr_count+=1):(_.type===o.EQUALS||_.type===o.VALUE&&_.previous.type===o.EQUALS)&&A.set_space_before_token(!1),_.type===o.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(A.traverse_whitespace(_),x=x||_.newlines!==0),this._is_wrap_attributes_force)){var j=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var B=!0,w=0,Y;do{if(Y=P.peek(w),Y.type===o.ATTRIBUTE){B=!1;break}w+=1}while(w<4&&Y.type!==o.EOF&&Y.type!==o.TAG_CLOSE);j=!B}j&&(A.print_newline(!1),x=!0)}A.print_token(_),x=x||A.previous_token_wrapped(),v.has_wrapped_attrs=x}return C},E.prototype._handle_text=function(A,_,v){var P={text:_.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(A,_,v):v.is_unformatted||v.is_content_unformatted?A.add_raw_token(_):(A.traverse_whitespace(_),A.print_token(_)),P},E.prototype._print_custom_beatifier_text=function(A,_,v){var P=this;if(_.text!==""){var x=_.text,C,j=1,B="",w="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?C=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?C=this._css_beautify:v.custom_beautifier_name==="html"&&(C=function(Ae,Re){var Le=new E(Ae,Re,P._js_beautify,P._css_beautify);return Le.beautify()}),this._options.indent_scripts==="keep"?j=0:this._options.indent_scripts==="separate"&&(j=-A.indent_level);var Y=A.get_full_indent(j);if(x=x.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&x[0]==="<"&&x.match(/^(<!--|<!\[CDATA\[)/)){var $=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(x);if(!$){A.add_raw_token(_);return}B=Y+$[1]+`
`,x=$[4],$[5]&&(w=Y+$[5]),x=x.replace(/\n[ \t]*$/,""),($[2]||$[3].indexOf(`
`)!==-1)&&($=$[3].match(/[ \t]+$/),$&&(_.whitespace_before=$[0]))}if(x)if(C){var oe=function(){this.eol=`
`};oe.prototype=this._options.raw_options;var de=new oe;x=C(Y+x,de)}else{var Be=_.whitespace_before;Be&&(x=x.replace(new RegExp(`
(`+Be+")?","g"),`
`)),x=Y+x.replace(/\n/g,`
`+Y)}B&&(x?x=B+x+`
`+w:x=B+w),A.print_newline(!1),x&&(_.text=x,_.whitespace_before="",_.newlines=0,A.add_raw_token(_),A.print_newline(!0))}},E.prototype._handle_tag_open=function(A,_,v,P){var x=this._get_tag_open_token(_);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&_.type===o.TAG_OPEN&&_.text.indexOf("</")===0?(A.add_raw_token(_),x.start_tag_token=this._tag_stack.try_pop(x.tag_name)):(A.traverse_whitespace(_),this._set_tag_position(A,_,x,v,P),x.is_inline_element||A.set_wrap_point(),A.print_token(_)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(x.alignment_size=_.text.length+1),!x.tag_complete&&!x.is_unformatted&&(A.alignment_size=x.alignment_size),x};var y=function(A,_){if(this.parent=A||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!_)this.tag_complete=!0;else{var v;this.tag_start_char=_.text[0],this.text=_.text,this.tag_start_char==="<"?(v=_.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=_.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(_.text.startsWith("{{#>")||_.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&_.next!==null?this.tag_check=_.next.text.split(" ")[0]:this.tag_check=_.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),_.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||_.closed&&_.closed.text==="/>";var P=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(P=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(P)))}};E.prototype._get_tag_open_token=function(A){var _=new y(this._tag_stack.get_parser_token(),A);return _.alignment_size=this._options.wrap_attributes_indent_size,_.is_end_tag=_.is_end_tag||T(_.tag_check,this._options.void_elements),_.is_empty_element=_.tag_complete||_.is_start_tag&&_.is_end_tag,_.is_unformatted=!_.tag_complete&&T(_.tag_check,this._options.unformatted),_.is_content_unformatted=!_.is_empty_element&&T(_.tag_check,this._options.content_unformatted),_.is_inline_element=T(_.tag_name,this._options.inline)||_.tag_name.includes("-")||_.tag_start_char==="{",_},E.prototype._set_tag_position=function(A,_,v,P,x){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||A.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=S(v.tag_check,_)))),T(v.tag_check,this._options.extra_liners)&&(A.print_newline(!1),A._output.just_added_blankline()||A.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var C=A.current_line_has_match(/{{#if/);C||A.print_newline(!1)}v.tag_name==="!--"&&x.type===o.TAG_CLOSE&&P.is_end_tag&&v.text.indexOf(`
`)===-1||(v.is_inline_element||v.is_unformatted||A.print_newline(!1),this._calcluate_parent_multiline(A,v))}else if(v.is_end_tag){var j=!1;j=v.start_tag_token&&v.start_tag_token.multiline_content,j=j||!v.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(x.type===o.TAG_CLOSE&&v.start_tag_token===P)&&x.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(j=!1),j&&A.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(x.type!=="TK_CONTENT"||v.is_content_unformatted)&&A.print_newline(!1),this._calcluate_parent_multiline(A,v)},E.prototype._calcluate_parent_multiline=function(A,_){_.parent&&A._output.just_added_newline()&&!((_.is_inline_element||_.is_unformatted)&&_.parent.is_inline_element)&&(_.parent.multiline_content=!0)};var p=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],h=["a","audio","del","ins","map","noscript","video"];E.prototype._do_optional_end_element=function(A){var _=null;if(A.is_empty_element||!A.is_start_tag||!A.parent)return;if(A.tag_name==="body")_=_||this._tag_stack.try_pop("head");else if(A.tag_name==="li")_=_||this._tag_stack.try_pop("li",["ol","ul"]);else if(A.tag_name==="dd"||A.tag_name==="dt")_=_||this._tag_stack.try_pop("dt",["dl"]),_=_||this._tag_stack.try_pop("dd",["dl"]);else if(A.parent.tag_name==="p"&&p.indexOf(A.tag_name)!==-1){var v=A.parent.parent;(!v||h.indexOf(v.tag_name)===-1)&&(_=_||this._tag_stack.try_pop("p"))}else A.tag_name==="rp"||A.tag_name==="rt"?(_=_||this._tag_stack.try_pop("rt",["ruby","rtc"]),_=_||this._tag_stack.try_pop("rp",["ruby","rtc"])):A.tag_name==="optgroup"?_=_||this._tag_stack.try_pop("optgroup",["select"]):A.tag_name==="option"?_=_||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):A.tag_name==="colgroup"?_=_||this._tag_stack.try_pop("caption",["table"]):A.tag_name==="thead"?(_=_||this._tag_stack.try_pop("caption",["table"]),_=_||this._tag_stack.try_pop("colgroup",["table"])):A.tag_name==="tbody"||A.tag_name==="tfoot"?(_=_||this._tag_stack.try_pop("caption",["table"]),_=_||this._tag_stack.try_pop("colgroup",["table"]),_=_||this._tag_stack.try_pop("thead",["table"]),_=_||this._tag_stack.try_pop("tbody",["table"])):A.tag_name==="tr"?(_=_||this._tag_stack.try_pop("caption",["table"]),_=_||this._tag_stack.try_pop("colgroup",["table"]),_=_||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(A.tag_name==="th"||A.tag_name==="td")&&(_=_||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),_=_||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return A.parent=this._tag_stack.get_parser_token(),_},b.exports.Beautifier=E},function(b,m,f){var d=f(6).Options;function u(c){d.call(this,c,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}u.prototype=new d,b.exports.Options=u},function(b,m,f){var d=f(9).Tokenizer,u=f(9).TOKEN,c=f(13).Directives,o=f(14).TemplatablePattern,l=f(12).Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:u.START,RAW:u.RAW,EOF:u.EOF},i=new c(/<\!--/,/-->/),R=function(S,T){d.call(this,S,T),this._current_tag_name="";var I=new o(this._input).read_options(this._options),O=new l(this._input);if(this.__patterns={word:I.until(/[\n\r\t <]/),single_quote:I.until_after(/'/),double_quote:I.until_after(/"/),attribute:I.until(/[\n\r\t =>]|\/>/),element_name:I.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(/<!--/).until_after(/-->/),cdata:O.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:O.starting_with(/<!\[/).until_after(/]>/),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var E=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(E).until_after(E)}};R.prototype=new d,R.prototype._is_comment=function(S){return!1},R.prototype._is_opening=function(S){return S.type===a.TAG_OPEN},R.prototype._is_closing=function(S,T){return S.type===a.TAG_CLOSE&&T&&((S.text===">"||S.text==="/>")&&T.text[0]==="<"||S.text==="}}"&&T.text[0]==="{"&&T.text[1]==="{")},R.prototype._reset=function(){this._current_tag_name=""},R.prototype._get_next_token=function(S,T){var I=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(a.EOF,""):(I=I||this._read_open_handlebars(O,T),I=I||this._read_attribute(O,S,T),I=I||this._read_close(O,T),I=I||this._read_raw_content(O,S,T),I=I||this._read_content_word(O),I=I||this._read_comment_or_cdata(O),I=I||this._read_processing(O),I=I||this._read_open(O,T),I=I||this._create_token(a.UNKNOWN,this._input.next()),I)},R.prototype._read_comment_or_cdata=function(S){var T=null,I=null,O=null;if(S==="<"){var E=this._input.peek(1);E==="!"&&(I=this.__patterns.comment.read(),I?(O=i.get_directives(I),O&&O.ignore==="start"&&(I+=i.readIgnored(this._input))):I=this.__patterns.cdata.read()),I&&(T=this._create_token(a.COMMENT,I),T.directives=O)}return T},R.prototype._read_processing=function(S){var T=null,I=null,O=null;if(S==="<"){var E=this._input.peek(1);(E==="!"||E==="?")&&(I=this.__patterns.conditional_comment.read(),I=I||this.__patterns.processing.read()),I&&(T=this._create_token(a.COMMENT,I),T.directives=O)}return T},R.prototype._read_open=function(S,T){var I=null,O=null;return T||S==="<"&&(I=this._input.next(),this._input.peek()==="/"&&(I+=this._input.next()),I+=this.__patterns.element_name.read(),O=this._create_token(a.TAG_OPEN,I)),O},R.prototype._read_open_handlebars=function(S,T){var I=null,O=null;return T||this._options.indent_handlebars&&S==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(I=this.__patterns.handlebars_comment.read(),I=I||this.__patterns.handlebars.read(),O=this._create_token(a.COMMENT,I)):(I=this.__patterns.handlebars_open.read(),O=this._create_token(a.TAG_OPEN,I))),O},R.prototype._read_close=function(S,T){var I=null,O=null;return T&&(T.text[0]==="<"&&(S===">"||S==="/"&&this._input.peek(1)===">")?(I=this._input.next(),S==="/"&&(I+=this._input.next()),O=this._create_token(a.TAG_CLOSE,I)):T.text[0]==="{"&&S==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(a.TAG_CLOSE,"}}"))),O},R.prototype._read_attribute=function(S,T,I){var O=null,E="";if(I&&I.text[0]==="<")if(S==="=")O=this._create_token(a.EQUALS,this._input.next());else if(S==='"'||S==="'"){var y=this._input.next();S==='"'?y+=this.__patterns.double_quote.read():y+=this.__patterns.single_quote.read(),O=this._create_token(a.VALUE,y)}else E=this.__patterns.attribute.read(),E&&(T.type===a.EQUALS?O=this._create_token(a.VALUE,E):O=this._create_token(a.ATTRIBUTE,E));return O},R.prototype._is_content_unformatted=function(S){return this._options.void_elements.indexOf(S)===-1&&(this._options.content_unformatted.indexOf(S)!==-1||this._options.unformatted.indexOf(S)!==-1)},R.prototype._read_raw_content=function(S,T,I){var O="";if(I&&I.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(T.type===a.TAG_CLOSE&&T.opened.text[0]==="<"&&T.text[0]!=="/"){var E=T.opened.text.substr(1).toLowerCase();if(E==="script"||E==="style"){var y=this._read_comment_or_cdata(S);if(y)return y.type=a.TEXT,y;O=this._input.readUntil(new RegExp("</"+E+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(E)&&(O=this._input.readUntil(new RegExp("</"+E+"[\\n\\r\\t ]*?>","ig")))}return O?this._create_token(a.TEXT,O):null},R.prototype._read_content_word=function(S){var T="";if(this._options.unformatted_content_delimiter&&(S===this._options.unformatted_content_delimiter[0]&&(T=this.__patterns.unformatted_content_delimiter.read())),T||(T=this.__patterns.word.read()),T)return this._create_token(a.TEXT,T)},b.exports.Tokenizer=R,b.exports.TOKEN=a}],H={};function n(b){var m=H[b];if(m!==void 0)return m.exports;var f=H[b]={exports:{}};return K[b](f,f.exports,n),f.exports}var D=n(18);N=D})();var V=N;if(!0)!(Z=[U,U("6UM0"),U("TXwP")],z=function(K){var H=U("6UM0"),n=U("TXwP");return{html_beautify:function(D,b){return V(D,b,H.js_beautify,n.css_beautify)}}}.apply(se,Z),z!==void 0&&(Ve.exports=z));else var W,M})()},qgvg:function(Ve,se){Ve.exports="data:image/gif;base64,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"},"rAM+":function(Ve,se,U){"use strict";U.d(se,"a",function(){return z});var Z=U("Qw5x");function z(N,V){var W;if(typeof Symbol=="undefined"||N[Symbol.iterator]==null){if(Array.isArray(N)||(W=Object(Z.a)(N))||V&&N&&typeof N.length=="number"){W&&(N=W);var M=0,K=function(){};return{s:K,n:function(){return M>=N.length?{done:!0}:{done:!1,value:N[M++]}},e:function(m){throw m},f:K}}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 H=!0,n=!1,D;return{s:function(){W=N[Symbol.iterator]()},n:function(){var m=W.next();return H=m.done,m},e:function(m){n=!0,D=m},f:function(){try{!H&&W.return!=null&&W.return()}finally{if(n)throw D}}}}},rUJ1:function(Ve,se){const U=/[&<>"']/,Z=/[&<>"']/g,z=/[<>"']|&(?!#?\w+;)/,N=/[<>"']|&(?!#?\w+;)/g,V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=O=>V[O];function M(O,E){if(E){if(U.test(O))return O.replace(Z,W)}else if(z.test(O))return O.replace(N,W);return O}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(O){return O.replace(K,(E,y)=>(y=y.toLowerCase(),y==="colon"?":":y.charAt(0)==="#"?y.charAt(1)==="x"?String.fromCharCode(parseInt(y.substring(2),16)):String.fromCharCode(+y.substring(1)):""))}const n=/(^|[^\[])\^/g;function D(O,E){O=O.source||O,E=E||"";const y={replace:(p,h)=>(h=h.source||h,h=h.replace(n,"$1"),O=O.replace(p,h),y),getRegex:()=>new RegExp(O,E)};return y}const b=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(O,E,y){if(O){let p;try{p=decodeURIComponent(H(y)).replace(b,"").toLowerCase()}catch(h){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}E&&!m.test(y)&&(y=l(E,y));try{y=encodeURI(y).replace(/%25/g,"%")}catch(p){return null}return y}const d={},u=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(O,E){d[" "+O]||(u.test(O)?d[" "+O]=O+"/":d[" "+O]=S(O,"/",!0)),O=d[" "+O];const y=O.indexOf(":")===-1;return E.substring(0,2)==="//"?y?E:O.replace(c,"$1")+E:E.charAt(0)==="/"?y?E:O.replace(o,"$1")+E:O+E}const a={exec:function(){}};function i(O){let E=1,y,p;for(;E<arguments.length;E++){y=arguments[E];for(p in y)Object.prototype.hasOwnProperty.call(y,p)&&(O[p]=y[p])}return O}function R(O,E){const y=O.replace(/\|/g,(A,_,v)=>{let P=!1,x=_;for(;--x>=0&&v[x]==="\\";)P=!P;return P?"|":" |"}),p=y.split(/ \|/);let h=0;if(p.length>E)p.splice(E);else for(;p.length<E;)p.push("");for(;h<p.length;h++)p[h]=p[h].trim().replace(/\\\|/g,"|");return p}function S(O,E,y){const p=O.length;if(p===0)return"";let h=0;for(;h<p;){const A=O.charAt(p-h-1);if(A===E&&!y)h++;else if(A!==E&&y)h++;else break}return O.substr(0,p-h)}function T(O,E){if(O.indexOf(E[1])===-1)return-1;const y=O.length;let p=0,h=0;for(;h<y;h++)if(O[h]==="\\")h++;else if(O[h]===E[0])p++;else if(O[h]===E[1]&&(p--,p<0))return h;return-1}function I(O){O&&O.sanitize&&!O.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")}Ve.exports={escape:M,unescape:H,edit:D,cleanUrl:f,resolveUrl:l,noopTest:a,merge:i,splitCells:R,rtrim:S,findClosingBracket:T,checkSanitizeDeprecation:I}},sR1s:function(Ve,se,U){"use strict";U.d(se,"b",function(){return V}),U.d(se,"a",function(){return W}),U.d(se,"c",function(){return M}),U.d(se,"d",function(){return K});var Z=U("U8pU"),z="RC_TABLE_KEY";function N(H){return H==null?[]:Array.isArray(H)?H:[H]}function V(H,n){if(!n&&typeof n!="number")return H;for(var D=N(n),b=H,m=0;m<D.length;m+=1){if(!b)return null;var f=D[m];b=b[f]}return b}function W(H){var n=[],D={};return H.forEach(function(b){for(var m=b||{},f=m.key,d=m.dataIndex,u=f||N(d).join("-")||z;D[u];)u="".concat(u,"_next");D[u]=!0,n.push(u)}),n}function M(){var H={};function n(f,d){d&&Object.keys(d).forEach(function(u){var c=d[u];c&&Object(Z.a)(c)==="object"?(f[u]=f[u]||{},n(f[u],c)):f[u]=c})}for(var D=arguments.length,b=new Array(D),m=0;m<D;m++)b[m]=arguments[m];return b.forEach(function(f){n(H,f)}),H}function K(H){return H!=null}},sboe:function(Ve,se,U){"use strict";U.d(se,"a",function(){return N});var Z=U("q1tI"),z=U.n(Z),N=Z.createContext(null)},t23M:function(Ve,se,U){"use strict";var Z=U("VTBJ"),z=U("1OyB"),N=U("vuIU"),V=U("Ji7U"),W=U("LK+K"),M=U("q1tI"),K=U.n(M),H=U("m+aA"),n=U("Zm9Q"),D=U("Kwbf"),b=U("c+Xe"),m=U("bdgK"),f="rc-observer-key",d=function(u){Object(V.a)(o,u);var c=Object(W.a)(o);function o(){var l;return Object(z.a)(this,o),l=c.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(a){var i=l.props.onResize,R=a[0].target,S=R.getBoundingClientRect(),T=S.width,I=S.height,O=R.offsetWidth,E=R.offsetHeight,y=Math.floor(T),p=Math.floor(I);if(l.state.width!==y||l.state.height!==p||l.state.offsetWidth!==O||l.state.offsetHeight!==E){var h={width:y,height:p,offsetWidth:O,offsetHeight:E};l.setState(h),i&&Promise.resolve().then(function(){i(Object(Z.a)(Object(Z.a)({},h),{},{offsetWidth:O,offsetHeight:E}))})}},l.setChildNode=function(a){l.childNode=a},l}return Object(N.a)(o,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var a=this.props.disabled;if(a){this.destroyObserver();return}var i=Object(H.a)(this.childNode||this),R=i!==this.currentElement;R&&(this.destroyObserver(),this.currentElement=i),!this.resizeObserver&&i&&(this.resizeObserver=new m.default(this.onResize),this.resizeObserver.observe(i))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,i=Object(n.a)(a);if(i.length>1)Object(D.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(D.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var R=i[0];if(M.isValidElement(R)&&Object(b.c)(R)){var S=R.ref;i[0]=M.cloneElement(R,{ref:Object(b.a)(S,this.setChildNode)})}return i.length===1?i[0]:i.map(function(T,I){return!M.isValidElement(T)||"key"in T&&T.key!==null?T:M.cloneElement(T,{key:"".concat(f,"-").concat(I)})})}}]),o}(M.Component);d.displayName="ResizeObserver",se.a=d},t9D7:function(Ve,se,U){"use strict";U.d(se,"b",function(){return K}),U.d(se,"g",function(){return n}),U.d(se,"d",function(){return D}),U.d(se,"e",function(){return b}),U.d(se,"a",function(){return m}),U.d(se,"f",function(){return u}),U.d(se,"c",function(){return c});var Z=U("Vhoy"),z=U("MI8n"),N=U("pmY6"),V=U("Cg/j"),W=U("ic2d"),M=U("nEHx");const K=Object(V.c)("themeService");var H;(function(o){function l(a){return a&&typeof a=="object"&&typeof a.id=="string"}o.isThemeColor=l})(H||(H={}));function n(o){return{id:o}}var D;(function(o){function l(I){return I&&typeof I=="object"&&typeof I.id=="string"&&(typeof I.color=="undefined"||H.isThemeColor(I.color))}o.isThemeIcon=l;const a=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function i(I){const O=a.exec(I);if(!O)return;let[,E]=O;return{id:E}}o.fromString=i;function R(I,O){let E=I.id;const y=E.lastIndexOf("~");return y!==-1&&(E=E.substring(0,y)),O&&(E=`${E}~${O}`),{id:E}}o.modify=R;function S(I,O){var E,y;return I.id===O.id&&((E=I.color)===null||E===void 0?void 0:E.id)===((y=O.color)===null||y===void 0?void 0:y.id)}o.isEqual=S;function T(I,O){return{id:I.id,color:O?n(O):void 0}}o.asThemeIcon=T,o.asClassNameArray=Z.a.asClassNameArray,o.asClassName=Z.a.asClassName,o.asCSSSelector=Z.a.asCSSSelector})(D||(D={}));function b(o){switch(o){case M.a.DARK:return"vs-dark";case M.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const m={ThemingContribution:"base.contributions.theming"};class f{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new z.b}onColorThemeChange(o){return this.themingParticipants.push(o),this.onThemingParticipantAddedEmitter.fire(o),Object(N.i)(()=>{const l=this.themingParticipants.indexOf(o);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let d=new f;W.a.add(m.ThemingContribution,d);function u(o){return d.onColorThemeChange(o)}class c extends N.a{constructor(o){super();this.themeService=o,this.theme=o.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},tWlo:function(Ve,se){Ve.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVCNENBMTM1OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUI0Q0ExMzI4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUI0Q0ExMzM4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7p3KzkAAAFvElEQVR42sRae0ybVRQ/peVRaFce8pwgj1Je5TFsEHGbMAkzmqiJyba4hYh/LJlxiRr9Z0aNGv8xvhKTGckM2zKWmGEgU7MsPnCZIrKBjMcKY9BCBMqjjEcLtFDwHPZVC12h934f8yS/P6Dfud/5nXvvueec+8neOPEuSCAxiDJEMSITkYKIRoQJv9sREwgTogfRjGhEjIt9sUKEbhSiEvEC4mGEbJNngxGRiAzEk8L/VhGtiPOIswgrjxEBHDrxiE8Qg4hPEYYtjPclMkGXxhhCfIFI2E4CNFtvIm4hXvdYHlJIKOIVRK/wjkCpCaQjWhAfIVSwfaIS3kHvypaKwLOI64hdcP+kAPEn4jmxBI4ivkXsgPsvNBt1gg1cBI4hvkLI4f8TuWDDMdYw+owQFdh3Y6gSCnL1oNOmQnxcHAQHB8HCwiLMzM7C8KgFjD23oN9khtXVVZZhyZZhxEV/CGQhalk9r1AoYO9jxfBokQGCgoK8SBHi42LBsCsfJq1TcOnHn+F2v4llJsimIoRx3Q8le0o9/6bwdRmRxGJ8ZEQ4vHjkEORkZYBcLvdrlvL0OeBwOuDv4RF/X0Ne2Y34GrHiaw+8ishnMT4tNRmOVlVCTPQDzKfY/vJ9kJWpY1Ej217ztYnpFHyH6UjGJXH4wPOgVIZw7VAi8XRFOSjkTKv1bc8T25PACdZDan95mV9LZjNRq1Wg02lZw+tbGwnQ/L/EMooyJASSkxIliZUp7ONUCTb/S+AI2cTqOZlMJgmBcI2GVUUp2LyOAJMwxvHN04EAnqQYDrsJUDFSyKrtdC5JRmDR4eBRoxokgQjs48nn5+fnJSNgt3ONRTaXEYFHeLSXlpd5Peclk1Yrr6ohQKhhuWR6ekYSAiOWMV7VDCKg5Z0/uwTLaNnlAssYd22fTgRieTRz9dmQlpIsmgCdwuWle3nVY4mAmkczLCxUsk0cEaHhVVUH8GqOT0xKRmB6ZpZX1UkE5ng0zeYhsNntkhBgqAs2yhwR4AoBrpUVaO/oEm38nelp6B/gJnCHCNzm1f79jxaWgsRLbDY7XKj/Dlb405I+ItDDqz2/sACnTp9DEqNc+qfO1MLwyKiYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},ulZh:function(Ve,se,U){typeof window!="undefined"&&function(z,N){Ve.exports=N()}(this,function(){return function(Z){var z={};function N(V){if(z[V])return z[V].exports;var W=z[V]={i:V,l:!1,exports:{}};return Z[V].call(W.exports,W,W.exports,N),W.l=!0,W.exports}return N.m=Z,N.c=z,N.d=function(V,W,M){N.o(V,W)||Object.defineProperty(V,W,{enumerable:!0,get:M})},N.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},N.t=function(V,W){if(W&1&&(V=N(V)),W&8)return V;if(W&4&&typeof V=="object"&&V&&V.__esModule)return V;var M=Object.create(null);if(N.r(M),Object.defineProperty(M,"default",{enumerable:!0,value:V}),W&2&&typeof V!="string")for(var K in V)N.d(M,K,function(H){return V[H]}.bind(null,K));return M},N.n=function(V){var W=V&&V.__esModule?function(){return V.default}:function(){return V};return N.d(W,"a",W),W},N.o=function(V,W){return Object.prototype.hasOwnProperty.call(V,W)},N.p="/dist/",N(N.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,z,N){"use strict";var V=Object.prototype.hasOwnProperty,W="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(W=!1));function K(b,m,f){this.fn=b,this.context=m,this.once=f||!1}function H(b,m,f,d,u){if(typeof f!="function")throw new TypeError("The listener must be a function");var c=new K(f,d||b,u),o=W?W+m:m;return b._events[o]?b._events[o].fn?b._events[o]=[b._events[o],c]:b._events[o].push(c):(b._events[o]=c,b._eventsCount++),b}function n(b,m){--b._eventsCount===0?b._events=new M:delete b._events[m]}function D(){this._events=new M,this._eventsCount=0}D.prototype.eventNames=function(){var m=[],f,d;if(this._eventsCount===0)return m;for(d in f=this._events)V.call(f,d)&&m.push(W?d.slice(1):d);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(f)):m},D.prototype.listeners=function(m){var f=W?W+m:m,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var u=0,c=d.length,o=new Array(c);u<c;u++)o[u]=d[u].fn;return o},D.prototype.listenerCount=function(m){var f=W?W+m:m,d=this._events[f];return d?d.fn?1:d.length:0},D.prototype.emit=function(m,f,d,u,c,o){var l=W?W+m:m;if(!this._events[l])return!1;var a=this._events[l],i=arguments.length,R,S;if(a.fn){a.once&&this.removeListener(m,a.fn,void 0,!0);switch(i){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,f),!0;case 3:return a.fn.call(a.context,f,d),!0;case 4:return a.fn.call(a.context,f,d,u),!0;case 5:return a.fn.call(a.context,f,d,u,c),!0;case 6:return a.fn.call(a.context,f,d,u,c,o),!0}for(S=1,R=new Array(i-1);S<i;S++)R[S-1]=arguments[S];a.fn.apply(a.context,R)}else{var T=a.length,I;for(S=0;S<T;S++){a[S].once&&this.removeListener(m,a[S].fn,void 0,!0);switch(i){case 1:a[S].fn.call(a[S].context);break;case 2:a[S].fn.call(a[S].context,f);break;case 3:a[S].fn.call(a[S].context,f,d);break;case 4:a[S].fn.call(a[S].context,f,d,u);break;default:if(!R)for(I=1,R=new Array(i-1);I<i;I++)R[I-1]=arguments[I];a[S].fn.apply(a[S].context,R)}}}return!0},D.prototype.on=function(m,f,d){return H(this,m,f,d,!1)},D.prototype.once=function(m,f,d){return H(this,m,f,d,!0)},D.prototype.removeListener=function(m,f,d,u){var c=W?W+m:m;if(!this._events[c])return this;if(!f)return n(this,c),this;var o=this._events[c];if(o.fn)o.fn===f&&(!u||o.once)&&(!d||o.context===d)&&n(this,c);else{for(var l=0,a=[],i=o.length;l<i;l++)(o[l].fn!==f||u&&!o[l].once||d&&o[l].context!==d)&&a.push(o[l]);a.length?this._events[c]=a.length===1?a[0]:a:n(this,c)}return this},D.prototype.removeAllListeners=function(m){var f;return m?(f=W?W+m:m,this._events[f]&&n(this,f)):(this._events=new M,this._eventsCount=0),this},D.prototype.off=D.prototype.removeListener,D.prototype.addListener=D.prototype.on,D.prefixed=W,D.EventEmitter=D,Z.exports=D},"./node_modules/url-toolkit/src/url-toolkit.js":function(Z,z,N){(function(V){var W=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,M=/^([^\/?#]*)([^]*)$/,K=/(?:\/|^)\.(?=\/)/g,H=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,n={buildAbsoluteURL:function(D,b,m){if(m=m||{},D=D.trim(),b=b.trim(),!b){if(!m.alwaysNormalize)return D;var f=n.parseURL(D);if(!f)throw new Error("Error trying to parse base URL.");return f.path=n.normalizePath(f.path),n.buildURLFromParts(f)}var d=n.parseURL(b);if(!d)throw new Error("Error trying to parse relative URL.");if(d.scheme)return m.alwaysNormalize?(d.path=n.normalizePath(d.path),n.buildURLFromParts(d)):b;var u=n.parseURL(D);if(!u)throw new Error("Error trying to parse base URL.");if(!u.netLoc&&u.path&&u.path[0]!=="/"){var c=M.exec(u.path);u.netLoc=c[1],u.path=c[2]}u.netLoc&&!u.path&&(u.path="/");var o={scheme:u.scheme,netLoc:d.netLoc,path:null,params:d.params,query:d.query,fragment:d.fragment};if(!d.netLoc&&(o.netLoc=u.netLoc,d.path[0]!=="/"))if(!d.path)o.path=u.path,d.params||(o.params=u.params,d.query||(o.query=u.query));else{var l=u.path,a=l.substring(0,l.lastIndexOf("/")+1)+d.path;o.path=n.normalizePath(a)}return o.path===null&&(o.path=m.alwaysNormalize?n.normalizePath(d.path):d.path),n.buildURLFromParts(o)},parseURL:function(D){var b=W.exec(D);return b?{scheme:b[1]||"",netLoc:b[2]||"",path:b[3]||"",params:b[4]||"",query:b[5]||"",fragment:b[6]||""}:null},normalizePath:function(D){for(D=D.split("").reverse().join("").replace(K,"");D.length!==(D=D.replace(H,"")).length;);return D.split("").reverse().join("")},buildURLFromParts:function(D){return D.scheme+D.netLoc+D.path+D.params+D.query+D.fragment}};Z.exports=n})(this)},"./node_modules/webworkify-webpack/index.js":function(Z,z,N){function V(m){var f={};function d(c){if(f[c])return f[c].exports;var o=f[c]={i:c,l:!1,exports:{}};return m[c].call(o.exports,o,o.exports,d),o.l=!0,o.exports}d.m=m,d.c=f,d.i=function(c){return c},d.d=function(c,o,l){d.o(c,o)||Object.defineProperty(c,o,{configurable:!1,enumerable:!0,get:l})},d.r=function(c){Object.defineProperty(c,"__esModule",{value:!0})},d.n=function(c){var o=c&&c.__esModule?function(){return c.default}:function(){return c};return d.d(o,"a",o),o},d.o=function(c,o){return Object.prototype.hasOwnProperty.call(c,o)},d.p="/",d.oe=function(c){throw console.error(c),c};var u=d(d.s=ENTRY_MODULE);return u.default||u}var W="[\\.|\\-|\\+|\\w|/|@]+",M="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+W+").*?\\)";function K(m){return(m+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function H(m){return!isNaN(1*m)}function n(m,f,d){var u={};u[d]=[];var c=f.toString(),o=c.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return u;for(var l=o[1],a=new RegExp("(\\\\n|\\W)"+K(l)+M,"g"),i;i=a.exec(c);){if(i[3]==="dll-reference")continue;u[d].push(i[3])}for(a=new RegExp("\\("+K(l)+'\\("(dll-reference\\s('+W+'))"\\)\\)'+M,"g");i=a.exec(c);)m[i[2]]||(u[d].push(i[1]),m[i[2]]=N(i[1]).m),u[i[2]]=u[i[2]]||[],u[i[2]].push(i[4]);for(var R=Object.keys(u),S=0;S<R.length;S++)for(var T=0;T<u[R[S]].length;T++)H(u[R[S]][T])&&(u[R[S]][T]=1*u[R[S]][T]);return u}function D(m){var f=Object.keys(m);return f.reduce(function(d,u){return d||m[u].length>0},!1)}function b(m,f){for(var d={main:[f]},u={main:[]},c={main:{}};D(d);)for(var o=Object.keys(d),l=0;l<o.length;l++){var a=o[l],i=d[a],R=i.pop();if(c[a]=c[a]||{},c[a][R]||!m[a][R])continue;c[a][R]=!0,u[a]=u[a]||[],u[a].push(R);for(var S=n(m,m[a][R],a),T=Object.keys(S),I=0;I<T.length;I++)d[T[I]]=d[T[I]]||[],d[T[I]]=d[T[I]].concat(S[T[I]])}return u}Z.exports=function(m,f){f=f||{};var d={main:N.m},u=f.all?{main:Object.keys(d.main)}:b(d,m),c="";Object.keys(u).filter(function(R){return R!=="main"}).forEach(function(R){for(var S=0;u[R][S];)S++;u[R].push(S),d[R][S]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",c=c+"var "+R+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+u[R].map(function(T){return""+JSON.stringify(T)+": "+d[R][T].toString()}).join(",")+`});
`}),c=c+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+u.main.map(function(R){return""+JSON.stringify(R)+": "+d.main[R].toString()}).join(",")+"}))(self);";var o=new window.Blob([c],{type:"text/javascript"});if(f.bare)return o;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,a=l.createObjectURL(o),i=new window.Worker(a);return i.objectURL=a,i}},"./src/config.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"hlsDefaultConfig",function(){return I}),N.d(z,"mergeConfig",function(){return E}),N.d(z,"enableStreamingMode",function(){return y});var V=N("./src/controller/abr-controller.ts"),W=N("./src/controller/audio-stream-controller.ts"),M=N("./src/controller/audio-track-controller.ts"),K=N("./src/controller/subtitle-stream-controller.ts"),H=N("./src/controller/subtitle-track-controller.ts"),n=N("./src/controller/buffer-controller.ts"),D=N("./src/controller/timeline-controller.ts"),b=N("./src/controller/cap-level-controller.ts"),m=N("./src/controller/fps-controller.ts"),f=N("./src/controller/eme-controller.ts"),d=N("./src/controller/cmcd-controller.ts"),u=N("./src/utils/xhr-loader.ts"),c=N("./src/utils/fetch-loader.ts"),o=N("./src/utils/cues.ts"),l=N("./src/utils/mediakeys-helper.ts"),a=N("./src/utils/logger.ts");function i(){return i=Object.assign||function(p){for(var h=1;h<arguments.length;h++){var A=arguments[h];for(var _ in A)Object.prototype.hasOwnProperty.call(A,_)&&(p[_]=A[_])}return p},i.apply(this,arguments)}function R(p,h){var A=Object.keys(p);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(p);h&&(_=_.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),A.push.apply(A,_)}return A}function S(p){for(var h=1;h<arguments.length;h++){var A=arguments[h]!=null?arguments[h]:{};h%2?R(Object(A),!0).forEach(function(_){T(p,_,A[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(A)):R(Object(A)).forEach(function(_){Object.defineProperty(p,_,Object.getOwnPropertyDescriptor(A,_))})}return p}function T(p,h,A){return h in p?Object.defineProperty(p,h,{value:A,enumerable:!0,configurable:!0,writable:!0}):p[h]=A,p}var I=S(S({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:u.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:n.default,capLevelController:b.default,fpsController:m.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:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:K.SubtitleStreamController,subtitleTrackController:H.default,timelineController:D.TimelineController,audioStreamController:W.default,audioTrackController:M.default,emeController:f.default,cmcdController:d.default});function O(){return{cueHandler:o.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 E(p,h){if((h.liveSyncDurationCount||h.liveMaxLatencyDurationCount)&&(h.liveSyncDuration||h.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(h.liveMaxLatencyDurationCount!==void 0&&(h.liveSyncDurationCount===void 0||h.liveMaxLatencyDurationCount<=h.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(h.liveMaxLatencyDuration!==void 0&&(h.liveSyncDuration===void 0||h.liveMaxLatencyDuration<=h.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return i({},p,h)}function y(p){var h=p.loader;if(h!==c.default&&h!==u.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),p.progressive=!1;else{var A=Object(c.fetchSupported)();A&&(p.loader=c.default,p.progressive=!0,p.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/polyfills/number.ts"),W=N("./src/utils/ewma-bandwidth-estimator.ts"),M=N("./src/events.ts"),K=N("./src/utils/buffer-helper.ts"),H=N("./src/errors.ts"),n=N("./src/types/loader.ts"),D=N("./src/utils/logger.ts");function b(d,u){for(var c=0;c<u.length;c++){var o=u[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function m(d,u,c){return u&&b(d.prototype,u),c&&b(d,c),d}var f=function(){function d(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 o=c.config;this.bwEstimator=new W.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var u=d.prototype;return u.registerListeners=function(){var o=this.hls;o.on(M.Events.FRAG_LOADING,this.onFragLoading,this),o.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(M.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var o=this.hls;o.off(M.Events.FRAG_LOADING,this.onFragLoading,this),o.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(M.Events.ERROR,this.onError,this)},u.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},u.onFragLoading=function(o,l){var a=l.frag;if(a.type===n.PlaylistLevelType.MAIN&&!this.timer){var i;this.fragCurrent=a,this.partCurrent=(i=l.part)!=null?i:null,this.timer=self.setInterval(this.onCheck,100)}},u.onLevelLoaded=function(o,l){var a=this.hls.config;l.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},u._abandonRulesCheck=function(){var o=this.fragCurrent,l=this.partCurrent,a=this.hls,i=a.autoLevelEnabled,R=a.config,S=a.media;if(!o||!S)return;var T=l?l.stats:o.stats,I=l?l.duration:o.duration;if(T.aborted){D.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||S.paused||!S.playbackRate||!S.readyState)return;var O=performance.now()-T.loading.start,E=Math.abs(S.playbackRate);if(O<=500*I/E)return;var y=a.levels,p=a.minAutoLevel,h=y[o.level],A=T.total||Math.max(T.loaded,Math.round(I*h.maxBitrate/8)),_=Math.max(1,T.bwEstimate?T.bwEstimate/8:T.loaded*1e3/O),v=(A-T.loaded)/_,P=S.currentTime,x=(K.BufferHelper.bufferInfo(S,P,R.maxBufferHole).end-P)/E;if(x>=2*I/E||v<=x)return;var C=Number.POSITIVE_INFINITY,j;for(j=o.level-1;j>p;j--){var B=y[j].maxBitrate;if(C=I*B/(8*.8*_),C<x)break}if(C>=v)return;var w=this.bwEstimator.getEstimate();D.logger.warn("Fragment "+o.sn+(l?" part "+l.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+j+`
Current BW estimate: `+(Object(V.isFiniteNumber)(w)?(w/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+v.toFixed(3)+` s
Estimated load time for the next fragment: `+C.toFixed(3)+` s
Time to underbuffer: `+x.toFixed(3)+" s"),a.nextLoadLevel=j,this.bwEstimator.sample(O,T.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),a.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:l,stats:T})},u.onFragLoaded=function(o,l){var a=l.frag,i=l.part;if(a.type===n.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(a.sn)){var R=i?i.stats:a.stats,S=i?i.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var T=this.hls.levels[a.level],I=(T.loaded?T.loaded.bytes:0)+R.loaded,O=(T.loaded?T.loaded.duration:0)+S;T.loaded={bytes:I,duration:O},T.realBitrate=Math.round(8*I/O)}if(a.bitrateTest){var E={stats:R,frag:a,part:i,id:a.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,E),a.bitrateTest=!1}}},u.onFragBuffered=function(o,l){var a=l.frag,i=l.part,R=i?i.stats:a.stats;if(R.aborted)return;if(a.type!==n.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var S=R.parsing.end-R.loading.start;this.bwEstimator.sample(S,R.loaded),R.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=S/1e3:this.bitrateTestDelay=0},u.onError=function(o,l){switch(l.details){case H.ErrorDetails.FRAG_LOAD_ERROR:case H.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},u.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},u.getNextABRAutoLevel=function(){var o=this.fragCurrent,l=this.partCurrent,a=this.hls,i=a.maxAutoLevel,R=a.config,S=a.minAutoLevel,T=a.media,I=l?l.duration:o?o.duration:0,O=T?T.currentTime:0,E=T&&T.playbackRate!==0?Math.abs(T.playbackRate):1,y=this.bwEstimator?this.bwEstimator.getEstimate():R.abrEwmaDefaultEstimate,p=(K.BufferHelper.bufferInfo(T,O,R.maxBufferHole).end-O)/E,h=this.findBestLevel(y,S,i,p,R.abrBandWidthFactor,R.abrBandWidthUpFactor);if(h>=0)return h;D.logger.trace((p?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var A=I?Math.min(I,R.maxStarvationDelay):R.maxStarvationDelay,_=R.abrBandWidthFactor,v=R.abrBandWidthUpFactor;if(!p){var P=this.bitrateTestDelay;if(P){var x=I?Math.min(I,R.maxLoadingDelay):R.maxLoadingDelay;A=x-P,D.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*A)+" ms"),_=v=1}}return h=this.findBestLevel(y,S,i,p+A,_,v),Math.max(h,0)},u.findBestLevel=function(o,l,a,i,R,S){for(var T,I=this.fragCurrent,O=this.partCurrent,E=this.lastLoadedFragLevel,y=this.hls.levels,p=y[E],h=!!(p!=null&&(T=p.details)!==null&&T!==void 0&&T.live),A=p==null?void 0:p.codecSet,_=O?O.duration:I?I.duration:0,v=a;v>=l;v--){var P=y[v];if(!P||A&&P.codecSet!==A)continue;var x=P.details,C=(O?x==null?void 0:x.partTarget:x==null?void 0:x.averagetargetduration)||_,j=void 0;v<=E?j=R*o:j=S*o;var B=y[v].maxBitrate,w=B*C/j;if(D.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(j)+"/"+B+"/"+C+"/"+i+"/"+w),j>B&&(!w||h&&!this.bitrateTestDelay||w<i))return v}return-1},m(d,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,l=this.bwEstimator;if(o!==-1&&(!l||!l.canEstimate()))return o;var a=this.getNextABRAutoLevel();return o!==-1&&(a=Math.min(o,a)),a},set:function(o){this._nextAutoLevel=o}}]),d}();z.default=f},"./src/controller/audio-stream-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/polyfills/number.ts"),W=N("./src/controller/base-stream-controller.ts"),M=N("./src/events.ts"),K=N("./src/utils/buffer-helper.ts"),H=N("./src/controller/fragment-tracker.ts"),n=N("./src/types/level.ts"),D=N("./src/types/loader.ts"),b=N("./src/loader/fragment.ts"),m=N("./src/demux/chunk-cache.ts"),f=N("./src/demux/transmuxer-interface.ts"),d=N("./src/types/transmuxer.ts"),u=N("./src/controller/fragment-finders.ts"),c=N("./src/utils/discontinuities.ts"),o=N("./src/errors.ts"),l=N("./src/utils/logger.ts");function a(){return a=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var E=arguments[O];for(var y in E)Object.prototype.hasOwnProperty.call(E,y)&&(I[y]=E[y])}return I},a.apply(this,arguments)}function i(I,O){I.prototype=Object.create(O.prototype),I.prototype.constructor=I,R(I,O)}function R(I,O){return R=Object.setPrototypeOf||function(y,p){return y.__proto__=p,y},R(I,O)}var S=100,T=function(I){i(O,I);function O(y,p){var h;return h=I.call(this,y,p,"[audio-stream-controller]")||this,h.videoBuffer=null,h.videoTrackCC=-1,h.waitingVideoCC=-1,h.audioSwitch=!1,h.trackId=-1,h.waitingData=null,h.mainDetails=null,h.bufferFlushed=!1,h._registerListeners(),h}var E=O.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var p=this.hls;p.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.on(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.on(M.Events.ERROR,this.onError,this),p.on(M.Events.BUFFER_RESET,this.onBufferReset,this),p.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this),p.on(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var p=this.hls;p.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.off(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.off(M.Events.ERROR,this.onError,this),p.off(M.Events.BUFFER_RESET,this.onBufferReset,this),p.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),p.off(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onInitPtsFound=function(p,h){var A=h.frag,_=h.id,v=h.initPTS;if(_==="main"){var P=A.cc;this.initPTS[A.cc]=v,this.log("InitPTS for cc: "+P+" found from main: "+v),this.videoTrackCC=P,this.state===W.State.WAITING_INIT_PTS&&this.tick()}},E.startLoad=function(p){if(!this.levels){this.startPosition=p,this.state=W.State.STOPPED;return}var h=this.lastCurrentTime;this.stopLoad(),this.setInterval(S),this.fragLoadError=0,h>0&&p===-1?(this.log("Override startPosition with lastCurrentTime @"+h.toFixed(3)),this.state=W.State.IDLE):(this.loadedmetadata=!1,this.state=W.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()},E.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_TRACK:{var p,h=this.levels,A=this.trackId,_=h==null||((p=h[A])===null||p===void 0)?void 0:p.details;if(_){if(this.waitForCdnTuneIn(_))break;this.state=W.State.WAITING_INIT_PTS}break}case W.State.FRAG_LOADING_WAITING_RETRY:{var v,P=performance.now(),x=this.retryDate;(!x||P>=x||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=W.State.IDLE);break}case W.State.WAITING_INIT_PTS:{var C=this.waitingData;if(C){var j=C.frag,B=C.part,w=C.cache,Y=C.complete;if(this.initPTS[j.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.FRAG_LOADING;var $=w.flush(),oe={frag:j,part:B,payload:$,networkDetails:null};this._handleFragmentLoadProgress(oe),Y&&I.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+j.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Be=K.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Ae=Object(u.fragmentWithinToleranceTest)(Be.end,this.config.maxFragLookUpTolerance,j);Ae<0&&(l.logger.log("Waiting fragment cc ("+j.cc+") @ "+j.start+" cancelled because another fragment at "+Be.end+" is needed"),this.clearWaitingFragment())}}else this.state=W.State.IDLE}}this.onTickEnd()},E.clearWaitingFragment=function(){var p=this.waitingData;p&&(this.fragmentTracker.removeFragment(p.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=W.State.IDLE)},E.onTickEnd=function(){var p=this.media;if(!p||!p.readyState)return;var h=this.mediaBuffer?this.mediaBuffer:p,A=h.buffered;!this.loadedmetadata&&A.length&&(this.loadedmetadata=!0),this.lastCurrentTime=p.currentTime},E.doTickIdle=function(){var p,h,A=this.hls,_=this.levels,v=this.media,P=this.trackId,x=A.config;if(!_||!_[P])return;if(!v&&(this.startFragRequested||!x.startFragPrefetch))return;var C=_[P],j=C.details;if(!j||j.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(j)){this.state=W.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,b.ElementaryStreamTypes.AUDIO,D.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,D.PlaylistLevelType.AUDIO);if(B===null)return;var w=B.len,Y=this.getMaxBufferLength(),$=this.audioSwitch;if(w>=Y&&!$)return;if(!$&&this._streamEnded(B,j)){A.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=W.State.ENDED;return}var oe=j.fragments,de=oe[0].start,Be=B.end;if($){var Ae=this.getLoadPosition();Be=Ae,j.PTSKnown&&Ae<de&&((B.end>de||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),v.currentTime=de+.05))}var Re=this.getNextFragment(Be,j);if(!Re){this.bufferFlushed=!0;return}((p=Re.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((h=Re.decryptdata)!==null&&h!==void 0&&h.key)?this.loadKey(Re,j):this.loadFragment(Re,j,Be)},E.getMaxBufferLength=function(){var p=I.prototype.getMaxBufferLength.call(this),h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,D.PlaylistLevelType.MAIN);return h===null?p:Math.max(p,h.len)},E.onMediaDetaching=function(){this.videoBuffer=null,I.prototype.onMediaDetaching.call(this)},E.onAudioTracksUpdated=function(p,h){var A=h.audioTracks;this.resetTransmuxer(),this.levels=A.map(function(_){return new n.Level(_)})},E.onAudioTrackSwitching=function(p,h){var A=!!h.url;this.trackId=h.id;var _=this.fragCurrent;_!=null&&_.loader&&_.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),A?this.setInterval(S):this.resetTransmuxer(),A?(this.audioSwitch=!0,this.state=W.State.IDLE):this.state=W.State.STOPPED,this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},E.onLevelLoaded=function(p,h){this.mainDetails=h.details},E.onAudioTrackLoaded=function(p,h){var A,_=this.levels,v=h.details,P=h.id;if(!_){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var x=_[P],C=0;if(v.live||(A=x.details)!==null&&A!==void 0&&A.live){var j=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!j)return;!x.details&&v.hasProgramDateTime&&j.hasProgramDateTime?(Object(c.alignMediaPlaylistByPDT)(v,j),C=v.fragments[0].start):C=this.alignPlaylists(v,x.details)}x.details=v,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(x.details,C),this.state===W.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=W.State.IDLE),this.tick()},E._handleFragmentLoadProgress=function(p){var h,A=p.frag,_=p.part,v=p.payload,P=this.config,x=this.trackId,C=this.levels;if(!C){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+A.sn+" of level "+A.level+" will not be buffered");return}var j=C[x];console.assert(j,"Audio track is defined on fragment load progress");var B=j.details;console.assert(B,"Audio track details are defined on fragment load progress");var w=P.defaultAudioCodec||j.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new f.default(this.hls,D.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[A.cc],oe=(h=A.initSegment)===null||h===void 0?void 0:h.data;if($!==void 0){var de=!1,Be=_?_.index:-1,Ae=Be!==-1,Re=new d.ChunkMetadata(A.level,A.sn,A.stats.chunkCount,v.byteLength,Be,Ae);Y.push(v,oe,w,"",A,_,B.totalduration,de,Re,$)}else{l.logger.log("Unknown video PTS for cc "+A.cc+", waiting for video PTS before demuxing audio frag "+A.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+x);var Le=this.waitingData=this.waitingData||{frag:A,part:_,cache:new m.default,complete:!1},Fe=Le.cache;Fe.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=W.State.WAITING_INIT_PTS}},E._handleFragmentLoadComplete=function(p){if(this.waitingData){this.waitingData.complete=!0;return}I.prototype._handleFragmentLoadComplete.call(this,p)},E.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},E.onBufferCreated=function(p,h){var A=h.tracks.audio;A&&(this.mediaBuffer=A.buffer),h.tracks.video&&(this.videoBuffer=h.tracks.video.buffer)},E.onFragBuffered=function(p,h){var A=h.frag,_=h.part;if(A.type!==D.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(A)){this.warn("Fragment "+A.sn+(_?" p: "+_.index:"")+" of level "+A.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}A.sn!=="initSegment"&&(this.fragPrevious=A,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(A,_)},E.onError=function(p,h){switch(h.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(D.PlaylistLevelType.AUDIO,h);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==W.State.ERROR&&this.state!==W.State.STOPPED&&(this.state=h.fatal?W.State.ERROR:W.State.IDLE,this.warn(h.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(h.parent==="audio"&&(this.state===W.State.PARSING||this.state===W.State.PARSED)){var A=!0,_=this.getFwdBufferInfo(this.mediaBuffer,D.PlaylistLevelType.AUDIO);_&&_.len>.5&&(A=!this.reduceMaxBufferLength(_.len)),A&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,I.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},E.onBufferFlushed=function(p,h){var A=h.type;A===b.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},E._handleTransmuxComplete=function(p){var h,A="audio",_=this.hls,v=p.remuxResult,P=p.chunkMeta,x=this.getCurrentContext(P);if(!x){this.warn("The loading context changed while buffering fragment "+P.sn+" of level "+P.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(P.level);return}var C=x.frag,j=x.part,B=v.audio,w=v.text,Y=v.id3,$=v.initSegment;if(this.fragContextChanged(C))return;if(this.state=W.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,C,P),_.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:C,id:A,tracks:$.tracks})),B){var oe=B.startPTS,de=B.endPTS,Be=B.startDTS,Ae=B.endDTS;j&&(j.elementaryStreams[b.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:de,startDTS:Be,endDTS:Ae}),C.setElementaryStreamInfo(b.ElementaryStreamTypes.AUDIO,oe,de,Be,Ae),this.bufferFragmentData(B,C,j,P)}if(Y!=null&&(h=Y.samples)!==null&&h!==void 0&&h.length){var Re=a({frag:C,id:A},Y);_.trigger(M.Events.FRAG_PARSING_METADATA,Re)}if(w){var Le=a({frag:C,id:A},w);_.trigger(M.Events.FRAG_PARSING_USERDATA,Le)}},E._bufferInitSegment=function(p,h,A){if(this.state!==W.State.PARSING)return;p.video&&delete p.video;var _=p.audio;if(!_)return;_.levelCodec=_.codec,_.id="audio",this.log("Init audio buffer, container:"+_.container+", codecs[parsed]=["+_.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,p);var v=_.initSegment;if(v!=null&&v.byteLength){var P={type:"audio",frag:h,part:null,chunkMeta:A,parent:h.type,data:v};this.hls.trigger(M.Events.BUFFER_APPENDING,P)}this.tick()},E.loadFragment=function(p,h,A){var _=this.fragmentTracker.getState(p);this.fragCurrent=p,(this.audioSwitch||_===H.FragmentState.NOT_LOADED||_===H.FragmentState.PARTIAL)&&(p.sn==="initSegment"?this._loadInitSegment(p):h.live&&!Object(V.isFiniteNumber)(this.initPTS[p.cc])?(this.log("Waiting for video PTS in continuity counter "+p.cc+" of live stream before loading audio fragment "+p.sn+" of level "+this.trackId),this.state=W.State.WAITING_INIT_PTS):(this.startFragRequested=!0,I.prototype.loadFragment.call(this,p,h,A)))},E.completeAudioSwitch=function(){var p=this.hls,h=this.media,A=this.trackId;h&&(this.log("Switching audio track : flushing all audio"),I.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,p.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:A})},O}(W.default);z.default=T},"./src/controller/audio-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts"),W=N("./src/errors.ts"),M=N("./src/controller/base-playlist-controller.ts"),K=N("./src/types/loader.ts");function H(f,d){for(var u=0;u<d.length;u++){var c=d[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}function n(f,d,u){return d&&H(f.prototype,d),u&&H(f,u),f}function D(f,d){f.prototype=Object.create(d.prototype),f.prototype.constructor=f,b(f,d)}function b(f,d){return b=Object.setPrototypeOf||function(c,o){return c.__proto__=o,c},b(f,d)}var m=function(f){D(d,f);function d(c){var o;return o=f.call(this,c,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var u=d.prototype;return u.registerListeners=function(){var o=this.hls;o.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(V.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(V.Events.ERROR,this.onError,this)},u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,f.prototype.destroy.call(this)},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},u.onManifestParsed=function(o,l){this.tracks=l.audioTracks||[]},u.onAudioTrackLoaded=function(o,l){var a=l.id,i=l.details,R=this.tracksInGroup[a];if(!R){this.warn("Invalid audio track id "+a);return}var S=R.details;R.details=l.details,this.log("audioTrack "+a+" loaded ["+i.startSN+"-"+i.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,l,S))},u.onLevelLoading=function(o,l){this.switchLevel(l.level)},u.onLevelSwitching=function(o,l){this.switchLevel(l.level)},u.switchLevel=function(o){var l=this.hls.levels[o];if(!(l!=null&&l.audioGroupIds))return;var a=l.audioGroupIds[l.urlId];if(this.groupId!==a){this.groupId=a;var i=this.tracks.filter(function(S){return!a||S.groupId===a});this.selectDefaultTrack&&!i.some(function(S){return S.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var R={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,R),this.selectInitialTrack()}},u.onError=function(o,l){if(f.prototype.onError.call(this,o,l),l.fatal||!l.context)return;l.context.type===K.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},u.setAudioTrack=function(o){var l=this.tracksInGroup;if(o<0||o>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=l[this.trackId];this.log("Now switching to audio-track index "+o);var i=l[o],R=i.id,S=i.groupId,T=S===void 0?"":S,I=i.name,O=i.type,E=i.url;if(this.trackId=o,this.trackName=I,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:R,groupId:T,name:I,type:O,url:E}),i.details&&!i.details.live)return;var y=this.switchParams(i.url,a==null?void 0:a.details);this.loadPlaylist(y)},u.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,a=this.findTrackId(l)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},u.findTrackId=function(o){for(var l=this.tracksInGroup,a=0;a<l.length;a++){var i=l[a];if((!this.selectDefaultTrack||i.default)&&(!o||o===i.name))return i.id}return-1},u.loadPlaylist=function(o){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var a=l.id,i=l.groupId,R=l.url;if(o)try{R=o.addDirectives(R)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:R,id:a,groupId:i,deliveryDirectives:o||null})}},n(d,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),d}(M.default);z.default=m},"./src/controller/base-playlist-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var V=N("./src/polyfills/number.ts"),W=N("./src/types/level.ts"),M=N("./src/controller/level-helper.ts"),K=N("./src/utils/logger.ts"),H=N("./src/errors.ts"),n=function(){function D(m,f){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=K.logger.log.bind(K.logger,f+":"),this.warn=K.logger.warn.bind(K.logger,f+":"),this.hls=m}var b=D.prototype;return b.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},b.onError=function(f,d){d.fatal&&d.type===H.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},b.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},b.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},b.stopLoad=function(){this.canLoad=!1,this.clearTimer()},b.switchParams=function(f,d){var u=d==null?void 0:d.renditionReports;if(u)for(var c=0;c<u.length;c++){var o=u[c],l=""+o.URI;if(l===f.substr(-l.length)){var a=parseInt(o["LAST-MSN"]),i=parseInt(o["LAST-PART"]);if(d&&this.hls.config.lowLatencyMode){var R=Math.min(d.age-d.partTarget,d.targetduration);i!==void 0&&R>d.partTarget&&(i+=1)}if(Object(V.isFiniteNumber)(a))return new W.HlsUrlParameters(a,Object(V.isFiniteNumber)(i)?i:void 0,W.HlsSkip.No)}}},b.loadPlaylist=function(f){},b.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},b.playlistLoaded=function(f,d,u){var c=this,o=d.details,l=d.stats,a=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(o.advancedDateTime=Date.now()-a,o.live||u!=null&&u.live){if(o.reloaded(u),u&&this.log("live playlist "+f+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),u&&o.fragments.length>0&&Object(M.mergeDetails)(u,o),!this.canLoad||!o.live)return;var i,R=void 0,S=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var T=this.hls.config.lowLatencyMode,I=o.lastPartSn,O=o.endSN,E=o.lastPartIndex,y=E!==-1,p=I===O,h=T?0:E;y?(R=p?O+1:I,S=p?h:E+1):R=O+1;var A=o.age,_=A+o.ageHeader,v=Math.min(_-o.partTarget,o.targetduration*1.5);if(v>0){if(u&&v>u.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+u.tuneInGoal+" to: "+v+" with playlist age: "+o.age),v=0;else{var P=Math.floor(v/o.targetduration);if(R+=P,S!==void 0){var x=Math.round(v%o.targetduration/o.partTarget);S+=x}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+A.toFixed(2)+"s goal: "+v+" skip sn "+P+" to part "+S)}o.tuneInGoal=v}if(i=this.getDeliveryDirectives(o,d.deliveryDirectives,R,S),T||!p){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(o,d.deliveryDirectives,R,S);var C=Object(M.computeReloadInterval)(o,l);R!==void 0&&o.canBlockReload&&(C-=o.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(C)+" ms"),this.timer=self.setTimeout(function(){return c.loadPlaylist(i)},C)}else this.clearTimer()},b.getDeliveryDirectives=function(f,d,u,c){var o=Object(W.getSkipValue)(f,u);return d!=null&&d.skip&&f.deltaUpdateFailed&&(u=d.msn,c=d.part,o=W.HlsSkip.No),new W.HlsUrlParameters(u,c,o)},b.retryLoadingOrFail=function(f){var d=this,u=this.hls.config,c=this.retryCount<u.levelLoadingMaxRetry;if(c){var o;if(this.retryCount++,f.details.indexOf("LoadTimeOut")>-1&&(o=f.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*u.levelLoadingRetryDelay,u.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return d.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+f.details+'"')}}else this.warn('cannot recover from error "'+f.details+'"'),this.clearTimer(),f.fatal=!0;return c},D}()},"./src/controller/base-stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"State",function(){return O}),N.d(z,"default",function(){return E});var V=N("./src/polyfills/number.ts"),W=N("./src/task-loop.ts"),M=N("./src/controller/fragment-tracker.ts"),K=N("./src/utils/buffer-helper.ts"),H=N("./src/utils/logger.ts"),n=N("./src/events.ts"),D=N("./src/errors.ts"),b=N("./src/types/transmuxer.ts"),m=N("./src/utils/mp4-tools.ts"),f=N("./src/utils/discontinuities.ts"),d=N("./src/controller/fragment-finders.ts"),u=N("./src/controller/level-helper.ts"),c=N("./src/loader/fragment-loader.ts"),o=N("./src/crypt/decrypter.ts"),l=N("./src/utils/time-ranges.ts"),a=N("./src/types/loader.ts");function i(y,p){for(var h=0;h<p.length;h++){var A=p[h];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(y,A.key,A)}}function R(y,p,h){return p&&i(y.prototype,p),h&&i(y,h),y}function S(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function T(y,p){y.prototype=Object.create(p.prototype),y.prototype.constructor=y,I(y,p)}function I(y,p){return I=Object.setPrototypeOf||function(A,_){return A.__proto__=_,A},I(y,p)}var O={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"},E=function(y){T(p,y);function p(A,_,v){var P;return P=y.call(this)||this,P.hls=void 0,P.fragPrevious=null,P.fragCurrent=null,P.fragmentTracker=void 0,P.transmuxer=null,P._state=O.STOPPED,P.media=void 0,P.mediaBuffer=void 0,P.config=void 0,P.bitrateTest=!1,P.lastCurrentTime=0,P.nextLoadPosition=0,P.startPosition=0,P.loadedmetadata=!1,P.fragLoadError=0,P.retryDate=0,P.levels=null,P.fragmentLoader=void 0,P.levelLastLoaded=null,P.startFragRequested=!1,P.decrypter=void 0,P.initPTS=[],P.onvseeking=null,P.onvended=null,P.logPrefix="",P.log=void 0,P.warn=void 0,P.logPrefix=v,P.log=H.logger.log.bind(H.logger,v+":"),P.warn=H.logger.warn.bind(H.logger,v+":"),P.hls=A,P.fragmentLoader=new c.default(A.config),P.fragmentTracker=_,P.config=A.config,P.decrypter=new o.default(A,A.config),A.on(n.Events.KEY_LOADED,P.onKeyLoaded,S(P)),P}var h=p.prototype;return h.doTick=function(){this.onTickEnd()},h.onTickEnd=function(){},h.startLoad=function(_){},h.stopLoad=function(){this.fragmentLoader.abort();var _=this.fragCurrent;_&&this.fragmentTracker.removeFragment(_),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},h._streamEnded=function(_,v){var P=this.fragCurrent,x=this.fragmentTracker;if(!v.live&&P&&P.sn===v.endSN&&!_.nextStart){var C=x.getState(P);return C===M.FragmentState.PARTIAL||C===M.FragmentState.OK}return!1},h.onMediaAttached=function(_,v){var P=this.media=this.mediaBuffer=v.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),P.addEventListener("seeking",this.onvseeking),P.addEventListener("ended",this.onvended);var x=this.config;this.levels&&x.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(x.startPosition)},h.onMediaDetaching=function(){var _=this.media;_!=null&&_.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),_&&(_.removeEventListener("seeking",this.onvseeking),_.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},h.onMediaSeeking=function(){var _=this.config,v=this.fragCurrent,P=this.media,x=this.mediaBuffer,C=this.state,j=P?P.currentTime:0,B=K.BufferHelper.bufferInfo(x||P,j,_.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(j)?j.toFixed(3):j)+", state: "+C),C===O.ENDED)this.resetLoadingState();else if(v&&!B.len){var w=_.maxFragLookUpTolerance,Y=v.start-w,$=v.start+v.duration+w,oe=j>$;(j<Y||oe)&&(oe&&v.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),v.loader.abort()),this.resetLoadingState())}P&&(this.lastCurrentTime=j),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=j),this.tickImmediate()},h.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},h.onKeyLoaded=function(_,v){if(this.state!==O.KEY_LOADING||v.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var P=this.levels[v.frag.level].details;P&&this.loadFragment(v.frag,P,v.frag.start)},h.onHandlerDestroying=function(){this.stopLoad(),y.prototype.onHandlerDestroying.call(this)},h.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(n.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,y.prototype.onHandlerDestroyed.call(this)},h.loadKey=function(_,v){this.log("Loading key for "+_.sn+" of ["+v.startSN+"-"+v.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+_.level),this.state=O.KEY_LOADING,this.fragCurrent=_,this.hls.trigger(n.Events.KEY_LOADING,{frag:_})},h.loadFragment=function(_,v,P){this._loadFragForPlayback(_,v,P)},h._loadFragForPlayback=function(_,v,P){var x=this,C=function(B){if(x.fragContextChanged(_)){x.warn("Fragment "+_.sn+(B.part?" p: "+B.part.index:"")+" of level "+_.level+" was dropped during download."),x.fragmentTracker.removeFragment(_);return}_.stats.chunkCount++,x._handleFragmentLoadProgress(B)};this._doFragLoad(_,v,P,C).then(function(j){if(!j)return;x.fragLoadError=0;var B=x.state;if(x.fragContextChanged(_)){(B===O.FRAG_LOADING||B===O.BACKTRACKING||!x.fragCurrent&&B===O.PARSING)&&(x.fragmentTracker.removeFragment(_),x.state=O.IDLE);return}if("payload"in j&&(x.log("Loaded fragment "+_.sn+" of level "+_.level),x.hls.trigger(n.Events.FRAG_LOADED,j),x.state===O.BACKTRACKING)){x.fragmentTracker.backtrack(_,j),x.resetFragmentLoading(_);return}x._handleFragmentLoadComplete(j)}).catch(function(j){x.warn(j),x.resetFragmentLoading(_)})},h.flushMainBuffer=function(_,v,P){if(P===void 0&&(P=null),!(_-v))return;var x={startOffset:_,endOffset:v,type:P};this.fragLoadError=0,this.hls.trigger(n.Events.BUFFER_FLUSHING,x)},h._loadInitSegment=function(_){var v=this;this._doFragLoad(_).then(function(P){if(!P||v.fragContextChanged(_)||!v.levels)throw new Error("init load aborted");return P}).then(function(P){var x=v.hls,C=P.payload,j=_.decryptdata;if(C&&C.byteLength>0&&j&&j.key&&j.iv&&j.method==="AES-128"){var B=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(C),j.key.buffer,j.iv.buffer).then(function(w){var Y=self.performance.now();return x.trigger(n.Events.FRAG_DECRYPTED,{frag:_,payload:w,stats:{tstart:B,tdecrypt:Y}}),P.payload=w,P})}return P}).then(function(P){var x=v.fragCurrent,C=v.hls,j=v.levels;if(!j)throw new Error("init load aborted, missing levels");var B=j[_.level].details;console.assert(B,"Level details are defined when init segment is loaded");var w=_.stats;v.state=O.IDLE,v.fragLoadError=0,_.data=new Uint8Array(P.payload),w.parsing.start=w.buffering.start=self.performance.now(),w.parsing.end=w.buffering.end=self.performance.now(),P.frag===x&&C.trigger(n.Events.FRAG_BUFFERED,{stats:w,frag:x,part:null,id:_.type}),v.tick()}).catch(function(P){v.warn(P),v.resetFragmentLoading(_)})},h.fragContextChanged=function(_){var v=this.fragCurrent;return!_||!v||_.level!==v.level||_.sn!==v.sn||_.urlId!==v.urlId},h.fragBufferedComplete=function(_,v){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+_.type+" sn: "+_.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+_.level+" "+l.default.toString(K.BufferHelper.getBuffered(P))),this.state=O.IDLE,this.tick()},h._handleFragmentLoadComplete=function(_){var v=this.transmuxer;if(!v)return;var P=_.frag,x=_.part,C=_.partsLoaded,j=!C||C.length===0||C.some(function(w){return!w}),B=new b.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,x?x.index:-1,!j);v.flush(B)},h._handleFragmentLoadProgress=function(_){},h._doFragLoad=function(_,v,P,x){var C=this;if(P===void 0&&(P=null),!this.levels)throw new Error("frag load aborted, missing levels");if(P=Math.max(_.start,P||0),this.config.lowLatencyMode&&v){var j=v.partList;if(j&&x){P>_.end&&v.fragmentHint&&(_=v.fragmentHint);var B=this.getNextPart(j,_,P);if(B>-1){var w=j[B];return this.log("Loading part sn: "+_.sn+" p: "+w.index+" cc: "+_.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+B+"-"+(j.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+_.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=w.start+w.duration,this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:_,part:j[B],targetBufferTime:P}),this.doFragPartsLoad(_,j,B,x).catch(function(Y){return C.handleFragLoadError(Y)})}else if(!_.url||this.loadedEndOfParts(j,P))return Promise.resolve(null)}}return this.log("Loading fragment "+_.sn+" cc: "+_.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+_.level+", target: "+parseFloat(P.toFixed(3))),Object(V.isFiniteNumber)(_.sn)&&!this.bitrateTest&&(this.nextLoadPosition=_.start+_.duration),this.state=O.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:_,targetBufferTime:P}),this.fragmentLoader.load(_,x).catch(function(Y){return C.handleFragLoadError(Y)})},h.doFragPartsLoad=function(_,v,P,x){var C=this;return new Promise(function(j,B){var w=[],Y=function $(oe){var de=v[oe];C.fragmentLoader.loadPart(_,de,x).then(function(Be){w[de.index]=Be;var Ae=Be.part;C.hls.trigger(n.Events.FRAG_LOADED,Be);var Re=v[oe+1];if(Re&&Re.fragment===_)$(oe+1);else return j({frag:_,part:Ae,partsLoaded:w})}).catch(B)};Y(P)})},h.handleFragLoadError=function(_){var v=_.data;return v&&v.details===D.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(n.Events.ERROR,v),null},h._handleTransmuxerFlush=function(_){var v=this.getCurrentContext(_);if(!v||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var P=v.frag,x=v.part,C=v.level,j=self.performance.now();P.stats.parsing.end=j,x&&(x.stats.parsing.end=j),this.updateLevelTiming(P,x,C,_.partial)},h.getCurrentContext=function(_){var v=this.levels,P=_.level,x=_.sn,C=_.part;if(!v||!v[P])return this.warn("Levels object was unset while buffering fragment "+x+" of level "+P+". The current chunk will not be buffered."),null;var j=v[P],B=C>-1?Object(u.getPartWith)(j,x,C):null,w=B?B.fragment:Object(u.getFragmentWithSN)(j,x,this.fragCurrent);return w?{frag:w,part:B,level:j}:null},h.bufferFragmentData=function(_,v,P,x){if(!_||this.state!==O.PARSING)return;var C=_.data1,j=_.data2,B=C;if(C&&j&&(B=Object(m.appendUint8Array)(C,j)),!B||!B.length)return;var w={type:_.type,frag:v,part:P,chunkMeta:x,parent:v.type,data:B};this.hls.trigger(n.Events.BUFFER_APPENDING,w),_.dropped&&_.independent&&!P&&this.flushBufferGap(v)},h.flushBufferGap=function(_){var v=this.media;if(!v)return;if(!K.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,_.start);return}var P=v.currentTime,x=K.BufferHelper.bufferInfo(v,P,0),C=_.duration,j=Math.min(this.config.maxFragLookUpTolerance*2,C*.25),B=Math.max(Math.min(_.start-j,x.end-j),P+j);_.start-B>j&&this.flushMainBuffer(B,_.start)},h.getFwdBufferInfo=function(_,v){var P=this.config,x=this.getLoadPosition();if(!Object(V.isFiniteNumber)(x))return null;var C=K.BufferHelper.bufferInfo(_,x,P.maxBufferHole);if(C.len===0&&C.nextStart!==void 0){var j=this.fragmentTracker.getBufferedFrag(x,v);if(j&&C.nextStart<j.end)return K.BufferHelper.bufferInfo(_,x,Math.max(C.nextStart,P.maxBufferHole))}return C},h.getMaxBufferLength=function(_){var v=this.config,P;return _?P=Math.max(8*v.maxBufferSize/_,v.maxBufferLength):P=v.maxBufferLength,Math.min(P,v.maxMaxBufferLength)},h.reduceMaxBufferLength=function(_){var v=this.config,P=_||v.maxBufferLength;return v.maxMaxBufferLength>=P?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},h.getNextFragment=function(_,v){var P,x,C=v.fragments,j=C.length;if(!j)return null;var B=this.config,w=C[0].start,Y;if(v.live){var $=B.initialLiveManifestSize;if(j<$)return this.warn("Not enough fragments to start playback (have: "+j+", need: "+$+")"),null;!v.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(v,C),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:_)}else _<=w&&(Y=C[0]);if(!Y){var oe=B.lowLatencyMode?v.partEnd:v.fragmentEnd;Y=this.getFragmentAtPosition(_,oe,v)}return(P=Y)!==null&&P!==void 0&&P.initSegment&&!((x=Y)!==null&&x!==void 0&&x.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},h.getNextPart=function(_,v,P){for(var x=-1,C=!1,j=!0,B=0,w=_.length;B<w;B++){var Y=_[B];if(j=j&&!Y.independent,x>-1&&P<Y.start)break;var $=Y.loaded;!$&&(C||Y.independent||j)&&Y.fragment===v&&(x=B),C=$}return x},h.loadedEndOfParts=function(_,v){var P=_[_.length-1];return P&&v>P.start&&P.loaded},h.getInitialLiveFragment=function(_,v){var P=this.fragPrevious,x=null;if(P){if(_.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+P.programDateTime),x=Object(d.findFragmentByPDT)(v,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!x){var C=P.sn+1;if(C>=_.startSN&&C<=_.endSN){var j=v[C-_.startSN];P.cc===j.cc&&(x=j,this.log("Live playlist, switching playlist, load frag with next SN: "+x.sn))}x||(x=Object(d.findFragWithCC)(v,P.cc),x&&this.log("Live playlist, switching playlist, load frag with same CC: "+x.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(x=this.getFragmentAtPosition(B,this.bitrateTest?_.fragmentEnd:_.edge,_))}return x},h.getFragmentAtPosition=function(_,v,P){var x=this.config,C=this.fragPrevious,j=P.fragments,B=P.endSN,w=P.fragmentHint,Y=x.maxFragLookUpTolerance,$=!!(x.lowLatencyMode&&P.partList&&w);$&&w&&!this.bitrateTest&&(j=j.concat(w),B=w.sn);var oe;if(_<v){var de=_>v-Y?0:Y;oe=Object(d.findFragmentByPTS)(C,j,_,de)}else oe=j[j.length-1];if(oe){var Be=oe.sn-P.startSN,Ae=C&&oe.level===C.level,Re=j[Be+1],Le=this.fragmentTracker.getState(oe);if(Le===M.FragmentState.BACKTRACKED){oe=null;for(var Fe=Be;j[Fe]&&this.fragmentTracker.getState(j[Fe])===M.FragmentState.BACKTRACKED;)C?oe=j[Fe--]:oe=j[--Fe];oe||(oe=Re)}else C&&oe.sn===C.sn&&!$&&(Ae&&(oe.sn<B&&this.fragmentTracker.getState(Re)!==M.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+Re.sn),oe=Re):oe=null))}return oe},h.synchronizeToLiveEdge=function(_){var v=this.config,P=this.media;if(!P)return;var x=this.hls.liveSyncPosition,C=P.currentTime,j=_.fragments[0].start,B=_.edge,w=C>=j-v.maxFragLookUpTolerance&&C<=B;if(x!==null&&P.duration>x&&(C<x||!w)){var Y=v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:v.liveMaxLatencyDurationCount*_.targetduration;(!w&&P.readyState<4||C<B-Y)&&(this.loadedmetadata||(this.nextLoadPosition=x),P.readyState&&(this.warn("Playback: "+C.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+x.toFixed(3)),P.currentTime=x))}},h.alignPlaylists=function(_,v){var P=this.levels,x=this.levelLastLoaded,C=this.fragPrevious,j=x!==null?P[x]:null,B=_.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var w=_.fragments[0].start,Y=!v,$=_.alignedSliding&&Object(V.isFiniteNumber)(w);if(Y||!$&&!w){Object(f.alignStream)(C,j,_);var oe=_.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(v?v.startSN:"na")+"->"+_.startSN+" prev-sn: "+(C?C.sn:"na")+" fragments: "+B),oe}return w},h.waitForCdnTuneIn=function(_){var v=3;return _.live&&_.canBlockReload&&_.tuneInGoal>Math.max(_.partHoldBack,_.partTarget*v)},h.setStartPosition=function(_,v){var P=this.startPosition;if(P<v&&(P=-1),P===-1||this.lastCurrentTime===-1){var x=_.startTimeOffset;Object(V.isFiniteNumber)(x)?(P=v+x,x<0&&(P+=_.totalduration),P=Math.min(Math.max(v,P),v+_.totalduration),this.log("Start time offset "+x+" found in playlist, adjust startPosition to "+P),this.startPosition=P):_.live?P=this.hls.liveSyncPosition||v:this.startPosition=P=0,this.lastCurrentTime=P}this.nextLoadPosition=P},h.getLoadPosition=function(){var _=this.media,v=0;return this.loadedmetadata&&_?v=_.currentTime:this.nextLoadPosition&&(v=this.nextLoadPosition),v},h.handleFragLoadAborted=function(_,v){this.transmuxer&&_.sn!=="initSegment"&&_.stats.aborted&&(this.warn("Fragment "+_.sn+(v?" part"+v.index:"")+" of level "+_.level+" was aborted"),this.resetFragmentLoading(_))},h.resetFragmentLoading=function(_){(!this.fragCurrent||!this.fragContextChanged(_))&&(this.state=O.IDLE)},h.onFragmentOrKeyLoadError=function(_,v){if(v.fatal)return;var P=v.frag;if(!P||P.type!==_)return;var x=this.fragCurrent;console.assert(x&&P.sn===x.sn&&P.level===x.level&&P.urlId===x.urlId,"Frag load error must match current frag to retry");var C=this.config;if(this.fragLoadError+1<=C.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(P.level))return;var j=Math.min(Math.pow(2,this.fragLoadError)*C.fragLoadingRetryDelay,C.fragLoadingMaxRetryTimeout);this.warn("Fragment "+P.sn+" of "+_+" "+P.level+" failed to load, retrying in "+j+"ms"),this.retryDate=self.performance.now()+j,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else v.levelRetry?(_===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(H.logger.error(v.details+" reaches max retry, redispatch as fatal ..."),v.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},h.afterBufferFlushed=function(_,v,P){if(!_)return;var x=K.BufferHelper.getBuffered(_);this.fragmentTracker.detectEvictedFragments(v,x,P),this.state===O.ENDED&&this.resetLoadingState()},h.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},h.resetLiveStartWhenNotLoaded=function(_){if(!this.loadedmetadata){this.startFragRequested=!1;var v=this.levels?this.levels[_].details:null;if(v!=null&&v.live)return this.startPosition=-1,this.setStartPosition(v,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},h.updateLevelTiming=function(_,v,P,x){var C=this,j=P.details;console.assert(!!j,"level.details must be defined");var B=Object.keys(_.elementaryStreams).reduce(function(w,Y){var $=_.elementaryStreams[Y];if($){var oe=$.endPTS-$.startPTS;if(oe<=0)return C.warn("Could not parse fragment "+_.sn+" "+Y+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),C.resetTransmuxer(),w||!1;var de=x?0:Object(u.updateFragPTSDTS)(j,_,$.startPTS,$.endPTS,$.startDTS,$.endDTS);return C.hls.trigger(n.Events.LEVEL_PTS_UPDATED,{details:j,level:P,drift:de,type:Y,frag:_,start:$.startPTS,end:$.endPTS}),!0}return w},!1);B?(this.state=O.PARSED,this.hls.trigger(n.Events.FRAG_PARSED,{frag:_,part:v})):this.resetLoadingState()},h.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},R(p,[{key:"state",get:function(){return this._state},set:function(_){var v=this._state;v!==_&&(this._state=_,this.log(v+"->"+_))}}]),p}(W.default)},"./src/controller/buffer-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return d});var V=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),M=N("./src/utils/logger.ts"),K=N("./src/errors.ts"),H=N("./src/utils/buffer-helper.ts"),n=N("./src/utils/mediasource-helper.ts"),D=N("./src/loader/fragment.ts"),b=N("./src/controller/buffer-operation-queue.ts"),m=Object(n.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,d=function(){function u(o){var l=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 a=l.hls,i=l.media,R=l.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),i&&(l.updateMediaElementDuration(),a.trigger(W.Events.MEDIA_ATTACHED,{media:i})),R&&R.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var c=u.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 l=this.hls;l.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(W.Events.BUFFER_RESET,this.onBufferReset,this),l.on(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(W.Events.BUFFER_EOS,this.onBufferEos,this),l.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(W.Events.FRAG_PARSED,this.onFragParsed,this),l.on(W.Events.FRAG_CHANGED,this.onFragChanged,this)},c.unregisterListeners=function(){var l=this.hls;l.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(W.Events.BUFFER_RESET,this.onBufferReset,this),l.off(W.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(W.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(W.Events.BUFFER_EOS,this.onBufferEos,this),l.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(W.Events.FRAG_PARSED,this.onFragParsed,this),l.off(W.Events.FRAG_CHANGED,this.onFragChanged,this)},c._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new b.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},c.onManifestParsed=function(l,a){var i=2;(a.audio&&!a.video||!a.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},c.onMediaAttaching=function(l,a){var i=this.media=a.media;if(i&&m){var R=this.mediaSource=new m;R.addEventListener("sourceopen",this._onMediaSourceOpen),R.addEventListener("sourceended",this._onMediaSourceEnded),R.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(R),this._objectUrl=i.src}},c.onMediaDetaching=function(){var l=this.media,a=this.mediaSource,i=this._objectUrl;if(a){if(M.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(R){M.logger.warn("[buffer-controller]: onMediaDetaching: "+R.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(i&&self.URL.revokeObjectURL(i),l.src===i?(l.removeAttribute("src"),l.load()):M.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(W.Events.MEDIA_DETACHED,void 0)},c.onBufferReset=function(){var l=this;this.getSourceBufferTypes().forEach(function(a){var i=l.sourceBuffer[a];try{i&&(l.removeBufferListeners(a),l.mediaSource&&l.mediaSource.removeSourceBuffer(i),l.sourceBuffer[a]=void 0)}catch(R){M.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",R)}}),this._initSourceBuffer()},c.onBufferCodecs=function(l,a){var i=this,R=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(S){if(R){var T=i.tracks[S];if(T&&typeof T.buffer.changeType=="function"){var I=a[S],O=I.codec,E=I.levelCodec,y=I.container,p=(T.levelCodec||T.codec).replace(f,"$1"),h=(E||O).replace(f,"$1");if(p!==h){var A=y+";codecs="+(E||O);i.appendChangeType(S,A)}}}else i.pendingTracks[S]=a[S]}),R)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},c.appendChangeType=function(l,a){var i=this,R=this.operationQueue,S={execute:function(){var I=i.sourceBuffer[l];I&&(M.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+a),I.changeType(a)),R.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(I){M.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",I)}};R.append(S,l)},c.onBufferAppending=function(l,a){var i=this,R=this.hls,S=this.operationQueue,T=this.tracks,I=a.data,O=a.type,E=a.frag,y=a.part,p=a.chunkMeta,h=p.buffering[O],A=self.performance.now();h.start=A;var _=E.stats.buffering,v=y?y.stats.buffering:null;_.start===0&&(_.start=A),v&&v.start===0&&(v.start=A);var P=T.audio,x=O==="audio"&&p.id===1&&(P==null?void 0:P.container)==="audio/mpeg",C={execute:function(){if(h.executeStart=self.performance.now(),x){var B=i.sourceBuffer[O];if(B){var w=E.start-B.timestampOffset;Math.abs(w)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+E.start+" (delta: "+w+") sn: "+E.sn+")"),B.timestampOffset=E.start)}}i.appendExecutor(I,O)},onStart:function(){},onComplete:function(){var B=self.performance.now();h.executeEnd=h.end=B,_.first===0&&(_.first=B),v&&v.first===0&&(v.first=B);var w=i.sourceBuffer,Y={};for(var $ in w)Y[$]=H.BufferHelper.getBuffered(w[$]);i.appendError=0,i.hls.trigger(W.Events.BUFFER_APPENDED,{type:O,frag:E,part:y,chunkMeta:p,parent:E.type,timeRanges:Y})},onError:function(B){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",B);var w={type:K.ErrorTypes.MEDIA_ERROR,parent:E.type,details:K.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?w.details=K.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,w.details=K.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>R.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+R.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),w.fatal=!0)),R.trigger(W.Events.ERROR,w)}};S.append(C,O)},c.onBufferFlushing=function(l,a){var i=this,R=this.operationQueue,S=function(I){return{execute:i.removeExecutor.bind(i,I,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(W.Events.BUFFER_FLUSHED,{type:I})},onError:function(E){M.logger.warn("[buffer-controller]: Failed to remove from "+I+" SourceBuffer",E)}}};a.type?R.append(S(a.type),a.type):this.getSourceBufferTypes().forEach(function(T){R.append(S(T),T)})},c.onFragParsed=function(l,a){var i=this,R=a.frag,S=a.part,T=[],I=S?S.elementaryStreams:R.elementaryStreams;I[D.ElementaryStreamTypes.AUDIOVIDEO]?T.push("audiovideo"):(I[D.ElementaryStreamTypes.AUDIO]&&T.push("audio"),I[D.ElementaryStreamTypes.VIDEO]&&T.push("video"));var O=function(){var y=self.performance.now();R.stats.buffering.end=y,S&&(S.stats.buffering.end=y);var p=S?S.stats:R.stats;i.hls.trigger(W.Events.FRAG_BUFFERED,{frag:R,part:S,stats:p,id:R.type})};T.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+R.type+" level: "+R.level+" sn: "+R.sn),this.blockBuffers(O,T)},c.onFragChanged=function(l,a){this.flushBackBuffer()},c.onBufferEos=function(l,a){var i=this,R=this.getSourceBufferTypes().reduce(function(S,T){var I=i.sourceBuffer[T];return(!a.type||a.type===T)&&(I&&!I.ended&&(I.ended=!0,M.logger.log("[buffer-controller]: "+T+" sourceBuffer now EOS"))),S&&!!(!I||I.ended)},!0);R&&this.blockBuffers(function(){var S=i.mediaSource;if(!S||S.readyState!=="open")return;S.endOfStream()})},c.onLevelUpdated=function(l,a){var i=a.details;if(!i.fragments.length)return;this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},c.flushBackBuffer=function(){var l=this.hls,a=this.details,i=this.media,R=this.sourceBuffer;if(!i||a===null)return;var S=this.getSourceBufferTypes();if(!S.length)return;var T=a.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(V.isFiniteNumber)(T)||T<0)return;var I=i.currentTime,O=a.levelTargetDuration,E=Math.max(T,O),y=Math.floor(I/O)*O-E;S.forEach(function(p){var h=R[p];if(h){var A=H.BufferHelper.getBuffered(h);A.length>0&&y>A.start(0)&&(l.trigger(W.Events.BACK_BUFFER_REACHED,{bufferEnd:y}),a.live&&l.trigger(W.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:y}),l.trigger(W.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:y,type:p}))}})},c.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,a=this.hls,i=this.media,R=this.mediaSource,S=l.fragments[0].start+l.totalduration,T=i.duration,I=Object(V.isFiniteNumber)(R.duration)?R.duration:0;l.live&&a.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),R.duration=Infinity,this.updateSeekableRange(l)):(S>I&&S>T||!Object(V.isFiniteNumber)(T))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+S.toFixed(3)),R.duration=S)},c.updateSeekableRange=function(l){var a=this.mediaSource,i=l.fragments,R=i.length;if(R&&l.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var S=Math.max(0,i[0].start),T=Math.max(S,S+l.totalduration);a.setLiveSeekableRange(S,T)}},c.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,a=this.operationQueue,i=this.pendingTracks,R=Object.keys(i).length;if(R&&!l||R===2){this.createSourceBuffers(i),this.pendingTracks={};var S=this.getSourceBufferTypes();if(S.length===0){this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}S.forEach(function(T){a.executeNext(T)})}},c.createSourceBuffers=function(l){var a=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var R=0;for(var S in l)if(!a[S]){var T=l[S];if(!T)throw Error("source buffer exists for track "+S+", however track does not");var I=T.levelCodec||T.codec,O=T.container+";codecs="+I;M.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var E=a[S]=i.addSourceBuffer(O),y=S;this.addBufferListener(y,"updatestart",this._onSBUpdateStart),this.addBufferListener(y,"updateend",this._onSBUpdateEnd),this.addBufferListener(y,"error",this._onSBUpdateError),this.tracks[S]={buffer:E,codec:I,container:T.container,levelCodec:T.levelCodec,id:T.id},R++}catch(p){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+p.message),this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,mimeType:O})}}R&&this.hls.trigger(W.Events.BUFFER_CREATED,{tracks:this.tracks})},c._onSBUpdateStart=function(l){var a=this.operationQueue,i=a.current(l);i.onStart()},c._onSBUpdateEnd=function(l){var a=this.operationQueue,i=a.current(l);i.onComplete(),a.shiftAndExecuteNext(l)},c._onSBUpdateError=function(l,a){M.logger.error("[buffer-controller]: "+l+" SourceBuffer error",a),this.hls.trigger(W.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(l);i&&i.onError(a)},c.removeExecutor=function(l,a,i){var R=this.media,S=this.mediaSource,T=this.operationQueue,I=this.sourceBuffer,O=I[l];if(!R||!S||!O){M.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),T.shiftAndExecuteNext(l);return}var E=Object(V.isFiniteNumber)(R.duration)?R.duration:Infinity,y=Object(V.isFiniteNumber)(S.duration)?S.duration:Infinity,p=Math.max(0,a),h=Math.min(i,E,y);h>p?(M.logger.log("[buffer-controller]: Removing ["+p+","+h+"] from the "+l+" SourceBuffer"),console.assert(!O.updating,l+" sourceBuffer must not be updating"),O.remove(p,h)):T.shiftAndExecuteNext(l)},c.appendExecutor=function(l,a){var i=this.operationQueue,R=this.sourceBuffer,S=R[a];if(!S){M.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(a);return}S.ended=!1,console.assert(!S.updating,a+" sourceBuffer must not be updating"),S.appendBuffer(l)},c.blockBuffers=function(l,a){var i=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var R=this.operationQueue,S=a.map(function(T){return R.appendBlocker(T)});Promise.all(S).then(function(){l(),a.forEach(function(T){var I=i.sourceBuffer[T];(!I||!I.updating)&&R.shiftAndExecuteNext(T)})})},c.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},c.addBufferListener=function(l,a,i){var R=this.sourceBuffer[l];if(!R)return;var S=i.bind(this,l);this.listeners[l].push({event:a,listener:S}),R.addEventListener(a,S)},c.removeBufferListeners=function(l){var a=this.sourceBuffer[l];if(!a)return;this.listeners[l].forEach(function(i){a.removeEventListener(i.event,i.listener)})},u}()},"./src/controller/buffer-operation-queue.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return W});var V=N("./src/utils/logger.ts"),W=function(){function M(H){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=H}var K=M.prototype;return K.append=function(n,D){var b=this.queues[D];b.push(n),b.length===1&&this.buffers[D]&&this.executeNext(D)},K.insertAbort=function(n,D){var b=this.queues[D];b.unshift(n),this.executeNext(D)},K.appendBlocker=function(n){var D,b=new Promise(function(f){D=f}),m={execute:D,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,n),b},K.executeNext=function(n){var D=this.buffers,b=this.queues,m=D[n],f=b[n];if(f.length){var d=f[0];try{d.execute()}catch(u){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),d.onError(u),(!m||!m.updating)&&(f.shift(),this.executeNext(n))}}},K.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},K.current=function(n){return this.queues[n][0]},M}()},"./src/controller/cap-level-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts");function W(H,n){for(var D=0;D<n.length;D++){var b=n[D];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(H,b.key,b)}}function M(H,n,D){return n&&W(H.prototype,n),D&&W(H,D),H}var K=function(){function H(D){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=D,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var n=H.prototype;return n.setStreamController=function(b){this.streamController=b},n.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},n.registerListeners=function(){var b=this.hls;b.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),b.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),b.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),b.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.unregisterListener=function(){var b=this.hls;b.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),b.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),b.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),b.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.onFpsDropLevelCapping=function(b,m){H.isLevelAllowed(m.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(m.droppedLevel)},n.onMediaAttaching=function(b,m){this.media=m.media instanceof HTMLVideoElement?m.media:null},n.onManifestParsed=function(b,m){var f=this.hls;this.restrictedLevels=[],this.firstLevel=m.firstLevel,f.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onBufferCodecs=function(b,m){var f=this.hls;f.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onMediaDetaching=function(){this.stopCapping()},n.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var b=this.hls.levels;if(b.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(b.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},n.getMaxLevel=function(b){var m=this,f=this.hls.levels;if(!f.length)return-1;var d=f.filter(function(u,c){return H.isLevelAllowed(c,m.restrictedLevels)&&c<=b});return this.clientRect=null,H.getMaxLevelByMediaSize(d,this.mediaWidth,this.mediaHeight)},n.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()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var b=this.media,m={width:0,height:0};if(b){var f=b.getBoundingClientRect();m.width=f.width,m.height=f.height,!m.width&&!m.height&&(m.width=f.right-f.left||b.width||0,m.height=f.bottom-f.top||b.height||0)}return this.clientRect=m,m},H.isLevelAllowed=function(b,m){return m===void 0&&(m=[]),m.indexOf(b)===-1},H.getMaxLevelByMediaSize=function(b,m,f){if(!b||!b.length)return-1;for(var d=function(a,i){return i?a.width!==i.width||a.height!==i.height:!0},u=b.length-1,c=0;c<b.length;c+=1){var o=b[c];if((o.width>=m||o.height>=f)&&d(o,b[c+1])){u=c;break}}return u},M(H,[{key:"mediaWidth",get:function(){return this.getDimensions().width*H.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*H.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var b=1;try{b=self.devicePixelRatio}catch(m){}return b}}]),H}();z.default=K},"./src/controller/cmcd-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return d});var V=N("./src/events.ts"),W=N("./src/types/cmcd.ts"),M=N("./src/utils/buffer-helper.ts"),K=N("./src/utils/logger.ts");function H(u,c){for(var o=0;o<c.length;o++){var l=c[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function n(u,c,o){return c&&H(u.prototype,c),o&&H(u,o),u}function D(u,c){var o=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(o)return(o=o.call(u)).next.bind(o);if(Array.isArray(u)||(o=b(u))||c&&u&&typeof u.length=="number"){o&&(u=o);var l=0;return function(){return l>=u.length?{done:!0}:{done:!1,value:u[l++]}}}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 b(u,c){if(!u)return;if(typeof u=="string")return m(u,c);var o=Object.prototype.toString.call(u).slice(8,-1);if(o==="Object"&&u.constructor&&(o=u.constructor.name),o==="Map"||o==="Set")return Array.from(u);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return m(u,c)}function m(u,c){(c==null||c>u.length)&&(c=u.length);for(var o=0,l=new Array(c);o<c;o++)l[o]=u[o];return l}function f(){return f=Object.assign||function(u){for(var c=1;c<arguments.length;c++){var o=arguments[c];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(u[l]=o[l])}return u},f.apply(this,arguments)}var d=function(){function u(o){var l=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(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(R){try{l.apply(R,{ot:W.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(S){K.logger.warn("Could not generate manifest CMCD data.",S)}},this.applyFragmentData=function(R){try{var S=R.frag,T=l.hls.levels[S.level],I=l.getObjectType(S),O={d:S.duration*1e3,ot:I};(I===W.CMCDObjectType.VIDEO||I===W.CMCDObjectType.AUDIO||I==W.CMCDObjectType.MUXED)&&(O.br=T.bitrate/1e3,O.tb=l.getTopBandwidth(I),O.bl=l.getBufferLength(I)),l.apply(R,O)}catch(E){K.logger.warn("Could not generate segment CMCD data.",E)}},this.hls=o;var a=this.config=o.config,i=a.cmcd;i!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||u.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}var c=u.prototype;return c.registerListeners=function(){var l=this.hls;l.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},c.unregisterListeners=function(){var l=this.hls;l.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(V.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(l,a){this.media=a.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(l,a){var i,R;this.audioBuffer=(i=a.tracks.audio)===null||i===void 0?void 0:i.buffer,this.videoBuffer=(R=a.tracks.video)===null||R===void 0?void 0:R.buffer},c.createData=function(){var l;return{v:W.CMCDVersion,sf:W.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},c.apply=function(l,a){a===void 0&&(a={}),f(a,this.createData());var i=a.ot===W.CMCDObjectType.INIT||a.ot===W.CMCDObjectType.VIDEO||a.ot===W.CMCDObjectType.MUXED;if(this.starved&&i&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var R=u.toHeaders(a);if(!Object.keys(R).length)return;l.headers||(l.headers={}),f(l.headers,R)}else{var S=u.toQuery(a);if(!S)return;l.url=u.appendQueryToUri(l.url,S)}},c.getObjectType=function(l){var a=l.type;return a==="subtitle"?W.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?W.CMCDObjectType.INIT:a==="audio"?W.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?W.CMCDObjectType.VIDEO:W.CMCDObjectType.MUXED:void 0},c.getTopBandwidth=function(l){for(var a=0,i=l===W.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,R=D(i),S;!(S=R()).done;){var T=S.value;T.bitrate>a&&(a=T.bitrate)}return a>0?a:NaN},c.getBufferLength=function(l){var a=this.hls.media,i=l===W.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!a)return NaN;var R=M.BufferHelper.bufferInfo(i,a.currentTime,this.config.maxBufferHole);return R.len*1e3},c.createPlaylistLoader=function(){var l=this.config.pLoader,a=this.applyPlaylistData,i=l||this.config.loader;return function(){function R(T){this.loader=void 0,this.loader=new i(T)}var S=R.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(I,O,E){a(I),this.loader.load(I,O,E)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},c.createFragmentLoader=function(){var l=this.config.fLoader,a=this.applyFragmentData,i=l||this.config.loader;return function(){function R(T){this.loader=void 0,this.loader=new i(T)}var S=R.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(I,O,E){a(I),this.loader.load(I,O,E)},n(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},u.uuid=function(){var l=URL.createObjectURL(new Blob),a=l.toString();return URL.revokeObjectURL(l),a.substr(a.lastIndexOf("/")+1)},u.serialize=function(l){for(var a=[],i=function(x){return!Number.isNaN(x)&&x!=null&&x!==""&&x!==!1},R=function(x){return Math.round(x)},S=function(x){return R(x/100)*100},T=function(x){return encodeURIComponent(x)},I={br:R,d:R,bl:S,dl:S,mtp:S,nor:T,rtp:S,tb:R},O=Object.keys(l||{}).sort(),E=D(O),y;!(y=E()).done;){var p=y.value,h=l[p];if(!i(h))continue;if(p==="v"&&h===1)continue;if(p=="pr"&&h===1)continue;var A=I[p];A&&(h=A(h));var _=typeof h,v=void 0;p==="ot"||p==="sf"||p==="st"?v=p+"="+h:_==="boolean"?v=p:_==="number"?v=p+"="+h:v=p+"="+JSON.stringify(h),a.push(v)}return a.join(",")},u.toHeaders=function(l){for(var a=Object.keys(l),i={},R=["Object","Request","Session","Status"],S=[{},{},{},{}],T={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},I=0,O=a;I<O.length;I++){var E=O[I],y=T[E]!=null?T[E]:1;S[y][E]=l[E]}for(var p=0;p<S.length;p++){var h=u.serialize(S[p]);h&&(i["CMCD-"+R[p]]=h)}return i},u.toQuery=function(l){return"CMCD="+encodeURIComponent(u.serialize(l))},u.appendQueryToUri=function(l,a){if(!a)return l;var i=l.includes("?")?"&":"?";return""+l+i+a},u}()},"./src/controller/eme-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts"),W=N("./src/errors.ts"),M=N("./src/utils/logger.ts"),K=N("./src/utils/mediakeys-helper.ts");function H(d,u){for(var c=0;c<u.length;c++){var o=u[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function n(d,u,c){return u&&H(d.prototype,u),c&&H(d,c),d}var D=3,b=function(u,c,o){var l={audioCapabilities:[],videoCapabilities:[]};return u.forEach(function(a){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:o.audioRobustness||""})}),c.forEach(function(a){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:o.videoRobustness||""})}),[l]},m=function(u,c,o,l){switch(u){case K.KeySystems.WIDEVINE:return b(c,o,l);default:throw new Error("Unknown key-system: "+u)}},f=function(){function d(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 u=d.prototype;return u.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},u._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},u._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},u.getLicenseServerUrl=function(o){switch(o){case K.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},u._attemptKeySystemAccess=function(o,l,a){var i=this,R=m(o,l,a,this._drmSystemOptions);M.logger.log("Requesting encrypted media key-system access");var S=this.requestMediaKeySystemAccess(o,R);this.mediaKeysPromise=S.then(function(T){return i._onMediaKeySystemAccessObtained(o,T)}),S.catch(function(T){M.logger.error('Failed to obtain key-system "'+o+'" access:',T)})},u._onMediaKeySystemAccessObtained=function(o,l){var a=this;M.logger.log('Access for key-system "'+o+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:o};this._mediaKeysList.push(i);var R=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(S){return i.mediaKeys=S,M.logger.log('Media-keys created for key-system "'+o+'"'),a._onMediaKeysCreated(),S});return R.catch(function(S){M.logger.error("Failed to create media-keys:",S)}),R},u._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),o._onNewMediaKeySession(l.mediaKeysSession))})},u._onNewMediaKeySession=function(o){var l=this;M.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(a){l._onKeySessionMessage(o,a.message)},!1)},u._onKeySessionMessage=function(o,l){M.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(a){M.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),o.update(a)})},u.onMediaEncrypted=function(o){var l=this;if(M.logger.log('Media is encrypted using "'+o.initDataType+'" init data type'),!this.mediaKeysPromise){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(R){if(!l._media)return;l._attemptSetMediaKeys(R),l._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(a).catch(a)},u._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){M.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}M.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},u._generateRequestWithPreferredKeySession=function(o,l){var a=this,i=this._mediaKeysList[0];if(!i){M.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(i.mediaKeysSessionInitialized){M.logger.warn("Key-Session already initialized but requested again");return}var R=i.mediaKeysSession;if(!R){M.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){M.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}M.logger.log('Generating key-session request for "'+o+'" init data type'),i.mediaKeysSessionInitialized=!0,R.generateRequest(o,l).then(function(){M.logger.debug("Key-session generation succeeded")}).catch(function(S){M.logger.error("Error generating key-session request:",S),a.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},u._createLicenseXhr=function(o,l,a){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,o,l,a);var R=this._licenseXhrSetup;if(R)try{R.call(this.hls,i,o),R=void 0}catch(S){M.logger.error(S)}try{i.readyState||i.open("POST",o,!0),R&&R.call(this.hls,i,o)}catch(S){throw new Error("issue setting up KeySystem license XHR "+S)}return i},u._onLicenseRequestReadyStageChange=function(o,l,a,i){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,M.logger.log("License request succeeded");var R=o.response,S=this._licenseResponseCallback;if(S)try{R=S.call(this.hls,o,l)}catch(I){M.logger.error(I)}i(R)}else{if(M.logger.error("License Request XHR failed ("+l+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>D){this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var T=D-this._requestLicenseFailureCount+1;M.logger.warn("Retrying license request, "+T+" attempts left"),this._requestLicense(a,i)}break}},u._generateLicenseRequestChallenge=function(o,l){switch(o.mediaKeySystemDomain){case K.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},u._requestLicense=function(o,l){M.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){M.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var i=this.getLicenseServerUrl(a.mediaKeySystemDomain),R=this._createLicenseXhr(i,o,l);M.logger.log("Sending license request to URL: "+i);var S=this._generateLicenseRequestChallenge(a,o);R.send(S)}catch(T){M.logger.error("Failure requesting DRM license: "+T),this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.KEY_SYSTEM_ERROR,details:W.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},u.onMediaAttached=function(o,l){if(!this._emeEnabled)return;var a=l.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},u.onMediaDetached=function(){var o=this._media,l=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},u.onManifestParsed=function(o,l){if(!this._emeEnabled)return;var a=l.levels.map(function(R){return R.audioCodec}).filter(function(R){return!!R}),i=l.levels.map(function(R){return R.videoCodec}).filter(function(R){return!!R});this._attemptKeySystemAccess(K.KeySystems.WIDEVINE,a,i)},n(d,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),d}();z.default=f},"./src/controller/fps-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts"),W=N("./src/utils/logger.ts"),M=function(){function K(n){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=n,this.registerListeners()}var H=K.prototype;return H.setStreamController=function(D){this.streamController=D},H.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},H.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},H.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},H.onMediaAttaching=function(D,b){var m=this.hls.config;if(m.capLevelOnFPSDrop){var f=b.media instanceof self.HTMLVideoElement?b.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},H.checkFPS=function(D,b,m){var f=performance.now();if(b){if(this.lastTime){var d=f-this.lastTime,u=m-this.lastDroppedFrames,c=b-this.lastDecodedFrames,o=1e3*u/d,l=this.hls;if(l.trigger(V.Events.FPS_DROP,{currentDropped:u,currentDecoded:c,totalDroppedFrames:m}),o>0&&u>l.config.fpsDroppedMonitoringThreshold*c){var a=l.currentLevel;W.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=a)&&(a=a-1,l.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:l.currentLevel}),l.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=m,this.lastDecodedFrames=b}},H.checkFPSInterval=function(){var D=this.media;if(D)if(this.isVideoPlaybackQualityAvailable){var b=D.getVideoPlaybackQuality();this.checkFPS(D,b.totalVideoFrames,b.droppedVideoFrames)}else this.checkFPS(D,D.webkitDecodedFrameCount,D.webkitDroppedFrameCount)},K}();z.default=M},"./src/controller/fragment-finders.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"findFragmentByPDT",function(){return M}),N.d(z,"findFragmentByPTS",function(){return K}),N.d(z,"fragmentWithinToleranceTest",function(){return H}),N.d(z,"pdtWithinToleranceTest",function(){return n}),N.d(z,"findFragWithCC",function(){return D});var V=N("./src/polyfills/number.ts"),W=N("./src/utils/binary-search.ts");function M(b,m,f){if(m===null||!Array.isArray(b)||!b.length||!Object(V.isFiniteNumber)(m))return null;var d=b[0].programDateTime;if(m<(d||0))return null;var u=b[b.length-1].endProgramDateTime;if(m>=(u||0))return null;f=f||0;for(var c=0;c<b.length;++c){var o=b[c];if(n(m,f,o))return o}return null}function K(b,m,f,d){f===void 0&&(f=0),d===void 0&&(d=0);var u=null;if(b?u=m[b.sn-m[0].sn+1]||null:f===0&&m[0].start===0&&(u=m[0]),u&&H(f,d,u)===0)return u;var c=W.default.search(m,H.bind(null,f,d));return c||u}function H(b,m,f){b===void 0&&(b=0),m===void 0&&(m=0);var d=Math.min(m,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-d<=b?1:f.start-d>b&&f.start?-1:0}function n(b,m,f){var d=Math.min(m,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,u=f.endProgramDateTime||0;return u-d>b}function D(b,m){return W.default.search(b,function(f){return f.cc<m?1:f.cc>m?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"FragmentState",function(){return M}),N.d(z,"FragmentTracker",function(){return K});var V=N("./src/events.ts"),W=N("./src/types/loader.ts"),M;(function(D){D.NOT_LOADED="NOT_LOADED",D.BACKTRACKED="BACKTRACKED",D.APPENDING="APPENDING",D.PARTIAL="PARTIAL",D.OK="OK"})(M||(M={}));var K=function(){function D(m){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=m,this._registerListeners()}var b=D.prototype;return b._registerListeners=function(){var f=this.hls;f.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},b._unregisterListeners=function(){var f=this.hls;f.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},b.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},b.getAppendedFrag=function(f,d){if(d===W.PlaylistLevelType.MAIN){var u=this.activeFragment,c=this.activeParts;if(!u)return null;if(c)for(var o=c.length;o--;){var l=c[o],a=l?l.end:u.appendedPTS;if(l.start<=f&&a!==void 0&&f<=a)return o>9&&(this.activeParts=c.slice(o-9)),l}else if(u.start<=f&&u.appendedPTS!==void 0&&f<=u.appendedPTS)return u}return this.getBufferedFrag(f,d)},b.getBufferedFrag=function(f,d){for(var u=this.fragments,c=Object.keys(u),o=c.length;o--;){var l=u[c[o]];if((l==null?void 0:l.body.type)===d&&l.buffered){var a=l.body;if(a.start<=f&&f<=a.end)return a}}return null},b.detectEvictedFragments=function(f,d,u){var c=this;Object.keys(this.fragments).forEach(function(o){var l=c.fragments[o];if(!l)return;if(!l.buffered){l.body.type===u&&c.removeFragment(l.body);return}var a=l.range[f];if(!a)return;a.time.some(function(i){var R=!c.isTimeBuffered(i.startPTS,i.endPTS,d);return R&&c.removeFragment(l.body),R})})},b.detectPartialFragments=function(f){var d=this,u=this.timeRanges,c=f.frag,o=f.part;if(!u||c.sn==="initSegment")return;var l=n(c),a=this.fragments[l];if(!a)return;Object.keys(u).forEach(function(i){var R=c.elementaryStreams[i];if(!R)return;var S=u[i],T=o!==null||R.partial===!0;a.range[i]=d.getBufferedTimes(c,o,T,S)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},b.fragBuffered=function(f){var d=n(f),u=this.fragments[d];u&&(u.backtrack=u.loaded=null,u.buffered=!0)},b.getBufferedTimes=function(f,d,u,c){for(var o={time:[],partial:u},l=d?d.start:f.start,a=d?d.end:f.end,i=f.minEndPTS||a,R=f.maxStartPTS||l,S=0;S<c.length;S++){var T=c.start(S)-this.bufferPadding,I=c.end(S)+this.bufferPadding;if(R>=T&&i<=I){o.time.push({startPTS:Math.max(l,c.start(S)),endPTS:Math.min(a,c.end(S))});break}else if(l<I&&a>T)o.partial=!0,o.time.push({startPTS:Math.max(l,c.start(S)),endPTS:Math.min(a,c.end(S))});else if(a<=T)break}return o},b.getPartialFragment=function(f){var d=null,u,c,o,l=0,a=this.bufferPadding,i=this.fragments;return Object.keys(i).forEach(function(R){var S=i[R];if(!S)return;H(S)&&(c=S.body.start-a,o=S.body.end+a,f>=c&&f<=o&&(u=Math.min(f-c,o-f),l<=u&&(d=S.body,l=u)))}),d},b.getState=function(f){var d=n(f),u=this.fragments[d];return u?u.buffered?H(u)?M.PARTIAL:M.OK:u.backtrack?M.BACKTRACKED:M.APPENDING:M.NOT_LOADED},b.backtrack=function(f,d){var u=n(f),c=this.fragments[u];if(!c||c.backtrack)return null;var o=c.backtrack=d||c.loaded;return c.loaded=null,o},b.getBacktrackData=function(f){var d=n(f),u=this.fragments[d];if(u){var c,o=u.backtrack;if(o!=null&&(c=o.payload)!==null&&c!==void 0&&c.byteLength)return o;this.removeFragment(f)}return null},b.isTimeBuffered=function(f,d,u){for(var c,o,l=0;l<u.length;l++){if(c=u.start(l)-this.bufferPadding,o=u.end(l)+this.bufferPadding,f>=c&&d<=o)return!0;if(d<=c)return!1}return!1},b.onFragLoaded=function(f,d){var u=d.frag,c=d.part;if(u.sn==="initSegment"||u.bitrateTest||c)return;var o=n(u);this.fragments[o]={body:u,loaded:d,backtrack:null,buffered:!1,range:Object.create(null)}},b.onBufferAppended=function(f,d){var u=this,c=d.frag,o=d.part,l=d.timeRanges;if(c.type===W.PlaylistLevelType.MAIN)if(this.activeFragment=c,o){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(o)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(i){var R=l[i];if(u.detectEvictedFragments(i,R),!o)for(var S=0;S<R.length;S++)c.appendedPTS=Math.max(R.end(S),c.appendedPTS||0)})},b.onFragBuffered=function(f,d){this.detectPartialFragments(d)},b.hasFragment=function(f){var d=n(f);return!!this.fragments[d]},b.removeFragmentsInRange=function(f,d,u){var c=this;Object.keys(this.fragments).forEach(function(o){var l=c.fragments[o];if(!l)return;if(l.buffered){var a=l.body;a.type===u&&a.start<d&&a.end>f&&c.removeFragment(a)}})},b.removeFragment=function(f){var d=n(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[d]},b.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},D}();function H(D){var b,m;return D.buffered&&(((b=D.range.video)===null||b===void 0?void 0:b.partial)||((m=D.range.audio)===null||m===void 0?void 0:m.partial))}function n(D){return D.type+"_"+D.level+"_"+D.urlId+"_"+D.sn}},"./src/controller/gap-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"STALL_MINIMUM_DURATION_MS",function(){return H}),N.d(z,"MAX_START_GAP_JUMP",function(){return n}),N.d(z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return D}),N.d(z,"SKIP_BUFFER_RANGE_START",function(){return b}),N.d(z,"default",function(){return m});var V=N("./src/utils/buffer-helper.ts"),W=N("./src/errors.ts"),M=N("./src/events.ts"),K=N("./src/utils/logger.ts"),H=250,n=2,D=.1,b=.05,m=function(){function f(u,c,o,l){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=u,this.media=c,this.fragmentTracker=o,this.hls=l}var d=f.prototype;return d.destroy=function(){this.hls=this.fragmentTracker=this.media=null},d.poll=function(c){var o=this.config,l=this.media,a=this.stalled,i=l.currentTime,R=l.seeking,S=this.seeking&&!R,T=!this.seeking&&R;if(this.seeking=R,i!==c){if(this.moved=!0,a!==null){if(this.stallReported){var I=self.performance.now()-a;K.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(I)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((T||S)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!V.BufferHelper.getBuffered(l).length)return;var O=V.BufferHelper.bufferInfo(l,i,0),E=O.len>0,y=O.nextStart||0;if(!E&&!y)return;if(R){var p=O.len>n,h=!y||y-i>n&&!this.fragmentTracker.getPartialFragment(i);if(p||h)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var A,_=Math.max(y,O.start||0)-i,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=v==null||((A=v.details)===null||A===void 0)?void 0:A.live,x=P?v.details.targetduration*2:n;if(_>0&&_<=x){this._trySkipBufferHole(null);return}}var C=self.performance.now();if(a===null){this.stalled=C;return}var j=C-a;!R&&j>=H&&this._reportStall(O.len);var B=V.BufferHelper.bufferInfo(l,i,o.maxBufferHole);this._tryFixBufferStall(B,j)},d._tryFixBufferStall=function(c,o){var l=this.config,a=this.fragmentTracker,i=this.media,R=i.currentTime,S=a.getPartialFragment(R);if(S){var T=this._trySkipBufferHole(S);if(T)return}c.len>l.maxBufferHole&&o>l.highBufferWatchdogPeriod*1e3&&(K.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},d._reportStall=function(c){var o=this.hls,l=this.media,a=this.stallReported;a||(this.stallReported=!0,K.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+c+")"),o.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:c}))},d._trySkipBufferHole=function(c){for(var o=this.config,l=this.hls,a=this.media,i=a.currentTime,R=0,S=V.BufferHelper.getBuffered(a),T=0;T<S.length;T++){var I=S.start(T);if(i+o.maxBufferHole>=R&&i<I){var O=Math.max(I+b,a.currentTime+D);return K.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+O),this.moved=!0,this.stalled=null,a.currentTime=O,c&&l.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+O,frag:c}),O}R=S.end(T)}return 0},d._tryNudgeBuffer=function(){var c=this.config,o=this.hls,l=this.media,a=l.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<c.nudgeMaxRetry){var R=a+i*c.nudgeOffset;K.logger.warn("Nudging 'currentTime' from "+a+" to "+R),l.currentTime=R,o.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else K.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+c.nudgeMaxRetry+" nudges"),o.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},f}()},"./src/controller/id3-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts"),W=N("./src/utils/texttrack-utils.ts"),M=N("./src/demux/id3.ts"),K=.25,H=function(){function n(b){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=b,this._registerListeners()}var D=n.prototype;return D.destroy=function(){this._unregisterListeners()},D._registerListeners=function(){var m=this.hls;m.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},D._unregisterListeners=function(){var m=this.hls;m.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},D.onMediaAttached=function(m,f){this.media=f.media},D.onMediaDetaching=function(){if(!this.id3Track)return;Object(W.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},D.getID3Track=function(m){if(!this.media)return;for(var f=0;f<m.length;f++){var d=m[f];if(d.kind==="metadata"&&d.label==="id3")return Object(W.sendAddTrackEvent)(d,this.media),d}return this.media.addTextTrack("metadata","id3")},D.onFragParsingMetadata=function(m,f){if(!this.media)return;var d=f.frag,u=f.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var c=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<u.length;o++){var l=M.getID3Frames(u[o].data);if(l){var a=u[o].pts,i=o<u.length-1?u[o+1].pts:d.end,R=i-a;R<=0&&(i=a+K);for(var S=0;S<l.length;S++){var T=l[S];if(!M.isTimeStampFrame(T)){var I=new c(a,i,"");I.value=T,this.id3Track.addCue(I)}}}}},D.onBufferFlushing=function(m,f){var d=f.startOffset,u=f.endOffset,c=f.type;if(!c||c==="audio"){var o=this.id3Track;o&&Object(W.removeCuesInRange)(o,d,u)}},n}();z.default=H},"./src/controller/latency-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var V=N("./src/errors.ts"),W=N("./src/events.ts"),M=N("./src/utils/logger.ts");function K(D,b){for(var m=0;m<b.length;m++){var f=b[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(D,f.key,f)}}function H(D,b,m){return b&&K(D.prototype,b),m&&K(D,m),D}var n=function(){function D(m){var f=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 f.timeupdate()},this.hls=m,this.config=m.config,this.registerListeners()}var b=D.prototype;return b.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},b.registerListeners=function(){this.hls.on(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(W.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(W.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){this.hls.off(W.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(W.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(W.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(W.Events.ERROR,this.onError)},b.onMediaAttached=function(f,d){this.media=d.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},b.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},b.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},b.onLevelUpdated=function(f,d){var u=d.details;this.levelDetails=u,u.advanced&&this.timeupdate(),!u.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},b.onError=function(f,d){if(d.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,M.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},b.timeupdate=function(){var f=this.media,d=this.levelDetails;if(!f||!d)return;this.currentTime=f.currentTime;var u=this.computeLatency();if(u===null)return;this._latency=u;var c=this.config,o=c.lowLatencyMode,l=c.maxLiveSyncPlaybackRate;if(!o||l===1)return;var a=this.targetLatency;if(a===null)return;var i=u-a,R=Math.min(this.maxLatency,a+d.targetduration),S=i<R;if(d.live&&S&&i>.05&&this.forwardBufferLength>1){var T=Math.min(2,Math.max(1,l)),I=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;f.playbackRate=Math.min(T,Math.max(1,I))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},b.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},b.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},H(D,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var f=this.config,d=this.levelDetails;return f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:d?f.liveMaxLatencyDurationCount*d.targetduration:0}},{key:"targetLatency",get:function(){var f=this.levelDetails;if(f===null)return null;var d=f.holdBack,u=f.partHoldBack,c=f.targetduration,o=this.config,l=o.liveSyncDuration,a=o.liveSyncDurationCount,i=o.lowLatencyMode,R=this.hls.userConfig,S=i&&u||d;(R.liveSyncDuration||R.liveSyncDurationCount||S===0)&&(S=l!==void 0?l:a*c);var T=c,I=1;return S+Math.min(this.stallCount*I,T)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),d=this.targetLatency,u=this.levelDetails;if(f===null||d===null||u===null)return null;var c=u.edge,o=f-d-this.edgeStalled,l=c-u.totalduration,a=c-(this.config.lowLatencyMode&&u.partTarget||u.targetduration);return Math.min(Math.max(l,o),a)}},{key:"drift",get:function(){var f=this.levelDetails;return f===null?1:f.drift}},{key:"edgeStalled",get:function(){var f=this.levelDetails;if(f===null)return 0;var d=(this.config.lowLatencyMode&&f.partTarget||f.targetduration)*3;return Math.max(f.age-d,0)}},{key:"forwardBufferLength",get:function(){var f=this.media,d=this.levelDetails;if(!f||!d)return 0;var u=f.buffered.length;return u?f.buffered.end(u-1):d.edge-this.currentTime}}]),D}()},"./src/controller/level-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return o});var V=N("./src/types/level.ts"),W=N("./src/events.ts"),M=N("./src/errors.ts"),K=N("./src/utils/codecs.ts"),H=N("./src/controller/level-helper.ts"),n=N("./src/controller/base-playlist-controller.ts"),D=N("./src/types/loader.ts");function b(){return b=Object.assign||function(l){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var R in i)Object.prototype.hasOwnProperty.call(i,R)&&(l[R]=i[R])}return l},b.apply(this,arguments)}function m(l,a){for(var i=0;i<a.length;i++){var R=a[i];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(l,R.key,R)}}function f(l,a,i){return a&&m(l.prototype,a),i&&m(l,i),l}function d(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,u(l,a)}function u(l,a){return u=Object.setPrototypeOf||function(R,S){return R.__proto__=S,R},u(l,a)}var c=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(l){d(a,l);function a(R){var S;return S=l.call(this,R,"[level-controller]")||this,S._levels=[],S._firstLevel=-1,S._startLevel=void 0,S.currentLevelIndex=-1,S.manualLevelIndex=-1,S.onParsedComplete=void 0,S._registerListeners(),S}var i=a.prototype;return i._registerListeners=function(){var S=this.hls;S.on(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.on(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(W.Events.FRAG_LOADED,this.onFragLoaded,this),S.on(W.Events.ERROR,this.onError,this)},i._unregisterListeners=function(){var S=this.hls;S.off(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.off(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(W.Events.FRAG_LOADED,this.onFragLoaded,this),S.off(W.Events.ERROR,this.onError,this)},i.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},i.startLoad=function(){var S=this._levels;S.forEach(function(T){T.loadError=0}),l.prototype.startLoad.call(this)},i.onManifestLoaded=function(S,T){var I=[],O=[],E=[],y,p={},h,A=!1,_=!1,v=!1;if(T.levels.forEach(function(j){var B=j.attrs;A=A||!!(j.width&&j.height),_=_||!!j.videoCodec,v=v||!!j.audioCodec,c&&j.audioCodec&&j.audioCodec.indexOf("mp4a.40.34")!==-1&&(j.audioCodec=void 0);var w=j.bitrate+"-"+j.attrs.RESOLUTION+"-"+j.attrs.CODECS;h=p[w],h?h.url.push(j.url):(h=new V.Level(j),p[w]=h,I.push(h)),B&&(B.AUDIO&&Object(H.addGroupId)(h,"audio",B.AUDIO),B.SUBTITLES&&Object(H.addGroupId)(h,"text",B.SUBTITLES))}),(A||_)&&v&&(I=I.filter(function(j){var B=j.videoCodec,w=j.width,Y=j.height;return!!B||!!(w&&Y)})),I=I.filter(function(j){var B=j.audioCodec,w=j.videoCodec;return(!B||Object(K.isCodecSupportedInMp4)(B,"audio"))&&(!w||Object(K.isCodecSupportedInMp4)(w,"video"))}),T.audioTracks&&(O=T.audioTracks.filter(function(j){return!j.audioCodec||Object(K.isCodecSupportedInMp4)(j.audioCodec,"audio")}),Object(H.assignTrackIdsByGroup)(O)),T.subtitles&&(E=T.subtitles,Object(H.assignTrackIdsByGroup)(E)),I.length>0){y=I[0].bitrate,I.sort(function(j,B){return j.bitrate-B.bitrate}),this._levels=I;for(var P=0;P<I.length;P++)if(I[P].bitrate===y){this._firstLevel=P,this.log("manifest loaded, "+I.length+" level(s) found, first bitrate: "+y);break}var x=v&&!_,C={levels:I,audioTracks:O,subtitleTracks:E,firstLevel:this._firstLevel,stats:T.stats,audio:v,video:_,altAudio:!x&&O.some(function(j){return!!j.url})};this.hls.trigger(W.Events.MANIFEST_PARSED,C),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:T.url,reason:"no level with compatible codecs found in manifest"})},i.onError=function(S,T){if(l.prototype.onError.call(this,S,T),T.fatal)return;var I=T.context,O=this._levels[this.currentLevelIndex];if(I&&(I.type===D.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&I.groupId===O.audioGroupIds[O.urlId]||I.type===D.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&I.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var E=!1,y=!0,p;switch(T.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(T.frag){var h=this._levels[T.frag.level];h?(h.fragmentError++,h.fragmentError>this.hls.config.fragLoadingMaxRetry&&(p=T.frag.level)):p=T.frag.level}break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:I&&(I.deliveryDirectives&&(y=!1),p=I.level),E=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:p=T.level,E=!0;break}p!==void 0&&this.recoverLevel(T,p,E,y)},i.recoverLevel=function(S,T,I,O){var E=S.details,y=this._levels[T];if(y.loadError++,I){var p=this.retryLoadingOrFail(S);if(p)S.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var h=y.url.length;if(h>1&&y.loadError<h)S.levelRetry=!0,this.redundantFailover(T);else if(this.manualLevelIndex===-1){var A=T===0?this._levels.length-1:T-1;this.currentLevelIndex!==A&&this._levels[A].loadError===0&&(this.warn(E+": switch to "+A),S.levelRetry=!0,this.hls.nextAutoLevel=A)}}},i.redundantFailover=function(S){var T=this._levels[S],I=T.url.length;if(I>1){var O=(T.urlId+1)%I;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(E){E.urlId=O}),this.level=S}},i.onFragLoaded=function(S,T){var I=T.frag;if(I!==void 0&&I.type===D.PlaylistLevelType.MAIN){var O=this._levels[I.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},i.onLevelLoaded=function(S,T){var I,O=T.level,E=T.details,y=this._levels[O];if(!y){var p;this.warn("Invalid level index "+O),(p=T.deliveryDirectives)!==null&&p!==void 0&&p.skip&&(E.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(y.fragmentError===0&&(y.loadError=0,this.retryCount=0),this.playlistLoaded(O,T,y.details)):(I=T.deliveryDirectives)!==null&&I!==void 0&&I.skip&&(E.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(S,T){var I=this.hls.levels[this.currentLevelIndex];if(!I)return;if(I.audioGroupIds){for(var O=-1,E=this.hls.audioTracks[T.id].groupId,y=0;y<I.audioGroupIds.length;y++)if(I.audioGroupIds[y]===E){O=y;break}O!==I.urlId&&(I.urlId=O,this.startLoad())}},i.loadPlaylist=function(S){var T=this.currentLevelIndex,I=this._levels[T];if(this.canLoad&&I&&I.url.length>0){var O=I.urlId,E=I.url[O];if(S)try{E=S.addDirectives(E)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Attempt loading level index "+T+(S?" at sn "+S.msn+" part "+S.part:"")+" with URL-id "+O+" "+E),this.clearTimer(),this.hls.trigger(W.Events.LEVEL_LOADING,{url:E,level:T,id:O,deliveryDirectives:S||null})}},i.removeLevel=function(S,T){var I=function(y,p){return p!==T},O=this._levels.filter(function(E,y){return y!==S?!0:E.url.length>1&&T!==void 0?(E.url=E.url.filter(I),E.audioGroupIds&&(E.audioGroupIds=E.audioGroupIds.filter(I)),E.textGroupIds&&(E.textGroupIds=E.textGroupIds.filter(I)),E.urlId=0,!0):!1}).map(function(E,y){var p=E.details;return p!=null&&p.fragments&&p.fragments.forEach(function(h){h.level=y}),E});this._levels=O,this.hls.trigger(W.Events.LEVELS_UPDATED,{levels:O})},f(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(S){var T,I=this._levels;if(I.length===0)return;if(this.currentLevelIndex===S&&(T=I[S])!==null&&T!==void 0&&T.details)return;if(S<0||S>=I.length){var O=S<0;if(this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:S,fatal:O,reason:"invalid level idx"}),O)return;S=Math.min(S,I.length-1)}this.clearTimer();var E=this.currentLevelIndex,y=I[E],p=I[S];this.log("switching to level "+S+" from "+E),this.currentLevelIndex=S;var h=b({},p,{level:S,maxBitrate:p.maxBitrate,uri:p.uri,urlId:p.urlId});delete h._urlId,this.hls.trigger(W.Events.LEVEL_SWITCHING,h);var A=p.details;if(!A||A.live){var _=this.switchParams(p.uri,y==null?void 0:y.details);this.loadPlaylist(_)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(S){this.manualLevelIndex=S,this._startLevel===void 0&&(this._startLevel=S),S!==-1&&(this.level=S)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(S){this._firstLevel=S}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var S=this.hls.config.startLevel;return S!==void 0?S:this._firstLevel}else return this._startLevel},set:function(S){this._startLevel=S}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(S){this.level=S,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=S)}}]),a}(n.default)},"./src/controller/level-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"addGroupId",function(){return M}),N.d(z,"assignTrackIdsByGroup",function(){return K}),N.d(z,"updatePTS",function(){return H}),N.d(z,"updateFragPTSDTS",function(){return D}),N.d(z,"mergeDetails",function(){return b}),N.d(z,"mapPartIntersection",function(){return m}),N.d(z,"mapFragmentIntersection",function(){return f}),N.d(z,"adjustSliding",function(){return d}),N.d(z,"addSliding",function(){return u}),N.d(z,"computeReloadInterval",function(){return c}),N.d(z,"getFragmentWithSN",function(){return o}),N.d(z,"getPartWith",function(){return l});var V=N("./src/polyfills/number.ts"),W=N("./src/utils/logger.ts");function M(a,i,R){switch(i){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(R);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(R);break}}function K(a){var i={};a.forEach(function(R){var S=R.groupId||"";R.id=i[S]=i[S]||0,i[S]++})}function H(a,i,R){var S=a[i],T=a[R];n(S,T)}function n(a,i){var R=i.startPTS;if(Object(V.isFiniteNumber)(R)){var S=0,T;i.sn>a.sn?(S=R-a.start,T=a):(S=a.start-R,T=i),T.duration!==S&&(T.duration=S)}else if(i.sn>a.sn){var I=a.cc===i.cc;I&&a.minEndPTS?i.start=a.start+(a.minEndPTS-a.start):i.start=a.start+a.duration}else i.start=Math.max(a.start-i.duration,0)}function D(a,i,R,S,T,I){var O=S-R;O<=0&&(W.logger.warn("Fragment should have a positive duration",i),S=R+i.duration,I=T+i.duration);var E=R,y=S,p=i.startPTS,h=i.endPTS;if(Object(V.isFiniteNumber)(p)){var A=Math.abs(p-R);Object(V.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(A,i.deltaPTS):i.deltaPTS=A,E=Math.max(R,p),R=Math.min(R,p),T=Math.min(T,i.startDTS),y=Math.min(S,h),S=Math.max(S,h),I=Math.max(I,i.endDTS)}i.duration=S-R;var _=R-i.start;i.appendedPTS=S,i.start=i.startPTS=R,i.maxStartPTS=E,i.startDTS=T,i.endPTS=S,i.minEndPTS=y,i.endDTS=I;var v=i.sn;if(!a||v<a.startSN||v>a.endSN)return 0;var P,x=v-a.startSN,C=a.fragments;for(C[x]=i,P=x;P>0;P--)n(C[P],C[P-1]);for(P=x;P<C.length-1;P++)n(C[P],C[P+1]);return a.fragmentHint&&n(C[C.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,_}function b(a,i){for(var R=null,S=a.fragments,T=S.length-1;T>=0;T--){var I=S[T].initSegment;if(I){R=I;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,E;if(f(a,i,function(P,x){P.relurl&&(O=P.cc-x.cc),Object(V.isFiniteNumber)(P.startPTS)&&Object(V.isFiniteNumber)(P.endPTS)&&(x.start=x.startPTS=P.startPTS,x.startDTS=P.startDTS,x.appendedPTS=P.appendedPTS,x.maxStartPTS=P.maxStartPTS,x.endPTS=P.endPTS,x.endDTS=P.endDTS,x.minEndPTS=P.minEndPTS,x.duration=P.endPTS-P.startPTS,x.duration&&(E=x),i.PTSKnown=i.alignedSliding=!0),x.elementaryStreams=P.elementaryStreams,x.loader=P.loader,x.stats=P.stats,x.urlId=P.urlId,P.initSegment&&(x.initSegment=P.initSegment,R=P.initSegment)}),R){var y=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;y.forEach(function(P){var x;(!P.initSegment||P.initSegment.relurl===((x=R)===null||x===void 0?void 0:x.relurl))&&(P.initSegment=R)})}if(i.skippedSegments&&(i.deltaUpdateFailed=i.fragments.some(function(P){return!P}),i.deltaUpdateFailed)){W.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=i.skippedSegments;p--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}var h=i.fragments;if(O){W.logger.warn("discontinuity sliding from playlist, take drift into account");for(var A=0;A<h.length;A++)h[A].cc+=O}i.skippedSegments&&(i.startCC=i.fragments[0].cc),m(a.partList,i.partList,function(P,x){x.elementaryStreams=P.elementaryStreams,x.stats=P.stats}),E?D(i,E,E.startPTS,E.endPTS,E.startDTS,E.endDTS):d(a,i),h.length&&(i.totalduration=i.edge-h[0].start),i.driftStartTime=a.driftStartTime,i.driftStart=a.driftStart;var _=i.advancedDateTime;if(i.advanced&&_){var v=i.edge;i.driftStart||(i.driftStartTime=_,i.driftStart=v),i.driftEndTime=_,i.driftEnd=v}else i.driftEndTime=a.driftEndTime,i.driftEnd=a.driftEnd,i.advancedDateTime=a.advancedDateTime}function m(a,i,R){if(a&&i)for(var S=0,T=0,I=a.length;T<=I;T++){var O=a[T],E=i[T+S];O&&E&&O.index===E.index&&O.fragment.sn===E.fragment.sn?R(O,E):S--}}function f(a,i,R){for(var S=i.skippedSegments,T=Math.max(a.startSN,i.startSN)-i.startSN,I=(a.fragmentHint?1:0)+(S?i.endSN:Math.min(a.endSN,i.endSN))-i.startSN,O=i.startSN-a.startSN,E=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,y=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,p=T;p<=I;p++){var h=y[O+p],A=E[p];S&&!A&&p<S&&(A=i.fragments[p]=h),h&&A&&R(h,A)}}function d(a,i){var R=i.startSN+i.skippedSegments-a.startSN,S=a.fragments;if(R<0||R>=S.length)return;u(i,S[R].start)}function u(a,i){if(i){for(var R=a.fragments,S=a.skippedSegments;S<R.length;S++)R[S].start+=i;a.fragmentHint&&(a.fragmentHint.start+=i)}}function c(a,i){var R=1e3*a.levelTargetDuration,S=R/2,T=a.age,I=T>0&&T<R*3,O=i.loading.end-i.loading.start,E,y=a.availabilityDelay;if(a.updated===!1)if(I){var p=333*a.misses;E=Math.max(Math.min(S,O*2),p),a.availabilityDelay=(a.availabilityDelay||0)+E}else E=S;else I?(y=Math.min(y||R/2,T),a.availabilityDelay=y,E=y+R-T):E=R-O;return Math.round(E)}function o(a,i,R){if(!a||!a.details)return null;var S=a.details,T=S.fragments[i-S.startSN];return T||(T=S.fragmentHint,T&&T.sn===i?T:i<S.startSN&&R&&R.sn===i?R:null)}function l(a,i,R){if(!a||!a.details)return null;var S=a.details.partList;if(S)for(var T=S.length;T--;){var I=S[T];if(I.index===R&&I.fragment.sn===i)return I}return null}},"./src/controller/stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return S});var V=N("./src/polyfills/number.ts"),W=N("./src/controller/base-stream-controller.ts"),M=N("./src/is-supported.ts"),K=N("./src/events.ts"),H=N("./src/utils/buffer-helper.ts"),n=N("./src/controller/fragment-tracker.ts"),D=N("./src/types/loader.ts"),b=N("./src/loader/fragment.ts"),m=N("./src/demux/transmuxer-interface.ts"),f=N("./src/types/transmuxer.ts"),d=N("./src/controller/gap-controller.ts"),u=N("./src/errors.ts"),c=N("./src/utils/logger.ts");function o(T,I){for(var O=0;O<I.length;O++){var E=I[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E)}}function l(T,I,O){return I&&o(T.prototype,I),O&&o(T,O),T}function a(T,I){T.prototype=Object.create(I.prototype),T.prototype.constructor=T,i(T,I)}function i(T,I){return i=Object.setPrototypeOf||function(E,y){return E.__proto__=y,E},i(T,I)}var R=100,S=function(T){a(I,T);function I(E,y){var p;return p=T.call(this,E,y,"[stream-controller]")||this,p.audioCodecSwap=!1,p.gapController=null,p.level=-1,p._forceStartLoad=!1,p.altAudio=!1,p.audioOnly=!1,p.fragPlaying=null,p.onvplaying=null,p.onvseeked=null,p.fragLastKbps=0,p.stalled=!1,p.couldBacktrack=!1,p.audioCodecSwitch=!1,p.videoBuffer=null,p._registerListeners(),p}var O=I.prototype;return O._registerListeners=function(){var y=this.hls;y.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),y.on(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.on(K.Events.ERROR,this.onError,this),y.on(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(K.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.on(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var y=this.hls;y.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),y.off(K.Events.ERROR,this.onError,this),y.off(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(K.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),y.off(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(y){if(this.levels){var p=this.lastCurrentTime,h=this.hls;if(this.stopLoad(),this.setInterval(R),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var A=h.startLevel;A===-1&&(h.config.testBandwidth?(A=0,this.bitrateTest=!0):A=h.nextAutoLevel),this.level=h.nextLoadLevel=A,this.loadedmetadata=!1}p>0&&y===-1&&(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),y=p),this.state=W.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()}else this._forceStartLoad=!0,this.state=W.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,T.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case W.State.IDLE:this.doTickIdle();break;case W.State.WAITING_LEVEL:{var y,p=this.levels,h=this.level,A=p==null||((y=p[h])===null||y===void 0)?void 0:y.details;if(A&&(!A.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(A))break;this.state=W.State.IDLE;break}break}case W.State.FRAG_LOADING_WAITING_RETRY:{var _,v=self.performance.now(),P=this.retryDate;(!P||v>=P||(_=this.media)!==null&&_!==void 0&&_.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=W.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){T.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var y,p,h=this.hls,A=this.levelLastLoaded,_=this.levels,v=this.media,P=h.config,x=h.nextLoadLevel;if(A===null||!v&&(this.startFragRequested||!P.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!_||!_[x])return;var C=_[x];this.level=h.nextLoadLevel=x;var j=C.details;if(!j||this.state===W.State.WAITING_LEVEL||j.live&&this.levelLastLoaded!==x){this.state=W.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,D.PlaylistLevelType.MAIN);if(B===null)return;var w=B.len,Y=this.getMaxBufferLength(C.maxBitrate);if(w>=Y)return;if(this._streamEnded(B,j)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(K.Events.BUFFER_EOS,$),this.state=W.State.ENDED;return}var oe=B.end,de=this.getNextFragment(oe,j);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Be=de.sn-j.startSN;Be>1&&(de=j.fragments[Be-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===n.FragmentState.OK&&this.nextLoadPosition>oe){var Ae=this.audioOnly&&!this.altAudio?b.ElementaryStreamTypes.AUDIO:b.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,Ae,D.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,j)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((y=de.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((p=de.decryptdata)!==null&&p!==void 0&&p.key)?this.loadKey(de,j):this.loadFragment(de,j,oe)},O.loadFragment=function(y,p,h){var A,_=this.fragmentTracker.getState(y);if(this.fragCurrent=y,_===n.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(y);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else _=n.FragmentState.NOT_LOADED}_===n.FragmentState.NOT_LOADED||_===n.FragmentState.PARTIAL?y.sn==="initSegment"?this._loadInitSegment(y):this.bitrateTest?(y.bitrateTest=!0,this.log("Fragment "+y.sn+" of level "+y.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(y)):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,y,p,h)):_===n.FragmentState.APPENDING?this.reduceMaxBufferLength(y.duration)&&this.fragmentTracker.removeFragment(y):((A=this.media)===null||A===void 0?void 0:A.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(y){var p=this.fragmentTracker.getAppendedFrag(y,D.PlaylistLevelType.MAIN);return p&&"fragment"in p?p.fragment:p},O.getBufferedFrag=function(y){return this.fragmentTracker.getBufferedFrag(y,D.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(y){return y?this.getBufferedFrag(y.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var y=this.levels,p=this.media;if(p!=null&&p.readyState){var h,A=this.getAppendedFrag(p.currentTime);if(A&&A.start>1&&this.flushMainBuffer(0,A.start-1),!p.paused&&y){var _=this.hls.nextLoadLevel,v=y[_],P=this.fragLastKbps;P&&this.fragCurrent?h=this.fragCurrent.duration*v.maxBitrate/(1e3*P)+1:h=0}else h=0;var x=this.getBufferedFrag(p.currentTime+h);if(x){var C=this.followingBufferedFrag(x);if(C){this.abortCurrentFrag();var j=C.maxStartPTS?C.maxStartPTS:C.start,B=C.duration,w=Math.max(x.end,j+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(w,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var y=this.fragCurrent;this.fragCurrent=null,y!=null&&y.loader&&y.loader.abort(),this.state===W.State.KEY_LOADING&&(this.state=W.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(y,p){T.prototype.flushMainBuffer.call(this,y,p,this.altAudio?"video":null)},O.onMediaAttached=function(y,p){T.prototype.onMediaAttached.call(this,y,p);var h=p.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),h.addEventListener("playing",this.onvplaying),h.addEventListener("seeked",this.onvseeked),this.gapController=new d.default(this.config,h,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var y=this.media;y&&(y.removeEventListener("playing",this.onvplaying),y.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),T.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var y=this.media,p=y?y.currentTime:null;Object(V.isFiniteNumber)(p)&&this.log("Media seeked to "+p.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(K.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(y,p){var h=!1,A=!1,_;p.levels.forEach(function(v){_=v.audioCodec,_&&(_.indexOf("mp4a.40.2")!==-1&&(h=!0),_.indexOf("mp4a.40.5")!==-1&&(A=!0))}),this.audioCodecSwitch=h&&A&&!Object(M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=p.levels,this.startFragRequested=!1},O.onLevelLoading=function(y,p){var h=this.levels;if(!h||this.state!==W.State.IDLE)return;var A=h[p.level];(!A.details||A.details.live&&this.levelLastLoaded!==p.level||this.waitForCdnTuneIn(A.details))&&(this.state=W.State.WAITING_LEVEL)},O.onLevelLoaded=function(y,p){var h,A=this.levels,_=p.level,v=p.details,P=v.totalduration;if(!A){this.warn("Levels were reset while loading level "+_);return}this.log("Level "+_+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+P);var x=this.fragCurrent;x&&(this.state===W.State.FRAG_LOADING||this.state===W.State.FRAG_LOADING_WAITING_RETRY)&&(x.level!==p.level&&x.loader&&(this.state=W.State.IDLE,x.loader.abort()));var C=A[_],j=0;if(v.live||(h=C.details)!==null&&h!==void 0&&h.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;j=this.alignPlaylists(v,C.details)}if(C.details=v,this.levelLastLoaded=_,this.hls.trigger(K.Events.LEVEL_UPDATED,{details:v,level:_}),this.state===W.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=W.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,j),this.tick()},O._handleFragmentLoadProgress=function(y){var p,h=y.frag,A=y.part,_=y.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+h.sn+" of level "+h.level+" will not be buffered");return}var P=v[h.level],x=P.details;if(!x){this.warn("Dropping fragment "+h.sn+" of level "+h.level+" after level details were reset");return}var C=P.videoCodec,j=x.PTSKnown||!x.live,B=(p=h.initSegment)===null||p===void 0?void 0:p.data,w=this._getAudioCodec(P),Y=this.transmuxer=this.transmuxer||new m.default(this.hls,D.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=A?A.index:-1,oe=$!==-1,de=new f.ChunkMetadata(h.level,h.sn,h.stats.chunkCount,_.byteLength,$,oe),Be=this.initPTS[h.cc];Y.push(_,B,w,C,h,A,x.totalduration,j,de,Be)},O.onAudioTrackSwitching=function(y,p){var h=this.altAudio,A=!!p.url,_=p.id;if(!A){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var v=this.fragCurrent;v!=null&&v.loader&&(this.log("Switching to main audio track, cancel main fragment load"),v.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var P=this.hls;h&&P.trigger(K.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(K.Events.AUDIO_TRACK_SWITCHED,{id:_})}},O.onAudioTrackSwitched=function(y,p){var h=p.id,A=!!this.hls.audioTracks[h].url;if(A){var _=this.videoBuffer;_&&this.mediaBuffer!==_&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=_)}this.altAudio=A,this.tick()},O.onBufferCreated=function(y,p){var h=p.tracks,A,_,v=!1;for(var P in h){var x=h[P];if(x.id==="main"){if(_=P,A=x,P==="video"){var C=h[P];C&&(this.videoBuffer=C.buffer)}}else v=!0}v&&A?(this.log("Alternate track found, use "+_+".buffered to schedule main fragment loading"),this.mediaBuffer=A.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(y,p){var h=p.frag,A=p.part;if(h&&h.type!==D.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(h)){this.warn("Fragment "+h.sn+(A?" p: "+A.index:"")+" of level "+h.level+" finished buffering, but was aborted. state: "+this.state),this.state===W.State.PARSED&&(this.state=W.State.IDLE);return}var _=A?A.stats:h.stats;this.fragLastKbps=Math.round(8*_.total/(_.buffering.end-_.loading.first)),h.sn!=="initSegment"&&(this.fragPrevious=h),this.fragBufferedComplete(h,A)},O.onError=function(y,p){switch(p.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(D.PlaylistLevelType.MAIN,p);break;case u.ErrorDetails.LEVEL_LOAD_ERROR:case u.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==W.State.ERROR&&(p.fatal?(this.warn(""+p.details),this.state=W.State.ERROR):!p.levelRetry&&this.state===W.State.WAITING_LEVEL&&(this.state=W.State.IDLE));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="main"&&(this.state===W.State.PARSING||this.state===W.State.PARSED)){var h=!0,A=this.getFwdBufferInfo(this.media,D.PlaylistLevelType.MAIN);A&&A.len>.5&&(h=!this.reduceMaxBufferLength(A.len)),h&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var y=this.media,p=this.gapController;if(!y||!p||!y.readyState)return;var h=H.BufferHelper.getBuffered(y);!this.loadedmetadata&&h.length?(this.loadedmetadata=!0,this.seekToStartPos()):p.poll(this.lastCurrentTime),this.lastCurrentTime=y.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=W.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(y,p){var h=p.type;if(h!==b.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var A=(h===b.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(A,h,D.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(y,p){this.levels=p.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var y=this.media,p=y.currentTime,h=this.startPosition;if(h>=0&&p<h){if(y.seeking){c.logger.log("could not seek to "+h+", already seeking at "+p);return}var A=H.BufferHelper.getBuffered(y),_=A.length?A.start(0):0,v=_-h;v>0&&(v<this.config.maxBufferHole||v<this.config.maxFragLookUpTolerance)&&(c.logger.log("adjusting start position by "+v+" to match buffer start"),h+=v,this.startPosition=h),this.log("seek to target start position "+h+" from current time "+p),y.currentTime=h}},O._getAudioCodec=function(y){var p=this.config.defaultAudioCodec||y.audioCodec;return this.audioCodecSwap&&p&&(this.log("Swapping audio codec"),p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5"),p},O._loadBitrateTestFrag=function(y){var p=this;this._doFragLoad(y).then(function(h){var A=p.hls;if(!h||A.nextLoadLevel||p.fragContextChanged(y))return;p.fragLoadError=0,p.state=W.State.IDLE,p.startFragRequested=!1,p.bitrateTest=!1;var _=y.stats;_.parsing.start=_.parsing.end=_.buffering.start=_.buffering.end=self.performance.now(),A.trigger(K.Events.FRAG_LOADED,h)})},O._handleTransmuxComplete=function(y){var p,h="main",A=this.hls,_=y.remuxResult,v=y.chunkMeta,P=this.getCurrentContext(v);if(!P){this.warn("The loading context changed while buffering fragment "+v.sn+" of level "+v.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(v.level);return}var x=P.frag,C=P.part,j=P.level,B=_.video,w=_.text,Y=_.id3,$=_.initSegment,oe=this.altAudio?void 0:_.audio;if(this.fragContextChanged(x))return;if(this.state=W.State.PARSING,$){$.tracks&&(this._bufferInitSegment(j,$.tracks,x,v),A.trigger(K.Events.FRAG_PARSING_INIT_SEGMENT,{frag:x,id:h,tracks:$.tracks}));var de=$.initPTS,Be=$.timescale;Object(V.isFiniteNumber)(de)&&(this.initPTS[x.cc]=de,A.trigger(K.Events.INIT_PTS_FOUND,{frag:x,id:h,initPTS:de,timescale:Be}))}if(B&&_.independent!==!1){if(j.details){var Ae=B.startPTS,Re=B.endPTS,Le=B.startDTS,Fe=B.endDTS;if(C)C.elementaryStreams[B.type]={startPTS:Ae,endPTS:Re,startDTS:Le,endDTS:Fe};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var me=this.getLoadPosition()+this.config.maxBufferHole;if(me<Ae){this.backtrack(x);return}x.setElementaryStreamInfo(B.type,x.start,Re,x.start,Fe,!0)}x.setElementaryStreamInfo(B.type,Ae,Re,Le,Fe),this.bufferFragmentData(B,x,C,v)}}else if(_.independent===!1){this.backtrack(x);return}if(oe){var fe=oe.startPTS,ne=oe.endPTS,xe=oe.startDTS,ce=oe.endDTS;C&&(C.elementaryStreams[b.ElementaryStreamTypes.AUDIO]={startPTS:fe,endPTS:ne,startDTS:xe,endDTS:ce}),x.setElementaryStreamInfo(b.ElementaryStreamTypes.AUDIO,fe,ne,xe,ce),this.bufferFragmentData(oe,x,C,v)}if(Y!=null&&(p=Y.samples)!==null&&p!==void 0&&p.length){var Ne={frag:x,id:h,samples:Y.samples};A.trigger(K.Events.FRAG_PARSING_METADATA,Ne)}if(w){var He={frag:x,id:h,samples:w.samples};A.trigger(K.Events.FRAG_PARSING_USERDATA,He)}},O._bufferInitSegment=function(y,p,h,A){var _=this;if(this.state!==W.State.PARSING)return;this.audioOnly=!!p.audio&&!p.video,this.altAudio&&!this.audioOnly&&delete p.audio;var v=p.audio,P=p.video,x=p.audiovideo;if(v){var C=y.audioCodec,j=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(C&&(C.indexOf("mp4a.40.5")!==-1?C="mp4a.40.2":C="mp4a.40.5"),v.metadata.channelCount!==1&&j.indexOf("firefox")===-1&&(C="mp4a.40.5")),j.indexOf("android")!==-1&&v.container!=="audio/mpeg"&&(C="mp4a.40.2",this.log("Android: force audio codec to "+C)),y.audioCodec&&y.audioCodec!==C&&this.log('Swapping manifest audio codec "'+y.audioCodec+'" for "'+C+'"'),v.levelCodec=C,v.id="main",this.log("Init audio buffer, container:"+v.container+", codecs[selected/level/parsed]=["+(C||"")+"/"+(y.audioCodec||"")+"/"+v.codec+"]")}P&&(P.levelCodec=y.videoCodec,P.id="main",this.log("Init video buffer, container:"+P.container+", codecs[level/parsed]=["+(y.videoCodec||"")+"/"+P.codec+"]")),x&&this.log("Init audiovideo buffer, container:"+x.container+", codecs[level/parsed]=["+(y.attrs.CODECS||"")+"/"+x.codec+"]"),this.hls.trigger(K.Events.BUFFER_CODECS,p),Object.keys(p).forEach(function(B){var w=p[B],Y=w.initSegment;Y!=null&&Y.byteLength&&_.hls.trigger(K.Events.BUFFER_APPENDING,{type:B,data:Y,frag:h,part:null,chunkMeta:A,parent:h.type})}),this.tick()},O.backtrack=function(y){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(y);var p=this.fragmentTracker.backtrack(y);this.fragPrevious=null,this.nextLoadPosition=y.start,p?this.resetFragmentLoading(y):this.state=W.State.BACKTRACKING},O.checkFragmentChanged=function(){var y=this.media,p=null;if(y&&y.readyState>1&&y.seeking===!1){var h=y.currentTime;if(H.BufferHelper.isBuffered(y,h)?p=this.getAppendedFrag(h):H.BufferHelper.isBuffered(y,h+.1)&&(p=this.getAppendedFrag(h+.1)),p){var A=this.fragPlaying,_=p.level;(!A||p.sn!==A.sn||A.level!==_||p.urlId!==A.urlId)&&(this.hls.trigger(K.Events.FRAG_CHANGED,{frag:p}),(!A||A.level!==_)&&this.hls.trigger(K.Events.LEVEL_SWITCHED,{level:_}),this.fragPlaying=p)}}},l(I,[{key:"nextLevel",get:function(){var y=this.nextBufferedFrag;return y?y.level:-1}},{key:"currentLevel",get:function(){var y=this.media;if(y){var p=this.getAppendedFrag(y.currentTime);if(p)return p.level}return-1}},{key:"nextBufferedFrag",get:function(){var y=this.media;if(y){var p=this.getAppendedFrag(y.currentTime);return this.followingBufferedFrag(p)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),I}(W.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"SubtitleStreamController",function(){return a});var V=N("./src/events.ts"),W=N("./src/utils/logger.ts"),M=N("./src/utils/buffer-helper.ts"),K=N("./src/controller/fragment-finders.ts"),H=N("./src/utils/discontinuities.ts"),n=N("./src/controller/level-helper.ts"),D=N("./src/controller/fragment-tracker.ts"),b=N("./src/controller/base-stream-controller.ts"),m=N("./src/types/loader.ts"),f=N("./src/types/level.ts");function d(i,R){for(var S=0;S<R.length;S++){var T=R[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(i,T.key,T)}}function u(i,R,S){return R&&d(i.prototype,R),S&&d(i,S),i}function c(i,R){i.prototype=Object.create(R.prototype),i.prototype.constructor=i,o(i,R)}function o(i,R){return o=Object.setPrototypeOf||function(T,I){return T.__proto__=I,T},o(i,R)}var l=500,a=function(i){c(R,i);function R(T,I){var O;return O=i.call(this,T,I,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var S=R.prototype;return S.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},S._registerListeners=function(){var I=this.hls;I.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.on(V.Events.ERROR,this.onError,this),I.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var I=this.hls;I.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.off(V.Events.ERROR,this.onError,this),I.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.startLoad=function(){this.stopLoad(),this.state=b.State.IDLE,this.setInterval(l),this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},S.onLevelLoaded=function(I,O){this.mainDetails=O.details},S.onSubtitleFragProcessed=function(I,O){var E=O.frag,y=O.success;if(this.fragPrevious=E,this.state=b.State.IDLE,!y)return;var p=this.tracksBuffered[this.currentTrackId];if(!p)return;for(var h,A=E.start,_=0;_<p.length;_++)if(A>=p[_].start&&A<=p[_].end){h=p[_];break}var v=E.start+E.duration;h?h.end=v:(h={start:A,end:v},p.push(h)),this.fragmentTracker.fragBuffered(E)},S.onBufferFlushing=function(I,O){var E=O.startOffset,y=O.endOffset;if(E===0&&y!==Number.POSITIVE_INFINITY){var p=this.currentTrackId,h=this.levels;if(!h.length||!h[p]||!h[p].details)return;var A=h[p].details,_=A.targetduration,v=y-_;if(v<=0)return;O.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(P){for(var x=0;x<P.length;){if(P[x].end<=v){P.shift();continue}else if(P[x].start<v)P[x].start=v;else break;x++}}),this.fragmentTracker.removeFragmentsInRange(E,v,m.PlaylistLevelType.SUBTITLE)}},S.onError=function(I,O){var E,y=O.frag;if(!y||y.type!==m.PlaylistLevelType.SUBTITLE)return;(E=this.fragCurrent)!==null&&E!==void 0&&E.loader&&this.fragCurrent.loader.abort(),this.state=b.State.IDLE},S.onSubtitleTracksUpdated=function(I,O){var E=this,y=O.subtitleTracks;this.tracksBuffered=[],this.levels=y.map(function(p){return new f.Level(p)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(p){E.tracksBuffered[p.id]=[]}),this.mediaBuffer=null},S.onSubtitleTrackSwitch=function(I,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var E=this.levels[this.currentTrackId];E!=null&&E.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,E&&this.setInterval(l)},S.onSubtitleTrackLoaded=function(I,O){var E,y=O.details,p=O.id,h=this.currentTrackId,A=this.levels;if(!A.length)return;var _=A[h];if(p>=A.length||p!==h||!_)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,y.live||(E=_.details)!==null&&E!==void 0&&E.live){var v=this.mainDetails;if(y.deltaUpdateFailed||!v)return;var P=v.fragments[0];if(!_.details)y.hasProgramDateTime&&v.hasProgramDateTime?Object(H.alignMediaPlaylistByPDT)(y,v):P&&Object(n.addSliding)(y,P.start);else{var x=this.alignPlaylists(y,_.details);x===0&&P&&Object(n.addSliding)(y,P.start)}}if(_.details=y,this.levelLastLoaded=p,this.tick(),y.live&&!this.fragCurrent&&this.media&&this.state===b.State.IDLE){var C=Object(K.findFragmentByPTS)(null,y.fragments,this.media.currentTime,0);C||(this.warn("Subtitle playlist not aligned with playback"),_.details=void 0)}},S._handleFragmentLoadComplete=function(I){var O=I.frag,E=I.payload,y=O.decryptdata,p=this.hls;if(this.fragContextChanged(O))return;if(E&&E.byteLength>0&&y&&y.key&&y.iv&&y.method==="AES-128"){var h=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(E),y.key.buffer,y.iv.buffer).then(function(A){var _=performance.now();p.trigger(V.Events.FRAG_DECRYPTED,{frag:O,payload:A,stats:{tstart:h,tdecrypt:_}})})}},S.doTick=function(){if(!this.media){this.state=b.State.IDLE;return}if(this.state===b.State.IDLE){var I,O=this.currentTrackId,E=this.levels;if(!E.length||!E[O]||!E[O].details)return;var y=E[O].details,p=y.targetduration,h=this.config,A=this.media,_=M.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,A.currentTime-p,h.maxBufferHole),v=_.end,P=_.len,x=this.getMaxBufferLength()+p;if(P>x)return;console.assert(y,"Subtitle track details are defined on idle subtitle stream controller tick");var C=y.fragments,j=C.length,B=y.edge,w,Y=this.fragPrevious;if(v<B){var $=h.maxFragLookUpTolerance;Y&&y.hasProgramDateTime&&(w=Object(K.findFragmentByPDT)(C,Y.endProgramDateTime,$)),w||(w=Object(K.findFragmentByPTS)(Y,C,v,$),!w&&Y&&Y.start<C[0].start&&(w=C[0]))}else w=C[j-1];(I=w)!==null&&I!==void 0&&I.encrypted?(W.logger.log("Loading key for "+w.sn),this.state=b.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:w})):w&&this.fragmentTracker.getState(w)===D.FragmentState.NOT_LOADED&&this.loadFragment(w,y,v)}},S.loadFragment=function(I,O,E){this.fragCurrent=I,i.prototype.loadFragment.call(this,I,O,E)},u(R,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),R}(b.default)},"./src/controller/subtitle-track-controller.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/events.ts"),W=N("./src/utils/texttrack-utils.ts"),M=N("./src/controller/base-playlist-controller.ts"),K=N("./src/types/loader.ts");function H(d,u){for(var c=0;c<u.length;c++){var o=u[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function n(d,u,c){return u&&H(d.prototype,u),c&&H(d,c),d}function D(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d,b(d,u)}function b(d,u){return b=Object.setPrototypeOf||function(o,l){return o.__proto__=l,o},b(d,u)}var m=function(d){D(u,d);function u(o){var l;return l=d.call(this,o,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var c=u.prototype;return c.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,d.prototype.destroy.call(this)},c.registerListeners=function(){var l=this.hls;l.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(V.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var l=this.hls;l.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(V.Events.ERROR,this.onError,this)},c.onMediaAttached=function(l,a){if(this.media=a.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(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},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 l=f(this.media.textTracks);l.forEach(function(a){Object(W.clearCurrentCues)(a)}),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(l,a){this.tracks=a.subtitleTracks},c.onSubtitleTrackLoaded=function(l,a){var i=a.id,R=a.details,S=this.trackId,T=this.tracksInGroup[S];if(!T){this.warn("Invalid subtitle track id "+i);return}var I=T.details;T.details=a.details,this.log("subtitle track "+i+" loaded ["+R.startSN+"-"+R.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,a,I))},c.onLevelLoading=function(l,a){this.switchLevel(a.level)},c.onLevelSwitching=function(l,a){this.switchLevel(a.level)},c.switchLevel=function(l){var a=this.hls.levels[l];if(!(a!=null&&a.textGroupIds))return;var i=a.textGroupIds[a.urlId];if(this.groupId!==i){var R=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,S=this.tracks.filter(function(O){return!i||O.groupId===i});this.tracksInGroup=S;var T=this.findTrackId(R==null?void 0:R.name)||this.findTrackId();this.groupId=i;var I={subtitleTracks:S};this.log("Updating subtitle tracks, "+S.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,I),T!==-1&&this.setSubtitleTrack(T,R)}},c.findTrackId=function(l){for(var a=this.tracksInGroup,i=0;i<a.length;i++){var R=a[i];if((!this.selectDefaultTrack||R.default)&&(!l||l===R.name))return R.id}return-1},c.onError=function(l,a){if(d.prototype.onError.call(this,l,a),a.fatal||!a.context)return;a.context.type===K.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},c.loadPlaylist=function(l){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var i=a.id,R=a.groupId,S=a.url;if(l)try{S=l.addDirectives(S)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:S,id:i,groupId:R,deliveryDirectives:l||null})}},c.toggleTrackModes=function(l){var a=this,i=this.media,R=this.subtitleDisplay,S=this.trackId;if(!i)return;var T=f(i.textTracks),I=T.filter(function(y){return y.groupId===a.groupId});if(l===-1)[].slice.call(T).forEach(function(y){y.mode="disabled"});else{var O=I[S];O&&(O.mode="disabled")}var E=I[l];E&&(E.mode=R?"showing":"hidden")},c.setSubtitleTrack=function(l,a){var i,R=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(i=R[l])!==null&&i!==void 0&&i.details)||l<-1||l>=R.length)return;this.clearTimer();var S=R[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,S){var T=S.id,I=S.groupId,O=I===void 0?"":I,E=S.name,y=S.type,p=S.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:T,groupId:O,name:E,type:y,url:p});var h=this.switchParams(S.url,a==null?void 0:a.details);this.loadPlaylist(h)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:l})},c.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,a=f(this.media.textTracks),i=0;i<a.length;i++)if(a[i].mode==="hidden")l=i;else if(a[i].mode==="showing"){l=i;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},n(u,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,a)}}]),u}(M.default);function f(d){for(var u=[],c=0;c<d.length;c++){var o=d[c];o.kind==="subtitles"&&o.label&&u.push(d[c])}return u}z.default=m},"./src/controller/timeline-controller.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"TimelineController",function(){return f});var V=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),M=N("./src/utils/cea-608-parser.ts"),K=N("./src/utils/output-filter.ts"),H=N("./src/utils/webvtt-parser.ts"),n=N("./src/utils/texttrack-utils.ts"),D=N("./src/utils/imsc1-ttml-parser.ts"),b=N("./src/types/loader.ts"),m=N("./src/utils/logger.ts"),f=function(){function o(a){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=a,this.config=a.config,this.Cues=a.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 i=new K.default(this,"textTrack1"),R=new K.default(this,"textTrack2"),S=new K.default(this,"textTrack3"),T=new K.default(this,"textTrack4");this.cea608Parser1=new M.default(1,i,R),this.cea608Parser2=new M.default(3,S,T)}a.on(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(W.Events.FRAG_LOADING,this.onFragLoading,this),a.on(W.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=o.prototype;return l.destroy=function(){var i=this.hls;i.off(W.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(W.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.off(W.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.off(W.Events.FRAG_LOADING,this.onFragLoading,this),i.off(W.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(W.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.off(W.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.off(W.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.off(W.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.off(W.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(i,R,S,T,I){for(var O=!1,E=I.length;E--;){var y=I[E],p=u(y[0],y[1],R,S);if(p>=0&&(y[0]=Math.min(y[0],R),y[1]=Math.max(y[1],S),O=!0,p/(S-R)>.5))return}if(O||I.push([R,S]),this.config.renderTextTracksNatively){var h=this.captionsTracks[i];this.Cues.newCue(h,R,S,T)}else{var A=this.Cues.newCue(null,R,S,T);this.hls.trigger(W.Events.CUES_PARSED,{type:"captions",cues:A,track:i})}},l.onInitPtsFound=function(i,R){var S=this,T=R.frag,I=R.id,O=R.initPTS,E=R.timescale,y=this.unparsedVttFrags;I==="main"&&(this.initPTS[T.cc]=O,this.timescale[T.cc]=E),y.length&&(this.unparsedVttFrags=[],y.forEach(function(p){S.onFragLoaded(W.Events.FRAG_LOADED,p)}))},l.getExistingTrack=function(i){var R=this.media;if(R)for(var S=0;S<R.textTracks.length;S++){var T=R.textTracks[S];if(T[i])return T}return null},l.createCaptionsTrack=function(i){this.config.renderTextTracksNatively?this.createNativeTrack(i):this.createNonNativeTrack(i)},l.createNativeTrack=function(i){if(this.captionsTracks[i])return;var R=this.captionsProperties,S=this.captionsTracks,T=this.media,I=R[i],O=I.label,E=I.languageCode,y=this.getExistingTrack(i);if(y)S[i]=y,Object(n.clearCurrentCues)(S[i]),Object(n.sendAddTrackEvent)(S[i],T);else{var p=this.createTextTrack("captions",O,E);p&&(p[i]=!0,S[i]=p)}},l.createNonNativeTrack=function(i){if(this.nonNativeCaptionsTracks[i])return;var R=this.captionsProperties[i];if(!R)return;var S=R.label,T={_id:i,label:S,kind:"captions",default:R.media?!!R.media.default:!1,closedCaptions:R.media};this.nonNativeCaptionsTracks[i]=T,this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[T]})},l.createTextTrack=function(i,R,S){var T=this.media;return T?T.addTextTrack(i,R,S):void 0},l.onMediaAttaching=function(i,R){this.media=R.media,this._cleanTracks()},l.onMediaDetaching=function(){var i=this.captionsTracks;Object.keys(i).forEach(function(R){Object(n.clearCurrentCues)(i[R]),delete i[R]}),this.nonNativeCaptionsTracks={}},l.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())},l._cleanTracks=function(){var i=this.media;if(!i)return;var R=i.textTracks;if(R)for(var S=0;S<R.length;S++)Object(n.clearCurrentCues)(R[S])},l.onSubtitleTracksUpdated=function(i,R){var S=this;this.textTracks=[];var T=R.subtitleTracks||[],I=T.some(function(p){return p.textCodec===D.IMSC1_CODEC});if(this.config.enableWebVTT||I&&this.config.enableIMSC1){var O=this.tracks&&T&&this.tracks.length===T.length;if(this.tracks=T||[],this.config.renderTextTracksNatively){var E=this.media?this.media.textTracks:[];this.tracks.forEach(function(p,h){var A;if(h<E.length){for(var _=null,v=0;v<E.length;v++)if(d(E[v],p)){_=E[v];break}_&&(A=_)}A?Object(n.clearCurrentCues)(A):(A=S.createTextTrack("subtitles",p.name,p.lang),A&&(A.mode="disabled")),A&&(A.groupId=p.groupId,S.textTracks.push(A))})}else if(!O&&this.tracks&&this.tracks.length){var y=this.tracks.map(function(p){return{label:p.name,kind:p.type.toLowerCase(),default:p.default,subtitleTrack:p}});this.hls.trigger(W.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:y})}}},l.onManifestLoaded=function(i,R){var S=this;this.config.enableCEA708Captions&&R.captions&&R.captions.forEach(function(T){var I=/(?:CC|SERVICE)([1-4])/.exec(T.instreamId);if(!I)return;var O="textTrack"+I[1],E=S.captionsProperties[O];if(!E)return;E.label=T.name,T.lang&&(E.languageCode=T.lang),E.media=T})},l.onFragLoading=function(i,R){var S=this.cea608Parser1,T=this.cea608Parser2,I=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(S&&T))return;if(R.frag.type===b.PlaylistLevelType.MAIN){var E,y,p=R.frag.sn,h=(E=R==null||((y=R.part)===null||y===void 0)?void 0:y.index)!=null?E:-1;p===I+1||p===I&&h===O+1||(S.reset(),T.reset()),this.lastSn=p,this.lastPartIndex=h}},l.onFragLoaded=function(i,R){var S=R.frag,T=R.payload,I=this.initPTS,O=this.unparsedVttFrags;if(S.type===b.PlaylistLevelType.SUBTITLE)if(T.byteLength){if(!Object(V.isFiniteNumber)(I[S.cc])){O.push(R),I.length&&this.hls.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Missing initial subtitle PTS")});return}var E=S.decryptdata;if(E==null||E.key==null||E.method!=="AES-128"){var y=this.tracks[S.level],p=this.vttCCs;p[S.cc]||(p[S.cc]={start:S.start,prevCC:this.prevCC,new:!0},this.prevCC=S.cc),y&&y.textCodec===D.IMSC1_CODEC?this._parseIMSC1(S,T):this._parseVTTs(S,T,p)}}else this.hls.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(i,R){var S=this,T=this.hls;Object(D.parseIMSC1)(R,this.initPTS[i.cc],this.timescale[i.cc],function(I){S._appendCues(I,i.level),T.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(I){m.logger.log("Failed to parse IMSC1: "+I),T.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:I})})},l._parseVTTs=function(i,R,S){var T=this,I=this.hls;Object(H.parseWebVTT)(R,this.initPTS[i.cc],this.timescale[i.cc],S,i.cc,i.start,function(O){T._appendCues(O,i.level),I.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(O){T._fallbackToIMSC1(i,R),m.logger.log("Failed to parse VTT cue: "+O),I.trigger(W.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:O})})},l._fallbackToIMSC1=function(i,R){var S=this,T=this.tracks[i.level];T.textCodec||Object(D.parseIMSC1)(R,this.initPTS[i.cc],this.timescale[i.cc],function(){T.textCodec=D.IMSC1_CODEC,S._parseIMSC1(i,R)},function(){T.textCodec="wvtt"})},l._appendCues=function(i,R){var S=this.hls;if(this.config.renderTextTracksNatively){var T=this.textTracks[R];if(T.mode==="disabled")return;i.forEach(function(E){return Object(n.addCueToTrack)(T,E)})}else{var I=this.tracks[R],O=I.default?"default":"subtitles"+R;S.trigger(W.Events.CUES_PARSED,{type:"subtitles",cues:i,track:O})}},l.onFragDecrypted=function(i,R){var S=R.frag;if(S.type===b.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[S.cc])){this.unparsedVttFrags.push(R);return}this.onFragLoaded(W.Events.FRAG_LOADED,R)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(i,R){var S=this.cea608Parser1,T=this.cea608Parser2;if(!this.enabled||!(S&&T))return;for(var I=0;I<R.samples.length;I++){var O=R.samples[I].bytes;if(O){var E=this.extractCea608Data(O);S.addData(R.samples[I].pts,E[0]),T.addData(R.samples[I].pts,E[1])}}},l.onBufferFlushing=function(i,R){var S=R.startOffset,T=R.endOffset,I=R.endOffsetSubtitles,O=R.type,E=this.media;if(!E||E.currentTime<T)return;if(!O||O==="video"){var y=this.captionsTracks;Object.keys(y).forEach(function(h){return Object(n.removeCuesInRange)(y[h],S,T)})}if(this.config.renderTextTracksNatively&&(S===0&&I!==void 0)){var p=this.textTracks;Object.keys(p).forEach(function(h){return Object(n.removeCuesInRange)(p[h],S,I)})}},l.extractCea608Data=function(i){for(var R=i[0]&31,S=2,T=[[],[]],I=0;I<R;I++){var O=i[S++],E=127&i[S++],y=127&i[S++],p=(4&O)!==0,h=3&O;if(E===0&&y===0)continue;p&&((h===0||h===1)&&(T[h].push(E),T[h].push(y)))}return T},o}();function d(o,l){return o&&o.label===l.name&&!(o.textTrack1||o.textTrack2)}function u(o,l,a,i){return Math.min(l,i)-Math.max(o,a)}function c(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return V});var V=function(){function W(K,H){this.subtle=void 0,this.aesIV=void 0,this.subtle=K,this.aesIV=H}var M=W.prototype;return M.decrypt=function(H,n){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,H)},W}()},"./src/crypt/aes-decryptor.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"removePadding",function(){return W}),N.d(z,"default",function(){return M});var V=N("./src/utils/typed-array.ts");function W(K){var H=K.byteLength,n=H&&new DataView(K.buffer).getUint8(H-1);return n?Object(V.sliceUint8)(K,0,H-n):K}var M=function(){function K(){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 H=K.prototype;return H.uint8ArrayToUint32Array_=function(D){for(var b=new DataView(D),m=new Uint32Array(4),f=0;f<4;f++)m[f]=b.getUint32(f*4);return m},H.initTable=function(){var D=this.sBox,b=this.invSBox,m=this.subMix,f=m[0],d=m[1],u=m[2],c=m[3],o=this.invSubMix,l=o[0],a=o[1],i=o[2],R=o[3],S=new Uint32Array(256),T=0,I=0,O=0;for(O=0;O<256;O++)O<128?S[O]=O<<1:S[O]=O<<1^283;for(O=0;O<256;O++){var E=I^I<<1^I<<2^I<<3^I<<4;E=E>>>8^E&255^99,D[T]=E,b[E]=T;var y=S[T],p=S[y],h=S[p],A=S[E]*257^E*16843008;f[T]=A<<24|A>>>8,d[T]=A<<16|A>>>16,u[T]=A<<8|A>>>24,c[T]=A,A=h*16843009^p*65537^y*257^T*16843008,l[E]=A<<24|A>>>8,a[E]=A<<16|A>>>16,i[E]=A<<8|A>>>24,R[E]=A,T?(T=y^S[S[S[h^y]]],I^=S[S[I]]):T=I=1}},H.expandKey=function(D){for(var b=this.uint8ArrayToUint32Array_(D),m=!0,f=0;f<b.length&&m;)m=b[f]===this.key[f],f++;if(m)return;this.key=b;var d=this.keySize=b.length;if(d!==4&&d!==6&&d!==8)throw new Error("Invalid aes key size="+d);var u=this.ksRows=(d+6+1)*4,c,o,l=this.keySchedule=new Uint32Array(u),a=this.invKeySchedule=new Uint32Array(u),i=this.sBox,R=this.rcon,S=this.invSubMix,T=S[0],I=S[1],O=S[2],E=S[3],y,p;for(c=0;c<u;c++){if(c<d){y=l[c]=b[c];continue}p=y,c%d===0?(p=p<<8|p>>>24,p=i[p>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[p&255],p^=R[c/d|0]<<24):d>6&&c%d===4&&(p=i[p>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[p&255]),l[c]=y=(l[c-d]^p)>>>0}for(o=0;o<u;o++)c=u-o,o&3?p=l[c]:p=l[c-4],o<4||c<=4?a[o]=p:a[o]=T[i[p>>>24]]^I[i[p>>>16&255]]^O[i[p>>>8&255]]^E[i[p&255]],a[o]=a[o]>>>0},H.networkToHostOrderSwap=function(D){return D<<24|(D&65280)<<8|(D&16711680)>>8|D>>>24},H.decrypt=function(D,b,m){for(var f=this.keySize+6,d=this.invKeySchedule,u=this.invSBox,c=this.invSubMix,o=c[0],l=c[1],a=c[2],i=c[3],R=this.uint8ArrayToUint32Array_(m),S=R[0],T=R[1],I=R[2],O=R[3],E=new Int32Array(D),y=new Int32Array(E.length),p,h,A,_,v,P,x,C,j,B,w,Y,$,oe,de=this.networkToHostOrderSwap;b<E.length;){for(j=de(E[b]),B=de(E[b+1]),w=de(E[b+2]),Y=de(E[b+3]),v=j^d[0],P=Y^d[1],x=w^d[2],C=B^d[3],$=4,oe=1;oe<f;oe++)p=o[v>>>24]^l[P>>16&255]^a[x>>8&255]^i[C&255]^d[$],h=o[P>>>24]^l[x>>16&255]^a[C>>8&255]^i[v&255]^d[$+1],A=o[x>>>24]^l[C>>16&255]^a[v>>8&255]^i[P&255]^d[$+2],_=o[C>>>24]^l[v>>16&255]^a[P>>8&255]^i[x&255]^d[$+3],v=p,P=h,x=A,C=_,$=$+4;p=u[v>>>24]<<24^u[P>>16&255]<<16^u[x>>8&255]<<8^u[C&255]^d[$],h=u[P>>>24]<<24^u[x>>16&255]<<16^u[C>>8&255]<<8^u[v&255]^d[$+1],A=u[x>>>24]<<24^u[C>>16&255]<<16^u[v>>8&255]<<8^u[P&255]^d[$+2],_=u[C>>>24]<<24^u[v>>16&255]<<16^u[P>>8&255]<<8^u[x&255]^d[$+3],y[b]=de(p^S),y[b+1]=de(_^T),y[b+2]=de(A^I),y[b+3]=de(h^O),S=j,T=B,I=w,O=Y,b=b+4}return y.buffer},K}()},"./src/crypt/decrypter.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return b});var V=N("./src/crypt/aes-crypto.ts"),W=N("./src/crypt/fast-aes-key.ts"),M=N("./src/crypt/aes-decryptor.ts"),K=N("./src/utils/logger.ts"),H=N("./src/utils/mp4-tools.ts"),n=N("./src/utils/typed-array.ts"),D=16,b=function(){function m(d,u,c){var o=c===void 0?{}:c,l=o.removePKCS7Padding,a=l===void 0?!0:l;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=d,this.config=u,this.removePKCS7Padding=a,a)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(R){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var f=m.prototype;return f.destroy=function(){this.observer=null},f.isSync=function(){return this.config.enableSoftwareAES},f.flush=function(){var u=this.currentResult;if(!u){this.reset();return}var c=new Uint8Array(u);return this.reset(),this.removePKCS7Padding?Object(M.removePadding)(c):c},f.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},f.decrypt=function(u,c,o,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(u),c,o);var a=this.flush();a&&l(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(u),c,o).then(l)},f.softwareDecrypt=function(u,c,o){var l=this.currentIV,a=this.currentResult,i=this.remainderData;this.logOnce("JS AES decrypt"),i&&(u=Object(H.appendUint8Array)(i,u),this.remainderData=null);var R=this.getValidChunk(u);if(!R.length)return null;l&&(o=l);var S=this.softwareDecrypter;S||(S=this.softwareDecrypter=new M.default),S.expandKey(c);var T=a;return this.currentResult=S.decrypt(R.buffer,0,o),this.currentIV=Object(n.sliceUint8)(R,-16).buffer,T||null},f.webCryptoDecrypt=function(u,c,o){var l=this,a=this.subtle;return(this.key!==c||!this.fastAesKey)&&(this.key=c,this.fastAesKey=new W.default(a,c)),this.fastAesKey.expandKey().then(function(i){if(!a)return Promise.reject(new Error("web crypto not initialized"));var R=new V.default(a,o);return R.decrypt(u.buffer,i)}).catch(function(i){return l.onWebCryptoError(i,u,c,o)})},f.onWebCryptoError=function(u,c,o,l){return K.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",u),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(c,o,l)},f.getValidChunk=function(u){var c=u,o=u.length-u.length%D;return o!==u.length&&(c=Object(n.sliceUint8)(u,0,o),this.remainderData=Object(n.sliceUint8)(u,o)),c},f.logOnce=function(u){if(!this.logEnabled)return;K.logger.log("[decrypter.ts]: "+u),this.logEnabled=!1},m}()},"./src/crypt/fast-aes-key.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return V});var V=function(){function W(K,H){this.subtle=void 0,this.key=void 0,this.subtle=K,this.key=H}var M=W.prototype;return M.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},W}()},"./src/demux/aacdemuxer.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/demux/base-audio-demuxer.ts"),W=N("./src/demux/adts.ts"),M=N("./src/utils/logger.ts"),K=N("./src/demux/id3.ts");function H(b,m){b.prototype=Object.create(m.prototype),b.prototype.constructor=b,n(b,m)}function n(b,m){return n=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},n(b,m)}var D=function(b){H(m,b);function m(d,u){var c;return c=b.call(this)||this,c.observer=void 0,c.config=void 0,c.observer=d,c.config=u,c}var f=m.prototype;return f.resetInitSegment=function(u,c,o){b.prototype.resetInitSegment.call(this,u,c,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:u,duration:o,inputTimeScale:9e4,dropped:0}},m.probe=function(u){if(!u)return!1;for(var c=K.getID3Data(u,0)||[],o=c.length,l=u.length;o<l;o++)if(W.probe(u,o))return M.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(u,c){return W.canParse(u,c)},f.appendFrame=function(u,c,o){W.initTrackConfig(u,this.observer,c,o,u.manifestCodec);var l=W.appendFrame(u,c,o,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},m}(V.default);D.minProbeByteLength=9,z.default=D},"./src/demux/adts.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"getAudioConfig",function(){return K}),N.d(z,"isHeaderPattern",function(){return H}),N.d(z,"getHeaderLength",function(){return n}),N.d(z,"getFullFrameLength",function(){return D}),N.d(z,"canGetFrameLength",function(){return b}),N.d(z,"isHeader",function(){return m}),N.d(z,"canParse",function(){return f}),N.d(z,"probe",function(){return d}),N.d(z,"initTrackConfig",function(){return u}),N.d(z,"getFrameDuration",function(){return c}),N.d(z,"parseFrameHeader",function(){return o}),N.d(z,"appendFrame",function(){return l});var V=N("./src/utils/logger.ts"),W=N("./src/errors.ts"),M=N("./src/events.ts");function K(a,i,R,S){var T,I,O,E,y=navigator.userAgent.toLowerCase(),p=S,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];T=((i[R+2]&192)>>>6)+1;var A=(i[R+2]&60)>>>2;if(A>h.length-1){a.trigger(M.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+A});return}return O=(i[R+2]&1)<<2,O|=(i[R+3]&192)>>>6,V.logger.log("manifest codec:"+S+", ADTS type:"+T+", samplingIndex:"+A),/firefox/i.test(y)?A>=6?(T=5,E=new Array(4),I=A-3):(T=2,E=new Array(2),I=A):y.indexOf("android")!==-1?(T=2,E=new Array(2),I=A):(T=5,E=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&A>=6?I=A-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(A>=6&&O===1||/vivaldi/i.test(y))||!S&&O===1)&&(T=2,E=new Array(2)),I=A)),E[0]=T<<3,E[0]|=(A&14)>>1,E[1]|=(A&1)<<7,E[1]|=O<<3,T===5&&(E[1]|=(I&14)>>1,E[2]=(I&1)<<7,E[2]|=2<<2,E[3]=0),{config:E,samplerate:h[A],channelCount:O,codec:"mp4a.40."+T,manifestCodec:p}}function H(a,i){return a[i]===255&&(a[i+1]&246)===240}function n(a,i){return a[i+1]&1?7:9}function D(a,i){return(a[i+3]&3)<<11|a[i+4]<<3|(a[i+5]&224)>>>5}function b(a,i){return i+5<a.length}function m(a,i){return i+1<a.length&&H(a,i)}function f(a,i){return b(a,i)&&H(a,i)&&D(a,i)<=a.length-i}function d(a,i){if(m(a,i)){var R=n(a,i);if(i+R>=a.length)return!1;var S=D(a,i);if(S<=R)return!1;var T=i+S;return T===a.length||m(a,T)}return!1}function u(a,i,R,S,T){if(!a.samplerate){var I=K(i,R,S,T);if(!I)return;a.config=I.config,a.samplerate=I.samplerate,a.channelCount=I.channelCount,a.codec=I.codec,a.manifestCodec=I.manifestCodec,V.logger.log("parsed codec:"+a.codec+", rate:"+I.samplerate+", channels:"+I.channelCount)}}function c(a){return 1024*9e4/a}function o(a,i,R,S,T){var I=n(a,i),O=D(a,i);if(O-=I,O>0){var E=R+S*T;return{headerLength:I,frameLength:O,stamp:E}}}function l(a,i,R,S,T){var I=c(a.samplerate),O=o(i,R,S,T,I);if(O){var E=O.frameLength,y=O.headerLength,p=O.stamp,h=y+E,A=Math.max(0,R+h-i.length),_;A?(_=new Uint8Array(h-y),_.set(i.subarray(R+y,i.length),0)):_=i.subarray(R+y,R+h);var v={unit:_,pts:p};return A||a.samples.push(v),{sample:v,length:h,missing:A}}}},"./src/demux/base-audio-demuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"initPTSFn",function(){return D});var V=N("./src/polyfills/number.ts"),W=N("./src/demux/id3.ts"),M=N("./src/demux/dummy-demuxed-track.ts"),K=N("./src/utils/mp4-tools.ts"),H=N("./src/utils/typed-array.ts"),n=function(){function b(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=b.prototype;return m.resetInitSegment=function(d,u,c){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(d,u){return!1},m.appendFrame=function(d,u,c){},m.demux=function(d,u){this.cachedData&&(d=Object(K.appendUint8Array)(this.cachedData,d),this.cachedData=null);var c=W.getID3Data(d,0),o=c?c.length:0,l,a,i=this._audioTrack,R=this._id3Track,S=c?W.getTimeStamp(c):void 0,T=d.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=D(S,u)),c&&c.length>0&&R.samples.push({pts:this.initPTS,dts:this.initPTS,data:c}),a=this.initPTS;o<T;){if(this.canParse(d,o)){var I=this.appendFrame(i,d,o);I?(this.frameIndex++,a=I.sample.pts,o+=I.length,l=o):o=T}else W.canParse(d,o)?(c=W.getID3Data(d,o),R.samples.push({pts:a,dts:a,data:c}),o+=c.length,l=o):o++;if(o===T&&l!==T){var O=Object(H.sliceUint8)(d,l);this.cachedData?this.cachedData=Object(K.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:i,avcTrack:Object(M.dummyTrack)(),id3Track:R,textTrack:Object(M.dummyTrack)()}},m.demuxSampleAes=function(d,u,c){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},m.flush=function(d){var u=this.cachedData;return u&&(this.cachedData=null,this.demux(u,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(M.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(M.dummyTrack)()}},m.destroy=function(){},b}(),D=function(m,f){return Object(V.isFiniteNumber)(m)?m*90:f*9e4};z.default=n},"./src/demux/chunk-cache.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return V});var V=function(){function M(){this.chunks=[],this.dataLength=0}var K=M.prototype;return K.push=function(n){this.chunks.push(n),this.dataLength+=n.length},K.flush=function(){var n=this.chunks,D=this.dataLength,b;if(n.length)n.length===1?b=n[0]:b=W(n,D);else return new Uint8Array(0);return this.reset(),b},K.reset=function(){this.chunks.length=0,this.dataLength=0},M}();function W(M,K){for(var H=new Uint8Array(K),n=0,D=0;D<M.length;D++){var b=M[D];H.set(b,n),n+=b.length}return H}},"./src/demux/dummy-demuxed-track.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/utils/logger.ts"),W=function(){function M(H){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=H,this.bytesAvailable=H.byteLength,this.word=0,this.bitsAvailable=0}var K=M.prototype;return K.loadWord=function(){var n=this.data,D=this.bytesAvailable,b=n.byteLength-D,m=new Uint8Array(4),f=Math.min(4,D);if(f===0)throw new Error("no bytes available");m.set(n.subarray(b,b+f)),this.word=new DataView(m.buffer).getUint32(0),this.bitsAvailable=f*8,this.bytesAvailable-=f},K.skipBits=function(n){var D;this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,D=n>>3,n-=D>>3,this.bytesAvailable-=D,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},K.readBits=function(n){var D=Math.min(this.bitsAvailable,n),b=this.word>>>32-D;return n>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=D,this.bitsAvailable>0?this.word<<=D:this.bytesAvailable>0&&this.loadWord(),D=n-D,D>0&&this.bitsAvailable?b<<D|this.readBits(D):b},K.skipLZ=function(){var n;for(n=0;n<this.bitsAvailable;++n)if((this.word&2147483648>>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},K.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(n){for(var D=8,b=8,m,f=0;f<n;f++)b!==0&&(m=this.readEG(),b=(D+m+256)%256),D=b===0?D:b},K.readSPS=function(){var n=0,D=0,b=0,m=0,f,d,u,c=this.readUByte.bind(this),o=this.readBits.bind(this),l=this.readUEG.bind(this),a=this.readBoolean.bind(this),i=this.skipBits.bind(this),R=this.skipEG.bind(this),S=this.skipUEG.bind(this),T=this.skipScalingList.bind(this);c();var I=c();if(o(5),i(3),c(),S(),I===100||I===110||I===122||I===244||I===44||I===83||I===86||I===118||I===128){var O=l();if(O===3&&i(1),S(),S(),i(1),a())for(d=O!==3?8:12,u=0;u<d;u++)a()&&(u<6?T(16):T(64))}S();var E=l();if(E===0)l();else if(E===1)for(i(1),R(),R(),f=l(),u=0;u<f;u++)R();S(),i(1);var y=l(),p=l(),h=o(1);h===0&&i(1),i(1),a()&&(n=l(),D=l(),b=l(),m=l());var A=[1,1];if(a()&&a()){var _=c();switch(_){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:{A=[c()<<8|c(),c()<<8|c()];break}}}return{width:Math.ceil((y+1)*16-n*2-D*2),height:(2-h)*(p+1)*16-(h?2:4)*(b+m),pixelRatio:A}},K.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},M}();z.default=W},"./src/demux/id3.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isHeader",function(){return V}),N.d(z,"isFooter",function(){return W}),N.d(z,"getID3Data",function(){return M}),N.d(z,"canParse",function(){return H}),N.d(z,"getTimeStamp",function(){return n}),N.d(z,"isTimeStampFrame",function(){return D}),N.d(z,"getID3Frames",function(){return m}),N.d(z,"decodeFrame",function(){return f}),N.d(z,"utf8ArrayToStr",function(){return l}),N.d(z,"testables",function(){return a});var V=function(T,I){return I+10<=T.length&&(T[I]===73&&T[I+1]===68&&T[I+2]===51&&(T[I+3]<255&&T[I+4]<255&&(T[I+6]<128&&T[I+7]<128&&T[I+8]<128&&T[I+9]<128)))},W=function(T,I){return I+10<=T.length&&(T[I]===51&&T[I+1]===68&&T[I+2]===73&&(T[I+3]<255&&T[I+4]<255&&(T[I+6]<128&&T[I+7]<128&&T[I+8]<128&&T[I+9]<128)))},M=function(T,I){for(var O=I,E=0;V(T,I);){E+=10;var y=K(T,I+6);E+=y,W(T,I+10)&&(E+=10),I+=E}return E>0?T.subarray(O,O+E):void 0},K=function(T,I){var O=0;return O=(T[I]&127)<<21,O|=(T[I+1]&127)<<14,O|=(T[I+2]&127)<<7,O|=T[I+3]&127,O},H=function(T,I){return V(T,I)&&K(T,I+6)+10<=T.length-I},n=function(T){for(var I=m(T),O=0;O<I.length;O++){var E=I[O];if(D(E))return o(E)}return},D=function(T){return T&&T.key==="PRIV"&&T.info==="com.apple.streaming.transportStreamTimestamp"},b=function(T){var I=String.fromCharCode(T[0],T[1],T[2],T[3]),O=K(T,4),E=10;return{type:I,size:O,data:T.subarray(E,E+O)}},m=function(T){for(var I=0,O=[];V(T,I);){var E=K(T,I+6);I+=10;for(var y=I+E;I+8<y;){var p=b(T.subarray(I)),h=f(p);h&&O.push(h),I+=p.size+10}W(T,I)&&(I+=10)}return O},f=function(T){return T.type==="PRIV"?d(T):T.type[0]==="W"?c(T):u(T)},d=function(T){if(T.size<2)return;var I=l(T.data,!0),O=new Uint8Array(T.data.subarray(I.length+1));return{key:T.type,info:I,data:O.buffer}},u=function(T){if(T.size<2)return;if(T.type==="TXXX"){var I=1,O=l(T.data.subarray(I),!0);I+=O.length+1;var E=l(T.data.subarray(I));return{key:T.type,info:O,data:E}}var y=l(T.data.subarray(1));return{key:T.type,data:y}},c=function(T){if(T.type==="WXXX"){if(T.size<2)return;var I=1,O=l(T.data.subarray(I),!0);I+=O.length+1;var E=l(T.data.subarray(I));return{key:T.type,info:O,data:E}}var y=l(T.data);return{key:T.type,data:y}},o=function(T){if(T.data.byteLength===8){var I=new Uint8Array(T.data),O=I[3]&1,E=(I[4]<<23)+(I[5]<<15)+(I[6]<<7)+I[7];return E/=45,O&&(E+=4772185884e-2),Math.round(E)}return},l=function(T,I){I===void 0&&(I=!1);var O=R();if(O){var E=O.decode(T);if(I){var y=E.indexOf("\0");return y!==-1?E.substring(0,y):E}return E.replace(/\0/g,"")}for(var p=T.length,h,A,_,v="",P=0;P<p;){if(h=T[P++],h===0&&I)return v;if(h===0||h===3)continue;switch(h>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(h);break;case 12:case 13:A=T[P++],v+=String.fromCharCode((h&31)<<6|A&63);break;case 14:A=T[P++],_=T[P++],v+=String.fromCharCode((h&15)<<12|(A&63)<<6|(_&63)<<0);break;default:}}return v},a={decodeTextFrame:u},i;function R(){return!i&&typeof self.TextDecoder!="undefined"&&(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/demux/base-audio-demuxer.ts"),W=N("./src/demux/id3.ts"),M=N("./src/utils/logger.ts"),K=N("./src/demux/mpegaudio.ts");function H(b,m){b.prototype=Object.create(m.prototype),b.prototype.constructor=b,n(b,m)}function n(b,m){return n=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},n(b,m)}var D=function(b){H(m,b);function m(){return b.apply(this,arguments)||this}var f=m.prototype;return f.resetInitSegment=function(u,c,o){b.prototype.resetInitSegment.call(this,u,c,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:u,duration:o,inputTimeScale:9e4,dropped:0}},m.probe=function(u){if(!u)return!1;for(var c=W.getID3Data(u,0)||[],o=c.length,l=u.length;o<l;o++)if(K.probe(u,o))return M.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(u,c){return K.canParse(u,c)},f.appendFrame=function(u,c,o){return this.initPTS===null?void 0:K.appendFrame(u,c,o,this.initPTS,this.frameIndex)},m}(V.default);D.minProbeByteLength=4,z.default=D},"./src/demux/mp4demuxer.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/utils/mp4-tools.ts"),W=N("./src/demux/dummy-demuxed-track.ts"),M=function(){function K(n,D){this.remainderData=null,this.config=void 0,this.config=D}var H=K.prototype;return H.resetTimeStamp=function(){},H.resetInitSegment=function(){},H.resetContiguity=function(){},K.probe=function(D){return Object(V.findBox)({data:D,start:0,end:Math.min(D.length,16384)},["moof"]).length>0},H.demux=function(D){var b=D,m=Object(W.dummyTrack)();if(this.config.progressive){this.remainderData&&(b=Object(V.appendUint8Array)(this.remainderData,D));var f=Object(V.segmentValidRange)(b);this.remainderData=f.remainder,m.samples=f.valid||new Uint8Array}else m.samples=b;return{audioTrack:Object(W.dummyTrack)(),avcTrack:m,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},H.flush=function(){var D=Object(W.dummyTrack)();return D.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(W.dummyTrack)(),avcTrack:D,id3Track:Object(W.dummyTrack)(),textTrack:Object(W.dummyTrack)()}},H.demuxSampleAes=function(D,b,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},H.destroy=function(){},K}();M.minProbeByteLength=1024,z.default=M},"./src/demux/mpegaudio.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"appendFrame",function(){return n}),N.d(z,"parseHeader",function(){return D}),N.d(z,"isHeaderPattern",function(){return b}),N.d(z,"isHeader",function(){return m}),N.d(z,"canParse",function(){return f}),N.d(z,"probe",function(){return d});var V=null,W=[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],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],K=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],H=[0,1,1,4];function n(u,c,o,l,a){if(o+24>c.length)return;var i=D(c,o);if(i&&o+i.frameLength<=c.length){var R=i.samplesPerFrame*9e4/i.sampleRate,S=l+a*R,T={unit:c.subarray(o,o+i.frameLength),pts:S,dts:S};return u.config=[],u.channelCount=i.channelCount,u.samplerate=i.sampleRate,u.samples.push(T),{sample:T,length:i.frameLength,missing:0}}}function D(u,c){var o=u[c+1]>>3&3,l=u[c+1]>>1&3,a=u[c+2]>>4&15,i=u[c+2]>>2&3;if(o!==1&&a!==0&&a!==15&&i!==3){var R=u[c+2]>>1&1,S=u[c+3]>>6,T=o===3?3-l:l===3?3:4,I=W[T*14+a-1]*1e3,O=o===3?0:o===2?1:2,E=M[O*3+i],y=S===3?1:2,p=K[o][l],h=H[l],A=p*8*h,_=Math.floor(p*I/E+R)*h;if(V===null){var v=navigator.userAgent||"",P=v.match(/Chrome\/(\d+)/i);V=P?parseInt(P[1]):0}var x=!!V&&V<=87;return x&&l===2&&I>=224e3&&S===0&&(u[c+3]=u[c+3]|128),{sampleRate:E,channelCount:y,frameLength:_,samplesPerFrame:A}}}function b(u,c){return u[c]===255&&(u[c+1]&224)===224&&(u[c+1]&6)!==0}function m(u,c){return c+1<u.length&&b(u,c)}function f(u,c){var o=4;return b(u,c)&&o<=u.length-c}function d(u,c){if(c+1<u.length&&b(u,c)){var o=4,l=D(u,c),a=o;l!=null&&l.frameLength&&(a=l.frameLength);var i=c+a;return i===u.length||m(u,i)}return!1}},"./src/demux/sample-aes.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/crypt/decrypter.ts"),W=N("./src/demux/tsdemuxer.ts"),M=function(){function K(n,D,b){this.keyData=void 0,this.decrypter=void 0,this.keyData=b,this.decrypter=new V.default(n,D,{removePKCS7Padding:!1})}var H=K.prototype;return H.decryptBuffer=function(D,b){this.decrypter.decrypt(D,this.keyData.key.buffer,this.keyData.iv.buffer,b)},H.decryptAacSample=function(D,b,m,f){var d=D[b].unit,u=d.subarray(16,d.length-d.length%16),c=u.buffer.slice(u.byteOffset,u.byteOffset+u.length),o=this;this.decryptBuffer(c,function(l){var a=new Uint8Array(l);d.set(a,16),f||o.decryptAacSamples(D,b+1,m)})},H.decryptAacSamples=function(D,b,m){for(;;b++){if(b>=D.length){m();return}if(D[b].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(D,b,m,f),!f)return}},H.getAvcEncryptedData=function(D){for(var b=Math.floor((D.length-48)/160)*16+16,m=new Int8Array(b),f=0,d=32;d<=D.length-16;d+=160,f+=16)m.set(D.subarray(d,d+16),f);return m},H.getAvcDecryptedUnit=function(D,b){for(var m=new Uint8Array(b),f=0,d=32;d<=D.length-16;d+=160,f+=16)D.set(m.subarray(f,f+16),d);return D},H.decryptAvcSample=function(D,b,m,f,d,u){var c=Object(W.discardEPB)(d.data),o=this.getAvcEncryptedData(c),l=this;this.decryptBuffer(o.buffer,function(a){d.data=l.getAvcDecryptedUnit(c,a),u||l.decryptAvcSamples(D,b,m+1,f)})},H.decryptAvcSamples=function(D,b,m,f){if(D instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;b++,m=0){if(b>=D.length){f();return}for(var d=D[b].units;!(m>=d.length);m++){var u=d[m];if(u.data.length<=48||u.type!==1&&u.type!==5)continue;var c=this.decrypter.isSync();if(this.decryptAvcSample(D,b,m,f,u,c),!c)return}}},K}();z.default=M},"./src/demux/transmuxer-interface.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return d});var V=N("./node_modules/webworkify-webpack/index.js"),W=N.n(V),M=N("./src/events.ts"),K=N("./src/demux/transmuxer.ts"),H=N("./src/utils/logger.ts"),n=N("./src/errors.ts"),D=N("./src/utils/mediasource-helper.ts"),b=N("./node_modules/eventemitter3/index.js"),m=N.n(b),f=Object(D.getMediaSource)()||{isTypeSupported:function(){return!1}},d=function(){function u(o,l,a,i){var R=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=o,this.id=l,this.onTransmuxComplete=a,this.onFlush=i;var S=o.config,T=function(p,h){h=h||{},h.frag=R.frag,h.id=R.id,o.trigger(p,h)};this.observer=new b.EventEmitter,this.observer.on(M.Events.FRAG_DECRYPTED,T),this.observer.on(M.Events.ERROR,T);var I={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(S.enableWorker&&typeof Worker!="undefined"){H.logger.log("demuxing in webworker");var E;try{E=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),E.addEventListener("message",this.onwmsg),E.onerror=function(y){o.trigger(M.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(y.message+" ("+y.filename+":"+y.lineno+")")})},E.postMessage({cmd:"init",typeSupported:I,vendor:O,id:l,config:JSON.stringify(S)})}catch(y){H.logger.warn("Error in worker:",y),H.logger.error("Error while initializing DemuxerWorker, fallback to inline"),E&&self.URL.revokeObjectURL(E.objectURL),this.transmuxer=new K.default(this.observer,I,S,O,l),this.worker=null}}else this.transmuxer=new K.default(this.observer,I,S,O,l)}var c=u.prototype;return c.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},c.push=function(l,a,i,R,S,T,I,O,E,y){var p=this;E.transmuxing.start=self.performance.now();var h=this.transmuxer,A=this.worker,_=T?T.start:S.start,v=S.decryptdata,P=this.frag,x=!(P&&S.cc===P.cc),C=!(P&&E.level===P.level),j=P?E.sn-P.sn:-1,B=this.part?E.part-this.part.index:1,w=!C&&(j===1||j===0&&B===1),Y=self.performance.now();(C||j||S.stats.parsing.start===0)&&(S.stats.parsing.start=Y),T&&(B||!w)&&(T.stats.parsing.start=Y);var $=new K.TransmuxState(x,w,O,C,_);if(!w||x){H.logger.log("[transmuxer-interface, "+S.type+"]: Starting new transmux session for sn: "+E.sn+" p: "+E.part+" level: "+E.level+" id: "+E.id+`
discontinuity: `+x+`
trackSwitch: `+C+`
contiguous: `+w+`
accurateTimeOffset: `+O+`
timeOffset: `+_);var oe=new K.TransmuxConfig(i,R,a,I,y);this.configureTransmuxer(oe)}if(this.frag=S,this.part=T,A)A.postMessage({cmd:"demux",data:l,decryptdata:v,chunkMeta:E,state:$},l instanceof ArrayBuffer?[l]:[]);else if(h){var de=h.push(l,v,E,$);Object(K.isPromise)(de)?de.then(function(Be){p.handleTransmuxComplete(Be)}):this.handleTransmuxComplete(de)}},c.flush=function(l){var a=this;l.transmuxing.start=self.performance.now();var i=this.transmuxer,R=this.worker;if(R)R.postMessage({cmd:"flush",chunkMeta:l});else if(i){var S=i.flush(l);Object(K.isPromise)(S)?S.then(function(T){a.handleFlushResult(T,l)}):this.handleFlushResult(S,l)}},c.handleFlushResult=function(l,a){var i=this;l.forEach(function(R){i.handleTransmuxComplete(R)}),this.onFlush(a)},c.onWorkerMessage=function(l){var a=l.data,i=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,i.trigger(a.event,a.data);break}}},c.configureTransmuxer=function(l){var a=this.worker,i=this.transmuxer;a?a.postMessage({cmd:"configure",config:l}):i&&i.configure(l)},c.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},u}()},"./src/demux/transmuxer-worker.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return n});var V=N("./src/demux/transmuxer.ts"),W=N("./src/events.ts"),M=N("./src/utils/logger.ts"),K=N("./node_modules/eventemitter3/index.js"),H=N.n(K);function n(d){var u=new K.EventEmitter,c=function(l,a){d.postMessage({event:l,data:a})};u.on(W.Events.FRAG_DECRYPTED,c),u.on(W.Events.ERROR,c),d.addEventListener("message",function(o){var l=o.data;switch(l.cmd){case"init":{var a=JSON.parse(l.config);d.transmuxer=new V.default(u,l.typeSupported,a,l.vendor,l.id),Object(M.enableLogs)(a.debug),c("init",null);break}case"configure":{d.transmuxer.configure(l.config);break}case"demux":{var i=d.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(V.isPromise)(i)?i.then(function(T){D(d,T)}):D(d,i);break}case"flush":{var R=l.chunkMeta,S=d.transmuxer.flush(R);Object(V.isPromise)(S)?S.then(function(T){m(d,T,R)}):m(d,S,R);break}default:break}})}function D(d,u){if(f(u.remuxResult))return;var c=[],o=u.remuxResult,l=o.audio,a=o.video;l&&b(c,l),a&&b(c,a),d.postMessage({event:"transmuxComplete",data:u},c)}function b(d,u){u.data1&&d.push(u.data1.buffer),u.data2&&d.push(u.data2.buffer)}function m(d,u,c){u.forEach(function(o){D(d,o)}),d.postMessage({event:"flush",data:c})}function f(d){return!d.audio&&!d.video&&!d.text&&!d.id3&&!d.initSegment}},"./src/demux/transmuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a}),N.d(z,"isPromise",function(){return S}),N.d(z,"TransmuxConfig",function(){return T}),N.d(z,"TransmuxState",function(){return I});var V=N("./src/events.ts"),W=N("./src/errors.ts"),M=N("./src/crypt/decrypter.ts"),K=N("./src/demux/aacdemuxer.ts"),H=N("./src/demux/mp4demuxer.ts"),n=N("./src/demux/tsdemuxer.ts"),D=N("./src/demux/mp3demuxer.ts"),b=N("./src/remux/mp4-remuxer.ts"),m=N("./src/remux/passthrough-remuxer.ts"),f=N("./src/demux/chunk-cache.ts"),d=N("./src/utils/mp4-tools.ts"),u=N("./src/utils/logger.ts"),c;try{c=self.performance.now.bind(self.performance)}catch(O){u.logger.debug("Unable to use Performance API on this environment"),c=self.Date.now}var o=[{demux:n.default,remux:b.default},{demux:H.default,remux:m.default},{demux:K.default,remux:b.default},{demux:D.default,remux:b.default}],l=1024;o.forEach(function(O){var E=O.demux;l=Math.max(l,E.minProbeByteLength)});var a=function(){function O(y,p,h,A,_){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=y,this.typeSupported=p,this.config=h,this.vendor=A,this.id=_}var E=O.prototype;return E.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},E.push=function(p,h,A,_){var v=this,P=A.transmuxing;P.executeStart=c();var x=new Uint8Array(p),C=this.cache,j=this.config,B=this.currentTransmuxState,w=this.transmuxConfig;_&&(this.currentTransmuxState=_);var Y=i(x,h);if(Y&&Y.method==="AES-128"){var $=this.getDecrypter();if(j.enableSoftwareAES){var oe=$.softwareDecrypt(x,Y.key.buffer,Y.iv.buffer);if(!oe)return P.executeEnd=c(),R(A);x=new Uint8Array(oe)}else return this.decryptionPromise=$.webCryptoDecrypt(x,Y.key.buffer,Y.iv.buffer).then(function(Ye){var et=v.push(Ye,null,A);return v.decryptionPromise=null,et}),this.decryptionPromise}var de=_||B,Be=de.contiguous,Ae=de.discontinuity,Re=de.trackSwitch,Le=de.accurateTimeOffset,Fe=de.timeOffset,me=w.audioCodec,fe=w.videoCodec,ne=w.defaultInitPts,xe=w.duration,ce=w.initSegmentData;if((Ae||Re)&&this.resetInitSegment(ce,me,fe,xe),Ae&&this.resetInitialTimestamp(ne),Be||this.resetContiguity(),this.needsProbing(x,Ae,Re)){if(C.dataLength){var Ne=C.flush();x=Object(d.appendUint8Array)(Ne,x)}this.configureTransmuxer(x,w)}var He=this.transmux(x,Y,Fe,Le,A),ke=this.currentTransmuxState;return ke.contiguous=!0,ke.discontinuity=!1,ke.trackSwitch=!1,P.executeEnd=c(),He},E.flush=function(p){var h=this,A=p.transmuxing;A.executeStart=c();var _=this.decrypter,v=this.cache,P=this.currentTransmuxState,x=this.decryptionPromise;if(x)return x.then(function(){return h.flush(p)});var C=[],j=P.timeOffset;if(_){var B=_.flush();B&&C.push(this.push(B,null,p))}var w=v.dataLength;v.reset();var Y=this.demuxer,$=this.remuxer;if(!Y||!$)return w>=l&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),A.executeEnd=c(),[R(p)];var oe=Y.flush(j);return S(oe)?oe.then(function(de){return h.flushRemux(C,de,p),C}):(this.flushRemux(C,oe,p),C)},E.flushRemux=function(p,h,A){var _=h.audioTrack,v=h.avcTrack,P=h.id3Track,x=h.textTrack,C=this.currentTransmuxState,j=C.accurateTimeOffset,B=C.timeOffset;u.logger.log("[transmuxer.ts]: Flushed fragment "+A.sn+(A.part>-1?" p: "+A.part:"")+" of level "+A.level);var w=this.remuxer.remux(_,v,P,x,B,j,!0,this.id);p.push({remuxResult:w,chunkMeta:A}),A.transmuxing.executeEnd=c()},E.resetInitialTimestamp=function(p){var h=this.demuxer,A=this.remuxer;if(!h||!A)return;h.resetTimeStamp(p),A.resetTimeStamp(p)},E.resetContiguity=function(){var p=this.demuxer,h=this.remuxer;if(!p||!h)return;p.resetContiguity(),h.resetNextTimestamp()},E.resetInitSegment=function(p,h,A,_){var v=this.demuxer,P=this.remuxer;if(!v||!P)return;v.resetInitSegment(h,A,_),P.resetInitSegment(p,h,A)},E.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},E.transmux=function(p,h,A,_,v){var P;return h&&h.method==="SAMPLE-AES"?P=this.transmuxSampleAes(p,h,A,_,v):P=this.transmuxUnencrypted(p,A,_,v),P},E.transmuxUnencrypted=function(p,h,A,_){var v=this.demuxer.demux(p,h,!1,!this.config.progressive),P=v.audioTrack,x=v.avcTrack,C=v.id3Track,j=v.textTrack,B=this.remuxer.remux(P,x,C,j,h,A,!1,this.id);return{remuxResult:B,chunkMeta:_}},E.transmuxSampleAes=function(p,h,A,_,v){var P=this;return this.demuxer.demuxSampleAes(p,h,A).then(function(x){var C=P.remuxer.remux(x.audioTrack,x.avcTrack,x.id3Track,x.textTrack,A,_,!1,P.id);return{remuxResult:C,chunkMeta:v}})},E.configureTransmuxer=function(p,h){for(var A=this.config,_=this.observer,v=this.typeSupported,P=this.vendor,x=h.audioCodec,C=h.defaultInitPts,j=h.duration,B=h.initSegmentData,w=h.videoCodec,Y,$=0,oe=o.length;$<oe;$++)if(o[$].demux.probe(p)){Y=o[$];break}Y||(u.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:H.default,remux:m.default});var de=this.demuxer,Be=this.remuxer,Ae=Y.remux,Re=Y.demux;(!Be||!(Be instanceof Ae))&&(this.remuxer=new Ae(_,A,v,P)),(!de||!(de instanceof Re))&&(this.demuxer=new Re(_,A,v),this.probe=Re.probe),this.resetInitSegment(B,x,w,j),this.resetInitialTimestamp(C)},E.needsProbing=function(p,h,A){return!this.demuxer||!this.remuxer||h||A},E.getDecrypter=function(){var p=this.decrypter;return p||(p=this.decrypter=new M.default(this.observer,this.config)),p},O}();function i(O,E){var y=null;return O.byteLength>0&&E!=null&&E.key!=null&&E.iv!==null&&E.method!=null&&(y=E),y}var R=function(E){return{remuxResult:{},chunkMeta:E}};function S(O){return"then"in O&&O.then instanceof Function}var T=function(E,y,p,h,A){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=E,this.videoCodec=y,this.initSegmentData=p,this.duration=h,this.defaultInitPts=A},I=function(E,y,p,h,A){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=E,this.contiguous=y,this.accurateTimeOffset=p,this.trackSwitch=h,this.timeOffset=A}},"./src/demux/tsdemuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"discardEPB",function(){return R});var V=N("./src/demux/adts.ts"),W=N("./src/demux/mpegaudio.ts"),M=N("./src/demux/exp-golomb.ts"),K=N("./src/demux/id3.ts"),H=N("./src/demux/sample-aes.ts"),n=N("./src/events.ts"),D=N("./src/utils/mp4-tools.ts"),b=N("./src/utils/logger.ts"),m=N("./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},d=function(){function S(I,O,E){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=I,this.config=O,this.typeSupported=E}S.probe=function(O){var E=S.syncOffset(O);return E<0?!1:(E&&b.logger.warn("MPEG2-TS detected but first sync word found @ offset "+E+", junk ahead ?"),!0)},S.syncOffset=function(O){for(var E=Math.min(1e3,O.length-3*188),y=0;y<E;){if(O[y]===71&&O[y+188]===71&&O[y+2*188]===71)return y;y++}return-1},S.createTrack=function(O,E){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:f[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?E:void 0}};var T=S.prototype;return T.resetInitSegment=function(O,E,y){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=S.createTrack("video",y),this._audioTrack=S.createTrack("audio",y),this._id3Track=S.createTrack("id3",y),this._txtTrack=S.createTrack("text",y),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=E,this._duration=y},T.resetTimeStamp=function(){},T.resetContiguity=function(){var O=this._audioTrack,E=this._avcTrack,y=this._id3Track;O&&(O.pesData=null),E&&(E.pesData=null),y&&(y.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},T.demux=function(O,E,y,p){y===void 0&&(y=!1),p===void 0&&(p=!1),y||(this.sampleAes=null);var h,A=this._avcTrack,_=this._audioTrack,v=this._id3Track,P=A.pid,x=A.pesData,C=_.pid,j=v.pid,B=_.pesData,w=v.pesData,Y=!1,$=this.pmtParsed,oe=this._pmtId,de=O.length;if(this.remainderData&&(O=Object(D.appendUint8Array)(this.remainderData,O),de=O.length,this.remainderData=null),de<188&&!p)return this.remainderData=O,{audioTrack:_,avcTrack:A,id3Track:v,textTrack:this._txtTrack};var Be=Math.max(0,S.syncOffset(O));de-=(de+Be)%188,de<O.byteLength&&!p&&(this.remainderData=new Uint8Array(O.buffer,de,O.buffer.byteLength-de));for(var Ae=Be;Ae<de;Ae+=188)if(O[Ae]===71){var Re=!!(O[Ae+1]&64),Le=((O[Ae+1]&31)<<8)+O[Ae+2],Fe=(O[Ae+3]&48)>>4,me=void 0;if(Fe>1){if(me=Ae+5+O[Ae+4],me===Ae+188)continue}else me=Ae+4;switch(Le){case P:Re&&(x&&(h=l(x))&&this.parseAVCPES(h,!1),x={data:[],size:0}),x&&(x.data.push(O.subarray(me,Ae+188)),x.size+=Ae+188-me);break;case C:Re&&(B&&(h=l(B))&&(_.isAAC?this.parseAACPES(h):this.parseMPEGPES(h)),B={data:[],size:0}),B&&(B.data.push(O.subarray(me,Ae+188)),B.size+=Ae+188-me);break;case j:Re&&(w&&(h=l(w))&&this.parseID3PES(h),w={data:[],size:0}),w&&(w.data.push(O.subarray(me,Ae+188)),w.size+=Ae+188-me);break;case 0:Re&&(me+=O[me]+1),oe=this._pmtId=c(O,me);break;case oe:{Re&&(me+=O[me]+1);var fe=o(O,me,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,y);P=fe.avc,P>0&&(A.pid=P),C=fe.audio,C>0&&(_.pid=C,_.isAAC=fe.isAAC),j=fe.id3,j>0&&(v.pid=j),Y&&!$&&(b.logger.log("reparse from beginning"),Y=!1,Ae=Be-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A.pesData=x,_.pesData=B,v.pesData=w;var ne={audioTrack:_,avcTrack:A,id3Track:v,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(ne),ne},T.flush=function(){var O=this.remainderData;this.remainderData=null;var E;return O?E=this.demux(O,-1,!1,!0):E={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(E),this.sampleAes?this.decrypt(E,this.sampleAes):E},T.extractRemainingSamples=function(O){var E=O.audioTrack,y=O.avcTrack,p=O.id3Track,h=y.pesData,A=E.pesData,_=p.pesData,v;h&&(v=l(h))?(this.parseAVCPES(v,!0),y.pesData=null):y.pesData=h,A&&(v=l(A))?(E.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),E.pesData=null):(A!=null&&A.size&&b.logger.log("last AAC PES packet truncated,might overlap between fragments"),E.pesData=A),_&&(v=l(_))?(this.parseID3PES(v),p.pesData=null):p.pesData=_},T.demuxSampleAes=function(O,E,y){var p=this.demux(O,y,!0,!this.config.progressive),h=this.sampleAes=new H.default(this.observer,this.config,E);return this.decrypt(p,h)},T.decrypt=function(O,E){return new Promise(function(y){var p=O.audioTrack,h=O.avcTrack;p.samples&&p.isAAC?E.decryptAacSamples(p.samples,0,function(){h.samples?E.decryptAvcSamples(h.samples,0,0,function(){y(O)}):y(O)}):h.samples&&E.decryptAvcSamples(h.samples,0,0,function(){y(O)})})},T.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},T.parseAVCPES=function(O,E){var y=this,p=this._avcTrack,h=this.parseAVCNALu(O.data),A=!1,_=this.avcSample,v,P=!1;O.data=null,_&&h.length&&!p.audFound&&(a(_,p),_=this.avcSample=u(!1,O.pts,O.dts,"")),h.forEach(function(x){switch(x.type){case 1:{v=!0,_||(_=y.avcSample=u(!0,O.pts,O.dts,"")),A&&(_.debug+="NDR "),_.frame=!0;var C=x.data;if(P&&C.length>4){var j=new M.default(C).readSliceType();(j===2||j===4||j===7||j===9)&&(_.key=!0)}break}case 5:v=!0,_||(_=y.avcSample=u(!0,O.pts,O.dts,"")),A&&(_.debug+="IDR "),_.key=!0,_.frame=!0;break;case 6:{v=!0,A&&_&&(_.debug+="SEI ");var B=new M.default(R(x.data));B.readUByte();for(var w=0,Y=0,$=!1,oe=0;!$&&B.bytesAvailable>1;){w=0;do oe=B.readUByte(),w+=oe;while(oe===255);Y=0;do oe=B.readUByte(),Y+=oe;while(oe===255);if(w===4&&B.bytesAvailable!==0){$=!0;var de=B.readUByte();if(de===181){var Be=B.readUShort();if(Be===49){var Ae=B.readUInt();if(Ae===1195456820){var Re=B.readUByte();if(Re===3){for(var Le=B.readUByte(),Fe=B.readUByte(),me=31&Le,fe=[Le,Fe],ne=0;ne<me;ne++)fe.push(B.readUByte()),fe.push(B.readUByte()),fe.push(B.readUByte());i(y._txtTrack.samples,{type:3,pts:O.pts,bytes:fe})}}}}}else if(w===5&&B.bytesAvailable!==0){if($=!0,Y>16){for(var xe=[],ce=0;ce<16;ce++)xe.push(B.readUByte().toString(16)),(ce===3||ce===5||ce===7||ce===9)&&xe.push("-");for(var Ne=Y-16,He=new Uint8Array(Ne),ke=0;ke<Ne;ke++)He[ke]=B.readUByte();i(y._txtTrack.samples,{pts:O.pts,payloadType:w,uuid:xe.join(""),userData:Object(K.utf8ArrayToStr)(He),userDataBytes:He})}}else if(Y<B.bytesAvailable)for(var Ye=0;Ye<Y;Ye++)B.readUByte()}break}case 7:if(v=!0,P=!0,A&&_&&(_.debug+="SPS "),!p.sps){var et=new M.default(x.data),ue=et.readSPS();p.width=ue.width,p.height=ue.height,p.pixelRatio=ue.pixelRatio,p.sps=[x.data],p.duration=y._duration;for(var _e=x.data.subarray(1,4),Oe="avc1.",Me=0;Me<3;Me++){var rt=_e[Me].toString(16);rt.length<2&&(rt="0"+rt),Oe+=rt}p.codec=Oe}break;case 8:v=!0,A&&_&&(_.debug+="PPS "),p.pps||(p.pps=[x.data]);break;case 9:v=!1,p.audFound=!0,_&&a(_,p),_=y.avcSample=u(!1,O.pts,O.dts,A?"AUD ":"");break;case 12:v=!1;break;default:v=!1,_&&(_.debug+="unknown NAL "+x.type+" ");break}if(_&&v){var dt=_.units;dt.push(x)}}),E&&_&&(a(_,p),this.avcSample=null)},T.getLastNalUnit=function(){var O,E=this.avcSample,y;if(!E||E.units.length===0){var p=this._avcTrack.samples;E=p[p.length-1]}if((O=E)!==null&&O!==void 0&&O.units){var h=E.units;y=h[h.length-1]}return y},T.parseAVCNALu=function(O){var E=O.byteLength,y=this._avcTrack,p=y.naluState||0,h=p,A=[],_=0,v,P,x,C=-1,j=0;for(p===-1&&(C=0,j=O[0]&31,p=0,_=1);_<E;){if(v=O[_++],!p){p=v?0:1;continue}if(p===1){p=v?0:2;continue}if(!v)p=3;else if(v===1){if(C>=0){var B={data:O.subarray(C,_-p-1),type:j};A.push(B)}else{var w=this.getLastNalUnit();if(w&&(h&&_<=4-h&&(w.state&&(w.data=w.data.subarray(0,w.data.byteLength-h))),P=_-p-1,P>0)){var Y=new Uint8Array(w.data.byteLength+P);Y.set(w.data,0),Y.set(O.subarray(0,P),w.data.byteLength),w.data=Y,w.state=0}}_<E?(x=O[_]&31,C=_,j=x,p=0):p=-1}else p=0}if(C>=0&&p>=0){var $={data:O.subarray(C,E),type:j,state:p};A.push($)}if(A.length===0){var oe=this.getLastNalUnit();if(oe){var de=new Uint8Array(oe.data.byteLength+O.byteLength);de.set(oe.data,0),de.set(O,oe.data.byteLength),oe.data=de}}return y.naluState=p,A},T.parseAACPES=function(O){var E=0,y=this._audioTrack,p=this.aacOverFlow,h=O.data;if(p){this.aacOverFlow=null;var A=p.sample.unit.byteLength,_=Math.min(p.missing,A),v=A-_;p.sample.unit.set(h.subarray(0,_),v),y.samples.push(p.sample),E=p.missing}var P,x;for(P=E,x=h.length;P<x-1&&!V.isHeader(h,P);P++);if(P!==E){var C,j;if(P<x-1?(C="AAC PES did not start with ADTS header,offset:"+P,j=!1):(C="no ADTS header found in AAC PES",j=!0),b.logger.warn("parsing error:"+C),this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:j,reason:C}),j)return}V.initTrackConfig(y,this.observer,h,P,this.audioCodec);var B;if(O.pts!==void 0)B=O.pts;else if(p){var w=V.getFrameDuration(y.samplerate);B=p.sample.pts+w}else{b.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;P<x;)if(V.isHeader(h,P)){if(P+5<x){var $=V.appendFrame(y,h,P,B,Y);if($)if($.missing)this.aacOverFlow=$;else{P+=$.length,Y++;continue}}break}else P++},T.parseMPEGPES=function(O){var E=O.data,y=E.length,p=0,h=0,A=O.pts;if(A===void 0){b.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;h<y;)if(W.isHeader(E,h)){var _=W.appendFrame(this._audioTrack,E,h,A,p);if(_)h+=_.length,p++;else break}else h++},T.parseID3PES=function(O){if(O.pts===void 0){b.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},S}();d.minProbeByteLength=188;function u(S,T,I,O){return{key:S,frame:!1,pts:T,dts:I,units:[],debug:O,length:0}}function c(S,T){return(S[T+10]&31)<<8|S[T+11]}function o(S,T,I,O){var E={audio:-1,avc:-1,id3:-1,isAAC:!0},y=(S[T+1]&15)<<8|S[T+2],p=T+3+y-4,h=(S[T+10]&15)<<8|S[T+11];for(T+=12+h;T<p;){var A=(S[T+1]&31)<<8|S[T+2];switch(S[T]){case 207:if(!O){b.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:E.audio===-1&&(E.audio=A);break;case 21:E.id3===-1&&(E.id3=A);break;case 219:if(!O){b.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:E.avc===-1&&(E.avc=A);break;case 3:case 4:I?E.audio===-1&&(E.audio=A,E.isAAC=!1):b.logger.log("MPEG audio found, not supported in this browser");break;case 36:b.logger.warn("Unsupported HEVC stream type found");break;default:break}T+=((S[T+3]&15)<<8|S[T+4])+5}return E}function l(S){var T=0,I,O,E,y,p,h=S.data;if(!S||S.size===0)return null;for(;h[0].length<19&&h.length>1;){var A=new Uint8Array(h[0].length+h[1].length);A.set(h[0]),A.set(h[1],h[0].length),h[0]=A,h.splice(1,1)}I=h[0];var _=(I[0]<<16)+(I[1]<<8)+I[2];if(_===1){if(O=(I[4]<<8)+I[5],O&&O>S.size-6)return null;var v=I[7];v&192&&(y=(I[9]&14)*536870912+(I[10]&255)*4194304+(I[11]&254)*16384+(I[12]&255)*128+(I[13]&254)/2,v&64?(p=(I[14]&14)*536870912+(I[15]&255)*4194304+(I[16]&254)*16384+(I[17]&255)*128+(I[18]&254)/2,y-p>60*9e4&&(b.logger.warn(Math.round((y-p)/9e4)+"s delta between PTS and DTS, align them"),y=p)):p=y),E=I[8];var P=E+9;if(S.size<=P)return null;S.size-=P;for(var x=new Uint8Array(S.size),C=0,j=h.length;C<j;C++){I=h[C];var B=I.byteLength;if(P)if(P>B){P-=B;continue}else I=I.subarray(P),B-=P,P=0;x.set(I,T),T+=B}return O&&(O-=E+3),{data:x,pts:y,dts:p,len:O}}return null}function a(S,T){if(S.units.length&&S.frame){if(S.pts===void 0){var I=T.samples,O=I.length;if(O){var E=I[O-1];S.pts=E.pts,S.dts=E.dts}else{T.dropped++;return}}T.samples.push(S)}S.debug.length&&b.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function i(S,T){var I=S.length;if(I>0){if(T.pts>=S[I-1].pts)S.push(T);else for(var O=I-1;O>=0;O--)if(T.pts<S[O].pts){S.splice(O,0,T);break}}else S.push(T)}function R(S){for(var T=S.byteLength,I=[],O=1;O<T-2;)S[O]===0&&S[O+1]===0&&S[O+2]===3?(I.push(O+2),O+=2):O++;if(I.length===0)return S;var E=T-I.length,y=new Uint8Array(E),p=0;for(O=0;O<E;p++,O++)p===I[0]&&(p++,I.shift()),y[O]=S[p];return y}z.default=d},"./src/errors.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ErrorTypes",function(){return V}),N.d(z,"ErrorDetails",function(){return W});var V;(function(M){M.NETWORK_ERROR="networkError",M.MEDIA_ERROR="mediaError",M.KEY_SYSTEM_ERROR="keySystemError",M.MUX_ERROR="muxError",M.OTHER_ERROR="otherError"})(V||(V={}));var W;(function(M){M.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",M.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",M.KEY_SYSTEM_NO_SESSION="keySystemNoSession",M.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",M.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",M.MANIFEST_LOAD_ERROR="manifestLoadError",M.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",M.MANIFEST_PARSING_ERROR="manifestParsingError",M.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",M.LEVEL_EMPTY_ERROR="levelEmptyError",M.LEVEL_LOAD_ERROR="levelLoadError",M.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",M.LEVEL_SWITCH_ERROR="levelSwitchError",M.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",M.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",M.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",M.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",M.FRAG_LOAD_ERROR="fragLoadError",M.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",M.FRAG_DECRYPT_ERROR="fragDecryptError",M.FRAG_PARSING_ERROR="fragParsingError",M.REMUX_ALLOC_ERROR="remuxAllocError",M.KEY_LOAD_ERROR="keyLoadError",M.KEY_LOAD_TIMEOUT="keyLoadTimeOut",M.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",M.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",M.BUFFER_APPEND_ERROR="bufferAppendError",M.BUFFER_APPENDING_ERROR="bufferAppendingError",M.BUFFER_STALLED_ERROR="bufferStalledError",M.BUFFER_FULL_ERROR="bufferFullError",M.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",M.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",M.INTERNAL_EXCEPTION="internalException",M.INTERNAL_ABORTED="aborted",M.UNKNOWN="unknown"})(W||(W={}))},"./src/events.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"Events",function(){return V});var V;(function(W){W.MEDIA_ATTACHING="hlsMediaAttaching",W.MEDIA_ATTACHED="hlsMediaAttached",W.MEDIA_DETACHING="hlsMediaDetaching",W.MEDIA_DETACHED="hlsMediaDetached",W.BUFFER_RESET="hlsBufferReset",W.BUFFER_CODECS="hlsBufferCodecs",W.BUFFER_CREATED="hlsBufferCreated",W.BUFFER_APPENDING="hlsBufferAppending",W.BUFFER_APPENDED="hlsBufferAppended",W.BUFFER_EOS="hlsBufferEos",W.BUFFER_FLUSHING="hlsBufferFlushing",W.BUFFER_FLUSHED="hlsBufferFlushed",W.MANIFEST_LOADING="hlsManifestLoading",W.MANIFEST_LOADED="hlsManifestLoaded",W.MANIFEST_PARSED="hlsManifestParsed",W.LEVEL_SWITCHING="hlsLevelSwitching",W.LEVEL_SWITCHED="hlsLevelSwitched",W.LEVEL_LOADING="hlsLevelLoading",W.LEVEL_LOADED="hlsLevelLoaded",W.LEVEL_UPDATED="hlsLevelUpdated",W.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",W.LEVELS_UPDATED="hlsLevelsUpdated",W.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",W.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",W.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",W.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",W.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",W.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",W.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",W.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",W.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",W.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",W.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",W.CUES_PARSED="hlsCuesParsed",W.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",W.INIT_PTS_FOUND="hlsInitPtsFound",W.FRAG_LOADING="hlsFragLoading",W.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",W.FRAG_LOADED="hlsFragLoaded",W.FRAG_DECRYPTED="hlsFragDecrypted",W.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",W.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",W.FRAG_PARSING_METADATA="hlsFragParsingMetadata",W.FRAG_PARSED="hlsFragParsed",W.FRAG_BUFFERED="hlsFragBuffered",W.FRAG_CHANGED="hlsFragChanged",W.FPS_DROP="hlsFpsDrop",W.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",W.ERROR="hlsError",W.DESTROYING="hlsDestroying",W.KEY_LOADING="hlsKeyLoading",W.KEY_LOADED="hlsKeyLoaded",W.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",W.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return S});var V=N("./node_modules/url-toolkit/src/url-toolkit.js"),W=N.n(V),M=N("./src/loader/playlist-loader.ts"),K=N("./src/loader/key-loader.ts"),H=N("./src/controller/id3-track-controller.ts"),n=N("./src/controller/latency-controller.ts"),D=N("./src/controller/level-controller.ts"),b=N("./src/controller/fragment-tracker.ts"),m=N("./src/controller/stream-controller.ts"),f=N("./src/is-supported.ts"),d=N("./src/utils/logger.ts"),u=N("./src/config.ts"),c=N("./node_modules/eventemitter3/index.js"),o=N.n(c),l=N("./src/events.ts"),a=N("./src/errors.ts");function i(T,I){for(var O=0;O<I.length;O++){var E=I[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E)}}function R(T,I,O){return I&&i(T.prototype,I),O&&i(T,O),T}var S=function(){T.isSupported=function(){return Object(f.isSupported)()};function T(O){O===void 0&&(O={}),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 E=this.config=Object(u.mergeConfig)(T.DefaultConfig,O);this.userConfig=O,Object(d.enableLogs)(E.debug),this._autoLevelCapping=-1,E.progressive&&Object(u.enableStreamingMode)(E);var y=E.abrController,p=E.bufferController,h=E.capLevelController,A=E.fpsController,_=this.abrController=new y(this),v=this.bufferController=new p(this),P=this.capLevelController=new h(this),x=new A(this),C=new M.default(this),j=new K.default(this),B=new H.default(this),w=this.levelController=new D.default(this),Y=new b.FragmentTracker(this),$=this.streamController=new m.default(this,Y);P.setStreamController($),x.setStreamController($);var oe=[w,$];this.networkControllers=oe;var de=[C,j,_,v,P,x,B,Y];this.audioTrackController=this.createController(E.audioTrackController,null,oe),this.createController(E.audioStreamController,Y,oe),this.subtitleTrackController=this.createController(E.subtitleTrackController,null,oe),this.createController(E.subtitleStreamController,Y,oe),this.createController(E.timelineController,null,de),this.emeController=this.createController(E.emeController,null,de),this.cmcdController=this.createController(E.cmcdController,null,de),this.latencyController=this.createController(n.default,null,de),this.coreComponents=de}var I=T.prototype;return I.createController=function(E,y,p){if(E){var h=y?new E(this,y):new E(this);return p&&p.push(h),h}return null},I.on=function(E,y,p){p===void 0&&(p=this),this._emitter.on(E,y,p)},I.once=function(E,y,p){p===void 0&&(p=this),this._emitter.once(E,y,p)},I.removeAllListeners=function(E){this._emitter.removeAllListeners(E)},I.off=function(E,y,p,h){p===void 0&&(p=this),this._emitter.off(E,y,p,h)},I.listeners=function(E){return this._emitter.listeners(E)},I.emit=function(E,y,p){return this._emitter.emit(E,y,p)},I.trigger=function(E,y){if(this.config.debug)return this.emit(E,E,y);try{return this.emit(E,E,y)}catch(p){d.logger.error("An internal error happened while handling event "+E+'. Error message: "'+p.message+'". Here is a stacktrace:',p),this.trigger(l.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:E,error:p})}return!1},I.listenerCount=function(E){return this._emitter.listenerCount(E)},I.destroy=function(){d.logger.log("destroy"),this.trigger(l.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(E){return E.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(E){return E.destroy()}),this.coreComponents.length=0},I.attachMedia=function(E){d.logger.log("attachMedia"),this._media=E,this.trigger(l.Events.MEDIA_ATTACHING,{media:E})},I.detachMedia=function(){d.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},I.loadSource=function(E){this.stopLoad();var y=this.media,p=this.url,h=this.url=V.buildAbsoluteURL(self.location.href,E,{alwaysNormalize:!0});d.logger.log("loadSource:"+h),y&&p&&p!==h&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(y)),this.trigger(l.Events.MANIFEST_LOADING,{url:E})},I.startLoad=function(E){E===void 0&&(E=-1),d.logger.log("startLoad("+E+")"),this.networkControllers.forEach(function(y){y.startLoad(E)})},I.stopLoad=function(){d.logger.log("stopLoad"),this.networkControllers.forEach(function(E){E.stopLoad()})},I.swapAudioCodec=function(){d.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},I.recoverMediaError=function(){d.logger.log("recoverMediaError");var E=this._media;this.detachMedia(),E&&this.attachMedia(E)},I.removeLevel=function(E,y){y===void 0&&(y=0),this.levelController.removeLevel(E,y)},R(T,[{key:"levels",get:function(){var E=this.levelController.levels;return E||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(E){d.logger.log("set currentLevel:"+E),this.loadLevel=E,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(E){d.logger.log("set nextLevel:"+E),this.levelController.manualLevel=E,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(E){d.logger.log("set loadLevel:"+E),this.levelController.manualLevel=E}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(E){this.levelController.nextLoadLevel=E}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(E){d.logger.log("set firstLevel:"+E),this.levelController.firstLevel=E}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(E){d.logger.log("set startLevel:"+E),E!==-1&&(E=Math.max(E,this.minAutoLevel)),this.levelController.startLevel=E}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(E){var y=!!E;y!==this.config.capLevelToPlayerSize&&(y?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=y)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(E){this._autoLevelCapping!==E&&(d.logger.log("set autoLevelCapping:"+E),this._autoLevelCapping=E)}},{key:"bandwidthEstimate",get:function(){var E=this.abrController.bwEstimator;return E?E.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var E=this.levels,y=this.config.minAutoBitrate;if(!E)return 0;for(var p=E.length,h=0;h<p;h++)if(E[h].maxBitrate>y)return h;return 0}},{key:"maxAutoLevel",get:function(){var E=this.levels,y=this.autoLevelCapping,p;return y===-1&&E&&E.length?p=E.length-1:p=y,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(E){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,E)}},{key:"audioTracks",get:function(){var E=this.audioTrackController;return E?E.audioTracks:[]}},{key:"audioTrack",get:function(){var E=this.audioTrackController;return E?E.audioTrack:-1},set:function(E){var y=this.audioTrackController;y&&(y.audioTrack=E)}},{key:"subtitleTracks",get:function(){var E=this.subtitleTrackController;return E?E.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var E=this.subtitleTrackController;return E?E.subtitleTrack:-1},set:function(E){var y=this.subtitleTrackController;y&&(y.subtitleTrack=E)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var E=this.subtitleTrackController;return E?E.subtitleDisplay:!1},set:function(E){var y=this.subtitleTrackController;y&&(y.subtitleDisplay=E)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(E){this.config.lowLatencyMode=E}},{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 l.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return T.defaultConfig?T.defaultConfig:u.hlsDefaultConfig},set:function(E){T.defaultConfig=E}}]),T}();S.defaultConfig=void 0},"./src/is-supported.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isSupported",function(){return M}),N.d(z,"changeTypeSupported",function(){return K});var V=N("./src/utils/mediasource-helper.ts");function W(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var H=Object(V.getMediaSource)();if(!H)return!1;var n=W(),D=H&&typeof H.isTypeSupported=="function"&&H.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),b=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!D&&!!b}function K(){var H,n=W();return typeof(n==null||((H=n.prototype)===null||H===void 0)?void 0:H.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return d}),N.d(z,"LoadError",function(){return c});var V=N("./src/polyfills/number.ts"),W=N("./src/errors.ts");function M(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,b(o,l)}function K(o){var l=typeof Map=="function"?new Map:void 0;return K=function(i){if(i===null||!D(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(i))return l.get(i);l.set(i,R)}function R(){return H(i,arguments,m(this).constructor)}return R.prototype=Object.create(i.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),b(R,i)},K(o)}function H(o,l,a){return n()?H=Reflect.construct:H=function(R,S,T){var I=[null];I.push.apply(I,S);var O=Function.bind.apply(R,I),E=new O;return T&&b(E,T.prototype),E},H.apply(null,arguments)}function n(){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(o){return!1}}function D(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function b(o,l){return b=Object.setPrototypeOf||function(i,R){return i.__proto__=R,i},b(o,l)}function m(o){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},m(o)}var f=Math.pow(2,17),d=function(){function o(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var l=o.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(i,R){var S=this,T=i.url;if(!T)return Promise.reject(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,networkDetails:null},"Fragment does not have a "+(T?"part list":"url")));this.abort();var I=this.config,O=I.fLoader,E=I.loader;return new Promise(function(y,p){S.loader&&S.loader.destroy();var h=S.loader=i.loader=O?new O(I):new E(I),A=u(i),_={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:f};i.stats=h.stats,h.load(A,_,{onSuccess:function(P,x,C,j){S.resetLoader(i,h),y({frag:i,part:null,payload:P.data,networkDetails:j})},onError:function(P,x,C){S.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:P,networkDetails:C}))},onAbort:function(P,x,C){S.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,networkDetails:C}))},onTimeout:function(P,x,C){S.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,networkDetails:C}))},onProgress:function(P,x,C,j){R&&R({frag:i,part:null,payload:C,networkDetails:j})}})})},l.loadPart=function(i,R,S){var T=this;this.abort();var I=this.config,O=I.fLoader,E=I.loader;return new Promise(function(y,p){T.loader&&T.loader.destroy();var h=T.loader=i.loader=O?new O(I):new E(I),A=u(i,R),_={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:f};R.stats=h.stats,h.load(A,_,{onSuccess:function(P,x,C,j){T.resetLoader(i,h),T.updateStatsFromPart(i,R);var B={frag:i,part:R,payload:P.data,networkDetails:j};S(B),y(B)},onError:function(P,x,C){T.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:R,response:P,networkDetails:C}))},onAbort:function(P,x,C){i.stats.aborted=R.stats.aborted,T.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,part:R,networkDetails:C}))},onTimeout:function(P,x,C){T.resetLoader(i,h),p(new c({type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:R,networkDetails:C}))}})})},l.updateStatsFromPart=function(i,R){var S=i.stats,T=R.stats,I=T.total;if(S.loaded+=T.loaded,I){var O=Math.round(i.duration/R.duration),E=Math.min(Math.round(S.loaded/I),O),y=O-E,p=y*Math.round(S.loaded/E);S.total=S.loaded+p}else S.total=Math.max(S.loaded,S.total);var h=S.loading,A=T.loading;h.start?h.first+=A.first-A.start:(h.start=A.start,h.first=A.first),h.end=A.end},l.resetLoader=function(i,R){i.loader=null,this.loader===R&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),R.destroy()},o}();function u(o,l){l===void 0&&(l=null);var a=l||o,i={frag:o,part:l,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},R=a.byteRangeStartOffset,S=a.byteRangeEndOffset;return Object(V.isFiniteNumber)(R)&&Object(V.isFiniteNumber)(S)&&(i.rangeStart=R,i.rangeEnd=S),i}var c=function(o){M(l,o);function l(a){for(var i,R=arguments.length,S=new Array(R>1?R-1:0),T=1;T<R;T++)S[T-1]=arguments[T];return i=o.call.apply(o,[this].concat(S))||this,i.data=void 0,i.data=a,i}return l}(K(Error))},"./src/loader/fragment.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ElementaryStreamTypes",function(){return d}),N.d(z,"BaseSegment",function(){return u}),N.d(z,"Fragment",function(){return c}),N.d(z,"Part",function(){return o});var V=N("./src/polyfills/number.ts"),W=N("./node_modules/url-toolkit/src/url-toolkit.js"),M=N.n(W),K=N("./src/utils/logger.ts"),H=N("./src/loader/level-key.ts"),n=N("./src/loader/load-stats.ts");function D(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,b(l,a)}function b(l,a){return b=Object.setPrototypeOf||function(R,S){return R.__proto__=S,R},b(l,a)}function m(l,a){for(var i=0;i<a.length;i++){var R=a[i];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(l,R.key,R)}}function f(l,a,i){return a&&m(l.prototype,a),i&&m(l,i),l}var d;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(d||(d={}));var u=function(){function l(i){var R;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(R={},R[d.AUDIO]=null,R[d.VIDEO]=null,R[d.AUDIOVIDEO]=null,R),this.baseurl=i}var a=l.prototype;return a.setByteRange=function(R,S){var T=R.split("@",2),I=[];T.length===1?I[0]=S?S.byteRangeEndOffset:0:I[0]=parseInt(T[1]),I[1]=parseInt(T[0])+I[0],this._byteRange=I},f(l,[{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(W.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(R){this._url=R}}]),l}(),c=function(l){D(a,l);function a(R,S){var T;return T=l.call(this,S)||this,T._decryptdata=null,T.rawProgramDateTime=null,T.programDateTime=null,T.tagList=[],T.duration=0,T.sn=0,T.levelkey=void 0,T.type=void 0,T.loader=null,T.level=-1,T.cc=0,T.startPTS=void 0,T.endPTS=void 0,T.appendedPTS=void 0,T.startDTS=void 0,T.endDTS=void 0,T.start=0,T.deltaPTS=void 0,T.maxStartPTS=void 0,T.minEndPTS=void 0,T.stats=new n.LoadStats,T.urlId=0,T.data=void 0,T.bitrateTest=!1,T.title=null,T.initSegment=null,T.type=R,T}var i=a.prototype;return i.createInitializationVector=function(S){for(var T=new Uint8Array(16),I=12;I<16;I++)T[I]=S>>8*(15-I)&255;return T},i.setDecryptDataFromLevelKey=function(S,T){var I=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(I=H.LevelKey.fromURI(S.uri),I.method=S.method,I.iv=this.createInitializationVector(T),I.keyFormat="identity"),I},i.setElementaryStreamInfo=function(S,T,I,O,E,y){y===void 0&&(y=!1);var p=this.elementaryStreams,h=p[S];if(!h){p[S]={startPTS:T,endPTS:I,startDTS:O,endDTS:E,partial:y};return}h.startPTS=Math.min(h.startPTS,T),h.endPTS=Math.max(h.endPTS,I),h.startDTS=Math.min(h.startDTS,O),h.endDTS=Math.max(h.endDTS,E)},i.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[d.AUDIO]=null,S[d.VIDEO]=null,S[d.AUDIOVIDEO]=null},f(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&K.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var S=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),a}(u),o=function(l){D(a,l);function a(i,R,S,T,I){var O;O=l.call(this,S)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new n.LoadStats,O.duration=i.decimalFloatingPoint("DURATION"),O.gap=i.bool("GAP"),O.independent=i.bool("INDEPENDENT"),O.relurl=i.enumeratedString("URI"),O.fragment=R,O.index=T;var E=i.enumeratedString("BYTERANGE");return E&&O.setByteRange(E,I),I&&(O.fragOffset=I.fragOffset+I.duration),O}return f(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var R=this.elementaryStreams;return!!(R.audio||R.video||R.audiovideo)}}]),a}(u)},"./src/loader/key-loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return K});var V=N("./src/events.ts"),W=N("./src/errors.ts"),M=N("./src/utils/logger.ts"),K=function(){function H(D){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=D,this._registerListeners()}var n=H.prototype;return n._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var b in this.loaders){var m=this.loaders[b];m&&m.destroy()}this.loaders={}},n.onKeyLoading=function(b,m){var f=m.frag,d=f.type,u=this.loaders[d];if(!f.decryptdata){M.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var c=f.decryptdata.uri;if(c!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(u&&(M.logger.warn("abort previous key loader for type:"+d),u.abort()),!c){M.logger.warn("key uri is falsy");return}var l=o.loader,a=f.loader=this.loaders[d]=new l(o);this.decrypturl=c,this.decryptkey=null;var i={url:c,frag:f,responseType:"arraybuffer"},R={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(i,R,S)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:f}))},n.loadsuccess=function(b,m,f){var d=f.frag;if(!d.decryptdata){M.logger.error("after key load, decryptdata unset");return}this.decryptkey=d.decryptdata.key=new Uint8Array(b.data),d.loader=null,delete this.loaders[d.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:d})},n.loaderror=function(b,m){var f=m.frag,d=f.loader;d&&d.abort(),delete this.loaders[f.type],this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:b})},n.loadtimeout=function(b,m){var f=m.frag,d=f.loader;d&&d.abort(),delete this.loaders[f.type],this.hls.trigger(V.Events.ERROR,{type:W.ErrorTypes.NETWORK_ERROR,details:W.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},H}()},"./src/loader/level-details.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"LevelDetails",function(){return H});var V=N("./src/polyfills/number.ts");function W(n,D){for(var b=0;b<D.length;b++){var m=D[b];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function M(n,D,b){return D&&W(n.prototype,D),b&&W(n,b),n}var K=10,H=function(){function n(b){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=b}var D=n.prototype;return D.reloaded=function(m){if(!m){this.advanced=!0,this.updated=!0;return}var f=this.lastPartSn-m.lastPartSn,d=this.lastPartIndex-m.lastPartIndex;this.updated=this.endSN!==m.endSN||!!d||!!f,this.advanced=this.endSN>m.endSN||f>0||f===0&&d>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},M(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||K}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var f=this.driftEnd-this.driftStart;return f*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.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 m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"LevelKey",function(){return H});var V=N("./node_modules/url-toolkit/src/url-toolkit.js"),W=N.n(V);function M(n,D){for(var b=0;b<D.length;b++){var m=D[b];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function K(n,D,b){return D&&M(n.prototype,D),b&&M(n,b),n}var H=function(){n.fromURL=function(b,m){return new n(b,m)},n.fromURI=function(b){return new n(b)};function n(D,b){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,b?this._uri=Object(V.buildAbsoluteURL)(D,b,{alwaysNormalize:!0}):this._uri=D}return K(n,[{key:"uri",get:function(){return this._uri}}]),n}()},"./src/loader/load-stats.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"LoadStats",function(){return V});var V=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(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a});var V=N("./src/polyfills/number.ts"),W=N("./node_modules/url-toolkit/src/url-toolkit.js"),M=N.n(W),K=N("./src/loader/fragment.ts"),H=N("./src/loader/level-details.ts"),n=N("./src/loader/level-key.ts"),D=N("./src/utils/attr-list.ts"),b=N("./src/utils/logger.ts"),m=N("./src/utils/codecs.ts"),f=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,u=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("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function l(I){var O,E;return o.test((O=(E=W.parseURL(I))===null||E===void 0?void 0:E.path)!=null?O:"")}var a=function(){function I(){}return I.findGroup=function(E,y){for(var p=0;p<E.length;p++){var h=E[p];if(h.id===y)return h}},I.convertAVC1ToAVCOTI=function(E){var y=E.split(".");if(y.length>2){var p=y.shift()+".";return p+=parseInt(y.shift()).toString(16),p+=("000"+parseInt(y.shift()).toString(16)).substr(-4),p}return E},I.resolve=function(E,y){return W.buildAbsoluteURL(y,E,{alwaysNormalize:!0})},I.parseMasterPlaylist=function(E,y){var p=[],h={},A=!1;f.lastIndex=0;for(var _;(_=f.exec(E))!=null;)if(_[1]){var v=new D.AttrList(_[1]),P={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:I.resolve(_[2],y)},x=v.decimalResolution("RESOLUTION");x&&(P.width=x.width,P.height=x.height),i((v.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=I.convertAVC1ToAVCOTI(P.videoCodec)),p.push(P)}else if(_[3]){var C=new D.AttrList(_[3]);C["DATA-ID"]&&(A=!0,h[C["DATA-ID"]]=C)}return{levels:p,sessionData:A?h:null}},I.parseMasterPlaylistMedia=function(E,y,p,h){h===void 0&&(h=[]);var A,_=[],v=0;for(d.lastIndex=0;(A=d.exec(E))!==null;){var P=new D.AttrList(A[1]);if(P.TYPE===p){var x={attrs:P,bitrate:0,id:v++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:p,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?I.resolve(P.URI,y):""};if(h.length){var C=I.findGroup(h,x.groupId)||h[0];R(x,C,"audioCodec"),R(x,C,"textCodec")}_.push(x)}}return _},I.parseLevelPlaylist=function(E,y,p,h,A){var _=new H.LevelDetails(y),v=_.fragments,P=null,x=0,C=0,j=0,B=0,w=null,Y=new K.Fragment(h,y),$,oe,de,Be=-1,Ae=!1;for(u.lastIndex=0,_.m3u8=E;($=u.exec(E))!==null;){Ae&&(Ae=!1,Y=new K.Fragment(h,y),Y.start=j,Y.sn=x,Y.cc=B,Y.level=p,P&&(Y.initSegment=P,Y.rawProgramDateTime=P.rawProgramDateTime));var Re=$[1];if(Re){Y.duration=parseFloat(Re);var Le=(" "+$[2]).slice(1);Y.title=Le||null,Y.tagList.push(Le?["INF",Re,Le]:["INF",Re])}else if($[3])Object(V.isFiniteNumber)(Y.duration)&&(Y.start=j,de&&(Y.levelkey=de),Y.sn=x,Y.level=p,Y.cc=B,Y.urlId=A,v.push(Y),Y.relurl=(" "+$[3]).slice(1),T(Y,w),w=Y,j+=Y.duration,x++,C=0,Ae=!0);else if($[4]){var Fe=(" "+$[4]).slice(1);w?Y.setByteRange(Fe,w):Y.setByteRange(Fe)}else if($[5])Y.rawProgramDateTime=(" "+$[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Be===-1&&(Be=v.length);else{if($=$[0].match(c),!$){b.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<$.length&&!(typeof $[oe]!="undefined");oe++);var me=(" "+$[oe]).slice(1),fe=(" "+$[oe+1]).slice(1),ne=$[oe+2]?(" "+$[oe+2]).slice(1):"";switch(me){case"PLAYLIST-TYPE":_.type=fe.toUpperCase();break;case"MEDIA-SEQUENCE":x=_.startSN=parseInt(fe);break;case"SKIP":{var xe=new D.AttrList(fe),ce=xe.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(ce)){_.skippedSegments=ce;for(var Ne=ce;Ne--;)v.unshift(null);x+=ce}var He=xe.enumeratedString("RECENTLY-REMOVED-DATERANGES");He&&(_.recentlyRemovedDateranges=He.split(" "));break}case"TARGETDURATION":_.targetduration=parseFloat(fe);break;case"VERSION":_.version=parseInt(fe);break;case"EXTM3U":break;case"ENDLIST":_.live=!1;break;case"#":(fe||ne)&&Y.tagList.push(ne?[fe,ne]:[fe]);break;case"DIS":B++;case"GAP":Y.tagList.push([me]);break;case"BITRATE":Y.tagList.push([me,fe]);break;case"DISCONTINUITY-SEQ":B=parseInt(fe);break;case"KEY":{var ke,Ye=new D.AttrList(fe),et=Ye.enumeratedString("METHOD"),ue=Ye.URI,_e=Ye.hexadecimalInteger("IV"),Oe=Ye.enumeratedString("KEYFORMATVERSIONS"),Me=Ye.enumeratedString("KEYID"),rt=(ke=Ye.enumeratedString("KEYFORMAT"))!=null?ke:"identity",dt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(dt.indexOf(rt)>-1){b.logger.warn("Keyformat "+rt+" is not supported from the manifest");continue}else if(rt!=="identity")continue;et&&(de=n.LevelKey.fromURL(y,ue),ue&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(et)>=0&&(de.method=et,de.keyFormat=rt,Me&&(de.keyID=Me),Oe&&(de.keyFormatVersions=Oe),de.iv=_e));break}case"START":{var pt=new D.AttrList(fe),ut=pt.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(ut)&&(_.startTimeOffset=ut);break}case"MAP":{var _t=new D.AttrList(fe);Y.relurl=_t.URI,_t.BYTERANGE&&Y.setByteRange(_t.BYTERANGE),Y.level=p,Y.sn="initSegment",de&&(Y.levelkey=de),Y.initSegment=null,P=Y,Ae=!0;break}case"SERVER-CONTROL":{var Tt=new D.AttrList(fe);_.canBlockReload=Tt.bool("CAN-BLOCK-RELOAD"),_.canSkipUntil=Tt.optionalFloat("CAN-SKIP-UNTIL",0),_.canSkipDateRanges=_.canSkipUntil>0&&Tt.bool("CAN-SKIP-DATERANGES"),_.partHoldBack=Tt.optionalFloat("PART-HOLD-BACK",0),_.holdBack=Tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new D.AttrList(fe);_.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=_.partList;Ce||(Ce=_.partList=[]);var tt=C>0?Ce[Ce.length-1]:void 0,lt=C++,Ke=new K.Part(new D.AttrList(fe),Y,y,lt,tt);Ce.push(Ke),Y.duration+=Ke.duration;break}case"PRELOAD-HINT":{var Xe=new D.AttrList(fe);_.preloadHint=Xe;break}case"RENDITION-REPORT":{var Se=new D.AttrList(fe);_.renditionReports=_.renditionReports||[],_.renditionReports.push(Se);break}default:b.logger.warn("line parsed but not handled: "+$);break}}}w&&!w.relurl?(v.pop(),j-=w.duration,_.partList&&(_.fragmentHint=w)):_.partList&&(T(Y,w),Y.cc=B,_.fragmentHint=Y);var ge=v.length,Ee=v[0],ie=v[ge-1];if(j+=_.skippedSegments*_.targetduration,j>0&&ge&&ie){_.averagetargetduration=j/ge;var ae=ie.sn;_.endSN=ae!=="initSegment"?ae:0,Ee&&(_.startCC=Ee.cc,Ee.initSegment||_.fragments.every(function(he){return he.relurl&&l(he.relurl)})&&(b.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new K.Fragment(h,y),Y.relurl=ie.relurl,Y.level=p,Y.sn="initSegment",Ee.initSegment=Y,_.needSidxRanges=!0))}else _.endSN=0,_.startCC=0;return _.fragmentHint&&(j+=_.fragmentHint.duration),_.totalduration=j,_.endCC=B,Be>0&&S(v,Be),_},I}();function i(I,O){["video","audio","text"].forEach(function(E){var y=I.filter(function(h){return Object(m.isCodecType)(h,E)});if(y.length){var p=y.filter(function(h){return h.lastIndexOf("avc1",0)===0||h.lastIndexOf("mp4a",0)===0});O[E+"Codec"]=p.length>0?p[0]:y[0],I=I.filter(function(h){return y.indexOf(h)===-1})}}),O.unknownCodecs=I}function R(I,O,E){var y=O[E];y&&(I[E]=y)}function S(I,O){for(var E=I[O],y=O;y--;){var p=I[y];if(!p)return;p.programDateTime=E.programDateTime-p.duration*1e3,E=p}}function T(I,O){I.rawProgramDateTime?I.programDateTime=Date.parse(I.rawProgramDateTime):O!=null&&O.programDateTime&&(I.programDateTime=O.endProgramDateTime),Object(V.isFiniteNumber)(I.programDateTime)||(I.programDateTime=null,I.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/polyfills/number.ts"),W=N("./src/events.ts"),M=N("./src/errors.ts"),K=N("./src/utils/logger.ts"),H=N("./src/utils/mp4-tools.ts"),n=N("./src/loader/m3u8-parser.ts"),D=N("./src/types/loader.ts"),b=N("./src/utils/attr-list.ts");function m(u){var c=u.type;switch(c){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function f(u,c){var o=u.url;return(o===void 0||o.indexOf("data:")===0)&&(o=c.url),o}var d=function(){function u(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var c=u.prototype;return c.registerListeners=function(){var l=this.hls;l.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(W.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.unregisterListeners=function(){var l=this.hls;l.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(W.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(W.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(W.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.createInternalLoader=function(l){var a=this.hls.config,i=a.pLoader,R=a.loader,S=i||R,T=new S(a);return l.loader=T,this.loaders[l.type]=T,T},c.getInternalLoader=function(l){return this.loaders[l.type]},c.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},c.destroyInternalLoaders=function(){for(var l in this.loaders){var a=this.loaders[l];a&&a.destroy(),this.resetInternalLoader(l)}},c.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},c.onManifestLoading=function(l,a){var i=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},c.onLevelLoading=function(l,a){var i=a.id,R=a.level,S=a.url,T=a.deliveryDirectives;this.load({id:i,groupId:null,level:R,responseType:"text",type:D.PlaylistContextType.LEVEL,url:S,deliveryDirectives:T})},c.onAudioTrackLoading=function(l,a){var i=a.id,R=a.groupId,S=a.url,T=a.deliveryDirectives;this.load({id:i,groupId:R,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:T})},c.onSubtitleTrackLoading=function(l,a){var i=a.id,R=a.groupId,S=a.url,T=a.deliveryDirectives;this.load({id:i,groupId:R,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:T})},c.load=function(l){var a,i=this.hls.config,R=this.getInternalLoader(l);if(R){var S=R.context;if(S&&S.url===l.url){K.logger.trace("[playlist-loader]: playlist request ongoing");return}K.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),R.abort()}var T,I,O,E;switch(l.type){case D.PlaylistContextType.MANIFEST:T=i.manifestLoadingMaxRetry,I=i.manifestLoadingTimeOut,O=i.manifestLoadingRetryDelay,E=i.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:T=0,I=i.levelLoadingTimeOut;break;default:T=i.levelLoadingMaxRetry,I=i.levelLoadingTimeOut,O=i.levelLoadingRetryDelay,E=i.levelLoadingMaxRetryTimeout;break}if(R=this.createInternalLoader(l),(a=l.deliveryDirectives)!==null&&a!==void 0&&a.part){var y;if(l.type===D.PlaylistContextType.LEVEL&&l.level!==null?y=this.hls.levels[l.level].details:l.type===D.PlaylistContextType.AUDIO_TRACK&&l.id!==null?y=this.hls.audioTracks[l.id].details:l.type===D.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(y=this.hls.subtitleTracks[l.id].details),y){var p=y.partTarget,h=y.targetduration;p&&h&&(I=Math.min(Math.max(p*3,h*.8)*1e3,I))}}var A={timeout:I,maxRetry:T,retryDelay:O,maxRetryDelay:E,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};R.load(l,A,_)},c.loadsuccess=function(l,a,i,R){if(R===void 0&&(R=null),i.isSidxRequest){this.handleSidxRequest(l,i),this.handlePlaylistLoaded(l,a,i,R);return}this.resetInternalLoader(i.type);var S=l.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,i,"no EXTM3U delimiter",R);return}a.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,a,i,R):this.handleMasterPlaylist(l,a,i,R)},c.loaderror=function(l,a,i){i===void 0&&(i=null),this.handleNetworkError(a,i,!1,l)},c.loadtimeout=function(l,a,i){i===void 0&&(i=null),this.handleNetworkError(a,i,!0)},c.handleMasterPlaylist=function(l,a,i,R){var S=this.hls,T=l.data,I=f(l,i),O=n.default.parseMasterPlaylist(T,I),E=O.levels,y=O.sessionData;if(!E.length){this.handleManifestParsingError(l,i,"no level found in manifest",R);return}var p=E.map(function(x){return{id:x.attrs.AUDIO,audioCodec:x.audioCodec}}),h=E.map(function(x){return{id:x.attrs.SUBTITLES,textCodec:x.textCodec}}),A=n.default.parseMasterPlaylistMedia(T,I,"AUDIO",p),_=n.default.parseMasterPlaylistMedia(T,I,"SUBTITLES",h),v=n.default.parseMasterPlaylistMedia(T,I,"CLOSED-CAPTIONS");if(A.length){var P=A.some(function(x){return!x.url});!P&&E[0].audioCodec&&!E[0].attrs.AUDIO&&(K.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),A.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new b.AttrList({}),bitrate:0,url:""}))}S.trigger(W.Events.MANIFEST_LOADED,{levels:E,audioTracks:A,subtitles:_,captions:v,url:I,stats:a,networkDetails:R,sessionData:y})},c.handleTrackOrLevelPlaylist=function(l,a,i,R){var S=this.hls,T=i.id,I=i.level,O=i.type,E=f(l,i),y=Object(V.isFiniteNumber)(T)?T:0,p=Object(V.isFiniteNumber)(I)?I:y,h=m(i),A=n.default.parseLevelPlaylist(l.data,E,p,h,y);if(!A.fragments.length){S.trigger(W.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:E,reason:"no fragments found in level",level:typeof i.level=="number"?i.level:void 0});return}if(O===D.PlaylistContextType.MANIFEST){var _={attrs:new b.AttrList({}),bitrate:0,details:A,name:"",url:E};S.trigger(W.Events.MANIFEST_LOADED,{levels:[_],audioTracks:[],url:E,stats:a,networkDetails:R,sessionData:null})}if(a.parsing.end=performance.now(),A.needSidxRanges){var v,P=(v=A.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:P,isSidxRequest:!0,type:O,level:I,levelDetails:A,id:T,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}i.levelDetails=A,this.handlePlaylistLoaded(l,a,i,R)},c.handleSidxRequest=function(l,a){var i=Object(H.parseSegmentIndex)(new Uint8Array(l.data));if(!i)return;var R=i.references,S=a.levelDetails;R.forEach(function(T,I){var O=T.info,E=S.fragments[I];E.byteRange.length===0&&E.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),E.initSegment&&E.initSegment.setByteRange(String(i.moovEndOffset)+"@0")})},c.handleManifestParsingError=function(l,a,i,R){this.hls.trigger(W.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===D.PlaylistContextType.MANIFEST,url:l.url,reason:i,response:l,context:a,networkDetails:R})},c.handleNetworkError=function(l,a,i,R){i===void 0&&(i=!1),K.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var S=M.ErrorDetails.UNKNOWN,T=!1,I=this.getInternalLoader(l);switch(l.type){case D.PlaylistContextType.MANIFEST:S=i?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,T=!0;break;case D.PlaylistContextType.LEVEL:S=i?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,T=!1;break;case D.PlaylistContextType.AUDIO_TRACK:S=i?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,T=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:S=i?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,T=!1;break}I&&this.resetInternalLoader(l.type);var O={type:M.ErrorTypes.NETWORK_ERROR,details:S,fatal:T,url:l.url,loader:I,context:l,networkDetails:a};R&&(O.response=R),this.hls.trigger(W.Events.ERROR,O)},c.handlePlaylistLoaded=function(l,a,i,R){var S=i.type,T=i.level,I=i.id,O=i.groupId,E=i.loader,y=i.levelDetails,p=i.deliveryDirectives;if(!(y!=null&&y.targetduration)){this.handleManifestParsingError(l,i,"invalid target duration",R);return}if(!E)return;y.live&&(E.getCacheAge&&(y.ageHeader=E.getCacheAge()||0),(!E.getCacheAge||isNaN(y.ageHeader))&&(y.ageHeader=0));switch(S){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(W.Events.LEVEL_LOADED,{details:y,level:T||0,id:I||0,stats:a,networkDetails:R,deliveryDirectives:p});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(W.Events.AUDIO_TRACK_LOADED,{details:y,id:I||0,groupId:O||"",stats:a,networkDetails:R,deliveryDirectives:p});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(W.Events.SUBTITLE_TRACK_LOADED,{details:y,id:I||0,groupId:O||"",stats:a,networkDetails:R,deliveryDirectives:p});break}},u}();z.default=d},"./src/polyfills/number.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isFiniteNumber",function(){return V}),N.d(z,"MAX_SAFE_INTEGER",function(){return W});var V=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},W=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,z,N){"use strict";N.r(z);var V=function(){function W(){}return W.getSilentFrame=function(K,H){switch(K){case"mp4a.40.2":if(H===1)return new Uint8Array([0,200,0,128,35,128]);if(H===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(H===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(H===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(H===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(H===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(H===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(H===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(H===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},W}();z.default=V},"./src/remux/mp4-generator.ts":function(Z,z,N){"use strict";N.r(z);var V=Math.pow(2,32)-1,W=function(){function M(){}return M.init=function(){M.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 H;for(H in M.types)M.types.hasOwnProperty(H)&&(M.types[H]=[H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2),H.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),D=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]);M.HDLR_TYPES={video:n,audio:D};var b=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);M.STTS=M.STSC=M.STCO=m,M.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),M.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),M.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),d=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);M.FTYP=M.box(M.types.ftyp,f,u,f,d),M.DINF=M.box(M.types.dinf,M.box(M.types.dref,b))},M.box=function(H){for(var n=8,D=arguments.length,b=new Array(D>1?D-1:0),m=1;m<D;m++)b[m-1]=arguments[m];for(var f=b.length,d=f;f--;)n+=b[f].byteLength;var u=new Uint8Array(n);for(u[0]=n>>24&255,u[1]=n>>16&255,u[2]=n>>8&255,u[3]=n&255,u.set(H,4),f=0,n=8;f<d;f++)u.set(b[f],n),n+=b[f].byteLength;return u},M.hdlr=function(H){return M.box(M.types.hdlr,M.HDLR_TYPES[H])},M.mdat=function(H){return M.box(M.types.mdat,H)},M.mdhd=function(H,n){n*=H;var D=Math.floor(n/(V+1)),b=Math.floor(n%(V+1));return M.box(M.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,H>>24&255,H>>16&255,H>>8&255,H&255,D>>24,D>>16&255,D>>8&255,D&255,b>>24,b>>16&255,b>>8&255,b&255,85,196,0,0]))},M.mdia=function(H){return M.box(M.types.mdia,M.mdhd(H.timescale,H.duration),M.hdlr(H.type),M.minf(H))},M.mfhd=function(H){return M.box(M.types.mfhd,new Uint8Array([0,0,0,0,H>>24,H>>16&255,H>>8&255,H&255]))},M.minf=function(H){return H.type==="audio"?M.box(M.types.minf,M.box(M.types.smhd,M.SMHD),M.DINF,M.stbl(H)):M.box(M.types.minf,M.box(M.types.vmhd,M.VMHD),M.DINF,M.stbl(H))},M.moof=function(H,n,D){return M.box(M.types.moof,M.mfhd(H),M.traf(D,n))},M.moov=function(H){for(var n=H.length,D=[];n--;)D[n]=M.trak(H[n]);return M.box.apply(null,[M.types.moov,M.mvhd(H[0].timescale,H[0].duration)].concat(D).concat(M.mvex(H)))},M.mvex=function(H){for(var n=H.length,D=[];n--;)D[n]=M.trex(H[n]);return M.box.apply(null,[M.types.mvex].concat(D))},M.mvhd=function(H,n){n*=H;var D=Math.floor(n/(V+1)),b=Math.floor(n%(V+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,H>>24&255,H>>16&255,H>>8&255,H&255,D>>24,D>>16&255,D>>8&255,D&255,b>>24,b>>16&255,b>>8&255,b&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 M.box(M.types.mvhd,m)},M.sdtp=function(H){var n=H.samples||[],D=new Uint8Array(4+n.length),b,m;for(b=0;b<n.length;b++)m=n[b].flags,D[b+4]=m.dependsOn<<4|m.isDependedOn<<2|m.hasRedundancy;return M.box(M.types.sdtp,D)},M.stbl=function(H){return M.box(M.types.stbl,M.stsd(H),M.box(M.types.stts,M.STTS),M.box(M.types.stsc,M.STSC),M.box(M.types.stsz,M.STSZ),M.box(M.types.stco,M.STCO))},M.avc1=function(H){var n=[],D=[],b,m,f;for(b=0;b<H.sps.length;b++)m=H.sps[b],f=m.byteLength,n.push(f>>>8&255),n.push(f&255),n=n.concat(Array.prototype.slice.call(m));for(b=0;b<H.pps.length;b++)m=H.pps[b],f=m.byteLength,D.push(f>>>8&255),D.push(f&255),D=D.concat(Array.prototype.slice.call(m));var d=M.box(M.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|H.sps.length].concat(n).concat([H.pps.length]).concat(D))),u=H.width,c=H.height,o=H.pixelRatio[0],l=H.pixelRatio[1];return M.box(M.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,u>>8&255,u&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]),d,M.box(M.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),M.box(M.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,l>>24,l>>16&255,l>>8&255,l&255])))},M.esds=function(H){var n=H.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(H.config).concat([6,1,2]))},M.mp4a=function(H){var n=H.samplerate;return M.box(M.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,H.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),M.box(M.types.esds,M.esds(H)))},M.mp3=function(H){var n=H.samplerate;return M.box(M.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,H.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},M.stsd=function(H){return H.type==="audio"?!H.isAAC&&H.codec==="mp3"?M.box(M.types.stsd,M.STSD,M.mp3(H)):M.box(M.types.stsd,M.STSD,M.mp4a(H)):M.box(M.types.stsd,M.STSD,M.avc1(H))},M.tkhd=function(H){var n=H.id,D=H.duration*H.timescale,b=H.width,m=H.height,f=Math.floor(D/(V+1)),d=Math.floor(D%(V+1));return M.box(M.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,d>>24,d>>16&255,d>>8&255,d&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,b>>8&255,b&255,0,0,m>>8&255,m&255,0,0]))},M.traf=function(H,n){var D=M.sdtp(H),b=H.id,m=Math.floor(n/(V+1)),f=Math.floor(n%(V+1));return M.box(M.types.traf,M.box(M.types.tfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255])),M.box(M.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,f>>24,f>>16&255,f>>8&255,f&255])),M.trun(H,D.length+16+20+8+16+8+8),D)},M.trak=function(H){return H.duration=H.duration||4294967295,M.box(M.types.trak,M.tkhd(H),M.mdia(H))},M.trex=function(H){var n=H.id;return M.box(M.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},M.trun=function(H,n){var D=H.samples||[],b=D.length,m=12+16*b,f=new Uint8Array(m),d,u,c,o,l,a;for(n+=8+m,f.set([0,0,15,1,b>>>24&255,b>>>16&255,b>>>8&255,b&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),d=0;d<b;d++)u=D[d],c=u.duration,o=u.size,l=u.flags,a=u.cts,f.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*d);return M.box(M.types.trun,f)},M.initSegment=function(H){M.types||M.init();var n=M.moov(H),D=new Uint8Array(M.FTYP.byteLength+n.byteLength);return D.set(M.FTYP),D.set(n,M.FTYP.byteLength),D},M}();W.types=void 0,W.HDLR_TYPES=void 0,W.STTS=void 0,W.STSC=void 0,W.STCO=void 0,W.STSZ=void 0,W.VMHD=void 0,W.SMHD=void 0,W.STSD=void 0,W.FTYP=void 0,W.DINF=void 0,z.default=W},"./src/remux/mp4-remuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return a}),N.d(z,"normalizePts",function(){return i});var V=N("./src/polyfills/number.ts"),W=N("./src/remux/aac-helper.ts"),M=N("./src/remux/mp4-generator.ts"),K=N("./src/events.ts"),H=N("./src/errors.ts"),n=N("./src/utils/logger.ts"),D=N("./src/types/loader.ts"),b=N("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(I){for(var O=1;O<arguments.length;O++){var E=arguments[O];for(var y in E)Object.prototype.hasOwnProperty.call(E,y)&&(I[y]=E[y])}return I},m.apply(this,arguments)}var f=10*1e3,d=1024,u=1152,c=null,o=null,l=!1,a=function(){function I(E,y,p,h){if(h===void 0&&(h=""),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=E,this.config=y,this.typeSupported=p,this.ISGenerated=!1,c===null){var A=navigator.userAgent||"",_=A.match(/Chrome\/(\d+)/i);c=_?parseInt(_[1]):0}if(o===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);o=v?parseInt(v[1]):0}l=!!c&&c<75||!!o&&o<600}var O=I.prototype;return O.destroy=function(){},O.resetTimeStamp=function(y){n.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=y},O.resetNextTimestamp=function(){n.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){n.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(y){var p=!1,h=y.reduce(function(A,_){var v=_.pts-A;return v<-4294967296?(p=!0,i(A,_.pts)):v>0?A:_.pts},y[0].pts);return p&&n.logger.debug("PTS rollover detected"),h},O.remux=function(y,p,h,A,_,v,P,x){var C,j,B,w,Y,$,oe=_,de=_,Be=y.pid>-1,Ae=p.pid>-1,Re=p.samples.length,Le=y.samples.length>0,Fe=Re>1,me=(!Be||Le)&&(!Ae||Fe)||this.ISGenerated||P;if(me){this.ISGenerated||(B=this.generateIS(y,p,_));var fe=this.isVideoContiguous,ne=-1;if(Fe&&(ne=R(p.samples),!fe&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,ne>0){n.logger.warn("[mp4-remuxer]: Dropped "+ne+" out of "+Re+" video samples due to a missing keyframe");var xe=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(ne),p.dropped+=ne,de+=(p.samples[0].pts-xe)/(p.timescale||9e4)}else ne===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+Re+" video samples"),$=!1);if(this.ISGenerated){if(Le&&Fe){var ce=this.getVideoStartPts(p.samples),Ne=i(y.samples[0].pts,ce)-ce,He=Ne/p.inputTimeScale;oe+=Math.max(0,He),de+=Math.max(0,-He)}if(Le){if(y.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(y,p,_)),j=this.remuxAudio(y,oe,this.isAudioContiguous,v,Ae||Fe||x===D.PlaylistLevelType.AUDIO?de:void 0),Fe){var ke=j?j.endPTS-j.startPTS:0;p.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(y,p,_)),C=this.remuxVideo(p,de,fe,ke)}}else Fe&&(C=this.remuxVideo(p,de,fe,0));C&&(C.firstKeyFrame=ne,C.independent=ne!==-1)}}return this.ISGenerated&&(h.samples.length&&(Y=this.remuxID3(h,_)),A.samples.length&&(w=this.remuxText(A,_))),{audio:j,video:C,initSegment:B,independent:$,text:w,id3:Y}},O.generateIS=function(y,p,h){var A=y.samples,_=p.samples,v=this.typeSupported,P={},x=!Object(V.isFiniteNumber)(this._initPTS),C="audio/mp4",j,B,w;if(x&&(j=B=Infinity),y.config&&A.length&&(y.timescale=y.samplerate,y.isAAC||(v.mpeg?(C="audio/mpeg",y.codec=""):v.mp3&&(y.codec="mp3")),P.audio={id:"audio",container:C,codec:y.codec,initSegment:!y.isAAC&&v.mpeg?new Uint8Array(0):M.default.initSegment([y]),metadata:{channelCount:y.channelCount}},x&&(w=y.inputTimeScale,j=B=A[0].pts-Math.round(w*h))),p.sps&&p.pps&&_.length&&(p.timescale=p.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:M.default.initSegment([p]),metadata:{width:p.width,height:p.height}},x)){w=p.inputTimeScale;var Y=this.getVideoStartPts(_),$=Math.round(w*h);B=Math.min(B,i(_[0].dts,Y)-$),j=Math.min(j,Y-$)}if(Object.keys(P).length)return this.ISGenerated=!0,x&&(this._initPTS=j,this._initDTS=B),{tracks:P,initPTS:j,timescale:w}},O.remuxVideo=function(y,p,h,A){var _=y.inputTimeScale,v=y.samples,P=[],x=v.length,C=this._initPTS,j=this.nextAvcDts,B=8,w,Y,$,oe=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Be=0,Ae=!1;if(!h||j===null){var Re=p*_,Le=v[0].pts-i(v[0].dts,v[0].pts);j=Re-Le}for(var Fe=0;Fe<x;Fe++){var me=v[Fe];if(me.pts=i(me.pts-C,j),me.dts=i(me.dts-C,j),me.dts>me.pts){var fe=9e4*.2;Be=Math.max(Math.min(Be,me.pts-me.dts),-1*fe)}me.dts<v[Fe>0?Fe-1:Fe].dts&&(Ae=!0)}Ae&&v.sort(function(vt,qe){var Qe=vt.dts-qe.dts,Ue=vt.pts-qe.pts;return Qe||Ue}),Y=v[0].dts,$=v[v.length-1].dts;var ne=Math.round(($-Y)/(x-1));if(Be<0){if(Be<ne*-2){n.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(b.toMsFromMpegTsClock)(-ne,!0)+" ms");for(var xe=Be,ce=0;ce<x;ce++)v[ce].dts=xe=Math.max(xe,v[ce].pts-ne),v[ce].pts=Math.max(xe,v[ce].pts)}else{n.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(b.toMsFromMpegTsClock)(Be,!0)+" ms to overcome this issue");for(var Ne=0;Ne<x;Ne++)v[Ne].dts=v[Ne].dts+Be}Y=v[0].dts}if(h){var He=Y-j,ke=He>ne,Ye=He<-1;if(ke||Ye){ke?n.logger.warn("AVC: "+Object(b.toMsFromMpegTsClock)(He,!0)+" ms ("+He+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(b.toMsFromMpegTsClock)(-He,!0)+" ms ("+He+"dts) overlapping between fragments detected"),Y=j;var et=v[0].pts-He;v[0].dts=Y,v[0].pts=et,n.logger.log("Video: First PTS/DTS adjusted: "+Object(b.toMsFromMpegTsClock)(et,!0)+"/"+Object(b.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(b.toMsFromMpegTsClock)(He,!0)+" ms")}}l&&(Y=Math.max(0,Y));for(var ue=0,_e=0,Oe=0;Oe<x;Oe++){for(var Me=v[Oe],rt=Me.units,dt=rt.length,pt=0,ut=0;ut<dt;ut++)pt+=rt[ut].data.length;_e+=pt,ue+=dt,Me.length=pt,Me.dts=Math.max(Me.dts,Y),Me.pts=Math.max(Me.pts,Me.dts,0),oe=Math.min(Me.pts,oe),de=Math.max(Me.pts,de)}$=v[x-1].dts;var _t=_e+4*ue+8,Tt;try{Tt=new Uint8Array(_t)}catch(vt){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:H.ErrorTypes.MUX_ERROR,details:H.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:_t,reason:"fail allocating video mdat "+_t});return}var Pe=new DataView(Tt.buffer);Pe.setUint32(0,_t),Tt.set(M.default.types.mdat,4);for(var Ce=0;Ce<x;Ce++){for(var tt=v[Ce],lt=tt.units,Ke=0,Xe=0,Se=lt.length;Xe<Se;Xe++){var ge=lt[Xe],Ee=ge.data,ie=ge.data.byteLength;Pe.setUint32(B,ie),B+=4,Tt.set(Ee,B),B+=ie,Ke+=4+ie}if(Ce<x-1)w=v[Ce+1].dts-tt.dts;else{var ae=this.config,he=tt.dts-v[Ce>0?Ce-1:Ce].dts;if(ae.stretchShortVideoTrack&&this.nextAudioPts!==null){var ve=Math.floor(ae.maxBufferHole*_),Te=(A?oe+A*_:this.nextAudioPts)-tt.pts;Te>ve?(w=Te-he,w<0&&(w=he),n.logger.log("[mp4-remuxer]: It is approximately "+Te/90+" ms to the next segment; using duration "+w/90+" ms for the last video frame.")):w=he}else w=he}var Ge=Math.round(tt.pts-tt.dts);P.push(new S(tt.key,w,Ke,Ge))}if(P.length&&c&&c<70){var ot=P[0].flags;ot.dependsOn=2,ot.isNonSync=0}console.assert(w!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=$+w,this.isVideoContiguous=!0;var xt=M.default.moof(y.sequenceNumber++,Y,m({},y,{samples:P})),Ot="video",wt={data1:xt,data2:Tt,startPTS:oe/_,endPTS:(de+w)/_,startDTS:Y/_,endDTS:j/_,type:Ot,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:y.dropped};return y.samples=[],y.dropped=0,console.assert(Tt.length,"MDAT length must not be zero"),wt},O.remuxAudio=function(y,p,h,A,_){var v=y.inputTimeScale,P=y.samplerate?y.samplerate:v,x=v/P,C=y.isAAC?d:u,j=C*x,B=this._initPTS,w=!y.isAAC&&this.typeSupported.mpeg,Y=[],$=y.samples,oe=w?0:8,de=this.nextAudioPts||-1,Be=p*v;if(this.isAudioContiguous=h=h||$.length&&de>0&&(A&&Math.abs(Be-de)<9e3||Math.abs(i($[0].pts-B,Be)-de)<20*j),$.forEach(function(Ee){Ee.pts=i(Ee.pts-B,Be)}),!h||de<0){if($=$.filter(function(Ee){return Ee.pts>=0}),!$.length)return;_===0?de=0:A?de=Math.max(0,Be):de=$[0].pts}if(y.isAAC)for(var Ae=_!==void 0,Re=this.config.maxAudioFramesDrift,Le=0,Fe=de;Le<$.length;Le++){var me=$[Le],fe=me.pts,ne=fe-Fe,xe=Math.abs(1e3*ne/v);if(ne<=-Re*j&&Ae)Le===0&&(n.logger.warn("Audio frame @ "+(fe/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ne/v)+" ms."),this.nextAudioPts=de=Fe=fe);else if(ne>=Re*j&&xe<f&&Ae){var ce=Math.round(ne/j);Fe=fe-ce*j,Fe<0&&(ce--,Fe+=j),Le===0&&(this.nextAudioPts=de=Fe),n.logger.warn("[mp4-remuxer]: Injecting "+ce+" audio frame @ "+(Fe/v).toFixed(3)+"s due to "+Math.round(1e3*ne/v)+" ms gap.");for(var Ne=0;Ne<ce;Ne++){var He=Math.max(Fe,0),ke=W.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);ke||(n.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ke=me.unit.subarray()),$.splice(Le,0,{unit:ke,pts:He}),Fe+=j,Le++}}me.pts=Fe,Fe+=j}for(var Ye=null,et=null,ue,_e=0,Oe=$.length;Oe--;)_e+=$[Oe].unit.byteLength;for(var Me=0,rt=$.length;Me<rt;Me++){var dt=$[Me],pt=dt.unit,ut=dt.pts;if(et!==null){var _t=Y[Me-1];_t.duration=Math.round((ut-et)/x)}else if(h&&y.isAAC&&(ut=de),Ye=ut,_e>0){_e+=oe;try{ue=new Uint8Array(_e)}catch(Ee){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:H.ErrorTypes.MUX_ERROR,details:H.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:_e,reason:"fail allocating audio mdat "+_e});return}if(!w){var Tt=new DataView(ue.buffer);Tt.setUint32(0,_e),ue.set(M.default.types.mdat,4)}}else return;ue.set(pt,oe);var Pe=pt.byteLength;oe+=Pe,Y.push(new S(!0,C,Pe,0)),et=ut}var Ce=Y.length;if(!Ce)return;var tt=Y[Y.length-1];this.nextAudioPts=de=et+x*tt.duration;var lt=w?new Uint8Array(0):M.default.moof(y.sequenceNumber++,Ye/x,m({},y,{samples:Y}));y.samples=[];var Ke=Ye/v,Xe=de/v,Se="audio",ge={data1:lt,data2:ue,startPTS:Ke,endPTS:Xe,startDTS:Ke,endDTS:Xe,type:Se,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(ue.length,"MDAT length must not be zero"),ge},O.remuxEmptyAudio=function(y,p,h,A){var _=y.inputTimeScale,v=y.samplerate?y.samplerate:_,P=_/v,x=this.nextAudioPts,C=(x!==null?x:A.startDTS*_)+this._initDTS,j=A.endDTS*_+this._initDTS,B=P*d,w=Math.ceil((j-C)/B),Y=W.default.getSilentFrame(y.manifestCodec||y.codec,y.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],oe=0;oe<w;oe++){var de=C+oe*B;$.push({unit:Y,pts:de,dts:de})}return y.samples=$,this.remuxAudio(y,p,h,!1)},O.remuxID3=function(y,p){var h=y.samples.length;if(!h)return;for(var A=y.inputTimeScale,_=this._initPTS,v=this._initDTS,P=0;P<h;P++){var x=y.samples[P];x.pts=i(x.pts-_,p*A)/A,x.dts=i(x.dts-v,p*A)/A}var C=y.samples;return y.samples=[],{samples:C}},O.remuxText=function(y,p){var h=y.samples.length;if(!h)return;for(var A=y.inputTimeScale,_=this._initPTS,v=0;v<h;v++){var P=y.samples[v];P.pts=i(P.pts-_,p*A)/A}y.samples.sort(function(C,j){return C.pts-j.pts});var x=y.samples;return y.samples=[],{samples:x}},I}();function i(I,O){var E;if(O===null)return I;for(O<I?E=-8589934592:E=8589934592;Math.abs(I-O)>4294967296;)I+=E;return I}function R(I){for(var O=0;O<I.length;O++)if(I[O].key)return O;return-1}var S=function(O,E,y,p){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=E,this.size=y,this.cts=p,this.flags=new T(O)},T=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/polyfills/number.ts"),W=N("./src/utils/mp4-tools.ts"),M=N("./src/loader/fragment.ts"),K=N("./src/utils/logger.ts"),H=function(){function b(){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 m=b.prototype;return m.destroy=function(){},m.resetTimeStamp=function(d){this.initPTS=d,this.lastEndDTS=null},m.resetNextTimestamp=function(){this.lastEndDTS=null},m.resetInitSegment=function(d,u,c){this.audioCodec=u,this.videoCodec=c,this.generateInitSegment(d),this.emitInitSegment=!0},m.generateInitSegment=function(d){var u=this.audioCodec,c=this.videoCodec;if(!d||!d.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(W.parseInitSegment)(d);u||(u=D(o.audio,M.ElementaryStreamTypes.AUDIO)),c||(c=D(o.video,M.ElementaryStreamTypes.VIDEO));var l={};o.audio&&o.video?l.audiovideo={container:"video/mp4",codec:u+","+c,initSegment:d,id:"main"}:o.audio?l.audio={container:"audio/mp4",codec:u,initSegment:d,id:"audio"}:o.video?l.video={container:"video/mp4",codec:c,initSegment:d,id:"main"}:K.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},m.remux=function(d,u,c,o,l){var a=this.initPTS,i=this.lastEndDTS,R={audio:void 0,video:void 0,text:o,id3:c,initSegment:void 0};Object(V.isFiniteNumber)(i)||(i=this.lastEndDTS=l||0);var S=u.samples;if(!S||!S.length)return R;var T={initPTS:void 0,timescale:1},I=this.initData;if((!I||!I.length)&&(this.generateInitSegment(S),I=this.initData),!I||!I.length)return K.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),R;this.emitInitSegment&&(T.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(a)||(this.initPTS=T.initPTS=a=n(I,S,i));var O=Object(W.getDuration)(S,I),E=i,y=O+E;Object(W.offsetStartDTS)(I,S,a),O>0?this.lastEndDTS=y:(K.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!I.audio,h=!!I.video,A="";p&&(A+="audio"),h&&(A+="video");var _={data1:S,startPTS:E,startDTS:E,endPTS:y,endDTS:y,type:A,hasAudio:p,hasVideo:h,nb:1,dropped:0};return R.audio=_.type==="audio"?_:void 0,R.video=_.type!=="audio"?_:void 0,R.text=o,R.id3=c,R.initSegment=T,R},b}(),n=function(m,f,d){return Object(W.getStartDTS)(m,f)-d};function D(b,m){var f=b==null?void 0:b.codec;return f&&f.length>4?f:f==="hvc1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||m===M.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}z.default=H},"./src/task-loop.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return V});var V=function(){function W(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=W.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(H){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,H),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},W}()},"./src/types/cmcd.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"CMCDVersion",function(){return V}),N.d(z,"CMCDObjectType",function(){return W}),N.d(z,"CMCDStreamingFormat",function(){return M}),N.d(z,"CMCDStreamType",function(){return K});var V=1,W;(function(H){H.MANIFEST="m",H.AUDIO="a",H.VIDEO="v",H.MUXED="av",H.INIT="i",H.CAPTION="c",H.TIMED_TEXT="tt",H.KEY="k",H.OTHER="o"})(W||(W={}));var M;(function(H){H.DASH="d",H.HLS="h",H.SMOOTH="s",H.OTHER="o"})(M||(M={}));var K;(function(H){H.VOD="v",H.LIVE="l"})(K||(K={}))},"./src/types/level.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"HlsSkip",function(){return M}),N.d(z,"getSkipValue",function(){return K}),N.d(z,"HlsUrlParameters",function(){return H}),N.d(z,"Level",function(){return n});function V(D,b){for(var m=0;m<b.length;m++){var f=b[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(D,f.key,f)}}function W(D,b,m){return b&&V(D.prototype,b),m&&V(D,m),D}var M;(function(D){D.No="",D.Yes="YES",D.v2="v2"})(M||(M={}));function K(D,b){var m=D.canSkipUntil,f=D.canSkipDateRanges,d=D.endSN,u=b!==void 0?b-d:0;return m&&u<m?f?M.v2:M.Yes:M.No}var H=function(){function D(m,f,d){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=m,this.part=f,this.skip=d}var b=D.prototype;return b.addDirectives=function(f){var d=new self.URL(f);return this.msn!==void 0&&d.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&d.searchParams.set("_HLS_part",this.part.toString()),this.skip&&d.searchParams.set("_HLS_skip",this.skip),d.toString()},D}(),n=function(){function D(b){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=[b.url],this.attrs=b.attrs,this.bitrate=b.bitrate,b.details&&(this.details=b.details),this.id=b.id||0,this.name=b.name,this.width=b.width||0,this.height=b.height||0,this.audioCodec=b.audioCodec,this.videoCodec=b.videoCodec,this.unknownCodecs=b.unknownCodecs,this.codecSet=[b.videoCodec,b.audioCodec].filter(function(m){return m}).join(",").replace(/\.[^.,]+/g,"")}return W(D,[{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(m){var f=m%this.url.length;this._urlId!==f&&(this.details=void 0,this._urlId=f)}}]),D}()},"./src/types/loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"PlaylistContextType",function(){return V}),N.d(z,"PlaylistLevelType",function(){return W});var V;(function(M){M.MANIFEST="manifest",M.LEVEL="level",M.AUDIO_TRACK="audioTrack",M.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var W;(function(M){M.MAIN="main",M.AUDIO="audio",M.SUBTITLE="subtitle"})(W||(W={}))},"./src/types/transmuxer.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"ChunkMetadata",function(){return V});var V=function(K,H,n,D,b,m){D===void 0&&(D=0),b===void 0&&(b=-1),m===void 0&&(m=!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=W(),this.buffering={audio:W(),video:W(),audiovideo:W()},this.level=K,this.sn=H,this.id=n,this.size=D,this.part=b,this.partial=m};function W(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"AttrList",function(){return M});var V=/^(\d+)x(\d+)$/,W=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,M=function(){function K(n){typeof n=="string"&&(n=K.parseAttrList(n));for(var D in n)n.hasOwnProperty(D)&&(this[D]=n[D])}var H=K.prototype;return H.decimalInteger=function(D){var b=parseInt(this[D],10);return b>Number.MAX_SAFE_INTEGER?Infinity:b},H.hexadecimalInteger=function(D){if(this[D]){var b=(this[D]||"0x").slice(2);b=(b.length&1?"0":"")+b;for(var m=new Uint8Array(b.length/2),f=0;f<b.length/2;f++)m[f]=parseInt(b.slice(f*2,f*2+2),16);return m}else return null},H.hexadecimalIntegerAsNumber=function(D){var b=parseInt(this[D],16);return b>Number.MAX_SAFE_INTEGER?Infinity:b},H.decimalFloatingPoint=function(D){return parseFloat(this[D])},H.optionalFloat=function(D,b){var m=this[D];return m?parseFloat(m):b},H.enumeratedString=function(D){return this[D]},H.bool=function(D){return this[D]==="YES"},H.decimalResolution=function(D){var b=V.exec(this[D]);return b===null?void 0:{width:parseInt(b[1],10),height:parseInt(b[2],10)}},K.parseAttrList=function(D){var b,m={},f='"';for(W.lastIndex=0;(b=W.exec(D))!==null;){var d=b[2];d.indexOf(f)===0&&d.lastIndexOf(f)===d.length-1&&(d=d.slice(1,-1)),m[b[1]]=d}return m},K}()},"./src/utils/binary-search.ts":function(Z,z,N){"use strict";N.r(z);var V={search:function(M,K){for(var H=0,n=M.length-1,D=null,b=null;H<=n;){D=(H+n)/2|0,b=M[D];var m=K(b);if(m>0)H=D+1;else if(m<0)n=D-1;else return b}return null}};z.default=V},"./src/utils/buffer-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"BufferHelper",function(){return M});var V=N("./src/utils/logger.ts"),W={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function K(){}return K.isBuffered=function(n,D){try{if(n){for(var b=K.getBuffered(n),m=0;m<b.length;m++)if(D>=b.start(m)&&D<=b.end(m))return!0}}catch(f){}return!1},K.bufferInfo=function(n,D,b){try{if(n){var m=K.getBuffered(n),f=[],d;for(d=0;d<m.length;d++)f.push({start:m.start(d),end:m.end(d)});return this.bufferedInfo(f,D,b)}}catch(u){}return{len:0,start:D,end:D,nextStart:void 0}},K.bufferedInfo=function(n,D,b){D=Math.max(0,D),n.sort(function(T,I){var O=T.start-I.start;return O||I.end-T.end});var m=[];if(b)for(var f=0;f<n.length;f++){var d=m.length;if(d){var u=m[d-1].end;n[f].start-u<b?n[f].end>u&&(m[d-1].end=n[f].end):m.push(n[f])}else m.push(n[f])}else m=n;for(var c=0,o,l=D,a=D,i=0;i<m.length;i++){var R=m[i].start,S=m[i].end;if(D+b>=R&&D<S)l=R,a=S,c=a-D;else if(D+b<R){o=R;break}}return{len:c,start:l||0,end:a||0,nextStart:o}},K.getBuffered=function(n){try{return n.buffered}catch(D){return V.logger.log("failed to get media.buffered",D),W}},K}()},"./src/utils/cea-608-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"Row",function(){return a}),N.d(z,"CaptionScreen",function(){return i});var V=N("./src/utils/logger.ts"),W={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},M=function(y){var p=y;return W.hasOwnProperty(y)&&(p=W[y]),String.fromCharCode(p)},K=15,H=100,n={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},D={17:2,18:4,21:6,22:8,23:10,19:13,20:15},b={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},f=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],d;(function(E){E[E.ERROR=0]="ERROR",E[E.TEXT=1]="TEXT",E[E.WARNING=2]="WARNING",E[E.INFO=2]="INFO",E[E.DEBUG=3]="DEBUG",E[E.DATA=3]="DATA"})(d||(d={}));var u=function(){function E(){this.time=null,this.verboseLevel=d.ERROR}var y=E.prototype;return y.log=function(h,A){this.verboseLevel>=h&&V.logger.log(this.time+" ["+h+"] "+A)},E}(),c=function(y){for(var p=[],h=0;h<y.length;h++)p.push(y[h].toString(16));return p},o=function(){function E(p,h,A,_,v){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=p||"white",this.underline=h||!1,this.italics=A||!1,this.background=_||"black",this.flash=v||!1}var y=E.prototype;return y.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},y.setStyles=function(h){for(var A=["foreground","underline","italics","background","flash"],_=0;_<A.length;_++){var v=A[_];h.hasOwnProperty(v)&&(this[v]=h[v])}},y.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},y.equals=function(h){return this.foreground===h.foreground&&this.underline===h.underline&&this.italics===h.italics&&this.background===h.background&&this.flash===h.flash},y.copy=function(h){this.foreground=h.foreground,this.underline=h.underline,this.italics=h.italics,this.background=h.background,this.flash=h.flash},y.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},E}(),l=function(){function E(p,h,A,_,v,P){this.uchar=void 0,this.penState=void 0,this.uchar=p||" ",this.penState=new o(h,A,_,v,P)}var y=E.prototype;return y.reset=function(){this.uchar=" ",this.penState.reset()},y.setChar=function(h,A){this.uchar=h,this.penState.copy(A)},y.setPenState=function(h){this.penState.copy(h)},y.equals=function(h){return this.uchar===h.uchar&&this.penState.equals(h.penState)},y.copy=function(h){this.uchar=h.uchar,this.penState.copy(h.penState)},y.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},E}(),a=function(){function E(p){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var h=0;h<H;h++)this.chars.push(new l);this.logger=p,this.pos=0,this.currPenState=new o}var y=E.prototype;return y.equals=function(h){for(var A=!0,_=0;_<H;_++)if(!this.chars[_].equals(h.chars[_])){A=!1;break}return A},y.copy=function(h){for(var A=0;A<H;A++)this.chars[A].copy(h.chars[A])},y.isEmpty=function(){for(var h=!0,A=0;A<H;A++)if(!this.chars[A].isEmpty()){h=!1;break}return h},y.setCursor=function(h){this.pos!==h&&(this.pos=h),this.pos<0?(this.logger.log(d.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>H&&(this.logger.log(d.DEBUG,"Too large cursor position "+this.pos),this.pos=H)},y.moveCursor=function(h){var A=this.pos+h;if(h>1)for(var _=this.pos+1;_<A+1;_++)this.chars[_].setPenState(this.currPenState);this.setCursor(A)},y.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},y.insertChar=function(h){h>=144&&this.backSpace();var A=M(h);if(this.pos>=H){this.logger.log(d.ERROR,"Cannot insert "+h.toString(16)+" ("+A+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(A,this.currPenState),this.moveCursor(1)},y.clearFromPos=function(h){var A;for(A=h;A<H;A++)this.chars[A].reset()},y.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},y.clearToEndOfRow=function(){this.clearFromPos(this.pos)},y.getTextString=function(){for(var h=[],A=!0,_=0;_<H;_++){var v=this.chars[_].uchar;v!==" "&&(A=!1),h.push(v)}return A?"":h.join("")},y.setPenStyles=function(h){this.currPenState.setStyles(h);var A=this.chars[this.pos];A.setPenState(this.currPenState)},E}(),i=function(){function E(p){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var h=0;h<K;h++)this.rows.push(new a(p));this.logger=p,this.currRow=K-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var y=E.prototype;return y.reset=function(){for(var h=0;h<K;h++)this.rows[h].clear();this.currRow=K-1},y.equals=function(h){for(var A=!0,_=0;_<K;_++)if(!this.rows[_].equals(h.rows[_])){A=!1;break}return A},y.copy=function(h){for(var A=0;A<K;A++)this.rows[A].copy(h.rows[A])},y.isEmpty=function(){for(var h=!0,A=0;A<K;A++)if(!this.rows[A].isEmpty()){h=!1;break}return h},y.backSpace=function(){var h=this.rows[this.currRow];h.backSpace()},y.clearToEndOfRow=function(){var h=this.rows[this.currRow];h.clearToEndOfRow()},y.insertChar=function(h){var A=this.rows[this.currRow];A.insertChar(h)},y.setPen=function(h){var A=this.rows[this.currRow];A.setPenStyles(h)},y.moveCursor=function(h){var A=this.rows[this.currRow];A.moveCursor(h)},y.setCursor=function(h){this.logger.log(d.INFO,"setCursor: "+h);var A=this.rows[this.currRow];A.setCursor(h)},y.setPAC=function(h){this.logger.log(d.INFO,"pacData = "+JSON.stringify(h));var A=h.row-1;if(this.nrRollUpRows&&A<this.nrRollUpRows-1&&(A=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==A){for(var _=0;_<K;_++)this.rows[_].clear();var v=this.currRow+1-this.nrRollUpRows,P=this.lastOutputScreen;if(P){var x=P.rows[v].cueStartTime,C=this.logger.time;if(x&&C!==null&&x<C)for(var j=0;j<this.nrRollUpRows;j++)this.rows[A-this.nrRollUpRows+j+1].copy(P.rows[v+j])}}this.currRow=A;var B=this.rows[this.currRow];if(h.indent!==null){var w=h.indent,Y=Math.max(w-1,0);B.setCursor(h.indent),h.color=B.chars[Y].penState.foreground}var $={foreground:h.color,underline:h.underline,italics:h.italics,background:"black",flash:!1};this.setPen($)},y.setBkgData=function(h){this.logger.log(d.INFO,"bkgData = "+JSON.stringify(h)),this.backSpace(),this.setPen(h),this.insertChar(32)},y.setRollUpRows=function(h){this.nrRollUpRows=h},y.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(d.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(d.TEXT,this.getDisplayText());var h=this.currRow+1-this.nrRollUpRows,A=this.rows.splice(h,1)[0];A.clear(),this.rows.splice(this.currRow,0,A),this.logger.log(d.INFO,"Rolling up")},y.getDisplayText=function(h){h=h||!1;for(var A=[],_="",v=-1,P=0;P<K;P++){var x=this.rows[P].getTextString();x&&(v=P+1,h?A.push("Row "+v+": '"+x+"'"):A.push(x.trim()))}return A.length>0&&(h?_="["+A.join(" | ")+"]":_=A.join(`
`)),_},y.getTextAndFormat=function(){return this.rows},E}(),R=function(){function E(p,h,A){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=p,this.outputFilter=h,this.mode=null,this.verbose=0,this.displayedMemory=new i(A),this.nonDisplayedMemory=new i(A),this.lastOutputScreen=new i(A),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=A}var y=E.prototype;return y.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},y.getHandler=function(){return this.outputFilter},y.setHandler=function(h){this.outputFilter=h},y.setPAC=function(h){this.writeScreen.setPAC(h)},y.setBkgData=function(h){this.writeScreen.setBkgData(h)},y.setMode=function(h){if(h===this.mode)return;this.mode=h,this.logger.log(d.INFO,"MODE="+h),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=h},y.insertChars=function(h){for(var A=0;A<h.length;A++)this.writeScreen.insertChar(h[A]);var _=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(d.INFO,_+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(d.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},y.ccRCL=function(){this.logger.log(d.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},y.ccBS=function(){if(this.logger.log(d.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},y.ccAOF=function(){},y.ccAON=function(){},y.ccDER=function(){this.logger.log(d.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},y.ccRU=function(h){this.logger.log(d.INFO,"RU("+h+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(h)},y.ccFON=function(){this.logger.log(d.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},y.ccRDC=function(){this.logger.log(d.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},y.ccTR=function(){this.logger.log(d.INFO,"TR"),this.setMode("MODE_TEXT")},y.ccRTD=function(){this.logger.log(d.INFO,"RTD"),this.setMode("MODE_TEXT")},y.ccEDM=function(){this.logger.log(d.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},y.ccCR=function(){this.logger.log(d.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},y.ccENM=function(){this.logger.log(d.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},y.ccEOC=function(){if(this.logger.log(d.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var h=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=h,this.writeScreen=this.nonDisplayedMemory,this.logger.log(d.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},y.ccTO=function(h){this.logger.log(d.INFO,"TO("+h+") - Tab Offset"),this.writeScreen.moveCursor(h)},y.ccMIDROW=function(h){var A={flash:!1};if(A.underline=h%2===1,A.italics=h>=46,A.italics)A.foreground="white";else{var _=Math.floor(h/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];A.foreground=v[_]}this.logger.log(d.INFO,"MIDROW: "+JSON.stringify(A)),this.writeScreen.setPen(A)},y.outputDataUpdate=function(h){h===void 0&&(h=!1);var A=this.logger.time;if(A===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=A:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,A,this.lastOutputScreen),h&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:A),this.lastOutputScreen.copy(this.displayedMemory))},y.cueSplitAtTime=function(h){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,h,this.displayedMemory),this.cueStartTime=h))},E}(),S=function(){function E(p,h,A){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var _=new u;this.channels=[null,new R(p,h,_),new R(p+1,A,_)],this.cmdHistory=O(),this.logger=_}var y=E.prototype;return y.getHandler=function(h){return this.channels[h].getHandler()},y.setHandler=function(h,A){this.channels[h].setHandler(A)},y.addData=function(h,A){var _,v,P,x=!1;this.logger.time=h;for(var C=0;C<A.length;C+=2){if(v=A[C]&127,P=A[C+1]&127,v===0&&P===0)continue;if(this.logger.log(d.DATA,"["+c([A[C],A[C+1]])+"] -> ("+c([v,P])+")"),_=this.parseCmd(v,P),_||(_=this.parseMidrow(v,P)),_||(_=this.parsePAC(v,P)),_||(_=this.parseBackgroundAttributes(v,P)),!_&&(x=this.parseChars(v,P),x)){var j=this.currentChannel;if(j&&j>0){var B=this.channels[j];B.insertChars(x)}else this.logger.log(d.WARNING,"No channel found yet. TEXT-MODE?")}!_&&!x&&this.logger.log(d.WARNING,"Couldn't parse cleaned data "+c([v,P])+" orig: "+c([A[C],A[C+1]]))}},y.parseCmd=function(h,A){var _=this.cmdHistory,v=(h===20||h===28||h===21||h===29)&&A>=32&&A<=47,P=(h===23||h===31)&&A>=33&&A<=35;if(!(v||P))return!1;if(I(h,A,_))return T(null,null,_),this.logger.log(d.DEBUG,"Repeated command ("+c([h,A])+") is dropped"),!0;var x=h===20||h===21||h===23?1:2,C=this.channels[x];return h===20||h===21||h===28||h===29?A===32?C.ccRCL():A===33?C.ccBS():A===34?C.ccAOF():A===35?C.ccAON():A===36?C.ccDER():A===37?C.ccRU(2):A===38?C.ccRU(3):A===39?C.ccRU(4):A===40?C.ccFON():A===41?C.ccRDC():A===42?C.ccTR():A===43?C.ccRTD():A===44?C.ccEDM():A===45?C.ccCR():A===46?C.ccENM():A===47&&C.ccEOC():C.ccTO(A-32),T(h,A,_),this.currentChannel=x,!0},y.parseMidrow=function(h,A){var _=0;if((h===17||h===25)&&A>=32&&A<=47){if(h===17?_=1:_=2,_!==this.currentChannel)return this.logger.log(d.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[_];return v?(v.ccMIDROW(A),this.logger.log(d.DEBUG,"MIDROW ("+c([h,A])+")"),!0):!1}return!1},y.parsePAC=function(h,A){var _,v=this.cmdHistory,P=(h>=17&&h<=23||h>=25&&h<=31)&&A>=64&&A<=127,x=(h===16||h===24)&&A>=64&&A<=95;if(!(P||x))return!1;if(I(h,A,v))return T(null,null,v),!0;var C=h<=23?1:2;A>=64&&A<=95?_=C===1?n[h]:b[h]:_=C===1?D[h]:m[h];var j=this.channels[C];return j?(j.setPAC(this.interpretPAC(_,A)),T(h,A,v),this.currentChannel=C,!0):!1},y.interpretPAC=function(h,A){var _,v={color:null,italics:!1,indent:null,underline:!1,row:h};return A>95?_=A-96:_=A-64,v.underline=(_&1)===1,_<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(_/2)]:_<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((_-16)/2)*4,v},y.parseChars=function(h,A){var _,v=null,P=null;if(h>=25?(_=2,P=h-8):(_=1,P=h),P>=17&&P<=19){var x;P===17?x=A+80:P===18?x=A+112:x=A+144,this.logger.log(d.INFO,"Special char '"+M(x)+"' in channel "+_),v=[x]}else h>=32&&h<=127&&(v=A===0?[h]:[h,A]);if(v){var C=c(v);this.logger.log(d.DEBUG,"Char codes = "+C.join(",")),T(h,A,this.cmdHistory)}return v},y.parseBackgroundAttributes=function(h,A){var _=(h===16||h===24)&&A>=32&&A<=47,v=(h===23||h===31)&&A>=45&&A<=47;if(!(_||v))return!1;var P,x={};h===16||h===24?(P=Math.floor((A-32)/2),x.background=f[P],A%2===1&&(x.background=x.background+"_semi")):A===45?x.background="transparent":(x.foreground="black",A===47&&(x.underline=!0));var C=h<=23?1:2,j=this.channels[C];return j.setBkgData(x),T(h,A,this.cmdHistory),!0},y.reset=function(){for(var h=0;h<Object.keys(this.channels).length;h++){var A=this.channels[h];A&&A.reset()}this.cmdHistory=O()},y.cueSplitAtTime=function(h){for(var A=0;A<this.channels.length;A++){var _=this.channels[A];_&&_.cueSplitAtTime(h)}},E}();function T(E,y,p){p.a=E,p.b=y}function I(E,y,p){return p.a===E&&p.b===y}function O(){return{a:null,b:null}}z.default=S},"./src/utils/codecs.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"isCodecType",function(){return W}),N.d(z,"isCodecSupportedInMp4",function(){return M});var V={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 W(K,H){var n=V[H];return!!n&&n[K.slice(0,4)]===!0}function M(K,H){return MediaSource.isTypeSupported((H||"video")+'/mp4;codecs="'+K+'"')}},"./src/utils/cues.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/utils/vttparser.ts"),W=N("./src/utils/webvtt-parser.ts"),M=N("./src/utils/texttrack-utils.ts"),K=/\s/,H={newCue:function(D,b,m,f){for(var d=[],u,c,o,l,a,i=self.VTTCue||self.TextTrackCue,R=0;R<f.rows.length;R++)if(u=f.rows[R],o=!0,l=0,a="",!u.isEmpty()){for(var S=0;S<u.chars.length;S++)K.test(u.chars[S].uchar)&&o?l++:(a+=u.chars[S].uchar,o=!1);u.cueStartTime=b,b===m&&(m+=1e-4),l>=16?l--:l++;var T=Object(V.fixLineBreaks)(a.trim()),I=Object(W.generateCueId)(b,m,T);(!D||!D.cues||!D.cues.getCueById(I))&&(c=new i(b,m,T),c.id=I,c.line=R+1,c.align="left",c.position=10+Math.min(80,Math.floor(l*8/32)*10),d.push(c))}return D&&d.length&&(d.sort(function(O,E){return O.line==="auto"||E.line==="auto"?0:O.line>8&&E.line>8?E.line-O.line:O.line-E.line}),d.forEach(function(O){return Object(M.addCueToTrack)(D,O)})),d}};z.default=H},"./src/utils/discontinuities.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"findFirstFragWithCC",function(){return K}),N.d(z,"shouldAlignOnDiscontinuities",function(){return H}),N.d(z,"findDiscontinuousReferenceFrag",function(){return n}),N.d(z,"adjustSlidingStart",function(){return b}),N.d(z,"alignStream",function(){return m}),N.d(z,"alignPDT",function(){return d}),N.d(z,"alignFragmentByPDTDelta",function(){return u}),N.d(z,"alignMediaPlaylistByPDT",function(){return c});var V=N("./src/polyfills/number.ts"),W=N("./src/utils/logger.ts"),M=N("./src/controller/level-helper.ts");function K(o,l){for(var a=null,i=0,R=o.length;i<R;i++){var S=o[i];if(S&&S.cc===l){a=S;break}}return a}function H(o,l,a){return!!(l.details&&(a.endCC>a.startCC||o&&o.cc<a.startCC))}function n(o,l){var a=o.fragments,i=l.fragments;if(!i.length||!a.length){W.logger.log("No fragments to align");return}var R=K(a,i[0].cc);if(!R||R&&!R.startPTS){W.logger.log("No frag in previous level to align on");return}return R}function D(o,l){if(o){var a=o.start+l;o.start=o.startPTS=a,o.endPTS=a+o.duration}}function b(o,l){for(var a=l.fragments,i=0,R=a.length;i<R;i++)D(a[i],o);l.fragmentHint&&D(l.fragmentHint,o),l.alignedSliding=!0}function m(o,l,a){if(!l)return;f(o,a,l),!a.alignedSliding&&l.details&&d(a,l.details),!a.alignedSliding&&l.details&&!a.skippedSegments&&Object(M.adjustSliding)(l.details,a)}function f(o,l,a){if(H(o,a,l)){var i=n(a.details,l);i&&Object(V.isFiniteNumber)(i.start)&&(W.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),b(i.start,l))}}function d(o,l){if(!l.fragments.length||!o.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,i=o.fragments[0].programDateTime,R=(i-a)/1e3+l.fragments[0].start;R&&Object(V.isFiniteNumber)(R)&&(W.logger.log("Adjusting PTS using programDateTime delta "+(i-a)+"ms, sliding:"+R.toFixed(3)+" "+o.url+" "),b(R,o))}function u(o,l){var a=o.programDateTime;if(!a)return;var i=(a-l)/1e3;o.start=o.startPTS=i,o.endPTS=i+o.duration}function c(o,l){if(!l.fragments.length||!o.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,i=l.fragments[0].start,R=a-i*1e3;o.fragments.forEach(function(S){u(S,R)}),o.fragmentHint&&u(o.fragmentHint,R),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/utils/ewma.ts"),W=function(){function M(H,n,D){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=D,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(H),this.fast_=new V.default(n)}var K=M.prototype;return K.update=function(n,D){var b=this.slow_,m=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new V.default(n,b.getEstimate(),b.getTotalWeight())),this.fast_.halfLife!==D&&(this.fast_=new V.default(D,m.getEstimate(),m.getTotalWeight()))},K.sample=function(n,D){n=Math.max(n,this.minDelayMs_);var b=8*D,m=n/1e3,f=b/m;this.fast_.sample(m,f),this.slow_.sample(m,f)},K.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},K.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},K.destroy=function(){},M}();z.default=W},"./src/utils/ewma.ts":function(Z,z,N){"use strict";N.r(z);var V=function(){function W(K,H,n){H===void 0&&(H=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=K,this.alpha_=K?Math.exp(Math.log(.5)/K):0,this.estimate_=H,this.totalWeight_=n}var M=W.prototype;return M.sample=function(H,n){var D=Math.pow(this.alpha_,H);this.estimate_=n*(1-D)+D*this.estimate_,this.totalWeight_+=H},M.getTotalWeight=function(){return this.totalWeight_},M.getEstimate=function(){if(this.alpha_){var H=1-Math.pow(this.alpha_,this.totalWeight_);if(H)return this.estimate_/H}return this.estimate_},W}();z.default=V},"./src/utils/fetch-loader.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"fetchSupported",function(){return u});var V=N("./src/polyfills/number.ts"),W=N("./src/loader/load-stats.ts"),M=N("./src/demux/chunk-cache.ts");function K(i,R){i.prototype=Object.create(R.prototype),i.prototype.constructor=i,m(i,R)}function H(i){var R=typeof Map=="function"?new Map:void 0;return H=function(T){if(T===null||!b(T))return T;if(typeof T!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R!="undefined"){if(R.has(T))return R.get(T);R.set(T,I)}function I(){return n(T,arguments,f(this).constructor)}return I.prototype=Object.create(T.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),m(I,T)},H(i)}function n(i,R,S){return D()?n=Reflect.construct:n=function(I,O,E){var y=[null];y.push.apply(y,O);var p=Function.bind.apply(I,y),h=new p;return E&&m(h,E.prototype),h},n.apply(null,arguments)}function D(){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(i){return!1}}function b(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function m(i,R){return m=Object.setPrototypeOf||function(T,I){return T.__proto__=I,T},m(i,R)}function f(i){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},f(i)}function d(){return d=Object.assign||function(i){for(var R=1;R<arguments.length;R++){var S=arguments[R];for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(i[T]=S[T])}return i},d.apply(this,arguments)}function u(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}var c=function(){function i(S){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=S.fetchSetup||l,this.controller=new self.AbortController,this.stats=new W.LoadStats}var R=i.prototype;return R.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},R.abortInternal=function(){var T=this.response;(!T||!T.ok)&&(this.stats.aborted=!0,this.controller.abort())},R.abort=function(){var T;this.abortInternal(),(T=this.callbacks)!==null&&T!==void 0&&T.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},R.load=function(T,I,O){var E=this,y=this.stats;if(y.loading.start)throw new Error("Loader can only be used once.");y.loading.start=self.performance.now();var p=o(T,this.controller.signal),h=O.onProgress,A=T.responseType==="arraybuffer",_=A?"byteLength":"length";this.context=T,this.config=I,this.callbacks=O,this.request=this.fetchSetup(T,p),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){E.abortInternal(),O.onTimeout(y,T,E.response)},I.timeout),self.fetch(this.request).then(function(v){if(E.response=E.loader=v,!v.ok){var P=v.status,x=v.statusText;throw new a(x||"fetch, bad network response",P,v)}return y.loading.first=Math.max(self.performance.now(),y.loading.start),y.total=parseInt(v.headers.get("Content-Length")||"0"),h&&Object(V.isFiniteNumber)(I.highWaterMark)?E.loadProgressively(v,y,T,I.highWaterMark,h):A?v.arrayBuffer():v.text()}).then(function(v){var P=E.response;self.clearTimeout(E.requestTimeout),y.loading.end=Math.max(self.performance.now(),y.loading.first),y.loaded=y.total=v[_];var x={url:P.url,data:v};h&&!Object(V.isFiniteNumber)(I.highWaterMark)&&h(y,T,v,P),O.onSuccess(x,y,T,P)}).catch(function(v){if(self.clearTimeout(E.requestTimeout),y.aborted)return;var P=v.code||0;O.onError({code:P,text:v.message},T,v.details)})},R.getCacheAge=function(){var T=null;if(this.response){var I=this.response.headers.get("age");T=I?parseFloat(I):null}return T},R.loadProgressively=function(T,I,O,E,y){E===void 0&&(E=0);var p=new M.default,h=T.body.getReader(),A=function _(){return h.read().then(function(v){if(v.done)return p.dataLength&&y(I,O,p.flush(),T),Promise.resolve(new ArrayBuffer(0));var P=v.value,x=P.length;return I.loaded+=x,x<E||p.dataLength?(p.push(P),p.dataLength>=E&&y(I,O,p.flush(),T)):y(I,O,P,T),_()}).catch(function(){return Promise.reject()})};return A()},i}();function o(i,R){var S={method:"GET",mode:"cors",credentials:"same-origin",signal:R,headers:new self.Headers(d({},i.headers))};return i.rangeEnd&&S.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),S}function l(i,R){return new self.Request(i.url,R)}var a=function(i){K(R,i);function R(S,T,I){var O;return O=i.call(this,S)||this,O.code=void 0,O.details=void 0,O.code=T,O.details=I,O}return R}(H(Error));z.default=c},"./src/utils/imsc1-ttml-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"IMSC1_CODEC",function(){return b}),N.d(z,"parseIMSC1",function(){return u});var V=N("./src/utils/mp4-tools.ts"),W=N("./src/utils/vttparser.ts"),M=N("./src/utils/vttcue.ts"),K=N("./src/demux/id3.ts"),H=N("./src/utils/timescale-conversion.ts"),n=N("./src/utils/webvtt-parser.ts");function D(){return D=Object.assign||function(E){for(var y=1;y<arguments.length;y++){var p=arguments[y];for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(E[h]=p[h])}return E},D.apply(this,arguments)}var b="stpp.ttml.im1t",m=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,d={left:"start",center:"center",right:"end",start:"start",end:"end"};function u(E,y,p,h,A){var _=Object(V.findBox)(new Uint8Array(E),["mdat"]);if(_.length===0){A(new Error("Could not parse IMSC1 mdat"));return}var v=_[0],P=Object(K.utf8ArrayToStr)(new Uint8Array(E,v.start,v.end-v.start)),x=Object(H.toTimescaleFromScale)(y,1,p);try{h(c(P,x))}catch(C){A(C)}}function c(E,y){var p=new DOMParser,h=p.parseFromString(E,"text/xml"),A=h.getElementsByTagName("tt")[0];if(!A)throw new Error("Invalid ttml");var _={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},v=Object.keys(_).reduce(function(B,w){return B[w]=A.getAttribute("ttp:"+w)||_[w],B},{}),P=A.getAttribute("xml:space")!=="preserve",x=l(o(A,"styling","style")),C=l(o(A,"layout","region")),j=o(A,"body","[begin]");return[].map.call(j,function(B){var w=a(B,P);if(!w||!B.hasAttribute("begin"))return null;var Y=T(B.getAttribute("begin"),v),$=T(B.getAttribute("dur"),v),oe=T(B.getAttribute("end"),v);if(Y===null)throw S(B);if(oe===null){if($===null)throw S(B);oe=Y+$}var de=new M.default(Y-y,oe-y,w);de.id=Object(n.generateCueId)(de.startTime,de.endTime,de.text);var Be=C[B.getAttribute("region")],Ae=x[B.getAttribute("style")];de.position=10,de.size=80;var Re=i(Be,Ae),Le=Re.textAlign;if(Le){var Fe=d[Le];Fe&&(de.lineAlign=Fe),de.align=Le}return D(de,Re),de}).filter(function(B){return B!==null})}function o(E,y,p){var h=E.getElementsByTagName(y)[0];return h?[].slice.call(h.querySelectorAll(p)):[]}function l(E){return E.reduce(function(y,p){var h=p.getAttribute("xml:id");return h&&(y[h]=p),y},{})}function a(E,y){return[].slice.call(E.childNodes).reduce(function(p,h,A){var _;return h.nodeName==="br"&&A?p+`
`:(_=h.childNodes)!==null&&_!==void 0&&_.length?a(h,y):y?p+h.textContent.trim().replace(/\s+/g," "):p+h.textContent},"")}function i(E,y){var p="http://www.w3.org/ns/ttml#styling",h=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return h.reduce(function(A,_){var v=R(y,p,_)||R(E,p,_);return v&&(A[_]=v),A},{})}function R(E,y,p){return E.hasAttributeNS(y,p)?E.getAttributeNS(y,p):null}function S(E){return new Error("Could not parse ttml timestamp "+E)}function T(E,y){if(!E)return null;var p=Object(W.parseTimeStamp)(E);return p===null&&(m.test(E)?p=I(E,y):f.test(E)&&(p=O(E,y))),p}function I(E,y){var p=m.exec(E),h=(p[4]|0)+(p[5]|0)/y.subFrameRate;return(p[1]|0)*3600+(p[2]|0)*60+(p[3]|0)+h/y.frameRate}function O(E,y){var p=f.exec(E),h=Number(p[1]),A=p[2];switch(A){case"h":return h*3600;case"m":return h*60;case"ms":return h*1e3;case"f":return h/y.frameRate;case"t":return h/y.tickRate}return h}},"./src/utils/logger.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"enableLogs",function(){return n}),N.d(z,"logger",function(){return D});var V=function(){},W={trace:V,debug:V,log:V,warn:V,info:V,error:V},M=W;function K(b){var m=self.console[b];return m?m.bind(self.console,"["+b+"] >"):V}function H(b){for(var m=arguments.length,f=new Array(m>1?m-1:0),d=1;d<m;d++)f[d-1]=arguments[d];f.forEach(function(u){M[u]=b[u]?b[u].bind(b):K(u)})}function n(b){if(self.console&&b===!0||typeof b=="object"){H(b,"debug","log","info","warn","error");try{M.log()}catch(m){M=W}}else M=W}var D=M},"./src/utils/mediakeys-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"KeySystems",function(){return V}),N.d(z,"requestMediaKeySystemAccess",function(){return W});var V;(function(M){M.WIDEVINE="com.widevine.alpha",M.PLAYREADY="com.microsoft.playready"})(V||(V={}));var W=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"bin2str",function(){return H}),N.d(z,"readUint16",function(){return n}),N.d(z,"readUint32",function(){return D}),N.d(z,"writeUint32",function(){return b}),N.d(z,"findBox",function(){return m}),N.d(z,"parseSegmentIndex",function(){return f}),N.d(z,"parseInitSegment",function(){return d}),N.d(z,"getStartDTS",function(){return u}),N.d(z,"getDuration",function(){return c}),N.d(z,"computeRawDurationFromSamples",function(){return o}),N.d(z,"offsetStartDTS",function(){return l}),N.d(z,"segmentValidRange",function(){return a}),N.d(z,"appendUint8Array",function(){return i});var V=N("./src/utils/typed-array.ts"),W=N("./src/loader/fragment.ts"),M=Math.pow(2,32)-1,K=[].push;function H(R){return String.fromCharCode.apply(null,R)}function n(R,S){"data"in R&&(S+=R.start,R=R.data);var T=R[S]<<8|R[S+1];return T<0?65536+T:T}function D(R,S){"data"in R&&(S+=R.start,R=R.data);var T=R[S]<<24|R[S+1]<<16|R[S+2]<<8|R[S+3];return T<0?4294967296+T:T}function b(R,S,T){"data"in R&&(S+=R.start,R=R.data),R[S]=T>>24,R[S+1]=T>>16&255,R[S+2]=T>>8&255,R[S+3]=T&255}function m(R,S){var T=[];if(!S.length)return T;var I,O,E;"data"in R?(I=R.data,O=R.start,E=R.end):(I=R,O=0,E=I.byteLength);for(var y=O;y<E;){var p=D(I,y),h=H(I.subarray(y+4,y+8)),A=p>1?y+p:E;if(h===S[0])if(S.length===1)T.push({data:I,start:y+8,end:A});else{var _=m({data:I,start:y+8,end:A},S.slice(1));_.length&&K.apply(T,_)}y=A}return T}function f(R){var S=m(R,["moov"]),T=S[0],I=T?T.end:null,O=m(R,["sidx"]);if(!O||!O[0])return null;var E=[],y=O[0],p=y.data[0],h=p===0?8:16,A=D(y,h);h+=4;var _=0,v=0;p===0?h+=8:h+=16,h+=2;var P=y.end+v,x=n(y,h);h+=2;for(var C=0;C<x;C++){var j=h,B=D(y,j);j+=4;var w=B&2147483647,Y=(B&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=D(y,j);j+=4,E.push({referenceSize:w,subsegmentDuration:$,info:{duration:$/A,start:P,end:P+w-1}}),P+=w,j+=4,h=j}return{earliestPresentationTime:_,timescale:A,version:p,referencesCount:x,references:E,moovEndOffset:I}}function d(R){for(var S=[],T=m(R,["moov","trak"]),I=0;I<T.length;I++){var O=T[I],E=m(O,["tkhd"])[0];if(E){var y=E.data[E.start],p=y===0?12:20,h=D(E,p),A=m(O,["mdia","mdhd"])[0];if(A){y=A.data[A.start],p=y===0?12:20;var _=D(A,p),v=m(O,["mdia","hdlr"])[0];if(v){var P=H(v.data.subarray(v.start+8,v.start+12)),x={soun:W.ElementaryStreamTypes.AUDIO,vide:W.ElementaryStreamTypes.VIDEO}[P];if(x){var C=m(O,["mdia","minf","stbl","stsd"])[0],j=void 0;C&&(j=H(C.data.subarray(C.start+12,C.start+16))),S[h]={timescale:_,type:x},S[x]={timescale:_,id:h,codec:j}}}}}}var B=m(R,["moov","mvex","trex"]);return B.forEach(function(w){var Y=D(w,4),$=S[Y];$&&($.default={duration:D(w,12),flags:D(w,20)})}),S}function u(R,S){return m(S,["moof","traf"]).reduce(function(T,I){var O=m(I,["tfdt"])[0],E=O.data[O.start],y=m(I,["tfhd"]).reduce(function(p,h){var A=D(h,4),_=R[A];if(_){var v=D(O,4);E===1&&(v*=Math.pow(2,32),v+=D(O,8));var P=_.timescale||9e4,x=v/P;if(isFinite(x)&&(p===null||x<p))return x}return p},null);return y!==null&&isFinite(y)&&(T===null||y<T)?y:T},null)||0}function c(R,S){for(var T=0,I=0,O=0,E=m(R,["moof","traf"]),y=0;y<E.length;y++){var p=E[y],h=m(p,["tfhd"])[0],A=D(h,4),_=S[A];if(!_)continue;var v=_.default,P=D(h,0)|(v==null?void 0:v.flags),x=v==null?void 0:v.duration;P&8&&(P&2?x=D(h,12):x=D(h,8));for(var C=_.timescale||9e4,j=m(p,["trun"]),B=0;B<j.length;B++){if(x){var w=D(j[B],4);T=x*w}else T=o(j[B]);_.type===W.ElementaryStreamTypes.VIDEO?I+=T/C:_.type===W.ElementaryStreamTypes.AUDIO&&(O+=T/C)}}if(I===0&&O===0){var Y=f(R);if(Y!=null&&Y.references)return Y.references.reduce(function($,oe){return $+oe.info.duration||0},0)}return I||O}function o(R){var S=D(R,0),T=8;S&1&&(T+=4),S&4&&(T+=4);for(var I=0,O=D(R,4),E=0;E<O;E++){if(S&256){var y=D(R,T);I+=y,T+=4}S&512&&(T+=4),S&1024&&(T+=4),S&2048&&(T+=4)}return I}function l(R,S,T){m(S,["moof","traf"]).forEach(function(I){m(I,["tfhd"]).forEach(function(O){var E=D(O,4),y=R[E];if(!y)return;var p=y.timescale||9e4;m(I,["tfdt"]).forEach(function(h){var A=h.data[h.start],_=D(h,4);if(A===0)b(h,4,_-T*p);else{_*=Math.pow(2,32),_+=D(h,8),_-=T*p,_=Math.max(_,0);var v=Math.floor(_/(M+1)),P=Math.floor(_%(M+1));b(h,4,v),b(h,8,P)}})})})}function a(R){var S={valid:null,remainder:null},T=m(R,["moof"]);if(T){if(T.length<2)return S.remainder=R,S}else return S;var I=T[T.length-1];return S.valid=Object(V.sliceUint8)(R,0,I.start-8),S.remainder=Object(V.sliceUint8)(R,I.start-8),S}function i(R,S){var T=new Uint8Array(R.length+S.length);return T.set(R),T.set(S,R.length),T}},"./src/utils/output-filter.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"default",function(){return V});var V=function(){function W(K,H){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=K,this.trackName=H}var M=W.prototype;return M.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},M.newCue=function(H,n,D){(this.startTime===null||this.startTime>H)&&(this.startTime=H),this.endTime=n,this.screen=D,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[]},W}()},"./src/utils/texttrack-utils.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"sendAddTrackEvent",function(){return W}),N.d(z,"addCueToTrack",function(){return M}),N.d(z,"clearCurrentCues",function(){return K}),N.d(z,"removeCuesInRange",function(){return H}),N.d(z,"getCuesInRange",function(){return D});var V=N("./src/utils/logger.ts");function W(b,m){var f;try{f=new Event("addtrack")}catch(d){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=b,m.dispatchEvent(f)}function M(b,m){var f=b.mode;if(f==="disabled"&&(b.mode="hidden"),b.cues&&!b.cues.getCueById(m.id))try{if(b.addCue(m),!b.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(u){V.logger.debug("[texttrack-utils]: "+u);var d=new self.TextTrackCue(m.startTime,m.endTime,m.text);d.id=m.id,b.addCue(d)}f==="disabled"&&(b.mode=f)}function K(b){var m=b.mode;if(m==="disabled"&&(b.mode="hidden"),b.cues)for(var f=b.cues.length;f--;)b.removeCue(b.cues[f]);m==="disabled"&&(b.mode=m)}function H(b,m,f){var d=b.mode;if(d==="disabled"&&(b.mode="hidden"),b.cues&&b.cues.length>0)for(var u=D(b.cues,m,f),c=0;c<u.length;c++)b.removeCue(u[c]);d==="disabled"&&(b.mode=d)}function n(b,m){if(m<b[0].startTime)return 0;var f=b.length-1;if(m>b[f].endTime)return-1;for(var d=0,u=f;d<=u;){var c=Math.floor((u+d)/2);if(m<b[c].startTime)u=c-1;else if(m>b[c].startTime&&d<f)d=c+1;else return c}return b[d].startTime-m<m-b[u].startTime?d:u}function D(b,m,f){var d=[],u=n(b,m);if(u>-1)for(var c=u,o=b.length;c<o;c++){var l=b[c];if(l.startTime>=m&&l.endTime<=f)d.push(l);else if(l.startTime>f)return d}return d}},"./src/utils/time-ranges.ts":function(Z,z,N){"use strict";N.r(z);var V={toString:function(M){for(var K="",H=M.length,n=0;n<H;n++)K+="["+M.start(n).toFixed(3)+","+M.end(n).toFixed(3)+"]";return K}};z.default=V},"./src/utils/timescale-conversion.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"toTimescaleFromBase",function(){return W}),N.d(z,"toTimescaleFromScale",function(){return M}),N.d(z,"toMsFromMpegTsClock",function(){return K}),N.d(z,"toMpegTsClockFromTimescale",function(){return H});var V=9e4;function W(n,D,b,m){b===void 0&&(b=1),m===void 0&&(m=!1);var f=n*D*b;return m?Math.round(f):f}function M(n,D,b,m){return b===void 0&&(b=1),m===void 0&&(m=!1),W(n,D,1/b,m)}function K(n,D){return D===void 0&&(D=!1),W(n,1e3,1/V,D)}function H(n,D){return D===void 0&&(D=1),W(n,V,1/D)}},"./src/utils/typed-array.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"sliceUint8",function(){return V});function V(W,M,K){return Uint8Array.prototype.slice?W.slice(M,K):new Uint8Array(Array.prototype.slice.call(W,M,K))}},"./src/utils/vttcue.ts":function(Z,z,N){"use strict";N.r(z),z.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],W=["start","middle","end","left","right"];function M(b,m){if(typeof m!="string")return!1;if(!Array.isArray(b))return!1;var f=m.toLowerCase();return~b.indexOf(f)?f:!1}function K(b){return M(V,b)}function H(b){return M(W,b)}function n(b){for(var m=arguments.length,f=new Array(m>1?m-1:0),d=1;d<m;d++)f[d-1]=arguments[d];for(var u=1;u<arguments.length;u++){var c=arguments[u];for(var o in c)b[o]=c[o]}return b}function D(b,m,f){var d=this,u={enumerable:!0};d.hasBeenReset=!1;var c="",o=!1,l=b,a=m,i=f,R=null,S="",T=!0,I="auto",O="start",E=50,y="middle",p=50,h="middle";Object.defineProperty(d,"id",n({},u,{get:function(){return c},set:function(_){c=""+_}})),Object.defineProperty(d,"pauseOnExit",n({},u,{get:function(){return o},set:function(_){o=!!_}})),Object.defineProperty(d,"startTime",n({},u,{get:function(){return l},set:function(_){if(typeof _!="number")throw new TypeError("Start time must be set to a number.");l=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"endTime",n({},u,{get:function(){return a},set:function(_){if(typeof _!="number")throw new TypeError("End time must be set to a number.");a=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"text",n({},u,{get:function(){return i},set:function(_){i=""+_,this.hasBeenReset=!0}})),Object.defineProperty(d,"region",n({},u,{get:function(){return R},set:function(_){R=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"vertical",n({},u,{get:function(){return S},set:function(_){var v=K(_);if(v===!1)throw new SyntaxError("An invalid or illegal string was specified.");S=v,this.hasBeenReset=!0}})),Object.defineProperty(d,"snapToLines",n({},u,{get:function(){return T},set:function(_){T=!!_,this.hasBeenReset=!0}})),Object.defineProperty(d,"line",n({},u,{get:function(){return I},set:function(_){if(typeof _!="number"&&_!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");I=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"lineAlign",n({},u,{get:function(){return O},set:function(_){var v=H(_);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");O=v,this.hasBeenReset=!0}})),Object.defineProperty(d,"position",n({},u,{get:function(){return E},set:function(_){if(_<0||_>100)throw new Error("Position must be between 0 and 100.");E=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",n({},u,{get:function(){return y},set:function(_){var v=H(_);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");y=v,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",n({},u,{get:function(){return p},set:function(_){if(_<0||_>100)throw new Error("Size must be between 0 and 100.");p=_,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",n({},u,{get:function(){return h},set:function(_){var v=H(_);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");h=v,this.hasBeenReset=!0}})),d.displayState=void 0}return D.prototype.getCueAsHTML=function(){var b=self.WebVTT;return b.convertCueToDOMTree(self,this.text)},D}()},"./src/utils/vttparser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"parseTimeStamp",function(){return M}),N.d(z,"fixLineBreaks",function(){return m}),N.d(z,"VTTParser",function(){return f});var V=N("./src/utils/vttcue.ts"),W=function(){function d(){}var u=d.prototype;return u.decode=function(o,l){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},d}();function M(d){function u(o,l,a,i){return(o|0)*3600+(l|0)*60+(a|0)+parseFloat(i||0)}var c=d.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return c?parseFloat(c[2])>59?u(c[2],c[3],0,c[4]):u(c[1],c[2],c[3],c[4]):null}var K=function(){function d(){this.values=Object.create(null)}var u=d.prototype;return u.set=function(o,l){!this.get(o)&&l!==""&&(this.values[o]=l)},u.get=function(o,l,a){return a?this.has(o)?this.values[o]:l[a]:this.has(o)?this.values[o]:l},u.has=function(o){return o in this.values},u.alt=function(o,l,a){for(var i=0;i<a.length;++i)if(l===a[i]){this.set(o,l);break}},u.integer=function(o,l){/^-?\d+$/.test(l)&&this.set(o,parseInt(l,10))},u.percent=function(o,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var a=parseFloat(l);if(a>=0&&a<=100)return this.set(o,a),!0}return!1},d}();function H(d,u,c,o){var l=o?d.split(o):[d];for(var a in l){if(typeof l[a]!="string")continue;var i=l[a].split(c);if(i.length!==2)continue;var R=i[0],S=i[1];u(R,S)}}var n=new V.default(0,0,""),D=n.align==="middle"?"middle":"center";function b(d,u,c){var o=d;function l(){var R=M(d);if(R===null)throw new Error("Malformed timestamp: "+o);return d=d.replace(/^[^\sa-zA-Z-]+/,""),R}function a(R,S){var T=new K;H(R,function(E,y){var p;switch(E){case"region":for(var h=c.length-1;h>=0;h--)if(c[h].id===y){T.set(E,c[h].region);break}break;case"vertical":T.alt(E,y,["rl","lr"]);break;case"line":p=y.split(","),T.integer(E,p[0]),T.percent(E,p[0])&&T.set("snapToLines",!1),T.alt(E,p[0],["auto"]),p.length===2&&T.alt("lineAlign",p[1],["start",D,"end"]);break;case"position":p=y.split(","),T.percent(E,p[0]),p.length===2&&T.alt("positionAlign",p[1],["start",D,"end","line-left","line-right","auto"]);break;case"size":T.percent(E,y);break;case"align":T.alt(E,y,["start",D,"end","left","right"]);break}},/:/,/\s/),S.region=T.get("region",null),S.vertical=T.get("vertical","");var I=T.get("line","auto");I==="auto"&&n.line===-1&&(I=-1),S.line=I,S.lineAlign=T.get("lineAlign","start"),S.snapToLines=T.get("snapToLines",!0),S.size=T.get("size",100),S.align=T.get("align",D);var O=T.get("position","auto");O==="auto"&&n.position===50&&(O=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=O}function i(){d=d.replace(/^\s+/,"")}if(i(),u.startTime=l(),i(),d.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);d=d.substr(3),i(),u.endTime=l(),i(),a(d,u)}function m(d){return d.replace(/<br(?: \/)?>/gi,`
`)}var f=function(){function d(){this.state="INITIAL",this.buffer="",this.decoder=new W,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var u=d.prototype;return u.parse=function(o){var l=this;o&&(l.buffer+=l.decoder.decode(o,{stream:!0}));function a(){var O=l.buffer,E=0;for(O=m(O);E<O.length&&O[E]!=="\r"&&O[E]!==`
`;)++E;var y=O.substr(0,E);return O[E]==="\r"&&++E,O[E]===`
`&&++E,l.buffer=O.substr(E),y}function i(O){H(O,function(E,y){},/:/)}try{var R="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;R=a();var S=R.match(/^()?WEBVTT([ \t].*)?$/);if(!S||!S[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var T=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;T?T=!1:R=a();switch(l.state){case"HEADER":/:/.test(R)?i(R):R||(l.state="ID");continue;case"NOTE":R||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){l.state="NOTE";break}if(!R)continue;if(l.cue=new V.default(0,0,""),l.state="CUE",R.indexOf("-->")===-1){l.cue.id=R;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{b(R,l.cue,l.regionList)}catch(O){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var I=R.indexOf("-->")!==-1;if(!R||I&&(T=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
`),l.cue.text+=R}continue;case"BADCUE":R||(l.state="ID")}}}catch(O){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},u.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(l){o.onparsingerror&&o.onparsingerror(l)}return o.onflush&&o.onflush(),this},d}()},"./src/utils/webvtt-parser.ts":function(Z,z,N){"use strict";N.r(z),N.d(z,"generateCueId",function(){return f}),N.d(z,"parseWebVTT",function(){return u});var V=N("./src/polyfills/number.ts"),W=N("./src/utils/vttparser.ts"),M=N("./src/demux/id3.ts"),K=N("./src/utils/timescale-conversion.ts"),H=N("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,D=function(o,l,a){return a===void 0&&(a=0),o.substr(a,l.length)===l},b=function(o){var l=parseInt(o.substr(-3)),a=parseInt(o.substr(-6,2)),i=parseInt(o.substr(-9,2)),R=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(l)||!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(i)||!Object(V.isFiniteNumber)(R))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return l+=1e3*a,l+=60*1e3*i,l+=60*60*1e3*R,l},m=function(o){for(var l=5381,a=o.length;a;)l=l*33^o.charCodeAt(--a);return(l>>>0).toString()};function f(c,o,l){return m(c.toString())+m(o.toString())+m(l)}var d=function(o,l,a){var i=o[l],R=o[i.prevCC];if(!R||!R.new&&i.new){o.ccOffset=o.presentationOffset=i.start,i.new=!1;return}for(;(S=R)!==null&&S!==void 0&&S.new;){var S;o.ccOffset+=i.start-R.start,i.new=!1,i=R,R=o[i.prevCC]}o.presentationOffset=a};function u(c,o,l,a,i,R,S,T){var I=new W.VTTParser,O=Object(M.utf8ArrayToStr)(new Uint8Array(c)).trim().replace(n,`
`).split(`
`),E=[],y=Object(K.toMpegTsClockFromTimescale)(o,l),p="00:00.000",h=0,A=0,_,v=!0,P=!1;I.oncue=function(x){var C=a[i],j=a.ccOffset,B=(h-y)/9e4;if(C!=null&&C.new&&(A!==void 0?j=a.ccOffset=C.start:d(a,i,B)),B&&(j=B-a.presentationOffset),P){var w=x.endTime-x.startTime,Y=Object(H.normalizePts)((x.startTime+j-A)*9e4,R*9e4)/9e4;x.startTime=Y,x.endTime=Y+w}var $=x.text.trim();x.text=decodeURIComponent(encodeURIComponent($)),x.id||(x.id=f(x.startTime,x.endTime,$)),x.endTime>0&&E.push(x)},I.onparsingerror=function(x){_=x},I.onflush=function(){if(_){T(_);return}S(E)},O.forEach(function(x){if(v)if(D(x,"X-TIMESTAMP-MAP=")){v=!1,P=!0,x.substr(16).split(",").forEach(function(C){D(C,"LOCAL:")?p=C.substr(6):D(C,"MPEGTS:")&&(h=parseInt(C.substr(7)))});try{A=b(p)/1e3}catch(C){P=!1,_=C}return}else x===""&&(v=!1);I.parse(x+`
`)}),I.flush()}},"./src/utils/xhr-loader.ts":function(Z,z,N){"use strict";N.r(z);var V=N("./src/utils/logger.ts"),W=N("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,K=function(){function H(D){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=D?D.xhrSetup:null,this.stats=new W.LoadStats,this.retryDelay=0}var n=H.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var b=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),b&&(b.onreadystatechange=null,b.onprogress=null,b.readyState!==4&&(this.stats.aborted=!0,b.abort()))},n.abort=function(){var b;this.abortInternal(),(b=this.callbacks)!==null&&b!==void 0&&b.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(b,m,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=b,this.config=m,this.callbacks=f,this.retryDelay=m.retryDelay,this.loadInternal()},n.loadInternal=function(){var b=this.config,m=this.context;if(!b)return;var f=this.loader=new self.XMLHttpRequest,d=this.stats;d.loading.first=0,d.loaded=0;var u=this.xhrSetup;try{if(u)try{u(f,m.url)}catch(l){f.open("GET",m.url,!0),u(f,m.url)}f.readyState||f.open("GET",m.url,!0);var c=this.context.headers;if(c)for(var o in c)f.setRequestHeader(o,c[o])}catch(l){this.callbacks.onError({code:f.status,text:l.message},m,f);return}m.rangeEnd&&f.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),b.timeout),f.send()},n.readystatechange=function(){var b=this.context,m=this.loader,f=this.stats;if(!b||!m)return;var d=m.readyState,u=this.config;if(f.aborted)return;if(d>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),d===4){m.onreadystatechange=null,m.onprogress=null;var c=m.status;if(c>=200&&c<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var o,l;if(b.responseType==="arraybuffer"?(o=m.response,l=o.byteLength):(o=m.responseText,l=o.length),f.loaded=f.total=l,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(f,b,o,m),!this.callbacks)return;var i={url:m.responseURL,data:o};this.callbacks.onSuccess(i,f,b,m)}else f.retry>=u.maxRetry||c>=400&&c<499?(V.logger.error(c+" while loading "+b.url),this.callbacks.onError({code:c,text:m.statusText},b,m)):(V.logger.warn(c+" while loading "+b.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,u.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout)},n.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var b=this.callbacks;b&&(this.abortInternal(),b.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(b){var m=this.stats;m.loaded=b.loaded,b.lengthComputable&&(m.total=b.total)},n.getCacheAge=function(){var b=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");b=m?parseFloat(m):null}return b},H}();z.default=K}}).default})},vHTk:function(Ve,se,U){Ve.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Ve,se,U){"use strict";U.d(se,"a",function(){return pt});var Z=U("rePB"),z=U("VTBJ"),N=U("KQm4"),V=U("U8pU"),W=U("ODXe"),M=U("q1tI"),K=U("TSYQ"),H=U.n(K),n=U("Gytx"),D=U.n(n),b=U("Kwbf"),m=U("t23M"),f=U("qx4F"),d=U("6eGT"),u=U("IBYe"),c=U("Ff2n"),o=U("c+Xe"),l=U("fyJ8"),a=U("biw7");function i(Pe,Ce,tt,lt,Ke){var Xe=tt[Pe]||{},Se=tt[Ce]||{},ge,Ee;Xe.fixed==="left"?ge=lt.left[Pe]:Se.fixed==="right"&&(Ee=lt.right[Ce]);var ie=!1,ae=!1,he=!1,ve=!1,Te=tt[Ce+1],Ge=tt[Pe-1];if(Ke==="rtl"){if(ge!==void 0){var ot=Ge&&Ge.fixed==="left";ve=!ot}else if(Ee!==void 0){var xt=Te&&Te.fixed==="right";he=!xt}}else if(ge!==void 0){var Ot=Te&&Te.fixed==="left";ie=!Ot}else if(Ee!==void 0){var wt=Ge&&Ge.fixed==="right";ae=!wt}return{fixLeft:ge,fixRight:Ee,lastFixLeft:ie,firstFixRight:ae,lastFixRight:he,firstFixLeft:ve,isSticky:lt.isSticky}}var R=U("sR1s");function S(Pe){var Ce=Pe.cells,tt=Pe.stickyOffsets,lt=Pe.flattenColumns,Ke=Pe.rowComponent,Xe=Pe.cellComponent,Se=Pe.onHeaderRow,ge=Pe.index,Ee=M.useContext(a.a),ie=Ee.prefixCls,ae=Ee.direction,he;Se&&(he=Se(Ce.map(function(Te){return Te.column}),ge));var ve=Object(R.a)(Ce.map(function(Te){return Te.column}));return M.createElement(Ke,Object.assign({},he),Ce.map(function(Te,Ge){var ot=Te.column,xt=i(Te.colStart,Te.colEnd,lt,tt,ae),Ot;return ot&&ot.onHeaderCell&&(Ot=Te.column.onHeaderCell(ot)),M.createElement(l.a,Object.assign({},Te,{ellipsis:ot.ellipsis,align:ot.align,component:Xe,prefixCls:ie,key:ve[Ge]},xt,{additionalProps:Ot,rowType:"header"}))}))}S.displayName="HeaderRow";var T=S;function I(Pe){var Ce=[];function tt(Se,ge){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Ee]=Ce[Ee]||[];var ie=ge,ae=Se.filter(Boolean).map(function(he){var ve={key:he.key,className:he.className||"",children:he.title,column:he,colStart:ie},Te=1,Ge=he.children;return Ge&&Ge.length>0&&(Te=tt(Ge,ie,Ee+1).reduce(function(ot,xt){return ot+xt},0),ve.hasSubColumns=!0),"colSpan"in he&&(Te=he.colSpan),"rowSpan"in he&&(ve.rowSpan=he.rowSpan),ve.colSpan=Te,ve.colEnd=ve.colStart+Te-1,Ce[Ee].push(ve),ie+=Te,Te});return ae}tt(Pe,0);for(var lt=Ce.length,Ke=function(ge){Ce[ge].forEach(function(Ee){!("rowSpan"in Ee)&&!Ee.hasSubColumns&&(Ee.rowSpan=lt-ge)})},Xe=0;Xe<lt;Xe+=1)Ke(Xe);return Ce}function O(Pe){var Ce=Pe.stickyOffsets,tt=Pe.columns,lt=Pe.flattenColumns,Ke=Pe.onHeaderRow,Xe=M.useContext(a.a),Se=Xe.prefixCls,ge=Xe.getComponent,Ee=M.useMemo(function(){return I(tt)},[tt]),ie=ge(["header","wrapper"],"thead"),ae=ge(["header","row"],"tr"),he=ge(["header","cell"],"th");return M.createElement(ie,{className:"".concat(Se,"-thead")},Ee.map(function(ve,Te){var Ge=M.createElement(T,{key:Te,flattenColumns:lt,cells:ve,stickyOffsets:Ce,rowComponent:ae,cellComponent:he,onHeaderRow:Ke,index:Te});return Ge}))}var E=O,y=U("hW8S");function p(Pe){for(var Ce=Pe.colWidths,tt=Pe.columns,lt=Pe.columCount,Ke=[],Xe=lt||tt.length,Se=!1,ge=Xe-1;ge>=0;ge-=1){var Ee=Ce[ge],ie=tt&&tt[ge],ae=ie&&ie[y.a];(Ee||ae||Se)&&(Ke.unshift(M.createElement("col",Object.assign({key:ge,style:{width:Ee,minWidth:Ee}},ae))),Se=!0)}return M.createElement("colgroup",null,Ke)}var h=p;function A(Pe,Ce){return Object(M.useMemo)(function(){for(var tt=[],lt=0;lt<Ce;lt+=1){var Ke=Pe[lt];if(Ke!==void 0)tt[lt]=Ke;else return null}return tt},[Pe.join("_"),Ce])}var _=M.forwardRef(function(Pe,Ce){var tt=Pe.noData,lt=Pe.columns,Ke=Pe.flattenColumns,Xe=Pe.colWidths,Se=Pe.columCount,ge=Pe.stickyOffsets,Ee=Pe.direction,ie=Pe.fixHeader,ae=Pe.offsetHeader,he=Pe.stickyClassName,ve=Pe.onScroll,Te=Object(c.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ge=M.useContext(a.a),ot=Ge.prefixCls,xt=Ge.scrollbarSize,Ot=Ge.isSticky,wt=Ot&&!ie?0:xt,vt=M.useRef(null),qe=M.useCallback(function(Je){Object(o.b)(Ce,Je),Object(o.b)(vt,Je)},[]);M.useEffect(function(){var Je;function mt(We){var it=We.currentTarget,st=We.deltaX;st&&(ve({currentTarget:it,scrollLeft:it.scrollLeft+st}),We.preventDefault())}return(Je=vt.current)===null||Je===void 0||Je.addEventListener("wheel",mt),function(){var We;(We=vt.current)===null||We===void 0||We.removeEventListener("wheel",mt)}},[]);var Qe=Ke[Ke.length-1],Ue={fixed:Qe?Qe.fixed:null,onHeaderCell:function(){return{className:"".concat(ot,"-cell-scrollbar")}}},le=Object(M.useMemo)(function(){return wt?[].concat(Object(N.a)(lt),[Ue]):lt},[wt,lt]),pe=Object(M.useMemo)(function(){return wt?[].concat(Object(N.a)(Ke),[Ue]):Ke},[wt,Ke]),$e=Object(M.useMemo)(function(){var Je=ge.right,mt=ge.left;return Object(z.a)(Object(z.a)({},ge),{},{left:Ee==="rtl"?[].concat(Object(N.a)(mt.map(function(We){return We+wt})),[0]):mt,right:Ee==="rtl"?Je:[].concat(Object(N.a)(Je.map(function(We){return We+wt})),[0]),isSticky:Ot})},[wt,ge,Ot]),je=A(Xe,Se);return M.createElement("div",{style:Object(z.a)({overflow:"hidden"},Ot?{top:ae}:{}),ref:qe,className:H()("".concat(ot,"-header"),Object(Z.a)({},he,!!he))},M.createElement("table",{style:{tableLayout:"fixed",visibility:tt||je?null:"hidden"}},M.createElement(h,{colWidths:je?[].concat(Object(N.a)(je),[wt]):[],columCount:Se+1,columns:pe}),M.createElement(E,Object.assign({},Te,{stickyOffsets:$e,columns:le,flattenColumns:pe}))))});_.displayName="FixedHeader";var v=_,P=M.createContext(null),x=P;function C(Pe){var Ce=Pe.prefixCls,tt=Pe.children,lt=Pe.component,Ke=Pe.cellComponent,Xe=Pe.fixHeader,Se=Pe.fixColumn,ge=Pe.horizonScroll,Ee=Pe.className,ie=Pe.expanded,ae=Pe.componentWidth,he=Pe.colSpan,ve=M.useContext(a.a),Te=ve.scrollbarSize;return M.useMemo(function(){var Ge=tt;return Se&&(Ge=M.createElement("div",{style:{width:ae-(Xe?Te:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Ge)),M.createElement(lt,{className:Ee,style:{display:ie?null:"none"}},M.createElement(l.a,{component:Ke,prefixCls:Ce,colSpan:he},Ge))},[tt,lt,Xe,ge,Ee,ie,ae,he,Te])}var j=C;function B(Pe){var Ce=Pe.className,tt=Pe.style,lt=Pe.record,Ke=Pe.index,Xe=Pe.rowKey,Se=Pe.getRowKey,ge=Pe.rowExpandable,Ee=Pe.expandedKeys,ie=Pe.onRow,ae=Pe.indent,he=ae===void 0?0:ae,ve=Pe.rowComponent,Te=Pe.cellComponent,Ge=Pe.childrenColumnName,ot=M.useContext(a.a),xt=ot.prefixCls,Ot=ot.fixedInfoList,wt=M.useContext(x),vt=wt.fixHeader,qe=wt.fixColumn,Qe=wt.horizonScroll,Ue=wt.componentWidth,le=wt.flattenColumns,pe=wt.expandableType,$e=wt.expandRowByClick,je=wt.onTriggerExpand,Je=wt.rowClassName,mt=wt.expandedRowClassName,We=wt.indentSize,it=wt.expandIcon,st=wt.expandedRowRender,ct=wt.expandIconColumnIndex,bt=M.useState(!1),jt=Object(W.a)(bt,2),en=jt[0],Yt=jt[1],Ct=Ee&&Ee.has(Pe.recordKey);M.useEffect(function(){Ct&&Yt(!0)},[Ct]);var pn=pe==="row"&&(!ge||ge(lt)),Rt=pe==="nest",zt=Ge&&lt&&lt[Ge],Pt=pn||Rt,qt;ie&&(qt=ie(lt,Ke));var yn=function(L){if($e&&Pt&&je(lt,L),qt&&qt.onClick){for(var k,G=arguments.length,te=new Array(G>1?G-1:0),J=1;J<G;J++)te[J-1]=arguments[J];(k=qt).onClick.apply(k,[L].concat(te))}},wn;typeof Je=="string"?wn=Je:typeof Je=="function"&&(wn=Je(lt,Ke,he));var yt=Object(R.a)(le),Vt=M.createElement(ve,Object.assign({},qt,{"data-row-key":Xe,className:H()(Ce,"".concat(xt,"-row"),"".concat(xt,"-row-level-").concat(he),wn,qt&&qt.className),style:Object(z.a)(Object(z.a)({},tt),qt?qt.style:null),onClick:yn}),le.map(function(Q,L){var k=Q.render,G=Q.dataIndex,te=Q.className,J=yt[L],Ie=Ot[L],at;L===(ct||0)&&Rt&&(at=M.createElement(M.Fragment,null,M.createElement("span",{style:{paddingLeft:"".concat(We*he,"px")},className:"".concat(xt,"-row-indent indent-level-").concat(he)}),it({prefixCls:xt,expanded:Ct,expandable:zt,record:lt,onExpand:je})));var St;return Q.onCell&&(St=Q.onCell(lt,Ke)),M.createElement(l.a,Object.assign({className:te,ellipsis:Q.ellipsis,align:Q.align,component:Te,prefixCls:xt,key:J,record:lt,index:Ke,dataIndex:G,render:k,shouldCellUpdate:Q.shouldCellUpdate},Ie,{appendNode:at,additionalProps:St}))})),Mn;if(pn&&(en||Ct)){var Un=st(lt,Ke,he+1,Ct),Pn=mt&&mt(lt,Ke,he);Mn=M.createElement(j,{expanded:Ct,className:H()("".concat(xt,"-expanded-row"),"".concat(xt,"-expanded-row-level-").concat(he+1),Pn),prefixCls:xt,fixHeader:vt,fixColumn:qe,horizonScroll:Qe,component:ve,componentWidth:Ue,cellComponent:Te,colSpan:le.length},Un)}var Vn;return zt&&Ct&&(Vn=(lt[Ge]||[]).map(function(Q,L){var k=Se(Q,L);return M.createElement(B,Object.assign({},Pe,{key:k,rowKey:k,record:Q,recordKey:k,index:L,indent:he+1}))})),M.createElement(M.Fragment,null,Vt,Mn,Vn)}B.displayName="BodyRow";var w=B,Y=M.createContext(null),$=Y;function oe(Pe){var Ce=Pe.columnKey,tt=Pe.onColumnResize,lt=M.useRef();return M.useEffect(function(){lt.current&&tt(Ce,lt.current.offsetWidth)},[]),M.createElement(m.a,{onResize:function(Xe){var Se=Xe.offsetWidth;tt(Ce,Se)}},M.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},M.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Pe){var Ce=Pe.data,tt=Pe.getRowKey,lt=Pe.measureColumnWidth,Ke=Pe.expandedKeys,Xe=Pe.onRow,Se=Pe.rowExpandable,ge=Pe.emptyNode,Ee=Pe.childrenColumnName,ie=M.useContext($),ae=ie.onColumnResize,he=M.useContext(a.a),ve=he.prefixCls,Te=he.getComponent,Ge=M.useContext(x),ot=Ge.fixHeader,xt=Ge.horizonScroll,Ot=Ge.flattenColumns,wt=Ge.componentWidth;return M.useMemo(function(){var vt=Te(["body","wrapper"],"tbody"),qe=Te(["body","row"],"tr"),Qe=Te(["body","cell"],"td"),Ue;Ce.length?Ue=Ce.map(function(pe,$e){var je=tt(pe,$e);return M.createElement(w,{key:je,rowKey:je,record:pe,recordKey:je,index:$e,rowComponent:qe,cellComponent:Qe,expandedKeys:Ke,onRow:Xe,getRowKey:tt,rowExpandable:Se,childrenColumnName:Ee})}):Ue=M.createElement(j,{expanded:!0,className:"".concat(ve,"-placeholder"),prefixCls:ve,fixHeader:ot,fixColumn:xt,horizonScroll:xt,component:qe,componentWidth:wt,cellComponent:Qe,colSpan:Ot.length},ge);var le=Object(R.a)(Ot);return M.createElement(vt,{className:"".concat(ve,"-tbody")},lt&&M.createElement("tr",{"aria-hidden":"true",className:"".concat(ve,"-measure-row"),style:{height:0}},le.map(function(pe){return M.createElement(oe,{key:pe,columnKey:pe,onColumnResize:ae})})),Ue)},[Ce,ve,Xe,lt,Ke,tt,Te,wt,ge,Ot])}var Be=M.memo(de);Be.displayName="Body";var Ae=Be,Re=U("wRmb"),Le=U("xEkU"),Fe=U.n(Le);function me(Pe){var Ce=Object(M.useRef)(Pe),tt=Object(M.useState)({}),lt=Object(W.a)(tt,2),Ke=lt[1],Xe=Object(M.useRef)(null),Se=Object(M.useRef)([]);function ge(Ee){Xe.current===null&&(Se.current=[],Xe.current=Fe()(function(){Se.current.forEach(function(ie){Ce.current=ie(Ce.current)}),Xe.current=null,Ke({})})),Se.current.push(Ee)}return Object(M.useEffect)(function(){return function(){Fe.a.cancel(Xe.current)}},[]),[Ce.current,ge]}function fe(Pe){var Ce=Object(M.useRef)(Pe),tt=Object(M.useRef)(null);function lt(){window.clearTimeout(tt.current)}function Ke(Se){Ce.current=Se,lt(),tt.current=window.setTimeout(function(){Ce.current=null,tt.current=null},100)}function Xe(){return Ce.current}return Object(M.useEffect)(function(){return lt},[]),[Ke,Xe]}function ne(Pe,Ce,tt){var lt=Object(M.useMemo)(function(){for(var Ke=[],Xe=[],Se=0,ge=0,Ee=0;Ee<Ce;Ee+=1)if(tt==="rtl"){Xe[Ee]=ge,ge+=Pe[Ee]||0;var ie=Ce-Ee-1;Ke[ie]=Se,Se+=Pe[ie]||0}else{Ke[Ee]=Se,Se+=Pe[Ee]||0;var ae=Ce-Ee-1;Xe[ae]=ge,ge+=Pe[ae]||0}return{left:Ke,right:Xe}},[Pe,Ce,tt]);return lt}var xe=ne;function ce(Pe){var Ce=Pe.className,tt=Pe.children;return M.createElement("div",{className:Ce},tt)}var Ne=ce,He=U("n6Qo");function ke(Pe){var Ce,tt=Pe.prefixCls,lt=Pe.record,Ke=Pe.onExpand,Xe=Pe.expanded,Se=Pe.expandable,ge="".concat(tt,"-row-expand-icon");if(!Se)return M.createElement("span",{className:H()(ge,"".concat(tt,"-row-spaced"))});var Ee=function(ae){Ke(lt,ae),ae.stopPropagation()};return M.createElement("span",{className:H()(ge,(Ce={},Object(Z.a)(Ce,"".concat(tt,"-row-expanded"),Xe),Object(Z.a)(Ce,"".concat(tt,"-row-collapsed"),!Xe),Ce)),onClick:Ee})}function Ye(Pe,Ce,tt){var lt=[];function Ke(Xe){(Xe||[]).forEach(function(Se,ge){lt.push(Ce(Se,ge)),Ke(Se[tt])})}return Ke(Pe),lt}var et=U("zT1h"),ue=U("y0+3"),_e=function(Ce,tt){var lt,Ke,Xe=Ce.scrollBodyRef,Se=Ce.onScroll,ge=Ce.offsetScroll,Ee=M.useContext(a.a),ie=Ee.prefixCls,ae=((lt=Xe.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,he=((Ke=Xe.current)===null||Ke===void 0?void 0:Ke.clientWidth)||0,ve=ae&&he*(he/ae),Te=M.useRef(),Ge=me({scrollLeft:0,isHiddenScrollBar:!1}),ot=Object(W.a)(Ge,2),xt=ot[0],Ot=ot[1],wt=M.useRef({delta:0,x:0}),vt=M.useState(!1),qe=Object(W.a)(vt,2),Qe=qe[0],Ue=qe[1],le=function(){Ue(!1)},pe=function(We){We.persist(),wt.current.delta=We.pageX-xt.scrollLeft,wt.current.x=0,Ue(!0),We.preventDefault()},$e=function(We){var it,st=We||((it=window)===null||it===void 0?void 0:it.event),ct=st.buttons;if(!Qe||ct===0){Qe&&Ue(!1);return}var bt=wt.current.x+We.pageX-wt.current.x-wt.current.delta;bt<=0&&(bt=0),bt+ve>=he&&(bt=he-ve),Se({scrollLeft:bt/he*(ae+2)}),wt.current.x=We.pageX},je=function(){var We=Object(ue.b)(Xe.current).top,it=We+Xe.current.offsetHeight,st=document.documentElement.scrollTop+window.innerHeight;it-Object(f.a)()<=st||We>=st-ge?Ot(function(ct){return Object(z.a)(Object(z.a)({},ct),{},{isHiddenScrollBar:!0})}):Ot(function(ct){return Object(z.a)(Object(z.a)({},ct),{},{isHiddenScrollBar:!1})})},Je=function(We){Ot(function(it){return Object(z.a)(Object(z.a)({},it),{},{scrollLeft:We/ae*he||0})})};return M.useImperativeHandle(tt,function(){return{setScrollLeft:Je}}),M.useEffect(function(){var mt=Object(et.a)(document.body,"mouseup",le,!1),We=Object(et.a)(document.body,"mousemove",$e,!1);return je(),function(){mt.remove(),We.remove()}},[ve,Qe]),M.useEffect(function(){var mt=Object(et.a)(window,"scroll",je,!1),We=Object(et.a)(window,"resize",je,!1);return function(){mt.remove(),We.remove()}},[]),M.useEffect(function(){xt.isHiddenScrollBar||Ot(function(mt){var We,it;return Object(z.a)(Object(z.a)({},mt),{},{scrollLeft:Xe.current.scrollLeft/((We=Xe.current)===null||We===void 0?void 0:We.scrollWidth)*((it=Xe.current)===null||it===void 0?void 0:it.clientWidth)})})},[xt.isHiddenScrollBar]),ae<=he||!ve||xt.isHiddenScrollBar?null:M.createElement("div",{style:{height:Object(f.a)(),width:he,bottom:ge},className:"".concat(ie,"-sticky-scroll")},M.createElement("div",{onMouseDown:pe,ref:Te,className:H()("".concat(ie,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(ie,"-sticky-scroll-bar-active"),Qe)),style:{width:"".concat(ve,"px"),transform:"translate3d(".concat(xt.scrollLeft,"px, 0, 0)")}}))},Oe=M.forwardRef(_e);function Me(Pe,Ce){return M.useMemo(function(){var tt=!!Pe;return{isSticky:tt,stickyClassName:tt?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(V.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(V.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ce])}var rt=[],dt={},pt="rc-table-internal-hook",ut=M.memo(function(Pe){var Ce=Pe.children;return Ce},function(Pe,Ce){return D()(Pe.props,Ce.props)?Pe.pingLeft!==Ce.pingLeft||Pe.pingRight!==Ce.pingRight:!1});function _t(Pe){var Ce,tt=Pe.prefixCls,lt=Pe.className,Ke=Pe.rowClassName,Xe=Pe.style,Se=Pe.data,ge=Pe.rowKey,Ee=Pe.scroll,ie=Pe.tableLayout,ae=Pe.direction,he=Pe.title,ve=Pe.footer,Te=Pe.summary,Ge=Pe.id,ot=Pe.showHeader,xt=Pe.components,Ot=Pe.emptyText,wt=Pe.onRow,vt=Pe.onHeaderRow,qe=Pe.internalHooks,Qe=Pe.transformColumns,Ue=Pe.internalRefs,le=Pe.sticky,pe=Se||rt,$e=!!pe.length,je=M.useState(0),Je=Object(W.a)(je,2),mt=Je[0],We=Je[1];M.useEffect(function(){We(Object(f.a)())});var it=M.useMemo(function(){return Object(R.c)(xt,{})},[xt]),st=M.useCallback(function(xn,gn){return Object(R.b)(it,xn)||gn},[it]),ct=M.useMemo(function(){return typeof ge=="function"?ge:function(xn){var gn=xn&&xn[ge];return gn}},[ge]),bt=Object(y.c)(Pe),jt=bt.expandIcon,en=bt.expandedRowKeys,Yt=bt.defaultExpandedRowKeys,Ct=bt.defaultExpandAllRows,pn=bt.expandedRowRender,Rt=bt.onExpand,zt=bt.onExpandedRowsChange,Pt=bt.expandRowByClick,qt=bt.rowExpandable,yn=bt.expandIconColumnIndex,wn=bt.expandedRowClassName,yt=bt.childrenColumnName,Vt=bt.indentSize,Mn=jt||ke,Un=yt||"children",Pn=M.useMemo(function(){return pn?"row":Pe.expandable&&qe===pt&&Pe.expandable.__PARENT_RENDER_ICON__||pe.some(function(xn){return xn&&Object(V.a)(xn)==="object"&&xn[Un]})?"nest":!1},[!!pn,pe]),Vn=M.useState(function(){return Yt||(Ct?Ye(pe,ct,Un):[])}),Q=Object(W.a)(Vn,2),L=Q[0],k=Q[1],G=M.useMemo(function(){return new Set(en||L||[])},[en,L]),te=M.useCallback(function(xn){var gn=ct(xn,pe.indexOf(xn)),En,$n=G.has(gn);$n?(G.delete(gn),En=Object(N.a)(G)):En=[].concat(Object(N.a)(G),[gn]),k(En),Rt&&Rt(!$n,xn),zt&&zt(En)},[ct,G,pe,Rt,zt]),J=M.useState(0),Ie=Object(W.a)(J,2),at=Ie[0],St=Ie[1],Ft=Object(Re.b)(Object(z.a)(Object(z.a)(Object(z.a)({},Pe),bt),{},{expandable:!!pn,expandedKeys:G,getRowKey:ct,onTriggerExpand:te,expandIcon:Mn,expandIconColumnIndex:yn,direction:ae}),qe===pt?Qe:null),ye=Object(W.a)(Ft,2),Ut=ye[0],$t=ye[1],Sn=M.useMemo(function(){return{columns:Ut,flattenColumns:$t}},[Ut,$t]),Hn=M.useRef(),Kn=M.useRef(),In=M.useRef(),pr=M.useState(!1),ur=Object(W.a)(pr,2),Bn=ur[0],cr=ur[1],Ar=M.useState(!1),Cr=Object(W.a)(Ar,2),Yn=Cr[0],Wr=Cr[1],Pr=me(new Map),yr=Object(W.a)(Pr,2),Qr=yr[0],br=yr[1],dr=Object(R.a)($t),Nr=dr.map(function(xn){return Qr.get(xn)}),Hr=M.useMemo(function(){return Nr},[Nr.join("_")]),Er=xe(Hr,$t.length,ae),_n=Ee&&Object(R.d)(Ee.y),sn=Ee&&Object(R.d)(Ee.x),Ln=sn&&$t.some(function(xn){var gn=xn.fixed;return gn}),un=M.useRef(),Rn=Me(le,tt),bn=Rn.isSticky,Or=Rn.offsetHeader,jn=Rn.offsetScroll,Xn=Rn.stickyClassName,Kr,Rr,Gr;_n&&(Rr={overflowY:"scroll",maxHeight:Ee.y}),sn&&(Kr={overflowX:"auto"},_n||(Rr={overflowY:"hidden"}),Gr={width:Ee.x===!0?"auto":Ee.x,minWidth:"100%"});var Ir=M.useCallback(function(xn,gn){br(function(En){var $n=new Map(En);return $n.set(xn,gn),$n})},[]),Dr=fe(null),jr=Object(W.a)(Dr,2),_r=jr[0],zr=jr[1];function Jr(xn,gn){if(!gn)return;typeof gn=="function"?gn(xn):gn.scrollLeft!==xn&&(gn.scrollLeft=xn)}var sr=function(gn){var En=gn.currentTarget,$n=gn.scrollLeft,qr=typeof $n=="number"?$n:En.scrollLeft,Vr=En||dt;if(!zr()||zr()===Vr){var $r;_r(Vr),Jr(qr,Kn.current),Jr(qr,In.current),Jr(qr,($r=un.current)===null||$r===void 0?void 0:$r.setScrollLeft)}if(En){var Ai=En.scrollWidth,Gi=En.clientWidth;cr(qr>0),Wr(qr<Ai-Gi)}},ri=function(){In.current&&sr({currentTarget:In.current})},Gt=function(gn){var En=gn.width;ri(),St(Hn.current?Hn.current.offsetWidth:En)};M.useEffect(function(){return ri},[]),M.useEffect(function(){sn&&ri()},[sn]),M.useEffect(function(){qe===pt&&Ue&&(Ue.body.current=In.current)});var tn=st(["table"],"table"),Xt=M.useMemo(function(){return ie||(Ln?Ee.x==="max-content"?"auto":"fixed":_n||$t.some(function(xn){var gn=xn.ellipsis;return gn})?"fixed":"auto")},[_n,Ln,$t,ie]),on,dn={colWidths:Hr,columCount:$t.length,stickyOffsets:Er,onHeaderRow:vt,fixHeader:_n},An=M.useMemo(function(){return $e?null:typeof Ot=="function"?Ot():Ot},[$e,Ot]),hn=M.createElement(Ae,{data:pe,measureColumnWidth:_n||sn||bn,expandedKeys:G,rowExpandable:qt,getRowKey:ct,onRow:wt,emptyNode:An,childrenColumnName:Un}),kn=M.createElement(h,{colWidths:$t.map(function(xn){var gn=xn.width;return gn}),columns:$t}),qn=Te&&M.createElement(He.b,null,Te(pe)),ln=st(["body"]);if(_n||bn){var rn;typeof ln=="function"?(rn=ln(pe,{scrollbarSize:mt,ref:In,onScroll:sr}),dn.colWidths=$t.map(function(xn,gn){var En=xn.width,$n=gn===Ut.length-1?En-mt:En;return typeof $n=="number"&&!Number.isNaN($n)?$n:(Object(b.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):rn=M.createElement("div",{style:Object(z.a)(Object(z.a)({},Kr),Rr),onScroll:sr,ref:In,className:H()("".concat(tt,"-body"))},M.createElement(tn,{style:Object(z.a)(Object(z.a)({},Gr),{},{tableLayout:Xt})},kn,hn,qn),bn&&M.createElement(Oe,{ref:un,offsetScroll:jn,scrollBodyRef:In,onScroll:sr})),on=M.createElement(M.Fragment,null,ot!==!1&&M.createElement(v,Object.assign({noData:!pe.length},dn,Sn,{direction:ae,offsetHeader:Or,stickyClassName:Xn,ref:Kn,onScroll:sr})),rn)}else on=M.createElement("div",{style:Object(z.a)(Object(z.a)({},Kr),Rr),className:H()("".concat(tt,"-content")),onScroll:sr,ref:In},M.createElement(tn,{style:Object(z.a)(Object(z.a)({},Gr),{},{tableLayout:Xt})},kn,ot!==!1&&M.createElement(E,Object.assign({},dn,Sn)),hn,qn));var mn=Object(y.b)(Pe),Qn=M.createElement("div",Object.assign({className:H()(tt,lt,(Ce={},Object(Z.a)(Ce,"".concat(tt,"-rtl"),ae==="rtl"),Object(Z.a)(Ce,"".concat(tt,"-ping-left"),Bn),Object(Z.a)(Ce,"".concat(tt,"-ping-right"),Yn),Object(Z.a)(Ce,"".concat(tt,"-layout-fixed"),ie==="fixed"),Object(Z.a)(Ce,"".concat(tt,"-fixed-header"),_n),Object(Z.a)(Ce,"".concat(tt,"-fixed-column"),Ln),Object(Z.a)(Ce,"".concat(tt,"-scroll-horizontal"),sn),Object(Z.a)(Ce,"".concat(tt,"-has-fix-left"),$t[0]&&$t[0].fixed),Object(Z.a)(Ce,"".concat(tt,"-has-fix-right"),$t[$t.length-1]&&$t[$t.length-1].fixed==="right"),Ce)),style:Xe,id:Ge,ref:Hn},mn),M.createElement(ut,{pingLeft:Bn,pingRight:Yn,props:Object(z.a)(Object(z.a)({},Pe),{},{stickyOffsets:Er,mergedExpandedKeys:G})},he&&M.createElement(Ne,{className:"".concat(tt,"-title")},he(pe)),M.createElement("div",{className:"".concat(tt,"-container")},on),ve&&M.createElement(Ne,{className:"".concat(tt,"-footer")},ve(pe))));sn&&(Qn=M.createElement(m.a,{onResize:Gt},Qn));var Gn=M.useMemo(function(){return{prefixCls:tt,getComponent:st,scrollbarSize:mt,direction:ae,fixedInfoList:$t.map(function(xn,gn){return i(gn,gn,$t,Er,ae)}),isSticky:bn}},[tt,st,mt,ae,$t,Er,ae,bn]),an=M.useMemo(function(){return Object(z.a)(Object(z.a)({},Sn),{},{tableLayout:Xt,rowClassName:Ke,expandedRowClassName:wn,componentWidth:at,fixHeader:_n,fixColumn:Ln,horizonScroll:sn,expandIcon:Mn,expandableType:Pn,expandRowByClick:Pt,expandedRowRender:pn,onTriggerExpand:te,expandIconColumnIndex:yn,indentSize:Vt})},[Sn,Xt,Ke,wn,at,_n,Ln,sn,Mn,Pn,Pt,pn,te,yn,Vt]),Zr=M.useMemo(function(){return{onColumnResize:Ir}},[Ir]);return M.createElement(a.a.Provider,{value:Gn},M.createElement(x.Provider,{value:an},M.createElement($.Provider,{value:Zr},Qn)))}_t.Column=u.a,_t.ColumnGroup=d.a,_t.Summary=He.a,_t.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Tt=se.b=_t},wRmb:function(Ve,se,U){"use strict";U.d(se,"a",function(){return D});var Z=U("rePB"),z=U("KQm4"),N=U("VTBJ"),V=U("Ff2n"),W=U("q1tI"),M=U.n(W),K=U("Kwbf"),H=U("Zm9Q"),n=U("hW8S");function D(u){return Object(H.a)(u).filter(function(c){return W.isValidElement(c)}).map(function(c){var o=c.key,l=c.props,a=l.children,i=Object(V.a)(l,["children"]),R=Object(N.a)({key:o},i);return a&&(R.children=D(a)),R})}function b(u){return u.reduce(function(c,o){var l=o.fixed,a=l===!0?"left":l,i=o.children;return i&&i.length>0?[].concat(Object(z.a)(c),Object(z.a)(b(i).map(function(R){return Object(N.a)({fixed:a},R)}))):[].concat(Object(z.a)(c),[Object(N.a)(Object(N.a)({},o),{},{fixed:a})])},[])}function m(u){for(var c=!0,o=0;o<u.length;o+=1){var l=u[o];if(c&&l.fixed!=="left")c=!1;else if(!c&&l.fixed==="left"){Object(K.a)(!1,"Index ".concat(o-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,i=u.length-1;i>=0;i-=1){var R=u[i];if(a&&R.fixed!=="right")a=!1;else if(!a&&R.fixed==="right"){Object(K.a)(!1,"Index ".concat(i+1," of `columns` missing `fixed='right'` prop."));break}}}function f(u){return u.map(function(c){var o=c.fixed,l=Object(V.a)(c,["fixed"]),a=o;return o==="left"?a="right":o==="right"&&(a="left"),Object(N.a)({fixed:a},l)})}function d(u,c){var o=u.prefixCls,l=u.columns,a=u.children,i=u.expandable,R=u.expandedKeys,S=u.getRowKey,T=u.onTriggerExpand,I=u.expandIcon,O=u.rowExpandable,E=u.expandIconColumnIndex,y=u.direction,p=u.expandRowByClick,h=W.useMemo(function(){return l||D(a)},[l,a]),A=W.useMemo(function(){if(i){var P,x=E||0,C=h[x],j=(P={},Object(Z.a)(P,n.a,{className:"".concat(o,"-expand-icon-col")}),Object(Z.a)(P,"title",""),Object(Z.a)(P,"fixed",C?C.fixed:null),Object(Z.a)(P,"className","".concat(o,"-row-expand-icon-cell")),Object(Z.a)(P,"render",function(Y,$,oe){var de=S($,oe),Be=R.has(de),Ae=O?O($):!0,Re=I({prefixCls:o,expanded:Be,expandable:Ae,record:$,onExpand:T});return p?W.createElement("span",{onClick:function(Fe){return Fe.stopPropagation()}},Re):Re}),P),B=h.slice();return x>=0&&B.splice(x,0,j),B}return h},[i,h,S,R,I,y]),_=W.useMemo(function(){var P=A;return c&&(P=c(P)),P.length||(P=[{render:function(){return null}}]),P},[c,A,y]),v=W.useMemo(function(){return y==="rtl"?f(b(_)):b(_)},[_,y]);return[_,v]}se.b=d},"y0+3":function(Ve,se,U){"use strict";U.d(se,"a",function(){return b}),U.d(se,"b",function(){return f});var Z=/margin|padding|width|height|max|min|offset/,z={left:!0,top:!0},N={cssFloat:1,styleFloat:1,float:1};function V(d){return d.nodeType===1?d.ownerDocument.defaultView.getComputedStyle(d,null):{}}function W(d,u,c){if(u=u.toLowerCase(),c==="auto"){if(u==="height")return d.offsetHeight;if(u==="width")return d.offsetWidth}return u in z||(z[u]=Z.test(u)),z[u]?parseFloat(c)||0:c}function M(d,u){var c=arguments.length,o=V(d);return u=N[u]?"cssFloat"in d.style?"cssFloat":"styleFloat":u,c===1?o:W(d,u,o[u]||d.style[u])}function K(d,u,c){var o=arguments.length;if(u=N[u]?"cssFloat"in d.style?"cssFloat":"styleFloat":u,o===3)return typeof c=="number"&&Z.test(u)&&(c="".concat(c,"px")),d.style[u]=c,c;for(var l in u)u.hasOwnProperty(l)&&K(d,l,u[l]);return V(d)}function H(d){return d===document.body?document.documentElement.clientWidth:d.offsetWidth}function n(d){return d===document.body?window.innerHeight||document.documentElement.clientHeight:d.offsetHeight}function D(){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),u=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:d,height:u}}function b(){var d=document.documentElement.clientWidth,u=window.innerHeight||document.documentElement.clientHeight;return{width:d,height:u}}function m(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function f(d){var u=d.getBoundingClientRect(),c=document.documentElement;return{left:u.left+(window.pageXOffset||c.scrollLeft)-(c.clientLeft||document.body.clientLeft||0),top:u.top+(window.pageYOffset||c.scrollTop)-(c.clientTop||document.body.clientTop||0)}}},yslc:function(Ve,se){Ve.exports="data:image/png;base64,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"}}]);