(window.webpackJsonp=window.webpackJsonp||[]).push([[202,3,5,6,7,8,9,11,13,17,20],{"+NIl":function(Ie,oe,C){(function(q){q(C("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(K,I){"use strict";function k(s,a){s.cmdState.push(a)}function E(s){return s.cmdState.length>0?s.cmdState[s.cmdState.length-1]:null}function B(s){var a=s.cmdState.pop();a&&a.closeBracket()}function M(s){for(var a=s.cmdState,o=a.length-1;o>=0;o--){var d=a[o];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function x(s,a,o){return function(){this.name=s,this.bracketNo=0,this.style=a,this.styles=o,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var T={};T.importmodule=x("importmodule","tag",["string","builtin"]),T.documentclass=x("documentclass","tag",["","atom"]),T.usepackage=x("usepackage","tag",["atom"]),T.begin=x("begin","tag",["atom"]),T.end=x("end","tag",["atom"]),T.label=x("label","tag",["atom"]),T.ref=x("ref","tag",["atom"]),T.eqref=x("eqref","tag",["atom"]),T.cite=x("cite","tag",["atom"]),T.bibitem=x("bibitem","tag",["atom"]),T.Bibitem=x("Bibitem","tag",["atom"]),T.RBibitem=x("RBibitem","tag",["atom"]),T.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(s,a){s.f=a}function r(s,a){var o;if(s.match(/^\\[a-zA-Z@]+/)){var d=s.current().slice(1);return o=T.hasOwnProperty(d)?T[d]:T.DEFAULT,o=new o,k(a,o),p(a,c),o.style}if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/\\]/))return"tag";if(s.match("\\["))return p(a,function(l,m){return t(l,m,"\\]")}),"keyword";if(s.match("\\("))return p(a,function(l,m){return t(l,m,"\\)")}),"keyword";if(s.match("$$"))return p(a,function(l,m){return t(l,m,"$$")}),"keyword";if(s.match("$"))return p(a,function(l,m){return t(l,m,"$")}),"keyword";var A=s.next();if(A=="%")return s.skipToEnd(),"comment";if(A=="}"||A=="]"){if(o=E(a),o)o.closeBracket(A),p(a,c);else return"error";return"bracket"}else return A=="{"||A=="["?(o=T.DEFAULT,o=new o,k(a,o),"bracket"):/\d/.test(A)?(s.eatWhile(/[\w.%]/),"atom"):(s.eatWhile(/[\w\-_]/),o=M(a),o.name=="begin"&&(o.argument=s.current()),o.styleIdentifier())}function t(s,a,o){if(s.eatSpace())return null;if(o&&s.match(o))return p(a,r),"keyword";if(s.match(/^\\[a-zA-Z@]+/))return"tag";if(s.match(/^[a-zA-Z]+/))return"variable-2";if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/]/))return"tag";if(s.match(/^[\^_&]/))return"tag";if(s.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(s.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=s.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(s.skipToEnd(),"comment"):"error"}function c(s,a){var o=s.peek(),d;return o=="{"||o=="["?(d=E(a),d.openBracket(o),s.eat(o),p(a,r),"bracket"):/[ \t\r]/.test(o)?(s.eat(o),null):(p(a,r),B(a),r(s,a))}return{startState:function(){var s=I.inMathMode?function(a,o){return t(a,o)}:r;return{cmdState:[],f:s}},copyState:function(s){return{cmdState:s.cmdState.slice(),f:s.f}},token:function(s,a){return a.f(s,a)},blankLine:function(s){s.f=r,s.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"+QRC":function(Ie,oe,C){"use strict";var q=C("E9nw"),K={"text/plain":"Text","text/html":"Url",default:"Text"},I="Copy to clipboard: #{key}, Enter";function k(B){var M=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return B.replace(/#{\s*key\s*}/g,M)}function E(B,M){var x,T,p,r,t,c,s=!1;M||(M={}),x=M.debug||!1;try{p=q(),r=document.createRange(),t=document.getSelection(),c=document.createElement("span"),c.textContent=B,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(o){if(o.stopPropagation(),M.format)if(o.preventDefault(),typeof o.clipboardData=="undefined"){x&&console.warn("unable to use e.clipboardData"),x&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=K[M.format]||K.default;window.clipboardData.setData(d,B)}else o.clipboardData.clearData(),o.clipboardData.setData(M.format,B);M.onCopy&&(o.preventDefault(),M.onCopy(o.clipboardData))}),document.body.appendChild(c),r.selectNodeContents(c),t.addRange(r);var a=document.execCommand("copy");if(!a)throw new Error("copy command was unsuccessful");s=!0}catch(o){x&&console.error("unable to copy using execCommand: ",o),x&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(M.format||"text",B),M.onCopy&&M.onCopy(window.clipboardData),s=!0}catch(d){x&&console.error("unable to copy using clipboardData: ",d),x&&console.error("falling back to prompt"),T=k("message"in M?M.message:I),window.prompt(T,B)}}finally{t&&(typeof t.removeRange=="function"?t.removeRange(r):t.removeAllRanges()),c&&document.body.removeChild(c),p()}return s}Ie.exports=E},"+ua5":function(Ie,oe,C){},"/GNS":function(Ie,oe,C){Ie.exports=C.p+"static/search1.c4136dd4.png"},"06Qe":function(Ie,oe,C){var q=C("ItGF"),K="urn:schemas-microsoft-com:vml",I=typeof window=="undefined"?null:window,k=!1,E=I&&I.document;function B(T){return M(T)}var M;if(E&&!q.canvasSupported)try{!E.namespaces.zrvml&&E.namespaces.add("zrvml",K),M=function(T){return E.createElement("')}}catch(T){M=function(p){return E.createElement("<"+p+' xmlns="'+K+'" class="zrvml">')}}function x(){if(k||!E)return;k=!0;var T=E.styleSheets;T.length<31?E.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):T[0].addRule(".zrvml","behavior:url(#default#VML)")}oe.doc=E,oe.createNode=B,oe.initVML=x},"07cG":function(Ie,oe,C){Ie.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0s+r":function(Ie,oe,C){var q=C("bYtY"),K=C("QBsz"),I=C("y23F"),k=C("H6uX"),E=C("YH21"),B=C("C0SR"),M="silent";function x(o,d,A){return{type:o,event:A,target:d.target,topTarget:d.topTarget,cancelBubble:!1,offsetX:A.zrX,offsetY:A.zrY,gestureEvent:A.gestureEvent,pinchX:A.pinchX,pinchY:A.pinchY,pinchScale:A.pinchScale,wheelDelta:A.zrDelta,zrByTouch:A.zrByTouch,which:A.which,stop:T}}function T(){E.stop(this.event)}function p(){}p.prototype.dispose=function(){};var r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=function(o,d,A,l){k.call(this),this.storage=o,this.painter=d,this.painterRoot=l,A=A||new p,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,I.call(this),this.setHandlerProxy(A)};t.prototype={constructor:t,setHandlerProxy:function(o){this.proxy&&this.proxy.dispose(),o&&(q.each(r,function(d){o.on&&o.on(d,this[d],this)},this),o.handler=this),this.proxy=o},mousemove:function(o){var d=o.zrX,A=o.zrY,l=s(this,d,A),m=this._hovered,_=m.target;_&&!_.__zr&&(m=this.findHover(m.x,m.y),_=m.target);var R=this._hovered=l?{x:d,y:A}:this.findHover(d,A),w=R.target,L=this.proxy;L.setCursor&&L.setCursor(w?w.cursor:"default"),_&&w!==_&&this.dispatchToElement(m,"mouseout",o),this.dispatchToElement(R,"mousemove",o),w&&w!==_&&this.dispatchToElement(R,"mouseover",o)},mouseout:function(o){var d=o.zrEventControl,A=o.zrIsToLocalDOM;d!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",o),d!=="no_globalout"&&(!A&&this.trigger("globalout",{type:"globalout",event:o}))},resize:function(o){this._hovered={}},dispatch:function(o,d){var A=this[o];A&&A.call(this,d)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(o){var d=this.proxy;d.setCursor&&d.setCursor(o)},dispatchToElement:function(o,d,A){o=o||{};var l=o.target;if(l&&l.silent)return;for(var m="on"+d,_=x(d,o,A);l&&!(l[m]&&(_.cancelBubble=l[m].call(l,_)),l.trigger(d,_),l=l.parent,_.cancelBubble););_.cancelBubble||(this.trigger(d,_),this.painter&&this.painter.eachOtherLayer(function(R){typeof R[m]=="function"&&R[m].call(R,_),R.trigger&&R.trigger(d,_)}))},findHover:function(o,d,A){for(var l=this.storage.getDisplayList(),m={x:o,y:d},_=l.length-1;_>=0;_--){var R;if(l[_]!==A&&!l[_].ignore&&(R=c(l[_],o,d))&&(!m.topTarget&&(m.topTarget=l[_]),R!==M)){m.target=l[_];break}}return m},processGesture:function(o,d){this._gestureMgr||(this._gestureMgr=new B);var A=this._gestureMgr;d==="start"&&A.clear();var l=A.recognize(o,this.findHover(o.zrX,o.zrY,null).target,this.proxy.dom);if(d==="end"&&A.clear(),l){var m=l.type;o.gestureEvent=m,this.dispatchToElement({target:l.target},m,l.event)}}},q.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(o){t.prototype[o]=function(d){var A=d.zrX,l=d.zrY,m=s(this,A,l),_,R;if((o!=="mouseup"||!m)&&(_=this.findHover(A,l),R=_.target),o==="mousedown")this._downEl=R,this._downPoint=[d.zrX,d.zrY],this._upEl=R;else if(o==="mouseup")this._upEl=R;else if(o==="click"){if(this._downEl!==this._upEl||!this._downPoint||K.dist(this._downPoint,[d.zrX,d.zrY])>4)return;this._downPoint=null}this.dispatchToElement(_,o,d)}});function c(o,d,A){if(o[o.rectHover?"rectContain":"contain"](d,A)){for(var l=o,m;l;){if(l.clipPath&&!l.clipPath.contain(d,A))return!1;l.silent&&(m=!0),l=l.parent}return m?M:!0}return!1}function s(o,d,A){var l=o.painter;return d<0||d>l.getWidth()||A<0||A>l.getHeight()}q.mixin(t,k),q.mixin(t,I);var a=t;Ie.exports=a},"19Vz":function(Ie,oe,C){(function(q){q(C("VrN/"))})(function(q){q.defineOption("placeholder","",function(x,T,p){var r=p&&p!=q.Init;if(T&&!r)x.on("blur",E),x.on("change",B),x.on("swapDoc",B),q.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){k(x)}),B(x);else if(!T&&r){x.off("blur",E),x.off("change",B),x.off("swapDoc",B),q.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),K(x);var t=x.getWrapperElement();t.className=t.className.replace(" CodeMirror-empty","")}T&&!x.hasFocus()&&E(x)});function K(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function I(x){K(x);var T=x.state.placeholder=document.createElement("pre");T.style.cssText="height: 0; overflow: visible",T.style.direction=x.getOption("direction"),T.className="CodeMirror-placeholder CodeMirror-line-like";var p=x.getOption("placeholder");typeof p=="string"&&(p=document.createTextNode(p)),T.appendChild(p),x.display.lineSpace.insertBefore(T,x.display.lineSpace.firstChild)}function k(x){setTimeout(function(){var T=!1,p=x.getInputField();p.nodeName=="TEXTAREA"?T=!p.value:x.lineCount()==1&&(T=!/[^\u200b]/.test(p.querySelector(".CodeMirror-line").textContent)),T?I(x):K(x)},20)}function E(x){M(x)&&I(x)}function B(x){var T=x.getWrapperElement(),p=M(x);T.className=T.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?I(x):K(x)}function M(x){return x.lineCount()===1&&x.getLine(0)===""}})},"1Jh7":function(Ie,oe,C){var q=C("y+Vt"),K=C("T6xi"),I=q.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(k,E){K.buildPath(k,E,!1)}});Ie.exports=I},"1MYJ":function(Ie,oe,C){var q=C("y+Vt"),K=q.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var I=this.__dirtyPath,k=this.shape.paths,E=0;E=this._maxSize&&r>0){var c=x.head;x.remove(c),delete T[c.key],p=c.value,this._lastRemovedEntry=c}t?t.value=M:t=new K(M),t.key=B,x.insertEntry(t),T[B]=t}return p},k.get=function(B){var M=this._map[B],x=this._list;if(M!=null)return M!==x.tail&&(x.remove(M),x.insertEntry(M)),M.value},k.clear=function(){this._list.clear(),this._map={}};var E=I;Ie.exports=E},"1ZF9":function(Ie,oe,C){Ie.exports=C.p+"static/Authorize.cc9c212f.png"},"1bdT":function(Ie,oe,C){var q=C("3gBT"),K=C("H6uX"),I=C("DN4a"),k=C("vWvF"),E=C("bYtY"),B=function(x){I.call(this,x),K.call(this,x),k.call(this,x),this.id=x.id||q()};B.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(x,T){switch(this.draggable){case"horizontal":T=0;break;case"vertical":x=0;break}var p=this.transform;p||(p=this.transform=[1,0,0,1,0,0]),p[4]+=x,p[5]+=T,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(x,T){},attrKV:function(x,T){if(x==="position"||x==="scale"||x==="origin"){if(T){var p=this[x];p||(p=this[x]=[]),p[0]=T[0],p[1]=T[1]}}else this[x]=T},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(x,T){if(typeof x=="string")this.attrKV(x,T);else if(E.isObject(x))for(var p in x)x.hasOwnProperty(p)&&this.attrKV(p,x[p]);return this.dirty(!1),this},setClipPath:function(x){var T=this.__zr;T&&x.addSelfToZr(T),this.clipPath&&this.clipPath!==x&&this.removeClipPath(),this.clipPath=x,x.__zr=T,x.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var x=this.clipPath;x&&(x.__zr&&x.removeSelfFromZr(x.__zr),x.__zr=null,x.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(x){this.__zr=x;var T=this.animators;if(T)for(var p=0;p")):null:f.match("--")?h(a("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),h(o(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),y.tokenize=a("meta","?>"),"meta"):(p=f.eat("/")?"closeTag":"openTag",y.tokenize=c,"tag bracket");if(v=="&"){var P;return f.eat("#")?f.eat("x")?P=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):P=f.eatWhile(/[\d]/)&&f.eat(";"):P=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),P?"atom":"error"}else return f.eatWhile(/[^&<]/),null}t.isInText=!0;function c(f,y){var h=f.next();if(h==">"||h=="/"&&f.eat(">"))return y.tokenize=t,p=h==">"?"endTag":"selfcloseTag","tag bracket";if(h=="=")return p="equals",null;if(h=="<"){y.tokenize=t,y.state=m,y.tagName=y.tagStart=null;var v=y.tokenize(f,y);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(h)?(y.tokenize=s(h),y.stringStartCol=f.column(),y.tokenize(f,y)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(f){var y=function(h,v){for(;!h.eol();)if(h.next()==f){v.tokenize=c;break}return"string"};return y.isInAttribute=!0,y}function a(f,y){return function(h,v){for(;!h.eol();){if(h.match(y)){v.tokenize=t;break}h.next()}return f}}function o(f){return function(y,h){for(var v;(v=y.next())!=null;){if(v=="<")return h.tokenize=o(f+1),h.tokenize(y,h);if(v==">")if(f==1){h.tokenize=t;break}else return h.tokenize=o(f-1),h.tokenize(y,h)}return"meta"}}function d(f,y,h){this.prev=f.context,this.tagName=y,this.indent=f.indented,this.startOfLine=h,(M.doNotIndent.hasOwnProperty(y)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function A(f){f.context&&(f.context=f.context.prev)}function l(f,y){for(var h;;){if(!f.context)return;if(h=f.context.tagName,!M.contextGrabbers.hasOwnProperty(h)||!M.contextGrabbers[h].hasOwnProperty(y))return;A(f)}}function m(f,y,h){return f=="openTag"?(h.tagStart=y.column(),_):f=="closeTag"?R:m}function _(f,y,h){return f=="word"?(h.tagName=y.current(),r="tag",b):M.allowMissingTagName&&f=="endTag"?(r="tag bracket",b(f,y,h)):(r="error",_)}function R(f,y,h){if(f=="word"){var v=y.current();return h.context&&h.context.tagName!=v&&M.implicitlyClosed.hasOwnProperty(h.context.tagName)&&A(h),h.context&&h.context.tagName==v||M.matchClosing===!1?(r="tag",w):(r="tag error",L)}else return M.allowMissingTagName&&f=="endTag"?(r="tag bracket",w(f,y,h)):(r="error",L)}function w(f,y,h){return f!="endTag"?(r="error",w):(A(h),m)}function L(f,y,h){return r="error",w(f,y,h)}function b(f,y,h){if(f=="word")return r="attribute",g;if(f=="endTag"||f=="selfcloseTag"){var v=h.tagName,P=h.tagStart;return h.tagName=h.tagStart=null,f=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(v)?l(h,v):(l(h,v),h.context=new d(h,v,P==h.indented)),m}return r="error",b}function g(f,y,h){return f=="equals"?i:(M.allowMissing||(r="error"),b(f,y,h))}function i(f,y,h){return f=="string"?u:f=="word"&&M.allowUnquoted?(r="string",b):(r="error",b(f,y,h))}function u(f,y,h){return f=="string"?u:b(f,y,h)}return{startState:function(f){var y={tokenize:t,state:m,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(y.baseIndent=f),y},token:function(f,y){if(!y.tagName&&f.sol()&&(y.indented=f.indentation()),f.eatSpace())return null;p=null;var h=y.tokenize(f,y);return(h||p)&&h!="comment"&&(r=null,y.state=y.state(p||h,f,y),r&&(h=r=="error"?h+" error":r)),h},indent:function(f,y,h){var v=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+B;if(v&&v.noIndent)return q.Pass;if(f.tokenize!=c&&f.tokenize!=t)return h?h.match(/^(\s*)/)[0].length:0;if(f.tagName)return M.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+B*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/$/,blockCommentStart:"",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(f){f.state==i&&(f.state=b)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var y=[],h=f.context;h;h=h.prev)h.tagName&&y.push(h.tagName);return y.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Ie,oe,C){"use strict";C.d(oe,"d",function(){return bt}),C.d(oe,"b",function(){return Ge}),C.d(oe,"c",function(){return Lt}),C.d(oe,"a",function(){return Jt});var q=C("VTBJ"),K=C("1OyB"),I=C("vuIU"),k=C("JX7q"),E=C("Ji7U"),B=C("LK+K"),M=C("q1tI"),x=C("I8Z2"),T=C("BGR+"),p=C("wx14"),r=C("rePB"),t=C("4IlW"),c=C("2GS6"),s=C("Gytx"),a=C.n(s),o=C("TSYQ"),d=C.n(o),A=C("U8pU"),l=C("ODXe"),m=/iPhone/i,_=/iPod/i,R=/iPad/i,w=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,b=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,i=/Windows Phone/i,u=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,y=/BB10/i,h=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i;function N(Et,pt){return Et.test(pt)}function Q(Et){var pt=Et||(typeof navigator!="undefined"?navigator.userAgent:""),Xe=pt.split("[FBAN");if(typeof Xe[1]!="undefined"){var Fe=Xe,Te=Object(l.a)(Fe,1);pt=Te[0]}if(Xe=pt.split("Twitter"),typeof Xe[1]!="undefined"){var Ne=Xe,xt=Object(l.a)(Ne,1);pt=xt[0]}var vt={apple:{phone:N(m,pt)&&!N(i,pt),ipod:N(_,pt),tablet:!N(m,pt)&&N(R,pt)&&!N(i,pt),device:(N(m,pt)||N(_,pt)||N(R,pt))&&!N(i,pt)},amazon:{phone:N(b,pt),tablet:!N(b,pt)&&N(g,pt),device:N(b,pt)||N(g,pt)},android:{phone:!N(i,pt)&&N(b,pt)||!N(i,pt)&&N(w,pt),tablet:!N(i,pt)&&!N(b,pt)&&!N(w,pt)&&(N(g,pt)||N(L,pt)),device:!N(i,pt)&&(N(b,pt)||N(g,pt)||N(w,pt)||N(L,pt))||N(/\bokhttp\b/i,pt)},windows:{phone:N(i,pt),tablet:N(u,pt),device:N(i,pt)||N(u,pt)},other:{blackberry:N(f,pt),blackberry10:N(y,pt),opera:N(h,pt),firefox:N(P,pt),chrome:N(v,pt),device:N(f,pt)||N(y,pt)||N(h,pt)||N(P,pt)||N(v,pt)},any:null,phone:null,tablet:null};return vt.any=vt.apple.device||vt.android.device||vt.windows.device||vt.other.device,vt.phone=vt.apple.phone||vt.android.phone||vt.windows.phone,vt.tablet=vt.apple.tablet||vt.android.tablet||vt.windows.tablet,vt}var G=Object(q.a)(Object(q.a)({},Q()),{},{isMobile:Q}),F=G;function D(){}function z(Et,pt,Xe){var Fe=pt||"";return Et.key||"".concat(Fe,"item_").concat(Xe)}function j(Et){return"".concat(Et,"-menu-")}function Z(Et,pt){var Xe=-1;M.Children.forEach(Et,function(Fe){Xe+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?M.Children.forEach(Fe.props.children,function(Te){Xe+=1,pt(Te,Xe)}):pt(Fe,Xe)})}function te(Et,pt,Xe){if(!Et||Xe.find)return;M.Children.forEach(Et,function(Fe){if(Fe){var Te=Fe.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;pt.indexOf(Fe.key)!==-1?Xe.find=!0:Fe.props.children&&te(Fe.props.children,pt,Xe)}})}var Ae=["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"],he=function(pt){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=pt&&typeof pt.getBoundingClientRect=="function"&&pt.getBoundingClientRect().width;if(Fe){if(Xe){var Te=getComputedStyle(pt),Ne=Te.marginLeft,xt=Te.marginRight;Fe+=+Ne.replace("px","")+ +xt.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ce=function(pt,Xe,Fe){pt&&Object(A.a)(pt.style)==="object"&&(pt.style[Xe]=Fe)},ae=function(){return F.any},ve=C("KQm4"),ue=C("Ff2n"),fe=C("i8i4"),se=C("bdgK"),me=C("uciX"),re=C("8XRh"),pe={adjustX:1,adjustY:1},De={topLeft:{points:["bl","tl"],overflow:pe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pe,offset:[4,0]}},we={topLeft:{points:["bl","tl"],overflow:pe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pe,offset:[4,0]}},je=De,et=0,Le={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},We=function(pt,Xe,Fe){var Te=j(Xe),Ne=pt.getState();pt.setState({defaultActiveFirst:Object(q.a)(Object(q.a)({},Ne.defaultActiveFirst),{},Object(r.a)({},Te,Fe))})},Ze=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(Fe){var Te;Object(K.a)(this,Xe),Te=pt.call(this,Fe),Te.onDestroy=function(ct){Te.props.onDestroy(ct)},Te.onKeyDown=function(ct){var Mt=ct.keyCode,Gt=Te.menuInstance,gn=Te.props,Tn=gn.isOpen,Gr=gn.store;if(Mt===t.a.ENTER)return Te.onTitleClick(ct),We(Gr,Te.props.eventKey,!0),!0;if(Mt===t.a.RIGHT)return Tn?Gt.onKeyDown(ct):(Te.triggerOpenChange(!0),We(Gr,Te.props.eventKey,!0)),!0;if(Mt===t.a.LEFT){var Vr;if(Tn)Vr=Gt.onKeyDown(ct);else return;return Vr||(Te.triggerOpenChange(!1),Vr=!0),Vr}return Tn&&(Mt===t.a.UP||Mt===t.a.DOWN)?Gt.onKeyDown(ct):void 0},Te.onOpenChange=function(ct){Te.props.onOpenChange(ct)},Te.onPopupVisibleChange=function(ct){Te.triggerOpenChange(ct,ct?"mouseenter":"mouseleave")},Te.onMouseEnter=function(ct){var Mt=Te.props,Gt=Mt.eventKey,gn=Mt.onMouseEnter,Tn=Mt.store;We(Tn,Te.props.eventKey,!1),gn({key:Gt,domEvent:ct})},Te.onMouseLeave=function(ct){var Mt=Te.props,Gt=Mt.parentMenu,gn=Mt.eventKey,Tn=Mt.onMouseLeave;Gt.subMenuInstance=Object(k.a)(Te),Tn({key:gn,domEvent:ct})},Te.onTitleMouseEnter=function(ct){var Mt=Te.props,Gt=Mt.eventKey,gn=Mt.onItemHover,Tn=Mt.onTitleMouseEnter;gn({key:Gt,hover:!0}),Tn({key:Gt,domEvent:ct})},Te.onTitleMouseLeave=function(ct){var Mt=Te.props,Gt=Mt.parentMenu,gn=Mt.eventKey,Tn=Mt.onItemHover,Gr=Mt.onTitleMouseLeave;Gt.subMenuInstance=Object(k.a)(Te),Tn({key:gn,hover:!1}),Gr({key:gn,domEvent:ct})},Te.onTitleClick=function(ct){var Mt=Object(k.a)(Te),Gt=Mt.props;if(Gt.onTitleClick({key:Gt.eventKey,domEvent:ct}),Gt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!Gt.isOpen,"click"),We(Gt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(ct){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(ct))},Te.onSelect=function(ct){Te.props.onSelect(ct)},Te.onDeselect=function(ct){Te.props.onDeselect(ct)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(ct){Te.menuInstance=ct},Te.addKeyPath=function(ct){return Object(q.a)(Object(q.a)({},ct),{},{keyPath:(ct.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(ct,Mt){var Gt=Te.props.eventKey,gn=function(){Te.onOpenChange({key:Gt,item:Object(k.a)(Te),trigger:Mt,open:ct})};Mt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){gn()},0):gn()},Te.isChildrenSelected=function(){var ct={find:!1};return te(Te.props.children,Te.props.selectedKeys,ct),ct.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var ct=fe.findDOMNode(Te.menuInstance);if(ct.offsetWidth>=Te.subMenuTitle.offsetWidth)return;ct.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(ct){Te.subMenuTitle=ct},Te.getBaseProps=function(){var ct=Object(k.a)(Te),Mt=ct.props;return{mode:Mt.mode==="horizontal"?"vertical":Mt.mode,visible:Te.props.isOpen,level:Mt.level+1,inlineIndent:Mt.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:Mt.selectedKeys,eventKey:"".concat(Mt.eventKey,"-menu-"),openKeys:Mt.openKeys,motion:Mt.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:Mt.subMenuOpenDelay,parentMenu:Object(k.a)(Te),subMenuCloseDelay:Mt.subMenuCloseDelay,forceSubMenuRender:Mt.forceSubMenuRender,triggerSubMenuAction:Mt.triggerSubMenuAction,builtinPlacements:Mt.builtinPlacements,defaultActiveFirst:Mt.store.getState().defaultActiveFirst[j(Mt.eventKey)],multiple:Mt.multiple,prefixCls:Mt.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:Mt.itemIcon,expandIcon:Mt.expandIcon,direction:Mt.direction}},Te.getMotion=function(ct,Mt){var Gt=Object(k.a)(Te),gn=Gt.haveRendered,Tn=Te.props,Gr=Tn.motion,Vr=Tn.rootPrefixCls,Kr=Object(q.a)(Object(q.a)({},Gr),{},{leavedClassName:"".concat(Vr,"-hidden"),removeOnLeave:!1,motionAppear:gn||!Mt||ct!=="inline"});return Kr};var Ne=Fe.store,xt=Fe.eventKey,vt=Ne.getState(),Dt=vt.defaultActiveFirst;Te.isRootMenu=!1;var Ht=!1;return Dt&&(Ht=Dt[xt]),We(Ne,xt,Ht),Te}return Object(I.a)(Xe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,Ne=this.props,xt=Ne.mode,vt=Ne.parentMenu,Dt=Ne.manualRef;if(Dt&&Dt(this),xt!=="horizontal"||!vt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,Ne=Te.onDestroy,xt=Te.eventKey;Ne&&Ne(xt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var Ne=this,xt=this.getBaseProps(),vt=this.getMotion(xt.mode,xt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||xt.visible||xt.forceSubMenuRender,!this.haveOpened)return M.createElement("div",null);var Dt=xt.direction;return M.createElement(re.default,Object.assign({visible:xt.visible},vt),function(Ht){var ct=Ht.className,Mt=Ht.style,Gt=d()("".concat(xt.prefixCls,"-sub"),ct,Object(r.a)({},"".concat(xt.prefixCls,"-rtl"),Dt==="rtl"));return M.createElement(Ye,Object.assign({},xt,{id:Ne.internalMenuId,className:Gt,style:Mt}),Te)})}},{key:"render",value:function(){var Te,Ne=Object(q.a)({},this.props),xt=Ne.isOpen,vt=this.getPrefixCls(),Dt=Ne.mode==="inline",Ht=d()(vt,"".concat(vt,"-").concat(Ne.mode),(Te={},Object(r.a)(Te,Ne.className,!!Ne.className),Object(r.a)(Te,this.getOpenClassName(),xt),Object(r.a)(Te,this.getActiveClassName(),Ne.active||xt&&!Dt),Object(r.a)(Te,this.getDisabledClassName(),Ne.disabled),Object(r.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(Ne.eventKey?this.internalMenuId="".concat(Ne.eventKey,"$Menu"):(et+=1,this.internalMenuId="$__$".concat(et,"$Menu")));var ct={},Mt={},Gt={};Ne.disabled||(ct={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Mt={onClick:this.onTitleClick},Gt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var gn={},Tn=Ne.direction;Dt&&(Tn==="rtl"?gn.paddingRight=Ne.inlineIndent*Ne.level:gn.paddingLeft=Ne.inlineIndent*Ne.level);var Gr={};this.props.isOpen&&(Gr={"aria-owns":this.internalMenuId});var Vr=null;Ne.mode!=="horizontal"&&(Vr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Vr=M.createElement(this.props.expandIcon,Object(q.a)({},this.props))));var Kr=M.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:gn,className:"".concat(vt,"-title"),role:"button"},Gt,Mt,{"aria-expanded":xt},Gr,{"aria-haspopup":"true",title:typeof Ne.title=="string"?Ne.title:void 0}),Ne.title,Vr||M.createElement("i",{className:"".concat(vt,"-arrow")})),kn=this.renderChildren(Ne.children),Ua=Ne.parentMenu.isRootMenu?Ne.parentMenu.props.getPopupContainer:function(Xt){return Xt.parentNode},Ya=Le[Ne.mode],Ra=Ne.popupOffset?{offset:Ne.popupOffset}:{},Xr=Ne.mode==="inline"?"":Ne.popupClassName;Xr+=Tn==="rtl"?" ".concat(vt,"-rtl"):"";var Ja=Ne.disabled,Ri=Ne.triggerSubMenuAction,ji=Ne.subMenuOpenDelay,_e=Ne.forceSubMenuRender,Be=Ne.subMenuCloseDelay,Ve=Ne.builtinPlacements;Ae.forEach(function(Xt){return delete Ne[Xt]}),delete Ne.onClick;var gt=Tn==="rtl"?Object.assign({},we,Ve):Object.assign({},De,Ve);return delete Ne.direction,M.createElement("li",Object.assign({},Ne,ct,{className:Ht,role:"menuitem"}),Dt&&Kr,Dt&&kn,!Dt&&M.createElement(me.a,{prefixCls:vt,popupClassName:d()("".concat(vt,"-popup"),Xr),getPopupContainer:Ua,builtinPlacements:gt,popupPlacement:Ya,popupVisible:xt,popupAlign:Ra,popup:kn,action:Ja?[]:[Ri],mouseEnterDelay:ji,mouseLeaveDelay:Be,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:_e},Kr))}}]),Xe}(M.Component);Ze.defaultProps={onMouseEnter:D,onMouseLeave:D,onTitleMouseEnter:D,onTitleMouseLeave:D,onTitleClick:D,manualRef:D,mode:"vertical",title:""};var $e=Object(x.b)(function(Et,pt){var Xe=Et.openKeys,Fe=Et.activeKey,Te=Et.selectedKeys,Ne=pt.eventKey,xt=pt.subMenuKey;return{isOpen:Xe.indexOf(Ne)>-1,active:Fe[xt]===Ne,selectedKeys:Te}})(Ze);$e.isSubMenu=!0;var bt=$e,wt="menuitem-overflowed",It=.5,ft=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(){var Fe;return Object(K.a)(this,Xe),Fe=pt.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.getMenuItemNodes=function(){var Te=Fe.props.prefixCls,Ne=fe.findDOMNode(Object(k.a)(Fe));return Ne?[].slice.call(Ne.children).filter(function(xt){return xt.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(Te,Ne,xt){var vt=Fe.props,Dt=vt.overflowedIndicator,Ht=vt.level,ct=vt.mode,Mt=vt.prefixCls,Gt=vt.theme;if(Ht!==1||ct!=="horizontal")return null;var gn=Fe.props.children[0],Tn=gn.props,Gr=Tn.children,Vr=Tn.title,Kr=Tn.style,kn=Object(ue.a)(Tn,["children","title","style"]),Ua=Object(q.a)({},Kr),Ya="".concat(Te,"-overflowed-indicator"),Ra="".concat(Te,"-overflowed-indicator");Ne.length===0&&xt!==!0?Ua=Object(q.a)(Object(q.a)({},Ua),{},{display:"none"}):xt&&(Ua=Object(q.a)(Object(q.a)({},Ua),{},{visibility:"hidden",position:"absolute"}),Ya="".concat(Ya,"-placeholder"),Ra="".concat(Ra,"-placeholder"));var Xr=Gt?"".concat(Mt,"-").concat(Gt):"",Ja={};return Ae.forEach(function(Ri){kn[Ri]!==void 0&&(Ja[Ri]=kn[Ri])}),M.createElement(bt,Object.assign({title:Dt,className:"".concat(Mt,"-overflowed-submenu"),popupClassName:Xr},Ja,{key:Ya,eventKey:Ra,disabled:!1,style:Ua}),Ne)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var Te=fe.findDOMNode(Object(k.a)(Fe));if(!Te)return;var Ne=Te.children;if(!Ne||Ne.length===0)return;var xt=Te.children[Ne.length-1];ce(xt,"display","inline-block");var vt=Fe.getMenuItemNodes(),Dt=vt.filter(function(Ht){return Ht.className.split(" ").indexOf(wt)>=0});Dt.forEach(function(Ht){ce(Ht,"display","inline-block")}),Fe.menuItemSizes=vt.map(function(Ht){return he(Ht,!0)}),Dt.forEach(function(Ht){ce(Ht,"display","none")}),Fe.overflowedIndicatorWidth=he(Te.children[Te.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ht,ct){return Ht+ct},0),Fe.handleResize(),ce(xt,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var Te=fe.findDOMNode(Object(k.a)(Fe));if(!Te)return;var Ne=he(Te);Fe.overflowedItems=[];var xt=0,vt;Fe.originalTotalWidth>Ne+It&&(vt=-1,Fe.menuItemSizes.forEach(function(Dt){xt+=Dt,xt+Fe.overflowedIndicatorWidth<=Ne&&(vt+=1)})),Fe.setState({lastVisibleIndex:vt})},Fe}return Object(I.a)(Xe,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ne=fe.findDOMNode(this);if(!Ne)return;this.resizeObserver=new se.default(function(xt){xt.forEach(function(){var vt=Te.cancelFrameId;cancelAnimationFrame(vt),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(Ne.children).concat(Ne).forEach(function(xt){Te.resizeObserver.observe(xt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(Ne.children).concat(Ne).forEach(function(xt){Te.resizeObserver.observe(xt)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ne,{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(Te){var Ne=this,xt=this.state.lastVisibleIndex;return(Te||[]).reduce(function(vt,Dt,Ht){var ct=Dt;if(Ne.props.mode==="horizontal"){var Mt=Ne.getOverflowedSubMenuItem(Dt.props.eventKey,[]);xt!==void 0&&Ne.props.className.indexOf("".concat(Ne.props.prefixCls,"-root"))!==-1&&(Ht>xt&&(ct=M.cloneElement(Dt,{style:{display:"none"},eventKey:"".concat(Dt.props.eventKey,"-hidden"),className:"".concat(wt)})),Ht===xt+1&&(Ne.overflowedItems=Te.slice(xt+1).map(function(gn){return M.cloneElement(gn,{key:gn.props.eventKey,mode:"vertical-left"})}),Mt=Ne.getOverflowedSubMenuItem(Dt.props.eventKey,Ne.overflowedItems)));var Gt=[].concat(Object(ve.a)(vt),[Mt,ct]);return Ht===Te.length-1&&Gt.push(Ne.getOverflowedSubMenuItem(Dt.props.eventKey,[],!0)),Gt}return[].concat(Object(ve.a)(vt),[ct])},[])}},{key:"render",value:function(){var Te=this.props,Ne=Te.visible,xt=Te.prefixCls,vt=Te.overflowedIndicator,Dt=Te.mode,Ht=Te.level,ct=Te.tag,Mt=Te.children,Gt=Te.theme,gn=Object(ue.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tn=ct;return M.createElement(Tn,Object.assign({},gn),this.renderChildren(Mt))}}]),Xe}(M.Component);ft.defaultProps={tag:"div",className:""};var Ft=ft;function zt(Et){return Et.length?Et.every(function(pt){return!!pt.props.disabled}):!0}function Qe(Et,pt,Xe){var Fe=Et.getState();Et.setState({activeKey:Object(q.a)(Object(q.a)({},Fe.activeKey),{},Object(r.a)({},pt,Xe))})}function ze(Et){return Et.eventKey||"0-menu-"}function yt(Et,pt){var Xe=pt,Fe=Et.children,Te=Et.eventKey;if(Xe){var Ne;if(Z(Fe,function(xt,vt){xt&&xt.props&&!xt.props.disabled&&Xe===z(xt,Te,vt)&&(Ne=!0)}),Ne)return Xe}return Xe=null,Et.defaultActiveFirst&&Z(Fe,function(xt,vt){!Xe&&xt&&!xt.props.disabled&&(Xe=z(xt,Te,vt))}),Xe}function St(Et){if(Et){var pt=this.instanceArray.indexOf(Et);pt!==-1?this.instanceArray[pt]=Et:this.instanceArray.push(Et)}}var at=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(Fe){var Te;return Object(K.a)(this,Xe),Te=pt.call(this,Fe),Te.onKeyDown=function(Ne,xt){var vt=Ne.keyCode,Dt;if(Te.getFlatInstanceArray().forEach(function(ct){ct&&ct.props.active&&ct.onKeyDown&&(Dt=ct.onKeyDown(Ne))}),Dt)return 1;var Ht=null;return(vt===t.a.UP||vt===t.a.DOWN)&&(Ht=Te.step(vt===t.a.UP?-1:1)),Ht?(Ne.preventDefault(),Qe(Te.props.store,ze(Te.props),Ht.props.eventKey),typeof xt=="function"&&xt(Ht),1):void 0},Te.onItemHover=function(Ne){var xt=Ne.key,vt=Ne.hover;Qe(Te.props.store,ze(Te.props),vt?xt:null)},Te.onDeselect=function(Ne){Te.props.onDeselect(Ne)},Te.onSelect=function(Ne){Te.props.onSelect(Ne)},Te.onClick=function(Ne){Te.props.onClick(Ne)},Te.onOpenChange=function(Ne){Te.props.onOpenChange(Ne)},Te.onDestroy=function(Ne){Te.props.onDestroy(Ne)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(Ne){var xt=Te.getFlatInstanceArray(),vt=Te.props.store.getState().activeKey[ze(Te.props)],Dt=xt.length;if(!Dt)return null;Ne<0&&(xt=xt.concat().reverse());var Ht=-1;if(xt.every(function(gn,Tn){return gn&&gn.props.eventKey===vt?(Ht=Tn,!1):!0}),!Te.props.defaultActiveFirst&&Ht!==-1&&zt(xt.slice(Ht,Dt-1)))return;var ct=(Ht+1)%Dt,Mt=ct;do{var Gt=xt[Mt];if(!Gt||Gt.props.disabled)Mt=(Mt+1)%Dt;else return Gt}while(Mt!==ct);return null},Te.renderCommonMenuItem=function(Ne,xt,vt){var Dt=Te.props.store.getState(),Ht=Object(k.a)(Te),ct=Ht.props,Mt=z(Ne,ct.eventKey,xt),Gt=Ne.props;if(!Gt||typeof Ne.type=="string")return Ne;var gn=Mt===Dt.activeKey,Tn=Object(q.a)(Object(q.a)({mode:Gt.mode||ct.mode,level:ct.level,inlineIndent:ct.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:ct.prefixCls,index:xt,parentMenu:ct.parentMenu,manualRef:Gt.disabled?void 0:Object(c.a)(Ne.ref,St.bind(Object(k.a)(Te))),eventKey:Mt,active:!Gt.disabled&&gn,multiple:ct.multiple,onClick:function(Vr){(Gt.onClick||D)(Vr),Te.onClick(Vr)},onItemHover:Te.onItemHover,motion:ct.motion,subMenuOpenDelay:ct.subMenuOpenDelay,subMenuCloseDelay:ct.subMenuCloseDelay,forceSubMenuRender:ct.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:ct.builtinPlacements,itemIcon:Gt.itemIcon||Te.props.itemIcon,expandIcon:Gt.expandIcon||Te.props.expandIcon},vt),{},{direction:ct.direction});return(ct.mode==="inline"||ae())&&(Tn.triggerSubMenuAction="click"),M.cloneElement(Ne,Tn)},Te.renderMenuItem=function(Ne,xt,vt){if(!Ne)return null;var Dt=Te.props.store.getState(),Ht={openKeys:Dt.openKeys,selectedKeys:Dt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:vt};return Te.renderCommonMenuItem(Ne,xt,Ht)},Fe.store.setState({activeKey:Object(q.a)(Object(q.a)({},Fe.store.getState().activeKey),{},Object(r.a)({},Fe.eventKey,yt(Fe,Fe.activeKey)))}),Te.instanceArray=[],Te}return Object(I.a)(Xe,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!a()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var Ne=this.props,xt="activeKey"in Ne?Ne.activeKey:Ne.store.getState().activeKey[ze(Ne)],vt=yt(Ne,xt);if(vt!==xt)Qe(Ne.store,ze(Ne),vt);else if("activeKey"in Te){var Dt=yt(Te,Te.activeKey);vt!==Dt&&Qe(Ne.store,ze(Ne),vt)}}},{key:"render",value:function(){var Te=this,Ne=Object(p.a)({},this.props);this.instanceArray=[];var xt=d()(Ne.prefixCls,Ne.className,"".concat(Ne.prefixCls,"-").concat(Ne.mode)),vt={className:xt,role:Ne.role||"menu"};Ne.id&&(vt.id=Ne.id),Ne.focusable&&(vt.tabIndex=0,vt.onKeyDown=this.onKeyDown);var Dt=Ne.prefixCls,Ht=Ne.eventKey,ct=Ne.visible,Mt=Ne.level,Gt=Ne.mode,gn=Ne.overflowedIndicator,Tn=Ne.theme;return Ae.forEach(function(Gr){return delete Ne[Gr]}),delete Ne.onClick,M.createElement(Ft,Object.assign({},Ne,{prefixCls:Dt,mode:Gt,tag:"ul",level:Mt,theme:Tn,visible:ct,overflowedIndicator:gn},vt),M.Children.map(Ne.children,function(Gr,Vr){return Te.renderMenuItem(Gr,Vr,Ht||"0-menu-")}))}}]),Xe}(M.Component);at.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:D};var Ot=Object(x.b)()(at),Ye=Ot,Ue=C("Kwbf");function ke(Et,pt,Xe){var Fe=Et.prefixCls,Te=Et.motion,Ne=Et.defaultMotions,xt=Ne===void 0?{}:Ne,vt=Et.openAnimation,Dt=Et.openTransitionName,Ht=pt.switchingModeFromInline;if(Te)return Te;if(Object(A.a)(vt)==="object"&&vt)Object(Ue.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof vt=="string")return{motionName:"".concat(Fe,"-open-").concat(vt)};if(Dt)return{motionName:Dt};var ct=xt[Xe];return ct||(Ht?null:xt.other)}var Ce=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(Fe){var Te;Object(K.a)(this,Xe),Te=pt.call(this,Fe),Te.inlineOpenKeys=[],Te.onSelect=function(vt){var Dt=Object(k.a)(Te),Ht=Dt.props;if(Ht.selectable){var ct=Te.store.getState(),Mt=ct.selectedKeys,Gt=vt.key;Ht.multiple?Mt=Mt.concat([Gt]):Mt=[Gt],"selectedKeys"in Ht||Te.store.setState({selectedKeys:Mt}),Ht.onSelect(Object(q.a)(Object(q.a)({},vt),{},{selectedKeys:Mt}))}},Te.onClick=function(vt){var Dt=Te.getRealMenuMode(),Ht=Object(k.a)(Te),ct=Ht.store,Mt=Ht.props.onOpenChange;Dt!=="inline"&&!("openKeys"in Te.props)&&(ct.setState({openKeys:[]}),Mt([])),Te.props.onClick(vt)},Te.onKeyDown=function(vt,Dt){Te.innerMenu.getWrappedInstance().onKeyDown(vt,Dt)},Te.onOpenChange=function(vt){var Dt=Object(k.a)(Te),Ht=Dt.props,ct=Te.store.getState().openKeys.concat(),Mt=!1,Gt=function(Tn){var Gr=!1;if(Tn.open)Gr=ct.indexOf(Tn.key)===-1,Gr&&ct.push(Tn.key);else{var Vr=ct.indexOf(Tn.key);Gr=Vr!==-1,Gr&&ct.splice(Vr,1)}Mt=Mt||Gr};Array.isArray(vt)?vt.forEach(Gt):Gt(vt),Mt&&("openKeys"in Te.props||Te.store.setState({openKeys:ct}),Ht.onOpenChange(ct))},Te.onDeselect=function(vt){var Dt=Object(k.a)(Te),Ht=Dt.props;if(Ht.selectable){var ct=Te.store.getState().selectedKeys.concat(),Mt=vt.key,Gt=ct.indexOf(Mt);Gt!==-1&&ct.splice(Gt,1),"selectedKeys"in Ht||Te.store.setState({selectedKeys:ct}),Ht.onDeselect(Object(q.a)(Object(q.a)({},vt),{},{selectedKeys:ct}))}},Te.onMouseEnter=function(vt){Te.restoreModeVerticalFromInline();var Dt=Te.props.onMouseEnter;Dt&&Dt(vt)},Te.onTransitionEnd=function(vt){var Dt=vt.propertyName==="width"&&vt.target===vt.currentTarget,Ht=vt.target.className,ct=Object.prototype.toString.call(Ht)==="[object SVGAnimatedString]"?Ht.animVal:Ht,Mt=vt.propertyName==="font-size"&&ct.indexOf("anticon")>=0;(Dt||Mt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(vt){Te.innerMenu=vt},Te.isRootMenu=!0;var Ne=Fe.defaultSelectedKeys,xt=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Ne=Fe.selectedKeys||[]),"openKeys"in Fe&&(xt=Fe.openKeys||[]),Te.store=Object(x.c)({selectedKeys:Ne,openKeys:xt,activeKey:{"0-menu-":yt(Fe,Fe.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(I.a)(Xe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var Ne=this.props,xt=Ne.siderCollapsed,vt=Ne.inlineCollapsed,Dt=Ne.onOpenChange;(!Te.inlineCollapsed&&vt||!Te.siderCollapsed&&xt)&&Dt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var Ne=this.props,xt=this.store,vt=this.inlineOpenKeys,Dt=xt.getState(),Ht={};Te.mode==="inline"&&Ne.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ne||((Ne.inlineCollapsed&&!Te.inlineCollapsed||Ne.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Dt.openKeys.concat(),Ht.openKeys=[]),(!Ne.inlineCollapsed&&Te.inlineCollapsed||!Ne.siderCollapsed&&Te.siderCollapsed)&&(Ht.openKeys=vt,this.inlineOpenKeys=[])),Object.keys(Ht).length&&xt.setState(Ht)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,Ne=this.store,xt=this.prevOpenKeys,vt=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");vt?(this.prevOpenKeys=Ne.getState().openKeys.concat(),this.store.setState({openKeys:[]})):xt&&(this.store.setState({openKeys:xt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,Ne=this.state.switchingModeFromInline,xt=this.getInlineCollapsed();return Ne&&xt?"inline":xt?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,Ne=Te.inlineCollapsed,xt=Te.siderCollapsed;return xt!==void 0?xt:Ne}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&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 Te=Object(q.a)({},Object(T.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ne=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(q.a)(Object(q.a)({},Te),{},{mode:Ne,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ke(this.props,this.state,Ne)}),delete Te.openAnimation,delete Te.openTransitionName,M.createElement(x.a,{store:this.store},M.createElement(Ye,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),Xe}(M.Component);Ce.defaultProps={selectable:!0,onClick:D,onSelect:D,onOpenChange:D,onDeselect:D,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:M.createElement("span",null,"\xB7\xB7\xB7")};var Se=Ce,Me=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(){var Fe;return Object(K.a)(this,Xe),Fe=pt.apply(this,arguments),Fe.onKeyDown=function(Te){var Ne=Te.keyCode;return Ne===t.a.ENTER?(Fe.onClick(Te),!0):void 0},Fe.onMouseLeave=function(Te){var Ne=Fe.props,xt=Ne.eventKey,vt=Ne.onItemHover,Dt=Ne.onMouseLeave;vt({key:xt,hover:!1}),Dt({key:xt,domEvent:Te})},Fe.onMouseEnter=function(Te){var Ne=Fe.props,xt=Ne.eventKey,vt=Ne.onItemHover,Dt=Ne.onMouseEnter;vt({key:xt,hover:!0}),Dt({key:xt,domEvent:Te})},Fe.onClick=function(Te){var Ne=Fe.props,xt=Ne.eventKey,vt=Ne.multiple,Dt=Ne.onClick,Ht=Ne.onSelect,ct=Ne.onDeselect,Mt=Ne.isSelected,Gt={key:xt,keyPath:[xt],item:Object(k.a)(Fe),domEvent:Te};Dt(Gt),vt?Mt?ct(Gt):Ht(Gt):Mt||Ht(Gt)},Fe.saveNode=function(Te){Fe.node=Te},Fe}return Object(I.a)(Xe,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.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 Te,Ne=Object(q.a)({},this.props),xt=d()(this.getPrefixCls(),Ne.className,(Te={},Object(r.a)(Te,this.getActiveClassName(),!Ne.disabled&&Ne.active),Object(r.a)(Te,this.getSelectedClassName(),Ne.isSelected),Object(r.a)(Te,this.getDisabledClassName(),Ne.disabled),Te)),vt=Object(q.a)(Object(q.a)({},Ne.attribute),{},{title:typeof Ne.title=="string"?Ne.title:void 0,className:xt,role:Ne.role||"menuitem","aria-disabled":Ne.disabled});Ne.role==="option"?vt=Object(q.a)(Object(q.a)({},vt),{},{role:"option","aria-selected":Ne.isSelected}):(Ne.role===null||Ne.role==="none")&&(vt.role="none");var Dt={onClick:Ne.disabled?null:this.onClick,onMouseLeave:Ne.disabled?null:this.onMouseLeave,onMouseEnter:Ne.disabled?null:this.onMouseEnter},Ht=Object(q.a)({},Ne.style);Ne.mode==="inline"&&(Ne.direction==="rtl"?Ht.paddingRight=Ne.inlineIndent*Ne.level:Ht.paddingLeft=Ne.inlineIndent*Ne.level),Ae.forEach(function(Mt){return delete Ne[Mt]}),delete Ne.direction;var ct=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ct=M.createElement(this.props.itemIcon,this.props)),M.createElement("li",Object.assign({},Object(T.default)(Ne,["onClick","onMouseEnter","onMouseLeave","onSelect"]),vt,Dt,{style:Ht,ref:this.saveNode}),Ne.children,ct)}}]),Xe}(M.Component);Me.isMenuItem=!0,Me.defaultProps={onSelect:D,onMouseEnter:D,onMouseLeave:D,manualRef:D};var He=Object(x.b)(function(Et,pt){var Xe=Et.activeKey,Fe=Et.selectedKeys,Te=pt.eventKey,Ne=pt.subMenuKey;return{active:Xe[Ne]===Te,isSelected:Fe.indexOf(Te)!==-1}})(Me),Ge=He,mt=function(Et){Object(E.a)(Xe,Et);var pt=Object(B.a)(Xe);function Xe(){var Fe;return Object(K.a)(this,Xe),Fe=pt.apply(this,arguments),Fe.renderInnerMenuItem=function(Te){var Ne=Fe.props,xt=Ne.renderMenuItem,vt=Ne.index;return xt(Te,vt,Fe.props.subMenuKey)},Fe}return Object(I.a)(Xe,[{key:"render",value:function(){var Te=Object(p.a)({},this.props),Ne=Te.className,xt=Ne===void 0?"":Ne,vt=Te.rootPrefixCls,Dt="".concat(vt,"-item-group-title"),Ht="".concat(vt,"-item-group-list"),ct=Te.title,Mt=Te.children;return Ae.forEach(function(Gt){return delete Te[Gt]}),delete Te.onClick,delete Te.direction,M.createElement("li",Object.assign({},Te,{className:"".concat(xt," ").concat(vt,"-item-group")}),M.createElement("div",{className:Dt,title:typeof ct=="string"?ct:void 0},ct),M.createElement("ul",{className:Ht},M.Children.map(Mt,this.renderInnerMenuItem)))}}]),Xe}(M.Component);mt.isMenuItemGroup=!0,mt.defaultProps={disabled:!0};var Lt=mt,en=function(pt){var Xe=pt.className,Fe=pt.rootPrefixCls,Te=pt.style;return M.createElement("li",{className:"".concat(Xe," ").concat(Fe,"-item-divider"),style:Te})};en.defaultProps={disabled:!0,className:"",style:{}};var Jt=en,Ct=oe.e=Se},"24YM":function(Ie,oe,C){"use strict";Object.defineProperty(oe,"__esModule",{value:!0}),oe.SensorTabIndex=oe.SensorClassName=oe.SizeSensorId=void 0;var q="size-sensor-id";oe.SizeSensorId=q;var K="size-sensor-object";oe.SensorClassName=K;var I="-1";oe.SensorTabIndex=I},"2DNl":function(Ie,oe,C){var q=C("IMiH"),K=C("loD1"),I=C("59Ip"),k=C("aKvl"),E=C("n1HI"),B=C("hX1E"),M=B.normalizeRadian,x=C("Sj9i"),T=C("hyiK"),p=q.CMD,r=Math.PI*2,t=1e-4;function c(w,L){return Math.abs(w-L)L&&v>g&&v>u&&v>y||v1&&o(),G=x.cubicAt(L,g,u,y,a[0]),Q>1&&(F=x.cubicAt(L,g,u,y,a[1]))),Q===2?zL&&y>g&&y>u||y=0&&v<=1){for(var P=0,N=x.quadraticAt(L,g,u,v),Q=0;Qb||y<-b)return 0;var h=Math.sqrt(b*b-y*y);s[0]=-h,s[1]=h;var v=Math.abs(g-i);if(v<1e-4)return 0;if(v%r<1e-4){g=0,i=r;var P=u?1:-1;return f>=s[0]+w&&f<=s[1]+w?P:0}if(u){var h=g;g=M(i),i=M(h)}else g=M(g),i=M(i);g>i&&(i+=r);for(var N=0,Q=0;Q<2;Q++){var G=s[Q];if(G+w>f){var F=Math.atan2(y,G),P=u?1:-1;F<0&&(F=r+F),(F>=g&&F<=i||F+r>=g&&F+r<=i)&&(F>Math.PI/2&&F1&&(b||(u+=T(f,y,h,v,g,i))),P===1&&(f=w[P],y=w[P+1],h=f,v=y);switch(N){case p.M:h=w[P++],v=w[P++],f=h,y=v;break;case p.L:if(b){if(K.containStroke(f,y,w[P],w[P+1],L,g,i))return!0}else u+=T(f,y,w[P],w[P+1],g,i)||0;f=w[P++],y=w[P++];break;case p.C:if(b){if(I.containStroke(f,y,w[P++],w[P++],w[P++],w[P++],w[P],w[P+1],L,g,i))return!0}else u+=d(f,y,w[P++],w[P++],w[P++],w[P++],w[P],w[P+1],g,i)||0;f=w[P++],y=w[P++];break;case p.Q:if(b){if(k.containStroke(f,y,w[P++],w[P++],w[P],w[P+1],L,g,i))return!0}else u+=A(f,y,w[P++],w[P++],w[P],w[P+1],g,i)||0;f=w[P++],y=w[P++];break;case p.A:var Q=w[P++],G=w[P++],F=w[P++],D=w[P++],z=w[P++],j=w[P++];P+=1;var Z=1-w[P++],te=Math.cos(z)*F+Q,Ae=Math.sin(z)*D+G;P>1?u+=T(f,y,te,Ae,g,i):(h=te,v=Ae);var he=(g-Q)*D/F+Q;if(b){if(E.containStroke(Q,G,D,z,z+j,Z,L,he,i))return!0}else u+=l(Q,G,D,z,z+j,Z,he,i);f=Math.cos(z+j)*F+Q,y=Math.sin(z+j)*D+G;break;case p.R:h=f=w[P++],v=y=w[P++];var ce=w[P++],ae=w[P++],te=h+ce,Ae=v+ae;if(b){if(K.containStroke(h,v,te,v,L,g,i)||K.containStroke(te,v,te,Ae,L,g,i)||K.containStroke(te,Ae,h,Ae,L,g,i)||K.containStroke(h,Ae,h,v,L,g,i))return!0}else u+=T(te,v,te,Ae,g,i),u+=T(h,Ae,h,v,g,i);break;case p.Z:if(b){if(K.containStroke(f,y,h,v,L,g,i))return!0}else u+=T(f,y,h,v,g,i);f=h,y=v;break}}return!b&&!c(y,v)&&(u+=T(f,y,h,v,g,i)||0),u!==0}function _(w,L,b){return m(w,0,!1,L,b)}function R(w,L,b,g){return m(w,L,!0,b,g)}oe.contain=_,oe.containStroke=R},"2fw6":function(Ie,oe,C){var q=C("y+Vt"),K=q.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(I,k,E){E&&I.moveTo(k.cx+k.r,k.cy),I.arc(k.cx,k.cy,k.r,0,Math.PI*2,!0)}});Ie.exports=K},"3C/r":function(Ie,oe){var C=function(K,I){this.image=K,this.repeat=I,this.type="pattern"};C.prototype.getCanvasPattern=function(K){return K.createPattern(this.image,this.repeat||"repeat")};var q=C;Ie.exports=q},"3CBa":function(Ie,oe,C){var q=C("hydK"),K=q.createElement,I=C("bYtY"),k=C("SUKs"),E=C("y+Vt"),B=C("Dagg"),M=C("dqUG"),x=C("DBLp"),T=C("sW+o"),p=C("n6Mw"),r=C("vKoX"),t=C("P47w"),c=t.path,s=t.image,a=t.text;function o(i){return parseInt(i,10)}function d(i){return i instanceof E?c:i instanceof B?s:i instanceof M?a:c}function A(i,u){return u&&i&&u.parentNode!==i}function l(i,u,f){if(A(i,u)&&f){var y=f.nextSibling;y?i.insertBefore(u,y):i.appendChild(u)}}function m(i,u){if(A(i,u)){var f=i.firstChild;f?i.insertBefore(u,f):i.appendChild(u)}}function _(i,u){u&&i&&u.parentNode===i&&i.removeChild(u)}function R(i){return i.__textSvgEl}function w(i){return i.__svgEl}var L=function(i,u,f,y){this.root=i,this.storage=u,this._opts=f=I.extend({},f||{});var h=K("svg");h.setAttribute("xmlns","http://www.w3.org/2000/svg"),h.setAttribute("version","1.1"),h.setAttribute("baseProfile","full"),h.style.cssText="user-select:none;position:absolute;left:0;top:0;";var v=K("g");h.appendChild(v);var P=K("g");h.appendChild(P),this.gradientManager=new T(y,P),this.clipPathManager=new p(y,P),this.shadowManager=new r(y,P);var N=document.createElement("div");N.style.cssText="overflow:hidden;position:relative",this._svgDom=h,this._svgRoot=P,this._backgroundRoot=v,this._viewport=N,i.appendChild(N),N.appendChild(h),this.resize(f.width,f.height),this._visibleList=[]};L.prototype={constructor:L,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var i=this.getViewportRoot();if(i)return{offsetLeft:i.offsetLeft||0,offsetTop:i.offsetTop||0}},refresh:function(){var i=this.storage.getDisplayList(!0);this._paintList(i)},setBackgroundColor:function(i){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var u=K("rect");u.setAttribute("width",this.getWidth()),u.setAttribute("height",this.getHeight()),u.setAttribute("x",0),u.setAttribute("y",0),u.setAttribute("id",0),u.style.fill=i,this._backgroundRoot.appendChild(u),this._backgroundNode=u},_paintList:function(i){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var u=this._svgRoot,f=this._visibleList,y=i.length,h=[],v;for(v=0;v=0;--P)if(v[P]===h)return!0;return!1}),f}else return null;else return f[0]},resize:function(i,u){var f=this._viewport;f.style.display="none";var y=this._opts;if(i!=null&&(y.width=i),u!=null&&(y.height=u),i=this._getSize(0),u=this._getSize(1),f.style.display="",this._width!==i||this._height!==u){this._width=i,this._height=u;var h=f.style;h.width=i+"px",h.height=u+"px";var v=this._svgDom;v.setAttribute("width",i),v.setAttribute("height",u)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",i),this._backgroundNode.setAttribute("height",u))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(i){var u=this._opts,f=["width","height"][i],y=["clientWidth","clientHeight"][i],h=["paddingLeft","paddingTop"][i],v=["paddingRight","paddingBottom"][i];if(u[f]!=null&&u[f]!=="auto")return parseFloat(u[f]);var P=this.root,N=document.defaultView.getComputedStyle(P);return(P[y]||o(N[f])||o(P.style[f]))-(o(N[h])||0)-(o(N[v])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var i=encodeURIComponent(this._svgDom.outerHTML.replace(/> \r<`));return"data:image/svg+xml;charset=UTF-8,"+i}};function b(i){return function(){k('In SVG mode painter not support method "'+i+'"')}}I.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(i){L.prototype[i]=b(i)});var g=L;Ie.exports=g},"3e3G":function(Ie,oe,C){var q=C("bYtY"),K=C("QuXc"),I=function(E,B,M,x,T){this.x=E==null?.5:E,this.y=B==null?.5:B,this.r=M==null?.5:M,this.type="radial",this.global=T||!1,K.call(this,x)};I.prototype={constructor:I},q.inherits(I,K);var k=I;Ie.exports=k},"3gBT":function(Ie,oe){var C=2311;function q(){return C++}Ie.exports=q},"4fz+":function(Ie,oe,C){var q=C("bYtY"),K=C("1bdT"),I=C("mFDi"),k=function(B){B=B||{},K.call(this,B);for(var M in B)B.hasOwnProperty(M)&&(this[M]=B[M]);this._children=[],this.__storage=null,this.__dirty=!0};k.prototype={constructor:k,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(B){return this._children[B]},childOfName:function(B){for(var M=this._children,x=0;x=0&&(x.splice(T,0,B),this._doAdd(B))}return this},_doAdd:function(B){B.parent&&B.parent.remove(B),B.parent=this;var M=this.__storage,x=this.__zr;M&&M!==B.__storage&&(M.addToStorage(B),B instanceof k&&B.addChildrenToStorage(M)),x&&x.refresh()},remove:function(B){var M=this.__zr,x=this.__storage,T=this._children,p=q.indexOf(T,B);return p<0?this:(T.splice(p,1),B.parent=null,x&&(x.delFromStorage(B),B instanceof k&&B.delChildrenFromStorage(x)),M&&M.refresh(),this)},removeAll:function(){var B=this._children,M=this.__storage,x,T;for(T=0;T1e-4){b[0]=A-m,b[1]=l-_,g[0]=A+m,g[1]=l+_;return}if(x[0]=B(R)*m+A,x[1]=E(R)*_+l,T[0]=B(w)*m+A,T[1]=E(w)*_+l,i(b,x,T),u(g,x,T),R=R%M,R<0&&(R=R+M),w=w%M,w<0&&(w=w+M),R>w&&!L?w+=M:RR&&(p[0]=B(h)*m+A,p[1]=E(h)*_+l,i(b,p,b),u(g,p,g))}oe.fromPoints=r,oe.fromLine=t,oe.fromCubic=a,oe.fromQuadratic=o,oe.fromArc=d},"4qgm":function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S":function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"500L":function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return R});var q=C("+L6B"),K=C("2/Rp"),I=C("2qtc"),k=C("kLXV"),E=C("9og8"),B=C("k1fw"),M=C("miYZ"),x=C("tsqr"),T=C("oBTY"),p=C("tJVT"),r=C("DZo9"),t=C("8z0m"),c=C("WmNS"),s=C.n(c),a=C("q1tI"),o=C.n(a),d=C("m3rI"),A=C("wzkS"),l=C("y5JW"),m=C("LtfV"),_=t.a.Dragger;function R(w){var L=[];return w&&w.length>0&&(L=w.map(function(b){return{uid:b.id,id:b.id,name:b.title+l.c+b.filesize,url:b.url,filesize:b.filesize,status:"done",response:{id:b.id}}})),L}oe.b=function(w){var L=w.value,b=w.onChange,g=w.action,i=w.className,u=w.maxSize,f=u===void 0?150:u,y=w.title,h=y===void 0?"\u4E0A\u4F20\u9644\u4EF6":y,v=w.showRemoveModal,P=v===void 0?!1:v,N=w.accept,Q=N===void 0?"":N,G=w.additionalText,F=w.isDragger,D=w.number,z=D===void 0?1e3:D,j=w.aloneClear,Z=j===void 0?!1:j,te=Object(a.useState)(!1),Ae=Object(p.a)(te,2),he=Ae[0],ce=Ae[1],ae=Object(a.useState)(L||[]),ve=Object(p.a)(ae,2),ue=ve[0],fe=ve[1];Object(a.useEffect)(function(){L&&(fe(Object(T.a)(L)),z===(L==null?void 0:L.length)&&ce(!0))},[L]);var se=function(){setTimeout(function(){ue.pop(),fe(Object(T.a)(ue))},500)},me={multiple:!0,disabled:he,accept:Q,withCredentials:!0,fileList:ue,beforeUpload:function(De,we){var je=De.size/1024/1024;return ue.concat(we).length>z?(ue.pop(),fe(Object(T.a)(ue)),x.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(z,"\u4E2A\u6587\u4EF6")),Z?Promise.reject():(se(),!1)):!0},action:g||"".concat(d.a.API_SERVER,"/api/attachments.json"),onChange:function(De){var we,je,et=Object(T.a)(De.fileList);if(De.file.status==="done"&&((we=De.file)===null||we===void 0||((je=we.response)===null||je===void 0)?void 0:je.status)===-1){var Le,We;x.b.error((Le=De.file)===null||Le===void 0||((We=Le.response)===null||We===void 0)?void 0:We.message);return}et.length>=z?ce(!0):ce(!1),fe(Object(T.a)(et)),et=et.map(function(Ze){var $e;if(Ze!=null&&($e=Ze.response)!==null&&$e!==void 0&&$e.id){var bt;Ze.url="/api/attachments/".concat(Ze==null||((bt=Ze.response)===null||bt===void 0)?void 0:bt.id)}return Ze.name.indexOf(l.c)===-1&&(Ze.name="".concat(Ze.name).concat(l.c).concat(Object(l.a)(Ze.size))),Object(B.a)({},Ze)}),console.log("info:",De),b(et)},onRemove:function(){var pe=Object(E.a)(s.a.mark(function we(je){var et;return s.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(et=function(){var Ze=Object(E.a)(s.a.mark(function $e(){var bt,wt;return s.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(bt=je.response?je.response.id:je.id,!bt){ft.next=8;break}return ft.next=4,Object(A.d)(je.response?je.response.id:je.uid);case 4:return wt=ft.sent,ft.abrupt("return",wt);case 8:return ft.abrupt("return",!0);case 9:case"end":return ft.stop()}},$e)}));return function(){return Ze.apply(this,arguments)}}(),!P){We.next=5;break}return We.abrupt("return",new Promise(function(Ze,$e){k.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:o.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var bt=Object(E.a)(s.a.mark(function It(){var ft;return s.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,et();case 2:ft=zt.sent,x.b.success("\u5220\u9664\u6210\u529F"),Ze(!0);case 5:case"end":return zt.stop()}},It)}));function wt(){return bt.apply(this,arguments)}return wt}(),onCancel:function(){return Ze(!1)}})}));case 5:return We.next=7,et();case 7:return We.abrupt("return",We.sent);case 8:case"end":return We.stop()}},we)}));function De(we){return pe.apply(this,arguments)}return De}()};function re(pe){pe.preventDefault(),pe.stopPropagation()}return o.a.createElement("div",{className:"multi-upload ".concat(i||"")},F&&o.a.createElement(_,me,o.a.createElement("p",{className:"ant-upload-drag-icon"},o.a.createElement(m.a,null)),o.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",o.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",f,"MB)"," "),G),!F&&o.a.createElement(t.a,me,o.a.createElement(K.a,{disabled:he},h),o.a.createElement("span",{onClick:re,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",f,"MB)"," ")))}},"55Ip":function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return l});var q=C("Ty5D"),K=C("dI71"),I=C("q1tI"),k=C.n(I),E=C("YS25"),B=C("17x9"),M=C.n(B),x=C("wx14"),T=C("zLVn"),p=C("9R94"),r=function(i){Object(K.a)(u,i);function u(){for(var y,h=arguments.length,v=new Array(h),P=0;Pk+s&&c>B+s&&c>x+s&&c>p+s||cI+s&&t>E+s&&t>M+s&&t>T+s||t=0||h.relatedTarget.className.indexOf("".concat(Q,"-next"))>=0))return;i.setState({goInputText:""}),N(i.getValidValue())},i.go=function(h){var v=i.state.goInputText;if(v==="")return;(h.keyCode===s.ENTER||h.type==="click")&&(i.setState({goInputText:""}),i.props.quickGo(i.getValidValue()))},i}return Object(E.a)(g,[{key:"getValidValue",value:function(){var u=this.state,f=u.goInputText,y=u.current;return!f||isNaN(f)?y:Number(f)}},{key:"getPageSizeOptions",value:function(){var u=this.props,f=u.pageSize,y=u.pageSizeOptions;return y.some(function(h){return h.toString()===f.toString()})?y:y.concat([f.toString()]).sort(function(h,v){var P=isNaN(Number(h))?0:Number(h),N=isNaN(Number(v))?0:Number(v);return P-N})}},{key:"render",value:function(){var u=this,f=this.props,y=f.pageSize,h=f.locale,v=f.rootPrefixCls,P=f.changeSize,N=f.quickGo,Q=f.goButton,G=f.selectComponentClass,F=f.buildOptionText,D=f.selectPrefixCls,z=f.disabled,j=this.state.goInputText,Z="".concat(v,"-options"),te=G,Ae=null,he=null,ce=null;if(!P&&!N)return null;var ae=this.getPageSizeOptions();if(P&&te){var ve=ae.map(function(ue,fe){return T.a.createElement(te.Option,{key:fe,value:ue.toString()},(F||u.buildOptionText)(ue))});Ae=T.a.createElement(te,{disabled:z,prefixCls:D,showSearch:!1,className:"".concat(Z,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(y||ae[0]).toString(),onChange:this.changeSize,getPopupContainer:function(fe){return fe.parentNode}},ve)}return N&&(Q&&(ce=typeof Q=="boolean"?T.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(Z,"-quick-jumper-button")},h.jump_to_confirm):T.a.createElement("span",{onClick:this.go,onKeyUp:this.go},Q)),he=T.a.createElement("div",{className:"".concat(Z,"-quick-jumper")},h.jump_to,T.a.createElement("input",{disabled:z,type:"text",value:j,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),h.page,ce)),T.a.createElement("li",{className:"".concat(Z)},Ae,he)}}]),g}(T.a.Component);a.defaultProps={pageSizeOptions:["10","20","50","100"]};var o=a,d=C("N2Kk");function A(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function m(L,b,g){return g}function _(L,b,g){var i=typeof L=="undefined"?b.pageSize:L;return Math.floor((g.total-1)/i)+1}var R=function(L){Object(B.a)(g,L);var b=Object(M.a)(g);function g(i){var u;Object(k.a)(this,g),u=b.call(this,i),u.getJumpPrevPage=function(){return Math.max(1,u.state.current-(u.props.showLessItems?3:5))},u.getJumpNextPage=function(){return Math.min(_(void 0,u.state,u.props),u.state.current+(u.props.showLessItems?3:5))},u.getItemIcon=function(P,N){var Q=u.props.prefixCls,G=P||T.a.createElement("button",{type:"button","aria-label":N,className:"".concat(Q,"-item-link")});return typeof P=="function"&&(G=T.a.createElement(P,Object(I.a)({},u.props))),G},u.savePaginationNode=function(P){u.paginationNode=P},u.isValid=function(P){return l(P)&&P!==u.state.current},u.shouldDisplayQuickJumper=function(){var P=u.props,N=P.showQuickJumper,Q=P.pageSize,G=P.total;return G<=Q?!1:N},u.handleKeyDown=function(P){(P.keyCode===s.ARROW_UP||P.keyCode===s.ARROW_DOWN)&&P.preventDefault()},u.handleKeyUp=function(P){var N=u.getValidValue(P),Q=u.state.currentInputValue;N!==Q&&u.setState({currentInputValue:N}),P.keyCode===s.ENTER?u.handleChange(N):P.keyCode===s.ARROW_UP?u.handleChange(N-1):P.keyCode===s.ARROW_DOWN&&u.handleChange(N+1)},u.changePageSize=function(P){var N=u.state.current,Q=_(P,u.state,u.props);N=N>Q?Q:N,Q===0&&(N=u.state.current),typeof P=="number"&&("pageSize"in u.props||u.setState({pageSize:P}),"current"in u.props||u.setState({current:N,currentInputValue:N})),u.props.onShowSizeChange(N,P),"onChange"in u.props&&u.props.onChange&&u.props.onChange(N,P)},u.handleChange=function(P){var N=u.props.disabled,Q=P;if(u.isValid(Q)&&!N){var G=_(void 0,u.state,u.props);Q>G?Q=G:Q<1&&(Q=1),"current"in u.props||u.setState({current:Q,currentInputValue:Q});var F=u.state.pageSize;return u.props.onChange(Q,F),Q}return u.state.current},u.prev=function(){u.hasPrev()&&u.handleChange(u.state.current-1)},u.next=function(){u.hasNext()&&u.handleChange(u.state.current+1)},u.jumpPrev=function(){u.handleChange(u.getJumpPrevPage())},u.jumpNext=function(){u.handleChange(u.getJumpNextPage())},u.hasPrev=function(){return u.state.current>1},u.hasNext=function(){return u.state.current<_(void 0,u.state,u.props)},u.runIfEnter=function(P,N){if(P.key==="Enter"||P.charCode===13){for(var Q=arguments.length,G=new Array(Q>2?Q-2:0),F=2;F=y?v=y:v=Number(f),v}},{key:"getShowSizeChanger",value:function(){var u=this.props,f=u.showSizeChanger,y=u.total,h=u.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:y>h}},{key:"renderPrev",value:function(u){var f=this.props,y=f.prevIcon,h=f.itemRender,v=h(u,"prev",this.getItemIcon(y,"prev page")),P=!this.hasPrev();return Object(x.isValidElement)(v)?Object(x.cloneElement)(v,{disabled:P}):v}},{key:"renderNext",value:function(u){var f=this.props,y=f.nextIcon,h=f.itemRender,v=h(u,"next",this.getItemIcon(y,"next page")),P=!this.hasNext();return Object(x.isValidElement)(v)?Object(x.cloneElement)(v,{disabled:P}):v}},{key:"render",value:function(){var u=this,f=this.props,y=f.prefixCls,h=f.className,v=f.style,P=f.disabled,N=f.hideOnSinglePage,Q=f.total,G=f.locale,F=f.showQuickJumper,D=f.showLessItems,z=f.showTitle,j=f.showTotal,Z=f.simple,te=f.itemRender,Ae=f.showPrevNextJumpers,he=f.jumpPrevIcon,ce=f.jumpNextIcon,ae=f.selectComponentClass,ve=f.selectPrefixCls,ue=f.pageSizeOptions,fe=this.state,se=fe.current,me=fe.pageSize,re=fe.currentInputValue;if(N===!0&&Q<=me)return null;var pe=_(void 0,this.state,this.props),De=[],we=null,je=null,et=null,Le=null,We=null,Ze=F&&F.goButton,$e=D?1:2,bt=se-1>0?se-1:0,wt=se+1=$e*2&&se!==1+2&&(De[0]=Object(x.cloneElement)(De[0],{className:"".concat(y,"-item-after-jump-prev")}),De.unshift(we)),pe-se>=$e*2&&se!==pe-2&&(De[De.length-1]=Object(x.cloneElement)(De[De.length-1],{className:"".concat(y,"-item-before-jump-next")}),De.push(je)),yt!==1&&De.unshift(et),St!==pe&&De.push(Le)}var Ye=null;j&&(Ye=T.a.createElement("li",{className:"".concat(y,"-total-text")},j(Q,[Q===0?0:(se-1)*me+1,se*me>Q?Q:se*me])));var Ue=!this.hasPrev()||!pe,ke=!this.hasNext()||!pe;return T.a.createElement("ul",Object(q.a)({className:r()(y,h,Object(K.a)({},"".concat(y,"-disabled"),P)),style:v,unselectable:"unselectable",ref:this.savePaginationNode},It),Ye,T.a.createElement("li",{title:z?G.prev_page:null,onClick:this.prev,tabIndex:Ue?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(y,"-prev"),Object(K.a)({},"".concat(y,"-disabled"),Ue)),"aria-disabled":Ue},this.renderPrev(bt)),De,T.a.createElement("li",{title:z?G.next_page:null,onClick:this.next,tabIndex:ke?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(y,"-next"),Object(K.a)({},"".concat(y,"-disabled"),ke)),"aria-disabled":ke},this.renderNext(wt)),T.a.createElement(o,{disabled:P,locale:G,rootPrefixCls:y,selectComponentClass:ae,selectPrefixCls:ve,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:se,pageSize:me,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ze}))}}],[{key:"getDerivedStateFromProps",value:function(u,f){var y={};if("current"in u&&(y.current=u.current,u.current!==f.current&&(y.currentInputValue=y.current)),"pageSize"in u&&u.pageSize!==f.pageSize){var h=f.current,v=_(u.pageSize,f,u);h=h>v?v:h,"current"in u||(y.current=h,y.currentInputValue=h),y.pageSize=u.pageSize}return y}}]),g}(T.a.Component);R.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:A,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:A,locale:d.a,style:{},itemRender:m,totalBoundaryShowSizeChanger:50};var w=R},"6GrX":function(Ie,oe,C){var q=C("mFDi"),K=C("Xnb7"),I=C("bYtY"),k=I.getContext,E=I.extend,B=I.retrieve2,M=I.retrieve3,x=I.trim,T={},p=0,r=5e3,t=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,c="12px sans-serif",s={};function a(N,Q){s[N]=Q}function o(N,Q){Q=Q||c;var G=N+":"+Q;if(T[G])return T[G];for(var F=(N+"").split(` `),D=0,z=0,j=F.length;zr&&(p=0,T={}),p++,T[G]=D,D}function d(N,Q,G,F,D,z,j,Z){return j?l(N,Q,G,F,D,z,j,Z):A(N,Q,G,F,D,z,Z)}function A(N,Q,G,F,D,z,j){var Z=y(N,Q,D,z,j),te=o(N,Q);D&&(te+=D[1]+D[3]);var Ae=Z.outerHeight,he=m(0,te,G),ce=_(0,Ae,F),ae=new q(he,ce,te,Ae);return ae.lineHeight=Z.lineHeight,ae}function l(N,Q,G,F,D,z,j,Z){var te=h(N,{rich:j,truncate:Z,font:Q,textAlign:G,textPadding:D,textLineHeight:z}),Ae=te.outerWidth,he=te.outerHeight,ce=m(0,Ae,G),ae=_(0,he,F);return new q(ce,ae,Ae,he)}function m(N,Q,G){return G==="right"?N-=Q:G==="center"&&(N-=Q/2),N}function _(N,Q,G){return G==="middle"?N-=Q/2:G==="bottom"&&(N-=Q),N}function R(N,Q,G){var F=Q.textPosition,D=Q.textDistance,z=G.x,j=G.y;D=D||0;var Z=G.height,te=G.width,Ae=Z/2,he="left",ce="top";switch(F){case"left":z-=D,j+=Ae,he="right",ce="middle";break;case"right":z+=D+te,j+=Ae,ce="middle";break;case"top":z+=te/2,j-=D,he="center",ce="bottom";break;case"bottom":z+=te/2,j+=Z+D,he="center";break;case"inside":z+=te/2,j+=Ae,he="center",ce="middle";break;case"insideLeft":z+=D,j+=Ae,ce="middle";break;case"insideRight":z+=te-D,j+=Ae,he="right",ce="middle";break;case"insideTop":z+=te/2,j+=D,he="center";break;case"insideBottom":z+=te/2,j+=Z-D,he="center",ce="bottom";break;case"insideTopLeft":z+=D,j+=D;break;case"insideTopRight":z+=te-D,j+=D,he="right";break;case"insideBottomLeft":z+=D,j+=Z-D,ce="bottom";break;case"insideBottomRight":z+=te-D,j+=Z-D,he="right",ce="bottom";break}return N=N||{},N.x=z,N.y=j,N.textAlign=he,N.textVerticalAlign=ce,N}function w(N,Q,G){var F={textPosition:N,textDistance:G};return R({},F,Q)}function L(N,Q,G,F,D){if(!Q)return"";var z=(N+"").split(` `);D=b(Q,G,F,D);for(var j=0,Z=z.length;j=z;Z++)j-=z;var te=o(G,Q);return te>j&&(G="",te=0),j=N-te,F.ellipsis=G,F.ellipsisWidth=te,F.contentWidth=j,F.containerWidth=N,F}function g(N,Q){var G=Q.containerWidth,F=Q.font,D=Q.contentWidth;if(!G)return"";var z=o(N,F);if(z<=G)return N;for(var j=0;;j++){if(z<=D||j>=Q.maxIterations){N+=Q.ellipsis;break}var Z=j===0?i(N,D,Q.ascCharWidth,Q.cnCharWidth):z>0?Math.floor(N.length*D/z):0;N=N.substr(0,Z),z=o(N,F)}return N===""&&(N=Q.placeholder),N}function i(N,Q,G,F){for(var D=0,z=0,j=N.length;zhe)N="",j=[];else if(ce!=null)for(var ae=b(ce-(G?G[1]+G[3]:0),Q,D.ellipsis,{minChar:D.minChar,placeholder:D.placeholder}),ve=0,ue=j.length;veF&&v(G,N.substring(F,z)),v(G,D[2],D[1]),F=t.lastIndex}Fve)return{lines:[],width:0,height:0};pe.textWidth=o(pe.text,je);var Le=De.textWidth,We=Le==null||Le==="auto";if(typeof Le=="string"&&Le.charAt(Le.length-1)==="%")pe.percentWidth=Le,Ae.push(pe),Le=0;else{if(We){Le=pe.textWidth;var Ze=De.textBackgroundColor,$e=Ze&&Ze.image;$e&&($e=K.findExistImage($e),K.isImageReady($e)&&(Le=Math.max(Le,$e.width*et/$e.height)))}var bt=we?we[1]+we[3]:0;Le+=bt;var wt=ae!=null?ae-me:null;wt!=null&&wtj&&(j=D.line_indent_level));var Z={mode:z,parent:D,last_token:D?D.last_token:new c(l.START_BLOCK,""),last_word:D?D.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:j,alignment:0,line_indent_level:D?D.line_indent_level:j,start_line_index:this._output.get_line_number(),ternary_depth:0};return Z},G.prototype._reset=function(D){var z=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new t(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var j=new o(D,this._options);return this._tokens=j.tokenize(),D},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,z=this._reset(this._source_text),j=this._options.eol;this._options.eol==="auto"&&(j=` `,z&&s.lineBreak.test(z||"")&&(j=z.match(s.lineBreak)[0]));for(var Z=this._tokens.next();Z;)this.handle_token(Z),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Z,Z=this._tokens.next();return D=this._output.get_code(j),D},G.prototype.handle_token=function(D,z){D.type===l.START_EXPR?this.handle_start_expr(D):D.type===l.END_EXPR?this.handle_end_expr(D):D.type===l.START_BLOCK?this.handle_start_block(D):D.type===l.END_BLOCK?this.handle_end_block(D):D.type===l.WORD?this.handle_word(D):D.type===l.RESERVED?this.handle_word(D):D.type===l.SEMICOLON?this.handle_semicolon(D):D.type===l.STRING?this.handle_string(D):D.type===l.EQUALS?this.handle_equals(D):D.type===l.OPERATOR?this.handle_operator(D):D.type===l.COMMA?this.handle_comma(D):D.type===l.BLOCK_COMMENT?this.handle_block_comment(D,z):D.type===l.COMMENT?this.handle_comment(D,z):D.type===l.DOT?this.handle_dot(D):D.type===l.EOF?this.handle_eof(D):D.type===l.UNKNOWN?this.handle_unknown(D,z):this.handle_unknown(D,z)},G.prototype.handle_whitespace_and_comments=function(D,z){var j=D.newlines,Z=this._options.keep_array_indentation&&v(this._flags.mode);if(D.comments_before)for(var te=D.comments_before.next();te;)this.handle_whitespace_and_comments(te,z),this.handle_token(te,z),te=D.comments_before.next();if(Z)for(var Ae=0;Ae0,z);else if(this._options.max_preserve_newlines&&j>this._options.max_preserve_newlines&&(j=this._options.max_preserve_newlines),this._options.preserve_newlines&&j>1){this.print_newline(!1,z);for(var he=1;he0&&(!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))},G.prototype.set_mode=function(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===f.Statement&&y(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(D){var z=!1;return z=z||L(this._flags.last_token,["var","let","const"])&&D.type===l.WORD,z=z||w(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&L(this._flags.last_token,F)&&!D.newlines,z=z||w(this._flags.last_token,"else")&&!(w(D,"if")&&!D.comments_before),z=z||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),z=z||this._flags.last_token.type===l.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==l.WORD&&D.type!==l.RESERVED,z=z||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),z?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,L(D,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var z=f.Expression;if(D.text==="["){if(this._flags.last_token.type===l.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=f.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())),m(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=f.ForInitializer):m(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=f.Conditional):m(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(m(this._flags.last_token.text,d)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var j=this._tokens.peek(-3);if(this._options.space_after_named_function&&j){var Z=this._tokens.peek(-4);L(j,["async","function"])||j.text==="*"&&L(Z,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(j.text==="{"||j.text===","||j.text==="*"&&(Z.text==="{"||Z.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(D);(this._flags.last_token.type===l.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(m(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&m(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===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(D){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===l.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(D),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===f.Conditional&&(this._previous_flags.mode=f.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(D){this.handle_whitespace_and_comments(D);var z=this._tokens.peek(),j=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):j&&(m(j.text,[":",","])&&m(z.type,[l.STRING,l.WORD,l.RESERVED])||m(z.text,["get","set","..."])&&m(j.type,[l.WORD,l.RESERVED]))?m(this._last_last_text,["class","interface"])&&!m(j.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===l.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):m(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var Z=!z.comments_before&&z.text==="}",te=Z&&this._flags.last_word==="function"&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var Ae=0,he=null;this._flags.inline_frame=!0;do if(Ae+=1,he=this._tokens.peek(Ae-1),he.newlines){this._flags.inline_frame=!1;break}while(he.type!==l.EOF&&!(he.type===l.END_BLOCK&&he.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(te||this._flags.last_token.type===l.EQUALS||L(this._flags.last_token,b)&&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===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type===l.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!Z&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===f.Statement;)this.restore_mode();var z=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(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(D)},G.prototype.handle_word=function(D){if(D.type===l.RESERVED){if(m(D.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)D.type=l.WORD;else if(D.text==="import"&&m(this._tokens.peek().text,["(","."]))D.type=l.WORD;else if(m(D.text,["as","from"])&&!this._flags.import_block)D.type=l.WORD;else if(this._flags.mode===f.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(D.type=l.WORD)}}if(this.start_of_statement(D)?L(this._flags.last_token,["var","let","const"])&&D.type===l.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==l.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(w(D,"while")){this._output.space_before_token=!0,this.print_token(D),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&&w(D,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===f.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(D,["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(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D)),w(D,"function")){(m(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(m(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&(!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,F)?this._output.space_before_token=!0:w(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===l.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(D),this._flags.last_word=D.text;return}var j="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?j="SPACE":L(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?j="NEWLINE":(j="SPACE",this._output.space_before_token=!0):j="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===f.BlockStatement?j="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&P(this._flags.mode)?j="SPACE":this._flags.last_token.type===l.STRING?j="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.last_token.text==="*"&&(m(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&m(this._last_last_text,["{",","]))?j="SPACE":this._flags.last_token.type===l.START_BLOCK?this._flags.inline_frame?j="SPACE":j="NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,j="NEWLINE"),L(D,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?j="SPACE":j="NEWLINE"),L(D,["else","catch","finally"]))if((!(this._flags.last_token.type===l.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Z=this._output.current_line;Z.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else j==="NEWLINE"?L(this._flags.last_token,b)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!L(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(w(D,"if")&&w(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(D,d)&&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():j==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===l.WORD||D.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===l.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&w(D,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var z=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&w(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(D)},G.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===l.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===l.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},G.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},G.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),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(D)):this._flags.mode===f.ObjectLiteral||this._flags.mode===f.Statement&&this._flags.parent.mode===f.ObjectLiteral?(this._flags.mode===f.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)},G.prototype.handle_operator=function(D){var z=D.text==="*"&&(L(this._flags.last_token,["function","yield"])||m(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),j=m(D.text,["-","+"])&&(m(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||m(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var Z=!z;this.handle_whitespace_and_comments(D,Z)}if(D.text==="*"&&this._flags.last_token.type===l.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(this._flags.last_token.type===l.OPERATOR&&m(this._options.operator_position,u)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==l.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 te=!0,Ae=!0,he=!1;if(D.text===":"?this._flags.ternary_depth===0?te=!1:(this._flags.ternary_depth-=1,he=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!j&&!z&&this._options.preserve_newlines&&m(D.text,A)){var ce=D.text===":",ae=ce&&he,ve=ce&&!he;switch(this._options.operator_position){case i.before_newline:this._output.space_before_token=!ve,this.print_token(D),(!ce||ae)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case i.after_newline:this._output.space_before_token=!0,!ce||ae?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case i.preserve_newline:ve||this.allow_wrap_or_preserved_newline(D),te=!(this._output.just_added_newline()||ve),this._output.space_before_token=te,this.print_token(D),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(D),te=!1;var ue=this._tokens.peek();Ae=ue&&m(ue.type,[l.WORD,l.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),te=this._flags.last_token.type===l.START_BLOCK,Ae=!1;else if(m(D.text,["--","++","!","~"])||j){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),te=!1,Ae=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var fe=L(this._flags.last_token,b)&&D.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)&&(te=!0),this._flags.last_token.type===l.RESERVED?te=!0:this._flags.last_token.type===l.END_EXPR?te=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===l.OPERATOR&&(te=m(D.text,["--","-","++","+"])&&m(this._flags.last_token.text,["--","-","++","+"]),m(D.text,["+","-"])&&m(this._flags.last_token.text,["--","++"])&&(Ae=!0)),(this._flags.mode===f.BlockStatement&&!this._flags.inline_frame||this._flags.mode===f.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||te,this.print_token(D),this._output.space_before_token=Ae},G.prototype.handle_block_comment=function(D,z){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,z),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,z)},G.prototype.print_block_commment=function(D,z){var j=h(D.text),Z,te=!1,Ae=!1,he=D.whitespace_before,ce=he.length;if(this.print_newline(!1,z),this.print_token_line_indentation(D),this._output.add_token(j[0]),this.print_newline(!1,z),j.length>1){for(j=j.slice(1),te=N(j,"*"),Ae=Q(j,he),te&&(this._flags.alignment=1),Z=0;Z=0;s--)if(this.__items[s].match(c))return!0;return!1},p.prototype.set_indent=function(c,s){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.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)},p.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},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(c){this.__items.push(c);var s=c.lastIndexOf(` `);s!==-1?this.__character_count=c.length-s:this.__character_count+=c.length},p.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function r(c,s){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),s=s||"",c.indent_level>0&&(s=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}r.prototype.get_indent_size=function(c,s){var a=this.__base_string_length;return s=s||0,c<0&&(a=0),a+=c*this.__indent_size,a+=s,a},r.prototype.get_indent_string=function(c,s){var a=this.__base_string;return s=s||0,c<0&&(c=0,a=""),s+=c*this.__indent_size,this.__ensure_cache(s),a+=this.__cache[s],a},r.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var c=this.__cache.length,s=0,a="";this.__indent_size&&c>=this.__indent_size&&(s=Math.floor(c/this.__indent_size),c-=s*this.__indent_size,a=new Array(s+1).join(this.__indent_string)),c&&(a+=new Array(c+1).join(" ")),this.__cache.push(a)};function t(c,s){this.__indent_cache=new r(c,s),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},t.prototype.get_line_number=function(){return this.__lines.length},t.prototype.get_indent_string=function(c,s){return this.__indent_cache.get_indent_string(c,s)},t.prototype.get_indent_size=function(c,s){return this.__indent_cache.get_indent_size(c,s)},t.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},t.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},t.prototype.get_code=function(c){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===` `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` `);return c!==` `&&(a=a.replace(/[\n]/g,c)),a},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(c,s){return c=c||0,s=s||0,this.next_line.set_indent(c,s),this.__lines.length>1?(this.current_line.set_indent(c,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(c){for(var s=0;s1&&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},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(c,s){for(var a=this.__lines.length-2;a>=0;){var o=this.__lines[a];if(o.is_empty())break;if(o.item(0).indexOf(c)!==0&&o.item(-1)!==s){this.__lines.splice(a+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},T.exports.Output=t},function(T){function p(r,t,c,s){this.type=r,this.text=t,this.comments_before=null,this.newlines=c||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}T.exports.Token=p},function(T,p){var r="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\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",s="\\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",a="(?:\\\\u[0-9a-fA-F]{4}|["+r+c+"])",o="(?:\\\\u[0-9a-fA-F]{4}|["+t+c+s+"])*";p.identifier=new RegExp(a+o,"g"),p.identifierStart=new RegExp(a),p.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+t+c+s+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;p.newline=/[\n\r\u2028\u2029]/,p.lineBreak=new RegExp(`\r |`+p.newline.source),p.allLineBreaks=new RegExp(p.lineBreak.source,"g")},function(T,p,r){var t=r(6).Options,c=["before-newline","after-newline","preserve-newline"];function s(a){t.call(this,a,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="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 d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var A=0;A>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var i=new RegExp(g),u="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=u.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+f.join("|")+")$"),h,v=function(N,Q){c.call(this,N,Q),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new d(this._input),F=new A(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(o.identifier).matching(o.identifierMatch),number:G.matching(R),punct:G.matching(i),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(o.lineBreak),shebang:G.starting_with(/#!/).until_after(o.lineBreak),xml:G.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:F.until(/['\\\n\r\u2028\u2029]/),double_quote:F.until(/["\\\n\r\u2028\u2029]/),template_text:F.until(/[`\\$]/),template_expression:F.until(/[`}\\]/)}};v.prototype=new c,v.prototype._is_comment=function(N){return N.type===m.COMMENT||N.type===m.BLOCK_COMMENT||N.type===m.UNKNOWN},v.prototype._is_opening=function(N){return N.type===m.START_BLOCK||N.type===m.START_EXPR},v.prototype._is_closing=function(N,Q){return(N.type===m.END_BLOCK||N.type===m.END_EXPR)&&Q&&(N.text==="]"&&Q.text==="["||N.text===")"&&Q.text==="("||N.text==="}"&&Q.text==="{")},v.prototype._reset=function(){h=!1},v.prototype._get_next_token=function(N,Q){var G=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(m.EOF,""):(G=G||this._read_non_javascript(F),G=G||this._read_string(F),G=G||this._read_word(N),G=G||this._read_singles(F),G=G||this._read_comment(F),G=G||this._read_regexp(F,N),G=G||this._read_xml(F,N),G=G||this._read_punctuation(),G=G||this._create_token(m.UNKNOWN,this._input.next()),G)},v.prototype._read_word=function(N){var Q;if(Q=this.__patterns.identifier.read(),Q!=="")return Q=Q.replace(o.allLineBreaks,` `),!(N.type===m.DOT||N.type===m.RESERVED&&(N.text==="set"||N.text==="get"))&&y.test(Q)?(Q==="in"||Q==="of")&&(N.type===m.WORD||N.type===m.STRING)?this._create_token(m.OPERATOR,Q):this._create_token(m.RESERVED,Q):this._create_token(m.WORD,Q);if(Q=this.__patterns.number.read(),Q!=="")return this._create_token(m.WORD,Q)},v.prototype._read_singles=function(N){var Q=null;return N==="("||N==="["?Q=this._create_token(m.START_EXPR,N):N===")"||N==="]"?Q=this._create_token(m.END_EXPR,N):N==="{"?Q=this._create_token(m.START_BLOCK,N):N==="}"?Q=this._create_token(m.END_BLOCK,N):N===";"?Q=this._create_token(m.SEMICOLON,N):N==="."&&L.test(this._input.peek(1))?Q=this._create_token(m.DOT,N):N===","&&(Q=this._create_token(m.COMMA,N)),Q&&this._input.next(),Q},v.prototype._read_punctuation=function(){var N=this.__patterns.punct.read();if(N!=="")return N==="="?this._create_token(m.EQUALS,N):N==="?."?this._create_token(m.DOT,N):this._create_token(m.OPERATOR,N)},v.prototype._read_non_javascript=function(N){var Q="";if(N==="#"){if(this._is_first_token()&&(Q=this.__patterns.shebang.read(),Q))return this._create_token(m.UNKNOWN,Q.trim()+` `);if(Q=this.__patterns.include.read(),Q)return this._create_token(m.UNKNOWN,Q.trim()+` `);N=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(w)){do N=this._input.next(),G+=N;while(this._input.hasNext()&&N!=="#"&&N!=="=");return N==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(m.WORD,G)}this._input.back()}else if(N==="<"&&this._is_first_token()){if(Q=this.__patterns.html_comment_start.read(),Q){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)Q+=this._input.next();return h=!0,this._create_token(m.COMMENT,Q)}}else if(h&&N==="-"&&(Q=this.__patterns.html_comment_end.read(),Q))return h=!1,this._create_token(m.COMMENT,Q);return null},v.prototype._read_comment=function(N){var Q=null;if(N==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var F=_.get_directives(G);F&&F.ignore==="start"&&(G+=_.readIgnored(this._input)),G=G.replace(o.allLineBreaks,` `),Q=this._create_token(m.BLOCK_COMMENT,G),Q.directives=F}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),Q=this._create_token(m.COMMENT,G))}return Q},v.prototype._read_string=function(N){if(N==="`"||N==="'"||N==='"'){var Q=this._input.next();return this.has_char_escapes=!1,N==="`"?Q+=this._read_string_recursive("`",!0,"${"):Q+=this._read_string_recursive(N),this.has_char_escapes&&this._options.unescape_strings&&(Q=P(Q)),this._input.peek()===N&&(Q+=this._input.next()),Q=Q.replace(o.allLineBreaks,` `),this._create_token(m.STRING,Q)}return null},v.prototype._allow_regexp_or_xml=function(N){return N.type===m.RESERVED&&l(N.text,["return","case","throw","else","do","typeof","yield"])||N.type===m.END_EXPR&&N.text===")"&&N.opened.previous.type===m.RESERVED&&l(N.opened.previous.text,["if","while","for"])||l(N.type,[m.COMMENT,m.START_EXPR,m.START_BLOCK,m.START,m.END_BLOCK,m.OPERATOR,m.EQUALS,m.EOF,m.SEMICOLON,m.COMMA])},v.prototype._read_regexp=function(N,Q){if(N==="/"&&this._allow_regexp_or_xml(Q)){for(var G=this._input.next(),F=!1,D=!1;this._input.hasNext()&&(F||D||this._input.peek()!==N)&&!this._input.testChar(o.newline);)G+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===N&&(G+=this._input.next(),G+=this._input.read(o.identifier)),this._create_token(m.STRING,G)}return null},v.prototype._read_xml=function(N,Q){if(this._options.e4x&&N==="<"&&this._allow_regexp_or_xml(Q)){var G="",F=this.__patterns.xml.read_match();if(F){for(var D=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=D.indexOf("{")===0,j=0;F;){var Z=!!F[1],te=F[2],Ae=!!F[F.length-1]||te.slice(0,8)==="![CDATA[";if(!Ae&&(te===D||z&&te.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Z?--j:++j),G+=F[0],j<=0)break;F=this.__patterns.xml.read_match()}return F||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(o.allLineBreaks,` `),this._create_token(m.STRING,G)}}return null};function P(N){for(var Q="",G=0,F=new t(N),D=null;F.hasNext();)if(D=F.match(/([\s]|[^\\]|\\\\)+/g),D&&(Q+=D[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")D=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")D=F.match(/u([0-9A-Fa-f]{4})/g);else{Q+="\\",F.hasNext()&&(Q+=F.next());continue}if(!D)return N;if(G=parseInt(D[1],16),G>126&&G<=255&&D[0].indexOf("x")===0)return N;if(G>=0&&G<32){Q+="\\"+D[0];continue}else G===34||G===39||G===92?Q+="\\"+String.fromCharCode(G):Q+=String.fromCharCode(G)}return Q}v.prototype._read_string_recursive=function(N,Q,G){var F,D;N==="'"?D=this.__patterns.single_quote:N==='"'?D=this.__patterns.double_quote:N==="`"?D=this.__patterns.template_text:N==="}"&&(D=this.__patterns.template_expression);for(var z=D.read(),j="";this._input.hasNext();){if(j=this._input.next(),j===N||!Q&&o.newline.test(j)){this._input.back();break}else j==="\\"&&this._input.hasNext()?(F=this._input.peek(),F==="x"||F==="u"?this.has_char_escapes=!0:F==="\r"&&this._input.peek(1)===` `&&this._input.next(),j+=this._input.next()):G&&(G==="${"&&j==="$"&&this._input.peek()==="{"&&(j+=this._input.next()),G===j&&(N==="`"?j+=this._read_string_recursive("}",Q,"`"):j+=this._read_string_recursive("`",Q,"${"),this._input.hasNext()&&(j+=this._input.next())));j+=D.read(),z+=j}return z},T.exports.Tokenizer=v,T.exports.TOKEN=m,T.exports.positionable_operators=b.slice(),T.exports.line_starters=u.slice()},function(T){var p=RegExp.prototype.hasOwnProperty("sticky");function r(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&t=0&&c=t.length&&this.__input.substring(c-t.length,c).toLowerCase()===t},T.exports.InputScanner=r},function(T,p,r){var t=r(8).InputScanner,c=r(3).Token,s=r(10).TokenStream,a=r(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(A,l){this._input=new t(A),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var A,l=new c(o.START,""),m=null,_=[],R=new s;l.type!==o.EOF;){for(A=this._get_next_token(l,m);this._is_comment(A);)R.add(A),A=this._get_next_token(l,m);R.isEmpty()||(A.comments_before=R,R=new s),A.parent=m,this._is_opening(A)?(_.push(m),m=A):m&&this._is_closing(A,m)&&(A.opened=m,m.closed=A,m=_.pop(),A.parent=m),A.previous=l,l.next=A,this.__tokens.add(A),l=A}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(A,l){this._readWhitespace();var m=this._input.read(/.+/g);return m?this._create_token(o.RAW,m):this._create_token(o.EOF,"")},d.prototype._is_comment=function(A){return!1},d.prototype._is_opening=function(A){return!1},d.prototype._is_closing=function(A,l){return!1},d.prototype._create_token=function(A,l){var m=new c(A,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return m},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},T.exports.Tokenizer=d,T.exports.TOKEN=o},function(T){function p(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}p.prototype.restart=function(){this.__position=0},p.prototype.isEmpty=function(){return this.__tokens_length===0},p.prototype.hasNext=function(){return this.__position=0&&r/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new t,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(a){var o=this._create();return o._disabled[a]=!0,o._update(),o},s.prototype.read_options=function(a){var o=this._create();for(var d in c)o._disabled[d]=a.templating.indexOf(d)===-1;return o._update(),o},s.prototype.exclude=function(a){var o=this._create();return o._excluded[a]=!0,o._update(),o},s.prototype.read=function(){var a="";this._match_pattern?a=this._input.read(this._starting_pattern):a=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),a+=o,o=this._read_template();return this._until_after&&(a+=this._input.readUntilAfter(this._until_pattern)),a},s.prototype.__set_templated_pattern=function(){var a=[];this._disabled.php||a.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||a.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||a.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(a.push(this.__patterns.django._starting_pattern.source),a.push(this.__patterns.django_value._starting_pattern.source),a.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||a.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&a.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+a.join("|")+")")},s.prototype._read_template=function(){var a="",o=this._input.peek();if(o==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(a=a||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(a=a||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(a=a||this.__patterns.handlebars_comment.read(),a=a||this.__patterns.handlebars_unescaped.read(),a=a||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(a=a||this.__patterns.django_value.read()),this._excluded.django||(a=a||this.__patterns.django_comment.read(),a=a||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(a=a||this.__patterns.smarty_comment.read(),a=a||this.__patterns.smarty_literal.read(),a=a||this.__patterns.smarty.read()));return a},T.exports.TemplatablePattern=s}],B={};function M(T){var p=B[T];if(p!==void 0)return p.exports;var r=B[T]={exports:{}};return E[T](r,r.exports,M),r.exports}var x=M(0);I=x})();var k=I;!(q=[],K=function(){return{js_beautify:k}}.apply(oe,q),K!==void 0&&(Ie.exports=K))})()},"6eGT":function(Ie,oe,C){"use strict";function q(K){return null}oe.a=q},"6fms":function(Ie,oe,C){var q=C("SUKs"),K=C("06Qe"),I=C("bYtY"),k=I.each;function E(T){return parseInt(T,10)}function B(T,p){K.initVML(),this.root=T,this.storage=p;var r=document.createElement("div"),t=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",t.style.cssText="position:absolute;left:0;top:0;",T.appendChild(r),this._vmlRoot=t,this._vmlViewport=r,this.resize();var c=p.delFromStorage,s=p.addToStorage;p.delFromStorage=function(a){c.call(p,a),a&&(a.onRemove&&a.onRemove(t))},p.addToStorage=function(a){a.onAdd&&a.onAdd(t),s.call(p,a)},this._firstPaint=!0}B.prototype={constructor:B,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var T=this.getViewportRoot();if(T)return{offsetLeft:T.offsetLeft||0,offsetTop:T.offsetTop||0}},refresh:function(){var T=this.storage.getDisplayList(!0,!0);this._paintList(T)},_paintList:function(T){for(var p=this._vmlRoot,r=0;r1&&arguments[1]!==void 0?arguments[1]:0,a=(M[c[s+0]]+M[c[s+1]]+M[c[s+2]]+M[c[s+3]]+"-"+M[c[s+4]]+M[c[s+5]]+"-"+M[c[s+6]]+M[c[s+7]]+"-"+M[c[s+8]]+M[c[s+9]]+"-"+M[c[s+10]]+M[c[s+11]]+M[c[s+12]]+M[c[s+13]]+M[c[s+14]]+M[c[s+15]]).toLowerCase();if(!B(a))throw TypeError("Stringified UUID is invalid");return a}var p=T;function r(c,s,a){c=c||{};var o=c.random||(c.rng||I)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,s){a=a||0;for(var d=0;d<16;++d)s[a+d]=o[d];return s}return p(o)}var t=oe.a=r},"7SHv":function(Ie,oe,C){var q=C("LPTA"),K=q.devicePixelRatio,I=C("bYtY"),k=C("SUKs"),E=C("mFDi"),B=C("BPZU"),M=C("Xmg4"),x=C("mLcG"),T=C("Dagg"),p=C("ItGF"),r=1e5,t=314159,c=.01,s=.001;function a(b){return parseInt(b,10)}function o(b){return b?b.__builtin__?!0:!(typeof b.resize!="function"||typeof b.refresh!="function"):!1}var d=new E(0,0,0,0),A=new E(0,0,0,0);function l(b,g,i){return d.copy(b.getBoundingRect()),b.transform&&d.applyTransform(b.transform),A.width=g,A.height=i,!d.intersect(A)}function m(b,g){if(b===g)return!1;if(!b||!g||b.length!==g.length)return!0;for(var i=0;i=0&&i.splice(u,1),b.__hoverMir=null},clearHover:function(b){for(var g=this._hoverElements,i=0;i15)break}}y.__drawIndex=j,y.__drawIndex0&&b>u[0]){for(h=0;hb);h++);y=i[u[h]]}if(u.splice(h+1,0,b),i[b]=g,!g.virtual)if(y){var P=y.dom;P.nextSibling?v.insertBefore(g.dom,P.nextSibling):v.appendChild(g.dom)}else v.firstChild?v.insertBefore(g.dom,v.firstChild):v.appendChild(g.dom)},eachLayer:function(b,g){var i=this._zlevelList,u,f;for(f=0;f0?c:0),this._needsManuallyCompositing),P.__builtin__||k("ZLevel "+v+" has been used by unkown layer "+P.id),P!==f&&(P.__used=!0,P.__startIndex!==i&&(P.__dirty=!0),P.__startIndex=i,P.incremental?P.__drawIndex=-1:P.__drawIndex=i,g(i),f=P),u.__dirty&&(P.__dirty=!0,P.incremental&&P.__drawIndex<0&&(P.__drawIndex=i))}g(i),this.eachBuiltinLayer(function(N,Q){!N.__used&&N.getElementCount()>0&&(N.__dirty=!0,N.__startIndex=N.__endIndex=N.__drawIndex=0),N.__dirty&&N.__drawIndex<0&&(N.__drawIndex=N.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(b){b.clear()},setBackgroundColor:function(b){this._backgroundColor=b},configLayer:function(b,g){if(g){var i=this._layerConfig;i[b]?I.merge(i[b],g,!0):i[b]=g;for(var u=0;u0&&arguments[0]!==void 0?arguments[0]:[],o=new Map;function d(A){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(A||[]).forEach(function(m){var _=m.key,R=m.children;Object(E.a)(_!=null,"Tree node must have a certain key: [".concat(l).concat(_,"]"));var w=String(_);Object(E.a)(!o.has(w)||_===null||_===void 0,"Same 'key' exist in the Tree: ".concat(w)),o.set(w,!0),d(R,"".concat(l).concat(w," > "))})}d(a)}function T(a){function o(d){var A=Object(k.a)(d);return A.map(function(l){if(!Object(B.i)(l))return Object(E.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var m=l.key,_=l.props,R=_.children,w=Object(I.a)(_,["children"]),L=Object(K.a)({key:m},w),b=o(R);return b.length&&(L.children=b),L}).filter(function(l){return l})}return o(a)}function p(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(o===!0?[]:o),A=[];function l(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(R,w){var L=Object(B.h)(_?_.pos:"0",w),b=M(R.key,L),g=Object(K.a)(Object(K.a)({},R),{},{parent:_,pos:L,children:null,data:R,isStart:[].concat(Object(q.a)(_?_.isStart:[]),[w===0]),isEnd:[].concat(Object(q.a)(_?_.isEnd:[]),[w===m.length-1])});return A.push(g),o===!0||d.has(b)?g.children=l(R.children||[],g):g.children=[],g})}return l(a),A}function r(a,o,d){var A;d?typeof d=="string"?A=function(_){return _[d]}:typeof d=="function"&&(A=function(_){return d(_)}):A=function(_,R){return M(_.key,R)};function l(m,_,R){var w=m?m.children:a,L=m?Object(B.h)(R.pos,_):"0";if(m){var b=A(m,L),g={node:m,index:_,pos:L,key:b,parentPos:R.node?R.pos:null,level:R.level+1};o(g)}w&&w.forEach(function(i,u){l(i,u,{node:m,pos:L,level:R?R.level+1:-1})})}l(null)}function t(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=o.initWrapper,A=o.processEntity,l=o.onProcessFinished,m=arguments.length>2?arguments[2]:void 0,_={},R={},w={posEntities:_,keyEntities:R};return d&&(w=d(w)||w),r(a,function(L){var b=L.node,g=L.index,i=L.pos,u=L.key,f=L.parentPos,y=L.level,h={node:b,index:g,key:u,pos:i,level:y},v=M(u,i);_[i]=h,R[v]=h,h.parent=_[f],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),A&&A(h,w)},m),l&&l(w),w}function c(a,o){var d=o.expandedKeys,A=o.selectedKeys,l=o.loadedKeys,m=o.loadingKeys,_=o.checkedKeys,R=o.halfCheckedKeys,w=o.dragOverNodeKey,L=o.dropPosition,b=o.keyEntities,g=b[a],i={eventKey:a,expanded:d.indexOf(a)!==-1,selected:A.indexOf(a)!==-1,loaded:l.indexOf(a)!==-1,loading:m.indexOf(a)!==-1,checked:_.indexOf(a)!==-1,halfChecked:R.indexOf(a)!==-1,pos:String(g?g.pos:""),dragOver:w===a&&L===0,dragOverGapTop:w===a&&L===-1,dragOverGapBottom:w===a&&L===1};return i}function s(a){var o=a.data,d=a.expanded,A=a.selected,l=a.checked,m=a.loaded,_=a.loading,R=a.halfChecked,w=a.dragOver,L=a.dragOverGapTop,b=a.dragOverGapBottom,g=a.pos,i=a.active,u=Object(K.a)(Object(K.a)({},o),{},{expanded:d,selected:A,checked:l,loaded:m,loading:_,halfChecked:R,dragOver:w,dragOverGapTop:L,dragOverGapBottom:b,pos:g,active:i});return"props"in u||Object.defineProperty(u,"props",{get:function(){return Object(E.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),a}}),u}},"8Bcu":function(Ie,oe,C){Ie.exports={flex_box_center:"flex_box_center___3isCS",flex_space_between:"flex_space_between___1zEgQ",flex_box_vertical_center:"flex_box_vertical_center___2IyXM",flex_box_center_end:"flex_box_center_end___1r0jY",flex_box_column:"flex_box_column___2SHBj",rightWrap:"rightWrap___2XCk6",qrCode:"qrCode___3q9Z0",cardTop:"cardTop___2h9UR",cardTop2:"cardTop2___3KQ3O",card:"card___1aOV1",flexRow:"flexRow___DeBf7",flexRowAbout:"flexRowAbout___3sD2f",skillWrap:"skillWrap___pwM-3",skillTopWrap:"skillTopWrap___2oSn4",skillContentWrap:"skillContentWrap___239Us",skillContentWrapMin:"skillContentWrapMin___2KWd4",skillContentWrapMax:"skillContentWrapMax___NVKFP",skillContentIcon:"skillContentIcon___5mU6F",skillContentIconNoStatus:"skillContentIconNoStatus___1_V1l",skillExpandAllWrap:"skillExpandAllWrap___1HSf6",skillExpandAllContent:"skillExpandAllContent___3kY9W",memberItem:"memberItem___3cgRI",radius:"radius___2fxUa",memberItemContent:"memberItemContent___19hpK",directionItemWrap:"directionItemWrap___3Zm3f",groupActionWrap:"groupActionWrap___N0Epv",divabout:"divabout___psa-7",classButton:"classButton___30JJg",bg28e:"bg28e___2DyZD",bgGray:"bgGray___2PZB0",price:"price___2sFWj",li1:"li1___2y74c",discounts:"discounts___2JS39",realPrice:"realPrice___2kTeg",lineationPrice:"lineationPrice___2LeZ4",li2:"li2___2rpKJ"}},"8EBN":function(Ie,oe,C){(function(q){q(C("VrN/"))})(function(q){"use strict";q.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 K=0;K-1&&k.substring(M+1,k.length);if(x)return q.findModeByExtension(x)},q.findModeByName=function(k){k=k.toLowerCase();for(var E=0;E=F&&Nz?"true":"false","aria-posinset":z+1,"aria-setsize":j,tabIndex:Q?-1:0},x.a.createElement("div",{className:"".concat(G,"-first")},te),x.a.createElement("div",{className:"".concat(G,"-second")},te)));return D&&(Ae=D(Ae,this.props)),Ae}}]),f}(x.a.Component);function l(i,u){var f=Object.keys(i);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(i);u&&(y=y.filter(function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable})),f.push.apply(f,y)}return f}function m(i){for(var u=1;u0&&!j||N===t.a.RIGHT&&Z>0&&j?(F?Z-=.5:Z-=1,h.changeValue(Z),P.preventDefault()):N===t.a.LEFT&&Zj/2||!G&&v-z0)){Me.next=20;break}return Me.next=18,Promise.all(Ue);case 18:ke=Me.sent,at+=Ot;case 20:Me.next=13;break;case 22:return Me.next=24,Object(x.a)("/api/attachments/multipart_upload_end",{method:"POST",body:Object(q.a)({fileName:Ze.name,chunkCount:bt,uploadId:zt},_)});case 24:Ce=Me.sent,Ce.object?(D("success"),De(),w&&w(Object(q.a)(Object(q.a)({},Ce),{},{file:Ze,percent:100}))):(D("error"),ae("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),De(),L&&L(Ze.name));case 26:case"end":return Me.stop()}},ft)})(),"t0",11);case 11:It.next=19;break;case 13:It.prev=13,It.t1=It.catch(9),D("error"),ae("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),De(),L&&L(Ze.name);case 19:case"end":return It.stop()}},We,null,[[9,13]])}));return function(Ze){return Le.apply(this,arguments)}}(),je=Object(B.useCallback)(function(){pe.current=!0,me.current&&(me.current.abort(),R&&R())},[R]),et=function(We){var Ze,$e,bt=We==null||((Ze=We.target)===null||Ze===void 0||(($e=Ze.files)===null||$e===void 0))?void 0:$e[0];if(se(bt),F="ready",!bt)return;if(g){var wt=g(bt);wt||we(bt),De();return}we(bt)};return M.a.createElement(B.Fragment,null,M.a.createElement("input",{type:"file",id:re.current,style:{display:"none"},onChange:et,accept:f}),M.a.createElement("label",{className:r()(c.a.upload,y),htmlFor:re.current,style:v},u))};oe.a=Object(B.forwardRef)(s)},"9Bee":function(Ie,oe,C){"use strict";var q=C("DYRE"),K=C("zeV3"),I=C("+L6B"),k=C("2/Rp"),E=C("k1fw"),B=C("9og8"),M=C("tJVT"),x=C("WmNS"),T=C.n(x),p=C("q1tI"),r=C.n(p),t=C("vg9a"),c=C("DlQD"),s=C.n(c),a=C("rUJ1");function o(ne,H){var V=ne.match(/^(\s+)(?:```)/);if(V===null)return H;var ee=V[1];return H.split(` `).map(function(ge){var ie=ge.match(/^\s+/);if(ie===null)return ge;var tt=Object(M.a)(ie,1),Qt=tt[0];return Qt.length>=ee.length?ge.slice(ee.length):ge}).join(` `)}var d=[],A=["
    "],l=new s.a.Renderer,m=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){d.length=0,A=["
      "]}var R={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(ne,H,V,ee){if(H>=ne.length||ne[H].level<=V)return H;var ge=ne[H];ee.push("
    • "+ge.text+""),H++;var ie=[];return H=w(ne,H,ge.level,ie),ie.length>0&&(ee.push("
        "),ie.forEach(function(tt){ee.push(tt)}),ee.push("
      ")),ee.push("
    • "),H=w(ne,H,V,ee),H}function L(){return w(d,0,0,A),A.push("
    "),A.join("")}var b={heading:function(H){var V=m.exec(H);if(V)return{type:"heading",raw:V[0],depth:V[1].length,text:V[2]}},fences:function(H){var V=this.rules.block.fences.exec(H);if(V){var ee=V[0],ge=o(ee,V[3]||""),ie=V[2]?V[2].trim():V[2];if(["latex","katex","math"].indexOf(ie)>=0){var tt=u(),Qt=ge;ge=tt,f[tt]={type:"block",expression:Qt}}return{type:"code",raw:ee,lang:ie,text:ge}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,i=0,u=function(){return"__special_katext_id_".concat(i++,"__")},f={};function y(){return f}function h(){i=0,f={}}function v(ne){return ne=ne.replace(g,function(H,V){var ee=u();return f[ee]={type:"inline",expression:V},ee}),ne}var P=l.listitem;l.listitem=function(ne){return P(v(ne))};var N=l.paragraph;l.paragraph=function(ne){return N(v(ne))};var Q=l.tablecell;l.tablecell=function(ne,H){return Q(v(ne),H)},l.code=function(ne,H,V){var ee=(H||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"

    ".concat(ne,"

    "):'
    ').concat(V?ne:Object(a.escape)(ne,!0),`
    `):'
    '+(V?ne:Object(a.escape)(ne,!0))+"
    "},l.heading=function(ne,H,V){var ee=this.options.headerPrefix+V.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:ee,level:H,text:ne}),"'+ne+""},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:b,renderer:l});var G=s.a,F=C("SJMd"),D=C("ulZh"),z=C.n(D),j=C("m3rI"),Z=C("Oy/b"),te=C("p5ED"),Ae=C("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 he=function(ne,H){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,ee){V.__proto__=ee}||function(V,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(V[ge]=ee[ge])})(ne,H)};function ce(ne,H){function V(){this.constructor=ne}he(ne,H),ne.prototype=H===null?Object.create(H):(V.prototype=H.prototype,new V)}function ae(ne,H,V,ee){return new(V||(V=Promise))(function(ge,ie){function tt(_n){try{dn(ee.next(_n))}catch(Zt){ie(Zt)}}function Qt(_n){try{dn(ee.throw(_n))}catch(Zt){ie(Zt)}}function dn(_n){var Zt;_n.done?ge(_n.value):(Zt=_n.value,Zt instanceof V?Zt:new V(function(Vn){Vn(Zt)})).then(tt,Qt)}dn((ee=ee.apply(ne,H||[])).next())})}function ve(ne,H){var V,ee,ge,ie,tt={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return ie={next:Qt(0),throw:Qt(1),return:Qt(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function Qt(dn){return function(_n){return function(Zt){if(V)throw new TypeError("Generator is already executing.");for(;tt;)try{if(V=1,ee&&(ge=2&Zt[0]?ee.return:Zt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Zt[1])).done)return ge;switch(ee=0,ge&&(Zt=[2&Zt[0],ge.value]),Zt[0]){case 0:case 1:ge=Zt;break;case 4:return tt.label++,{value:Zt[1],done:!1};case 5:tt.label++,ee=Zt[1],Zt=[0];continue;case 7:Zt=tt.ops.pop(),tt.trys.pop();continue;default:if(!(ge=tt.trys,(ge=ge.length>0&&ge[ge.length-1])||Zt[0]!==6&&Zt[0]!==2)){tt=0;continue}if(Zt[0]===3&&(!ge||Zt[1]>ge[0]&&Zt[1]',"select"),this.addActionButton(ee,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ee,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ee,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ee,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ee,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ee,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ee,'',"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(ie){var tt=document.createElement("div");tt.className=""+V.toolbarButtonStyleClass.name,tt.setAttribute("data-type-name",ie.typeName),tt.innerHTML=ie.icon,tt.addEventListener("click",function(){V.markerToolbarButtonClicked(tt,ie)}),V.buttons.push(tt),V.markerButtons.push(tt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ge=document.createElement("div");ge.className=this.toolbarBlockStyleClass.name,ge.style.whiteSpace="nowrap",ge.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ge),this.addActionButton(ge,'',"render"),this.addActionButton(ge,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ne.prototype.addButtonClickListener=function(H){this.buttonClickListeners.push(H)},ne.prototype.removeButtonClickListener=function(H){this.buttonClickListeners.indexOf(H)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(H),1)},ne.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ne.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var H=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var V=0;V0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",V)}),this.markerButtonOverflowBlock.style.display="none"},ne.prototype.actionToolbarButtonClicked=function(H,V){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",V)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ne.prototype.setActiveButton=function(H){this.resetButtonStyles(),H.className=H.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),H.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ne.prototype.setActiveMarkerButton=function(H){var V=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===H});V&&this.setActiveButton(V)},ne.prototype.setCurrentMarker=function(H){var V=this;this.currentMarker=H,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){V.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},ne}(),et=function(){function ne(H,V,ee,ge){this.panels=[],this.panelButtons=[],this.markerjsContainer=H,this.displayMode=V,this.uiStyleSettings=ee,this.styles=ge,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ne.prototype.addStyles=function(){var H;this.toolboxStyleClass=this.styles.addClass(new we("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 we("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var V=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new we("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new we("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new we("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 we("toolbox-panel-row_colors",` background-color: `+((H=this.uiStyleSettings.toolboxBackgroundColor)!==null&&H!==void 0?H:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new we("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px; padding: `+V+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new we("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new we("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new De("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new De("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},ne.prototype.show=function(H){var V;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=H,this.uiContainer.className=this.toolboxStyleClass.name+" "+((V=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ne.prototype.setPanelButtons=function(H){var V,ee,ge=this;this.panels=H,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ie){var tt;ie.uiStyleSettings=ge.uiStyleSettings;var Qt=document.createElement("div");Qt.className=ge.toolboxButtonStyleClass.name+" "+((tt=ge.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&tt!==void 0?tt:ge.toolboxButtonStyleColorsClass.name),Qt.innerHTML=ie.icon,Qt.title=ie.title,Qt.addEventListener("click",function(){ge.panelButtonClick(ie)}),ge.panelButtons.push(Qt),ge.buttonRow.appendChild(Qt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ne.prototype.panelButtonClick=function(H){var V=this,ee=-1;if(H!==this.activePanel){ee=this.panels.indexOf(H),this.panelRow.innerHTML="";var ge=H.getUi();ge.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ge),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=H}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){V.displayMode==="inline"?V.panelRow.style.display="none":V.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ie,tt){var Qt,dn;ie.className=V.toolboxButtonStyleClass.name+" "+(tt===ee?""+((Qt=V.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qt!==void 0?Qt:V.toolboxActiveButtonStyleColorsClass.name):""+((dn=V.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&dn!==void 0?dn:V.toolboxButtonStyleColorsClass.name))})},ne}(),Le=function(ne,H){this.title=ne,this.icon=H},We=function(ne){function H(V,ee,ge,ie){var tt=ne.call(this,V,ie||'')||this;return tt.colors=[],tt.addTransparent=!1,tt.colorBoxes=[],tt.colors=ee,tt.currentColor=ge,tt.setCurrentColor=tt.setCurrentColor.bind(tt),tt.getColorBox=tt.getColorBox.bind(tt),tt}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ge){var ie=V.getColorBox(ge);ee.appendChild(ie),V.colorBoxes.push(ie)}),ee},H.prototype.getColorBox=function(V){var ee=this,ge=this.uiStyleSettings.toolbarHeight/4,ie=this.uiStyleSettings.toolbarHeight-ge,tt=document.createElement("div");tt.style.display="inline-block",tt.style.boxSizing="content-box",tt.style.width=ie-2+"px",tt.style.height=ie-2+"px",tt.style.padding="1px",tt.style.marginRight="2px",tt.style.marginBottom="2px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.borderRadius=(ie+2)/2+"px",tt.style.borderColor=V===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){ee.setCurrentColor(V,tt)});var Qt=document.createElement("div");return Qt.style.display="inline-block",Qt.style.width=ie-2+"px",Qt.style.height=ie-2+"px",Qt.style.backgroundColor=V,Qt.style.borderRadius=ie/2+"px",V==="transparent"&&(Qt.style.fill=this.uiStyleSettings.toolboxAccentColor,Qt.innerHTML=` `),tt.appendChild(Qt),tt},H.prototype.setCurrentColor=function(V,ee){var ge=this;this.currentColor=V,this.colorBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(V)},H}(Le),Ze=function(){function ne(H,V,ee){this._state="new",this._isSelected=!1,this._container=H,this._overlayContainer=V,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ne.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(H){return!1},Object.defineProperty(ne.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ne.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ne.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ne.prototype.pointerDown=function(H,V){},ne.prototype.dblClick=function(H,V){},ne.prototype.manipulate=function(H){},ne.prototype.pointerUp=function(H){this.stateChanged()},ne.prototype.dispose=function(){},ne.prototype.addMarkerVisualToContainer=function(H){this.container.childNodes.length>0?this.container.insertBefore(H,this.container.childNodes[0]):this.container.appendChild(H)},ne.prototype.getState=function(){return{typeName:ne.typeName,state:this.state,notes:this.notes}},ne.prototype.restoreState=function(H){this._state=H.state,this.notes=H.notes},ne.prototype.scale=function(H,V){},ne.prototype.colorChanged=function(H){this.onColorChanged&&this.onColorChanged(H),this.stateChanged()},ne.prototype.fillColorChanged=function(H){this.onFillColorChanged&&this.onFillColorChanged(H),this.stateChanged()},ne.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var H=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),H.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(H)&&this.onStateChanged(this)}},ne.typeName="MarkerBase",ne}(),$e=function(){function ne(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ne.prototype.findGripByVisual=function(H){return this.topLeft.ownsTarget(H)?this.topLeft:this.topCenter.ownsTarget(H)?this.topCenter:this.topRight.ownsTarget(H)?this.topRight:this.centerLeft.ownsTarget(H)?this.centerLeft:this.centerRight.ownsTarget(H)?this.centerRight:this.bottomLeft.ownsTarget(H)?this.bottomLeft:this.bottomCenter.ownsTarget(H)?this.bottomCenter:this.bottomRight.ownsTarget(H)?this.bottomRight:void 0},ne}(),bt=function(){function ne(){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 ne.prototype.ownsTarget=function(H){return H===this.visual||H===this.visual.childNodes[0]||H===this.visual.childNodes[1]},ne}(),wt=function(){function ne(){}return ne.toITransformMatrix=function(H){return{a:H.a,b:H.b,c:H.c,d:H.d,e:H.e,f:H.f}},ne.toSVGMatrix=function(H,V){return H.a=V.a,H.b=V.b,H.c=V.c,H.d=V.d,H.e=V.e,H.f=V.f,H},ne}(),It=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.left=0,ie.top=0,ie.width=0,ie.height=0,ie.defaultSize={x:50,y:20},ie.offsetX=0,ie.offsetY=0,ie.rotationAngle=0,ie.CB_DISTANCE=10,ie._suppressMarkerCreateEvent=!1,ie.container.transform.baseVal.appendItem(fe.createTransform()),ie.setupControlBox(),ie}return ce(H,ne),Object.defineProperty(H.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"visual",{get:function(){return this._visual},set:function(V){this._visual=V;var ee=fe.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),H.prototype.ownsTarget=function(V){return!!ne.prototype.ownsTarget.call(this,V)||!!(this.controlGrips.findGripByVisual(V)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V))},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.state==="new"&&(this.left=V.x,this.top=V.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ge=this.unrotatePoint(V);if(this.manipulationStartX=ge.x,this.manipulationStartY=ge.y,this.offsetX=ge.x-this.left,this.offsetY=ge.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ie.x-this.width/2,this.top=ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var tt=this.container.transform.baseVal.getItem(0);tt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(tt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},H.prototype.pointerUp=function(V){var ee=this.state;ne.prototype.pointerUp.call(this,V),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(V),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},H.prototype.moveVisual=function(V){this.visual.style.transform="translate("+V.x+"px, "+V.y+"px)"},H.prototype.manipulate=function(V){var ee=this.unrotatePoint(V);this.state==="creating"?this.resize(V):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(V)},H.prototype.resize=function(V){var ee=this.manipulationStartLeft,ge=this.manipulationStartWidth,ie=this.manipulationStartTop,tt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+V.x-this.manipulationStartX,ge=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ge=this.manipulationStartWidth+V.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ie=this.manipulationStartTop+V.y-this.manipulationStartY,tt=this.manipulationStartHeight+this.manipulationStartTop-ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:tt=this.manipulationStartHeight+V.y-this.manipulationStartY}ge>=0?(this.left=ee,this.width=ge):(this.left=ee+ge,this.width=-ge),tt>=0?(this.top=ie,this.height=tt):(this.top=ie+tt,this.height=-tt),this.setSize()},H.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},H.prototype.rotate=function(V){if(Math.abs(V.x-this.centerX)>.1){var ee=Math.sign(V.x-this.centerX);this.rotationAngle=180*Math.atan((V.y-this.centerY)/(V.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},H.prototype.applyRotation=function(){var V=this.container.transform.baseVal.getItem(0);V.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(V,0)},H.prototype.rotatePoint=function(V){if(this.rotationAngle===0)return V;var ee=this.container.getCTM(),ge=fe.createPoint(V.x,V.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.y}},H.prototype.unrotatePoint=function(V){if(this.rotationAngle===0)return V;var ee=this.container.getCTM();ee=ee.inverse();var ge=fe.createPoint(V.x,V.y);return{x:(ge=ge.matrixTransform(ee)).x,y:ge.y}},H.prototype.select=function(){ne.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},H.prototype.deselect=function(){ne.prototype.deselect.call(this),this.controlBox.style.display="none"},H.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var V=fe.createTransform();V.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(V),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 $e,this.addControlGrips(),this.controlBox.style.display="none"},H.prototype.adjustControlBox=function(){var V=this.controlBox.transform.baseVal.getItem(0);V.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(V,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()},H.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()},H.prototype.createGrip=function(){var V=new bt;return V.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(V.visual),V},H.prototype.positionGrips=function(){var V=this.controlGrips.topLeft.GRIP_SIZE,ee=-V/2,ge=ee,ie=(this.width+this.CB_DISTANCE)/2-V/2,tt=(this.height+this.CB_DISTANCE)/2-V/2,Qt=this.height+this.CB_DISTANCE-V/2,dn=this.width+this.CB_DISTANCE-V/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ge),this.positionGrip(this.controlGrips.topCenter.visual,ie,ge),this.positionGrip(this.controlGrips.topRight.visual,dn,ge),this.positionGrip(this.controlGrips.centerLeft.visual,ee,tt),this.positionGrip(this.controlGrips.centerRight.visual,dn,tt),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Qt),this.positionGrip(this.controlGrips.bottomCenter.visual,ie,Qt),this.positionGrip(this.controlGrips.bottomRight.visual,dn,Qt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ie,ge-3*this.CB_DISTANCE)},H.prototype.positionGrip=function(V,ee,ge){var ie=V.transform.baseVal.getItem(0);ie.setTranslate(ee,ge),V.transform.baseVal.replaceItem(ie,0)},H.prototype.hideControlBox=function(){this.controlBox.style.display="none"},H.prototype.showControlBox=function(){this.controlBox.style.display=""},H.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:wt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:wt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ne.prototype.getState.call(this))},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V);var ee=V;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(wt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(wt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},H.prototype.scale=function(V,ee){ne.prototype.scale.call(this,V,ee);var ge=this.rotatePoint({x:this.left,y:this.top}),ie=this.unrotatePoint({x:ge.x*V,y:ge.y*ee});this.left=ie.x,this.top=ie.y,this.width=this.width*V,this.height=this.height*ee,this.adjustControlBox()},H}(Ze),ft=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!(!ne.prototype.ownsTarget.call(this,V)&&V!==this.visual)},H.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)},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},H.prototype.manipulate=function(V){ne.prototype.manipulate.call(this,V)},H.prototype.resize=function(V){ne.prototype.resize.call(this,V),this.setSize()},H.prototype.setSize=function(){ne.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},H.prototype.pointerUp=function(V){ne.prototype.pointerUp.call(this,V),this.setSize()},H.prototype.setStrokeColor=function(V){this.strokeColor=V,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(V),this.stateChanged()},H.prototype.setFillColor=function(V){this.fillColor=V,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},H.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},H.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},H.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ne.prototype.getState.call(this))},H.prototype.restoreState=function(V){var ee=V;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ne.prototype.restoreState.call(this,V),this.setSize()},H.prototype.scale=function(V,ee){ne.prototype.scale.call(this,V,ee),this.setSize()},H.title="Rectangle marker",H}(It),Ft=function(ne){function H(V,ee,ge,ie){var tt=ne.call(this,V,ie||'')||this;return tt.widths=[],tt.widthBoxes=[],tt.widths=ee,tt.currentWidth=ge,tt.setCurrentWidth=tt.setCurrentWidth.bind(tt),tt}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ge){var ie=document.createElement("div");ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=ge===V.currentWidth?V.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentWidth(ge,ie)}),ee.appendChild(ie);var tt=document.createElement("div");tt.innerText=ge.toString(),tt.style.marginRight="5px",ie.appendChild(tt);var Qt=document.createElement("div");Qt.style.minHeight="20px",Qt.style.flexGrow="2",Qt.style.display="flex",Qt.style.alignItems="center";var dn=document.createElement("hr");dn.style.minWidth="20px",dn.style.border="0px",dn.style.borderTop=ge+"px solid "+V.uiStyleSettings.toolboxColor,dn.style.flexGrow="2",Qt.appendChild(dn),ie.appendChild(Qt),V.widthBoxes.push(ie)}),ee},H.prototype.setCurrentWidth=function(V,ee){var ge=this;this.currentWidth=V,this.widthBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},H}(Le),zt=function(ne){function H(V,ee,ge,ie){var tt=ne.call(this,V,ie||'')||this;return tt.styles=[],tt.styleBoxes=[],tt.styles=ee,tt.currentStyle=ge,tt.setCurrentStyle=tt.setCurrentStyle.bind(tt),tt}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ge){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/V.styles.length-5+"%",ie.style.borderColor=ge===V.currentStyle?V.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentStyle(ge,ie)}),ee.appendChild(ie);var tt=document.createElement("div");tt.style.minHeight="20px",tt.style.flexGrow="2",tt.style.overflow="hidden";var Qt=` `;tt.innerHTML=Qt,ie.appendChild(tt),V.styleBoxes.push(ie)}),ee},H.prototype.setCurrentStyle=function(V,ee){var ge=this;this.currentStyle=V,this.styleBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},H}(Le),Qe=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.strokeColor=ge.defaultColor,ie.strokeWidth=ge.defaultStrokeWidth,ie.strokeDasharray=ge.defaultStrokeDasharray,ie.strokePanel=new We("Line color",ge.defaultColorSet,ge.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new Ft("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new zt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return ce(H,ne),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=ne.prototype.getState.call(this);return V.typeName=H.typeName,V},H.typeName="FrameMarker",H.title="Frame marker",H.icon='',H}(ft),ze=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},yt=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.x1=0,ie.y1=0,ie.x2=0,ie.y2=0,ie.defaultLength=50,ie.manipulationStartX=0,ie.manipulationStartY=0,ie.manipulationStartX1=0,ie.manipulationStartY1=0,ie.manipulationStartX2=0,ie.manipulationStartY2=0,ie.setupControlBox(),ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!!ne.prototype.ownsTarget.call(this,V)||!(!this.grip1.ownsTarget(V)&&!this.grip2.ownsTarget(V))},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.manipulationStartX=V.x,this.manipulationStartY=V.y,this.state==="new"&&(this.x1=V.x,this.y1=V.y,this.x2=V.x,this.y2=V.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(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},H.prototype.pointerUp=function(V){var ee=this.state;ne.prototype.pointerUp.call(this,V),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(V),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},H.prototype.adjustVisual=function(){},H.prototype.manipulate=function(V){this.state==="creating"?this.resize(V):this.state==="move"?(this.x1=this.manipulationStartX1+V.x-this.manipulationStartX,this.y1=this.manipulationStartY1+V.y-this.manipulationStartY,this.x2=this.manipulationStartX2+V.x-this.manipulationStartX,this.y2=this.manipulationStartY2+V.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(V)},H.prototype.resize=function(V){switch(this.activeGrip){case this.grip1:this.x1=V.x,this.y1=V.y;break;case this.grip2:case void 0:this.x2=V.x,this.y2=V.y}this.adjustVisual(),this.adjustControlBox()},H.prototype.select=function(){ne.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},H.prototype.deselect=function(){ne.prototype.deselect.call(this),this.controlBox.style.display="none"},H.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},H.prototype.adjustControlBox=function(){this.positionGrips()},H.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},H.prototype.createGrip=function(){var V=new bt;return V.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(V.visual),V},H.prototype.positionGrips=function(){var V=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-V/2,this.y1-V/2),this.positionGrip(this.grip2.visual,this.x2-V/2,this.y2-V/2)},H.prototype.positionGrip=function(V,ee,ge){var ie=V.transform.baseVal.getItem(0);ie.setTranslate(ee,ge),V.transform.baseVal.replaceItem(ie,0)},H.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ne.prototype.getState.call(this))},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V);var ee=V;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},H.prototype.scale=function(V,ee){ne.prototype.scale.call(this,V,ee),this.x1=this.x1*V,this.y1=this.y1*ee,this.x2=this.x2*V,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},H}(Ze),St=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.strokeColor=ge.defaultColor,ie.strokeWidth=ge.defaultStrokeWidth,ie.strokeDasharray=ge.defaultStrokeDasharray,ie.strokePanel=new We("Line color",ge.defaultColorSet,ge.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new Ft("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new zt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!(!ne.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorLine&&V!==this.visibleLine)},H.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)},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},H.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()]]))},H.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},H.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},H.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ne.prototype.getState.call(this));return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V);var ee=V;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},H.typeName="LineMarker",H.title="Line marker",H.icon='',H}(yt),at=function(ne){function H(V,ee,ge,ie){var tt=ne.call(this,V,ie||'')||this;return tt.fonts=[],tt.fontBoxes=[],tt.fonts=ee,tt.currentFont=ge,tt.setCurrentFont=tt.setCurrentFont.bind(tt),tt}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ge){var ie=document.createElement("div");ie.style.display="inline-block",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/V.fonts.length-5+"%",ie.style.borderColor=ge===V.currentFont?V.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentFont(ge,ie)}),ee.appendChild(ie);var tt=document.createElement("div");tt.style.display="flex",tt.style.minHeight="20px",tt.style.flexGrow="2",tt.style.fontFamily=ge,tt.style.overflow="hidden";var Qt=document.createElement("div");Qt.style.whiteSpace="nowrap",Qt.style.overflow="hidden",Qt.style.textOverflow="ellipsis",Qt.innerHTML="The quick brown fox jumps over the lazy dog",tt.appendChild(Qt),ie.appendChild(tt),V.fontBoxes.push(ie)}),ee},H.prototype.setCurrentFont=function(V,ee){var ge=this;this.currentFont=V,this.fontBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},H}(Le),Ot=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.color="transparent",ie.padding=5,ie.DEFAULT_TEXT="your text here",ie.text=ie.DEFAULT_TEXT,ie.isMoved=!1,ie.color=ge.defaultColor,ie.fontFamily=ge.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setColor=ie.setColor.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.renderText=ie.renderText.bind(ie),ie.sizeText=ie.sizeText.bind(ie),ie.textEditDivClicked=ie.textEditDivClicked.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.setSize=ie.setSize.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.colorPanel=new We("Color",ge.defaultColorSet,ge.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.fontFamilyPanel=new at("Font",ge.defaultFontFamilies,ge.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie}return ce(H,ne),H.prototype.ownsTarget=function(V){if(ne.prototype.ownsTarget.call(this,V)||V===this.visual||V===this.textElement||V===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ge){ge===V&&(ee=!0)}),ee},H.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()},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.isMoved=!1,this.pointerDownPoint=V,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},H.prototype.renderText=function(){var V=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(ee){V.textElement.appendChild(fe.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},H.prototype.getTextScale=function(){var V=this.textElement.getBBox(),ee=1;if(V.width>0&&V.height>0){var ge=(1*this.width-this.width*this.padding*2/100)/V.width,ie=(1*this.height-this.height*this.padding*2/100)/V.height;ee=Math.min(ge,ie)}return ee},H.prototype.getTextPosition=function(V){var ee=this.textElement.getBBox(),ge=0,ie=0;return ee.width>0&&ee.height>0&&(ge=(this.width-ee.width*V)/2,ie=this.height/2-ee.height*V/2),{x:ge,y:ie}},H.prototype.sizeText=function(){var V=this.textElement.getBBox(),ee=this.getTextScale(),ge=this.getTextPosition(ee);ge.y-=V.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ge.x+"px, "+ge.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ge.x,ge.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},H.prototype.manipulate=function(V){ne.prototype.manipulate.call(this,V),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(V.x-this.pointerDownPoint.x)>5||Math.abs(V.y-this.pointerDownPoint.y)>5)},H.prototype.resize=function(V){ne.prototype.resize.call(this,V),this.isMoved=!0,this.setSize(),this.sizeText()},H.prototype.setSize=function(){ne.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()]]))},H.prototype.pointerUp=function(V){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ne.prototype.pointerUp.call(this,V),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},H.prototype.showTextEditor=function(){var V=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(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(V.textEditor.style.fontSize);V.textEditor.clientWidth>=Number.parseInt(V.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,V.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var ge=ee.clipboardData.getData("text"),ie=window.getSelection();if(!ie.rangeCount)return!1;ie.deleteFromDocument(),ie.getRangeAt(0).insertNode(document.createTextNode(ge)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){V.textEditDivClicked(V.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},H.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var V=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ge=this.textElement.getBBox(),ie={x:ge.width*V,y:ge.height*V};ee.x-=ie.x/2,ee.y-=ie.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*V,12)+"px",this.textElement.style.display="none"}},H.prototype.textEditDivClicked=function(V){this.text=V.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},H.prototype.select=function(){ne.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},H.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ne.prototype.deselect.call(this)},H.prototype.dblClick=function(V,ee){ne.prototype.dblClick.call(this,V,ee),this.showTextEditor()},H.prototype.setColor=function(V){this.textElement&&fe.setAttributes(this.textElement,[["fill",V]]),this.color=V,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(V)},H.prototype.setFont=function(V){this.textElement&&fe.setAttributes(this.textElement,[["font-family",V]]),this.fontFamily=V,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},H.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},H.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ne.prototype.getState.call(this));return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){var ee=V;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ne.prototype.restoreState.call(this,V),this.setSize()},H.prototype.scale=function(V,ee){ne.prototype.scale.call(this,V,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},H.typeName="TextMarker",H.title="Text marker",H.icon='',H}(It),Ye=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.color="transparent",ie.lineWidth=3,ie.drawing=!1,ie.pixelRatio=1,ie.color=ge.defaultColor,ie.lineWidth=ge.defaultStrokeWidth,ie.pixelRatio=ge.freehandPixelRatio,ie.setColor=ie.setColor.bind(ie),ie.addCanvas=ie.addCanvas.bind(ie),ie.finishCreation=ie.finishCreation.bind(ie),ie.setLineWidth=ie.setLineWidth.bind(ie),ie.colorPanel=new We("Color",ge.defaultColorSet,ge.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.lineWidthPanel=new Ft("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),ie.lineWidthPanel.onWidthChanged=ie.setLineWidth,ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!(!ne.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.drawingImage)},H.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var V=fe.createTransform();this.visual.transform.baseVal.appendItem(V),this.addMarkerVisualToContainer(this.visual)},H.prototype.pointerDown=function(V,ee){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(V.x,V.y),this.drawing=!0):ne.prototype.pointerDown.call(this,V,ee)},H.prototype.manipulate=function(V){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(V.x,V.y),this.canvasContext.stroke()):ne.prototype.manipulate.call(this,V)},H.prototype.resize=function(V){ne.prototype.resize.call(this,V),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},H.prototype.pointerUp=function(V){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ne.prototype.pointerUp.call(this,V)},H.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)},H.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ne.prototype.select.call(this)},H.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ne.prototype.deselect.call(this)},H.prototype.finishCreation=function(){for(var V=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ge=ee[0],ie=ee[1],tt=ee[2],Qt=ee[3],dn=!1,_n=0;_n0&&(dn=!0,_nQt&&(Qt=_n),Zt>tt&&(tt=Zt));if(dn){this.left=ge/this.pixelRatio,this.top=ie/this.pixelRatio,this.width=(tt-ge)/this.pixelRatio,this.height=(Qt-ie)/this.pixelRatio;var Vn=document.createElement("canvas");Vn.width=tt-ge,Vn.height=Qt-ie,Vn.getContext("2d").putImageData(this.canvasContext.getImageData(ge,ie,tt-ge,Qt-ie),0,0),this.drawingImgUrl=Vn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},H.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})},H.prototype.setColor=function(V){this.color=V,this.colorChanged(V)},H.prototype.setLineWidth=function(V){this.lineWidth=V},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=Object.assign({drawingImgUrl:this.drawingImgUrl},ne.prototype.getState.call(this));return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){this.createVisual(),ne.prototype.restoreState.call(this,V),this.drawingImgUrl=V.drawingImgUrl,this.setDrawingImage()},H.prototype.scale=function(V,ee){ne.prototype.scale.call(this,V,ee),this.setDrawingImage()},H.typeName="FreehandMarker",H.title="Freehand marker",H.icon='',H}(It),Ue=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ge||'')||this;return ie.typeBoxes=[],ie.currentType=ee,ie.setCurrentType=ie.setCurrentType.bind(ie),ie}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ge=function(Qt){var dn="both";switch(Qt){case 0:dn="both";break;case 1:dn="start";break;case 2:dn="end";break;case 3:dn="none"}var _n=document.createElement("div");if(_n.style.display="flex",_n.style.flexGrow="2",_n.style.alignItems="center",_n.style.justifyContent="space-between",_n.style.padding="5px",_n.style.borderWidth="2px",_n.style.borderStyle="solid",_n.style.borderColor=dn===ie.currentType?ie.uiStyleSettings.toolboxAccentColor:"transparent",_n.addEventListener("click",function(){V.setCurrentType(dn,_n)}),ee.appendChild(_n),dn==="both"||dn==="start"){var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.innerHTML=` `,Zt.style.marginLeft="5px",_n.appendChild(Zt)}var Vn=document.createElement("div");Vn.style.display="flex",Vn.style.alignItems="center",Vn.style.minHeight="20px",Vn.style.flexGrow="2";var Xn=document.createElement("hr");if(Xn.style.minWidth="20px",Xn.style.border="0px",Xn.style.borderTop="3px solid "+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee"),Xn.style.flexGrow="2",Vn.appendChild(Xn),_n.appendChild(Vn),dn==="both"||dn==="end"){var lr=document.createElement("div");lr.style.display="flex",lr.style.alignItems="center",lr.style.minHeight="20px",lr.innerHTML=` `,lr.style.marginRight="5px",_n.appendChild(lr)}ie.typeBoxes.push(_n)},ie=this,tt=0;tt<4;tt++)ge(tt);return ee},H.prototype.setCurrentType=function(V,ee){var ge=this;this.currentType=V,this.typeBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings!==void 0?ge.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},H}(Le),ke=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.arrowType="end",ie.arrowBaseHeight=10,ie.arrowBaseWidth=10,ie.getArrowPoints=ie.getArrowPoints.bind(ie),ie.setArrowType=ie.setArrowType.bind(ie),ie.arrowTypePanel=new Ue("Arrow type","end"),ie.arrowTypePanel.onArrowTypeChanged=ie.setArrowType,ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!(!ne.prototype.ownsTarget.call(this,V)&&V!==this.arrow1&&V!==this.arrow2)},H.prototype.getArrowPoints=function(V,ee){var ge=this.arrowBaseWidth+2*this.strokeWidth,ie=this.arrowBaseHeight+2*this.strokeWidth;return V-ge/2+","+(ee+ie/2)+" "+V+","+(ee-ie/2)+" "+(V+ge/2)+","+(ee+ie/2)},H.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)},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.state==="creating"&&this.createTips()},H.prototype.adjustVisual=function(){if(ne.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 V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(V,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ge=this.arrow2.transform.baseVal.getItem(0);ge.setRotate(V+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ge,0)}},H.prototype.setArrowType=function(V){this.arrowType=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=Object.assign({arrowType:this.arrowType},ne.prototype.getState.call(this));return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V);var ee=V;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},H.typeName="ArrowMarker",H.title="Arrow marker",H.icon='',H}(St),Ce=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.fillColor=ge.defaultFillColor,ie.strokeWidth=0,ie.fillPanel=new We("Color",ge.defaultColorSet,ge.defaultFillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie}return ce(H,ne),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=ne.prototype.getState.call(this);return V.typeName=H.typeName,V},H.typeName="CoverMarker",H.title="Cover marker",H.icon='',H}(ft),Se=function(ne){function H(V,ee,ge,ie){var tt=ne.call(this,V,ie||'')||this;return tt.opacities=[],tt.opacityBoxes=[],tt.opacities=ee,tt.currentOpacity=ge,tt.setCurrentOpacity=tt.setCurrentOpacity.bind(tt),tt}return ce(H,ne),H.prototype.getUi=function(){var V=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(ge){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="center",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=ge===V.currentOpacity?V.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentOpacity(ge,ie)}),ee.appendChild(ie);var tt=document.createElement("div");tt.innerText=100*ge+"%",ie.appendChild(tt),V.opacityBoxes.push(ie)}),ee},H.prototype.setCurrentOpacity=function(V,ee){var ge=this;this.currentOpacity=V,this.opacityBoxes.forEach(function(ie){ie.style.borderColor=ie===ee?ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},H}(Le),Me=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.setOpacity=ie.setOpacity.bind(ie),ie.fillColor=ge.defaultHighlightColor,ie.strokeWidth=0,ie.opacity=ge.defaultHighlightOpacity,ie.fillPanel=new We("Color",ge.defaultColorSet,ie.fillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie.opacityPanel=new Se("Opacity",ge.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return ce(H,ne),H.prototype.setOpacity=function(V){this.opacity=V,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=ne.prototype.getState.call(this);return V.typeName=H.typeName,V},H.typeName="HighlightMarker",H.title="Highlight marker",H.icon='',H}(Ce),He='',Ge=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.bgColor="transparent",ie.tipPosition={x:0,y:0},ie.tipBase1Position={x:0,y:0},ie.tipBase2Position={x:0,y:0},ie.tipMoving=!1,ie.color=ge.defaultStrokeColor,ie.bgColor=ge.defaultFillColor,ie.fontFamily=ge.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setBgColor=ie.setBgColor.bind(ie),ie.getTipPoints=ie.getTipPoints.bind(ie),ie.positionTip=ie.positionTip.bind(ie),ie.setTipPoints=ie.setTipPoints.bind(ie),ie.colorPanel=new We("Text color",ge.defaultColorSet,ie.color,''),ie.colorPanel.onColorChanged=ie.setColor,ie.bgColorPanel=new We("Fill color",ge.defaultColorSet,ie.bgColor,He),ie.bgColorPanel.onColorChanged=ie.setBgColor,ie.fontFamilyPanel=new at("Font",ge.defaultFontFamilies,ge.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.tipGrip=new bt,ie.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),ie.controlBox.appendChild(ie.tipGrip.visual),ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return ne.prototype.ownsTarget.call(this,V)||this.tipGrip.ownsTarget(V)||this.tip===V},H.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)},H.prototype.pointerDown=function(V,ee){this.state==="new"&&ne.prototype.pointerDown.call(this,V,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ne.prototype.pointerDown.call(this,V,ee)},H.prototype.pointerUp=function(V){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ne.prototype.pointerUp.call(this,V);else{var ee=this.state==="creating";ne.prototype.pointerUp.call(this,V),this.setTipPoints(ee),this.positionTip()}},H.prototype.manipulate=function(V){if(this.tipMoving){var ee=this.unrotatePoint(V);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ne.prototype.manipulate.call(this,V)},H.prototype.setBgColor=function(V){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",V]]),fe.setAttributes(this.tip,[["fill",V]])),this.bgColor=V,this.fillColorChanged(V)},H.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},H.prototype.setTipPoints=function(V){V===void 0&&(V=!1);var ee=Math.min(this.height/2,15),ge=this.height/5;V&&(this.tipPosition={x:ee+ge/2,y:this.height+20});var ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?ie.1)){var V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(V,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ge=this.tip2.transform.baseVal.getItem(0);ge.setRotate(V+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ge,0)}},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=ne.prototype.getState.call(this);return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V),this.createTips(),this.adjustVisual()},H.typeName="MeasurementMarker",H.title="Measurement marker",H.icon='',H}(St),en=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.strokePanel.colors=ge.defaultColorSet,ie.fillColor="transparent",ie}return ce(H,ne),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=ne.prototype.getState.call(this);return V.typeName=H.typeName,V},H.typeName="EllipseFrameMarker",H.title="Ellipse frame marker",H.icon='',H}(mt),Jt=function(){function ne(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ne.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ne.prototype.addUndoStep=function(H){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(H)||(this.undoStack.push(H),JSON.stringify(this.lastRedoStep)!==JSON.stringify(H)&&this.redoStack.splice(0,this.redoStack.length))},ne.prototype.replaceLastUndoStep=function(H){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=H)},ne.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ne.prototype.undo=function(){if(this.undoStack.length>1){var H=this.undoStack.pop();return H!==void 0&&this.redoStack.push(H),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ne.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ne}(),Ct=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee,ge)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.curveX=0,ie.curveY=0,ie.manipulationStartCurveX=0,ie.manipulationStartCurveY=0,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.positionGrips=ie.positionGrips.bind(ie),ie.addControlGrips=ie.addControlGrips.bind(ie),ie.adjustVisual=ie.adjustVisual.bind(ie),ie.setupControlBox=ie.setupControlBox.bind(ie),ie.resize=ie.resize.bind(ie),ie.strokeColor=ge.defaultColor,ie.strokeWidth=ge.defaultStrokeWidth,ie.strokeDasharray=ge.defaultStrokeDasharray,ie.strokePanel=new We("Line color",ge.defaultColorSet,ge.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new Ft("Line width",ge.defaultStrokeWidths,ge.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new zt("Line style",ge.defaultStrokeDasharrays,ge.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return ce(H,ne),H.prototype.ownsTarget=function(V){return!(!ne.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorCurve&&V!==this.visibleCurve&&!this.curveGrip.ownsTarget(V))},H.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},H.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)},H.prototype.pointerDown=function(V,ee){ne.prototype.pointerDown.call(this,V,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=V.x,this.curveY=V.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},H.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()]]))},H.prototype.setupControlBox=function(){ne.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)},H.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ne.prototype.addControlGrips.call(this)},H.prototype.positionGrips=function(){ne.prototype.positionGrips.call(this);var V=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-V/2,this.curveY-V/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()))},H.prototype.manipulate=function(V){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+V.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+V.y-this.manipulationStartY),ne.prototype.manipulate.call(this,V)},H.prototype.resize=function(V){this.activeGrip===this.curveGrip&&(this.curveX=V.x,this.curveY=V.y),ne.prototype.resize.call(this,V),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},H.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},H.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},H.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual()},H.prototype.scale=function(V,ee){this.curveX=this.curveX*V,this.curveY=this.curveY*ee,ne.prototype.scale.call(this,V,ee)},Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),H.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ne.prototype.getState.call(this));return V.typeName=H.typeName,V},H.prototype.restoreState=function(V){ne.prototype.restoreState.call(this,V);var ee=V;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},H.typeName="CurveMarker",H.title="Curve marker",H.icon='',H}(yt),Et=function(){function ne(H,V){V===void 0&&(V=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=H,this.cancelable=V}return Object.defineProperty(ne.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ne.prototype.preventDefault=function(){this._defaultPrevented=!0},ne}(),pt=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,!1)||this;return ie.dataUrl=ee,ie.state=ge,ie}return ce(H,ne),H}(Et),Xe=function(ne){function H(V,ee,ge){ge===void 0&&(ge=!1);var ie=ne.call(this,V,ge)||this;return ie.marker=ee,ie}return ce(H,ne),H}(Et),Fe=function(){function ne(){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 ne.prototype.addEventListener=function(H,V){this[H].push(V)},ne.prototype.removeEventListener=function(H,V){var ee=this[H].indexOf(V);ee>-1&&this[H].splice(ee,1)},ne}(),Te=function(){function ne(H){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ze,this._isOpen=!1,this.undoRedoManager=new Jt,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 Fe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ne.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=H,this.targetRoot=document.body,this.width=H.clientWidth,this.height=H.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(ne.prototype,"ALL_MARKER_TYPES",{get:function(){return[Qe,Ye,ke,Ot,en,mt,Me,Ge,Lt,Ce,St,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,Ye,ke,Ot,mt,Me,Ge]},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,Ye,ke,Ot,Me]},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(H){var V=this;this._availableMarkerTypes.splice(0),H.forEach(function(ee){if(typeof ee=="string"){var ge=V.ALL_MARKER_TYPES.find(function(ie){return ie.typeName===ee});ge!==void 0&&V._availableMarkerTypes.push(ge)}else V._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(H){this._zoomLevel=H,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(ne.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ne.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ne.prototype.show=function(){var H=this;this.styles.styleSheetRoot===void 0&&re.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=re.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(V){return V(new Et(H))})},ne.prototype.render=function(){return ae(this,void 0,void 0,function(){var H;return ve(this,function(V){switch(V.label){case 0:return this.setCurrentMarker(),(H=new me).naturalSize=this.renderAtNaturalSize,H.imageType=this.renderImageType,H.imageQuality=this.renderImageQuality,H.markersOnly=this.renderMarkersOnly,H.width=this.renderWidth,H.height=this.renderHeight,[4,H.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return V.sent(),[4,H.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,V.sent()]}})})},ne.prototype.close=function(H){var V=this;if(H===void 0&&(H=!1),this.isOpen){var ee=!1;H||this.eventListeners.beforeclose.forEach(function(ge){var ie=new Et(V,!0);ge(ie),ie.defaultPrevented&&(ee=!0)}),ee||(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(ge){return ge(new Et(V))}),this.detachEvents(),this._isOpen=!1)}},ne.prototype.addMarkersToToolbar=function(){for(var H,V=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*H:this.editorCanvas.clientWidth,ee=V',H.title="Powered by marker.js",H.style.display="grid",H.style.alignItems="center",H.style.justifyItems="center",H.style.padding="3px",H.style.width="20px",H.style.height="20px",this.logoUI.appendChild(H),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ne.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")},ne.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"},ne.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ne.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 H=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=H+"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 je(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-1&&this.markers.splice(this.markers.indexOf(H),1),H.dispose()},ne.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())},ne.prototype.toolbarButtonClicked=function(H,V){if(H==="marker"&&V!==void 0)this.createNewMarker(V);else if(H==="action")switch(V){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()}},ne.prototype.deleteSelectedMarker=function(){var H=this;if(this._currentMarker!==void 0){var V=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ge){var ie=new Xe(H,H._currentMarker,!0);ge(ie),ie.defaultPrevented&&(V=!0)}),!V){var ee=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(ge){return ge(new Xe(H,ee))})}}},ne.prototype.clear=function(){var H=this,V=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(tt){var Qt=new Xe(H,void 0,!0);tt(Qt),Qt.defaultPrevented&&(V=!0)}),!V)){this.setCurrentMarker();for(var ee=function(tt){var Qt=ge.markers[tt];ge.setCurrentMarker(ge.markers[tt]),ge._currentMarker.dispose(),ge.markerImage.removeChild(ge._currentMarker.container),ge.markers.splice(ge.markers.indexOf(ge._currentMarker),1),ge.eventListeners.markerdelete.forEach(function(dn){return dn(new Xe(H,Qt))})},ge=this,ie=this.markers.length-1;ie>=0;ie--)ee(ie);this.addUndoStep()}},Object.defineProperty(ne.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ne.prototype.showNotesEditor=function(){var H;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=(H=this._currentMarker.notes)!==null&&H!==void 0?H:"",this.overlayContainer.appendChild(this.notesArea))},ne.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)},ne.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ne.prototype.addUndoStep=function(){var H=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var V=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===V.width&&ee.height===V.height){var ge=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(V),ge1&&this.panTo({x:H.clientX,y:H.clientY}))},ne.prototype.onPointerUp=function(H){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(H.clientX,H.clientY)),this.isDragging=!1,this.addUndoStep()},ne.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ne.prototype.onKeyUp=function(H){this._currentMarker===void 0||this.notesArea!==void 0||H.key!=="Delete"&&H.key!=="Backspace"||this.deleteSelectedMarker()},ne.prototype.clientToLocalCoordinates=function(H,V){var ee=this.markerImage.getBoundingClientRect();return{x:(H-ee.left)/this.zoomLevel,y:(V-ee.top)/this.zoomLevel}},ne.prototype.onWindowResize=function(){this.positionUI()},ne.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var H=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=H+"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()},ne.prototype.addLicenseKey=function(H){se.addKey(H)},ne.prototype.addEventListener=function(H,V){this.eventListeners.addEventListener(H,V)},ne.prototype.removeEventListener=function(H,V){this.eventListeners.removeEventListener(H,V)},ne.prototype.renderState=function(H){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(H),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ne.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ne.prototype.focus=function(){var H=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(V){return V(new Et(H))}))},ne.prototype.blur=function(){var H=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(V){return V(new Et(H))}))},ne.instanceCounter=0,ne}();/* ********************************** 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 Ne=function(ne,H){return(Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,ee){V.__proto__=ee}||function(V,ee){for(var ge in ee)Object.prototype.hasOwnProperty.call(ee,ge)&&(V[ge]=ee[ge])})(ne,H)};function xt(ne,H){if(typeof H!="function"&&H!==null)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");function V(){this.constructor=ne}Ne(ne,H),ne.prototype=H===null?Object.create(H):(V.prototype=H.prototype,new V)}function vt(ne,H,V,ee){return new(V||(V=Promise))(function(ge,ie){function tt(_n){try{dn(ee.next(_n))}catch(Zt){ie(Zt)}}function Qt(_n){try{dn(ee.throw(_n))}catch(Zt){ie(Zt)}}function dn(_n){var Zt;_n.done?ge(_n.value):(Zt=_n.value,Zt instanceof V?Zt:new V(function(Vn){Vn(Zt)})).then(tt,Qt)}dn((ee=ee.apply(ne,H||[])).next())})}function Dt(ne,H){var V,ee,ge,ie,tt={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return ie={next:Qt(0),throw:Qt(1),return:Qt(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function Qt(dn){return function(_n){return function(Zt){if(V)throw new TypeError("Generator is already executing.");for(;tt;)try{if(V=1,ee&&(ge=2&Zt[0]?ee.return:Zt[0]?ee.throw||((ge=ee.return)&&ge.call(ee),0):ee.next)&&!(ge=ge.call(ee,Zt[1])).done)return ge;switch(ee=0,ge&&(Zt=[2&Zt[0],ge.value]),Zt[0]){case 0:case 1:ge=Zt;break;case 4:return tt.label++,{value:Zt[1],done:!1};case 5:tt.label++,ee=Zt[1],Zt=[0];continue;case 7:Zt=tt.ops.pop(),tt.trys.pop();continue;default:if(!(ge=tt.trys,(ge=ge.length>0&&ge[ge.length-1])||Zt[0]!==6&&Zt[0]!==2)){tt=0;continue}if(Zt[0]===3&&(!ge||Zt[1]>ge[0]&&Zt[1]0&&V>0){var ee=new Ua(H,V),ge=ee.ratio>=1?20:ee.getHorizontalLength(20),ie=ee.ratio<1?20:ee.getVerticalLength(20),tt=document.createElementNS("http://www.w3.org/2000/svg","svg");tt.setAttribute("xmlns","http://www.w3.org/2000/svg"),tt.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(tt);var Qt=ct.createDefs();tt.appendChild(Qt);var dn=ct.createElement("clipPath",[["id","text-bg-clip"]]);Qt.appendChild(dn);var _n=ct.createPath(ct.getHollowRectanglePath((24-ge)/2,(24-ie)/2,ge,ie,(24-ge)/2+2,(24-ie)/2+2,ge-4,ie-4));tt.appendChild(_n);var Zt=ct.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Zt.appendChild(ct.createTSpan(H+":"+V)),tt.appendChild(Zt);var Vn=Zt.getBBox();ct.setAttributes(Zt,[["x",((24-Vn.width)/2).toString()],["y",((24-Vn.height)/2-Vn.y).toString()]]);var Xn=ct.createPath(ct.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Vn.width))/2,(24-Math.ceil(Vn.height))/2,Math.ceil(Vn.width),Math.ceil(Vn.height)));return dn.appendChild(Xn),ct.setAttributes(_n,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(tt),tt.outerHTML}return''},ne}(),Ra=function(ne){function H(V,ee,ge){var ie=ne.call(this,V,ee)||this;return ie.isDropdownOpen=!1,ie.onClick=ie.dropdownButtonClicked,ie.dropdownButtons=ge,ie}return xt(H,ne),H.prototype.setupDropdown=function(){var V=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=V.className,ee.colorsClassName=V.colorsClassName,V.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},H.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},H.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},H.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},H.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},H.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},H}(Kr),Xr=function(){function ne(H,V){this.GRIP_SIZE=10,this.color=H,this.fillColor=V,this.visual=ct.createGroup(),this.visual.appendChild(ct.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ct.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ne.prototype.ownsTarget=function(H){return H===this.visual||H===this.visual.childNodes[0]||H===this.visual.childNodes[1]},ne.prototype.setCenter=function(H,V){this.visual.childNodes.forEach(function(ee){return ct.setAttributes(ee,[["cx",H.toString()],["cy",V.toString()]])})},ne}(),Ja=function(){function ne(H,V,ee,ge){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=H,this.canvasHeight=V,this.margin=ee,this.container=ge,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(ne.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(H){this._aspectRatio=H,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(H){this._isGridVisible=H,this.gridContainer&&ct.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(H){this._zoomFactor=H,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ne.prototype.open=function(){var H=this;this.cropShadeElement=ct.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ct.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var V=0;Vthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-V.height/2),ct.setAttributes(this.cropRectElement,[["x",V.x.toString()],["y",V.y.toString()],["width",V.width.toString()],["height",V.height.toString()]]);var ee=V.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ie,tt){var Qt=V.y+ee*(tt+1);ct.setAttributes(ie,[["x1",""+V.x],["y1",""+Qt],["x2",""+(V.x+V.width)],["y2",""+Qt]])});var ge=V.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ie,tt){var Qt=V.x+ge*(tt+1);ct.setAttributes(ie,[["x1",""+Qt],["y1",""+V.y],["x2",""+Qt],["y2",""+(V.y+V.height)]])}),ct.setAttributes(this.cropShadeElement,[["d",ct.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,V.x,V.y,V.width,V.height)]]),this.topLeftGrip.setCenter(V.x,V.y),this.topRightGrip.setCenter(V.x+V.width,V.y),this.bottomLeftGrip.setCenter(V.x,V.y+V.height),this.bottomRightGrip.setCenter(V.x+V.width,V.y+V.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ne.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)},ne.prototype.clientToLocalCoordinates=function(H,V){var ee=this.container.getBoundingClientRect();return{x:H-ee.left+this.margin,y:V-ee.top+this.margin}},ne.prototype.onPointerDown=function(H){this.container.setPointerCapture(H.pointerId),this.previousPoint=this.clientToLocalCoordinates(H.clientX,H.clientY),this.cropRectElement===H.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(H.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(H.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(H.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(H.target)&&(this.activeGrip=this.bottomRightGrip)},ne.prototype.onPointerMove=function(H){if(this.isMoving)this.move(this.clientToLocalCoordinates(H.clientX,H.clientY));else if(this.activeGrip){var V=this.clientToLocalCoordinates(H.clientX,H.clientY);this.resize(V)}H.preventDefault()},ne.prototype.onPointerUp=function(H){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(H.pointerId)},ne.prototype.move=function(H){var V=H.x-this.previousPoint.x,ee=H.y-this.previousPoint.y;this.zoomFactor!==1&&(V=-V/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+V),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=H},ne.prototype.resize=function(H){var V=Object.assign({},this.cropRect),ee=H.x-this.previousPoint.x,ge=H.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:V.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-V.width),V.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(V.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),V.height=this.aspectRatio.getVerticalLength(V.width)):(V.y+=ge,V.height=this.cropRect.y+this.cropRect.height-V.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?V.height=this.aspectRatio.getVerticalLength(V.width):V.height+=ge}V.width<10&&(V.x=this.cropRect.x,V.width=10),V.height<10&&(V.y=this.cropRect.y,V.height=10),this.previousPoint=H,V.x>=this.margin&&V.y>=this.margin&&V.x-this.margin+V.width<=this.canvasWidth&&V.y-this.margin+V.height<=this.canvasHeight&&(this.cropRect=V,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ne.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var H=this.cropRect.x+this.cropRect.width/2,V=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ge=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidththis.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=H-this.cropRect.width/2,this.cropRect.y=V-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)}},ne.prototype.getRescaledRect=function(H,V,ee,ge,ie,tt){var Qt=ee/H,dn=ge/V;return{x:(ie.x-tt)*Qt+tt,y:(ie.y-tt)*dn+tt,width:ie.width*Qt,height:ie.height*dn}},ne.prototype.scaleCanvas=function(H,V){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,H,V,this.cropRect,this.margin);this.canvasWidth=H,this.canvasHeight=V,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ne}(),Ri=function(){function ne(H){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=H,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(ne.prototype,"angle",{get:function(){return this._angle},set:function(H){this._angle=H,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ne.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},ne.prototype.onPointerDown=function(H){this.controlContainer.setPointerCapture(H.pointerId),this.isDragging=!0,this.previousPoint={x:H.clientX,y:H.clientY}},ne.prototype.onPointerMove=function(H){this.isDragging&&(this.onAngleChange&&this.onAngleChange((H.clientX-this.previousPoint.x)/5),this.previousPoint.x=H.clientX)},ne.prototype.onPointerUp=function(H){this.isDragging&&this.onAngleChange&&this.onAngleChange((H.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(H.pointerId)},ne.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var H=this.angleLabelText.getBBox();ct.setAttributes(this.angleLabelElement,[["x",((this.width-H.width)/2).toString()],["y",(this.height/2).toString()]])}},ne.prototype.positionScaleShape=function(){if(this.scaleShape){var H=this.scaleShape.transform.baseVal.getItem(0);H.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(H,0)}},ne.prototype.getVisual=function(){var H=document.createElementNS("http://www.w3.org/2000/svg","svg");H.setAttribute("xmlns","http://www.w3.org/2000/svg"),H.setAttribute("width",this.width+"px"),H.setAttribute("height",this.height+"px"),H.setAttribute("viewBox","0 0 "+this.width+" "+this.height),H.style.flexShrink="0",document.body.appendChild(H);for(var V="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ge=ee%5==0?this.height/3:this.height/6;V+="h4v"+-ge+"h1v"+ge}V+="v1H0Z",this.scaleShape=ct.createPath(V);var ie=ct.createTransform();this.scaleShape.transform.baseVal.appendItem(ie),H.appendChild(this.scaleShape),this.angleLabelElement=ct.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ct.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var tt=ct.createTSpan("");return tt.innerHTML="°",this.angleLabelElement.appendChild(tt),H.appendChild(this.angleLabelElement),document.body.removeChild(H),H},ne}(),ji=function(){function ne(){this.naturalSize=!1,this.imageType="image/png"}return ne.prototype.rasterize=function(H,V,ee,ge,ie,tt,Qt){var dn=this;return new Promise(function(_n){var Zt=document.createElement("canvas");Zt.width=H.width.baseVal.value-2*ge,Zt.height=H.height.baseVal.value-2*ge;var Vn=1,Xn=1;dn.naturalSize===!0?(Vn=V.naturalWidth/(H.width.baseVal.value-2*ge)/tt,Xn=V.naturalHeight/(H.height.baseVal.value-2*ge)/Qt,Zt.width=V.naturalWidth/tt,Zt.height=V.naturalHeight/Qt):dn.width!==void 0&&dn.height!==void 0&&(Vn=dn.width/ee.width,Xn=dn.height/ee.height,Zt.width*=Vn,Zt.height*=Xn);var lr=Zt.getContext("2d");lr.translate(Zt.width/2,Zt.height/2),lr.rotate(ie*Math.PI/180),lr.scale(tt,Qt),lr.translate(-Zt.width/2,-Zt.height/2),lr.drawImage(V,0,0,Zt.width,Zt.height);var Or=document.createElement("canvas");Or.width=ee.width*Vn,Or.height=ee.height*Xn,Or.getContext("2d").putImageData(lr.getImageData((ee.x-ge)*Vn,(ee.y-ge)*Xn,ee.width*Vn,ee.height*Xn),0,0),_n(Or.toDataURL(dn.imageType,dn.imageQuality))})},ne}(),_e=function(){function ne(H){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=ne.instanceCounter++,this.styles=new Mt(this.instanceNo),this.target=H,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(ne.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(H){this._zoomToCropEnabled=H,H?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(H){this._isGridVisible=H,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"gridLines",{get:function(){return this._gridLines},set:function(H){this._gridLines=H,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(H){this._rotationAngle=H,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"aspectRatio",{get:function(){var H;return(H=this._aspectRatio)!==null&&H!==void 0?H:this.aspectRatios[0]},set:function(H){this._aspectRatio=H},enumerable:!1,configurable:!0}),ne.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},ne.prototype.show=function(){this.showUI(),this.open()},ne.prototype.close=function(H){H===void 0&&(H=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),H||this.closeEventListeners.forEach(function(V){return V()}),this._isOpen=!1)},ne.prototype.addRenderEventListener=function(H){this.renderEventListeners.push(H)},ne.prototype.removeRenderEventListener=function(H){this.renderEventListeners.indexOf(H)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(H),1)},ne.prototype.addCloseEventListener=function(H){this.closeEventListeners.push(H)},ne.prototype.removeCloseEventListener=function(H){this.closeEventListeners.indexOf(H)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(H),1)},ne.prototype.setupResizeObserver=function(){var H=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){H.resize(H.target.clientWidth,H.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))},ne.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var H=1*this.target.clientWidth/this.target.clientHeight,V=this.contentDiv.clientWidth/H>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*H:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=V+2*this.CANVAS_MARGINH+this.CANVAS_MARGIN?this.target.offsetTop-(H+this.CANVAS_MARGIN):0;this.coverDiv.style.top=V+"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},ne.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ne.prototype.addTopToolbar=function(){var H=this;this.topToolbar=new Tn,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 V=new Vr;V.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(V);var ee=[];this.aspectRatios.forEach(function(Xn){var lr=new Kr(Ya.getIcon(Xn.horizontal,Xn.vertical),Xn.horizontal===0&&Xn.vertical===0?"FREE":Xn.horizontal+":"+Xn.vertical);lr.onClick=function(){return H.ratioButtonClicked(Xn)},ee.push(lr)}),this.aspectRatioButton=new Ra(Ya.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,V.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ge=new Kr('',"Toggle grid");ge.isActive=this.isGridVisible,ge.onClick=function(){H.isGridVisible=!H.isGridVisible,ge.isActive=H.isGridVisible},V.addButton(ge);var ie=new Kr('',"Zoom to selection");if(ie.isActive=this.zoomToCropEnabled,ie.onClick=function(){H.zoomToCropEnabled=!H.zoomToCropEnabled,ie.isActive=H.zoomToCropEnabled},V.addButton(ie),!Ht.isLicensed){var tt=new kn;this.topToolbar.addElementBlock(tt);var Qt=document.createElement("div");Qt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var dn=document.createElement("a");dn.style.color="currentColor",dn.href="https://markerjs.com/products/cropro",dn.target="_blank",dn.innerHTML='',Qt.appendChild(dn),tt.addElement(Qt)}var _n=new Vr;_n.minWidth=3*this.toolbarHeight+"px",_n.contentAlign="end",this.topToolbar.addButtonBlock(_n);var Zt=new Kr('',"OK");Zt.onClick=this.startRenderAndClose,_n.addButton(Zt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Zt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Vn=new Kr('',"Close");Vn.onClick=this.close,_n.addButton(Vn),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Vn.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ne.prototype.addBottomToolbar=function(){var H=this;this.bottomToolbar=new Tn,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 V=new Vr;V.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(V);var ee=new Kr('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,V.addButton(ee);var ge=new Kr('',"Rotate right");ge.onClick=this.rotateRightButtonClicked,V.addButton(ge);var ie=new kn;ie.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ie),this.straightener=new Ri("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(_n){H.rotateBy(_n),H.straightener.angle=H.rotationAngle},ie.addElement(this.straightener.getUI());var tt=new Vr;tt.minWidth=2*this.toolbarHeight+"px",tt.contentAlign="end",this.bottomToolbar.addButtonBlock(tt);var Qt=new Kr('',"Flip horizontal");Qt.onClick=this.flipHorizontallyButtonClicked,tt.addButton(Qt);var dn=new Kr('',"Flip vertical");dn.onClick=this.flipVerticallyButtonClicked,tt.addButton(dn)},ne.prototype.ratioButtonClicked=function(H){this.aspectRatio=H,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ne.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ya.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ne.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ua(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ne.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ne.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ne.prototype.restoreState=function(H){if(H){var V=this.cropLayer.getRescaledRect(H.width,H.height,this.imageWidth,this.imageHeight,H.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(V),this.cropRectChanged(V),this.flippedHorizontally=H.flippedHorizontally,this.flippedVertically=H.flippedVertically,this.applyFlip(),this.rotationAngle=H.rotationAngle,this.applyRotation()}},ne.prototype.clientToLocalCoordinates=function(H,V){var ee=this.cropImage.getBoundingClientRect();return{x:H-ee.left,y:V-ee.top}},ne.prototype.onWindowResize=function(){this.positionUI()},ne.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var H=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=H+"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()},ne.prototype.rotateLeftButtonClicked=function(){var H=this.rotationAngle-90;this.rotationAngle%90!=0&&(H+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(H)},ne.prototype.rotateRightButtonClicked=function(){var H=this.rotationAngle+90;this.rotationAngle%90!=0&&(H-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(H)},ne.prototype.rotateTo=function(H){H=(H=H>180?H-360:H)<=-180?H+360:H,this.rotationAngle=H,this.applyRotation()},ne.prototype.rotateBy=function(H){this.rotateTo((this.rotationAngle+H)%360)},ne.prototype.applyRotation=function(){var H=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var V=this.editingTargetRotationContainer.transform.baseVal.getItem(0);V.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(V,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=H},ne.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ne.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ne.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ne.prototype.startRenderAndClose=function(){return vt(this,void 0,void 0,function(){var H,V;return Dt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return H=ee.sent(),V=this.getState(),this.renderEventListeners.forEach(function(ge){return ge(H,V)}),this.close(!0),[2]}})})},ne.prototype.render=function(){return vt(this,void 0,void 0,function(){var H;return Dt(this,function(V){switch(V.label){case 0:return(H=new ji).naturalSize=this.renderAtNaturalSize,H.imageType=this.renderImageType,H.imageQuality=this.renderImageQuality,H.width=this.renderWidth,H.height=this.renderHeight,this.unzoomFromCrop(),ct.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,H.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 V.sent(),[4,H.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,V.sent()]}})})},ne.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gn("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 gn("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new gn("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var H=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gn("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*H)+`px; height: `+(this.toolbarHeight-2*H)+`px; padding: `+H+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gn("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gn("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new Gt("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new Gt("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new gn("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 gn("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gn("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 gn("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*H)+`px; padding: `+H+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gn("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},ne.instanceCounter=0,ne}(),Be=C("8hTe"),Ve=C.n(Be),gt=/]*>/g;function Xt(ne){var H=document.createElement("div");return H.innerHTML=ne,H.childNodes.length===0?"":H.childNodes[0].nodeValue}var sn=oe.a=function(ne){var H=ne.value,V=H===void 0?"":H,ee=ne.edit,ge=ee===void 0?!1:ee,ie=ne.className,tt=ne.showTextOnly,Qt=ne.showLines,dn=ne.replaces,_n=ne.zoomImg,Zt=ne.hasMask,Vn=ne.style,Xn=Vn===void 0?{}:Vn,lr=ne.stylesPrev,Or=lr===void 0?{}:lr,$r=String(V),Hr=Object(p.useRef)(),ba=Object(p.useRef)(),Ir=Object(p.useState)(""),ga=Object(M.a)(Ir,2),Na=ga[0],hi=ga[1],Ha=Object(p.useState)("office"),qa=Object(M.a)(Ha,2),xi=qa[0],fi=qa[1],ui=function(){var Mr=new _e(ba.current);Mr.displayMode="popup",Mr.addRenderEventListener(function(){var la=Object(B.a)(T.a.mark(function Yr(ri){var ha;return T.a.wrap(function(Ii){for(;;)switch(Ii.prev=Ii.next){case 0:return Hr.current.style.display="none",Ii.next=3,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ri}});case 3:ha=Ii.sent,ha!=null&&ha.id&&dn(ba.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(ha==null?void 0:ha.id,"?type=").concat(ha.content_type));case 5:case"end":return Ii.stop()}},Yr)}));return function(Yr){return la.apply(this,arguments)}}()),Mr.show()},pi=function(){var Mr=new Te(ba.current);Mr.settings.displayMode="popup",Mr.addEventListener("render",function(){var la=Object(B.a)(T.a.mark(function Yr(ri){var ha;return T.a.wrap(function(Ii){for(;;)switch(Ii.prev=Ii.next){case 0:if(Hr.current.style.display="none",!ba.current){Ii.next=6;break}return Ii.next=4,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:ri.dataUrl}});case 4:ha=Ii.sent,ha!=null&&ha.id&&dn(ba.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(ha==null?void 0:ha.id,"?type=").concat(ha.content_type));case 6:case"end":return Ii.stop()}},Yr)}));return function(Yr){return la.apply(this,arguments)}}()),Mr.show(),window.markerArea=Mr},bi=Object(p.useMemo)(function(){Hr.current&&(Hr.current.style.zIndex=-1);try{var sa=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Mr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,la=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;$r=$r.replace(sa,"("+j.a.API_SERVER+"/api/attachments/").replace(Mr,'"'+j.a.API_SERVER+"/api/attachments/").replace(la,'"'+j.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(mo){}var Yr=G($r),ri=y();if($r.match(/\[TOC\]/)&&(Yr=Yr.replace("

    [TOC]

    ",L()),_()),Yr=Yr.replace(/(__special_katext_id_\d+__)/g,function(mo,Ii){var ci=ri[Ii],Wo=ci.type,Lo=ci.expression;return Object(Z.renderToString)(Xt(Lo)||"",{displayMode:Wo==="block",throwOnError:!1,output:"html"})}),Yr=Yr.replace(/▁/g,"\u2581\u2581\u2581"),h(),tt){var ha=document.createElement("div");return ha.innerHTML=Yr,ha.innerText}return setTimeout(function(){return Yi()},500),Yr},[$r]),ai=Object(p.useRef)();R.WebkitLineClamp=Qt,Qt&&(Xn=Object(E.a)(Object(E.a)({},Xn),R));function Hi(sa){var Mr=sa.target;if(Mr.tagName.toUpperCase()==="IMG"){if(_n){var la=Mr.getAttribute("src");hi(la),fi("image")}}else if(Mr.tagName.toUpperCase()==="A"){var Yr=Mr.getAttribute("href");if(Yr.indexOf("office")>-1)sa.preventDefault(),hi(Yr),fi("office");else if(Yr.indexOf("application/pdf")>-1)sa.preventDefault(),hi(Yr),fi("pdf");else if(Yr.indexOf("text/html")>-1)sa.preventDefault(),hi(Yr),fi("html");else if(Yr.startsWith("#")){sa.preventDefault();var ri=document.getElementById(Yr.replace("#",""));ri&&ri.scrollIntoView(!0)}}}var Yi=function(){var Mr,la=(Mr=ai.current)===null||Mr===void 0?void 0:Mr.querySelectorAll("video");la==null||la.forEach(function(Yr){if(Yr.oncontextmenu=function(){return!1},Yr.src.indexOf(".m3u8")>-1&&!Yr.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var ri=new z.a;ri.loadSource(Yr.src),ri.attachMedia(Yr)}}})};Object(p.useEffect)(function(){if(ai.current&&bi&&(bi.match(gt)&&window.PR.prettyPrint()),ai.current)return ai.current.addEventListener("click",Hi),function(){ai.current.removeEventListener("click",Hi),h(),_()}},[bi,ai.current,Hi]);var Zr=function(Mr){if(!ge)return;Mr.target.nodeName==="IMG"?(Hr.current.style.zIndex=1,Hr.current.style.display="flex",Hr.current.style.width=Mr.target.clientWidth+"px",Hr.current.style.height=Mr.target.clientHeight+"px",Hr.current.style.top=Mr.target.offsetTop+"px",Hr.current.style.left=Mr.target.offsetLeft+"px",ba.current.src=Mr.target.getAttribute("src")):Hr.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:ai,style:Object(E.a)({},Xn),className:"".concat(ie||""," markdown-body ").concat(Ve.a.mdBody),onMouseOver:Zr,dangerouslySetInnerHTML:{__html:bi}}),r.a.createElement("div",{ref:Hr,className:Ve.a.button},r.a.createElement(K.a,null,r.a.createElement(k.a,{onClick:function(){return ui()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return pi()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:ba,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(te.a,{close:!0,data:Na,type:Na!=null&&Na.length?xi:"",style:Object(E.a)({},Or),onClose:function(){return hi("")}}))}},"9VGf":function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return I});var q=C("q1tI"),K=C.n(q);function I(k,E){var B=Object(q.useRef)();Object(q.useEffect)(function(){B.current=k}),Object(q.useEffect)(function(){function M(){B.current()}if(E!==null){var x=setInterval(M,E);return function(){return clearInterval(x)}}},[E])}},"9nDM":function(Ie,oe,C){},"9z17":function(Ie,oe,C){"use strict";C.d(oe,"b",function(){return w});var q=C("g9YV"),K=C("wCAj"),I=C("5NDa"),k=C("5rEg"),E=C("y8nQ"),B=C("Vl3Y"),M=C("2qtc"),x=C("kLXV"),T=C("7Kak"),p=C("9yH6"),r=C("9og8"),t=C("tJVT"),c=C("WmNS"),s=C.n(c),a=C("q1tI"),o=C.n(a),d=C("ie49"),A=C.n(d),l=C("HBuW"),m=function(i){var u=i.total,f=i.used,y=i.copy,h=i.canNotCopy,v=i.inPaper,P="";return y>0&&h>0?P="\u5176\u4E2D\u6709".concat(y,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236\uFF0C\u6709").concat(h,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236"):y>0&&h===0?P="\u5176\u4E2D\u6709".concat(y,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236"):y===0&&h>0&&(P="\u5176\u4E2D\u6709".concat(h,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236")),"\u5F53\u524D\u9009\u4E2D".concat(u,"\u4E2A\u5B9E\u8BAD\u4E2D\uFF0C\u6709").concat(f,"\u4E2A\u5B9E\u8BAD\u5DF2\u5728\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C").concat(P).concat(v?"\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4F7F\u7528\u8BD5\u5377\uFF1F":"")},_=function(i){return i?{reproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u91CD\u590D\u4F7F\u7528\u7684\u5B9E\u8BAD\u672A\u5F00\u542F\u590D\u5236\u6743\u9650\uFF0C\u82E5\u7EE7\u7EED\u4F7F\u7528\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD"}:{reproducible:"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\u548C\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F"}},R=function(i){var u=i.onCancel,f=i.onOk,y=i.visible,h=i.inPaper,v=i.renderData,P=i.type,N=Object(a.useState)(1),Q=Object(t.a)(N,2),G=Q[0],F=Q[1],D=Object(a.useState)(!1),z=Object(t.a)(D,2),j=z[0],Z=z[1],te=Object(a.useMemo)(function(){return(v==null?void 0:v.total_num)===1&&(v==null?void 0:v.can_copy_num)===1},[v]);return o.a.createElement(o.a.Fragment,null,te?o.a.createElement(x.a,{centered:!0,closable:!0,visible:y,title:"\u63D0\u793A",width:600,confirmLoading:j,onCancel:u,onOk:Object(r.a)(s.a.mark(function Ae(){return s.a.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Z(!0),ce.next=3,f(G);case 3:Z(!1);case 4:case"end":return ce.stop()}},Ae)}))},o.a.createElement("div",{className:A.a.content,style:{marginBottom:20}},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u95EE\u662F\u5426\u590D\u5236\u6210\u65B0\u5B9E\u8BAD\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u4E2D\uFF1F"),o.a.createElement(p.a.Group,{value:G,onChange:function(he){return F(he.target.value)},className:A.a.content,style:{marginBottom:30}},o.a.createElement(p.a,{value:1,style:{color:"#464f66"}},"\u590D\u5236\u5B9E\u8BAD"),o.a.createElement(p.a,{value:0,style:{color:"#464f66"}},"\u4E0D\u590D\u5236\u5B9E\u8BAD")),o.a.createElement("div",{className:A.a.content,style:{marginBottom:10}},"\u8BF4\u660E\uFF1A"),o.a.createElement("div",{className:A.a.content},"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",{className:A.a.content},"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")):o.a.createElement(x.a,{centered:!0,closable:!0,visible:y,title:"\u63D0\u793A",width:600,onCancel:u,onOk:Object(r.a)(s.a.mark(function Ae(){return s.a.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Z(!0),ce.next=3,f(0);case 3:Z(!1);case 4:case"end":return ce.stop()}},Ae)}))},o.a.createElement("div",{className:A.a.content},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F")))},w=function(){var i=Object(a.useState)(!1),u=Object(t.a)(i,2),f=u[0],y=u[1],h=Object(a.useState)(),v=Object(t.a)(h,2),P=v[0],N=v[1],Q=function(){return y(!1)},G=function(){var F=Object(r.a)(s.a.mark(function D(z){var j;return s.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return te.next=2,Object(l.p)(z);case 2:if(j=te.sent,!("status"in j)){te.next=5;break}return te.abrupt("return",!1);case 5:if(!(j.repeat_shixun_num===0)){te.next=7;break}return te.abrupt("return",!1);case 7:return N(j),y(!0),te.abrupt("return",!0);case 10:case"end":return te.stop()}},D)}));return function(z){return F.apply(this,arguments)}}();return[f,Q,P,G]},L=function(i){var u=B.a.useForm(),f=Object(t.a)(u,1),y=f[0],h=Object(a.useState)(!1),v=Object(t.a)(h,2),P=v[0],N=v[1],Q=i.onCancel,G=i.onOk,F=i.visible,D=i.inPaper,z=D===void 0?!1:D,j=i.renderData,Z=i.type,te=Object(a.useMemo)(function(){return z?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:A.a.tableCell},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(ve,ue){return o.a.createElement(o.a.Fragment,null,o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue.stage_shixun_id:ue.id),"is_copy"],initialValue:1},o.a.createElement(p.a.Group,null,o.a.createElement(p.a,{value:1},"\u662F"),o.a.createElement(p.a,{value:0},"\u5426"))),o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue==null?void 0:ue.stage_shixun_id:ue.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(k.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:A.a.tableCell},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(ve,ue){return o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue.stage_shixun_id:ue.id),"is_use"],initialValue:1},o.a.createElement(p.a.Group,null,o.a.createElement(p.a,{value:1},"\u662F"),o.a.createElement(p.a,{value:0},"\u5426")))}},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(ve,ue){return o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue.stage_shixun_id:ue.id),"is_copy"],initialValue:1},o.a.createElement(p.a.Group,null,o.a.createElement(p.a,{value:1},"\u662F"),o.a.createElement(p.a,{value:0},"\u5426")))}}]},[z]),Ae=Object(a.useMemo)(function(){return z?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:A.a.tableCell,align:"center",render:function(ve,ue){return o.a.createElement(o.a.Fragment,null,o.a.createElement("span",null,ve),o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue==null?void 0:ue.stage_shixun_id:ue.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(k.a,{type:"hidden"})),o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue==null?void 0:ue.stage_shixun_id:ue.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(k.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:A.a.tableCell,align:"center"},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(ve,ue){return o.a.createElement(o.a.Fragment,null,o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue==null?void 0:ue.stage_shixun_id:ue.id),"is_use"],initialValue:0},o.a.createElement(p.a.Group,null,o.a.createElement(p.a,{value:1},"\u662F"),o.a.createElement(p.a,{value:0},"\u5426"))),o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ue==null?void 0:ue.stage_shixun_id:ue.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(k.a,{type:"hidden"})))}}]},[z]),he=Object(a.useMemo)(function(){return m({total:j==null?void 0:j.total_num,used:j==null?void 0:j.repeat_shixun_num,copy:j==null?void 0:j.can_copy_num,canNotCopy:j==null?void 0:j.no_copy_num,inPaper:z})},[j,z]),ce=Object(a.useMemo)(function(){return _(z)},[z]);return o.a.createElement(x.a,{title:"\u5B9E\u8BAD\u91CD\u590D\u4F7F\u7528\u63D0\u793A",centered:!0,visible:F,confirmLoading:P,onOk:Object(r.a)(s.a.mark(function ae(){var ve,ue;return s.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return N(!0),ve=y.getFieldsValue(),ue=Object.keys(ve).map(function(me){return{id:parseInt(me),is_use:ve[me].is_use,is_copy:ve[me].is_copy}}),se.next=5,G(ue);case 5:N(!1);case 6:case"end":return se.stop()}},ae)})),onCancel:Q,width:800,okText:"\u786E\u8BA4",className:A.a.antdModal,destroyOnClose:!0},o.a.createElement(B.a,{form:y,preserve:!1},o.a.createElement("div",{className:A.a.brief},he),(j==null?void 0:j.can_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:A.a.contentTitle},"\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:A.a.content},ce.reproducible),o.a.createElement("div",{className:A.a.tips},o.a.createElement("div",null,"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",null,"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")),o.a.createElement(K.a,{columns:te,className:A.a.antdTable,dataSource:j==null?void 0:j.can_copy_list,rowKey:Z==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})),(j==null?void 0:j.no_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:A.a.contentTitle},"\u4E0D\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:A.a.content},ce.irreproducible),o.a.createElement(K.a,{columns:Ae,className:A.a.antdTable,dataSource:j==null?void 0:j.no_copy_list,rowKey:Z==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})),(j==null?void 0:j.no_use_list.length)>0&&(j==null?void 0:j.no_use_list.map(function(ae){return o.a.createElement("div",{key:Z==="subject"?ae.stage_shixun_id:ae.id},o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ae==null?void 0:ae.stage_shixun_id:ae.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(k.a,{type:"hidden"})),o.a.createElement(B.a.Item,{name:["".concat(Z==="subject"?ae==null?void 0:ae.stage_shixun_id:ae.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(k.a,{type:"hidden"})))}))))},b=function(i){var u=i.modalType;return u==="multiple"?o.a.createElement(L,i):o.a.createElement(R,i)};oe.a=b},"A/g1":function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},A2z3:function(Ie,oe,C){Ie.exports=C.p+"static/Certificate.80413b23.png"},AZ8Y:function(Ie,oe,C){"use strict";C.r(oe);var q=C("T2oS"),K=C("W9HT"),I=C("k1fw"),k=C("9og8"),E=C("tJVT"),B=C("PpiC"),M=C("Znn+"),x=C("ZTPi"),T=C("WmNS"),p=C.n(T),r=C("q1tI"),t=C.n(r),c=C("Ty5D"),s=C("9kvl"),a=C("+L6B"),o=C("2/Rp"),d=C("oBTY"),A=C("pC0b"),l=C("GzdX"),m=C("+BJd"),_=C("mr32"),R=C("qVdP"),w=C("jsC+"),L=C("lUTK"),b=C("BvKs"),g=C("5Dmo"),i=C("3S7+"),u=C("7Kak"),f=C("9yH6"),y=C("2qtc"),h=C("kLXV"),v=C("miYZ"),P=C("tsqr"),N=C("0NbB"),Q=C("JTSX"),G=C.n(Q),F=C("xKgJ"),D=C("Mgx3"),z=C("ozfa"),j=C("MJZm"),Z=C("sRBo"),te=C("kaz8"),Ae=C("14J3"),he=C("BMrR"),ce=C("jCWc"),ae=C("kPKH"),ve=C("OaEy"),ue=C("2fM7"),fe=C("wd/R"),se=C.n(fe),me=C("kNP/"),re=C.n(me),pe=C("1vsH"),De=C("9z17"),we=ue.a.Option,je=function(qe){var Bt=qe.pathsDetail,$t=qe.globalSetting,cn=qe.loading,Kt=qe.dispatch,En=Object(B.a)(qe,["pathsDetail","globalSetting","loading","dispatch"]),rn=Object(c.i)(),jt=Object(r.useState)(),hn=Object(E.a)(jt,2),qt=hn[0],bn=hn[1],Fn=Object(r.useState)([]),Yt=Object(E.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=Object(r.useState)([]),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1],Ar=Object(r.useState)([]),fn=Object(E.a)(Ar,2),Dn=fn[0],Un=fn[1],Gn=Object(r.useState)(),vn=Object(E.a)(Gn,2),Kn=vn[0],or=vn[1],gr=Object(r.useState)(),Lr=Object(E.a)(gr,2),er=Lr[0],rr=Lr[1],Dr=Object(r.useState)(!0),Er=Object(E.a)(Dr,2),_r=Er[0],ia=Er[1];Object(r.useEffect)(function(){Bt.actionTabs.key==="PathsDetail-SendToClass"&&tr()},[Bt.actionTabs.key]);var ea=function(va){switch(va.item_type){case"Shixun":return t.a.createElement("span",null,t.a.createElement("span",{className:"mr5 c-light-primary"},"\u5B9E\u8BAD"),va.name);case"Attachment":return t.a.createElement("span",null,t.a.createElement("span",{className:"mr5 c-cyan-blue"},"\u8BFE\u4EF6"),va.name);case"VideoItem":return t.a.createElement("span",null,t.a.createElement("span",{className:"mr5 c-purple-8C1"},"\u89C6\u9891"),va.name);case"StageCatalog":return t.a.createElement("span",null,va.name);default:return""}},tr=function(){var ua=Object(k.a)(p.a.mark(function va(){var ca,Ca,Oa;return p.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:return Fr.next=2,Object(D.H)({id:rn.pathId});case 2:ca=Fr.sent,ca&&(ln((ca==null?void 0:ca.courses)||[]),Oa=(Ca=ca.stages)===null||Ca===void 0?void 0:Ca.map(function(Qa,ya){var Ka;return{title:Qa.state_name||"",key:ya,children:(Ka=Qa.items)===null||Ka===void 0?void 0:Ka.map(function(di,Ji){var Di;return Object(I.a)(Object(I.a)({},di),{},{disabled:di.is_jupyter,title:ea(di),key:"".concat(ya,"-").concat(Ji),children:(Di=di.children)===null||Di===void 0?void 0:Di.map(function(Ei,Uo){return Object(I.a)(Object(I.a)({},Ei),{},{disabled:Ei.is_jupyter,title:ea(Ei),key:"".concat(ya,"-").concat(Ji,"-").concat(Uo)})})})})}}),Sn(Oa||[]));case 4:case"end":return Fr.stop()}},va)}));return function(){return ua.apply(this,arguments)}}(),vr=function(va,ca){Un(va)},ka=function(va){var ca=va.target.checked,Ca=[];Vt==null||Vt.map(function(Oa,Ma){var Fr;Ca.push(Ma),Oa==null||((Fr=Oa.children)===null||Fr===void 0)||Fr.map(function(Qa,ya){var Ka;Ca.push("".concat(Ma,"-").concat(ya)),Qa==null||((Ka=Qa.children)===null||Ka===void 0)||Ka.map(function(di,Ji){Ca.push("".concat(Ma,"-").concat(ya,"-").concat(Ji))})})}),Un(ca?Ca:[])},ra=function(){var va=Dn.filter(function(Fr){return typeof Fr=="string"}),ca=[],Ca=[],Oa=[],Ma=[];return Vt==null||Vt.map(function(Fr,Qa){var ya;Fr==null||((ya=Fr.children)===null||ya===void 0)||ya.map(function(Ka,di){var Ji;va.includes("".concat(Qa,"-").concat(di))&&(Oa.push(Ka.stage_item_id),Ka.item_type==="Shixun"?ca.push(Ka.id):Ka.item_type==="Attachment"?Ma.push(Ka.id):Ka.item_type==="VideoItem"&&Ca.push(Ka.id)),Ka==null||((Ji=Ka.children)===null||Ji===void 0)||Ji.map(function(Di,Ei){va.includes("".concat(Qa,"-").concat(di,"-").concat(Ei))&&(Oa.push(Di.stage_item_id),Di.item_type==="Shixun"?ca.push(Di.id):Di.item_type==="Attachment"?Ma.push(Di.id):Di.item_type==="VideoItem"&&Ca.push(Di.id))})})}),{shixunIds:ca,videoItemIds:Ca,stageItemIds:Oa,coursewareIds:Ma}},Yn=Object(De.b)(),mn=Object(E.a)(Yn,4),yr=mn[0],oi=mn[1],Cr=mn[2],Rr=mn[3],fr=function(){var ua=Object(k.a)(p.a.mark(function va(){var ca,Ca,Oa;return p.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(ca=ra(),Ca=ca.stageItemIds,qt){Fr.next=4;break}return P.b.info("\u60A8\u8FD8\u672A\u9009\u62E9\u53D1\u9001\u7684\u8BFE\u5802"),Fr.abrupt("return");case 4:if(!(!qn.length&&!cr.length&&!Da.length)){Fr.next=7;break}return P.b.info("\u60A8\u8FD8\u672A\u9009\u62E9\u5B9E\u8BAD\u6216\u8005\u89C6\u9891"),Fr.abrupt("return");case 7:return rr(!0),Fr.next=10,Rr({id:rn.pathId,course_id:parseInt(qt),type:"subject",stage_item_id:Ca,sync_catelog:_r?1:0});case 10:if(Oa=Fr.sent,Oa){Fr.next=14;break}return Fr.next=14,ar(Ca.map(function(Qa){return{id:Qa,is_copy:0,is_use:1}}));case 14:rr(!1),Mn();case 16:case"end":return Fr.stop()}},va)}));return function(){return ua.apply(this,arguments)}}(),ar=function(){var ua=Object(k.a)(p.a.mark(function va(ca){var Ca;return p.a.wrap(function(Ma){for(;;)switch(Ma.prev=Ma.next){case 0:return Ma.next=2,Object(D.P)({id:rn.pathId,course_id:qt,stage_shixuns:ca.map(function(Fr){return{stage_shixun_id:Fr.id,is_copy:Fr.is_copy,is_use:Fr.is_use}}),sync_catelog:_r?1:0});case 2:Ca=Ma.sent,bn(null),oi(),(Ca==null?void 0:Ca.status)===1&&h.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},Ca.message),onOk:function(){var Qa,ya=Ca==null||((Qa=Ca.url.split("/"))===null||Qa===void 0)?void 0:Qa[2];Object(pe.S)("/classrooms/".concat(ya,"/shixun_homework"))}});case 6:case"end":return Ma.stop()}},va)}));return function(ca){return ua.apply(this,arguments)}}(),Mn=function(){Kt({type:"pathsDetail/setActionTabs",payload:{}}),Un([]),or(null)},Ln=ra(),pn=Ln.shixunIds,qn=pn===void 0?[]:pn,ta=Ln.videoItemIds,cr=ta===void 0?[]:ta,Nr=Ln.coursewareIds,Da=Nr===void 0?[]:Nr;return t.a.createElement(t.a.Fragment,null,t.a.createElement(h.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Bt.actionTabs.key==="PathsDetail-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:er,width:600,onOk:fr,onCancel:Mn},t.a.createElement("div",{className:re.a.wrap},t.a.createElement("div",{className:"mb10"},t.a.createElement(ue.a,{placeholder:"\u8BF7\u9009\u62E9\u60A8\u8981\u53D1\u9001\u7684\u8BFE\u5802",defaultOpen:!1,value:qt,style:{width:"100%"},onSelect:function(va){return bn(va)},optionLabelProp:"lable"},Cn==null?void 0:Cn.map(function(ua,va){return t.a.createElement(we,{key:ua.course_id,value:ua.course_id,lable:ua.course_name},t.a.createElement(he.a,{justify:"space-between"},t.a.createElement(ae.a,null,ua.course_name),t.a.createElement(ae.a,null,se()(ua.created_at).format("YYYY-MM-DD HH:mm"))))}))),t.a.createElement("div",{className:re.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A",t.a.createElement("br",null),"1.\u8BF7\u5728\u672C\u8BFE\u7A0B\u4E2D\u9009\u62E9\u6240\u9700\u9879\u76EE\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802\uFF1B",t.a.createElement("br",null),"2.\u672A\u53D1\u5E03\u7684\u5B9E\u8BAD\u4E0D\u80FD\u53D1\u9001\u81F3\u8BFE\u5802\uFF0C\u4E5F\u4E0D\u4F1A\u8FDB\u5165\u672C\u5F39\u7A97\u5907\u9009\u3002"),t.a.createElement("div",{className:re.a.radioWrap},t.a.createElement("div",null,t.a.createElement(te.a,{value:Kn,onChange:ka,className:"font14 ml20"},"\u5168\u9009")),!!(Vt!=null&&Vt.length)&&t.a.createElement(j.a,{className:re.a.tree,checkable:!0,defaultExpandAll:!0,treeData:Vt,checkedKeys:Dn,onCheck:function(va,ca){return vr(va,ca)}})),t.a.createElement("div",{className:re.a.createMkdir},t.a.createElement(te.a,{checked:_r,onChange:function(va){return ia(va.target.checked)},className:"font14"},"\u9009\u4E2D\u7AE0\u8282\u5728\u8BFE\u5802\u4E2D\u540C\u6B65\u751F\u6210\u76EE\u5F55"),!!(qn.length+cr.length)&&t.a.createElement("span",null,t.a.createElement("span",null,"\u5DF2\u9009\u4E2D\uFF1A"),!!qn.length&&t.a.createElement(t.a.Fragment,null,t.a.createElement("span",{className:"c-light-primary"},qn.length," "),t.a.createElement("span",null,"\u4E2A\u5B9E\u8BAD")),!!cr.length&&t.a.createElement(t.a.Fragment,null,t.a.createElement("span",{className:"c-purple-8C1 ml5"},cr.length," "),t.a.createElement("span",null,"\u4E2A\u89C6\u9891")),!!Da.length&&t.a.createElement(t.a.Fragment,null,t.a.createElement("span",{className:"c-cyan-blue ml5"},Da.length," "),t.a.createElement("span",null,"\u4E2A\u8BFE\u4EF6")))))),t.a.createElement(De.a,{visible:yr,inPaper:!1,renderData:Cr,onCancel:oi,onOk:ar,modalType:"multiple",type:"subject"}))},et=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.loading,$t=ut.globalSetting;return{pathsDetail:qe,globalSetting:$t,loading:Bt.effects}})(je),Le=C("NLgs"),We=C("P5Jw"),Ze=C("5NDa"),$e=C("5rEg"),bt=C("6UJt"),wt=C("DFOY"),It=C("y8nQ"),ft=C("Vl3Y"),Ft=C("ErOA"),zt=C("OC45"),Qe=C.n(zt),ze=function(qe){var Bt=qe.type,$t=qe.onCancel,cn=qe.onOk,Kt=ft.a.useForm(),En=Object(E.a)(Kt,1),rn=En[0],jt=Object(r.useState)(!0),hn=Object(E.a)(jt,2),qt=hn[0],bn=hn[1],Fn=Object(r.useState)(!1),Yt=Object(E.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=Object(r.useState)([]),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1];Object(r.useEffect)(function(){Ar()},[]);var Ar=function(){var Dn=Object(k.a)(p.a.mark(function Un(){var Gn;return p.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(!Bt){Kn.next=7;break}return ln(!0),Kn.next=4,Object(Ft.a)("/api/disciplines.json",{method:"get",params:{source:Bt}});case 4:Gn=Kn.sent,Sn(Gn.disciplines||[]),ln(!1);case 7:case"end":return Kn.stop()}},Un)}));return function(){return Dn.apply(this,arguments)}}(),fn=function(){var Un=rn.getFieldsValue(),Gn=Un.sub_discipline_id,vn=Un.discipline_name,Kn=Un.sub_discipline_name;if((!Gn||Gn&&Gn.length===0)&&(!vn||!Kn))return P.b.warn("\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"),!1;cn({user_customize:Gn&&Gn.length===0||!Gn,sub_discipline_id:Gn,discipline_name:vn,sub_discipline_name:Kn})};return t.a.createElement(h.a,{width:600,className:Qe.a.applyPublicContainer,title:"\u6DFB\u52A0\u65B9\u5411&\u8BFE\u7A0B\u5F39\u7A97",okText:"\u7533\u8BF7\u516C\u5F00",visible:!0,onCancel:$t,onOk:fn},t.a.createElement("div",{className:Qe.a.applyPublicContent},t.a.createElement("div",{className:Qe.a.tips},"\u9700\u586B\u5199\u5B9E\u8DF5\u9879\u76EE\u7684\u65B9\u5411&\u8BFE\u7A0B\u540E\uFF0C\u624D\u80FD\u7533\u8BF7\u516C\u5F00"),t.a.createElement(ft.a,{labelCol:{span:4},labelAlign:"right",form:rn},t.a.createElement(ft.a.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B\uFF1A",name:"sub_discipline_id"},t.a.createElement(wt.a,{expandTrigger:"hover",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Vt,fieldNames:{label:"name",value:"id",children:"sub_disciplines"},onChange:function(Un,Gn){return rn.setFieldsValue({sub_discipline_id:Un})}}),t.a.createElement("div",{className:Qe.a.action,onClick:function(){return bn(!qt)}},t.a.createElement("div",null,"\u81EA\u5B9A\u4E49\u65B9\u5411&\u8BFE\u7A0B"),t.a.createElement("div",null,t.a.createElement("span",null,qt?"\u5C55\u5F00":"\u6536\u8D77"),t.a.createElement("span",null,t.a.createElement("i",{className:"iconfont ".concat(qt?"icon-zhankai2":"icon-shouqi1")}))))),!qt&&t.a.createElement(t.a.Fragment,null,t.a.createElement(ft.a.Item,{label:"\u65B9\u5411",name:"discipline_name"},t.a.createElement($e.a,{placeholder:"\u8BF7\u8F93\u5165\u65B9\u5411",autoComplete:"off"})),t.a.createElement(ft.a.Item,{label:"\u8BFE\u7A0B",name:"sub_discipline_name"},t.a.createElement($e.a,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B",autoComplete:"off"})))),Cn&&t.a.createElement("div",{className:Qe.a.spin},t.a.createElement(K.a,null))))},yt=ze,St=C("9Bee"),at=C("m3rI"),Ot=C("OljG"),Ye=C.n(Ot),Ue=C("MKdu"),ke=C.n(Ue),Ce=C("Nddv"),Se=C.n(Ce),Me=C("vUf6"),He=C.n(Me),Ge=C("eqIj"),mt=C.n(Ge),Lt=C("ZKmM"),en=C.n(Lt),Jt=function(qe){var Bt,$t,cn,Kt,En,rn,jt,hn,qt,bn,Fn,Yt,Cn,ln,wn,an,Vt,Sn,Ar,fn,Dn,Un,Gn,vn,Kn,or,gr,Lr,er,rr,Dr,Er,_r,ia,ea,tr,vr,ka,ra,Yn,mn,yr,oi,Cr,Rr,fr,ar,Mn,Ln,pn,qn,ta,cr,Nr,Da,ua,va,ca,Ca,Oa,Ma,Fr,Qa,ya,Ka,di,Ji,Di,Ei,Uo,ho,_o,as,fs,is,os,So,ps,Qi,da,_i,gi,vo,uo,Ki,ss,ls,qo,fo,zo,yo,es,Go,xa,oa,Ci,Zi,Oo,co,No,Wi,Ai,Vo,Pn,ts,lo,Fa,Ni,wi,Bo,Ti,ko,ns,ms,Xo,Ss,ks,On=qe.pathsDetail,nr=qe.user,Wt=qe.globalSetting,on=qe.loading,xn=qe.dispatch,Hn=Object(B.a)(qe,["pathsDetail","user","globalSetting","loading","dispatch"]),jn=Object(c.i)(),pr=Object(r.useState)({}),dr=Object(E.a)(pr,2),Rn=dr[0],zr=dr[1],Si=Object(r.useRef)(1),ir=Object(r.useState)(),si=Object(E.a)(ir,2),ao=si[0],zi=si[1],Wn=Object(r.useState)(!1),ja=Object(E.a)(Wn,2),Gi=ja[0],li=ja[1],io=Object(r.useState)(!1),Yo=Object(E.a)(io,2),Fo=Yo[0],jo=Yo[1],gs=Object(r.useState)({status:!1}),ki=Object(E.a)(gs,2),sl=ki[0],vl=ki[1],Os=((Bt=On.detail)===null||Bt===void 0?void 0:Bt.is_free)||(($t=On.detail)===null||$t===void 0?void 0:$t.can_learning);Object(r.useEffect)(function(){vl({status:!1})},[]),Object(r.useEffect)(function(){function qr(){return Ur.apply(this,arguments)}function Ur(){return Ur=Object(k.a)(p.a.mark(function Wa(){var jr,fa,pa,La,Ba,Vi,$a;return p.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,xn({type:"pathsDetail/getPathsDetail",payload:{id:jn.pathId}});case 2:jr=Bn.sent,jr!=null&&jr.toast&&(jr!=null&&(fa=jr.toast)!==null&&fa!==void 0&&fa.is_open&&((pa=jr.toast)===null||pa===void 0?void 0:pa.open_num)===-1?jo(!0):jr!=null&&(La=jr.toast)!==null&&La!==void 0&&La.is_open&&(jr==null||((Ba=jr.toast)===null||Ba===void 0)?void 0:Ba.open_num)===1?($a=JSON.parse(localStorage.getItem("pathsshow"))||[],((Vi=$a.filter(function(xr){return xr===(jn==null?void 0:jn.pathId)}))===null||Vi===void 0?void 0:Vi.length)>0?jo(!1):(jo(!0),$a.push(jn==null?void 0:jn.pathId),localStorage.setItem("pathsshow",JSON.stringify($a)))):jo(!1));case 4:case"end":return Bn.stop()}},Wa)})),Ur.apply(this,arguments)}qr()},[]),Object(r.useEffect)(function(){var qr,Ur,Wa,jr,fa=(qr=On.detail)===null||qr===void 0||((Ur=qr.courses)===null||Ur===void 0)?void 0:Ur.length;if(!fa)return;var pa;if((Wa=On.detail)!==null&&Wa!==void 0&&Wa.has_start){var La,Ba,Vi=(La=On.detail)===null||La===void 0||((Ba=La.courses)===null||Ba===void 0)?void 0:Ba.findIndex(function(Jn){var na;return((na=Jn.course_status)===null||na===void 0?void 0:na.status)===1});pa=Vi>-1?Vi:0}else{var $a,ys,Bn,xr,In,Qr=($a=On.detail)===null||$a===void 0||((ys=$a.courses)===null||ys===void 0||((Bn=ys.map(function(Jn){var na;return(na=Jn.course_status)===null||na===void 0?void 0:na.status}))===null||Bn===void 0))?void 0:Bn.lastIndexOf(2);pa=Qr>-1?Qr:0,Qr=(xr=On.detail)===null||xr===void 0||((In=xr.courses)===null||In===void 0)?void 0:In.findIndex(function(Jn){var na;return((na=Jn.course_status)===null||na===void 0?void 0:na.status)===0}),pa=Qr>-1?Qr:pa}zr(((jr=On.detail)===null||jr===void 0?void 0:jr.courses[pa])||{})},[On.detail]);var Fs=function(Ur){var Wa,jr,fa=(Wa=On.detail)===null||Wa===void 0||((jr=Wa.courses)===null||jr===void 0)?void 0:jr.find(function(pa){return pa.course_id===Ur});zr(fa||{}),xn({type:"classroomList/setActionTabs",payload:{key:"\u4FEE\u6539\u5F00\u8BFE\u65F6\u95F4",name:Ur}})},us=function(){var qr=Object(k.a)(p.a.mark(function Ur(){var Wa;return p.a.wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:return fa.next=2,Object(D.k)({container_id:jn.pathId,container_type:"Subject"});case 2:Wa=fa.sent,Wa.status===0&&(vs(),P.b.success(Wa.message));case 4:case"end":return fa.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),ll=function(){var qr=Object(k.a)(p.a.mark(function Ur(){var Wa;return p.a.wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:return fa.next=2,Object(D.n)({container_id:jn.pathId,container_type:"Subject"});case 2:Wa=fa.sent,Wa.status===0&&(vs(),P.b.success(Wa.message));case 4:case"end":return fa.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),ul=function(){var qr=Object(k.a)(p.a.mark(function Ur(){return p.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u5220\u9664\u5B9E\u8DF5\u8BFE\u7A0B?"),onOk:function(){var fa=Object(k.a)(p.a.mark(function La(){var Ba;return p.a.wrap(function($a){for(;;)switch($a.prev=$a.next){case 0:return $a.next=2,Object(D.q)({id:jn.pathId});case 2:Ba=$a.sent,Ba.status===1&&s.d.push("/paths");case 4:case"end":return $a.stop()}},La)}));function pa(){return fa.apply(this,arguments)}return pa}()});case 1:case"end":return jr.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),Sl=function(){var qr=Object(k.a)(p.a.mark(function Ur(){return p.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:h.a.info({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u77E5\u9053\u5566",content:t.a.createElement("div",{className:"tc"},"\u8BFE\u7A0B\u53D1\u5E03\u540E\u5373\u53EF\u53D1\u9001\u8BFE\u5802\u4F7F\u7528"),onOk:function(){var fa=Object(k.a)(p.a.mark(function La(){var Ba;return p.a.wrap(function($a){for(;;)switch($a.prev=$a.next){case 0:return $a.next=2,Object(D.h)({id:jn.pathId});case 2:Ba=$a.sent,(Ba==null?void 0:Ba.status)===0&&(vs(),P.b.success(Ba.message));case 4:case"end":return $a.stop()}},La)}));function pa(){return fa.apply(this,arguments)}return pa}()});case 1:case"end":return jr.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),Zs=function(){var qr=Object(k.a)(p.a.mark(function Ur(){return p.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okButtonProps:{loading:Gi},onOk:function(){var fa=Object(k.a)(p.a.mark(function La(){var Ba;return p.a.wrap(function($a){for(;;)switch($a.prev=$a.next){case 0:return li(!0),$a.next=3,Object(D.m)({id:jn.pathId});case 3:Ba=$a.sent,(Ba==null?void 0:Ba.status)===1&&(vs(),P.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F")),li(!1);case 6:case"end":return $a.stop()}},La)}));function pa(){return fa.apply(this,arguments)}return pa}()});case 1:case"end":return jr.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),rs=function(){On.detail&&On.detail.has_sub_discipline?Qs({user_customize:!1}):cl(!0)},cl=function(Ur){vl({status:Ur})},Qs=function(Ur){h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A\u7533\u8BF7",cancelText:"\u53D6\u6D88\u7533\u8BF7",content:t.a.createElement("div",{className:"tc"},"\u516C\u5F00\u8BFE\u7A0B\u9700\u7ECF\u8FC7\u5E73\u53F0\u6807\u51C6\u5316\u5BA1\u6838\uFF0C\u5BA1\u6838\u5468\u671F\u4E3A1-2\u5929\uFF0C\u516C\u5F00",t.a.createElement("br",null),"\u7684\u8BFE\u7A0B\u5C06\u5BF9\u5E73\u53F0\u6240\u6709\u4EBA\u53EF\u89C1\u3002\u82E5\u4EC5\u672C\u4EBA\u6559\u5B66\u4F7F\u7528\u5219\u65E0\u9700",t.a.createElement("br",null),"\u7533\u8BF7\u516C\u5F00\uFF0C\u76F4\u63A5\u53D1\u9001\u5230\u8BFE\u5802\u5373\u53EF",t.a.createElement("br",null)),onOk:function(){var Wa=Object(k.a)(p.a.mark(function fa(){var pa,La;return p.a.wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:return pa={user_customize:Ur.user_customize},Ur.user_customize?pa=Object(I.a)(Object(I.a)({},pa),{},{discipline_name:Ur.discipline_name,sub_discipline_name:Ur.sub_discipline_name}):Ur.sub_discipline_id&&(pa=Object(I.a)(Object(I.a)({},pa),{},{sub_discipline_id:Ur.sub_discipline_id})),Vi.next=4,Object(D.g)(Object(I.a)({id:jn.pathId},pa));case 4:La=Vi.sent,((La==null?void 0:La.status)===0||(La==null?void 0:La.status)===1)&&(vs(),P.b.success("\u516C\u5F00\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u7684\u5BA1\u6838"));case 6:case"end":return Vi.stop()}},fa)}));function jr(){return Wa.apply(this,arguments)}return jr}()})},$s=function(){var qr=Object(k.a)(p.a.mark(function Ur(){return p.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u7533\u8BF7\u516C\u5F00\uFF1F"),onOk:function(){var fa=Object(k.a)(p.a.mark(function La(){var Ba;return p.a.wrap(function($a){for(;;)switch($a.prev=$a.next){case 0:return $a.next=2,Object(D.l)({id:jn.pathId});case 2:Ba=$a.sent,(Ba==null?void 0:Ba.status)===0&&(vs(),P.b.success("\u64A4\u9500\u7533\u8BF7\u516C\u5F00\u6210\u529F"));case 4:case"end":return $a.stop()}},La)}));function pa(){return fa.apply(this,arguments)}return pa}()});case 1:case"end":return jr.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),qs=function(){var qr=Object(k.a)(p.a.mark(function Ur(){return p.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"ml20"},t.a.createElement(f.a.Group,{defaultValue:1,onChange:function(pa){return Si.current=pa.target.value}},t.a.createElement(f.a,{value:1,className:"mt10"},"\u5F00\u653E\u8BFE\u5802\uFF1A",t.a.createElement("span",null,"\u6240\u6709\u7528\u6237\u53EF\u4EE5\u968F\u65F6\u8BBF\u95EE")),t.a.createElement(f.a,{value:0,className:"mt10"},"\u79C1\u6709\u8BFE\u5802\uFF1A",t.a.createElement("span",null,"\u4EC5\u62A5\u540D\u53C2\u4E0E\u7684\u8BFE\u5802\u6210\u5458\u53EF\u4EE5\u8BBF\u95EE")))),onOk:function(){var fa=Object(k.a)(p.a.mark(function La(){return p.a.wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:Object(pe.S)("/classrooms/news/".concat(jn.pathId,"/newgold/").concat(Si.current));case 1:case"end":return Vi.stop()}},La)}));function pa(){return fa.apply(this,arguments)}return pa}()});case 1:case"end":return jr.stop()}},Ur)}));return function(){return qr.apply(this,arguments)}}(),yl=function(){h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u8BA4\u7ACB\u5373\u9884\u7EA6\uFF1F"),onOk:function(){var Ur=Object(k.a)(p.a.mark(function jr(){var fa;return p.a.wrap(function(La){for(;;)switch(La.prev=La.next){case 0:return La.next=2,Object(D.i)({id:jn.pathId});case 2:fa=La.sent,fa.status===0&&(zi(!0),P.b.success(fa.message));case 4:case"end":return La.stop()}},jr)}));function Wa(){return Ur.apply(this,arguments)}return Wa}()})},Bs=function(){if(!Object(Le.e)(xn))return;h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u5B9A\u52A0\u5165\u8BE5\u8BFE\u5802"),onOk:function(){var Ur=Object(k.a)(p.a.mark(function jr(){var fa,pa;return p.a.wrap(function(Ba){for(;;)switch(Ba.prev=Ba.next){case 0:return Ba.next=2,Object(D.L)({id:Rn==null?void 0:Rn.course_id});case 2:fa=Ba.sent,fa.status===0&&(P.b.success(fa.message),xn({type:"pathsDetail/getPathsDetail",payload:{id:jn.pathId}}),((pa=Rn.course_status)===null||pa===void 0?void 0:pa.status)===1&&Object(pe.S)("/classrooms/".concat(Rn==null?void 0:Rn.course_id,"/shixun_homework")));case 4:case"end":return Ba.stop()}},jr)}));function Wa(){return Ur.apply(this,arguments)}return Wa}()})},Ol=function(){var Ur;if((Ur=On.detail)!==null&&Ur!==void 0&&Ur.need_authorize){Object(Le.a)(!1,"\u8BE5\u8BFE\u7A0B\u4E2D\u5305\u542B\u5B9E\u8BAD\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002");return}if(!Object(Le.e)(xn))return;xn({type:"pathsDetail/setActionTabs",payload:{key:"PathsDetail-SendToClass"}})},vs=function(){xn({type:"pathsDetail/getPathsDetail",payload:{id:jn.pathId}}),xn({type:"pathsDetail/getRightData",payload:{id:jn.pathId}})},Rs=!!((cn=On.detail)!==null&&cn!==void 0&&cn.participant_count)&&!((Kt=On.detail)!==null&&Kt!==void 0&&Kt.allow_statistics),Ks=((En=On.detail)===null||En===void 0||((rn=En.courses)===null||rn===void 0)?void 0:rn.findIndex(function(qr){return(qr==null?void 0:qr.course_id)===(Rn==null?void 0:Rn.course_id)}))+1,Is=Ks===((jt=On.detail)===null||jt===void 0||((hn=jt.courses)===null||hn===void 0)?void 0:hn.length);return t.a.createElement("section",null,t.a.createElement("aside",{className:G.a.banner,style:{backgroundImage:On!=null&&(qt=On.detail)!==null&&qt!==void 0&&(bn=qt.attachments)!==null&&bn!==void 0&&(Fn=bn[0])!==null&&Fn!==void 0&&Fn.url?"url(".concat(at.a.API_SERVER+(On==null||((Yt=On.detail)===null||Yt===void 0||((Cn=Yt.attachments)===null||Cn===void 0||((ln=Cn[0])===null||ln===void 0)))?void 0:ln.url),")"):"url(".concat(Ye.a,")"),marginBottom:(wn=On.detail)!==null&&wn!==void 0&&(an=wn.courses)!==null&&an!==void 0&&an.length?70:20}},t.a.createElement("aside",{className:G.a.wrp},t.a.createElement("div",{className:G.a.operationWrap},!!((Vt=On.detail)!==null&&Vt!==void 0&&Vt.is_free)&&((Sn=On.detail)===null||Sn===void 0?void 0:Sn.publish_status)!==0&&(((Ar=On.detail)===null||Ar===void 0?void 0:Ar.allow_add_member)||!Object(F.m)())&&t.a.createElement(i.a,{placement:"bottom",title:"\u4EE5\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u5F62\u5F0F\u53D1\u9001\u5230\u6211\u7684\u8BFE\u5802"},t.a.createElement("span",{onClick:Ol,style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"26px"}},t.a.createElement("img",{src:ke.a,style:{marginRight:"10px"}}),"\u53D1\u9001\u81F3")),((fn=On.detail)===null||fn===void 0?void 0:fn.allow_statistics)&&((Dn=On.detail)===null||Dn===void 0?void 0:Dn.public_status)===2&&t.a.createElement("span",{onClick:function(){return s.d.push("/paths/".concat(jn.pathId,"/statistics"))},style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"26px"}},t.a.createElement("img",{src:He.a,style:{marginRight:"10px"}}),"\u5B66\u4E60\u7EDF\u8BA1"),((Un=On.detail)===null||Un===void 0?void 0:Un.is_share)&&t.a.createElement(We.CopyToClipboard,{text:"".concat(window.location.origin,"/paths/").concat(jn.pathId,"?userid=").concat((Gn=nr.userInfo)===null||Gn===void 0?void 0:Gn.user_id),onCopy:function(){return P.b.success("\u5DF2\u590D\u5236\u8BFE\u7A0B\u5206\u4EAB\u4E13\u5C5E\u94FE\u63A5")}},t.a.createElement("span",{style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"26px"}},t.a.createElement("img",{src:ke.a,style:{marginRight:"10px"}}),"\u5206\u4EAB\u8BFE\u7A0B")),((vn=On.detail)===null||vn===void 0?void 0:vn.allow_add_member)&&t.a.createElement(w.a,{overlay:t.a.createElement(b.a,null,((Kn=On.detail)===null||Kn===void 0?void 0:Kn.courses)&&(((or=On.detail)===null||or===void 0?void 0:or.is_creator)&&!!((gr=nr.userInfo)!==null&&gr!==void 0&&gr.professional_certification)||Object(F.o)())&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:qs},"\u5F00\u8BFE"),((Lr=On.detail)===null||Lr===void 0?void 0:Lr.allow_statistics)&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:function(){return s.d.push("/paths/".concat(jn.pathId,"/edit"))}},"\u7F16\u8F91\u8BFE\u7A0B"),((er=On.detail)===null||er===void 0?void 0:er.allow_add_member)&&((rr=On.detail)===null||rr===void 0?void 0:rr.publish_status)===0&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:Sl},"\u53D1\u5E03\u8BFE\u7A0B"),((Dr=On.detail)===null||Dr===void 0?void 0:Dr.allow_statistics)&&((Er=On.detail)===null||Er===void 0?void 0:Er.publish_status)===2&&((_r=On.detail)===null||_r===void 0?void 0:_r.public_status)===0&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:Zs},"\u64A4\u9500\u53D1\u5E03"),((ia=On.detail)===null||ia===void 0?void 0:ia.allow_statistics)&&((ea=On.detail)===null||ea===void 0?void 0:ea.publish_status)===2&&((tr=On.detail)===null||tr===void 0?void 0:tr.public_status)===0&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:rs},"\u516C\u5F00\u8BFE\u7A0B"),((vr=On.detail)===null||vr===void 0?void 0:vr.allow_statistics)&&((ka=On.detail)===null||ka===void 0?void 0:ka.public_status)===1&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:$s},"\u64A4\u9500\u7533\u8BF7\u516C\u5F00"),Object(F.c)()&&((ra=On.detail)===null||ra===void 0?void 0:ra.allow_statistics)&&((Yn=On.detail)===null||Yn===void 0?void 0:Yn.public_status)===2&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:$s},"\u64A4\u9500\u516C\u5F00"),((mn=On.detail)===null||mn===void 0?void 0:mn.allow_delete)&&t.a.createElement(b.a.Item,{style:{textAlign:"center"},onClick:ul},"\u5220\u9664\u8BFE\u7A0B"))},t.a.createElement("span",{style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"26px"}},t.a.createElement("img",{src:Se.a,style:{marginRight:"10px"}}),"\u8BBE\u7F6E"))),t.a.createElement("p",{className:[G.a.titleWrap,((yr=On.detail)===null||yr===void 0||((oi=yr.name)===null||oi===void 0)?void 0:oi.indexOf(` `))&&G.a.titleFlexEnd].join(" ")},t.a.createElement("span",{className:G.a.title},t.a.createElement("strong",null,(Cr=On.detail)===null||Cr===void 0||((Rr=Cr.name)===null||Rr===void 0)?void 0:Rr.split(` `)[0]),t.a.createElement("span",{className:"font24"},t.a.createElement("br",null),(fr=On.detail)===null||fr===void 0||((ar=fr.name)===null||ar===void 0)?void 0:ar.split(` `).filter(function(qr,Ur){return Ur!==0}).join(""))),t.a.createElement("div",null,((Mn=On.detail)===null||Mn===void 0?void 0:Mn.excellent)&&t.a.createElement(_.a,{className:"".concat(G.a.openCourseTag," font14"),style:{background:"#44D7B6",border:"1px solid #44D7B6"}},"\u5F00\u653E\u8BFE\u7A0B"),((Ln=On.detail)===null||Ln===void 0?void 0:Ln.featured)>0&&t.a.createElement("div",null,((pn=On.detail)===null||pn===void 0?void 0:pn.featured)===1&&t.a.createElement(_.a,{className:"".concat(G.a.openCourseTag," font14"),style:{background:"#FF6500",border:"1px solid #FF6500"}},"\u56FD\u5BB6\u4E00\u6D41"),((qn=On.detail)===null||qn===void 0?void 0:qn.featured)===2&&t.a.createElement(_.a,{className:"".concat(G.a.openCourseTag," font14"),style:{background:"#4361F2",border:"1px solid #4361F2"}},"\u519B\u961F\u4E00\u6D41"),((ta=On.detail)===null||ta===void 0?void 0:ta.featured)===3&&t.a.createElement(_.a,{className:"".concat(G.a.openCourseTag," font14"),style:{background:"#E9AD5D",border:"1px solid #E9AD5D"}},"\u7701\u7EA7\u4E00\u6D41"),((cr=On.detail)===null||cr===void 0?void 0:cr.featured)===4&&t.a.createElement(_.a,{className:"".concat(G.a.openCourseTag," font14"),style:{background:"#f7ce62",border:"1px solid #f7ce62"}},"\u7CBE\u54C1\u8BFE\u7A0B")),((Nr=nr.userInfo)===null||Nr===void 0?void 0:Nr.login)&&((Da=On.detail)===null||Da===void 0?void 0:Da.is_collect)&&t.a.createElement("span",{style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"20px",display:"flex"},onClick:us},t.a.createElement(i.a,{title:"\u53D6\u6D88\u6536\u85CF"},t.a.createElement("img",{src:mt.a,style:{marginRight:"10px"}})),t.a.createElement("span",{style:{height:"24px"}},"\u5DF2\u6536\u85CF")),((ua=nr.userInfo)===null||ua===void 0?void 0:ua.login)&&!((va=On.detail)!==null&&va!==void 0&&va.is_collect)&&t.a.createElement("span",{style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"20px",display:"flex"},onClick:ll},t.a.createElement(i.a,{title:"\u53D6\u6D88\u6536\u85CF"},t.a.createElement("img",{src:en.a,style:{marginRight:"10px"}})),t.a.createElement("span",{style:{height:"24px"}},"\u6536\u85CF")),!Object(F.p)()&&t.a.createElement("span",{style:{fontSize:"12px",color:"#fff",lineHeight:"24px",cursor:"pointer",marginLeft:"20px",display:"flex"},className:"mr15",onClick:function(){if(!Object(Le.e)(xn))return}},t.a.createElement("img",{src:en.a,style:{marginRight:"10px"}}),t.a.createElement("span",{style:{height:"24px"}},"\u6536\u85CF")))),t.a.createElement("div",{className:G.a.contentWrap},t.a.createElement("div",{className:G.a.contentLeftWrap},!!((ca=On.detail)!==null&&ca!==void 0&&ca.stages_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u7AE0\u8282"),t.a.createElement("p",{className:"mt3"},(Ca=On.detail)===null||Ca===void 0?void 0:Ca.stages_count)),!!((Oa=On.detail)!==null&&Oa!==void 0&&Oa.shixuns_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u5355\u5143"),t.a.createElement("p",{className:"mt3"},(Ma=On.detail)===null||Ma===void 0?void 0:Ma.shixuns_count)),!!((Fr=On.detail)!==null&&Fr!==void 0&&Fr.challenge_choose_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u9009\u62E9\u9898\u5173\u5361"),t.a.createElement("p",{className:"mt3"},(Qa=On.detail)===null||Qa===void 0?void 0:Qa.challenge_choose_count)),!!((ya=On.detail)!==null&&ya!==void 0&&ya.challenges_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u5B9E\u8DF5\u5173\u5361"),t.a.createElement("p",{className:"mt3"},(Ka=On.detail)===null||Ka===void 0?void 0:Ka.challenges_count)),!!((di=On.detail)!==null&&di!==void 0&&di.videos_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u89C6\u9891"),t.a.createElement("p",{className:"mt3"},(Ji=On.detail)===null||Ji===void 0?void 0:Ji.videos_count)),!!((Di=On.detail)!==null&&Di!==void 0&&Di.attachment_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u8BFE\u4EF6"),t.a.createElement("p",{className:"mt3"},(Ei=On.detail)===null||Ei===void 0?void 0:Ei.attachment_count)),((Uo=On.detail)===null||Uo===void 0?void 0:Uo.publish_status)!==0&&!!((ho=On.detail)!==null&&ho!==void 0&&ho.subject_score)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,"\u7ECF\u9A8C\u503C"),t.a.createElement("p",{className:"mt3"},(_o=On.detail)===null||_o===void 0?void 0:_o.subject_score)),((as=On.detail)===null||as===void 0?void 0:as.publish_status)!==0&&!!((fs=On.detail)!==null&&fs!==void 0&&fs.member_count)&&t.a.createElement("div",{className:"mr30"},t.a.createElement("span",null,t.a.createElement("span",null,(is=On.detail)!==null&&is!==void 0&&is.excellent?"\u53C2\u4E0E\u4EBA\u6570":"\u5B66\u4E60\u4EBA\u6570"),t.a.createElement(i.a,{title:"\u66F4\u65B0\u65F6\u95F4\uFF1A".concat(((os=On.detail)===null||os===void 0?void 0:os.member_count_update_at)||"--")},t.a.createElement("i",{className:"iconfont icon-xiaowenhao1 font14 ml5"}))),t.a.createElement("p",{className:"mt3"},(So=On.detail)===null||So===void 0?void 0:So.member_count)),((ps=On.detail)===null||ps===void 0?void 0:ps.subject_score)>=0&&t.a.createElement("span",{className:"font14 c-white"},t.a.createElement("span",null,"\u8BC4\u5206"),t.a.createElement("br",null),t.a.createElement(l.a,{allowHalf:!0,value:Object(pe.C)((Qi=On.detail)===null||Qi===void 0?void 0:Qi.averge_star),disabled:!0,className:G.a.rating})))),!!((da=On.detail)!==null&&da!==void 0&&(_i=da.courses)!==null&&_i!==void 0&&_i.length)&&t.a.createElement("aside",{className:G.a.nav},t.a.createElement("div",{className:G.a.navLeft},Rn.course_identity<4&&t.a.createElement(i.a,{placement:"bottom",title:"\u7F16\u8F91\u8BFE\u5802"},t.a.createElement("a",{href:"/classrooms/".concat(Rn==null?void 0:Rn.course_id,"/newgolds/settings"),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-bianji1 ".concat(G.a.navLeftIcon)}))),t.a.createElement(w.a,{overlay:t.a.createElement(b.a,null,(gi=Object(d.a)((uo=On.detail)===null||uo===void 0?void 0:uo.courses))===null||gi===void 0||((vo=gi.reverse())===null||vo===void 0)?void 0:vo.map(function(qr,Ur){var Wa,jr;return t.a.createElement(b.a.Item,{key:qr.course_id,onClick:function(){return Fs(qr.course_id)}},t.a.createElement("span",{className:"font14"},"\u7B2C",((Wa=On.detail)===null||Wa===void 0||((jr=Wa.courses)===null||jr===void 0)?void 0:jr.length)-Ur,"\u671F"))}))},t.a.createElement("div",null,t.a.createElement("span",{className:"font14 current"},"\u7B2C",t.a.createElement("span",{className:G.a.colorOrange},Ks),"\u671F"),t.a.createElement(N.a,null))),t.a.createElement("div",{className:G.a.navContent},t.a.createElement("div",{className:G.a.contentItem},t.a.createElement("div",{className:G.a.contentItemTitle},"\u5F00\u8BFE\u65F6\u95F4\uFF1A"),t.a.createElement("div",{className:G.a.contentItemText},Rn==null?void 0:Rn.start_date)),t.a.createElement("div",{className:G.a.verticalLine}),t.a.createElement("div",{className:G.a.contentItem},t.a.createElement("div",{className:G.a.contentItemTitle},"\u7ED3\u8BFE\u65F6\u95F4\uFF1A"),t.a.createElement("div",{className:G.a.contentItemText},Rn==null?void 0:Rn.end_date)),t.a.createElement("div",{className:G.a.verticalLine}),t.a.createElement("div",{className:G.a.contentItem},t.a.createElement("div",{className:G.a.contentItemTitle},(Ki=On.detail)!==null&&Ki!==void 0&&Ki.excellent?"\u53C2\u4E0E\u4EBA\u6570\uFF1A":"\u62A5\u540D\u4EBA\u6570\uFF1A"),t.a.createElement("div",{className:G.a.contentItemText},Rn==null?void 0:Rn.student_count," \u4EBA")))),t.a.createElement("div",{className:G.a.navRight,style:{display:"none"}},t.a.createElement("div",{className:G.a.flexRow},(Rn==null||((ss=Rn.course_status)===null||ss===void 0)?void 0:ss.status)===1&&t.a.createElement("div",{className:"mr20 c-red-ee4"},Rn==null||((ls=Rn.course_status)===null||ls===void 0)?void 0:ls.time),(Rn==null||((qo=Rn.course_status)===null||qo===void 0)?void 0:qo.status)===2&&Rn.course_identity<6&&t.a.createElement("div",{className:"current mr20 c-grey-9b9 font14"},"\u5DF2\u7ED3\u675F"),((fo=Rn.course_status)===null||fo===void 0?void 0:fo.status)===2&&(Rn.course_identity<6?t.a.createElement("a",{className:G.a.classButton,href:"/classrooms/".concat(Rn==null||((zo=Rn.first_category_url)===null||zo===void 0||((yo=zo.split("/"))===null||yo===void 0))?void 0:yo[2],"/announcement"),target:"_blank"},"\u8FDB\u5165\u8BFE\u5802"):t.a.createElement("div",{className:"current mr20 c-grey-9b9 font14"},"\u5DF2\u7ED3\u675F")),((es=Rn.course_status)===null||es===void 0?void 0:es.status)===1&&Rn.course_identity>5&&t.a.createElement("div",{className:G.a.classButton,onClick:Bs},"\u7ACB\u5373\u52A0\u5165"),((Go=Rn.course_status)===null||Go===void 0?void 0:Go.status)===1&&Rn.course_identity===5&&t.a.createElement("a",{className:G.a.classButton,href:"/classrooms/".concat(Rn==null||((xa=Rn.first_category_url)===null||xa===void 0||((oa=xa.split("/"))===null||oa===void 0))?void 0:oa[2],"/announcement"),target:"_blank"},"\u7ACB\u5373\u5B66\u4E60"),((Ci=Rn.course_status)===null||Ci===void 0?void 0:Ci.status)===0&&Rn.course_identity>5&&t.a.createElement("div",{className:G.a.classButton,onClick:Bs},"\u7ACB\u5373\u62A5\u540D"),((Zi=Rn.course_status)===null||Zi===void 0?void 0:Zi.status)===0&&Rn.course_identity===5&&t.a.createElement("div",{className:G.a.classButton},"\u62A5\u540D\u6210\u529F"),((Rn==null||((Oo=Rn.course_status)===null||Oo===void 0)?void 0:Oo.status)===0||(Rn==null||((co=Rn.course_status)===null||co===void 0)?void 0:co.status)===1)&&Rn.course_identity<5&&t.a.createElement("a",{className:G.a.classButton,href:"/classrooms/".concat(Rn==null||((No=Rn.first_category_url)===null||No===void 0||((Wi=No.split("/"))===null||Wi===void 0))?void 0:Wi[2],"/announcement"),target:"_blank"},"\u8FDB\u5165\u8BFE\u5802"),Rs&&Is&&((Ai=On.detail)===null||Ai===void 0?void 0:Ai.has_participate)&&t.a.createElement("span",{className:"".concat(G.a.classButton," ").concat(G.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"),Rs&&Is&&!((Vo=On.detail)!==null&&Vo!==void 0&&Vo.has_participate)&&(ao?t.a.createElement("span",{className:"".concat(G.a.classButton," ").concat(G.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"):t.a.createElement("span",{className:"".concat(G.a.classButton," ").concat(G.a.bg28e),onClick:yl},"\u671F\u5F85\u5F00\u8BFE\u5E76\u9884\u7EA6\u62A5\u540D"))),t.a.createElement("div",{className:G.a.flexRow},Rs&&!!((Pn=On.detail)!==null&&Pn!==void 0&&(ts=Pn.courses)!==null&&ts!==void 0&&ts.length)&&Is&&t.a.createElement("span",{className:"mt20"},t.a.createElement("span",{className:"mr10"},"\u5F53\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\u8FBE\u5230 ",(lo=On.detail)===null||lo===void 0?void 0:lo.student_count," ","\u4EBA\u65F6\u5373\u5C06\u5F00\u8BFE"),t.a.createElement("span",{className:""},"\u5F53\u524D\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\uFF1A",t.a.createElement("span",{className:"mr5 c-red-ee4"},ao===!0?((Fa=On.detail)===null||Fa===void 0?void 0:Fa.participant_count)+1:(Ni=On.detail)===null||Ni===void 0?void 0:Ni.participant_count),"\u4EBA")),Rs&&!((wi=On.detail)!==null&&wi!==void 0&&(Bo=wi.courses)!==null&&Bo!==void 0&&Bo.length)&&Is&&t.a.createElement("span",null,!((Ti=On.detail)!==null&&Ti!==void 0&&Ti.has_participate)&&(ao===!0?t.a.createElement("span",{className:"".concat(G.a.classButton," ").concat(G.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"):t.a.createElement("a",{className:"".concat(G.a.classButton," ").concat(G.a.bg28e),onClick:yl},"\u671F\u5F85\u5F00\u8BFE\u5E76\u9884\u7EA6\u62A5\u540D")),((ko=On.detail)===null||ko===void 0?void 0:ko.has_participate)&&t.a.createElement("span",{className:"".concat(G.a.classButton," ").concat(G.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"),t.a.createElement("span",{className:"mr10"},"\u5F53\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\u8FBE\u5230 ",(ns=On.detail)===null||ns===void 0?void 0:ns.student_count," ","\u4EBA\u65F6\u5373\u5C06\u5F00\u8BFE"),t.a.createElement("span",{className:""},"\u5F53\u524D\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\uFF1A",t.a.createElement("span",{className:"mr5 c-red-ee4"},ao===!0?((ms=On.detail)===null||ms===void 0?void 0:ms.participant_count)+1:(Xo=On.detail)===null||Xo===void 0?void 0:Xo.participant_count),"\u4EBA"))))))),t.a.createElement(et,null),sl.status&&t.a.createElement(yt,{type:"subject",onCancel:function(){return cl(!1)},onOk:function(Ur){cl(!1),Qs(Ur)}}),t.a.createElement(h.a,{visible:Fo,title:"\u8BFE\u7A0B\u63D0\u793A",width:593,maskClosable:!1,onCancel:function(){jo(!1)},centered:!0,footer:t.a.createElement("div",null,t.a.createElement(o.a,{type:"primary",onClick:function(){jo(!1)}},"\u6211\u77E5\u9053\u4E86"))},t.a.createElement(St.a,{style:{maxHeight:378,overflow:"auto"},value:On==null||((Ss=On.detail)===null||Ss===void 0||((ks=Ss.toast)===null||ks===void 0))?void 0:ks.content})))},Ct=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.user,$t=ut.loading,cn=ut.globalSetting;return{pathsDetail:qe,user:Bt,globalSetting:cn,loading:$t.models.index}})(Jt),Et=C("MXD1"),pt=C("CFYs"),Xe=C("8Bcu"),Fe=C.n(Xe),Te=C("WPnJ"),Ne=C.n(Te),xt=C("g9YV"),vt=C("wCAj"),Dt=C("O3gP"),Ht=C("lrIw"),ct=C("RotF"),Mt=C.n(ct),Gt=C("oUNq"),gn=C("lzim"),Tn=C("55Ip"),Gr=function(qe){var Bt=qe.pathsDetail,$t=qe.loading,cn=qe.dispatch,Kt=qe.onReloadData,En=Kt===void 0?function(){}:Kt,rn=Object(c.i)(),jt=Object(r.useState)([]),hn=Object(E.a)(jt,2),qt=hn[0],bn=hn[1],Fn=Object(r.useState)(!0),Yt=Object(E.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=Object(r.useState)(!1),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1],Ar=ft.a.useForm(),fn=Object(E.a)(Ar,1),Dn=fn[0],Un=Object(r.useState)([]),Gn=Object(E.a)(Un,2),vn=Gn[0],Kn=Gn[1],or=Object(r.useState)(1),gr=Object(E.a)(or,2),Lr=gr[0],er=gr[1],rr=Object(r.useState)([]),Dr=Object(E.a)(rr,2),Er=Dr[0],_r=Dr[1],ia=Object(r.useState)(!0),ea=Object(E.a)(ia,2),tr=ea[0],vr=ea[1],ka=Object(r.useState)(!1),ra=Object(E.a)(ka,2),Yn=ra[0],mn=ra[1];Object(r.useEffect)(function(){Bt.actionTabs.key==="Collaborators-AddCollaborator"&&(vr(!0),ln(!0),yr())},[Bt.actionTabs.key]);var yr=function(){var Ln=Object(k.a)(p.a.mark(function pn(){var qn;return p.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,cn({type:"classroomList/getSchoolList",payload:{}});case 2:qn=cr.sent,bn(qn.map(function(Nr){return{value:Nr}}));case 4:case"end":return cr.stop()}},pn)}));return function(){return Ln.apply(this,arguments)}}(),oi=function(){var pn,qn;if(!((pn=Dn.getFieldValue())!==null&&pn!==void 0&&(qn=pn.keyword)!==null&&qn!==void 0&&qn.trim())){P.b.warn("\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9"),Kn([]);return}vr(!1),ln(!0),Sn(!1),er(1),_r([]),Rr(!0)},Cr=function(pn){pn=String(pn);var qn=Er.indexOf(pn);qn<0?Er.push(pn):Er.splice(qn,1),_r(Object(d.a)(Er))},Rr=function(){var Ln=Object(k.a)(p.a.mark(function pn(){var qn,ta,cr,Nr,Da,ua=arguments;return p.a.wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:if(qn=ua.length>0&&ua[0]!==void 0?ua[0]:!1,!(Cn&&!Vt||qn)){ca.next=11;break}return Nr=Dn.getFieldValue(),Sn(!0),er(qn?1:Lr+1),ca.next=7,Object(Gt.Ab)(Object(I.a)(Object(I.a)({page:qn?1:Lr+1,container_id:rn.pathId,container_type:3},Nr),{},{school_name:(Nr==null?void 0:Nr.school_name)||null,keyword:(Nr==null||((ta=Nr.keyword)===null||ta===void 0)?void 0:ta.trim())||null}));case 7:Da=ca.sent,Kn(qn?Object(d.a)(Da.users):[].concat(Object(d.a)(vn),Object(d.a)(Da.users))),Sn(!1),((cr=Da.users)===null||cr===void 0?void 0:cr.length)<10&&ln(!1);case 11:case"end":return ca.stop()}},pn)}));return function(){return Ln.apply(this,arguments)}}(),fr=function(){var Ln=Object(k.a)(p.a.mark(function pn(){var qn;return p.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:if(Er!=null&&Er.length){cr.next=4;break}P.b.warn("\u8BF7\u5148\u5728\u4E0B\u9762\u5217\u8868\u4E2D\u9009\u62E9\u8981\u6DFB\u52A0\u6210\u5458"),cr.next=10;break;case 4:return mn(!0),cr.next=7,Object(D.e)({id:rn.pathId,user_ids:Er});case 7:qn=cr.sent,mn(!1),qn&&(P.b.success("\u6DFB\u52A0\u6210\u529F"),ar(),En&&En());case 10:case"end":return cr.stop()}},pn)}));return function(){return Ln.apply(this,arguments)}}(),ar=function(){Dn.setFieldsValue({keyword:""}),cn({type:"pathsDetail/setActionTabs",payload:{}})},Mn=[{title:"",dataIndex:"added",width:40,ellipsis:!0,render:function(pn,qn){return t.a.createElement(te.a,{value:qn.numid,checked:Er.includes(String(qn.numid)),disabled:!!pn})}},{title:"\u59D3\u540D",width:100,ellipsis:!0,dataIndex:"username",render:function(pn,qn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement(Tn.a,{className:"bold c-black",to:"/users/".concat(qn.login),target:"_blank"},pn||"--"))}},{title:"\u624B\u673A\u53F7",width:100,dataIndex:"phone",ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement("span",null,pn||"--"))}},{title:"\u90AE\u7BB1",dataIndex:"email",width:100,ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement("span",null,pn||"--"))}},{title:"\u5B66\u53F7/\u5DE5\u53F7",width:100,dataIndex:"student_number",ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement("span",null,pn||"--"))}},{title:"\u5B66\u6821/\u5355\u4F4D",width:150,dataIndex:"school_name",ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement("span",null,pn||"--"))}},{title:"\u9662\u7CFB/\u90E8\u95E8",dataIndex:"depart_name",width:130,ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn},t.a.createElement("span",null,pn||"--"))}},{title:"\u5B9E\u540D\u8BA4\u8BC1",dataIndex:"auth",width:100,render:function(pn){return pn?"\u662F":"\u5426"}},{title:"\u6700\u540E\u767B\u5F55\u65F6\u95F4",dataIndex:"last_login_on",width:140,ellipsis:!0,render:function(pn){return t.a.createElement(i.a,{placement:"bottom",title:pn&&se()(pn).format("YYYY-MM-DD HH:mm")},t.a.createElement("span",null,pn&&se()(pn).format("YYYY-MM-DD HH:mm")))}},{title:"\u72B6\u6001",dataIndex:"added",width:80,render:function(pn){if(pn===1)return t.a.createElement("span",{className:"c-green"},"\u5DF2\u6DFB\u52A0")}}];return t.a.createElement(h.a,{title:"\u6DFB\u52A0\u5408\u4F5C\u8005",visible:Bt.actionTabs.key==="Collaborators-AddCollaborator",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",width:1100,centered:!0,keyboard:!1,maskClosable:!1,bodyStyle:{minHeight:200},confirmLoading:Yn,onOk:fr,onCancel:ar},t.a.createElement(ft.a,{layout:"inline",form:Dn,initialValues:{school_name:"",keyword:"",search_type:"1"},className:"mt10",onFinish:oi},t.a.createElement(ft.a.Item,{name:"search_type",label:"\u641C\u7D22\u7C7B\u578B"},t.a.createElement(ue.a,null,t.a.createElement(ue.a.Option,{value:"1"},"\u59D3\u540D"),t.a.createElement(ue.a.Option,{value:"2"},"\u624B\u673A\u53F7"),t.a.createElement(ue.a.Option,{value:"3"},"\u90AE\u7BB1"))),t.a.createElement(ft.a.Item,{name:"keyword",label:"\u641C\u7D22\u5185\u5BB9"},t.a.createElement($e.a,{allowClear:!0,style:{width:280},size:"large",placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"})),t.a.createElement(ft.a.Item,{name:"school_name",label:"\u5355\u4F4D\uFF1A"},t.a.createElement(Ht.a,{allowClear:!0,defaultOpen:!1,options:qt,style:{width:400},size:"large",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0",filterOption:function(pn,qn){return qn.value.toUpperCase().indexOf(pn.toUpperCase())!==-1}})),t.a.createElement(ft.a.Item,null,t.a.createElement(o.a,{htmlType:"submit",type:"primary",size:"large"},"\u641C\u7D22"))),tr&&t.a.createElement("div",{className:"tc font16 c-light-black mt40"},t.a.createElement("img",{src:gn.x,width:"100",alt:""}),t.a.createElement("br",null),"\u8BF7\u641C\u7D22\u8981\u6DFB\u52A0\u7684\u4EBA\u5458"),!tr&&t.a.createElement("section",null,t.a.createElement("div",{className:"flexd-table-header mt20"},t.a.createElement(vt.a,{pagination:!1,dataSource:[],columns:Mn})),t.a.createElement("div",{style:{maxHeight:260,overflow:"auto"}},t.a.createElement(Mt.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(pn){Rr()},hasMore:Cn,useWindow:!1},t.a.createElement(vt.a,{loading:Vt,showHeader:!1,pagination:!1,dataSource:vn,columns:Mn,onRow:function(pn){return{onClick:function(ta){ta.currentTarget.querySelector("input").disabled||Cr(ta.currentTarget.querySelector("input").value)}}}})))))},Vr=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.loading;return{pathsDetail:qe,loading:Bt}})(Gr),Kr=function(qe){var Bt=qe.pathsDetail,$t=qe.loading,cn=qe.dispatch,Kt=qe.data,En=qe.onReloadData,rn=En===void 0?function(){}:En,jt=Object(c.i)(),hn=Object(r.useState)(!0),qt=Object(E.a)(hn,2),bn=qt[0],Fn=qt[1],Yt=Object(r.useState)(!1),Cn=Object(E.a)(Yt,2),ln=Cn[0],wn=Cn[1],an=ft.a.useForm(),Vt=Object(E.a)(an,1),Sn=Vt[0],Ar=Object(r.useState)([]),fn=Object(E.a)(Ar,2),Dn=fn[0],Un=fn[1],Gn=Object(r.useState)(1),vn=Object(E.a)(Gn,2),Kn=vn[0],or=vn[1],gr=Object(r.useState)([]),Lr=Object(E.a)(gr,2),er=Lr[0],rr=Lr[1],Dr=Object(r.useState)(!0),Er=Object(E.a)(Dr,2),_r=Er[0],ia=Er[1],ea=Object(r.useState)(!1),tr=Object(E.a)(ea,2),vr=tr[0],ka=tr[1];Object(r.useEffect)(function(){Bt.actionTabs.key==="Collaborators-AddCourses"&&(ia(!0),Fn(!0),ra())},[Bt.actionTabs.key]);var ra=function(){var fr=Object(k.a)(p.a.mark(function ar(){var Mn;return p.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,cn({type:"classroomList/getSchoolList",payload:{}});case 2:Mn=pn.sent;case 3:case"end":return pn.stop()}},ar)}));return function(){return fr.apply(this,arguments)}}(),Yn=function(){ia(!1),Fn(!0),wn(!1),or(1),rr([]),yr(!0)},mn=function(ar){ar=String(ar);var Mn=er.indexOf(ar);Mn<0?er.push(ar):er.splice(Mn,1),rr(Object(d.a)(er))},yr=function(){var fr=Object(k.a)(p.a.mark(function ar(){var Mn,Ln,pn,qn,ta,cr=arguments;return p.a.wrap(function(Da){for(;;)switch(Da.prev=Da.next){case 0:if(Mn=cr.length>0&&cr[0]!==void 0?cr[0]:!1,!(bn&&!ln||Mn)){Da.next=11;break}return qn=Sn.getFieldValue(),wn(!0),or(Mn?1:Kn+1),Da.next=7,Object(Gt.zb)({page:Mn?1:Kn+1,container_id:jt.pathId,container_type:3,manager_name:(qn==null?void 0:qn.manager_name)||null,course_name:(qn==null||((Ln=qn.course_name)===null||Ln===void 0)?void 0:Ln.trim())||null});case 7:ta=Da.sent,Un(Mn?Object(d.a)(ta.courses):[].concat(Object(d.a)(Dn),Object(d.a)(ta.courses))),wn(!1),((pn=ta.courses)===null||pn===void 0?void 0:pn.length)<10&&Fn(!1);case 11:case"end":return Da.stop()}},ar)}));return function(){return fr.apply(this,arguments)}}(),oi=function(){var fr=Object(k.a)(p.a.mark(function ar(){var Mn,Ln,pn,qn;return p.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:if(er!=null&&er.length){cr.next=4;break}P.b.warn("\u8BF7\u5148\u5728\u4E0B\u9762\u5217\u8868\u4E2D\u9009\u62E9\u8981\u6DFB\u52A0\u8BFE\u5802"),cr.next=19;break;case 4:if(!(Bt.actionTabs.type!=1)){cr.next=10;break}if(!((Bt==null||((Mn=Bt.Courses)===null||Mn===void 0||((Ln=Mn.spoc_courses)===null||Ln===void 0))?void 0:Ln.length)+(er==null?void 0:er.length)>3)){cr.next=8;break}return P.b.warn("\u4E00\u4E2A\u5B9E\u8DF5\u8BFE\u7A0B\u53EA\u80FD\u52A0\u51653\u4E2Aspoc\u8BFE\u5802"),cr.abrupt("return");case 8:cr.next=13;break;case 10:if(!((Kt==null||((pn=Kt.spoc_courses)===null||pn===void 0)?void 0:pn.length)+(er==null?void 0:er.length)>3)){cr.next=13;break}return P.b.warn("\u4E00\u4E2A\u5B9E\u8DF5\u8BFE\u7A0B\u53EA\u80FD\u52A0\u51653\u4E2A\u5386\u53F2\u8BFE\u5802"),cr.abrupt("return");case 13:return ka(!0),cr.next=16,Object(D.b)({id:jt.pathId,course_ids:er,course_type:Bt.actionTabs.type});case 16:qn=cr.sent,ka(!1),qn&&(P.b.success("\u6DFB\u52A0\u6210\u529F"),Cr(),rn&&rn());case 19:case"end":return cr.stop()}},ar)}));return function(){return fr.apply(this,arguments)}}(),Cr=function(){Sn.setFieldsValue({course_name:"",manager_name:""}),rr([]),cn({type:"pathsDetail/setActionTabs",payload:{}})},Rr=[{title:"",dataIndex:"added",width:40,ellipsis:!0,render:function(ar,Mn){return t.a.createElement(te.a,{value:Mn.id,checked:er.includes(String(Mn.id)),disabled:!!ar})}},{title:"\u8BFE\u5802\u540D\u79F0",dataIndex:"name",width:100,ellipsis:!0,render:function(ar){return t.a.createElement(i.a,{placement:"bottom",title:ar},t.a.createElement("span",null,ar||"--"))}},{title:"\u7BA1\u7406\u8005",width:100,dataIndex:"managers",ellipsis:!0,render:function(ar){return t.a.createElement(i.a,{placement:"bottom",title:ar},t.a.createElement("span",null,ar||"--"))}},{title:"\u8BFE\u5802\u6240\u5728\u5B66\u6821",width:150,dataIndex:"school_name",ellipsis:!0,render:function(ar){return t.a.createElement(i.a,{placement:"bottom",title:ar},t.a.createElement("span",null,ar||"--"))}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",width:140,ellipsis:!0,render:function(ar){return t.a.createElement(i.a,{placement:"bottom",title:ar},t.a.createElement("span",null,ar))}},{title:"\u6210\u5458\u6570\u91CF",dataIndex:"course_members_count",width:80,render:function(ar){return t.a.createElement(i.a,{placement:"bottom",title:ar},t.a.createElement("span",null,ar||"--"))}}];return t.a.createElement(h.a,{title:"\u6DFB\u52A0\u8BFE\u5802",visible:Bt.actionTabs.key==="Collaborators-AddCourses",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",width:1100,centered:!0,keyboard:!1,maskClosable:!1,bodyStyle:{minHeight:200},confirmLoading:vr,onOk:oi,onCancel:Cr},t.a.createElement(ft.a,{layout:"inline",form:Sn,initialValues:{course_name:"",manager_name:""},className:"mt10",onFinish:Yn},t.a.createElement(ft.a.Item,{name:"course_name",label:"\u8BFE\u5802\u540D\u79F0"},t.a.createElement($e.a,{allowClear:!0,style:{width:370},size:"large",placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0"})),t.a.createElement(ft.a.Item,{name:"manager_name",label:"\u8BFE\u5802\u7BA1\u7406\u8005"},t.a.createElement($e.a,{allowClear:!0,style:{width:370},size:"large",placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u7BA1\u7406\u8005\u540D\u79F0"})),t.a.createElement(ft.a.Item,null,t.a.createElement(o.a,{htmlType:"submit",type:"primary",size:"large"},"\u641C\u7D22"))),_r&&t.a.createElement("div",{className:"tc font16 c-light-black mt40"},t.a.createElement("img",{src:gn.x,width:"100",alt:""}),t.a.createElement("br",null),"\u8BF7\u641C\u7D22\u8981\u6DFB\u52A0\u7684\u4EBA\u5458"),!_r&&t.a.createElement("section",null,t.a.createElement("div",{className:"flexd-table-header mt20"},t.a.createElement(vt.a,{pagination:!1,dataSource:[],columns:Rr})),t.a.createElement("div",{style:{maxHeight:260,overflow:"auto"}},t.a.createElement(Mt.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(ar){yr()},hasMore:bn,useWindow:!1},t.a.createElement(vt.a,{loading:ln,showHeader:!1,pagination:!1,dataSource:Dn,columns:Rr,onRow:function(ar){return{onClick:function(Ln){Ln.currentTarget.querySelector("input").disabled||mn(Ln.currentTarget.querySelector("input").value)}}}})))))},kn=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.loading;return{pathsDetail:qe,loading:Bt}})(Kr),Ua=C("2BaD"),Ya=C("1n7x"),Ra=C.n(Ya),Xr=C("y1J/"),Ja=C.n(Xr),Ri=C("A2z3"),ji=C.n(Ri),_e=C("Ye+n"),Be=C.n(_e),Ve=C("MPMw"),gt=C.n(Ve),Xt=function(qe){var Bt=qe.visible,$t=qe.onOk,cn=$t===void 0?function(){}:$t,Kt=qe.onCancel,En=Kt===void 0?function(){}:Kt,rn=qe.data,jt=rn===void 0?{}:rn,hn=Object(r.useRef)();Object(r.useEffect)(function(){return Bt?document.body.setAttribute("class",Be.a.bodyHeight):document.body.removeAttribute("class"),function(){document.body.removeAttribute("class")}},[Bt]);var qt={"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},bn=function(){var Fn=Object(k.a)(p.a.mark(function Yt(){var Cn,ln,wn;return p.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return document.body.scrollIntoView(),Cn={margin:[0,0,0,0],filename:"11.pdf",enableLinks:!1,html2canvas:{scale:5,allowTaint:!1,useCORS:!0},jsPDF:{format:[1412,jt!=null&&jt.is_icpc_first?2500:1e3],orientation:"landscape",unit:"px"},image:{type:"jpeg",quality:1}},ln=Ra()().set(Cn).from(hn.current).toPdf(),Vt.next=5,ln.get("pdf");case 5:return ln=Vt.sent,Vt.next=8,ln.output("bloburl");case 8:wn=Vt.sent,Object(pe.x)("".concat(jt.school_name,"-").concat(jt.user_name,".pdf"),wn);case 10:case"end":return Vt.stop()}},Yt)}));return function(){return Fn.apply(this,arguments)}}();return t.a.createElement(h.a,{visible:Bt,title:null,footer:t.a.createElement("div",null,t.a.createElement(o.a,{type:"primary",onClick:bn},"\u4E0B\u8F7D\u8BC1\u4E66")),style:{background:"transparen",height:"740px"},centered:!0,width:jt!=null&&jt.is_icpc_first?840:1052,className:Be.a.advertisementModal,maskClosable:!1,closeIcon:t.a.createElement(Ua.a,{onClick:En,style:{fontSize:"25px",color:"#fff",marginLeft:"100px"}})},t.a.createElement("div",{ref:hn},jt!=null&&jt.is_icpc_first?t.a.createElement("div",{style:{backgroundImage:"url(".concat(gt.a,")"),height:"1200px",width:"840px",padding:"1px 100px",backgroundSize:"100%",backgroundRepeat:"no-repeat"}},t.a.createElement("div",{style:{color:"#333",fontSize:"36px",marginTop:"465px",width:"100%",marginLeft:"24px"}},jt==null?void 0:jt.user_name),t.a.createElement("div",{style:{color:"#333",fontSize:"16px",marginTop:"223px",width:"100%",marginLeft:100}},jt==null?void 0:jt.passed_date)):t.a.createElement("div",{style:{backgroundImage:"url(".concat(ji.a,")"),height:"740px",width:"1052px",padding:"1px 100px"}},t.a.createElement("div",{style:{color:"#EB5E00",fontSize:"36px",marginTop:"239px",width:"100%",textAlign:"center"}},jt==null?void 0:jt.school_name," ",jt==null?void 0:jt.user_name),t.a.createElement("div",{style:{color:"#0D3580",fontSize:"24px",marginTop:"30px",width:"100%",textAlign:"center"}},"\u4E8E",se()(jt==null?void 0:jt.created_at).format("YYYY\u5E74MM\u6708DD\u65E5"),"\u5B8C\u6210\u4E86EduCoder\u5E73\u53F0\u300A",jt==null?void 0:jt.subject_name,"\u300B\u8BFE\u7A0B\u5B66\u4E60\u3002"),t.a.createElement("div",{style:{color:"#0D3580",fontSize:"30px",marginTop:"50px",width:"100%",textAlign:"center",fontWeight:900}},"\u7279\u6B64\u8BC1\u660E"),t.a.createElement("div",{style:{color:"#0D3580",fontSize:"14px",marginTop:"30px",width:"100%",textAlign:"center"}},"On ",qt[se()(jt==null?void 0:jt.created_at).format("M")]," ",se()(jt==null?void 0:jt.created_at).format("DD"),"\uFF0C",se()(jt==null?void 0:jt.created_at).format("YYYY"),"\uFF0C completed the \u300A",jt==null?void 0:jt.subject_name_en,"\u300B course on EduCoder."),t.a.createElement("img",{src:Ja.a,style:{position:"absolute",left:"820px",bottom:"130px"}}),t.a.createElement("div",{style:{color:"#0D3580",fontSize:"12px",width:"100%",display:"flex",paddingRight:"200px",position:"absolute",bottom:"150px"}},t.a.createElement("span",null,"\u8BC1\u4E66\u7F16\u53F7\uFF1A",jt==null?void 0:jt.code),t.a.createElement("span",{style:{marginLeft:"560px"}},"\u5728\u7EBF\u7F16\u7A0B\u5B66\u9662")))))},sn=Xt,ne=C("YJCA"),H=C("wYyv"),V=C.n(H),ee=Object(ne.b)(function(ut){var qe,Bt,$t,cn,Kt,En,rn,jt,hn,qt=ut.item,bn=ut.toIndex,Fn=ut.params,Yt=ut.isShow,Cn=ut.setShow,ln=ut.dispatch,wn=ut.classroomList,an=ut.handleDeleteMember,Vt=ut.pathsDetail;return t.a.createElement("span",{style:{display:"inline-block",width:"33%",padding:"5px",background:"#fff",marginTop:"10px"}},t.a.createElement("div",{className:Ne.a.directionItemWrap},t.a.createElement(i.a,{color:"#ffffff",placement:"bottom",title:t.a.createElement("div",{className:Ne.a.teamHeight},t.a.createElement("span",{title:qt==null?void 0:qt.name,style:{fontSize:"14px",color:"#333333",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"80px",overflow:"hidden"}},(qt==null||((qe=qt.name)===null||qe===void 0)?void 0:qe.length)>6?(qt==null||((Bt=qt.name)===null||Bt===void 0)?void 0:Bt.substr(0,6))+"...":(qt==null?void 0:qt.name)||"--"),t.a.createElement("span",{style:{marginLeft:"10px",color:"#999999",fontSize:"12px"}},(qt==null||(($t=qt.school)===null||$t===void 0)?void 0:$t.length)>9?(qt==null||((cn=qt.school)===null||cn===void 0)?void 0:cn.substr(0,9))+"...":qt==null?void 0:qt.school),t.a.createElement("div",{style:{height:"1px",width:"100%",border:"1px solid #f5f5f5",marginTop:"3px",marginBottom:"3px"}}),!(qt!=null&&qt.brief_introduction)&&t.a.createElement("div",{style:{textAlign:"center",marginTop:"20px"}},"\u6682\u65E0\u7B80\u4ECB"),(qt==null?void 0:qt.brief_introduction)&&t.a.createElement("div",{className:Ne.a.divHeight},qt==null?void 0:qt.brief_introduction))},t.a.createElement("img",{draggable:!1,className:Ne.a.imgradius,onClick:function(){Object(F.p)()?s.d.push("".concat(qt.user_url)):ln({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}})},src:at.a.API_SERVER+"/images/"+(qt==null?void 0:qt.image_url)}),t.a.createElement("div",null,(qt==null||((Kt=qt.name)===null||Kt===void 0)?void 0:Kt.length)>6?(qt==null||((En=qt.name)===null||En===void 0)?void 0:En.substr(0,6))+"...":(qt==null?void 0:qt.name)||"--",t.a.createElement("br",null),t.a.createElement("span",{style:{color:"#999999"}},(qt==null||((rn=qt.school)===null||rn===void 0)?void 0:rn.length)>6?(qt==null||((jt=qt.school)===null||jt===void 0)?void 0:jt.substr(0,6))+"...":(qt==null?void 0:qt.school)||"--"))),t.a.createElement("br",null),t.a.createElement("span",{className:Ne.a.groupActionWrap},t.a.createElement("i",{style:{display:!((hn=Vt.detail)!==null&&hn!==void 0&&hn.allow_add_member)&&"none"},className:"iconfont icon-shanchu5 mr1 c-red font15 current",onClick:function(Ar){Ar.stopPropagation(),an(qt.id)}}))))}),ge=Object(ne.a)(function(ut){var qe=ut.isShow,Bt=ut.setShow,$t=ut.pathsDetail,cn=ut.items,Kt=ut.params,En=ut.dispatch,rn=ut.classroomList,jt=ut.handleDeleteMember;return t.a.createElement("div",{className:"task-list-container"},cn==null?void 0:cn.map(function(hn,qt){return t.a.createElement(ee,{key:"".concat(hn.id),isShow:qe,setShow:Bt,dispatch:En,pathsDetail:$t,handleDeleteMember:jt,classroomList:rn,toIndex:qt+1,params:Kt,index:qt,item:hn})}))}),ie=function(qe){var Bt=qe.isupdate,$t=qe.setisupdate,cn=qe.data,Kt=qe.classroomList,En=qe.pathsDetail,rn=qe.operation,jt=qe.callback,hn=qe.handleDeleteMember,qt=qe.onCancel,bn=qe.dispatch,Fn=qe.visible,Yt=Fn===void 0?!1:Fn,Cn=Object(r.useState)(cn),ln=Object(E.a)(Cn,2),wn=ln[0],an=ln[1],Vt=Object(c.i)(),Sn=Object(r.useState)(),Ar=Object(E.a)(Sn,2),fn=Ar[0],Dn=Ar[1],Un=Object(r.useState)(!0),Gn=Object(E.a)(Un,2),vn=Gn[0],Kn=Gn[1];function or(er){var rr=er.newIndex,Dr=er.oldIndex;if(!rn)return;an(V()(wn,Dr,rr))}Object(r.useEffect)(function(){Bt&&(gr(wn.map(function(er){return er==null?void 0:er.id})),$t(!1))},[Bt]),Object(r.useEffect)(function(){an(cn)},[JSON.stringify(cn)]);function gr(er){return Lr.apply(this,arguments)}function Lr(){return Lr=Object(k.a)(p.a.mark(function er(rr){var Dr;return p.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,Object(Ft.a)("/api/paths/".concat(Vt==null?void 0:Vt.pathId,"/move_subject_members.json"),{method:"post",body:{user_ids:rr}});case 2:Dr=_r.sent,bn({type:"pathsDetail/getRightData",payload:{id:Vt.pathId}});case 4:case"end":return _r.stop()}},er)})),Lr.apply(this,arguments)}return t.a.createElement("div",{style:{zIndex:9999,width:"100%"},className:"sort-list-panel"},t.a.createElement(ge,{axis:"xy",helperClass:"dragging-li",isShow:vn,setShow:Kn,distance:2,disableAutoscroll:!0,dispatch:bn,pathsDetail:En,handleDeleteMember:hn,classroomList:Kt,params:Vt,items:wn,onSortEnd:or}))},tt=Object(s.a)(function(ut){var qe=ut.classroomList,Bt=ut.pathsDetail;return{classroomList:qe,pathsDetail:Bt}})(ie),Qt=C("lseA"),dn=C.n(Qt),_n=[2,5,8,11,14],Zt=Object(ne.b)(function(ut){var qe,Bt,$t,cn,Kt=ut.item,En=ut.toIndex,rn=ut.params,jt=ut.dispatch,hn=ut.classroomList,qt=ut.handleDeleteMember,bn=ut.pathsDetail;return t.a.createElement("span",{onClick:function(){window.open(Kt==null?void 0:Kt.first_category_url)},style:{display:"inline-block",padding:"10px 20px",width:"100%",background:"#fff",marginTop:"5px"}},t.a.createElement("div",{className:dn.a.directionItemWrap},t.a.createElement("img",{className:dn.a.imgradius,src:at.a.API_SERVER+(Kt==null?void 0:Kt.default_image)}),t.a.createElement("span",{className:dn.a.groupActionWrap},t.a.createElement(i.a,{title:Kt.name},t.a.createElement("span",{style:{fontSize:"18px",color:"#ffffff"}},((qe=Kt.name)===null||qe===void 0?void 0:qe.length)>7?t.a.createElement("span",null,(Bt=Kt.name)===null||Bt===void 0?void 0:Bt.substring(0,7),t.a.createElement("br",null)," ",($t=Kt.name)===null||$t===void 0?void 0:$t.substring(7,14),(Kt==null?void 0:Kt.name.length)>14&&"..."):Kt.name)))),t.a.createElement("div",{className:dn.a.bottomdiv},t.a.createElement(i.a,{title:"\u8BBF\u95EE\u6570\uFF1A".concat(Kt==null?void 0:Kt.visits),placement:"bottom"},t.a.createElement("span",null,t.a.createElement("i",{style:{marginRight:"3px",color:"#bbbbbb"},className:"iconfont icon-chakan ml3 font15 current"}),t.a.createElement("span",{style:{color:"rgba(0, 0, 0, 0.45)"}},Kt==null?void 0:Kt.visits))),t.a.createElement(i.a,{title:"\u8BFE\u5802\u6210\u5458\u6570\uFF1A".concat(Kt==null?void 0:Kt.course_members_count),placement:"bottom"},t.a.createElement("span",null,t.a.createElement("i",{style:{marginRight:"3px",color:"#bbbbbb"},className:"iconfont icon-ren ml3 font15 current"}),t.a.createElement("span",{style:{color:"rgba(0, 0, 0, 0.45)"}}," ",Kt==null?void 0:Kt.course_members_count))),t.a.createElement(i.a,{overlayStyle:{maxWidth:380},title:t.a.createElement("div",{style:{whiteSpace:"nowrap"}},"\u8BFE\u5802\u7684\u4EFB\u52A1\u6570(\u4F5C\u4E1A\u6570\uFF0B\u8BD5\u5377\u6570\uFF0B\u95EE\u5377\u6570)\uFF1A",Kt==null?void 0:Kt.tasks_count),placement:"bottom"},t.a.createElement("span",null,t.a.createElement("i",{style:{marginRight:"3px",color:"#bbbbbb"},className:"iconfont icon-wenjian2 ml3 font15 current"}),t.a.createElement("span",{style:{color:"rgba(0, 0, 0, 0.45)"}}," ",Kt==null?void 0:Kt.tasks_count))),t.a.createElement(i.a,{title:"\u5220\u9664",placement:"bottom"},t.a.createElement("span",null,t.a.createElement("i",{style:{color:"#bbbbbb",display:!(bn!=null&&(cn=bn.detail)!==null&&cn!==void 0&&cn.allow_add_member)&&"none"},className:"iconfont icon-lajitong1 mr3 font15 current",onClick:function(Yt){Yt.stopPropagation(),qt(Kt.id)}})))))}),Vn=Object(ne.a)(function(ut){var qe=ut.items,Bt=ut.params,$t=ut.dispatch,cn=ut.classroomList,Kt=ut.handleDeleteMember,En=ut.pathsDetail;return t.a.createElement("div",{className:"task-list-container"},qe==null?void 0:qe.map(function(rn,jt){return t.a.createElement(Zt,{key:"".concat(rn.id),dispatch:$t,pathsDetail:En,handleDeleteMember:Kt,classroomList:cn,toIndex:jt+1,params:Bt,index:jt,item:rn})}))}),Xn=function(qe){var Bt=qe.data,$t=qe.classroomList,cn=qe.pathsDetail,Kt=qe.callback,En=qe.handleDeleteMember,rn=qe.onCancel,jt=qe.dispatch,hn=qe.visible,qt=hn===void 0?!1:hn,bn=Object(r.useState)(Bt),Fn=Object(E.a)(bn,2),Yt=Fn[0],Cn=Fn[1],ln=Object(c.i)(),wn=Object(r.useState)(),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1];function Ar(Un){var Gn=Un.newIndex,vn=Un.oldIndex;fn(V()(Yt,vn,Gn).map(function(Kn){return Kn==null?void 0:Kn.id})),Cn(V()(Yt,vn,Gn))}Object(r.useEffect)(function(){Cn(Bt)},[JSON.stringify(Bt)]);function fn(Un){return Dn.apply(this,arguments)}function Dn(){return Dn=Object(k.a)(p.a.mark(function Un(Gn){var vn;return p.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.next=2,Object(Ft.a)("/api/paths/".concat(ln==null?void 0:ln.pathId,"/spoc_courses/move_position.json"),{method:"post",body:{ids:Gn}});case 2:vn=or.sent;case 3:case"end":return or.stop()}},Un)})),Dn.apply(this,arguments)}return t.a.createElement("div",{style:{zIndex:9999,width:"100%"},className:"sort-list-panel"},t.a.createElement(Vn,{axis:"y",helperClass:"dragging-li",pathsDetail:cn,distance:2,dispatch:jt,handleDeleteMember:En,classroomList:$t,params:ln,items:Yt,onSortEnd:Ar}))},lr=Object(s.a)(function(ut){var qe=ut.classroomList,Bt=ut.pathsDetail;return{classroomList:qe,pathsDetail:Bt}})(Xn),Or=C("V0Rq"),$r=C("HBuW"),Hr=C("W6us"),ba=C.n(Hr),Ir=C("CnIC"),ga=C.n(Ir),Na=C("LZjx"),hi=C.n(Na),Ha=C("dhSg"),qa=C("cVA7"),xi=C.n(qa),fi=C("h6EL");function ui(ut){var qe=function(En,rn){if(En.localName===rn)return En;for(var jt=0,hn=En;hn=hn.parentNode;jt++){if(hn.localName===rn)return hn;if(hn==document.documentElement)return!1}},Bt=ut.target,$t=qe(Bt,"a");if(console.log([$t],$t==null?void 0:$t.href,44),$t!=null&&$t.href)return;if(Bt.tagName.toUpperCase()==="IMG"){var cn=Bt.src||Bt.getAttribute("src");cn&&cn.indexOf("/images/avatars/User")===-1&&(ut.stopPropagation(),ut.preventDefault(),Ha.a.publish("preview-image",cn))}}var pi=function(qe){var Bt,$t,cn,Kt,En,rn,jt,hn,qt,bn,Fn,Yt,Cn,ln,wn,an,Vt,Sn,Ar,fn,Dn,Un,Gn,vn,Kn,or,gr,Lr,er,rr,Dr,Er,_r,ia,ea,tr,vr,ka,ra,Yn,mn,yr,oi,Cr,Rr,fr,ar,Mn,Ln,pn,qn,ta,cr,Nr,Da,ua,va,ca,Ca,Oa,Ma,Fr,Qa,ya,Ka,di,Ji,Di,Ei,Uo,ho,_o,as,fs,is,os,So,ps,Qi,da,_i,gi,vo,uo,Ki,ss,ls,qo,fo,zo,yo,es,Go,xa,oa,Ci,Zi,Oo,co,No,Wi,Ai,Vo,Pn=qe.pathsDetail,ts=qe.user,lo=qe.globalSetting,Fa=qe.loading,Ni=qe.classroomList,wi=qe.dispatch,Bo=Object(B.a)(qe,["pathsDetail","user","globalSetting","loading","classroomList","dispatch"]),Ti=Object(c.i)(),ko=Object(r.useState)(!0),ns=Object(E.a)(ko,2),ms=ns[0],Xo=ns[1],Ss=Object(r.useState)(!1),ks=Object(E.a)(Ss,2),On=ks[0],nr=ks[1],Wt=Object(r.useState)(),on=Object(E.a)(Wt,2),xn=on[0],Hn=on[1],jn=Object(r.useState)(),pr=Object(E.a)(jn,2),dr=pr[0],Rn=pr[1],zr=Object(r.useState)({}),Si=Object(E.a)(zr,2),ir=Si[0],si=Si[1],ao=Object(r.useState)(),zi=Object(E.a)(ao,2),Wn=zi[0],ja=zi[1],Gi=Object(r.useRef)(),li=Object(r.useState)(!1),io=Object(E.a)(li,2),Yo=io[0],Fo=io[1],jo=Object(r.useState)({}),gs=Object(E.a)(jo,2),ki=gs[0],sl=gs[1],vl=Object(r.useState)(!1),Os=Object(E.a)(vl,2),Fs=Os[0],us=Os[1],ll=Object(r.useState)(!1),ul=Object(E.a)(ll,2),Sl=ul[0],Zs=ul[1],rs=Object(c.h)();Object(r.useEffect)(function(){if(Gi.current)return Gi.current.addEventListener("mousedown",ui),function(){Gi.current.removeEventListener("mousedown",ui)}},[Gi.current]);var cl=function(){var Bn=Object(k.a)(p.a.mark(function xr(){var In;return p.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(dr!=null&&dr.trim()){Jn.next=3;break}return P.b.warn("\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Jn.abrupt("return");case 3:return Jn.next=5,Object(D.V)({id:Ti.pathId,team_title:dr.trim()});case 5:In=Jn.sent,Hn(!xn),(In==null?void 0:In.status)===0&&(Rn(null),P.b.success(In.message),wi({type:"pathsDetail/getRightData",payload:{id:Ti.pathId}}));case 8:case"end":return Jn.stop()}},xr)}));return function(){return Bn.apply(this,arguments)}}();Object(r.useEffect)(function(){wi({type:"pathsDetail/getCoureses",payload:{id:Ti.pathId}}),Qs()},[]);function Qs(){return $s.apply(this,arguments)}function $s(){return $s=Object(k.a)(p.a.mark(function Bn(){return p.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.t0=sl,In.next=3,Object(D.w)({id:Ti.pathId,course_type:1});case 3:In.t1=In.sent,(0,In.t0)(In.t1);case 5:case"end":return In.stop()}},Bn)})),$s.apply(this,arguments)}Object(r.useEffect)(function(){var Bn;if(((Bn=Ni.actionTabs)===null||Bn===void 0?void 0:Bn.key)==="\u4FEE\u6539\u5F00\u8BFE\u65F6\u95F4"){var xr,In,Qr=(xr=Pn.detail)===null||xr===void 0||((In=xr.courses)===null||In===void 0)?void 0:In.find(function(Jn){var na;return Jn.course_id===((na=Ni.actionTabs)===null||na===void 0?void 0:na.name)});si(Qr||{})}},[Ni.actionTabs]),Object(r.useEffect)(function(){var Bn,xr,In;if((Bn=Pn.detail)!==null&&Bn!==void 0&&Bn.has_start){var Qr,Jn,na=(Qr=Pn.detail)===null||Qr===void 0||((Jn=Qr.courses)===null||Jn===void 0)?void 0:Jn.findIndex(function(Io){var Do;return parseInt((Do=Io.course_status)===null||Do===void 0?void 0:Do.status)===1});In=na>-1?na:0}else{var Pr,Aa,vi,Va,Ro,Ho=(Pr=Pn.detail)===null||Pr===void 0||((Aa=Pr.courses)===null||Aa===void 0||((vi=Aa.map(function(Io){var Do;return parseInt((Do=Io.course_status)===null||Do===void 0?void 0:Do.status)}))===null||vi===void 0))?void 0:vi.lastIndexOf(2);In=Ho>-1?Ho:0,Ho=(Va=Pn.detail)===null||Va===void 0||((Ro=Va.courses)===null||Ro===void 0)?void 0:Ro.findIndex(function(Io){var Do;return parseInt((Do=Io.course_status)===null||Do===void 0?void 0:Do.status)===0}),In=Ho>-1?Ho:In}if((xr=Pn.detail)!==null&&xr!==void 0&&xr.courses){var el;si(((el=Pn.detail)===null||el===void 0?void 0:el.courses[In])||{})}},[Pn.detail]);var qs=function(){var Bn=Object(k.a)(p.a.mark(function xr(In){return p.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:h.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6210\u5458\u5417\uFF1F"),onOk:function(){var na=Object(k.a)(p.a.mark(function Aa(){var vi,Va;return p.a.wrap(function(Ho){for(;;)switch(Ho.prev=Ho.next){case 0:return Ho.next=2,Object(D.p)({id:Ti.pathId,user_id:In});case 2:vi=Ho.sent,(vi==null?void 0:vi.status)===1&&(((Va=ts.userInfo)===null||Va===void 0?void 0:Va.user_id)===In&&(window.location.href=window.location.href),P.b.info(vi==null?void 0:vi.message),Rs());case 4:case"end":return Ho.stop()}},Aa)}));function Pr(){return na.apply(this,arguments)}return Pr}()});case 1:case"end":return Jn.stop()}},xr)}));return function(In){return Bn.apply(this,arguments)}}(),yl=function(){var Bn=Object(k.a)(p.a.mark(function xr(In){return p.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:h.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u8BFE\u5802\u5417\uFF1F"),onOk:function(){var na=Object(k.a)(p.a.mark(function Aa(){var vi;return p.a.wrap(function(Ro){for(;;)switch(Ro.prev=Ro.next){case 0:return Ro.next=2,Object(D.o)({id:Ti.pathId,courseid:In});case 2:vi=Ro.sent,(vi==null?void 0:vi.status)===0&&(P.b.info("\u5220\u9664\u6210\u529F"),Rs());case 4:case"end":return Ro.stop()}},Aa)}));function Pr(){return na.apply(this,arguments)}return Pr}()});case 1:case"end":return Jn.stop()}},xr)}));return function(In){return Bn.apply(this,arguments)}}(),Bs=function(){h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u8BA4\u7ACB\u5373\u9884\u7EA6\uFF1F"),onOk:function(){var xr=Object(k.a)(p.a.mark(function Qr(){var Jn;return p.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Object(D.i)({id:Ti.pathId});case 2:Jn=Pr.sent,Jn.status===0&&(ja(!0),P.b.success(Jn.message));case 4:case"end":return Pr.stop()}},Qr)}));function In(){return xr.apply(this,arguments)}return In}()})},Ol=function(){wi({type:"pathsDetail/setActionTabs",payload:{key:"Collaborators-AddCollaborator"}})},vs=function(xr){wi({type:"pathsDetail/setActionTabs",payload:{key:"Collaborators-AddCourses",type:xr}})},Rs=function(){wi({type:"pathsDetail/getPathsDetail",payload:{id:Ti.pathId}}),wi({type:"pathsDetail/getRightData",payload:{id:Ti.pathId}}),wi({type:"pathsDetail/getCoureses",payload:{id:Ti.pathId}}),Qs()},Ks=function(){var xr;return xn?t.a.createElement("div",{className:Fe.a.flexRow},t.a.createElement($e.a,{placeholder:"\u4F8B\u5982\uFF1A\u6559\u5B66\u56E2\u961F",value:dr,onChange:function(Qr){return Rn(Qr.target.value)}}),t.a.createElement(o.a,{className:"ml5",onClick:function(){return Hn(!xn)}},"\u53D6\u6D88"),t.a.createElement(o.a,{className:"ml5",type:"primary",onClick:cl},"\u786E\u5B9A")):t.a.createElement("div",{className:Fe.a.directionItemWrap},t.a.createElement("span",{style:{fontSize:"16px",display:"flex",alignItems:"center"}}," ",t.a.createElement("img",{style:{marginRight:"10px"},src:ga.a})," ",(xr=Pn.rightData)===null||xr===void 0?void 0:xr.team_title),t.a.createElement("span",{className:Fe.a.groupActionWrap},t.a.createElement("i",{className:"iconfont icon-xiugai mr1 c-light-primary font15 current",onClick:function(){return Hn(!xn)}})),!Fs&&t.a.createElement("a",{style:{flex:"1",textAlign:"end"},onClick:function(){us(!0)}},"\u7F16\u8F91"),Fs&&t.a.createElement("div",{style:{flex:"1",textAlign:"end"}},t.a.createElement("a",{onClick:function(){us(!1)}},"\u53D6\u6D88"),t.a.createElement("a",{onClick:function(){Zs(!0),setTimeout(function(){us(!1)},500)},style:{marginLeft:10}},"\u5B8C\u6210")))},Is=function(){var xr,In,Qr=new Image;Qr.src=gn.o;var Jn=((xr=Pn.rightData)===null||xr===void 0||((In=xr.tags)===null||In===void 0)?void 0:In.map(function(Pr,Aa){return{name:Pr.tag_name,value:Aa}}))||[],na={backgroundColor:"#fff",tooltip:{pointFormat:"{series.name}"},series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,gridSize:2,shape:"pentagon",maskImage:Qr,textStyle:{normal:{color:function(){return"rgb("+Math.round(Math.random()*255)+", "+Math.round(Math.random()*255)+", "+Math.round(Math.random()*255)+")"}}},left:"center",top:"center",right:null,bottom:null,width:"100%",height:"100%",data:Jn}]};return na},qr=function(){if(!Object(Le.e)(wi))return;h.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u662F\u5426\u786E\u5B9A\u52A0\u5165\u8BE5\u8BFE\u5802"),onOk:function(){var xr=Object(k.a)(p.a.mark(function Qr(){var Jn,na;return p.a.wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:return Aa.next=2,Object(D.L)({id:ir==null?void 0:ir.course_id});case 2:Jn=Aa.sent,Jn.status===0&&(P.b.success(Jn.message),wi({type:"pathsDetail/getPathsDetail",payload:{id:Ti.pathId}}),parseInt((na=ir.course_status)===null||na===void 0?void 0:na.status)===1&&Object(pe.S)("".concat(ir==null?void 0:ir.first_category_url)));case 4:case"end":return Aa.stop()}},Qr)}));function In(){return xr.apply(this,arguments)}return In}()})},Ur=function(){var Bn=Object(k.a)(p.a.mark(function xr(){var In,Qr,Jn;return p.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:if(Object(Le.e)(wi)){Pr.next=2;break}return Pr.abrupt("return");case 2:return nr(!0),Pr.next=5,Object(Ft.a)("/api/payments.json",{method:"POST",body:{subject_id:Ti.pathId,payment_method:"wechat_qr"}});case 5:In=Pr.sent,In!=null&&In.num&&(nr(!1),s.d.push(rs!=null&&(Qr=rs.query)!==null&&Qr!==void 0&&Qr.userid?"/order/".concat(Ti.pathId,"/pay?order_num=").concat(In==null?void 0:In.num,"&userid=").concat(rs==null||((Jn=rs.query)===null||Jn===void 0)?void 0:Jn.userid):"/order/".concat(Ti.pathId,"/pay?order_num=").concat(In==null?void 0:In.num)));case 7:case"end":return Pr.stop()}},xr)}));return function(){return Bn.apply(this,arguments)}}(),Wa=function(){var Bn=Object(k.a)(p.a.mark(function xr(In,Qr){var Jn;return p.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:if(wi({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!Qr){Pr.next=7;break}return Pr.next=4,Object($r.D)({id:In});case 4:Pr.t0=Pr.sent,Pr.next=10;break;case 7:return Pr.next=9,Object($r.E)({id:In});case 9:Pr.t0=Pr.sent;case 10:if(Jn=Pr.t0,wi({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(Jn!=null&&Jn.game_identifier||Jn!=null&&Jn.identifier)){Pr.next=15;break}return Object(pe.S)(Qr?"/tasks/".concat(Jn==null?void 0:Jn.identifier,"/jupyter"):"/tasks/".concat(Jn.game_identifier)),Pr.abrupt("return");case 15:(Jn==null?void 0:Jn.status)===2?fa(Jn==null?void 0:Jn.message):(Jn==null?void 0:Jn.status)===3&&jr(Jn==null?void 0:Jn.message);case 16:case"end":return Pr.stop()}},xr)}));return function(In,Qr){return Bn.apply(this,arguments)}}(),jr=function(xr){h.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",xr,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},fa=function Bn(xr){var In;xr=(In=xr)!==null&&In!==void 0&&In.includes(".json")?xr:"".concat(xr,".json"),h.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Qr=Object(k.a)(p.a.mark(function na(){var Pr,Aa;return p.a.wrap(function(Va){for(;;)switch(Va.prev=Va.next){case 0:return Va.next=2,Object(Or.T)({url:xr});case 2:if(Pr=Va.sent,Pr){Va.next=5;break}return Va.abrupt("return");case 5:return P.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Va.next=8,Object($r.E)({id:Pr.shixun_identifier});case 8:if(Aa=Va.sent,!(Aa!=null&&Aa.game_identifier)){Va.next=12;break}return Object(pe.S)("/tasks/".concat(Aa.game_identifier)),Va.abrupt("return");case 12:(Aa==null?void 0:Aa.status)===2?Bn(Aa==null?void 0:Aa.message):(Aa==null?void 0:Aa.status)===3&&jr(Aa==null?void 0:Aa.message);case 13:case"end":return Va.stop()}},na)}));function Jn(){return Qr.apply(this,arguments)}return Jn}()})},pa=function(){var xr;if(!Object(Le.e)(wi))return;var In=[];Pn==null||((xr=Pn.stageData)===null||xr===void 0)||xr.forEach(function(Jn){var na;if(Jn.items&&(na=Jn.items)!==null&&na!==void 0&&na.length){var Pr;(Pr=Jn.items)===null||Pr===void 0||Pr.forEach(function(Aa){var vi;In.push(Aa),Aa.children&&(vi=Aa.children)!==null&&vi!==void 0&&vi.length&&(In=In.concat(Aa.children))})}});var Qr=In.find(function(Jn){return["VideoItem","Attachment","Shixun"].includes(Jn.item_type)});if(console.log(Qr,"stageParam"),Qr.item_type==="VideoItem"){Object(pe.S)("/video/".concat(Qr.id,"?subject_id=").concat(Ti.pathId));return}if(Qr.item_type==="Attachment"){Object(pe.S)(Qr.url);return}if(Qr.item_type==="Shixun"){Wa(Qr.identifier,Qr.is_jupyter);return}},La=function(){var xr,In,Qr,Jn,na=(xr=Pn.detail)===null||xr===void 0||((In=xr.learning_status)===null||In===void 0)?void 0:In[0],Pr=(Qr=Pn.detail)===null||Qr===void 0||((Jn=Qr.learning_status)===null||Jn===void 0)?void 0:Jn[1];if(na==="can")return t.a.createElement(o.a,{onClick:pa,type:"primary"},"\u5F00\u59CB\u5B66\u4E60");if(na==="disabled"){if(Pr==="try"||Pr==="unpayed")return t.a.createElement(o.a,{loading:On,onClick:Ur,type:"primary"},"\u7ACB\u5373\u8D2D\u4E70");if(Pr==="expired")return t.a.createElement(o.a,{disabled:!0,type:"primary"},"\u5DF2\u8FC7\u671F");if(Pr==="buyed")return t.a.createElement(o.a,{disabled:!0,type:"primary"},"\u672A\u5F00\u59CB")}},Ba=function(){var Bn=Object(k.a)(p.a.mark(function xr(){var In,Qr,Jn,na,Pr,Aa,vi,Va,Ro,Ho,el,Io;return p.a.wrap(function(cs){for(;;)switch(cs.prev=cs.next){case 0:if(Ho=function(){var dl=Object(k.a)(p.a.mark(function Ds(){var Bl;return p.a.wrap(function(bs){for(;;)switch(bs.prev=bs.next){case 0:return bs.next=2,Object(Ft.a)("/api/users/".concat(ts.userInfo.login,"/subjects/request_certificate.json?subject_id=").concat(Ti.pathId),{method:"post"});case 2:Bl=bs.sent,(Bl==null?void 0:Bl.status)===0&&(P.b.info("\u63D0\u4EA4\u6210\u529F"),wi({type:"pathsDetail/getRightData",payload:{id:Ti.pathId}}));case 4:case"end":return bs.stop()}},Ds)}));return function(){return dl.apply(this,arguments)}}(),(In=ts.userInfo)!==null&&In!==void 0&&In.professional_certification){cs.next=4;break}return h.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(pe.S)("/account/certification")}}),cs.abrupt("return",!1);case 4:if(!(((Qr=Pn.rightData)===null||Qr===void 0||((Jn=Qr.progress)===null||Jn===void 0)?void 0:Jn.certificated)==="drafted")){cs.next=6;break}return cs.abrupt("return",!1);case 6:if(!(((na=Pn.rightData)===null||na===void 0||((Pr=na.progress)===null||Pr===void 0)?void 0:Pr.certificated)==="none"||((Aa=Pn.rightData)===null||Aa===void 0||((vi=Aa.progress)===null||vi===void 0)?void 0:vi.certificated)==="rejected")){cs.next=9;break}return((el=Pn.rightData)===null||el===void 0?void 0:el.progress.learned)===100?h.a.info({title:"\u7533\u8BF7\u8BC1\u4E66",icon:null,className:"custom-modal-divider",centered:!0,width:400,content:'\u7533\u8BF7\u6210\u529F\uFF0C\u53EF\u4EE5\u5728\u4E2A\u4EBA\u4E2D\u5FC3"\u6211\u7684\u8BC1\u4E66"\u4E2D\u67E5\u770B',okText:"\u786E\u5B9A\u7533\u8BF7",onOk:Ho}):h.a.confirm({title:"\u7533\u8BF7\u8BC1\u4E66",icon:null,className:"custom-modal-divider",centered:!0,width:400,content:"\u4F60\u76EE\u524D\u5B66\u4E60\u8FDB\u5EA6\u4E3A".concat((Io=Pn.rightData)===null||Io===void 0?void 0:Io.progress.learned,"%\uFF0C\u5EFA\u8BAE\u7533\u8BF7\u540E\u7EE7\u7EED\u8FDB\u884C\u8BFE\u7A0B\u5B66\u4E60"),okText:"\u786E\u5B9A\u7533\u8BF7",onOk:Ho}),cs.abrupt("return",!1);case 9:((Va=Pn.rightData)===null||Va===void 0||((Ro=Va.progress)===null||Ro===void 0)?void 0:Ro.certificated)==="passed"&&Fo(!0);case 10:case"end":return cs.stop()}},xr)}));return function(){return Bn.apply(this,arguments)}}(),Vi=!!((Bt=Pn.detail)!==null&&Bt!==void 0&&Bt.participant_count)&&!(($t=Pn.detail)!==null&&$t!==void 0&&$t.allow_statistics),$a=((cn=Pn.detail)===null||cn===void 0||((Kt=cn.courses)===null||Kt===void 0)?void 0:Kt.findIndex(function(Bn){return(Bn==null?void 0:Bn.course_id)===(ir==null?void 0:ir.course_id)}))+1,ys=$a===((En=Pn.detail)===null||En===void 0||((rn=En.courses)===null||rn===void 0)?void 0:rn.length);return t.a.createElement("section",{className:Fe.a.rightWrap},((jt=Pn.rightData)===null||jt===void 0?void 0:jt.qrcode_img)&&t.a.createElement("div",{className:Fe.a.qrCode},t.a.createElement("img",{src:(hn=Pn.rightData)===null||hn===void 0?void 0:hn.qrcode_img})),((qt=Pn.rightData)===null||qt===void 0?void 0:qt.progress)&&t.a.createElement("div",{className:"".concat(Fe.a.card," ").concat(Fe.a.cardTop),style:{top:(bn=Pn.detail)!==null&&bn!==void 0&&(Fn=bn.courses)!==null&&Fn!==void 0&&Fn.length?"-140px":"-70px"}},parseInt(ir==null||((Yt=ir.course_status)===null||Yt===void 0)?void 0:Yt.status)===2&&ir.course_identity<6&&t.a.createElement("div",{className:"current mr20 c-grey-9b9 font14"},"\u5DF2\u7ED3\u675F"),parseInt((Cn=ir.course_status)===null||Cn===void 0?void 0:Cn.status)===2&&(ir.course_identity<6?"":t.a.createElement("div",{className:"current mr20 c-grey-9b9 font14"},"\u5DF2\u7ED3\u675F")),t.a.createElement("div",{className:Fe.a.flexRow},Vi&&!!((ln=Pn.detail)!==null&&ln!==void 0&&(wn=ln.courses)!==null&&wn!==void 0&&wn.length)&&ys&&t.a.createElement("span",{className:"mt20"},t.a.createElement("span",{className:"mr10"},"\u5F53\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\u8FBE\u5230 ",(an=Pn.detail)===null||an===void 0?void 0:an.student_count," \u4EBA\u65F6\u5373\u5C06\u5F00\u8BFE"),t.a.createElement("p",{className:""},"\u5F53\u524D\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\uFF1A",t.a.createElement("span",{className:"mr5 c-red-ee4"},Wn===!0?((Vt=Pn.detail)===null||Vt===void 0?void 0:Vt.participant_count)+1:(Sn=Pn.detail)===null||Sn===void 0?void 0:Sn.participant_count),"\u4EBA")),Vi&&!((Ar=Pn.detail)!==null&&Ar!==void 0&&(fn=Ar.courses)!==null&&fn!==void 0&&fn.length)&&ys&&t.a.createElement("span",null,!((Dn=Pn.detail)!==null&&Dn!==void 0&&Dn.has_participate)&&(Wn===!0?t.a.createElement("span",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"):t.a.createElement("a",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bg28e),onClick:Bs},"\u671F\u5F85\u5F00\u8BFE\u5E76\u9884\u7EA6\u62A5\u540D")),((Un=Pn.detail)===null||Un===void 0?void 0:Un.has_participate)&&t.a.createElement("span",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"),t.a.createElement("span",{className:"mr10"},"\u5F53\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\u8FBE\u5230 ",(Gn=Pn.detail)===null||Gn===void 0?void 0:Gn.student_count," \u4EBA\u65F6\u5373\u5C06\u5F00\u8BFE"),t.a.createElement("p",{className:""},"\u5F53\u524D\u9884\u7EA6\u62A5\u540D\u4EBA\u6570\uFF1A",t.a.createElement("span",{className:"mr5 c-red-ee4"},Wn===!0?((vn=Pn.detail)===null||vn===void 0?void 0:vn.participant_count)+1:(Kn=Pn.detail)===null||Kn===void 0?void 0:Kn.participant_count),"\u4EBA"))),parseInt(ir==null||((or=ir.course_status)===null||or===void 0)?void 0:or.status)===1&&t.a.createElement("div",{className:"mr20 c-red-ee4"},ir==null||((gr=ir.course_status)===null||gr===void 0)?void 0:gr.time),t.a.createElement("p",{style:{display:ir.course_identity<6?"":"none"},className:"mb10 mt10 ".concat(Fe.a.flexRowAbout)},t.a.createElement("span",{style:{display:((Lr=ir.course_status)===null||Lr===void 0?void 0:Lr.status)<=1?"":"none"},className:"c-light-green font14"},"\u5DF2\u5B66",(er=Pn.rightData)===null||er===void 0?void 0:er.progress.learned,"%"),t.a.createElement("span",{style:{display:((rr=ir.course_status)===null||rr===void 0?void 0:rr.status)<=1?"":"none"},className:"c-light-black"},"\u5B66\u4E60\u8017\u65F6",Object(pe.bb)((Dr=Pn.rightData)===null||Dr===void 0?void 0:Dr.progress.time)," "),((Er=Pn.rightData)===null||Er===void 0||((_r=Er.progress)===null||_r===void 0)?void 0:_r.certificated)!="disabled"&&t.a.createElement(o.a,{disabled:((ia=Pn.rightData)===null||ia===void 0||((ea=ia.progress)===null||ea===void 0)?void 0:ea.certificated)==="drafted",onClick:Ba},((tr=Pn.rightData)===null||tr===void 0||((vr=tr.progress)===null||vr===void 0)?void 0:vr.certificated)==="none"&&"\u7533\u8BF7\u8BC1\u4E66",((ka=Pn.rightData)===null||ka===void 0||((ra=ka.progress)===null||ra===void 0)?void 0:ra.certificated)==="rejected"&&"\u7533\u8BF7\u8BC1\u4E66",((Yn=Pn.rightData)===null||Yn===void 0||((mn=Yn.progress)===null||mn===void 0)?void 0:mn.certificated)==="drafted"&&"\u5BA1\u6838\u4E2D",((yr=Pn.rightData)===null||yr===void 0||((oi=yr.progress)===null||oi===void 0)?void 0:oi.certificated)==="passed"&&"\u67E5\u770B\u8BC1\u4E66")),t.a.createElement(i.a,{placement:"bottom",title:"\u5B8C\u6210\u8BFE\u7A0B\u540E\u53EF\u83B7\u53D6\u8BC1\u4E66\uFF01",color:"yellow"}," ",t.a.createElement(pt.a,{percent:(Cr=Pn.rightData)===null||Cr===void 0?void 0:Cr.progress.learned,showInfo:!1,style:{display:((Rr=ir.course_status)===null||Rr===void 0?void 0:Rr.status)<=1&&ir.course_identity<6?"":"none"},status:"active",strokeColor:{"0%":"#29BD8B","100%":"#29BD8B"}})),parseInt((fr=ir.course_status)===null||fr===void 0?void 0:fr.status)===2&&((ar=Pn.detail)===null||ar===void 0?void 0:ar.allow_add_member)&&t.a.createElement("a",{className:Fe.a.classButton,href:"".concat(ir==null?void 0:ir.first_category_url),target:"_blank"},"\u8FDB\u5165\u8BFE\u5802"),parseInt((Mn=ir.course_status)===null||Mn===void 0?void 0:Mn.status)===1&&ir.course_identity>5&&t.a.createElement("div",{className:Fe.a.classButton,onClick:qr},"\u7ACB\u5373\u52A0\u5165"),parseInt((Ln=ir.course_status)===null||Ln===void 0?void 0:Ln.status)===1&&ir.course_identity===5&&t.a.createElement("a",{className:Fe.a.classButton,href:"".concat(ir==null?void 0:ir.first_category_url),target:"_blank"},"\u7ACB\u5373\u5B66\u4E60"),parseInt((pn=ir.course_status)===null||pn===void 0?void 0:pn.status)===0&&ir.course_identity>5&&t.a.createElement("div",{className:Fe.a.classButton,onClick:qr},"\u7ACB\u5373\u62A5\u540D"),parseInt((qn=ir.course_status)===null||qn===void 0?void 0:qn.status)===0&&ir.course_identity===5&&t.a.createElement("div",{className:Fe.a.classButton},"\u62A5\u540D\u6210\u529F"),(parseInt(ir==null||((ta=ir.course_status)===null||ta===void 0)?void 0:ta.status)===0||parseInt(ir==null||((cr=ir.course_status)===null||cr===void 0)?void 0:cr.status)===1)&&ir.course_identity<5&&t.a.createElement("a",{className:Fe.a.classButton,href:"".concat(ir==null?void 0:ir.first_category_url),target:"_blank"},"\u8FDB\u5165\u8BFE\u5802"),Vi&&ys&&((Nr=Pn.detail)===null||Nr===void 0?void 0:Nr.has_participate)&&t.a.createElement("span",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"),Vi&&ys&&!((Da=Pn.detail)!==null&&Da!==void 0&&Da.has_participate)&&(Wn?t.a.createElement("span",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bgGray)},"\u9884\u7EA6\u62A5\u540D\u6210\u529F"):t.a.createElement("span",{className:"".concat(Fe.a.classButton," ").concat(Fe.a.bg28e),onClick:Bs},"\u671F\u5F85\u5F00\u8BFE\u5E76\u9884\u7EA6\u62A5\u540D")),!((ua=Pn.detail)!==null&&ua!==void 0&&ua.excellent)&&((va=Pn.detail)===null||va===void 0?void 0:va.is_free)!==!0&&t.a.createElement("div",{className:Fe.a.price},t.a.createElement("ul",null,t.a.createElement("li",{className:Fe.a.li1},!!((ca=Pn.detail)!==null&&ca!==void 0&&ca.origin_price)&&t.a.createElement("div",{className:Fe.a.discounts},"\u9650\u65F6\u4F18\u60E0"),t.a.createElement("div",{className:Fe.a.realPrice},t.a.createElement("span",null,"\uFFE5"),(Ca=Pn.detail)===null||Ca===void 0?void 0:Ca.price),!!((Oa=Pn.detail)!==null&&Oa!==void 0&&Oa.origin_price)&&t.a.createElement("div",{className:Fe.a.lineationPrice},t.a.createElement("span",null,"\uFFE5"),(Ma=Pn.detail)===null||Ma===void 0?void 0:Ma.origin_price)),t.a.createElement("li",{className:Fe.a.li2},"\u8BFE\u7A0B\u6709\u6548\u671F\uFF1A",((Fr=Pn.detail)===null||Fr===void 0||((Qa=Fr.expiration_type)===null||Qa===void 0)?void 0:Qa.clazz)==="1"&&"\u6C38\u4E45\u6709\u6548",((ya=Pn.detail)===null||ya===void 0||((Ka=ya.expiration_type)===null||Ka===void 0)?void 0:Ka.clazz)==="2"&&"\u8D2D\u4E70\u540E".concat((di=Pn.detail)===null||di===void 0||((Ji=di.expiration_type)===null||Ji===void 0||((Di=Ji.days)===null||Di===void 0))?void 0:Di[0],"\u5929\u5185\u6709\u6548"),((Ei=Pn.detail)===null||Ei===void 0||((Uo=Ei.expiration_type)===null||Uo===void 0)?void 0:Uo.clazz)==="3"&&"".concat((ho=Pn.detail)===null||ho===void 0||((_o=ho.expiration_type)===null||_o===void 0||((as=_o.days)===null||as===void 0))?void 0:as.join("\u5230")))),La()),t.a.createElement("p",{className:"mb30",style:{marginTop:"15px"}},t.a.createElement("span",{className:"font16",style:{display:"flex",alignItems:"center"}},t.a.createElement("img",{style:{marginRight:"10px"},src:ba.a})," ",(fs=Pn.detail)===null||fs===void 0?void 0:fs.learning_notes_title)),t.a.createElement("div",{ref:Gi},t.a.createElement(St.a,{className:"fon16",value:(is=Pn.detail)===null||is===void 0?void 0:is.learning_notes}))),!!((os=Pn.rightData)!==null&&os!==void 0&&(So=os.members)!==null&&So!==void 0&&So.length)&&t.a.createElement("div",{className:"".concat(Fe.a.card," pb0"),style:{marginTop:(ps=Pn.detail)!==null&&ps!==void 0&&(Qi=ps.courses)!==null&&Qi!==void 0&&Qi.length?-135:-65}},(da=Pn.detail)!==null&&da!==void 0&&da.allow_add_member?Ks():t.a.createElement("span",{style:{fontSize:"16px",display:"flex",alignItems:"center"}}," ",t.a.createElement("img",{style:{marginRight:"10px"},src:ga.a})," ",(_i=Pn.rightData)===null||_i===void 0?void 0:_i.team_title),Fs&&t.a.createElement(tt,{setisupdate:Zs,isupdate:Sl,data:(gi=Pn.rightData)===null||gi===void 0?void 0:gi.members,operation:(vo=Pn.detail)===null||vo===void 0?void 0:vo.allow_add_member,handleDeleteMember:qs}),!Fs&&t.a.createElement("div",{style:{width:"100%"}},(uo=Pn.rightData)===null||uo===void 0||((Ki=uo.members)===null||Ki===void 0)?void 0:Ki.map(function(Bn){var xr,In,Qr,Jn,na,Pr,Aa,vi;return t.a.createElement("div",{style:{display:"inline-block",width:"33%",padding:"5px",background:"#fff",marginTop:"10px"}},t.a.createElement("div",{className:Ne.a.directionItemWrap},t.a.createElement(i.a,{color:"#ffffff",placement:"bottom",title:t.a.createElement("div",{className:Ne.a.teamHeight},t.a.createElement("span",{title:Bn==null?void 0:Bn.name,style:{fontSize:"14px",color:"#333333",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"80px",overflow:"hidden"}},(Bn==null||((xr=Bn.name)===null||xr===void 0)?void 0:xr.length)>6?(Bn==null||((In=Bn.name)===null||In===void 0)?void 0:In.substr(0,6))+"...":(Bn==null?void 0:Bn.name)||"--"),t.a.createElement("span",{style:{marginLeft:"10px",color:"#999999",fontSize:"12px"}},(Bn==null||((Qr=Bn.school)===null||Qr===void 0)?void 0:Qr.length)>9?(Bn==null||((Jn=Bn.school)===null||Jn===void 0)?void 0:Jn.substr(0,9))+"...":Bn==null?void 0:Bn.school),t.a.createElement("div",{style:{height:"1px",width:"100%",border:"1px solid #f5f5f5",marginTop:"3px",marginBottom:"3px"}}),!(Bn!=null&&Bn.brief_introduction)&&t.a.createElement("div",{style:{textAlign:"center",marginTop:"20px"}},"\u6682\u65E0\u7B80\u4ECB"),(Bn==null?void 0:Bn.brief_introduction)&&t.a.createElement("div",{className:Ne.a.divHeight},Bn==null?void 0:Bn.brief_introduction))},t.a.createElement("img",{draggable:!1,className:Ne.a.imgradius,onClick:function(){},src:at.a.API_SERVER+"/images/"+(Bn==null?void 0:Bn.image_url)}),t.a.createElement("div",null,(Bn==null||((na=Bn.name)===null||na===void 0)?void 0:na.length)>6?(Bn==null||((Pr=Bn.name)===null||Pr===void 0)?void 0:Pr.substr(0,6))+"...":(Bn==null?void 0:Bn.name)||"--",t.a.createElement("br",null),t.a.createElement("span",{style:{color:"#999999"}},(Bn==null||((Aa=Bn.school)===null||Aa===void 0)?void 0:Aa.length)>6?(Bn==null||((vi=Bn.school)===null||vi===void 0)?void 0:vi.substr(0,6))+"...":(Bn==null?void 0:Bn.school)||"--"))),t.a.createElement("br",null)))})),((ss=Pn.detail)===null||ss===void 0?void 0:ss.allow_add_member)&&t.a.createElement(he.a,{gutter:[0,40],justify:"center",align:"middle",className:"bg-white mt0"},t.a.createElement(ae.a,{className:"c-blue current",onClick:Ol},"+ \u6DFB\u52A0\u5408\u4F5C\u8005"))),!!((ls=Pn.rightData)!==null&&ls!==void 0&&(qo=ls.tags)!==null&&qo!==void 0&&qo.length)&&((fo=Pn.detail)===null||fo===void 0?void 0:fo.show_tag)&&t.a.createElement("div",{className:Fe.a.skillWrap},t.a.createElement("p",{className:"".concat(Fe.a.skillTopWrap," font16 mb20")},t.a.createElement("span",null,"\u6280\u80FD\u6807\u7B7E",t.a.createElement("span",{className:"ml5 c-grey-c"},(zo=Pn.rightData)===null||zo===void 0||((yo=zo.tags)===null||yo===void 0)?void 0:yo.length))),t.a.createElement(xi.a,{option:Is(),style:{height:370},opts:{renderer:"svg"}})),((es=Pn.detail)===null||es===void 0?void 0:es.show_spoc)===1&&t.a.createElement("div",{className:"".concat(Fe.a.card," pb0"),style:{marginTop:15}},t.a.createElement("p",{className:"font16",style:{display:"flex",alignItems:"center"}},t.a.createElement("img",{style:{marginRight:"10px"},src:hi.a}),"SPOC\u8BFE\u5802"),t.a.createElement(lr,{data:(Go=Pn.Courses)===null||Go===void 0?void 0:Go.spoc_courses,handleDeleteMember:yl}),((xa=Pn.detail)===null||xa===void 0?void 0:xa.show_spoc)===1&&(Pn==null||((oa=Pn.Courses)===null||oa===void 0||((Ci=oa.spoc_courses)===null||Ci===void 0))?void 0:Ci.length)<3&&((Zi=Pn.detail)===null||Zi===void 0?void 0:Zi.allow_add_member)&&t.a.createElement(he.a,{gutter:[0,40],justify:"center",align:"middle",className:"bg-white mt0"},t.a.createElement(ae.a,{className:"c-blue current",onClick:function(){return vs()}},"+ \u6DFB\u52A0\u8BFE\u5802"))),((Oo=Pn.detail)===null||Oo===void 0?void 0:Oo.show_history)&&t.a.createElement("div",{className:"".concat(Fe.a.card," pb0"),style:{marginTop:15}},t.a.createElement("p",{className:"font16",style:{display:"flex",alignItems:"center"}},t.a.createElement("img",{style:{marginRight:"10px"},src:hi.a}),"\u5386\u53F2\u8BFE\u5802"),t.a.createElement(lr,{data:ki==null?void 0:ki.spoc_courses,handleDeleteMember:yl}),((co=Pn.detail)===null||co===void 0?void 0:co.show_history)&&(ki==null||((No=ki.spoc_courses)===null||No===void 0)?void 0:No.length)<3&&((Wi=Pn.detail)===null||Wi===void 0?void 0:Wi.allow_add_member)&&t.a.createElement(he.a,{gutter:[0,40],justify:"center",align:"middle",className:"bg-white mt0"},t.a.createElement(ae.a,{className:"c-blue current",onClick:function(){return vs(1)}},"+ \u6DFB\u52A0\u8BFE\u5802"))),t.a.createElement(Vr,{onReloadData:Rs}),t.a.createElement(kn,{onReloadData:Rs,data:ki}),t.a.createElement(sn,{visible:Yo,onCancel:function(){Fo(!1)},data:((Ai=Pn.rightData)===null||Ai===void 0||((Vo=Ai.progress)===null||Vo===void 0)?void 0:Vo.info)||{}}))},bi=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.user,$t=ut.loading,cn=ut.globalSetting,Kt=ut.classroomList;return{pathsDetail:qe,user:Bt,globalSetting:cn,loading:$t.models.index,classroomList:Kt}})(pi),ai=C("cWXX"),Hi=C("/ezw"),Yi=C("VlDO"),Zr=C.n(Yi),sa=C("bbsP"),Mr=C("/wGt"),la=C("DjyN"),Yr=C("NUBc"),ri=C("/zsF"),ha=C("PArb"),mo=C("vkP9"),Ii=C("cCSd"),ci=C.n(Ii),Wo=$e.a.Search,Lo=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],ii=function(qe){var Bt,$t=qe.classroomList,cn=qe.loading,Kt=qe.dispatch,En=qe.cb,rn=qe.shixunIds,jt=rn===void 0?[]:rn,hn=Object(c.i)(),qt=Object(c.h)(),bn=$t.actionTabs,Fn=ft.a.useForm(),Yt=Object(E.a)(Fn,1),Cn=Yt[0],ln=$t.shixunLists,wn=Object(r.useState)([]),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1],Ar=Object(r.useState)({page:1,type:"all",diff:0,status:"all",order:"desc",limit:20,sort:"myshixuns_count"}),fn=Object(E.a)(Ar,2),Dn=fn[0],Un=fn[1];Object(r.useEffect)(function(){$t.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"&&(Dn.page=1,Kt({type:"classroomList/getShixunLists",payload:Object(I.a)({},Dn)}))},[$t.actionTabs.key]),Object(r.useEffect)(function(){return $t.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?document.body.setAttribute("data-custom","height"):document.body.removeAttribute("data-custom"),function(){document.body.removeAttribute("data-custom")}},[$t.actionTabs.key]);var Gn=function(){Kt({type:"classroomList/setActionTabs",payload:{}}),Un({page:1,type:"all",diff:0,status:"all",order:"desc",limit:20,sort:"myshixuns_count"})};return $t.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:t.a.createElement(Mr.a,{placement:"bottom",height:"100%",closable:!1,visible:$t.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",className:ci.a.drawer,footer:t.a.createElement("div",{className:"tc"},t.a.createElement(o.a,{size:"large",onClick:function(){Gn(),Sn([]),En("\u53D6\u6D88")},style:{marginRight:8}},"\u53D6\u6D88"),t.a.createElement(o.a,{size:"large",onClick:Object(k.a)(p.a.mark(function vn(){var Kn,or,gr,Lr;return p.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:Kn=function(Er){var _r=Vt[Er];if(jt.includes(_r)){var ia,ea;return P.b.info("\u8BF7\u52FF\u91CD\u590D\u9009\u62E9\uFF1A".concat(ln==null||((ia=ln.shixun_list)===null||ia===void 0||((ea=ia.find(function(tr){return tr.id===_r}))===null||ea===void 0))?void 0:ea.title)),{v:void 0}}},or=0;case 2:if(!(or<(Vt==null?void 0:Vt.length))){rr.next=9;break}if(gr=Kn(or),!(typeof gr=="object")){rr.next=6;break}return rr.abrupt("return",gr.v);case 6:or++,rr.next=2;break;case 9:return rr.next=11,Object(D.O)({id:$t.actionTabs.id,subject_id:$t.actionTabs.subject_id,shixun_ids:Object(d.a)(Vt)});case 11:Lr=rr.sent,Sn([]),Lr!=null&&Lr.shixuns_list&&(Gn(),En(Lr.shixuns_list));case 14:case"end":return rr.stop()}},vn)})),type:"primary"},"\u786E\u5B9A"))},t.a.createElement("section",{className:"tc"},t.a.createElement(mo.a,{onChange:function(Kn){Un(Object(I.a)(Object(I.a)(Object(I.a)({},Dn),Kn),{},{page:1})),Kt({type:"classroomList/getShixunLists",payload:Object(I.a)(Object(I.a)(Object(I.a)({},Dn),Kn),{},{page:1})})}})),t.a.createElement("section",{className:"edu-container"},Lo.map(function(vn,Kn){var or;return t.a.createElement("ul",{className:ci.a.menu,key:Kn},t.a.createElement("li",null,vn.name),vn==null||((or=vn.children)===null||or===void 0)?void 0:or.map(function(gr,Lr){return t.a.createElement("li",{className:Dn[vn.id]==gr.id?ci.a.actived:"",onClick:function(){Dn[vn.id]=gr.id,Un(Object(I.a)({},Dn)),Kt({type:"classroomList/getShixunLists",payload:Object(I.a)({},Dn)})}},t.a.createElement("strong",null,gr.name))}))}),ln==null||((Bt=ln.shixun_list)===null||Bt===void 0)?void 0:Bt.map(function(vn,Kn){return t.a.createElement("div",{className:ci.a.listItem,key:Kn},t.a.createElement(te.a,{checked:Vt.includes(vn.id),value:vn.id,onChange:function(gr){var Lr=Vt.indexOf(vn.id);Vt.indexOf(vn.id)>-1?Sn(Vt.filter(function(er){return er!==vn.id})):Sn(Vt.concat(vn.id))}}),t.a.createElement("div",{className:ci.a.info},t.a.createElement("div",{className:ci.a.title},t.a.createElement("div",{className:ci.a.titleLeft},t.a.createElement("a",{className:"c-black",href:"/shixuns/".concat(vn==null?void 0:vn.identifier,"/challenges"),target:"_blank"},t.a.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:vn.title}})),Object(F.v)()&&(vn==null?void 0:vn.mark_status)===1&&t.a.createElement(i.a,{title:vn==null?void 0:vn.mark_content},t.a.createElement("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10"},"\u6B63\u5E38")),Object(F.v)()&&(vn==null?void 0:vn.mark_status)===2&&t.a.createElement(i.a,{title:vn==null?void 0:vn.mark_content},t.a.createElement("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10"},"\u9700\u5B8C\u5584")),Object(F.v)()&&(vn==null?void 0:vn.mark_status)===3&&t.a.createElement(i.a,{title:vn==null?void 0:vn.mark_content},t.a.createElement("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10"},"\u65E0\u6CD5\u4F7F\u7528")))),t.a.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},t.a.createElement("span",{className:ci.a.description,dangerouslySetInnerHTML:{__html:vn.description}})),t.a.createElement("div",{className:" mt15"},vn.challenge_names.map(function(or,gr){return t.a.createElement("span",{key:gr,className:"mr30 font12"},"\u7B2C",gr+1,"\u5173 ",or," ")})),t.a.createElement(ha.a,{dashed:!0}),t.a.createElement("div",{className:"c-light-black mt20 font12"},t.a.createElement("span",null,vn.author_name),t.a.createElement("span",{className:"ml15 mr15"},"|"),t.a.createElement("span",null,vn.author_school_name),t.a.createElement("span",{className:"ml15 mr15"},"|"),t.a.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",vn.level),t.a.createElement("span",{className:"ml15 mr15"},"|"),t.a.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),t.a.createElement("span",null,vn.study_count))))}),t.a.createElement("p",null)),t.a.createElement("div",{className:"tc"},t.a.createElement(Yr.a,{current:Dn.page||1,hideOnSinglePage:!0,showSizeChanger:!1,defaultPageSize:20,showQuickJumper:!0,total:ln==null?void 0:ln.shixuns_count,onChange:function(Kn){Dn.page=Kn,Kt({type:"classroomList/getShixunLists",payload:Object(I.a)({},Dn)})}})))},go=Object(s.a)(function(ut){var qe=ut.classroomList,Bt=ut.loading;return{classroomList:qe,loading:Bt}})(ii),no=C("Ot1p"),As=C("qdXH"),xo=C("sBCT"),Cs=C("500L"),ws=C("giR+"),Ao=C("fyUT"),hs=C("dwhp"),mr=C("IxHN"),Wr=C("M8RZ"),ur=C("BdwD"),aa=C("9nDM"),Ea=function(qe){var Bt=qe.user,$t=qe.onReplyDiscuss,cn=qe.dispatch,Kt=qe.id,En=qe.activeDiscussIndex,rn=Object(r.useState)(""),jt=Object(E.a)(rn,2),hn=jt[0],qt=jt[1];function bn(Cn){qt(Cn)}var Fn=Object(c.i)();function Yt(){if(!hn){P.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}$t(Kt,hn),cn({type:"pathsDetail/getPathsDetail",payload:{id:Fn.pathId}}),qt("")}return t.a.createElement("div",{key:Kt,className:"discuss-item-editor",style:{display:En===Kt?"block":"none",width:"100%"}},t.a.createElement(no.a,{miniToolbar:!0,startInit:En===Kt,defaultValue:hn,id:Kt,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:bn}),t.a.createElement("a",{onClick:Yt,className:"btn-send"},"\u53D1\u9001"))},ei=Object(s.a)(function(ut){var qe=ut.shixunsDetail,Bt=ut.loading,$t=ut.globalSetting;return{shixunsDetail:qe,globalSetting:$t,loading:Bt.models.index}})(Ea),Ta=function(qe){var Bt=qe.user,$t=qe.upDataList,cn=qe.page,Kt=qe.getTypeNumber,En=qe.dispatch,rn=Object(c.i)(),jt=function(){var hn=Object(k.a)(p.a.mark(function qt(bn,Fn){var Yt;return p.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(D.M)({id:bn,content:Fn});case 2:Yt=ln.sent,(Yt==null?void 0:Yt.status)===0&&$t(1);case 4:case"end":return ln.stop()}},qt)}));return function(bn,Fn){return hn.apply(this,arguments)}}();return t.a.createElement("div",{className:"discuss-item-container bg-white"},t.a.createElement("a",{href:"/users/".concat(Bt.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(at.a.IMG_SERVER,"/images/").concat(Bt.image_url),width:"50"})),t.a.createElement("section",null,t.a.createElement(ei,{id:rn.pathId,activeDiscussIndex:rn.pathId,onReplyDiscuss:jt})))},Ui=Object(s.a)(function(ut){var qe=ut.shixunsDetail,Bt=ut.loading,$t=ut.globalSetting;return{shixunsDetail:qe,globalSetting:$t,loading:Bt.models.index}})(Ta),Ia=C("fXAG");function _a(ut){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Object(Ft.c)("/discusses.json?page=".concat(qe-1,"&container_identifier=").concat(ut,"&container_type=Shixun"))}function Po(ut,qe){return Object(Ft.f)("/discusses/".concat(ut,"/top_or_down_discuss.json"),{top:qe})}function Za(ut,qe){return Object(Ft.f)("/discusses/".concat(ut,"/plus.json"),{container_type:"Discuss",type:qe?1:0})}function ro(ut,qe){return Object(Ft.f)("/discusses/".concat(ut,"/hidden.json"),qe)}function so(ut,qe){return Object(Ft.f)("/discusses/".concat(ut,"/reward_code.json"),qe)}function To(ut){return Object(Ft.a)("/api/discusses/".concat(ut,".json"),{method:"delete"})}function Vs(ut,qe){return Object(Ft.f)("/discusses/".concat(ut,"/reply.json"),{container_type:"Shixun",content:qe})}function ti(ut){return Object(Ft.f)("/discusses.json",ut)}var wa=C("QcdW"),Sa=C("kaH+");function Eo(ut){var qe=ut.data,Bt=ut.index,$t=ut.adminOrOperator,cn=ut.parentDiscussIndex,Kt=ut.shixunIdentifier,En=ut.isDelete,rn=ut.user,jt=ut.onSetRewardData,hn=ut.onSetActionType,qt=ut.deleteCommentAlert,bn=ut.shixunName,Fn=qe.author,Yt=qe.can_delete,Cn=qe.manage,ln=qe.content,wn=qe.hidden,an=qe.id,Vt=qe.reward,Sn=qe.time;function Ar(){jt({id:an,index:Bt,user_id:Fn.user_id,parentDiscussIndex:cn})}function fn(){hn({id:an,index:Bt,params:{hidden:wn?"0":"1",container_identifier:Kt},type:"hidden-discuss",parentDiscussIndex:cn,message:wn?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function Dn(){if(qt){h.a.info({title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc"}," ","\u8BE5\u6761\u8BC4\u8BBA\u6765\u81EA\u300A",bn,"\u300B\u5B9E\u8DF5\u9879\u76EE\uFF0C\u60A8\u4E0D\u662F\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u7BA1\u7406\u8005\uFF0C\u4E0D\u80FD\u5220\u9664\u8BC4\u8BBA\uFF01"),onOk:function(){}});return}hn({id:an,index:Bt,type:"delete-discuss",parentDiscussIndex:cn,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}return t.a.createElement("div",{className:"second-level-discuss"},t.a.createElement("div",{className:"discuss-info-body"},t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Fn.login),target:"_blank"},Fn.name),t.a.createElement("span",{className:"grey"},Sn),Vt?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Vt)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,Vt)):null),t.a.createElement("div",{className:"btn-group"},$t?t.a.createElement("a",{onClick:Ar,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,$t?t.a.createElement("a",{onClick:fn,title:wn?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:wn?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Cn?t.a.createElement("a",{onClick:Dn,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(St.a,{className:"discuss-content",value:ln}))}var xs=function(ut){var qe=ut.data,Bt=ut.index,$t=ut.shixunIdentifier,cn=ut.adminOrOperator,Kt=ut.identity,En=ut.onTopOrDownDiscuss,rn=ut.onPlusDiscuss,jt=ut.onSetActionType,hn=ut.onSetRewardData,qt=ut.user,bn=ut.isDelete,Fn=ut.activeDiscussIndex,Yt=ut.onReplyDiscuss,Cn=ut.onSetActiveDiscussIndex,ln=qe.content,wn=qe.children,an=qe.game_url,Vt=qe.hidden,Sn=qe.id,Ar=qe.position,fn=qe.praise_count,Dn=qe.reward,Un=qe.sticky,Gn=qe.time,vn=qe.user_praise,Kn=qe.game_passed,or=qe.delete_comment_alert,gr=qe.author,Lr=qe.shixun_name,er=qe.manage;function rr(){Cn(Sn)}function Dr(){En(Sn,!Un,Bt)}function Er(){rn(Sn,!vn,Bt)}function _r(){hn({id:Sn,index:Bt,user_id:gr.user_id})}function ia(){if(or){h.a.info({title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc"}," ","\u8BE5\u6761\u8BC4\u8BBA\u6765\u81EA\u300A",Lr,"\u300B\u5B9E\u8DF5\u9879\u76EE\uFF0C\u60A8\u4E0D\u662F\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u7BA1\u7406\u8005\uFF0C\u4E0D\u80FD\u5220\u9664\u8BC4\u8BBA\uFF01"),onOk:function(){}});return}jt({id:Sn,index:Bt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function ea(){jt({id:Sn,index:Bt,params:{hidden:Vt?"0":"1",container_identifier:$t},type:"hidden-discuss",message:Vt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var tr=function(ka){var ra=ka.target,Yn=ra.nodeName,mn=ra.src;Yn==="IMG"&&(Ha.a.publish("preview-image",mn),console.log("src:",mn))};return t.a.createElement("div",{className:"discuss-item-container",key:Sn},t.a.createElement("a",{href:"/users/".concat(gr.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(at.a.IMG_SERVER,"/images/").concat(gr.image_url),width:"50"})),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(gr.login),target:"_blank"},gr.name),t.a.createElement("span",{className:"grey"},Gn),Ar?t.a.createElement("span",{className:"c-green"}," [\u7B2C",Ar,"\u5173] "):null,an?t.a.createElement("a",{href:an,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,Dn?t.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Dn)},t.a.createElement("i",{className:"iconfont icon-gift c-orange "}),t.a.createElement("span",null,Dn)):null,Kt<=5?t.a.createElement("span",{style:{flex:"1",textAlign:"right",color:Kn===1?"#29bd8b":""}},Kn||Kn===0?Kn===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173":""):null),t.a.createElement("div",{onClick:tr},t.a.createElement(St.a,{className:"discuss-content",value:ln})),wn&&wn.length>0?t.a.createElement("div",{className:"reply-discuss-container",onClick:tr},wn.map(function(vr,ka){return t.a.createElement(Eo,{key:vr.id,data:vr,index:ka,deleteCommentAlert:or,shixunName:Lr,shixunIdentifier:$t,adminOrOperator:cn,user:qt,isDelete:bn,onSetRewardData:hn,onSetActionType:jt,parentDiscussIndex:Bt})})):null,t.a.createElement("div",{className:"btn-group"},cn?t.a.createElement("a",{onClick:_r,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},t.a.createElement("i",{className:"iconfont icon-jiangli"})):null,cn?t.a.createElement("a",{onClick:ea,title:Vt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Vt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,er&&(!wn||wn.length==0)&&t.a.createElement("a",{onClick:ia,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})),t.a.createElement("a",{onClick:rr,title:"\u56DE\u590D"},t.a.createElement("i",{className:"iconfont icon-huifu1"})),t.a.createElement("a",{onClick:Er,className:vn?"c-orange":""},t.a.createElement("i",{className:vn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,fn||""))),t.a.createElement(ei,{id:Sn,activeDiscussIndex:Fn,onReplyDiscuss:Yt})))},Ts={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Xs(ut,qe){switch(qe.type){case Ia.Q:return Object(I.a)(Object(I.a)({},ut),{},{loading:!0});case Ia.X:return Object(I.a)(Object(I.a)({},ut),{},{showRewardDialog:!0});case Ia.b:return Object(I.a)(Object(I.a)({},ut),{},{showRewardDialog:!1});case Ia.l:return Object(I.a)(Object(I.a)({},ut),qe.payload);case Ia.ab:return Object(I.a)(Object(I.a)({},ut),qe.payload);case Ia.x:return Object(I.a)(Object(I.a)({},ut),qe.payload);case Ia.z:return Object(I.a)(Object(I.a)({},ut),qe.payload);case Ia.H:return Object(I.a)(Object(I.a)({},ut),qe.payload);case Ia.a:return Object(I.a)(Object(I.a)({},ut),qe.payload);default:throw new Error}}var Ys=function(ut){var qe=ut.shixunIdentifier,Bt=ut.identity,$t=ut.activeIndex,cn=ut.user,Kt=ut.isShixunDetail,En=Kt===void 0?!1:Kt,rn=ut.isDelete,jt=ut.getTypeNumber,hn=Object(r.useReducer)(Xs,Ts),qt=Object(E.a)(hn,2),bn=qt[0],Fn=qt[1],Yt=bn.page,Cn=bn.loading,ln=bn.data,wn=bn.actionType,an=bn.showRewardDialog,Vt=bn.activeDiscussIndex,Sn=Object(r.useRef)(),Ar=Object(r.useRef)(),fn=Object(c.i)();function Dn(Cr){return Un.apply(this,arguments)}function Un(){return Un=Object(k.a)(p.a.mark(function Cr(Rr){var fr;return p.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:if(!Cn){Mn.next=2;break}return Mn.abrupt("return");case 2:return Mn.prev=2,Fn({type:Ia.Q}),Mn.next=6,Object(D.A)(Object(I.a)(Object(I.a)({},fn),{},{page:Rr}));case 6:fr=Mn.sent,Fn({type:Ia.l,payload:{activeDiscussIndex:null,page:Rr,data:fr,loading:!1}}),Mn.next=13;break;case 10:Mn.prev=10,Mn.t0=Mn.catch(2),console.log(Mn.t0);case 13:case"end":return Mn.stop()}},Cr,null,[[2,10]])})),Un.apply(this,arguments)}function Gn(Cr){document.body.scrollIntoView(),Dn(Cr)}function vn(Cr,Rr,fr){return Kn.apply(this,arguments)}function Kn(){return Kn=Object(k.a)(p.a.mark(function Cr(Rr,fr,ar){var Mn;return p.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.prev=0,pn.next=3,Za(Rr,fr);case 3:Mn=pn.sent,mn[ar].user_praise=fr,mn[ar].praise_count=Mn.praise_count,Fn({type:Ia.x,payload:{data:Object(I.a)(Object(I.a)({},ln),{},{comments:mn})}}),pn.next=12;break;case 9:pn.prev=9,pn.t0=pn.catch(0),console.log(pn.t0);case 12:case"end":return pn.stop()}},Cr,null,[[0,9]])})),Kn.apply(this,arguments)}function or(Cr,Rr,fr){return gr.apply(this,arguments)}function gr(){return gr=Object(k.a)(p.a.mark(function Cr(Rr,fr,ar){return p.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.prev=0,Ln.next=3,Po(Rr,fr);case 3:mn[ar].sticky=fr,Fn({type:Ia.ab,payload:{data:Object(I.a)(Object(I.a)({},ln),{},{comments:mn})}}),Ln.next=10;break;case 7:Ln.prev=7,Ln.t0=Ln.catch(0),console.log(Ln.t0);case 10:case"end":return Ln.stop()}},Cr,null,[[0,7]])})),gr.apply(this,arguments)}function Lr(){Fn({type:Ia.z,payload:{actionType:null}})}function er(){return rr.apply(this,arguments)}function rr(){return rr=Object(k.a)(p.a.mark(function Cr(){var Rr,fr,ar,Mn,Ln,pn,qn,ta;return p.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(Rr=wn.id,fr=wn.params,ar=wn.type,Mn=wn.index,Ln=wn.parentDiscussIndex,!(ar==="hidden-discuss")){Nr.next=6;break}return Nr.next=4,ro(Rr,fr);case 4:Ln?mn[Ln].children[Mn].hidden=fr.hidden==1:mn[Mn].hidden=fr.hidden==1,Fn({type:Ia.z,payload:{actionType:null,data:Object(I.a)(Object(I.a)({},ln),{},{comments:mn})}});case 6:if(!(ar==="delete-discuss")){Nr.next=31;break}return Nr.next=9,To(Rr);case 9:if(!(Ln||Ln===0)){Nr.next=22;break}pn=mn[Ln].children,qn=pn.length-1;case 12:if(!(qn>=0)){Nr.next=19;break}if(!(pn[qn].id===Rr)){Nr.next=16;break}return pn.splice(qn,1),Nr.abrupt("break",19);case 16:qn--,Nr.next=12;break;case 19:mn[Ln].children=pn,Nr.next=30;break;case 22:ta=mn.length-1;case 23:if(!(ta>=0)){Nr.next=30;break}if(!(mn[ta].id===Rr)){Nr.next=27;break}return mn.splice(ta,1),Nr.abrupt("break",30);case 27:ta--,Nr.next=23;break;case 30:Fn({type:Ia.z,payload:{actionType:null,data:Object(I.a)(Object(I.a)({},ln),{},{comments:mn})}});case 31:case"end":return Nr.stop()}},Cr)})),rr.apply(this,arguments)}function Dr(Cr){Fn({type:Ia.z,payload:{actionType:Cr}})}function Er(){Fn({type:Ia.b})}function _r(){return ia.apply(this,arguments)}function ia(){return ia=Object(k.a)(p.a.mark(function Cr(){var Rr,fr,ar,Mn,Ln,pn,qn;return p.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return Rr=Sn.current,fr=Rr.id,ar=Rr.index,Mn=Rr.score,Ln=Rr.user_id,pn=Rr.parentDiscussIndex,cr.next=3,so(fr,{container_type:"Discusses",score:Mn,user_id:Ln});case 3:qn=cr.sent,pn?mn[pn].children[ar].reward=qn.code:mn[ar].reward=qn.code,Fn({type:Ia.H,payload:{showRewardDialog:!1,data:Object(I.a)(Object(I.a)({},ln),{},{comments:mn})}}),Sn.current=null;case 7:case"end":return cr.stop()}},Cr)})),ia.apply(this,arguments)}function ea(Cr){Sn.current=Cr,Fn({type:Ia.X})}function tr(Cr){Sn.current.score=Cr}function vr(Cr,Rr){return ka.apply(this,arguments)}function ka(){return ka=Object(k.a)(p.a.mark(function Cr(Rr,fr){return p.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.prev=0,Mn.next=3,Vs(Rr,fr);case 3:Dn(Yt),Mn.next=9;break;case 6:Mn.prev=6,Mn.t0=Mn.catch(0),console.log(Mn.t0);case 9:case"end":return Mn.stop()}},Cr,null,[[0,6]])})),ka.apply(this,arguments)}function ra(Cr){Vt===Cr?Fn({type:Ia.a,payload:{activeDiscussIndex:null}}):Fn({type:Ia.a,payload:{activeDiscussIndex:Cr}})}if(Object(r.useEffect)(function(){function Cr(){return Rr.apply(this,arguments)}function Rr(){return Rr=Object(k.a)(p.a.mark(function fr(){return p.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:if(!($t===3&&!ln&&qe)){Mn.next=3;break}return Mn.next=3,Dn(Yt);case 3:case"end":return Mn.stop()}},fr)})),Rr.apply(this,arguments)}Cr()},[fn.pathId]),!ln)return t.a.createElement(K.a,{spinning:!0},t.a.createElement("div",{style:{height:"300px",width:"100%"}}));var Yn=ln.disscuss_count,mn=ln.comments,yr=ln.all,oi=ln.can_hidden;return t.a.createElement(r.Fragment,null,t.a.createElement("div",{className:"discuss-container",ref:Ar},Yn===0?t.a.createElement(ur.a,null):null,Object(F.p)()&&t.a.createElement(Ui,{getTypeNumber:jt,upDataList:Dn,page:Yt,user:cn}),t.a.createElement("aside",{className:"bg-white"},mn==null?void 0:mn.map(function(Cr,Rr){return t.a.createElement(xs,{user:cn,key:Cr.id,data:Cr,index:Rr,identity:Bt,onPaginationChange:Gn,shixunIdentifier:qe,isDelete:rn,onSetActionType:Dr,onTopOrDownDiscuss:or,adminOrOperator:oi,onPlusDiscuss:vn,onSetRewardData:ea,activeDiscussIndex:Vt,onSetActiveDiscussIndex:ra,onReplyDiscuss:vr})})),Yn>10?t.a.createElement("div",{className:"pagination-container tc"},t.a.createElement(Yr.a,{showQuickJumper:!0,showSizeChanger:!1,onChange:Gn,current:Yt,total:Yn})):null),t.a.createElement(Wr.a,null,t.a.createElement(h.a,{centered:!0,title:"\u63D0\u793A",visible:!!wn,onOk:er,onCancel:Lr},t.a.createElement("p",null,wn?wn.message:"")),t.a.createElement(h.a,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",visible:an,onCancel:Er,onOk:_r},t.a.createElement(Ao.a,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:tr,style:{width:"228px"}}))))},il=C("jZGp"),ml=C("LvDl"),Js=C("G2fZ"),Ps=C.n(Js),gl=$e.a.Search,Us=function(qe){var Bt,$t,cn=qe.shixunsDetail,Kt=qe.globalSetting,En=qe.loading,rn=qe.dispatch,jt=Object(B.a)(qe,["shixunsDetail","globalSetting","loading","dispatch"]),hn=Object(c.i)(),qt=Object(r.useState)(0),bn=Object(E.a)(qt,2),Fn=bn[0],Yt=bn[1],Cn=Object(r.useState)([]),ln=Object(E.a)(Cn,2),wn=ln[0],an=ln[1],Vt=Object(r.useState)(""),Sn=Object(E.a)(Vt,2),Ar=Sn[0],fn=Sn[1],Dn=Object(r.useState)(),Un=Object(E.a)(Dn,2),Gn=Un[0],vn=Un[1],Kn=Object(r.useState)(!1),or=Object(E.a)(Kn,2),gr=or[0],Lr=or[1],er=Object(r.useState)(!1),rr=Object(E.a)(er,2),Dr=rr[0],Er=rr[1],_r=Object(r.useState)({page:1,limit:10,type:"video"}),ia=Object(E.a)(_r,2),ea=ia[0],tr=ia[1];Object(r.useEffect)(function(){cn.actionTabs.key==="Stage-SendModal"&&(tr(ea),vr(ea))},[cn.actionTabs.key]);var vr=function(){var Mn=Object(k.a)(p.a.mark(function Ln(pn){var qn;return p.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,rn({type:"shixunsDetail/searchUserCourses",payload:pn});case 2:qn=cr.sent,qn.status===401?(rn({type:"shixunsDetail/setActionTabs",payload:{}}),Er(!1)):(Er(!0),Yt((qn==null?void 0:qn.courses_count)||0),an((qn==null?void 0:qn.course_list)||[]));case 4:case"end":return cr.stop()}},Ln)}));return function(pn){return Mn.apply(this,arguments)}}(),ka=function(Ln){var pn=Object(I.a)(Object(I.a)({},ea),{page:Ln,limit:10,search:encodeURI(Ar)});tr(pn),vr(pn)},ra=Object(De.b)(),Yn=Object(E.a)(ra,4),mn=Yn[0],yr=Yn[1],oi=Yn[2],Cr=Yn[3],Rr=function(){var Mn=Object(k.a)(p.a.mark(function Ln(){var pn,qn,ta;return p.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(Gn){Nr.next=3;break}return Lr(!0),Nr.abrupt("return");case 3:return qn=(pn=cn.actionTabs.params)===null||pn===void 0?void 0:pn.id,Er(!1),Nr.next=7,Cr({id:hn==null?void 0:hn.pathId,course_id:Gn,type:"subject",stage_item_id:qn,sync_catelog:0});case 7:if(ta=Nr.sent,ta){Nr.next=11;break}return Nr.next=11,fr(0);case 11:case"end":return Nr.stop()}},Ln)}));return function(){return Mn.apply(this,arguments)}}(),fr=function(){var Mn=Object(k.a)(p.a.mark(function Ln(pn){var qn,ta,cr,Nr,Da,ua,va,ca;return p.a.wrap(function(Oa){for(;;)switch(Oa.prev=Oa.next){case 0:if(Nr=(qn=cn.actionTabs.params)===null||qn===void 0?void 0:qn.id,!((ta=cn.actionTabs.params)!==null&&ta!==void 0&&ta.is_jupyter)){Oa.next=8;break}return va=(ua=cn.actionTabs.params)===null||ua===void 0?void 0:ua.identifier,Oa.next=5,Object(Ft.a)("/api/shixuns/".concat(va,"/send_to_course.json"),{method:"Post",body:{course_id:Gn,identifier:va,type:"normal",is_copy:pn}});case 5:Da=Oa.sent,Oa.next=11;break;case 8:return Oa.next=10,Object(D.P)({id:hn==null?void 0:hn.pathId,course_id:Gn,stage_shixuns:[{stage_shixun_id:Nr,is_copy:pn,is_use:1}],sync_catelog:0,type:((ca=cn.actionTabs.params)===null||ca===void 0?void 0:ca.title)==="\u5B9E\u8BAD"?"shixun":"video"});case 10:Da=Oa.sent;case 11:ar(),yr(),((cr=Da)===null||cr===void 0?void 0:cr.status)===1&&h.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},Da.message),onOk:function(){var Fr,Qa,ya;if((Fr=cn.actionTabs.params)!==null&&Fr!==void 0&&Fr.is_jupyter){var Ka;Object(pe.S)((Ka=Da)===null||Ka===void 0?void 0:Ka.first_category_url);return}var di=(Qa=Da)===null||Qa===void 0||((ya=Qa.url.split("/"))===null||ya===void 0)?void 0:ya[2];Object(pe.S)("/classrooms/".concat(di,"/shixun_homework"))}});case 14:case"end":return Oa.stop()}},Ln)}));return function(pn){return Mn.apply(this,arguments)}}(),ar=function(){fn(""),vn(null),Lr(!1),rn({type:"shixunsDetail/setActionTabs",payload:{}}),Er(!1)};return t.a.createElement(t.a.Fragment,null,t.a.createElement(h.a,{centered:!0,keyboard:!1,closable:!1,title:"\u53D1\u9001".concat(((Bt=cn.actionTabs.params)===null||Bt===void 0?void 0:Bt.title)||"\u5B9E\u8BAD"),visible:Dr,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Rr,onCancel:ar},t.a.createElement("div",{className:Ps.a.wrap},t.a.createElement("div",{className:Ps.a.title},"\u9009\u62E9\u7684","\u53D1\u9001".concat((($t=cn.actionTabs.params)===null||$t===void 0?void 0:$t.title)||"\u5B9E\u8BAD"),"\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),t.a.createElement("div",{className:"mb10"},t.a.createElement(gl,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Ar,onChange:function(Ln){return fn(Ln.target.value)},onSearch:function(Ln){fn(Ln);var pn=Object(I.a)(Object(I.a)({},ea),{page:1,limit:10,search:encodeURI(Ln)});tr(pn),vr(pn)}})),t.a.createElement("div",{className:Ps.a.radioWrap},t.a.createElement(f.a.Group,{value:Gn,onChange:function(Ln){vn(Ln.target.value),Lr(!1)}},wn.map(function(Mn,Ln){return t.a.createElement(f.a,{className:Ps.a.radio,value:Mn.course_id,key:Ln},Mn.name)}))),gr&&t.a.createElement("div",{className:Ps.a.colorFF0000},"\u8BF7\u9009\u62E9\u4F60\u8981\u53D1\u9001\u7684\u8BFE\u5802"),Fn>10&&t.a.createElement("div",{className:Ps.a.pagination},t.a.createElement(Yr.a,{size:"small",className:"mb20",showQuickJumper:!0,showSizeChanger:!1,defaultCurrent:1,current:ea==null?void 0:ea.page,pageSize:10,total:Fn,onChange:ka})))),t.a.createElement(De.a,{visible:mn,inPaper:!1,onOk:fr,onCancel:function(){ar(),yr()},renderData:oi,modalType:"single",type:"subject"}))},Ns=Object(s.a)(function(ut){var qe=ut.shixunsDetail,Bt=ut.loading,$t=ut.globalSetting;return{shixunsDetail:qe,globalSetting:$t,loading:Bt.models.index}})(Us),mi=["application/pdf","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/ZIP"],Hs=function(qe){var Bt,$t,cn,Kt,En,rn=qe.pathsDetail,jt=qe.user,hn=qe.globalSetting,qt=qe.loading,bn=qe.dispatch,Fn=Object(B.a)(qe,["pathsDetail","user","globalSetting","loading","dispatch"]),Yt=Object(c.i)(),Cn=rn.stageData,ln=Object(r.useState)([]),wn=Object(E.a)(ln,2),an=wn[0],Vt=wn[1],Sn=Object(r.useState)(-1),Ar=Object(E.a)(Sn,2),fn=Ar[0],Dn=Ar[1],Un=Object(r.useState)(!1),Gn=Object(E.a)(Un,2),vn=Gn[0],Kn=Gn[1],or=Object(r.useState)(!1),gr=Object(E.a)(or,2),Lr=gr[0],er=gr[1],rr=Object(r.useState)(!1),Dr=Object(E.a)(rr,2),Er=Dr[0],_r=Dr[1],ia=Object(r.useState)({name:"",is_jupyter:!1}),ea=Object(E.a)(ia,2),tr=ea[0],vr=ea[1],ka=ft.a.useForm(),ra=Object(E.a)(ka,1),Yn=ra[0],mn=ft.a.useForm(),yr=Object(E.a)(mn,1),oi=yr[0],Cr=ft.a.useForm(),Rr=Object(E.a)(Cr,1),fr=Rr[0],ar=ft.a.useForm(),Mn=Object(E.a)(ar,1),Ln=Mn[0],pn=Object(r.useState)(!1),qn=Object(E.a)(pn,2),ta=qn[0],cr=qn[1],Nr=Object(r.useState)([]),Da=Object(E.a)(Nr,2),ua=Da[0],va=Da[1],ca=Object(r.useState)(!1),Ca=Object(E.a)(ca,2),Oa=Ca[0],Ma=Ca[1],Fr=Object(r.useState)("All"),Qa=Object(E.a)(Fr,2),ya=Qa[0],Ka=Qa[1],di=Object(r.useState)(!1),Ji=Object(E.a)(di,2),Di=Ji[0],Ei=Ji[1],Uo=Object(r.useState)(0),ho=Object(E.a)(Uo,2),_o=ho[0],as=ho[1],fs=Object(r.useState)([{name:"\u5168\u90E8",type:"All",number:0},{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",number:0},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",number:0},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",number:0},{name:"\u8BA8\u8BBA",type:"Discusses",number:0}]),is=Object(E.a)(fs,2),os=is[0],So=is[1],ps=Object(r.useState)(),Qi=Object(E.a)(ps,2),da=Qi[0],_i=Qi[1],gi=Object(r.useState)([]),vo=Object(E.a)(gi,2),uo=vo[0],Ki=vo[1],ss=function(Wt){if(Wt.key=="Enter"){var on=fr.getFieldValue("tag");if(fr.setFieldsValue({tag:""}),!on){P.b.info("\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A");return}if(uo.filter(function(xn){return xn===on}).length>0){P.b.info("\u5DF2\u6709\u76F8\u540C\u540D\u79F0\u6807\u7B7E");return}uo.push(on),Ki(Object(d.a)(uo))}},ls=function(Wt,on){Wt.preventDefault(),Ki(Object(d.a)(uo.filter(function(xn){return xn!=on})))},qo=((Bt=rn.detail)===null||Bt===void 0?void 0:Bt.is_free)||(($t=rn.detail)===null||$t===void 0?void 0:$t.can_learning),fo=function(){var Wt=rn.detail,on=Wt.shixuns_count,xn=on===void 0?0:on,Hn=Wt.videos_count,jn=Hn===void 0?0:Hn,pr=Wt.attachment_count,dr=pr===void 0?0:pr,Rn=Wt.disscuss_count,zr=Rn===void 0?0:Rn,Si={All:xn+jn+dr,Shixun:xn,VideoItem:jn,Attachment:dr,Discusses:zr},ir=os.map(function(si){return Object(I.a)(Object(I.a)({},si),{},{number:Si[si.type]})});So(ir)};Object(r.useEffect)(function(){fo()},[rn.detail]),Object(r.useEffect)(function(){fo(),Vt(Object(d.a)(Cn))},[Cn]);var zo=function(){var nr=Object(k.a)(p.a.mark(function Wt(on,xn){var Hn;return p.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(bn({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!xn){pr.next=7;break}return pr.next=4,Object($r.D)({id:on});case 4:pr.t0=pr.sent,pr.next=10;break;case 7:return pr.next=9,Object($r.E)({id:on});case 9:pr.t0=pr.sent;case 10:if(Hn=pr.t0,bn({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(Hn!=null&&Hn.game_identifier||Hn!=null&&Hn.identifier)){pr.next=15;break}return Object(pe.S)(xn?"/tasks/".concat(Hn==null?void 0:Hn.identifier,"/jupyter"):"/tasks/".concat(Hn.game_identifier)),pr.abrupt("return");case 15:(Hn==null?void 0:Hn.status)===-3?Object(pe.q)():(Hn==null?void 0:Hn.status)===2?yo(Hn==null?void 0:Hn.message):(Hn==null?void 0:Hn.status)===3&&es(Hn==null?void 0:Hn.message);case 16:case"end":return pr.stop()}},Wt)}));return function(on,xn){return nr.apply(this,arguments)}}(),yo=function nr(Wt){var on;Wt=(on=Wt)!==null&&on!==void 0&&on.includes(".json")?Wt:"".concat(Wt,".json"),h.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var xn=Object(k.a)(p.a.mark(function jn(){var pr,dr;return p.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return zr.next=2,Object(Or.T)({url:Wt});case 2:if(pr=zr.sent,pr){zr.next=5;break}return zr.abrupt("return");case 5:return P.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),zr.next=8,Object($r.E)({id:pr.shixun_identifier});case 8:if(dr=zr.sent,!(dr!=null&&dr.game_identifier)){zr.next=12;break}return Object(pe.S)("/tasks/".concat(dr.game_identifier)),zr.abrupt("return");case 12:(dr==null?void 0:dr.status)===2?nr(dr==null?void 0:dr.message):(dr==null?void 0:dr.status)===3&&es(dr==null?void 0:dr.message);case 13:case"end":return zr.stop()}},jn)}));function Hn(){return xn.apply(this,arguments)}return Hn}()})},es=function(Wt){h.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Wt,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Go=function(){if(!ko())return;cr(!0)};Object(r.useEffect)(function(){if(ta){var nr={shixuns_list:[],attachments_list:[],items:[]};oa(an.length,nr),Vt([].concat(Object(d.a)(an),[nr]))}},[ta]);var xa=function(){setTimeout(function(){fn===an.length-1&&ta&&(ms(),Vt(an.filter(function(Wt,on){return on!==an.length-1}))),Wi(),Dn(-1)},300)},oa=function(Wt,on){if(!ko())return;Dn(Wt),Yn.setFieldsValue({name:on.stage_name,description:on.stage_description,tagName:on.tag&&on.tag.name||""})},Ci=function(Wt){if(setTimeout(function(){document.documentElement.scrollTop=_o},300),Wt==="\u53D6\u6D88")return;an[fn].items=an[fn].items.concat(Wt),Vt(Object(d.a)(an))},Zi=function(){var nr=Object(k.a)(p.a.mark(function Wt(on){var xn;return p.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:return jn.next=2,Object(D.Q)(Object(I.a)({},on));case 2:return xn=jn.sent,an[fn].items=on.list,jn.abrupt("return",xn);case 5:case"end":return jn.stop()}},Wt)}));return function(on){return nr.apply(this,arguments)}}(),Oo=function(Wt){an[fn].items=an[fn].items.concat(Object(I.a)(Object(I.a)({},Wt),{},{children:[]})),Vt(Object(d.a)(an))},co=function(Wt){an[fn].items=an[fn].items.concat(Wt),Vt(Object(d.a)(an))},No=function(){var nr=Object(k.a)(p.a.mark(function Wt(on){var xn,Hn,jn,pr,dr;return p.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(da){zr.next=8;break}return zr.next=3,Object(D.f)(Object(I.a)({id:an[fn].stage_id,subject_id:Yt.pathId},on));case 3:return xn=zr.sent,xn.id&&(Ma(!1),Hn=[Object(I.a)({},xn)],an[fn].items=an[fn].items.concat(Hn),Vt(Object(d.a)(an))),zr.abrupt("return",xn);case 8:return zr.next=10,Object(D.S)(Object(I.a)(Object(I.a)({id:da==null?void 0:da.id,subject_id:Yt.pathId},on),{},{video_id:(on==null?void 0:on.video_id)||(da==null||((jn=da.video_item)===null||jn===void 0)?void 0:jn.video_id),link:(on==null?void 0:on.link)||(da==null||((pr=da.video_item)===null||pr===void 0)?void 0:pr.link)}));case 10:return dr=zr.sent,dr&&(P.b.success("\u4FEE\u6539\u6210\u529F"),Ma(!1),Wi()),zr.abrupt("return",dr);case 13:case"end":return zr.stop()}},Wt)}));return function(on){return nr.apply(this,arguments)}}(),Wi=function(){bn({type:"pathsDetail/getStageData",payload:{subject_id:Yt.pathId}}),bn({type:"pathsDetail/getPathsDetail",payload:{id:Yt.pathId}}),bn({type:"pathsDetail/getRightData",payload:{id:Yt.pathId}}),ms()},Ai=function(){var nr=Object(k.a)(p.a.mark(function Wt(on,xn){var Hn,jn,pr,dr,Rn,zr,Si,ir,si,ao,zi;return p.a.wrap(function(ja){for(;;)switch(ja.prev=ja.next){case 0:if(!(!(on!=null&&on.name)||(on==null?void 0:on.name.replace(/(^\s*)|(\s*$)/g,""))==="")){ja.next=2;break}return ja.abrupt("return",P.b.info("\u8BF7\u5148\u8F93\u5165\u7AE0\u8282\u540D\u79F0\uFF01"));case 2:if(ms(),pr=[],(Hn=an[fn].shixuns_list)===null||Hn===void 0||Hn.map(function(Gi){pr.push({type:Gi.item_type,id:Gi.id})}),(jn=an[fn].attachments_list)===null||jn===void 0||jn.map(function(Gi){pr.push({type:"Attachment",id:Gi.id})}),dr=on.tagName,Rn=Object(B.a)(on,["tagName"]),!ta){ja.next=16;break}return zr=Object(I.a)(Object(I.a)({},Rn),{},{pathId:Yt.pathId,list:pr}),dr&&(zr=Object(I.a)(Object(I.a)({},zr),{},{stage_tag_attributes:{name:dr}})),ja.next=12,Object(D.d)(Object(I.a)({},zr));case 12:Si=ja.sent,Si!=null&&Si.subject_id&&(an[fn]=Object(I.a)(Object(I.a)(Object(I.a)({},an[fn]),Si),{},{stage_name:zr.name,stage_description:zr.description,tag:zr.stage_tag_attributes}),Vt(Object(d.a)(an))),ja.next=24;break;case 16:return ir=Array.from(new Set(pr.map(function(Gi){return Gi.type}))),si=Object(I.a)(Object(I.a)({},Rn),{},{id:an[fn].stage_id,type:Array.from(new Set(pr.map(function(Gi){return Gi.type}))),list:pr}),ao=an[fn].tag&&an[fn].tag.id||"",si=Object(I.a)(Object(I.a)({},si),{},{stage_tag_attributes:ao?{id:ao,name:dr}:{name:dr}}),ja.next=22,Object(D.U)(Object(I.a)({},si));case 22:zi=ja.sent,zi!=null&&zi.subject_id&&(an[fn]=Object(I.a)(Object(I.a)(Object(I.a)({},an[fn]),zi),{},{stage_name:si.name,stage_description:si.description,tag:si.stage_tag_attributes}),Vt(Object(d.a)(an)));case 24:return cr(!1),ja.abrupt("return");case 26:case"end":return ja.stop()}},Wt)}));return function(on,xn){return nr.apply(this,arguments)}}(),Vo=function(Wt,on,xn){var Hn=Array.from(Wt),jn=Hn.splice(on,1),pr=Object(E.a)(jn,1),dr=pr[0];return Hn.splice(xn,0,dr),Hn},Pn=function(Wt,on){h.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u5B9E\u8BAD\u5417\uFF1F",onOk:function(){an[fn][on||"shixuns_list"].splice(Wt,1),P.b.success("\u5220\u9664\u6210\u529F"),Vt(Object(d.a)(an)),Ai(Yn.getFieldsValue(),on)}})},ts=function(Wt){h.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u672C\u64CD\u4F5C\u5C06\u5220\u9664\u5F53\u524D\u76EE\u5F55\u53CA\u4E0B\u5C5E\u5B50\u76EE\u5F55\u5B9A\u5168\u90E8\u5185\u5BB9\uFF0C\u786E\u8BA4\u8981\u5220\u9664\u5417\uFF1F",onOk:function(){var on=Object(k.a)(p.a.mark(function Hn(){var jn;return p.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(D.s)(Wt);case 2:jn=dr.sent,jn.status===0&&(P.b.success("\u5220\u9664\u6210\u529F"),Wi());case 4:case"end":return dr.stop()}},Hn)}));function xn(){return on.apply(this,arguments)}return xn}()})},lo=function(){var nr=Object(k.a)(p.a.mark(function Wt(on){var xn,Hn,jn,pr,dr,Rn;return p.a.wrap(function(Si){for(;;)switch(Si.prev=Si.next){case 0:if(console.log(on),!((on==null?void 0:on.item_type)==="VideoItem")){Si.next=9;break}return Si.next=4,Object(As.g)({id:on==null?void 0:on.stage_item_id});case 4:xn=Si.sent,_i(xn),(on==null?void 0:on.item_type)==="VideoItem"?Ma(!0):(Ki((xn==null||((Hn=xn.tags)===null||Hn===void 0)?void 0:Hn.map(function(ir){return ir==null?void 0:ir.name}))||[]),fr.setFieldsValue({files:[{uid:xn==null||((jn=xn.attachment)===null||jn===void 0)?void 0:jn.id,name:xn==null?void 0:xn.name,response:{id:xn==null||((pr=xn.attachment)===null||pr===void 0)?void 0:pr.id}}]}),er(!0)),Si.next=10;break;case 9:(on==null?void 0:on.item_type)==="Attachment"?h.a.confirm({title:"\u4FEE\u6539\u8BFE\u4EF6\u540D\u79F0",icon:null,centered:!0,okText:"\u786E\u8BA4\u4FEE\u6539",cancelText:"\u53D6\u6D88",content:t.a.createElement($e.a,{value:dr,onChange:function(si){dr=si.target.value},placeholder:"\u8BF7\u8F93\u5165\u8BFE\u4EF6\u540D\u79F0"}),onOk:function(){var ir=Object(k.a)(p.a.mark(function ao(){var zi,Wn,ja;return p.a.wrap(function(li){for(;;)switch(li.prev=li.next){case 0:if(dr){li.next=3;break}return P.b.info("\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),li.abrupt("return",Promise.reject());case 3:return li.next=5,Object(Ft.a)("/api/attachments/".concat(on==null?void 0:on.id,".json"),{method:"put",body:{name:dr+(on==null||((zi=on.name)===null||zi===void 0)?void 0:zi.substr(on==null||((Wn=on.name)===null||Wn===void 0)?void 0:Wn.lastIndexOf(".")))}});case 5:ja=li.sent,dr="",Wi();case 8:case"end":return li.stop()}},ao)}));function si(){return ir.apply(this,arguments)}return si}()}):h.a.confirm({title:"\u4FEE\u6539\u5C0F\u8282\u540D\u79F0",icon:null,centered:!0,okText:"\u786E\u8BA4\u4FEE\u6539",cancelText:"\u53D6\u6D88",content:t.a.createElement($e.a,{value:Rn,maxLength:40,onChange:function(si){Rn=si.target.value},placeholder:"\u8BF7\u8F93\u5165\u5C0F\u8282\u540D\u79F0"}),onOk:function(){var ir=Object(k.a)(p.a.mark(function ao(){var zi;return p.a.wrap(function(ja){for(;;)switch(ja.prev=ja.next){case 0:if(Rn.replaceAll(" ","")){ja.next=3;break}return P.b.info("\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),ja.abrupt("return",Promise.reject());case 3:return ja.next=5,Object(Ft.a)("/api/stages/".concat(on==null?void 0:on.stage_id,"/update_item_name.json"),{method:"put",body:{name:Rn,item_id:on==null?void 0:on.id}});case 5:zi=ja.sent,Rn="",Wi();case 8:case"end":return ja.stop()}},ao)}));function si(){return ir.apply(this,arguments)}return si}()});case 10:case"end":return Si.stop()}},Wt)}));return function(on){return nr.apply(this,arguments)}}(),Fa=function(Wt){h.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u7AE0\u8282\u5417\uFF1F",onOk:function(){var on=Object(k.a)(p.a.mark(function Hn(){var jn;return p.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(D.r)({id:Wt});case 2:jn=dr.sent,jn.status===1&&(Dn(-1),P.b.success("\u5220\u9664\u6210\u529F"),Wi());case 4:case"end":return dr.stop()}},Hn)}));function xn(){return on.apply(this,arguments)}return xn}()})},Ni=function(){vr({name:"",is_jupyter:!1}),oi.setFieldsValue({name:"",is_jupyter:!1}),Ei(!1),Kn(!1)},wi=function(Wt,on){var xn;if(!Wt.destination)return;var Hn=Vo((xn=an[fn])===null||xn===void 0?void 0:xn[on||"shixuns_list"],Wt.source.index,Wt.destination.index);an[fn][on||"shixuns_list"]=Hn,Vt(Object(d.a)(an)),Ai(Yn.getFieldsValue(),on)},Bo=function(){var nr=Object(k.a)(p.a.mark(function Wt(on){var xn;return p.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(ko()){jn.next=2;break}return jn.abrupt("return");case 2:return jn.next=4,Object(D.T)({id:on});case 4:xn=jn.sent,xn.status===1&&Wi();case 6:case"end":return jn.stop()}},Wt)}));return function(on){return nr.apply(this,arguments)}}(),Ti=function(){var nr=Object(k.a)(p.a.mark(function Wt(on){var xn;return p.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(ko()){jn.next=2;break}return jn.abrupt("return");case 2:return jn.next=4,Object(D.t)({id:on});case 4:xn=jn.sent,xn.status===1&&Wi();case 6:case"end":return jn.stop()}},Wt)}));return function(on){return nr.apply(this,arguments)}}(),ko=function(){return fn!==-1?(h.a.info({icon:null,className:"custom-modal-divider ",okText:"\u77E5\u9053\u5566",title:"\u63D0\u793A",content:t.a.createElement("div",{className:"mt10 font14"},"\u5F53\u524D\u5355\u5143\u6709\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\u8BB0\u5F55\uFF0C\u8BF7\u5148\u4FDD\u5B58\uFF01"),onOk:function(){var on="Edit_".concat(fn),xn=document.getElementById(on);xn&&setTimeout(function(){return xn.scrollIntoView({block:"start",behavior:"smooth"})})}}),!1):!0},ns=function(){Ai(Yn.getFieldsValue())},ms=function(){cr(!1)},Xo=function(){var Wt,on,xn,Hn,jn,pr;return((Wt=rn.detail)===null||Wt===void 0||((on=Wt.courses)===null||on===void 0)?void 0:on.length)>0?(xn=rn.detail)===null||xn===void 0?void 0:xn.allow_visit:!(((Hn=jt.userInfo)===null||Hn===void 0?void 0:Hn.user_identity)==="\u5B66\u751F"&&(jn=rn.detail)!==null&&jn!==void 0&&jn.allow_visit&&(pr=rn.detail)!==null&&pr!==void 0&&pr.courses)},Ss=function(Wt,on,xn){var Hn,jn,pr,dr,Rn,zr,Si,ir,si,ao,zi,Wn;return ya!=="All"&&Wt.item_type!==ya?null:t.a.createElement(he.a,{className:"list-item-row",align:"middle",key:on,gutter:[5,10]},t.a.createElement(ae.a,null,Wt.item_type==="Shixun"?t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}):t.a.createElement("i",{className:"iconfont icon-shipin2 c-purple-8C1 font20"})),t.a.createElement(ae.a,{flex:1,className:!Wt.allow_visit&&!Wt.to_be_built&&(Wt.shixun_status==="\u6682\u672A\u516C\u5F00"||Wt.shixun_status==="\u5DF2\u5220\u9664")?Zr.a.color204:""},!!(rn!=null&&(Hn=rn.detail)!==null&&Hn!==void 0&&Hn.cust_seq)&&t.a.createElement("span",{className:"mr8"},xn+1,"-",on+1),Wt.name,fn===-1&&Wt.complete_status===1&&t.a.createElement("span",{className:Zr.a.completed},t.a.createElement("i",{className:"iconfont icon-duigou1 mr5 font12"}),"\u5DF2\u5B8C\u6210")),t.a.createElement(ae.a,null,fn===xn&&t.a.createElement("div",null,t.a.createElement(i.a,{title:"\u5220\u9664"},t.a.createElement("span",{onClick:function(){Pn(on,"shixuns_list")},className:"iconfont icon-shanchu c-grey-c"}))),(((jn=jt.userInfo)===null||jn===void 0?void 0:jn.admin)||((pr=jt.userInfo)===null||pr===void 0?void 0:pr.business)||!(!((dr=rn.detail)!==null&&dr!==void 0&&dr.allow_statistics)&&((Rn=jt.userInfo)===null||Rn===void 0?void 0:Rn.user_identity)==="\u5B66\u751F"&&(zr=rn.detail)!==null&&zr!==void 0&&zr.allow_visit&&(Si=rn.detail)!==null&&Si!==void 0&&Si.courses))&&fn!==xn&&Wt.item_type==="VideoItem"&&t.a.createElement("aside",null,t.a.createElement(o.a,{type:"primary",onClick:function(){var Gi,li;if(!((Gi=jt.userInfo)!==null&&Gi!==void 0&&Gi.admin)&&!((li=jt.userInfo)!==null&&li!==void 0&&li.business)&&!Wt.can_view)return h.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:t.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});Wt.link&&Object(As.n)({is_f:1,id:Wt.id,point:0,total:0}),Object(pe.S)(Wt.link||"/video/".concat(Wt.id,"?subject_id=").concat(Yt.pathId))}},Wt.last_point>0?"\u7EE7\u7EED\u5B66\u4E60":"\u5F00\u59CB\u5B66\u4E60")),(((ir=jt.userInfo)===null||ir===void 0?void 0:ir.admin)||(Wt.allow_visit||Wt.to_be_built||Wt.shixun_status!=="\u6682\u672A\u516C\u5F00"&&Wt.shixun_status!=="\u5DF2\u5220\u9664")&&!(!((si=rn.detail)!==null&&si!==void 0&&si.allow_statistics)&&((ao=jt.userInfo)===null||ao===void 0?void 0:ao.user_identity)==="\u5B66\u751F"&&(zi=rn.detail)!==null&&zi!==void 0&&zi.allow_visit&&(Wn=rn.detail)!==null&&Wn!==void 0&&Wn.courses))&&fn!==xn&&Wt.item_type==="Shixun"&&t.a.createElement("aside",null,t.a.createElement(Tn.a,{to:"/shixuns/".concat(Wt.identifier,"/challenges"),target:"_blank"},"\u67E5\u770B\u8BE6\u60C5"),Wt.shixun_status!=="\u6682\u672A\u516C\u5F00"&&t.a.createElement(o.a,{className:"ml20",type:"primary",onClick:function(){if(!Object(Le.e)(bn,!0))return;zo(Wt.identifier,Wt.is_jupyter||Wt.is_jupyter_lab)}},"\u5F00\u59CB\u5B9E\u6218")),fn===-1&&!Wt.allow_visit&&!Wt.to_be_built&&Wt.shixun_status==="\u6682\u672A\u516C\u5F00"&&t.a.createElement("span",{className:Zr.a.color204},"\u6682\u672A\u516C\u5F00"),fn===-1&&!Wt.allow_visit&&!Wt.to_be_built&&Wt.shixun_status==="\u5DF2\u5220\u9664"&&t.a.createElement("span",{className:Zr.a.color204},"\u5DF2\u5220\u9664"),fn===-1&&Wt.item_type==="Shixun"&&!!Wt.challenges_count&&t.a.createElement("span",{className:"exper\u02C6iment-number ml5 c-grey-999"},"\u5B9E\u9A8C\u6570 ",Wt.challenges_count)))},ks=function(Wt){var on,xn=[];if(Wt.items&&(on=Wt.items)!==null&&on!==void 0&&on.length){var Hn;(Hn=Wt.items)===null||Hn===void 0||Hn.forEach(function(pr){var dr;xn.push(pr),pr.children&&(dr=pr.children)!==null&&dr!==void 0&&dr.length&&(xn=xn.concat(pr.children))})}var jn=!!xn.find(function(pr){return Object(ml.isEqual)(pr.learning_status,["can","try"])});return jn?t.a.createElement("aside",{className:Zr.a.learn},"\u514D\u8D39\u8BD5\u5B66"):null},On=function(Wt,on){var xn,Hn,jn,pr,dr,Rn;if(ya!=="All"&&!((xn=Wt.stage_tag)!==null&&xn!==void 0&&xn.includes(ya)))return null;var zr=!1,Si=!1,ir=!1,si=!1;if(ya==="All"){var ao,zi,Wn,ja;zr=(((ao=jt.userInfo)===null||ao===void 0?void 0:ao.admin)||((zi=jt.userInfo)===null||zi===void 0?void 0:zi.business)||((Wn=rn.detail)===null||Wn===void 0?void 0:Wn.allow_statistics))&&fn===on&&!ta,(ja=rn.detail)!==null&&ja!==void 0&&ja.allow_add_member&&qo&&fn!==on&&(Si=!0,on>0&&(ir=!0),on0)return t.a.createElement("div",{key:Wt,className:nr.type===ya?Zr.a.tabActive:Zr.a.tab,onClick:function(){fn===-1?(Ka(nr.type),Dn(-1)):P.b.warn("\u8BF7\u5148\u53D6\u6D88\u7F16\u8F91\u72B6\u6001")}},t.a.createElement("span",{className:Zr.a.s1},nr.name),t.a.createElement("span",{className:Zr.a.s2},nr.number))})),ya!=="Discusses"&&t.a.createElement(t.a.Fragment,null,t.a.createElement(ft.a,{form:Yn,onFinish:Ai},an==null?void 0:an.map(function(nr,Wt){return t.a.createElement("div",{key:Wt},On(nr,Wt))})),((cn=rn.detail)===null||cn===void 0?void 0:cn.allow_statistics)&&ya==="All"&&!ta&&t.a.createElement("div",{className:Zr.a.addStage,onClick:Go},t.a.createElement("span",{className:Zr.a.color4CA},"+\u70B9\u51FB\u65B0\u5EFA\u9636\u6BB5"),"\uFF08\u6DFB\u52A0\u4E00\u4E2A\u6216\u591A\u4E2A\u5B9E\u8BAD/\u89C6\u9891\u9879\u76EE\uFF0C\u7EC4\u6210\u4E00\u4E2A\u9636\u6BB5\uFF09"))),ya==="Discusses"&&t.a.createElement("aside",{className:"mt20"},t.a.createElement(Ys,{activeIndex:3,isDelete:(Kt=rn.detail)===null||Kt===void 0?void 0:Kt.allow_add_member,shixunIdentifier:11,identity:(En=jt.userInfo)===null||En===void 0?void 0:En.role,getTypeNumber:fo,user:jt.userInfo,isShixunDetail:!0})),t.a.createElement(h.a,{centered:!0,title:"\u65B0\u5EFA\u5B9E\u8DF5\u9879\u76EE",visible:vn,confirmLoading:Di,destroyOnClose:!0,onOk:Object(k.a)(p.a.mark(function nr(){var Wt;return p.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,oi.validateFields();case 2:return Ei(!0),xn.next=5,Object(D.N)(Object(I.a)({id:an[fn].stage_id,subject_id:Yt.pathId},tr));case 5:Wt=xn.sent,Ni(),Wt.id&&(oi.resetFields(),P.b.success("\u6DFB\u52A0\u6210\u529F"),Ci([Wt])),Ei(!1);case 9:case"end":return xn.stop()}},nr)})),onCancel:Ni},t.a.createElement(ft.a,{form:oi,onValuesChange:function(Wt){vr(Object(I.a)(Object(I.a)({},tr),Wt))}},t.a.createElement(ft.a.Item,{label:"\u7C7B\u578B",name:"is_jupyter",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7C7B\u578B"}]},t.a.createElement(f.a.Group,null,t.a.createElement(f.a,{defaultChecked:!0,value:!1},"\u5168\u6808\u5B9E\u8DF5\u9879\u76EE"),t.a.createElement(f.a,{value:!0},"Jupyter Notebook\u5B9E\u8DF5\u9879\u76EE"))),t.a.createElement(ft.a.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"}]},t.a.createElement($e.a,{suffix:t.a.createElement("span",null,tr.name.length,"/60")})))),t.a.createElement(h.a,{centered:!0,title:da?"\u7F16\u8F91\u6559\u5B66\u8BFE\u4EF6":"\u65B0\u5EFA\u6559\u5B66\u8BFE\u4EF6",visible:Lr,confirmLoading:Di,destroyOnClose:!0,onOk:Object(k.a)(p.a.mark(function nr(){var Wt,on,xn,Hn,jn,pr;return p.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,fr.validateFields();case 2:return Ei(!0),Rn.next=5,fr.getFieldsValue();case 5:if(Wt=Rn.sent,on=!1,xn="",Wt.files.forEach(function(zr){(!zr.response||!zr.response.id)&&(on=!0,xn=zr.name)}),!on){Rn.next=11;break}return P.b.error("".concat(xn," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20")),Rn.abrupt("return");case 11:if(da){Rn.next=18;break}return Rn.next=14,Object(D.c)({id:an[fn].stage_id,subject_id:Yt.pathId,tags:uo,attachment_ids:Wt.files.map(function(zr){return zr.response.id})});case 14:Hn=Rn.sent,Hn.status===0&&(P.b.success("\u4FEE\u6539\u6210\u529F"),er(!1),co(Object(d.a)(Hn.items))),Rn.next=22;break;case 18:return Rn.next=20,Object(D.S)({id:da==null?void 0:da.id,subject_id:Yt.pathId,tags:uo,attachment_id:(jn=Wt.files.map(function(zr){return zr.response.id}))===null||jn===void 0?void 0:jn[0]});case 20:pr=Rn.sent,pr.status===0&&(P.b.success("\u4FEE\u6539\u6210\u529F"),er(!1),co(Object(d.a)(pr.items)));case 22:Ei(!1);case 23:case"end":return Rn.stop()}},nr)})),onCancel:function(){er(!1),Ki([]),_i("")}},t.a.createElement(ft.a,{form:fr},t.a.createElement(ft.a.Item,{label:"\u8BFE\u4EF6\u5185\u5BB9",name:"files",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8BFE\u4EF6\u5185\u5BB9"}]},t.a.createElement(Cs.b,{aloneClear:!0,maxSize:Object(F.v)()?500:100,accept:mi.toString(),number:da?1:10})),t.a.createElement(ft.a.Item,{style:{marginLeft:8},label:"\u77E5\u8BC6\u6807\u7B7E",name:"tag"},t.a.createElement($e.a,{onKeyUp:ss})),t.a.createElement("div",{className:Zr.a["tagsList-content"]},uo.map(function(nr,Wt){return t.a.createElement(_.a,{key:Wt+nr,closable:!0,onClose:function(xn){ls(xn,nr)}},nr)})),t.a.createElement("div",null,t.a.createElement("span",{className:"c-red"},"\u6CE8\u610F\uFF1A"),t.a.createElement("br",null),"1\u3001\u4E0A\u4F20\u8BFE\u4EF6\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement(Tn.a,{to:"/users/mmipb3zhj/videos/protocol",target:"_blank"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B",t.a.createElement("br",null),"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7",Object(F.v)()?500:100,"M\uFF1B",t.a.createElement("br",null),"3\u3001\u5F53\u524D\u4EC5\u9650\u652F\u6301pdf\u3001word\u3001excel\u3001ppt\u3001zip\u6587\u4EF6\uFF1B",t.a.createElement("br",null),"4\u3001\u6587\u4EF6\u540D\u5C06\u88AB\u81EA\u52A8\u8BFB\u53D6\u4E3A\u7CFB\u7EDF\u5185\u8BE5\u8BFE\u4EF6\u7684\u540D\u79F0\uFF0C\u4E0A\u4F20\u524D\u8BF7\u6CE8\u610F\u8FD9\u4E00\u70B9\uFF1B",t.a.createElement("br",null),"5\u3001\u4E00\u6B21\u6700\u591A\u4E0A\u4F2010\u4E2A\u6587\u4EF6\u3002"))),t.a.createElement(h.a,{centered:!0,title:"\u65B0\u5EFA\u5C0F\u8282\u540D\u79F0",visible:Er,confirmLoading:Di,onOk:Object(k.a)(p.a.mark(function nr(){var Wt,on;return p.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Ln.validateFields();case 2:return Ei(!0),Hn.next=5,Ln.getFieldsValue();case 5:return Wt=Hn.sent,Hn.next=8,Object(D.a)({id:an[fn].stage_id,subject_id:Yt.pathId,name:Wt.name});case 8:on=Hn.sent,on.status===0&&(P.b.success("\u6DFB\u52A0\u6210\u529F"),_r(!1),Oo(Object(I.a)({},on))),Ei(!1);case 11:case"end":return Hn.stop()}},nr)})),onCancel:function(){return _r(!1)}},t.a.createElement(ft.a,{form:Ln},t.a.createElement(ft.a.Item,{label:"",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u5C0F\u8282\u540D\u79F0"}]},t.a.createElement($e.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u5C0F\u8282\u540D\u79F0"})))),t.a.createElement(Ns,null),t.a.createElement(go,{shixunIds:ua,cb:Ci}),t.a.createElement(xo.a,{visible:Oa,editData:da,onCancel:function(){return Ma(!1)},onOk:No}))},$o=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.user,$t=ut.loading,cn=ut.globalSetting;return{pathsDetail:qe,user:Bt,globalSetting:cn,loading:$t.effects}})(Hs),ol=C("uRQ9"),Je=C.n(ol),ht=function(qe){var Bt=qe.user,$t=Object(B.a)(qe,["user"]),cn=Object(r.useState)([]),Kt=Object(E.a)(cn,2),En=Kt[0],rn=Kt[1],jt=Object(r.useState)(!0),hn=Object(E.a)(jt,2),qt=hn[0],bn=hn[1],Fn=Object(r.useState)(!1),Yt=Object(E.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=Object(r.useState)(!1),an=Object(E.a)(wn,2),Vt=an[0],Sn=an[1],Ar=Object(r.useState)(0),fn=Object(E.a)(Ar,2),Dn=fn[0],Un=fn[1],Gn=Object(r.useState)({}),vn=Object(E.a)(Gn,2),Kn=vn[0],or=vn[1],gr=Object(c.i)(),Lr=Object(r.useState)({page:1,limit:10}),er=Object(E.a)(Lr,2),rr=er[0],Dr=er[1],Er=[{title:"\u59D3\u540D",dataIndex:"user_name",key:"user_name",align:"left"},{title:"\u7533\u8BF7\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"left"},{title:"\u7533\u8BF7\u72B6\u6001",dataIndex:"state",key:"state",align:"left",render:function(Yn,mn){return t.a.createElement(t.a.Fragment,null,(mn==null?void 0:mn.state)==="drafted"&&t.a.createElement("span",null,"\u7533\u8BF7\u4E2D"),(mn==null?void 0:mn.state)==="rejected"&&t.a.createElement("span",{style:{color:"#E53333"}},"\u672A\u901A\u8FC7"),(mn==null?void 0:mn.state)==="passed"&&t.a.createElement("span",{style:{color:"#2FA34F"}},"\u901A\u8FC7"))}},{title:"\u5B66\u4E60\u8FDB\u5EA6",dataIndex:"process",key:"process",align:"left",render:function(Yn){return"".concat(Yn,"%")}},{title:"\u5BA1\u6279\u64CD\u4F5C",dataIndex:"action",key:"action",align:"left",render:function(Yn,mn){return t.a.createElement("div",{className:Je.a.actionsBtns},(mn==null?void 0:mn.state)==="drafted"&&t.a.createElement("span",{onClick:function(){return _r(mn)}},"\u540C\u610F"),(mn==null?void 0:mn.state)==="drafted"&&t.a.createElement("span",{onClick:function(){return ia(mn)}},"\u62D2\u7EDD"),(mn==null?void 0:mn.state)==="rejected"&&t.a.createElement("span",{onClick:function(){return ea(mn)}},"\u62D2\u7EDD\u539F\u56E0"),(mn==null?void 0:mn.state)==="passed"&&t.a.createElement("span",{onClick:function(){return tr(mn)}},"\u67E5\u770B\u8BC1\u4E66"))}}].filter(function(ra){return Vt?!0:ra.title!=="\u5B66\u4E60\u8FDB\u5EA6"&&ra.title!=="\u5BA1\u6279\u64CD\u4F5C"});Object(r.useEffect)(function(){vr(rr)},[rr]);var _r=function(){var ra=Object(k.a)(p.a.mark(function Yn(mn){var yr;return p.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.next=2,Object(Ft.a)("/api/paths/".concat(gr==null?void 0:gr.pathId,"/process_certificate.json"),{method:"post",body:{certificate_id:mn==null?void 0:mn.id,op:"pass"}});case 2:yr=Cr.sent,(yr==null?void 0:yr.status)===0&&vr(rr);case 4:case"end":return Cr.stop()}},Yn)}));return function(mn){return ra.apply(this,arguments)}}(),ia=function(Yn){var mn="";h.a.confirm({title:"\u8BC1\u4E66\u7533\u8BF7\u62D2\u7EDD",icon:null,className:"custom-modal-divider",centered:!0,width:400,content:t.a.createElement("div",null,t.a.createElement("p",null,"\u62D2\u7EDD\u8BC1\u4E66\u53D1\u653E\u9700\u586B\u5199\u62D2\u7EDD\u539F\u56E0\u3002"),t.a.createElement("aside",{className:"flex-container"},t.a.createElement("sup",{className:"c-red-ee4"},"*"),t.a.createElement("span",null,"\u62D2\u7EDD\u539F\u56E0:"),t.a.createElement($e.a,{maxLength:30,style:{width:284,marginLeft:10},onChange:function(oi){return mn=oi.target.value}}))),okText:"\u786E\u5B9A\u62D2\u7EDD",cancelText:"\u53D6\u6D88",onOk:function(){var yr=Object(k.a)(p.a.mark(function Cr(){var Rr;return p.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(mn){ar.next=3;break}return P.b.warn("\u62D2\u7EDD\u7406\u7531\u4E0D\u80FD\u4E3A\u7A7A"),ar.abrupt("return",Promise.reject());case 3:return ar.next=5,Object(Ft.a)("/api/paths/".concat(gr==null?void 0:gr.pathId,"/process_certificate.json"),{method:"post",body:{certificate_id:Yn==null?void 0:Yn.id,op:"reject",content:mn}});case 5:Rr=ar.sent,(Rr==null?void 0:Rr.status)===0&&vr(rr);case 7:case"end":return ar.stop()}},Cr)}));function oi(){return yr.apply(this,arguments)}return oi}()})},ea=function(Yn){h.a.info({title:"\u62D2\u7EDD\u539F\u56E0",icon:null,className:"custom-modal-divider",centered:!0,width:400,content:t.a.createElement("div",null,Yn==null?void 0:Yn.content),okText:"\u786E\u5B9A"})},tr=function(Yn){or((Yn==null?void 0:Yn.info)||{}),ln(!0)},vr=function(){var ra=Object(k.a)(p.a.mark(function Yn(mn){var yr;return p.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return bn(!0),Cr.next=3,Object(Ft.a)("/api/paths/".concat(gr==null?void 0:gr.pathId,"/request_certificates.json"),{method:"get",params:mn});case 3:yr=Cr.sent,yr!=null&&yr.data&&(rn(yr==null?void 0:yr.data),Un((yr==null?void 0:yr.total_count)||0),Sn(yr==null?void 0:yr.is_manage)),bn(!1);case 6:case"end":return Cr.stop()}},Yn)}));return function(mn){return ra.apply(this,arguments)}}(),ka=function(Yn,mn){var yr=Object(I.a)(Object(I.a)({},rr),{},{page:Yn,limit:mn});Dr(yr),vr(yr)};return t.a.createElement("div",{className:Je.a.certificate},t.a.createElement(vt.a,{dataSource:En,rowKey:function(Yn){return Yn.id},columns:Er,loading:qt,pagination:{pageSize:rr.limit,total:Dn,current:rr.page,onChange:ka,showQuickJumper:!0,hideOnSinglePage:!0,position:["bottomCenter"]}}),t.a.createElement(sn,{visible:Cn,onCancel:function(){ln(!1),or({})},data:Kn}))},_t=Object(s.a)(function(ut){var qe=ut.user,Bt=ut.pathsDetail;return{user:qe,pathsDetail:Bt}})(ht);se.a.locale("ZH-cn");var nt=x.a.TabPane,xe=function(qe){var Bt=qe.data,$t=Object(r.useState)("1"),cn=Object(E.a)($t,2),Kt=cn[0],En=cn[1],rn=Object(r.useState)(1),jt=Object(E.a)(rn,2),hn=jt[0],qt=jt[1],bn=Object(r.useState)(),Fn=Object(E.a)(bn,2),Yt=Fn[0],Cn=Fn[1],ln=Object(r.useState)(!0),wn=Object(E.a)(ln,2),an=wn[0],Vt=wn[1],Sn=Object(c.i)();function Ar(){return fn.apply(this,arguments)}function fn(){return fn=Object(k.a)(p.a.mark(function Un(){var Gn,vn;return p.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return Vt(!0),Kt==="1"?Gn="/api/paths/".concat(Sn.pathId,"/study_ranking_shixuns_passed.json"):Kt==="2"?Gn="/api/paths/".concat(Sn.pathId,"/study_ranking_videos.json"):Kt==="3"?Gn="/api/paths/".concat(Sn.pathId,"/study_ranking_pdf_attachments.json"):Kt==="4"&&(Gn="/api/paths/".concat(Sn.pathId,"/study_ranking_discusses.json")),or.next=4,Object(Ft.a)(Gn,{method:"get",params:{page:hn}});case 4:vn=or.sent,Vt(!1),Cn(vn);case 7:case"end":return or.stop()}},Un)})),fn.apply(this,arguments)}Object(r.useEffect)(function(){Ar()},[hn,Kt]);var Dn=function(){var Gn,vn,Kn,or,gr,Lr,er,rr,Dr,Er,_r,ia,ea;return t.a.createElement(t.a.Fragment,null,t.a.createElement(K.a,{spinning:an},t.a.createElement("div",{style:{height:"42px",background:"#fafafa",display:"flex",padding:"0px 5px",alignItems:"center"}},t.a.createElement("span",{style:{flex:"1"}},"\u6392\u540D"),t.a.createElement("span",{style:{flex:"1"}},"\u59D3\u540D"),Kt==="1"&&t.a.createElement("span",{style:{flex:"3"}},"\u901A\u8FC7\u5173\u5361\u6570"),Kt==="2"&&t.a.createElement("span",{style:{flex:"3"}},"\u7D2F\u8BA1\u5B66\u4E60\u65F6\u957F"),Kt==="3"&&t.a.createElement("span",{style:{flex:"3"}},"\u4E0B\u8F7D\u8D44\u6E90\u6B21\u6570"),Kt==="4"&&t.a.createElement("span",{style:{flex:"3"}},"\u53D1\u5E16\u6570")),(Yt==null?void 0:Yt.user_show)&&t.a.createElement("div",{style:{height:"42px",display:"flex",padding:"0px 5px",alignItems:"center"}},t.a.createElement("span",{style:{flex:"1"}},(Yt==null||((Gn=Yt.data_user)===null||Gn===void 0)?void 0:Gn.rank)===0&&(Yt==null||((vn=Yt.data_user)===null||vn===void 0)?void 0:vn.num)===0?"--":(Yt==null||((Kn=Yt.data_user)===null||Kn===void 0)?void 0:Kn.rank)<=100&&(Yt==null||((or=Yt.data_user)===null||or===void 0)?void 0:or.rank)!=0?Yt==null||((gr=Yt.data_user)===null||gr===void 0)?void 0:gr.rank:"\u672A\u4E0A\u699C"),t.a.createElement("span",{style:{flex:"1"}},Yt==null||((Lr=Yt.data_user)===null||Lr===void 0)?void 0:Lr.user_real_name),Kt==="1"&&t.a.createElement("span",{style:{flex:"3"}},(Yt==null||((er=Yt.data_user)===null||er===void 0)?void 0:er.num)||"--"),Kt==="2"&&t.a.createElement("span",{style:{flex:"3"}},Yt!=null&&(rr=Yt.data_user)!==null&&rr!==void 0&&rr.num?Object(pe.bb)(Yt==null||((Dr=Yt.data_user)===null||Dr===void 0)?void 0:Dr.num):"--"),Kt==="3"&&t.a.createElement("span",{style:{flex:"3"}},(Yt==null||((Er=Yt.data_user)===null||Er===void 0)?void 0:Er.num)||"--"),Kt==="4"&&t.a.createElement("span",{style:{flex:"3"}},(Yt==null||((_r=Yt.data_user)===null||_r===void 0)?void 0:_r.num)||"--")),(Yt==null?void 0:Yt.user_show)&&t.a.createElement(ha.a,null),(Yt==null||((ia=Yt.data)===null||ia===void 0)?void 0:ia.length)>0?Yt==null||((ea=Yt.data)===null||ea===void 0)?void 0:ea.map(function(tr,vr){return t.a.createElement("div",{style:{height:"42px",display:"flex",padding:"0px 5px",alignItems:"center"}},(tr==null?void 0:tr.rank)===1&&t.a.createElement("span",{style:{flex:"1",color:"#E02020"}},tr==null?void 0:tr.rank),(tr==null?void 0:tr.rank)===2&&t.a.createElement("span",{style:{flex:"1",color:"#FA6400"}},tr==null?void 0:tr.rank),(tr==null?void 0:tr.rank)===3&&t.a.createElement("span",{style:{flex:"1",color:"#F7B500"}},tr==null?void 0:tr.rank),(tr==null?void 0:tr.rank)>3&&t.a.createElement("span",{style:{flex:"1"}},tr==null?void 0:tr.rank),t.a.createElement("span",{style:{flex:"1"}},tr==null?void 0:tr.user_real_name),Kt==="1"&&t.a.createElement("span",{style:{flex:"3"}},tr==null?void 0:tr.num),Kt==="2"&&t.a.createElement("span",{style:{flex:"3"}},Object(pe.bb)(tr==null?void 0:tr.num)),Kt==="3"&&t.a.createElement("span",{style:{flex:"3"}},tr==null?void 0:tr.num),Kt==="4"&&t.a.createElement("span",{style:{flex:"3"}},tr==null?void 0:tr.num))}):t.a.createElement(ur.a,null),(Yt==null?void 0:Yt.count)>10&&t.a.createElement(Yr.a,{current:hn,pageSize:10,showSizeChanger:!1,total:Yt==null?void 0:Yt.count,style:{textAlign:"center",margin:"20px 0px"},onChange:function(vr){qt(vr)}})))};return t.a.createElement("div",null,t.a.createElement(x.a,{activeKey:Kt,style:{background:"#fff",padding:"0px 20px"},onChange:function(Gn){En(Gn),qt(1)}},t.a.createElement(nt,{tab:"\u901A\u5173\u699C",style:{background:"#fff"},key:"1"},t.a.createElement(Dn,null)),t.a.createElement(nt,{tab:"\u89C6\u9891\u5B66\u4E60\u699C",key:"2"},t.a.createElement(Dn,null)),t.a.createElement(nt,{tab:"\u4E0B\u8F7D\u8D44\u6E90\u699C",key:"3"},t.a.createElement(Dn,null)),t.a.createElement(nt,{tab:"\u4E92\u52A8\u8BA8\u8BBA\u699C",key:"4"},t.a.createElement(Dn,null))))},Ke=C("XzQ7"),Oe=C.n(Ke),ot=C("ho57"),lt=C.n(ot),Tt=x.a.TabPane;function dt(ut){var qe=function(En,rn){if(En.localName===rn)return En;for(var jt=0,hn=En;hn=hn.parentNode;jt++){if(hn.localName===rn)return hn;if(hn==document.documentElement)return!1}},Bt=ut.target,$t=qe(Bt,"a");if(console.log([$t],$t==null?void 0:$t.href,44),$t!=null&&$t.href)return;if(Bt.tagName.toUpperCase()==="IMG"){var cn=Bt.src||Bt.getAttribute("src");cn&&cn.indexOf("/images/avatars/User")===-1&&(ut.stopPropagation(),ut.preventDefault(),Ha.a.publish("preview-image",cn))}}var Pt=function(qe){var Bt,$t,cn=qe.pathsDetail,Kt=qe.globalSetting,En=qe.loading,rn=qe.dispatch,jt=Object(B.a)(qe,["pathsDetail","globalSetting","loading","dispatch"]),hn=Object(c.i)(),qt=jt.location.query,bn=Object(r.useRef)(),Fn=Object(r.useState)("stage"),Yt=Object(E.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=[{name:"\u8BFE\u7A0B\u7AE0\u8282",key:"stage"},{name:"\u6392\u884C\u699C",key:"ranking"},{name:"\u8BC1\u4E66\u7533\u8BF7",key:"certificate"}].filter(function(Vt){var Sn;return(Sn=cn.detail)!==null&&Sn!==void 0&&Sn.excellent?!0:Vt.key!=="certificate"});Object(r.useEffect)(function(){if(bn.current)return bn.current.addEventListener("mousedown",dt),function(){bn.current.removeEventListener("mousedown",dt)}},[bn.current]),Object(r.useEffect)(function(){if(!hn.pathId)return;an()},[hn.pathId]),Object(r.useEffect)(function(){var Vt;Object(pe.X)((Vt=cn.detail)===null||Vt===void 0?void 0:Vt.name)},[cn]);var an=function(){var Vt=Object(k.a)(p.a.mark(function Sn(){var Ar;return p.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,rn({type:"pathsDetail/getPathsDetail",payload:Object(I.a)({id:hn.pathId},qt)});case 2:Ar=Dn.sent,rn({type:"pathsDetail/getRightData",payload:{id:hn.pathId}}),rn({type:"pathsDetail/getStageData",payload:{subject_id:hn.pathId}}),Ar!=null&&Ar.id&&qt.token&&(location.href=location.pathname);case 6:case"end":return Dn.stop()}},Sn)}));return function(){return Vt.apply(this,arguments)}}();return t.a.createElement(K.a,{spinning:!1},t.a.createElement("section",{className:Oe.a.bg},t.a.createElement(Ct,null),t.a.createElement(Sa.a,null),t.a.createElement("section",{style:{marginTop:((Bt=cn.detail)===null||Bt===void 0?void 0:Bt.excellent)&&"89px"},className:"edu-container mb80 ".concat(Oe.a.wrap)},t.a.createElement("aside",{className:Oe.a.content},t.a.createElement("div",{className:Oe.a.intro},t.a.createElement("div",{className:Oe.a.introTitle},t.a.createElement("span",{className:"font16",style:{display:"flex",alignItems:"center"}},t.a.createElement("img",{src:lt.a,style:{marginRight:"10px"}}),"\u8BFE\u7A0B\u4ECB\u7ECD")),t.a.createElement("div",{ref:bn},t.a.createElement(St.a,{value:($t=cn.detail)===null||$t===void 0?void 0:$t.description}))),t.a.createElement(x.a,{className:Oe.a.wrapTabs,activeKey:Cn,onChange:function(Sn){return ln(Sn)},tabBarGutter:50,tabBarStyle:{height:76}},wn.map(function(Vt){return t.a.createElement(Tt,{tab:Vt.name,key:Vt.key})})),Cn==="stage"&&t.a.createElement($o,null),Cn==="ranking"&&t.a.createElement(xe,null),Cn==="certificate"&&t.a.createElement(_t,null)),t.a.createElement(bi,null))))},tn=oe.default=Object(s.a)(function(ut){var qe=ut.pathsDetail,Bt=ut.loading,$t=ut.globalSetting;return{pathsDetail:qe,globalSetting:$t,loading:Bt}})(Pt)},BPZU:function(Ie,oe){var C=32,q=7,K=256;function I(r){for(var t=0;r>=C;)t|=r&1,r>>=1;return r+t}function k(r,t,c,s){var a=t+1;if(a===c)return 1;if(s(r[a++],r[t])<0){for(;a=0;)a++;return a-t}function E(r,t,c){for(c--;t>>1,a(o,r[l])<0?A=l:d=l+1;var m=s-d;switch(m){case 3:r[d+3]=r[d+2];case 2:r[d+2]=r[d+1];case 1:r[d+1]=r[d];break;default:for(;m>0;)r[d+m]=r[d+m-1],m--}r[d]=o}}function M(r,t,c,s,a,o){var d=0,A=0,l=1;if(o(r,t[c+a])>0){for(A=s-a;l0;)d=l,l=(l<<1)+1,l<=0&&(l=A);l>A&&(l=A),d+=a,l+=a}else{for(A=a+1;lA&&(l=A);var m=d;d=a-l,l=a-m}for(d++;d>>1);o(r,t[c+_])>0?d=_+1:l=_}return l}function x(r,t,c,s,a,o){var d=0,A=0,l=1;if(o(r,t[c+a])<0){for(A=a+1;lA&&(l=A);var m=d;d=a-l,l=a-m}else{for(A=s-a;l=0;)d=l,l=(l<<1)+1,l<=0&&(l=A);l>A&&(l=A),d+=a,l+=a}for(d++;d>>1);o(r,t[c+_])<0?l=_:d=_+1}return l}function T(r,t){var c=q,s=0,a=K,o=0,d,A,l=0;s=r.length,s<2*K&&(a=s>>>1);var m=[];o=s<120?5:s<1542?10:s<119151?19:40,d=[],A=[];function _(i,u){d[l]=i,A[l]=u,l+=1}function R(){for(;l>1;){var i=l-2;if(i>=1&&A[i-1]<=A[i]+A[i+1]||i>=2&&A[i-2]<=A[i]+A[i-1])A[i-1]A[i+1])break;L(i)}}function w(){for(;l>1;){var i=l-2;i>0&&A[i-1]=q||F>=q);if(D)break;Q<0&&(Q=0),Q+=2}if(c=Q,c<1&&(c=1),u===1){for(h=0;h=0;h--)r[G+h]=r[Q+h];r[N]=m[P];return}for(var F=c;;){var D=0,z=0,j=!1;do if(t(m[P],r[v])<0){if(r[N--]=r[v--],D++,z=0,--u===0){j=!0;break}}else if(r[N--]=m[P--],z++,D=0,--y===1){j=!0;break}while((D|z)=0;h--)r[G+h]=r[Q+h];if(u===0){j=!0;break}}if(r[N--]=m[P--],--y===1){j=!0;break}if(z=y-M(r[v],m,0,y,y-1,t),z!==0){for(N-=z,P-=z,y-=z,G=N+1,Q=P+1,h=0;h=q||z>=q);if(j)break;F<0&&(F=0),F+=2}if(c=F,c<1&&(c=1),y===1){for(N-=u,v-=u,G=N+1,Q=v+1,h=u-1;h>=0;h--)r[G+h]=r[Q+h];r[N]=m[P]}else{if(y===0)throw new Error;for(Q=N-(y-1),h=0;hA&&(l=A),B(r,c,c+l,c+o,t),o=l}d.pushRun(c,o),d.mergeRuns(),a-=o,c+=o}while(a!==0);d.forceMergeRuns()}Ie.exports=p},BU3w:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return B});var q=C("MNnm"),K="rc-util-key";function I(M){if(M.attachTo)return M.attachTo;var x=document.querySelector("head");return x||document.body}function k(M){var x,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(q.a)())return null;var p=document.createElement("style");if((x=T.csp)===null||x===void 0?void 0:x.nonce){var r;p.nonce=(r=T.csp)===null||r===void 0?void 0:r.nonce}p.innerHTML=M;var t=I(T),c=t.firstChild;return T.prepend&&t.prepend?t.prepend(p):T.prepend&&c?t.insertBefore(p,c):t.appendChild(p),p}var E=new Map;function B(M,x){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=I(T);if(!E.has(p)){var r=k("",T),t=r.parentNode;E.set(p,t),t.removeChild(r)}var c=Array.from(E.get(p).children).find(function(A){return A.tagName==="STYLE"&&A[K]===x});if(c){var s,a;if(((s=T.csp)===null||s===void 0?void 0:s.nonce)&&c.nonce!==((a=T.csp)===null||a===void 0?void 0:a.nonce)){var o;c.nonce=(o=T.csp)===null||o===void 0?void 0:o.nonce}return c.innerHTML!==M&&(c.innerHTML=M),c}var d=k(M,T);return d[K]=x,d}},Bd2K:function(Ie,oe,C){(function(q){q(C("VrN/"),C("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(T,p,r){if(r!=q.Init&&r&&T.removeKeyMap("autoCloseTags"),!p)return;var t={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(t["'/'"]=function(c){return B(c)}),(typeof p!="object"||p.whenOpening!==!1)&&(t["'>'"]=function(c){return k(c)}),T.addKeyMap(t)});var K=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],I=["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 k(T){if(T.getOption("disableInput"))return q.Pass;for(var p=T.listSelections(),r=[],t=T.getOption("autoCloseTags"),c=0;cs.ch&&(l=l.slice(0,l.length-a.end+s.ch));var w=l.toLowerCase();if(!l||a.type=="string"&&(a.end!=s.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||a.string.length==1)||a.type=="tag"&&A.close||a.string.indexOf("/")==s.ch-a.start-1||_&&M(_,w)>-1||x(T,o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(d)||[],l,s,!0))return q.Pass;var L=typeof t=="object"&&t.emptyTags;if(L&&M(L,l)>-1){r[c]={text:"/>",newPos:q.Pos(s.line,s.ch+2)};continue}var b=R&&M(R,w)>-1;r[c]={indent:b,text:">"+(b?` `:"")+"",newPos:b?q.Pos(s.line+1,0):q.Pos(s.line,s.ch+1)}}for(var g=typeof t=="object"&&t.dontIndentOnAutoClose,c=p.length-1;c>=0;c--){var i=r[c];T.replaceRange(i.text,p[c].head,p[c].anchor,"+insert");var u=T.listSelections().slice(0);u[c]={head:i.newPos,anchor:i.newPos},T.setSelections(u),!g&&i.indent&&(T.indentLine(i.newPos.line,null,!0),T.indentLine(i.newPos.line+1,null,!0))}}function E(T,p){for(var r=T.listSelections(),t=[],c=p?"/":""&&(_+=">"),t[o]=_}if(T.replaceSelections(t),r=T.listSelections(),!a)for(var o=0;o=0&&p[d]==r;d--)++o;t=a.to;for(var d=1;d0){for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:"",p=[],r=0;r.5?R:_}function p(_,R,w,L,b){var g=_.length;if(b===1)for(var i=0;ib;if(g)_.length=b;else for(var i=L;i=0&&!(F[Le]<=et);Le--);Le=Math.min(Le,y-2)}else{for(Le=ce;Leet);Le++);Le=Math.min(Le-1,y-2)}ce=Le,ae=et;var We=F[Le+1]-F[Le];if(We===0)return;if(ue=(et-F[Le])/We,f)if(se=D[Le],fe=D[Le===0?Le:Le-1],me=D[Le>y-2?y-1:Le+1],re=D[Le>y-3?y-1:Le+2],v)c(fe,se,me,re,ue,ue*ue,ue*ue*ue,i(je,b),Q);else{var Ze;if(P)Ze=c(fe,se,me,re,ue,ue*ue,ue*ue*ue,pe,1),Ze=o(pe);else{if(N)return T(se,me,ue);Ze=s(fe,se,me,re,ue,ue*ue,ue*ue*ue)}u(je,b,Ze)}else if(v)p(D[Le],D[Le+1],ue,i(je,b),Q);else{var Ze;if(P)p(D[Le],D[Le+1],ue,pe,1),Ze=o(pe);else{if(N)return T(D[Le],D[Le+1],ue);Ze=x(D[Le],D[Le+1],ue)}u(je,b,Ze)}},we=new q({target:_._target,life:G,loop:_._loop,delay:_._delay,onframe:De,ondestroy:w});return R&&R!=="spline"&&(we.easing=R),we}var l=function(_,R,w,L){this._tracks={},this._target=_,this._loop=R||!1,this._getter=w||B,this._setter=L||M,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};l.prototype={when:function(_,R){var w=this._tracks;for(var L in R){if(!R.hasOwnProperty(L))continue;if(!w[L]){w[L]=[];var b=this._getter(this._target,L);if(b==null)continue;_!==0&&w[L].push({time:0,value:a(b)})}w[L].push({time:_,value:R[L]})}return this},during:function(_){return this._onframeList.push(_),this},pause:function(){for(var _=0;_1&&p&&p.length>1){var t=I(p)/I(r);!isFinite(t)&&(t=1),x.pinchScale=t;var c=k(p);return x.pinchX=c[0],x.pinchY=c[1],{type:"pinch",target:M[0].target,event:x}}}},B=K;Ie.exports=B},CnIC:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAWCAYAAADTlvzyAAAAAXNSR0IArs4c6QAAA+JJREFUSA2dVltslEUUPmf+f7cXt+oKRKzVtCoICbARtVEJIA+mQiMaI00UXuCBRCT2AZPGaCJvWjUmQowPSBpN+kK8RKVNCIZLorIEVEqFmABVgxsuspi2wHZ3Z+f4za7/9r9sSe0k7Zz55pzzzZzL7M80zdHaJ7fnx+g9EeokptkklGGm/geX0PZDq1hP0w1MpzHm7pA5LLQfZKka6t/MaqZ1p7q4UGMvArkRBMC+IWnTpvC4EMeEzI+bD9NWoZpk1nzt1Yu0cXB44js27qMlY+pE0fAzqfjPtXxHCPcOFZdr0tuIlWOvfyXnnBWmTQjh1MNQtynSBVaynhFnROOFgZP6y84lbl/YSPmBPackAeBVOHc8vP8MuVgnvHWtGQdacO66ygT2jDw/eKLwUADDIkDYmNePIU/1fqWR626V3I8HZMT+eBYHCw3AHSEoSEjKzA0rzLuNcmGs1np+MnY5jDNJcxgL3NBRztWwwsuLdAy1PBbGQ+uRpclCJOwiEvEXINTaBPMAr66hFSieSPL9hErRVyLc7sfKsnL+CmMBwtzZ2K9EcsmvBLL2jpZiP4rvhh+vyrj9ylbqU8RPVzFPKBX3e6I3Bwi7uriE8O3yNu2MbuCuB/hZiBuwV/Lv4RATsxto/YZ79eZwsQnJt51LG/7061s5QGiBzlT8qGL+3MresC/MruV6HP2108PsjHZ4+532UhzifX4cUTl9PBX7xI95coTQbhjhBk/Bzqi20fGSm4UwJ4ALzUPLHqVQcaBY6lb+QfYgkYHDTI69JwsPs+GXgMyvoHLpWsF8/dqxullaUw9uumBSuyIhrMcScerdsayUE0OrEcrW/2z/IaW+uJw9v2/jqrYJz65MODh0o0UoZl+YhXYDoctlS/xpzw/OQuSwG0QtnsFUM4h/g7N3P1qhf4+zbIKXZFlXZIwV716Tih2wax4YlkeopF+HXAmByLm3foqlM9fofZDdXTb6H/9AfLolSVu2L9YdSMFizxSHObQ65X7AAycKH4O3fAPE/sK2tDo8mnc+g2LN/HoObjbb6r2jXq/pbZcX8Zjf5emyMT3WaeXqEFjR7rG88wbEGZNZ57ZFsjn3TXbUgF1XB6ukwo/JLziRwUlyrxyI5RHGch6rSjMXnjyYkcn3FalicjOVoknLrbq+cM+W7+MJVGN65hw+S/RSoo4WfbiMGuONdOap+3nU7pYJfWrUvFOeM4a2olKfwG0D/ejXm0qGQ/upkcaj0HuxmwfDehFCT2HdHnGO/E1tukhJx6Em9FgTctOEz4cmtM8t+BOkwn485TCPk6Er+Nk+n7yTRm72ffMvtr1U/uTpxS8AAAAASUVORK5CYII="},DBLp:function(Ie,oe){function C(){}C.prototype={diff:function(E,B,M){M||(M=function(l,m){return l===m}),this.equals=M;var x=this;E=E.slice(),B=B.slice();var T=B.length,p=E.length,r=1,t=T+p,c=[{newPos:-1,components:[]}],s=this.extractCommon(c[0],B,E,0);if(c[0].newPos+1>=T&&s+1>=p){for(var a=[],o=0;o=T&&w+1>=p)return q(x,m.components,B,E);c[l]=m}r++}for(;r<=t;){var A=d();if(A)return A}},pushComponent:function(E,B,M){var x=E[E.length-1];x&&x.added===B&&x.removed===M?E[E.length-1]={count:x.count+1,added:B,removed:M}:E.push({count:1,added:B,removed:M})},extractCommon:function(E,B,M,x){for(var T=B.length,p=M.length,r=E.newPos,t=r-x,c=0;r+1k||t<-k}var B=function(t){t=t||{},t.position||(this.position=[0,0]),t.rotation==null&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},M=B.prototype;M.transform=null,M.needLocalTransform=function(){return E(this.rotation)||E(this.position[0])||E(this.position[1])||E(this.scale[0]-1)||E(this.scale[1]-1)};var x=[];M.updateTransform=function(){var t=this.parent,c=t&&t.transform,s=this.needLocalTransform(),a=this.transform;if(!(s||c)){a&&I(a);return}a=a||q.create(),s?this.getLocalTransform(a):I(a),c&&(s?q.mul(a,t.transform,a):q.copy(a,t.transform)),this.transform=a;var o=this.globalScaleRatio;if(o!=null&&o!==1){this.getGlobalScale(x);var d=x[0]<0?-1:1,A=x[1]<0?-1:1,l=((x[0]-d)*o+d)/x[0]||0,m=((x[1]-A)*o+A)/x[1]||0;a[0]*=l,a[1]*=l,a[2]*=m,a[3]*=m}this.invTransform=this.invTransform||q.create(),q.invert(this.invTransform,a)},M.getLocalTransform=function(t){return B.getLocalTransform(this,t)},M.setTransform=function(t){var c=this.transform,s=t.dpr||1;c?t.setTransform(s*c[0],s*c[1],s*c[2],s*c[3],s*c[4],s*c[5]):t.setTransform(s,0,0,s,0,0)},M.restoreTransform=function(t){var c=t.dpr||1;t.setTransform(c,0,0,c,0,0)};var T=[],p=q.create();M.setLocalTransform=function(t){if(!t)return;var c=t[0]*t[0]+t[1]*t[1],s=t[2]*t[2]+t[3]*t[3],a=this.position,o=this.scale;E(c-1)&&(c=Math.sqrt(c)),E(s-1)&&(s=Math.sqrt(s)),t[0]<0&&(c=-c),t[3]<0&&(s=-s),a[0]=t[4],a[1]=t[5],o[0]=c,o[1]=s,this.rotation=Math.atan2(-t[1]/s,t[0]/c)},M.decomposeTransform=function(){if(!this.transform)return;var t=this.parent,c=this.transform;t&&t.transform&&(q.mul(T,t.invTransform,c),c=T);var s=this.origin;s&&(s[0]||s[1])&&(p[4]=s[0],p[5]=s[1],q.mul(T,c,p),T[4]-=s[0],T[5]-=s[1],c=T),this.setLocalTransform(c)},M.getGlobalScale=function(t){var c=this.transform;return t=t||[],c?(t[0]=Math.sqrt(c[0]*c[0]+c[1]*c[1]),t[1]=Math.sqrt(c[2]*c[2]+c[3]*c[3]),c[0]<0&&(t[0]=-t[0]),c[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},M.transformCoordToLocal=function(t,c){var s=[t,c],a=this.invTransform;return a&&K.applyTransform(s,s,a),s},M.transformCoordToGlobal=function(t,c){var s=[t,c],a=this.transform;return a&&K.applyTransform(s,s,a),s},B.getLocalTransform=function(t,c){c=c||[],I(c);var s=t.origin,a=t.scale||[1,1],o=t.rotation||0,d=t.position||[0,0];return s&&(c[4]-=s[0],c[5]-=s[1]),q.scale(c,c,a),o&&q.rotate(c,c,o),s&&(c[4]+=s[0],c[5]+=s[1]),c[4]+=d[0],c[5]+=d[1],c};var r=B;Ie.exports=r},Dagg:function(Ie,oe,C){var q=C("Gev7"),K=C("mFDi"),I=C("bYtY"),k=C("Xnb7");function E(M){q.call(this,M)}E.prototype={constructor:E,type:"image",brush:function(M,x){var T=this.style,p=T.image;T.bind(M,this,x);var r=this._image=k.createOrUpdateImage(p,this._image,this,this.onload);if(!r||!k.isImageReady(r))return;var t=T.x||0,c=T.y||0,s=T.width,a=T.height,o=r.width/r.height;if(s==null&&a!=null?s=a*o:a==null&&s!=null?a=s/o:s==null&&a==null&&(s=r.width,a=r.height),this.setTransform(M),T.sWidth&&T.sHeight){var d=T.sx||0,A=T.sy||0;M.drawImage(r,d,A,T.sWidth,T.sHeight,t,c,s,a)}else if(T.sx&&T.sy){var d=T.sx,A=T.sy,l=s-d,m=a-A;M.drawImage(r,d,A,l,m,t,c,s,a)}else M.drawImage(r,t,c,s,a);T.text!=null&&(this.restoreTransform(M),this.drawRectText(M,this.getBoundingRect()))},getBoundingRect:function(){var M=this.style;return this._rect||(this._rect=new K(M.x||0,M.y||0,M.width||0,M.height||0)),this._rect}},I.inherits(E,q);var B=E;Ie.exports=B},DlQD:function(Ie,oe,C){(function(q,K){Ie.exports=K()})(this,function(){"use strict";function q(Ye,Ue){for(var ke=0;keYe.length)&&(Ue=Ye.length);for(var ke=0,Ce=new Array(Ue);ke=Ye.length?{done:!0}:{done:!1,value:Ye[Ce++]}}}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 ke=Ye[Symbol.iterator](),ke.next.bind(ke)}function B(Ye,Ue){return Ue={exports:{}},Ye(Ue,Ue.exports),Ue.exports}var M=B(function(Ye){function Ue(){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 ke(Ce){Ye.exports.defaults=Ce}Ye.exports={defaults:Ue(),getDefaults:Ue,changeDefaults:ke}}),x=M.defaults,T=M.getDefaults,p=M.changeDefaults,r=/[&<>"']/,t=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},o=function(Ue){return a[Ue]};function d(Ye,Ue){if(Ue){if(r.test(Ye))return Ye.replace(t,o)}else if(c.test(Ye))return Ye.replace(s,o);return Ye}var A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Ye){return Ye.replace(A,function(Ue,ke){return ke=ke.toLowerCase(),ke==="colon"?":":ke.charAt(0)==="#"?ke.charAt(1)==="x"?String.fromCharCode(parseInt(ke.substring(2),16)):String.fromCharCode(+ke.substring(1)):""})}var m=/(^|[^\[])\^/g;function _(Ye,Ue){Ye=Ye.source||Ye,Ue=Ue||"";var ke={replace:function(Se,Me){return Me=Me.source||Me,Me=Me.replace(m,"$1"),Ye=Ye.replace(Se,Me),ke},getRegex:function(){return new RegExp(Ye,Ue)}};return ke}var R=/[^\w:]/g,w=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Ye,Ue,ke){if(Ye){var Ce;try{Ce=decodeURIComponent(l(ke)).replace(R,"").toLowerCase()}catch(Se){return null}if(Ce.indexOf("javascript:")===0||Ce.indexOf("vbscript:")===0||Ce.indexOf("data:")===0)return null}Ue&&!w.test(ke)&&(ke=f(Ue,ke));try{ke=encodeURI(ke).replace(/%25/g,"%")}catch(Se){return null}return ke}var b={},g=/^[^:]+:\/*[^/]*$/,i=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(Ye,Ue){b[" "+Ye]||(g.test(Ye)?b[" "+Ye]=Ye+"/":b[" "+Ye]=P(Ye,"/",!0)),Ye=b[" "+Ye];var ke=Ye.indexOf(":")===-1;return Ue.substring(0,2)==="//"?ke?Ue:Ye.replace(i,"$1")+Ue:Ue.charAt(0)==="/"?ke?Ue:Ye.replace(u,"$1")+Ue:Ye+Ue}var y={exec:function(){}};function h(Ye){for(var Ue=1,ke,Ce;Ue=0&&Ge[Lt]==="\\";)mt=!mt;return mt?"|":" |"}),Ce=ke.split(/ \|/),Se=0;if(Ce.length>Ue)Ce.splice(Ue);else for(;Ce.length=Ce.length?Se.slice(Ce.length):Se}).join(` `)}var he=function(){function Ye(ke){this.options=ke||F}var Ue=Ye.prototype;return Ue.space=function(Ce){var Se=this.rules.block.newline.exec(Ce);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:` `}},Ue.code=function(Ce,Se){var Me=this.rules.block.code.exec(Ce);if(Me){var He=Se[Se.length-1];if(He&&He.type==="paragraph")return{raw:Me[0],text:Me[0].trimRight()};var Ge=Me[0].replace(/^ {4}/gm,"");return{type:"code",raw:Me[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:D(Ge,` `)}}},Ue.fences=function(Ce){var Se=this.rules.block.fences.exec(Ce);if(Se){var Me=Se[0],He=Ae(Me,Se[3]||"");return{type:"code",raw:Me,lang:Se[2]?Se[2].trim():Se[2],text:He}}},Ue.heading=function(Ce){var Se=this.rules.block.heading.exec(Ce);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Ue.nptable=function(Ce){var Se=this.rules.block.nptable.exec(Ce);if(Se){var Me={type:"table",header:z(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[],raw:Se[0]};if(Me.header.length===Me.align.length){var He=Me.align.length,Ge;for(Ge=0;Ge ?/gm,"");return{type:"blockquote",raw:Se[0],text:Me}}},Ue.list=function(Ce){var Se=this.rules.block.list.exec(Ce);if(Se){for(var Me=Se[0],He=Se[2],Ge=He.length>1,mt=He[He.length-1]===")",Lt={type:"list",raw:Me,ordered:Ge,start:Ge?+He.slice(0,-1):"",loose:!1,items:[]},en=Se[0].match(this.rules.block.item),Jt=!1,Ct,Et,pt,Xe,Fe,Te,Ne,xt=en.length,vt=0;vt1||this.options.smartLists&&pt!==He)&&(Xe=en.slice(vt+1).join(` `),Lt.raw=Lt.raw.substring(0,Lt.raw.length-Xe.length),vt=xt-1)),Fe=Jt||/\n\n(?!\s*$)/.test(Ct),vt!==xt-1&&(Jt=Ct.charAt(Ct.length-1)===` `,Fe||(Fe=Jt)),Fe&&(Lt.loose=!0),Te=/^\[[ xX]\] /.test(Ct),Ne=void 0,Te&&(Ne=Ct[1]!==" ",Ct=Ct.replace(/^\[[ xX]\] +/,"")),Lt.items.push({type:"list_item",raw:Me,task:Te,checked:Ne,loose:Fe,text:Ct});return Lt}},Ue.html=function(Ce){var Se=this.rules.block.html.exec(Ce);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):j(Se[0]):Se[0]}},Ue.def=function(Ce){var Se=this.rules.block.def.exec(Ce);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var Me=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:Me,raw:Se[0],href:Se[2],title:Se[3]}}},Ue.table=function(Ce){var Se=this.rules.block.table.exec(Ce);if(Se){var Me={type:"table",header:z(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(` `):[]};if(Me.header.length===Me.align.length){Me.raw=Se[0];var He=Me.align.length,Ge;for(Ge=0;Ge/i.test(He[0])&&(Se=!1),!Me&&/^<(pre|code|kbd|script)(\s|>)/i.test(He[0])?Me=!0:Me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(He[0])&&(Me=!1),{type:this.options.sanitize?"text":"html",raw:He[0],inLink:Se,inRawBlock:Me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(He[0]):j(He[0]):He[0]}},Ue.link=function(Ce){var Se=this.rules.inline.link.exec(Ce);if(Se){var Me=Z(Se[2],"()");if(Me>-1){var He=Se[0].indexOf("!")===0?5:4,Ge=He+Se[1].length+Me;Se[2]=Se[2].substring(0,Me),Se[0]=Se[0].substring(0,Ge).trim(),Se[3]=""}var mt=Se[2],Lt="";if(this.options.pedantic){var en=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(mt);en?(mt=en[1],Lt=en[3]):Lt=""}else Lt=Se[3]?Se[3].slice(1,-1):"";mt=mt.trim().replace(/^<([\s\S]*)>$/,"$1");var Jt=te(Se,{href:mt&&mt.replace(this.rules.inline._escapes,"$1"),title:Lt&&Lt.replace(this.rules.inline._escapes,"$1")},Se[0]);return Jt}},Ue.reflink=function(Ce,Se){var Me;if((Me=this.rules.inline.reflink.exec(Ce))||(Me=this.rules.inline.nolink.exec(Ce))){var He=(Me[2]||Me[1]).replace(/\s+/g," ");if(He=Se[He.toLowerCase()],!He||!He.href){var Ge=Me[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var mt=te(Me,He,Me[0]);return mt}},Ue.strong=function(Ce,Se,Me){Me===void 0&&(Me="");var He=this.rules.inline.strong.start.exec(Ce);if(He&&(!He[1]||He[1]&&(Me===""||this.rules.inline.punctuation.exec(Me)))){Se=Se.slice(-1*Ce.length);var Ge=He[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var mt;(He=Ge.exec(Se))!=null;)if(mt=this.rules.inline.strong.middle.exec(Se.slice(0,He.index+3)),mt)return{type:"strong",raw:Ce.slice(0,mt[0].length),text:Ce.slice(2,mt[0].length-2)}}},Ue.em=function(Ce,Se,Me){Me===void 0&&(Me="");var He=this.rules.inline.em.start.exec(Ce);if(He&&(!He[1]||He[1]&&(Me===""||this.rules.inline.punctuation.exec(Me)))){Se=Se.slice(-1*Ce.length);var Ge=He[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var mt;(He=Ge.exec(Se))!=null;)if(mt=this.rules.inline.em.middle.exec(Se.slice(0,He.index+2)),mt)return{type:"em",raw:Ce.slice(0,mt[0].length),text:Ce.slice(1,mt[0].length-1)}}},Ue.codespan=function(Ce){var Se=this.rules.inline.code.exec(Ce);if(Se){var Me=Se[2].replace(/\n/g," "),He=/[^ ]/.test(Me),Ge=Me.startsWith(" ")&&Me.endsWith(" ");return He&&Ge&&(Me=Me.substring(1,Me.length-1)),Me=j(Me,!0),{type:"codespan",raw:Se[0],text:Me}}},Ue.br=function(Ce){var Se=this.rules.inline.br.exec(Ce);if(Se)return{type:"br",raw:Se[0]}},Ue.del=function(Ce){var Se=this.rules.inline.del.exec(Ce);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Ue.autolink=function(Ce,Se){var Me=this.rules.inline.autolink.exec(Ce);if(Me){var He,Ge;return Me[2]==="@"?(He=j(this.options.mangle?Se(Me[1]):Me[1]),Ge="mailto:"+He):(He=j(Me[1]),Ge=He),{type:"link",raw:Me[0],text:He,href:Ge,tokens:[{type:"text",raw:He,text:He}]}}},Ue.url=function(Ce,Se){var Me;if(Me=this.rules.inline.url.exec(Ce)){var He,Ge;if(Me[2]==="@")He=j(this.options.mangle?Se(Me[0]):Me[0]),Ge="mailto:"+He;else{var mt;do mt=Me[0],Me[0]=this.rules.inline._backpedal.exec(Me[0])[0];while(mt!==Me[0]);He=j(Me[0]),Me[1]==="www."?Ge="http://"+He:Ge=He}return{type:"link",raw:Me[0],text:He,href:Ge,tokens:[{type:"text",raw:He,text:He}]}}},Ue.inlineText=function(Ce,Se,Me){var He=this.rules.inline.text.exec(Ce);if(He){var Ge;return Se?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(He[0]):j(He[0]):He[0]:Ge=j(this.options.smartypants?Me(He[0]):He[0]),{type:"text",raw:He[0],text:Ge}}},Ye}(),ce=G.noopTest,ae=G.edit,ve=G.merge,ue={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ce,table:ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=ae(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=ae(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=ae(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=//,ue.html=ae(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=ae(ue._paragraph).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.blockquote=ae(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=ve({},ue),ue.gfm=ve({},ue.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*|$)"}),ue.gfm.nptable=ae(ue.gfm.nptable).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.gfm.table=ae(ue.gfm.table).replace("hr",ue.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",")|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.pedantic=ve({},ue.normal,{html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ce,paragraph:ae(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ce,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",fe.punctuation=ae(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex(),fe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",fe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",fe.em.start=ae(fe.em.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.middle=ae(fe.em.middle).replace(/punctuation/g,fe._punctuation).replace(/overlapSkip/g,fe._overlapSkip).getRegex(),fe.em.endAst=ae(fe.em.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.em.endUnd=ae(fe.em.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.start=ae(fe.strong.start).replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.middle=ae(fe.strong.middle).replace(/punctuation/g,fe._punctuation).replace(/blockSkip/g,fe._blockSkip).getRegex(),fe.strong.endAst=ae(fe.strong.endAst,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.strong.endUnd=ae(fe.strong.endUnd,"g").replace(/punctuation/g,fe._punctuation).getRegex(),fe.blockSkip=ae(fe._blockSkip,"g").getRegex(),fe.overlapSkip=ae(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=ae(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=ae(fe.tag).replace("comment",ue._comment).replace("attribute",fe._attribute).getRegex(),fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,fe.link=ae(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex(),fe.reflink=ae(fe.reflink).replace("label",fe._label).getRegex(),fe.reflinkSearch=ae(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex(),fe.normal=ve({},fe),fe.pedantic=ve({},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:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",fe._label).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()}),fe.gfm=ve({},fe.normal,{escape:ae(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]*?(?:(?=[\\.5&&(Ce="x"+Ce.toString(16)),Ue+="&#"+Ce+";";return Ue}var je=function(){function Ye(ke){this.tokens=[],this.tokens.links=Object.create(null),this.options=ke||me,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ce={block:re.normal,inline:pe.normal};this.options.pedantic?(Ce.block=re.pedantic,Ce.inline=pe.pedantic):this.options.gfm&&(Ce.block=re.gfm,this.options.breaks?Ce.inline=pe.breaks:Ce.inline=pe.gfm),this.tokenizer.rules=Ce}Ye.lex=function(Ce,Se){var Me=new Ye(Se);return Me.lex(Ce)};var Ue=Ye.prototype;return Ue.lex=function(Ce){return Ce=Ce.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(Ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Ue.blockTokens=function(Ce,Se,Me){Se===void 0&&(Se=[]),Me===void 0&&(Me=!0),Ce=Ce.replace(/^ +$/gm,"");for(var He,Ge,mt,Lt;Ce;){if(He=this.tokenizer.space(Ce)){Ce=Ce.substring(He.raw.length),He.type&&Se.push(He);continue}if(He=this.tokenizer.code(Ce,Se)){Ce=Ce.substring(He.raw.length),He.type?Se.push(He):(Lt=Se[Se.length-1],Lt.raw+=` `+He.raw,Lt.text+=` `+He.text);continue}if(He=this.tokenizer.fences(Ce)){Ce=Ce.substring(He.raw.length),Se.push(He);continue}if(He=this.tokenizer.heading(Ce)){Ce=Ce.substring(He.raw.length),Se.push(He);continue}if(He=this.tokenizer.nptable(Ce)){Ce=Ce.substring(He.raw.length),Se.push(He);continue}if(He=this.tokenizer.hr(Ce)){Ce=Ce.substring(He.raw.length),Se.push(He);continue}if(He=this.tokenizer.blockquote(Ce)){Ce=Ce.substring(He.raw.length),He.tokens=this.blockTokens(He.text,[],Me),Se.push(He);continue}if(He=this.tokenizer.list(Ce)){for(Ce=Ce.substring(He.raw.length),mt=He.items.length,Ge=0;Ge0)for(;(en=this.tokenizer.rules.inline.reflinkSearch.exec(Lt))!=null;)Jt.includes(en[0].slice(en[0].lastIndexOf("[")+1,-1))&&(Lt=Lt.slice(0,en.index)+"["+"a".repeat(en[0].length-2)+"]"+Lt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(en=this.tokenizer.rules.inline.blockSkip.exec(Lt))!=null;)Lt=Lt.slice(0,en.index)+"["+"a".repeat(en[0].length-2)+"]"+Lt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ce;){if(mt=this.tokenizer.escape(Ce)){Ce=Ce.substring(mt.raw.length),Se.push(mt);continue}if(mt=this.tokenizer.tag(Ce,Me,He)){Ce=Ce.substring(mt.raw.length),Me=mt.inLink,He=mt.inRawBlock,Se.push(mt);continue}if(mt=this.tokenizer.link(Ce)){Ce=Ce.substring(mt.raw.length),mt.type==="link"&&(mt.tokens=this.inlineTokens(mt.text,[],!0,He)),Se.push(mt);continue}if(mt=this.tokenizer.reflink(Ce,this.tokens.links)){Ce=Ce.substring(mt.raw.length),mt.type==="link"&&(mt.tokens=this.inlineTokens(mt.text,[],!0,He)),Se.push(mt);continue}if(mt=this.tokenizer.strong(Ce,Lt,Ge)){Ce=Ce.substring(mt.raw.length),mt.tokens=this.inlineTokens(mt.text,[],Me,He),Se.push(mt);continue}if(mt=this.tokenizer.em(Ce,Lt,Ge)){Ce=Ce.substring(mt.raw.length),mt.tokens=this.inlineTokens(mt.text,[],Me,He),Se.push(mt);continue}if(mt=this.tokenizer.codespan(Ce)){Ce=Ce.substring(mt.raw.length),Se.push(mt);continue}if(mt=this.tokenizer.br(Ce)){Ce=Ce.substring(mt.raw.length),Se.push(mt);continue}if(mt=this.tokenizer.del(Ce)){Ce=Ce.substring(mt.raw.length),mt.tokens=this.inlineTokens(mt.text,[],Me,He),Se.push(mt);continue}if(mt=this.tokenizer.autolink(Ce,we)){Ce=Ce.substring(mt.raw.length),Se.push(mt);continue}if(!Me&&(mt=this.tokenizer.url(Ce,we))){Ce=Ce.substring(mt.raw.length),Se.push(mt);continue}if(mt=this.tokenizer.inlineText(Ce,He,De)){Ce=Ce.substring(mt.raw.length),Ge=mt.raw.slice(-1),Se.push(mt);continue}if(Ce){var Ct="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(Ct);break}else throw new Error(Ct)}}return Se},K(Ye,null,[{key:"rules",get:function(){return{block:re,inline:pe}}}]),Ye}(),et=M.defaults,Le=G.cleanUrl,We=G.escape,Ze=function(){function Ye(ke){this.options=ke||et}var Ue=Ye.prototype;return Ue.code=function(Ce,Se,Me){var He=(Se||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(Ce,He);Ge!=null&&Ge!==Ce&&(Me=!0,Ce=Ge)}return He?'
    '+(Me?Ce:We(Ce,!0))+`
    `:"
    "+(Me?Ce:We(Ce,!0))+`
    `},Ue.blockquote=function(Ce){return`
    `+Ce+`
    `},Ue.html=function(Ce){return Ce},Ue.heading=function(Ce,Se,Me,He){return this.options.headerIds?"'+Ce+" `:""+Ce+" `},Ue.hr=function(){return this.options.xhtml?`
    `:`
    `},Ue.list=function(Ce,Se,Me){var He=Se?"ol":"ul",Ge=Se&&Me!==1?' start="'+Me+'"':"";return"<"+He+Ge+`> `+Ce+" `},Ue.listitem=function(Ce){return"
  • "+Ce+`
  • `},Ue.checkbox=function(Ce){return" "},Ue.paragraph=function(Ce){return"

    "+Ce+`

    `},Ue.table=function(Ce,Se){return Se&&(Se=""+Se+""),` `+Ce+` `+Se+`
    `},Ue.tablerow=function(Ce){return` `+Ce+` `},Ue.tablecell=function(Ce,Se){var Me=Se.header?"th":"td",He=Se.align?"<"+Me+' align="'+Se.align+'">':"<"+Me+">";return He+Ce+" `},Ue.strong=function(Ce){return""+Ce+""},Ue.em=function(Ce){return""+Ce+""},Ue.codespan=function(Ce){return""+Ce+""},Ue.br=function(){return this.options.xhtml?"
    ":"
    "},Ue.del=function(Ce){return""+Ce+""},Ue.link=function(Ce,Se,Me){if(Ce=Le(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return Me;var He='",He},Ue.image=function(Ce,Se,Me){if(Ce=Le(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return Me;var He=''+Me+'":">",He},Ue.text=function(Ce){return Ce},Ye}(),$e=function(){function Ye(){}var Ue=Ye.prototype;return Ue.strong=function(Ce){return Ce},Ue.em=function(Ce){return Ce},Ue.codespan=function(Ce){return Ce},Ue.del=function(Ce){return Ce},Ue.html=function(Ce){return Ce},Ue.text=function(Ce){return Ce},Ue.link=function(Ce,Se,Me){return""+Me},Ue.image=function(Ce,Se,Me){return""+Me},Ue.br=function(){return""},Ye}(),bt=function(){function Ye(){this.seen={}}var Ue=Ye.prototype;return Ue.slug=function(Ce){var Se=Ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var Me=Se;do this.seen[Me]++,Se=Me+"-"+this.seen[Me];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ye}(),wt=M.defaults,It=G.unescape,ft=function(){function Ye(ke){this.options=ke||wt,this.options.renderer=this.options.renderer||new Ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new $e,this.slugger=new bt}Ye.parse=function(Ce,Se){var Me=new Ye(Se);return Me.parse(Ce)};var Ue=Ye.prototype;return Ue.parse=function(Ce,Se){Se===void 0&&(Se=!0);var Me="",He,Ge,mt,Lt,en,Jt,Ct,Et,pt,Xe,Fe,Te,Ne,xt,vt,Dt,Ht,ct,Mt=Ce.length;for(He=0;He0&&vt.tokens[0].type==="text"?(vt.tokens[0].text=ct+" "+vt.tokens[0].text,vt.tokens[0].tokens&&vt.tokens[0].tokens.length>0&&vt.tokens[0].tokens[0].type==="text"&&(vt.tokens[0].tokens[0].text=ct+" "+vt.tokens[0].tokens[0].text)):vt.tokens.unshift({type:"text",text:ct}):xt+=ct),xt+=this.parse(vt.tokens,Ne),pt+=this.renderer.listitem(xt,Ht,Dt);Me+=this.renderer.list(pt,Fe,Te);continue}case"html":{Me+=this.renderer.html(Xe.text);continue}case"paragraph":{Me+=this.renderer.paragraph(this.parseInline(Xe.tokens));continue}case"text":{for(pt=Xe.tokens?this.parseInline(Xe.tokens):Xe.text;He+1An error occurred:

    "+Qe(mt.message+"",!0)+"
    ";throw mt}}at.options=at.setOptions=function(Ye){return Ft(at.defaults,Ye),yt(at.defaults),at},at.getDefaults=ze,at.defaults=St,at.use=function(Ye){var Ue=Ft({},Ye);if(Ye.renderer&&function(){var Ce=at.defaults.renderer||new Ze,Se=function(Ge){var mt=Ce[Ge];Ce[Ge]=function(){for(var Lt=arguments.length,en=new Array(Lt),Jt=0;Jt`,triples:"",explode:"[]{}"},I=q.Pos;q.defineOption("autoCloseBrackets",!1,function(a,o,d){d&&d!=q.Init&&(a.removeKeyMap(E),a.state.closeBrackets=null),o&&(B(k(o,"pairs")),a.state.closeBrackets=o,a.addKeyMap(E))});function k(a,o){return o=="pairs"&&typeof a=="string"?a:typeof a=="object"&&a[o]!=null?a[o]:K[o]}var E={Backspace:T,Enter:p};function B(a){for(var o=0;o=0;l--){var _=A[l].head;a.replaceRange("",I(_.line,_.ch-1),I(_.line,_.ch+1),"+delete")}}function p(a){var o=x(a),d=o&&k(o,"explode");if(!d||a.getOption("disableInput"))return q.Pass;for(var A=a.listSelections(),l=0;l0;return{anchor:new I(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new I(a.head.line,a.head.ch+(o?1:-1))}}function t(a,o){var d=x(a);if(!d||a.getOption("disableInput"))return q.Pass;var A=k(d,"pairs"),l=A.indexOf(o);if(l==-1)return q.Pass;for(var m=k(d,"closeBefore"),_=k(d,"triples"),R=A.charAt(l+1)==o,w=a.listSelections(),L=l%2==0,b,g=0;g=0&&a.getRange(u,I(u.line,u.ch+3))==o+o+o?f="skipThree":f="skip";else if(R&&u.ch>1&&_.indexOf(o)>=0&&a.getRange(I(u.line,u.ch-2),u)==o+o){if(u.ch>2&&/\bstring/.test(a.getTokenTypeAt(I(u.line,u.ch-2))))return q.Pass;f="addFour"}else if(R){var h=u.ch==0?" ":a.getRange(I(u.line,u.ch-1),u);if(!q.isWordChar(y)&&h!=o&&!q.isWordChar(h))f="both";else return q.Pass}else if(L&&(y.length===0||/\s/.test(y)||m.indexOf(y)>-1))f="both";else return q.Pass;if(!b)b=f;else if(b!=f)return q.Pass}var v=l%2?A.charAt(l-1):o,P=l%2?o:A.charAt(l+1);a.operation(function(){if(b=="skip")a.execCommand("goCharRight");else if(b=="skipThree")for(var N=0;N<3;N++)a.execCommand("goCharRight");else if(b=="surround"){for(var Q=a.getSelections(),N=0;N0&&(Z.percent=Z.loaded/Z.total*100),G.onProgress(Z)});var D=new FormData;G.data&&Object.keys(G.data).forEach(function(j){var Z=G.data[j];if(Array.isArray(Z)){Z.forEach(function(te){D.append(j+"[]",te)});return}D.append(j,G.data[j])}),G.file instanceof Blob?D.append(G.filename,G.file,G.file.name):D.append(G.filename,G.file),F.onerror=function(Z){G.onError(Z)},F.onload=function(){return F.status<200||F.status>=300?G.onError(E(G,F),B(F)):G.onSuccess(B(F),F)},F.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in F&&(F.withCredentials=!0);var z=G.headers||{};return z["X-Requested-With"]!==null&&F.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(z).forEach(function(j){z[j]!==null&&F.setRequestHeader(j,z[j])}),F.send(D),{abort:function(){F.abort()}}}var x=+new Date,T=0;function p(){return"rc-upload-"+x+"-"+ ++T}function r(G,F){return G.indexOf(F,G.length-F.length)!==-1}var t=function(G,F){if(G&&F){var D=Array.isArray(F)?F:F.split(","),z=G.name||"",j=G.type||"",Z=j.replace(/\/.*$/,"");return D.some(function(te){var Ae=te.trim();return Ae.charAt(0)==="."?r(z.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?Z===Ae.replace(/\/.*$/,""):j===Ae})}return!0};function c(G,F){var D=G.createReader(),z=[];function j(){D.readEntries(function(Z){var te=Array.prototype.slice.apply(Z);z=z.concat(te);var Ae=!te.length;Ae?F(z):j()})}j()}var s=function(F,D,z){var j=function Z(te,Ae){Ae=Ae||"",te.isFile?te.file(function(he){z(he)&&(te.fullPath&&!he.webkitRelativePath&&(Object.defineProperties(he,{webkitRelativePath:{writable:!0}}),he.webkitRelativePath=te.fullPath.replace(/^\//,""),Object.defineProperties(he,{webkitRelativePath:{writable:!1}})),D([he]))}):te.isDirectory&&c(te,function(he){he.forEach(function(ce){Z(ce,""+Ae+te.name+"/")})})};F.forEach(function(Z){j(Z.webkitGetAsEntry())})},a=s,o=Object.assign||function(G){for(var F=1;F=0)continue;if(!Object.prototype.hasOwnProperty.call(G,z))continue;D[z]=G[z]}return D}function _(G,F){if(!(G instanceof F))throw new TypeError("Cannot call a class as a function")}function R(G,F){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:G}function w(G,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);G.prototype=Object.create(F&&F.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(G,F):G.__proto__=F)}var L=function(F){return Object.keys(F).reduce(function(D,z){return(z.substr(0,5)==="data-"||z.substr(0,5)==="aria-"||z==="role")&&(D[z]=F[z]),D},{})},b=function(G){w(F,G);function F(){var D,z,j,Z;_(this,F);for(var te=arguments.length,Ae=Array(te),he=0;he3&&(x=C.call(x,1));for(var p=B.length,r=0;r4&&(x=C.call(x,1,x.length-1));for(var p=x[x.length-1],r=B.length,t=0;tthis._ux||d(R-this._yi)>this._uy||this._len<5;return this.addData(M.L,_,R),this._ctx&&w&&(this._needsDash()?this._dashedLineTo(_,R):this._ctx.lineTo(_,R)),w&&(this._xi=_,this._yi=R),this},bezierCurveTo:function(_,R,w,L,b,g){return this.addData(M.C,_,R,w,L,b,g),this._ctx&&(this._needsDash()?this._dashedBezierTo(_,R,w,L,b,g):this._ctx.bezierCurveTo(_,R,w,L,b,g)),this._xi=b,this._yi=g,this},quadraticCurveTo:function(_,R,w,L){return this.addData(M.Q,_,R,w,L),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(_,R,w,L):this._ctx.quadraticCurveTo(_,R,w,L)),this._xi=w,this._yi=L,this},arc:function(_,R,w,L,b,g){return this.addData(M.A,_,R,w,w,L,b-L,0,g?0:1),this._ctx&&this._ctx.arc(_,R,w,L,b,g),this._xi=s(b)*w+_,this._yi=a(b)*w+R,this},arcTo:function(_,R,w,L,b){return this._ctx&&this._ctx.arcTo(_,R,w,L,b),this},rect:function(_,R,w,L){return this._ctx&&this._ctx.rect(_,R,w,L),this.addData(M.R,_,R,w,L),this},closePath:function(){this.addData(M.Z);var _=this._ctx,R=this._x0,w=this._y0;return _&&(this._needsDash()&&this._dashedLineTo(R,w),_.closePath()),this._xi=R,this._yi=w,this},fill:function(_){_&&_.fill(),this.toStatic()},stroke:function(_){_&&_.stroke(),this.toStatic()},setLineDash:function(_){if(_ instanceof Array){this._lineDash=_,this._dashIdx=0;for(var R=0,w=0;w<_.length;w++)R+=_[w];this._dashSum=R}return this},setLineDashOffset:function(_){return this._dashOffset=_,this},len:function(){return this._len},setData:function(_){var R=_.length;!(this.data&&this.data.length===R)&&A&&(this.data=new Float32Array(R));for(var w=0;wR.length&&(this._expandData(),R=this.data);for(var w=0;w0&&v<=_||f<0&&v>=_||f===0&&(y>0&&P<=R||y<0&&P>=R);){if(G=this._dashIdx,N=b[G],v+=f*N,P+=y*N,this._dashIdx=(G+1)%Q,f>0&&vi||y>0&&Pu)continue;g[G%2?"moveTo":"lineTo"](f>=0?t(v,_):c(v,_),y>=0?t(P,R):c(P,R))}f=v-_,y=P-R,this._dashOffset=-o(f*f+y*y)},_dashedBezierTo:function(_,R,w,L,b,g){var i=this._dashSum,u=this._dashOffset,f=this._lineDash,y=this._ctx,h=this._xi,v=this._yi,P,N,Q,G=q.cubicAt,F=0,D=this._dashIdx,z=f.length,j,Z,te=0;for(u<0&&(u=i+u),u%=i,P=0;P<1;P+=.1)N=G(h,_,w,b,P+.1)-G(h,_,w,b,P),Q=G(v,R,L,g,P+.1)-G(v,R,L,g,P),F+=o(N*N+Q*Q);for(;Du);D++);for(P=(te-u)/F;P<=1;)j=G(h,_,w,b,P),Z=G(v,R,L,g,P),D%2?y.moveTo(j,Z):y.lineTo(j,Z),P+=f[D]/F,D=(D+1)%z;D%2!==0&&y.lineTo(b,g),N=b-j,Q=g-Z,this._dashOffset=-o(N*N+Q*Q)},_dashedQuadraticTo:function(_,R,w,L){var b=w,g=L;w=(w+2*_)/3,L=(L+2*R)/3,_=(this._xi+2*_)/3,R=(this._yi+2*R)/3,this._dashedBezierTo(_,R,w,L,b,g)},toStatic:function(){var _=this.data;_ instanceof Array&&(_.length=this._len,A&&(this.data=new Float32Array(_)))},getBoundingRect:function(){x[0]=x[1]=p[0]=p[1]=Number.MAX_VALUE,T[0]=T[1]=r[0]=r[1]=-Number.MAX_VALUE;for(var _=this.data,R=0,w=0,L=0,b=0,g=0;g<_.length;){var i=_[g++];g===1&&(R=_[g],w=_[g+1],L=R,b=w);switch(i){case M.M:L=_[g++],b=_[g++],R=L,w=b,p[0]=L,p[1]=b,r[0]=L,r[1]=b;break;case M.L:I.fromLine(R,w,_[g],_[g+1],p,r),R=_[g++],w=_[g++];break;case M.C:I.fromCubic(R,w,_[g++],_[g++],_[g++],_[g++],_[g],_[g+1],p,r),R=_[g++],w=_[g++];break;case M.Q:I.fromQuadratic(R,w,_[g++],_[g++],_[g],_[g+1],p,r),R=_[g++],w=_[g++];break;case M.A:var u=_[g++],f=_[g++],y=_[g++],h=_[g++],v=_[g++],P=_[g++]+v;g+=1;var N=1-_[g++];g===1&&(L=s(v)*y+u,b=a(v)*h+f),I.fromArc(u,f,y,h,v,P,N,p,r),R=s(P)*y+u,w=a(P)*h+f;break;case M.R:L=R=_[g++],b=w=_[g++];var Q=_[g++],G=_[g++];I.fromLine(L,b,L+Q,b+G,p,r);break;case M.Z:R=L,w=b;break}K.min(x,x,p),K.max(T,T,r)}return g===0&&(x[0]=x[1]=T[0]=T[1]=0),new k(x[0],x[1],T[0]-x[0],T[1]-x[1])},rebuildPath:function(_){for(var R=this.data,w,L,b,g,i,u,f=this._ux,y=this._uy,h=this._len,v=0;vf||d(u-g)>y||v===h-1)&&(_.lineTo(i,u),b=i,g=u);break;case M.C:_.bezierCurveTo(R[v++],R[v++],R[v++],R[v++],R[v++],R[v++]),b=R[v-2],g=R[v-1];break;case M.Q:_.quadraticCurveTo(R[v++],R[v++],R[v++],R[v++]),b=R[v-2],g=R[v-1];break;case M.A:var N=R[v++],Q=R[v++],G=R[v++],F=R[v++],D=R[v++],z=R[v++],j=R[v++],Z=R[v++],te=G>F?G:F,Ae=G>F?1:G/F,he=G>F?F/G:1,ce=Math.abs(G-F)>.001,ae=D+z;ce?(_.translate(N,Q),_.rotate(j),_.scale(Ae,he),_.arc(0,0,te,D,ae,1-Z),_.scale(1/Ae,1/he),_.rotate(-j),_.translate(-N,-Q)):_.arc(N,Q,te,D,ae,1-Z),v===1&&(w=s(D)*G+N,L=a(D)*F+Q),b=s(ae)*G+N,g=a(ae)*F+Q;break;case M.R:w=b=R[v],L=g=R[v+1],_.rect(R[v++],R[v++],R[v++],R[v++]);break;case M.Z:_.closePath(),b=w,g=L}}}},l.CMD=M;var m=l;Ie.exports=m},ItGF:function(Ie,oe){var C={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?C={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?C={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?C={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:C=K(navigator.userAgent);var q=C;function K(I){var k={},E={},B=I.match(/Firefox\/([\d.]+)/),M=I.match(/MSIE\s([\d.]+)/)||I.match(/Trident\/.+?rv:(([\d.]+))/),x=I.match(/Edge\/([\d.]+)/),T=/micromessenger/i.test(I);return B&&(E.firefox=!0,E.version=B[1]),M&&(E.ie=!0,E.version=M[1]),x&&(E.edge=!0,E.version=x[1]),T&&(E.weChat=!0),{browser:E,os:k,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!E.ie&&!E.edge,pointerEventsSupported:"onpointerdown"in window&&(E.edge||E.ie&&E.version>=11),domSupported:typeof document!="undefined"}}Ie.exports=q},IxHN:function(Ie,oe,C){"use strict";var q=C("q1tI"),K=C.n(q),I=C("07cG"),k=C.n(I);oe.a=function(E){var B=E.message,M=E.className,x=E.children,T=E.style,p=T===void 0?{}:T;return K.a.createElement("div",{className:"".concat(k.a.idsRingWrapper," ").concat(M)},K.a.createElement("div",{className:k.a.ldsRing},K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null)),B?K.a.createElement("p",{style:p},B):null,x)}},JTSX:function(Ie,oe,C){Ie.exports={flex_box_center:"flex_box_center___2jvp9",flex_space_between:"flex_space_between___YQ3n3",flex_box_vertical_center:"flex_box_vertical_center___lMDl8",flex_box_center_end:"flex_box_center_end___14pJI",flex_box_column:"flex_box_column___3MPcr",banner:"banner___1CNID",wrp:"wrp___2yuj2",titleWrap:"titleWrap___3rqyq",titleFlexEnd:"titleFlexEnd___3qeo-",title:"title___1sz3A",titleIcon:"titleIcon___oKhIk",contentWrap:"contentWrap___2hSfm",verticalLine:"verticalLine___1hWY5",contentLeftWrap:"contentLeftWrap___3cPFj",openCourseTag:"openCourseTag___2nNhU",ratingWrap:"ratingWrap___QZ8mo",ratingTitle:"ratingTitle___1sMbV",rating:"rating___tJ9xt",popoverWrap:"popoverWrap___16eNE",popverLeft:"popverLeft___1EzpC",popoverRight:"popoverRight___1dYpr",popverScore:"popverScore___2QZ2F",popoverRateWrap:"popoverRateWrap___2O45Q",popoverProgress:"popoverProgress___2jOeY",button:"button___1WaHd",operationWrap:"operationWrap___3_Xdi",forkWrap:"forkWrap___36Nap",fork:"fork___1AtQN",forkNum:"forkNum___3b1MG",buttonTransparent:"buttonTransparent___INxBh",buttonLearnStatistics:"buttonLearnStatistics___350-U",publishPopverWrap:"publishPopverWrap___2uMcI",colorFF6802:"colorFF6802___W5JBU",w140:"w140___20QZ6",nav:"nav___UcDQM",navLeft:"navLeft___1IpLj",navContent:"navContent___g-IkK",flexRow:"flexRow___2Srtn",navRight:"navRight___1wX_D",navLeftIcon:"navLeftIcon___33sNL",colorOrange:"colorOrange___1lWTV",contentItem:"contentItem___3BAmt",contentItemTitle:"contentItemTitle___3X1lp",contentItemText:"contentItemText___2Px0w",classButton:"classButton___1uAy6",bg28e:"bg28e___34ke7",bgGray:"bgGray___1wX3O"}},JWDV:function(Ie,oe,C){Ie.exports=C.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(Ie,oe,C){Ie.exports=C.p+"static/qrcode.2267e4d5.png"},K2GJ:function(Ie,oe,C){var q=C("fW2E"),K=C("gut8"),I=K.ContextCachedBy,k=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],E=function(t){this.extendFrom(t,!1)};function B(t,c,s){var a=c.x==null?0:c.x,o=c.x2==null?1:c.x2,d=c.y==null?0:c.y,A=c.y2==null?0:c.y2;c.global||(a=a*s.width+s.x,o=o*s.width+s.x,d=d*s.height+s.y,A=A*s.height+s.y),a=isNaN(a)?0:a,o=isNaN(o)?1:o,d=isNaN(d)?0:d,A=isNaN(A)?0:A;var l=t.createLinearGradient(a,d,o,A);return l}function M(t,c,s){var a=s.width,o=s.height,d=Math.min(a,o),A=c.x==null?.5:c.x,l=c.y==null?.5:c.y,m=c.r==null?.5:c.r;c.global||(A=A*a+s.x,l=l*o+s.y,m=m*d);var _=t.createRadialGradient(A,l,0,A,l,m);return _}E.prototype={constructor:E,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,c,s){var a=this,o=s&&s.style,d=!o||t.__attrCachedBy!==I.STYLE_BIND;t.__attrCachedBy=I.STYLE_BIND;for(var A=0;A0},extendFrom:function(t,c){if(t)for(var s in t)t.hasOwnProperty(s)&&(c===!0||(c===!1?!this.hasOwnProperty(s):t[s]!=null))&&(this[s]=t[s])},set:function(t,c){typeof t=="string"?this[t]=c:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,c,s){for(var a=c.type==="radial"?M:B,o=a(t,c,s),d=c.colorStops,A=0;A=0)continue;if(!Object.prototype.hasOwnProperty.call(t,a))continue;s[a]=t[a]}return s}function x(t,c){if(!(t instanceof c))throw new TypeError("Cannot call a class as a function")}function T(t,c){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:t}function p(t,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);t.prototype=Object.create(c&&c.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(t,c):t.__proto__=c)}var r=function(t){p(c,t);function c(s){x(this,c);var a=T(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,s));return a.scrollListener=a.scrollListener.bind(a),a.eventListenerOptions=a.eventListenerOptions.bind(a),a.mousewheelListener=a.mousewheelListener.bind(a),a}return q(c,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var a=this.getParentElement(this.scrollComponent);a.scrollTop=a.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var a=!1,o={get passive(){a=!0}};try{document.addEventListener("test",null,o),document.removeEventListener("test",null,o)}catch(d){}return a}},{key:"eventListenerOptions",value:function(){var a=this.props.useCapture;return this.isPassiveSupported()&&(a={useCapture:this.props.useCapture,passive:!0}),a}},{key:"setDefaultLoader",value:function(a){this.defaultLoader=a}},{key:"detachMousewheelListener",value:function(){var a=window;this.props.useWindow===!1&&(a=this.scrollComponent.parentNode),a.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var a=window;this.props.useWindow===!1&&(a=this.getParentElement(this.scrollComponent)),a.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),a.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(a){var o=this.props.getScrollParent&&this.props.getScrollParent();return o!=null?o:a&&a.parentNode}},{key:"filterProps",value:function(a){return a}},{key:"attachScrollListener",value:function(){var a=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!a)return;var o=window;this.props.useWindow===!1&&(o=a),o.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),o.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),o.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}},{key:"mousewheelListener",value:function(a){a.deltaY===1&&!this.isPassiveSupported()&&a.preventDefault()}},{key:"scrollListener",value:function(){var a=this.scrollComponent,o=window,d=this.getParentElement(a),A=void 0;if(this.props.useWindow){var l=document.documentElement||document.body.parentNode||document.body,m=o.pageYOffset!==void 0?o.pageYOffset:l.scrollTop;this.props.isReverse?A=m:A=this.calculateOffset(a,m)}else this.props.isReverse?A=d.scrollTop:A=a.scrollHeight-d.scrollTop-d.clientHeight;A1&&arguments[1]!==void 0?arguments[1]:1,ke=$e.length,Ce=0;Ce1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(D).map(function(j,Z){if(!E.isValidElement(j)||!j.type)return null;var te=j.type.isSelectOptGroup,Ae=j.key,he=j.props,ce=he.children,ae=Object(M.a)(he,["children"]);return z||!te?b(j):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?Z:Ae,"__"),label:Ae},ae),{},{options:g(ce)})}).filter(function(j){return j})}var i=C("2Qr1"),u=C("qNPg"),f=C("U8pU"),y=C("Kwbf"),h=C("WKfj");function v(D){var z=D.mode,j=D.options,Z=D.children,te=D.backfill,Ae=D.allowClear,he=D.placeholder,ce=D.getInputElement,ae=D.showSearch,ve=D.onSearch,ue=D.defaultOpen,fe=D.autoFocus,se=D.labelInValue,me=D.value,re=D.inputValue,pe=D.optionLabelProp,De=z==="multiple"||z==="tags",we=ae!==void 0?ae:De||z==="combobox",je=j||g(Z);if(Object(y.a)(z!=="tags"||je.every(function(Ze){return!Ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var et=je.some(function(Ze){return Ze.options?Ze.options.some(function($e){return typeof("value"in $e?$e.value:$e.key)=="number"}):typeof("value"in Ze?Ze.value:Ze.key)=="number"});Object(y.a)(!et,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(y.a)(z!=="combobox"||!pe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)(z==="combobox"||!te,"`backfill` only works with `combobox` mode."),Object(y.a)(z==="combobox"||!ce,"`getInputElement` only work with `combobox` mode."),Object(y.b)(z!=="combobox"||!ce||!Ae||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ve&&!we&&z!=="combobox"&&z!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!ue||fe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),me!=null){var Le=Object(h.d)(me);Object(y.a)(!se||Le.every(function(Ze){return Object(f.a)(Ze)==="object"&&("key"in Ze||"value"in Ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(y.a)(!De||Array.isArray(me),"`value` should be array when `mode` is `multiple` or `tags`")}if(Z){var We=null;Object(L.a)(Z).some(function(Ze){if(!E.isValidElement(Ze)||!Ze.type)return!1;var $e=Ze.type;if($e.isSelectOption)return!1;if($e.isSelectOptGroup){var bt=Object(L.a)(Ze.props.children).every(function(wt){return!E.isValidElement(wt)||!Ze.type||wt.type.isSelectOption?!0:(We=wt.type,!1)});return!bt}return We=$e,!0}),We&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(We.displayName||We.name||We,"`.")),Object(y.a)(re===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=v,N=Object(u.a)({prefixCls:"rc-select",components:{optionList:A},convertChildrenToData:g,flattenOptions:i.d,getLabeledValue:i.e,filterOptions:i.b,isValueDisabled:i.g,findValueOption:i.c,warningProps:P,fillOptionsWithMissingValue:i.a}),Q=function(D){Object(I.a)(j,D);var z=Object(k.a)(j);function j(){var Z;return Object(q.a)(this,j),Z=z.apply(this,arguments),Z.selectRef=E.createRef(),Z.focus=function(){Z.selectRef.current.focus()},Z.blur=function(){Z.selectRef.current.blur()},Z}return Object(K.a)(j,[{key:"render",value:function(){return E.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),j}(E.Component);Q.Option=m,Q.OptGroup=R;var G=Q,F=oe.c=G},M8RZ:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return T});var q=C("fWQN"),K=C("mtLc"),I=C("yKVA"),k=C("879j"),E=C("q1tI"),B=C.n(E),M=C("i8i4"),x=C.n(M),T=function(p){Object(I.a)(t,p);var r=Object(k.a)(t);function t(c){var s;Object(q.a)(this,t),s=r.call(this,c);var a=window.document;return s.node=a.createElement("div"),a.body.appendChild(s.node),s}return Object(K.a)(t,[{key:"render",value:function(){var s=this.props.children;return Object(M.createPortal)(s,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(B.a.Component)},MEGo:function(Ie,oe,C){var q=C("4fz+"),K=C("Dagg"),I=C("dqUG"),k=C("2fw6"),E=C("x6Kt"),B=C("rmlV"),M=C("yxFR"),x=C("y+Vt"),T=C("h7HQ"),p=C("1Jh7"),r=C("SKnc"),t=C("K2GJ"),c=C("Fofx"),s=C("NC18"),a=s.createFromString,o=C("bYtY"),d=o.isString,A=o.extend,l=o.defaults,m=o.trim,_=o.each,R=/[\s,]+/;function w(j){if(d(j)){var Z=new DOMParser;j=Z.parseFromString(j,"text/xml")}for(j.nodeType===9&&(j=j.firstChild);j.nodeName.toLowerCase()!=="svg"||j.nodeType!==1;)j=j.nextSibling;return j}function L(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}L.prototype.parse=function(j,Z){Z=Z||{};var te=w(j);if(!te)throw new Error("Illegal svg");var Ae=new q;this._root=Ae;var he=te.getAttribute("viewBox")||"",ce=parseFloat(te.getAttribute("width")||Z.width),ae=parseFloat(te.getAttribute("height")||Z.height);isNaN(ce)&&(ce=null),isNaN(ae)&&(ae=null),h(te,Ae,null,!0);for(var ve=te.firstChild;ve;)this._parseNode(ve,Ae),ve=ve.nextSibling;var ue,fe;if(he){var se=m(he).split(R);se.length>=4&&(ue={x:parseFloat(se[0]||0),y:parseFloat(se[1]||0),width:parseFloat(se[2]),height:parseFloat(se[3])})}if(ue&&ce!=null&&ae!=null&&(fe=D(ue,ce,ae),!Z.ignoreViewBox)){var me=Ae;Ae=new q,Ae.add(me),me.scale=fe.scale.slice(),me.position=fe.position.slice()}return!Z.ignoreRootClip&&ce!=null&&ae!=null&&Ae.setClipPath(new E({shape:{x:0,y:0,width:ce,height:ae}})),{root:Ae,width:ce,height:ae,viewBoxRect:ue,viewBoxTransform:fe}},L.prototype._parseNode=function(j,Z){var te=j.nodeName.toLowerCase();te==="defs"?this._isDefine=!0:te==="text"&&(this._isText=!0);var Ae;if(this._isDefine){var he=g[te];if(he){var ce=he.call(this,j),ae=j.getAttribute("id");ae&&(this._defs[ae]=ce)}}else{var he=b[te];he&&(Ae=he.call(this,j,Z),Z.add(Ae))}for(var ve=j.firstChild;ve;)ve.nodeType===1&&this._parseNode(ve,Ae),ve.nodeType===3&&this._isText&&this._parseText(ve,Ae),ve=ve.nextSibling;te==="defs"?this._isDefine=!1:te==="text"&&(this._isText=!1)},L.prototype._parseText=function(j,Z){if(j.nodeType===1){var te=j.getAttribute("dx")||0,Ae=j.getAttribute("dy")||0;this._textX+=parseFloat(te),this._textY+=parseFloat(Ae)}var he=new I({style:{text:j.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});u(Z,he),h(j,he,this._defs);var ce=he.style.fontSize;ce&&ce<9&&(he.style.fontSize=9,he.scale=he.scale||[1,1],he.scale[0]*=ce/9,he.scale[1]*=ce/9);var ae=he.getBoundingRect();return this._textX+=ae.width,Z.add(he),he};var b={g:function(j,Z){var te=new q;return u(Z,te),h(j,te,this._defs),te},rect:function(j,Z){var te=new E;return u(Z,te),h(j,te,this._defs),te.setShape({x:parseFloat(j.getAttribute("x")||0),y:parseFloat(j.getAttribute("y")||0),width:parseFloat(j.getAttribute("width")||0),height:parseFloat(j.getAttribute("height")||0)}),te},circle:function(j,Z){var te=new k;return u(Z,te),h(j,te,this._defs),te.setShape({cx:parseFloat(j.getAttribute("cx")||0),cy:parseFloat(j.getAttribute("cy")||0),r:parseFloat(j.getAttribute("r")||0)}),te},line:function(j,Z){var te=new M;return u(Z,te),h(j,te,this._defs),te.setShape({x1:parseFloat(j.getAttribute("x1")||0),y1:parseFloat(j.getAttribute("y1")||0),x2:parseFloat(j.getAttribute("x2")||0),y2:parseFloat(j.getAttribute("y2")||0)}),te},ellipse:function(j,Z){var te=new B;return u(Z,te),h(j,te,this._defs),te.setShape({cx:parseFloat(j.getAttribute("cx")||0),cy:parseFloat(j.getAttribute("cy")||0),rx:parseFloat(j.getAttribute("rx")||0),ry:parseFloat(j.getAttribute("ry")||0)}),te},polygon:function(j,Z){var te=j.getAttribute("points");te&&(te=f(te));var Ae=new T({shape:{points:te||[]}});return u(Z,Ae),h(j,Ae,this._defs),Ae},polyline:function(j,Z){var te=new x;u(Z,te),h(j,te,this._defs);var Ae=j.getAttribute("points");Ae&&(Ae=f(Ae));var he=new p({shape:{points:Ae||[]}});return he},image:function(j,Z){var te=new K;return u(Z,te),h(j,te,this._defs),te.setStyle({image:j.getAttribute("xlink:href"),x:j.getAttribute("x"),y:j.getAttribute("y"),width:j.getAttribute("width"),height:j.getAttribute("height")}),te},text:function(j,Z){var te=j.getAttribute("x")||0,Ae=j.getAttribute("y")||0,he=j.getAttribute("dx")||0,ce=j.getAttribute("dy")||0;this._textX=parseFloat(te)+parseFloat(he),this._textY=parseFloat(Ae)+parseFloat(ce);var ae=new q;return u(Z,ae),h(j,ae,this._defs),ae},tspan:function(j,Z){var te=j.getAttribute("x"),Ae=j.getAttribute("y");te!=null&&(this._textX=parseFloat(te)),Ae!=null&&(this._textY=parseFloat(Ae));var he=j.getAttribute("dx")||0,ce=j.getAttribute("dy")||0,ae=new q;return u(Z,ae),h(j,ae,this._defs),this._textX+=he,this._textY+=ce,ae},path:function(j,Z){var te=j.getAttribute("d")||"",Ae=a(te);return u(Z,Ae),h(j,Ae,this._defs),Ae}},g={lineargradient:function(j){var Z=parseInt(j.getAttribute("x1")||0,10),te=parseInt(j.getAttribute("y1")||0,10),Ae=parseInt(j.getAttribute("x2")||10,10),he=parseInt(j.getAttribute("y2")||0,10),ce=new r(Z,te,Ae,he);return i(j,ce),ce},radialgradient:function(j){}};function i(j,Z){for(var te=j.firstChild;te;){if(te.nodeType===1){var Ae=te.getAttribute("offset");Ae.indexOf("%")>0?Ae=parseInt(Ae,10)/100:Ae?Ae=parseFloat(Ae):Ae=0;var he=te.getAttribute("stop-color")||"#000000";Z.addColorStop(Ae,he)}te=te.nextSibling}}function u(j,Z){j&&j.__inheritedStyle&&(Z.__inheritedStyle||(Z.__inheritedStyle={}),l(Z.__inheritedStyle,j.__inheritedStyle))}function f(j){for(var Z=m(j).split(R),te=[],Ae=0;Ae0;ce-=2){var ae=he[ce],ve=he[ce-1];Ae=Ae||c.create();switch(ve){case"translate":ae=m(ae).split(R),c.translate(Ae,Ae,[parseFloat(ae[0]),parseFloat(ae[1]||0)]);break;case"scale":ae=m(ae).split(R),c.scale(Ae,Ae,[parseFloat(ae[0]),parseFloat(ae[1]||ae[0])]);break;case"rotate":ae=m(ae).split(R),c.rotate(Ae,Ae,parseFloat(ae[0]));break;case"skew":ae=m(ae).split(R),console.warn("Skew transform is not supported yet");break;case"matrix":var ae=m(ae).split(R);Ae[0]=parseFloat(ae[0]),Ae[1]=parseFloat(ae[1]),Ae[2]=parseFloat(ae[2]),Ae[3]=parseFloat(ae[3]),Ae[4]=parseFloat(ae[4]),Ae[5]=parseFloat(ae[5]);break}}Z.setLocalTransform(Ae)}}var G=/([^\s:;]+)\s*:\s*([^:;]+)/g;function F(j){var Z=j.getAttribute("style"),te={};if(!Z)return te;var Ae={};G.lastIndex=0;for(var he;(he=G.exec(Z))!=null;)Ae[he[1]]=he[2];for(var ce in y)y.hasOwnProperty(ce)&&Ae[ce]!=null&&(te[y[ce]]=Ae[ce]);return te}function D(j,Z,te){var Ae=Z/j.width,he=te/j.height,ce=Math.min(Ae,he),ae=[ce,ce],ve=[-(j.x+j.width/2)*ce+Z/2,-(j.y+j.height/2)*ce+te/2];return{scale:ae,position:ve}}function z(j,Z){var te=new L;return te.parse(j,Z)}oe.parseXML=w,oe.makeViewBoxTransform=D,oe.parseSVG=z},MKOG:function(Ie,oe,C){var q=C("bYtY"),K=C("YH21"),I=K.Dispatcher,k=C("mLcG"),E=C("Bq2U"),B=function(x){x=x||{},this.stage=x.stage||{},this.onframe=x.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,I.call(this)};B.prototype={constructor:B,addClip:function(x){this._clips.push(x)},addAnimator:function(x){x.animation=this;for(var T=x.getClips(),p=0;p=0&&this._clips.splice(T,1)},removeAnimator:function(x){for(var T=x.getClips(),p=0;p1&&(b*=k(P),g*=k(P));var N=(w===L?-1:1)*k((b*b*(g*g)-b*b*(v*v)-g*g*(h*h))/(b*b*(v*v)+g*g*(h*h)))||0,Q=N*b*v/g,G=N*-g*h/b,F=(l+_)/2+B(y)*Q-E(y)*G,D=(m+R)/2+E(y)*Q+B(y)*G,z=p([1,0],[(h-Q)/b,(v-G)/g]),j=[(h-Q)/b,(v-G)/g],Z=[(-1*h-Q)/b,(-1*v-G)/g],te=p(j,Z);T(j,Z)<=-1&&(te=M),T(j,Z)>=1&&(te=0),L===0&&te>0&&(te=te-2*M),L===1&&te<0&&(te=te+2*M),f.addData(u,F,D,b,g,z,te,y,L)}var t=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,c=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function s(l){if(!l)return new K;for(var m=0,_=0,R=m,w=_,L,b=new K,g=K.CMD,i=l.match(t),u=0;u1&&arguments[1]!==void 0?arguments[1]:!1;return!!(_(u)&&R(f))},_=function(u){return Object(r.p)()?!0:(u({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},R=function(){var u,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,y=Object(p.c)()._store.getState(),h=y.user;return(u=h.userInfo)!==null&&u!==void 0&&u.profile_completed?!0:(E.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:f?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){p.d.push("/account/profile/edit")}}),!1)},w=function(){var u,f=Object(p.c)()._store.getState(),y=f.user;return(u=y.userInfo)!==null&&u!==void 0&&u.professional_certification?!0:(E.a.confirm({title:"\u63D0\u793A",centered:!0,content:T.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(t.S)("/account/certification")}}),!1)},L=function(){return Object(r.a)()?!0:(E.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:T.a.createElement("div",{className:"tc",style:{marginLeft:-38}},T.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),T.a.createElement("img",{src:l.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},b=function(u,f){return u?!0:(E.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:T.a.createElement("div",null,T.a.createElement("p",null,f||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),T.a.createElement("div",{style:{marginLeft:"110px"}},T.a.createElement("img",{src:d.a,width:200}),T.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(t.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},g=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",y=Object(p.c)()._store.getState(),h=y.shixunsDetail.detail;return(h==null?void 0:h.public)===2||(h==null?void 0:h.public)===1||(h==null?void 0:h.shixun_status)===3?(E.a.info({centered:!0,icon:T.a.createElement(c.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:T.a.createElement("div",{className:"tc",style:{marginLeft:-38}},T.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},T.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(h==null?void 0:h.public)===2?"\u5DF2\u516C\u5F00":(h==null?void 0:h.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",f,"\u3002"),T.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),T.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:a.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(h==null?void 0:h.shixun_status)===2?(E.a.confirm({centered:!0,icon:T.a.createElement(c.a,null),title:"\u63D0\u793A",content:T.a.createElement("div",null,T.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",f,"\u3002"),T.a.createElement("br",null),T.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){E.a.confirm({width:440,centered:!0,icon:T.a.createElement(c.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var P=Object(I.a)(M.a.mark(function Q(){var G;return M.a.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,u({type:"shixunsDetail/cancelRelease",payload:{id:h==null?void 0:h.identifier}});case 2:G=D.sent,G.status!==401&&(K.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),u({type:"shixunsDetail/getShixunsDetail",payload:{id:h==null?void 0:h.identifier}}),u({type:"practiceSetting/getCommonData",payload:{id:h==null?void 0:h.identifier}}));case 4:case"end":return D.stop()}},Q)}));function N(){return P.apply(this,arguments)}return N}()})}}),!0):!1}},Nddv:function(Ie,oe,C){Ie.exports=C.p+"static/sz.d6b17ad9.svg"},Nmxd:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NoGO:function(Ie,oe,C){Ie.exports=C.p+"static/newqrcode.d852fdfc.png"},NohK:function(Ie,oe,C){"use strict";Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=void 0;var q=function(I){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,E=null;return function(){for(var B=this,M=arguments.length,x=new Array(M),T=0;T=0;o-=1){var d=x.get(o)||new Set;d.forEach(function(A){var l=A.parent,m=A.node;if(p(m)||!A.parent||a.has(A.parent.key))return;if(p(A.parent.node)){a.add(l.key);return}var _=!0,R=!1;(l.children||[]).filter(function(w){return!p(w.node)}).forEach(function(w){var L=w.key,b=r.has(L);_&&!b&&(_=!1),!R&&(b||t.has(L))&&(R=!0)}),_&&r.add(l.key),R&&t.add(l.key),a.add(l.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(K(t,r))}}function E(M,x,T,p,r){for(var t=new Set(M),c=new Set(x),s=0;s<=p;s+=1){var a=T.get(s)||new Set;a.forEach(function(l){var m=l.key,_=l.node,R=l.children,w=R===void 0?[]:R;!t.has(m)&&!c.has(m)&&!r(_)&&w.filter(function(L){return!r(L.node)}).forEach(function(L){t.delete(L.key)})})}c=new Set;for(var o=new Set,d=p;d>=0;d-=1){var A=T.get(d)||new Set;A.forEach(function(l){var m=l.parent,_=l.node;if(r(_)||!l.parent||o.has(l.parent.key))return;if(r(l.parent.node)){o.add(m.key);return}var R=!0,w=!1;(m.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var b=L.key,g=t.has(b);R&&!g&&(R=!1),!w&&(g||c.has(b))&&(w=!0)}),R||t.delete(m.key),w&&c.add(m.key),o.add(m.key)})}return{checkedKeys:Array.from(t),halfCheckedKeys:Array.from(K(c,t))}}function B(M,x,T,p){var r=[],t;p?t=p:t=I;var c=new Set(M.filter(function(d){var A=!!T[d];return A||r.push(d),A})),s=new Map,a=0;Object.keys(T).forEach(function(d){var A=T[d],l=A.level,m=s.get(l);m||(m=new Set,s.set(l,m)),m.add(A),a=Math.max(a,l)}),Object(q.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var o;return x===!0?o=k(c,s,a,t):o=E(c,x.halfCheckedKeys,s,a,t),o}},OC45:function(Ie,oe,C){Ie.exports={applyPublicContainer:"applyPublicContainer___3sK8L",applyPublicContent:"applyPublicContent___3Hye1",spin:"spin___3-Uh7",tips:"tips___3d-sF",action:"action___3Uny2"}},OLES:function(Ie,oe,C){"use strict";var q=C("U8pU"),K=C("VTBJ"),I=C("Ff2n"),k=C("q1tI"),E=C("uciX"),B=C("7ixt"),M=function(c){var s=c.overlay,a=c.prefixCls,o=c.id,d=c.overlayInnerStyle;return k.createElement("div",{className:"".concat(a,"-inner"),id:o,role:"tooltip",style:d},typeof s=="function"?s():s)},x=M,T=function(c,s){var a=c.overlayClassName,o=c.trigger,d=o===void 0?["hover"]:o,A=c.mouseEnterDelay,l=A===void 0?0:A,m=c.mouseLeaveDelay,_=m===void 0?.1:m,R=c.overlayStyle,w=c.prefixCls,L=w===void 0?"rc-tooltip":w,b=c.children,g=c.onVisibleChange,i=c.afterVisibleChange,u=c.transitionName,f=c.animation,y=c.placement,h=y===void 0?"right":y,v=c.align,P=v===void 0?{}:v,N=c.destroyTooltipOnHide,Q=N===void 0?!1:N,G=c.defaultVisible,F=c.getTooltipContainer,D=c.overlayInnerStyle,z=Object(I.a)(c,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),j=Object(k.useRef)(null);Object(k.useImperativeHandle)(s,function(){return j.current});var Z=Object(K.a)({},z);"visible"in c&&(Z.popupVisible=c.visible);var te=function(){var ve=c.arrowContent,ue=ve===void 0?null:ve,fe=c.overlay,se=c.id;return[k.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},ue),k.createElement(x,{key:"content",prefixCls:L,id:se,overlay:fe,overlayInnerStyle:D})]},Ae=!1,he=!1;if(typeof Q=="boolean")Ae=Q;else if(Q&&Object(q.a)(Q)==="object"){var ce=Q.keepParent;Ae=ce===!0,he=ce===!1}return k.createElement(E.a,Object.assign({popupClassName:a,prefixCls:L,popup:te,action:d,builtinPlacements:B.a,popupPlacement:h,ref:j,popupAlign:P,getPopupContainer:F,onPopupVisibleChange:g,afterPopupVisibleChange:i,popupTransitionName:u,popupAnimation:f,defaultPopupVisible:G,destroyPopupOnHide:Ae,autoDestroy:he,mouseLeaveDelay:_,popupStyle:R,mouseEnterDelay:l},Z),b)},p=Object(k.forwardRef)(T),r=oe.a=p},OS9S:function(Ie,oe,C){var q=C("bYtY"),K=q.inherits,I=C("Gev7"),k=C("mFDi");function E(x){I.call(this,x),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}E.prototype.incremental=!0,E.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},E.prototype.addDisplayable=function(x,T){T?this._temporaryDisplayables.push(x):this._displayables.push(x),this.dirty()},E.prototype.addDisplayables=function(x,T){T=T||!1;for(var p=0;p=0&&b.splice(g,1),b}function r(w,L){var b=w.slice();return b.indexOf(L)===-1&&b.push(L),b}function t(w){return w.split("-")}function c(w,L){return"".concat(w,"-").concat(L)}function s(w){return w&&w.type&&w.type.isTreeNode}function a(w,L){var b=[w],g=L[w];function i(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];u.forEach(function(f){var y=f.key,h=f.children;b.push(y),i(h)})}return i(g.children),b}function o(w,L){var b=w.clientY,g=L.selectHandle.getBoundingClientRect(),i=g.top,u=g.bottom,f=g.height,y=Math.max(f*x,T);return b<=i+y?-1:b>=u-y?1:0}function d(w,L){if(!w)return;var b=L.multiple;return b?w.slice():w.length?[w[0]]:w}var A=function(L){return L};function l(w,L){if(!w)return[];var b=L||{},g=b.processProps,i=g===void 0?A:g,u=Array.isArray(w)?w:[w];return u.map(function(f){var y=f.children,h=Object(I.a)(f,["children"]),v=l(y,L);return E.a.createElement(M.a,Object.assign({},i(h)),v)})}function m(w){if(!w)return null;var L;if(Array.isArray(w))L={checkedKeys:w,halfCheckedKeys:void 0};else if(Object(K.a)(w)==="object")L={checkedKeys:w.checked||void 0,halfCheckedKeys:w.halfChecked||void 0};else return Object(B.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function _(w,L){var b=new Set;function g(i){if(b.has(i))return;var u=L[i];if(!u)return;b.add(i);var f=u.parent,y=u.node;if(y.disabled)return;f&&g(f.key)}return(w||[]).forEach(function(i){g(i)}),Object(q.a)(b)}function R(w){var L={};return Object.keys(w).forEach(function(b){(b.startsWith("data-")||b.startsWith("aria-"))&&(L[b]=w[b])}),L}},Ohmc:function(Ie,oe,C){Ie.exports=C.p+"static/certificate.fc32dc1b.jpg"},OljG:function(Ie,oe,C){Ie.exports=C.p+"static/banner.4c45dd73.png"},Ot1p:function(Ie,oe,C){"use strict";var q=C("2qtc"),K=C("kLXV"),I=C("rAM+"),k=C("miYZ"),E=C("tsqr"),B=C("9og8"),M=C("tJVT"),x=C("jrin"),T=C("WmNS"),p=C.n(T),r=C("q1tI"),t=C.n(r),c=C("VrN/"),s=C.n(c),a=C("bdgK"),o=C("p77/"),d=C("Bd2K"),A=C("ELLl"),l=C("19Vz"),m=C("lZu9"),_=C("+NIl"),R=C("kSUc"),w=C("9Bee"),L=function(Ge){var mt=Ge.value,Lt=mt===void 0?"":mt,en=Ge.className,Jt=Ge.showTextOnly,Ct=Ge.showLines,Et=Ge.style,pt=Et===void 0?{}:Et,Xe=Object(r.useMemo)(function(){return""},[Lt]);return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{dangerouslySetInnerHTML:{__html:Xe}}))},b=C("0Owb"),g=C("dejd"),i=C("C+DQ"),u=C("1vsH"),f=C("m3rI"),y=[{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 h(Ge){var mt=Ge.onActionCallback,Lt=Ge.title,en=Ge.icon,Jt=Ge.actionName,Ct=Ge.className,Et=Ct===void 0?"":Ct,pt=Ge.children;function Xe(){mt(Jt)}return t.a.createElement("a",{title:Lt,className:Et,onClick:Xe},t.a.createElement("i",{className:"md-iconfont ".concat(en)}),pt)}var v=function(Ge){var mt=Ge.watch,Lt=Ge.showNullButton,en=Ge.onActionCallback,Jt=Ge.fullScreen,Ct=Ge.insertTemp,Et=Ge.hidetoolBar,pt=Ge.uuid,Xe=Ge.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(u.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(u.F)("_educoder_session"),"&key=").concat(pt,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var Fe=[].concat(y,[{title:"".concat(mt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(mt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return t.a.createElement("ul",{className:"markdown-toolbar-container"},!Et&&Fe.map(function(Te,Ne){return t.a.createElement("li",{key:Ne},Te.actionName?t.a.createElement(h,Object(b.a)({},Te,{onActionCallback:en})):t.a.createElement("span",{className:"v-line"}))}),Lt?t.a.createElement("li",null,t.a.createElement(h,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:en},t.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ct&&t.a.createElement("li",null,t.a.createElement(h,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ct),onActionCallback:en},t.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),t.a.createElement("li",{className:"btn-full-screen"},t.a.createElement(h,{icon:"".concat(Jt?"icon-shrink":"icon-enlarge"),title:Jt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:en})))},P=C("M8RZ"),N=C("+L6B"),Q=C("2/Rp"),G=C("y8nQ"),F=C("Vl3Y"),D=C("5NDa"),z=C("5rEg"),j={labelCol:{span:4},wrapperCol:{span:20}},Z=function(Ge){var mt=Ge.callback,Lt=Ge.onCancel;function en(Jt){mt(Jt)}return t.a.createElement(F.a,Object(b.a)({},j,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:en}),t.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},t.a.createElement(z.a,null)),t.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},t.a.createElement(z.a,null)),t.a.createElement("div",{className:"flex-container flex-end"},t.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(Q.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))},te=C("7ahc"),Ae=C("HmJG"),he=C("BjJ7"),ce=F.a.useForm,ae={width:280,marginRight:10},ve={labelCol:{span:5},wrapperCol:{span:19}},ue=function(Ge){var mt=Ge.callback,Lt=Ge.onCancel,en=ce(),Jt=Object(M.a)(en,1),Ct=Jt[0];function Et(Fe){mt(Fe)}function pt(Fe,Te){if(Fe.status===-1){E.b.error(Fe.message);return}Ct.setFieldsValue({src:"/api/attachments/".concat(Fe.id),type:Te.type})}function Xe(Fe){var Te=Fe.target.files[0];se(Te,pt)}return t.a.createElement(F.a,Object(b.a)({form:Ct},ve,{className:"upload-image-panel",onFinish:Et}),t.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},t.a.createElement("div",{className:"flex-container"},t.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},t.a.createElement(z.a,{style:ae})),t.a.createElement(fe,{onFileChange:Xe}))),t.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},t.a.createElement(z.a,{style:{width:264}})),t.a.createElement(F.a.Item,{style:{textAlign:"right"}},t.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(Q.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))};function fe(Ge){var mt=Ge.onFileChange;return t.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",t.a.createElement("input",{type:"file",onChange:mt}))}function se(Ge,mt){if(!Ge)throw new String("\u6CA1\u6709\u6587\u4EF6");var Lt=new FormData;Lt.append("editormd-image-file",Ge),Lt.append("file_param_name","editormd-image-file"),Lt.append("byxhr","true");var en=new window.XMLHttpRequest;en.withCredentials=!0,en.addEventListener("load",function(Jt){mt(JSON.parse(Jt.target.responseText),Ge)},!1),en.addEventListener("error",function(Jt){console.error(Jt)},!1),en.open("POST","".concat(he.a,"/api/attachments.json")),en.send(Lt)}var me=C("giR+"),re=C("fyUT"),pe=C("7Kak"),De=C("9yH6"),we=De.a.Group,je={margin:"0 8px"},et=function(Ge){var mt=Ge.callback,Lt=Ge.onCancel;function en(Jt){mt(Jt)}return t.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:en},t.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},t.a.createElement("span",{style:je},"\u5355\u5143\u683C\u6570\uFF1A"),t.a.createElement("span",{style:je},"\u884C\u6570"),t.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},t.a.createElement(re.a,null)),t.a.createElement("span",{style:je},"\u5217\u6570"),t.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},t.a.createElement(re.a,null))),t.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},t.a.createElement("span",{style:je},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),t.a.createElement(F.a.Item,{name:"align"},t.a.createElement(we,null,t.a.createElement(De.a,{value:"default"},t.a.createElement("i",{className:"fa fa-align-justify"})),t.a.createElement(De.a,{value:"left"},t.a.createElement("i",{className:"fa fa-align-left"})),t.a.createElement(De.a,{value:"center"},t.a.createElement("i",{className:"fa fa-align-center"})),t.a.createElement(De.a,{value:"right"},t.a.createElement("i",{className:"fa fa-align-right"}))))),t.a.createElement("div",{className:"flex-container flex-end"},t.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(Q.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))},Le=C("ErOA"),We=C("7Cbv"),Ze="link",$e="upload-image",bt="code-block",wt="add-table",It="------------",ft={default:It,left:":".concat(It),center:":".concat(It,":"),right:"".concat(It,":")},Ft=C("9VGf"),zt,Qe;function ze(){}var yt=0,St=1e4,at="\u2581",Ot=` **\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 Ye(Ge){return/^\d+$/.test(Ge)?"".concat(Ge,"px"):Ge}var Ue=navigator.platform.toUpperCase().indexOf("MAC")>=0,ke=Ue?"Cmd":"Ctrl",Ce=["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"],Se=(zt={},Object(x.a)(zt,ke+"-B","bold"),Object(x.a)(zt,ke+"-I","italic"),zt),Me=(Qe={},Object(x.a)(Qe,Ze,"\u6DFB\u52A0\u94FE\u63A5"),Object(x.a)(Qe,bt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(x.a)(Qe,$e,"\u6DFB\u52A0\u6587\u4EF6"),Object(x.a)(Qe,wt,"\u6DFB\u52A0\u8868\u683C"),Qe),He=oe.a=function(Ge){var mt=Ge.defaultValue,Lt=mt===void 0?"":mt,en=Ge.onChange,Jt=Ge.width,Ct=Jt===void 0?"100%":Jt,Et=Ge.height,pt=Et===void 0?400:Et,Xe=Ge.miniToolbar,Fe=Xe===void 0?!1:Xe,Te=Ge.isFocus,Ne=Te===void 0?!1:Te,xt=Ge.watch,vt=Ge.insertTemp,Dt=Ge.mode,Ht=Dt===void 0?"markdown":Dt,ct=Ge.id,Mt=ct===void 0?"markdown-editor-id":ct,Gt=Ge.showResizeBar,gn=Gt===void 0?!1:Gt,Tn=Ge.noStorage,Gr=Tn===void 0?!1:Tn,Vr=Ge.showNullButton,Kr=Vr===void 0?!1:Vr,kn=Ge.hidetoolBar,Ua=kn===void 0?!1:kn,Ya=Ge.fullScreen,Ra=Ya===void 0?!1:Ya,Xr=Ge.onBlur,Ja=Ge.onCMBeforeChange,Ri=Ge.onFullScreen,ji=Ge.className,_e=ji===void 0?"":ji,Be=Ge.disablePaste,Ve=Be===void 0?!1:Be,gt=Ge.placeholder,Xt=gt===void 0?"":gt,sn=Ge.values,ne=sn===void 0?"":sn,H=Object(r.useState)(null),V=Object(M.a)(H,2),ee=V[0],ge=V[1],ie=Object(r.useState)(Lt),tt=Object(M.a)(ie,2),Qt=tt[0],dn=tt[1],_n=Object(r.useState)(xt),Zt=Object(M.a)(_n,2),Vn=Zt[0],Xn=Zt[1],lr=Object(r.useState)(Ra),Or=Object(M.a)(lr,2),$r=Or[0],Hr=Or[1],ba=Object(r.useState)(""),Ir=Object(M.a)(ba,2),ga=Ir[0],Na=Ir[1],hi=Object(r.useState)(0),Ha=Object(M.a)(hi,2),qa=Ha[0],xi=Ha[1],fi=Object(r.useState)(pt),ui=Object(M.a)(fi,2),pi=ui[0],bi=ui[1],ai=Object(r.useState)(!1),Hi=Object(M.a)(ai,2),Yi=Hi[0],Zr=Hi[1],sa=Object(r.useRef)(Object(We.a)()),Mr=Object(r.useRef)(!1),la=Object(r.useRef)(),Yr=Object(r.useRef)(),ri=Object(r.useRef)(),ha=Object(r.useRef)(),mo=Object(r.useRef)(),Ii=function(){var mr=Object(B.a)(p.a.mark(function Wr(){var ur,aa;return p.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:return ei.next=2,Object(Le.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:sa.current}});case 2:aa=ei.sent,aa!=null&&(ur=aa.attachments)!==null&&ur!==void 0&&ur.length&&(console.log("cm:",ee,Yr),aa.attachments.map(function(Ta){Ta.content_type.indexOf("image")>-1?ee.replaceSelection("![,](/api/attachments/".concat(Ta.id,"?type=").concat(Ta.content_type,")")):Ta.content_type.indexOf("video")>-1?ee.replaceSelection('')):Ta.content_type.indexOf("pdf")>-1?ee.replaceSelection('
    ').concat(Ta.name,"")):ee.replaceSelection("[".concat(Ta.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Ta.id,"?type=").concat(Ta.content_type,")"))}));case 4:case"end":return ei.stop()}},Wr)}));return function(){return mr.apply(this,arguments)}}();Object(r.useEffect)(function(){dn(ne),ee==null||ee.setValue(ne)},[ne]),Object(r.useEffect)(function(){Ri==null||Ri($r)},[$r]),Object(r.useEffect)(function(){if(Yr.current){var mr=s.a.fromTextArea(Yr.current,{mode:Ht,lineNumbers:!Fe,lineWrapping:!0,value:Lt,autoCloseTags:!0,autoCloseBrackets:!0});Ne&&mr.focus();function Wr(ur,aa){if(Ve){aa.preventDefault();return}var Ea=aa.clipboardData;if(Ea){var ei=Ea.types.toString(),Ta=Ea.items;if(ei==="Files"||Ea.types.indexOf("Files")>-1){if(aa.preventDefault(),Ht=="stex")return;try{var Ui,Ia=Ta[1];((Ui=Ta[0])===null||Ui===void 0?void 0:Ui.kind)==="file"&&(Ia=Ta[0]);var _a=Ia.getAsFile(),Po=_a.name.split(".").pop();se(_a,function(Za){if(Za.id){var ro,so,To;(_a==null||((ro=_a.type)===null||ro===void 0)?void 0:ro.indexOf("image"))>-1?mr.replaceSelection("![,](/api/attachments/".concat(Za.id,"?type=").concat(Za.content_type,")")):(_a==null||((so=_a.type)===null||so===void 0)?void 0:so.indexOf("video"))>-1?mr.replaceSelection('')):(_a==null||((To=_a.type)===null||To===void 0)?void 0:To.indexOf("pdf"))>-1?mr.replaceSelection('').concat(_a.name,"")):Ce.includes(Po)?mr.replaceSelection('').concat(_a.name,"")):mr.replaceSelection("[".concat(_a.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Za.id,"?type=").concat(Za.content_type,")"))}else(Za==null?void 0:Za.status)===401&&(document.location.href="/user/login")})}catch(Za){E.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return mr.on("paste",Wr),mr.on("dragleave",function(ur,aa){ri.current.classList.remove("mouse-hover-md")}),mr.on("dragover",function(ur,aa){ri.current.classList.add("mouse-hover-md")}),mr.on("drop",function(ur,aa){ri.current.classList.add("mouse-hover-md");var Ea;if(Ea=aa.dataTransfer.files,Ea.length>0){aa.preventDefault(),aa.stopPropagation();for(var ei=function(Ia){var _a=Ea[Ia],Po=_a.name.split(".").pop();se(_a,function(Za){if(Za.id){var ro,so,To;(_a==null||((ro=_a.type)===null||ro===void 0)?void 0:ro.indexOf("image"))>-1?mr.replaceSelection("![,](/api/attachments/".concat(Za.id,"?type=").concat(Za.content_type,")")):(_a==null||((so=_a.type)===null||so===void 0)?void 0:so.indexOf("video"))>-1?mr.replaceSelection('')):(_a==null||((To=_a.type)===null||To===void 0)?void 0:To.indexOf("pdf"))>-1?mr.replaceSelection('').concat(_a.name,"")):Ce.includes(Po)?mr.replaceSelection('').concat(_a.name,"")):mr.replaceSelection("[".concat(_a.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Za.id,"?type=").concat(Za.content_type,")"))}else(Za==null?void 0:Za.status)===401&&(document.location.href="/user/login")})},Ta=0;Ta0||Ta.target.offsetWidth>0)&&(ci(),ee.setSize("100%","100%"),ee.refresh())}}catch(Ui){Ea.e(Ui)}finally{Ea.f()}});return ur.observe(Yr.current.parentElement),ur}if(ee){var Wr=mr();return function(){Wr.unobserve(Yr.current.parentElement)}}},[ee,ci]),Object(r.useEffect)(function(){if(ee){for(var mr=[],Wr=function(){var Ta=aa[ur];Ea=Object(M.a)(Ta,2);var Ui=Ea[0],Ia=Ea[1],_a=Object(x.a)({},Ui,function(){Wo(Ia)});mr.push(_a),ee.addKeyMap(_a)},ur=0,aa=Object.entries(Se);ur0){var mr=new Date().getTime(),Wr=window.sessionStorage.getItem(Mt);mr>=qa+St&&(!Wr||Wr!==Qt)&&(window.sessionStorage.setItem(Mt,Qt),Zr(!0))}},St),Object(r.useEffect)(function(){Xn(xt)},[ee,xt]),Object(r.useEffect)(function(){ee&&(Ne&&ee.focus())},[ee,Ne]),Object(r.useEffect)(function(){if(Vn&&ee){var mr=ee.getScrollerElement();function Wr(ur){var aa=ur.target;if(mo.current){var Ea=aa.scrollTop/aa.scrollHeight;mo.current.scrollTop=mo.current.scrollHeight*Ea}}return mr.addEventListener("scroll",Wr),function(){mr.removeEventListener("scroll",Wr)}}},[ee,Vn]),Object(r.useEffect)(function(){if(ee&&Ja){function mr(Wr,ur){Ja(Wr,ur)}return ee.on("beforeChange",mr),function(){ee.off("beforeChange",mr)}}},[ee,Ja]),Object(r.useEffect)(function(){if(ee&&Xr){function mr(){Xr(ee.getValue())}return ee.on("blur",mr),function(){ee.off("blur",mr)}}},[ee,Xr]),Object(r.useEffect)(function(){if(ee){function mr(Wr){var ur=Wr.getValue();dn(ur),xi(new Date().getTime()),Wr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),en&&en(ur)}return ee.on("change",mr),function(){ee.off("change",mr)}}},[ee,en]),Object(r.useEffect)(function(){ee&&(Lt==null?(ee.setValue(""),dn("")):Lt!==ee.getValue()&&(ee.setValue(Lt),dn(Lt),ee.setCursor(ee.lineCount(),0)))},[ee,Lt]);var Wo=Object(r.useCallback)(function(mr){var Wr=ee.getCursor(),ur=ee.getSelection(),aa=ur.split(` `);switch(mr){case"bold":return ee.replaceSelection("**"+ur+"**"),ur===""&&ee.setCursor(Wr.line,Wr.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+ur+"*"),ur===""&&ee.setCursor(Wr.line,Wr.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+ur+"`"),ur===""&&ee.setCursor(Wr.line,Wr.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+ur+"$$`"),ur===""&&ee.setCursor(Wr.line,Wr.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+ur+"\n```"),ee.setCursor(Wr.line+1,ur.length+1),ee.focus();case"line-break":return ee.replaceSelection(`
    `),ee.focus();case"list-ul":return ur===""?ee.replaceSelection("- "+ur):ee.replaceSelection(aa.map(function(Ea){return Ea===""?"":"- ".concat(Ea)}).join(` `)),ee.focus();case"list-ol":return ur===""?ee.replaceSelection("1. "+ur):ee.replaceSelection(aa.map(function(Ea,ei){return Ea===""?"":"".concat(ei+1,". ").concat(Ea)}).join(` `)),ee.focus();case"add-null-ch":return ur===""&&ee.setCursor(Wr.line,Wr.ch+1),ee.replaceSelection(at),ee.focus();case"inster-template-1":return ur===""&&ee.setCursor(Wr.line,Wr.ch),ee.replaceSelection(Ot),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Xn(!Vn),ee.focus();case"trigger-full-screen":return Hr(!$r),ee.focus();case Ze:Na(Ze);return;case bt:Na(bt);return;case $e:Na($e);return;case wt:Na(wt);return;default:throw new Error}},[ee,Vn,$r]),Lo=Object(r.useCallback)(function(mr){Na("");switch(ga){case Ze:var Wr=mr.title,ur=mr.link;return ee.replaceSelection("[".concat(Wr,"](").concat(ur,")")),ee.focus();case bt:var aa=mr.language,Ea=mr.content;return ee.replaceSelection(["```"+aa,Ea,"```"].join(` `)),ee.focus();case $e:var ei=mr.src,Ta=mr.alt;return Ta?ee.replaceSelection("![ ".concat(Ta," ]( ").concat(ei,' "').concat(Ta,'" )')):ee.replaceSelection("![,](".concat(ei,")")),ee.focus();case wt:for(var Ui=mr.row,Ia=mr.col,_a=mr.align,Po=` `,Za=0;Za300&&(Ui=300);var Ia=pt+Ui+"px";bi(Ia)}}return mr.addEventListener("mousedown",aa),document.addEventListener("mousemove",ei),document.addEventListener("mouseup",Ea),function(){mr.removeEventListener("mousedown",aa),document.removeEventListener("mousemove",ei),document.removeEventListener("mouseup",Ea)}}},[ee,ha]),Object(r.useEffect)(function(){bi(pt)},[pt]);var no=Ye(Ct),As=Ye(pi),xo={width:no,height:As},Cs=Object(r.useMemo)(function(){if(qa){var mr=new Date(qa),Wr=mr.getHours(),ur=mr.getMinutes(),aa=mr.getSeconds();return Wr=Wr<10?"0"+Wr:Wr,ur=ur<10?"0"+ur:ur,aa=aa<10?"0"+aa:aa,"".concat(Wr,":").concat(ur,":").concat(aa)}return 0},[qa]);function ws(){window.sessionStorage.removeItem(Mt),Zr(!1),xi(0)}function Ao(){Zr(!1),xi(0),ee.setValue(window.sessionStorage.getItem(Mt))}function hs(mr,Wr){var ur=ee.getValue();ur=ur.replace(mr,Wr),dn(ur),ee==null||ee.setValue(ur)}return t.a.createElement(r.Fragment,null,t.a.createElement("div",{className:"markdown-editor-wrapper",ref:ri},t.a.createElement("div",{className:"markdown-editor-container ".concat(_e," ").concat(Vn?"on-preview":""," ").concat(Fe?"mini":""," ").concat($r?"full-screen":""),style:xo},t.a.createElement(v,{insertTemp:vt,watch:Vn,fullScreen:$r,showNullButton:Kr,onActionCallback:Wo,hidetoolBar:Ua,uuid:sa.current,setOpenPhones:function(){Mr.current=!0}}),t.a.createElement("div",{className:"markdown-editor-body"},t.a.createElement("div",{className:"codemirror-container"},t.a.createElement("textarea",{ref:Yr,placeholder:Xt})),Vn?t.a.createElement("div",{ref:mo,className:"preview-container"},Ht==="stex"&&t.a.createElement(L,{value:Qt}),Ht!=="stex"&&t.a.createElement(w.a,{edit:!0,value:Qt,replaces:hs})):null))),gn?t.a.createElement("a",{ref:ha,className:"editor-resize"}):null,t.a.createElement(P.a,null,Me[ga]?t.a.createElement(K.a,{centered:!0,title:Me[ga],visible:!0,onCancel:go,footer:null,className:"markdown-popup-form"},ii):null))}},P47w:function(Ie,oe,C){var q=C("hydK"),K=q.createElement,I=C("IMiH"),k=C("mFDi"),E=C("Fofx"),B=C("6GrX"),M=C("pzxd"),x=C("dqUG"),T=I.CMD,p=Array.prototype.join,r="none",t=Math.round,c=Math.sin,s=Math.cos,a=Math.PI,o=Math.PI*2,d=180/a,A=1e-4;function l(j){return t(j*1e4)/1e4}function m(j){return j-A}function _(j,Z){var te=Z?j.textFill:j.fill;return te!=null&&te!==r}function R(j,Z){var te=Z?j.textStroke:j.stroke;return te!=null&&te!==r}function w(j,Z){Z&&L(j,"transform","matrix("+p.call(Z,",")+")")}function L(j,Z,te){(!te||te.type!=="linear"&&te.type!=="radial")&&j.setAttribute(Z,te)}function b(j,Z,te){j.setAttributeNS("http://www.w3.org/1999/xlink",Z,te)}function g(j,Z,te,Ae){if(_(Z,te)){var he=te?Z.textFill:Z.fill;he=he==="transparent"?r:he,L(j,"fill",he),L(j,"fill-opacity",Z.fillOpacity!=null?Z.fillOpacity*Z.opacity:Z.opacity)}else L(j,"fill",r);if(R(Z,te)){var ce=te?Z.textStroke:Z.stroke;ce=ce==="transparent"?r:ce,L(j,"stroke",ce);var ae=te?Z.textStrokeWidth:Z.lineWidth,ve=!te&&Z.strokeNoScale?Ae.getLineScale():1;L(j,"stroke-width",ae/ve),L(j,"paint-order",te?"stroke":"fill"),L(j,"stroke-opacity",Z.strokeOpacity!=null?Z.strokeOpacity:Z.opacity);var ue=Z.lineDash;ue?(L(j,"stroke-dasharray",Z.lineDash.join(",")),L(j,"stroke-dashoffset",t(Z.lineDashOffset||0))):L(j,"stroke-dasharray",""),Z.lineCap&&L(j,"stroke-linecap",Z.lineCap),Z.lineJoin&&L(j,"stroke-linejoin",Z.lineJoin),Z.miterLimit&&L(j,"stroke-miterlimit",Z.miterLimit)}else L(j,"stroke",r)}function i(j){for(var Z=[],te=j.data,Ae=j.len(),he=0;he=o:-pe>=o),Le=pe>0?pe%o:pe%o+o,We=!1;et?We=!0:m(je)?We=!1:We=Le>=a===!!we;var Ze=l(ue+se*s(re)),$e=l(fe+me*c(re));et&&(we?pe=o-1e-4:pe=-o+1e-4,We=!0,he===9&&Z.push("M",Ze,$e));var bt=l(ue+se*s(re+pe)),wt=l(fe+me*c(re+pe));Z.push("A",l(se),l(me),t(De*d),+We,+we,bt,wt);break;case T.Z:ae="Z";break;case T.R:var bt=l(te[he++]),wt=l(te[he++]),It=l(te[he++]),ft=l(te[he++]);Z.push("M",bt,wt,"L",bt+It,wt,"L",bt+It,wt+ft,"L",bt,wt+ft,"L",bt,wt);break}ae&&Z.push(ae);for(var Ft=0;Ftzt){for(;ft255?255:i}function k(i){return i=Math.round(i),i<0?0:i>360?360:i}function E(i){return i<0?0:i>1?1:i}function B(i){return i.length&&i.charAt(i.length-1)==="%"?I(parseFloat(i)/100*255):I(parseInt(i,10))}function M(i){return i.length&&i.charAt(i.length-1)==="%"?E(parseFloat(i)/100):E(parseFloat(i))}function x(i,u,f){return f<0?f+=1:f>1&&(f-=1),f*6<1?i+(u-i)*f*6:f*2<1?u:f*3<2?i+(u-i)*(2/3-f)*6:i}function T(i,u,f){return i+(u-i)*f}function p(i,u,f,y,h){return i[0]=u,i[1]=f,i[2]=y,i[3]=h,i}function r(i,u){return i[0]=u[0],i[1]=u[1],i[2]=u[2],i[3]=u[3],i}var t=new q(20),c=null;function s(i,u){c&&r(c,u),c=t.put(i,c||u.slice())}function a(i,u){if(!i)return;u=u||[];var f=t.get(i);if(f)return r(u,f);i=i+"";var y=i.replace(/ /g,"").toLowerCase();if(y in K)return r(u,K[y]),s(i,u),u;if(y.charAt(0)==="#"){if(y.length===4){var h=parseInt(y.substr(1),16);if(!(h>=0&&h<=4095)){p(u,0,0,0,1);return}return p(u,(h&3840)>>4|(h&3840)>>8,h&240|(h&240)>>4,h&15|(h&15)<<4,1),s(i,u),u}else if(y.length===7){var h=parseInt(y.substr(1),16);if(!(h>=0&&h<=16777215)){p(u,0,0,0,1);return}return p(u,(h&16711680)>>16,(h&65280)>>8,h&255,1),s(i,u),u}return}var v=y.indexOf("("),P=y.indexOf(")");if(v!==-1&&P+1===y.length){var N=y.substr(0,v),Q=y.substr(v+1,P-(v+1)).split(","),G=1;switch(N){case"rgba":if(Q.length!==4){p(u,0,0,0,1);return}G=M(Q.pop());case"rgb":if(Q.length!==3){p(u,0,0,0,1);return}return p(u,B(Q[0]),B(Q[1]),B(Q[2]),G),s(i,u),u;case"hsla":if(Q.length!==4){p(u,0,0,0,1);return}return Q[3]=M(Q[3]),o(Q,u),s(i,u),u;case"hsl":if(Q.length!==3){p(u,0,0,0,1);return}return o(Q,u),s(i,u),u;default:return}}p(u,0,0,0,1);return}function o(i,u){var f=(parseFloat(i[0])%360+360)%360/360,y=M(i[1]),h=M(i[2]),v=h<=.5?h*(y+1):h+y-h*y,P=h*2-v;return u=u||[],p(u,I(x(P,v,f+1/3)*255),I(x(P,v,f)*255),I(x(P,v,f-1/3)*255),1),i.length===4&&(u[3]=i[3]),u}function d(i){if(!i)return;var u=i[0]/255,f=i[1]/255,y=i[2]/255,h=Math.min(u,f,y),v=Math.max(u,f,y),P=v-h,N=(v+h)/2,Q,G;if(P===0)Q=0,G=0;else{N<.5?G=P/(v+h):G=P/(2-v-h);var F=((v-u)/6+P/2)/P,D=((v-f)/6+P/2)/P,z=((v-y)/6+P/2)/P;u===v?Q=z-D:f===v?Q=1/3+F-z:y===v&&(Q=2/3+D-F),Q<0&&(Q+=1),Q>1&&(Q-=1)}var j=[Q*360,G,N];return i[3]!=null&&j.push(i[3]),j}function A(i,u){var f=a(i);if(f){for(var y=0;y<3;y++)u<0?f[y]=f[y]*(1-u)|0:f[y]=(255-f[y])*u+f[y]|0,f[y]>255?f[y]=255:i[y]<0&&(f[y]=0);return g(f,f.length===4?"rgba":"rgb")}}function l(i){var u=a(i);if(u)return((1<<24)+(u[0]<<16)+(u[1]<<8)+ +u[2]).toString(16).slice(1)}function m(i,u,f){if(!(u&&u.length)||!(i>=0&&i<=1))return;f=f||[];var y=i*(u.length-1),h=Math.floor(y),v=Math.ceil(y),P=u[h],N=u[v],Q=y-h;return f[0]=I(T(P[0],N[0],Q)),f[1]=I(T(P[1],N[1],Q)),f[2]=I(T(P[2],N[2],Q)),f[3]=E(T(P[3],N[3],Q)),f}var _=m;function R(i,u,f){if(!(u&&u.length)||!(i>=0&&i<=1))return;var y=i*(u.length-1),h=Math.floor(y),v=Math.ceil(y),P=a(u[h]),N=a(u[v]),Q=y-h,G=g([I(T(P[0],N[0],Q)),I(T(P[1],N[1],Q)),I(T(P[2],N[2],Q)),E(T(P[3],N[3],Q))],"rgba");return f?{color:G,leftIndex:h,rightIndex:v,value:y}:G}var w=R;function L(i,u,f,y){if(i=a(i),i)return i=d(i),u!=null&&(i[0]=k(u)),f!=null&&(i[1]=M(f)),y!=null&&(i[2]=M(y)),g(o(i),"rgba")}function b(i,u){if(i=a(i),i&&u!=null)return i[3]=E(u),g(i,"rgba")}function g(i,u){if(!i||!i.length)return;var f=i[0]+","+i[1]+","+i[2];return(u==="rgba"||u==="hsva"||u==="hsla")&&(f+=","+i[3]),u+"("+f+")"}oe.parse=a,oe.lift=A,oe.toHex=l,oe.fastLerp=m,oe.fastMapToColor=_,oe.lerp=R,oe.mapToColor=w,oe.modifyHSL=L,oe.modifyAlpha=b,oe.stringify=g},QuXc:function(Ie,oe){var C=function(K){this.colorStops=K||[]};C.prototype={constructor:C,addColorStop:function(K,I){this.colorStops.push({offset:K,color:I})}};var q=C;Ie.exports=q},RDYZ:function(Ie,oe,C){var q=C("dMvE");function K(k){this._target=k.target,this._life=k.life||1e3,this._delay=k.delay||0,this._initialized=!1,this.loop=k.loop==null?!1:k.loop,this.gap=k.gap||0,this.easing=k.easing||"Linear",this.onframe=k.onframe,this.ondestroy=k.ondestroy,this.onrestart=k.onrestart,this._pausedTime=0,this._paused=!1}K.prototype={constructor:K,step:function(k,E){if(this._initialized||(this._startTime=k+this._delay,this._initialized=!0),this._paused){this._pausedTime+=E;return}var B=(k-this._startTime-this._pausedTime)/this._life;if(B<0)return;B=Math.min(B,1);var M=this.easing,x=typeof M=="string"?q[M]:M,T=typeof x=="function"?x(B):B;return this.fire("frame",T),B===1?this.loop?(this.restart(k),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(k){var E=(k-this._startTime-this._pausedTime)%this._life;this._startTime=k-E+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(k,E){k="on"+k,this[k]&&this[k](this._target,E)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var I=K;Ie.exports=I},RMFE:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RXMa:function(Ie,oe,C){var q=C("y+Vt"),K=q.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(I,k){var E=k.cx,B=k.cy,M=Math.PI*2;I.moveTo(E+k.r,B),I.arc(E,B,k.r,0,M,!1),I.moveTo(E+k.r0,B),I.arc(E,B,k.r0,0,M,!0)}});Ie.exports=K},RotF:function(Ie,oe,C){Ie.exports=C("LSTS")},RxwV:function(Ie,oe,C){"use strict";var q=C("q1tI"),K=C("uciX"),I=C("2W6z"),k=C.n(I),E=C("4IlW"),B=C("uK0f"),M=C.n(B);function x(ae,ve){if(ae===ve)return!0;if(!ae||!ve)return!1;var ue=ae.length;if(ve.length!==ue)return!1;for(var fe=0;fe0;(wt||me.isLeaf===!1)&&($e+=" ".concat(De,"-menu-item-expand"),me.loading||(bt=q.createElement("span",{className:"".concat(De,"-menu-item-expand-icon")},je))),we==="hover"&&(wt||me.isLeaf===!1)&&(Ze={onMouseEnter:this.delayOnSelect.bind(this,Le),onMouseLeave:this.delayOnSelect.bind(this),onClick:Le}),this.isActiveOption(me,re)&&($e+=" ".concat(De,"-menu-item-active"),Ze.ref=this.saveMenuItem(re)),me.disabled&&($e+=" ".concat(De,"-menu-item-disabled"));var It=null;me.loading&&($e+=" ".concat(De,"-menu-item-loading"),It=et||null);var ft="";return"title"in me?ft=me.title:typeof me[this.getFieldName("label")]=="string"&&(ft=me[this.getFieldName("label")]),q.createElement("li",Object.assign({key:me[this.getFieldName("value")],className:$e,title:ft},Ze,{role:"menuitem",onMouseDown:function(zt){return zt.preventDefault()}}),me[this.getFieldName("label")],bt,It)}},{key:"getActiveOptions",value:function(me){var re=this,pe=this.props.options,De=me||this.props.activeValue;return M()(pe,function(we,je){return we[re.getFieldName("value")]===De[je]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var me=this,re=this.props.options,pe=this.getActiveOptions().map(function(De){return De[me.getFieldName("children")]}).filter(function(De){return!!De});return pe.unshift(re),pe}},{key:"delayOnSelect",value:function(me){for(var re=this,pe=arguments.length,De=new Array(pe>1?pe-1:0),we=1;we=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ae,fe))continue;ue[fe]=ae[fe]}}return ue}function g(ae,ve){if(ae==null)return{};var ue={},fe=Object.keys(ae),se,me;for(me=0;me=0)continue;ue[se]=ae[se]}return ue}function i(ae){return h(ae)||y(ae)||f(ae)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(ae,ve){if(!ae)return;if(typeof ae=="string")return v(ae,ve);var ue=Object.prototype.toString.call(ae).slice(8,-1);if(ue==="Object"&&ae.constructor&&(ue=ae.constructor.name),ue==="Map"||ue==="Set")return Array.from(ae);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return v(ae,ve)}function y(ae){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(ae))return Array.from(ae)}function h(ae){if(Array.isArray(ae))return v(ae)}function v(ae,ve){(ve==null||ve>ae.length)&&(ve=ae.length);for(var ue=0,fe=new Array(ve);ue=et.length?0:We):(We-=1,We=We<0?et.length-1:We):We=0,we[je]=et[We][me.getFieldName("value")]}else if(pe.keyCode===E.a.LEFT||pe.keyCode===E.a.BACKSPACE)pe.preventDefault(),we.splice(we.length-1,1);else if(pe.keyCode===E.a.RIGHT)pe.preventDefault(),et[Le]&&et[Le][me.getFieldName("children")]&&we.push(et[Le][me.getFieldName("children")][0][me.getFieldName("value")]);else if(pe.keyCode===E.a.ESC||pe.keyCode===E.a.TAB){me.setPopupVisible(!1);return}(!we||we.length===0)&&me.setPopupVisible(!1);var Ze=me.getActiveOptions(we),$e=Ze[Ze.length-1];me.handleMenuSelect($e,Ze.length-1,pe),me.props.onKeyDown&&me.props.onKeyDown(pe)},me.saveTrigger=function(pe){me.trigger=pe};var re=[];return"value"in se?re=se.value||[]:"defaultValue"in se&&(re=se.defaultValue||[]),k()(!("filedNames"in se),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),me.state={popupVisible:se.popupVisible,activeValue:re,value:re,prevProps:se},me.defaultFieldNames={label:"label",value:"value",children:"children"},me}return Q(fe,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(me){var re=this.defaultFieldNames,pe=this.props,De=pe.fieldNames,we=pe.filedNames;return"filedNames"in this.props?we[me]||re[me]:De[me]||re[me]}},{key:"getFieldNames",value:function(){var me=this.props,re=me.fieldNames,pe=me.filedNames;return"filedNames"in this.props?pe:re}},{key:"getCurrentLevelOptions",value:function(){var me=this,re=this.props.options,pe=re===void 0?[]:re,De=this.state.activeValue,we=De===void 0?[]:De,je=M()(pe,function(et,Le){return et[me.getFieldName("value")]===we[Le]},{childrenKeyName:this.getFieldName("children")});return je[je.length-2]?je[je.length-2][this.getFieldName("children")]:i(pe).filter(function(et){return!et.disabled})}},{key:"getActiveOptions",value:function(me){var re=this;return M()(this.props.options||[],function(pe,De){return pe[re.getFieldName("value")]===me[De]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var me=this.props,re=me.prefixCls,pe=me.transitionName,De=me.popupClassName,we=me.options,je=we===void 0?[]:we,et=me.disabled,Le=me.builtinPlacements,We=me.popupPlacement,Ze=me.children,$e=me.dropdownRender,bt=b(me,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),wt=q.createElement("div",null),It="";je&&je.length>0?wt=q.createElement(_,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):It=" ".concat(re,"-menus-empty");var ft=wt;return $e&&(ft=$e(wt)),q.createElement(K.a,Object.assign({ref:this.saveTrigger},bt,{popupPlacement:We,builtinPlacements:Le,popupTransitionName:pe,action:et?[]:["click"],popupVisible:et?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(re,"-menus"),popupClassName:De+It,popup:ft}),q.cloneElement(Ze,{onKeyDown:this.handleKeyDown,tabIndex:et?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(me,re){var pe=re.prevProps,De=pe===void 0?{}:pe,we={prevProps:me};return"value"in me&&!x(De.value,me.value)&&(we.value=me.value||[],"loadData"in me||(we.activeValue=me.value||[])),"popupVisible"in me&&(we.popupVisible=me.popupVisible),we}}]),fe}(q.Component);return ae.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:w,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},ae}(),he=Ae,ce=oe.a=he},"SA+Z":function(Ie,oe,C){var q=C("wTVA"),K=C("EbDI"),I=C("ZhPi"),k=C("wkBT");function E(B){return q(B)||K(B)||I(B)||k()}Ie.exports=E,Ie.exports.__esModule=!0,Ie.exports.default=Ie.exports},SJMd:function(Ie,oe){/** * @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 C,q,K,I=!1,k,E;window.PR_SHOULD_USE_CONTINUATION=!0;var B,M;(function(){var x=window,T=["break,continue,do,else,for,if,return,while"],p=[T,"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"],r=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],t=[r,"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"],c=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a="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",o=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",A=[T,"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"],l=[T,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],m=[T,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],_=[t,s,c,o,d,A,l,m],R=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,w="str",L="kwd",b="com",g="typ",i="lit",u="pun",f="pln",y="tag",h="dec",v="src",P="atn",N="atv",Q="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(we){for(var je=0,et=!1,Le=!1,We=0,Ze=we.length;We122||(Ce<65||ke>90||yt.push([Math.max(65,ke)|32,Math.min(Ce,90)|32]),Ce<97||ke>122||yt.push([Math.max(97,ke)&~32,Math.min(Ce,122)&~32]))}}yt.sort(function(Ge,mt){return Ge[0]-mt[0]||mt[1]-Ge[1]});for(var Se=[],Me=[],Ot=0;OtHe[0]&&(He[1]+1>He[0]&&at.push("-"),at.push(It(He[1])))}return at.push("]"),at.join("")}function Ft(Qe){for(var ze=Qe.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")),yt=ze.length,St=[],at=0,Ot=0;at=2&&ke==="["?ze[at]=ft(Ye):ke!=="\\"&&(ze[at]=Ye.replace(/[a-zA-Z]/g,function(Me){var He=Me.charCodeAt(0);return"["+String.fromCharCode(He&~32,He|32)+"]"}))}return ze.join("")}for(var zt=[],We=0,Ze=we.length;We=0;)et[zt.charAt(Qe)]=Ft;var ze=Ft[1],yt=""+ze;wt.hasOwnProperty(yt)||(bt.push(ze),wt[yt]=null)}bt.push(/[\0-\uffff]/),Le=F(bt)})();var We=je.length,Ze=function($e){for(var bt=$e.sourceCode,wt=$e.basePos,It=$e.sourceNode,ft=[wt,f],Ft=0,zt=bt.match(Le)||[],Qe={},ze=0,yt=zt.length;ze=5&&at.substring(0,5)==="lang-",Ye&&!(Ot&&typeof Ot[1]=="string")&&(Ye=!1,at=v),Ye||(Qe[St]=at)}var Ce=Ft;if(Ft+=St.length,!Ye)ft.push(wt+Ce,at);else{var Se=Ot[1],Me=St.indexOf(Se),He=Me+Se.length;Ot[2]&&(He=St.length-Ot[2].length,Me=He-Se.length);var Ge=at.substring(5);z(It,wt+Ce,St.substring(0,Me),Ze,ft),z(It,wt+Ce+Me,Se,fe(Ge,Se),ft),z(It,wt+Ce+He,St.substring(He),Ze,ft)}}$e.decorations=ft};return Ze}function Ae(we){var je=[],et=[];we.tripleQuotedStrings?je.push([w,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):we.multiLineStrings?je.push([w,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):je.push([w,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),we.verbatimStrings&&et.push([w,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Le=we.hashComments;Le&&(we.cStyleComments?(Le>1?je.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):je.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),et.push([w,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):je.push([b,/^#[^\r\n]*/,null,"#"])),we.cStyleComments&&(et.push([b,/^\/\/[^\r\n]*/,null]),et.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var We=we.regexLiterals;if(We){var Ze=We>1?"":` \r`,$e=Ze?".":"[\\S\\s]",bt="/(?=[^/*"+Ze+"])(?:[^/\\x5B\\x5C"+Ze+"]|\\x5C"+$e+"|\\x5B(?:[^\\x5C\\x5D"+Ze+"]|\\x5C"+$e+")*(?:\\x5D|$))+/";et.push(["lang-regex",RegExp("^"+G+"("+bt+")")])}var wt=we.types;wt&&et.push([g,wt]);var It=(""+we.keywords).replace(/^ | $/g,"");It.length&&et.push([L,new RegExp("^(?:"+It.replace(/[\s,]+/g,"|")+")\\b"),null]),je.push([f,/^\s+/,null,` \r \xA0`]);var ft="^.[^\\s\\w.$@'\"`/\\\\]*";return we.regexLiterals&&(ft+="(?!s*/)"),et.push([i,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[a-z_$][a-z_$@0-9]*/i,null],[i,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[f,/^\\[\s\S]?/,null],[u,new RegExp(ft),null]),te(je,et)}var he=Ae({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ce(we,je,et){for(var Le=/(?:^|\s)nocode(?:\s|$)/,We=/\r\n?|\n/,Ze=we.ownerDocument,$e=Ze.createElement("li");we.firstChild;)$e.appendChild(we.firstChild);var bt=[$e];function wt(ze){var yt=ze.nodeType;if(yt==1&&!Le.test(ze.className))if(ze.nodeName==="br")It(ze),ze.parentNode&&ze.parentNode.removeChild(ze);else for(var St=ze.firstChild;St;St=St.nextSibling)wt(St);else if((yt==3||yt==4)&&et){var at=ze.nodeValue,Ot=at.match(We);if(Ot){var Ye=at.substring(0,Ot.index);ze.nodeValue=Ye;var Ue=at.substring(Ot.index+Ot[0].length);if(Ue){var ke=ze.parentNode;ke.insertBefore(Ze.createTextNode(Ue),ze.nextSibling)}It(ze),Ye||ze.parentNode.removeChild(ze)}}}function It(ze){for(;!ze.nextSibling;)if(ze=ze.parentNode,!ze)return;function yt(Ot,Ye){var Ue=Ye?Ot.cloneNode(!1):Ot,ke=Ot.parentNode;if(ke){var Ce=yt(ke,1),Se=Ot.nextSibling;Ce.appendChild(Ue);for(var Me=Se;Me;Me=Se)Se=Me.nextSibling,Ce.appendChild(Me)}return Ue}for(var St=yt(ze.nextSibling,0),at;(at=St.parentNode)&&at.nodeType===1;)St=at;bt.push(St)}for(var ft=0;ft=ke&&(wt+=2),Ze>=Ce&&(Ft+=2)}}finally{at&&(at.style.display=Ot)}}var ve={};function ue(we,je){for(var et=je.length;--et>=0;){var Le=je[et];ve.hasOwnProperty(Le)?x.console&&console.warn("cannot override language handler %s",Le):ve[Le]=we}}function fe(we,je){return we&&ve.hasOwnProperty(we)||(we=/^\s*]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[u,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ue(te([[f,/^[\s]+/,null,` \r `],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[u,/^[=<>\/]+/],["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"]),ue(te([],[[N,/^[\s\S]+/]]),["uq.val"]),ue(Ae({keywords:t,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]),ue(Ae({keywords:"null,true,false"}),["json"]),ue(Ae({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),["cs"]),ue(Ae({keywords:c,cStyleComments:!0}),["java"]),ue(Ae({keywords:m,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Ae({keywords:A,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Ae({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Ae({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Ae({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Ae({keywords:a,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(te([],[[w,/^[\s\S]+/]]),["regex"]);function se(we){var je=we.langExtension;try{var et=D(we.sourceNode,we.pre),Le=et.sourceCode;we.sourceCode=Le,we.spans=et.spans,we.basePos=0,fe(je,Le)(we),ae(we)}catch(We){x.console&&console.log(We&&We.stack||We)}}function me(we,je,et){var Le=et||!1,We=je||null,Ze=document.createElement("div");Ze.innerHTML="
    "+we+"
    ",Ze=Ze.firstChild,Le&&ce(Ze,Le,!0);var $e={langExtension:We,numberLines:Le,sourceNode:Ze,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se($e),Ze.innerHTML}function re(we,je){var et=je||document.body,Le=et.ownerDocument||document;function We(Ue){return et.getElementsByTagName(Ue)}for(var Ze=[We("pre"),We("code"),We("xmp")],$e=[],bt=0;bt-B&&iB||i<-B}function a(i,u,f,y,h){var v=1-h;return v*v*(v*i+3*h*u)+h*h*(h*y+3*v*f)}function o(i,u,f,y,h){var v=1-h;return 3*(((u-i)*v+2*(f-u)*h)*v+(y-f)*h*h)}function d(i,u,f,y,h,v){var P=y+3*(u-f)-i,N=3*(f-u*2+i),Q=3*(u-i),G=i-h,F=N*N-3*P*Q,D=N*Q-9*P*G,z=Q*Q-3*N*G,j=0;if(c(F)&&c(D))if(c(N))v[0]=0;else{var Z=-Q/N;Z>=0&&Z<=1&&(v[j++]=Z)}else{var te=D*D-4*F*z;if(c(te)){var Ae=D/F,Z=-N/P+Ae,he=-Ae/2;Z>=0&&Z<=1&&(v[j++]=Z),he>=0&&he<=1&&(v[j++]=he)}else if(te>0){var ce=E(te),ae=F*N+1.5*P*(-D+ce),ve=F*N+1.5*P*(-D-ce);ae<0?ae=-k(-ae,T):ae=k(ae,T),ve<0?ve=-k(-ve,T):ve=k(ve,T);var Z=(-N-(ae+ve))/(3*P);Z>=0&&Z<=1&&(v[j++]=Z)}else{var ue=(2*F*N-3*P*D)/(2*E(F*F*F)),fe=Math.acos(ue)/3,se=E(F),me=Math.cos(fe),Z=(-N-2*se*me)/(3*P),he=(-N+se*(me+x*Math.sin(fe)))/(3*P),re=(-N+se*(me-x*Math.sin(fe)))/(3*P);Z>=0&&Z<=1&&(v[j++]=Z),he>=0&&he<=1&&(v[j++]=he),re>=0&&re<=1&&(v[j++]=re)}}return j}function A(i,u,f,y,h){var v=6*f-12*u+6*i,P=9*u+3*y-3*i-9*f,N=3*u-3*i,Q=0;if(c(P)){if(s(v)){var G=-N/v;G>=0&&G<=1&&(h[Q++]=G)}}else{var F=v*v-4*P*N;if(c(F))h[0]=-v/(2*P);else if(F>0){var D=E(F),G=(-v+D)/(2*P),z=(-v-D)/(2*P);G>=0&&G<=1&&(h[Q++]=G),z>=0&&z<=1&&(h[Q++]=z)}}return Q}function l(i,u,f,y,h,v){var P=(u-i)*h+i,N=(f-u)*h+u,Q=(y-f)*h+f,G=(N-P)*h+P,F=(Q-N)*h+N,D=(F-G)*h+G;v[0]=i,v[1]=P,v[2]=G,v[3]=D,v[4]=D,v[5]=F,v[6]=Q,v[7]=y}function m(i,u,f,y,h,v,P,N,Q,G,F){var D,z=.005,j=Infinity,Z,te,Ae,he;p[0]=Q,p[1]=G;for(var ce=0;ce<1;ce+=.05)r[0]=a(i,f,h,P,ce),r[1]=a(u,y,v,N,ce),Ae=I(p,r),Ae=0&&Ae=0&&G<=1&&(h[Q++]=G)}}else{var F=P*P-4*v*N;if(c(F)){var G=-P/(2*v);G>=0&&G<=1&&(h[Q++]=G)}else if(F>0){var D=E(F),G=(-P+D)/(2*v),z=(-P-D)/(2*v);G>=0&&G<=1&&(h[Q++]=G),z>=0&&z<=1&&(h[Q++]=z)}}return Q}function L(i,u,f){var y=i+f-2*u;return y===0?.5:(i-u)/y}function b(i,u,f,y,h){var v=(u-i)*y+i,P=(f-u)*y+u,N=(P-v)*y+v;h[0]=i,h[1]=v,h[2]=N,h[3]=N,h[4]=P,h[5]=f}function g(i,u,f,y,h,v,P,N,Q){var G,F=.005,D=Infinity;p[0]=P,p[1]=N;for(var z=0;z<1;z+=.05){r[0]=_(i,f,h,z),r[1]=_(u,y,v,z);var j=I(p,r);j=0&&j=0;--m)if(l[m]===A)return!0;return!1}),d):null:d[0]},c.prototype.update=function(a,o){if(!a)return;var d=this.getDefs(!1);if(a[this._domName]&&d.contains(a[this._domName]))typeof o=="function"&&o(a);else{var A=this.add(a);A&&(a[this._domName]=A)}},c.prototype.addDom=function(a){var o=this.getDefs(!0);o.appendChild(a)},c.prototype.removeDom=function(a){var o=this.getDefs(!1);o&&a[this._domName]&&(o.removeChild(a[this._domName]),a[this._domName]=null)},c.prototype.getDoms=function(){var a=this.getDefs(!1);if(!a)return[];var o=[];return I.each(this._tagNames,function(d){var A=a.getElementsByTagName(d);o=o.concat([].slice.call(A))}),o},c.prototype.markAllUnused=function(){var a=this.getDoms(),o=this;I.each(a,function(d){d[o._markLabel]=r})},c.prototype.markUsed=function(a){a&&(a[this._markLabel]=t)},c.prototype.removeUnused=function(){var a=this.getDefs(!1);if(!a)return;var o=this.getDoms(),d=this;I.each(o,function(A){A[d._markLabel]!==t&&a.removeChild(A)})},c.prototype.getSvgProxy=function(a){return a instanceof k?x:a instanceof E?T:a instanceof B?p:x},c.prototype.getTextSvgElement=function(a){return a.__textSvgEl},c.prototype.getSvgElement=function(a){return a.__svgEl};var s=c;Ie.exports=s},T6xi:function(Ie,oe,C){var q=C("YgsL"),K=C("nCxF");function I(k,E,B){var M=E.points,x=E.smooth;if(M&&M.length>=2){if(x&&x!=="spline"){var T=K(M,x,B,E.smoothConstraint);k.moveTo(M[0][0],M[0][1]);for(var p=M.length,r=0;r<(B?p:p-1);r++){var t=T[r*2],c=T[r*2+1],s=M[(r+1)%p];k.bezierCurveTo(t[0],t[1],c[0],c[1],s[0],s[1])}}else{x==="spline"&&(M=q(M,B)),k.moveTo(M[0][0],M[0][1]);for(var r=1,a=M.length;r=0;s--)if(this.__items[s].match(c))return!0;return!1},p.prototype.set_indent=function(c,s){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.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)},p.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},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(c){this.__items.push(c);var s=c.lastIndexOf(` `);s!==-1?this.__character_count=c.length-s:this.__character_count+=c.length},p.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function r(c,s){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),s=s||"",c.indent_level>0&&(s=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}r.prototype.get_indent_size=function(c,s){var a=this.__base_string_length;return s=s||0,c<0&&(a=0),a+=c*this.__indent_size,a+=s,a},r.prototype.get_indent_string=function(c,s){var a=this.__base_string;return s=s||0,c<0&&(c=0,a=""),s+=c*this.__indent_size,this.__ensure_cache(s),a+=this.__cache[s],a},r.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var c=this.__cache.length,s=0,a="";this.__indent_size&&c>=this.__indent_size&&(s=Math.floor(c/this.__indent_size),c-=s*this.__indent_size,a=new Array(s+1).join(this.__indent_string)),c&&(a+=new Array(c+1).join(" ")),this.__cache.push(a)};function t(c,s){this.__indent_cache=new r(c,s),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},t.prototype.get_line_number=function(){return this.__lines.length},t.prototype.get_indent_string=function(c,s){return this.__indent_cache.get_indent_string(c,s)},t.prototype.get_indent_size=function(c,s){return this.__indent_cache.get_indent_size(c,s)},t.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},t.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},t.prototype.get_code=function(c){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===` `&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` `);return c!==` `&&(a=a.replace(/[\n]/g,c)),a},t.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},t.prototype.set_indent=function(c,s){return c=c||0,s=s||0,this.next_line.set_indent(c,s),this.__lines.length>1?(this.current_line.set_indent(c,s),!0):(this.current_line.set_indent(),!1)},t.prototype.add_raw_token=function(c){for(var s=0;s1&&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},t.prototype.just_added_newline=function(){return this.current_line.is_empty()},t.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},t.prototype.ensure_empty_line_above=function(c,s){for(var a=this.__lines.length-2;a>=0;){var o=this.__lines[a];if(o.is_empty())break;if(o.item(0).indexOf(c)!==0&&o.item(-1)!==s){this.__lines.splice(a+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},T.exports.Output=t},,,,function(T){function p(c,s){this.raw_options=r(c,s),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"])}p.prototype._get_array=function(c,s){var a=this.raw_options[c],o=s||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(o=a.concat()):typeof a=="string"&&(o=a.split(/[^a-zA-Z0-9_\/\-]+/)),o},p.prototype._get_boolean=function(c,s){var a=this.raw_options[c],o=a===void 0?!!s:!!a;return o},p.prototype._get_characters=function(c,s){var a=this.raw_options[c],o=s||"";return typeof a=="string"&&(o=a.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),o},p.prototype._get_number=function(c,s){var a=this.raw_options[c];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(a,10);return isNaN(o)&&(o=s),o},p.prototype._get_selection=function(c,s,a){var o=this._get_selection_list(c,s,a);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values: `+s+` You passed in: '`+this.raw_options[c]+"'");return o[0]},p.prototype._get_selection_list=function(c,s,a){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[s[0]],!this._is_valid_selection(a,s))throw new Error("Invalid Default Value!");var o=this._get_array(c,a);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values: `+s+` You passed in: '`+this.raw_options[c]+"'");return o},p.prototype._is_valid_selection=function(c,s){return c.length&&s.length&&!c.some(function(a){return s.indexOf(a)===-1})};function r(c,s){var a={};c=t(c);var o;for(o in c)o!==s&&(a[o]=c[o]);if(s&&c[s])for(o in c[s])a[o]=c[s][o];return a}function t(c){var s={},a;for(a in c){var o=a.replace(/-/g,"_");s[o]=c[a]}return s}T.exports.Options=p,T.exports.normalizeOpts=t,T.exports.mergeOpts=r},,function(T){var p=RegExp.prototype.hasOwnProperty("sticky");function r(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&t=0&&c=t.length&&this.__input.substring(c-t.length,c).toLowerCase()===t},T.exports.InputScanner=r},,,,,function(T){function p(r,t){r=typeof r=="string"?r:r.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+t,"g")}p.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(r);c;)t[c[1]]=c[2],c=this.__directive_pattern.exec(r);return t},p.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},T.exports.Directives=p},,function(T,p,r){var t=r(16).Beautifier,c=r(17).Options;function s(a,o){var d=new t(a,o);return d.beautify()}T.exports=s,T.exports.defaultOptions=function(){return new c}},function(T,p,r){var t=r(17).Options,c=r(2).Output,s=r(8).InputScanner,a=r(13).Directives,o=new a(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,l=/\s/,m=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,R=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function w(L,b){this._source_text=L||"",this._options=new t(b),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"]}w.prototype.eatString=function(L){var b="";for(this._ch=this._input.next();this._ch;){if(b+=this._ch,this._ch==="\\")b+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return b},w.prototype.eatWhitespace=function(L){for(var b=l.test(this._input.peek()),g=0;l.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===` `&&((g===0||g0&&this._indentLevel--},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,b=this._options.eol;b==="auto"&&(b=` `,L&&d.test(L||"")&&(b=L.match(d)[0])),L=L.replace(A,` `);var g=L.match(/^[\t ]*/)[0];this._output=new c(this._options,g),this._input=new s(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i=0,u=!1,f=!1,y=!1,h=!1,v=!1,P=!1,N=this._ch,Q=!1,G,F,D;G=this._input.read(m),F=G!=="",D=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(_),j=o.get_directives(z);j&&j.ignore==="start"&&(z+=o.readIgnored(this._input)),this.print_string(z),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(R)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(F),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Z=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Z.match(/[ :]$/)&&(Z=this.eatString(": ").replace(/\s$/,""),this.print_string(Z),this._output.space_before_token=!0),Z=Z.replace(/\s$/,""),Z==="extend"?h=!0:Z==="import"&&(v=!0),Z in this.NESTED_AT_RULE?(this._nestedLevel+=1,Z in this.CONDITIONAL_GROUP_RULE&&(y=!0)):!u&&i===0&&Z.indexOf(":")!==-1&&(f=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(F),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")f&&(f=!1,this.outdent()),y?(y=!1,u=this._indentLevel>=this._nestedLevel):u=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&u&&(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)):(D==="("?this._output.space_before_token=!1:D!==","&&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(),D==="{"&&this._output.trim(!0),v=!1,h=!1,f&&(this.outdent(),f=!1),this.print_string(this._ch),u=!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 te=0;te"||this._ch==="+"||this._ch==="~")&&!f&&i===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&&l.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(F),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),l.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 ce=D==='"'||D==="'";this.preserveSingleSpace(ce||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&Q&&this._output.add_new_line()}var ae=this._output.get_code(b);return ae},T.exports.Beautifier=w},function(T,p,r){var t=r(6).Options;function c(s){t.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var a=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||a;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;dE&&(t=x+T,x*=E/t,T*=E/t),p+r>E&&(t=p+r,p*=E/t,r*=E/t),T+p>B&&(t=T+p,T*=B/t,p*=B/t),x+r>B&&(t=x+r,x*=B/t,r*=B/t),q.moveTo(I+x,k),q.lineTo(I+E-T,k),T!==0&&q.arc(I+E-T,k+T,T,-Math.PI/2,0),q.lineTo(I+E,k+B-p),p!==0&&q.arc(I+E-p,k+B-p,p,0,Math.PI/2),q.lineTo(I+r,k+B),r!==0&&q.arc(I+r,k+B-r,r,Math.PI/2,Math.PI),q.lineTo(I,k+x),x!==0&&q.arc(I+x,k+x,x,Math.PI,Math.PI*1.5)}oe.buildPath=C},"VrN/":function(Ie,oe,C){(function(q,K){Ie.exports=K()})(this,function(){"use strict";var q=navigator.userAgent,K=navigator.platform,I=/gecko\/\d/i.test(q),k=/MSIE \d/.test(q),E=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q),B=/Edge\/(\d+)/.exec(q),M=k||E||B,x=M&&(k?document.documentMode||6:+(B||E)[1]),T=!B&&/WebKit\//.test(q),p=T&&/Qt\/\d+\.\d+/.test(q),r=!B&&/Chrome\//.test(q),t=/Opera\//.test(q),c=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(q),a=/PhantomJS/.test(q),o=!B&&/AppleWebKit/.test(q)&&/Mobile\/\w+/.test(q),d=/Android/.test(q),A=o||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(q),l=o||/Mac/.test(K),m=/\bCrOS\b/.test(q),_=/win/i.test(K),R=t&&q.match(/Version\/(\d*\.\d*)/);R&&(R=Number(R[1])),R&&R>=15&&(t=!1,T=!0);var w=l&&(p||t&&(R==null||R<12.11)),L=I||M&&x>=9;function b(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,n){var O=e.className,S=b(n).exec(O);if(S){var U=O.slice(S.index+S[0].length);e.className=O.slice(0,S.index)+(U?S[1]+U:"")}};function i(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function u(e,n){return i(e).appendChild(n)}function f(e,n,O,S){var U=document.createElement(e);if(O&&(U.className=O),S&&(U.style.cssText=S),typeof n=="string")U.appendChild(document.createTextNode(n));else if(n)for(var $=0;$=n)return le+(n-$);le+=ye-$,le+=O-le%O,$=ye+1}}var j=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};j.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},j.prototype.set=function(e,n){this.f=n;var O=+new Date+e;(!this.id||O=n)return S+Math.min(le,n-U);if(U+=$-S,U+=O-U%O,S=$+1,U>=n)return S}}var ue=[""];function fe(e){for(;ue.length<=e;)ue.push(se(ue)+" ");return ue[e]}function se(e){return e[e.length-1]}function me(e,n){for(var O=[],S=0;S"\x80"&&(e.toUpperCase()!=e.toLowerCase()||we.test(e))}function et(e,n){return n?n.source.indexOf("\\w")>-1&&je(e)?!0:n.test(e):je(e)}function Le(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var We=/[\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 Ze(e){return e.charCodeAt(0)>=768&&We.test(e)}function $e(e,n,O){for(;(O<0?n>0:nO?-1:1;;){if(n==O)return n;var U=(n+O)/2,$=S<0?Math.ceil(U):Math.floor(U);if($==n)return e($)?n:O;e($)?O=$:n=$+S}}function wt(e,n,O,S){if(!e)return S(n,O,"ltr",0);for(var U=!1,$=0;$n||n==O&&le.to==n)&&(S(Math.max(le.from,n),Math.min(le.to,O),le.level==1?"rtl":"ltr",$),U=!0)}U||S(n,O,"ltr")}var It=null;function ft(e,n,O){var S;It=null;for(var U=0;Un)return U;$.to==n&&($.from!=$.to&&O=="before"?S=U:It=U),$.from==n&&($.from!=$.to&&O!="before"?S=U:It=U)}return S!=null?S:It}var Ft=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function O(Re){return Re<=247?e.charAt(Re):1424<=Re&&Re<=1524?"R":1536<=Re&&Re<=1785?n.charAt(Re-1536):1774<=Re&&Re<=2220?"r":8192<=Re&&Re<=8203?"w":Re==8204?"b":"L"}var S=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,$=/[LRr]/,le=/[Lb1n]/,ye=/[1n]/;function be(Re,st,At){this.level=Re,this.from=st,this.to=At}return function(Re,st){var At=st=="ltr"?"L":"R";if(Re.length==0||st=="ltr"&&!S.test(Re))return!1;for(var Nt=Re.length,Ut=[],An=0;An-1&&(S[n]=U.slice(0,$).concat(U.slice($+1)))}}}function at(e,n){var O=yt(e,n);if(!O.length)return;for(var S=Array.prototype.slice.call(arguments,2),U=0;U0}function ke(e){e.prototype.on=function(n,O){ze(this,n,O)},e.prototype.off=function(n,O){St(this,n,O)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Me(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function He(e){Ce(e),Se(e)}function Ge(e){return e.target||e.srcElement}function mt(e){var n=e.which;return n==null&&(e.button&1?n=1:e.button&2?n=3:e.button&4&&(n=2)),l&&e.ctrlKey&&n==1&&(n=3),n}var Lt=function(){if(M&&x<9)return!1;var e=f("div");return"draggable"in e||"dragDrop"in e}(),en;function Jt(e){if(en==null){var n=f("span","\u200B");u(e,f("span",[n,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(en=n.offsetWidth<=1&&n.offsetHeight>2&&!(M&&x<8))}var O=en?f("span","\u200B"):f("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return O.setAttribute("cm-text",""),O}var Ct;function Et(e){if(Ct!=null)return Ct;var n=u(e,document.createTextNode("A\u062EA")),O=h(n,0,1).getBoundingClientRect(),S=h(n,1,2).getBoundingClientRect();return i(e),!O||O.left==O.right?!1:Ct=S.right-O.right<3}var pt=` b`.split(/\n/).length!=3?function(e){for(var n=0,O=[],S=e.length;n<=S;){var U=e.indexOf(` `,n);U==-1&&(U=e.length);var $=e.slice(n,e.charAt(U-1)=="\r"?U-1:U),le=$.indexOf("\r");le!=-1?(O.push($.slice(0,le)),n+=le+1):(O.push($),n=U+1)}return O}:function(e){return e.split(/\r\n?|\n/)},Xe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(n){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(O){}return!n||n.parentElement()!=e?!1:n.compareEndPoints("StartToEnd",n)!=0},Fe=function(){var e=f("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Te=null;function Ne(e){if(Te!=null)return Te;var n=u(e,f("span","x")),O=n.getBoundingClientRect(),S=h(n,0,1).getBoundingClientRect();return Te=Math.abs(O.left-S.left)>1}var xt={},vt={};function Dt(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),xt[e]=n}function Ht(e,n){vt[e]=n}function ct(e){if(typeof e=="string"&&vt.hasOwnProperty(e))e=vt[e];else if(e&&typeof e.name=="string"&&vt.hasOwnProperty(e.name)){var n=vt[e.name];typeof n=="string"&&(n={name:n}),e=De(n,e),e.name=n.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ct("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ct("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Mt(e,n){n=ct(n);var O=xt[n.name];if(!O)return Mt(e,"text/plain");var S=O(e,n);if(Gt.hasOwnProperty(n.name)){var U=Gt[n.name];for(var $ in U){if(!U.hasOwnProperty($))continue;S.hasOwnProperty($)&&(S["_"+$]=S[$]),S[$]=U[$]}}if(S.name=n.name,n.helperType&&(S.helperType=n.helperType),n.modeProps)for(var le in n.modeProps)S[le]=n.modeProps[le];return S}var Gt={};function gn(e,n){var O=Gt.hasOwnProperty(e)?Gt[e]:Gt[e]={};D(n,O)}function Tn(e,n){if(n===!0)return n;if(e.copyState)return e.copyState(n);var O={};for(var S in n){var U=n[S];U instanceof Array&&(U=U.concat([])),O[S]=U}return O}function Gr(e,n){for(var O;e.innerMode&&!(O=e.innerMode(n),!O||O.mode==e);)n=O.state,e=O.mode;return O||{mode:e,state:n}}function Vr(e,n,O){return e.startState?e.startState(n,O):!0}var Kr=function(e,n,O){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=O};Kr.prototype.eol=function(){return this.pos>=this.string.length},Kr.prototype.sol=function(){return this.pos==this.lineStart},Kr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Kr.prototype.next=function(){if(this.posn},Kr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Kr.prototype.skipToEnd=function(){this.pos=this.string.length},Kr.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},Kr.prototype.backUp=function(e){this.pos-=e},Kr.prototype.column=function(){return this.lastColumnPos0?null:($&&n!==!1&&(this.pos+=$[0].length),$)}},Kr.prototype.current=function(){return this.string.slice(this.start,this.pos)},Kr.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},Kr.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},Kr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function kn(e,n){if(n-=e.first,n<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var O=e;!O.lines;)for(var S=0;;++S){var U=O.children[S],$=U.chunkSize();if(n<$){O=U;break}n-=$}return O.lines[n]}function Ua(e,n,O){var S=[],U=n.line;return e.iter(n.line,O.line+1,function($){var le=$.text;U==O.line&&(le=le.slice(0,O.ch)),U==n.line&&(le=le.slice(n.ch)),S.push(le),++U}),S}function Ya(e,n,O){var S=[];return e.iter(n,O,function(U){S.push(U.text)}),S}function Ra(e,n){var O=n-e.height;if(O)for(var S=e;S;S=S.parent)S.height+=O}function Xr(e){if(e.parent==null)return null;for(var n=e.parent,O=Z(n.lines,e),S=n.parent;S;n=S,S=S.parent)for(var U=0;!(S.children[U]==n);++U)O+=S.children[U].chunkSize();return O+n.first}function Ja(e,n){var O=e.first;e:do{for(var S=0;S=e.first&&nO?_e(O,kn(e,O).text.length):V(n,kn(e,n.line).text.length)}function V(e,n){var O=e.ch;return O==null||O>n?_e(e.line,n):O<0?_e(e.line,0):e}function ee(e,n){for(var O=[],S=0;Sthis.maxLookAhead&&(this.maxLookAhead=e),n},ie.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ie.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ie.fromSaved=function(e,n,O){return n instanceof ge?new ie(e,Tn(e.mode,n.state),O,n.lookAhead):new ie(e,Tn(e.mode,n),O)},ie.prototype.save=function(e){var n=e!==!1?Tn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ge(n,this.maxLookAhead):n};function tt(e,n,O,S){var U=[e.state.modeGen],$={};$r(e,n.text,e.doc.mode,O,function(Re,st){return U.push(Re,st)},$,S);for(var le=O.state,ye=function(Re){O.baseTokens=U;var st=e.state.overlays[Re],At=1,Nt=0;O.state=!0,$r(e,n.text,st.mode,O,function(Ut,An){for(var yn=At;NtUt&&U.splice(At,1,Ut,U[At+1],Nn),At+=2,Nt=Math.min(Ut,Nn)}if(!An)return;if(st.opaque)U.splice(yn,At-yn,Ut,"overlay "+An),At=yn+2;else for(;yne.options.maxHighlightLength&&Tn(e.doc.mode,S.state),$=tt(e,n,S);U&&(S.state=U),n.stateAfter=S.save(!U),n.styles=$.styles,$.classes?n.styleClasses=$.classes:n.styleClasses&&(n.styleClasses=null),O===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function dn(e,n,O){var S=e.doc,U=e.display;if(!S.mode.startState)return new ie(S,!0,n);var $=Hr(e,n,O),le=$>S.first&&kn(S,$-1).stateAfter,ye=le?ie.fromSaved(S,le,$):new ie(S,Vr(S.mode),$);return S.iter($,n,function(be){_n(e,be.text,ye);var Re=ye.line;be.stateAfter=Re==n-1||Re%5==0||Re>=U.viewFrom&&Ren.start)return $}throw new Error("Mode "+e.name+" failed to advance stream.")}var Xn=function(e,n,O){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=O};function lr(e,n,O,S){var U=e.doc,$=U.mode,le;n=H(U,n);var ye=kn(U,n.line),be=dn(e,n.line,O),Re=new Kr(ye.text,e.options.tabSize,be),st;for(S&&(st=[]);(S||Re.pose.options.maxHighlightLength?(ye=!1,le&&_n(e,n,S,st.pos),st.pos=n.length,At=null):At=Or(Vn(O,st,S.state,Nt),$),Nt){var Ut=Nt[0].name;Ut&&(At="m-"+(At?Ut+" "+At:Ut))}if(!ye||Re!=At){for(;bele;--ye){if(ye<=$.first)return $.first;var be=kn($,ye-1),Re=be.stateAfter;if(Re&&(!O||ye+(Re instanceof ge?Re.lookAhead:0)<=$.modeFrontier))return ye;var st=z(be.text,null,e.options.tabSize);(U==null||S>st)&&(U=ye-1,S=st)}return U}function ba(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),e.highlightFrontierO;S--){var U=kn(e,S).stateAfter;if(U&&(!(U instanceof ge)||S+U.lookAhead=n:$.to>n);(S||(S=[])).push(new Ha(le,$.from,be?null:$.to))}}return S}function pi(e,n,O){var S;if(e)for(var U=0;U=n:$.to>n);if(ye||$.from==n&&le.type=="bookmark"&&(!O||$.marker.insertLeft)){var be=$.from==null||(le.inclusiveLeft?$.from<=n:$.from0&&ye)for(var br=0;br0)continue;var st=[be,1],At=Be(Re.from,ye.from),Nt=Be(Re.to,ye.to);(At<0||!le.inclusiveLeft&&!At)&&st.push({from:Re.from,to:ye.from}),(Nt>0||!le.inclusiveRight&&!Nt)&&st.push({from:ye.to,to:Re.to}),U.splice.apply(U,st),be+=st.length-3}return U}function Yi(e){var n=e.markedSpans;if(!n)return;for(var O=0;On)&&(!S||la(S,$.marker)<0)&&(S=$.marker)}return S}function Ii(e,n,O,S,U){var $=kn(e,n),le=ga&&$.markedSpans;if(le)for(var ye=0;ye=0&&At<=0||st<=0&&At>=0)continue;if(st<=0&&(be.marker.inclusiveRight&&U.inclusiveLeft?Be(Re.to,O)>=0:Be(Re.to,O)>0)||st>=0&&(be.marker.inclusiveRight&&U.inclusiveLeft?Be(Re.from,S)<=0:Be(Re.from,S)<0))return!0}}function ci(e){for(var n;n=ri(e);)e=n.find(-1,!0).line;return e}function Wo(e){for(var n;n=ha(e);)e=n.find(1,!0).line;return e}function Lo(e){for(var n,O;n=ha(e);)e=n.find(1,!0).line,(O||(O=[])).push(e);return O}function ii(e,n){var O=kn(e,n),S=ci(O);return O==S?n:Xr(S)}function go(e,n){if(n>e.lastLine())return n;var O=kn(e,n),S;if(!no(e,O))return n;for(;S=ha(O);)O=S.find(1,!0).line;return Xr(O)+1}function no(e,n){var O=ga&&n.markedSpans;if(O)for(var S=void 0,U=0;Un.maxLineLength&&(n.maxLineLength=U,n.maxLine=S)})}var Ao=function(e,n,O){this.text=e,Zr(this,n),this.height=O?O(this):1};Ao.prototype.lineNo=function(){return Xr(this)},ke(Ao);function hs(e,n,O,S){e.text=n,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Yi(e),Zr(e,O);var U=S?S(e):1;U!=e.height&&Ra(e,U)}function mr(e){e.parent=null,Yi(e)}var Wr={},ur={};function aa(e,n){if(!e||/^\s*$/.test(e))return null;var O=n.addModeClass?ur:Wr;return O[e]||(O[e]=e.replace(/\S+/g,"cm-$&"))}function Ea(e,n){var O=y("span",null,null,T?"padding-right: .1px":null),S={pre:y("pre",[O],"CodeMirror-line"),content:O,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var U=0;U<=(n.rest?n.rest.length:0);U++){var $=U?n.rest[U-1]:n.line,le=void 0;S.pos=0,S.addToken=Ta,Et(e.display.measure)&&(le=zt($,e.doc.direction))&&(S.addToken=Ia(S.addToken,le)),S.map=[];var ye=n!=e.display.externalMeasured&&Xr($);Po($,S,Qt(e,$,ye)),$.styleClasses&&($.styleClasses.bgClass&&(S.bgClass=Q($.styleClasses.bgClass,S.bgClass||"")),$.styleClasses.textClass&&(S.textClass=Q($.styleClasses.textClass,S.textClass||""))),S.map.length==0&&S.map.push(0,0,S.content.appendChild(Jt(e.display.measure))),U==0?(n.measure.map=S.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(S.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(T){var be=S.content.lastChild;(/\bcm-tab\b/.test(be.className)||be.querySelector&&be.querySelector(".cm-tab"))&&(S.content.className="cm-tab-wrap-hack")}return at(e,"renderLine",e,n.line,S.pre),S.pre.className&&(S.textClass=Q(S.pre.className,S.textClass||"")),S}function ei(e){var n=f("span","\u2022","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function Ta(e,n,O,S,U,$,le){if(!n)return;var ye=e.splitSpaces?Ui(n,e.trailingSpace):n,be=e.cm.state.specialChars,Re=!1,st;if(!be.test(n))e.col+=n.length,st=document.createTextNode(ye),e.map.push(e.pos,e.pos+n.length,st),M&&x<9&&(Re=!0),e.pos+=n.length;else{st=document.createDocumentFragment();for(var At=0;;){be.lastIndex=At;var Nt=be.exec(n),Ut=Nt?Nt.index-At:n.length-At;if(Ut){var An=document.createTextNode(ye.slice(At,At+Ut));M&&x<9?st.appendChild(f("span",[An])):st.appendChild(An),e.map.push(e.pos,e.pos+Ut,An),e.col+=Ut,e.pos+=Ut}if(!Nt)break;At+=Ut+1;var yn=void 0;if(Nt[0]==" "){var Nn=e.cm.options.tabSize,Zn=Nn-e.col%Nn;yn=st.appendChild(f("span",fe(Zn),"cm-tab")),yn.setAttribute("role","presentation"),yn.setAttribute("cm-text"," "),e.col+=Zn}else Nt[0]=="\r"||Nt[0]==` `?(yn=st.appendChild(f("span",Nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yn.setAttribute("cm-text",Nt[0]),e.col+=1):(yn=e.cm.options.specialCharPlaceholder(Nt[0]),yn.setAttribute("cm-text",Nt[0]),M&&x<9?st.appendChild(f("span",[yn])):st.appendChild(yn),e.col+=1);e.map.push(e.pos,e.pos+1,yn),e.pos++}}if(e.trailingSpace=ye.charCodeAt(n.length-1)==32,O||S||U||Re||$||le){var sr=O||"";S&&(sr+=S),U&&(sr+=U);var $n=f("span",[st],sr,$);if(le)for(var br in le)le.hasOwnProperty(br)&&br!="style"&&br!="class"&&$n.setAttribute(br,le[br]);return e.content.appendChild($n)}e.content.appendChild(st)}function Ui(e,n){if(e.length>1&&!/ /.test(e))return e;for(var O=n,S="",U=0;URe&&At.from<=Re);Nt++);if(At.to>=st)return e(O,S,U,$,le,ye,be);e(O,S.slice(0,At.to-Re),U,$,null,ye,be),$=null,S=S.slice(At.to-Re),Re=At.to}}}function _a(e,n,O,S){var U=!S&&O.widgetNode;U&&e.map.push(e.pos,e.pos+n,U),!S&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",O.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=n,e.trailingSpace=!1}function Po(e,n,O){var S=e.markedSpans,U=e.text,$=0;if(!S){for(var le=1;lebe||Pa.collapsed&&kr.to==be&&kr.from==be)){if(kr.to!=null&&kr.to!=be&&Ut>kr.to&&(Ut=kr.to,yn=""),Pa.className&&(An+=" "+Pa.className),Pa.css&&(Nt=(Nt?Nt+";":"")+Pa.css),Pa.startStyle&&kr.from==be&&(Nn+=" "+Pa.startStyle),Pa.endStyle&&kr.to==Ut&&(br||(br=[])).push(Pa.endStyle,kr.to),Pa.title&&((sr||(sr={})).title=Pa.title),Pa.attributes)for(var Fi in Pa.attributes)(sr||(sr={}))[Fi]=Pa.attributes[Fi];Pa.collapsed&&(!Zn||la(Zn.marker,Pa)<0)&&(Zn=kr)}else kr.from>be&&Ut>kr.from&&(Ut=kr.from)}if(br)for(var Co=0;Co=ye)break;for(var ds=Math.min(ye,Ut);;){if(st){var Qo=be+st.length;if(!Zn){var po=Qo>ds?st.slice(0,ds-be):st;n.addToken(n,po,At?At+An:An,Nn,be+po.length==Ut?yn:"",Nt,sr)}if(Qo>=ds){st=st.slice(ds-be),be=ds;break}be=Qo,Nn=""}st=U.slice($,$=O[Re++]),At=aa(O[Re++],n.cm.options)}}}function Za(e,n,O){this.line=n,this.rest=Lo(n),this.size=this.rest?Xr(se(this.rest))-O+1:1,this.node=this.text=null,this.hidden=no(e,n)}function ro(e,n,O){for(var S=[],U,$=n;$2&&$.push((be.bottom+Re.top)/2-O.top)}}$.push(O.bottom-O.top)}}function Oe(e,n,O){if(e.line==n)return{map:e.measure.map,cache:e.measure.cache};for(var S=0;SO)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function ot(e,n){n=ci(n);var O=Xr(n),S=e.display.externalMeasured=new Za(e.doc,n,O);S.lineN=O;var U=S.built=Ea(e,S);return S.text=U.pre,u(e.display.lineMeasure,U.pre),S}function lt(e,n,O,S){return Pt(e,dt(e,n),O,S)}function Tt(e,n){if(n>=e.display.viewFrom&&n=O.lineN&&nn)&&($=be-ye,U=$-1,n>=be&&(le="right")),U!=null){if(S=e[Re+2],ye==be&&O==(S.insertLeft?"left":"right")&&(le=O),O=="left"&&U==0)for(;Re&&e[Re-2]==e[Re-3]&&e[Re-1].insertLeft;)S=e[(Re-=3)+2],le="left";if(O=="right"&&U==be-ye)for(;Re=0&&!((O=e[U]).left!=O.right);U--);return O}function Bt(e,n,O,S){var U=ut(n.map,O,S),$=U.node,le=U.start,ye=U.end,be=U.collapse,Re;if($.nodeType==3){for(var st=0;st<4;st++){for(;le&&Ze(n.line.text.charAt(U.coverStart+le));)--le;for(;U.coverStart+ye0&&(be=S="right");var At;e.options.lineWrapping&&(At=$.getClientRects()).length>1?Re=At[S=="right"?At.length-1:0]:Re=$.getBoundingClientRect()}if(M&&x<9&&!le&&(!Re||!Re.left&&!Re.right)){var Nt=$.parentNode.getClientRects()[0];Nt?Re={left:Nt.left,right:Nt.left+vn(e.display),top:Nt.top,bottom:Nt.bottom}:Re=tn}for(var Ut=Re.top-n.rect.top,An=Re.bottom-n.rect.top,yn=(Ut+An)/2,Nn=n.view.measure.heights,Zn=0;Zn=S.text.length?(be=S.text.length,Re="before"):be<=0&&(be=0,Re="after"),!ye)return le(Re=="before"?be-1:be,Re=="before");function st(An,yn,Nn){var Zn=ye[yn],sr=Zn.level==1;return le(Nn?An-1:An,sr!=Nn)}var At=ft(ye,be,Re),Nt=It,Ut=st(be,At,Re=="before");return Nt!=null&&(Ut.other=st(be,Nt,Re!="before")),Ut}function Cn(e,n){var O=0;n=H(e.doc,n),e.options.lineWrapping||(O=vn(e.display)*n.ch);var S=kn(e.doc,n.line),U=xo(S)+ol(e.display);return{left:O,right:O,top:U,bottom:U+S.height}}function ln(e,n,O,S,U){var $=_e(e,n,O);return $.xRel=U,S&&($.outside=S),$}function wn(e,n,O){var S=e.doc;if(O+=e.display.viewOffset,O<0)return ln(S.first,0,null,-1,-1);var U=Ja(S,O),$=S.first+S.size-1;if(U>$)return ln(S.first+S.size-1,kn(S,$).text.length,null,1,1);n<0&&(n=0);for(var le=kn(S,U);;){var ye=Ar(e,le,U,n,O),be=mo(le,ye.ch+(ye.xRel>0||ye.outside>0?1:0));if(!be)return ye;var Re=be.find(1);if(Re.line==U)return Re;le=kn(S,U=Re.line)}}function an(e,n,O,S){S-=hn(n);var U=n.text.length,$=bt(function(le){return Pt(e,O,le-1).bottom<=S},U,0);return U=bt(function(le){return Pt(e,O,le).top>S},$,U),{begin:$,end:U}}function Vt(e,n,O,S){O||(O=dt(e,n));var U=qt(e,n,Pt(e,O,S),"line").top;return an(e,n,O,U)}function Sn(e,n,O,S){return e.bottom<=O?!1:e.top>O?!0:(S?e.left:e.right)>n}function Ar(e,n,O,S,U){U-=xo(n);var $=dt(e,n),le=hn(n),ye=0,be=n.text.length,Re=!0,st=zt(n,e.doc.direction);if(st){var At=(e.options.lineWrapping?Dn:fn)(e,n,O,$,st,S,U);Re=At.level!=1,ye=Re?At.from:At.to-1,be=Re?At.to:At.from-1}var Nt=null,Ut=null,An=bt(function(Jr){var kr=Pt(e,$,Jr);return kr.top+=le,kr.bottom+=le,Sn(kr,S,U,!1)?(kr.top<=U&&kr.left<=S&&(Nt=Jr,Ut=kr),!0):!1},ye,be),yn,Nn,Zn=!1;if(Ut){var sr=S-Ut.left=br.bottom?1:0}return An=$e(n.text,An,1),ln(O,An,Nn,Zn,S-yn)}function fn(e,n,O,S,U,$,le){var ye=bt(function(At){var Nt=U[At],Ut=Nt.level!=1;return Sn(Yt(e,_e(O,Ut?Nt.to:Nt.from,Ut?"before":"after"),"line",n,S),$,le,!0)},0,U.length-1),be=U[ye];if(ye>0){var Re=be.level!=1,st=Yt(e,_e(O,Re?be.from:be.to,Re?"after":"before"),"line",n,S);Sn(st,$,le,!0)&&st.top>le&&(be=U[ye-1])}return be}function Dn(e,n,O,S,U,$,le){var ye=an(e,n,S,le),be=ye.begin,Re=ye.end;/\s/.test(n.text.charAt(Re-1))&&Re--;for(var st=null,At=null,Nt=0;Nt=Re||Ut.to<=be)continue;var An=Ut.level!=1,yn=Pt(e,S,An?Math.min(Re,Ut.to)-1:Math.max(be,Ut.from)).right,Nn=yn<$?$-yn+1e9:yn-$;(!st||At>Nn)&&(st=Ut,At=Nn)}return st||(st=U[U.length-1]),st.fromRe&&(st={from:st.from,to:Re,level:st.level}),st}var Un;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Un==null){Un=f("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Un.appendChild(document.createTextNode("x")),Un.appendChild(f("br"));Un.appendChild(document.createTextNode("x"))}u(e.measure,Un);var O=Un.offsetHeight/50;return O>3&&(e.cachedTextHeight=O),i(e.measure),O||1}function vn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var n=f("span","xxxxxxxxxx"),O=f("pre",[n],"CodeMirror-line-like");u(e.measure,O);var S=n.getBoundingClientRect(),U=(S.right-S.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function Kn(e){for(var n=e.display,O={},S={},U=n.gutters.clientLeft,$=n.gutters.firstChild,le=0;$;$=$.nextSibling,++le){var ye=e.display.gutterSpecs[le].className;O[ye]=$.offsetLeft+$.clientLeft+U,S[ye]=$.clientWidth}return{fixedPos:or(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:O,gutterWidth:S,wrapperWidth:n.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function gr(e){var n=Gn(e.display),O=e.options.lineWrapping,S=O&&Math.max(5,e.display.scroller.clientWidth/vn(e.display)-3);return function(U){if(no(e.doc,U))return 0;var $=0;if(U.widgets)for(var le=0;le0&&(Re=kn(e.doc,be.line).text).length==be.ch){var st=z(Re,Re.length,e.options.tabSize)-Re.length;be=_e(be.line,Math.max(0,Math.round(($-ht(e.display).left)/vn(e.display))-st))}return be}function rr(e,n){if(n>=e.display.viewTo)return null;if(n-=e.display.viewFrom,n<0)return null;for(var O=e.display.view,S=0;Sn)&&(U.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=U.viewTo)ga&&ii(e.doc,n)U.viewFrom?_r(e):(U.viewFrom+=S,U.viewTo+=S);else if(n<=U.viewFrom&&O>=U.viewTo)_r(e);else if(n<=U.viewFrom){var $=ia(e,O,O+S,1);$?(U.view=U.view.slice($.index),U.viewFrom=$.lineN,U.viewTo+=S):_r(e)}else if(O>=U.viewTo){var le=ia(e,n,n,-1);le?(U.view=U.view.slice(0,le.index),U.viewTo=le.lineN):_r(e)}else{var ye=ia(e,n,n,-1),be=ia(e,O,O+S,1);ye&&be?(U.view=U.view.slice(0,ye.index).concat(ro(e,ye.lineN,be.lineN)).concat(U.view.slice(be.index)),U.viewTo+=S):_r(e)}var Re=U.externalMeasured;Re&&(O=U.lineN&&n=S.viewTo)return;var $=S.view[rr(e,n)];if($.node==null)return;var le=$.changes||($.changes=[]);Z(le,O)==-1&&le.push(O)}function _r(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ia(e,n,O,S){var U=rr(e,n),$,le=e.display.view;if(!ga||O==e.doc.first+e.doc.size)return{index:U,lineN:O};for(var ye=e.display.viewFrom,be=0;be0){if(U==le.length-1)return null;$=ye+le[U].size-n,U++}else $=ye-n;n+=$,O+=$}for(;ii(e.doc,O)!=O;){if(U==(S<0?0:le.length-1))return null;O+=S*le[U-(S<0?1:0)].size,U+=S}return{index:U,lineN:O}}function ea(e,n,O){var S=e.display,U=S.view;U.length==0||n>=S.viewTo||O<=S.viewFrom?(S.view=ro(e,n,O),S.viewFrom=n):(S.viewFrom>n?S.view=ro(e,n,S.viewFrom).concat(S.view):S.viewFromO&&(S.view=S.view.slice(0,rr(e,O)))),S.viewTo=O}function tr(e){for(var n=e.display.view,O=0,S=0;S=e.display.viewTo||ye.to().line0?n.blinker=setInterval(function(){e.hasFocus()||fr(e),n.cursorDiv.style.visibility=(O=!O)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}function oi(e){e.state.focused||(e.display.input.focus(),Rr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,fr(e))},100)}function Rr(e,n){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(at(e,"focus",e,n),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),T&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),yr(e)}function fr(e,n){if(e.state.delayingBlurEvent)return;e.state.focused&&(at(e,"blur",e,n),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ar(e){for(var n=e.display,O=n.lineDiv.offsetTop,S=0;S.005||st<-.005)&&(Ra(U.line,le),Mn(U.line),U.rest))for(var At=0;Ate.display.sizerWidth){var Nt=Math.ceil(ye/vn(e.display));Nt>e.display.maxLineLength&&(e.display.maxLineLength=Nt,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function Mn(e){if(e.widgets)for(var n=0;n=le&&($=Ja(n,xo(kn(n,be))-e.wrapper.clientHeight),le=be)}return{from:$,to:Math.max(le,$+1)}}function pn(e,n){if(Ot(e,"scrollCursorIntoView"))return;var O=e.display,S=O.sizer.getBoundingClientRect(),U=null;if(n.top+S.top<0?U=!0:n.bottom+S.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!a){var $=f("div","\u200B",null,`position: absolute; top: `+(n.top-O.viewOffset-ol(e.display))+`px; height: `+(n.bottom-n.top+_t(e)+O.barHeight)+`px; left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild($),$.scrollIntoView(U),e.display.lineSpace.removeChild($)}}function qn(e,n,O,S){S==null&&(S=0);var U;!e.options.lineWrapping&&n==O&&(n=n.ch?_e(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n,O=n.sticky=="before"?_e(n.line,n.ch+1,"before"):n);for(var $=0;$<5;$++){var le=!1,ye=Yt(e,n),be=!O||O==n?ye:Yt(e,O);U={left:Math.min(ye.left,be.left),top:Math.min(ye.top,be.top)-S,right:Math.max(ye.left,be.left),bottom:Math.max(ye.bottom,be.bottom)+S};var Re=cr(e,U),st=e.doc.scrollTop,At=e.doc.scrollLeft;if(Re.scrollTop!=null&&(Oa(e,Re.scrollTop),Math.abs(e.doc.scrollTop-st)>1&&(le=!0)),Re.scrollLeft!=null&&(Fr(e,Re.scrollLeft),Math.abs(e.doc.scrollLeft-At)>1&&(le=!0)),!le)break}return U}function ta(e,n){var O=cr(e,n);O.scrollTop!=null&&Oa(e,O.scrollTop),O.scrollLeft!=null&&Fr(e,O.scrollLeft)}function cr(e,n){var O=e.display,S=Gn(e.display);n.top<0&&(n.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:O.scroller.scrollTop,$=xe(e),le={};n.bottom-n.top>$&&(n.bottom=n.top+$);var ye=e.doc.height+Je(O),be=n.topye-S;if(n.topU+$){var st=Math.min(n.top,(Re?ye:n.bottom)-$);st!=U&&(le.scrollTop=st)}var At=e.options.fixedGutter?0:O.gutters.offsetWidth,Nt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:O.scroller.scrollLeft-At,Ut=nt(e)-O.gutters.offsetWidth,An=n.right-n.left>Ut;return An&&(n.right=n.left+Ut),n.left<10?le.scrollLeft=0:n.leftUt+Nt-3&&(le.scrollLeft=n.right+(An?0:10)-Ut),le}function Nr(e,n){if(n==null)return;ca(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n}function Da(e){ca(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function ua(e,n,O){(n!=null||O!=null)&&ca(e),n!=null&&(e.curOp.scrollLeft=n),O!=null&&(e.curOp.scrollTop=O)}function va(e,n){ca(e),e.curOp.scrollToPos=n}function ca(e){var n=e.curOp.scrollToPos;if(n){e.curOp.scrollToPos=null;var O=Cn(e,n.from),S=Cn(e,n.to);Ca(e,O,S,n.margin)}}function Ca(e,n,O,S){var U=cr(e,{left:Math.min(n.left,O.left),top:Math.min(n.top,O.top)-S,right:Math.max(n.right,O.right),bottom:Math.max(n.bottom,O.bottom)+S});ua(e,U.scrollLeft,U.scrollTop)}function Oa(e,n){if(Math.abs(e.doc.scrollTop-n)<2)return;I||yo(e,{top:n}),Ma(e,n,!0),I&&yo(e),vo(e,100)}function Ma(e,n,O){if(n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),e.display.scroller.scrollTop==n&&!O)return;e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n)}function Fr(e,n,O,S){if(n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(O?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!S)return;e.doc.scrollLeft=n,oa(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n)}function Qa(e){var n=e.display,O=n.gutters.offsetWidth,S=Math.round(e.doc.height+Je(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?O:0,docHeight:S,scrollHeight:S+_t(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:O}}var ya=function(e,n,O){this.cm=O;var S=this.vert=f("div",[f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=f("div",[f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");S.tabIndex=U.tabIndex=-1,e(S),e(U),ze(S,"scroll",function(){S.clientHeight&&n(S.scrollTop,"vertical")}),ze(U,"scroll",function(){U.clientWidth&&n(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,M&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ya.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,O=e.scrollHeight>e.clientHeight+1,S=e.nativeBarWidth;if(O){this.vert.style.display="block",this.vert.style.bottom=n?S+"px":"0";var U=e.viewHeight-(n?S:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=O?S+"px":"0",this.horiz.style.left=e.barLeft+"px";var $=e.viewWidth-e.barLeft-(O?S:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(S==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:O?S:0,bottom:n?S:0}},ya.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ya.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ya.prototype.zeroWidthHack=function(){var e=l&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},ya.prototype.enableZeroWidthBar=function(e,n,O){e.style.pointerEvents="auto";function S(){var U=e.getBoundingClientRect(),$=O=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);$!=e?e.style.pointerEvents="none":n.set(1e3,S)}n.set(1e3,S)},ya.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ka=function(){};Ka.prototype.update=function(){return{bottom:0,right:0}},Ka.prototype.setScrollLeft=function(){},Ka.prototype.setScrollTop=function(){},Ka.prototype.clear=function(){};function di(e,n){n||(n=Qa(e));var O=e.display.barWidth,S=e.display.barHeight;Ji(e,n);for(var U=0;U<4&&O!=e.display.barWidth||S!=e.display.barHeight;U++)O!=e.display.barWidth&&e.options.lineWrapping&&ar(e),Ji(e,Qa(e)),O=e.display.barWidth,S=e.display.barHeight}function Ji(e,n){var O=e.display,S=O.scrollbars.update(n);O.sizer.style.paddingRight=(O.barWidth=S.right)+"px",O.sizer.style.paddingBottom=(O.barHeight=S.bottom)+"px",O.heightForcer.style.borderBottom=S.bottom+"px solid transparent",S.right&&S.bottom?(O.scrollbarFiller.style.display="block",O.scrollbarFiller.style.height=S.bottom+"px",O.scrollbarFiller.style.width=S.right+"px"):O.scrollbarFiller.style.display="",S.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(O.gutterFiller.style.display="block",O.gutterFiller.style.height=S.bottom+"px",O.gutterFiller.style.width=n.gutterWidth+"px"):O.gutterFiller.style.display=""}var Di={native:ya,null:Ka};function Ei(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Di[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),ze(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,O){O=="horizontal"?Fr(e,n):Oa(e,n)},e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Uo=0;function ho(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:++Uo},To(e.curOp)}function _o(e){var n=e.curOp;n&&ti(n,function(O){for(var S=0;S=O.viewTo)||O.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new Ki(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function is(e){e.updatedDisplay=e.mustUpdate&&fo(e.cm,e.update)}function os(e){var n=e.cm,O=n.display;e.updatedDisplay&&ar(n),e.barMeasure=Qa(n),O.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=lt(n,O.maxLine,O.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(O.scroller.clientWidth,O.sizer.offsetLeft+e.adjustWidthTo+_t(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,O.sizer.offsetLeft+e.adjustWidthTo-nt(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=O.input.prepareSelection())}function So(e){var n=e.cm;e.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var O=+new Date+e.options.workTime,S=dn(e,n.highlightFrontier),U=[];n.iter(S.line,Math.min(n.first+n.size,e.display.viewTo+500),function($){if(S.line>=e.display.viewFrom){var le=$.styles,ye=$.text.length>e.options.maxHighlightLength?Tn(n.mode,S.state):null,be=tt(e,$,S,!0);ye&&(S.state=ye),$.styles=be.styles;var Re=$.styleClasses,st=be.classes;st?$.styleClasses=st:Re&&($.styleClasses=null);for(var At=!le||le.length!=$.styles.length||Re!=st&&(!Re||!st||Re.bgClass!=st.bgClass||Re.textClass!=st.textClass),Nt=0;!At&&NtO)return vo(e,e.options.workDelay),!0}),n.highlightFrontier=S.line,n.modeFrontier=Math.max(n.modeFrontier,S.line),U.length&&Qi(e,function(){for(var $=0;$=O.viewFrom&&n.visible.to<=O.viewTo&&(O.updateLineNumbers==null||O.updateLineNumbers>=O.viewTo)&&O.renderedView==O.view&&tr(e)==0)return!1;Ci(e)&&(_r(e),n.dims=Kn(e));var U=S.first+S.size,$=Math.max(n.visible.from-e.options.viewportMargin,S.first),le=Math.min(U,n.visible.to+e.options.viewportMargin);O.viewFrom<$&&$-O.viewFrom<20&&($=Math.max(S.first,O.viewFrom)),O.viewTo>le&&O.viewTo-le<20&&(le=Math.min(U,O.viewTo)),ga&&($=ii(e.doc,$),le=go(e.doc,le));var ye=$!=O.viewFrom||le!=O.viewTo||O.lastWrapHeight!=n.wrapperHeight||O.lastWrapWidth!=n.wrapperWidth;ea(e,$,le),O.viewOffset=xo(kn(e.doc,O.viewFrom)),e.display.mover.style.top=O.viewOffset+"px";var be=tr(e);if(!ye&&be==0&&!n.force&&O.renderedView==O.view&&(O.updateLineNumbers==null||O.updateLineNumbers>=O.viewTo))return!1;var Re=ls(e);return be>4&&(O.lineDiv.style.display="none"),es(e,O.updateLineNumbers,n.dims),be>4&&(O.lineDiv.style.display=""),O.renderedView=O.view,qo(Re),i(O.cursorDiv),i(O.selectionDiv),O.gutters.style.height=O.sizer.style.minHeight=0,ye&&(O.lastWrapHeight=n.wrapperHeight,O.lastWrapWidth=n.wrapperWidth,vo(e,400)),O.updateLineNumbers=null,!0}function zo(e,n){for(var O=n.viewport,S=!0;;S=!1){if(!S||!e.options.lineWrapping||n.oldDisplayWidth==nt(e)){if(O&&O.top!=null&&(O={top:Math.min(e.doc.height+Je(e.display)-xe(e),O.top)}),n.visible=Ln(e.display,e.doc,O),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break}else S&&(n.visible=Ln(e.display,e.doc,O));if(!fo(e,n))break;ar(e);var U=Qa(e);vr(e),di(e,U),xa(e,U),n.force=!1}n.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function yo(e,n){var O=new Ki(e,n);if(fo(e,O)){ar(e),zo(e,O);var S=Qa(e);vr(e),di(e,S),xa(e,S),O.finish()}}function es(e,n,O){var S=e.display,U=e.options.lineNumbers,$=S.lineDiv,le=$.firstChild;function ye(An){var yn=An.nextSibling;return T&&l&&e.display.currentWheelTarget==An?An.style.display="none":An.parentNode.removeChild(An),yn}for(var be=S.view,Re=S.viewFrom,st=0;st-1&&(Ut=!1),xs(e,At,Re,O)),Ut&&(i(At.lineNumber),At.lineNumber.appendChild(document.createTextNode(ji(e.options,Re)))),le=At.node.nextSibling}Re+=At.size}for(;le;)le=ye(le)}function Go(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function xa(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+_t(e)+"px"}function oa(e){var n=e.display,O=n.view;if(!n.alignWidgets&&(!n.gutters.firstChild||!e.options.fixedGutter))return;for(var S=or(n)-n.scroller.scrollLeft+e.doc.scrollLeft,U=n.gutters.offsetWidth,$=S+"px",le=0;lele.clientWidth,be=le.scrollHeight>le.clientHeight;if(!(S&&ye||U&&be))return;if(U&&l&&T){e:for(var Re=n.target,st=$.view;Re!=le;Re=Re.parentNode)for(var At=0;At=0&&Be(e,S.to())<=0)return O}return-1};var Fa=function(e,n){this.anchor=e,this.head=n};Fa.prototype.from=function(){return sn(this.anchor,this.head)},Fa.prototype.to=function(){return Xt(this.anchor,this.head)},Fa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ni(e,n,O){var S=e&&e.options.selectionsMayTouch,U=n[O];n.sort(function(Nt,Ut){return Be(Nt.from(),Ut.from())}),O=Z(n,U);for(var $=1;$0:be>=0){var Re=sn(ye.from(),le.from()),st=Xt(ye.to(),le.to()),At=ye.empty()?le.from()==le.head:ye.from()==ye.head;$<=O&&--O,n.splice(--$,2,new Fa(At?st:Re,At?Re:st))}}return new lo(n,O)}function wi(e,n){return new lo([new Fa(e,n||e)],0)}function Bo(e){return e.text?_e(e.from.line+e.text.length-1,se(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ti(e,n){if(Be(e,n.from)<0)return e;if(Be(e,n.to)<=0)return Bo(n);var O=e.line+n.text.length-(n.to.line-n.from.line)-1,S=e.ch;return e.line==n.to.line&&(S+=Bo(n).ch-n.to.ch),_e(O,S)}function ko(e,n){for(var O=[],S=0;S1&&e.remove(ye.line+1,An-1),e.insert(ye.line+1,Zn)}Sa(e,"change",e,n)}function nr(e,n,O){function S(U,$,le){if(U.linked)for(var ye=0;ye1&&!e.done[e.done.length-2].ranges)return e.done.pop(),se(e.done)}function Rn(e,n,O,S){var U=e.history;U.undone.length=0;var $=+new Date,le,ye;if((U.lastOp==S||U.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&U.lastModTime>$-(e.cm?e.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(le=dr(U,U.lastOp==S)))ye=se(le.changes),Be(n.from,n.to)==0&&Be(n.from,ye.to)==0?ye.to=Bo(n):le.changes.push(jn(e,n));else{var be=se(U.done);for((!be||!be.ranges)&&ir(e.sel,U.done),le={changes:[jn(e,n)],generation:U.generation},U.done.push(le);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(O),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=$,U.lastOp=U.lastSelOp=S,U.lastOrigin=U.lastSelOrigin=n.origin,ye||at(e,"historyAdded")}function zr(e,n,O,S){var U=n.charAt(0);return U=="*"||U=="+"&&O.ranges.length==S.ranges.length&&O.somethingSelected()==S.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Si(e,n,O,S){var U=e.history,$=S&&S.origin;O==U.lastSelOp||$&&U.lastSelOrigin==$&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==$||zr(e,$,se(U.done),n))?U.done[U.done.length-1]=n:ir(n,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=$,U.lastSelOp=O,S&&S.clearRedo!==!1&&pr(U.undone)}function ir(e,n){var O=se(n);O&&O.ranges&&O.equals(e)||n.push(e)}function si(e,n,O,S){var U=n["spans_"+e.id],$=0;e.iter(Math.max(e.first,O),Math.min(e.first+e.size,S),function(le){le.markedSpans&&((U||(U=n["spans_"+e.id]={}))[$]=le.markedSpans),++$})}function ao(e){if(!e)return null;for(var n,O=0;O-1&&(se(ye)[At]=Re[At],delete Re[At]))}}return S}function Gi(e,n,O,S){if(S){var U=e.anchor;if(O){var $=Be(n,U)<0;$!=Be(O,U)<0?(U=n,n=O):$!=Be(n,O)<0&&(n=O)}return new Fa(U,n)}else return new Fa(O||n,n)}function li(e,n,O,S,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),ki(e,new lo([Gi(e.sel.primary(),n,O,U)],0),S)}function io(e,n,O){for(var S=[],U=e.cm&&(e.cm.display.shift||e.extend),$=0;$=n.ch:ye.to>n.ch))){if(U&&(at(be,"beforeCursorEnter"),be.explicitlyCleared))if($.markedSpans){--le;continue}else break;if(!be.atomic)continue;if(O){var At=be.find(S<0?1:-1),Nt=void 0;if((S<0?st:Re)&&(At=ul(e,At,-S,At&&At.line==n.line?$:null)),At&&At.line==n.line&&(Nt=Be(At,O))&&(S<0?Nt<0:Nt>0))return us(e,At,n,S,U)}var Ut=be.find(S<0?-1:1);return(S<0?Re:st)&&(Ut=ul(e,Ut,S,Ut.line==n.line?$:null)),Ut?us(e,Ut,n,S,U):null}}return n}function ll(e,n,O,S,U){var $=S||1,le=us(e,n,O,$,U)||!U&&us(e,n,O,$,!0)||us(e,n,O,-$,U)||!U&&us(e,n,O,-$,!0);return le||(e.cantEdit=!0,_e(e.first,0))}function ul(e,n,O,S){return O<0&&n.ch==0?n.line>e.first?H(e,_e(n.line-1)):null:O>0&&n.ch==(S||kn(e,n.line)).text.length?n.line=0;--U)cl(e,{from:S[U].from,to:S[U].to,text:U?[""]:n.text,origin:n.origin});else cl(e,n)}function cl(e,n){if(n.text.length==1&&n.text[0]==""&&Be(n.from,n.to)==0)return;var O=ko(e,n);Rn(e,n,O,e.cm?e.cm.curOp.id:NaN),qs(e,n,O,bi(e,n));var S=[];nr(e,function(U,$){!$&&Z(S,U.history)==-1&&(Rs(U.history,n),S.push(U.history)),qs(U,n,null,bi(U,n))})}function Qs(e,n,O){var S=e.cm&&e.cm.state.suppressEdits;if(S&&!O)return;for(var U=e.history,$,le=e.sel,ye=n=="undo"?U.done:U.undone,be=n=="undo"?U.undone:U.done,Re=0;Re=0;--Ut){var An=Nt(Ut);if(An)return An.v}}function $s(e,n){if(n==0)return;if(e.first+=n,e.sel=new lo(me(e.sel.ranges,function(U){return new Fa(_e(U.anchor.line+n,U.anchor.ch),_e(U.head.line+n,U.head.ch))}),e.sel.primIndex),e.cm){Dr(e.cm,e.first,e.first-n,n);for(var O=e.cm.display,S=O.viewFrom;Se.lastLine())return;if(n.from.line$&&(n={from:n.from,to:_e($,kn(e,$).text.length),text:[n.text[0]],origin:n.origin}),n.removed=Ua(e,n.from,n.to),O||(O=ko(e,n)),e.cm?yl(e.cm,n,S):On(e,n,S),sl(e,O,he),e.cantEdit&&ll(e,_e(e.firstLine(),0))&&(e.cantEdit=!1)}function yl(e,n,O){var S=e.doc,U=e.display,$=n.from,le=n.to,ye=!1,be=$.line;e.options.lineWrapping||(be=Xr(ci(kn(S,$.line))),S.iter(be,le.line+1,function(Ut){if(Ut==U.maxLine)return ye=!0,!0})),S.sel.contains(n.from,n.to)>-1&&Ye(e),On(S,n,O,gr(e)),e.options.lineWrapping||(S.iter(be,$.line+n.text.length,function(Ut){var An=Cs(Ut);An>U.maxLineLength&&(U.maxLine=Ut,U.maxLineLength=An,U.maxLineChanged=!0,ye=!1)}),ye&&(e.curOp.updateMaxLine=!0)),ba(S,$.line),vo(e,400);var Re=n.text.length-(le.line-$.line)-1;n.full?Dr(e):$.line==le.line&&n.text.length==1&&!ks(e.doc,n)?Er(e,$.line,"text"):Dr(e,$.line,le.line+1,Re);var st=Ue(e,"changes"),At=Ue(e,"change");if(At||st){var Nt={from:$,to:le,text:n.text,removed:n.removed,origin:n.origin};At&&Sa(e,"change",e,Nt),st&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Nt)}e.display.selForContextMenu=null}function Bs(e,n,O,S,U){var $;S||(S=O),Be(S,O)<0&&($=[S,O],O=$[0],S=$[1]),typeof n=="string"&&(n=e.splitLines(n)),rs(e,{from:O,to:S,text:n,origin:U})}function Ol(e,n,O,S){O1||!(this.children[0]instanceof Is))){var ye=[];this.collapse(ye),this.children=[new Is(ye)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var le=U.lines.length%25+25,ye=le;ye10);e.parent.maybeSpill()},iterN:function(e,n,O){for(var S=0;Se.display.maxLineLength&&(e.display.maxLine=Re,e.display.maxLineLength=st,e.display.maxLineChanged=!0)}S!=null&&e&&this.collapsed&&Dr(e,S,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Sa(e,"markerCleared",e,this,S,U),n&&_o(e),this.parent&&this.parent.clear()},pa.prototype.find=function(e,n){e==null&&this.type=="bookmark"&&(e=1);for(var O,S,U=0;U0||le==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=y("span",[$.replacedWith],"CodeMirror-widget"),S.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),S.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(Ii(e,n.line,n,O,$)||n.line!=O.line&&Ii(e,O.line,n,O,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");hi()}$.addToHistory&&Rn(e,{from:n,to:O,origin:"markText"},e.sel,NaN);var ye=n.line,be=e.cm,Re;if(e.iter(ye,O.line+1,function(At){be&&$.collapsed&&!be.options.lineWrapping&&ci(At)==be.display.maxLine&&(Re=!0),$.collapsed&&ye!=n.line&&Ra(At,0),fi(At,new Ha($,ye==n.line?n.ch:null,ye==O.line?O.ch:null)),++ye}),$.collapsed&&e.iter(n.line,O.line+1,function(At){no(e,At)&&Ra(At,0)}),$.clearOnEnter&&ze($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(Na(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),$.collapsed&&($.id=++fa,$.atomic=!0),be){if(Re&&(be.curOp.updateMaxLine=!0),$.collapsed)Dr(be,n.line,O.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var st=n.line;st<=O.line;st++)Er(be,st,"text");$.atomic&&Os(be.doc),Sa(be,"markerAdded",be,$)}return $}var Ba=function(e,n){this.markers=e,this.primary=n;for(var O=0;O=0;be--)rs(this,S[be]);ye?gs(this,ye):this.cm&&Da(this.cm)}),undo:gi(function(){Qs(this,"undo")}),redo:gi(function(){Qs(this,"redo")}),undoSelection:gi(function(){Qs(this,"undo",!0)}),redoSelection:gi(function(){Qs(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,O=0,S=0;S=e.ch)&&n.push(U.marker.parent||U.marker)}return n},findMarks:function(e,n,O){e=H(this,e),n=H(this,n);var S=[],U=e.line;return this.iter(e.line,n.line+1,function($){var le=$.markedSpans;if(le)for(var ye=0;ye=be.to||be.from==null&&U!=e.line||be.from!=null&&U==n.line&&be.from>=n.ch)&&(!O||O(be.marker))&&S.push(be.marker.parent||be.marker)}++U}),S},getAllMarks:function(){var e=[];return this.iter(function(n){var O=n.markedSpans;if(O)for(var S=0;Se)return n=e,!0;e-=$,++O}),H(this,_e(O,n))},indexFromPos:function(e){e=H(this,e);var n=e.ch;if(e.linen&&(n=e.from),e.to!=null&&e.to-1){n.state.draggingText(e),setTimeout(function(){return n.display.input.focus()},20);return}try{var st=e.dataTransfer.getData("Text");if(st){var At;if(n.state.draggingText&&!n.state.draggingText.copy&&(At=n.listSelections()),sl(n.doc,wi(O,O)),At)for(var Nt=0;Nt=0;ye--)Bs(e.doc,"",S[ye].from,S[ye].to,"+delete");Da(e)})}function du(e,n,O){var S=$e(e.text,n+O,O);return S<0||S>e.text.length?null:S}function Au(e,n,O){var S=du(e,n.ch,O);return S==null?null:new _e(n.line,S,O<0?"after":"before")}function $l(e,n,O,S,U){if(e){n.doc.direction=="rtl"&&(U=-U);var $=zt(O,n.doc.direction);if($){var le=U<0?se($):$[0],ye=U<0==(le.level==1),be=ye?"after":"before",Re;if(le.level>0||n.doc.direction=="rtl"){var st=dt(n,O);Re=U<0?O.text.length-1:0;var At=Pt(n,st,Re).top;Re=bt(function(Nt){return Pt(n,st,Nt).top==At},U<0==(le.level==1)?le.from:le.to-1,Re),be=="before"&&(Re=du(O,Re,1))}else Re=U<0?le.to:le.from;return new _e(S,Re,be)}}return new _e(S,U<0?O.text.length:0,U<0?"before":"after")}function hu(e,n,O,S){var U=zt(n,e.doc.direction);if(!U)return Au(n,O,S);O.ch>=n.text.length?(O.ch=n.text.length,O.sticky="before"):O.ch<=0&&(O.ch=0,O.sticky="after");var $=ft(U,O.ch,O.sticky),le=U[$];if(e.doc.direction=="ltr"&&le.level%2==0&&(S>0?le.to>O.ch:le.from=le.from&&Nt>=st.begin)){var Ut=At?"before":"after";return new _e(O.line,Nt,Ut)}}var An=function(Zn,sr,$n){for(var br=function(Fi,Co){return Co?new _e(O.line,ye(Fi,1),"before"):new _e(O.line,Fi,"after")};Zn>=0&&Zn0==(Jr.level!=1),Pa=kr?$n.begin:ye($n.end,-1);if(Jr.from<=Pa&&Pa0?st.end:ye(st.begin,-1);return Nn!=null&&!(S>0&&Nn==n.text.length)&&(yn=An(S>0?0:U.length-1,S,Re(Nn)),yn)?yn:null}var kl={selectAll:Sl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return Ws(e,function(n){if(n.empty()){var O=kn(e.doc,n.head.line).text.length;return n.head.ch==O&&n.head.line0)U=new _e(U.line,U.ch+1),e.replaceRange($.charAt(U.ch-1)+$.charAt(U.ch-2),_e(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var le=kn(e.doc,U.line-1).text;le&&(U=new _e(U.line,1),e.replaceRange($.charAt(0)+e.doc.lineSeparator()+le.charAt(le.length-1),_e(U.line-1,le.length-1),U,"+transpose"))}}O.push(new Fa(U,U))}e.setSelections(O)})},newlineAndIndent:function(e){return Qi(e,function(){for(var n=e.listSelections(),O=n.length-1;O>=0;O--)e.replaceRange(e.doc.lineSeparator(),n[O].anchor,n[O].head,"+input");n=e.listSelections();for(var S=0;Se&&Be(n,this.pos)==0&&O==this.button};var Al,jl;function Ru(e,n){var O=+new Date;return jl&&jl.compare(O,e,n)?(Al=jl=null,"triple"):Al&&Al.compare(O,e,n)?(jl=new Rl(O,e,n),Al=null,"double"):(Al=new Rl(O,e,n),jl=null,"single")}function nu(e){var n=this,O=n.display;if(Ot(n,e)||O.activeTouch&&O.input.supportsTouch())return;if(O.input.ensurePolled(),O.shift=e.shiftKey,$o(O,e)){T||(O.scroller.draggable=!1,setTimeout(function(){return O.scroller.draggable=!0},100));return}if(mu(n,e))return;var S=er(n,e),U=mt(e),$=S?Ru(S,U):"single";if(window.focus(),U==1&&n.state.selectingText&&n.state.selectingText(e),S&&Iu(n,U,S,$,e))return;U==1?S?Mu(n,S,$,e):Ge(e)==O.scroller&&Ce(e):U==2?(S&&li(n.doc,S),setTimeout(function(){return O.input.focus()},20)):U==3&&(L?n.display.input.onContextMenu(e):Cr(n))}function Iu(e,n,O,S,U){var $="Click";return S=="double"?$="Double"+$:S=="triple"&&($="Triple"+$),$=(n==1?"Left":n==2?"Middle":"Right")+$,Fl(e,Zl($,U),U,function(le){if(typeof le=="string"&&(le=kl[le]),!le)return!1;var ye=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ye=le(e,O)!=Ae}finally{e.state.suppressEdits=!1}return ye})}function Du(e,n,O){var S=e.getOption("configureMouse"),U=S?S(e,n,O):{};if(U.unit==null){var $=m?O.shiftKey&&O.metaKey:O.altKey;U.unit=$?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||O.shiftKey),U.addNew==null&&(U.addNew=l?O.metaKey:O.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?O.altKey:O.ctrlKey)),U}function Mu(e,n,O,S){M?setTimeout(F(oi,e),0):e.curOp.focus=P();var U=Du(e,O,S),$=e.doc.sel,le;e.options.dragDrop&&Lt&&!e.isReadOnly()&&O=="single"&&(le=$.contains(n))>-1&&(Be((le=$.ranges[le]).from(),n)<0||n.xRel>0)&&(Be(le.to(),n)>0||n.xRel<0)?qu(e,S,n,U):Lu(e,S,n,U)}function qu(e,n,O,S){var U=e.display,$=!1,le=da(e,function(Re){T&&(U.scroller.draggable=!1),e.state.draggingText=!1,St(U.wrapper.ownerDocument,"mouseup",le),St(U.wrapper.ownerDocument,"mousemove",ye),St(U.scroller,"dragstart",be),St(U.scroller,"drop",le),$||(Ce(Re),S.addNew||li(e.doc,O,null,null,S.extend),T&&!c||M&&x==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),ye=function(Re){$=$||Math.abs(n.clientX-Re.clientX)+Math.abs(n.clientY-Re.clientY)>=10},be=function(){return $=!0};T&&(U.scroller.draggable=!0),e.state.draggingText=le,le.copy=!S.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),ze(U.wrapper.ownerDocument,"mouseup",le),ze(U.wrapper.ownerDocument,"mousemove",ye),ze(U.scroller,"dragstart",be),ze(U.scroller,"drop",le),Cr(e),setTimeout(function(){return U.input.focus()},20)}function Hl(e,n,O){if(O=="char")return new Fa(n,n);if(O=="word")return e.findWordAt(n);if(O=="line")return new Fa(_e(n.line,0),H(e.doc,_e(n.line+1,0)));var S=O(e,n);return new Fa(S.from,S.to)}function Lu(e,n,O,S){var U=e.display,$=e.doc;Ce(n);var le,ye,be=$.sel,Re=be.ranges;if(S.addNew&&!S.extend?(ye=$.sel.contains(O),ye>-1?le=Re[ye]:le=new Fa(O,O)):(le=$.sel.primary(),ye=$.sel.primIndex),S.unit=="rectangle")S.addNew||(le=new Fa(O,O)),O=er(e,n,!0,!0),ye=-1;else{var st=Hl(e,O,S.unit);S.extend?le=Gi(le,st.anchor,st.head,S.extend):le=st}S.addNew?ye==-1?(ye=Re.length,ki($,Ni(e,Re.concat([le]),ye),{scroll:!1,origin:"*mouse"})):Re.length>1&&Re[ye].empty()&&S.unit=="char"&&!S.extend?(ki($,Ni(e,Re.slice(0,ye).concat(Re.slice(ye+1)),0),{scroll:!1,origin:"*mouse"}),be=$.sel):Yo($,ye,le,ce):(ye=0,ki($,new lo([le],0),ce),be=$.sel);var At=O;function Nt($n){if(Be(At,$n)==0)return;if(At=$n,S.unit=="rectangle"){for(var br=[],Jr=e.options.tabSize,kr=z(kn($,O.line).text,O.ch,Jr),Pa=z(kn($,$n.line).text,$n.ch,Jr),Fi=Math.min(kr,Pa),Co=Math.max(kr,Pa),oo=Math.min(O.line,$n.line),ds=Math.min(e.lastLine(),Math.max(O.line,$n.line));oo<=ds;oo++){var Qo=kn($,oo).text,po=ve(Qo,Fi,Jr);Fi==Co?br.push(new Fa(_e(oo,po),_e(oo,po))):Qo.length>po&&br.push(new Fa(_e(oo,po),_e(oo,ve(Qo,Co,Jr))))}br.length||br.push(new Fa(O,O)),ki($,Ni(e,be.ranges.slice(0,ye).concat(br),ye),{origin:"*mouse",scroll:!1}),e.scrollIntoView($n)}else{var Ko=le,Mo=Hl(e,$n,S.unit),zn=Ko.anchor,qi;Be(Mo.anchor,zn)>0?(qi=Mo.head,zn=sn(Ko.from(),Mo.anchor)):(qi=Mo.anchor,zn=Xt(Ko.to(),Mo.head));var eo=be.ranges.slice(0);eo[ye]=Pu(e,new Fa(H($,zn),qi)),ki($,Ni(e,eo,ye),ce)}}var Ut=U.wrapper.getBoundingClientRect(),An=0;function yn($n){var br=++An,Jr=er(e,$n,!0,S.unit=="rectangle");if(!Jr)return;if(Be(Jr,At)!=0){e.curOp.focus=P(),Nt(Jr);var kr=Ln(U,$);(Jr.line>=kr.to||Jr.lineUt.bottom?20:0;Pa&&setTimeout(da(e,function(){if(An!=br)return;U.scroller.scrollTop+=Pa,yn($n)}),50)}}function Nn($n){e.state.selectingText=!1,An=Infinity,$n&&(Ce($n),U.input.focus()),St(U.wrapper.ownerDocument,"mousemove",Zn),St(U.wrapper.ownerDocument,"mouseup",sr),$.history.lastSelOrigin=null}var Zn=da(e,function($n){$n.buttons===0||!mt($n)?Nn($n):yn($n)}),sr=da(e,Nn);e.state.selectingText=sr,ze(U.wrapper.ownerDocument,"mousemove",Zn),ze(U.wrapper.ownerDocument,"mouseup",sr)}function Pu(e,n){var O=n.anchor,S=n.head,U=kn(e.doc,O.line);if(Be(O,S)==0&&O.sticky==S.sticky)return n;var $=zt(U);if(!$)return n;var le=ft($,O.ch,O.sticky),ye=$[le];if(ye.from!=O.ch&&ye.to!=O.ch)return n;var be=le+(ye.from==O.ch==(ye.level!=1)?0:1);if(be==0||be==$.length)return n;var Re;if(S.line!=O.line)Re=(S.line-O.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var st=ft($,S.ch,S.sticky),At=st-le||(S.ch-O.ch)*(ye.level==1?-1:1);st==be-1||st==be?Re=At<0:Re=At>0}var Nt=$[be+(Re?-1:0)],Ut=Re==(Nt.level==1),An=Ut?Nt.from:Nt.to,yn=Ut?"after":"before";return O.ch==An&&O.sticky==yn?n:new Fa(new _e(O.line,An,yn),S)}function Uu(e,n,O,S){var U,$;if(n.touches)U=n.touches[0].clientX,$=n.touches[0].clientY;else try{U=n.clientX,$=n.clientY}catch(Nt){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;S&&Ce(n);var le=e.display,ye=le.lineDiv.getBoundingClientRect();if($>ye.bottom||!Ue(e,O))return Me(n);$-=ye.top-le.viewOffset;for(var be=0;be=U){var st=Ja(e.doc,$),At=e.display.gutterSpecs[be];return at(e,O,e,st,At.className,n),Me(n)}}}function mu(e,n){return Uu(e,n,"gutterClick",!0)}function gu(e,n){if($o(e.display,n)||Il(e,n))return;if(Ot(e,n,"contextmenu"))return;L||e.display.input.onContextMenu(n)}function Il(e,n){return Ue(e,"gutterContextMenu")?Uu(e,n,"gutterContextMenu",!1):!1}function ru(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),En(e)}var tl={toString:function(){return"CodeMirror.Init"}},Nu={},au={};function ec(e){var n=e.optionHandlers;function O(S,U,$,le){e.defaults[S]=U,$&&(n[S]=le?function(ye,be,Re){Re!=tl&&$(ye,be,Re)}:$)}e.defineOption=O,e.Init=tl,O("value","",function(S,U){return S.setValue(U)},!0),O("mode",null,function(S,U){S.doc.modeOption=U,Xo(S)},!0),O("indentUnit",2,Xo,!0),O("indentWithTabs",!1),O("smartIndent",!0),O("tabSize",4,function(S){Ss(S),En(S),Dr(S)},!0),O("lineSeparator",null,function(S,U){if(S.doc.lineSep=U,!U)return;var $=[],le=S.doc.first;S.doc.iter(function(be){for(var Re=0;;){var st=be.text.indexOf(U,Re);if(st==-1)break;Re=st+U.length,$.push(_e(le,st))}le++});for(var ye=$.length-1;ye>=0;ye--)Bs(S.doc,U,$[ye],_e($[ye].line,$[ye].ch+U.length))}),O("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(S,U,$){S.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),$!=tl&&S.refresh()}),O("specialCharPlaceholder",ei,function(S){return S.refresh()},!0),O("electricChars",!0),O("inputStyle",A?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),O("spellcheck",!1,function(S,U){return S.getInputField().spellcheck=U},!0),O("autocorrect",!1,function(S,U){return S.getInputField().autocorrect=U},!0),O("autocapitalize",!1,function(S,U){return S.getInputField().autocapitalize=U},!0),O("rtlMoveVisually",!_),O("wholeLineUpdateBefore",!0),O("theme","default",function(S){ru(S),co(S)},!0),O("keyMap","default",function(S,U,$){var le=bo(U),ye=$!=tl&&bo($);ye&&ye.detach&&ye.detach(S,le),le.attach&&le.attach(S,ye||null)}),O("extraKeys",null),O("configureMouse",null),O("lineWrapping",!1,ku,!0),O("gutters",[],function(S,U){S.display.gutterSpecs=Zi(U,S.options.lineNumbers),co(S)},!0),O("fixedGutter",!0,function(S,U){S.display.gutters.style.left=U?or(S.display)+"px":"0",S.refresh()},!0),O("coverGutterNextToScrollbar",!1,function(S){return di(S)},!0),O("scrollbarStyle","native",function(S){Ei(S),di(S),S.display.scrollbars.setScrollTop(S.doc.scrollTop),S.display.scrollbars.setScrollLeft(S.doc.scrollLeft)},!0),O("lineNumbers",!1,function(S,U){S.display.gutterSpecs=Zi(S.options.gutters,U),co(S)},!0),O("firstLineNumber",1,co,!0),O("lineNumberFormatter",function(S){return S},co,!0),O("showCursorWhenSelecting",!1,vr,!0),O("resetSelectionOnContextMenu",!0),O("lineWiseCopyCut",!0),O("pasteLinesPerSelection",!0),O("selectionsMayTouch",!1),O("readOnly",!1,function(S,U){U=="nocursor"&&(fr(S),S.display.input.blur()),S.display.input.readOnlyChanged(U)}),O("screenReaderLabel",null,function(S,U){U=U===""?null:U,S.display.input.screenReaderLabelChanged(U)}),O("disableInput",!1,function(S,U){U||S.display.input.reset()},!0),O("dragDrop",!0,tc),O("allowDropFileTypes",null),O("cursorBlinkRate",530),O("cursorScrollMargin",0),O("cursorHeight",1,vr,!0),O("singleCursorHeightPerLine",!0,vr,!0),O("workTime",100),O("workDelay",100),O("flattenSpans",!0,Ss,!0),O("addModeClass",!1,Ss,!0),O("pollInterval",100),O("undoDepth",200,function(S,U){return S.doc.history.undoDepth=U}),O("historyEventDelay",1250),O("viewportMargin",10,function(S){return S.refresh()},!0),O("maxHighlightLength",1e4,Ss,!0),O("moveInputWithCursor",!0,function(S,U){U||S.display.input.resetPosition()}),O("tabindex",null,function(S,U){return S.display.input.getField().tabIndex=U||""}),O("autofocus",null),O("direction","ltr",function(S,U){return S.doc.setDirection(U)},!0),O("phrases",null)}function tc(e,n,O){var S=O&&O!=tl;if(!n!=!S){var U=e.display.dragFunctions,$=n?ze:St;$(e.display.scroller,"dragstart",U.start),$(e.display.scroller,"dragenter",U.enter),$(e.display.scroller,"dragover",U.over),$(e.display.scroller,"dragleave",U.leave),$(e.display.scroller,"drop",U.drop)}}function ku(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),ws(e)),Lr(e),Dr(e),En(e),setTimeout(function(){return di(e)},100)}function Xi(e,n){var O=this;if(!(this instanceof Xi))return new Xi(e,n);this.options=n=n?D(n):{},D(Nu,n,!1);var S=n.value;typeof S=="string"?S=new In(S,n.mode,null,n.lineSeparator,n.direction):n.mode&&(S.modeOption=n.mode),this.doc=S;var U=new Xi.inputStyles[n.inputStyle](this),$=this.display=new No(e,S,U,n);$.wrapper.CodeMirror=this,ru(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ei(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},n.autofocus&&!A&&$.input.focus(),M&&x<11&&setTimeout(function(){return O.display.input.reset(!0)},20),Fu(this),Ro(),ho(this),this.curOp.forceUpdate=!0,Wt(this,S),n.autofocus&&!A||this.hasFocus()?setTimeout(function(){O.hasFocus()&&!O.state.focused&&Rr(O)},20):fr(this);for(var le in au)au.hasOwnProperty(le)&&au[le](this,n[le],tl);Ci(this),n.finishInit&&n.finishInit(this);for(var ye=0;ye20*20}ze(n.scroller,"touchstart",function(be){if(!Ot(e,be)&&!$(be)&&!mu(e,be)){n.input.ensurePolled(),clearTimeout(O);var Re=+new Date;n.activeTouch={start:Re,moved:!1,prev:Re-S.end<=300?S:null},be.touches.length==1&&(n.activeTouch.left=be.touches[0].pageX,n.activeTouch.top=be.touches[0].pageY)}}),ze(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),ze(n.scroller,"touchend",function(be){var Re=n.activeTouch;if(Re&&!$o(n,be)&&Re.left!=null&&!Re.moved&&new Date-Re.start<300){var st=e.coordsChar(n.activeTouch,"page"),At;!Re.prev||le(Re,Re.prev)?At=new Fa(st,st):!Re.prev.prev||le(Re,Re.prev.prev)?At=e.findWordAt(st):At=new Fa(_e(st.line,0),H(e.doc,_e(st.line+1,0))),e.setSelection(At.anchor,At.head),e.focus(),Ce(be)}U()}),ze(n.scroller,"touchcancel",U),ze(n.scroller,"scroll",function(){n.scroller.clientHeight&&(Oa(e,n.scroller.scrollTop),Fr(e,n.scroller.scrollLeft,!0),at(e,"scroll",e))}),ze(n.scroller,"mousewheel",function(be){return ts(e,be)}),ze(n.scroller,"DOMMouseScroll",function(be){return ts(e,be)}),ze(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(be){Ot(e,be)||He(be)},over:function(be){Ot(e,be)||(Pr(e,be),He(be))},start:function(be){return na(e,be)},drop:da(e,Jn),leave:function(be){Ot(e,be)||Aa(e)}};var ye=n.input.getField();ze(ye,"keyup",function(be){return Ou.call(e,be)}),ze(ye,"keydown",da(e,tu)),ze(ye,"keypress",da(e,Bu)),ze(ye,"focus",function(be){return Rr(e,be)}),ze(ye,"blur",function(be){return fr(e,be)})}var iu=[];Xi.defineInitHook=function(e){return iu.push(e)};function bl(e,n,O,S){var U=e.doc,$;O==null&&(O="add"),O=="smart"&&(U.mode.indent?$=dn(e,n).state:O="prev");var le=e.options.tabSize,ye=kn(U,n),be=z(ye.text,null,le);ye.stateAfter&&(ye.stateAfter=null);var Re=ye.text.match(/^\s*/)[0],st;if(!S&&!/\S/.test(ye.text))st=0,O="not";else if(O=="smart"&&(st=U.mode.indent($,ye.text.slice(Re.length),ye.text),st==Ae||st>150)){if(!S)return;O="prev"}O=="prev"?n>U.first?st=z(kn(U,n-1).text,null,le):st=0:O=="add"?st=be+e.options.indentUnit:O=="subtract"?st=be-e.options.indentUnit:typeof O=="number"&&(st=be+O),st=Math.max(0,st);var At="",Nt=0;if(e.options.indentWithTabs)for(var Ut=Math.floor(st/le);Ut;--Ut)Nt+=le,At+=" ";if(Ntle,be=pt(n),Re=null;if(ye&&S.ranges.length>1)if(Ms&&Ms.text.join(` `)==n){if(S.ranges.length%Ms.text.length==0){Re=[];for(var st=0;st=0;Nt--){var Ut=S.ranges[Nt],An=Ut.from(),yn=Ut.to();Ut.empty()&&(O&&O>0?An=_e(An.line,An.ch-O):e.state.overwrite&&!ye?yn=_e(yn.line,Math.min(kn($,yn.line).text.length,yn.ch+se(be).length)):ye&&Ms&&Ms.lineWise&&Ms.text.join(` `)==be.join(` `)&&(An=yn=_e(An.line,0)));var Nn={from:An,to:yn,text:Re?Re[Nt%Re.length]:be,origin:U||(ye?"paste":e.state.cutIncoming>le?"cut":"+input")};rs(e.doc,Nn),Sa(e,"inputRead",e,Nn)}n&&!ye&&Wl(e,n),Da(e),e.curOp.updateInput<2&&(e.curOp.updateInput=At),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Kl(e,n){var O=e.clipboardData&&e.clipboardData.getData("Text");if(O)return e.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&Qi(n,function(){return vu(n,O,0,null,"paste")}),!0}function Wl(e,n){if(!e.options.electricChars||!e.options.smartIndent)return;for(var O=e.doc.sel,S=O.ranges.length-1;S>=0;S--){var U=O.ranges[S];if(U.head.ch>100||S&&O.ranges[S-1].head.line==U.head.line)continue;var $=e.getModeAt(U.head),le=!1;if($.electricChars){for(var ye=0;ye<$.electricChars.length;ye++)if(n.indexOf($.electricChars.charAt(ye))>-1){le=bl(e,U.head.line,"smart");break}}else $.electricInput&&($.electricInput.test(kn(e.doc,U.head.line).text.slice(0,U.head.ch))&&(le=bl(e,U.head.line,"smart")));le&&Sa(e,"electricInput",e,U.head.line)}}function yu(e){for(var n=[],O=[],S=0;S$&&(bl(this,ye.head.line,S,!0),$=ye.head.line,le==this.doc.sel.primIndex&&Da(this));else{var be=ye.from(),Re=ye.to(),st=Math.max($,be.line);$=Math.min(this.lastLine(),Re.line-(Re.ch?0:1))+1;for(var At=st;At<$;++At)bl(this,At,S);var Nt=this.doc.sel.ranges;be.ch==0&&U.length==Nt.length&&Nt[le].from().ch>0&&Yo(this.doc,le,new Fa(be,Nt[le].to()),he)}}}),getTokenAt:function(S,U){return lr(this,S,U)},getLineTokens:function(S,U){return lr(this,_e(S),U,!0)},getTokenTypeAt:function(S){S=H(this.doc,S);var U=Qt(this,kn(this.doc,S.line)),$=0,le=(U.length-1)/2,ye=S.ch,be;if(ye==0)be=U[2];else for(;;){var Re=$+le>>1;if((Re?U[Re*2-1]:0)>=ye)le=Re;else if(U[Re*2+1]be&&(S=be,le=!0),ye=kn(this.doc,S)}else ye=S;return qt(this,ye,{top:0,left:0},U||"page",$||le).top+(le?this.doc.height-xo(ye):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return vn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(S,U,$,le,ye){var be=this.display;S=Yt(this,H(this.doc,S));var Re=S.bottom,st=S.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),be.sizer.appendChild(U),le=="over")Re=S.top;else if(le=="above"||le=="near"){var At=Math.max(be.wrapper.clientHeight,this.doc.height),Nt=Math.max(be.sizer.clientWidth,be.lineSpace.clientWidth);(le=="above"||S.bottom+U.offsetHeight>At)&&S.top>U.offsetHeight?Re=S.top-U.offsetHeight:S.bottom+U.offsetHeight<=At&&(Re=S.bottom),st+U.offsetWidth>Nt&&(st=Nt-U.offsetWidth)}U.style.top=Re+"px",U.style.left=U.style.right="",ye=="right"?(st=be.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(ye=="left"?st=0:ye=="middle"&&(st=(be.sizer.clientWidth-U.offsetWidth)/2),U.style.left=st+"px"),$&&ta(this,{left:st,top:Re,right:st+U.offsetWidth,bottom:Re+U.offsetHeight})},triggerOnKeyDown:_i(tu),triggerOnKeyPress:_i(Bu),triggerOnKeyUp:Ou,triggerOnMouseDown:_i(nu),execCommand:function(S){if(kl.hasOwnProperty(S))return kl[S].call(null,this)},triggerElectric:_i(function(S){Wl(this,S)}),findPosH:function(S,U,$,le){var ye=1;U<0&&(ye=-1,U=-U);for(var be=H(this.doc,S),Re=0;Re0&&st($.charAt(le-1));)--le;for(;ye<$.length&&st($.charAt(ye));)++ye}return new Fa(_e(S.line,le),_e(S.line,ye))},toggleOverwrite:function(S){if(S!=null&&S==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):g(this.display.cursorDiv,"CodeMirror-overwrite"),at(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_i(function(S,U){ua(this,S,U)}),getScrollInfo:function(){var S=this.display.scroller;return{left:S.scrollLeft,top:S.scrollTop,height:S.scrollHeight-_t(this)-this.display.barHeight,width:S.scrollWidth-_t(this)-this.display.barWidth,clientHeight:xe(this),clientWidth:nt(this)}},scrollIntoView:_i(function(S,U){S==null?(S={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof S=="number"?S={from:_e(S,0),to:null}:S.from==null&&(S={from:S,to:null}),S.to||(S.to=S.from),S.margin=U||0,S.from.line!=null?va(this,S):Ca(this,S.from,S.to,S.margin)}),setSize:_i(function(S,U){var $=this,le=function(be){return typeof be=="number"||/^\d+$/.test(String(be))?be+"px":be};S!=null&&(this.display.wrapper.style.width=le(S)),U!=null&&(this.display.wrapper.style.height=le(U)),this.options.lineWrapping&&Kt(this);var ye=this.display.viewFrom;this.doc.iter(ye,this.display.viewTo,function(be){if(be.widgets){for(var Re=0;Re.5||this.options.lineWrapping)&&Lr(this),at(this,"refresh",this)}),swapDoc:_i(function(S){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),Wt(this,S),En(this),this.display.input.reset(),ua(this,S.scrollLeft,S.scrollTop),this.curOp.forceScroll=!0,Sa(this,"swapDoc",this,U),U}),phrase:function(S){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,S)?U[S]:S},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}},ke(e),e.registerHelper=function(S,U,$){O.hasOwnProperty(S)||(O[S]=e[S]={_global:[]}),O[S][U]=$},e.registerGlobalHelper=function(S,U,$,le){e.registerHelper(S,U,le),O[S]._global.push({pred:$,val:le})}}function ou(e,n,O,S,U){var $=n,le=O,ye=kn(e,n.line),be=U&&e.direction=="rtl"?-O:O;function Re(){var sr=n.line+be;return sr=e.first+e.size?!1:(n=new _e(sr,n.ch,n.sticky),ye=kn(e,sr))}function st(sr){var $n;if(S=="codepoint"){var br=ye.text.charCodeAt(n.ch+(S>0?0:-1));isNaN(br)?$n=null:$n=new _e(n.line,Math.max(0,Math.min(ye.text.length,n.ch+O*(br>=55296&&br<56320?2:1))),-O)}else U?$n=hu(e.cm,ye,n,O):$n=Au(ye,n,O);if($n==null)if(!sr&&Re())n=$l(U,e.cm,ye,n.line,be);else return!1;else n=$n;return!0}if(S=="char"||S=="codepoint")st();else if(S=="column")st(!0);else if(S=="word"||S=="group")for(var At=null,Nt=S=="group",Ut=e.cm&&e.cm.getHelper(n,"wordChars"),An=!0;!(O<0&&!st(!An));An=!1){var yn=ye.text.charAt(n.ch)||` `,Nn=et(yn,Ut)?"w":Nt&&yn==` `?"n":!Nt||/\s/.test(yn)?null:"p";if(Nt&&!An&&!Nn&&(Nn="s"),At&&At!=Nn){O<0&&(O=1,st(),n.sticky="after");break}if(Nn&&(At=Nn),O>0&&!st(!An))break}var Zn=ll(e,n,$,le,!0);return Ve($,Zn)&&(Zn.hitSide=!0),Zn}function Qu(e,n,O,S){var U=e.doc,$=n.left,le;if(S=="page"){var ye=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),be=Math.max(ye-.5*Gn(e.display),3);le=(O>0?n.bottom:n.top)+O*be}else S=="line"&&(le=O>0?n.bottom+3:n.top-3);for(var Re;!(Re=wn(e,$,le),!Re.outside);){if(O<0?le<=0:le>=U.height){Re.hitSide=!0;break}le+=O*5}return Re}var Oi=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Oi.prototype.init=function(e){var n=this,O=this,S=O.cm,U=O.div=e.lineDiv;bu(U,S.options.spellcheck,S.options.autocorrect,S.options.autocapitalize);function $(ye){for(var be=ye.target;be;be=be.parentNode){if(be==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(be.className))break}return!1}ze(U,"paste",function(ye){if(!$(ye)||Ot(S,ye)||Kl(ye,S))return;x<=11&&setTimeout(da(S,function(){return n.updateFromDOM()}),20)}),ze(U,"compositionstart",function(ye){n.composing={data:ye.data,done:!1}}),ze(U,"compositionupdate",function(ye){n.composing||(n.composing={data:ye.data,done:!1})}),ze(U,"compositionend",function(ye){n.composing&&(ye.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ze(U,"touchstart",function(){return O.forceCompositionEnd()}),ze(U,"input",function(){n.composing||n.readFromDOMSoon()});function le(ye){if(!$(ye)||Ot(S,ye))return;if(S.somethingSelected())Ql({lineWise:!1,text:S.getSelections()}),ye.type=="cut"&&S.replaceSelection("",null,"cut");else if(S.options.lineWiseCopyCut){var be=yu(S);Ql({lineWise:!0,text:be.text}),ye.type=="cut"&&S.operation(function(){S.setSelections(be.ranges,0,he),S.replaceSelection("",null,"cut")})}else return;if(ye.clipboardData){ye.clipboardData.clearData();var Re=Ms.text.join(` `);if(ye.clipboardData.setData("Text",Re),ye.clipboardData.getData("Text")==Re){ye.preventDefault();return}}var st=ju(),At=st.firstChild;S.display.lineSpace.insertBefore(st,S.display.lineSpace.firstChild),At.value=Ms.text.join(` `);var Nt=document.activeElement;G(At),setTimeout(function(){S.display.lineSpace.removeChild(st),Nt.focus(),Nt==U&&O.showPrimarySelection()},50)}ze(U,"copy",le),ze(U,"cut",le)},Oi.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Oi.prototype.prepareSelection=function(){var e=ka(this.cm,!1);return e.focus=document.activeElement==this.div,e},Oi.prototype.showSelection=function(e,n){if(!e||!this.cm.display.view.length)return;(e.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Oi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Oi.prototype.showPrimarySelection=function(){var e=this.getSelection(),n=this.cm,O=n.doc.sel.primary(),S=O.from(),U=O.to();if(n.display.viewTo==n.display.viewFrom||S.line>=n.display.viewTo||U.line=n.display.viewFrom&&El(n,S)||{node:ye[0].measure.map[2],offset:0},Re=U.linee.firstLine()&&(S=_e(S.line-1,kn(e.doc,S.line-1).length)),U.ch==kn(e.doc,U.line).text.length&&U.linen.viewTo-1)return!1;var $,le,ye;S.line==n.viewFrom||($=rr(e,S.line))==0?(le=Xr(n.view[0].line),ye=n.view[0].node):(le=Xr(n.view[$].line),ye=n.view[$-1].node.nextSibling);var be=rr(e,U.line),Re,st;if(be==n.view.length-1?(Re=n.viewTo-1,st=n.lineDiv.lastChild):(Re=Xr(n.view[be+1].line)-1,st=n.view[be+1].node.previousSibling),!ye)return!1;for(var At=e.doc.splitLines(_l(e,ye,st,le,Re)),Nt=Ua(e.doc,_e(le,0),_e(Re,kn(e.doc,Re).text.length));At.length>1&&Nt.length>1;)if(se(At)==se(Nt))At.pop(),Nt.pop(),Re--;else if(At[0]==Nt[0])At.shift(),Nt.shift(),le++;else break;for(var Ut=0,An=0,yn=At[0],Nn=Nt[0],Zn=Math.min(yn.length,Nn.length);UtS.ch&&sr.charCodeAt(sr.length-An-1)==$n.charCodeAt($n.length-An-1);)Ut--,An++;At[At.length-1]=sr.slice(0,sr.length-An).replace(/^\u200b+/,""),At[0]=At[0].slice(Ut).replace(/\u200b+$/,"");var Jr=_e(le,Ut),kr=_e(Re,Nt.length?se(Nt).length-An:0);if(At.length>1||At[0]||Be(Jr,kr))return Bs(e.doc,At,Jr,kr,"+input"),!0},Oi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Oi.prototype.reset=function(){this.forceCompositionEnd()},Oi.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Oi.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)},Oi.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Qi(this.cm,function(){return Dr(e.cm)})},Oi.prototype.setUneditable=function(e){e.contentEditable="false"},Oi.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||da(this.cm,vu)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Oi.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Oi.prototype.onContextMenu=function(){},Oi.prototype.resetPosition=function(){},Oi.prototype.needsContentAttribute=!0;function El(e,n){var O=Tt(e,n.line);if(!O||O.hidden)return null;var S=kn(e.doc,n.line),U=Oe(O,S,n.line),$=zt(S,e.doc.direction),le="left";if($){var ye=ft($,n.ch);le=ye%2?"right":"left"}var be=ut(U.map,n.ch,le);return be.offset=be.collapse=="right"?be.end:be.start,be}function Ku(e){for(var n=e;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function $i(e,n){return n&&(e.bad=!0),e}function _l(e,n,O,S,U){var $="",le=!1,ye=e.doc.lineSeparator(),be=!1;function Re(Ut){return function(An){return An.id==Ut}}function st(){le&&($+=ye,be&&($+=ye),le=be=!1)}function At(Ut){Ut&&(st(),$+=Ut)}function Nt(Ut){if(Ut.nodeType==1){var An=Ut.getAttribute("cm-text");if(An){At(An);return}var yn=Ut.getAttribute("cm-marker"),Nn;if(yn){var Zn=e.findMarks(_e(S,0),_e(U+1,0),Re(+yn));Zn.length&&(Nn=Zn[0].find(0))&&At(Ua(e.doc,Nn.from,Nn.to).join(ye));return}if(Ut.getAttribute("contenteditable")=="false")return;var sr=/^(pre|div|p|li|table|br)$/i.test(Ut.nodeName);if(!/^br$/i.test(Ut.nodeName)&&Ut.textContent.length==0)return;sr&&st();for(var $n=0;$n=9&&n.hasSelection&&(n.hasSelection=null),O.poll()}),ze(U,"paste",function(le){if(Ot(S,le)||Kl(le,S))return;S.state.pasteIncoming=+new Date,O.fastPoll()});function $(le){if(Ot(S,le))return;if(S.somethingSelected())Ql({lineWise:!1,text:S.getSelections()});else if(S.options.lineWiseCopyCut){var ye=yu(S);Ql({lineWise:!0,text:ye.text}),le.type=="cut"?S.setSelections(ye.ranges,null,he):(O.prevInput="",U.value=ye.text.join(` `),G(U))}else return;le.type=="cut"&&(S.state.cutIncoming=+new Date)}ze(U,"cut",$),ze(U,"copy",$),ze(e.scroller,"paste",function(le){if($o(e,le)||Ot(S,le))return;if(!U.dispatchEvent){S.state.pasteIncoming=+new Date,O.focus();return}var ye=new Event("paste");ye.clipboardData=le.clipboardData,U.dispatchEvent(ye)}),ze(e.lineSpace,"selectstart",function(le){$o(e,le)||Ce(le)}),ze(U,"compositionstart",function(){var le=S.getCursor("from");O.composing&&O.composing.range.clear(),O.composing={start:le,range:S.markText(le,S.getCursor("to"),{className:"CodeMirror-composing"})}}),ze(U,"compositionend",function(){O.composing&&(O.poll(),O.composing.range.clear(),O.composing=null)})},Mi.prototype.createField=function(e){this.wrapper=ju(),this.textarea=this.wrapper.firstChild},Mi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Mi.prototype.prepareSelection=function(){var e=this.cm,n=e.display,O=e.doc,S=ka(e);if(e.options.moveInputWithCursor){var U=Yt(e,O.sel.primary().head,"div"),$=n.wrapper.getBoundingClientRect(),le=n.lineDiv.getBoundingClientRect();S.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,U.top+le.top-$.top)),S.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,U.left+le.left-$.left))}return S},Mi.prototype.showSelection=function(e){var n=this.cm,O=n.display;u(O.cursorDiv,e.cursors),u(O.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Mi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var n=this.cm;if(n.somethingSelected()){this.prevInput="";var O=n.getSelection();this.textarea.value=O,n.state.focused&&G(this.textarea),M&&x>=9&&(this.hasSelection=O)}else e||(this.prevInput=this.textarea.value="",M&&x>=9&&(this.hasSelection=null))},Mi.prototype.getField=function(){return this.textarea},Mi.prototype.supportsTouch=function(){return!1},Mi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!A||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},Mi.prototype.blur=function(){this.textarea.blur()},Mi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Mi.prototype.receivedFocus=function(){this.slowPoll()},Mi.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()})},Mi.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0;function O(){var S=n.poll();!S&&!e?(e=!0,n.polling.set(60,O)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,O)},Mi.prototype.poll=function(){var e=this,n=this.cm,O=this.textarea,S=this.prevInput;if(this.contextMenuPending||!n.state.focused||Xe(O)&&!S&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var U=O.value;if(U==S&&!n.somethingSelected())return!1;if(M&&x>=9&&this.hasSelection===U||l&&/[\uf700-\uf7ff]/.test(U))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var $=U.charCodeAt(0);if($==8203&&!S&&(S="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var le=0,ye=Math.min(S.length,U.length);le1e3||U.indexOf(` `)>-1?O.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Mi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Mi.prototype.onKeyPress=function(){M&&x>=9&&(this.hasSelection=null),this.fastPoll()},Mi.prototype.onContextMenu=function(e){var n=this,O=n.cm,S=O.display,U=n.textarea;n.contextMenuPending&&n.contextMenuPending();var $=er(O,e),le=S.scroller.scrollTop;if(!$||t)return;var ye=O.options.resetSelectionOnContextMenu;ye&&O.doc.sel.contains($)==-1&&da(O,ki)(O.doc,wi($),he);var be=U.style.cssText,Re=n.wrapper.style.cssText,st=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-st.top-5)+"px; left: "+(e.clientX-st.left-5)+`px; z-index: 1000; background: `+(M?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var At;T&&(At=window.scrollY),S.input.focus(),T&&window.scrollTo(null,At),S.input.reset(),O.somethingSelected()||(U.value=n.prevInput=" "),n.contextMenuPending=Ut,S.selForContextMenu=O.doc.sel,clearTimeout(S.detectingSelectAll);function Nt(){if(U.selectionStart!=null){var yn=O.somethingSelected(),Nn="\u200B"+(yn?U.value:"");U.value="\u21DA",U.value=Nn,n.prevInput=yn?"":"\u200B",U.selectionStart=1,U.selectionEnd=Nn.length,S.selForContextMenu=O.doc.sel}}function Ut(){if(n.contextMenuPending!=Ut)return;if(n.contextMenuPending=!1,n.wrapper.style.cssText=Re,U.style.cssText=be,M&&x<9&&S.scrollbars.setScrollTop(S.scroller.scrollTop=le),U.selectionStart!=null){(!M||M&&x<9)&&Nt();var yn=0,Nn=function(){S.selForContextMenu==O.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&n.prevInput=="\u200B"?da(O,Sl)(O):yn++<10?S.detectingSelectAll=setTimeout(Nn,500):(S.selForContextMenu=null,S.input.reset())};S.detectingSelectAll=setTimeout(Nn,200)}}if(M&&x>=9&&Nt(),L){He(e);var An=function(){St(window,"mouseup",An),setTimeout(Ut,20)};ze(window,"mouseup",An)}else setTimeout(Ut,50)},Mi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Mi.prototype.setUneditable=function(){},Mi.prototype.needsContentAttribute=!1;function zl(e,n){if(n=n?D(n):{},n.value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),n.autofocus==null){var O=P();n.autofocus=O==e||e.getAttribute("autofocus")!=null&&O==document.body}function S(){e.value=ye.getValue()}var U;if(e.form&&(ze(e.form,"submit",S),!n.leaveSubmitMethodAlone)){var $=e.form;U=$.submit;try{var le=$.submit=function(){S(),$.submit=U,$.submit(),$.submit=le}}catch(be){}}n.finishInit=function(be){be.save=S,be.getTextArea=function(){return e},be.toTextArea=function(){be.toTextArea=isNaN,S(),e.parentNode.removeChild(be.getWrapperElement()),e.style.display="",e.form&&(St(e.form,"submit",S),!n.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var ye=Xi(function(be){return e.parentNode.insertBefore(be,e.nextSibling)},n);return ye}function rl(e){e.off=St,e.on=ze,e.wheelEventPixels=Pn,e.Doc=In,e.splitLines=pt,e.countColumn=z,e.findColumn=ve,e.isWordChar=je,e.Pass=Ae,e.signal=at,e.Line=Ao,e.changeEnd=Bo,e.scrollbarModel=Di,e.Pos=_e,e.cmpPos=Be,e.modes=xt,e.mimeModes=vt,e.resolveMode=ct,e.getMode=Mt,e.modeExtensions=Gt,e.extendMode=gn,e.copyState=Tn,e.startState=Vr,e.innerMode=Gr,e.commands=kl,e.keyMap=Ds,e.keyName=cu,e.isModifierKey=wu,e.lookupKey=bs,e.normalizeKeyMap=Cu,e.StringStream=Kr,e.SharedTextMarker=Ba,e.TextMarker=pa,e.LineWidget=Ur,e.e_preventDefault=Ce,e.e_stopPropagation=Se,e.e_stop=He,e.addClass=N,e.contains=v,e.rmClass=g,e.keyNames=Io}ec(Xi),Hu(Xi);var Wu="iter insert remove copy getEditor constructor".split(" ");for(var Gl in In.prototype)In.prototype.hasOwnProperty(Gl)&&Z(Wu,Gl)<0&&(Xi.prototype[Gl]=function(e){return function(){return e.apply(this.doc,arguments)}}(In.prototype[Gl]));return ke(In),Xi.inputStyles={textarea:Mi,contenteditable:Oi},Xi.defineMode=function(e){!Xi.defaults.mode&&e!="null"&&(Xi.defaults.mode=e),Dt.apply(this,arguments)},Xi.defineMIME=Ht,Xi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xi.defineMIME("text/plain","null"),Xi.defineExtension=function(e,n){Xi.prototype[e]=n},Xi.defineDocExtension=function(e,n){In.prototype[e]=n},Xi.fromTextArea=zl,rl(Xi),Xi.version="5.58.2",Xi})},W6BS:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},W6us:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAv9JREFUSA2dVV1IVEEU/s7sqkuiUAahgREkQVjmS0FEBRWELz1Yj5ZSJBEaVm8RBOFbQSZIQUU9hFT4EqRuBdIP0oOia5lIZBRZoBWYy+a6O3M6s3DxXrurez1wOeee+b7zzZ05dwYIaD0x3dk9rNsD0hAOSgBjDwHTQXmBhZgwB7A8wcwjFI1xYYiw7sA2mshWJqRUHSkkso3b/LMPXJHOw9eaCko6OOUE1muY1pQx490xPuLOO3HZLV7b8BJz9X1QNnbybt8zok/plBlHwlxw5z1CIajbIMwQm87no1xugZeZVVkbN5S28YD5i2mTxmDmkdjm1t/geoux2O5hrpY9vCnhJOWrBzbnmOyr12T5Kg3M8UixunSyF8WJeXQxY7cX5X0jwmvZu9rH+5CeZXMxn1TH4uX/T8gpsfkOF83E0S8zrHRyS3rCu5Iwdo2eobgfzrN0bsCfWVzLWcQSGVt/p4WTxXy/aEM7b0wafBRyKAvPP03QBQoVX5ro82JA+MUYl+h5bKIwkge3IEZELCK1gUVsZZlYhgtcZWmQ6Ai2y5fk6VUYU6mkeaVZv02n9FDviD5m8TJYbf1KzOFGY6bFsB60tSmhn4SJ1HnA7JTZJCMR9TRTnFGyEhE315B6KHUjIhxWpPrCh6qoVwD2WTDCLxFemVmuWE0VfRPX6hTx7TrRGHIAQX02rq+QdE6XbJQOKmI5Ga4P0VfIticx7vrgl0xZjl9rW5KvkB1Yk4dzMsP3Ns7JBFtcBGksf8sqZI+Swnzsl3PsjT91IWsxFjt+gmYXst4oq5CFfTpNU43N2BtSaJBig16q/G+Ss2MWY7GLx93v0ua5W+YOSiFzfUAutu+N9DNXdk5C5R28Op1GnRQtcBc2QFwV4L4ILnnjWo7nKncXccc6jcPGoM2dc2Kex4TEUec9m8/pi44+4lD/FHbInxVxF9KM+I+zGLAHsTvvF+ck5BBLr3OL3KRNcjyxNMGVyWa654wt53NaOqeIzColcVL+L1nJTOwMLev/AaJkF76u7DFoAAAAAElFTkSuQmCC"},WPnJ:function(Ie,oe,C){Ie.exports={"sort-list-panel":"sort-list-panel___3NFo7","sort-list-tip":"sort-list-tip___1C7gJ","ant-drawer-content":"ant-drawer-content___z72s9","dragging-li":"dragging-li___2fI-b","task-list-container":"task-list-container___O3FkA",imgradius:"imgradius___2naxh",directionItemWrap:"directionItemWrap___12VCj",groupActionWrap:"groupActionWrap___3JLr9",teamHeight:"teamHeight___1JFgn",divHeight:"divHeight___3DCc8"}},WaYH:function(Ie,oe,C){"use strict";var q=C("rePB"),K=C("Ff2n"),I=C("VTBJ"),k=C("1OyB"),E=C("vuIU"),B=C("JX7q"),M=C("Ji7U"),x=C("LK+K"),T=C("q1tI"),p=C("TSYQ"),r=C.n(p),t=C("sboe"),c=C("OZM5"),s=function(L){var b=L.prefixCls,g=L.level,i=L.isStart,u=L.isEnd;if(!g)return null;for(var f="".concat(b,"-indent-unit"),y=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:!1,ae=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(ce&&P[ae])return P[ae];var ve=window.getComputedStyle(he),ue=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),fe=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),se=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),me=v.map(function(pe){return"".concat(pe,":").concat(ve.getPropertyValue(pe))}).join(";"),re={sizingStyle:me,paddingSize:fe,borderSize:se,boxSizing:ue};return ce&&ae&&(P[ae]=re),re}function G(he){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;N||(N=document.createElement("textarea"),N.setAttribute("tab-index","-1"),N.setAttribute("aria-hidden","true"),document.body.appendChild(N)),he.getAttribute("wrap")?N.setAttribute("wrap",he.getAttribute("wrap")):N.removeAttribute("wrap");var ue=Q(he,ce),fe=ue.paddingSize,se=ue.borderSize,me=ue.boxSizing,re=ue.sizingStyle;N.setAttribute("style","".concat(re,";").concat(h)),N.value=he.value||he.placeholder||"";var pe=Number.MIN_SAFE_INTEGER,De=Number.MAX_SAFE_INTEGER,we=N.scrollHeight,je;if(me==="border-box"?we+=se:me==="content-box"&&(we-=fe),ae!==null||ve!==null){N.value=" ";var et=N.scrollHeight-fe;ae!==null&&(pe=et*ae,me==="border-box"&&(pe=pe+fe+se),we=Math.max(pe,we)),ve!==null&&(De=et*ve,me==="border-box"&&(De=De+fe+se),je=we>De?"":"hidden",we=Math.min(De,we))}return{height:we,minHeight:pe,maxHeight:De,overflowY:je,resize:"none"}}var F=C("Gytx"),D=C.n(F),z;(function(he){he[he.NONE=0]="NONE",he[he.RESIZING=1]="RESIZING",he[he.RESIZED=2]="RESIZED"})(z||(z={}));var j=function(he){Object(k.a)(ae,he);var ce=Object(E.a)(ae);function ae(ve){var ue;return Object(K.a)(this,ae),ue=ce.call(this,ve),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(fe){ue.textArea=fe},ue.handleResize=function(fe){var se=ue.state.resizeStatus,me=ue.props,re=me.autoSize,pe=me.onResize;if(se!==z.NONE)return;typeof pe=="function"&&pe(fe),re&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var fe=ue.props.autoSize;if(!fe||!ue.textArea)return;var se=fe.minRows,me=fe.maxRows,re=G(ue.textArea,!1,se,me);ue.setState({textareaStyles:re,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:z.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:z.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var fe=ue.props,se=fe.prefixCls,me=se===void 0?"rc-textarea":se,re=fe.autoSize,pe=fe.onResize,De=fe.className,we=fe.disabled,je=ue.state,et=je.textareaStyles,Le=je.resizeStatus,We=Object(u.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ze=y()(me,De,Object(x.a)({},"".concat(me,"-disabled"),we));"value"in We&&(We.value=We.value||"");var $e=Object(M.a)(Object(M.a)(Object(M.a)({},ue.props.style),et),Le===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return B.createElement(i,{onResize:ue.handleResize,disabled:!(re||pe)},B.createElement("textarea",Object(q.a)({},We,{className:Ze,style:$e,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:z.NONE},ue}return Object(I.a)(ae,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!D()(ue.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 ue=this.textArea.selectionStart,fe=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,fe)}}catch(se){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ae}(B.Component),Z=j,te=function(he){Object(k.a)(ae,he);var ce=Object(E.a)(ae);function ae(ve){var ue;Object(K.a)(this,ae),ue=ce.call(this,ve),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(se){ue.resizableTextArea=se},ue.handleChange=function(se){var me=ue.props.onChange;ue.setValue(se.target.value,function(){ue.resizableTextArea.resizeTextarea()}),me&&me(se)},ue.handleKeyDown=function(se){var me=ue.props,re=me.onPressEnter,pe=me.onKeyDown;se.keyCode===13&&re&&re(se),pe&&pe(se)};var fe=typeof ve.value=="undefined"||ve.value===null?ve.defaultValue:ve.value;return ue.state={value:fe},ue}return Object(I.a)(ae,[{key:"setValue",value:function(ue,fe){"value"in this.props||this.setState({value:ue},fe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return B.createElement(Z,Object(q.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),ae}(B.Component),Ae=oe.default=te},YH21:function(Ie,oe,C){var q=C("H6uX");oe.Dispatcher=q;var K=C("ItGF"),I=C("Ze12"),k=I.isCanvasEl,E=I.transformCoordWithViewport,B=typeof window!="undefined"&&!!window.addEventListener,M=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,x=[];function T(A,l,m,_){return m=m||{},_||!K.canvasSupported?p(A,l,m):K.browser.firefox&&l.layerX!=null&&l.layerX!==l.offsetX?(m.zrX=l.layerX,m.zrY=l.layerY):l.offsetX!=null?(m.zrX=l.offsetX,m.zrY=l.offsetY):p(A,l,m),m}function p(A,l,m){if(K.domSupported&&A.getBoundingClientRect){var _=l.clientX,R=l.clientY;if(k(A)){var w=A.getBoundingClientRect();m.zrX=_-w.left,m.zrY=R-w.top;return}else if(E(x,A,_,R)){m.zrX=x[0],m.zrY=x[1];return}}m.zrX=m.zrY=0}function r(A){return A||window.event}function t(A,l,m){if(l=r(l),l.zrX!=null)return l;var _=l.type,R=_&&_.indexOf("touch")>=0;if(!R)T(A,l,l,m),l.zrDelta=l.wheelDelta?l.wheelDelta/120:-(l.detail||0)/3;else{var w=_!=="touchend"?l.targetTouches[0]:l.changedTouches[0];w&&T(A,w,l,m)}var L=l.button;return l.which==null&&L!==void 0&&M.test(l.type)&&(l.which=L&1?1:L&2?3:L&4?2:0),l}function c(A,l,m,_){B?A.addEventListener(l,m,_):A.attachEvent("on"+l,m)}function s(A,l,m,_){B?A.removeEventListener(l,m,_):A.detachEvent("on"+l,m)}var a=B?function(A){A.preventDefault(),A.stopPropagation(),A.cancelBubble=!0}:function(A){A.returnValue=!1,A.cancelBubble=!0};function o(A){return A.which===2||A.which===3}function d(A){return A.which>1}oe.clientToLocal=T,oe.getNativeEvent=r,oe.normalizeEvent=t,oe.addEventListener=c,oe.removeEventListener=s,oe.stop=a,oe.isMiddleOrRightButtonOnMouseUpDown=o,oe.notLeftMouse=d},"Ye+n":function(Ie,oe,C){Ie.exports={advertisementModal:"advertisementModal___2ZrRs",bodyHeight:"bodyHeight___3x6vP"}},YgsL:function(Ie,oe,C){var q=C("QBsz"),K=q.distance;function I(E,B,M,x,T,p,r){var t=(M-E)*.5,c=(x-B)*.5;return(2*(B-M)+t+c)*r+(-3*(B-M)-2*t-c)*p+t*T+B}function k(E,B){for(var M=E.length,x=[],T=0,p=1;pM-2?M-1:c+1],A=E[c>M-3?M-1:c+2]);var l=s*s,m=s*l;x.push([I(a[0],o[0],d[0],A[0],s,l,m),I(a[1],o[1],d[1],A[1],s,l,m)])}return x}Ie.exports=k},ZKmM:function(Ie,oe,C){Ie.exports=C.p+"static/yc.ac1ebb9c.svg"},ZW9T:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return G});var q=C("k1fw"),K=C("miYZ"),I=C("tsqr"),k=C("rAM+"),E=C("tJVT"),B=C("PpiC"),M=C("q1tI"),x=C.n(M),T=C("bdgK"),p=C("oBTY"),r=C("9og8"),t=C("WmNS"),c=C.n(t),s={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"]},a={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"]},o={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","for","friend","gcnew","generic","goto","if","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:"main",content:["int main () {"," $0","}"].join(` `)},{label:"for",content:["for( ; ; ){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)}]},d={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(` `)}]},A=C("5VLF"),l=C.n(A),m={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"]}},_=function(D,z){return z.map(function(j){return{label:j,kind:D.languages.CompletionItemKind.Keyword,insertText:j}})},R=function(D){return Object.keys(m.tables).map(function(z){return{label:z,kind:D.languages.CompletionItemKind.Variable,insertText:z}})},w=function(D,z){var j=m.tables[D];return j?j.map(function(Z){return{label:Z,kind:z.languages.CompletionItemKind.Field,insertText:Z}}):[]};function L(F,D,z,j,Z){var te=D.getWordUntilPosition(z),Ae={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},he=j.map(function(ce){return{label:ce,kind:F.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}});return Z.map(function(ce){he.push(Object(q.a)(Object(q.a)({},ce),{},{range:Ae}))}),he}var b=function(F){m.languages.map(function(Z){return F.languages.registerDocumentFormattingEditProvider(Z,{provideDocumentFormattingEdits:function(Ae,he,ce){return Object(r.a)(c.a.mark(function ae(){var ve;return c.a.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return ve=l()(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}),fe.abrupt("return",[{range:Ae.getFullModelRange(),text:ve}]);case 2:case"end":return fe.stop()}},ae)}))()}}),Z});var D=o.quickKey.map(function(Z){return{label:Z.label,kind:F.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),z=d.quickKey.map(function(Z){return{label:Z.label,kind:F.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),j=a.quickKey.map(function(Z){return{label:Z.label,kind:F.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}});F.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(p.a)(o.keywords),Object(p.a)(o.quickKey.map(function(Z){return Z.label}))),provideCompletionItems:function(te,Ae){var he=te.getValueInRange({startLineNumber:Ae.lineNumber,startColumn:1,endLineNumber:Ae.lineNumber,endColumn:Ae.column}),ce=he.match(/cu/gim);console.log("match:",ce,Ae,he,te);var ae=[],ve=Ae.lineNumber,ue=Ae.column,fe=te.getValueInRange({startLineNumber:ve,startColumn:0,endLineNumber:ve,endColumn:ue}),se=fe.trim().split(/\s+/),me=se[se.length-1];if(me.endsWith(".")){var re=me.slice(0,me.length-1);Object.keys(m.tables).includes(re)&&(ae=Object(p.a)(w(re,F)))}else me==="."?ae=[]:ae=[].concat(Object(p.a)(R(F)),Object(p.a)(_(F,o.keywords)),Object(p.a)(D));return{suggestions:ae}}}),F.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(p.a)(s.keywords)),provideCompletionItems:function(te,Ae){var he=te.getValueInRange({startLineNumber:Ae.lineNumber,startColumn:1,endLineNumber:Ae.lineNumber,endColumn:Ae.column}),ce=he.match(/cu/gim);console.log("match:",ce,Ae,he,te);var ae=[],ve=Ae.lineNumber,ue=Ae.column,fe=te.getValueInRange({startLineNumber:ve,startColumn:0,endLineNumber:ve,endColumn:ue}),se=fe.trim().split(/\s+/),me=se[se.length-1];if(me.endsWith(".")){var re=me.slice(0,me.length-1);Object.keys(m.tables).includes(re)&&(ae=Object(p.a)(w(re,F)))}else me==="."?ae=[]:ae=[].concat(Object(p.a)(R(F)),Object(p.a)(_(F,s.keywords)));return{suggestions:ae}}}),F.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(p.a)(a.keywords)),provideCompletionItems:function(te,Ae){var he=[],ce=Ae.lineNumber,ae=Ae.column,ve=te.getValueInRange({startLineNumber:ce,startColumn:0,endLineNumber:ce,endColumn:ae}),ue=ve.trim().split(/\s+/),fe=ue[ue.length-1];if(fe.endsWith(".")){var se=fe.slice(0,fe.length-1);Object.keys(m.tables).includes(se)&&(he=Object(p.a)(w(se,F)))}else fe==="."?he=[]:he=[].concat(Object(p.a)(R(F)),Object(p.a)(_(F,a.keywords)),Object(p.a)(j));return{suggestions:he}}}),F.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(p.a)(d.keywords)),provideCompletionItems:function(te,Ae){var he=[],ce=Ae.lineNumber,ae=Ae.column,ve=te.getValueInRange({startLineNumber:ce,startColumn:0,endLineNumber:ce,endColumn:ae}),ue=ve.trim().split(/\s+/),fe=ue[ue.length-1];if(fe.endsWith(".")){var se=fe.slice(0,fe.length-1);Object.keys(m.tables).includes(se)&&(he=Object(p.a)(w(se,F)))}else fe==="."?he=[]:he=[].concat(Object(p.a)(R(F)),Object(p.a)(_(F,d.keywords)),Object(p.a)(z));return{suggestions:he}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",i=C("LvDl"),u=C("+ua5");function f(F){return/^\d+$/.test(F)?"".concat(F,"px"):F}function y(){}var h=!1,v={"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 P(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=F;if(Array.isArray(F)){for(var z=0;z0||Tn.target.offsetWidth>0)&&at.current.instance.layout()}}catch(Gr){Gt.e(Gr)}finally{Gt.f()}}),ct.observe(St.current)),ct}function Ge(){I.b.warn(decodeURIComponent(g))}var mt=function(){var Mt=at.current.instance;if(te!=null&&Mt&&Se){var Gt=Mt.getModel();Gt&&te!==Gt.getValue()&&(h=!0,Gt.setValue(te),Mt.layout(),h=!1)}};Object(M.useEffect)(function(){Ot.current&&clearTimeout(Ot.current),Ot.current=setTimeout(function(){mt()},500)},[te,Se,at.current]),Object(M.useEffect)(function(){if(zt&&at.current&&at.current.instance){var ct=at.current.instance;ct.changeViewZones(function(Gt){var gn=document.createElement("div");gn.style.padding="10px 20px",gn.style.width="calc(100% - 20px)",gn.className="my-error-line-wrp",gn.innerHTML=ze,Gt.addZone({afterLineNumber:zt||11,heightInLines:3,domNode:gn})});var Mt={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}};ct.addOverlayWidget(Mt),ct.revealPositionInCenter({lineNumber:20,column:1})}},[zt,at.current,Se]);function Lt(){var ct=at.current.instance;if(ct){var Mt=ct.getSelection(),Gt=at.current.pastePos||{},gn=new N.Range(Gt.startLineNumber||Mt.endLineNumber,Gt.startColumn||Mt.endColumn,Gt.endLineNumber||Mt.endLineNumber,Gt.endColumn||Mt.endColumn);setTimeout(function(){ct.executeEdits("",[{range:gn,text:""}])},300)}}function en(ct){(window.navigator.platform.match("Mac")?ct.metaKey:ct.ctrlKey)&&ct.keyCode==83&&(ct.preventDefault(),De())}var Jt=function(){if(je&&at.current.instance){var Mt=at.current.instance.getContentHeight();Dt(Mt0||$e.target.offsetWidth>0)&&je.layout()}}catch(bt){We.e(bt)}finally{We.f()}}),et.observe(ve.current)),et}Object(M.useEffect)(function(){ve.current&&C.e(27).then(C.t.bind(null,"M/lh",7)).then(function(je){N=je;var et=N.editor.createDiffEditor(ve.current,Object(q.a)(Object(q.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},ae),{},{wordWrap:!0}));me(et);var Le=re(et);return function(){et.dispose();var We=et.getModel();We&&We.dispose(),Le.unobserve(ve.current)}})},[]),Object(M.useEffect)(function(){se&&se.setModel({original:N.editor.createModel(te,he),modified:N.editor.createModel(Ae,he)})},[te,Ae,he,se]);var pe=f(z),De=f(Z),we={width:pe,height:De};return x.a.createElement("div",{className:"my-diff-editor",ref:ve,style:we})}},Ze12:function(Ie,oe,C){var q=C("ItGF"),K=C("hOwI"),I=K.buildTransformer,k="___zrEVENTSAVED",E=[];function B(r,t,c,s,a){return M(E,t,s,a,!0)&&M(r,c,E[0],E[1])}function M(r,t,c,s,a){if(t.getBoundingClientRect&&q.domSupported&&!p(t)){var o=t[k]||(t[k]={}),d=x(t,o),A=T(d,o,a);if(A)return A(r,c,s),!0}return!1}function x(r,t){var c=t.markers;if(c)return c;c=t.markers=[];for(var s=["left","right"],a=["top","bottom"],o=0;o<4;o++){var d=document.createElement("div"),A=d.style,l=o%2,m=(o>>1)%2;A.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",s[l]+":0",a[m]+":0",s[1-l]+":auto",a[1-m]+":auto",""].join("!important;"),r.appendChild(d),c.push(d)}return c}function T(r,t,c){for(var s=c?"invTrans":"trans",a=t[s],o=t.srcCoords,d=!0,A=[],l=[],m=0;m<4;m++){var _=r[m].getBoundingClientRect(),R=2*m,w=_.left,L=_.top;A.push(w,L),d=d&&o&&w===o[R]&&L===o[R+1],l.push(r[m].offsetLeft,r[m].offsetTop)}return d&&a?a:(t.srcCoords=A,t[s]=c?I(l,A):I(A,l))}function p(r){return r.nodeName.toUpperCase()==="CANVAS"}oe.transformLocalCoord=B,oe.transformCoordWithViewport=M,oe.isCanvasEl=p},ZpRC:function(Ie,oe,C){"use strict";function q(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function K(r,t){return(!t||r!=="hidden")&&r!=="visible"&&r!=="clip"}function I(r,t){if(r.clientHeightt||o>r&&d=t&&A>=c?o-r-s:d>t&&Ac?d-t+a:0}var E=function(r,t){var c=window,s=t.scrollMode,a=t.block,o=t.inline,d=t.boundary,A=t.skipOverflowHiddenElements,l=typeof d=="function"?d:function(et){return et!==d};if(!q(r))throw new TypeError("Invalid target");for(var m=document.scrollingElement||document.documentElement,_=[],R=r;q(R)&&l(R);){if((R=R.parentElement)===m){_.push(R);break}R!=null&&R===document.body&&I(R)&&!I(document.documentElement)||R!=null&&I(R,A)&&_.push(R)}for(var w=c.visualViewport?c.visualViewport.width:innerWidth,L=c.visualViewport?c.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,i=r.getBoundingClientRect(),u=i.height,f=i.width,y=i.top,h=i.right,v=i.bottom,P=i.left,N=a==="start"||a==="nearest"?y:a==="end"?v:y+u/2,Q=o==="center"?P+f/2:o==="end"?h:P,G=[],F=0;F<_.length;F++){var D=_[F],z=D.getBoundingClientRect(),j=z.height,Z=z.width,te=z.top,Ae=z.right,he=z.bottom,ce=z.left;if(s==="if-needed"&&y>=0&&P>=0&&v<=L&&h<=w&&y>=te&&v<=he&&P>=ce&&h<=Ae)return G;var ae=getComputedStyle(D),ve=parseInt(ae.borderLeftWidth,10),ue=parseInt(ae.borderTopWidth,10),fe=parseInt(ae.borderRightWidth,10),se=parseInt(ae.borderBottomWidth,10),me=0,re=0,pe="offsetWidth"in D?D.offsetWidth-D.clientWidth-ve-fe:0,De="offsetHeight"in D?D.offsetHeight-D.clientHeight-ue-se:0;if(m===D)me=a==="start"?N:a==="end"?N-L:a==="nearest"?k(g,g+L,L,ue,se,g+N,g+N+u,u):N-L/2,re=o==="start"?Q:o==="center"?Q-w/2:o==="end"?Q-w:k(b,b+w,w,ve,fe,b+Q,b+Q+f,f),me=Math.max(0,me+g),re=Math.max(0,re+b);else{me=a==="start"?N-te-ue:a==="end"?N-he+se+De:a==="nearest"?k(te,he,j,ue,se+De,N,N+u,u):N-(te+j/2)+De/2,re=o==="start"?Q-ce-ve:o==="center"?Q-(ce+Z/2)+pe/2:o==="end"?Q-Ae+fe+pe:k(ce,Ae,Z,ve,fe+pe,Q,Q+f,f);var we=D.scrollLeft,je=D.scrollTop;N+=je-(me=Math.max(0,Math.min(je+me,D.scrollHeight-j+De))),Q+=we-(re=Math.max(0,Math.min(we+re,D.scrollWidth-Z+pe)))}G.push({el:D,top:me,left:re})}return G};function B(r){return r===Object(r)&&Object.keys(r).length!==0}function M(r,t){t===void 0&&(t="auto");var c="scrollBehavior"in document.body.style;r.forEach(function(s){var a=s.el,o=s.top,d=s.left;a.scroll&&c?a.scroll({top:o,left:d,behavior:t}):(a.scrollTop=o,a.scrollLeft=d)})}function x(r){return r===!1?{block:"end",inline:"nearest"}:B(r)?r:{block:"start",inline:"nearest"}}function T(r,t){var c=!r.ownerDocument.documentElement.contains(r);if(B(t)&&typeof t.behavior=="function")return t.behavior(c?[]:E(r,t));if(c)return;var s=x(t);return M(E(r,s),s.behavior)}var p=oe.a=T},Zss7:function(Ie,oe,C){var q;(function(K){var I=/^\s+/,k=/\s+$/,E=0,B=K.round,M=K.min,x=K.max,T=K.random;function p(se,me){if(se=se||"",me=me||{},se instanceof p)return se;if(!(this instanceof p))return new p(se,me);var re=r(se);this._originalInput=se,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=B(100*this._a)/100,this._format=me.format||re.format,this._gradientType=me.gradientType,this._r<1&&(this._r=B(this._r)),this._g<1&&(this._g=B(this._g)),this._b<1&&(this._b=B(this._b)),this._ok=re.ok,this._tc_id=E++}p.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 se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),me,re,pe,De,we,je;return me=se.r/255,re=se.g/255,pe=se.b/255,me<=.03928?De=me/12.92:De=K.pow((me+.055)/1.055,2.4),re<=.03928?we=re/12.92:we=K.pow((re+.055)/1.055,2.4),pe<=.03928?je=pe/12.92:je=K.pow((pe+.055)/1.055,2.4),.2126*De+.7152*we+.0722*je},setAlpha:function(se){return this._a=G(se),this._roundA=B(100*this._a)/100,this},toHsv:function(){var se=a(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=a(this._r,this._g,this._b),me=B(se.h*360),re=B(se.s*100),pe=B(se.v*100);return this._a==1?"hsv("+me+", "+re+"%, "+pe+"%)":"hsva("+me+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHsl:function(){var se=c(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=c(this._r,this._g,this._b),me=B(se.h*360),re=B(se.s*100),pe=B(se.l*100);return this._a==1?"hsl("+me+", "+re+"%, "+pe+"%)":"hsla("+me+", "+re+"%, "+pe+"%, "+this._roundA+")"},toHex:function(se){return d(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return A(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:B(this._r),g:B(this._g),b:B(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+B(this._r)+", "+B(this._g)+", "+B(this._b)+")":"rgba("+B(this._r)+", "+B(this._g)+", "+B(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:B(F(this._r,255)*100)+"%",g:B(F(this._g,255)*100)+"%",b:B(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+B(F(this._r,255)*100)+"%, "+B(F(this._g,255)*100)+"%, "+B(F(this._b,255)*100)+"%)":"rgba("+B(F(this._r,255)*100)+"%, "+B(F(this._g,255)*100)+"%, "+B(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var me="#"+l(this._r,this._g,this._b,this._a),re=me,pe=this._gradientType?"GradientType = 1, ":"";if(se){var De=p(se);re="#"+l(De._r,De._g,De._b,De._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+me+",endColorstr="+re+")"},toString:function(se){var me=!!se;se=se||this._format;var re=!1,pe=this._a<1&&this._a>=0,De=!me&&pe&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return De?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(re=this.toRgbString()),se==="prgb"&&(re=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(re=this.toHexString()),se==="hex3"&&(re=this.toHexString(!0)),se==="hex4"&&(re=this.toHex8String(!0)),se==="hex8"&&(re=this.toHex8String()),se==="name"&&(re=this.toName()),se==="hsl"&&(re=this.toHslString()),se==="hsv"&&(re=this.toHsvString()),re||this.toHexString())},clone:function(){return p(this.toString())},_applyModification:function(se,me){var re=se.apply(null,[this].concat([].slice.call(me)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(R,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(se,me){return se.apply(null,[this].concat([].slice.call(me)))},analogous:function(){return this._applyCombination(h,arguments)},complement:function(){return this._applyCombination(i,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(y,arguments)},triad:function(){return this._applyCombination(u,arguments)},tetrad:function(){return this._applyCombination(f,arguments)}},p.fromRatio=function(se,me){if(typeof se=="object"){var re={};for(var pe in se)se.hasOwnProperty(pe)&&(pe==="a"?re[pe]=se[pe]:re[pe]=Ae(se[pe]));se=re}return p(se,me)};function r(se){var me={r:0,g:0,b:0},re=1,pe=null,De=null,we=null,je=!1,et=!1;return typeof se=="string"&&(se=ue(se)),typeof se=="object"&&(ve(se.r)&&ve(se.g)&&ve(se.b)?(me=t(se.r,se.g,se.b),je=!0,et=String(se.r).substr(-1)==="%"?"prgb":"rgb"):ve(se.h)&&ve(se.s)&&ve(se.v)?(pe=Ae(se.s),De=Ae(se.v),me=o(se.h,pe,De),je=!0,et="hsv"):ve(se.h)&&ve(se.s)&&ve(se.l)&&(pe=Ae(se.s),we=Ae(se.l),me=s(se.h,pe,we),je=!0,et="hsl"),se.hasOwnProperty("a")&&(re=se.a)),re=G(re),{ok:je,format:se.format||et,r:M(255,x(me.r,0)),g:M(255,x(me.g,0)),b:M(255,x(me.b,0)),a:re}}function t(se,me,re){return{r:F(se,255)*255,g:F(me,255)*255,b:F(re,255)*255}}function c(se,me,re){se=F(se,255),me=F(me,255),re=F(re,255);var pe=x(se,me,re),De=M(se,me,re),we,je,et=(pe+De)/2;if(pe==De)we=je=0;else{var Le=pe-De;je=et>.5?Le/(2-pe-De):Le/(pe+De);switch(pe){case se:we=(me-re)/Le+(me1&&($e-=1),$e<1/6?We+(Ze-We)*6*$e:$e<1/2?Ze:$e<2/3?We+(Ze-We)*(2/3-$e)*6:We}if(me===0)pe=De=we=re;else{var et=re<.5?re*(1+me):re+me-re*me,Le=2*re-et;pe=je(Le,et,se+1/3),De=je(Le,et,se),we=je(Le,et,se-1/3)}return{r:pe*255,g:De*255,b:we*255}}function a(se,me,re){se=F(se,255),me=F(me,255),re=F(re,255);var pe=x(se,me,re),De=M(se,me,re),we,je,et=pe,Le=pe-De;if(je=pe===0?0:Le/pe,pe==De)we=0;else{switch(pe){case se:we=(me-re)/Le+(me>1)+720)%360;--me;)pe.h=(pe.h+De)%360,we.push(p(pe));return we}function v(se,me){me=me||6;for(var re=p(se).toHsv(),pe=re.h,De=re.s,we=re.v,je=[],et=1/me;me--;)je.push(p({h:pe,s:De,v:we})),we=(we+et)%1;return je}p.mix=function(se,me,re){re=re===0?0:re||50;var pe=p(se).toRgb(),De=p(me).toRgb(),we=re/100,je={r:(De.r-pe.r)*we+pe.r,g:(De.g-pe.g)*we+pe.g,b:(De.b-pe.b)*we+pe.b,a:(De.a-pe.a)*we+pe.a};return p(je)},p.readability=function(se,me){var re=p(se),pe=p(me);return(K.max(re.getLuminance(),pe.getLuminance())+.05)/(K.min(re.getLuminance(),pe.getLuminance())+.05)},p.isReadable=function(se,me,re){var pe=p.readability(se,me),De,we;we=!1,De=fe(re);switch(De.level+De.size){case"AAsmall":case"AAAlarge":we=pe>=4.5;break;case"AAlarge":we=pe>=3;break;case"AAAsmall":we=pe>=7;break}return we},p.mostReadable=function(se,me,re){var pe=null,De=0,we,je,et,Le;re=re||{},je=re.includeFallbackColors,et=re.level,Le=re.size;for(var We=0;WeDe&&(De=we,pe=p(me[We]));return p.isReadable(se,pe,{level:et,size:Le})||!je?pe:(re.includeFallbackColors=!1,p.mostReadable(se,["#fff","#000"],re))};var P=p.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"},N=p.hexNames=Q(P);function Q(se){var me={};for(var re in se)se.hasOwnProperty(re)&&(me[se[re]]=re);return me}function G(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function F(se,me){j(se)&&(se="100%");var re=Z(se);return se=M(me,x(0,parseFloat(se))),re&&(se=parseInt(se*me,10)/100),K.abs(se-me)<1e-6?1:se%me/parseFloat(me)}function D(se){return M(1,x(0,se))}function z(se){return parseInt(se,16)}function j(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function Z(se){return typeof se=="string"&&se.indexOf("%")!=-1}function te(se){return se.length==1?"0"+se:""+se}function Ae(se){return se<=1&&(se=se*100+"%"),se}function he(se){return K.round(parseFloat(se)*255).toString(16)}function ce(se){return z(se)/255}var ae=function(){var se="[-\\+]?\\d+%?",me="[-\\+]?\\d*\\.\\d+%?",re="(?:"+me+")|(?:"+se+")",pe="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",De="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+De),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+De),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+De),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 ve(se){return!!ae.CSS_UNIT.exec(se)}function ue(se){se=se.replace(I,"").replace(k,"").toLowerCase();var me=!1;if(P[se])se=P[se],me=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var re;return(re=ae.rgb.exec(se))?{r:re[1],g:re[2],b:re[3]}:(re=ae.rgba.exec(se))?{r:re[1],g:re[2],b:re[3],a:re[4]}:(re=ae.hsl.exec(se))?{h:re[1],s:re[2],l:re[3]}:(re=ae.hsla.exec(se))?{h:re[1],s:re[2],l:re[3],a:re[4]}:(re=ae.hsv.exec(se))?{h:re[1],s:re[2],v:re[3]}:(re=ae.hsva.exec(se))?{h:re[1],s:re[2],v:re[3],a:re[4]}:(re=ae.hex8.exec(se))?{r:z(re[1]),g:z(re[2]),b:z(re[3]),a:ce(re[4]),format:me?"name":"hex8"}:(re=ae.hex6.exec(se))?{r:z(re[1]),g:z(re[2]),b:z(re[3]),format:me?"name":"hex"}:(re=ae.hex4.exec(se))?{r:z(re[1]+""+re[1]),g:z(re[2]+""+re[2]),b:z(re[3]+""+re[3]),a:ce(re[4]+""+re[4]),format:me?"name":"hex8"}:(re=ae.hex3.exec(se))?{r:z(re[1]+""+re[1]),g:z(re[2]+""+re[2]),b:z(re[3]+""+re[3]),format:me?"name":"hex"}:!1}function fe(se){var me,re;return se=se||{level:"AA",size:"small"},me=(se.level||"AA").toUpperCase(),re=(se.size||"small").toLowerCase(),me!=="AA"&&me!=="AAA"&&(me="AA"),re!=="small"&&re!=="large"&&(re="small"),{level:me,size:re}}Ie.exports?Ie.exports=p:!(q=function(){return p}.call(oe,C,oe,Ie),q!==void 0&&(Ie.exports=q))})(Math)},"a+yL":function(Ie,oe,C){Ie.exports={search:"search___t0h96",btn:"btn___t2oDx"}},aKvl:function(Ie,oe,C){var q=C("Sj9i"),K=q.quadraticProjectPoint;function I(k,E,B,M,x,T,p,r,t){if(p===0)return!1;var c=p;if(t>E+c&&t>M+c&&t>T+c||tk+c&&r>B+c&&r>x+c||r>>1|(d&21845)<<1;A=(A&52428)>>>2|(A&13107)<<2,A=(A&61680)>>>4|(A&3855)<<4,o[d]=((A&65280)>>>8|(A&255)<<8)>>>1}for(var l=function(_e,Be,Ve){for(var gt=_e.length,Xt=0,sn=new k(Be);Xt>>V]=ee}else for(H=new k(gt),Xt=0;Xt>>15-_e[Xt];return H},m=new I(288),d=0;d<144;++d)m[d]=8;for(var d=144;d<256;++d)m[d]=9;for(var d=256;d<280;++d)m[d]=7;for(var d=280;d<288;++d)m[d]=8;for(var _=new I(32),d=0;d<32;++d)_[d]=5;var R=l(m,9,0),w=l(m,9,1),L=l(_,5,0),b=l(_,5,1),g=function(_e){for(var Be=_e[0],Ve=1;Ve<_e.length;++Ve)_e[Ve]>Be&&(Be=_e[Ve]);return Be},i=function(_e,Be,Ve){var gt=Be/8>>0;return(_e[gt]|_e[gt+1]<<8)>>>(Be&7)&Ve},u=function(_e,Be){var Ve=Be/8>>0;return(_e[Ve]|_e[Ve+1]<<8|_e[Ve+2]<<16)>>>(Be&7)},f=function(_e){return(_e/8>>0)+(_e&7&&1)},y=function(_e,Be,Ve){(Be==null||Be<0)&&(Be=0),(Ve==null||Ve>_e.length)&&(Ve=_e.length);var gt=new(_e instanceof k?k:_e instanceof E?E:I)(Ve-Be);return gt.set(_e.subarray(Be,Ve)),gt},h=function(_e,Be,Ve){var gt=_e.length,Xt=!Be||Ve,sn=!Ve||Ve.i;Ve||(Ve={}),Be||(Be=new I(gt*3));var ne=function(Yr){var ri=Be.length;if(Yr>ri){var ha=new I(Math.max(ri*2,Yr));ha.set(Be),Be=ha}},H=Ve.f||0,V=Ve.p||0,ee=Ve.b||0,ge=Ve.l,ie=Ve.d,tt=Ve.m,Qt=Ve.n,dn=gt*8;do{if(!ge){Ve.f=H=i(_e,V,1);var _n=i(_e,V+1,3);if(V+=3,_n)if(_n==1)ge=w,ie=b,tt=9,Qt=5;else if(_n==2){var lr=i(_e,V,31)+257,Or=i(_e,V+10,15)+4,$r=lr+i(_e,V+5,31)+1;V+=14;for(var Hr=new I($r),ba=new I(19),Ir=0;Irdn)break;for(var hi=l(ba,ga,1),Ir=0;Ir<$r;){var Ha=hi[i(_e,V,Na)];V+=Ha&15;var Zt=Ha>>>4;if(Zt<16)Hr[Ir++]=Zt;else{var qa=0,xi=0;for(Zt==16?(xi=3+i(_e,V,3),V+=2,qa=Hr[Ir-1]):Zt==17?(xi=3+i(_e,V,7),V+=3):Zt==18&&(xi=11+i(_e,V,127),V+=7);xi--;)Hr[Ir++]=qa}}var fi=Hr.subarray(0,lr),ui=Hr.subarray(lr);tt=g(fi),Qt=g(ui),ge=l(fi,tt,1),ie=l(ui,Qt,1)}else throw"invalid block type";else{var Zt=f(V)+4,Vn=_e[Zt-4]|_e[Zt-3]<<8,Xn=Zt+Vn;if(Xn>gt){if(sn)throw"unexpected EOF";break}Xt&&ne(ee+Vn),Be.set(_e.subarray(Zt,Xn),ee),Ve.b=ee+=Vn,Ve.p=V=Xn*8;continue}if(V>dn)throw"unexpected EOF"}Xt&&ne(ee+131072);for(var pi=(1<>>4;if(V+=qa&15,V>dn)throw"unexpected EOF";if(!qa)throw"invalid length/literal";if(Hi<256)Be[ee++]=Hi;else if(Hi==256){ge=null;break}else{var Yi=Hi-254;if(Hi>264){var Ir=Hi-257,Zr=B[Ir];Yi=i(_e,V,(1<>>4;if(!sa)throw"invalid distance";V+=sa&15;var ui=s[Mr];if(Mr>3){var Zr=M[Mr];ui+=u(_e,V)&(1<dn)throw"unexpected EOF";Xt&&ne(ee+131072);for(var la=ee+Yi;ee>0;_e[gt]|=Ve,_e[gt+1]|=Ve>>>8},P=function(_e,Be,Ve){Ve<<=Be&7;var gt=Be/8>>0;_e[gt]|=Ve,_e[gt+1]|=Ve>>>8,_e[gt+2]|=Ve>>>16},N=function(_e,Be){for(var Ve=[],gt=0;gt<_e.length;++gt)_e[gt]&&Ve.push({s:gt,f:_e[gt]});var Xt=Ve.length,sn=Ve.slice();if(!Xt)return[new I(0),0];if(Xt==1){var ne=new I(Ve[0].s+1);return ne[Ve[0].s]=1,[ne,1]}Ve.sort(function($r,Hr){return $r.f-Hr.f}),Ve.push({s:-1,f:25001});var H=Ve[0],V=Ve[1],ee=0,ge=1,ie=2;for(Ve[0]={s:-1,f:H.f+V.f,l:H,r:V};ge!=Xt-1;)H=Ve[Ve[ee].ftt&&(tt=sn[gt].s);var Qt=new k(tt+1),dn=Q(Ve[ge-1],Qt,0);if(dn>Be){var gt=0,_n=0,Zt=dn-Be,Vn=1<Be)_n+=Vn-(1<>>=Zt;_n>0;){var lr=sn[gt].s;Qt[lr]=0&&_n;--gt){var Or=sn[gt].s;Qt[Or]==Be&&(--Qt[Or],++_n)}dn=Be}return[new I(Qt),dn]},Q=function(_e,Be,Ve){return _e.s==-1?Math.max(Q(_e.l,Be,Ve+1),Q(_e.r,Be,Ve+1)):Be[_e.s]=Ve},G=function(_e){for(var Be=_e.length;Be&&!_e[--Be];);for(var Ve=new k(++Be),gt=0,Xt=_e[0],sn=1,ne=function(V){Ve[gt++]=V},H=1;H<=Be;++H)if(_e[H]==Xt&&H!=Be)++sn;else{if(!Xt&&sn>2){for(;sn>138;sn-=138)ne(32754);sn>2&&(ne(sn>10?sn-11<<5|28690:sn-3<<5|12305),sn=0)}else if(sn>3){for(ne(Xt),--sn;sn>6;sn-=6)ne(8304);sn>2&&(ne(sn-3<<5|8208),sn=0)}for(;sn--;)ne(Xt);sn=1,Xt=_e[H]}return[Ve.subarray(0,gt),Be]},F=function(_e,Be){for(var Ve=0,gt=0;gt>>8,_e[Xt+2]=_e[Xt]^255,_e[Xt+3]=_e[Xt+1]^255;for(var sn=0;sn4&&!Na[x[Ha-1]];--Ha);var qa=ee+5<<3,xi=F(Xt,m)+F(sn,_)+ne,fi=F(Xt,tt)+F(sn,_n)+ne+14+3*Ha+F(ba,Na)+(2*ba[16]+3*ba[17]+7*ba[18]);if(qa<=xi&&qa<=fi)return D(Be,ge,_e.subarray(V,V+ee));var ui,pi,bi,ai;if(v(Be,ge,1+(fi15&&(v(Be,ge,sa[Ir]>>>5&127),ge+=sa[Ir]>>>12)}}else ui=R,pi=m,bi=L,ai=_;for(var Ir=0;Ir255){var Mr=gt[Ir]>>>18&31;P(Be,ge,ui[Mr+257]),ge+=pi[Mr+257],Mr>7&&(v(Be,ge,gt[Ir]>>>23&31),ge+=B[Mr]);var la=gt[Ir]&31;P(Be,ge,bi[la]),ge+=ai[la],la>3&&(P(Be,ge,gt[Ir]>>>5&8191),ge+=M[la])}else P(Be,ge,ui[gt[Ir]]),ge+=pi[gt[Ir]];return P(Be,ge,ui[256]),ge+pi[256]},j=new E([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Z=new I(0),te=function(_e,Be,Ve,gt,Xt,sn){var ne=_e.length,H=new I(gt+ne+5*(1+Math.floor(ne/7e3))+Xt),V=H.subarray(gt,H.length-Xt),ee=0;if(!Be||ne<8)for(var ge=0;ge<=ne;ge+=65535){var ie=ge+65535;ie>>13,dn=tt&8191,_n=(1<7e3||Na>24576)&&ui>423){ee=z(_e,V,0,$r,Hr,ba,ga,Na,Ha,ge-Ha,ee),Na=Ir=ga=0,Ha=ge;for(var pi=0;pi<286;++pi)Hr[pi]=0;for(var pi=0;pi<30;++pi)ba[pi]=0}var bi=2,ai=0,Hi=dn,Yi=xi-fi&32767;if(ui>2&&qa==Or(ge-Yi))for(var Zr=Math.min(Qt,ui)-1,sa=Math.min(32767,ge),Mr=Math.min(258,ui);Yi<=sa&&--Hi&&xi!=fi;){if(_e[ge+bi]==_e[ge+bi-Yi]){for(var la=0;labi){if(bi=la,ai=Yi,la>Zr)break;for(var Yr=Math.min(Yi,la-2),ri=0,pi=0;piri&&(ri=Ii,fi=ha)}}}xi=fi,fi=Zt[xi],Yi+=xi-fi+32768&32767}if(ai){$r[Na++]=268435456|t[bi]<<18|a[ai];var ci=t[bi]&31,Wo=a[ai]&31;ga+=B[ci]+M[Wo],++Hr[257+ci],++ba[Wo],hi=ge+bi,++Ir}else $r[Na++]=_e[ge],++Hr[_e[ge]]}}ee=z(_e,V,sn,$r,Hr,ba,ga,Na,Ha,ge-Ha,ee),sn||(ee=D(V,ee,Z))}return y(H,0,gt+f(ee)+Xt)},Ae=function(){for(var _e=new E(256),Be=0;Be<256;++Be){for(var Ve=Be,gt=9;--gt;)Ve=(Ve&1&&3988292384)^Ve>>>1;_e[Be]=Ve}return _e}(),he=function(){var _e=4294967295;return{p:function(Be){for(var Ve=_e,gt=0;gt>>8;_e=Ve},d:function(){return _e^4294967295}}},ce=function(){var _e=1,Be=0;return{p:function(Ve){for(var gt=_e,Xt=Be,sn=Ve.length,ne=0;ne!=sn;){for(var H=Math.min(ne+5552,sn);ne>>8<<16|(Be&255)<<8|Be>>>8)+((_e&255)<<23)*2}}},ae=function(_e,Be,Ve,gt,Xt){return te(_e,Be.level==null?6:Be.level,Be.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(_e.length)))*1.5):12+Be.mem,Ve,gt,!Xt)},ve=function(_e,Be){var Ve={};for(var gt in _e)Ve[gt]=_e[gt];for(var gt in Be)Ve[gt]=Be[gt];return Ve},ue=function(_e,Be,Ve){for(var gt=_e(),Xt=_e.toString(),sn=Xt.slice(Xt.indexOf("[")+1,Xt.lastIndexOf("]")).replace(/ /g,"").split(","),ne=0;ne>>=8},Ft=function(_e,Be){var Ve=Be.filename;if(_e[0]=31,_e[1]=139,_e[2]=8,_e[8]=Be.level<2?4:Be.level==9?2:0,_e[9]=3,Be.mtime!=0&&ft(_e,4,Math.floor(new Date(Be.mtime||Date.now())/1e3)),Ve){_e[3]=8;for(var gt=0;gt<=Ve.length;++gt)_e[gt+10]=Ve.charCodeAt(gt)}},zt=function(_e){if(_e[0]!=31||_e[1]!=139||_e[2]!=8)throw"invalid gzip data";var Be=_e[3],Ve=10;Be&4&&(Ve+=_e[10]|(_e[11]<<8)+2);for(var gt=(Be>>3&1)+(Be>>4&1);gt>0;gt-=!_e[Ve++]);return Ve+(Be&2)},Qe=function(_e){var Be=_e.length;return(_e[Be-4]|_e[Be-3]<<8|_e[Be-2]<<16)+2*(_e[Be-1]<<23)},ze=function(_e){return 10+(_e.filename&&_e.filename.length+1||0)},yt=function(_e,Be){var Ve=Be.level,gt=Ve==0?0:Ve<6?1:Ve==9?3:2;_e[0]=120,_e[1]=gt<<6|(gt?32-2*gt:1)},St=function(_e){if((_e[0]&15)!=8||_e[0]>>>4>7||(_e[0]<<8|_e[1])%31)throw"invalid zlib data";if(_e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function at(_e,Be){return!Be&&typeof _e=="function"&&(Be=_e,_e={}),this.ondata=Be,_e}var Ot=function(){function _e(Be,Ve){!Ve&&typeof Be=="function"&&(Ve=Be,Be={}),this.ondata=Ve,this.o=Be||{}}return _e.prototype.p=function(Be,Ve){this.ondata(ae(Be,this.o,0,0,!Ve),Ve)},_e.prototype.push=function(Be,Ve){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Ve,this.p(Be,Ve||!1)},_e}(),Ye=function(){function _e(Be,Ve){bt([pe,function(){return[$e,Ot]}],this,at.call(this,Be,Ve),function(gt){var Xt=new Ot(gt.data);onmessage=$e(Xt)},6)}return _e}();function Ue(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[pe],function(gt){return Le(ke(gt.data[0],gt.data[1]))},0,Ve)}function ke(_e,Be){return Be===void 0&&(Be={}),ae(_e,Be,0,0)}var Ce=function(){function _e(Be){this.s={},this.p=new I(0),this.ondata=Be}return _e.prototype.e=function(Be){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Ve=this.p.length,gt=new I(Ve+Be.length);gt.set(this.p),gt.set(Be,Ve),this.p=gt},_e.prototype.c=function(Be){this.d=this.s.i=Be||!1;var Ve=this.s.b,gt=h(this.p,this.o,this.s);this.ondata(y(gt,Ve,this.s.b),this.d),this.o=y(gt,this.s.b-32768),this.s.b=this.o.length,this.p=y(this.p,this.s.p/8>>0),this.s.p&=7},_e.prototype.push=function(Be,Ve){this.e(Be),this.c(Ve)},_e}(),Se=function(){function _e(Be){this.ondata=Be,bt([re,function(){return[$e,Ce]}],this,0,function(){var Ve=new Ce;onmessage=$e(Ve)},7)}return _e}();function Me(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[re],function(gt){return Le(He(gt.data[0],We(gt.data[1])))},1,Ve)}function He(_e,Be){return h(_e,Be)}var Ge=function(){function _e(Be,Ve){this.c=he(),this.l=0,this.v=1,Ot.call(this,Be,Ve)}return _e.prototype.push=function(Be,Ve){Ot.prototype.push.call(this,Be,Ve)},_e.prototype.p=function(Be,Ve){this.c.p(Be),this.l+=Be.length;var gt=ae(Be,this.o,this.v&&ze(this.o),Ve&&8,!Ve);this.v&&(Ft(gt,this.o),this.v=0),Ve&&(ft(gt,gt.length-8,this.c.d()),ft(gt,gt.length-4,this.l)),this.ondata(gt,Ve)},_e}(),mt=function(){function _e(Be,Ve){bt([pe,De,function(){return[$e,Ot,Ge]}],this,at.call(this,Be,Ve),function(gt){var Xt=new Ge(gt.data);onmessage=$e(Xt)},8)}return _e}();function Lt(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[pe,De,function(){return[en]}],function(gt){return Le(en(gt.data[0],gt.data[1]))},2,Ve)}function en(_e,Be){Be===void 0&&(Be={});var Ve=he(),gt=_e.length;Ve.p(_e);var Xt=ae(_e,Be,ze(Be),8),sn=Xt.length;return Ft(Xt,Be),ft(Xt,sn-8,Ve.d()),ft(Xt,sn-4,gt),Xt}var Jt=function(){function _e(Be){this.v=1,Ce.call(this,Be)}return _e.prototype.push=function(Be,Ve){if(Ce.prototype.e.call(this,Be),this.v){var gt=zt(this.p);if(gt>=this.p.length&&!Ve)return;this.p=this.p.subarray(gt),this.v=0}if(Ve){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}Ce.prototype.c.call(this,Ve)},_e}(),Ct=function(){function _e(Be){this.ondata=Be,bt([re,we,function(){return[$e,Ce,Jt]}],this,0,function(){var Ve=new Jt;onmessage=$e(Ve)},9)}return _e}();function Et(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[re,we,function(){return[pt]}],function(gt){return Le(pt(gt.data[0]))},3,Ve)}function pt(_e,Be){return h(_e.subarray(zt(_e),-8),Be||new I(Qe(_e)))}var Xe=function(){function _e(Be,Ve){this.c=ce(),this.v=1,Ot.call(this,Be,Ve)}return _e.prototype.push=function(Be,Ve){Ot.prototype.push.call(this,Be,Ve)},_e.prototype.p=function(Be,Ve){this.c.p(Be);var gt=ae(Be,this.o,this.v&&2,Ve&&4,!Ve);this.v&&(yt(gt,this.o),this.v=0),Ve&&ft(gt,gt.length-4,this.c.d()),this.ondata(gt,Ve)},_e}(),Fe=function(){function _e(Be,Ve){bt([pe,je,function(){return[$e,Ot,Xe]}],this,at.call(this,Be,Ve),function(gt){var Xt=new Xe(gt.data);onmessage=$e(Xt)},10)}return _e}();function Te(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[pe,je,function(){return[Ne]}],function(gt){return Le(Ne(gt.data[0],gt.data[1]))},4,Ve)}function Ne(_e,Be){Be===void 0&&(Be={});var Ve=ce();Ve.p(_e);var gt=ae(_e,Be,2,4);return yt(gt,Be),ft(gt,gt.length-4,Ve.d()),gt}var xt=function(){function _e(Be){this.v=1,Ce.call(this,Be)}return _e.prototype.push=function(Be,Ve){if(Ce.prototype.e.call(this,Be),this.v){if(this.p.length<2&&!Ve)return;this.p=this.p.subarray(2),this.v=0}if(Ve){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}Ce.prototype.c.call(this,Ve)},_e}(),vt=function(){function _e(Be){this.ondata=Be,bt([re,et,function(){return[$e,Ce,xt]}],this,0,function(){var Ve=new xt;onmessage=$e(Ve)},11)}return _e}();function Dt(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return Ze(_e,Be,[re,et,function(){return[Ht]}],function(gt){return Le(Ht(gt.data[0],We(gt.data[1])))},5,Ve)}function Ht(_e,Be){return h((St(_e),_e.subarray(2,-4)),Be)}var ct=function(){function _e(Be){this.G=Jt,this.I=Ce,this.Z=xt,this.ondata=Be}return _e.prototype.push=function(Be,Ve){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(Be,Ve);else{if(this.p&&this.p.length){var gt=new I(this.p.length+Be.length);gt.set(this.p),gt.set(Be,this.p.length)}else this.p=Be;if(this.p.length>2){var Xt=this,sn=function(){Xt.ondata.apply(Xt,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(sn):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(sn):new this.Z(sn),this.s.push(this.p,Ve),this.p=null}}},_e}(),Mt=function(){function _e(Be){this.G=Ct,this.I=Se,this.Z=vt,this.ondata=Be}return _e.prototype.push=function(Be,Ve){ct.prototype.push.call(this,Be,Ve)},_e}();function Gt(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";return _e[0]==31&&_e[1]==139&&_e[2]==8?Et(_e,Be,Ve):(_e[0]&15)!=8||_e[0]>>4>7||(_e[0]<<8|_e[1])%31?Me(_e,Be,Ve):Dt(_e,Be,Ve)}function gn(_e,Be){return _e[0]==31&&_e[1]==139&&_e[2]==8?pt(_e,Be):(_e[0]&15)!=8||_e[0]>>4>7||(_e[0]<<8|_e[1])%31?He(_e,Be):Ht(_e,Be)}var Tn=function(_e,Be,Ve,gt){for(var Xt in _e){var sn=_e[Xt],ne=Be+Xt;sn instanceof I?Ve[ne]=[sn,gt]:Array.isArray(sn)?Ve[ne]=[sn[0],ve(gt,sn[1])]:Tn(sn,ne+"/",Ve,gt)}};function Gr(_e,Be){var Ve=_e.length;if(!Be&&typeof TextEncoder!="undefined")return new TextEncoder().encode(_e);for(var gt=new I(_e.length+(_e.length>>>1)),Xt=0,sn=function(ee){gt[Xt++]=ee},ne=0;negt.length){var H=new I(Xt+8+(Ve-ne<<1));H.set(gt),gt=H}var V=_e.charCodeAt(ne);V<128||Be?sn(V):V<2048?(sn(192|V>>>6),sn(128|V&63)):V>55295&&V<57344?(V=65536+(V&1023<<10)|_e.charCodeAt(++ne)&1023,sn(240|V>>>18),sn(128|V>>>12&63),sn(128|V>>>6&63),sn(128|V&63)):(sn(224|V>>>12),sn(128|V>>>6&63),sn(128|V&63))}return y(gt,0,Xt)}function Vr(_e,Be){var Ve="";if(!Be&&typeof TextDecoder!="undefined")return new TextDecoder().decode(_e);for(var gt=0;gt<_e.length;){var Xt=_e[gt++];Xt<128||Be?Ve+=String.fromCharCode(Xt):Xt<224?Ve+=String.fromCharCode((Xt&31)<<6|_e[gt++]&63):Xt<240?Ve+=String.fromCharCode((Xt&15)<<12|(_e[gt++]&63)<<6|_e[gt++]&63):(Xt=((Xt&15)<<18|(_e[gt++]&63)<<12|(_e[gt++]&63)<<6|_e[gt++]&63)-65536,Ve+=String.fromCharCode(55296|Xt>>10,56320|Xt&1023))}return Ve}var Kr=function(_e,Be){return Be+30+wt(_e,Be+26)+wt(_e,Be+28)},kn=function(_e,Be,Ve){var gt=wt(_e,Be+28),Xt=Vr(_e.subarray(Be+46,Be+46+gt),!(wt(_e,Be+8)&2048)),sn=Be+46+gt,ne=Ve?Ua(_e,sn):[It(_e,Be+20),It(_e,Be+24),It(_e,Be+42)],H=ne[0],V=ne[1],ee=ne[2];return[wt(_e,Be+10),H,V,Xt,sn+wt(_e,Be+30)+wt(_e,Be+32),ee]},Ua=function(_e,Be){for(;wt(_e,Be)!=1;Be+=4+wt(_e,Be+2));return[It(_e,Be+12),It(_e,Be+4),It(_e,Be+20)]},Ya=function(_e,Be,Ve,gt,Xt,sn,ne,H,V,ee){var ge=sn.length,ie=gt.length;ft(_e,Be,V!=null?33639248:67324752),Be+=4,V!=null&&(_e[Be]=20,Be+=2),_e[Be]=20,Be+=2,_e[Be++]=ee==8&&(H.level==1?6:H.level<6?4:H.level==9?2:0),_e[Be++]=ne&&8,_e[Be]=ee,Be+=2;var tt=new Date(H.mtime||Date.now()),Qt=tt.getFullYear()-1980;if(Qt<0||Qt>119)throw"date not in range 1980-2099";ft(_e,Be,(Qt<<24)*2|tt.getMonth()+1<<21|tt.getDate()<<16|tt.getHours()<<11|tt.getMinutes()<<5|tt.getSeconds()>>>1),Be+=4,ft(_e,Be,Ve),ft(_e,Be+4,ie),ft(_e,Be+8,Xt),ft(_e,Be+12,ge),Be+=16,V!=null&&(ft(_e,Be+=10,V),Be+=4),_e.set(sn,Be),Be+=ge,V==null&&_e.set(gt,Be)},Ra=function(_e,Be,Ve,gt,Xt){ft(_e,Be,101010256),ft(_e,Be+8,Ve),ft(_e,Be+10,Ve),ft(_e,Be+12,gt),ft(_e,Be+16,Xt)};function Xr(_e,Be,Ve){if(Ve||(Ve=Be,Be={}),typeof Ve!="function")throw"no callback";var gt={};Tn(_e,"",gt,Be);var Xt=Object.keys(gt),sn=Xt.length,ne=0,H=0,V=sn,ee=new Array(sn),ge=[],ie=function(){for(var _n=0;_n65535&&ga("filename too long",null),!Ir)ga(null,Xn);else if($r<16e4)try{ga(null,ke(Xn,lr))}catch(Na){ga(Na,null)}else ge.push(Ue(Xn,lr,ga))},dn=0;dn65535)throw"filename too long";var Qt=ge?ke(V,ee):V,dn=Qt.length,_n=he();_n.p(V),gt.push({t:ge,d:Qt,m:V.length,c:_n.d(),u:ne.length!=tt,n:ie,o:Xt,p:ee}),Xt+=30+tt+dn,sn+=76+2*tt+dn}for(var Zt=new I(sn+22),Vn=Xt,Xn=sn-Xt,lr=0;lr65558){Be("invalid zip file",null);return}var ne=wt(_e,sn+8);ne||Be(null,{});var H=ne,V=It(_e,sn+16),ee=V==4294967295;if(ee){if(sn=It(_e,sn-12),It(_e,sn)!=101075792)throw"invalid zip file";H=ne=It(_e,sn+32),V=It(_e,sn+48)}for(var ge=function(tt){var Qt=kn(_e,V,ee),dn=Qt[0],_n=Qt[1],Zt=Qt[2],Vn=Qt[3],Xn=Qt[4],lr=Qt[5],Or=Kr(_e,lr);V=Xn;var $r=function(ba,Ir){ba?(gt(),Be(ba,null)):(Xt[Vn]=Ir,--ne||Be(null,Xt))};if(!dn)$r(null,y(_e,Or,Or+_n));else if(dn==8){var Hr=_e.subarray(Or,Or+_n);if(_n<32e4)try{$r(null,He(Hr,new I(Zt)))}catch(ba){$r(ba,null)}else Ve.push(Me(Hr,{size:Zt},$r))}else $r("unknown compression type "+dn,null)},ie=0;ie65558)throw"invalid zip file";var gt=wt(_e,Ve+8);if(!gt)return{};var Xt=It(_e,Ve+16),sn=Xt==4294967295;if(sn){if(Ve=It(_e,Ve-12),It(_e,Ve)!=101075792)throw"invalid zip file";gt=It(_e,Ve+32),Xt=It(_e,Ve+48)}for(var ne=0;ne1?Z-1:0),Ae=1;Ae1?F-1:0),z=1;z=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var F=0;return G.indexOf(".")>=0&&(F=G.length-G.indexOf(".")-1),F},v.getInputDisplayValue=function(Q){var G=Q||v.state,F=G.focused,D=G.inputValue,z=G.value,j;F?j=D:j=v.toPrecisionAsStep(z),j==null&&(j="");var Z=v.formatWrapper(j);return w(v.props.decimalSeparator)&&(Z=Z.toString().replace(".",v.props.decimalSeparator)),Z},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(Q){}},v.restoreByAfter=function(Q){if(Q===void 0)return!1;var G=v.input.value,F=G.lastIndexOf(Q);if(F===-1)return!1;var D=v.cursorBefore.length;return v.lastKeyCode===t.a.DELETE&&v.cursorBefore.charAt(D-1)===Q[0]?(v.fixCaret(D,D),!0):F+Q.length===G.length?(v.fixCaret(F,F),!0):!1},v.partRestoreByAfter=function(Q){return Q===void 0?!1:Array.prototype.some.call(Q,function(G,F){var D=Q.substring(F);return v.restoreByAfter(D)})},v.isNotCompleteNumber=function(Q){return isNaN(Q)||Q===""||Q===null||Q&&Q.toString().indexOf(".")===Q.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(Q,G,F){v.pressingUpOrDown=!0,v.step("down",Q,G,F)},v.up=function(Q,G,F){v.pressingUpOrDown=!0,v.step("up",Q,G,F)},v.saveInput=function(Q){v.input=Q};var P=h.value;P===void 0&&(P=h.defaultValue),v.state={focused:h.autoFocus};var N=v.getValidValue(v.toNumber(P));return v.state=s(s({},v.state),{},{inputValue:v.toPrecisionAsStep(N),value:N}),v}return Object(k.a)(y,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var P=this.props,N=P.value,Q=P.onChange,G=P.max,F=P.min,D=this.state.focused;if(v){if(!L(v.value,N)||!L(v.max,G)||!L(v.min,F)){var z=D?N:this.getValidValue(N),j;this.pressingUpOrDown?j=z:this.inputting?j=this.rawInput:j=this.toPrecisionAsStep(z),this.setState({value:z,inputValue:j})}var Z="value"in this.props?N:this.state.value;"max"in this.props&&v.max!==G&&typeof Z=="number"&&Z>G&&Q&&Q(G),"min"in this.props&&v.min!==F&&typeof Z=="number"&&Z1&&arguments[1]!==void 0?arguments[1]:this.props.min,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,Q=parseFloat(v);return isNaN(Q)?v:(QN&&(Q=N),Q)}},{key:"setValue",value:function(v,P){var N=this.props.precision,Q=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),G=this.state.value,F=G===void 0?null:G,D=this.state.inputValue,z=D===void 0?null:D,j=typeof Q=="number"?Q.toFixed(N):"".concat(Q),Z=Q!==F||j!=="".concat(z);return"value"in this.props?(z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:z},P)):this.setState({value:Q,inputValue:this.toPrecisionAsStep(v)},P),Z&&this.props.onChange(Q),Q}},{key:"getMaxPrecision",value:function(v){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.props,Q=N.precision,G=N.step;if(w(Q))return Q;var F=this.getPrecision(P),D=this.getPrecision(G),z=this.getPrecision(v);return v?Math.max(z,F+D):F+D}},{key:"getPrecisionFactor",value:function(v){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.getMaxPrecision(v,P);return Math.pow(10,N)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(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,N=this.state.focused,Q=v&&v.length>16&&N;return this.isNotCompleteNumber(v)||Q?v:w(P)?Math.round(v*Math.pow(10,P))/Math.pow(10,P):Number(v)}},{key:"upStep",value:function(v,P){var N=this.props.step,Q=this.getPrecisionFactor(v,P),G=Math.abs(this.getMaxPrecision(v,P)),F=((Q*v+Q*N*P)/Q).toFixed(G);return this.toNumber(F)}},{key:"downStep",value:function(v,P){var N=this.props.step,Q=this.getPrecisionFactor(v,P),G=Math.abs(this.getMaxPrecision(v,P)),F=((Q*v-Q*N*P)/Q).toFixed(G);return this.toNumber(F)}},{key:"step",value:function(v,P){var N=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var F=this.props;if(F.disabled)return;var D=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(D))return;var z=this["".concat(v,"Step")](D,Q),j=z>F.max||zF.max?z=F.max:z=te),Ot=(Ft||Ft===0)&&(isNaN(Ft)||Number(Ft)<=Ae),Ye=at||Q||G,Ue=Ot||Q||G,ke=r()("".concat(N,"-handler"),"".concat(N,"-handler-up"),Object(K.a)({},"".concat(N,"-handler-up-disabled"),Ye)),Ce=r()("".concat(N,"-handler"),"".concat(N,"-handler-down"),Object(K.a)({},"".concat(N,"-handler-down-disabled"),Ue)),Se=F?{onTouchStart:Ye?d:this.up,onTouchEnd:this.stop}:{onMouseDown:Ye?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Me=F?{onTouchStart:Ue?d:this.down,onTouchEnd:this.stop}:{onMouseDown:Ue?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return T.a.createElement("div",{className:Qe,style:he,title:ce,onMouseEnter:ae,onMouseLeave:ve,onMouseOver:ue,onMouseOut:fe,onFocus:function(){return null},onBlur:function(){return null}},T.a.createElement("div",{className:"".concat(N,"-handler-wrap")},T.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ye,className:ke}),z||T.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-up-inner"),onClick:A})),T.a.createElement("span",Object.assign({unselectable:"on"},Me,{role:"button","aria-label":"Decrease Value","aria-disabled":Ue,className:Ce}),j||T.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-down-inner"),onClick:A}))),T.a.createElement("div",{className:"".concat(N,"-input-wrap")},T.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":te,"aria-valuenow":Ft,required:se,type:pe,placeholder:De,onPaste:bt,onClick:me,onMouseUp:this.onMouseUp,className:"".concat(N,"-input"),tabIndex:re,autoComplete:D,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:yt?this.onKeyDown:d,onKeyUp:yt?this.onKeyUp:d,autoFocus:Ze,maxLength:We,readOnly:G,disabled:Q,max:te,min:Ae,step:Le,name:$e,title:ce,id:we,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(St),pattern:et,inputMode:je,onInput:wt},ze))))}}]),y}(T.a.Component);b.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:R,min:-R,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:l,required:!1,autoComplete:"off"};var g=b,i=oe.a=g},dqUG:function(Ie,oe,C){var q=C("Gev7"),K=C("bYtY"),I=C("6GrX"),k=C("pzxd"),E=C("gut8"),B=E.ContextCachedBy,M=function(T){q.call(this,T)};M.prototype={constructor:M,type:"text",brush:function(T,p){var r=this.style;this.__dirty&&k.normalizeTextStyle(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var t=r.text;if(t!=null&&(t+=""),!k.needDrawText(t,r)){T.__attrCachedBy=B.NONE;return}this.setTransform(T),k.renderText(this,T,t,r,null,p),this.restoreTransform(T)},getBoundingRect:function(){var T=this.style;if(this.__dirty&&k.normalizeTextStyle(T,!0),!this._rect){var p=T.text;p!=null?p+="":p="";var r=I.getBoundingRect(T.text+"",T.font,T.textAlign,T.textVerticalAlign,T.textPadding,T.textLineHeight,T.rich);if(r.x+=T.x||0,r.y+=T.y||0,k.getStroke(T.textStroke,T.textStrokeWidth)){var t=T.textStrokeWidth;r.x-=t/2,r.y-=t/2,r.width+=t,r.height+=t}this._rect=r}return this._rect}},K.inherits(M,q);var x=M;Ie.exports=x},dwhp:function(Ie,oe,C){},eqIj:function(Ie,oe,C){Ie.exports=C.p+"static/ys.bff91b04.svg"},fAei:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return m.a});var q=C("rePB"),K=C("VTBJ"),I=C("KQm4"),k=C("1OyB"),E=C("vuIU"),B=C("Ji7U"),M=C("LK+K"),x=C("q1tI"),T=C("4IlW"),p=C("Kwbf"),r=C("TSYQ"),t=C.n(r),c=C("sboe"),s=C("OZM5"),a=C("815F"),o=C("ODXe"),d=C("Ff2n"),A=C("+nKL"),l=C("8XRh"),m=C("WaYH"),_=function(Ae,he){var ce=Ae.className,ae=Ae.style,ve=Ae.motion,ue=Ae.motionNodes,fe=Ae.motionType,se=Ae.onMotionStart,me=Ae.onMotionEnd,re=Ae.active,pe=Ae.treeNodeRequiredProps,De=Object(d.a)(Ae,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),we=x.useState(!0),je=Object(o.a)(we,2),et=je[0],Le=je[1],We=x.useContext(c.a),Ze=We.prefixCls,$e=x.useRef(!1),bt=function(){$e.current||me(),$e.current=!0};return Object(x.useEffect)(function(){ue&&fe==="hide"&&et&&Le(!1)},[ue]),Object(x.useEffect)(function(){return ue&&se(),function(){ue&&bt()}},[]),ue?x.createElement(l.default,Object.assign({ref:he,visible:et},ve,{motionAppear:fe==="show",onAppearEnd:bt,onLeaveEnd:bt}),function(wt,It){var ft=wt.className,Ft=wt.style;return x.createElement("div",{ref:It,className:t()("".concat(Ze,"-treenode-motion"),ft),style:Ft},ue.map(function(zt){var Qe=zt.data,ze=Qe.key,yt=Object(d.a)(Qe,["key"]),St=zt.isStart,at=zt.isEnd;delete yt.children;var Ot=Object(a.f)(ze,pe);return x.createElement(m.a,Object.assign({},yt,Ot,{active:re,data:zt.data,key:ze,isStart:St,isEnd:at}))}))}):x.createElement(m.a,Object.assign({domRef:he,className:ce,style:ae},De,{active:re}))};_.displayName="MotionTreeNode";var R=x.forwardRef(_),w=R;function L(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],he=te.length,ce=Ae.length;if(Math.abs(he-ce)!==1)return{add:!1,key:null};function ae(ve,ue){var fe=new Map;ve.forEach(function(me){fe.set(me,!0)});var se=ue.filter(function(me){return!fe.has(me)});return se.length===1?se[0]:null}return he ").concat(Ae);return Ae}var Q=function(Ae,he){var ce=Ae.prefixCls,ae=Ae.data,ve=Ae.selectable,ue=Ae.checkable,fe=Ae.expandedKeys,se=Ae.selectedKeys,me=Ae.checkedKeys,re=Ae.loadedKeys,pe=Ae.loadingKeys,De=Ae.halfCheckedKeys,we=Ae.keyEntities,je=Ae.disabled,et=Ae.dragging,Le=Ae.dragOverNodeKey,We=Ae.dropPosition,Ze=Ae.motion,$e=Ae.height,bt=Ae.itemHeight,wt=Ae.virtual,It=Ae.focusable,ft=Ae.activeItem,Ft=Ae.focused,zt=Ae.tabIndex,Qe=Ae.onKeyDown,ze=Ae.onFocus,yt=Ae.onBlur,St=Ae.onActiveChange,at=Ae.onListChangeStart,Ot=Ae.onListChangeEnd,Ye=Object(d.a)(Ae,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Ue=x.useRef(null);x.useImperativeHandle(he,function(){return{scrollTo:function(gn){Ue.current.scrollTo(gn)}}});var ke=x.useState(fe),Ce=Object(o.a)(ke,2),Se=Ce[0],Me=Ce[1],He=x.useState(ae),Ge=Object(o.a)(He,2),mt=Ge[0],Lt=Ge[1],en=x.useState(ae),Jt=Object(o.a)(en,2),Ct=Jt[0],Et=Jt[1],pt=x.useState([]),Xe=Object(o.a)(pt,2),Fe=Xe[0],Te=Xe[1],Ne=x.useState(null),xt=Object(o.a)(Ne,2),vt=xt[0],Dt=xt[1];function Ht(){Lt(ae),Et(ae),Te([]),Dt(null),Ot()}x.useEffect(function(){Me(fe);var Gt=L(Se,fe);if(Gt.key!==null)if(Gt.add){var gn=mt.findIndex(function(Ua){var Ya=Ua.data.key;return Ya===Gt.key}),Tn=v(b(mt,ae,Gt.key),wt,$e,bt),Gr=mt.slice();Gr.splice(gn+1,0,h),Et(Gr),Te(Tn),Dt("show")}else{var Vr=ae.findIndex(function(Ua){var Ya=Ua.data.key;return Ya===Gt.key}),Kr=v(b(ae,mt,Gt.key),wt,$e,bt),kn=ae.slice();kn.splice(Vr+1,0,h),Et(kn),Te(Kr),Dt("hide")}else mt!==ae&&(Lt(ae),Et(ae))},[fe,ae]),x.useEffect(function(){et||Ht()},[et]);var ct=Ze?Ct:ae,Mt={expandedKeys:fe,selectedKeys:se,loadedKeys:re,loadingKeys:pe,checkedKeys:me,halfCheckedKeys:De,dragOverNodeKey:Le,dropPosition:We,keyEntities:we};return x.createElement(x.Fragment,null,Ft&&ft&&x.createElement("span",{style:g,"aria-live":"assertive"},N(ft)),x.createElement("div",{role:"tree"},x.createElement("input",{style:g,disabled:It===!1||je,tabIndex:It!==!1?zt:null,onKeyDown:Qe,onFocus:ze,onBlur:yt,value:"",onChange:i})),x.createElement(A.a,Object.assign({},Ye,{data:ct,itemKey:P,height:$e,fullHeight:!1,virtual:wt,itemHeight:bt,prefixCls:"".concat(ce,"-list"),ref:Ue}),function(Gt){var gn=Gt.pos,Tn=Gt.data,Gr=Tn.key,Vr=Object(d.a)(Tn,["key"]),Kr=Gt.isStart,kn=Gt.isEnd,Ua=Object(a.e)(Gr,gn);delete Vr.children;var Ya=Object(a.f)(Ua,Mt);return x.createElement(w,Object.assign({},Vr,Ya,{active:ft&&Gr===ft.data.key,pos:gn,data:Gt.data,isStart:Kr,isEnd:kn,motion:Ze,motionNodes:Gr===u?Fe:null,motionType:vt,onMotionStart:at,onMotionEnd:Ht,treeNodeRequiredProps:Mt,onMouseMove:function(){St(null)}}))}))},G=x.forwardRef(Q);G.displayName="NodeList";var F=G,D=C("NvD2"),z=function(te){Object(B.a)(he,te);var Ae=Object(M.a)(he);function he(){var ce;return Object(k.a)(this,he),ce=Ae.apply(this,arguments),ce.destroyed=!1,ce.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ce.listRef=x.createRef(),ce.onNodeDragStart=function(ae,ve){var ue=ce.state,fe=ue.expandedKeys,se=ue.keyEntities,me=ce.props.onDragStart,re=ve.props.eventKey;ce.dragNode=ve;var pe=Object(s.b)(fe,re);ce.setState({dragging:!0,dragNodesKeys:Object(s.g)(re,se)}),ce.setExpandedKeys(pe),me&&me({event:ae,node:Object(a.b)(ve.props)})},ce.onNodeDragEnter=function(ae,ve){var ue=ce.state,fe=ue.expandedKeys,se=ue.keyEntities,me=ue.dragNodesKeys,re=ce.props.onDragEnter,pe=ve.props,De=pe.pos,we=pe.eventKey;if(!ce.dragNode||me.indexOf(we)!==-1)return;var je=Object(s.c)(ae,ve);if(ce.dragNode.props.eventKey===we&&je===0){ce.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ce.setState({dragOverNodeKey:we,dropPosition:je}),ce.delayedDragEnterLogic||(ce.delayedDragEnterLogic={}),Object.keys(ce.delayedDragEnterLogic).forEach(function(et){clearTimeout(ce.delayedDragEnterLogic[et])}),ce.delayedDragEnterLogic[De]=window.setTimeout(function(){if(!ce.state.dragging)return;var et=Object(I.a)(fe),Le=se[we];Le&&(Le.children||[]).length&&(et=Object(s.a)(fe,we)),"expandedKeys"in ce.props||ce.setExpandedKeys(et),re&&re({event:ae,node:Object(a.b)(ve.props),expandedKeys:et})},400)},0)},ce.onNodeDragOver=function(ae,ve){var ue=ce.state.dragNodesKeys,fe=ce.props.onDragOver,se=ve.props.eventKey;if(ue.indexOf(se)!==-1)return;if(ce.dragNode&&se===ce.state.dragOverNodeKey){var me=Object(s.c)(ae,ve);if(me===ce.state.dropPosition)return;ce.setState({dropPosition:me})}fe&&fe({event:ae,node:Object(a.b)(ve.props)})},ce.onNodeDragLeave=function(ae,ve){var ue=ce.props.onDragLeave;ce.setState({dragOverNodeKey:""}),ue&&ue({event:ae,node:Object(a.b)(ve.props)})},ce.onNodeDragEnd=function(ae,ve){var ue=ce.props.onDragEnd;ce.setState({dragOverNodeKey:""}),ce.cleanDragState(),ue&&ue({event:ae,node:Object(a.b)(ve.props)}),ce.dragNode=null},ce.onNodeDrop=function(ae,ve){var ue=ce.state,fe=ue.dragNodesKeys,se=fe===void 0?[]:fe,me=ue.dropPosition,re=ce.props.onDrop,pe=ve.props,De=pe.eventKey,we=pe.pos;if(ce.setState({dragOverNodeKey:""}),ce.cleanDragState(),se.indexOf(De)!==-1){Object(p.a)(!1,"Can not drop to dragNode(include it's children node)");return}var je=Object(s.k)(we),et={event:ae,node:Object(a.b)(ve.props),dragNode:ce.dragNode?Object(a.b)(ce.dragNode.props):null,dragNodesKeys:se.slice(),dropPosition:me+Number(je[je.length-1]),dropToGap:!1};me!==0&&(et.dropToGap=!0),re&&re(et),ce.dragNode=null},ce.cleanDragState=function(){var ae=ce.state.dragging;ae&&ce.setState({dragging:!1})},ce.onNodeClick=function(ae,ve){var ue=ce.props.onClick;ue&&ue(ae,ve)},ce.onNodeDoubleClick=function(ae,ve){var ue=ce.props.onDoubleClick;ue&&ue(ae,ve)},ce.onNodeSelect=function(ae,ve){var ue=ce.state.selectedKeys,fe=ce.state.keyEntities,se=ce.props,me=se.onSelect,re=se.multiple,pe=ve.selected,De=ve.key,we=!pe;we?re?ue=Object(s.a)(ue,De):ue=[De]:ue=Object(s.b)(ue,De);var je=ue.map(function(et){var Le=fe[et];return Le?Le.node:null}).filter(function(et){return et});ce.setUncontrolledState({selectedKeys:ue}),me&&me(ue,{event:"select",selected:we,node:ve,selectedNodes:je,nativeEvent:ae.nativeEvent})},ce.onNodeCheck=function(ae,ve,ue){var fe=ce.state,se=fe.keyEntities,me=fe.checkedKeys,re=fe.halfCheckedKeys,pe=ce.props,De=pe.checkStrictly,we=pe.onCheck,je=ve.key,et,Le={event:"check",node:ve,checked:ue,nativeEvent:ae.nativeEvent};if(De){var We=ue?Object(s.a)(me,je):Object(s.b)(me,je),Ze=Object(s.b)(re,je);et={checked:We,halfChecked:Ze},Le.checkedNodes=We.map(function(Ft){return se[Ft]}).filter(function(Ft){return Ft}).map(function(Ft){return Ft.node}),ce.setUncontrolledState({checkedKeys:We})}else{var $e=Object(D.a)([].concat(Object(I.a)(me),[je]),!0,se),bt=$e.checkedKeys,wt=$e.halfCheckedKeys;if(!ue){var It=new Set(bt);It.delete(je);var ft=Object(D.a)(Array.from(It),{checked:!1,halfCheckedKeys:wt},se);bt=ft.checkedKeys,wt=ft.halfCheckedKeys}et=bt,Le.checkedNodes=[],Le.checkedNodesPositions=[],Le.halfCheckedKeys=wt,bt.forEach(function(Ft){var zt=se[Ft];if(!zt)return;var Qe=zt.node,ze=zt.pos;Le.checkedNodes.push(Qe),Le.checkedNodesPositions.push({node:Qe,pos:ze})}),ce.setUncontrolledState({checkedKeys:bt},!1,{halfCheckedKeys:wt})}we&&we(et,Le)},ce.onNodeLoad=function(ae){return new Promise(function(ve){ce.setState(function(ue){var fe=ue.loadedKeys,se=fe===void 0?[]:fe,me=ue.loadingKeys,re=me===void 0?[]:me,pe=ce.props,De=pe.loadData,we=pe.onLoad,je=ae.key;if(!De||se.indexOf(je)!==-1||re.indexOf(je)!==-1)return{};var et=De(ae);return et.then(function(){var Le=ce.state,We=Le.loadedKeys,Ze=Le.loadingKeys,$e=Object(s.a)(We,je),bt=Object(s.b)(Ze,je);we&&we($e,{event:"load",node:ae}),ce.setUncontrolledState({loadedKeys:$e}),ce.setState({loadingKeys:bt}),ve()}),{loadingKeys:Object(s.a)(re,je)}})})},ce.onNodeMouseEnter=function(ae,ve){var ue=ce.props.onMouseEnter;ue&&ue({event:ae,node:ve})},ce.onNodeMouseLeave=function(ae,ve){var ue=ce.props.onMouseLeave;ue&&ue({event:ae,node:ve})},ce.onNodeContextMenu=function(ae,ve){var ue=ce.props.onRightClick;ue&&(ae.preventDefault(),ue({event:ae,node:ve}))},ce.onFocus=function(){var ae=ce.props.onFocus;ce.setState({focused:!0}),ae&&ae.apply(void 0,arguments)},ce.onBlur=function(){var ae=ce.props.onBlur;ce.setState({focused:!1}),ce.onActiveChange(null),ae&&ae.apply(void 0,arguments)},ce.getTreeNodeRequiredProps=function(){var ae=ce.state,ve=ae.expandedKeys,ue=ae.selectedKeys,fe=ae.loadedKeys,se=ae.loadingKeys,me=ae.checkedKeys,re=ae.halfCheckedKeys,pe=ae.dragOverNodeKey,De=ae.dropPosition,we=ae.keyEntities;return{expandedKeys:ve||[],selectedKeys:ue||[],loadedKeys:fe||[],loadingKeys:se||[],checkedKeys:me||[],halfCheckedKeys:re||[],dragOverNodeKey:pe,dropPosition:De,keyEntities:we}},ce.setExpandedKeys=function(ae){var ve=ce.state.treeData,ue=Object(a.d)(ve,ae);ce.setUncontrolledState({expandedKeys:ae,flattenNodes:ue},!0)},ce.onNodeExpand=function(ae,ve){var ue=ce.state.expandedKeys,fe=ce.state.listChanging,se=ce.props,me=se.onExpand,re=se.loadData,pe=ve.key,De=ve.expanded;if(fe)return;var we=ue.indexOf(pe),je=!De;if(Object(p.a)(De&&we!==-1||!De&&we===-1,"Expand state not sync with index check"),je?ue=Object(s.a)(ue,pe):ue=Object(s.b)(ue,pe),ce.setExpandedKeys(ue),me&&me(ue,{node:ve,expanded:je,nativeEvent:ae.nativeEvent}),je&&re){var et=ce.onNodeLoad(ve);et&&et.then(function(){var Le=Object(a.d)(ce.state.treeData,ue);ce.setUncontrolledState({flattenNodes:Le})})}},ce.onListChangeStart=function(){ce.setUncontrolledState({listChanging:!0})},ce.onListChangeEnd=function(){setTimeout(function(){ce.setUncontrolledState({listChanging:!1})})},ce.onActiveChange=function(ae){var ve=ce.state.activeKey,ue=ce.props.onActiveChange;if(ve===ae)return;ce.setState({activeKey:ae}),ae!==null&&ce.scrollTo({key:ae}),ue&&ue(ae)},ce.getActiveItem=function(){var ae=ce.state,ve=ae.activeKey,ue=ae.flattenNodes;return ve===null?null:ue.find(function(fe){var se=fe.data.key;return se===ve})||null},ce.offsetActiveKey=function(ae){var ve=ce.state,ue=ve.flattenNodes,fe=ve.activeKey,se=ue.findIndex(function(pe){var De=pe.data.key;return De===fe});se===-1&&ae<0&&(se=ue.length),se=(se+ae+ue.length)%ue.length;var me=ue[se];if(me){var re=me.data.key;ce.onActiveChange(re)}else ce.onActiveChange(null)},ce.onKeyDown=function(ae){var ve=ce.state,ue=ve.activeKey,fe=ve.expandedKeys,se=ve.checkedKeys,me=ce.props,re=me.onKeyDown,pe=me.checkable,De=me.selectable;switch(ae.which){case T.a.UP:{ce.offsetActiveKey(-1),ae.preventDefault();break}case T.a.DOWN:{ce.offsetActiveKey(1),ae.preventDefault();break}}var we=ce.getActiveItem();if(we&&we.data){var je=ce.getTreeNodeRequiredProps(),et=we.data.isLeaf===!1||!!(we.data.children||[]).length,Le=Object(a.b)(Object(K.a)(Object(K.a)({},Object(a.f)(ue,je)),{},{data:we.data,active:!0}));switch(ae.which){case T.a.LEFT:{et&&fe.includes(ue)?ce.onNodeExpand({},Le):we.parent&&ce.onActiveChange(we.parent.data.key),ae.preventDefault();break}case T.a.RIGHT:{et&&!fe.includes(ue)?ce.onNodeExpand({},Le):we.children&&we.children.length&&ce.onActiveChange(we.children[0].data.key),ae.preventDefault();break}case T.a.ENTER:case T.a.SPACE:{pe&&!Le.disabled&&Le.checkable!==!1&&!Le.disableCheckbox?ce.onNodeCheck({},Le,!se.includes(ue)):!pe&&De&&!Le.disabled&&Le.selectable!==!1&&ce.onNodeSelect({},Le);break}}}re&&re(ae)},ce.setUncontrolledState=function(ae){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ce.destroyed)return;var fe=!1,se=!0,me={};Object.keys(ae).forEach(function(re){if(re in ce.props){se=!1;return}fe=!0,me[re]=ae[re]}),fe&&(!ve||se)&&ce.setState(Object(K.a)(Object(K.a)({},me),ue))},ce.scrollTo=function(ae){ce.listRef.current.scrollTo(ae)},ce}return Object(E.a)(he,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var ae,ve=this.state,ue=ve.focused,fe=ve.flattenNodes,se=ve.keyEntities,me=ve.dragging,re=ve.activeKey,pe=this.props,De=pe.prefixCls,we=pe.className,je=pe.style,et=pe.showLine,Le=pe.focusable,We=pe.tabIndex,Ze=We===void 0?0:We,$e=pe.selectable,bt=pe.showIcon,wt=pe.icon,It=pe.switcherIcon,ft=pe.draggable,Ft=pe.checkable,zt=pe.checkStrictly,Qe=pe.disabled,ze=pe.motion,yt=pe.loadData,St=pe.filterTreeNode,at=pe.height,Ot=pe.itemHeight,Ye=pe.virtual,Ue=pe.titleRender,ke=pe.onContextMenu,Ce=Object(s.f)(this.props);return x.createElement(c.a.Provider,{value:{prefixCls:De,selectable:$e,showIcon:bt,icon:wt,switcherIcon:It,draggable:ft,checkable:Ft,checkStrictly:zt,disabled:Qe,keyEntities:se,loadData:yt,filterTreeNode:St,titleRender:Ue,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},x.createElement("div",{className:t()(De,we,(ae={},Object(q.a)(ae,"".concat(De,"-show-line"),et),Object(q.a)(ae,"".concat(De,"-focused"),ue),Object(q.a)(ae,"".concat(De,"-active-focused"),re!==null),ae))},x.createElement(F,Object.assign({ref:this.listRef,prefixCls:De,style:je,data:fe,disabled:Qe,selectable:$e,checkable:!!Ft,motion:ze,dragging:me,height:at,itemHeight:Ot,virtual:Ye,focusable:Le,focused:ue,tabIndex:Ze,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ke},this.getTreeNodeRequiredProps(),Ce))))}}],[{key:"getDerivedStateFromProps",value:function(ae,ve){var ue=ve.prevProps,fe={prevProps:ae};function se(wt){return!ue&&wt in ae||ue&&ue[wt]!==ae[wt]}var me;if(se("treeData")?me=ae.treeData:se("children")&&(Object(p.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),me=Object(a.c)(ae.children)),me){fe.treeData=me;var re=Object(a.a)(me);fe.keyEntities=Object(K.a)(Object(q.a)({},u,y),re.keyEntities)}var pe=fe.keyEntities||ve.keyEntities;if(se("expandedKeys")||ue&&se("autoExpandParent"))fe.expandedKeys=ae.autoExpandParent||!ue&&ae.defaultExpandParent?Object(s.e)(ae.expandedKeys,pe):ae.expandedKeys;else if(!ue&&ae.defaultExpandAll){var De=Object(K.a)({},pe);delete De[u],fe.expandedKeys=Object.keys(De).map(function(wt){return De[wt].key})}else!ue&&ae.defaultExpandedKeys&&(fe.expandedKeys=ae.autoExpandParent||ae.defaultExpandParent?Object(s.e)(ae.defaultExpandedKeys,pe):ae.defaultExpandedKeys);if(fe.expandedKeys||delete fe.expandedKeys,me||fe.expandedKeys){var we=Object(a.d)(me||ve.treeData,fe.expandedKeys||ve.expandedKeys);fe.flattenNodes=we}if(ae.selectable&&(se("selectedKeys")?fe.selectedKeys=Object(s.d)(ae.selectedKeys,ae):!ue&&ae.defaultSelectedKeys&&(fe.selectedKeys=Object(s.d)(ae.defaultSelectedKeys,ae))),ae.checkable){var je;if(se("checkedKeys")?je=Object(s.j)(ae.checkedKeys)||{}:!ue&&ae.defaultCheckedKeys?je=Object(s.j)(ae.defaultCheckedKeys)||{}:me&&(je=Object(s.j)(ae.checkedKeys)||{checkedKeys:ve.checkedKeys,halfCheckedKeys:ve.halfCheckedKeys}),je){var et=je,Le=et.checkedKeys,We=Le===void 0?[]:Le,Ze=et.halfCheckedKeys,$e=Ze===void 0?[]:Ze;if(!ae.checkStrictly){var bt=Object(D.a)(We,!0,pe);We=bt.checkedKeys,$e=bt.halfCheckedKeys}fe.checkedKeys=We,fe.halfCheckedKeys=$e}}return se("loadedKeys")&&(fe.loadedKeys=ae.loadedKeys),fe}}]),he}(x.Component);z.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},z.TreeNode=m.a;var j=z,Z=oe.b=j},fW2E:function(Ie,oe){var C={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function q(K,I,k){return C.hasOwnProperty(I)?k*=K.dpr:k}Ie.exports=q},fXAG:function(Ie,oe,C){"use strict";C.d(oe,"j",function(){return q}),C.d(oe,"i",function(){return K}),C.d(oe,"k",function(){return I}),C.d(oe,"eb",function(){return k}),C.d(oe,"o",function(){return E}),C.d(oe,"S",function(){return B}),C.d(oe,"fb",function(){return M}),C.d(oe,"u",function(){return x}),C.d(oe,"v",function(){return T}),C.d(oe,"cb",function(){return p}),C.d(oe,"A",function(){return r}),C.d(oe,"m",function(){return t}),C.d(oe,"Y",function(){return c}),C.d(oe,"s",function(){return s}),C.d(oe,"N",function(){return a}),C.d(oe,"bb",function(){return o}),C.d(oe,"db",function(){return d}),C.d(oe,"l",function(){return A}),C.d(oe,"Q",function(){return l}),C.d(oe,"ab",function(){return m}),C.d(oe,"x",function(){return _}),C.d(oe,"z",function(){return R}),C.d(oe,"X",function(){return w}),C.d(oe,"b",function(){return L}),C.d(oe,"H",function(){return b}),C.d(oe,"a",function(){return g}),C.d(oe,"c",function(){return u}),C.d(oe,"P",function(){return f}),C.d(oe,"g",function(){return y}),C.d(oe,"t",function(){return h}),C.d(oe,"Z",function(){return v}),C.d(oe,"y",function(){return P}),C.d(oe,"B",function(){return N}),C.d(oe,"f",function(){return Q}),C.d(oe,"e",function(){return G}),C.d(oe,"W",function(){return F}),C.d(oe,"h",function(){return D}),C.d(oe,"d",function(){return z}),C.d(oe,"R",function(){return Z}),C.d(oe,"n",function(){return te}),C.d(oe,"F",function(){return Ae}),C.d(oe,"I",function(){return he}),C.d(oe,"D",function(){return ce}),C.d(oe,"E",function(){return ae}),C.d(oe,"C",function(){return ve}),C.d(oe,"G",function(){return ue}),C.d(oe,"U",function(){return fe}),C.d(oe,"q",function(){return se}),C.d(oe,"r",function(){return me}),C.d(oe,"V",function(){return re}),C.d(oe,"T",function(){return pe}),C.d(oe,"p",function(){return De}),C.d(oe,"M",function(){return we}),C.d(oe,"L",function(){return je}),C.d(oe,"J",function(){return et}),C.d(oe,"K",function(){return Le}),C.d(oe,"O",function(){return We}),C.d(oe,"w",function(){return Ze});var q="FETCH_TASK_START",K="FETCH_TASK_FAILURE",I="FETCH_TASK_SUCCESS",k="UPDATE_TASK_DATA",E="HIDE_EVALUATE_RESULT",B="SHOW_EVALUATE_RESULT",M="UPDATE_TIMESTRAP",x="MOVE_X",T="MOVE_Y",p="TRIGGER_RIGHT_PANEL_MASK ",r="SET_ACTIVE_INDEX",t="GET_TASK_LIST",c="SHOW_TASK_LIST",s="HIDE_TASK_LIST",a="SET_TASK_STAR",o="TRIGGER_ENLARGE_UNITY3D ",d="TRIGGER_TAB_FIXED ",A="GET_DISCUSSES",l="SHOW_DISCUSSES_LOADING",m="TOP_OR_DOWN_DISCUSS",_="PLUS_DISCUSS",R="SET_ACTION_TYPE",w="SHOW_REWARD_DIALOG",L="CANCEL_REWARD_DIALOG",b="SET_REWARD",g="ACTIVE_DISCUSS_INDEX",i="CREATE_DISCUSS",u="DISABLE_DISCUSS",f="SHOW_ANSWER_LOADING",y="FETCH_ANSWER_INFO",h="HIGH_TIP_MODAL",v="SHOW_TIP_MODAL",P="SELECT_UNLOCK_ANSWER",N="SET_CHOOSE_ANSWERS",Q="EVAL_CHOOSE_START",G="EVAL_CHOOSE_END",F="SHOW_REP_loading",D="FETCH_REP_CONTENT",z="EDIT_REP_CONTENT",j="SET_REP_PATH",Z="SHOW_EVALUATE_LOADING",te="HIDE_EVALUATE_LOADING",Ae="SET_EVALUATE_MESSAGE",he="SET_SHOW_DIR",ce="SET_EDITOR_SETTING",ae="SET_EDITOR_THEME",ve="SET_EDITOR_FONTSIZE",ue="SET_REPOS",fe="SHOW_PATH_LIST",se="HIDE_PATH_LIST",me="HIDE_PICTURE_VIEW",re="SHOW_PICTURE_VIEW",pe="SHOW_NOTICE",De="HIDE_NOTICE",we="SET_TAB_INDEX",je="SET_SSH_TABS",et="SET_SSH_CONFIGDATA",Le="SET_SSH_CONFIGDATAARR",We="SET_VNC_LOADING ",Ze="ON_TAB_TO_SPACE "},fcSX:function(Ie,oe,C){"use strict";var q=C("Ff2n"),K=C("1OyB"),I=C("vuIU"),k=C("Ji7U"),E=C("md7G"),B=C("foSv"),M=C("1W/9"),x=C("q1tI"),T=C("rePB"),p=C("JX7q"),r=C("TSYQ"),t=C.n(r),c=C("qx4F"),s=C("4IlW");function a(Q){return Array.isArray(Q)?Q:[Q]}var o={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(o).filter(function(Q){if(typeof document=="undefined")return!1;var G=document.getElementsByTagName("html")[0];return Q in(G?G.style:{})})[0],A=o[d];function l(Q,G,F,D){Q.addEventListener?Q.addEventListener(G,F,D):Q.attachEvent&&Q.attachEvent("on".concat(G),F)}function m(Q,G,F,D){Q.removeEventListener?Q.removeEventListener(G,F,D):Q.attachEvent&&Q.detachEvent("on".concat(G),F)}function _(Q,G){var F=typeof Q=="function"?Q(G):Q;return Array.isArray(F)?F.length===2?F:[F[0],F[1]]:[F]}var R=function(G){return!isNaN(parseFloat(G))&&isFinite(G)},w=!(typeof window!="undefined"&&window.document&&window.document.createElement),L=function Q(G,F,D,z){if(!F||F===document||F instanceof Document)return!1;if(F===G.parentNode)return!0;var j=Math.max(Math.abs(D),Math.abs(z))===Math.abs(z),Z=Math.max(Math.abs(D),Math.abs(z))===Math.abs(D),te=F.scrollHeight-F.clientHeight,Ae=F.scrollWidth-F.clientWidth,he=document.defaultView.getComputedStyle(F),ce=he.overflowY==="auto"||he.overflowY==="scroll",ae=he.overflowX==="auto"||he.overflowX==="scroll",ve=te&&ce,ue=Ae&&ae;return j&&(!ve||ve&&(F.scrollTop>=te&&z<0||F.scrollTop<=0&&z>0))||Z&&(!ue||ue&&(F.scrollLeft>=Ae&&D<0||F.scrollLeft<=0&&D>0))?Q(G,F.parentNode,D,z):!1};function b(Q){var G=g();return function(){var D=Object(B.a)(Q),z;if(G){var j=Object(B.a)(this).constructor;z=Reflect.construct(D,arguments,j)}else z=D.apply(this,arguments);return Object(E.a)(this,z)}}function g(){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(Q){return!1}}var i={},u=function(Q){Object(k.a)(F,Q);var G=b(F);function F(D){var z;return Object(K.a)(this,F),z=G.call(this,D),z.domFocus=function(){z.dom&&z.dom.focus()},z.removeStartHandler=function(j){if(j.touches.length>1)return;z.startPos={x:j.touches[0].clientX,y:j.touches[0].clientY}},z.removeMoveHandler=function(j){if(j.changedTouches.length>1)return;var Z=j.currentTarget,te=j.changedTouches[0].clientX-z.startPos.x,Ae=j.changedTouches[0].clientY-z.startPos.y;(Z===z.maskDom||Z===z.handlerDom||Z===z.contentDom&&L(Z,j.target,te,Ae))&&j.cancelable&&j.preventDefault()},z.transitionEnd=function(j){var Z=j.target;m(Z,A,z.transitionEnd),Z.style.transition=""},z.onKeyDown=function(j){if(j.keyCode===s.a.ESC){var Z=z.props.onClose;j.stopPropagation(),Z&&Z(j)}},z.onWrapperTransitionEnd=function(j){var Z=z.props,te=Z.open,Ae=Z.afterVisibleChange;j.target===z.contentWrapper&&j.propertyName.match(/transform$/)&&(z.dom.style.transition="",!te&&z.getCurrentDrawerSome()&&(document.body.style.overflowX="",z.maskDom&&(z.maskDom.style.left="",z.maskDom.style.width="")),Ae&&Ae(!!te))},z.openLevelTransition=function(){var j=z.props,Z=j.open,te=j.width,Ae=j.height,he=z.getHorizontalBoolAndPlacementName(),ce=he.isHorizontal,ae=he.placementName,ve=z.contentDom?z.contentDom.getBoundingClientRect()[ce?"width":"height"]:0,ue=(ce?te:Ae)||ve;z.setLevelAndScrolling(Z,ae,ue)},z.setLevelTransform=function(j,Z,te,Ae){var he=z.props,ce=he.placement,ae=he.levelMove,ve=he.duration,ue=he.ease,fe=he.showMask;z.levelDom.forEach(function(se){se.style.transition="transform ".concat(ve," ").concat(ue),l(se,A,z.transitionEnd);var me=j?te:0;if(ae){var re=_(ae,{target:se,open:j});me=j?re[0]:re[1]||0}var pe=typeof me=="number"?"".concat(me,"px"):me,De=ce==="left"||ce==="top"?pe:"-".concat(pe);De=fe&&ce==="right"&&Ae?"calc(".concat(De," + ").concat(Ae,"px)"):De,se.style.transform=me?"".concat(Z,"(").concat(De,")"):""})},z.setLevelAndScrolling=function(j,Z,te){var Ae=z.props.onChange;if(!w){var he=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(c.a)(!0):0;z.setLevelTransform(j,Z,te,he),z.toggleScrollingToDrawerAndBody(he)}Ae&&Ae(j)},z.toggleScrollingToDrawerAndBody=function(j){var Z=z.props,te=Z.getOpenCount,Ae=Z.getContainer,he=Z.showMask,ce=Z.open,ae=Ae&&Ae(),ve=te&&te();if(ae&&ae.parentNode===document.body&&he){var ue=["touchstart"],fe=[document.body,z.maskDom,z.handlerDom,z.contentDom];ce&&document.body.style.overflow!=="hidden"?(j&&z.addScrollingEffect(j),ve===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",fe.forEach(function(se,me){if(!se)return;l(se,ue[me]||"touchmove",me?z.removeMoveHandler:z.removeStartHandler,z.passive)})):z.getCurrentDrawerSome()&&(ve||(document.body.style.overflow=""),document.body.style.touchAction="",j&&z.remScrollingEffect(j),fe.forEach(function(se,me){if(!se)return;m(se,ue[me]||"touchmove",me?z.removeMoveHandler:z.removeStartHandler,z.passive)}))}},z.addScrollingEffect=function(j){var Z=z.props,te=Z.placement,Ae=Z.duration,he=Z.ease,ce=Z.getOpenCount,ae=Z.switchScrollingEffect,ve=ce&&ce();ve===1&&ae();var ue="width ".concat(Ae," ").concat(he),fe="transform ".concat(Ae," ").concat(he);z.dom.style.transition="none";switch(te){case"right":z.dom.style.transform="translateX(-".concat(j,"px)");break;case"top":case"bottom":z.dom.style.width="calc(100% - ".concat(j,"px)"),z.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(z.timeout),z.timeout=setTimeout(function(){z.dom&&(z.dom.style.transition="".concat(fe,",").concat(ue),z.dom.style.width="",z.dom.style.transform="")})},z.remScrollingEffect=function(j){var Z=z.props,te=Z.placement,Ae=Z.duration,he=Z.ease,ce=Z.getOpenCount,ae=Z.switchScrollingEffect,ve=ce&&ce();ve||ae(!0),d&&(document.body.style.overflowX="hidden"),z.dom.style.transition="none";var ue,fe="width ".concat(Ae," ").concat(he),se="transform ".concat(Ae," ").concat(he);switch(te){case"left":{z.dom.style.width="100%",fe="width 0s ".concat(he," ").concat(Ae);break}case"right":{z.dom.style.transform="translateX(".concat(j,"px)"),z.dom.style.width="100%",fe="width 0s ".concat(he," ").concat(Ae),z.maskDom&&(z.maskDom.style.left="-".concat(j,"px"),z.maskDom.style.width="calc(100% + ".concat(j,"px)"));break}case"top":case"bottom":{z.dom.style.width="calc(100% + ".concat(j,"px)"),z.dom.style.height="100%",z.dom.style.transform="translateZ(0)",ue="height 0s ".concat(he," ").concat(Ae);break}default:break}clearTimeout(z.timeout),z.timeout=setTimeout(function(){z.dom&&(z.dom.style.transition="".concat(se,",").concat(ue?"".concat(ue,","):"").concat(fe),z.dom.style.transform="",z.dom.style.width="",z.dom.style.height="")})},z.getCurrentDrawerSome=function(){return!Object.keys(i).some(function(j){return i[j]})},z.getLevelDom=function(j){var Z=j.level,te=j.getContainer;if(w)return;var Ae=te&&te(),he=Ae?Ae.parentNode:null;if(z.levelDom=[],Z==="all"){var ce=he?Array.prototype.slice.call(he.children):[];ce.forEach(function(ae){ae.nodeName!=="SCRIPT"&&ae.nodeName!=="STYLE"&&ae.nodeName!=="LINK"&&ae!==Ae&&z.levelDom.push(ae)})}else Z&&a(Z).forEach(function(ae){document.querySelectorAll(ae).forEach(function(ve){z.levelDom.push(ve)})})},z.getHorizontalBoolAndPlacementName=function(){var j=z.props.placement,Z=j==="left"||j==="right",te="translate".concat(Z?"X":"Y");return{isHorizontal:Z,placementName:te}},z.state={_self:Object(p.a)(z)},z}return Object(I.a)(F,[{key:"componentDidMount",value:function(){var z=this;if(!w){var j=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return j=!0,null}}))}catch(ce){}this.passive=j?{passive:!1}:!1}var Z=this.props,te=Z.open,Ae=Z.getContainer,he=Ae&&Ae();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),te&&(he&&he.parentNode===document.body&&(i[this.drawerId]=te),this.openLevelTransition(),this.forceUpdate(function(){z.domFocus()}))}},{key:"componentDidUpdate",value:function(z){var j=this.props,Z=j.open,te=j.getContainer,Ae=te&&te();Z!==z.open&&(Z&&this.domFocus(),Ae&&Ae.parentNode===document.body&&(i[this.drawerId]=!!Z),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var z=this.props,j=z.getOpenCount,Z=z.open,te=z.switchScrollingEffect,Ae=typeof j=="function"&&j();delete i[this.drawerId],Z&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Ae||(document.body.style.overflow="",te(!0))}},{key:"render",value:function(){var z,j=this,Z=this.props,te=Z.className,Ae=Z.children,he=Z.style,ce=Z.width,ae=Z.height,ve=Z.defaultOpen,ue=Z.open,fe=Z.prefixCls,se=Z.placement,me=Z.level,re=Z.levelMove,pe=Z.ease,De=Z.duration,we=Z.getContainer,je=Z.handler,et=Z.onChange,Le=Z.afterVisibleChange,We=Z.showMask,Ze=Z.maskClosable,$e=Z.maskStyle,bt=Z.onClose,wt=Z.onHandleClick,It=Z.keyboard,ft=Z.getOpenCount,Ft=Z.switchScrollingEffect,zt=Object(q.a)(Z,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Qe=this.dom?ue:!1,ze=t()(fe,(z={},Object(T.a)(z,"".concat(fe,"-").concat(se),!0),Object(T.a)(z,"".concat(fe,"-open"),Qe),Object(T.a)(z,te||"",!!te),Object(T.a)(z,"no-mask",!We),z)),yt=this.getHorizontalBoolAndPlacementName(),St=yt.placementName,at=se==="left"||se==="top"?"-100%":"100%",Ot=Qe?"":"".concat(St,"(").concat(at,")"),Ye=je&&x.cloneElement(je,{onClick:function(ke){je.props.onClick&&je.props.onClick(),wt&&wt(ke)},ref:function(ke){j.handlerDom=ke}});return x.createElement("div",Object.assign({},zt,{tabIndex:-1,className:ze,style:he,ref:function(ke){j.dom=ke},onKeyDown:Qe&&It?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),We&&x.createElement("div",{className:"".concat(fe,"-mask"),onClick:Ze?bt:void 0,style:$e,ref:function(ke){j.maskDom=ke}}),x.createElement("div",{className:"".concat(fe,"-content-wrapper"),style:{transform:Ot,msTransform:Ot,width:R(ce)?"".concat(ce,"px"):ce,height:R(ae)?"".concat(ae,"px"):ae},ref:function(ke){j.contentWrapper=ke}},x.createElement("div",{className:"".concat(fe,"-content"),ref:function(ke){j.contentDom=ke},onTouchStart:Qe&&We?this.removeStartHandler:void 0,onTouchMove:Qe&&We?this.removeMoveHandler:void 0},Ae),Ye))}}],[{key:"getDerivedStateFromProps",value:function(z,j){var Z=j.prevProps,te=j._self,Ae={prevProps:z};if(Z!==void 0){var he=z.placement,ce=z.level;he!==Z.placement&&(te.contentDom=null),ce!==Z.level&&te.getLevelDom(z)}return Ae}}]),F}(x.Component);u.defaultProps={switchScrollingEffect:function(){}};var f=u;function y(Q){var G=h();return function(){var D=Object(B.a)(Q),z;if(G){var j=Object(B.a)(this).constructor;z=Reflect.construct(D,arguments,j)}else z=D.apply(this,arguments);return Object(E.a)(this,z)}}function h(){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(Q){return!1}}var v=function(Q){Object(k.a)(F,Q);var G=y(F);function F(D){var z;Object(K.a)(this,F),z=G.call(this,D),z.onHandleClick=function(Z){var te=z.props,Ae=te.onHandleClick,he=te.open;if(Ae&&Ae(Z),typeof he=="undefined"){var ce=z.state.open;z.setState({open:!ce})}},z.onClose=function(Z){var te=z.props,Ae=te.onClose,he=te.open;Ae&&Ae(Z),typeof he=="undefined"&&z.setState({open:!1})};var j=typeof D.open!="undefined"?D.open:!!D.defaultOpen;return z.state={open:j},"onMaskClick"in D&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),z}return Object(I.a)(F,[{key:"render",value:function(){var z=this,j=this.props,Z=j.defaultOpen,te=j.getContainer,Ae=j.wrapperClassName,he=j.forceRender,ce=j.handler,ae=Object(q.a)(j,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ve=this.state.open;if(!te)return x.createElement("div",{className:Ae,ref:function(se){z.dom=se}},x.createElement(f,Object.assign({},ae,{open:ve,handler:ce,getContainer:function(){return z.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ue=!!ce||he;return x.createElement(M.a,{visible:ve,forceRender:ue,getContainer:te,wrapperClassName:Ae},function(fe){var se=fe.visible,me=fe.afterClose,re=Object(q.a)(fe,["visible","afterClose"]);return x.createElement(f,Object.assign({},ae,re,{open:se!==void 0?se:ve,afterVisibleChange:me!==void 0?me:ae.afterVisibleChange,handler:ce,onClose:z.onClose,onHandleClick:z.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(z,j){var Z=j.prevProps,te={prevProps:z};return typeof Z!="undefined"&&z.open!==Z.open&&(te.open=z.open),te}}]),F}(x.Component);v.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:x.createElement("div",{className:"drawer-handle"},x.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var P=v,N=oe.a=P},fyJ8:function(Ie,oe,C){"use strict";var q=C("rePB"),K=C("VTBJ"),I=C("Ff2n"),k=C("U8pU"),E=C("q1tI"),B=C.n(E),M=C("TSYQ"),x=C.n(M),T=C("c+Xe"),p=C("sR1s");function r(o){return o&&Object(k.a)(o)==="object"&&!Array.isArray(o)&&!E.isValidElement(o)}function t(o){return typeof o=="string"?!0:Object(T.c)(o)}function c(o,d){var A,l=o.prefixCls,m=o.className,_=o.record,R=o.index,w=o.dataIndex,L=o.render,b=o.children,g=o.component,i=g===void 0?"td":g,u=o.colSpan,f=o.rowSpan,y=o.fixLeft,h=o.fixRight,v=o.firstFixLeft,P=o.lastFixLeft,N=o.firstFixRight,Q=o.lastFixRight,G=o.appendNode,F=o.additionalProps,D=F===void 0?{}:F,z=o.ellipsis,j=o.align,Z=o.rowType,te=o.isSticky,Ae="".concat(l,"-cell"),he,ce;if(b)ce=b;else{var ae=Object(p.b)(_,w);if(ce=ae,L){var ve=L(ae,_,R);r(ve)?(ce=ve.children,he=ve.props):ce=ve}}Object(k.a)(ce)==="object"&&!Array.isArray(ce)&&!E.isValidElement(ce)&&(ce=null),z&&(P||N)&&(ce=E.createElement("span",{className:"".concat(Ae,"-content")},ce));var ue=he||{},fe=ue.colSpan,se=ue.rowSpan,me=ue.style,re=ue.className,pe=Object(I.a)(ue,["colSpan","rowSpan","style","className"]),De=fe!==void 0?fe:u,we=se!==void 0?se:f;if(De===0||we===0)return null;var je={},et=typeof y=="number",Le=typeof h=="number";et&&(je.position="sticky",je.left=y),Le&&(je.position="sticky",je.right=h);var We={};j&&(We.textAlign=j);var Ze,$e=z===!0?{showTitle:!0}:z;$e&&($e.showTitle||Z==="header")&&(typeof ce=="string"||typeof ce=="number"?Ze=ce.toString():E.isValidElement(ce)&&typeof ce.props.children=="string"&&(Ze=ce.props.children));var bt=Object(K.a)(Object(K.a)(Object(K.a)({title:Ze},pe),D),{},{colSpan:De&&De!==1?De:null,rowSpan:we&&we!==1?we:null,className:x()(Ae,m,(A={},Object(q.a)(A,"".concat(Ae,"-fix-left"),et),Object(q.a)(A,"".concat(Ae,"-fix-left-first"),v),Object(q.a)(A,"".concat(Ae,"-fix-left-last"),P),Object(q.a)(A,"".concat(Ae,"-fix-right"),Le),Object(q.a)(A,"".concat(Ae,"-fix-right-first"),N),Object(q.a)(A,"".concat(Ae,"-fix-right-last"),Q),Object(q.a)(A,"".concat(Ae,"-ellipsis"),z),Object(q.a)(A,"".concat(Ae,"-with-append"),G),Object(q.a)(A,"".concat(Ae,"-fix-sticky"),(et||Le)&&te),A),D.className,re),style:Object(K.a)(Object(K.a)(Object(K.a)(Object(K.a)({},D.style),We),je),me),ref:t(i)?d:null});return E.createElement(i,Object.assign({},bt),G,ce)}var s=E.forwardRef(c);s.displayName="Cell";var a=E.memo(s,function(o,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,o.record):!1});oe.a=a},gut8:function(Ie,oe){var C={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},q=9;oe.ContextCachedBy=C,oe.WILL_BE_RESTORED=q},"h/US":function(Ie,oe,C){"use strict";var q=C("DZo9"),K=C("8z0m"),I=C("miYZ"),k=C("tsqr"),E=C("+L6B"),B=C("2/Rp"),M=C("tJVT"),x=C("q1tI"),T=C.n(x),p=C("z7Xi"),r=C("jN4g"),t=C("m3rI"),c=C("w8Aa"),s=C.n(c),a=function(d){var A=d.value,l=d.onChange,m=d.getFileProgress,_=Object(x.useState)(!1),R=Object(M.a)(_,2),w=R[0],L=R[1],b=T.a.createElement(B.a,{loading:w,icon:T.a.createElement(p.a,null)},"\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),g=function(){return T.a.createElement("div",{className:s.a.img},T.a.createElement("img",{src:t.a.API_SERVER+"/api/attachments/"+A,alt:"avatar",style:{width:288}}),T.a.createElement("div",null,T.a.createElement(r.a,{onClick:function(){return l("")},style:{fontSize:"16px",color:"red"}})))},i=function(f){if(m&&m(f),f.file.status==="uploading"){L(!0);return}if(f.file.status==="done"){var y,h,v,P;if(L(!1),f.file.status==="done"&&((y=f.file)===null||y===void 0||((h=y.response)===null||h===void 0)?void 0:h.status)===-1){var N,Q;k.b.error((N=f.file)===null||N===void 0||((Q=N.response)===null||Q===void 0)?void 0:Q.message);return}l(f==null||((v=f.file)===null||v===void 0||((P=v.response)===null||P===void 0))?void 0:P.id)}};return T.a.createElement(T.a.Fragment,null,A?g():T.a.createElement("div",null,T.a.createElement(K.a,{withCredentials:!0,name:"file",showUploadList:!1,action:"".concat(t.a.API_SERVER,"/api/attachments.json"),onChange:i,accept:"image/*"},b),T.a.createElement("div",{className:"mt20 c-light-black"},"\u8BF4\u660E\uFF1A\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528288*158\u50CF\u7D20\uFF1B"),T.a.createElement("div",{className:"c-light-black"},"\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))};oe.a=a},h78n:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return v});var q=C("q1tI"),K=C.n(q),I=C("TSYQ"),k=C.n(I),E={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},B=function(Q){var G=Q.map(function(){return Object(q.useRef)()}),F=Object(q.useRef)();return Object(q.useEffect)(function(){var D=Date.now(),z=!1;Object.keys(G).forEach(function(j){var Z=G[j].current;if(!Z)return;z=!0;var te=Z.style;te.transitionDuration=".3s, .3s, .3s, .06s",F.current&&D-F.current<100&&(te.transitionDuration="0s, 0s")}),z&&(F.current=Date.now())}),[G]};function M(){return M=Object.assign||function(N){for(var Q=1;QN.length)&&(Q=N.length);for(var G=0,F=new Array(Q);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,F))continue;G[F]=N[F]}}return G}function a(N,Q){if(N==null)return{};var G={},F=Object.keys(N),D,z;for(z=0;z=0)continue;G[D]=N[D]}return G}var o=function(Q){var G=Q.className,F=Q.percent,D=Q.prefixCls,z=Q.strokeColor,j=Q.strokeLinecap,Z=Q.strokeWidth,te=Q.style,Ae=Q.trailColor,he=Q.trailWidth,ce=Q.transition,ae=s(Q,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ae.gapPosition;var ve=Array.isArray(F)?F:[F],ue=Array.isArray(z)?z:[z],fe=B(ve),se=x(fe,1),me=se[0],re=Z/2,pe=100-Z/2,De="M ".concat(j==="round"?re:0,",").concat(re,` L `).concat(j==="round"?pe:100,",").concat(re),we="0 0 100 ".concat(Z),je=0;return K.a.createElement("svg",M({className:k()("".concat(D,"-line"),G),viewBox:we,preserveAspectRatio:"none",style:te},ae),K.a.createElement("path",{className:"".concat(D,"-line-trail"),d:De,strokeLinecap:j,stroke:Ae,strokeWidth:he||Z,fillOpacity:"0"}),ve.map(function(et,Le){var We={strokeDasharray:"".concat(et,"px, 100px"),strokeDashoffset:"-".concat(je,"px"),transition:ce||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ze=ue[Le]||ue[ue.length-1];return je+=et,K.a.createElement("path",{key:Le,className:"".concat(D,"-line-path"),d:De,strokeLinecap:j,stroke:Ze,strokeWidth:Z,fillOpacity:"0",ref:me[Le],style:We})}))};o.defaultProps=E;var d=o;function A(){return A=Object.assign||function(N){for(var Q=1;QN.length)&&(Q=N.length);for(var G=0,F=new Array(Q);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,F))continue;G[F]=N[F]}}return G}function g(N,Q){if(N==null)return{};var G={},F=Object.keys(N),D,z;for(z=0;z=0)continue;G[D]=N[D]}return G}var i=0;function u(N){return+N.replace("%","")}function f(N){return Array.isArray(N)?N:[N]}function y(N,Q,G,F){var D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0,j=50-F/2,Z=0,te=-j,Ae=0,he=-2*j;switch(z){case"left":Z=-j,te=0,Ae=2*j,he=0;break;case"right":Z=j,te=0,Ae=-2*j,he=0;break;case"bottom":te=j,he=2*j;break;default:}var ce="M 50,50 m ".concat(Z,",").concat(te,` a `).concat(j,",").concat(j," 0 1 1 ").concat(Ae,",").concat(-he,` a `).concat(j,",").concat(j," 0 1 1 ").concat(-Ae,",").concat(he),ae=Math.PI*2*j,ve={stroke:G,strokeDasharray:"".concat(Q/100*(ae-D),"px ").concat(ae,"px"),strokeDashoffset:"-".concat(D/2+N/100*(ae-D),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ce,pathStyle:ve}}var h=function(Q){var G=Q.prefixCls,F=Q.strokeWidth,D=Q.trailWidth,z=Q.gapDegree,j=Q.gapPosition,Z=Q.trailColor,te=Q.strokeLinecap,Ae=Q.style,he=Q.className,ce=Q.strokeColor,ae=Q.percent,ve=b(Q,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(q.useMemo)(function(){return i+=1,i},[]),fe=y(0,100,Z,F,z,j),se=fe.pathString,me=fe.pathStyle,re=f(ae),pe=f(ce),De=pe.find(function(We){return Object.prototype.toString.call(We)==="[object Object]"}),we=B(re),je=l(we,1),et=je[0],Le=function(){var Ze=0;return re.map(function($e,bt){var wt=pe[bt]||pe[pe.length-1],It=Object.prototype.toString.call(wt)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(ue,")"):"",ft=y(Ze,$e,wt,F,z,j);return Ze+=$e,K.a.createElement("path",{key:bt,className:"".concat(G,"-circle-path"),d:ft.pathString,stroke:It,strokeLinecap:te,strokeWidth:F,opacity:$e===0?0:1,fillOpacity:"0",style:ft.pathStyle,ref:et[bt]})})};return K.a.createElement("svg",A({className:k()("".concat(G,"-circle"),he),viewBox:"0 0 100 100",style:Ae},ve),De&&K.a.createElement("defs",null,K.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(De).sort(function(We,Ze){return u(We)-u(Ze)}).map(function(We,Ze){return K.a.createElement("stop",{key:Ze,offset:We,stopColor:De[We]})}))),K.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:se,stroke:Z,strokeLinecap:te,strokeWidth:D||F,fillOpacity:"0",style:me}),Le().reverse())};h.defaultProps=E;var v=h,P={Line:d,Circle:v}},h7HQ:function(Ie,oe,C){var q=C("y+Vt"),K=C("T6xi"),I=q.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(k,E){K.buildPath(k,E,!0)}});Ie.exports=I},hOwI:function(Ie,oe){var C=Math.log(2);function q(I,k,E,B,M,x){var T=B+"-"+M,p=I.length;if(x.hasOwnProperty(T))return x[T];if(k===1){var r=Math.round(Math.log((1<K&&B>k||BE?M:0}Ie.exports=C},iXp4:function(Ie,oe,C){var q=C("ItGF"),K=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function I(k){return q.browser.ie&&q.browser.version>=11?function(){var E=this.__clipPaths,B=this.style,M;if(E)for(var x=0;x-1?Fe:0}else{var Te,Ne,xt,vt,Dt,Ht=(Te=ae.detail)===null||Te===void 0||((Ne=Te.courses)===null||Ne===void 0||((xt=Ne.map(function(Mt){var Gt;return parseInt((Gt=Mt.course_status)===null||Gt===void 0?void 0:Gt.status)}))===null||xt===void 0))?void 0:xt.lastIndexOf(2);Et=Ht>-1?Ht:0,Ht=(vt=ae.detail)===null||vt===void 0||((Dt=vt.courses)===null||Dt===void 0)?void 0:Dt.findIndex(function(Mt){var Gt;return parseInt((Gt=Mt.course_status)===null||Gt===void 0?void 0:Gt.status)===0}),Et=Ht>-1?Ht:Et}if((Ct=ae.detail)!==null&&Ct!==void 0&&Ct.courses){var ct;St(((ct=ae.detail)===null||ct===void 0?void 0:ct.courses[Et])||{})}},[ae.detail]);var at=function(Ct,Et){o.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u5B9E\u8BAD\u5417\uFF1F",onOk:function(){}})},Ot=function(Ct){o.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u7AE0\u8282\u5417\uFF1F",onOk:function(){var Et=Object(s.a)(w.a.mark(function Xe(){return w.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:case"end":return Te.stop()}},Xe)}));function pt(){return Et.apply(this,arguments)}return pt}()})},Ye=function(){var Jt=Object(s.a)(w.a.mark(function Ct(Et,pt){var Xe;return w.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(pe({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!pt){Te.next=7;break}return Te.next=4,Object(P.D)({id:Et});case 4:Te.t0=Te.sent,Te.next=10;break;case 7:return Te.next=9,Object(P.E)({id:Et});case 9:Te.t0=Te.sent;case 10:if(Xe=Te.t0,pe({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(Xe!=null&&Xe.game_identifier||Xe!=null&&Xe.identifier)){Te.next=15;break}return Object(y.S)(pt?"/tasks/".concat(Xe==null?void 0:Xe.identifier,"/jupyter"):"/tasks/".concat(Xe.game_identifier,"?subject_id=").concat(wt.pathId||"")),Te.abrupt("return");case 15:(Xe==null?void 0:Xe.status)===-3?Object(y.q)():(Xe==null?void 0:Xe.status)===2?Ue(Xe==null?void 0:Xe.message):(Xe==null?void 0:Xe.status)===3&&ke(Xe==null?void 0:Xe.message);case 16:case"end":return Te.stop()}},Ct)}));return function(Et,pt){return Jt.apply(this,arguments)}}(),Ue=function Jt(Ct){var Et;Ct=(Et=Ct)!==null&&Et!==void 0&&Et.includes(".json")?Ct:"".concat(Ct,".json"),o.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:b.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var pt=Object(s.a)(w.a.mark(function Fe(){var Te,Ne;return w.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.next=2,Object(v.T)({url:Ct});case 2:if(Te=vt.sent,Te){vt.next=5;break}return vt.abrupt("return");case 5:return c.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),vt.next=8,Object(P.E)({id:Te.shixun_identifier});case 8:if(Ne=vt.sent,!(Ne!=null&&Ne.game_identifier)){vt.next=12;break}return Object(y.S)("/tasks/".concat(Ne.game_identifier)),vt.abrupt("return");case 12:(Ne==null?void 0:Ne.status)===2?Jt(Ne==null?void 0:Ne.message):(Ne==null?void 0:Ne.status)===3&&ke(Ne==null?void 0:Ne.message);case 13:case"end":return vt.stop()}},Fe)}));function Xe(){return pt.apply(this,arguments)}return Xe}()})},ke=function(Ct){o.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:b.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Ct,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Ce=function(Ct){console.log("onDragEnter:",Ct)},Se=function(){var Jt=Object(s.a)(w.a.mark(function Ct(Et){var pt,Xe,Fe,Te,Ne,xt,vt,Dt,Ht;return w.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(console.log("onDrop:",Et),pt=Et.node.props.eventKey,Xe=Et.dragNode.props.eventKey,Fe=Et.node.props.pos.split("-"),Te=Et.dropPosition-Number(Fe[Fe.length-1]),!(Fe.length>2&&!Et.node.dragOverGapBottom&&!Et.node.dragOverGapTop)){Mt.next=7;break}return Mt.abrupt("return",!1);case 7:if(!(Et.node.dragOver&&Et.dragNodesKeys.length>1)){Mt.next=9;break}return Mt.abrupt("return",!1);case 9:if(!(Fe.length>2&&Et.dragNodesKeys.length>1)){Mt.next=11;break}return Mt.abrupt("return",!1);case 11:return Ne=function Gt(gn,Tn,Gr){for(var Vr=0;Vr0&&Et.node.props.expanded&&Te===1?Ne(xt,pt,function(Gt){Gt.children=Gt.children||[],Gt.children.unshift(vt)}):(Ne(xt,pt,function(Gt,gn,Tn){Dt=Tn,Ht=gn}),Te===-1?Dt.splice(Ht,0,vt):Dt.splice(Ht+1,0,vt)):Ne(xt,pt,function(Gt){Gt.children=Gt.children||[],Gt.children.unshift(vt)}),Mt.next=17,me({stage_id:De.stage_id,list:xt});case 17:Me(xt,0,0,!0),console.log("data:",xt),zt(Object(d.a)(xt)),Le([].concat(Object(d.a)(et),[Et.node.key]));case 21:case"end":return Mt.stop()}},Ct)}));return function(Et){return Jt.apply(this,arguments)}}(),Me=function Jt(Ct,Et,pt,Xe){Et=Et||0,Ct.map(function(Fe,Te){try{var Ne;return Fe.key2=Et+1+"-"+(Te+1),Fe.key3=De.index+1+"-"+(Te+1),Fe.title="",Xe||(Fe.key=Et+1+"-"+(Te+1)),Et?Fe.index=pt+"-"+(Te+1):Fe.index=Fe.key3,(Ne=Fe.children)!==null&&Ne!==void 0&&Ne.length&&($e.push(Fe.key2),Jt(Fe.children,Fe.key2,Fe.index,Xe)),Fe}catch(xt){}})},He=function(Ct){var Et=Ct.learning_status,pt=Ct.name,Xe=(Et==null?void 0:Et[0])==="can"&&(Et==null?void 0:Et[1])==="try";return Xe?b.a.createElement("div",{className:Q.a.learn},b.a.createElement("span",{className:Q.a.name},pt),b.a.createElement("span",{className:Q.a.sign},"\u514D\u8D39\u8BD5\u5B66")):pt},Ge=function(Ct){if(se!=="All")return;et.includes(Ct)?Le(et.filter(function(Et){return Et!=Ct})):Le(et.concat(Ct))},mt=function(){var Jt=Object(s.a)(w.a.mark(function Ct(Et){return w.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Object(j.e)(pe,!0)){Xe.next=2;break}return Xe.abrupt("return");case 2:if(!(Et!=null&&Et.need_authorize)){Xe.next=5;break}return Object(j.a)(!1),Xe.abrupt("return");case 5:if(!(yt!=null&&yt.course_id)){Xe.next=8;break}return Xe.next=8,Object(f.L)({id:yt==null?void 0:yt.course_id});case 8:Ye(Et.identifier,Et.is_jupyter||Et.is_jupyter_lab);case 9:case"end":return Xe.stop()}},Ct)}));return function(Et){return Jt.apply(this,arguments)}}(),Lt=function(){var Jt=Object(s.a)(w.a.mark(function Ct(Et){var pt,Xe,Fe,Te,Ne,xt;return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Object(j.e)(pe)){Dt.next=2;break}return Dt.abrupt("return");case 2:if(!(!((pt=ue.userInfo)!==null&&pt!==void 0&&pt.admin)&&!((Xe=ue.userInfo)!==null&&Xe!==void 0&&Xe.business)&&!Et.can_view&&Et.item_type!=="Attachment")){Dt.next=4;break}return Dt.abrupt("return",o.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:b.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")}));case 4:Et.link&&Object(h.n)({is_f:1,id:Et.id,point:0,total:0}),Ne=De!=null&&De.course_id?"course_id=".concat(De==null?void 0:De.course_id):"subject_id=".concat(wt.pathId||De.subject_id),xt=Et==null||((Fe=Et.name)===null||Fe===void 0)?void 0:Fe.substr(Et==null||((Te=Et.name)===null||Te===void 0)?void 0:Te.lastIndexOf(".")),xt.toUpperCase()===".ZIP"?Object(y.v)(Et.name,Z.a.API_SERVER+Et.url):Object(y.S)(Et.link||"/video/".concat(Et.id,"?").concat(Ne));case 8:case"end":return Dt.stop()}},Ct)}));return function(Et){return Jt.apply(this,arguments)}}(),en=function(Ct){var Et;return Ct.item_type==="Shixun"?Ct.is_all_choice?Et=b.a.createElement(r.a,{title:"\u9009\u62E9\u9898"},b.a.createElement("i",{className:"iconfont icon-xuanzeti3 c-lake-blue font20"})):Et=b.a.createElement(r.a,{title:"\u5B9E\u8BAD\u9898"},b.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"})):Ct.item_type==="VideoItem"?Et=b.a.createElement("i",{className:"iconfont icon-shipin2 c-purple-8C1 font20"}):Ct.item_type==="StageCatalog"?Et=b.a.createElement("i",{className:"iconfont icon-kongbai c-brilliant-blue font20"}):Et=b.a.createElement("i",{className:"iconfont icon-kejian1 c-cyan-blue font20"}),Et;Ct.item_type==="Shixun"||Ct.item_type==="StageCatalog"};return b.a.createElement(b.a.Fragment,null,b.a.createElement(K.a,{className:Q.a.tree,disabled:De.disabled,expandedKeys:Object(d.a)(et),draggable:!0,onDragEnter:Ce,onDrop:Se,onExpand:Ge,blockNode:!0,titleRender:function(Ct){var Et,pt,Xe,Fe=Ct;if(Fe.item_type!==se&&se!=="All")return null;var Te=Ct.index.slice(0,1)==="1",Ne=(Ct==null||((Et=Ct.learning_status)===null||Et===void 0)?void 0:Et[0])==="can";return b.a.createElement(k.a,{align:"middle",className:"font14",onClick:function(){return Ge(Fe.key)}},b.a.createElement(T.a,{flex:"30px"},en(Ct)),b.a.createElement(T.a,{flex:"1",className:"c-grey-333"},De.cust_seq&&b.a.createElement("span",{className:"mr10"},Ct.index),Ct.item_type!=="Attachment"&&He(Ct),Ct.item_type==="Attachment"&&b.a.createElement("a",{target:"_blank",onClick:Object(s.a)(w.a.mark(function xt(){var vt;return w.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Object(j.e)(pe)){Ht.next=2;break}return Ht.abrupt("return");case 2:if(!(yt!=null&&yt.course_id)){Ht.next=6;break}return Ht.next=5,Object(f.L)({id:yt==null?void 0:yt.course_id});case 5:vt=Ht.sent;case 6:Ht.t0=Ct.item_type,Ht.next=Ht.t0==="Attachment"?9:Ht.t0==="VideoItem"?11:Ht.t0==="Shixun"?13:15;break;case 9:return Lt(Fe),Ht.abrupt("break",15);case 11:return Lt(Ct),Ht.abrupt("break",15);case 13:return mt(Ct),Ht.abrupt("break",15);case 15:case"end":return Ht.stop()}},xt)}))},Ct.name),Ct.item_type==="Shixun"&&Ct.is_unity_3d&&b.a.createElement("span",{style:{background:"#a300d8",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"68px",height:"20px",display:"inline-block",textAlign:"center",fontSize:"12px"}},"\u865A\u62DF\u4EFF\u771F"),Ct.item_type==="Shixun"&&Ct.is_jupyter_lab&&b.a.createElement("span",{style:{background:"#ff6802",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"76px",height:"20px",display:"inline-block",textAlign:"center",fontSize:"12px"}},"JupyterLab"),Ct.item_type==="Shixun"&&Ct.is_jupyter&&b.a.createElement("span",{style:{background:"#ff6802",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"112px",height:"20px",display:"inline-block",textAlign:"center",fontSize:"12px"}},"Jupyter Notebook"),!!((pt=Ct.schools)!==null&&pt!==void 0&&pt.length)&&b.a.createElement(r.a,{title:"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},b.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 ml10 c-orange",style:{transform:"translateY(1px)",display:"inline-block"}})),Ct.item_type==="Shixun"&&!!(Ct!=null&&Ct.finished_challenges_count)&&b.a.createElement(r.a,{title:"\u5B8C\u6210\u5EA6:".concat(Math.round((Ct==null?void 0:Ct.finished_challenges_count)/(Ct==null?void 0:Ct.challenges_count)*100),"%")},b.a.createElement("i",{className:"iconfont icon-a-wanchengdu100 ml10 ".concat((Ct==null?void 0:Ct.finished_challenges_count)-(Ct==null?void 0:Ct.challenges_count)===0?"c-light-green":"c-grey-333"),style:{transform:"translateY(1px)",display:"inline-block"}}))),!De.disabled&&b.a.createElement("aside",{style:{color:"#0152d9",fontSize:"14px",marginRight:"20px"}},"\u62D6\u52A8\u53EF\u4EE5\u6539\u53D8\u9879\u76EE\u663E\u793A\u987A\u5E8F"),b.a.createElement(T.a,{className:"tr"},(Fe.item_type==="VideoItem"||(Fe==null?void 0:Fe.item_type)==="Attachment"||(Fe==null?void 0:Fe.item_type)==="StageCatalog")&&!De.disabled&&b.a.createElement(r.a,{title:"\u7F16\u8F91"},b.a.createElement("span",{onClick:function(){De.editVidoItem(Object(M.a)({stage_id:De.stage_id},Fe))},style:{color:"#ccc",marginRight:"10px"}},b.a.createElement(u.a,null))),!De.disabled&&b.a.createElement(b.a.Fragment,null,b.a.createElement(r.a,{title:"\u5220\u9664"},b.a.createElement("span",{onClick:function(){De.deleteStages({id:Fe.stage_item_id,stage_id:De.stage_id})},className:"iconfont icon-shanchu c-grey-c"}))),De.showVideoPlay&&De.disabled&&Fe.item_type==="VideoItem"&&Ne&&b.a.createElement("aside",null,re&&b.a.createElement(B.a,{className:"mr10",type:"primary",onClick:Object(s.a)(w.a.mark(function xt(){return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Object(j.e)(pe)){Dt.next=2;break}return Dt.abrupt("return");case 2:pe({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:Fe.stage_item_id,title:"\u89C6\u9891"}}});case 3:case"end":return Dt.stop()}},xt)}))},"\u53D1\u9001"),b.a.createElement(B.a,{type:"primary",onClick:Object(s.a)(w.a.mark(function xt(){return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:Lt(Fe);case 1:case"end":return Dt.stop()}},xt)}))},Fe.last_point>0?"\u7EE7\u7EED\u5B66\u4E60":"\u5F00\u59CB\u5B66\u4E60")),(Fe.allow_visit||Fe.to_be_built||!Fe.shixun_status)&&De.disabled&&Fe.item_type==="Shixun"&&Ne&&b.a.createElement("aside",null,re&&!Fe.shixun_status&&b.a.createElement(B.a,{className:"ml10",type:"primary",onClick:Object(s.a)(w.a.mark(function xt(){return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Object(j.e)(pe)){Dt.next=2;break}return Dt.abrupt("return");case 2:pe({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:Fe.stage_item_id,title:"\u5B9E\u8BAD",is_jupyter:Fe==null?void 0:Fe.is_jupyter,identifier:Fe==null?void 0:Fe.identifier}}});case 3:case"end":return Dt.stop()}},xt)}))},"\u53D1\u9001"),b.a.createElement(B.a,{className:"ml10",type:"primary",onClick:Object(s.a)(w.a.mark(function xt(){return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Object(j.e)(pe)){Dt.next=2;break}return Dt.abrupt("return");case 2:if(!(yt!=null&&yt.course_id)){Dt.next=5;break}return Dt.next=5,Object(f.L)({id:yt==null?void 0:yt.course_id});case 5:window.open("/shixuns/".concat(Fe.identifier,"/challenges"));case 6:case"end":return Dt.stop()}},xt)}))},"\u67E5\u770B\u8BE6\u60C5"),!Fe.shixun_status&&b.a.createElement(B.a,{className:"ml10",type:"primary",onClick:Object(s.a)(w.a.mark(function xt(){return w.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:mt(Fe);case 1:case"end":return Dt.stop()}},xt)}))},Fe!=null&&Fe.need_authorize?"\u9700\u6388\u6743":Ct!=null&&Ct.finished_challenges_count?(Ct==null?void 0:Ct.finished_challenges_count)-(Ct==null?void 0:Ct.challenges_count)===0?"\u518D\u6B21\u5B9E\u6218":"\u7EE7\u7EED\u5B9E\u6218":"\u5F00\u59CB\u5B9E\u6218")),De.disabled&&Fe.shixun_status==="\u6682\u672A\u516C\u5F00"&&b.a.createElement("span",{className:"".concat(Q.a.color204," ml5")},"\u6682\u672A\u53D1\u5E03"),Fe.shixun_status==="\u5DF2\u5220\u9664"&&b.a.createElement("span",{className:"".concat(Q.a.color204," ml5")},"\u5DF2\u5220\u9664"),De.disabled&&Fe.item_type==="Shixun"&&!!Fe.challenges_count&&b.a.createElement("span",{className:"exper\u02C6iment-number ml5 c-grey-999"},"\u5B9E\u9A8C\u6570 ",Fe.challenges_count),se==="All"&&!!((Xe=Ct.children)!==null&&Xe!==void 0&&Xe.length)&&b.a.createElement("span",{className:"ml10"},et.includes(Ct.key)?b.a.createElement(D.a,null):b.a.createElement(z.a,null))))},treeData:Ft}))};oe.a=Object(i.a)(function(he){var ce=he.pathsDetail,ae=he.loading,ve=he.user,ue=he.globalSetting;return{pathsDetail:ce,globalSetting:ue,user:ve,loading:ae.effects}})(Ae)},ji0R:function(Ie,oe,C){Ie.exports=C.p+"static/douyu.3e6df9ee.jpg"},juDX:function(Ie,oe,C){C("P47w");var q=C("aX58"),K=q.registerPainter,I=C("3CBa");K("svg",I)},k3GJ:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return gl});var q=C("rePB"),K=C("ODXe"),I=C("Ff2n"),k=C("VTBJ"),E=C("q1tI"),B=C("TSYQ"),M=C.n(B),x=C("Zm9Q"),T=C("6cGi"),p=C("KQm4"),r=C("xEkU"),t=C.n(r),c=C("t23M");function s(Je){var ht=Object(E.useRef)(),_t=Object(E.useRef)(!1);function nt(){for(var xe=arguments.length,Ke=new Array(xe),Oe=0;OePt&&(qe=Pt-ut),Object(E.useMemo)(function(){if(!Ke.length)return[0,0];for(var Bt=Ke.length,$t=Bt,cn=0;cndt+qe){$t=cn-1;break}}for(var En=0,rn=Bt-1;rn>=0;rn-=1){var jt=Je.get(Ke[rn].key)||_;if(jt[Tt]1&&arguments[1]!==void 0?arguments[1]:!1,nt=ht&&typeof ht.getBoundingClientRect=="function"&&ht.getBoundingClientRect().width;if(nt){if(_t){var xe=getComputedStyle(ht),Ke=xe.marginLeft,Oe=xe.marginRight;nt+=+Ke.replace("px","")+ +Oe.replace("px","")}nt=+nt.toFixed(6)}return nt||0},Ze=function(ht,_t,nt){ht&&Object(N.a)(ht.style)==="object"&&(ht.style[_t]=nt)},$e=function(){return re.any},bt=C("bdgK"),wt=C("i8i4"),It=C.n(wt),ft=C("wgJM"),Ft=C("l4aY"),zt=C("m+aA"),Qe=C("c+Xe"),ze=C("zT1h"),yt=C("QC+M");function St(Je,ht,_t){return _t?Je[0]===ht[0]:Je[0]===ht[0]&&Je[1]===ht[1]}function at(Je,ht,_t){var nt=Je[ht]||{};return Object(k.a)(Object(k.a)({},nt),_t)}function Ot(Je,ht,_t,nt){for(var xe=_t.points,Ke=Object.keys(Je),Oe=0;Oe1&&arguments[1]!==void 0?arguments[1]:2;ht();var Ke=Object(ft.a)(function(){xe<=1?nt({isCanceled:function(){return Ke!==Je.current}}):_t(nt,xe-1)});Je.current=Ke}return E.useEffect(function(){return function(){ht()}},[]),[_t,ht]},Gr=[vt,Dt,Ht,ct],Vr=!1,Kr=!0;function kn(Je){return Je===Ht||Je===ct}var Ua=function(Je,ht){var _t=E.useState(xt),nt=Object(K.a)(_t,2),xe=nt[0],Ke=nt[1],Oe=Tn(),ot=Object(K.a)(Oe,2),lt=ot[0],Tt=ot[1];function dt(){Ke(vt)}return gn(function(){if(xe!==xt&&xe!==ct){var Pt=Gr.indexOf(xe),tn=Gr[Pt+1],ut=ht(xe);ut===Vr?Ke(tn):lt(function(qe){function Bt(){if(qe.isCanceled())return;Ke(tn)}ut===!0?Bt():Promise.resolve(ut).then(Bt)})}},[Je,xe]),E.useEffect(function(){return function(){Tt()}},[]),[dt,xe]},Ya=function(Je){var ht=Object(E.useRef)(),_t=Object(E.useRef)(Je);_t.current=Je;var nt=E.useCallback(function(Oe){_t.current(Oe)},[]);function xe(Oe){Oe&&(Oe.removeEventListener(Et,nt),Oe.removeEventListener(Ct,nt))}function Ke(Oe){ht.current&&ht.current!==Oe&&xe(ht.current),Oe&&Oe!==ht.current&&(Oe.addEventListener(Et,nt),Oe.addEventListener(Ct,nt),ht.current=Oe)}return E.useEffect(function(){return function(){xe(ht.current)}},[]),[Ke,xe]};function Ra(Je,ht,_t,nt){var xe=nt.motionEnter,Ke=xe===void 0?!0:xe,Oe=nt.motionAppear,ot=Oe===void 0?!0:Oe,lt=nt.motionLeave,Tt=lt===void 0?!0:lt,dt=nt.motionDeadline,Pt=nt.motionLeaveImmediately,tn=nt.onAppearPrepare,ut=nt.onEnterPrepare,qe=nt.onLeavePrepare,Bt=nt.onAppearStart,$t=nt.onEnterStart,cn=nt.onLeaveStart,Kt=nt.onAppearActive,En=nt.onEnterActive,rn=nt.onLeaveActive,jt=nt.onAppearEnd,hn=nt.onEnterEnd,qt=nt.onLeaveEnd,bn=nt.onVisibleChanged,Fn=Mt(),Yt=Object(K.a)(Fn,2),Cn=Yt[0],ln=Yt[1],wn=Mt(Xe),an=Object(K.a)(wn,2),Vt=an[0],Sn=an[1],Ar=Mt(null),fn=Object(K.a)(Ar,2),Dn=fn[0],Un=fn[1],Gn=Object(E.useRef)(!1),vn=Object(E.useRef)(null),Kn=Object(E.useRef)(!1),or=Object(E.useRef)(null);function gr(){var Yn=_t();return Yn||or.current}var Lr=Object(E.useRef)(!1);function er(Yn){var mn=gr();if(Yn&&!Yn.deadline&&Yn.target!==mn)return;var yr;Vt===Fe&&Lr.current?yr=jt==null?void 0:jt(mn,Yn):Vt===Te&&Lr.current?yr=hn==null?void 0:hn(mn,Yn):Vt===Ne&&Lr.current&&(yr=qt==null?void 0:qt(mn,Yn)),yr!==!1&&!Kn.current&&(Sn(Xe),Un(null))}var rr=Ya(er),Dr=Object(K.a)(rr,1),Er=Dr[0],_r=E.useMemo(function(){var Yn,mn,yr;switch(Vt){case"appear":return Yn={},Object(q.a)(Yn,vt,tn),Object(q.a)(Yn,Dt,Bt),Object(q.a)(Yn,Ht,Kt),Yn;case"enter":return mn={},Object(q.a)(mn,vt,ut),Object(q.a)(mn,Dt,$t),Object(q.a)(mn,Ht,En),mn;case"leave":return yr={},Object(q.a)(yr,vt,qe),Object(q.a)(yr,Dt,cn),Object(q.a)(yr,Ht,rn),yr;default:return{}}},[Vt]),ia=Ua(Vt,function(Yn){if(Yn===vt){var mn=_r[vt];return mn?mn(gr()):Vr}if(vr in _r){var yr;Un(((yr=_r[vr])===null||yr===void 0?void 0:yr.call(_r,gr(),null))||null)}return vr===Ht&&(Er(gr()),dt>0&&(clearTimeout(vn.current),vn.current=setTimeout(function(){er({deadline:!0})},dt))),Kr}),ea=Object(K.a)(ia,2),tr=ea[0],vr=ea[1],ka=kn(vr);Lr.current=ka,gn(function(){ln(ht);var Yn=Gn.current;if(Gn.current=!0,!Je)return;var mn;!Yn&&ht&&ot&&(mn=Fe),Yn&&ht&&Ke&&(mn=Te),(Yn&&!ht&&Tt||!Yn&&Pt&&!ht&&Tt)&&(mn=Ne),mn&&(Sn(mn),tr())},[ht]),Object(E.useEffect)(function(){(Vt===Fe&&!ot||Vt===Te&&!Ke||Vt===Ne&&!Tt)&&Sn(Xe)},[ot,Ke,Tt]),Object(E.useEffect)(function(){return function(){clearTimeout(vn.current),Kn.current=!0}},[]),Object(E.useEffect)(function(){Cn!==void 0&&Vt===Xe&&(bn==null||bn(Cn))},[Cn,Vt]);var ra=Dn;return _r[vt]&&vr===Dt&&(ra=Object(k.a)({transition:"none"},ra)),[Vt,vr,ra,Cn!=null?Cn:ht]}var Xr=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(){return Object(L.a)(this,_t),ht.apply(this,arguments)}return Object(b.a)(_t,[{key:"render",value:function(){return this.props.children}}]),_t}(E.Component),Ja=Xr;function Ri(Je){var ht=Je;Object(N.a)(Je)==="object"&&(ht=Je.transitionSupport);function _t(xe){return!!(xe.motionName&&ht)}var nt=E.forwardRef(function(xe,Ke){var Oe=xe.visible,ot=Oe===void 0?!0:Oe,lt=xe.removeOnLeave,Tt=lt===void 0?!0:lt,dt=xe.forceRender,Pt=xe.children,tn=xe.motionName,ut=xe.leavedClassName,qe=xe.eventProps,Bt=_t(xe),$t=Object(E.useRef)(),cn=Object(E.useRef)();function Kt(){try{return Object(zt.a)($t.current||cn.current)}catch(Sn){return null}}var En=Ra(Bt,ot,Kt,xe),rn=Object(K.a)(En,4),jt=rn[0],hn=rn[1],qt=rn[2],bn=rn[3],Fn=E.useRef(bn);bn&&(Fn.current=!0);var Yt=Object(E.useRef)(Ke);Yt.current=Ke;var Cn=E.useCallback(function(Sn){$t.current=Sn,Object(Qe.b)(Yt.current,Sn)},[]),ln,wn=Object(k.a)(Object(k.a)({},qe),{},{visible:ot});if(!Pt)ln=null;else if(jt===Xe||!_t(xe))bn?ln=Pt(Object(k.a)({},wn),Cn):!Tt&&Fn.current?ln=Pt(Object(k.a)(Object(k.a)({},wn),{},{className:ut}),Cn):dt?ln=Pt(Object(k.a)(Object(k.a)({},wn),{},{style:{display:"none"}}),Cn):ln=null;else{var an,Vt;hn===vt?Vt="prepare":kn(hn)?Vt="active":hn===Dt&&(Vt="start"),ln=Pt(Object(k.a)(Object(k.a)({},wn),{},{className:M()(pt(tn,jt),(an={},Object(q.a)(an,pt(tn,"".concat(jt,"-").concat(Vt)),Vt),Object(q.a)(an,tn,typeof tn=="string"),an)),style:qt}),Cn)}return E.createElement(Ja,{ref:cn},ln)});return nt.displayName="CSSMotion",nt}var ji=Ri(Jt),_e="add",Be="keep",Ve="remove",gt="removed";function Xt(Je){var ht;return Je&&Object(N.a)(Je)==="object"&&"key"in Je?ht=Je:ht={key:Je},Object(k.a)(Object(k.a)({},ht),{},{key:String(ht.key)})}function sn(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Je.map(Xt)}function ne(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],_t=[],nt=0,xe=ht.length,Ke=sn(Je),Oe=sn(ht);Ke.forEach(function(Tt){for(var dt=!1,Pt=nt;Pt1});return lt.forEach(function(Tt){_t=_t.filter(function(dt){var Pt=dt.key,tn=dt.status;return Pt!==Tt||tn!==Ve}),_t.forEach(function(dt){dt.key===Tt&&(dt.status=Be)})}),_t}var H=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function V(Je){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ji,_t=function(nt){Object(i.a)(Ke,nt);var xe=Object(u.a)(Ke);function Ke(){var Oe;return Object(L.a)(this,Ke),Oe=xe.apply(this,arguments),Oe.state={keyEntities:[]},Oe.removeKey=function(ot){Oe.setState(function(lt){var Tt=lt.keyEntities;return{keyEntities:Tt.map(function(dt){return dt.key!==ot?dt:Object(k.a)(Object(k.a)({},dt),{},{status:gt})})}})},Oe}return Object(b.a)(Ke,[{key:"render",value:function(){var ot=this,lt=this.state.keyEntities,Tt=this.props,dt=Tt.component,Pt=Tt.children,tn=Tt.onVisibleChanged,ut=Object(I.a)(Tt,["component","children","onVisibleChanged"]),qe=dt||E.Fragment,Bt={};return H.forEach(function($t){Bt[$t]=ut[$t],delete ut[$t]}),delete ut.keys,E.createElement(qe,ut,lt.map(function($t){var cn=$t.status,Kt=Object(I.a)($t,["status"]),En=cn===_e||cn===Be;return E.createElement(ht,Object(w.a)({},Bt,{key:Kt.key,visible:En,eventProps:Kt,onVisibleChanged:function(jt){tn==null||tn(jt,{key:Kt.key}),jt||ot.removeKey(Kt.key)}}),Pt)}))}}],[{key:"getDerivedStateFromProps",value:function(ot,lt){var Tt=ot.keys,dt=lt.keyEntities,Pt=sn(Tt),tn=ne(dt,Pt);return{keyEntities:tn.filter(function(ut){var qe=dt.find(function(Bt){var $t=Bt.key;return ut.key===$t});return!(qe&&qe.status===gt&&ut.status===Ve)})}}}]),Ke}(E.Component);return _t.defaultProps={component:"div"},_t}var ee=V(Jt),ge=ji;function ie(Je){var ht=Je.prefixCls,_t=Je.motion,nt=Je.animation,xe=Je.transitionName;return _t||(nt?{motionName:"".concat(ht,"-").concat(nt)}:xe?{motionName:xe}:null)}function tt(Je){var ht=Je.prefixCls,_t=Je.visible,nt=Je.zIndex,xe=Je.mask,Ke=Je.maskMotion,Oe=Je.maskAnimation,ot=Je.maskTransitionName;if(!xe)return null;var lt={};return(Ke||ot||Oe)&&(lt=Object(k.a)({motionAppear:!0},ie({motion:Ke,prefixCls:ht,transitionName:ot,animation:Oe}))),E.createElement(ge,Object(w.a)({},lt,{visible:_t,removeOnLeave:!0}),function(Tt){var dt=Tt.className;return E.createElement("div",{style:{zIndex:nt},className:M()("".concat(ht,"-mask"),dt)})})}var Qt=C("9mu1"),dn=C("o0o1"),_n=C.n(dn),Zt=C("HaE+"),Vn=["measure","align",null,"motion"],Xn=function(Je,ht){var _t=Object(E.useState)(null),nt=Object(K.a)(_t,2),xe=nt[0],Ke=nt[1],Oe=Object(E.useRef)(),ot=Object(E.useRef)(!1);function lt(Pt){ot.current||Ke(Pt)}function Tt(){ft.a.cancel(Oe.current)}function dt(Pt){Tt(),Oe.current=Object(ft.a)(function(){lt(function(tn){switch(xe){case"align":return"motion";case"motion":return"stable";default:}return tn}),Pt==null||Pt()})}return Object(E.useEffect)(function(){lt("measure")},[Je]),Object(E.useEffect)(function(){switch(xe){case"measure":ht();break;default:}xe&&(Oe.current=Object(ft.a)(Object(Zt.a)(_n.a.mark(function Pt(){var tn,ut;return _n.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:tn=Vn.indexOf(xe),ut=Vn[tn+1],ut&&tn!==-1&<(ut);case 3:case"end":return Bt.stop()}},Pt)}))))},[xe]),Object(E.useEffect)(function(){return function(){ot.current=!0,Tt()}},[]),[xe,dt]},lr=function(Je){var ht=E.useState({width:0,height:0}),_t=Object(K.a)(ht,2),nt=_t[0],xe=_t[1];function Ke(ot){xe({width:ot.offsetWidth,height:ot.offsetHeight})}var Oe=E.useMemo(function(){var ot={};if(Je){var lt=nt.width,Tt=nt.height;Je.indexOf("height")!==-1&&Tt?ot.height=Tt:Je.indexOf("minHeight")!==-1&&Tt&&(ot.minHeight=Tt),Je.indexOf("width")!==-1&<?ot.width=lt:Je.indexOf("minWidth")!==-1&<&&(ot.minWidth=lt)}return ot},[Je,nt]);return[Oe,Ke]},Or=E.forwardRef(function(Je,ht){var _t=Je.visible,nt=Je.prefixCls,xe=Je.className,Ke=Je.style,Oe=Je.children,ot=Je.zIndex,lt=Je.stretch,Tt=Je.destroyPopupOnHide,dt=Je.forceRender,Pt=Je.align,tn=Je.point,ut=Je.getRootDomNode,qe=Je.getClassNameFromAlign,Bt=Je.onAlign,$t=Je.onMouseEnter,cn=Je.onMouseLeave,Kt=Je.onMouseDown,En=Je.onTouchStart,rn=Object(E.useRef)(),jt=Object(E.useRef)(),hn=Object(E.useState)(),qt=Object(K.a)(hn,2),bn=qt[0],Fn=qt[1],Yt=lr(lt),Cn=Object(K.a)(Yt,2),ln=Cn[0],wn=Cn[1];function an(){lt&&wn(ut())}var Vt=Xn(_t,an),Sn=Object(K.a)(Vt,2),Ar=Sn[0],fn=Sn[1],Dn=Object(E.useRef)();function Un(){return tn||ut}function Gn(){var rr;(rr=rn.current)===null||rr===void 0||rr.forceAlign()}function vn(rr,Dr){var Er=qe(Dr);bn!==Er&&Fn(Er),Ar==="align"&&(bn!==Er?Promise.resolve().then(function(){Gn()}):fn(function(){var _r;(_r=Dn.current)===null||_r===void 0||_r.call(Dn)}),Bt==null||Bt(rr,Dr))}var Kn=Object(k.a)({},ie(Je));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(rr){var Dr=Kn[rr];Kn[rr]=function(Er,_r){return fn(),Dr==null?void 0:Dr(Er,_r)}});function or(){return new Promise(function(rr){Dn.current=rr})}E.useEffect(function(){!Kn.motionName&&Ar==="motion"&&fn()},[Kn.motionName,Ar]),E.useImperativeHandle(ht,function(){return{forceAlign:Gn,getElement:function(){return jt.current}}});var gr=Object(k.a)(Object(k.a)({},ln),{},{zIndex:ot,opacity:Ar==="motion"||Ar==="stable"||!_t?void 0:0,pointerEvents:Ar==="stable"?void 0:"none"},Ke),Lr=!0;(Pt==null?void 0:Pt.points)&&(Ar==="align"||Ar==="stable")&&(Lr=!1);var er=Oe;return E.Children.count(Oe)>1&&(er=E.createElement("div",{className:"".concat(nt,"-content")},Oe)),E.createElement(ge,Object(w.a)({visible:_t,ref:jt,leavedClassName:"".concat(nt,"-hidden")},Kn,{onAppearPrepare:or,onEnterPrepare:or,removeOnLeave:Tt,forceRender:dt}),function(rr,Dr){var Er=rr.className,_r=rr.style,ia=M()(nt,xe,bn,Er);return E.createElement(Qt.a,{target:Un(),key:"popup",ref:rn,monitorWindowResize:!0,disabled:Lr,align:Pt,onAlign:vn},E.createElement("div",{ref:Dr,className:ia,onMouseEnter:$t,onMouseLeave:cn,onMouseDownCapture:Kt,onTouchStartCapture:En,style:Object(k.a)(Object(k.a)({},_r),gr)},er))})});Or.displayName="PopupInner";var $r=Or,Hr=E.forwardRef(function(Je,ht){var _t=Je.prefixCls,nt=Je.visible,xe=Je.zIndex,Ke=Je.children,Oe=Je.mobile;Oe=Oe===void 0?{}:Oe;var ot=Oe.popupClassName,lt=Oe.popupStyle,Tt=Oe.popupMotion,dt=Tt===void 0?{}:Tt,Pt=Oe.popupRender,tn=E.useRef();E.useImperativeHandle(ht,function(){return{forceAlign:function(){},getElement:function(){return tn.current}}});var ut=Object(k.a)({zIndex:xe},lt),qe=Ke;return E.Children.count(Ke)>1&&(qe=E.createElement("div",{className:"".concat(_t,"-content")},Ke)),Pt&&(qe=Pt(qe)),E.createElement(ge,Object(w.a)({visible:nt,ref:tn,removeOnLeave:!0},dt),function(Bt,$t){var cn=Bt.className,Kt=Bt.style,En=M()(_t,ot,cn);return E.createElement("div",{ref:$t,className:En,style:Object(k.a)(Object(k.a)({},Kt),ut)},qe)})});Hr.displayName="MobilePopupInner";var ba=Hr,Ir=["visible","mobile"],ga=E.forwardRef(function(Je,ht){var _t=Je.visible,nt=Je.mobile,xe=Object(I.a)(Je,Ir),Ke=Object(E.useState)(_t),Oe=Object(K.a)(Ke,2),ot=Oe[0],lt=Oe[1],Tt=Object(E.useState)(!1),dt=Object(K.a)(Tt,2),Pt=dt[0],tn=dt[1],ut=Object(k.a)(Object(k.a)({},xe),{},{visible:ot});Object(E.useEffect)(function(){lt(_t),_t&&nt&&tn(Ye())},[_t,nt]);var qe=Pt?E.createElement(ba,Object(w.a)({},ut,{mobile:nt,ref:ht})):E.createElement($r,Object(w.a)({},ut,{ref:ht}));return E.createElement("div",null,E.createElement(tt,ut),qe)});ga.displayName="Popup";var Na=ga,hi=E.createContext(null),Ha=hi;function qa(){}function xi(){return""}function fi(Je){return Je?Je.ownerDocument:window.document}var ui=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function pi(Je){var ht=function(_t){Object(i.a)(xe,_t);var nt=Object(u.a)(xe);function xe(Ke){var Oe;Object(L.a)(this,xe),Oe=nt.call(this,Ke),Oe.popupRef=E.createRef(),Oe.triggerRef=E.createRef(),Oe.attachId=void 0,Oe.clickOutsideHandler=void 0,Oe.touchOutsideHandler=void 0,Oe.contextMenuOutsideHandler1=void 0,Oe.contextMenuOutsideHandler2=void 0,Oe.mouseDownTimeout=void 0,Oe.focusTime=void 0,Oe.preClickTime=void 0,Oe.preTouchTime=void 0,Oe.delayTimer=void 0,Oe.hasPopupMouseDown=void 0,Oe.onMouseEnter=function(lt){var Tt=Oe.props.mouseEnterDelay;Oe.fireEvents("onMouseEnter",lt),Oe.delaySetPopupVisible(!0,Tt,Tt?null:lt)},Oe.onMouseMove=function(lt){Oe.fireEvents("onMouseMove",lt),Oe.setPoint(lt)},Oe.onMouseLeave=function(lt){Oe.fireEvents("onMouseLeave",lt),Oe.delaySetPopupVisible(!1,Oe.props.mouseLeaveDelay)},Oe.onPopupMouseEnter=function(){Oe.clearDelayTimer()},Oe.onPopupMouseLeave=function(lt){var Tt;if(lt.relatedTarget&&!lt.relatedTarget.setTimeout&&Object(Ft.a)((Tt=Oe.popupRef.current)===null||Tt===void 0?void 0:Tt.getElement(),lt.relatedTarget))return;Oe.delaySetPopupVisible(!1,Oe.props.mouseLeaveDelay)},Oe.onFocus=function(lt){Oe.fireEvents("onFocus",lt),Oe.clearDelayTimer(),Oe.isFocusToShow()&&(Oe.focusTime=Date.now(),Oe.delaySetPopupVisible(!0,Oe.props.focusDelay))},Oe.onMouseDown=function(lt){Oe.fireEvents("onMouseDown",lt),Oe.preClickTime=Date.now()},Oe.onTouchStart=function(lt){Oe.fireEvents("onTouchStart",lt),Oe.preTouchTime=Date.now()},Oe.onBlur=function(lt){Oe.fireEvents("onBlur",lt),Oe.clearDelayTimer(),Oe.isBlurToHide()&&Oe.delaySetPopupVisible(!1,Oe.props.blurDelay)},Oe.onContextMenu=function(lt){lt.preventDefault(),Oe.fireEvents("onContextMenu",lt),Oe.setPopupVisible(!0,lt)},Oe.onContextMenuClose=function(){Oe.isContextMenuToShow()&&Oe.close()},Oe.onClick=function(lt){if(Oe.fireEvents("onClick",lt),Oe.focusTime){var Tt;if(Oe.preClickTime&&Oe.preTouchTime?Tt=Math.min(Oe.preClickTime,Oe.preTouchTime):Oe.preClickTime?Tt=Oe.preClickTime:Oe.preTouchTime&&(Tt=Oe.preTouchTime),Math.abs(Tt-Oe.focusTime)<20)return;Oe.focusTime=0}Oe.preClickTime=0,Oe.preTouchTime=0,Oe.isClickToShow()&&(Oe.isClickToHide()||Oe.isBlurToHide())&<&<.preventDefault&<.preventDefault();var dt=!Oe.state.popupVisible;(Oe.isClickToHide()&&!dt||dt&&Oe.isClickToShow())&&Oe.setPopupVisible(!Oe.state.popupVisible,lt)},Oe.onPopupMouseDown=function(){if(Oe.hasPopupMouseDown=!0,clearTimeout(Oe.mouseDownTimeout),Oe.mouseDownTimeout=window.setTimeout(function(){Oe.hasPopupMouseDown=!1},0),Oe.context){var lt;(lt=Oe.context).onPopupMouseDown.apply(lt,arguments)}},Oe.onDocumentClick=function(lt){if(Oe.props.mask&&!Oe.props.maskClosable)return;var Tt=lt.target,dt=Oe.getRootDomNode(),Pt=Oe.getPopupDomNode();(!Object(Ft.a)(dt,Tt)||Oe.isContextMenuOnly())&&!Object(Ft.a)(Pt,Tt)&&!Oe.hasPopupMouseDown&&Oe.close()},Oe.getRootDomNode=function(){var lt=Oe.props.getTriggerDOMNode;if(lt)return lt(Oe.triggerRef.current);try{var Tt=Object(zt.a)(Oe.triggerRef.current);if(Tt)return Tt}catch(dt){}return It.a.findDOMNode(Object(g.a)(Oe))},Oe.getPopupClassNameFromAlign=function(lt){var Tt=[],dt=Oe.props,Pt=dt.popupPlacement,tn=dt.builtinPlacements,ut=dt.prefixCls,qe=dt.alignPoint,Bt=dt.getPopupClassNameFromAlign;return Pt&&tn&&Tt.push(Ot(tn,ut,lt,qe)),Bt&&Tt.push(Bt(lt)),Tt.join(" ")},Oe.getComponent=function(){var lt=Oe.props,Tt=lt.prefixCls,dt=lt.destroyPopupOnHide,Pt=lt.popupClassName,tn=lt.onPopupAlign,ut=lt.popupMotion,qe=lt.popupAnimation,Bt=lt.popupTransitionName,$t=lt.popupStyle,cn=lt.mask,Kt=lt.maskAnimation,En=lt.maskTransitionName,rn=lt.maskMotion,jt=lt.zIndex,hn=lt.popup,qt=lt.stretch,bn=lt.alignPoint,Fn=lt.mobile,Yt=lt.forceRender,Cn=Oe.state,ln=Cn.popupVisible,wn=Cn.point,an=Oe.getPopupAlign(),Vt={};return Oe.isMouseEnterToShow()&&(Vt.onMouseEnter=Oe.onPopupMouseEnter),Oe.isMouseLeaveToHide()&&(Vt.onMouseLeave=Oe.onPopupMouseLeave),Vt.onMouseDown=Oe.onPopupMouseDown,Vt.onTouchStart=Oe.onPopupMouseDown,E.createElement(Na,Object(w.a)({prefixCls:Tt,destroyPopupOnHide:dt,visible:ln,point:bn&&wn,className:Pt,align:an,onAlign:tn,animation:qe,getClassNameFromAlign:Oe.getPopupClassNameFromAlign},Vt,{stretch:qt,getRootDomNode:Oe.getRootDomNode,style:$t,mask:cn,zIndex:jt,transitionName:Bt,maskAnimation:Kt,maskTransitionName:En,maskMotion:rn,ref:Oe.popupRef,motion:ut,mobile:Fn,forceRender:Yt}),typeof hn=="function"?hn():hn)},Oe.attachParent=function(lt){ft.a.cancel(Oe.attachId);var Tt=Oe.props,dt=Tt.getPopupContainer,Pt=Tt.getDocument,tn=Oe.getRootDomNode(),ut;dt?(tn||dt.length===0)&&(ut=dt(tn)):ut=Pt(Oe.getRootDomNode()).body,ut?ut.appendChild(lt):Oe.attachId=Object(ft.a)(function(){Oe.attachParent(lt)})},Oe.getContainer=function(){var lt=Oe.props.getDocument,Tt=lt(Oe.getRootDomNode()).createElement("div");return Tt.style.position="absolute",Tt.style.top="0",Tt.style.left="0",Tt.style.width="100%",Oe.attachParent(Tt),Tt},Oe.setPoint=function(lt){var Tt=Oe.props.alignPoint;if(!Tt||!lt)return;Oe.setState({point:{pageX:lt.pageX,pageY:lt.pageY}})},Oe.handlePortalUpdate=function(){Oe.state.prevPopupVisible!==Oe.state.popupVisible&&Oe.props.afterPopupVisibleChange(Oe.state.popupVisible)},Oe.triggerContextValue={onPopupMouseDown:Oe.onPopupMouseDown};var ot;return"popupVisible"in Ke?ot=!!Ke.popupVisible:ot=!!Ke.defaultPopupVisible,Oe.state={prevPopupVisible:ot,popupVisible:ot},ui.forEach(function(lt){Oe["fire".concat(lt)]=function(Tt){Oe.fireEvents(lt,Tt)}}),Oe}return Object(b.a)(xe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Oe=this.props,ot=this.state;if(ot.popupVisible){var lt;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(lt=Oe.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ze.a)(lt,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(lt=lt||Oe.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ze.a)(lt,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(lt=lt||Oe.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ze.a)(lt,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ze.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ft.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Oe;return((Oe=this.popupRef.current)===null||Oe===void 0?void 0:Oe.getElement())||null}},{key:"getPopupAlign",value:function(){var Oe=this.props,ot=Oe.popupPlacement,lt=Oe.popupAlign,Tt=Oe.builtinPlacements;return ot&&Tt?at(Tt,ot,lt):lt}},{key:"setPopupVisible",value:function(Oe,ot){var lt=this.props.alignPoint,Tt=this.state.popupVisible;this.clearDelayTimer(),Tt!==Oe&&("popupVisible"in this.props||this.setState({popupVisible:Oe,prevPopupVisible:Tt}),this.props.onPopupVisibleChange(Oe)),lt&&ot&&Oe&&this.setPoint(ot)}},{key:"delaySetPopupVisible",value:function(Oe,ot,lt){var Tt=this,dt=ot*1e3;if(this.clearDelayTimer(),dt){var Pt=lt?{pageX:lt.pageX,pageY:lt.pageY}:null;this.delayTimer=window.setTimeout(function(){Tt.setPopupVisible(Oe,Pt),Tt.clearDelayTimer()},dt)}else this.setPopupVisible(Oe,lt)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Oe){var ot=this.props.children.props,lt=this.props;return ot[Oe]&<[Oe]?this["fire".concat(Oe)]:ot[Oe]||lt[Oe]}},{key:"isClickToShow",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.showAction;return ot.indexOf("click")!==-1||lt.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Oe=this.props.action;return Oe==="contextMenu"||Oe.length===1&&Oe[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.showAction;return ot.indexOf("contextMenu")!==-1||lt.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.hideAction;return ot.indexOf("click")!==-1||lt.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.showAction;return ot.indexOf("hover")!==-1||lt.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.hideAction;return ot.indexOf("hover")!==-1||lt.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.showAction;return ot.indexOf("focus")!==-1||lt.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Oe=this.props,ot=Oe.action,lt=Oe.hideAction;return ot.indexOf("focus")!==-1||lt.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Oe;(Oe=this.popupRef.current)===null||Oe===void 0||Oe.forceAlign()}}},{key:"fireEvents",value:function(Oe,ot){var lt=this.props.children.props[Oe];lt&<(ot);var Tt=this.props[Oe];Tt&&Tt(ot)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Oe=this.state.popupVisible,ot=this.props,lt=ot.children,Tt=ot.forceRender,dt=ot.alignPoint,Pt=ot.className,tn=ot.autoDestroy,ut=E.Children.only(lt),qe={key:"trigger"};this.isContextMenuToShow()?qe.onContextMenu=this.onContextMenu:qe.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(qe.onClick=this.onClick,qe.onMouseDown=this.onMouseDown,qe.onTouchStart=this.onTouchStart):(qe.onClick=this.createTwoChains("onClick"),qe.onMouseDown=this.createTwoChains("onMouseDown"),qe.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(qe.onMouseEnter=this.onMouseEnter,dt&&(qe.onMouseMove=this.onMouseMove)):qe.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?qe.onMouseLeave=this.onMouseLeave:qe.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(qe.onFocus=this.onFocus,qe.onBlur=this.onBlur):(qe.onFocus=this.createTwoChains("onFocus"),qe.onBlur=this.createTwoChains("onBlur"));var Bt=M()(ut&&ut.props&&ut.props.className,Pt);Bt&&(qe.className=Bt);var $t=Object(k.a)({},qe);Object(Qe.c)(ut)&&($t.ref=Object(Qe.a)(this.triggerRef,ut.ref));var cn=E.cloneElement(ut,$t),Kt;return(Oe||this.popupRef.current||Tt)&&(Kt=E.createElement(Je,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Oe&&tn&&(Kt=null),E.createElement(Ha.Provider,{value:this.triggerContextValue},cn,Kt)}}],[{key:"getDerivedStateFromProps",value:function(Oe,ot){var lt=Oe.popupVisible,Tt={};return lt!==void 0&&ot.popupVisible!==lt&&(Tt.popupVisible=lt,Tt.prevPopupVisible=ot.popupVisible),Tt}}]),xe}(E.Component);return ht.contextType=Ha,ht.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:xi,getDocument:fi,onPopupVisibleChange:qa,afterPopupVisibleChange:qa,onPopupAlign:qa,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},ht}var bi=pi(yt.a),ai={adjustX:1,adjustY:1},Hi={topLeft:{points:["bl","tl"],overflow:ai,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ai,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ai,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ai,offset:[4,0]}},Yi={topLeft:{points:["bl","tl"],overflow:ai,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ai,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ai,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ai,offset:[4,0]}},Zr=Hi,sa=0,Mr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},la=function(ht,_t,nt){var xe=we(_t),Ke=ht.getState();ht.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},Ke.defaultActiveFirst),{},Object(q.a)({},xe,nt))})},Yr=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(nt){var xe;Object(L.a)(this,_t),xe=ht.call(this,nt),xe.onDestroy=function(dt){xe.props.onDestroy(dt)},xe.onKeyDown=function(dt){var Pt=dt.keyCode,tn=xe.menuInstance,ut=xe.props.store,qe=xe.getVisible();if(Pt===o.a.ENTER)return xe.onTitleClick(dt),la(ut,xe.props.eventKey,!0),!0;if(Pt===o.a.RIGHT)return qe?tn.onKeyDown(dt):(xe.triggerOpenChange(!0),la(ut,xe.props.eventKey,!0)),!0;if(Pt===o.a.LEFT){var Bt;if(qe)Bt=tn.onKeyDown(dt);else return;return Bt||(xe.triggerOpenChange(!1),Bt=!0),Bt}return qe&&(Pt===o.a.UP||Pt===o.a.DOWN)?tn.onKeyDown(dt):void 0},xe.onOpenChange=function(dt){xe.props.onOpenChange(dt)},xe.onPopupVisibleChange=function(dt){xe.triggerOpenChange(dt,dt?"mouseenter":"mouseleave")},xe.onMouseEnter=function(dt){var Pt=xe.props,tn=Pt.eventKey,ut=Pt.onMouseEnter,qe=Pt.store;la(qe,xe.props.eventKey,!1),ut({key:tn,domEvent:dt})},xe.onMouseLeave=function(dt){var Pt=xe.props,tn=Pt.parentMenu,ut=Pt.eventKey,qe=Pt.onMouseLeave;tn.subMenuInstance=Object(g.a)(xe),qe({key:ut,domEvent:dt})},xe.onTitleMouseEnter=function(dt){var Pt=xe.props,tn=Pt.eventKey,ut=Pt.onItemHover,qe=Pt.onTitleMouseEnter;ut({key:tn,hover:!0}),qe({key:tn,domEvent:dt})},xe.onTitleMouseLeave=function(dt){var Pt=xe.props,tn=Pt.parentMenu,ut=Pt.eventKey,qe=Pt.onItemHover,Bt=Pt.onTitleMouseLeave;tn.subMenuInstance=Object(g.a)(xe),qe({key:ut,hover:!1}),Bt({key:ut,domEvent:dt})},xe.onTitleClick=function(dt){var Pt=Object(g.a)(xe),tn=Pt.props;if(tn.onTitleClick({key:tn.eventKey,domEvent:dt}),tn.triggerSubMenuAction==="hover")return;xe.triggerOpenChange(!xe.getVisible(),"click"),la(tn.store,xe.props.eventKey,!1)},xe.onSubMenuClick=function(dt){typeof xe.props.onClick=="function"&&xe.props.onClick(xe.addKeyPath(dt))},xe.onSelect=function(dt){xe.props.onSelect(dt)},xe.onDeselect=function(dt){xe.props.onDeselect(dt)},xe.getPrefixCls=function(){return"".concat(xe.props.rootPrefixCls,"-submenu")},xe.getActiveClassName=function(){return"".concat(xe.getPrefixCls(),"-active")},xe.getDisabledClassName=function(){return"".concat(xe.getPrefixCls(),"-disabled")},xe.getSelectedClassName=function(){return"".concat(xe.getPrefixCls(),"-selected")},xe.getOpenClassName=function(){return"".concat(xe.props.rootPrefixCls,"-submenu-open")},xe.getVisible=function(){return xe.state.isOpen},xe.getMode=function(){return xe.state.mode},xe.saveMenuInstance=function(dt){xe.menuInstance=dt},xe.addKeyPath=function(dt){return Object(k.a)(Object(k.a)({},dt),{},{keyPath:(dt.keyPath||[]).concat(xe.props.eventKey)})},xe.triggerOpenChange=function(dt,Pt){var tn=xe.props.eventKey,ut=function(){xe.onOpenChange({key:tn,item:Object(g.a)(xe),trigger:Pt,open:dt})};Pt==="mouseenter"?xe.mouseenterTimeout=setTimeout(function(){ut()},0):ut()},xe.isChildrenSelected=function(){var dt={find:!1};return et(xe.props.children,xe.props.selectedKeys,dt),dt.find},xe.isInlineMode=function(){return xe.getMode()==="inline"},xe.adjustWidth=function(){if(!xe.subMenuTitle||!xe.menuInstance)return;var dt=wt.findDOMNode(xe.menuInstance);if(dt.offsetWidth>=xe.subMenuTitle.offsetWidth)return;dt.style.minWidth="".concat(xe.subMenuTitle.offsetWidth,"px")},xe.saveSubMenuTitle=function(dt){xe.subMenuTitle=dt},xe.getBaseProps=function(){var dt=Object(g.a)(xe),Pt=dt.props,tn=xe.getMode();return{mode:tn==="horizontal"?"vertical":tn,visible:xe.getVisible(),level:Pt.level+1,inlineIndent:Pt.inlineIndent,focusable:!1,onClick:xe.onSubMenuClick,onSelect:xe.onSelect,onDeselect:xe.onDeselect,onDestroy:xe.onDestroy,selectedKeys:Pt.selectedKeys,eventKey:"".concat(Pt.eventKey,"-menu-"),openKeys:Pt.openKeys,motion:Pt.motion,onOpenChange:xe.onOpenChange,subMenuOpenDelay:Pt.subMenuOpenDelay,parentMenu:Object(g.a)(xe),subMenuCloseDelay:Pt.subMenuCloseDelay,forceSubMenuRender:Pt.forceSubMenuRender,triggerSubMenuAction:Pt.triggerSubMenuAction,builtinPlacements:Pt.builtinPlacements,defaultActiveFirst:Pt.store.getState().defaultActiveFirst[we(Pt.eventKey)],multiple:Pt.multiple,prefixCls:Pt.rootPrefixCls,id:xe.internalMenuId,manualRef:xe.saveMenuInstance,itemIcon:Pt.itemIcon,expandIcon:Pt.expandIcon,direction:Pt.direction}},xe.getMotion=function(dt,Pt){var tn=Object(g.a)(xe),ut=tn.haveRendered,qe=xe.props,Bt=qe.motion,$t=qe.rootPrefixCls,cn=Object(k.a)(Object(k.a)({},Bt),{},{leavedClassName:"".concat($t,"-hidden"),removeOnLeave:!1,motionAppear:ut||!Pt||dt!=="inline"});return cn};var Ke=nt.store,Oe=nt.eventKey,ot=Ke.getState(),lt=ot.defaultActiveFirst;xe.isRootMenu=!1;var Tt=!1;return lt&&(Tt=lt[Oe]),la(Ke,Oe,Tt),xe.state={mode:nt.mode,isOpen:nt.isOpen},xe}return Object(b.a)(_t,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xe=this,Ke=this.props,Oe=Ke.mode,ot=Ke.parentMenu,lt=Ke.manualRef,Tt=Ke.isOpen,dt=function(){xe.setState({mode:Oe,isOpen:Tt})},Pt=Tt!==this.state.isOpen,tn=Oe!==this.state.mode;if((tn||Pt)&&(ft.a.cancel(this.updateStateRaf),tn?this.updateStateRaf=Object(ft.a)(dt):dt()),lt&<(this),Oe!=="horizontal"||!(ot==null?void 0:ot.isRootMenu)||!Tt)return;this.minWidthTimeout=setTimeout(function(){return xe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var xe=this.props,Ke=xe.onDestroy,Oe=xe.eventKey;Ke&&Ke(Oe),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ft.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(xe,Ke){var Oe=this.getBaseProps();return E.createElement(ws,Object(w.a)({},Oe,{id:this.internalMenuId,className:xe,style:Ke}),this.props.children)}},{key:"renderChildren",value:function(){var xe=this,Ke=this.getBaseProps(),Oe=Ke.mode,ot=Ke.visible,lt=Ke.forceSubMenuRender,Tt=Ke.direction,dt=this.getMotion(Oe,ot);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ot||lt,!this.haveOpened)return E.createElement("div",null);var Pt=M()("".concat(Ke.prefixCls,"-sub"),Object(q.a)({},"".concat(Ke.prefixCls,"-rtl"),Tt==="rtl"));return this.isInlineMode()?E.createElement(ge,Object(w.a)({visible:Ke.visible,forceRender:lt},dt),function(tn){var ut=tn.className,qe=tn.style,Bt=M()(Pt,ut);return xe.renderPopupMenu(Bt,qe)}):this.renderPopupMenu(Pt)}},{key:"render",value:function(){var xe,Ke,Oe,ot=Object(k.a)({},this.props),lt=this.getVisible(),Tt=this.getPrefixCls(),dt=this.isInlineMode(),Pt=this.getMode(),tn=M()(Tt,"".concat(Tt,"-").concat(Pt),(xe={},Object(q.a)(xe,ot.className,!!ot.className),Object(q.a)(xe,this.getOpenClassName(),lt),Object(q.a)(xe,this.getActiveClassName(),ot.active||lt&&!dt),Object(q.a)(xe,this.getDisabledClassName(),ot.disabled),Object(q.a)(xe,this.getSelectedClassName(),this.isChildrenSelected()),xe));this.internalMenuId||(ot.eventKey?this.internalMenuId="".concat(ot.eventKey,"$Menu"):(sa+=1,this.internalMenuId="$__$".concat(sa,"$Menu")));var ut={},qe={},Bt={};ot.disabled||(ut={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},qe={onClick:this.onTitleClick},Bt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var $t={},cn=ot.direction,Kt=cn==="rtl";dt&&(Kt?$t.paddingRight=ot.inlineIndent*ot.level:$t.paddingLeft=ot.inlineIndent*ot.level);var En={};this.getVisible()&&(En={"aria-owns":this.internalMenuId});var rn=null;Pt!=="horizontal"&&(rn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(rn=E.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var jt=E.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:$t,className:"".concat(Tt,"-title"),role:"button"},Bt,qe,{"aria-expanded":lt},En,{"aria-haspopup":"true",title:typeof ot.title=="string"?ot.title:void 0}),ot.title,rn||E.createElement("i",{className:"".concat(Tt,"-arrow")})),hn=this.renderChildren(),qt=((Ke=ot.parentMenu)===null||Ke===void 0?void 0:Ke.isRootMenu)?ot.parentMenu.props.getPopupContainer:function(Un){return Un.parentNode},bn=Mr[Pt],Fn=ot.popupOffset?{offset:ot.popupOffset}:{},Yt=M()((Oe={},Object(q.a)(Oe,ot.popupClassName,ot.popupClassName&&!dt),Object(q.a)(Oe,"".concat(Tt,"-rtl"),Kt),Oe)),Cn=ot.disabled,ln=ot.triggerSubMenuAction,wn=ot.subMenuOpenDelay,an=ot.forceSubMenuRender,Vt=ot.subMenuCloseDelay,Sn=ot.builtinPlacements;Le.forEach(function(Un){return delete ot[Un]}),delete ot.onClick;var Ar=Kt?Object(k.a)(Object(k.a)({},Yi),Sn):Object(k.a)(Object(k.a)({},Hi),Sn);delete ot.direction;var fn=this.getBaseProps(),Dn=dt?null:this.getMotion(fn.mode,fn.visible);return E.createElement("li",Object(w.a)({},ot,ut,{className:tn,role:"menuitem"}),E.createElement(bi,{prefixCls:Tt,popupClassName:M()("".concat(Tt,"-popup"),Yt),getPopupContainer:qt,builtinPlacements:Ar,popupPlacement:bn,popupVisible:dt?!1:lt,popupAlign:Fn,popup:dt?null:hn,action:Cn||dt?[]:[ln],mouseEnterDelay:wn,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:an,popupMotion:Dn},jt),dt?hn:null)}}]),_t}(E.Component);Yr.defaultProps={onMouseEnter:pe,onMouseLeave:pe,onTitleMouseEnter:pe,onTitleMouseLeave:pe,onTitleClick:pe,manualRef:pe,mode:"vertical",title:""};var ri=Object(f.b)(function(Je,ht){var _t=Je.openKeys,nt=Je.activeKey,xe=Je.selectedKeys,Ke=ht.eventKey,Oe=ht.subMenuKey;return{isOpen:_t.indexOf(Ke)>-1,active:nt[Oe]===Ke,selectedKeys:xe}})(Yr);ri.isSubMenu=!0;var ha=ri,mo="menuitem-overflowed",Ii=.5,ci=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(){var nt;return Object(L.a)(this,_t),nt=ht.apply(this,arguments),nt.resizeObserver=null,nt.mutationObserver=null,nt.originalTotalWidth=0,nt.overflowedItems=[],nt.menuItemSizes=[],nt.cancelFrameId=null,nt.state={lastVisibleIndex:void 0},nt.childRef=E.createRef(),nt.getMenuItemNodes=function(){var xe=nt.props.prefixCls,Ke=nt.childRef.current;return Ke?[].slice.call(Ke.children).filter(function(Oe){return Oe.className.split(" ").indexOf("".concat(xe,"-overflowed-submenu"))<0}):[]},nt.getOverflowedSubMenuItem=function(xe,Ke,Oe){var ot=nt.props,lt=ot.overflowedIndicator,Tt=ot.level,dt=ot.mode,Pt=ot.prefixCls,tn=ot.theme;if(Tt!==1||dt!=="horizontal")return null;var ut=nt.props.children[0],qe=ut.props,Bt=qe.children,$t=qe.title,cn=qe.style,Kt=Object(I.a)(qe,["children","title","style"]),En=Object(k.a)({},cn),rn="".concat(xe,"-overflowed-indicator"),jt="".concat(xe,"-overflowed-indicator");Ke.length===0&&Oe!==!0?En=Object(k.a)(Object(k.a)({},En),{},{display:"none"}):Oe&&(En=Object(k.a)(Object(k.a)({},En),{},{visibility:"hidden",position:"absolute"}),rn="".concat(rn,"-placeholder"),jt="".concat(jt,"-placeholder"));var hn=tn?"".concat(Pt,"-").concat(tn):"",qt={};return Le.forEach(function(bn){Kt[bn]!==void 0&&(qt[bn]=Kt[bn])}),E.createElement(ha,Object(w.a)({title:lt,className:"".concat(Pt,"-overflowed-submenu"),popupClassName:hn},qt,{key:rn,eventKey:jt,disabled:!1,style:En}),Ke)},nt.setChildrenWidthAndResize=function(){if(nt.props.mode!=="horizontal")return;var xe=nt.childRef.current;if(!xe)return;var Ke=xe.children;if(!Ke||Ke.length===0)return;var Oe=xe.children[Ke.length-1];Ze(Oe,"display","inline-block");var ot=nt.getMenuItemNodes(),lt=ot.filter(function(Tt){return Tt.className.split(" ").indexOf(mo)>=0});lt.forEach(function(Tt){Ze(Tt,"display","inline-block")}),nt.menuItemSizes=ot.map(function(Tt){return We(Tt,!0)}),lt.forEach(function(Tt){Ze(Tt,"display","none")}),nt.overflowedIndicatorWidth=We(xe.children[xe.children.length-1],!0),nt.originalTotalWidth=nt.menuItemSizes.reduce(function(Tt,dt){return Tt+dt},0),nt.handleResize(),Ze(Oe,"display","none")},nt.handleResize=function(){if(nt.props.mode!=="horizontal")return;var xe=nt.childRef.current;if(!xe)return;var Ke=We(xe);nt.overflowedItems=[];var Oe=0,ot;nt.originalTotalWidth>Ke+Ii&&(ot=-1,nt.menuItemSizes.forEach(function(lt){Oe+=lt,Oe+nt.overflowedIndicatorWidth<=Ke&&(ot+=1)})),nt.setState({lastVisibleIndex:ot})},nt}return Object(b.a)(_t,[{key:"componentDidMount",value:function(){var xe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ke=this.childRef.current;if(!Ke)return;this.resizeObserver=new bt.default(function(Oe){Oe.forEach(function(){var ot=xe.cancelFrameId;cancelAnimationFrame(ot),xe.cancelFrameId=requestAnimationFrame(xe.setChildrenWidthAndResize)})}),[].slice.call(Ke.children).concat(Ke).forEach(function(Oe){xe.resizeObserver.observe(Oe)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){xe.resizeObserver.disconnect(),[].slice.call(Ke.children).concat(Ke).forEach(function(Oe){xe.resizeObserver.observe(Oe)}),xe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ke,{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(xe){var Ke=this,Oe=this.state.lastVisibleIndex;return(xe||[]).reduce(function(ot,lt,Tt){var dt=lt;if(Ke.props.mode==="horizontal"){var Pt=Ke.getOverflowedSubMenuItem(lt.props.eventKey,[]);Oe!==void 0&&Ke.props.className.indexOf("".concat(Ke.props.prefixCls,"-root"))!==-1&&(Tt>Oe&&(dt=E.cloneElement(lt,{style:{display:"none"},eventKey:"".concat(lt.props.eventKey,"-hidden"),className:"".concat(mo)})),Tt===Oe+1&&(Ke.overflowedItems=xe.slice(Oe+1).map(function(ut){return E.cloneElement(ut,{key:ut.props.eventKey,mode:"vertical-left"})}),Pt=Ke.getOverflowedSubMenuItem(lt.props.eventKey,Ke.overflowedItems)));var tn=[].concat(Object(p.a)(ot),[Pt,dt]);return Tt===xe.length-1&&tn.push(Ke.getOverflowedSubMenuItem(lt.props.eventKey,[],!0)),tn}return[].concat(Object(p.a)(ot),[dt])},[])}},{key:"render",value:function(){var xe=this.props,Ke=xe.visible,Oe=xe.prefixCls,ot=xe.overflowedIndicator,lt=xe.mode,Tt=xe.level,dt=xe.tag,Pt=xe.children,tn=xe.theme,ut=Object(I.a)(xe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),qe=dt;return E.createElement(qe,Object(w.a)({ref:this.childRef},ut),this.renderChildren(Pt))}}]),_t}(E.Component);ci.defaultProps={tag:"div",className:""};var Wo=ci;function Lo(Je){return Je.length?Je.every(function(ht){return!!ht.props.disabled}):!0}function ii(Je,ht,_t){var nt=Je.getState();Je.setState({activeKey:Object(k.a)(Object(k.a)({},nt.activeKey),{},Object(q.a)({},ht,_t))})}function go(Je){return Je.eventKey||"0-menu-"}function no(Je,ht){var _t=ht,nt=Je.children,xe=Je.eventKey;if(_t){var Ke;if(je(nt,function(Oe,ot){Oe&&Oe.props&&!Oe.props.disabled&&_t===De(Oe,xe,ot)&&(Ke=!0)}),Ke)return _t}return _t=null,Je.defaultActiveFirst&&je(nt,function(Oe,ot){!_t&&Oe&&!Oe.props.disabled&&(_t=De(Oe,xe,ot))}),_t}function As(Je){if(!Je)return;var ht=this.instanceArray.indexOf(Je);ht!==-1?this.instanceArray[ht]=Je:this.instanceArray.push(Je)}var xo=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(nt){var xe;return Object(L.a)(this,_t),xe=ht.call(this,nt),xe.onKeyDown=function(Ke,Oe){var ot=Ke.keyCode,lt;if(xe.getFlatInstanceArray().forEach(function(dt){dt&&dt.props.active&&dt.onKeyDown&&(lt=dt.onKeyDown(Ke))}),lt)return 1;var Tt=null;return(ot===o.a.UP||ot===o.a.DOWN)&&(Tt=xe.step(ot===o.a.UP?-1:1)),Tt?(Ke.preventDefault(),ii(xe.props.store,go(xe.props),Tt.props.eventKey),typeof Oe=="function"&&Oe(Tt),1):void 0},xe.onItemHover=function(Ke){var Oe=Ke.key,ot=Ke.hover;ii(xe.props.store,go(xe.props),ot?Oe:null)},xe.onDeselect=function(Ke){xe.props.onDeselect(Ke)},xe.onSelect=function(Ke){xe.props.onSelect(Ke)},xe.onClick=function(Ke){xe.props.onClick(Ke)},xe.onOpenChange=function(Ke){xe.props.onOpenChange(Ke)},xe.onDestroy=function(Ke){xe.props.onDestroy(Ke)},xe.getFlatInstanceArray=function(){return xe.instanceArray},xe.step=function(Ke){var Oe=xe.getFlatInstanceArray(),ot=xe.props.store.getState().activeKey[go(xe.props)],lt=Oe.length;if(!lt)return null;Ke<0&&(Oe=Oe.concat().reverse());var Tt=-1;if(Oe.every(function(ut,qe){return ut&&ut.props.eventKey===ot?(Tt=qe,!1):!0}),!xe.props.defaultActiveFirst&&Tt!==-1&&Lo(Oe.slice(Tt,lt-1)))return;var dt=(Tt+1)%lt,Pt=dt;do{var tn=Oe[Pt];if(!tn||tn.props.disabled)Pt=(Pt+1)%lt;else return tn}while(Pt!==dt);return null},xe.renderCommonMenuItem=function(Ke,Oe,ot){var lt=xe.props.store.getState(),Tt=Object(g.a)(xe),dt=Tt.props,Pt=De(Ke,dt.eventKey,Oe),tn=Ke.props;if(!tn||typeof Ke.type=="string")return Ke;var ut=Pt===lt.activeKey,qe=Object(k.a)(Object(k.a)({mode:tn.mode||dt.mode,level:dt.level,inlineIndent:dt.inlineIndent,renderMenuItem:xe.renderMenuItem,rootPrefixCls:dt.prefixCls,index:Oe,parentMenu:dt.parentMenu,manualRef:tn.disabled?void 0:Object(h.a)(Ke.ref,As.bind(Object(g.a)(xe))),eventKey:Pt,active:!tn.disabled&&ut,multiple:dt.multiple,onClick:function($t){(tn.onClick||pe)($t),xe.onClick($t)},onItemHover:xe.onItemHover,motion:dt.motion,subMenuOpenDelay:dt.subMenuOpenDelay,subMenuCloseDelay:dt.subMenuCloseDelay,forceSubMenuRender:dt.forceSubMenuRender,onOpenChange:xe.onOpenChange,onDeselect:xe.onDeselect,onSelect:xe.onSelect,builtinPlacements:dt.builtinPlacements,itemIcon:tn.itemIcon||xe.props.itemIcon,expandIcon:tn.expandIcon||xe.props.expandIcon},ot),{},{direction:dt.direction});return(dt.mode==="inline"||$e())&&(qe.triggerSubMenuAction="click"),E.cloneElement(Ke,Object(k.a)(Object(k.a)({},qe),{},{key:Pt||Oe}))},xe.renderMenuItem=function(Ke,Oe,ot){if(!Ke)return null;var lt=xe.props.store.getState(),Tt={openKeys:lt.openKeys,selectedKeys:lt.selectedKeys,triggerSubMenuAction:xe.props.triggerSubMenuAction,subMenuKey:ot};return xe.renderCommonMenuItem(Ke,Oe,Tt)},nt.store.setState({activeKey:Object(k.a)(Object(k.a)({},nt.store.getState().activeKey),{},Object(q.a)({},nt.eventKey,no(nt,nt.activeKey)))}),xe.instanceArray=[],xe}return Object(b.a)(_t,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(xe){return this.props.visible||xe.visible||this.props.className!==xe.className||!P()(this.props.style,xe.style)}},{key:"componentDidUpdate",value:function(xe){var Ke=this.props,Oe="activeKey"in Ke?Ke.activeKey:Ke.store.getState().activeKey[go(Ke)],ot=no(Ke,Oe);if(ot!==Oe)ii(Ke.store,go(Ke),ot);else if("activeKey"in xe){var lt=no(xe,xe.activeKey);ot!==lt&&ii(Ke.store,go(Ke),ot)}}},{key:"render",value:function(){var xe=this,Ke=Object(w.a)({},this.props);this.instanceArray=[];var Oe=M()(Ke.prefixCls,Ke.className,"".concat(Ke.prefixCls,"-").concat(Ke.mode)),ot={className:Oe,role:Ke.role||"menu"};Ke.id&&(ot.id=Ke.id),Ke.focusable&&(ot.tabIndex=0,ot.onKeyDown=this.onKeyDown);var lt=Ke.prefixCls,Tt=Ke.eventKey,dt=Ke.visible,Pt=Ke.level,tn=Ke.mode,ut=Ke.overflowedIndicator,qe=Ke.theme;return Le.forEach(function(Bt){return delete Ke[Bt]}),delete Ke.onClick,E.createElement(Wo,Object(w.a)({},Ke,{prefixCls:lt,mode:tn,tag:"ul",level:Pt,theme:qe,visible:dt,overflowedIndicator:ut},ot),Object(x.a)(Ke.children).map(function(Bt,$t){return xe.renderMenuItem(Bt,$t,Tt||"0-menu-")}))}}]),_t}(E.Component);xo.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:pe};var Cs=Object(f.b)()(xo),ws=Cs,Ao=C("Kwbf");function hs(Je,ht,_t){var nt=Je.prefixCls,xe=Je.motion,Ke=Je.defaultMotions,Oe=Ke===void 0?{}:Ke,ot=Je.openAnimation,lt=Je.openTransitionName,Tt=ht.switchingModeFromInline;if(xe)return xe;if(Object(N.a)(ot)==="object"&&ot)Object(Ao.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ot=="string")return{motionName:"".concat(nt,"-open-").concat(ot)};if(lt)return{motionName:lt};var dt=Oe[_t];return dt||(Tt?null:Oe.other)}var mr=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(nt){var xe;Object(L.a)(this,_t),xe=ht.call(this,nt),xe.onSelect=function(ot){var lt=Object(g.a)(xe),Tt=lt.props;if(Tt.selectable){var dt=xe.store.getState(),Pt=dt.selectedKeys,tn=ot.key;Tt.multiple?Pt=Pt.concat([tn]):Pt=[tn],"selectedKeys"in Tt||xe.store.setState({selectedKeys:Pt}),Tt.onSelect(Object(k.a)(Object(k.a)({},ot),{},{selectedKeys:Pt}))}},xe.onClick=function(ot){var lt=xe.getRealMenuMode(),Tt=Object(g.a)(xe),dt=Tt.store,Pt=Tt.props.onOpenChange;lt!=="inline"&&!("openKeys"in xe.props)&&(dt.setState({openKeys:[]}),Pt([])),xe.props.onClick(ot)},xe.onKeyDown=function(ot,lt){xe.innerMenu.getWrappedInstance().onKeyDown(ot,lt)},xe.onOpenChange=function(ot){var lt=Object(g.a)(xe),Tt=lt.props,dt=xe.store.getState().openKeys.concat(),Pt=!1,tn=function(qe){var Bt=!1;if(qe.open)Bt=dt.indexOf(qe.key)===-1,Bt&&dt.push(qe.key);else{var $t=dt.indexOf(qe.key);Bt=$t!==-1,Bt&&dt.splice($t,1)}Pt=Pt||Bt};Array.isArray(ot)?ot.forEach(tn):tn(ot),Pt&&("openKeys"in xe.props||xe.store.setState({openKeys:dt}),Tt.onOpenChange(dt))},xe.onDeselect=function(ot){var lt=Object(g.a)(xe),Tt=lt.props;if(Tt.selectable){var dt=xe.store.getState().selectedKeys.concat(),Pt=ot.key,tn=dt.indexOf(Pt);tn!==-1&&dt.splice(tn,1),"selectedKeys"in Tt||xe.store.setState({selectedKeys:dt}),Tt.onDeselect(Object(k.a)(Object(k.a)({},ot),{},{selectedKeys:dt}))}},xe.onMouseEnter=function(ot){xe.restoreModeVerticalFromInline();var lt=xe.props.onMouseEnter;lt&<(ot)},xe.onTransitionEnd=function(ot){var lt=ot.propertyName==="width"&&ot.target===ot.currentTarget,Tt=ot.target.className,dt=Object.prototype.toString.call(Tt)==="[object SVGAnimatedString]"?Tt.animVal:Tt,Pt=ot.propertyName==="font-size"&&dt.indexOf("anticon")>=0;(lt||Pt)&&xe.restoreModeVerticalFromInline()},xe.setInnerMenu=function(ot){xe.innerMenu=ot},xe.isRootMenu=!0;var Ke=nt.defaultSelectedKeys,Oe=nt.defaultOpenKeys;return"selectedKeys"in nt&&(Ke=nt.selectedKeys||[]),"openKeys"in nt&&(Oe=nt.openKeys||[]),xe.store=Object(f.c)({selectedKeys:Ke,openKeys:Oe,activeKey:{"0-menu-":no(nt,nt.activeKey)}}),xe.state={switchingModeFromInline:!1,prevProps:nt,inlineOpenKeys:[],store:xe.store},xe}return Object(b.a)(_t,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(xe){var Ke=this.props,Oe=Ke.siderCollapsed,ot=Ke.inlineCollapsed,lt=Ke.onOpenChange;(!xe.inlineCollapsed&&ot||!xe.siderCollapsed&&Oe)&<([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var xe=this.props.collapsedWidth,Ke=this.store,Oe=this.prevOpenKeys,ot=this.getInlineCollapsed()&&(xe===0||xe==="0"||xe==="0px");ot?(this.prevOpenKeys=Ke.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Oe&&(this.store.setState({openKeys:Oe}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var xe=this.props.mode,Ke=this.state.switchingModeFromInline,Oe=this.getInlineCollapsed();return Ke&&Oe?"inline":Oe?"vertical":xe}},{key:"getInlineCollapsed",value:function(){var xe=this.props,Ke=xe.inlineCollapsed,Oe=xe.siderCollapsed;return Oe!==void 0?Oe:Ke}},{key:"restoreModeVerticalFromInline",value:function(){var xe=this.state.switchingModeFromInline;xe&&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 xe=Object(k.a)({},Object(y.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ke=this.getRealMenuMode();return xe.className+=" ".concat(xe.prefixCls,"-root"),xe.direction==="rtl"&&(xe.className+=" ".concat(xe.prefixCls,"-rtl")),xe=Object(k.a)(Object(k.a)({},xe),{},{mode:Ke,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:hs(this.props,this.state,Ke)}),delete xe.openAnimation,delete xe.openTransitionName,E.createElement(f.a,{store:this.store},E.createElement(ws,Object(w.a)({},xe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(xe,Ke){var Oe=Ke.prevProps,ot=Ke.store,lt=ot.getState(),Tt={},dt={prevProps:xe};return Oe.mode==="inline"&&xe.mode!=="inline"&&(dt.switchingModeFromInline=!0),"openKeys"in xe?Tt.openKeys=xe.openKeys||[]:((xe.inlineCollapsed&&!Oe.inlineCollapsed||xe.siderCollapsed&&!Oe.siderCollapsed)&&(dt.switchingModeFromInline=!0,dt.inlineOpenKeys=lt.openKeys,Tt.openKeys=[]),(!xe.inlineCollapsed&&Oe.inlineCollapsed||!xe.siderCollapsed&&Oe.siderCollapsed)&&(Tt.openKeys=Ke.inlineOpenKeys,dt.inlineOpenKeys=[])),Object.keys(Tt).length&&ot.setState(Tt),dt}}]),_t}(E.Component);mr.defaultProps={selectable:!0,onClick:pe,onSelect:pe,onOpenChange:pe,onDeselect:pe,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:E.createElement("span",null,"\xB7\xB7\xB7")};var Wr=mr,ur=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(){var nt;return Object(L.a)(this,_t),nt=ht.apply(this,arguments),nt.onKeyDown=function(xe){var Ke=xe.keyCode;return Ke===o.a.ENTER?(nt.onClick(xe),!0):void 0},nt.onMouseLeave=function(xe){var Ke=nt.props,Oe=Ke.eventKey,ot=Ke.onItemHover,lt=Ke.onMouseLeave;ot({key:Oe,hover:!1}),lt({key:Oe,domEvent:xe})},nt.onMouseEnter=function(xe){var Ke=nt.props,Oe=Ke.eventKey,ot=Ke.onItemHover,lt=Ke.onMouseEnter;ot({key:Oe,hover:!0}),lt({key:Oe,domEvent:xe})},nt.onClick=function(xe){var Ke=nt.props,Oe=Ke.eventKey,ot=Ke.multiple,lt=Ke.onClick,Tt=Ke.onSelect,dt=Ke.onDeselect,Pt=Ke.isSelected,tn={key:Oe,keyPath:[Oe],item:Object(g.a)(nt),domEvent:xe};lt(tn),ot?Pt?dt(tn):Tt(tn):Pt||Tt(tn)},nt.saveNode=function(xe){nt.node=xe},nt}return Object(b.a)(_t,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var xe=this.props;xe.onDestroy&&xe.onDestroy(xe.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 xe,Ke=Object(k.a)({},this.props),Oe=M()(this.getPrefixCls(),Ke.className,(xe={},Object(q.a)(xe,this.getActiveClassName(),!Ke.disabled&&Ke.active),Object(q.a)(xe,this.getSelectedClassName(),Ke.isSelected),Object(q.a)(xe,this.getDisabledClassName(),Ke.disabled),xe)),ot=Object(k.a)(Object(k.a)({},Ke.attribute),{},{title:typeof Ke.title=="string"?Ke.title:void 0,className:Oe,role:Ke.role||"menuitem","aria-disabled":Ke.disabled});Ke.role==="option"?ot=Object(k.a)(Object(k.a)({},ot),{},{role:"option","aria-selected":Ke.isSelected}):(Ke.role===null||Ke.role==="none")&&(ot.role="none");var lt={onClick:Ke.disabled?null:this.onClick,onMouseLeave:Ke.disabled?null:this.onMouseLeave,onMouseEnter:Ke.disabled?null:this.onMouseEnter},Tt=Object(k.a)({},Ke.style);Ke.mode==="inline"&&(Ke.direction==="rtl"?Tt.paddingRight=Ke.inlineIndent*Ke.level:Tt.paddingLeft=Ke.inlineIndent*Ke.level),Le.forEach(function(Pt){return delete Ke[Pt]}),delete Ke.direction;var dt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(dt=E.createElement(this.props.itemIcon,this.props)),E.createElement("li",Object(w.a)({},Object(y.a)(Ke,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ot,lt,{style:Tt,ref:this.saveNode}),Ke.children,dt)}}]),_t}(E.Component);ur.isMenuItem=!0,ur.defaultProps={onSelect:pe,onMouseEnter:pe,onMouseLeave:pe,manualRef:pe};var aa=Object(f.b)(function(Je,ht){var _t=Je.activeKey,nt=Je.selectedKeys,xe=ht.eventKey,Ke=ht.subMenuKey;return{active:_t[Ke]===xe,isSelected:Array.isArray(nt)?nt.indexOf(xe)!==-1:nt===xe}})(ur),Ea=aa,ei=function(Je){Object(i.a)(_t,Je);var ht=Object(u.a)(_t);function _t(){var nt;return Object(L.a)(this,_t),nt=ht.apply(this,arguments),nt.renderInnerMenuItem=function(xe){var Ke=nt.props,Oe=Ke.renderMenuItem,ot=Ke.index;return Oe(xe,ot,nt.props.subMenuKey)},nt}return Object(b.a)(_t,[{key:"render",value:function(){var xe=Object(w.a)({},this.props),Ke=xe.className,Oe=Ke===void 0?"":Ke,ot=xe.rootPrefixCls,lt="".concat(ot,"-item-group-title"),Tt="".concat(ot,"-item-group-list"),dt=xe.title,Pt=xe.children;return Le.forEach(function(tn){return delete xe[tn]}),delete xe.direction,E.createElement("li",Object(w.a)({},xe,{onClick:function(ut){return ut.stopPropagation()},className:"".concat(Oe," ").concat(ot,"-item-group")}),E.createElement("div",{className:lt,title:typeof dt=="string"?dt:void 0},dt),E.createElement("ul",{className:Tt},E.Children.map(Pt,this.renderInnerMenuItem)))}}]),_t}(E.Component);ei.isMenuItemGroup=!0,ei.defaultProps={disabled:!0};var Ta=ei,Ui=function(ht){var _t=ht.className,nt=ht.rootPrefixCls,xe=ht.style;return E.createElement("li",{className:"".concat(_t," ").concat(nt,"-item-divider"),style:xe})};Ui.defaultProps={disabled:!0,className:"",style:{}};var Ia=Ui,_a=Wr,Po=C("eDIo");function Za(Je,ht){var _t=Je.prefixCls,nt=Je.editable,xe=Je.locale,Ke=Je.style;return!nt||nt.showAdd===!1?null:E.createElement("button",{ref:ht,type:"button",className:"".concat(_t,"-nav-add"),style:Ke,"aria-label":(xe==null?void 0:xe.addAriaLabel)||"Add tab",onClick:function(ot){nt.onEdit("add",{event:ot})}},nt.addIcon||"+")}var ro=E.forwardRef(Za);function so(Je,ht){var _t=Je.prefixCls,nt=Je.id,xe=Je.tabs,Ke=Je.locale,Oe=Je.mobile,ot=Je.moreIcon,lt=ot===void 0?"More":ot,Tt=Je.moreTransitionName,dt=Je.style,Pt=Je.className,tn=Je.editable,ut=Je.tabBarGutter,qe=Je.rtl,Bt=Je.onTabClick,$t=Object(E.useState)(!1),cn=Object(K.a)($t,2),Kt=cn[0],En=cn[1],rn=Object(E.useState)(null),jt=Object(K.a)(rn,2),hn=jt[0],qt=jt[1],bn="".concat(nt,"-more-popup"),Fn="".concat(_t,"-dropdown"),Yt=hn!==null?"".concat(bn,"-").concat(hn):null,Cn=Ke==null?void 0:Ke.dropdownAriaLabel,ln=E.createElement(_a,{onClick:function(Dn){var Un=Dn.key,Gn=Dn.domEvent;Bt(Un,Gn),En(!1)},id:bn,tabIndex:-1,role:"listbox","aria-activedescendant":Yt,selectedKeys:[hn],"aria-label":Cn!==void 0?Cn:"expanded dropdown"},xe.map(function(fn){return E.createElement(Ea,{key:fn.key,id:"".concat(bn,"-").concat(fn.key),role:"option","aria-controls":nt&&"".concat(nt,"-panel-").concat(fn.key),disabled:fn.disabled},fn.tab)}));function wn(fn){for(var Dn=xe.filter(function(or){return!or.disabled}),Un=Dn.findIndex(function(or){return or.key===hn})||0,Gn=Dn.length,vn=0;vnSn?(an=ln,bn.current="x"):(an=wn,bn.current="y");var Ar=Date.now();Ar-hn.current>100&&(qt.current=!1),(ht(-an,-an)||qt.current)&&(Cn.preventDefault(),qt.current=!0),hn.current=Ar}var Yt=Object(E.useRef)(null);Yt.current={onTouchStart:En,onTouchMove:rn,onTouchEnd:jt,onWheel:Fn},E.useEffect(function(){function Cn(Vt){Yt.current.onTouchStart(Vt)}function ln(Vt){Yt.current.onTouchMove(Vt)}function wn(Vt){Yt.current.onTouchEnd(Vt)}function an(Vt){Yt.current.onWheel(Vt)}return document.addEventListener("touchmove",ln,{passive:!1}),document.addEventListener("touchend",wn,{passive:!1}),Je.current.addEventListener("touchstart",Cn,{passive:!1}),Je.current.addEventListener("wheel",an),function(){document.removeEventListener("touchmove",ln),document.removeEventListener("touchend",wn)}},[])}function Xs(){var Je=Object(E.useRef)(new Map);function ht(nt){return Je.current.has(nt)||Je.current.set(nt,E.createRef()),Je.current.get(nt)}function _t(nt){Je.current.delete(nt)}return[ht,_t]}function Ys(Je,ht){var _t=E.useRef(Je),nt=E.useState({}),xe=Object(K.a)(nt,2),Ke=xe[1];function Oe(ot){var lt=typeof ot=="function"?ot(_t.current):ot;lt!==_t.current&&ht(lt,_t.current),_t.current=lt,Ke({})}return[_t.current,Oe]}var il=function(ht){var _t=ht.position,nt=ht.prefixCls,xe=ht.extra;if(!xe)return null;var Ke,Oe=xe;return _t==="right"&&(Ke=Oe.right||!Oe.left&&Oe||null),_t==="left"&&(Ke=Oe.left||null),Ke?E.createElement("div",{className:"".concat(nt,"-extra-content")},Ke):null};function ml(Je,ht){var _t,nt=E.useContext(Vs),xe=nt.prefixCls,Ke=nt.tabs,Oe=Je.className,ot=Je.style,lt=Je.id,Tt=Je.animated,dt=Je.activeKey,Pt=Je.rtl,tn=Je.extra,ut=Je.editable,qe=Je.locale,Bt=Je.tabPosition,$t=Je.tabBarGutter,cn=Je.children,Kt=Je.onTabClick,En=Je.onTabScroll,rn=Object(E.useRef)(),jt=Object(E.useRef)(),hn=Object(E.useRef)(),qt=Object(E.useRef)(),bn=Xs(),Fn=Object(K.a)(bn,2),Yt=Fn[0],Cn=Fn[1],ln=Bt==="top"||Bt==="bottom",wn=Ys(0,function(xa,oa){ln&&En&&En({direction:xa>oa?"left":"right"})}),an=Object(K.a)(wn,2),Vt=an[0],Sn=an[1],Ar=Ys(0,function(xa,oa){!ln&&En&&En({direction:xa>oa?"top":"bottom"})}),fn=Object(K.a)(Ar,2),Dn=fn[0],Un=fn[1],Gn=Object(E.useState)(0),vn=Object(K.a)(Gn,2),Kn=vn[0],or=vn[1],gr=Object(E.useState)(0),Lr=Object(K.a)(gr,2),er=Lr[0],rr=Lr[1],Dr=Object(E.useState)(0),Er=Object(K.a)(Dr,2),_r=Er[0],ia=Er[1],ea=Object(E.useState)(0),tr=Object(K.a)(ea,2),vr=tr[0],ka=tr[1],ra=Object(E.useState)(null),Yn=Object(K.a)(ra,2),mn=Yn[0],yr=Yn[1],oi=Object(E.useState)(null),Cr=Object(K.a)(oi,2),Rr=Cr[0],fr=Cr[1],ar=Object(E.useState)(0),Mn=Object(K.a)(ar,2),Ln=Mn[0],pn=Mn[1],qn=Object(E.useState)(0),ta=Object(K.a)(qn,2),cr=ta[0],Nr=ta[1],Da=a(new Map),ua=Object(K.a)(Da,2),va=ua[0],ca=ua[1],Ca=m(Ke,va,Kn),Oa="".concat(xe,"-nav-operations-hidden"),Ma=0,Fr=0;ln?Pt?(Ma=0,Fr=Math.max(0,Kn-mn)):(Ma=Math.min(0,mn-Kn),Fr=0):(Ma=Math.min(0,Rr-er),Fr=0);function Qa(xa){return xaFr?[Fr,!1]:[xa,!0]}var ya=Object(E.useRef)(),Ka=Object(E.useState)(),di=Object(K.a)(Ka,2),Ji=di[0],Di=di[1];function Ei(){Di(Date.now())}function Uo(){window.clearTimeout(ya.current)}Ts(rn,function(xa,oa){var Ci=!1;function Zi(Oo,co){Oo(function(No){var Wi=Qa(No+co),Ai=Object(K.a)(Wi,2),Vo=Ai[0],Pn=Ai[1];return Ci=Pn,Vo})}if(ln){if(mn>=Kn)return Ci;Zi(Sn,xa)}else{if(Rr>=er)return Ci;Zi(Un,oa)}return Uo(),Ei(),Ci}),Object(E.useEffect)(function(){return Uo(),Ji&&(ya.current=window.setTimeout(function(){Di(0)},100)),Uo},[Ji]);function ho(){var xa=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dt,oa=Ca.get(xa);if(!oa)return;if(ln){var Ci=Vt;Pt?oa.rightVt+mn&&(Ci=oa.right+oa.width-mn):oa.left<-Vt?Ci=-oa.left:oa.left+oa.width>-Vt+mn&&(Ci=-(oa.left+oa.width-mn)),Un(0),Sn(Qa(Ci)[0])}else{var Zi=Dn;oa.top<-Dn?Zi=-oa.top:oa.top+oa.height>-Dn+Rr&&(Zi=-(oa.top+oa.height-Rr)),Sn(0),Un(Qa(Zi)[0])}}var _o=R(Ca,{width:mn,height:Rr,left:Vt,top:Dn},{width:_r,height:vr},{width:Ln,height:cr},Object(k.a)(Object(k.a)({},Je),{},{tabs:Ke})),as=Object(K.a)(_o,2),fs=as[0],is=as[1],os=Ke.map(function(xa){var oa=xa.key;return E.createElement(A,{id:lt,prefixCls:xe,key:oa,rtl:Pt,tab:xa,closable:xa.closable,editable:ut,active:oa===dt,tabPosition:Bt,tabBarGutter:$t,renderWrapper:cn,removeAriaLabel:qe==null?void 0:qe.removeAriaLabel,ref:Yt(oa),onClick:function(Zi){Kt(oa,Zi)},onRemove:function(){Cn(oa)},onFocus:function(){ho(oa),Ei(),Pt||(rn.current.scrollLeft=0),rn.current.scrollTop=0}})}),So=s(function(){var xa,oa,Ci,Zi,Oo,co,No,Wi,Ai,Vo=((xa=rn.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Pn=((oa=rn.current)===null||oa===void 0?void 0:oa.offsetHeight)||0,ts=((Ci=qt.current)===null||Ci===void 0?void 0:Ci.offsetWidth)||0,lo=((Zi=qt.current)===null||Zi===void 0?void 0:Zi.offsetHeight)||0,Fa=((Oo=hn.current)===null||Oo===void 0?void 0:Oo.offsetWidth)||0,Ni=((co=hn.current)===null||co===void 0?void 0:co.offsetHeight)||0;yr(Vo),fr(Pn),pn(ts),Nr(lo);var wi=(((No=jt.current)===null||No===void 0?void 0:No.offsetWidth)||0)-ts,Bo=(((Wi=jt.current)===null||Wi===void 0?void 0:Wi.offsetHeight)||0)-lo;or(wi),rr(Bo);var Ti=(Ai=hn.current)===null||Ai===void 0?void 0:Ai.className.includes(Oa);ia(wi-(Ti?0:Fa)),ka(Bo-(Ti?0:Ni)),ca(function(){var ko=new Map;return Ke.forEach(function(ns){var ms=ns.key,Xo=Yt(ms).current;Xo&&ko.set(ms,{width:Xo.offsetWidth,height:Xo.offsetHeight,left:Xo.offsetLeft,top:Xo.offsetTop})}),ko})}),ps=Ke.slice(0,fs),Qi=Ke.slice(is+1),da=[].concat(Object(p.a)(ps),Object(p.a)(Qi)),_i=Object(E.useState)(),gi=Object(K.a)(_i,2),vo=gi[0],uo=gi[1],Ki=Ca.get(dt),ss=Object(E.useRef)();function ls(){t.a.cancel(ss.current)}Object(E.useEffect)(function(){var xa={};return Ki&&(ln?(Pt?xa.right=Ki.right:xa.left=Ki.left,xa.width=Ki.width):(xa.top=Ki.top,xa.height=Ki.height)),ls(),ss.current=t()(function(){uo(xa)}),ls},[Ki,ln,Pt]),Object(E.useEffect)(function(){ho()},[dt,Ki,Ca,ln]),Object(E.useEffect)(function(){So()},[Pt,$t,dt,Ke.map(function(xa){return xa.key}).join("_")]);var qo=!!da.length,fo="".concat(xe,"-nav-wrap"),zo,yo,es,Go;return ln?Pt?(yo=Vt>0,zo=Vt+mn` "'(~:]+/,a=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,o=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,A=" ";function l(F,D,z){return D.f=D.inline=z,z(F,D)}function m(F,D,z){return D.f=D.block=z,z(F,D)}function _(F){return!F||!/\S/.test(F.string)}function R(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==L){var D=E;if(!D){var z=q.innerMode(k,F.htmlState);D=z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText}D&&(F.f=u,F.block=w,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function w(F,D){var z=F.column()===D.indentation,j=_(D.prevLine.stream),Z=D.indentedCode,te=D.prevLine.hr,Ae=D.list!==!1,he=(D.listStack[D.listStack.length-1]||0)+3;D.indentedCode=!1;var ce=D.indentation;if(D.indentationDiff===null&&(D.indentationDiff=D.indentation,Ae)){for(D.list=null;ce=4&&(Z||D.prevLine.fencedCodeEnd||D.prevLine.header||j))return F.skipToEnd(),D.indentedCode=!0,M.code;if(F.eatSpace())return null;if(z&&D.indentation<=he&&(ue=F.match(t))&&ue[1].length<=6)return D.quote=0,D.header=ue[1].length,D.thisLine.header=!0,I.highlightFormatting&&(D.formatting="header"),D.f=D.inline,g(D);if(D.indentation<=he&&F.eat(">"))return D.quote=z?1:D.quote+1,I.highlightFormatting&&(D.formatting="quote"),F.eatSpace(),g(D);if(!ve&&!D.setext&&z&&D.indentation<=he&&(ue=F.match(p))){var fe=ue[1]?"ol":"ul";return D.indentation=ce+F.current().length,D.list=!0,D.quote=0,D.listStack.push(D.indentation),D.em=!1,D.strong=!1,D.code=!1,D.strikethrough=!1,I.taskLists&&F.match(r,!1)&&(D.taskList=!0),D.f=D.inline,I.highlightFormatting&&(D.formatting=["list","list-"+fe]),g(D)}else{if(z&&D.indentation<=he&&(ue=F.match(a,!0)))return D.quote=0,D.fencedEndRE=new RegExp(ue[1]+"+ *$"),D.localMode=I.fencedCodeBlockHighlighting&&B(ue[2]||I.fencedCodeBlockDefaultMode),D.localMode&&(D.localState=q.startState(D.localMode)),D.f=D.block=b,I.highlightFormatting&&(D.formatting="code-block"),D.code=-1,g(D);if(D.setext||(!ae||!Ae)&&!D.quote&&D.list===!1&&!D.code&&!ve&&!o.test(F.string)&&(ue=F.lookAhead(1))&&(ue=ue.match(c)))return D.setext?(D.header=D.setext,D.setext=0,F.skipToEnd(),I.highlightFormatting&&(D.formatting="header")):(D.header=ue[0].charAt(0)=="="?1:2,D.setext=D.header),D.thisLine.header=!0,D.f=D.inline,g(D);if(ve)return F.skipToEnd(),D.hr=!0,D.thisLine.hr=!0,M.hr;if(F.peek()==="[")return l(F,D,P)}return l(F,D,D.inline)}function L(F,D){var z=k.token(F,D.htmlState);if(!E){var j=q.innerMode(k,D.htmlState);(j.mode.name=="xml"&&j.state.tagStart===null&&!j.state.context&&j.state.tokenize.isInText||D.md_inside&&F.current().indexOf(">")>-1)&&(D.f=u,D.block=w,D.htmlState=null)}return z}function b(F,D){var z=D.listStack[D.listStack.length-1]||0,j=D.indentation=F.quote?D.push(M.formatting+"-"+F.formatting[z]+"-"+F.quote):D.push("error"))}if(F.taskOpen)return D.push("meta"),D.length?D.join(" "):null;if(F.taskClosed)return D.push("property"),D.length?D.join(" "):null;if(F.linkHref?D.push(M.linkHref,"url"):(F.strong&&D.push(M.strong),F.em&&D.push(M.em),F.strikethrough&&D.push(M.strikethrough),F.emoji&&D.push(M.emoji),F.linkText&&D.push(M.linkText),F.code&&D.push(M.code),F.image&&D.push(M.image),F.imageAltText&&D.push(M.imageAltText,"link"),F.imageMarker&&D.push(M.imageMarker)),F.header&&D.push(M.header,M.header+"-"+F.header),F.quote&&(D.push(M.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=F.quote?D.push(M.quote+"-"+F.quote):D.push(M.quote+"-"+I.maxBlockquoteDepth)),F.list!==!1){var j=(F.listStack.length-1)%3;j?j===1?D.push(M.list2):D.push(M.list3):D.push(M.list1)}return F.trailingSpaceNewLine?D.push("trailing-space-new-line"):F.trailingSpace&&D.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),D.length?D.join(" "):null}function i(F,D){return F.match(s,!0)?g(D):void 0}function u(F,D){var z=D.text(F,D);if(typeof z!="undefined")return z;if(D.list)return D.list=null,g(D);if(D.taskList){var j=F.match(r,!0)[1]===" ";return j?D.taskOpen=!0:D.taskClosed=!0,I.highlightFormatting&&(D.formatting="task"),D.taskList=!1,g(D)}if(D.taskOpen=!1,D.taskClosed=!1,D.header&&F.match(/^#+$/,!0))return I.highlightFormatting&&(D.formatting="header"),g(D);var Z=F.next();if(D.linkTitle){D.linkTitle=!1;var te=Z;Z==="("&&(te=")"),te=(te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+te+"\\\\]+|\\\\\\\\|\\\\.)"+te;if(F.match(new RegExp(Ae),!0))return M.linkHref}if(Z==="`"){var he=D.formatting;I.highlightFormatting&&(D.formatting="code"),F.eatWhile("`");var ce=F.current().length;if(D.code==0&&(!D.quote||ce==1))return D.code=ce,g(D);if(ce==D.code){var ae=g(D);return D.code=0,ae}else return D.formatting=he,g(D)}else if(D.code)return g(D);if(Z==="\\"&&(F.next(),I.highlightFormatting)){var ve=g(D),ue=M.formatting+"-escape";return ve?ve+" "+ue:ue}if(Z==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return D.imageMarker=!0,D.image=!0,I.highlightFormatting&&(D.formatting="image"),g(D);if(Z==="["&&D.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return D.imageMarker=!1,D.imageAltText=!0,I.highlightFormatting&&(D.formatting="image"),g(D);if(Z==="]"&&D.imageAltText){I.highlightFormatting&&(D.formatting="image");var ve=g(D);return D.imageAltText=!1,D.image=!1,D.inline=D.f=y,ve}if(Z==="["&&!D.image)return D.linkText&&F.match(/^.*?\]/)||(D.linkText=!0,I.highlightFormatting&&(D.formatting="link")),g(D);if(Z==="]"&&D.linkText){I.highlightFormatting&&(D.formatting="link");var ve=g(D);return D.linkText=!1,D.inline=D.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?y:u,ve}if(Z==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=f,I.highlightFormatting&&(D.formatting="link");var ve=g(D);return ve?ve+=" ":ve="",ve+M.linkInline}if(Z==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=f,I.highlightFormatting&&(D.formatting="link");var ve=g(D);return ve?ve+=" ":ve="",ve+M.linkEmail}if(I.xml&&Z==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var fe=F.string.indexOf(">",F.pos);if(fe!=-1){var se=F.string.substring(F.start,fe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(se)&&(D.md_inside=!0)}return F.backUp(1),D.htmlState=q.startState(k),m(F,D,L)}if(I.xml&&Z==="<"&&F.match(/^\/\w*?>/))return D.md_inside=!1,"tag";if(Z==="*"||Z==="_"){for(var me=1,re=F.pos==1?" ":F.string.charAt(F.pos-2);me<3&&F.eat(Z);)me++;var pe=F.peek()||" ",De=!/\s/.test(pe)&&(!d.test(pe)||/\s/.test(re)||d.test(re)),we=!/\s/.test(re)&&(!d.test(re)||/\s/.test(pe)||d.test(pe)),je=null,et=null;if(me%2&&(!D.em&&De&&(Z==="*"||!we||d.test(re))?je=!0:D.em==Z&&we&&(Z==="*"||!De||d.test(pe))&&(je=!1)),me>1&&(!D.strong&&De&&(Z==="*"||!we||d.test(re))?et=!0:D.strong==Z&&we&&(Z==="*"||!De||d.test(pe))&&(et=!1)),et!=null||je!=null){I.highlightFormatting&&(D.formatting=je==null?"strong":et==null?"em":"strong em"),je===!0&&(D.em=Z),et===!0&&(D.strong=Z);var ae=g(D);return je===!1&&(D.em=!1),et===!1&&(D.strong=!1),ae}}else if(Z===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return g(D);F.backUp(1)}if(I.strikethrough){if(Z==="~"&&F.eatWhile(Z)){if(D.strikethrough){I.highlightFormatting&&(D.formatting="strikethrough");var ae=g(D);return D.strikethrough=!1,ae}else if(F.match(/^[^\s]/,!1))return D.strikethrough=!0,I.highlightFormatting&&(D.formatting="strikethrough"),g(D)}else if(Z===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return g(D);F.backUp(2)}}if(I.emoji&&Z===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){D.emoji=!0,I.highlightFormatting&&(D.formatting="emoji");var Le=g(D);return D.emoji=!1,Le}return Z===" "&&(F.match(/^ +$/,!1)?D.trailingSpace++:D.trailingSpace&&(D.trailingSpaceNewLine=!0)),g(D)}function f(F,D){var z=F.next();if(z===">"){D.f=D.inline=u,I.highlightFormatting&&(D.formatting="link");var j=g(D);return j?j+=" ":j="",j+M.linkInline}return F.match(/^[^>]+/,!0),M.linkInline}function y(F,D){if(F.eatSpace())return null;var z=F.next();return z==="("||z==="["?(D.f=D.inline=v(z==="("?")":"]"),I.highlightFormatting&&(D.formatting="link-string"),D.linkHref=!0,g(D)):"error"}var h={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(F){return function(D,z){var j=D.next();if(j===F){z.f=z.inline=u,I.highlightFormatting&&(z.formatting="link-string");var Z=g(z);return z.linkHref=!1,Z}return D.match(h[F]),z.linkHref=!0,g(z)}}function P(F,D){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(D.f=N,F.next(),I.highlightFormatting&&(D.formatting="link"),D.linkText=!0,g(D)):l(F,D,u)}function N(F,D){if(F.match(/^\]:/,!0)){D.f=D.inline=Q,I.highlightFormatting&&(D.formatting="link");var z=g(D);return D.linkText=!1,z}return F.match(/^([^\]\\]|\\.)+/,!0),M.linkText}function Q(F,D){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?D.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),D.f=D.inline=u,M.linkHref+" url")}var G={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:u,text:i,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(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&q.copyState(k,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?q.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,D){if(D.formatting=!1,F!=D.thisLine.stream){if(D.header=0,D.hr=!1,F.match(/^\s*$/,!0))return R(D),null;if(D.prevLine=D.thisLine,D.thisLine={stream:F},D.taskList=!1,D.trailingSpace=0,D.trailingSpaceNewLine=!1,!D.localState&&(D.f=D.block,D.f!=L)){var z=F.match(/^\s*/,!0)[0].replace(/\t/g,A).length;if(D.indentation=z,D.indentationDiff=null,z>0)return null}}return D.f(F,D)},innerMode:function(F){return F.block==L?{state:F.htmlState,mode:k}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:G}},indent:function(F,D,z){return F.block==L&&k.indent?k.indent(F.htmlState,D,z):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,D,z):q.Pass},blankLine:R,getType:g,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},loD1:function(Ie,oe){function C(q,K,I,k,E,B,M){if(E===0)return!1;var x=E,T=0,p=q;if(M>K+x&&M>k+x||Mq+x&&B>I+x||B=p.x&&x<=p.x+p.width&&T>=p.y&&T<=p.y+p.height},clone:function(){return new B(this.x,this.y,this.width,this.height)},copy:function(x){this.x=x.x,this.y=x.y,this.width=x.width,this.height=x.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},B.create=function(x){return new B(x.x,x.y,x.width,x.height)};var M=B;Ie.exports=M},mLcG:function(Ie,oe){var C=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(q){setTimeout(q,16)};Ie.exports=C},n1HI:function(Ie,oe,C){var q=C("hX1E"),K=q.normalizeRadian,I=Math.PI*2;function k(E,B,M,x,T,p,r,t,c){if(r===0)return!1;var s=r;t-=E,c-=B;var a=Math.sqrt(t*t+c*c);if(a-s>M||a+sT&&(T+=I);var d=Math.atan2(c,t);return d<0&&(d+=I),d>=x&&d<=T||d+I>=x&&d+I<=T}oe.containStroke=k},n6Mw:function(Ie,oe,C){var q=C("SrGk"),K=C("bYtY"),I=C("Fofx");function k(B,M){q.call(this,B,M,"clipPath","__clippath_in_use__")}K.inherits(k,q),k.prototype.update=function(B){var M=this.getSvgElement(B);M&&this.updateDom(M,B.__clipPaths,!1);var x=this.getTextSvgElement(B);x&&this.updateDom(x,B.__clipPaths,!0),this.markUsed(B)},k.prototype.updateDom=function(B,M,x){if(M&&M.length>0){var T=this.getDefs(!0),p=M[0],r,t,c=x?"_textDom":"_dom";p[c]?(t=p[c].getAttribute("id"),r=p[c],T.contains(r)||T.appendChild(r)):(t="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,r=this.createElement("clipPath"),r.setAttribute("id",t),T.appendChild(r),p[c]=r);var s=this.getSvgProxy(p);if(p.transform&&p.parent.invTransform&&!x){var a=Array.prototype.slice.call(p.transform);I.mul(p.transform,p.parent.invTransform,p.transform),s.brush(p),p.transform=a}else s.brush(p);var o=this.getSvgElement(p);r.innerHTML="",r.appendChild(o.cloneNode()),B.setAttribute("clip-path","url(#"+t+")"),M.length>1&&this.updateDom(r,M.slice(1),x)}else B&&B.setAttribute("clip-path","none")},k.prototype.markUsed=function(B){var M=this;B.__clipPaths&&K.each(B.__clipPaths,function(x){x._dom&&q.prototype.markUsed.call(M,x._dom),x._textDom&&q.prototype.markUsed.call(M,x._textDom)})};var E=k;Ie.exports=E},n6Qo:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return x});var q=C("q1tI"),K=C("biw7"),I=C("fyJ8");function k(T){var p=T.className,r=T.index,t=T.children,c=T.colSpan,s=T.rowSpan,a=q.useContext(K.a),o=a.prefixCls,d=a.fixedInfoList,A=d[r];return q.createElement(I.a,Object.assign({className:p,index:r,component:"td",prefixCls:o,record:null,dataIndex:null,render:function(){return{children:t,props:{colSpan:c,rowSpan:s}}}},A))}function E(T){return q.createElement("tr",Object.assign({},T))}function B(T){var p=T.children,r=q.useContext(K.a),t=r.prefixCls;return q.createElement("tfoot",{className:"".concat(t,"-summary")},p)}var M=oe.b=B,x={Cell:k,Row:E}},nCxF:function(Ie,oe,C){var q=C("QBsz"),K=q.min,I=q.max,k=q.scale,E=q.distance,B=q.add,M=q.clone,x=q.sub;function T(p,r,t,c){var s=[],a=[],o=[],d=[],A,l,m,_;if(c){m=[Infinity,Infinity],_=[-Infinity,-Infinity];for(var R=0,w=p.length;R=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function p(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var A=d.text.indexOf(">",d.ch);if(A==-1){if(T(d))continue;return}if(!x(d,A+1)){d.ch=A+1;continue}var l=d.text.lastIndexOf("/",A),m=l>-1&&!/\S/.test(d.text.slice(l+1,A));return d.ch=A+1,m?"selfClose":"regular"}}function t(d){for(;;){var A=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(A==-1){if(p(d))continue;return}if(!x(d,A+1)){d.ch=A;continue}B.lastIndex=A,d.ch=A;var l=B.exec(d.text);if(l&&l.index==A)return l}}function c(d){for(;;){B.lastIndex=d.ch;var A=B.exec(d.text);if(!A){if(T(d))continue;return}if(!x(d,A.index+1)){d.ch=A.index+1;continue}return d.ch=A.index+A[0].length,A}}function s(d){for(;;){var A=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(A==-1){if(p(d))continue;return}if(!x(d,A+1)){d.ch=A;continue}var l=d.text.lastIndexOf("/",A),m=l>-1&&!/\S/.test(d.text.slice(l+1,A));return d.ch=A+1,m?"selfClose":"regular"}}function a(d,A){for(var l=[];;){var m=c(d),_,R=d.line,w=d.ch-(m?m[0].length:0);if(!m||!(_=r(d)))return;if(_=="selfClose")continue;if(m[1]){for(var L=l.length-1;L>=0;--L)if(l[L]==m[2]){l.length=L;break}if(L<0&&(!A||A==m[2]))return{tag:m[2],from:K(R,w),to:K(d.line,d.ch)}}else l.push(m[2])}}function o(d,A){for(var l=[];;){var m=s(d);if(!m)return;if(m=="selfClose"){t(d);continue}var _=d.line,R=d.ch,w=t(d);if(!w)return;if(w[1])l.push(w[2]);else{for(var L=l.length-1;L>=0;--L)if(l[L]==w[2]){l.length=L;break}if(L<0&&(!A||A==w[2]))return{tag:w[2],from:K(d.line,d.ch),to:K(_,R)}}}}q.registerHelper("fold","xml",function(d,A){for(var l=new M(d,A.line,0);;){var m=c(l);if(!m||l.line!=A.line)return;var _=r(l);if(!_)return;if(!m[1]&&_!="selfClose"){var R=K(l.line,l.ch),w=a(l,m[2]);return w&&I(w.from,R)>0?{from:R,to:w.from}:null}}}),q.findMatchingTag=function(d,A,l){var m=new M(d,A.line,A.ch,l);if(m.text.indexOf(">")==-1&&m.text.indexOf("<")==-1)return;var _=r(m),R=_&&K(m.line,m.ch),w=_&&t(m);if(!_||!w||I(m,A)>0)return;var L={from:K(m.line,m.ch),to:R,tag:w[2]};return _=="selfClose"?{open:L,close:null,at:"open"}:w[1]?{open:o(m,w[2]),close:L,at:"close"}:(m=new M(d,R.line,R.ch,l),{open:L,close:a(m,w[2]),at:"open"})},q.findEnclosingTag=function(d,A,l,m){for(var _=new M(d,A.line,A.ch,l);;){var R=o(_,m);if(!R)break;var w=new M(d,A.line,A.ch,l),L=a(w,R.tag);if(L)return{open:R,close:L}}},q.scanForClosingTag=function(d,A,l,m){var _=new M(d,A.line,A.ch,m?{from:0,to:m}:null);return a(_,l)}})},p5ED:function(Ie,oe,C){"use strict";var q=C("+L6B"),K=C("2/Rp"),I=C("5Dmo"),k=C("3S7+"),E=C("k1fw"),B=C("tJVT"),M=C("q1tI"),x=C.n(M),T=C("vHTk"),p=C.n(T),r=C("yEEn"),t=C("ZW9T"),c=C("1vsH");oe.a=function(s){var a=s.name,o=s.data,d=s.theme,A=s.type,l=s.filename,m=s.monacoEditor,_=s.className,R=s.style,w=s.close,L=s.onClose,b=s.hasMask,g=Object(M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),i=Object(B.a)(g,2),u=i[0],f=i[1],y=Object(M.useState)(""),h=Object(B.a)(y,2),v=h[0],P=h[1],N,Q=1024*1024,G=10*Q,F=Object(M.useRef)();A==="office"&&(N=Object(c.T)(o).filesize,N>G&&(A="other")),l&&(m.filename=l),Object(M.useEffect)(function(){var j,Z,te=(j=document.cookie)===null||j===void 0||((Z=j.replace(/\s/g,""))===null||Z===void 0)?void 0:Z.split(";");te==null||te.map(function(Ae){var he=Ae.split("=");he[0]==="_educoder_session"&&P(he[1])})},[]);var D=function(){if(o.startsWith("http")||o.startsWith("/")){z();return}Object(c.z)(l||"educoder",o,l)},z=function(){Object(c.x)(l||a,o)};return console.log("data:",o,"fileanme:",l," name:",a),x.a.createElement("div",{style:Object(E.a)({},R||{}),className:"".concat(b&&p.a.bgBlack," ").concat(A?p.a.wrp:"hide")},w&&x.a.createElement("div",{className:p.a.close,ref:F},x.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},x.a.createElement("span",{onClick:z},x.a.createElement("i",{className:"icon-quxiaozhiding"}))),x.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},x.a.createElement("span",{className:"",onClick:L},x.a.createElement("i",{className:"icon-guanbi1"})))),x.a.createElement("div",{className:"".concat(p.a[_]," ").concat(_," ").concat(p.a.monaco," ").concat(A==="txt"?"show":"hide")},A==="txt"&&x.a.createElement(t.b,m)),A==="audio"&&x.a.createElement("audio",{src:"".concat(o!=null&&o.startsWith("/")||(o==null?void 0:o.indexOf("https://"))>-1?o:"data:audio/mp3;base64,").concat(o),autoPlay:!0}),A==="video"&&x.a.createElement(x.a.Fragment,null,o!=null&&o.startsWith("/")?x.a.createElement("video",{controls:!0,src:"".concat(o),autoPlay:!0}):x.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(o),autoPlay:!0})),A==="html"&&x.a.createElement("iframe",{src:o+"&disposition=inline"}),A==="pdf"&&x.a.createElement("embed",{className:p.a.embed,src:o}),A==="image"&&x.a.createElement(x.a.Fragment,null,x.a.createElement("img",{src:"".concat(o!=null&&o.startsWith("/")||(o==null?void 0:o.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(o)})),A==="other"&&x.a.createElement("div",null,x.a.createElement(K.a,{type:"primary",size:"large",onClick:D},x.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(A==="download"||A==="office")&&x.a.createElement(K.a,{type:"primary",size:"large",onClick:D},x.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ie,oe,C){},psGv:function(Ie,oe,C){var q,K;(function(){var I;(function(){"use strict";var M=[,,function(r){function t(a){this.__parent=a,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=[]}t.prototype.clone_empty=function(){var a=new t(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},t.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},t.prototype.has_match=function(a){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(a))return!0;return!1},t.prototype.set_indent=function(a,o){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.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)},t.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},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(a){this.__items.push(a);var o=a.lastIndexOf(` `);o!==-1?this.__character_count=a.length-o:this.__character_count+=a.length},t.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function c(a,o){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),o=o||"",a.indent_level>0&&(o=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}c.prototype.get_indent_size=function(a,o){var d=this.__base_string_length;return o=o||0,a<0&&(d=0),d+=a*this.__indent_size,d+=o,d},c.prototype.get_indent_string=function(a,o){var d=this.__base_string;return o=o||0,a<0&&(a=0,d=""),o+=a*this.__indent_size,this.__ensure_cache(o),d+=this.__cache[o],d},c.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},c.prototype.__add_column=function(){var a=this.__cache.length,o=0,d="";this.__indent_size&&a>=this.__indent_size&&(o=Math.floor(a/this.__indent_size),a-=o*this.__indent_size,d=new Array(o+1).join(this.__indent_string)),a&&(d+=new Array(a+1).join(" ")),this.__cache.push(d)};function s(a,o){this.__indent_cache=new c(a,o),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(a,o){return this.__indent_cache.get_indent_string(a,o)},s.prototype.get_indent_size=function(a,o){return this.__indent_cache.get_indent_size(a,o)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(a){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===` `&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` `);return a!==` `&&(d=d.replace(/[\n]/g,a)),d},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(a,o){return a=a||0,o=o||0,this.next_line.set_indent(a,o),this.__lines.length>1?(this.current_line.set_indent(a,o),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(a){for(var o=0;o1&&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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(a,o){for(var d=this.__lines.length-2;d>=0;){var A=this.__lines[d];if(A.is_empty())break;if(A.item(0).indexOf(a)!==0&&A.item(-1)!==o){this.__lines.splice(d+1,0,new t(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},r.exports.Output=s},function(r){function t(c,s,a,o){this.type=c,this.text=s,this.comments_before=null,this.newlines=a||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=t},,,function(r){function t(a,o){this.raw_options=c(a,o),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"])}t.prototype._get_array=function(a,o){var d=this.raw_options[a],A=o||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(A=d.concat()):typeof d=="string"&&(A=d.split(/[^a-zA-Z0-9_\/\-]+/)),A},t.prototype._get_boolean=function(a,o){var d=this.raw_options[a],A=d===void 0?!!o:!!d;return A},t.prototype._get_characters=function(a,o){var d=this.raw_options[a],A=o||"";return typeof d=="string"&&(A=d.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),A},t.prototype._get_number=function(a,o){var d=this.raw_options[a];o=parseInt(o,10),isNaN(o)&&(o=0);var A=parseInt(d,10);return isNaN(A)&&(A=o),A},t.prototype._get_selection=function(a,o,d){var A=this._get_selection_list(a,o,d);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: `+o+` You passed in: '`+this.raw_options[a]+"'");return A[0]},t.prototype._get_selection_list=function(a,o,d){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[o[0]],!this._is_valid_selection(d,o))throw new Error("Invalid Default Value!");var A=this._get_array(a,d);if(!this._is_valid_selection(A,o))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: `+o+` You passed in: '`+this.raw_options[a]+"'");return A},t.prototype._is_valid_selection=function(a,o){return a.length&&o.length&&!a.some(function(d){return o.indexOf(d)===-1})};function c(a,o){var d={};a=s(a);var A;for(A in a)A!==o&&(d[A]=a[A]);if(o&&a[o])for(A in a[o])d[A]=a[o][A];return d}function s(a){var o={},d;for(d in a){var A=d.replace(/-/g,"_");o[A]=a[d]}return o}r.exports.Options=t,r.exports.normalizeOpts=s,r.exports.mergeOpts=c},,function(r){var t=RegExp.prototype.hasOwnProperty("sticky");function c(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}c.prototype.restart=function(){this.__position=0},c.prototype.back=function(){this.__position>0&&(this.__position-=1)},c.prototype.hasNext=function(){return this.__position=0&&s=0&&a=s.length&&this.__input.substring(a-s.length,a).toLowerCase()===s},r.exports.InputScanner=c},function(r,t,c){var s=c(8).InputScanner,a=c(3).Token,o=c(10).TokenStream,d=c(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(m,_){this._input=new s(m),this._options=_||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new d(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var m,_=new a(A.START,""),R=null,w=[],L=new o;_.type!==A.EOF;){for(m=this._get_next_token(_,R);this._is_comment(m);)L.add(m),m=this._get_next_token(_,R);L.isEmpty()||(m.comments_before=L,L=new o),m.parent=R,this._is_opening(m)?(w.push(R),R=m):R&&this._is_closing(m,R)&&(m.opened=R,R.closed=m,R=w.pop(),m.parent=R),m.previous=_,_.next=m,this.__tokens.add(m),_=m}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(m,_){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(A.RAW,R):this._create_token(A.EOF,"")},l.prototype._is_comment=function(m){return!1},l.prototype._is_opening=function(m){return!1},l.prototype._is_closing=function(m,_){return!1},l.prototype._create_token=function(m,_){var R=new a(m,_,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=l,r.exports.TOKEN=A},function(r){function t(c){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=c}t.prototype.restart=function(){this.__position=0},t.prototype.isEmpty=function(){return this.__tokens_length===0},t.prototype.hasNext=function(){return this.__position=0&&c/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new s,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(d){var A=this._create();return A._disabled[d]=!0,A._update(),A},o.prototype.read_options=function(d){var A=this._create();for(var l in a)A._disabled[l]=d.templating.indexOf(l)===-1;return A._update(),A},o.prototype.exclude=function(d){var A=this._create();return A._excluded[d]=!0,A._update(),A},o.prototype.read=function(){var d="";this._match_pattern?d=this._input.read(this._starting_pattern):d=this._input.read(this._starting_pattern,this.__template_pattern);for(var A=this._read_template();A;)this._match_pattern?A+=this._input.read(this._match_pattern):A+=this._input.readUntil(this.__template_pattern),d+=A,A=this._read_template();return this._until_after&&(d+=this._input.readUntilAfter(this._until_pattern)),d},o.prototype.__set_templated_pattern=function(){var d=[];this._disabled.php||d.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||d.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||d.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(d.push(this.__patterns.django._starting_pattern.source),d.push(this.__patterns.django_value._starting_pattern.source),d.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||d.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&d.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+d.join("|")+")")},o.prototype._read_template=function(){var d="",A=this._input.peek();if(A==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(d=d||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(d=d||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(d=d||this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars_unescaped.read(),d=d||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(d=d||this.__patterns.django_value.read()),this._excluded.django||(d=d||this.__patterns.django_comment.read(),d=d||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(d=d||this.__patterns.smarty_comment.read(),d=d||this.__patterns.smarty_literal.read(),d=d||this.__patterns.smarty.read()));return d},r.exports.TemplatablePattern=o},,,,function(r,t,c){var s=c(19).Beautifier,a=c(20).Options;function o(d,A,l,m){var _=new s(d,A,l,m);return _.beautify()}r.exports=o,r.exports.defaultOptions=function(){return new a}},function(r,t,c){var s=c(20).Options,a=c(2).Output,o=c(21).Tokenizer,d=c(21).TOKEN,A=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,m=function(y,h){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=y.max_preserve_newlines,this.preserve_newlines=y.preserve_newlines,this._output=new a(y,h)};m.prototype.current_line_has_match=function(y){return this._output.current_line.has_match(y)},m.prototype.set_space_before_token=function(y,h){this._output.space_before_token=y,this._output.non_breaking_space=h},m.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},m.prototype.add_raw_token=function(y){this._output.add_raw_token(y)},m.prototype.print_preserved_newlines=function(y){var h=0;y.type!==d.TEXT&&y.previous.type!==d.TEXT&&(h=y.newlines?1:0),this.preserve_newlines&&(h=y.newlines0);return h!==0},m.prototype.traverse_whitespace=function(y){return y.whitespace_before||y.newlines?(this.print_preserved_newlines(y)||(this._output.space_before_token=!0),!0):!1},m.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},m.prototype.print_newline=function(y){this._output.add_new_line(y)},m.prototype.print_token=function(y){y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(y.text))},m.prototype.indent=function(){this.indent_level++},m.prototype.get_full_indent=function(y){return y=this.indent_level+(y||0),y<1?"":this._output.get_indent_string(y)};var _=function(y){for(var h=null,v=y.next;v.type!==d.EOF&&y.closed!==v;){if(v.type===d.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===d.EQUALS&&v.next.next&&v.next.next.type===d.VALUE&&(h=v.next.next.text);break}v=v.next}return h},R=function(y,h){var v=null,P=null;return h.closed?(y==="script"?v="text/javascript":y==="style"&&(v="text/css"),v=_(h)||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 w(y,h){return h.indexOf(y)!==-1}function L(y,h,v){this.parent=y||null,this.tag=h?h.tag_name:"",this.indent_level=v||0,this.parser_token=h||null}function b(y){this._printer=y,this._current_frame=null}b.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},b.prototype.record_tag=function(y){var h=new L(this._current_frame,y,this._printer.indent_level);this._current_frame=h},b.prototype._try_pop_frame=function(y){var h=null;return y&&(h=y.parser_token,this._printer.indent_level=y.indent_level,this._current_frame=y.parent),h},b.prototype._get_frame=function(y,h){for(var v=this._current_frame;v&&!(y.indexOf(v.tag)!==-1);){if(h&&h.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},b.prototype.try_pop=function(y,h){var v=this._get_frame([y],h);return this._try_pop_frame(v)},b.prototype.indent_to_tag=function(y){var h=this._get_frame(y);h&&(this._printer.indent_level=h.indent_level)};function g(y,h,v,P){this._source_text=y||"",h=h||{},this._js_beautify=v,this._css_beautify=P,this._tag_stack=null;var N=new s(h,"html");this._options=N,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"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y=this._source_text,h=this._options.eol;this._options.eol==="auto"&&(h=` `,y&&A.test(y)&&(h=y.match(A)[0])),y=y.replace(l,` `);var v=y.match(/^[\t ]*/)[0],P={text:"",type:""},N=new i,Q=new m(this._options,v),G=new o(y,this._options).tokenize();this._tag_stack=new b(Q);for(var F=null,D=G.next();D.type!==d.EOF;)D.type===d.TAG_OPEN||D.type===d.COMMENT?(F=this._handle_tag_open(Q,D,N,P),N=F):D.type===d.ATTRIBUTE||D.type===d.EQUALS||D.type===d.VALUE||D.type===d.TEXT&&!N.tag_complete?F=this._handle_inside_tag(Q,D,N,G):D.type===d.TAG_CLOSE?F=this._handle_tag_close(Q,D,N):D.type===d.TEXT?F=this._handle_text(Q,D,N):Q.add_raw_token(D),P=F,D=G.next();var z=Q._output.get_code(h);return z},g.prototype._handle_tag_close=function(y,h,v){var P={text:h.text,type:h.type};return y.alignment_size=0,v.tag_complete=!0,y.set_space_before_token(h.newlines||h.whitespace_before!=="",!0),v.is_unformatted?y.add_raw_token(h):(v.tag_start_char==="<"&&(y.set_space_before_token(h.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&y.print_newline(!1)),y.print_token(h)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(y.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&y.set_wrap_point(),P},g.prototype._handle_inside_tag=function(y,h,v,P){var N=v.has_wrapped_attrs,Q={text:h.text,type:h.type};if(y.set_space_before_token(h.newlines||h.whitespace_before!=="",!0),v.is_unformatted)y.add_raw_token(h);else if(v.tag_start_char==="{"&&h.type===d.TEXT)y.print_preserved_newlines(h)?(h.newlines=0,y.add_raw_token(h)):y.print_token(h);else{if(h.type===d.ATTRIBUTE?(y.set_space_before_token(!0),v.attr_count+=1):(h.type===d.EQUALS||h.type===d.VALUE&&h.previous.type===d.EQUALS)&&y.set_space_before_token(!1),h.type===d.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(y.traverse_whitespace(h),N=N||h.newlines!==0),this._is_wrap_attributes_force)){var G=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var F=!0,D=0,z;do{if(z=P.peek(D),z.type===d.ATTRIBUTE){F=!1;break}D+=1}while(D<4&&z.type!==d.EOF&&z.type!==d.TAG_CLOSE);G=!F}G&&(y.print_newline(!1),N=!0)}y.print_token(h),N=N||y.previous_token_wrapped(),v.has_wrapped_attrs=N}return Q},g.prototype._handle_text=function(y,h,v){var P={text:h.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(y,h,v):v.is_unformatted||v.is_content_unformatted?y.add_raw_token(h):(y.traverse_whitespace(h),y.print_token(h)),P},g.prototype._print_custom_beatifier_text=function(y,h,v){var P=this;if(h.text!==""){var N=h.text,Q,G=1,F="",D="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Q=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Q=this._css_beautify:v.custom_beautifier_name==="html"&&(Q=function(he,ce){var ae=new g(he,ce,P._js_beautify,P._css_beautify);return ae.beautify()}),this._options.indent_scripts==="keep"?G=0:this._options.indent_scripts==="separate"&&(G=-y.indent_level);var z=y.get_full_indent(G);if(N=N.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&N[0]==="<"&&N.match(/^(|]]>)$/.exec(N);if(!j){y.add_raw_token(h);return}F=z+j[1]+` `,N=j[4],j[5]&&(D=z+j[5]),N=N.replace(/\n[ \t]*$/,""),(j[2]||j[3].indexOf(` `)!==-1)&&(j=j[3].match(/[ \t]+$/),j&&(h.whitespace_before=j[0]))}if(N)if(Q){var Z=function(){this.eol=` `};Z.prototype=this._options.raw_options;var te=new Z;N=Q(z+N,te)}else{var Ae=h.whitespace_before;Ae&&(N=N.replace(new RegExp(` (`+Ae+")?","g"),` `)),N=z+N.replace(/\n/g,` `+z)}F&&(N?N=F+N+` `+D:N=F+D),y.print_newline(!1),N&&(h.text=N,h.whitespace_before="",h.newlines=0,y.add_raw_token(h),y.print_newline(!0))}},g.prototype._handle_tag_open=function(y,h,v,P){var N=this._get_tag_open_token(h);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&h.type===d.TAG_OPEN&&h.text.indexOf("]*)/),this.tag_check=v?v[1]:""):(v=h.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(h.text.startsWith("{{#>")||h.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&h.next!==null?this.tag_check=h.next.text.split(" ")[0]:this.tag_check=h.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),h.type===d.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||h.closed&&h.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)))}};g.prototype._get_tag_open_token=function(y){var h=new i(this._tag_stack.get_parser_token(),y);return h.alignment_size=this._options.wrap_attributes_indent_size,h.is_end_tag=h.is_end_tag||w(h.tag_check,this._options.void_elements),h.is_empty_element=h.tag_complete||h.is_start_tag&&h.is_end_tag,h.is_unformatted=!h.tag_complete&&w(h.tag_check,this._options.unformatted),h.is_content_unformatted=!h.is_empty_element&&w(h.tag_check,this._options.content_unformatted),h.is_inline_element=w(h.tag_name,this._options.inline)||h.tag_name.includes("-")||h.tag_start_char==="{",h},g.prototype._set_tag_position=function(y,h,v,P,N){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||y.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=R(v.tag_check,h)))),w(v.tag_check,this._options.extra_liners)&&(y.print_newline(!1),y._output.just_added_blankline()||y.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 Q=y.current_line_has_match(/{{#if/);Q||y.print_newline(!1)}v.tag_name==="!--"&&N.type===d.TAG_CLOSE&&P.is_end_tag&&v.text.indexOf(` `)===-1||(v.is_inline_element||v.is_unformatted||y.print_newline(!1),this._calcluate_parent_multiline(y,v))}else if(v.is_end_tag){var G=!1;G=v.start_tag_token&&v.start_tag_token.multiline_content,G=G||!v.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(N.type===d.TAG_CLOSE&&v.start_tag_token===P)&&N.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(G=!1),G&&y.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)&&(N.type!=="TK_CONTENT"||v.is_content_unformatted)&&y.print_newline(!1),this._calcluate_parent_multiline(y,v)},g.prototype._calcluate_parent_multiline=function(y,h){h.parent&&y._output.just_added_newline()&&!((h.is_inline_element||h.is_unformatted)&&h.parent.is_inline_element)&&(h.parent.multiline_content=!0)};var u=["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"],f=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(y){var h=null;if(y.is_empty_element||!y.is_start_tag||!y.parent)return;if(y.tag_name==="body")h=h||this._tag_stack.try_pop("head");else if(y.tag_name==="li")h=h||this._tag_stack.try_pop("li",["ol","ul"]);else if(y.tag_name==="dd"||y.tag_name==="dt")h=h||this._tag_stack.try_pop("dt",["dl"]),h=h||this._tag_stack.try_pop("dd",["dl"]);else if(y.parent.tag_name==="p"&&u.indexOf(y.tag_name)!==-1){var v=y.parent.parent;(!v||f.indexOf(v.tag_name)===-1)&&(h=h||this._tag_stack.try_pop("p"))}else y.tag_name==="rp"||y.tag_name==="rt"?(h=h||this._tag_stack.try_pop("rt",["ruby","rtc"]),h=h||this._tag_stack.try_pop("rp",["ruby","rtc"])):y.tag_name==="optgroup"?h=h||this._tag_stack.try_pop("optgroup",["select"]):y.tag_name==="option"?h=h||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):y.tag_name==="colgroup"?h=h||this._tag_stack.try_pop("caption",["table"]):y.tag_name==="thead"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"])):y.tag_name==="tbody"||y.tag_name==="tfoot"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"]),h=h||this._tag_stack.try_pop("thead",["table"]),h=h||this._tag_stack.try_pop("tbody",["table"])):y.tag_name==="tr"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"]),h=h||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(y.tag_name==="th"||y.tag_name==="td")&&(h=h||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),h=h||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return y.parent=this._tag_stack.get_parser_token(),h},r.exports.Beautifier=g},function(r,t,c){var s=c(6).Options;function a(o){s.call(this,o,"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"])}a.prototype=new s,r.exports.Options=a},function(r,t,c){var s=c(9).Tokenizer,a=c(9).TOKEN,o=c(13).Directives,d=c(14).TemplatablePattern,A=c(12).Pattern,l={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:a.START,RAW:a.RAW,EOF:a.EOF},m=new o(/<\!--/,/-->/),_=function(R,w){s.call(this,R,w),this._current_tag_name="";var L=new d(this._input).read_options(this._options),b=new A(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.until(/[\n\r\t >\/]/),handlebars_comment:b.starting_with(/{{!--/).until_after(/--}}/),handlebars:b.starting_with(/{{/).until_after(/}}/),handlebars_open:b.until(/[\n\r\t }]/),handlebars_raw_close:b.until(/}}/),comment:b.starting_with(//),cdata:b.starting_with(//),conditional_comment:b.starting_with(//),processing:b.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 g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=b.matching(g).until_after(g)}};_.prototype=new s,_.prototype._is_comment=function(R){return!1},_.prototype._is_opening=function(R){return R.type===l.TAG_OPEN},_.prototype._is_closing=function(R,w){return R.type===l.TAG_CLOSE&&w&&((R.text===">"||R.text==="/>")&&w.text[0]==="<"||R.text==="}}"&&w.text[0]==="{"&&w.text[1]==="{")},_.prototype._reset=function(){this._current_tag_name=""},_.prototype._get_next_token=function(R,w){var L=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(l.EOF,""):(L=L||this._read_open_handlebars(b,w),L=L||this._read_attribute(b,R,w),L=L||this._read_close(b,w),L=L||this._read_raw_content(b,R,w),L=L||this._read_content_word(b),L=L||this._read_comment_or_cdata(b),L=L||this._read_processing(b),L=L||this._read_open(b,w),L=L||this._create_token(l.UNKNOWN,this._input.next()),L)},_.prototype._read_comment_or_cdata=function(R){var w=null,L=null,b=null;if(R==="<"){var g=this._input.peek(1);g==="!"&&(L=this.__patterns.comment.read(),L?(b=m.get_directives(L),b&&b.ignore==="start"&&(L+=m.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(w=this._create_token(l.COMMENT,L),w.directives=b)}return w},_.prototype._read_processing=function(R){var w=null,L=null,b=null;if(R==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(w=this._create_token(l.COMMENT,L),w.directives=b)}return w},_.prototype._read_open=function(R,w){var L=null,b=null;return w||R==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),b=this._create_token(l.TAG_OPEN,L)),b},_.prototype._read_open_handlebars=function(R,w){var L=null,b=null;return w||this._options.indent_handlebars&&R==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),b=this._create_token(l.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),b=this._create_token(l.TAG_OPEN,L))),b},_.prototype._read_close=function(R,w){var L=null,b=null;return w&&(w.text[0]==="<"&&(R===">"||R==="/"&&this._input.peek(1)===">")?(L=this._input.next(),R==="/"&&(L+=this._input.next()),b=this._create_token(l.TAG_CLOSE,L)):w.text[0]==="{"&&R==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),b=this._create_token(l.TAG_CLOSE,"}}"))),b},_.prototype._read_attribute=function(R,w,L){var b=null,g="";if(L&&L.text[0]==="<")if(R==="=")b=this._create_token(l.EQUALS,this._input.next());else if(R==='"'||R==="'"){var i=this._input.next();R==='"'?i+=this.__patterns.double_quote.read():i+=this.__patterns.single_quote.read(),b=this._create_token(l.VALUE,i)}else g=this.__patterns.attribute.read(),g&&(w.type===l.EQUALS?b=this._create_token(l.VALUE,g):b=this._create_token(l.ATTRIBUTE,g));return b},_.prototype._is_content_unformatted=function(R){return this._options.void_elements.indexOf(R)===-1&&(this._options.content_unformatted.indexOf(R)!==-1||this._options.unformatted.indexOf(R)!==-1)},_.prototype._read_raw_content=function(R,w,L){var b="";if(L&&L.text[0]==="{")b=this.__patterns.handlebars_raw_close.read();else if(w.type===l.TAG_CLOSE&&w.opened.text[0]==="<"&&w.text[0]!=="/"){var g=w.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var i=this._read_comment_or_cdata(R);if(i)return i.type=l.TEXT,i;b=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(g)&&(b=this._input.readUntil(new RegExp("","ig")))}return b?this._create_token(l.TEXT,b):null},_.prototype._read_content_word=function(R){var w="";if(this._options.unformatted_content_delimiter&&(R===this._options.unformatted_content_delimiter[0]&&(w=this.__patterns.unformatted_content_delimiter.read())),w||(w=this.__patterns.word.read()),w)return this._create_token(l.TEXT,w)},r.exports.Tokenizer=_,r.exports.TOKEN=l}],x={};function T(r){var t=x[r];if(t!==void 0)return t.exports;var c=x[r]={exports:{}};return M[r](c,c.exports,T),c.exports}var p=T(18);I=p})();var k=I;if(!0)!(q=[C,C("6UM0"),C("TXwP")],K=function(M){var x=C("6UM0"),T=C("TXwP");return{html_beautify:function(p,r){return k(p,r,x.js_beautify,T.css_beautify)}}}.apply(oe,q),K!==void 0&&(Ie.exports=K));else var E,B})()},pzxd:function(Ie,oe,C){var q=C("bYtY"),K=q.retrieve2,I=q.retrieve3,k=q.each,E=q.normalizeCssArray,B=q.isString,M=q.isObject,x=C("6GrX"),T=C("VpOo"),p=C("Xnb7"),r=C("fW2E"),t=C("gut8"),c=t.ContextCachedBy,s=t.WILL_BE_RESTORED,a=x.DEFAULT_FONT,o={left:1,right:1,center:1},d={top:1,bottom:1,middle:1},A=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],l={},m={};function _(z){return R(z),k(z.rich,R),z}function R(z){if(z){z.font=x.makeFont(z);var j=z.textAlign;j==="middle"&&(j="center"),z.textAlign=j==null||o[j]?j:"left";var Z=z.textVerticalAlign||z.textBaseline;Z==="center"&&(Z="middle"),z.textVerticalAlign=Z==null||d[Z]?Z:"top";var te=z.textPadding;te&&(z.textPadding=E(z.textPadding))}}function w(z,j,Z,te,Ae,he){te.rich?b(z,j,Z,te,Ae,he):L(z,j,Z,te,Ae,he)}function L(z,j,Z,te,Ae,he){"use strict";var ce=f(te),ae,ve=!1,ue=j.__attrCachedBy===c.PLAIN_TEXT;he!==s?(he&&(ae=he.style,ve=!ce&&ue&&ae),j.__attrCachedBy=ce?c.NONE:c.PLAIN_TEXT):ue&&(j.__attrCachedBy=c.NONE);var fe=te.font||a;(!ve||fe!==(ae.font||a))&&(j.font=fe);var se=z.__computedFont;z.__styleFont!==fe&&(z.__styleFont=fe,se=z.__computedFont=j.font);var me=te.textPadding,re=te.textLineHeight,pe=z.__textCotentBlock;(!pe||z.__dirtyText)&&(pe=z.__textCotentBlock=x.parsePlainText(Z,se,me,re,te.truncate));var De=pe.outerHeight,we=pe.lines,je=pe.lineHeight,et=v(m,z,te,Ae),Le=et.baseX,We=et.baseY,Ze=et.textAlign||"left",$e=et.textVerticalAlign;i(j,te,Ae,Le,We);var bt=x.adjustTextY(We,De,$e),wt=Le,It=bt;if(ce||me){var ft=x.getWidth(Z,se),Ft=ft;me&&(Ft+=me[1]+me[3]);var zt=x.adjustTextX(Le,Ft,Ze);ce&&y(z,j,te,zt,bt,Ft,De),me&&(wt=F(Le,Ze,me),It+=me[0])}j.textAlign=Ze,j.textBaseline="middle",j.globalAlpha=te.opacity||1;for(var Qe=0;Qe=0&&(Qe=Ze[zt],Qe.textAlign==="right");)u(z,j,Qe,te,bt,je,Ft,"right"),wt-=Qe.width,Ft-=Qe.width,zt--;for(ft+=(he-(ft-we)-(et-Ft)-wt)/2;It<=zt;)Qe=Ze[It],u(z,j,Qe,te,bt,je,ft+Qe.width/2,"center"),ft+=Qe.width,It++;je+=bt}}function i(z,j,Z,te,Ae){if(Z&&j.textRotation){var he=j.textOrigin;he==="center"?(te=Z.width/2+Z.x,Ae=Z.height/2+Z.y):he&&(te=he[0]+Z.x,Ae=he[1]+Z.y),z.translate(te,Ae),z.rotate(-j.textRotation),z.translate(-te,-Ae)}}function u(z,j,Z,te,Ae,he,ce,ae){var ve=te.rich[Z.styleName]||{};ve.text=Z.text;var ue=Z.textVerticalAlign,fe=he+Ae/2;ue==="top"?fe=he+Z.height/2:ue==="bottom"&&(fe=he+Ae-Z.height/2),!Z.isLineHolder&&f(ve)&&y(z,j,ve,ae==="right"?ce-Z.width:ae==="center"?ce-Z.width/2:ce,fe-Z.height/2,Z.width,Z.height);var se=Z.textPadding;se&&(ce=F(ce,ae,se),fe-=Z.height/2-se[2]-Z.textHeight/2),P(j,"shadowBlur",I(ve.textShadowBlur,te.textShadowBlur,0)),P(j,"shadowColor",ve.textShadowColor||te.textShadowColor||"transparent"),P(j,"shadowOffsetX",I(ve.textShadowOffsetX,te.textShadowOffsetX,0)),P(j,"shadowOffsetY",I(ve.textShadowOffsetY,te.textShadowOffsetY,0)),P(j,"textAlign",ae),P(j,"textBaseline","middle"),P(j,"font",Z.font||a);var me=N(ve.textStroke||te.textStroke,pe),re=Q(ve.textFill||te.textFill),pe=K(ve.textStrokeWidth,te.textStrokeWidth);me&&(P(j,"lineWidth",pe),P(j,"strokeStyle",me),j.strokeText(Z.text,ce,fe)),re&&(P(j,"fillStyle",re),j.fillText(Z.text,ce,fe))}function f(z){return!!(z.textBackgroundColor||z.textBorderWidth&&z.textBorderColor)}function y(z,j,Z,te,Ae,he,ce){var ae=Z.textBackgroundColor,ve=Z.textBorderWidth,ue=Z.textBorderColor,fe=B(ae);if(P(j,"shadowBlur",Z.textBoxShadowBlur||0),P(j,"shadowColor",Z.textBoxShadowColor||"transparent"),P(j,"shadowOffsetX",Z.textBoxShadowOffsetX||0),P(j,"shadowOffsetY",Z.textBoxShadowOffsetY||0),fe||ve&&ue){j.beginPath();var se=Z.textBorderRadius;se?T.buildPath(j,{x:te,y:Ae,width:he,height:ce,r:se}):j.rect(te,Ae,he,ce),j.closePath()}if(fe)if(P(j,"fillStyle",ae),Z.fillOpacity!=null){var me=j.globalAlpha;j.globalAlpha=Z.fillOpacity*Z.opacity,j.fill(),j.globalAlpha=me}else j.fill();else if(M(ae)){var re=ae.image;re=p.createOrUpdateImage(re,null,z,h,ae),re&&p.isImageReady(re)&&j.drawImage(re,te,Ae,he,ce)}if(ve&&ue)if(P(j,"lineWidth",ve),P(j,"strokeStyle",ue),Z.strokeOpacity!=null){var me=j.globalAlpha;j.globalAlpha=Z.strokeOpacity*Z.opacity,j.stroke(),j.globalAlpha=me}else j.stroke()}function h(z,j){j.image=z}function v(z,j,Z,te){var Ae=Z.x||0,he=Z.y||0,ce=Z.textAlign,ae=Z.textVerticalAlign;if(te){var ve=Z.textPosition;if(ve instanceof Array)Ae=te.x+G(ve[0],te.width),he=te.y+G(ve[1],te.height);else{var ue=j&&j.calculateTextPosition?j.calculateTextPosition(l,Z,te):x.calculateTextPosition(l,Z,te);Ae=ue.x,he=ue.y,ce=ce||ue.textAlign,ae=ae||ue.textVerticalAlign}var fe=Z.textOffset;fe&&(Ae+=fe[0],he+=fe[1])}return z=z||{},z.baseX=Ae,z.baseY=he,z.textAlign=ce,z.textVerticalAlign=ae,z}function P(z,j,Z){return z[j]=r(z,j,Z),z[j]}function N(z,j){return z==null||j<=0||z==="transparent"||z==="none"?null:z.image||z.colorStops?"#000":z}function Q(z){return z==null||z==="none"?null:z.image||z.colorStops?"#000":z}function G(z,j){return typeof z=="string"?z.lastIndexOf("%")>=0?parseFloat(z)/100*j:parseFloat(z):z}function F(z,j,Z){return j==="right"?z-Z[1]:j==="center"?z+Z[3]/2-Z[1]/2:z+Z[3]}function D(z,j){return z!=null&&(z||j.textBackgroundColor||j.textBorderWidth&&j.textBorderColor||j.textPadding)}oe.normalizeTextStyle=_,oe.renderText=w,oe.getBoxPosition=v,oe.getStroke=N,oe.getFill=Q,oe.parsePercent=G,oe.needDrawText=D},qH13:function(Ie,oe,C){var q=C("ItGF"),K=C("QBsz"),I=K.applyTransform,k=C("mFDi"),E=C("Qe9p"),B=C("6GrX"),M=C("pzxd"),x=C("ni6a"),T=C("Gev7"),p=C("Dagg"),r=C("dqUG"),t=C("y+Vt"),c=C("IMiH"),s=C("QuXc"),a=C("06Qe"),o=c.CMD,d=Math.round,A=Math.sqrt,l=Math.abs,m=Math.cos,_=Math.sin,R=Math.max;if(!q.canvasSupported){var w=",",L="progid:DXImageTransform.Microsoft",b=21600,g=b/2,i=1e5,u=1e3,f=function(Le){Le.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",Le.coordsize=b+","+b,Le.coordorigin="0,0"},y=function(Le){return String(Le).replace(/&/g,"&").replace(/"/g,""")},h=function(Le,We,Ze){return"rgb("+[Le,We,Ze].join(",")+")"},v=function(Le,We){We&&Le&&We.parentNode!==Le&&Le.appendChild(We)},P=function(Le,We){We&&Le&&We.parentNode===Le&&Le.removeChild(We)},N=function(Le,We,Ze){return(parseFloat(Le)||0)*i+(parseFloat(We)||0)*u+Ze},Q=M.parsePercent,G=function(Le,We,Ze){var $e=E.parse(We);Ze=+Ze,isNaN(Ze)&&(Ze=1),$e&&(Le.color=h($e[0],$e[1],$e[2]),Le.opacity=Ze*$e[3])},F=function(Le){var We=E.parse(Le);return[h(We[0],We[1],We[2]),We[3]]},D=function(Le,We,Ze){var $e=We.fill;if($e!=null)if($e instanceof s){var bt,wt=0,It=[0,0],ft=0,Ft=1,zt=Ze.getBoundingRect(),Qe=zt.width,ze=zt.height;if($e.type==="linear"){bt="gradient";var yt=Ze.transform,St=[$e.x*Qe,$e.y*ze],at=[$e.x2*Qe,$e.y2*ze];yt&&(I(St,St,yt),I(at,at,yt));var Ot=at[0]-St[0],Ye=at[1]-St[1];wt=Math.atan2(Ot,Ye)*180/Math.PI,wt<0&&(wt+=360),wt<1e-6&&(wt=0)}else{bt="gradientradial";var St=[$e.x*Qe,$e.y*ze],yt=Ze.transform,Ue=Ze.scale,ke=Qe,Ce=ze;It=[(St[0]-zt.x)/ke,(St[1]-zt.y)/Ce],yt&&I(St,St,yt),ke/=Ue[0]*b,Ce/=Ue[1]*b;var Se=R(ke,Ce);ft=2*0/Se,Ft=2*$e.r/Se-ft}var Me=$e.colorStops.slice();Me.sort(function(Fe,Te){return Fe.offset-Te.offset});for(var He=Me.length,Ge=[],mt=[],Lt=0;Lt=2){var Ct=Ge[0][0],Et=Ge[1][0],pt=Ge[0][1]*We.opacity,Xe=Ge[1][1]*We.opacity;Le.type=bt,Le.method="none",Le.focus="100%",Le.angle=wt,Le.color=Ct,Le.color2=Et,Le.colors=mt.join(","),Le.opacity=Xe,Le.opacity2=pt}bt==="radial"&&(Le.focusposition=It.join(","))}else G(Le,$e,We.opacity)},z=function(Le,We){We.lineDash&&(Le.dashstyle=We.lineDash.join(" ")),We.stroke!=null&&!(We.stroke instanceof s)&&G(Le,We.stroke,We.opacity)},j=function(Le,We,Ze,$e){var bt=We==="fill",wt=Le.getElementsByTagName(We)[0];Ze[We]!=null&&Ze[We]!=="none"&&(bt||!bt&&Ze.lineWidth)?(Le[bt?"filled":"stroked"]="true",Ze[We]instanceof s&&P(Le,wt),wt||(wt=a.createNode(We)),bt?D(wt,Ze,$e):z(wt,Ze),v(Le,wt)):(Le[bt?"filled":"stroked"]="false",P(Le,wt))},Z=[[],[],[]],te=function(Le,We){var Ze=o.M,$e=o.C,bt=o.L,wt=o.A,It=o.Q,ft=[],Ft,zt,Qe,ze,yt,St,at=Le.data,Ot=Le.len();for(ze=0;ze.01?Te&&(Ne+=270/b):Math.abs(xt-Ct)<1e-4?Te&&NeJt?Ue-=270/b:Ue+=270/b:Te&&xtCt?Ye+=270/b:Ye-=270/b),ft.push(vt,d(((Jt-Et)*mt+He)*b-g),w,d(((Ct-pt)*Lt+Ge)*b-g),w,d(((Jt+Et)*mt+He)*b-g),w,d(((Ct+pt)*Lt+Ge)*b-g),w,d((Ne*mt+He)*b-g),w,d((xt*Lt+Ge)*b-g),w,d((Ye*mt+He)*b-g),w,d((Ue*Lt+Ge)*b-g)),yt=Ye,St=Ue;break;case o.R:var Dt=Z[0],Ht=Z[1];Dt[0]=at[ze++],Dt[1]=at[ze++],Ht[0]=Dt[0]+at[ze++],Ht[1]=Dt[1]+at[ze++],We&&(I(Dt,Dt,We),I(Ht,Ht,We)),Dt[0]=d(Dt[0]*b-g),Ht[0]=d(Ht[0]*b-g),Dt[1]=d(Dt[1]*b-g),Ht[1]=d(Ht[1]*b-g),ft.push(" m ",Dt[0],w,Dt[1]," l ",Ht[0],w,Dt[1]," l ",Ht[0],w,Ht[1]," l ",Dt[0],w,Ht[1]);break;case o.Z:ft.push(" x ")}if(Ft>0){ft.push(zt);for(var ct=0;ctve&&(ae=0,ce={});var Ze=ue.style,$e;try{Ze.font=Le,$e=Ze.fontFamily.split(",")[0]}catch(bt){}We={style:Ze.fontStyle||he,variant:Ze.fontVariant||he,weight:Ze.fontWeight||he,size:parseFloat(Ze.fontSize||12)|0,family:$e||"Microsoft YaHei"},ce[Le]=We,ae++}return We},se;B.$override("measureText",function(Le,We){var Ze=a.doc;se||(se=Ze.createElement("div"),se.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",a.doc.body.appendChild(se));try{se.style.font=We}catch($e){}return se.innerHTML="",se.appendChild(Ze.createTextNode(Le)),{width:se.offsetWidth}});for(var me=new k,re=function(Le,We,Ze,$e){var bt=this.style;this.__dirty&&M.normalizeTextStyle(bt,!0);var wt=bt.text;if(wt!=null&&(wt+=""),!wt)return;if(bt.rich){var It=B.parseRichText(wt,bt);wt=[];for(var ft=0;ft=0&&(this.delFromStorage(x),this._roots.splice(t,1),x instanceof I&&x.delChildrenFromStorage(this))},addToStorage:function(x){return x&&(x.__storage=this,x.dirty(!1)),this},delFromStorage:function(x){return x&&(x.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:E};var M=B;Ie.exports=M},rA99:function(Ie,oe,C){var q=C("y+Vt"),K=C("QBsz"),I=C("Sj9i"),k=I.quadraticSubdivide,E=I.cubicSubdivide,B=I.quadraticAt,M=I.cubicAt,x=I.quadraticDerivativeAt,T=I.cubicDerivativeAt,p=[];function r(c,s,a){var o=c.cpx2,d=c.cpy2;return o===null||d===null?[(a?T:M)(c.x1,c.cpx1,c.cpx2,c.x2,s),(a?T:M)(c.y1,c.cpy1,c.cpy2,c.y2,s)]:[(a?x:B)(c.x1,c.cpx1,c.x2,s),(a?x:B)(c.y1,c.cpy1,c.y2,s)]}var t=q.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(c,s){var a=s.x1,o=s.y1,d=s.x2,A=s.y2,l=s.cpx1,m=s.cpy1,_=s.cpx2,R=s.cpy2,w=s.percent;if(w===0)return;c.moveTo(a,o),_==null||R==null?(w<1&&(k(a,l,d,w,p),l=p[1],d=p[2],k(o,m,A,w,p),m=p[1],A=p[2]),c.quadraticCurveTo(l,m,d,A)):(w<1&&(E(a,l,_,d,w,p),l=p[1],_=p[2],d=p[3],E(o,m,R,A,w,p),m=p[1],R=p[2],A=p[3]),c.bezierCurveTo(l,m,_,R,d,A))},pointAt:function(c){return r(this.shape,c,!1)},tangentAt:function(c){var s=r(this.shape,c,!0);return K.normalize(s,s)}});Ie.exports=t},"rAM+":function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return K});var q=C("Qw5x");function K(I,k){var E;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(E=Object(q.a)(I))||k&&I&&typeof I.length=="number"){E&&(I=E);var B=0,M=function(){};return{s:M,n:function(){return B>=I.length?{done:!0}:{done:!1,value:I[B++]}},e:function(t){throw t},f:M}}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 x=!0,T=!1,p;return{s:function(){E=I[Symbol.iterator]()},n:function(){var t=E.next();return x=t.done,t},e:function(t){T=!0,p=t},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(T)throw p}}}}},rHrb:function(Ie,oe,C){"use strict";Object.defineProperty(oe,"__esModule",{value:!0}),oe.CopyToClipboard=void 0;var q=I(C("q1tI")),K=I(C("+QRC"));function I(l){return l&&l.__esModule?l:{default:l}}function k(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(_){return typeof _}:k=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},k(l)}function E(l,m){var _=Object.keys(l);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(l);m&&(R=R.filter(function(w){return Object.getOwnPropertyDescriptor(l,w).enumerable})),_.push.apply(_,R)}return _}function B(l){for(var m=1;m=0)continue;if(!Object.prototype.propertyIsEnumerable.call(l,R))continue;_[R]=l[R]}}return _}function x(l,m){if(l==null)return{};var _={},R=Object.keys(l),w,L;for(L=0;L=0)continue;_[w]=l[w]}return _}function T(l,m){if(!(l instanceof m))throw new TypeError("Cannot call a class as a function")}function p(l,m){for(var _=0;_"']/,q=/[&<>"']/g,K=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,k={"&":"&","<":"<",">":">",'"':""","'":"'"},E=b=>k[b];function B(b,g){if(g){if(C.test(b))return b.replace(q,E)}else if(K.test(b))return b.replace(I,E);return b}const M=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function x(b){return b.replace(M,(g,i)=>(i=i.toLowerCase(),i==="colon"?":":i.charAt(0)==="#"?i.charAt(1)==="x"?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""))}const T=/(^|[^\[])\^/g;function p(b,g){b=b.source||b,g=g||"";const i={replace:(u,f)=>(f=f.source||f,f=f.replace(T,"$1"),b=b.replace(u,f),i),getRegex:()=>new RegExp(b,g)};return i}const r=/[^\w:]/g,t=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function c(b,g,i){if(b){let u;try{u=decodeURIComponent(x(i)).replace(r,"").toLowerCase()}catch(f){return null}if(u.indexOf("javascript:")===0||u.indexOf("vbscript:")===0||u.indexOf("data:")===0)return null}g&&!t.test(i)&&(i=A(g,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(u){return null}return i}const s={},a=/^[^:]+:\/*[^/]*$/,o=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(b,g){s[" "+b]||(a.test(b)?s[" "+b]=b+"/":s[" "+b]=R(b,"/",!0)),b=s[" "+b];const i=b.indexOf(":")===-1;return g.substring(0,2)==="//"?i?g:b.replace(o,"$1")+g:g.charAt(0)==="/"?i?g:b.replace(d,"$1")+g:b+g}const l={exec:function(){}};function m(b){let g=1,i,u;for(;g{let P=!1,N=h;for(;--N>=0&&v[N]==="\\";)P=!P;return P?"|":" |"}),u=i.split(/ \|/);let f=0;if(u.length>g)u.splice(g);else for(;u.lengthh*Ye*1024*1024?(t.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(Ye,"G")),!0):we!=null&&we.find(function(Te){return Te.name===Xe.name})?(t.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),!0):!1},ke=function(Xe,Fe){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:_.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Fe?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Fe?je([]):($e.current.cancel(),je([]))}})},Ce=function(){var pt=Object(x.a)(l.a.mark(function Xe(){var Fe,Te;return l.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,re.validateFields();case 2:if(!(!Qe&&!(we!=null&&we.length)||Qe&&!It)){xt.next=5;break}return t.b.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE"),xt.abrupt("return");case 5:return Ot(!0),Fe=Qe?{link:It}:{video_id:we==null?void 0:we[0].videoId},xt.next=9,ae(Object(M.a)(Object(M.a)(Object(M.a)({},Fe),ue),{name:re.getFieldValue("name"),attachment_id:re.getFieldValue("attachment_id"),description:re.getFieldValue("description"),tags:Lt}));case 9:Te=xt.sent,Ot(!1),Te.id&&Se();case 12:case"end":return xt.stop()}},Xe)}));return function(){return pt.apply(this,arguments)}}(),Se=function(){re.resetFields(),je([]),ft(null),en([]),ze(null)},Me=function(){he(),Se()},He=function(){var Xe,Fe,Te,Ne,xt;return _.a.createElement(_.a.Fragment,null,!Qe&&!!(we!=null&&we.length)&&_.a.createElement("div",{className:g.a.fileProgress},(we==null||((Xe=we[0])===null||Xe===void 0)?void 0:Xe.loaded)==100?_.a.createElement("div",{className:"".concat(g.a.videoName," font14")},we==null||((Fe=we[0])===null||Fe===void 0)?void 0:Fe.name):_.a.createElement(B.a,{style:{width:"80%"},percent:we==null||((Te=we[0])===null||Te===void 0)?void 0:Te.loaded,status:(we==null||((Ne=we[0])===null||Ne===void 0)?void 0:Ne.loaded)==100?"normal":"active"}),_.a.createElement("div",{className:g.a.fileCancel,onClick:function(){var Dt,Ht;return ke(we==null||((Dt=we[0])===null||Dt===void 0)?void 0:Dt.name,(we==null||((Ht=we[0])===null||Ht===void 0)?void 0:Ht.loaded)==100)}},(we==null||((xt=we[0])===null||xt===void 0)?void 0:xt.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),_.a.createElement("div",{className:g.a.uploadWrap,style:{display:we!=null&&we.length?"none":"flex"}},_.a.createElement(f.a,Object(k.a)({},Et,{ref:$e}),_.a.createElement("div",{className:g.a.upload},_.a.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891")),_.a.createElement("label",{className:"".concat(g.a.upload," ").concat(g.a.uploadLink),onClick:function(){return ze(!0)}},_.a.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),Qe&&_.a.createElement(d.a,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:It,onChange:function(Dt){return ft(Dt.target.value)}}))},Ge=Object(m.useState)([]),mt=Object(a.a)(Ge,2),Lt=mt[0],en=mt[1],Jt=function(Xe){if(Xe.key=="Enter"){var Fe=re.getFieldValue("tag");if(re.setFieldsValue({tag:""}),!Fe){t.b.info("\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A");return}if(Lt.filter(function(Te){return Te===Fe}).length>0){t.b.info("\u5DF2\u6709\u76F8\u540C\u540D\u79F0\u6807\u7B7E");return}Lt.push(Fe),en(Object(I.a)(Lt))}},Ct=function(Xe,Fe){Xe.preventDefault(),en(Object(I.a)(Lt.filter(function(Te){return Te!=Fe})))},Et={accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",onBefore:Ue,onBeginInitFile:function(Xe){je([{name:Xe.filename,loaded:0}])},onComplete:function(Xe){je([{name:Xe.filename,loaded:Xe.percent,videoId:Xe.id}])},onError:function(){je([])},onProgress:function(Xe){je([{name:Xe.filename,loaded:Xe.percent}])},chunkSize:1024*1024*2,options:{user_id:F==null||((Q=F.userInfo)===null||Q===void 0)?void 0:Q.user_id}};return _.a.createElement(p.a,{centered:!0,maskClosable:!1,title:te?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:g.a.modal,visible:Z,confirmLoading:at,onOk:Ce,onCancel:Me},_.a.createElement(s.a,{form:re},_.a.createElement(s.a.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},_.a.createElement(d.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),_.a.createElement(s.a.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:g.a.contentItem},He()),_.a.createElement(s.a.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},_.a.createElement(i.a,{getFileProgress:function(Xe){if(Xe.file.status==="uploading"){Ot(!0);return}Xe.file.status==="done"&&Ot(!1)}})),_.a.createElement(s.a.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},_.a.createElement(y,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),_.a.createElement(s.a.Item,{label:"\u77E5\u8BC6\u6807\u7B7E",name:"tag",className:"ml8"},_.a.createElement(d.a,{onKeyUp:Jt})),_.a.createElement("div",{className:g.a["tagsList-content"]},Lt.map(function(pt,Xe){return _.a.createElement(K.a,{key:Xe+pt,closable:!0,onClose:function(Te){Ct(Te,pt)}},pt)})),_.a.createElement("div",{className:"c-grey-999"},_.a.createElement("div",null,"\u6CE8\u610F\uFF1A"),_.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",_.a.createElement(w.a,{to:"/users/".concat((G=F.userInfo)===null||G===void 0?void 0:G.login,"/videos/protocol"),target:"_blank",className:g.a.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),_.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7",Ye,"G\uFF1B"),_.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),_.a.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};oe.a=Object(L.a)(function(P){var N=P.user,Q=P.loading,G=P.globalSetting;return{user:N,globalSetting:G,loading:Q}})(v)},sR1s:function(Ie,oe,C){"use strict";C.d(oe,"b",function(){return k}),C.d(oe,"a",function(){return E}),C.d(oe,"c",function(){return B}),C.d(oe,"d",function(){return M});var q=C("U8pU"),K="RC_TABLE_KEY";function I(x){return x==null?[]:Array.isArray(x)?x:[x]}function k(x,T){if(!T&&typeof T!="number")return x;for(var p=I(T),r=x,t=0;t-1)){var s=k.parse(c)[3],a=k.toHex(c);t.setAttribute("stop-color","#"+a),t.setAttribute("stop-opacity",s)}else t.setAttribute("stop-color",T[p].color);x.appendChild(t)}M._dom=x},E.prototype.markUsed=function(M){if(M.style){var x=M.style.fill;x&&x._dom&&q.prototype.markUsed.call(this,x._dom),x=M.style.stroke,x&&x._dom&&q.prototype.markUsed.call(this,x._dom)}};var B=E;Ie.exports=B},sboe:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return I});var q=C("q1tI"),K=C.n(q),I=q.createContext(null)},t23M:function(Ie,oe,C){"use strict";var q=C("VTBJ"),K=C("1OyB"),I=C("vuIU"),k=C("Ji7U"),E=C("LK+K"),B=C("q1tI"),M=C.n(B),x=C("m+aA"),T=C("Zm9Q"),p=C("Kwbf"),r=C("c+Xe"),t=C("bdgK"),c="rc-observer-key",s=function(a){Object(k.a)(d,a);var o=Object(E.a)(d);function d(){var A;return Object(K.a)(this,d),A=o.apply(this,arguments),A.resizeObserver=null,A.childNode=null,A.currentElement=null,A.state={width:0,height:0,offsetHeight:0,offsetWidth:0},A.onResize=function(l){var m=A.props.onResize,_=l[0].target,R=_.getBoundingClientRect(),w=R.width,L=R.height,b=_.offsetWidth,g=_.offsetHeight,i=Math.floor(w),u=Math.floor(L);if(A.state.width!==i||A.state.height!==u||A.state.offsetWidth!==b||A.state.offsetHeight!==g){var f={width:i,height:u,offsetWidth:b,offsetHeight:g};A.setState(f),m&&Promise.resolve().then(function(){m(Object(q.a)(Object(q.a)({},f),{},{offsetWidth:b,offsetHeight:g}))})}},A.setChildNode=function(l){A.childNode=l},A}return Object(I.a)(d,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var m=Object(x.a)(this.childNode||this),_=m!==this.currentElement;_&&(this.destroyObserver(),this.currentElement=m),!this.resizeObserver&&m&&(this.resizeObserver=new t.default(this.onResize),this.resizeObserver.observe(m))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,m=Object(T.a)(l);if(m.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(m.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var _=m[0];if(B.isValidElement(_)&&Object(r.c)(_)){var R=_.ref;m[0]=B.cloneElement(_,{ref:Object(r.a)(R,this.setChildNode)})}return m.length===1?m[0]:m.map(function(w,L){return!B.isValidElement(w)||"key"in w&&w.key!==null?w:B.cloneElement(w,{key:"".concat(c,"-").concat(L)})})}}]),d}(B.Component);s.displayName="ResizeObserver",oe.a=s},tWlo:function(Ie,oe){Ie.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=="},u3os:function(Ie,oe,C){"use strict";Object.defineProperty(oe,"__esModule",{value:!0}),oe.ver=oe.clear=oe.bind=void 0;var q=C("P4Qj"),K=function(B,M){var x=(0,q.getSensor)(B);return x.bind(M),function(){x.unbind(M)}};oe.bind=K;var I=function(B){var M=(0,q.getSensor)(B);(0,q.removeSensor)(M)};oe.clear=I;var k="1.0.1";oe.ver=k},uK0f:function(Ie,oe,C){(function(q,K){Ie.exports=K()})(this,function(){"use strict";function q(K,I,k){k=k||{},k.childrenKeyName=k.childrenKeyName||"children";var E=K||[],B=[],M=0;do{var x=E.filter(function(T){return I(T,M)})[0];if(!x)break;B.push(x),E=x[k.childrenKeyName]||[],M+=1}while(E.length>0);return B}return q})},uRQ9:function(Ie,oe,C){Ie.exports={flex_box_center:"flex_box_center___1iLgt",flex_space_between:"flex_space_between___3p7p-",flex_box_vertical_center:"flex_box_vertical_center___3FnaF",flex_box_center_end:"flex_box_center_end___XIPip",flex_box_column:"flex_box_column___3ji4d",certificate:"certificate___3Sn4A",actionsBtns:"actionsBtns___30qsn"}},ulZh:function(Ie,oe,C){typeof window!="undefined"&&function(K,I){Ie.exports=I()}(this,function(){return function(q){var K={};function I(k){if(K[k])return K[k].exports;var E=K[k]={i:k,l:!1,exports:{}};return q[k].call(E.exports,E,E.exports,I),E.l=!0,E.exports}return I.m=q,I.c=K,I.d=function(k,E,B){I.o(k,E)||Object.defineProperty(k,E,{enumerable:!0,get:B})},I.r=function(k){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},I.t=function(k,E){if(E&1&&(k=I(k)),E&8)return k;if(E&4&&typeof k=="object"&&k&&k.__esModule)return k;var B=Object.create(null);if(I.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:k}),E&2&&typeof k!="string")for(var M in k)I.d(B,M,function(x){return k[x]}.bind(null,M));return B},I.n=function(k){var E=k&&k.__esModule?function(){return k.default}:function(){return k};return I.d(E,"a",E),E},I.o=function(k,E){return Object.prototype.hasOwnProperty.call(k,E)},I.p="/dist/",I(I.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(q,K,I){"use strict";var k=Object.prototype.hasOwnProperty,E="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(E=!1));function M(r,t,c){this.fn=r,this.context=t,this.once=c||!1}function x(r,t,c,s,a){if(typeof c!="function")throw new TypeError("The listener must be a function");var o=new M(c,s||r,a),d=E?E+t:t;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],o]:r._events[d].push(o):(r._events[d]=o,r._eventsCount++),r}function T(r,t){--r._eventsCount===0?r._events=new B:delete r._events[t]}function p(){this._events=new B,this._eventsCount=0}p.prototype.eventNames=function(){var t=[],c,s;if(this._eventsCount===0)return t;for(s in c=this._events)k.call(c,s)&&t.push(E?s.slice(1):s);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(c)):t},p.prototype.listeners=function(t){var c=E?E+t:t,s=this._events[c];if(!s)return[];if(s.fn)return[s.fn];for(var a=0,o=s.length,d=new Array(o);a0},!1)}function r(t,c){for(var s={main:[c]},a={main:[]},o={main:{}};p(s);)for(var d=Object.keys(s),A=0;A=2*L/g||v<=N)return;var Q=Number.POSITIVE_INFINITY,G;for(G=d.level-1;G>u;G--){var F=i[G].maxBitrate;if(Q=L*F/(8*.8*h),Q=v)return;var D=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+d.sn+(A?" part "+A.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+` Current BW estimate: `+(Object(k.isFiniteNumber)(D)?(D/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+v.toFixed(3)+` s Estimated load time for the next fragment: `+Q.toFixed(3)+` s Time to underbuffer: `+N.toFixed(3)+" s"),l.nextLoadLevel=G,this.bwEstimator.sample(b,w.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),l.trigger(B.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:A,stats:w})},a.onFragLoaded=function(d,A){var l=A.frag,m=A.part;if(l.type===T.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(l.sn)){var _=m?m.stats:l.stats,R=m?m.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var w=this.hls.levels[l.level],L=(w.loaded?w.loaded.bytes:0)+_.loaded,b=(w.loaded?w.loaded.duration:0)+R;w.loaded={bytes:L,duration:b},w.realBitrate=Math.round(8*L/b)}if(l.bitrateTest){var g={stats:_,frag:l,part:m,id:l.type};this.onFragBuffered(B.Events.FRAG_BUFFERED,g),l.bitrateTest=!1}}},a.onFragBuffered=function(d,A){var l=A.frag,m=A.part,_=m?m.stats:l.stats;if(_.aborted)return;if(l.type!==T.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var R=_.parsing.end-_.loading.start;this.bwEstimator.sample(R,_.loaded),_.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=R/1e3:this.bitrateTestDelay=0},a.onError=function(d,A){switch(A.details){case x.ErrorDetails.FRAG_LOAD_ERROR:case x.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},a.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},a.getNextABRAutoLevel=function(){var d=this.fragCurrent,A=this.partCurrent,l=this.hls,m=l.maxAutoLevel,_=l.config,R=l.minAutoLevel,w=l.media,L=A?A.duration:d?d.duration:0,b=w?w.currentTime:0,g=w&&w.playbackRate!==0?Math.abs(w.playbackRate):1,i=this.bwEstimator?this.bwEstimator.getEstimate():_.abrEwmaDefaultEstimate,u=(M.BufferHelper.bufferInfo(w,b,_.maxBufferHole).end-b)/g,f=this.findBestLevel(i,R,m,u,_.abrBandWidthFactor,_.abrBandWidthUpFactor);if(f>=0)return f;p.logger.trace((u?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var y=L?Math.min(L,_.maxStarvationDelay):_.maxStarvationDelay,h=_.abrBandWidthFactor,v=_.abrBandWidthUpFactor;if(!u){var P=this.bitrateTestDelay;if(P){var N=L?Math.min(L,_.maxLoadingDelay):_.maxLoadingDelay;y=N-P,p.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*y)+" ms"),h=v=1}}return f=this.findBestLevel(i,R,m,u+y,h,v),Math.max(f,0)},a.findBestLevel=function(d,A,l,m,_,R){for(var w,L=this.fragCurrent,b=this.partCurrent,g=this.lastLoadedFragLevel,i=this.hls.levels,u=i[g],f=!!(u!=null&&(w=u.details)!==null&&w!==void 0&&w.live),y=u==null?void 0:u.codecSet,h=b?b.duration:L?L.duration:0,v=l;v>=A;v--){var P=i[v];if(!P||y&&P.codecSet!==y)continue;var N=P.details,Q=(b?N==null?void 0:N.partTarget:N==null?void 0:N.averagetargetduration)||h,G=void 0;v<=g?G=_*d:G=R*d;var F=i[v].maxBitrate,D=F*Q/G;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(G)+"/"+F+"/"+Q+"/"+m+"/"+D),G>F&&(!D||f&&!this.bitrateTestDelay||D0&&u===-1?(this.log("Override startPosition with lastCurrentTime @"+f.toFixed(3)),this.state=E.State.IDLE):(this.loadedmetadata=!1,this.state=E.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()},g.doTick=function(){switch(this.state){case E.State.IDLE:this.doTickIdle();break;case E.State.WAITING_TRACK:{var u,f=this.levels,y=this.trackId,h=f==null||((u=f[y])===null||u===void 0)?void 0:u.details;if(h){if(this.waitForCdnTuneIn(h))break;this.state=E.State.WAITING_INIT_PTS}break}case E.State.FRAG_LOADING_WAITING_RETRY:{var v,P=performance.now(),N=this.retryDate;(!N||P>=N||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=E.State.IDLE);break}case E.State.WAITING_INIT_PTS:{var Q=this.waitingData;if(Q){var G=Q.frag,F=Q.part,D=Q.cache,z=Q.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=E.State.FRAG_LOADING;var j=D.flush(),Z={frag:G,part:F,payload:j,networkDetails:null};this._handleFragmentLoadProgress(Z),z&&L.prototype._handleFragmentLoadComplete.call(this,Z)}else if(this.videoTrackCC!==this.waitingVideoCC)A.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var te=this.getLoadPosition(),Ae=M.BufferHelper.bufferInfo(this.mediaBuffer,te,this.config.maxBufferHole),he=Object(a.fragmentWithinToleranceTest)(Ae.end,this.config.maxFragLookUpTolerance,G);he<0&&(A.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Ae.end+" is needed"),this.clearWaitingFragment())}}else this.state=E.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var u=this.waitingData;u&&(this.fragmentTracker.removeFragment(u.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=E.State.IDLE)},g.onTickEnd=function(){var u=this.media;if(!u||!u.readyState)return;var f=this.mediaBuffer?this.mediaBuffer:u,y=f.buffered;!this.loadedmetadata&&y.length&&(this.loadedmetadata=!0),this.lastCurrentTime=u.currentTime},g.doTickIdle=function(){var u,f,y=this.hls,h=this.levels,v=this.media,P=this.trackId,N=y.config;if(!h||!h[P])return;if(!v&&(this.startFragRequested||!N.startFragPrefetch))return;var Q=h[P],G=Q.details;if(!G||G.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(G)){this.state=E.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(F===null)return;var D=F.len,z=this.getMaxBufferLength(),j=this.audioSwitch;if(D>=z&&!j)return;if(!j&&this._streamEnded(F,G)){y.trigger(B.Events.BUFFER_EOS,{type:"audio"}),this.state=E.State.ENDED;return}var Z=G.fragments,te=Z[0].start,Ae=F.end;if(j){var he=this.getLoadPosition();Ae=he,G.PTSKnown&&hete||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),v.currentTime=te+.05))}var ce=this.getNextFragment(Ae,G);if(!ce){this.bufferFlushed=!0;return}((u=ce.decryptdata)===null||u===void 0?void 0:u.keyFormat)==="identity"&&!((f=ce.decryptdata)!==null&&f!==void 0&&f.key)?this.loadKey(ce,G):this.loadFragment(ce,G,Ae)},g.getMaxBufferLength=function(){var u=L.prototype.getMaxBufferLength.call(this),f=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return f===null?u:Math.max(u,f.len)},g.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(u,f){var y=f.audioTracks;this.resetTransmuxer(),this.levels=y.map(function(h){return new T.Level(h)})},g.onAudioTrackSwitching=function(u,f){var y=!!f.url;this.trackId=f.id;var h=this.fragCurrent;h!=null&&h.loader&&h.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),y?this.setInterval(R):this.resetTransmuxer(),y?(this.audioSwitch=!0,this.state=E.State.IDLE):this.state=E.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(u,f){this.mainDetails=f.details},g.onAudioTrackLoaded=function(u,f){var y,h=this.levels,v=f.details,P=f.id;if(!h){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var N=h[P],Q=0;if(v.live||(y=N.details)!==null&&y!==void 0&&y.live){var G=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!G)return;!N.details&&v.hasProgramDateTime&&G.hasProgramDateTime?(Object(o.alignMediaPlaylistByPDT)(v,G),Q=v.fragments[0].start):Q=this.alignPlaylists(v,N.details)}N.details=v,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(N.details,Q),this.state===E.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=E.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(u){var f,y=u.frag,h=u.part,v=u.payload,P=this.config,N=this.trackId,Q=this.levels;if(!Q){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+y.sn+" of level "+y.level+" will not be buffered");return}var G=Q[N];console.assert(G,"Audio track is defined on fragment load progress");var F=G.details;console.assert(F,"Audio track details are defined on fragment load progress");var D=P.defaultAudioCodec||G.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new c.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var j=this.initPTS[y.cc],Z=(f=y.initSegment)===null||f===void 0?void 0:f.data;if(j!==void 0){var te=!1,Ae=h?h.index:-1,he=Ae!==-1,ce=new s.ChunkMetadata(y.level,y.sn,y.stats.chunkCount,v.byteLength,Ae,he);z.push(v,Z,D,"",y,h,F.totalduration,te,ce,j)}else{A.logger.log("Unknown video PTS for cc "+y.cc+", waiting for video PTS before demuxing audio frag "+y.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+N);var ae=this.waitingData=this.waitingData||{frag:y,part:h,cache:new t.default,complete:!1},ve=ae.cache;ve.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=E.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(u){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,u)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(u,f){var y=f.tracks.audio;y&&(this.mediaBuffer=y.buffer),f.tracks.video&&(this.videoBuffer=f.tracks.video.buffer)},g.onFragBuffered=function(u,f){var y=f.frag,h=f.part;if(y.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(y)){this.warn("Fragment "+y.sn+(h?" p: "+h.index:"")+" of level "+y.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}y.sn!=="initSegment"&&(this.fragPrevious=y,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(y,h)},g.onError=function(u,f){switch(f.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.AUDIO,f);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==E.State.ERROR&&this.state!==E.State.STOPPED&&(this.state=f.fatal?E.State.ERROR:E.State.IDLE,this.warn(f.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(f.parent==="audio"&&(this.state===E.State.PARSING||this.state===E.State.PARSED)){var y=!0,h=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);h&&h.len>.5&&(y=!this.reduceMaxBufferLength(h.len)),y&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(u,f){var y=f.type;y===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(u){var f,y="audio",h=this.hls,v=u.remuxResult,P=u.chunkMeta,N=this.getCurrentContext(P);if(!N){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 Q=N.frag,G=N.part,F=v.audio,D=v.text,z=v.id3,j=v.initSegment;if(this.fragContextChanged(Q))return;if(this.state=E.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),j!=null&&j.tracks&&(this._bufferInitSegment(j.tracks,Q,P),h.trigger(B.Events.FRAG_PARSING_INIT_SEGMENT,{frag:Q,id:y,tracks:j.tracks})),F){var Z=F.startPTS,te=F.endPTS,Ae=F.startDTS,he=F.endDTS;G&&(G.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:Z,endPTS:te,startDTS:Ae,endDTS:he}),Q.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,Z,te,Ae,he),this.bufferFragmentData(F,Q,G,P)}if(z!=null&&(f=z.samples)!==null&&f!==void 0&&f.length){var ce=l({frag:Q,id:y},z);h.trigger(B.Events.FRAG_PARSING_METADATA,ce)}if(D){var ae=l({frag:Q,id:y},D);h.trigger(B.Events.FRAG_PARSING_USERDATA,ae)}},g._bufferInitSegment=function(u,f,y){if(this.state!==E.State.PARSING)return;u.video&&delete u.video;var h=u.audio;if(!h)return;h.levelCodec=h.codec,h.id="audio",this.log("Init audio buffer, container:"+h.container+", codecs[parsed]=["+h.codec+"]"),this.hls.trigger(B.Events.BUFFER_CODECS,u);var v=h.initSegment;if(v!=null&&v.byteLength){var P={type:"audio",frag:f,part:null,chunkMeta:y,parent:f.type,data:v};this.hls.trigger(B.Events.BUFFER_APPENDING,P)}this.tick()},g.loadFragment=function(u,f,y){var h=this.fragmentTracker.getState(u);this.fragCurrent=u,(this.audioSwitch||h===x.FragmentState.NOT_LOADED||h===x.FragmentState.PARTIAL)&&(u.sn==="initSegment"?this._loadInitSegment(u):f.live&&!Object(k.isFiniteNumber)(this.initPTS[u.cc])?(this.log("Waiting for video PTS in continuity counter "+u.cc+" of live stream before loading audio fragment "+u.sn+" of level "+this.trackId),this.state=E.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,u,f,y)))},g.completeAudioSwitch=function(){var u=this.hls,f=this.media,y=this.trackId;f&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,u.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:y})},b}(E.default);K.default=w},"./src/controller/audio-track-controller.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/events.ts"),E=I("./src/errors.ts"),B=I("./src/controller/base-playlist-controller.ts"),M=I("./src/types/loader.ts");function x(c,s){for(var a=0;a=A.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=A[this.trackId];this.log("Now switching to audio-track index "+d);var m=A[d],_=m.id,R=m.groupId,w=R===void 0?"":R,L=m.name,b=m.type,g=m.url;if(this.trackId=d,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:_,groupId:w,name:L,type:b,url:g}),m.details&&!m.details.live)return;var i=this.switchParams(m.url,l==null?void 0:l.details);this.loadPlaylist(i)},a.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var A=this.trackName,l=this.findTrackId(A)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},a.findTrackId=function(d){for(var A=this.tracksInGroup,l=0;ls.partTarget&&(m+=1)}if(Object(k.isFiniteNumber)(l))return new E.HlsUrlParameters(l,Object(k.isFiniteNumber)(m)?m:void 0,E.HlsSkip.No)}}},r.loadPlaylist=function(c){},r.shouldLoadTrack=function(c){return this.canLoad&&c&&!!c.url&&(!c.details||c.details.live)},r.playlistLoaded=function(c,s,a){var o=this,d=s.details,A=s.stats,l=A.loading.end?Math.max(0,self.performance.now()-A.loading.end):0;if(d.advancedDateTime=Date.now()-l,d.live||a!=null&&a.live){if(d.reloaded(a),a&&this.log("live playlist "+c+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),a&&d.fragments.length>0&&Object(B.mergeDetails)(a,d),!this.canLoad||!d.live)return;var m,_=void 0,R=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var w=this.hls.config.lowLatencyMode,L=d.lastPartSn,b=d.endSN,g=d.lastPartIndex,i=g!==-1,u=L===b,f=w?0:g;i?(_=u?b+1:L,R=u?f:g+1):_=b+1;var y=d.age,h=y+d.ageHeader,v=Math.min(h-d.partTarget,d.targetduration*1.5);if(v>0){if(a&&v>a.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+a.tuneInGoal+" to: "+v+" with playlist age: "+d.age),v=0;else{var P=Math.floor(v/d.targetduration);if(_+=P,R!==void 0){var N=Math.round(v%d.targetduration/d.partTarget);R+=N}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+y.toFixed(2)+"s goal: "+v+" skip sn "+P+" to part "+R)}d.tuneInGoal=v}if(m=this.getDeliveryDirectives(d,s.deliveryDirectives,_,R),w||!u){this.loadPlaylist(m);return}}else m=this.getDeliveryDirectives(d,s.deliveryDirectives,_,R);var Q=Object(B.computeReloadInterval)(d,A);_!==void 0&&d.canBlockReload&&(Q-=d.partTarget||1),this.log("reload live playlist "+c+" in "+Math.round(Q)+" ms"),this.timer=self.setTimeout(function(){return o.loadPlaylist(m)},Q)}else this.clearTimer()},r.getDeliveryDirectives=function(c,s,a,o){var d=Object(E.getSkipValue)(c,a);return s!=null&&s.skip&&c.deltaUpdateFailed&&(a=s.msn,o=s.part,d=E.HlsSkip.No),new E.HlsUrlParameters(a,o,d)},r.retryLoadingOrFail=function(c){var s=this,a=this.hls.config,o=this.retryCount-1&&(d=c.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+c.details+'"'),this.loadPlaylist();else{var A=Math.min(Math.pow(2,this.retryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},A),this.warn("retry playlist loading #"+this.retryCount+" in "+A+' ms after "'+c.details+'"')}}else this.warn('cannot recover from error "'+c.details+'"'),this.clearTimer(),c.fatal=!0;return o},p}()},"./src/controller/base-stream-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"State",function(){return b}),I.d(K,"default",function(){return g});var k=I("./src/polyfills/number.ts"),E=I("./src/task-loop.ts"),B=I("./src/controller/fragment-tracker.ts"),M=I("./src/utils/buffer-helper.ts"),x=I("./src/utils/logger.ts"),T=I("./src/events.ts"),p=I("./src/errors.ts"),r=I("./src/types/transmuxer.ts"),t=I("./src/utils/mp4-tools.ts"),c=I("./src/utils/discontinuities.ts"),s=I("./src/controller/fragment-finders.ts"),a=I("./src/controller/level-helper.ts"),o=I("./src/loader/fragment-loader.ts"),d=I("./src/crypt/decrypter.ts"),A=I("./src/utils/time-ranges.ts"),l=I("./src/types/loader.ts");function m(i,u){for(var f=0;fj;(G0&&G&&G.key&&G.iv&&G.method==="AES-128"){var F=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(Q),G.key.buffer,G.iv.buffer).then(function(D){var z=self.performance.now();return N.trigger(T.Events.FRAG_DECRYPTED,{frag:h,payload:D,stats:{tstart:F,tdecrypt:z}}),P.payload=D,P})}return P}).then(function(P){var N=v.fragCurrent,Q=v.hls,G=v.levels;if(!G)throw new Error("init load aborted, missing levels");var F=G[h.level].details;console.assert(F,"Level details are defined when init segment is loaded");var D=h.stats;v.state=b.IDLE,v.fragLoadError=0,h.data=new Uint8Array(P.payload),D.parsing.start=D.buffering.start=self.performance.now(),D.parsing.end=D.buffering.end=self.performance.now(),P.frag===N&&Q.trigger(T.Events.FRAG_BUFFERED,{stats:D,frag:N,part:null,id:h.type}),v.tick()}).catch(function(P){v.warn(P),v.resetFragmentLoading(h)})},f.fragContextChanged=function(h){var v=this.fragCurrent;return!h||!v||h.level!==v.level||h.sn!==v.sn||h.urlId!==v.urlId},f.fragBufferedComplete=function(h,v){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+h.type+" sn: "+h.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+h.level+" "+A.default.toString(M.BufferHelper.getBuffered(P))),this.state=b.IDLE,this.tick()},f._handleFragmentLoadComplete=function(h){var v=this.transmuxer;if(!v)return;var P=h.frag,N=h.part,Q=h.partsLoaded,G=!Q||Q.length===0||Q.some(function(D){return!D}),F=new r.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,N?N.index:-1,!G);v.flush(F)},f._handleFragmentLoadProgress=function(h){},f._doFragLoad=function(h,v,P,N){var Q=this;if(P===void 0&&(P=null),!this.levels)throw new Error("frag load aborted, missing levels");if(P=Math.max(h.start,P||0),this.config.lowLatencyMode&&v){var G=v.partList;if(G&&N){P>h.end&&v.fragmentHint&&(h=v.fragmentHint);var F=this.getNextPart(G,h,P);if(F>-1){var D=G[F];return this.log("Loading part sn: "+h.sn+" p: "+D.index+" cc: "+h.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+F+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+h.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=D.start+D.duration,this.state=b.FRAG_LOADING,this.hls.trigger(T.Events.FRAG_LOADING,{frag:h,part:G[F],targetBufferTime:P}),this.doFragPartsLoad(h,G,F,N).catch(function(z){return Q.handleFragLoadError(z)})}else if(!h.url||this.loadedEndOfParts(G,P))return Promise.resolve(null)}}return this.log("Loading fragment "+h.sn+" cc: "+h.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+h.level+", target: "+parseFloat(P.toFixed(3))),Object(k.isFiniteNumber)(h.sn)&&!this.bitrateTest&&(this.nextLoadPosition=h.start+h.duration),this.state=b.FRAG_LOADING,this.hls.trigger(T.Events.FRAG_LOADING,{frag:h,targetBufferTime:P}),this.fragmentLoader.load(h,N).catch(function(z){return Q.handleFragLoadError(z)})},f.doFragPartsLoad=function(h,v,P,N){var Q=this;return new Promise(function(G,F){var D=[],z=function j(Z){var te=v[Z];Q.fragmentLoader.loadPart(h,te,N).then(function(Ae){D[te.index]=Ae;var he=Ae.part;Q.hls.trigger(T.Events.FRAG_LOADED,Ae);var ce=v[Z+1];if(ce&&ce.fragment===h)j(Z+1);else return G({frag:h,part:he,partsLoaded:D})}).catch(F)};z(P)})},f.handleFragLoadError=function(h){var v=h.data;return v&&v.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(T.Events.ERROR,v),null},f._handleTransmuxerFlush=function(h){var v=this.getCurrentContext(h);if(!v||this.state!==b.PARSING){this.fragCurrent||(this.state=b.IDLE);return}var P=v.frag,N=v.part,Q=v.level,G=self.performance.now();P.stats.parsing.end=G,N&&(N.stats.parsing.end=G),this.updateLevelTiming(P,N,Q,h.partial)},f.getCurrentContext=function(h){var v=this.levels,P=h.level,N=h.sn,Q=h.part;if(!v||!v[P])return this.warn("Levels object was unset while buffering fragment "+N+" of level "+P+". The current chunk will not be buffered."),null;var G=v[P],F=Q>-1?Object(a.getPartWith)(G,N,Q):null,D=F?F.fragment:Object(a.getFragmentWithSN)(G,N,this.fragCurrent);return D?{frag:D,part:F,level:G}:null},f.bufferFragmentData=function(h,v,P,N){if(!h||this.state!==b.PARSING)return;var Q=h.data1,G=h.data2,F=Q;if(Q&&G&&(F=Object(t.appendUint8Array)(Q,G)),!F||!F.length)return;var D={type:h.type,frag:v,part:P,chunkMeta:N,parent:v.type,data:F};this.hls.trigger(T.Events.BUFFER_APPENDING,D),h.dropped&&h.independent&&!P&&this.flushBufferGap(v)},f.flushBufferGap=function(h){var v=this.media;if(!v)return;if(!M.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,h.start);return}var P=v.currentTime,N=M.BufferHelper.bufferInfo(v,P,0),Q=h.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,Q*.25),F=Math.max(Math.min(h.start-G,N.end-G),P+G);h.start-F>G&&this.flushMainBuffer(F,h.start)},f.getFwdBufferInfo=function(h,v){var P=this.config,N=this.getLoadPosition();if(!Object(k.isFiniteNumber)(N))return null;var Q=M.BufferHelper.bufferInfo(h,N,P.maxBufferHole);if(Q.len===0&&Q.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(N,v);if(G&&Q.nextStart=P?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},f.getNextFragment=function(h,v){var P,N,Q=v.fragments,G=Q.length;if(!G)return null;var F=this.config,D=Q[0].start,z;if(v.live){var j=F.initialLiveManifestSize;if(G-1&&PP.start&&P.loaded},f.getInitialLiveFragment=function(h,v){var P=this.fragPrevious,N=null;if(P){if(h.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+P.programDateTime),N=Object(s.findFragmentByPDT)(v,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!N){var Q=P.sn+1;if(Q>=h.startSN&&Q<=h.endSN){var G=v[Q-h.startSN];P.cc===G.cc&&(N=G,this.log("Live playlist, switching playlist, load frag with next SN: "+N.sn))}N||(N=Object(s.findFragWithCC)(v,P.cc),N&&this.log("Live playlist, switching playlist, load frag with same CC: "+N.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(N=this.getFragmentAtPosition(F,this.bitrateTest?h.fragmentEnd:h.edge,h))}return N},f.getFragmentAtPosition=function(h,v,P){var N=this.config,Q=this.fragPrevious,G=P.fragments,F=P.endSN,D=P.fragmentHint,z=N.maxFragLookUpTolerance,j=!!(N.lowLatencyMode&&P.partList&&D);j&&D&&!this.bitrateTest&&(G=G.concat(D),F=D.sn);var Z;if(hv-z?0:z;Z=Object(s.findFragmentByPTS)(Q,G,h,te)}else Z=G[G.length-1];if(Z){var Ae=Z.sn-P.startSN,he=Q&&Z.level===Q.level,ce=G[Ae+1],ae=this.fragmentTracker.getState(Z);if(ae===B.FragmentState.BACKTRACKED){Z=null;for(var ve=Ae;G[ve]&&this.fragmentTracker.getState(G[ve])===B.FragmentState.BACKTRACKED;)Q?Z=G[ve--]:Z=G[--ve];Z||(Z=ce)}else Q&&Z.sn===Q.sn&&!j&&(he&&(Z.sn=G-v.maxFragLookUpTolerance&&Q<=F;if(N!==null&&P.duration>N&&(Q"+h.startSN+" prev-sn: "+(Q?Q.sn:"na")+" fragments: "+F),Z}return D},f.waitForCdnTuneIn=function(h){var v=3;return h.live&&h.canBlockReload&&h.tuneInGoal>Math.max(h.partHoldBack,h.partTarget*v)},f.setStartPosition=function(h,v){var P=this.startPosition;if(P"+h))}}]),u}(E.default)},"./src/controller/buffer-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return s});var k=I("./src/polyfills/number.ts"),E=I("./src/events.ts"),B=I("./src/utils/logger.ts"),M=I("./src/errors.ts"),x=I("./src/utils/buffer-helper.ts"),T=I("./src/utils/mediasource-helper.ts"),p=I("./src/loader/fragment.ts"),r=I("./src/controller/buffer-operation-queue.ts"),t=Object(T.getMediaSource)(),c=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function a(d){var A=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var l=A.hls,m=A.media,_=A.mediaSource;B.logger.log("[buffer-controller]: Media source opened"),m&&(A.updateMediaElementDuration(),l.trigger(E.Events.MEDIA_ATTACHED,{media:m})),_&&_.removeEventListener("sourceopen",A._onMediaSourceOpen),A.checkPendingTracks()},this._onMediaSourceClose=function(){B.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.logger.log("[buffer-controller]: Media source ended")},this.hls=d,this._initSourceBuffer(),this.registerListeners()}var o=a.prototype;return o.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},o.destroy=function(){this.unregisterListeners(),this.details=null},o.registerListeners=function(){var A=this.hls;A.on(E.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.on(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(E.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.on(E.Events.BUFFER_RESET,this.onBufferReset,this),A.on(E.Events.BUFFER_APPENDING,this.onBufferAppending,this),A.on(E.Events.BUFFER_CODECS,this.onBufferCodecs,this),A.on(E.Events.BUFFER_EOS,this.onBufferEos,this),A.on(E.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.on(E.Events.LEVEL_UPDATED,this.onLevelUpdated,this),A.on(E.Events.FRAG_PARSED,this.onFragParsed,this),A.on(E.Events.FRAG_CHANGED,this.onFragChanged,this)},o.unregisterListeners=function(){var A=this.hls;A.off(E.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.off(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(E.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.off(E.Events.BUFFER_RESET,this.onBufferReset,this),A.off(E.Events.BUFFER_APPENDING,this.onBufferAppending,this),A.off(E.Events.BUFFER_CODECS,this.onBufferCodecs,this),A.off(E.Events.BUFFER_EOS,this.onBufferEos,this),A.off(E.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.off(E.Events.LEVEL_UPDATED,this.onLevelUpdated,this),A.off(E.Events.FRAG_PARSED,this.onFragParsed,this),A.off(E.Events.FRAG_CHANGED,this.onFragChanged,this)},o._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},o.onManifestParsed=function(A,l){var m=2;(l.audio&&!l.video||!l.altAudio)&&(m=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=m,this.details=null,B.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},o.onMediaAttaching=function(A,l){var m=this.media=l.media;if(m&&t){var _=this.mediaSource=new t;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),m.src=self.URL.createObjectURL(_),this._objectUrl=m.src}},o.onMediaDetaching=function(){var A=this.media,l=this.mediaSource,m=this._objectUrl;if(l){if(B.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(_){B.logger.warn("[buffer-controller]: onMediaDetaching: "+_.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),A&&(m&&self.URL.revokeObjectURL(m),A.src===m?(A.removeAttribute("src"),A.load()):B.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(E.Events.MEDIA_DETACHED,void 0)},o.onBufferReset=function(){var A=this;this.getSourceBufferTypes().forEach(function(l){var m=A.sourceBuffer[l];try{m&&(A.removeBufferListeners(l),A.mediaSource&&A.mediaSource.removeSourceBuffer(m),A.sourceBuffer[l]=void 0)}catch(_){B.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",_)}}),this._initSourceBuffer()},o.onBufferCodecs=function(A,l){var m=this,_=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(R){if(_){var w=m.tracks[R];if(w&&typeof w.buffer.changeType=="function"){var L=l[R],b=L.codec,g=L.levelCodec,i=L.container,u=(w.levelCodec||w.codec).replace(c,"$1"),f=(g||b).replace(c,"$1");if(u!==f){var y=i+";codecs="+(g||b);m.appendChangeType(R,y)}}}else m.pendingTracks[R]=l[R]}),_)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},o.appendChangeType=function(A,l){var m=this,_=this.operationQueue,R={execute:function(){var L=m.sourceBuffer[A];L&&(B.logger.log("[buffer-controller]: changing "+A+" sourceBuffer type to "+l),L.changeType(l)),_.shiftAndExecuteNext(A)},onStart:function(){},onComplete:function(){},onError:function(L){B.logger.warn("[buffer-controller]: Failed to change "+A+" SourceBuffer type",L)}};_.append(R,A)},o.onBufferAppending=function(A,l){var m=this,_=this.hls,R=this.operationQueue,w=this.tracks,L=l.data,b=l.type,g=l.frag,i=l.part,u=l.chunkMeta,f=u.buffering[b],y=self.performance.now();f.start=y;var h=g.stats.buffering,v=i?i.stats.buffering:null;h.start===0&&(h.start=y),v&&v.start===0&&(v.start=y);var P=w.audio,N=b==="audio"&&u.id===1&&(P==null?void 0:P.container)==="audio/mpeg",Q={execute:function(){if(f.executeStart=self.performance.now(),N){var F=m.sourceBuffer[b];if(F){var D=g.start-F.timestampOffset;Math.abs(D)>=.1&&(B.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+D+") sn: "+g.sn+")"),F.timestampOffset=g.start)}}m.appendExecutor(L,b)},onStart:function(){},onComplete:function(){var F=self.performance.now();f.executeEnd=f.end=F,h.first===0&&(h.first=F),v&&v.first===0&&(v.first=F);var D=m.sourceBuffer,z={};for(var j in D)z[j]=x.BufferHelper.getBuffered(D[j]);m.appendError=0,m.hls.trigger(E.Events.BUFFER_APPENDED,{type:b,frag:g,part:i,chunkMeta:u,parent:g.type,timeRanges:z})},onError:function(F){B.logger.error("[buffer-controller]: Error encountered while trying to append to the "+b+" SourceBuffer",F);var D={type:M.ErrorTypes.MEDIA_ERROR,parent:g.type,details:M.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?D.details=M.ErrorDetails.BUFFER_FULL_ERROR:(m.appendError++,D.details=M.ErrorDetails.BUFFER_APPEND_ERROR,m.appendError>_.config.appendErrorMaxRetry&&(B.logger.error("[buffer-controller]: Failed "+_.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),D.fatal=!0)),_.trigger(E.Events.ERROR,D)}};R.append(Q,b)},o.onBufferFlushing=function(A,l){var m=this,_=this.operationQueue,R=function(L){return{execute:m.removeExecutor.bind(m,L,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){m.hls.trigger(E.Events.BUFFER_FLUSHED,{type:L})},onError:function(g){B.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",g)}}};l.type?_.append(R(l.type),l.type):this.getSourceBufferTypes().forEach(function(w){_.append(R(w),w)})},o.onFragParsed=function(A,l){var m=this,_=l.frag,R=l.part,w=[],L=R?R.elementaryStreams:_.elementaryStreams;L[p.ElementaryStreamTypes.AUDIOVIDEO]?w.push("audiovideo"):(L[p.ElementaryStreamTypes.AUDIO]&&w.push("audio"),L[p.ElementaryStreamTypes.VIDEO]&&w.push("video"));var b=function(){var i=self.performance.now();_.stats.buffering.end=i,R&&(R.stats.buffering.end=i);var u=R?R.stats:_.stats;m.hls.trigger(E.Events.FRAG_BUFFERED,{frag:_,part:R,stats:u,id:_.type})};w.length===0&&B.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+_.type+" level: "+_.level+" sn: "+_.sn),this.blockBuffers(b,w)},o.onFragChanged=function(A,l){this.flushBackBuffer()},o.onBufferEos=function(A,l){var m=this,_=this.getSourceBufferTypes().reduce(function(R,w){var L=m.sourceBuffer[w];return(!l.type||l.type===w)&&(L&&!L.ended&&(L.ended=!0,B.logger.log("[buffer-controller]: "+w+" sourceBuffer now EOS"))),R&&!!(!L||L.ended)},!0);_&&this.blockBuffers(function(){var R=m.mediaSource;if(!R||R.readyState!=="open")return;R.endOfStream()})},o.onLevelUpdated=function(A,l){var m=l.details;if(!m.fragments.length)return;this.details=m,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},o.flushBackBuffer=function(){var A=this.hls,l=this.details,m=this.media,_=this.sourceBuffer;if(!m||l===null)return;var R=this.getSourceBufferTypes();if(!R.length)return;var w=l.live&&A.config.liveBackBufferLength!==null?A.config.liveBackBufferLength:A.config.backBufferLength;if(!Object(k.isFiniteNumber)(w)||w<0)return;var L=m.currentTime,b=l.levelTargetDuration,g=Math.max(w,b),i=Math.floor(L/b)*b-g;R.forEach(function(u){var f=_[u];if(f){var y=x.BufferHelper.getBuffered(f);y.length>0&&i>y.start(0)&&(A.trigger(E.Events.BACK_BUFFER_REACHED,{bufferEnd:i}),l.live&&A.trigger(E.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i}),A.trigger(E.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:i,type:u}))}})},o.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var A=this.details,l=this.hls,m=this.media,_=this.mediaSource,R=A.fragments[0].start+A.totalduration,w=m.duration,L=Object(k.isFiniteNumber)(_.duration)?_.duration:0;A.live&&l.config.liveDurationInfinity?(B.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),_.duration=Infinity,this.updateSeekableRange(A)):(R>L&&R>w||!Object(k.isFiniteNumber)(w))&&(B.logger.log("[buffer-controller]: Updating Media Source duration to "+R.toFixed(3)),_.duration=R)},o.updateSeekableRange=function(A){var l=this.mediaSource,m=A.fragments,_=m.length;if(_&&A.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var R=Math.max(0,m[0].start),w=Math.max(R,R+A.totalduration);l.setLiveSeekableRange(R,w)}},o.checkPendingTracks=function(){var A=this.bufferCodecEventsExpected,l=this.operationQueue,m=this.pendingTracks,_=Object.keys(m).length;if(_&&!A||_===2){this.createSourceBuffers(m),this.pendingTracks={};var R=this.getSourceBufferTypes();if(R.length===0){this.hls.trigger(E.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}R.forEach(function(w){l.executeNext(w)})}},o.createSourceBuffers=function(A){var l=this.sourceBuffer,m=this.mediaSource;if(!m)throw Error("createSourceBuffers called when mediaSource was null");var _=0;for(var R in A)if(!l[R]){var w=A[R];if(!w)throw Error("source buffer exists for track "+R+", however track does not");var L=w.levelCodec||w.codec,b=w.container+";codecs="+L;B.logger.log("[buffer-controller]: creating sourceBuffer("+b+")");try{var g=l[R]=m.addSourceBuffer(b),i=R;this.addBufferListener(i,"updatestart",this._onSBUpdateStart),this.addBufferListener(i,"updateend",this._onSBUpdateEnd),this.addBufferListener(i,"error",this._onSBUpdateError),this.tracks[R]={buffer:g,codec:L,container:w.container,levelCodec:w.levelCodec,id:w.id},_++}catch(u){B.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+u.message),this.hls.trigger(E.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:u,mimeType:b})}}_&&this.hls.trigger(E.Events.BUFFER_CREATED,{tracks:this.tracks})},o._onSBUpdateStart=function(A){var l=this.operationQueue,m=l.current(A);m.onStart()},o._onSBUpdateEnd=function(A){var l=this.operationQueue,m=l.current(A);m.onComplete(),l.shiftAndExecuteNext(A)},o._onSBUpdateError=function(A,l){B.logger.error("[buffer-controller]: "+A+" SourceBuffer error",l),this.hls.trigger(E.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var m=this.operationQueue.current(A);m&&m.onError(l)},o.removeExecutor=function(A,l,m){var _=this.media,R=this.mediaSource,w=this.operationQueue,L=this.sourceBuffer,b=L[A];if(!_||!R||!b){B.logger.warn("[buffer-controller]: Attempting to remove from the "+A+" SourceBuffer, but it does not exist"),w.shiftAndExecuteNext(A);return}var g=Object(k.isFiniteNumber)(_.duration)?_.duration:Infinity,i=Object(k.isFiniteNumber)(R.duration)?R.duration:Infinity,u=Math.max(0,l),f=Math.min(m,g,i);f>u?(B.logger.log("[buffer-controller]: Removing ["+u+","+f+"] from the "+A+" SourceBuffer"),console.assert(!b.updating,A+" sourceBuffer must not be updating"),b.remove(u,f)):w.shiftAndExecuteNext(A)},o.appendExecutor=function(A,l){var m=this.operationQueue,_=this.sourceBuffer,R=_[l];if(!R){B.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),m.shiftAndExecuteNext(l);return}R.ended=!1,console.assert(!R.updating,l+" sourceBuffer must not be updating"),R.appendBuffer(A)},o.blockBuffers=function(A,l){var m=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){B.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(A);return}var _=this.operationQueue,R=l.map(function(w){return _.appendBlocker(w)});Promise.all(R).then(function(){A(),l.forEach(function(w){var L=m.sourceBuffer[w];(!L||!L.updating)&&_.shiftAndExecuteNext(w)})})},o.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},o.addBufferListener=function(A,l,m){var _=this.sourceBuffer[A];if(!_)return;var R=m.bind(this,A);this.listeners[A].push({event:l,listener:R}),_.addEventListener(l,R)},o.removeBufferListeners=function(A){var l=this.sourceBuffer[A];if(!l)return;this.listeners[A].forEach(function(m){l.removeEventListener(m.event,m.listener)})},a}()},"./src/controller/buffer-operation-queue.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return E});var k=I("./src/utils/logger.ts"),E=function(){function B(x){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=x}var M=B.prototype;return M.append=function(T,p){var r=this.queues[p];r.push(T),r.length===1&&this.buffers[p]&&this.executeNext(p)},M.insertAbort=function(T,p){var r=this.queues[p];r.unshift(T),this.executeNext(p)},M.appendBlocker=function(T){var p,r=new Promise(function(c){p=c}),t={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(t,T),r},M.executeNext=function(T){var p=this.buffers,r=this.queues,t=p[T],c=r[T];if(c.length){var s=c[0];try{s.execute()}catch(a){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(a),(!t||!t.updating)&&(c.shift(),this.executeNext(T))}}},M.shiftAndExecuteNext=function(T){this.queues[T].shift(),this.executeNext(T)},M.current=function(T){return this.queues[T][0]},B}()},"./src/controller/cap-level-controller.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/events.ts");function E(x,T){for(var p=0;p0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(r.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},T.getMaxLevel=function(r){var t=this,c=this.hls.levels;if(!c.length)return-1;var s=c.filter(function(a,o){return x.isLevelAllowed(o,t.restrictedLevels)&&o<=r});return this.clientRect=null,x.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},T.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()},T.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},T.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,t={width:0,height:0};if(r){var c=r.getBoundingClientRect();t.width=c.width,t.height=c.height,!t.width&&!t.height&&(t.width=c.right-c.left||r.width||0,t.height=c.bottom-c.top||r.height||0)}return this.clientRect=t,t},x.isLevelAllowed=function(r,t){return t===void 0&&(t=[]),t.indexOf(r)===-1},x.getMaxLevelByMediaSize=function(r,t,c){if(!r||!r.length)return-1;for(var s=function(l,m){return m?l.width!==m.width||l.height!==m.height:!0},a=r.length-1,o=0;o=t||d.height>=c)&&s(d,r[o+1])){a=o;break}}return a},B(x,[{key:"mediaWidth",get:function(){return this.getDimensions().width*x.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*x.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(t){}return r}}]),x}();K.default=M},"./src/controller/cmcd-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return s});var k=I("./src/events.ts"),E=I("./src/types/cmcd.ts"),B=I("./src/utils/buffer-helper.ts"),M=I("./src/utils/logger.ts");function x(a,o){for(var d=0;d=a.length?{done:!0}:{done:!1,value:a[A++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(a,o){if(!a)return;if(typeof a=="string")return t(a,o);var d=Object.prototype.toString.call(a).slice(8,-1);if(d==="Object"&&a.constructor&&(d=a.constructor.name),d==="Map"||d==="Set")return Array.from(a);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return t(a,o)}function t(a,o){(o==null||o>a.length)&&(o=a.length);for(var d=0,A=new Array(o);dl&&(l=w.bitrate)}return l>0?l:NaN},o.getBufferLength=function(A){var l=this.hls.media,m=A===E.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!m||!l)return NaN;var _=B.BufferHelper.bufferInfo(m,l.currentTime,this.config.maxBufferHole);return _.len*1e3},o.createPlaylistLoader=function(){var A=this.config.pLoader,l=this.applyPlaylistData,m=A||this.config.loader;return function(){function _(w){this.loader=void 0,this.loader=new m(w)}var R=_.prototype;return R.destroy=function(){this.loader.destroy()},R.abort=function(){this.loader.abort()},R.load=function(L,b,g){l(L),this.loader.load(L,b,g)},T(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},o.createFragmentLoader=function(){var A=this.config.fLoader,l=this.applyFragmentData,m=A||this.config.loader;return function(){function _(w){this.loader=void 0,this.loader=new m(w)}var R=_.prototype;return R.destroy=function(){this.loader.destroy()},R.abort=function(){this.loader.abort()},R.load=function(L,b,g){l(L),this.loader.load(L,b,g)},T(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},a.uuid=function(){var A=URL.createObjectURL(new Blob),l=A.toString();return URL.revokeObjectURL(A),l.substr(l.lastIndexOf("/")+1)},a.serialize=function(A){for(var l=[],m=function(N){return!Number.isNaN(N)&&N!=null&&N!==""&&N!==!1},_=function(N){return Math.round(N)},R=function(N){return _(N/100)*100},w=function(N){return encodeURIComponent(N)},L={br:_,d:_,bl:R,dl:R,mtp:R,nor:w,rtp:R,tb:_},b=Object.keys(A||{}).sort(),g=p(b),i;!(i=g()).done;){var u=i.value,f=A[u];if(!m(f))continue;if(u==="v"&&f===1)continue;if(u=="pr"&&f===1)continue;var y=L[u];y&&(f=y(f));var h=typeof f,v=void 0;u==="ot"||u==="sf"||u==="st"?v=u+"="+f:h==="boolean"?v=u:h==="number"?v=u+"="+f:v=u+"="+JSON.stringify(f),l.push(v)}return l.join(",")},a.toHeaders=function(A){for(var l=Object.keys(A),m={},_=["Object","Request","Session","Status"],R=[{},{},{},{}],w={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},L=0,b=l;Lp){this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.KEY_SYSTEM_ERROR,details:E.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var w=p-this._requestLicenseFailureCount+1;B.logger.warn("Retrying license request, "+w+" attempts left"),this._requestLicense(l,m)}break}},a._generateLicenseRequestChallenge=function(d,A){switch(d.mediaKeySystemDomain){case M.KeySystems.WIDEVINE:return A}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},a._requestLicense=function(d,A){B.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){B.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.KEY_SYSTEM_ERROR,details:E.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var m=this.getLicenseServerUrl(l.mediaKeySystemDomain),_=this._createLicenseXhr(m,d,A);B.logger.log("Sending license request to URL: "+m);var R=this._generateLicenseRequestChallenge(l,d);_.send(R)}catch(w){B.logger.error("Failure requesting DRM license: "+w),this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.KEY_SYSTEM_ERROR,details:E.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(d,A){if(!this._emeEnabled)return;var l=A.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},a.onMediaDetached=function(){var d=this._media,A=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(A.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},a.onManifestParsed=function(d,A){if(!this._emeEnabled)return;var l=A.levels.map(function(_){return _.audioCodec}).filter(function(_){return!!_}),m=A.levels.map(function(_){return _.videoCodec}).filter(function(_){return!!_});this._attemptKeySystemAccess(M.KeySystems.WIDEVINE,l,m)},T(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();K.default=c},"./src/controller/fps-controller.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/events.ts"),E=I("./src/utils/logger.ts"),B=function(){function M(T){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=T,this.registerListeners()}var x=M.prototype;return x.setStreamController=function(p){this.streamController=p},x.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},x.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching)},x.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},x.onMediaAttaching=function(p,r){var t=this.hls.config;if(t.capLevelOnFPSDrop){var c=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=c,c&&typeof c.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod)}},x.checkFPS=function(p,r,t){var c=performance.now();if(r){if(this.lastTime){var s=c-this.lastTime,a=t-this.lastDroppedFrames,o=r-this.lastDecodedFrames,d=1e3*a/s,A=this.hls;if(A.trigger(k.Events.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:t}),d>0&&a>A.config.fpsDroppedMonitoringThreshold*o){var l=A.currentLevel;E.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(A.autoLevelCapping===-1||A.autoLevelCapping>=l)&&(l=l-1,A.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:A.currentLevel}),A.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=c,this.lastDroppedFrames=t,this.lastDecodedFrames=r}},x.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var r=p.getVideoPlaybackQuality();this.checkFPS(p,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},M}();K.default=B},"./src/controller/fragment-finders.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"findFragmentByPDT",function(){return B}),I.d(K,"findFragmentByPTS",function(){return M}),I.d(K,"fragmentWithinToleranceTest",function(){return x}),I.d(K,"pdtWithinToleranceTest",function(){return T}),I.d(K,"findFragWithCC",function(){return p});var k=I("./src/polyfills/number.ts"),E=I("./src/utils/binary-search.ts");function B(r,t,c){if(t===null||!Array.isArray(r)||!r.length||!Object(k.isFiniteNumber)(t))return null;var s=r[0].programDateTime;if(t<(s||0))return null;var a=r[r.length-1].endProgramDateTime;if(t>=(a||0))return null;c=c||0;for(var o=0;or&&c.start?-1:0}function T(r,t,c){var s=Math.min(t,c.duration+(c.deltaPTS?c.deltaPTS:0))*1e3,a=c.endProgramDateTime||0;return a-s>r}function p(r,t){return E.default.search(r,function(c){return c.cct?-1:0})}},"./src/controller/fragment-tracker.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"FragmentState",function(){return B}),I.d(K,"FragmentTracker",function(){return M});var k=I("./src/events.ts"),E=I("./src/types/loader.ts"),B;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(B||(B={}));var M=function(){function p(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var r=p.prototype;return r._registerListeners=function(){var c=this.hls;c.on(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),c.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var c=this.hls;c.off(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),c.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(c,s){if(s===E.PlaylistLevelType.MAIN){var a=this.activeFragment,o=this.activeParts;if(!a)return null;if(o)for(var d=o.length;d--;){var A=o[d],l=A?A.end:a.appendedPTS;if(A.start<=c&&l!==void 0&&c<=l)return d>9&&(this.activeParts=o.slice(d-9)),A}else if(a.start<=c&&a.appendedPTS!==void 0&&c<=a.appendedPTS)return a}return this.getBufferedFrag(c,s)},r.getBufferedFrag=function(c,s){for(var a=this.fragments,o=Object.keys(a),d=o.length;d--;){var A=a[o[d]];if((A==null?void 0:A.body.type)===s&&A.buffered){var l=A.body;if(l.start<=c&&c<=l.end)return l}}return null},r.detectEvictedFragments=function(c,s,a){var o=this;Object.keys(this.fragments).forEach(function(d){var A=o.fragments[d];if(!A)return;if(!A.buffered){A.body.type===a&&o.removeFragment(A.body);return}var l=A.range[c];if(!l)return;l.time.some(function(m){var _=!o.isTimeBuffered(m.startPTS,m.endPTS,s);return _&&o.removeFragment(A.body),_})})},r.detectPartialFragments=function(c){var s=this,a=this.timeRanges,o=c.frag,d=c.part;if(!a||o.sn==="initSegment")return;var A=T(o),l=this.fragments[A];if(!l)return;Object.keys(a).forEach(function(m){var _=o.elementaryStreams[m];if(!_)return;var R=a[m],w=d!==null||_.partial===!0;l.range[m]=s.getBufferedTimes(o,d,w,R)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},r.fragBuffered=function(c){var s=T(c),a=this.fragments[s];a&&(a.backtrack=a.loaded=null,a.buffered=!0)},r.getBufferedTimes=function(c,s,a,o){for(var d={time:[],partial:a},A=s?s.start:c.start,l=s?s.end:c.end,m=c.minEndPTS||l,_=c.maxStartPTS||A,R=0;R=w&&m<=L){d.time.push({startPTS:Math.max(A,o.start(R)),endPTS:Math.min(l,o.end(R))});break}else if(Aw)d.partial=!0,d.time.push({startPTS:Math.max(A,o.start(R)),endPTS:Math.min(l,o.end(R))});else if(l<=w)break}return d},r.getPartialFragment=function(c){var s=null,a,o,d,A=0,l=this.bufferPadding,m=this.fragments;return Object.keys(m).forEach(function(_){var R=m[_];if(!R)return;x(R)&&(o=R.body.start-l,d=R.body.end+l,c>=o&&c<=d&&(a=Math.min(c-o,d-c),A<=a&&(s=R.body,A=a)))}),s},r.getState=function(c){var s=T(c),a=this.fragments[s];return a?a.buffered?x(a)?B.PARTIAL:B.OK:a.backtrack?B.BACKTRACKED:B.APPENDING:B.NOT_LOADED},r.backtrack=function(c,s){var a=T(c),o=this.fragments[a];if(!o||o.backtrack)return null;var d=o.backtrack=s||o.loaded;return o.loaded=null,d},r.getBacktrackData=function(c){var s=T(c),a=this.fragments[s];if(a){var o,d=a.backtrack;if(d!=null&&(o=d.payload)!==null&&o!==void 0&&o.byteLength)return d;this.removeFragment(c)}return null},r.isTimeBuffered=function(c,s,a){for(var o,d,A=0;A=o&&s<=d)return!0;if(s<=o)return!1}return!1},r.onFragLoaded=function(c,s){var a=s.frag,o=s.part;if(a.sn==="initSegment"||a.bitrateTest||o)return;var d=T(a);this.fragments[d]={body:a,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(c,s){var a=this,o=s.frag,d=s.part,A=s.timeRanges;if(o.type===E.PlaylistLevelType.MAIN)if(this.activeFragment=o,d){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(d)}else this.activeParts=null;this.timeRanges=A,Object.keys(A).forEach(function(m){var _=A[m];if(a.detectEvictedFragments(m,_),!d)for(var R=0;R<_.length;R++)o.appendedPTS=Math.max(_.end(R),o.appendedPTS||0)})},r.onFragBuffered=function(c,s){this.detectPartialFragments(s)},r.hasFragment=function(c){var s=T(c);return!!this.fragments[s]},r.removeFragmentsInRange=function(c,s,a){var o=this;Object.keys(this.fragments).forEach(function(d){var A=o.fragments[d];if(!A)return;if(A.buffered){var l=A.body;l.type===a&&l.startc&&o.removeFragment(l)}})},r.removeFragment=function(c){var s=T(c);c.stats.loaded=0,c.clearElementaryStreamInfo(),delete this.fragments[s]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function x(p){var r,t;return p.buffered&&(((r=p.range.video)===null||r===void 0?void 0:r.partial)||((t=p.range.audio)===null||t===void 0?void 0:t.partial))}function T(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"STALL_MINIMUM_DURATION_MS",function(){return x}),I.d(K,"MAX_START_GAP_JUMP",function(){return T}),I.d(K,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),I.d(K,"SKIP_BUFFER_RANGE_START",function(){return r}),I.d(K,"default",function(){return t});var k=I("./src/utils/buffer-helper.ts"),E=I("./src/errors.ts"),B=I("./src/events.ts"),M=I("./src/utils/logger.ts"),x=250,T=2,p=.1,r=.05,t=function(){function c(a,o,d,A){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=a,this.media=o,this.fragmentTracker=d,this.hls=A}var s=c.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(o){var d=this.config,A=this.media,l=this.stalled,m=A.currentTime,_=A.seeking,R=this.seeking&&!_,w=!this.seeking&&_;if(this.seeking=_,m!==o){if(this.moved=!0,l!==null){if(this.stallReported){var L=self.performance.now()-l;M.logger.warn("playback not stuck anymore @"+m+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((w||R)&&(this.stalled=null),A.paused||A.ended||A.playbackRate===0||!k.BufferHelper.getBuffered(A).length)return;var b=k.BufferHelper.bufferInfo(A,m,0),g=b.len>0,i=b.nextStart||0;if(!g&&!i)return;if(_){var u=b.len>T,f=!i||i-m>T&&!this.fragmentTracker.getPartialFragment(m);if(u||f)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var y,h=Math.max(i,b.start||0)-m,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=v==null||((y=v.details)===null||y===void 0)?void 0:y.live,N=P?v.details.targetduration*2:T;if(h>0&&h<=N){this._trySkipBufferHole(null);return}}var Q=self.performance.now();if(l===null){this.stalled=Q;return}var G=Q-l;!_&&G>=x&&this._reportStall(b.len);var F=k.BufferHelper.bufferInfo(A,m,d.maxBufferHole);this._tryFixBufferStall(F,G)},s._tryFixBufferStall=function(o,d){var A=this.config,l=this.fragmentTracker,m=this.media,_=m.currentTime,R=l.getPartialFragment(_);if(R){var w=this._trySkipBufferHole(R);if(w)return}o.len>A.maxBufferHole&&d>A.highBufferWatchdogPeriod*1e3&&(M.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(o){var d=this.hls,A=this.media,l=this.stallReported;l||(this.stallReported=!0,M.logger.warn("Playback stalling at @"+A.currentTime+" due to low buffer (buffer="+o+")"),d.trigger(B.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:o}))},s._trySkipBufferHole=function(o){for(var d=this.config,A=this.hls,l=this.media,m=l.currentTime,_=0,R=k.BufferHelper.getBuffered(l),w=0;w=_&&m.05&&this.forwardBufferLength>1){var w=Math.min(2,Math.max(1,A)),L=Math.round(2/(1+Math.exp(-.75*m-this.edgeStalled))*20)/20;c.playbackRate=Math.min(w,Math.max(1,L))}else c.playbackRate!==1&&c.playbackRate!==0&&(c.playbackRate=1)},r.estimateLiveEdge=function(){var c=this.levelDetails;return c===null?null:c.edge+c.age},r.computeLatency=function(){var c=this.estimateLiveEdge();return c===null?null:c-this.currentTime},x(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var c=this.config,s=this.levelDetails;return c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:s?c.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var c=this.levelDetails;if(c===null)return null;var s=c.holdBack,a=c.partHoldBack,o=c.targetduration,d=this.config,A=d.liveSyncDuration,l=d.liveSyncDurationCount,m=d.lowLatencyMode,_=this.hls.userConfig,R=m&&a||s;(_.liveSyncDuration||_.liveSyncDurationCount||R===0)&&(R=A!==void 0?A:l*o);var w=o,L=1;return R+Math.min(this.stallCount*L,w)}},{key:"liveSyncPosition",get:function(){var c=this.estimateLiveEdge(),s=this.targetLatency,a=this.levelDetails;if(c===null||s===null||a===null)return null;var o=a.edge,d=c-s-this.edgeStalled,A=o-a.totalduration,l=o-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(A,d),l)}},{key:"drift",get:function(){var c=this.levelDetails;return c===null?1:c.drift}},{key:"edgeStalled",get:function(){var c=this.levelDetails;if(c===null)return 0;var s=(this.config.lowLatencyMode&&c.partTarget||c.targetduration)*3;return Math.max(c.age-s,0)}},{key:"forwardBufferLength",get:function(){var c=this.media,s=this.levelDetails;if(!c||!s)return 0;var a=c.buffered.length;return a?c.buffered.end(a-1):s.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return d});var k=I("./src/types/level.ts"),E=I("./src/events.ts"),B=I("./src/errors.ts"),M=I("./src/utils/codecs.ts"),x=I("./src/controller/level-helper.ts"),T=I("./src/controller/base-playlist-controller.ts"),p=I("./src/types/loader.ts");function r(){return r=Object.assign||function(A){for(var l=1;l0){i=L[0].bitrate,L.sort(function(G,F){return G.bitrate-F.bitrate}),this._levels=L;for(var P=0;Pthis.hls.config.fragLoadingMaxRetry&&(u=w.frag.level)):u=w.frag.level}break;case B.ErrorDetails.LEVEL_LOAD_ERROR:case B.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(i=!1),u=L.level),g=!0;break;case B.ErrorDetails.REMUX_ALLOC_ERROR:u=w.level,g=!0;break}u!==void 0&&this.recoverLevel(w,u,g,i)},m.recoverLevel=function(R,w,L,b){var g=R.details,i=this._levels[w];if(i.loadError++,L){var u=this.retryLoadingOrFail(R);if(u)R.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(b){var f=i.url.length;if(f>1&&i.loadError1){var b=(w.urlId+1)%L;this.warn("Switching to redundant URL-id "+b),this._levels.forEach(function(g){g.urlId=b}),this.level=R}},m.onFragLoaded=function(R,w){var L=w.frag;if(L!==void 0&&L.type===p.PlaylistLevelType.MAIN){var b=this._levels[L.level];b!==void 0&&(b.fragmentError=0,b.loadError=0)}},m.onLevelLoaded=function(R,w){var L,b=w.level,g=w.details,i=this._levels[b];if(!i){var u;this.warn("Invalid level index "+b),(u=w.deliveryDirectives)!==null&&u!==void 0&&u.skip&&(g.deltaUpdateFailed=!0);return}b===this.currentLevelIndex?(i.fragmentError===0&&(i.loadError=0,this.retryCount=0),this.playlistLoaded(b,w,i.details)):(L=w.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(g.deltaUpdateFailed=!0)},m.onAudioTrackSwitched=function(R,w){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var b=-1,g=this.hls.audioTracks[w.id].groupId,i=0;i0){var b=L.urlId,g=L.url[b];if(R)try{g=R.addDirectives(g)}catch(i){this.warn("Could not construct new URL with HLS Delivery Directives: "+i)}this.log("Attempt loading level index "+w+(R?" at sn "+R.msn+" part "+R.part:"")+" with URL-id "+b+" "+g),this.clearTimer(),this.hls.trigger(E.Events.LEVEL_LOADING,{url:g,level:w,id:b,deliveryDirectives:R||null})}},m.removeLevel=function(R,w){var L=function(i,u){return u!==w},b=this._levels.filter(function(g,i){return i!==R?!0:g.url.length>1&&w!==void 0?(g.url=g.url.filter(L),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(L)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(L)),g.urlId=0,!0):!1}).map(function(g,i){var u=g.details;return u!=null&&u.fragments&&u.fragments.forEach(function(f){f.level=i}),g});this._levels=b,this.hls.trigger(E.Events.LEVELS_UPDATED,{levels:b})},c(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(R){var w,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===R&&(w=L[R])!==null&&w!==void 0&&w.details)return;if(R<0||R>=L.length){var b=R<0;if(this.hls.trigger(E.Events.ERROR,{type:B.ErrorTypes.OTHER_ERROR,details:B.ErrorDetails.LEVEL_SWITCH_ERROR,level:R,fatal:b,reason:"invalid level idx"}),b)return;R=Math.min(R,L.length-1)}this.clearTimer();var g=this.currentLevelIndex,i=L[g],u=L[R];this.log("switching to level "+R+" from "+g),this.currentLevelIndex=R;var f=r({},u,{level:R,maxBitrate:u.maxBitrate,uri:u.uri,urlId:u.urlId});delete f._urlId,this.hls.trigger(E.Events.LEVEL_SWITCHING,f);var y=u.details;if(!y||y.live){var h=this.switchParams(u.uri,i==null?void 0:i.details);this.loadPlaylist(h)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(R){this.manualLevelIndex=R,this._startLevel===void 0&&(this._startLevel=R),R!==-1&&(this.level=R)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(R){this._firstLevel=R}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var R=this.hls.config.startLevel;return R!==void 0?R:this._firstLevel}else return this._startLevel},set:function(R){this._startLevel=R}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(R){this.level=R,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=R)}}]),l}(T.default)},"./src/controller/level-helper.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"addGroupId",function(){return B}),I.d(K,"assignTrackIdsByGroup",function(){return M}),I.d(K,"updatePTS",function(){return x}),I.d(K,"updateFragPTSDTS",function(){return p}),I.d(K,"mergeDetails",function(){return r}),I.d(K,"mapPartIntersection",function(){return t}),I.d(K,"mapFragmentIntersection",function(){return c}),I.d(K,"adjustSliding",function(){return s}),I.d(K,"addSliding",function(){return a}),I.d(K,"computeReloadInterval",function(){return o}),I.d(K,"getFragmentWithSN",function(){return d}),I.d(K,"getPartWith",function(){return A});var k=I("./src/polyfills/number.ts"),E=I("./src/utils/logger.ts");function B(l,m,_){switch(m){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(_);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(_);break}}function M(l){var m={};l.forEach(function(_){var R=_.groupId||"";_.id=m[R]=m[R]||0,m[R]++})}function x(l,m,_){var R=l[m],w=l[_];T(R,w)}function T(l,m){var _=m.startPTS;if(Object(k.isFiniteNumber)(_)){var R=0,w;m.sn>l.sn?(R=_-l.start,w=l):(R=l.start-_,w=m),w.duration!==R&&(w.duration=R)}else if(m.sn>l.sn){var L=l.cc===m.cc;L&&l.minEndPTS?m.start=l.start+(l.minEndPTS-l.start):m.start=l.start+l.duration}else m.start=Math.max(l.start-m.duration,0)}function p(l,m,_,R,w,L){var b=R-_;b<=0&&(E.logger.warn("Fragment should have a positive duration",m),R=_+m.duration,L=w+m.duration);var g=_,i=R,u=m.startPTS,f=m.endPTS;if(Object(k.isFiniteNumber)(u)){var y=Math.abs(u-_);Object(k.isFiniteNumber)(m.deltaPTS)?m.deltaPTS=Math.max(y,m.deltaPTS):m.deltaPTS=y,g=Math.max(_,u),_=Math.min(_,u),w=Math.min(w,m.startDTS),i=Math.min(R,f),R=Math.max(R,f),L=Math.max(L,m.endDTS)}m.duration=R-_;var h=_-m.start;m.appendedPTS=R,m.start=m.startPTS=_,m.maxStartPTS=g,m.startDTS=w,m.endPTS=R,m.minEndPTS=i,m.endDTS=L;var v=m.sn;if(!l||vl.endSN)return 0;var P,N=v-l.startSN,Q=l.fragments;for(Q[N]=m,P=N;P>0;P--)T(Q[P],Q[P-1]);for(P=N;P=0;w--){var L=R[w].initSegment;if(L){_=L;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var b=0,g;if(c(l,m,function(P,N){P.relurl&&(b=P.cc-N.cc),Object(k.isFiniteNumber)(P.startPTS)&&Object(k.isFiniteNumber)(P.endPTS)&&(N.start=N.startPTS=P.startPTS,N.startDTS=P.startDTS,N.appendedPTS=P.appendedPTS,N.maxStartPTS=P.maxStartPTS,N.endPTS=P.endPTS,N.endDTS=P.endDTS,N.minEndPTS=P.minEndPTS,N.duration=P.endPTS-P.startPTS,N.duration&&(g=N),m.PTSKnown=m.alignedSliding=!0),N.elementaryStreams=P.elementaryStreams,N.loader=P.loader,N.stats=P.stats,N.urlId=P.urlId,P.initSegment&&(N.initSegment=P.initSegment,_=P.initSegment)}),_){var i=m.fragmentHint?m.fragments.concat(m.fragmentHint):m.fragments;i.forEach(function(P){var N;(!P.initSegment||P.initSegment.relurl===((N=_)===null||N===void 0?void 0:N.relurl))&&(P.initSegment=_)})}if(m.skippedSegments&&(m.deltaUpdateFailed=m.fragments.some(function(P){return!P}),m.deltaUpdateFailed)){E.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var u=m.skippedSegments;u--;)m.fragments.shift();m.startSN=m.fragments[0].sn,m.startCC=m.fragments[0].cc}var f=m.fragments;if(b){E.logger.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y=R.length)return;a(m,R[_].start)}function a(l,m){if(m){for(var _=l.fragments,R=l.skippedSegments;R<_.length;R++)_[R].start+=m;l.fragmentHint&&(l.fragmentHint.start+=m)}}function o(l,m){var _=1e3*l.levelTargetDuration,R=_/2,w=l.age,L=w>0&&w<_*3,b=m.loading.end-m.loading.start,g,i=l.availabilityDelay;if(l.updated===!1)if(L){var u=333*l.misses;g=Math.max(Math.min(R,b*2),u),l.availabilityDelay=(l.availabilityDelay||0)+g}else g=R;else L?(i=Math.min(i||_/2,w),l.availabilityDelay=i,g=i+_-w):g=_-b;return Math.round(g)}function d(l,m,_){if(!l||!l.details)return null;var R=l.details,w=R.fragments[m-R.startSN];return w||(w=R.fragmentHint,w&&w.sn===m?w:m0&&i===-1&&(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),i=u),this.state=E.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=i,this.tick()}else this._forceStartLoad=!0,this.state=E.State.STOPPED},b.stopLoad=function(){this._forceStartLoad=!1,w.prototype.stopLoad.call(this)},b.doTick=function(){switch(this.state){case E.State.IDLE:this.doTickIdle();break;case E.State.WAITING_LEVEL:{var i,u=this.levels,f=this.level,y=u==null||((i=u[f])===null||i===void 0)?void 0:i.details;if(y&&(!y.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(y))break;this.state=E.State.IDLE;break}break}case E.State.FRAG_LOADING_WAITING_RETRY:{var h,v=self.performance.now(),P=this.retryDate;(!P||v>=P||(h=this.media)!==null&&h!==void 0&&h.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=E.State.IDLE)}break;default:break}this.onTickEnd()},b.onTickEnd=function(){w.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},b.doTickIdle=function(){var i,u,f=this.hls,y=this.levelLastLoaded,h=this.levels,v=this.media,P=f.config,N=f.nextLoadLevel;if(y===null||!v&&(this.startFragRequested||!P.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!h||!h[N])return;var Q=h[N];this.level=f.nextLoadLevel=N;var G=Q.details;if(!G||this.state===E.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==N){this.state=E.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,p.PlaylistLevelType.MAIN);if(F===null)return;var D=F.len,z=this.getMaxBufferLength(Q.maxBitrate);if(D>=z)return;if(this._streamEnded(F,G)){var j={};this.altAudio&&(j.type="video"),this.hls.trigger(M.Events.BUFFER_EOS,j),this.state=E.State.ENDED;return}var Z=F.end,te=this.getNextFragment(Z,G);if(this.couldBacktrack&&!this.fragPrevious&&te&&te.sn!=="initSegment"){var Ae=te.sn-G.startSN;Ae>1&&(te=G.fragments[Ae-1],this.fragmentTracker.removeFragment(te))}if(te&&this.fragmentTracker.getState(te)===T.FragmentState.OK&&this.nextLoadPosition>Z){var he=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,he,p.PlaylistLevelType.MAIN),te=this.getNextFragment(this.nextLoadPosition,G)}if(!te)return;te.initSegment&&!te.initSegment.data&&!this.bitrateTest&&(te=te.initSegment),((i=te.decryptdata)===null||i===void 0?void 0:i.keyFormat)==="identity"&&!((u=te.decryptdata)!==null&&u!==void 0&&u.key)?this.loadKey(te,G):this.loadFragment(te,G,Z)},b.loadFragment=function(i,u,f){var y,h=this.fragmentTracker.getState(i);if(this.fragCurrent=i,h===T.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(i);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else h=T.FragmentState.NOT_LOADED}h===T.FragmentState.NOT_LOADED||h===T.FragmentState.PARTIAL?i.sn==="initSegment"?this._loadInitSegment(i):this.bitrateTest?(i.bitrateTest=!0,this.log("Fragment "+i.sn+" of level "+i.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(i)):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,i,u,f)):h===T.FragmentState.APPENDING?this.reduceMaxBufferLength(i.duration)&&this.fragmentTracker.removeFragment(i):((y=this.media)===null||y===void 0?void 0:y.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},b.getAppendedFrag=function(i){var u=this.fragmentTracker.getAppendedFrag(i,p.PlaylistLevelType.MAIN);return u&&"fragment"in u?u.fragment:u},b.getBufferedFrag=function(i){return this.fragmentTracker.getBufferedFrag(i,p.PlaylistLevelType.MAIN)},b.followingBufferedFrag=function(i){return i?this.getBufferedFrag(i.end+.5):null},b.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},b.nextLevelSwitch=function(){var i=this.levels,u=this.media;if(u!=null&&u.readyState){var f,y=this.getAppendedFrag(u.currentTime);if(y&&y.start>1&&this.flushMainBuffer(0,y.start-1),!u.paused&&i){var h=this.hls.nextLoadLevel,v=i[h],P=this.fragLastKbps;P&&this.fragCurrent?f=this.fragCurrent.duration*v.maxBitrate/(1e3*P)+1:f=0}else f=0;var N=this.getBufferedFrag(u.currentTime+f);if(N){var Q=this.followingBufferedFrag(N);if(Q){this.abortCurrentFrag();var G=Q.maxStartPTS?Q.maxStartPTS:Q.start,F=Q.duration,D=Math.max(N.end,G+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(D,Number.POSITIVE_INFINITY)}}}},b.abortCurrentFrag=function(){var i=this.fragCurrent;this.fragCurrent=null,i!=null&&i.loader&&i.loader.abort(),this.state===E.State.KEY_LOADING&&(this.state=E.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},b.flushMainBuffer=function(i,u){w.prototype.flushMainBuffer.call(this,i,u,this.altAudio?"video":null)},b.onMediaAttached=function(i,u){w.prototype.onMediaAttached.call(this,i,u);var f=u.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),f.addEventListener("playing",this.onvplaying),f.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,f,this.fragmentTracker,this.hls)},b.onMediaDetaching=function(){var i=this.media;i&&(i.removeEventListener("playing",this.onvplaying),i.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),w.prototype.onMediaDetaching.call(this)},b.onMediaPlaying=function(){this.tick()},b.onMediaSeeked=function(){var i=this.media,u=i?i.currentTime:null;Object(k.isFiniteNumber)(u)&&this.log("Media seeked to "+u.toFixed(3)),this.tick()},b.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(M.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},b.onManifestParsed=function(i,u){var f=!1,y=!1,h;u.levels.forEach(function(v){h=v.audioCodec,h&&(h.indexOf("mp4a.40.2")!==-1&&(f=!0),h.indexOf("mp4a.40.5")!==-1&&(y=!0))}),this.audioCodecSwitch=f&&y&&!Object(B.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=u.levels,this.startFragRequested=!1},b.onLevelLoading=function(i,u){var f=this.levels;if(!f||this.state!==E.State.IDLE)return;var y=f[u.level];(!y.details||y.details.live&&this.levelLastLoaded!==u.level||this.waitForCdnTuneIn(y.details))&&(this.state=E.State.WAITING_LEVEL)},b.onLevelLoaded=function(i,u){var f,y=this.levels,h=u.level,v=u.details,P=v.totalduration;if(!y){this.warn("Levels were reset while loading level "+h);return}this.log("Level "+h+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+P);var N=this.fragCurrent;N&&(this.state===E.State.FRAG_LOADING||this.state===E.State.FRAG_LOADING_WAITING_RETRY)&&(N.level!==u.level&&N.loader&&(this.state=E.State.IDLE,N.loader.abort()));var Q=y[h],G=0;if(v.live||(f=Q.details)!==null&&f!==void 0&&f.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;G=this.alignPlaylists(v,Q.details)}if(Q.details=v,this.levelLastLoaded=h,this.hls.trigger(M.Events.LEVEL_UPDATED,{details:v,level:h}),this.state===E.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=E.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,G),this.tick()},b._handleFragmentLoadProgress=function(i){var u,f=i.frag,y=i.part,h=i.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+f.sn+" of level "+f.level+" will not be buffered");return}var P=v[f.level],N=P.details;if(!N){this.warn("Dropping fragment "+f.sn+" of level "+f.level+" after level details were reset");return}var Q=P.videoCodec,G=N.PTSKnown||!N.live,F=(u=f.initSegment)===null||u===void 0?void 0:u.data,D=this._getAudioCodec(P),z=this.transmuxer=this.transmuxer||new t.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),j=y?y.index:-1,Z=j!==-1,te=new c.ChunkMetadata(f.level,f.sn,f.stats.chunkCount,h.byteLength,j,Z),Ae=this.initPTS[f.cc];z.push(h,F,D,Q,f,y,N.totalduration,G,te,Ae)},b.onAudioTrackSwitching=function(i,u){var f=this.altAudio,y=!!u.url,h=u.id;if(!y){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;f&&P.trigger(M.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:h})}},b.onAudioTrackSwitched=function(i,u){var f=u.id,y=!!this.hls.audioTracks[f].url;if(y){var h=this.videoBuffer;h&&this.mediaBuffer!==h&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=h)}this.altAudio=y,this.tick()},b.onBufferCreated=function(i,u){var f=u.tracks,y,h,v=!1;for(var P in f){var N=f[P];if(N.id==="main"){if(h=P,y=N,P==="video"){var Q=f[P];Q&&(this.videoBuffer=Q.buffer)}}else v=!0}v&&y?(this.log("Alternate track found, use "+h+".buffered to schedule main fragment loading"),this.mediaBuffer=y.buffer):this.mediaBuffer=this.media},b.onFragBuffered=function(i,u){var f=u.frag,y=u.part;if(f&&f.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(f)){this.warn("Fragment "+f.sn+(y?" p: "+y.index:"")+" of level "+f.level+" finished buffering, but was aborted. state: "+this.state),this.state===E.State.PARSED&&(this.state=E.State.IDLE);return}var h=y?y.stats:f.stats;this.fragLastKbps=Math.round(8*h.total/(h.buffering.end-h.loading.first)),f.sn!=="initSegment"&&(this.fragPrevious=f),this.fragBufferedComplete(f,y)},b.onError=function(i,u){switch(u.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.MAIN,u);break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==E.State.ERROR&&(u.fatal?(this.warn(""+u.details),this.state=E.State.ERROR):!u.levelRetry&&this.state===E.State.WAITING_LEVEL&&(this.state=E.State.IDLE));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if(u.parent==="main"&&(this.state===E.State.PARSING||this.state===E.State.PARSED)){var f=!0,y=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);y&&y.len>.5&&(f=!this.reduceMaxBufferLength(y.len)),f&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},b.checkBuffer=function(){var i=this.media,u=this.gapController;if(!i||!u||!i.readyState)return;var f=x.BufferHelper.getBuffered(i);!this.loadedmetadata&&f.length?(this.loadedmetadata=!0,this.seekToStartPos()):u.poll(this.lastCurrentTime),this.lastCurrentTime=i.currentTime},b.onFragLoadEmergencyAborted=function(){this.state=E.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},b.onBufferFlushed=function(i,u){var f=u.type;if(f!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var y=(f===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(y,f,p.PlaylistLevelType.MAIN)}},b.onLevelsUpdated=function(i,u){this.levels=u.levels},b.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},b.seekToStartPos=function(){var i=this.media,u=i.currentTime,f=this.startPosition;if(f>=0&&u0&&(v1&&i.seeking===!1){var f=i.currentTime;if(x.BufferHelper.isBuffered(i,f)?u=this.getAppendedFrag(f):x.BufferHelper.isBuffered(i,f+.1)&&(u=this.getAppendedFrag(f+.1)),u){var y=this.fragPlaying,h=u.level;(!y||u.sn!==y.sn||y.level!==h||u.urlId!==y.urlId)&&(this.hls.trigger(M.Events.FRAG_CHANGED,{frag:u}),(!y||y.level!==h)&&this.hls.trigger(M.Events.LEVEL_SWITCHED,{level:h}),this.fragPlaying=u)}}},A(L,[{key:"nextLevel",get:function(){var i=this.nextBufferedFrag;return i?i.level:-1}},{key:"currentLevel",get:function(){var i=this.media;if(i){var u=this.getAppendedFrag(i.currentTime);if(u)return u.level}return-1}},{key:"nextBufferedFrag",get:function(){var i=this.media;if(i){var u=this.getAppendedFrag(i.currentTime);return this.followingBufferedFrag(u)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(E.default)},"./src/controller/subtitle-stream-controller.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"SubtitleStreamController",function(){return l});var k=I("./src/events.ts"),E=I("./src/utils/logger.ts"),B=I("./src/utils/buffer-helper.ts"),M=I("./src/controller/fragment-finders.ts"),x=I("./src/utils/discontinuities.ts"),T=I("./src/controller/level-helper.ts"),p=I("./src/controller/fragment-tracker.ts"),r=I("./src/controller/base-stream-controller.ts"),t=I("./src/types/loader.ts"),c=I("./src/types/level.ts");function s(m,_){for(var R=0;R<_.length;R++){var w=_[R];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}function a(m,_,R){return _&&s(m.prototype,_),R&&s(m,R),m}function o(m,_){m.prototype=Object.create(_.prototype),m.prototype.constructor=m,d(m,_)}function d(m,_){return d=Object.setPrototypeOf||function(w,L){return w.__proto__=L,w},d(m,_)}var A=500,l=function(m){o(_,m);function _(w,L){var b;return b=m.call(this,w,L,"[subtitle-stream-controller]")||this,b.levels=[],b.currentTrackId=-1,b.tracksBuffered=[],b.mainDetails=null,b._registerListeners(),b}var R=_.prototype;return R.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},R._registerListeners=function(){var L=this.hls;L.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(k.Events.ERROR,this.onError,this),L.on(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var L=this.hls;L.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(k.Events.ERROR,this.onError,this),L.off(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(A),this.tick()},R.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},R.onLevelLoaded=function(L,b){this.mainDetails=b.details},R.onSubtitleFragProcessed=function(L,b){var g=b.frag,i=b.success;if(this.fragPrevious=g,this.state=r.State.IDLE,!i)return;var u=this.tracksBuffered[this.currentTrackId];if(!u)return;for(var f,y=g.start,h=0;h=u[h].start&&y<=u[h].end){f=u[h];break}var v=g.start+g.duration;f?f.end=v:(f={start:y,end:v},u.push(f)),this.fragmentTracker.fragBuffered(g)},R.onBufferFlushing=function(L,b){var g=b.startOffset,i=b.endOffset;if(g===0&&i!==Number.POSITIVE_INFINITY){var u=this.currentTrackId,f=this.levels;if(!f.length||!f[u]||!f[u].details)return;var y=f[u].details,h=y.targetduration,v=i-h;if(v<=0)return;b.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(P){for(var N=0;N=y.length||u!==f||!h)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,i.live||(g=h.details)!==null&&g!==void 0&&g.live){var v=this.mainDetails;if(i.deltaUpdateFailed||!v)return;var P=v.fragments[0];if(!h.details)i.hasProgramDateTime&&v.hasProgramDateTime?Object(x.alignMediaPlaylistByPDT)(i,v):P&&Object(T.addSliding)(i,P.start);else{var N=this.alignPlaylists(i,h.details);N===0&&P&&Object(T.addSliding)(i,P.start)}}if(h.details=i,this.levelLastLoaded=u,this.tick(),i.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var Q=Object(M.findFragmentByPTS)(null,i.fragments,this.media.currentTime,0);Q||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0)}},R._handleFragmentLoadComplete=function(L){var b=L.frag,g=L.payload,i=b.decryptdata,u=this.hls;if(this.fragContextChanged(b))return;if(g&&g.byteLength>0&&i&&i.key&&i.iv&&i.method==="AES-128"){var f=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),i.key.buffer,i.iv.buffer).then(function(y){var h=performance.now();u.trigger(k.Events.FRAG_DECRYPTED,{frag:b,payload:y,stats:{tstart:f,tdecrypt:h}})})}},R.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var L,b=this.currentTrackId,g=this.levels;if(!g.length||!g[b]||!g[b].details)return;var i=g[b].details,u=i.targetduration,f=this.config,y=this.media,h=B.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,y.currentTime-u,f.maxBufferHole),v=h.end,P=h.len,N=this.getMaxBufferLength()+u;if(P>N)return;console.assert(i,"Subtitle track details are defined on idle subtitle stream controller tick");var Q=i.fragments,G=Q.length,F=i.edge,D,z=this.fragPrevious;if(v-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)},o.pollTrackChange=function(A){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,A)},o.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var A=c(this.media.textTracks);A.forEach(function(l){Object(E.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},o.onManifestParsed=function(A,l){this.tracks=l.subtitleTracks},o.onSubtitleTrackLoaded=function(A,l){var m=l.id,_=l.details,R=this.trackId,w=this.tracksInGroup[R];if(!w){this.warn("Invalid subtitle track id "+m);return}var L=w.details;w.details=l.details,this.log("subtitle track "+m+" loaded ["+_.startSN+"-"+_.endSN+"]"),m===this.trackId&&(this.retryCount=0,this.playlistLoaded(m,l,L))},o.onLevelLoading=function(A,l){this.switchLevel(l.level)},o.onLevelSwitching=function(A,l){this.switchLevel(l.level)},o.switchLevel=function(A){var l=this.hls.levels[A];if(!(l!=null&&l.textGroupIds))return;var m=l.textGroupIds[l.urlId];if(this.groupId!==m){var _=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,R=this.tracks.filter(function(b){return!m||b.groupId===m});this.tracksInGroup=R;var w=this.findTrackId(_==null?void 0:_.name)||this.findTrackId();this.groupId=m;var L={subtitleTracks:R};this.log("Updating subtitle tracks, "+R.length+' track(s) found in "'+m+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,L),w!==-1&&this.setSubtitleTrack(w,_)}},o.findTrackId=function(A){for(var l=this.tracksInGroup,m=0;m=_.length)return;this.clearTimer();var R=_[A];if(this.log("Switching to subtitle track "+A),this.trackId=A,R){var w=R.id,L=R.groupId,b=L===void 0?"":L,g=R.name,i=R.type,u=R.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:w,groupId:b,name:g,type:i,url:u});var f=this.switchParams(R.url,l==null?void 0:l.details);this.loadPlaylist(f)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:A})},o.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var A=-1,l=c(this.media.textTracks),m=0;m=0&&(i[0]=Math.min(i[0],_),i[1]=Math.max(i[1],R),b=!0,u/(R-_)>.5))return}if(b||L.push([_,R]),this.config.renderTextTracksNatively){var f=this.captionsTracks[m];this.Cues.newCue(f,_,R,w)}else{var y=this.Cues.newCue(null,_,R,w);this.hls.trigger(E.Events.CUES_PARSED,{type:"captions",cues:y,track:m})}},A.onInitPtsFound=function(m,_){var R=this,w=_.frag,L=_.id,b=_.initPTS,g=_.timescale,i=this.unparsedVttFrags;L==="main"&&(this.initPTS[w.cc]=b,this.timescale[w.cc]=g),i.length&&(this.unparsedVttFrags=[],i.forEach(function(u){R.onFragLoaded(E.Events.FRAG_LOADED,u)}))},A.getExistingTrack=function(m){var _=this.media;if(_)for(var R=0;R<_.textTracks.length;R++){var w=_.textTracks[R];if(w[m])return w}return null},A.createCaptionsTrack=function(m){this.config.renderTextTracksNatively?this.createNativeTrack(m):this.createNonNativeTrack(m)},A.createNativeTrack=function(m){if(this.captionsTracks[m])return;var _=this.captionsProperties,R=this.captionsTracks,w=this.media,L=_[m],b=L.label,g=L.languageCode,i=this.getExistingTrack(m);if(i)R[m]=i,Object(T.clearCurrentCues)(R[m]),Object(T.sendAddTrackEvent)(R[m],w);else{var u=this.createTextTrack("captions",b,g);u&&(u[m]=!0,R[m]=u)}},A.createNonNativeTrack=function(m){if(this.nonNativeCaptionsTracks[m])return;var _=this.captionsProperties[m];if(!_)return;var R=_.label,w={_id:m,label:R,kind:"captions",default:_.media?!!_.media.default:!1,closedCaptions:_.media};this.nonNativeCaptionsTracks[m]=w,this.hls.trigger(E.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[w]})},A.createTextTrack=function(m,_,R){var w=this.media;return w?w.addTextTrack(m,_,R):void 0},A.onMediaAttaching=function(m,_){this.media=_.media,this._cleanTracks()},A.onMediaDetaching=function(){var m=this.captionsTracks;Object.keys(m).forEach(function(_){Object(T.clearCurrentCues)(m[_]),delete m[_]}),this.nonNativeCaptionsTracks={}},A.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},A._cleanTracks=function(){var m=this.media;if(!m)return;var _=m.textTracks;if(_)for(var R=0;R<_.length;R++)Object(T.clearCurrentCues)(_[R])},A.onSubtitleTracksUpdated=function(m,_){var R=this;this.textTracks=[];var w=_.subtitleTracks||[],L=w.some(function(u){return u.textCodec===p.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var b=this.tracks&&w&&this.tracks.length===w.length;if(this.tracks=w||[],this.config.renderTextTracksNatively){var g=this.media?this.media.textTracks:[];this.tracks.forEach(function(u,f){var y;if(f>>8^g&255^99,p[w]=g,r[g]=w;var i=R[w],u=R[i],f=R[u],y=R[g]*257^g*16843008;c[w]=y<<24|y>>>8,s[w]=y<<16|y>>>16,a[w]=y<<8|y>>>24,o[w]=y,y=f*16843009^u*65537^i*257^w*16843008,A[g]=y<<24|y>>>8,l[g]=y<<16|y>>>16,m[g]=y<<8|y>>>24,_[g]=y,w?(w=i^R[R[R[f^i]]],L^=R[R[L]]):w=L=1}},x.expandKey=function(p){for(var r=this.uint8ArrayToUint32Array_(p),t=!0,c=0;c>>6)+1;var y=(m[_+2]&60)>>>2;if(y>f.length-1){l.trigger(B.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+y});return}return b=(m[_+2]&1)<<2,b|=(m[_+3]&192)>>>6,k.logger.log("manifest codec:"+R+", ADTS type:"+w+", samplingIndex:"+y),/firefox/i.test(i)?y>=6?(w=5,g=new Array(4),L=y-3):(w=2,g=new Array(2),L=y):i.indexOf("android")!==-1?(w=2,g=new Array(2),L=y):(w=5,g=new Array(4),R&&(R.indexOf("mp4a.40.29")!==-1||R.indexOf("mp4a.40.5")!==-1)||!R&&y>=6?L=y-3:((R&&R.indexOf("mp4a.40.2")!==-1&&(y>=6&&b===1||/vivaldi/i.test(i))||!R&&b===1)&&(w=2,g=new Array(2)),L=y)),g[0]=w<<3,g[0]|=(y&14)>>1,g[1]|=(y&1)<<7,g[1]|=b<<3,w===5&&(g[1]|=(L&14)>>1,g[2]=(L&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:f[y],channelCount:b,codec:"mp4a.40."+w,manifestCodec:u}}function x(l,m){return l[m]===255&&(l[m+1]&246)===240}function T(l,m){return l[m+1]&1?7:9}function p(l,m){return(l[m+3]&3)<<11|l[m+4]<<3|(l[m+5]&224)>>>5}function r(l,m){return m+5=l.length)return!1;var R=p(l,m);if(R<=_)return!1;var w=m+R;return w===l.length||t(l,w)}return!1}function a(l,m,_,R,w){if(!l.samplerate){var L=M(m,_,R,w);if(!L)return;l.config=L.config,l.samplerate=L.samplerate,l.channelCount=L.channelCount,l.codec=L.codec,l.manifestCodec=L.manifestCodec,k.logger.log("parsed codec:"+l.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function o(l){return 1024*9e4/l}function d(l,m,_,R,w){var L=T(l,m),b=p(l,m);if(b-=L,b>0){var g=_+R*w;return{headerLength:L,frameLength:b,stamp:g}}}function A(l,m,_,R,w){var L=o(l.samplerate),b=d(m,_,R,w,L);if(b){var g=b.frameLength,i=b.headerLength,u=b.stamp,f=i+g,y=Math.max(0,_+f-m.length),h;y?(h=new Uint8Array(f-i),h.set(m.subarray(_+i,m.length),0)):h=m.subarray(_+i,_+f);var v={unit:h,pts:u};return y||l.samples.push(v),{sample:v,length:f,missing:y}}}},"./src/demux/base-audio-demuxer.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"initPTSFn",function(){return p});var k=I("./src/polyfills/number.ts"),E=I("./src/demux/id3.ts"),B=I("./src/demux/dummy-demuxed-track.ts"),M=I("./src/utils/mp4-tools.ts"),x=I("./src/utils/typed-array.ts"),T=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=r.prototype;return t.resetInitSegment=function(s,a,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(s,a){return!1},t.appendFrame=function(s,a,o){},t.demux=function(s,a){this.cachedData&&(s=Object(M.appendUint8Array)(this.cachedData,s),this.cachedData=null);var o=E.getID3Data(s,0),d=o?o.length:0,A,l,m=this._audioTrack,_=this._id3Track,R=o?E.getTimeStamp(o):void 0,w=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(R,a)),o&&o.length>0&&_.samples.push({pts:this.initPTS,dts:this.initPTS,data:o}),l=this.initPTS;dT?(this.word<<=T,this.bitsAvailable-=T):(T-=this.bitsAvailable,p=T>>3,T-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=T,this.bitsAvailable-=T)},M.readBits=function(T){var p=Math.min(this.bitsAvailable,T),r=this.word>>>32-p;return T>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=T-p,p>0&&this.bitsAvailable?r<>>T)!==0)return this.word<<=T,this.bitsAvailable-=T,T;return this.loadWord(),T+this.skipLZ()},M.skipUEG=function(){this.skipBits(1+this.skipLZ())},M.skipEG=function(){this.skipBits(1+this.skipLZ())},M.readUEG=function(){var T=this.skipLZ();return this.readBits(T+1)-1},M.readEG=function(){var T=this.readUEG();return 1&T?1+T>>>1:-1*(T>>>1)},M.readBoolean=function(){return this.readBits(1)===1},M.readUByte=function(){return this.readBits(8)},M.readUShort=function(){return this.readBits(16)},M.readUInt=function(){return this.readBits(32)},M.skipScalingList=function(T){for(var p=8,r=8,t,c=0;c0?w.subarray(b,b+g):void 0},M=function(w,L){var b=0;return b=(w[L]&127)<<21,b|=(w[L+1]&127)<<14,b|=(w[L+2]&127)<<7,b|=w[L+3]&127,b},x=function(w,L){return k(w,L)&&M(w,L+6)+10<=w.length-L},T=function(w){for(var L=t(w),b=0;b>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(f);break;case 12:case 13:y=w[P++],v+=String.fromCharCode((f&31)<<6|y&63);break;case 14:y=w[P++],h=w[P++],v+=String.fromCharCode((f&15)<<12|(y&63)<<6|(h&63)<<0);break;default:}}return v},l={decodeTextFrame:a},m;function _(){return!m&&typeof self.TextDecoder!="undefined"&&(m=new self.TextDecoder("utf-8")),m}},"./src/demux/mp3demuxer.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/demux/base-audio-demuxer.ts"),E=I("./src/demux/id3.ts"),B=I("./src/utils/logger.ts"),M=I("./src/demux/mpegaudio.ts");function x(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,T(r,t)}function T(r,t){return T=Object.setPrototypeOf||function(s,a){return s.__proto__=a,s},T(r,t)}var p=function(r){x(t,r);function t(){return r.apply(this,arguments)||this}var c=t.prototype;return c.resetInitSegment=function(a,o,d){r.prototype.resetInitSegment.call(this,a,o,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:a,duration:d,inputTimeScale:9e4,dropped:0}},t.probe=function(a){if(!a)return!1;for(var o=E.getID3Data(a,0)||[],d=o.length,A=a.length;d0},x.demux=function(p){var r=p,t=Object(E.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(k.appendUint8Array)(this.remainderData,p));var c=Object(k.segmentValidRange)(r);this.remainderData=c.remainder,t.samples=c.valid||new Uint8Array}else t.samples=r;return{audioTrack:Object(E.dummyTrack)(),avcTrack:t,id3Track:Object(E.dummyTrack)(),textTrack:Object(E.dummyTrack)()}},x.flush=function(){var p=Object(E.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(E.dummyTrack)(),avcTrack:p,id3Track:Object(E.dummyTrack)(),textTrack:Object(E.dummyTrack)()}},x.demuxSampleAes=function(p,r,t){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},x.destroy=function(){},M}();B.minProbeByteLength=1024,K.default=B},"./src/demux/mpegaudio.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"appendFrame",function(){return T}),I.d(K,"parseHeader",function(){return p}),I.d(K,"isHeaderPattern",function(){return r}),I.d(K,"isHeader",function(){return t}),I.d(K,"canParse",function(){return c}),I.d(K,"probe",function(){return s});var k=null,E=[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],B=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],M=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],x=[0,1,1,4];function T(a,o,d,A,l){if(d+24>o.length)return;var m=p(o,d);if(m&&d+m.frameLength<=o.length){var _=m.samplesPerFrame*9e4/m.sampleRate,R=A+l*_,w={unit:o.subarray(d,d+m.frameLength),pts:R,dts:R};return a.config=[],a.channelCount=m.channelCount,a.samplerate=m.sampleRate,a.samples.push(w),{sample:w,length:m.frameLength,missing:0}}}function p(a,o){var d=a[o+1]>>3&3,A=a[o+1]>>1&3,l=a[o+2]>>4&15,m=a[o+2]>>2&3;if(d!==1&&l!==0&&l!==15&&m!==3){var _=a[o+2]>>1&1,R=a[o+3]>>6,w=d===3?3-A:A===3?3:4,L=E[w*14+l-1]*1e3,b=d===3?0:d===2?1:2,g=B[b*3+m],i=R===3?1:2,u=M[d][A],f=x[A],y=u*8*f,h=Math.floor(u*L/g+_)*f;if(k===null){var v=navigator.userAgent||"",P=v.match(/Chrome\/(\d+)/i);k=P?parseInt(P[1]):0}var N=!!k&&k<=87;return N&&A===2&&L>=224e3&&R===0&&(a[o+3]=a[o+3]|128),{sampleRate:g,channelCount:i,frameLength:h,samplesPerFrame:y}}}function r(a,o){return a[o]===255&&(a[o+1]&224)===224&&(a[o+1]&6)!==0}function t(a,o){return o+1=p.length){t();return}if(p[r].unit.length<32)continue;var c=this.decrypter.isSync();if(this.decryptAacSample(p,r,t,c),!c)return}},x.getAvcEncryptedData=function(p){for(var r=Math.floor((p.length-48)/160)*16+16,t=new Int8Array(r),c=0,s=32;s<=p.length-16;s+=160,c+=16)t.set(p.subarray(s,s+16),c);return t},x.getAvcDecryptedUnit=function(p,r){for(var t=new Uint8Array(r),c=0,s=32;s<=p.length-16;s+=160,c+=16)p.set(t.subarray(c,c+16),s);return p},x.decryptAvcSample=function(p,r,t,c,s,a){var o=Object(E.discardEPB)(s.data),d=this.getAvcEncryptedData(o),A=this;this.decryptBuffer(d.buffer,function(l){s.data=A.getAvcDecryptedUnit(o,l),a||A.decryptAvcSamples(p,r,t+1,c)})},x.decryptAvcSamples=function(p,r,t,c){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,t=0){if(r>=p.length){c();return}for(var s=p[r].units;!(t>=s.length);t++){var a=s[t];if(a.data.length<=48||a.type!==1&&a.type!==5)continue;var o=this.decrypter.isSync();if(this.decryptAvcSample(p,r,t,c,a,o),!o)return}}},M}();K.default=B},"./src/demux/transmuxer-interface.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return s});var k=I("./node_modules/webworkify-webpack/index.js"),E=I.n(k),B=I("./src/events.ts"),M=I("./src/demux/transmuxer.ts"),x=I("./src/utils/logger.ts"),T=I("./src/errors.ts"),p=I("./src/utils/mediasource-helper.ts"),r=I("./node_modules/eventemitter3/index.js"),t=I.n(r),c=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function a(d,A,l,m){var _=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=d,this.id=A,this.onTransmuxComplete=l,this.onFlush=m;var R=d.config,w=function(u,f){f=f||{},f.frag=_.frag,f.id=_.id,d.trigger(u,f)};this.observer=new r.EventEmitter,this.observer.on(B.Events.FRAG_DECRYPTED,w),this.observer.on(B.Events.ERROR,w);var L={mp4:c.isTypeSupported("video/mp4"),mpeg:c.isTypeSupported("audio/mpeg"),mp3:c.isTypeSupported('audio/mp4; codecs="mp3"')},b=navigator.vendor;if(R.enableWorker&&typeof Worker!="undefined"){x.logger.log("demuxing in webworker");var g;try{g=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(i){d.trigger(B.Events.ERROR,{type:T.ErrorTypes.OTHER_ERROR,details:T.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(i.message+" ("+i.filename+":"+i.lineno+")")})},g.postMessage({cmd:"init",typeSupported:L,vendor:b,id:A,config:JSON.stringify(R)})}catch(i){x.logger.warn("Error in worker:",i),x.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new M.default(this.observer,L,R,b,A),this.worker=null}}else this.transmuxer=new M.default(this.observer,L,R,b,A)}var o=a.prototype;return o.destroy=function(){var A=this.worker;if(A)A.removeEventListener("message",this.onwmsg),A.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var m=this.observer;m&&m.removeAllListeners(),this.observer=null},o.push=function(A,l,m,_,R,w,L,b,g,i){var u=this;g.transmuxing.start=self.performance.now();var f=this.transmuxer,y=this.worker,h=w?w.start:R.start,v=R.decryptdata,P=this.frag,N=!(P&&R.cc===P.cc),Q=!(P&&g.level===P.level),G=P?g.sn-P.sn:-1,F=this.part?g.part-this.part.index:1,D=!Q&&(G===1||G===0&&F===1),z=self.performance.now();(Q||G||R.stats.parsing.start===0)&&(R.stats.parsing.start=z),w&&(F||!D)&&(w.stats.parsing.start=z);var j=new M.TransmuxState(N,D,b,Q,h);if(!D||N){x.logger.log("[transmuxer-interface, "+R.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+` discontinuity: `+N+` trackSwitch: `+Q+` contiguous: `+D+` accurateTimeOffset: `+b+` timeOffset: `+h);var Z=new M.TransmuxConfig(m,_,l,L,i);this.configureTransmuxer(Z)}if(this.frag=R,this.part=w,y)y.postMessage({cmd:"demux",data:A,decryptdata:v,chunkMeta:g,state:j},A instanceof ArrayBuffer?[A]:[]);else if(f){var te=f.push(A,v,g,j);Object(M.isPromise)(te)?te.then(function(Ae){u.handleTransmuxComplete(Ae)}):this.handleTransmuxComplete(te)}},o.flush=function(A){var l=this;A.transmuxing.start=self.performance.now();var m=this.transmuxer,_=this.worker;if(_)_.postMessage({cmd:"flush",chunkMeta:A});else if(m){var R=m.flush(A);Object(M.isPromise)(R)?R.then(function(w){l.handleFlushResult(w,A)}):this.handleFlushResult(R,A)}},o.handleFlushResult=function(A,l){var m=this;A.forEach(function(_){m.handleTransmuxComplete(_)}),this.onFlush(l)},o.onWorkerMessage=function(A){var l=A.data,m=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,m.trigger(l.event,l.data);break}}},o.configureTransmuxer=function(A){var l=this.worker,m=this.transmuxer;l?l.postMessage({cmd:"configure",config:A}):m&&m.configure(A)},o.handleTransmuxComplete=function(A){A.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(A)},a}()},"./src/demux/transmuxer-worker.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return T});var k=I("./src/demux/transmuxer.ts"),E=I("./src/events.ts"),B=I("./src/utils/logger.ts"),M=I("./node_modules/eventemitter3/index.js"),x=I.n(M);function T(s){var a=new M.EventEmitter,o=function(A,l){s.postMessage({event:A,data:l})};a.on(E.Events.FRAG_DECRYPTED,o),a.on(E.Events.ERROR,o),s.addEventListener("message",function(d){var A=d.data;switch(A.cmd){case"init":{var l=JSON.parse(A.config);s.transmuxer=new k.default(a,A.typeSupported,l,A.vendor,A.id),Object(B.enableLogs)(l.debug),o("init",null);break}case"configure":{s.transmuxer.configure(A.config);break}case"demux":{var m=s.transmuxer.push(A.data,A.decryptdata,A.chunkMeta,A.state);Object(k.isPromise)(m)?m.then(function(w){p(s,w)}):p(s,m);break}case"flush":{var _=A.chunkMeta,R=s.transmuxer.flush(_);Object(k.isPromise)(R)?R.then(function(w){t(s,w,_)}):t(s,R,_);break}default:break}})}function p(s,a){if(c(a.remuxResult))return;var o=[],d=a.remuxResult,A=d.audio,l=d.video;A&&r(o,A),l&&r(o,l),s.postMessage({event:"transmuxComplete",data:a},o)}function r(s,a){a.data1&&s.push(a.data1.buffer),a.data2&&s.push(a.data2.buffer)}function t(s,a,o){a.forEach(function(d){p(s,d)}),s.postMessage({event:"flush",data:o})}function c(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return l}),I.d(K,"isPromise",function(){return R}),I.d(K,"TransmuxConfig",function(){return w}),I.d(K,"TransmuxState",function(){return L});var k=I("./src/events.ts"),E=I("./src/errors.ts"),B=I("./src/crypt/decrypter.ts"),M=I("./src/demux/aacdemuxer.ts"),x=I("./src/demux/mp4demuxer.ts"),T=I("./src/demux/tsdemuxer.ts"),p=I("./src/demux/mp3demuxer.ts"),r=I("./src/remux/mp4-remuxer.ts"),t=I("./src/remux/passthrough-remuxer.ts"),c=I("./src/demux/chunk-cache.ts"),s=I("./src/utils/mp4-tools.ts"),a=I("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(b){a.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var d=[{demux:T.default,remux:r.default},{demux:x.default,remux:t.default},{demux:M.default,remux:r.default},{demux:p.default,remux:r.default}],A=1024;d.forEach(function(b){var g=b.demux;A=Math.max(A,g.minProbeByteLength)});var l=function(){function b(i,u,f,y,h){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 c.default,this.observer=i,this.typeSupported=u,this.config=f,this.vendor=y,this.id=h}var g=b.prototype;return g.configure=function(u){this.transmuxConfig=u,this.decrypter&&this.decrypter.reset()},g.push=function(u,f,y,h){var v=this,P=y.transmuxing;P.executeStart=o();var N=new Uint8Array(u),Q=this.cache,G=this.config,F=this.currentTransmuxState,D=this.transmuxConfig;h&&(this.currentTransmuxState=h);var z=m(N,f);if(z&&z.method==="AES-128"){var j=this.getDecrypter();if(G.enableSoftwareAES){var Z=j.softwareDecrypt(N,z.key.buffer,z.iv.buffer);if(!Z)return P.executeEnd=o(),_(y);N=new Uint8Array(Z)}else return this.decryptionPromise=j.webCryptoDecrypt(N,z.key.buffer,z.iv.buffer).then(function(je){var et=v.push(je,null,y);return v.decryptionPromise=null,et}),this.decryptionPromise}var te=h||F,Ae=te.contiguous,he=te.discontinuity,ce=te.trackSwitch,ae=te.accurateTimeOffset,ve=te.timeOffset,ue=D.audioCodec,fe=D.videoCodec,se=D.defaultInitPts,me=D.duration,re=D.initSegmentData;if((he||ce)&&this.resetInitSegment(re,ue,fe,me),he&&this.resetInitialTimestamp(se),Ae||this.resetContiguity(),this.needsProbing(N,he,ce)){if(Q.dataLength){var pe=Q.flush();N=Object(s.appendUint8Array)(pe,N)}this.configureTransmuxer(N,D)}var De=this.transmux(N,z,ve,ae,y),we=this.currentTransmuxState;return we.contiguous=!0,we.discontinuity=!1,we.trackSwitch=!1,P.executeEnd=o(),De},g.flush=function(u){var f=this,y=u.transmuxing;y.executeStart=o();var h=this.decrypter,v=this.cache,P=this.currentTransmuxState,N=this.decryptionPromise;if(N)return N.then(function(){return f.flush(u)});var Q=[],G=P.timeOffset;if(h){var F=h.flush();F&&Q.push(this.push(F,null,u))}var D=v.dataLength;v.reset();var z=this.demuxer,j=this.remuxer;if(!z||!j)return D>=A&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),y.executeEnd=o(),[_(u)];var Z=z.flush(G);return R(Z)?Z.then(function(te){return f.flushRemux(Q,te,u),Q}):(this.flushRemux(Q,Z,u),Q)},g.flushRemux=function(u,f,y){var h=f.audioTrack,v=f.avcTrack,P=f.id3Track,N=f.textTrack,Q=this.currentTransmuxState,G=Q.accurateTimeOffset,F=Q.timeOffset;a.logger.log("[transmuxer.ts]: Flushed fragment "+y.sn+(y.part>-1?" p: "+y.part:"")+" of level "+y.level);var D=this.remuxer.remux(h,v,P,N,F,G,!0,this.id);u.push({remuxResult:D,chunkMeta:y}),y.transmuxing.executeEnd=o()},g.resetInitialTimestamp=function(u){var f=this.demuxer,y=this.remuxer;if(!f||!y)return;f.resetTimeStamp(u),y.resetTimeStamp(u)},g.resetContiguity=function(){var u=this.demuxer,f=this.remuxer;if(!u||!f)return;u.resetContiguity(),f.resetNextTimestamp()},g.resetInitSegment=function(u,f,y,h){var v=this.demuxer,P=this.remuxer;if(!v||!P)return;v.resetInitSegment(f,y,h),P.resetInitSegment(u,f,y)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(u,f,y,h,v){var P;return f&&f.method==="SAMPLE-AES"?P=this.transmuxSampleAes(u,f,y,h,v):P=this.transmuxUnencrypted(u,y,h,v),P},g.transmuxUnencrypted=function(u,f,y,h){var v=this.demuxer.demux(u,f,!1,!this.config.progressive),P=v.audioTrack,N=v.avcTrack,Q=v.id3Track,G=v.textTrack,F=this.remuxer.remux(P,N,Q,G,f,y,!1,this.id);return{remuxResult:F,chunkMeta:h}},g.transmuxSampleAes=function(u,f,y,h,v){var P=this;return this.demuxer.demuxSampleAes(u,f,y).then(function(N){var Q=P.remuxer.remux(N.audioTrack,N.avcTrack,N.id3Track,N.textTrack,y,h,!1,P.id);return{remuxResult:Q,chunkMeta:v}})},g.configureTransmuxer=function(u,f){for(var y=this.config,h=this.observer,v=this.typeSupported,P=this.vendor,N=f.audioCodec,Q=f.defaultInitPts,G=f.duration,F=f.initSegmentData,D=f.videoCodec,z,j=0,Z=d.length;j0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(i=g),i}var _=function(g){return{remuxResult:{},chunkMeta:g}};function R(b){return"then"in b&&b.then instanceof Function}var w=function(g,i,u,f,y){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=i,this.initSegmentData=u,this.duration=f,this.defaultInitPts=y},L=function(g,i,u,f,y){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=i,this.accurateTimeOffset=u,this.trackSwitch=f,this.timeOffset=y}},"./src/demux/tsdemuxer.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"discardEPB",function(){return _});var k=I("./src/demux/adts.ts"),E=I("./src/demux/mpegaudio.ts"),B=I("./src/demux/exp-golomb.ts"),M=I("./src/demux/id3.ts"),x=I("./src/demux/sample-aes.ts"),T=I("./src/events.ts"),p=I("./src/utils/mp4-tools.ts"),r=I("./src/utils/logger.ts"),t=I("./src/errors.ts"),c={video:1,audio:2,id3:3,text:4},s=function(){function R(L,b,g){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=L,this.config=b,this.typeSupported=g}R.probe=function(b){var g=R.syncOffset(b);return g<0?!1:(g&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},R.syncOffset=function(b){for(var g=Math.min(1e3,b.length-3*188),i=0;i>4,ue=void 0;if(ve>1){if(ue=he+5+b[he+4],ue===he+188)continue}else ue=he+4;switch(ae){case P:ce&&(N&&(f=A(N))&&this.parseAVCPES(f,!1),N={data:[],size:0}),N&&(N.data.push(b.subarray(ue,he+188)),N.size+=he+188-ue);break;case Q:ce&&(F&&(f=A(F))&&(h.isAAC?this.parseAACPES(f):this.parseMPEGPES(f)),F={data:[],size:0}),F&&(F.data.push(b.subarray(ue,he+188)),F.size+=he+188-ue);break;case G:ce&&(D&&(f=A(D))&&this.parseID3PES(f),D={data:[],size:0}),D&&(D.data.push(b.subarray(ue,he+188)),D.size+=he+188-ue);break;case 0:ce&&(ue+=b[ue]+1),Z=this._pmtId=o(b,ue);break;case Z:{ce&&(ue+=b[ue]+1);var fe=d(b,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,i);P=fe.avc,P>0&&(y.pid=P),Q=fe.audio,Q>0&&(h.pid=Q,h.isAAC=fe.isAAC),G=fe.id3,G>0&&(v.pid=G),z&&!j&&(r.logger.log("reparse from beginning"),z=!1,he=Ae-188),j=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!0;break}}else this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:t.ErrorTypes.MEDIA_ERROR,details:t.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});y.pesData=N,h.pesData=F,v.pesData=D;var se={audioTrack:h,avcTrack:y,id3Track:v,textTrack:this._txtTrack};return u&&this.extractRemainingSamples(se),se},w.flush=function(){var b=this.remainderData;this.remainderData=null;var g;return b?g=this.demux(b,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},w.extractRemainingSamples=function(b){var g=b.audioTrack,i=b.avcTrack,u=b.id3Track,f=i.pesData,y=g.pesData,h=u.pesData,v;f&&(v=A(f))?(this.parseAVCPES(v,!0),i.pesData=null):i.pesData=f,y&&(v=A(y))?(g.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),g.pesData=null):(y!=null&&y.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=y),h&&(v=A(h))?(this.parseID3PES(v),u.pesData=null):u.pesData=h},w.demuxSampleAes=function(b,g,i){var u=this.demux(b,i,!0,!this.config.progressive),f=this.sampleAes=new x.default(this.observer,this.config,g);return this.decrypt(u,f)},w.decrypt=function(b,g){return new Promise(function(i){var u=b.audioTrack,f=b.avcTrack;u.samples&&u.isAAC?g.decryptAacSamples(u.samples,0,function(){f.samples?g.decryptAvcSamples(f.samples,0,0,function(){i(b)}):i(b)}):f.samples&&g.decryptAvcSamples(f.samples,0,0,function(){i(b)})})},w.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},w.parseAVCPES=function(b,g){var i=this,u=this._avcTrack,f=this.parseAVCNALu(b.data),y=!1,h=this.avcSample,v,P=!1;b.data=null,h&&f.length&&!u.audFound&&(l(h,u),h=this.avcSample=a(!1,b.pts,b.dts,"")),f.forEach(function(N){switch(N.type){case 1:{v=!0,h||(h=i.avcSample=a(!0,b.pts,b.dts,"")),y&&(h.debug+="NDR "),h.frame=!0;var Q=N.data;if(P&&Q.length>4){var G=new B.default(Q).readSliceType();(G===2||G===4||G===7||G===9)&&(h.key=!0)}break}case 5:v=!0,h||(h=i.avcSample=a(!0,b.pts,b.dts,"")),y&&(h.debug+="IDR "),h.key=!0,h.frame=!0;break;case 6:{v=!0,y&&h&&(h.debug+="SEI ");var F=new B.default(_(N.data));F.readUByte();for(var D=0,z=0,j=!1,Z=0;!j&&F.bytesAvailable>1;){D=0;do Z=F.readUByte(),D+=Z;while(Z===255);z=0;do Z=F.readUByte(),z+=Z;while(Z===255);if(D===4&&F.bytesAvailable!==0){j=!0;var te=F.readUByte();if(te===181){var Ae=F.readUShort();if(Ae===49){var he=F.readUInt();if(he===1195456820){var ce=F.readUByte();if(ce===3){for(var ae=F.readUByte(),ve=F.readUByte(),ue=31&ae,fe=[ae,ve],se=0;se16){for(var me=[],re=0;re<16;re++)me.push(F.readUByte().toString(16)),(re===3||re===5||re===7||re===9)&&me.push("-");for(var pe=z-16,De=new Uint8Array(pe),we=0;we=0){var F={data:b.subarray(Q,h-u-1),type:G};y.push(F)}else{var D=this.getLastNalUnit();if(D&&(f&&h<=4-f&&(D.state&&(D.data=D.data.subarray(0,D.data.byteLength-f))),P=h-u-1,P>0)){var z=new Uint8Array(D.data.byteLength+P);z.set(D.data,0),z.set(b.subarray(0,P),D.data.byteLength),D.data=z,D.state=0}}h=0&&u>=0){var j={data:b.subarray(Q,g),type:G,state:u};y.push(j)}if(y.length===0){var Z=this.getLastNalUnit();if(Z){var te=new Uint8Array(Z.data.byteLength+b.byteLength);te.set(Z.data,0),te.set(b,Z.data.byteLength),Z.data=te}}return i.naluState=u,y},w.parseAACPES=function(b){var g=0,i=this._audioTrack,u=this.aacOverFlow,f=b.data;if(u){this.aacOverFlow=null;var y=u.sample.unit.byteLength,h=Math.min(u.missing,y),v=y-h;u.sample.unit.set(f.subarray(0,h),v),i.samples.push(u.sample),g=u.missing}var P,N;for(P=g,N=f.length;P1;){var y=new Uint8Array(f[0].length+f[1].length);y.set(f[0]),y.set(f[1],f[0].length),f[0]=y,f.splice(1,1)}L=f[0];var h=(L[0]<<16)+(L[1]<<8)+L[2];if(h===1){if(b=(L[4]<<8)+L[5],b&&b>R.size-6)return null;var v=L[7];v&192&&(i=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(u=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,i-u>60*9e4&&(r.logger.warn(Math.round((i-u)/9e4)+"s delta between PTS and DTS, align them"),i=u)):u=i),g=L[8];var P=g+9;if(R.size<=P)return null;R.size-=P;for(var N=new Uint8Array(R.size),Q=0,G=f.length;QF){P-=F;continue}else L=L.subarray(P),F-=P,P=0;N.set(L,w),w+=F}return b&&(b-=g+3),{data:N,pts:i,dts:u,len:b}}return null}function l(R,w){if(R.units.length&&R.frame){if(R.pts===void 0){var L=w.samples,b=L.length;if(b){var g=L[b-1];R.pts=g.pts,R.dts=g.dts}else{w.dropped++;return}}w.samples.push(R)}R.debug.length&&r.logger.log(R.pts+"/"+R.dts+":"+R.debug)}function m(R,w){var L=R.length;if(L>0){if(w.pts>=R[L-1].pts)R.push(w);else for(var b=L-1;b>=0;b--)if(w.ptsi)return f;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,i=this.autoLevelCapping,u;return i===-1&&g&&g.length?u=g.length-1:u=i,u}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var i=this.audioTrackController;i&&(i.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var i=this.subtitleTrackController;i&&(i.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var i=this.subtitleTrackController;i&&(i.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return A.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return w.defaultConfig?w.defaultConfig:a.hlsDefaultConfig},set:function(g){w.defaultConfig=g}}]),w}();R.defaultConfig=void 0},"./src/is-supported.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"isSupported",function(){return B}),I.d(K,"changeTypeSupported",function(){return M});var k=I("./src/utils/mediasource-helper.ts");function E(){return self.SourceBuffer||self.WebKitSourceBuffer}function B(){var x=Object(k.getMediaSource)();if(!x)return!1;var T=E(),p=x&&typeof x.isTypeSupported=="function"&&x.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!T||T.prototype&&typeof T.prototype.appendBuffer=="function"&&typeof T.prototype.remove=="function";return!!p&&!!r}function M(){var x,T=E();return typeof(T==null||((x=T.prototype)===null||x===void 0)?void 0:x.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return s}),I.d(K,"LoadError",function(){return o});var k=I("./src/polyfills/number.ts"),E=I("./src/errors.ts");function B(d,A){d.prototype=Object.create(A.prototype),d.prototype.constructor=d,r(d,A)}function M(d){var A=typeof Map=="function"?new Map:void 0;return M=function(m){if(m===null||!p(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A!="undefined"){if(A.has(m))return A.get(m);A.set(m,_)}function _(){return x(m,arguments,t(this).constructor)}return _.prototype=Object.create(m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),r(_,m)},M(d)}function x(d,A,l){return T()?x=Reflect.construct:x=function(_,R,w){var L=[null];L.push.apply(L,R);var b=Function.bind.apply(_,L),g=new b;return w&&r(g,w.prototype),g},x.apply(null,arguments)}function T(){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(d){return!1}}function p(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,A){return r=Object.setPrototypeOf||function(m,_){return m.__proto__=_,m},r(d,A)}function t(d){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},t(d)}var c=Math.pow(2,17),s=function(){function d(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var A=d.prototype;return A.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},A.abort=function(){this.loader&&this.loader.abort()},A.load=function(m,_){var R=this,w=m.url;if(!w)return Promise.reject(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,networkDetails:null},"Fragment does not have a "+(w?"part list":"url")));this.abort();var L=this.config,b=L.fLoader,g=L.loader;return new Promise(function(i,u){R.loader&&R.loader.destroy();var f=R.loader=m.loader=b?new b(L):new g(L),y=a(m),h={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:c};m.stats=f.stats,f.load(y,h,{onSuccess:function(P,N,Q,G){R.resetLoader(m,f),i({frag:m,part:null,payload:P.data,networkDetails:G})},onError:function(P,N,Q){R.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,response:P,networkDetails:Q}))},onAbort:function(P,N,Q){R.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,networkDetails:Q}))},onTimeout:function(P,N,Q){R.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,networkDetails:Q}))},onProgress:function(P,N,Q,G){_&&_({frag:m,part:null,payload:Q,networkDetails:G})}})})},A.loadPart=function(m,_,R){var w=this;this.abort();var L=this.config,b=L.fLoader,g=L.loader;return new Promise(function(i,u){w.loader&&w.loader.destroy();var f=w.loader=m.loader=b?new b(L):new g(L),y=a(m,_),h={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:c};_.stats=f.stats,f.load(y,h,{onSuccess:function(P,N,Q,G){w.resetLoader(m,f),w.updateStatsFromPart(m,_);var F={frag:m,part:_,payload:P.data,networkDetails:G};R(F),i(F)},onError:function(P,N,Q){w.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,part:_,response:P,networkDetails:Q}))},onAbort:function(P,N,Q){m.stats.aborted=_.stats.aborted,w.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,part:_,networkDetails:Q}))},onTimeout:function(P,N,Q){w.resetLoader(m,f),u(new o({type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,part:_,networkDetails:Q}))}})})},A.updateStatsFromPart=function(m,_){var R=m.stats,w=_.stats,L=w.total;if(R.loaded+=w.loaded,L){var b=Math.round(m.duration/_.duration),g=Math.min(Math.round(R.loaded/L),b),i=b-g,u=i*Math.round(R.loaded/g);R.total=R.loaded+u}else R.total=Math.max(R.loaded,R.total);var f=R.loading,y=w.loading;f.start?f.first+=y.first-y.start:(f.start=y.start,f.first=y.first),f.end=y.end},A.resetLoader=function(m,_){m.loader=null,this.loader===_&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),_.destroy()},d}();function a(d,A){A===void 0&&(A=null);var l=A||d,m={frag:d,part:A,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},_=l.byteRangeStartOffset,R=l.byteRangeEndOffset;return Object(k.isFiniteNumber)(_)&&Object(k.isFiniteNumber)(R)&&(m.rangeStart=_,m.rangeEnd=R),m}var o=function(d){B(A,d);function A(l){for(var m,_=arguments.length,R=new Array(_>1?_-1:0),w=1;w<_;w++)R[w-1]=arguments[w];return m=d.call.apply(d,[this].concat(R))||this,m.data=void 0,m.data=l,m}return A}(M(Error))},"./src/loader/fragment.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"ElementaryStreamTypes",function(){return s}),I.d(K,"BaseSegment",function(){return a}),I.d(K,"Fragment",function(){return o}),I.d(K,"Part",function(){return d});var k=I("./src/polyfills/number.ts"),E=I("./node_modules/url-toolkit/src/url-toolkit.js"),B=I.n(E),M=I("./src/utils/logger.ts"),x=I("./src/loader/level-key.ts"),T=I("./src/loader/load-stats.ts");function p(A,l){A.prototype=Object.create(l.prototype),A.prototype.constructor=A,r(A,l)}function r(A,l){return r=Object.setPrototypeOf||function(_,R){return _.__proto__=R,_},r(A,l)}function t(A,l){for(var m=0;m>8*(15-L)&255;return w},m.setDecryptDataFromLevelKey=function(R,w){var L=R;return(R==null?void 0:R.method)==="AES-128"&&R.uri&&!R.iv&&(L=x.LevelKey.fromURI(R.uri),L.method=R.method,L.iv=this.createInitializationVector(w),L.keyFormat="identity"),L},m.setElementaryStreamInfo=function(R,w,L,b,g,i){i===void 0&&(i=!1);var u=this.elementaryStreams,f=u[R];if(!f){u[R]={startPTS:w,endPTS:L,startDTS:b,endDTS:g,partial:i};return}f.startPTS=Math.min(f.startPTS,w),f.endPTS=Math.max(f.endPTS,L),f.startDTS=Math.min(f.startDTS,b),f.endDTS=Math.max(f.endDTS,g)},m.clearElementaryStreamInfo=function(){var R=this.elementaryStreams;R[s.AUDIO]=null,R[s.VIDEO]=null,R[s.AUDIOVIDEO]=null},c(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var R=this.sn;typeof R!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&M.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),R=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,R)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(k.isFiniteNumber)(this.programDateTime))return null;var R=Object(k.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+R*1e3}},{key:"encrypted",get:function(){var R;return!!((R=this.decryptdata)!==null&&R!==void 0&&R.keyFormat&&this.decryptdata.uri)}}]),l}(a),d=function(A){p(l,A);function l(m,_,R,w,L){var b;b=A.call(this,R)||this,b.fragOffset=0,b.duration=0,b.gap=!1,b.independent=!1,b.relurl=void 0,b.fragment=void 0,b.index=void 0,b.stats=new T.LoadStats,b.duration=m.decimalFloatingPoint("DURATION"),b.gap=m.bool("GAP"),b.independent=m.bool("INDEPENDENT"),b.relurl=m.enumeratedString("URI"),b.fragment=_,b.index=w;var g=m.enumeratedString("BYTERANGE");return g&&b.setByteRange(g,L),L&&(b.fragOffset=L.fragOffset+L.duration),b}return c(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var _=this.elementaryStreams;return!!(_.audio||_.video||_.audiovideo)}}]),l}(a)},"./src/loader/key-loader.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return M});var k=I("./src/events.ts"),E=I("./src/errors.ts"),B=I("./src/utils/logger.ts"),M=function(){function x(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var T=x.prototype;return T._registerListeners=function(){this.hls.on(k.Events.KEY_LOADING,this.onKeyLoading,this)},T._unregisterListeners=function(){this.hls.off(k.Events.KEY_LOADING,this.onKeyLoading)},T.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var t=this.loaders[r];t&&t.destroy()}this.loaders={}},T.onKeyLoading=function(r,t){var c=t.frag,s=c.type,a=this.loaders[s];if(!c.decryptdata){B.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var o=c.decryptdata.uri;if(o!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(a&&(B.logger.warn("abort previous key loader for type:"+s),a.abort()),!o){B.logger.warn("key uri is falsy");return}var A=d.loader,l=c.loader=this.loaders[s]=new A(d);this.decrypturl=o,this.decryptkey=null;var m={url:o,frag:c,responseType:"arraybuffer"},_={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},R={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(m,_,R)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(k.Events.KEY_LOADED,{frag:c}))},T.loadsuccess=function(r,t,c){var s=c.frag;if(!s.decryptdata){B.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(r.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(k.Events.KEY_LOADED,{frag:s})},T.loaderror=function(r,t){var c=t.frag,s=c.loader;s&&s.abort(),delete this.loaders[c.type],this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:c,response:r})},T.loadtimeout=function(r,t){var c=t.frag,s=c.loader;s&&s.abort(),delete this.loaders[c.type],this.hls.trigger(k.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:c})},x}()},"./src/loader/level-details.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"LevelDetails",function(){return x});var k=I("./src/polyfills/number.ts");function E(T,p){for(var r=0;rt.endSN||c>0||c===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(t.misses*.6):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},B(T,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(k.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||M}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;if(t>0){var c=this.driftEnd-this.driftStart;return c*1e3/t}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return(t=this.partList)!==null&&t!==void 0&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return(t=this.fragments)!==null&&t!==void 0&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return(t=this.partList)!==null&&t!==void 0&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return(t=this.partList)!==null&&t!==void 0&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),T}()},"./src/loader/level-key.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"LevelKey",function(){return x});var k=I("./node_modules/url-toolkit/src/url-toolkit.js"),E=I.n(k);function B(T,p){for(var r=0;r2){var u=i.shift()+".";return u+=parseInt(i.shift()).toString(16),u+=("000"+parseInt(i.shift()).toString(16)).substr(-4),u}return g},L.resolve=function(g,i){return E.buildAbsoluteURL(i,g,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(g,i){var u=[],f={},y=!1;c.lastIndex=0;for(var h;(h=c.exec(g))!=null;)if(h[1]){var v=new p.AttrList(h[1]),P={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(h[2],i)},N=v.decimalResolution("RESOLUTION");N&&(P.width=N.width,P.height=N.height),m((v.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=L.convertAVC1ToAVCOTI(P.videoCodec)),u.push(P)}else if(h[3]){var Q=new p.AttrList(h[3]);Q["DATA-ID"]&&(y=!0,f[Q["DATA-ID"]]=Q)}return{levels:u,sessionData:y?f:null}},L.parseMasterPlaylistMedia=function(g,i,u,f){f===void 0&&(f=[]);var y,h=[],v=0;for(s.lastIndex=0;(y=s.exec(g))!==null;){var P=new p.AttrList(y[1]);if(P.TYPE===u){var N={attrs:P,bitrate:0,id:v++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:u,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?L.resolve(P.URI,i):""};if(f.length){var Q=L.findGroup(f,N.groupId)||f[0];_(N,Q,"audioCodec"),_(N,Q,"textCodec")}h.push(N)}}return h},L.parseLevelPlaylist=function(g,i,u,f,y){var h=new x.LevelDetails(i),v=h.fragments,P=null,N=0,Q=0,G=0,F=0,D=null,z=new M.Fragment(f,i),j,Z,te,Ae=-1,he=!1;for(a.lastIndex=0,h.m3u8=g;(j=a.exec(g))!==null;){he&&(he=!1,z=new M.Fragment(f,i),z.start=G,z.sn=N,z.cc=F,z.level=u,P&&(z.initSegment=P,z.rawProgramDateTime=P.rawProgramDateTime));var ce=j[1];if(ce){z.duration=parseFloat(ce);var ae=(" "+j[2]).slice(1);z.title=ae||null,z.tagList.push(ae?["INF",ce,ae]:["INF",ce])}else if(j[3])Object(k.isFiniteNumber)(z.duration)&&(z.start=G,te&&(z.levelkey=te),z.sn=N,z.level=u,z.cc=F,z.urlId=y,v.push(z),z.relurl=(" "+j[3]).slice(1),w(z,D),D=z,G+=z.duration,N++,Q=0,he=!0);else if(j[4]){var ve=(" "+j[4]).slice(1);D?z.setByteRange(ve,D):z.setByteRange(ve)}else if(j[5])z.rawProgramDateTime=(" "+j[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),Ae===-1&&(Ae=v.length);else{if(j=j[0].match(o),!j){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(Z=1;Z-1){r.logger.warn("Keyformat "+bt+" is not supported from the manifest");continue}else if(bt!=="identity")continue;et&&(te=T.LevelKey.fromURL(i,Le),Le&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(et)>=0&&(te.method=et,te.keyFormat=bt,$e&&(te.keyID=$e),Ze&&(te.keyFormatVersions=Ze),te.iv=We));break}case"START":{var It=new p.AttrList(fe),ft=It.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(ft)&&(h.startTimeOffset=ft);break}case"MAP":{var Ft=new p.AttrList(fe);z.relurl=Ft.URI,Ft.BYTERANGE&&z.setByteRange(Ft.BYTERANGE),z.level=u,z.sn="initSegment",te&&(z.levelkey=te),z.initSegment=null,P=z,he=!0;break}case"SERVER-CONTROL":{var zt=new p.AttrList(fe);h.canBlockReload=zt.bool("CAN-BLOCK-RELOAD"),h.canSkipUntil=zt.optionalFloat("CAN-SKIP-UNTIL",0),h.canSkipDateRanges=h.canSkipUntil>0&&zt.bool("CAN-SKIP-DATERANGES"),h.partHoldBack=zt.optionalFloat("PART-HOLD-BACK",0),h.holdBack=zt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Qe=new p.AttrList(fe);h.partTarget=Qe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var ze=h.partList;ze||(ze=h.partList=[]);var yt=Q>0?ze[ze.length-1]:void 0,St=Q++,at=new M.Part(new p.AttrList(fe),z,i,St,yt);ze.push(at),z.duration+=at.duration;break}case"PRELOAD-HINT":{var Ot=new p.AttrList(fe);h.preloadHint=Ot;break}case"RENDITION-REPORT":{var Ye=new p.AttrList(fe);h.renditionReports=h.renditionReports||[],h.renditionReports.push(Ye);break}default:r.logger.warn("line parsed but not handled: "+j);break}}}D&&!D.relurl?(v.pop(),G-=D.duration,h.partList&&(h.fragmentHint=D)):h.partList&&(w(z,D),z.cc=F,h.fragmentHint=z);var Ue=v.length,ke=v[0],Ce=v[Ue-1];if(G+=h.skippedSegments*h.targetduration,G>0&&Ue&&Ce){h.averagetargetduration=G/Ue;var Se=Ce.sn;h.endSN=Se!=="initSegment"?Se:0,ke&&(h.startCC=ke.cc,ke.initSegment||h.fragments.every(function(Me){return Me.relurl&&A(Me.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new M.Fragment(f,i),z.relurl=Ce.relurl,z.level=u,z.sn="initSegment",ke.initSegment=z,h.needSidxRanges=!0))}else h.endSN=0,h.startCC=0;return h.fragmentHint&&(G+=h.fragmentHint.duration),h.totalduration=G,h.endCC=F,Ae>0&&R(v,Ae),h},L}();function m(L,b){["video","audio","text"].forEach(function(g){var i=L.filter(function(f){return Object(t.isCodecType)(f,g)});if(i.length){var u=i.filter(function(f){return f.lastIndexOf("avc1",0)===0||f.lastIndexOf("mp4a",0)===0});b[g+"Codec"]=u.length>0?u[0]:i[0],L=L.filter(function(f){return i.indexOf(f)===-1})}}),b.unknownCodecs=L}function _(L,b,g){var i=b[g];i&&(L[g]=i)}function R(L,b){for(var g=L[b],i=b;i--;){var u=L[i];if(!u)return;u.programDateTime=g.programDateTime-u.duration*1e3,g=u}}function w(L,b){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):b!=null&&b.programDateTime&&(L.programDateTime=b.endProgramDateTime),Object(k.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/polyfills/number.ts"),E=I("./src/events.ts"),B=I("./src/errors.ts"),M=I("./src/utils/logger.ts"),x=I("./src/utils/mp4-tools.ts"),T=I("./src/loader/m3u8-parser.ts"),p=I("./src/types/loader.ts"),r=I("./src/utils/attr-list.ts");function t(a){var o=a.type;switch(o){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function c(a,o){var d=a.url;return(d===void 0||d.indexOf("data:")===0)&&(d=o.url),d}var s=function(){function a(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var o=a.prototype;return o.registerListeners=function(){var A=this.hls;A.on(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(E.Events.LEVEL_LOADING,this.onLevelLoading,this),A.on(E.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),A.on(E.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.unregisterListeners=function(){var A=this.hls;A.off(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(E.Events.LEVEL_LOADING,this.onLevelLoading,this),A.off(E.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),A.off(E.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.createInternalLoader=function(A){var l=this.hls.config,m=l.pLoader,_=l.loader,R=m||_,w=new R(l);return A.loader=w,this.loaders[A.type]=w,w},o.getInternalLoader=function(A){return this.loaders[A.type]},o.resetInternalLoader=function(A){this.loaders[A]&&delete this.loaders[A]},o.destroyInternalLoaders=function(){for(var A in this.loaders){var l=this.loaders[A];l&&l.destroy(),this.resetInternalLoader(A)}},o.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},o.onManifestLoading=function(A,l){var m=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:m,deliveryDirectives:null})},o.onLevelLoading=function(A,l){var m=l.id,_=l.level,R=l.url,w=l.deliveryDirectives;this.load({id:m,groupId:null,level:_,responseType:"text",type:p.PlaylistContextType.LEVEL,url:R,deliveryDirectives:w})},o.onAudioTrackLoading=function(A,l){var m=l.id,_=l.groupId,R=l.url,w=l.deliveryDirectives;this.load({id:m,groupId:_,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:R,deliveryDirectives:w})},o.onSubtitleTrackLoading=function(A,l){var m=l.id,_=l.groupId,R=l.url,w=l.deliveryDirectives;this.load({id:m,groupId:_,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:R,deliveryDirectives:w})},o.load=function(A){var l,m=this.hls.config,_=this.getInternalLoader(A);if(_){var R=_.context;if(R&&R.url===A.url){M.logger.trace("[playlist-loader]: playlist request ongoing");return}M.logger.log("[playlist-loader]: aborting previous loader for type: "+A.type),_.abort()}var w,L,b,g;switch(A.type){case p.PlaylistContextType.MANIFEST:w=m.manifestLoadingMaxRetry,L=m.manifestLoadingTimeOut,b=m.manifestLoadingRetryDelay,g=m.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:w=0,L=m.levelLoadingTimeOut;break;default:w=m.levelLoadingMaxRetry,L=m.levelLoadingTimeOut,b=m.levelLoadingRetryDelay,g=m.levelLoadingMaxRetryTimeout;break}if(_=this.createInternalLoader(A),(l=A.deliveryDirectives)!==null&&l!==void 0&&l.part){var i;if(A.type===p.PlaylistContextType.LEVEL&&A.level!==null?i=this.hls.levels[A.level].details:A.type===p.PlaylistContextType.AUDIO_TRACK&&A.id!==null?i=this.hls.audioTracks[A.id].details:A.type===p.PlaylistContextType.SUBTITLE_TRACK&&A.id!==null&&(i=this.hls.subtitleTracks[A.id].details),i){var u=i.partTarget,f=i.targetduration;u&&f&&(L=Math.min(Math.max(u*3,f*.8)*1e3,L))}}var y={timeout:L,maxRetry:w,retryDelay:b,maxRetryDelay:g,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};_.load(A,y,h)},o.loadsuccess=function(A,l,m,_){if(_===void 0&&(_=null),m.isSidxRequest){this.handleSidxRequest(A,m),this.handlePlaylistLoaded(A,l,m,_);return}this.resetInternalLoader(m.type);var R=A.data;if(R.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(A,m,"no EXTM3U delimiter",_);return}l.parsing.start=performance.now(),R.indexOf("#EXTINF:")>0||R.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(A,l,m,_):this.handleMasterPlaylist(A,l,m,_)},o.loaderror=function(A,l,m){m===void 0&&(m=null),this.handleNetworkError(l,m,!1,A)},o.loadtimeout=function(A,l,m){m===void 0&&(m=null),this.handleNetworkError(l,m,!0)},o.handleMasterPlaylist=function(A,l,m,_){var R=this.hls,w=A.data,L=c(A,m),b=T.default.parseMasterPlaylist(w,L),g=b.levels,i=b.sessionData;if(!g.length){this.handleManifestParsingError(A,m,"no level found in manifest",_);return}var u=g.map(function(N){return{id:N.attrs.AUDIO,audioCodec:N.audioCodec}}),f=g.map(function(N){return{id:N.attrs.SUBTITLES,textCodec:N.textCodec}}),y=T.default.parseMasterPlaylistMedia(w,L,"AUDIO",u),h=T.default.parseMasterPlaylistMedia(w,L,"SUBTITLES",f),v=T.default.parseMasterPlaylistMedia(w,L,"CLOSED-CAPTIONS");if(y.length){var P=y.some(function(N){return!N.url});!P&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(M.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}R.trigger(E.Events.MANIFEST_LOADED,{levels:g,audioTracks:y,subtitles:h,captions:v,url:L,stats:l,networkDetails:_,sessionData:i})},o.handleTrackOrLevelPlaylist=function(A,l,m,_){var R=this.hls,w=m.id,L=m.level,b=m.type,g=c(A,m),i=Object(k.isFiniteNumber)(w)?w:0,u=Object(k.isFiniteNumber)(L)?L:i,f=t(m),y=T.default.parseLevelPlaylist(A.data,g,u,f,i);if(!y.fragments.length){R.trigger(E.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof m.level=="number"?m.level:void 0});return}if(b===p.PlaylistContextType.MANIFEST){var h={attrs:new r.AttrList({}),bitrate:0,details:y,name:"",url:g};R.trigger(E.Events.MANIFEST_LOADED,{levels:[h],audioTracks:[],url:g,stats:l,networkDetails:_,sessionData:null})}if(l.parsing.end=performance.now(),y.needSidxRanges){var v,P=(v=y.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:P,isSidxRequest:!0,type:b,level:L,levelDetails:y,id:w,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}m.levelDetails=y,this.handlePlaylistLoaded(A,l,m,_)},o.handleSidxRequest=function(A,l){var m=Object(x.parseSegmentIndex)(new Uint8Array(A.data));if(!m)return;var _=m.references,R=l.levelDetails;_.forEach(function(w,L){var b=w.info,g=R.fragments[L];g.byteRange.length===0&&g.setByteRange(String(1+b.end-b.start)+"@"+String(b.start)),g.initSegment&&g.initSegment.setByteRange(String(m.moovEndOffset)+"@0")})},o.handleManifestParsingError=function(A,l,m,_){this.hls.trigger(E.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===p.PlaylistContextType.MANIFEST,url:A.url,reason:m,response:A,context:l,networkDetails:_})},o.handleNetworkError=function(A,l,m,_){m===void 0&&(m=!1),M.logger.warn("[playlist-loader]: A network "+(m?"timeout":"error")+" occurred while loading "+A.type+" level: "+A.level+" id: "+A.id+' group-id: "'+A.groupId+'"');var R=B.ErrorDetails.UNKNOWN,w=!1,L=this.getInternalLoader(A);switch(A.type){case p.PlaylistContextType.MANIFEST:R=m?B.ErrorDetails.MANIFEST_LOAD_TIMEOUT:B.ErrorDetails.MANIFEST_LOAD_ERROR,w=!0;break;case p.PlaylistContextType.LEVEL:R=m?B.ErrorDetails.LEVEL_LOAD_TIMEOUT:B.ErrorDetails.LEVEL_LOAD_ERROR,w=!1;break;case p.PlaylistContextType.AUDIO_TRACK:R=m?B.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:B.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,w=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:R=m?B.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:B.ErrorDetails.SUBTITLE_LOAD_ERROR,w=!1;break}L&&this.resetInternalLoader(A.type);var b={type:B.ErrorTypes.NETWORK_ERROR,details:R,fatal:w,url:A.url,loader:L,context:A,networkDetails:l};_&&(b.response=_),this.hls.trigger(E.Events.ERROR,b)},o.handlePlaylistLoaded=function(A,l,m,_){var R=m.type,w=m.level,L=m.id,b=m.groupId,g=m.loader,i=m.levelDetails,u=m.deliveryDirectives;if(!(i!=null&&i.targetduration)){this.handleManifestParsingError(A,m,"invalid target duration",_);return}if(!g)return;i.live&&(g.getCacheAge&&(i.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(i.ageHeader))&&(i.ageHeader=0));switch(R){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(E.Events.LEVEL_LOADED,{details:i,level:w||0,id:L||0,stats:l,networkDetails:_,deliveryDirectives:u});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(E.Events.AUDIO_TRACK_LOADED,{details:i,id:L||0,groupId:b||"",stats:l,networkDetails:_,deliveryDirectives:u});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(E.Events.SUBTITLE_TRACK_LOADED,{details:i,id:L||0,groupId:b||"",stats:l,networkDetails:_,deliveryDirectives:u});break}},a}();K.default=s},"./src/polyfills/number.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"isFiniteNumber",function(){return k}),I.d(K,"MAX_SAFE_INTEGER",function(){return E});var k=Number.isFinite||function(B){return typeof B=="number"&&isFinite(B)},E=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(q,K,I){"use strict";I.r(K);var k=function(){function E(){}return E.getSilentFrame=function(M,x){switch(M){case"mp4a.40.2":if(x===1)return new Uint8Array([0,200,0,128,35,128]);if(x===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(x===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(x===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(x===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(x===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(x===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(x===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(x===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},E}();K.default=k},"./src/remux/mp4-generator.ts":function(q,K,I){"use strict";I.r(K);var k=Math.pow(2,32)-1,E=function(){function B(){}return B.init=function(){B.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 x;for(x in B.types)B.types.hasOwnProperty(x)&&(B.types[x]=[x.charCodeAt(0),x.charCodeAt(1),x.charCodeAt(2),x.charCodeAt(3)]);var T=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]),p=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]);B.HDLR_TYPES={video:T,audio:p};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t=new Uint8Array([0,0,0,0,0,0,0,0]);B.STTS=B.STSC=B.STCO=t,B.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),B.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),B.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var c=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);B.FTYP=B.box(B.types.ftyp,c,a,c,s),B.DINF=B.box(B.types.dinf,B.box(B.types.dref,r))},B.box=function(x){for(var T=8,p=arguments.length,r=new Array(p>1?p-1:0),t=1;t>24&255,a[1]=T>>16&255,a[2]=T>>8&255,a[3]=T&255,a.set(x,4),c=0,T=8;c>24&255,x>>16&255,x>>8&255,x&255,p>>24,p>>16&255,p>>8&255,p&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},B.mdia=function(x){return B.box(B.types.mdia,B.mdhd(x.timescale,x.duration),B.hdlr(x.type),B.minf(x))},B.mfhd=function(x){return B.box(B.types.mfhd,new Uint8Array([0,0,0,0,x>>24,x>>16&255,x>>8&255,x&255]))},B.minf=function(x){return x.type==="audio"?B.box(B.types.minf,B.box(B.types.smhd,B.SMHD),B.DINF,B.stbl(x)):B.box(B.types.minf,B.box(B.types.vmhd,B.VMHD),B.DINF,B.stbl(x))},B.moof=function(x,T,p){return B.box(B.types.moof,B.mfhd(x),B.traf(p,T))},B.moov=function(x){for(var T=x.length,p=[];T--;)p[T]=B.trak(x[T]);return B.box.apply(null,[B.types.moov,B.mvhd(x[0].timescale,x[0].duration)].concat(p).concat(B.mvex(x)))},B.mvex=function(x){for(var T=x.length,p=[];T--;)p[T]=B.trex(x[T]);return B.box.apply(null,[B.types.mvex].concat(p))},B.mvhd=function(x,T){T*=x;var p=Math.floor(T/(k+1)),r=Math.floor(T%(k+1)),t=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,x>>24&255,x>>16&255,x>>8&255,x&255,p>>24,p>>16&255,p>>8&255,p&255,r>>24,r>>16&255,r>>8&255,r&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 B.box(B.types.mvhd,t)},B.sdtp=function(x){var T=x.samples||[],p=new Uint8Array(4+T.length),r,t;for(r=0;r>>8&255),T.push(c&255),T=T.concat(Array.prototype.slice.call(t));for(r=0;r>>8&255),p.push(c&255),p=p.concat(Array.prototype.slice.call(t));var s=B.box(B.types.avcC,new Uint8Array([1,T[3],T[4],T[5],252|3,224|x.sps.length].concat(T).concat([x.pps.length]).concat(p))),a=x.width,o=x.height,d=x.pixelRatio[0],A=x.pixelRatio[1];return B.box(B.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,a>>8&255,a&255,o>>8&255,o&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]),s,B.box(B.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),B.box(B.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,A>>24,A>>16&255,A>>8&255,A&255])))},B.esds=function(x){var T=x.config.length;return new Uint8Array([0,0,0,0,3,23+T,0,1,0,4,15+T,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([T]).concat(x.config).concat([6,1,2]))},B.mp4a=function(x){var T=x.samplerate;return B.box(B.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,x.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]),B.box(B.types.esds,B.esds(x)))},B.mp3=function(x){var T=x.samplerate;return B.box(B.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,x.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]))},B.stsd=function(x){return x.type==="audio"?!x.isAAC&&x.codec==="mp3"?B.box(B.types.stsd,B.STSD,B.mp3(x)):B.box(B.types.stsd,B.STSD,B.mp4a(x)):B.box(B.types.stsd,B.STSD,B.avc1(x))},B.tkhd=function(x){var T=x.id,p=x.duration*x.timescale,r=x.width,t=x.height,c=Math.floor(p/(k+1)),s=Math.floor(p%(k+1));return B.box(B.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,s>>24,s>>16&255,s>>8&255,s&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,r>>8&255,r&255,0,0,t>>8&255,t&255,0,0]))},B.traf=function(x,T){var p=B.sdtp(x),r=x.id,t=Math.floor(T/(k+1)),c=Math.floor(T%(k+1));return B.box(B.types.traf,B.box(B.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),B.box(B.types.tfdt,new Uint8Array([1,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,c>>24,c>>16&255,c>>8&255,c&255])),B.trun(x,p.length+16+20+8+16+8+8),p)},B.trak=function(x){return x.duration=x.duration||4294967295,B.box(B.types.trak,B.tkhd(x),B.mdia(x))},B.trex=function(x){var T=x.id;return B.box(B.types.trex,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},B.trun=function(x,T){var p=x.samples||[],r=p.length,t=12+16*r,c=new Uint8Array(t),s,a,o,d,A,l;for(T+=8+t,c.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,T>>>24&255,T>>>16&255,T>>>8&255,T&255],0),s=0;s>>24&255,o>>>16&255,o>>>8&255,o&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,A.isLeading<<2|A.dependsOn,A.isDependedOn<<6|A.hasRedundancy<<4|A.paddingValue<<1|A.isNonSync,A.degradPrio&240<<8,A.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*s);return B.box(B.types.trun,c)},B.initSegment=function(x){B.types||B.init();var T=B.moov(x),p=new Uint8Array(B.FTYP.byteLength+T.byteLength);return p.set(B.FTYP),p.set(T,B.FTYP.byteLength),p},B}();E.types=void 0,E.HDLR_TYPES=void 0,E.STTS=void 0,E.STSC=void 0,E.STCO=void 0,E.STSZ=void 0,E.VMHD=void 0,E.SMHD=void 0,E.STSD=void 0,E.FTYP=void 0,E.DINF=void 0,K.default=E},"./src/remux/mp4-remuxer.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return l}),I.d(K,"normalizePts",function(){return m});var k=I("./src/polyfills/number.ts"),E=I("./src/remux/aac-helper.ts"),B=I("./src/remux/mp4-generator.ts"),M=I("./src/events.ts"),x=I("./src/errors.ts"),T=I("./src/utils/logger.ts"),p=I("./src/types/loader.ts"),r=I("./src/utils/timescale-conversion.ts");function t(){return t=Object.assign||function(L){for(var b=1;b0?y:h.pts},i[0].pts);return u&&T.logger.debug("PTS rollover detected"),f},b.remux=function(i,u,f,y,h,v,P,N){var Q,G,F,D,z,j,Z=h,te=h,Ae=i.pid>-1,he=u.pid>-1,ce=u.samples.length,ae=i.samples.length>0,ve=ce>1,ue=(!Ae||ae)&&(!he||ve)||this.ISGenerated||P;if(ue){this.ISGenerated||(F=this.generateIS(i,u,h));var fe=this.isVideoContiguous,se=-1;if(ve&&(se=_(u.samples),!fe&&this.config.forceKeyFrameOnDiscontinuity))if(j=!0,se>0){T.logger.warn("[mp4-remuxer]: Dropped "+se+" out of "+ce+" video samples due to a missing keyframe");var me=this.getVideoStartPts(u.samples);u.samples=u.samples.slice(se),u.dropped+=se,te+=(u.samples[0].pts-me)/(u.timescale||9e4)}else se===-1&&(T.logger.warn("[mp4-remuxer]: No keyframe found out of "+ce+" video samples"),j=!1);if(this.ISGenerated){if(ae&&ve){var re=this.getVideoStartPts(u.samples),pe=m(i.samples[0].pts,re)-re,De=pe/u.inputTimeScale;Z+=Math.max(0,De),te+=Math.max(0,-De)}if(ae){if(i.samplerate||(T.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(i,u,h)),G=this.remuxAudio(i,Z,this.isAudioContiguous,v,he||ve||N===p.PlaylistLevelType.AUDIO?te:void 0),ve){var we=G?G.endPTS-G.startPTS:0;u.inputTimeScale||(T.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(i,u,h)),Q=this.remuxVideo(u,te,fe,we)}}else ve&&(Q=this.remuxVideo(u,te,fe,0));Q&&(Q.firstKeyFrame=se,Q.independent=se!==-1)}}return this.ISGenerated&&(f.samples.length&&(z=this.remuxID3(f,h)),y.samples.length&&(D=this.remuxText(y,h))),{audio:G,video:Q,initSegment:F,independent:j,text:D,id3:z}},b.generateIS=function(i,u,f){var y=i.samples,h=u.samples,v=this.typeSupported,P={},N=!Object(k.isFiniteNumber)(this._initPTS),Q="audio/mp4",G,F,D;if(N&&(G=F=Infinity),i.config&&y.length&&(i.timescale=i.samplerate,i.isAAC||(v.mpeg?(Q="audio/mpeg",i.codec=""):v.mp3&&(i.codec="mp3")),P.audio={id:"audio",container:Q,codec:i.codec,initSegment:!i.isAAC&&v.mpeg?new Uint8Array(0):B.default.initSegment([i]),metadata:{channelCount:i.channelCount}},N&&(D=i.inputTimeScale,G=F=y[0].pts-Math.round(D*f))),u.sps&&u.pps&&h.length&&(u.timescale=u.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:u.codec,initSegment:B.default.initSegment([u]),metadata:{width:u.width,height:u.height}},N)){D=u.inputTimeScale;var z=this.getVideoStartPts(h),j=Math.round(D*f);F=Math.min(F,m(h[0].dts,z)-j),G=Math.min(G,z-j)}if(Object.keys(P).length)return this.ISGenerated=!0,N&&(this._initPTS=G,this._initDTS=F),{tracks:P,initPTS:G,timescale:D}},b.remuxVideo=function(i,u,f,y){var h=i.inputTimeScale,v=i.samples,P=[],N=v.length,Q=this._initPTS,G=this.nextAvcDts,F=8,D,z,j,Z=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY,Ae=0,he=!1;if(!f||G===null){var ce=u*h,ae=v[0].pts-m(v[0].dts,v[0].pts);G=ce-ae}for(var ve=0;veue.pts){var fe=9e4*.2;Ae=Math.max(Math.min(Ae,ue.pts-ue.dts),-1*fe)}ue.dts0?ve-1:ve].dts&&(he=!0)}he&&v.sort(function(Et,pt){var Xe=Et.dts-pt.dts,Fe=Et.pts-pt.pts;return Xe||Fe}),z=v[0].dts,j=v[v.length-1].dts;var se=Math.round((j-z)/(N-1));if(Ae<0){if(Aese,je=De<-1;if(we||je){we?T.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(De,!0)+" ms ("+De+"dts) hole between fragments detected, filling it"):T.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-De,!0)+" ms ("+De+"dts) overlapping between fragments detected"),z=G;var et=v[0].pts-De;v[0].dts=z,v[0].pts=et,T.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(et,!0)+"/"+Object(r.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(De,!0)+" ms")}}A&&(z=Math.max(0,z));for(var Le=0,We=0,Ze=0;Ze0?ze-1:ze].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var He=Math.floor(Se.maxBufferHole*h),Ge=(y?Z+y*h:this.nextAudioPts)-yt.pts;Ge>He?(D=Ge-Me,D<0&&(D=Me),T.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+D/90+" ms for the last video frame.")):D=Me}else D=Me}var mt=Math.round(yt.pts-yt.dts);P.push(new R(yt.key,D,at,mt))}if(P.length&&o&&o<70){var Lt=P[0].flags;Lt.dependsOn=2,Lt.isNonSync=0}console.assert(D!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=j+D,this.isVideoContiguous=!0;var en=B.default.moof(i.sequenceNumber++,z,t({},i,{samples:P})),Jt="video",Ct={data1:en,data2:zt,startPTS:Z/h,endPTS:(te+D)/h,startDTS:z/h,endDTS:G/h,type:Jt,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:i.dropped};return i.samples=[],i.dropped=0,console.assert(zt.length,"MDAT length must not be zero"),Ct},b.remuxAudio=function(i,u,f,y,h){var v=i.inputTimeScale,P=i.samplerate?i.samplerate:v,N=v/P,Q=i.isAAC?s:a,G=Q*N,F=this._initPTS,D=!i.isAAC&&this.typeSupported.mpeg,z=[],j=i.samples,Z=D?0:8,te=this.nextAudioPts||-1,Ae=u*v;if(this.isAudioContiguous=f=f||j.length&&te>0&&(y&&Math.abs(Ae-te)<9e3||Math.abs(m(j[0].pts-F,Ae)-te)<20*G),j.forEach(function(ke){ke.pts=m(ke.pts-F,Ae)}),!f||te<0){if(j=j.filter(function(ke){return ke.pts>=0}),!j.length)return;h===0?te=0:y?te=Math.max(0,Ae):te=j[0].pts}if(i.isAAC)for(var he=h!==void 0,ce=this.config.maxAudioFramesDrift,ae=0,ve=te;ae=ce*G&&me0){We+=Z;try{Le=new Uint8Array(We)}catch(ke){this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:x.ErrorTypes.MUX_ERROR,details:x.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:We,reason:"fail allocating audio mdat "+We});return}if(!D){var zt=new DataView(Le.buffer);zt.setUint32(0,We),Le.set(B.default.types.mdat,4)}}else return;Le.set(It,Z);var Qe=It.byteLength;Z+=Qe,z.push(new R(!0,Q,Qe,0)),et=ft}var ze=z.length;if(!ze)return;var yt=z[z.length-1];this.nextAudioPts=te=et+N*yt.duration;var St=D?new Uint8Array(0):B.default.moof(i.sequenceNumber++,je/N,t({},i,{samples:z}));i.samples=[];var at=je/v,Ot=te/v,Ye="audio",Ue={data1:St,data2:Le,startPTS:at,endPTS:Ot,startDTS:at,endDTS:Ot,type:Ye,hasAudio:!0,hasVideo:!1,nb:ze};return this.isAudioContiguous=!0,console.assert(Le.length,"MDAT length must not be zero"),Ue},b.remuxEmptyAudio=function(i,u,f,y){var h=i.inputTimeScale,v=i.samplerate?i.samplerate:h,P=h/v,N=this.nextAudioPts,Q=(N!==null?N:y.startDTS*h)+this._initDTS,G=y.endDTS*h+this._initDTS,F=P*s,D=Math.ceil((G-Q)/F),z=E.default.getSilentFrame(i.manifestCodec||i.codec,i.channelCount);if(T.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){T.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var j=[],Z=0;Z4294967296;)L+=g;return L}function _(L){for(var b=0;b0?this.lastEndDTS=i:(M.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var u=!!L.audio,f=!!L.video,y="";u&&(y+="audio"),f&&(y+="video");var h={data1:R,startPTS:g,startDTS:g,endPTS:i,endDTS:i,type:y,hasAudio:u,hasVideo:f,nb:1,dropped:0};return _.audio=h.type==="audio"?h:void 0,_.video=h.type!=="audio"?h:void 0,_.text=d,_.id3=o,_.initSegment=w,_},r}(),T=function(t,c,s){return Object(E.getStartDTS)(t,c)-s};function p(r,t){var c=r==null?void 0:r.codec;return c&&c.length>4?c:c==="hvc1"?"hvc1.1.c.L120.90":c==="av01"?"av01.0.04M.08":c==="avc1"||t===B.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}K.default=x},"./src/task-loop.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"default",function(){return k});var k=function(){function E(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var B=E.prototype;return B.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},B.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},B.onHandlerDestroyed=function(){},B.hasInterval=function(){return!!this._tickInterval},B.hasNextTick=function(){return!!this._tickTimer},B.setInterval=function(x){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,x),!0)},B.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},B.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},B.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},B.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},B.doTick=function(){},E}()},"./src/types/cmcd.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"CMCDVersion",function(){return k}),I.d(K,"CMCDObjectType",function(){return E}),I.d(K,"CMCDStreamingFormat",function(){return B}),I.d(K,"CMCDStreamType",function(){return M});var k=1,E;(function(x){x.MANIFEST="m",x.AUDIO="a",x.VIDEO="v",x.MUXED="av",x.INIT="i",x.CAPTION="c",x.TIMED_TEXT="tt",x.KEY="k",x.OTHER="o"})(E||(E={}));var B;(function(x){x.DASH="d",x.HLS="h",x.SMOOTH="s",x.OTHER="o"})(B||(B={}));var M;(function(x){x.VOD="v",x.LIVE="l"})(M||(M={}))},"./src/types/level.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"HlsSkip",function(){return B}),I.d(K,"getSkipValue",function(){return M}),I.d(K,"HlsUrlParameters",function(){return x}),I.d(K,"Level",function(){return T});function k(p,r){for(var t=0;tNumber.MAX_SAFE_INTEGER?Infinity:r},x.hexadecimalInteger=function(p){if(this[p]){var r=(this[p]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var t=new Uint8Array(r.length/2),c=0;cNumber.MAX_SAFE_INTEGER?Infinity:r},x.decimalFloatingPoint=function(p){return parseFloat(this[p])},x.optionalFloat=function(p,r){var t=this[p];return t?parseFloat(t):r},x.enumeratedString=function(p){return this[p]},x.bool=function(p){return this[p]==="YES"},x.decimalResolution=function(p){var r=k.exec(this[p]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},M.parseAttrList=function(p){var r,t={},c='"';for(E.lastIndex=0;(r=E.exec(p))!==null;){var s=r[2];s.indexOf(c)===0&&s.lastIndexOf(c)===s.length-1&&(s=s.slice(1,-1)),t[r[1]]=s}return t},M}()},"./src/utils/binary-search.ts":function(q,K,I){"use strict";I.r(K);var k={search:function(B,M){for(var x=0,T=B.length-1,p=null,r=null;x<=T;){p=(x+T)/2|0,r=B[p];var t=M(r);if(t>0)x=p+1;else if(t<0)T=p-1;else return r}return null}};K.default=k},"./src/utils/buffer-helper.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"BufferHelper",function(){return B});var k=I("./src/utils/logger.ts"),E={length:0,start:function(){return 0},end:function(){return 0}},B=function(){function M(){}return M.isBuffered=function(T,p){try{if(T){for(var r=M.getBuffered(T),t=0;t=r.start(t)&&p<=r.end(t))return!0}}catch(c){}return!1},M.bufferInfo=function(T,p,r){try{if(T){var t=M.getBuffered(T),c=[],s;for(s=0;sa&&(t[s-1].end=T[c].end):t.push(T[c])}else t.push(T[c])}else t=T;for(var o=0,d,A=p,l=p,m=0;m=_&&p=f&&k.logger.log(this.time+" ["+f+"] "+y)},g}(),o=function(i){for(var u=[],f=0;fx&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=x)},i.moveCursor=function(f){var y=this.pos+f;if(f>1)for(var h=this.pos+1;h=144&&this.backSpace();var y=B(f);if(this.pos>=x){this.logger.log(s.ERROR,"Cannot insert "+f.toString(16)+" ("+y+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(y,this.currPenState),this.moveCursor(1)},i.clearFromPos=function(f){var y;for(y=f;y0&&(f?h="["+y.join(" | ")+"]":h=y.join(` `)),h},i.getTextAndFormat=function(){return this.rows},g}(),_=function(){function g(u,f,y){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=u,this.outputFilter=f,this.mode=null,this.verbose=0,this.displayedMemory=new m(y),this.nonDisplayedMemory=new m(y),this.lastOutputScreen=new m(y),this.currRollUpRow=this.displayedMemory.rows[M-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=y}var i=g.prototype;return i.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[M-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},i.getHandler=function(){return this.outputFilter},i.setHandler=function(f){this.outputFilter=f},i.setPAC=function(f){this.writeScreen.setPAC(f)},i.setBkgData=function(f){this.writeScreen.setBkgData(f)},i.setMode=function(f){if(f===this.mode)return;this.mode=f,this.logger.log(s.INFO,"MODE="+f),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=f},i.insertChars=function(f){for(var y=0;y=46,y.italics)y.foreground="white";else{var h=Math.floor(f/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];y.foreground=v[h]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(y)),this.writeScreen.setPen(y)},i.outputDataUpdate=function(f){f===void 0&&(f=!1);var y=this.logger.time;if(y===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=y:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,y,this.lastOutputScreen),f&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:y),this.lastOutputScreen.copy(this.displayedMemory))},i.cueSplitAtTime=function(f){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,f,this.displayedMemory),this.cueStartTime=f))},g}(),R=function(){function g(u,f,y){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var h=new a;this.channels=[null,new _(u,f,h),new _(u+1,y,h)],this.cmdHistory=b(),this.logger=h}var i=g.prototype;return i.getHandler=function(f){return this.channels[f].getHandler()},i.setHandler=function(f,y){this.channels[f].setHandler(y)},i.addData=function(f,y){var h,v,P,N=!1;this.logger.time=f;for(var Q=0;Q ("+o([v,P])+")"),h=this.parseCmd(v,P),h||(h=this.parseMidrow(v,P)),h||(h=this.parsePAC(v,P)),h||(h=this.parseBackgroundAttributes(v,P)),!h&&(N=this.parseChars(v,P),N)){var G=this.currentChannel;if(G&&G>0){var F=this.channels[G];F.insertChars(N)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!h&&!N&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+o([v,P])+" orig: "+o([y[Q],y[Q+1]]))}},i.parseCmd=function(f,y){var h=this.cmdHistory,v=(f===20||f===28||f===21||f===29)&&y>=32&&y<=47,P=(f===23||f===31)&&y>=33&&y<=35;if(!(v||P))return!1;if(L(f,y,h))return w(null,null,h),this.logger.log(s.DEBUG,"Repeated command ("+o([f,y])+") is dropped"),!0;var N=f===20||f===21||f===23?1:2,Q=this.channels[N];return f===20||f===21||f===28||f===29?y===32?Q.ccRCL():y===33?Q.ccBS():y===34?Q.ccAOF():y===35?Q.ccAON():y===36?Q.ccDER():y===37?Q.ccRU(2):y===38?Q.ccRU(3):y===39?Q.ccRU(4):y===40?Q.ccFON():y===41?Q.ccRDC():y===42?Q.ccTR():y===43?Q.ccRTD():y===44?Q.ccEDM():y===45?Q.ccCR():y===46?Q.ccENM():y===47&&Q.ccEOC():Q.ccTO(y-32),w(f,y,h),this.currentChannel=N,!0},i.parseMidrow=function(f,y){var h=0;if((f===17||f===25)&&y>=32&&y<=47){if(f===17?h=1:h=2,h!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[h];return v?(v.ccMIDROW(y),this.logger.log(s.DEBUG,"MIDROW ("+o([f,y])+")"),!0):!1}return!1},i.parsePAC=function(f,y){var h,v=this.cmdHistory,P=(f>=17&&f<=23||f>=25&&f<=31)&&y>=64&&y<=127,N=(f===16||f===24)&&y>=64&&y<=95;if(!(P||N))return!1;if(L(f,y,v))return w(null,null,v),!0;var Q=f<=23?1:2;y>=64&&y<=95?h=Q===1?T[f]:r[f]:h=Q===1?p[f]:t[f];var G=this.channels[Q];return G?(G.setPAC(this.interpretPAC(h,y)),w(f,y,v),this.currentChannel=Q,!0):!1},i.interpretPAC=function(f,y){var h,v={color:null,italics:!1,indent:null,underline:!1,row:f};return y>95?h=y-96:h=y-64,v.underline=(h&1)===1,h<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(h/2)]:h<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((h-16)/2)*4,v},i.parseChars=function(f,y){var h,v=null,P=null;if(f>=25?(h=2,P=f-8):(h=1,P=f),P>=17&&P<=19){var N;P===17?N=y+80:P===18?N=y+112:N=y+144,this.logger.log(s.INFO,"Special char '"+B(N)+"' in channel "+h),v=[N]}else f>=32&&f<=127&&(v=y===0?[f]:[f,y]);if(v){var Q=o(v);this.logger.log(s.DEBUG,"Char codes = "+Q.join(",")),w(f,y,this.cmdHistory)}return v},i.parseBackgroundAttributes=function(f,y){var h=(f===16||f===24)&&y>=32&&y<=47,v=(f===23||f===31)&&y>=45&&y<=47;if(!(h||v))return!1;var P,N={};f===16||f===24?(P=Math.floor((y-32)/2),N.background=c[P],y%2===1&&(N.background=N.background+"_semi")):y===45?N.background="transparent":(N.foreground="black",y===47&&(N.underline=!0));var Q=f<=23?1:2,G=this.channels[Q];return G.setBkgData(N),w(f,y,this.cmdHistory),!0},i.reset=function(){for(var f=0;f=16?A--:A++;var w=Object(k.fixLineBreaks)(l.trim()),L=Object(E.generateCueId)(r,t,w);(!p||!p.cues||!p.cues.getCueById(L))&&(o=new m(r,t,w),o.id=L,o.line=_+1,o.align="left",o.position=10+Math.min(80,Math.floor(A*8/32)*10),s.push(o))}return p&&s.length&&(s.sort(function(b,g){return b.line==="auto"||g.line==="auto"?0:b.line>8&&g.line>8?g.line-b.line:b.line-g.line}),s.forEach(function(b){return Object(B.addCueToTrack)(p,b)})),s}};K.default=x},"./src/utils/discontinuities.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"findFirstFragWithCC",function(){return M}),I.d(K,"shouldAlignOnDiscontinuities",function(){return x}),I.d(K,"findDiscontinuousReferenceFrag",function(){return T}),I.d(K,"adjustSlidingStart",function(){return r}),I.d(K,"alignStream",function(){return t}),I.d(K,"alignPDT",function(){return s}),I.d(K,"alignFragmentByPDTDelta",function(){return a}),I.d(K,"alignMediaPlaylistByPDT",function(){return o});var k=I("./src/polyfills/number.ts"),E=I("./src/utils/logger.ts"),B=I("./src/controller/level-helper.ts");function M(d,A){for(var l=null,m=0,_=d.length;m<_;m++){var R=d[m];if(R&&R.cc===A){l=R;break}}return l}function x(d,A,l){return!!(A.details&&(l.endCC>l.startCC||d&&d.cc=this.minWeight_},M.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},M.destroy=function(){},B}();K.default=E},"./src/utils/ewma.ts":function(q,K,I){"use strict";I.r(K);var k=function(){function E(M,x,T){x===void 0&&(x=0),T===void 0&&(T=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=M,this.alpha_=M?Math.exp(Math.log(.5)/M):0,this.estimate_=x,this.totalWeight_=T}var B=E.prototype;return B.sample=function(x,T){var p=Math.pow(this.alpha_,x);this.estimate_=T*(1-p)+p*this.estimate_,this.totalWeight_+=x},B.getTotalWeight=function(){return this.totalWeight_},B.getEstimate=function(){if(this.alpha_){var x=1-Math.pow(this.alpha_,this.totalWeight_);if(x)return this.estimate_/x}return this.estimate_},E}();K.default=k},"./src/utils/fetch-loader.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"fetchSupported",function(){return a});var k=I("./src/polyfills/number.ts"),E=I("./src/loader/load-stats.ts"),B=I("./src/demux/chunk-cache.ts");function M(m,_){m.prototype=Object.create(_.prototype),m.prototype.constructor=m,t(m,_)}function x(m){var _=typeof Map=="function"?new Map:void 0;return x=function(w){if(w===null||!r(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _!="undefined"){if(_.has(w))return _.get(w);_.set(w,L)}function L(){return T(w,arguments,c(this).constructor)}return L.prototype=Object.create(w.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),t(L,w)},x(m)}function T(m,_,R){return p()?T=Reflect.construct:T=function(L,b,g){var i=[null];i.push.apply(i,b);var u=Function.bind.apply(L,i),f=new u;return g&&t(f,g.prototype),f},T.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(m){return!1}}function r(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function t(m,_){return t=Object.setPrototypeOf||function(w,L){return w.__proto__=L,w},t(m,_)}function c(m){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},c(m)}function s(){return s=Object.assign||function(m){for(var _=1;_=g&&i(L,b,u.flush(),w)):i(L,b,P,w),h()}).catch(function(){return Promise.reject()})};return y()},m}();function d(m,_){var R={method:"GET",mode:"cors",credentials:"same-origin",signal:_,headers:new self.Headers(s({},m.headers))};return m.rangeEnd&&R.headers.set("Range","bytes="+m.rangeStart+"-"+String(m.rangeEnd-1)),R}function A(m,_){return new self.Request(m.url,_)}var l=function(m){M(_,m);function _(R,w,L){var b;return b=m.call(this,R)||this,b.code=void 0,b.details=void 0,b.code=w,b.details=L,b}return _}(x(Error));K.default=o},"./src/utils/imsc1-ttml-parser.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"IMSC1_CODEC",function(){return r}),I.d(K,"parseIMSC1",function(){return a});var k=I("./src/utils/mp4-tools.ts"),E=I("./src/utils/vttparser.ts"),B=I("./src/utils/vttcue.ts"),M=I("./src/demux/id3.ts"),x=I("./src/utils/timescale-conversion.ts"),T=I("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(g){for(var i=1;i"):k}function x(r){for(var t=arguments.length,c=new Array(t>1?t-1:0),s=1;s>24,_[R+1]=w>>16&255,_[R+2]=w>>8&255,_[R+3]=w&255}function t(_,R){var w=[];if(!R.length)return w;var L,b,g;"data"in _?(L=_.data,b=_.start,g=_.end):(L=_,b=0,g=L.byteLength);for(var i=b;i1?i+u:g;if(f===R[0])if(R.length===1)w.push({data:L,start:i+8,end:y});else{var h=t({data:L,start:i+8,end:y},R.slice(1));h.length&&M.apply(w,h)}i=y}return w}function c(_){var R=t(_,["moov"]),w=R[0],L=w?w.end:null,b=t(_,["sidx"]);if(!b||!b[0])return null;var g=[],i=b[0],u=i.data[0],f=u===0?8:16,y=p(i,f);f+=4;var h=0,v=0;u===0?f+=8:f+=16,f+=2;var P=i.end+v,N=T(i,f);f+=2;for(var Q=0;Q>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var j=p(i,G);G+=4,g.push({referenceSize:D,subsegmentDuration:j,info:{duration:j/y,start:P,end:P+D-1}}),P+=D,G+=4,f=G}return{earliestPresentationTime:h,timescale:y,version:u,referencesCount:N,references:g,moovEndOffset:L}}function s(_){for(var R=[],w=t(_,["moov","trak"]),L=0;Lx)&&(this.startTime=x),this.endTime=T,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},B.reset=function(){this.cueRanges=[]},E}()},"./src/utils/texttrack-utils.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"sendAddTrackEvent",function(){return E}),I.d(K,"addCueToTrack",function(){return B}),I.d(K,"clearCurrentCues",function(){return M}),I.d(K,"removeCuesInRange",function(){return x}),I.d(K,"getCuesInRange",function(){return p});var k=I("./src/utils/logger.ts");function E(r,t){var c;try{c=new Event("addtrack")}catch(s){c=document.createEvent("Event"),c.initEvent("addtrack",!1,!1)}c.track=r,t.dispatchEvent(c)}function B(r,t){var c=r.mode;if(c==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(t.id))try{if(r.addCue(t),!r.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(a){k.logger.debug("[texttrack-utils]: "+a);var s=new self.TextTrackCue(t.startTime,t.endTime,t.text);s.id=t.id,r.addCue(s)}c==="disabled"&&(r.mode=c)}function M(r){var t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues)for(var c=r.cues.length;c--;)r.removeCue(r.cues[c]);t==="disabled"&&(r.mode=t)}function x(r,t,c){var s=r.mode;if(s==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var a=p(r.cues,t,c),o=0;or[c].endTime)return-1;for(var s=0,a=c;s<=a;){var o=Math.floor((a+s)/2);if(tr[o].startTime&&s-1)for(var o=a,d=r.length;o=t&&A.endTime<=c)s.push(A);else if(A.startTime>c)return s}return s}},"./src/utils/time-ranges.ts":function(q,K,I){"use strict";I.r(K);var k={toString:function(B){for(var M="",x=B.length,T=0;T1?t-1:0),s=1;s100)throw new Error("Position must be between 0 and 100.");g=h,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",T({},a,{get:function(){return i},set:function(h){var v=x(h);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");i=v,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",T({},a,{get:function(){return u},set:function(h){if(h<0||h>100)throw new Error("Size must be between 0 and 100.");u=h,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",T({},a,{get:function(){return f},set:function(h){var v=x(h);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");f=v,this.hasBeenReset=!0}})),s.displayState=void 0}return p.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"parseTimeStamp",function(){return B}),I.d(K,"fixLineBreaks",function(){return t}),I.d(K,"VTTParser",function(){return c});var k=I("./src/utils/vttcue.ts"),E=function(){function s(){}var a=s.prototype;return a.decode=function(d,A){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},s}();function B(s){function a(d,A,l,m){return(d|0)*3600+(A|0)*60+(l|0)+parseFloat(m||0)}var o=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return o?parseFloat(o[2])>59?a(o[2],o[3],0,o[4]):a(o[1],o[2],o[3],o[4]):null}var M=function(){function s(){this.values=Object.create(null)}var a=s.prototype;return a.set=function(d,A){!this.get(d)&&A!==""&&(this.values[d]=A)},a.get=function(d,A,l){return l?this.has(d)?this.values[d]:A[l]:this.has(d)?this.values[d]:A},a.has=function(d){return d in this.values},a.alt=function(d,A,l){for(var m=0;m=0&&l<=100)return this.set(d,l),!0}return!1},s}();function x(s,a,o,d){var A=d?s.split(d):[s];for(var l in A){if(typeof A[l]!="string")continue;var m=A[l].split(o);if(m.length!==2)continue;var _=m[0],R=m[1];a(_,R)}}var T=new k.default(0,0,""),p=T.align==="middle"?"middle":"center";function r(s,a,o){var d=s;function A(){var _=B(s);if(_===null)throw new Error("Malformed timestamp: "+d);return s=s.replace(/^[^\sa-zA-Z-]+/,""),_}function l(_,R){var w=new M;x(_,function(g,i){var u;switch(g){case"region":for(var f=o.length-1;f>=0;f--)if(o[f].id===i){w.set(g,o[f].region);break}break;case"vertical":w.alt(g,i,["rl","lr"]);break;case"line":u=i.split(","),w.integer(g,u[0]),w.percent(g,u[0])&&w.set("snapToLines",!1),w.alt(g,u[0],["auto"]),u.length===2&&w.alt("lineAlign",u[1],["start",p,"end"]);break;case"position":u=i.split(","),w.percent(g,u[0]),u.length===2&&w.alt("positionAlign",u[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":w.percent(g,i);break;case"align":w.alt(g,i,["start",p,"end","left","right"]);break}},/:/,/\s/),R.region=w.get("region",null),R.vertical=w.get("vertical","");var L=w.get("line","auto");L==="auto"&&T.line===-1&&(L=-1),R.line=L,R.lineAlign=w.get("lineAlign","start"),R.snapToLines=w.get("snapToLines",!0),R.size=w.get("size",100),R.align=w.get("align",p);var b=w.get("position","auto");b==="auto"&&T.position===50&&(b=R.align==="start"||R.align==="left"?0:R.align==="end"||R.align==="right"?100:50),R.position=b}function m(){s=s.replace(/^\s+/,"")}if(m(),a.startTime=A(),m(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);s=s.substr(3),m(),a.endTime=A(),m(),l(s,a)}function t(s){return s.replace(//gi,` `)}var c=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new E,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var a=s.prototype;return a.parse=function(d){var A=this;d&&(A.buffer+=A.decoder.decode(d,{stream:!0}));function l(){var b=A.buffer,g=0;for(b=t(b);g")===-1){A.cue.id=_;continue}case"CUE":if(!A.cue){A.state="BADCUE";continue}try{r(_,A.cue,A.regionList)}catch(b){A.cue=null,A.state="BADCUE";continue}A.state="CUETEXT";continue;case"CUETEXT":{var L=_.indexOf("-->")!==-1;if(!_||L&&(w=!0)){A.oncue&&A.cue&&A.oncue(A.cue),A.cue=null,A.state="ID";continue}if(A.cue===null)continue;A.cue.text&&(A.cue.text+=` `),A.cue.text+=_}continue;case"BADCUE":_||(A.state="ID")}}}catch(b){A.state==="CUETEXT"&&A.cue&&A.oncue&&A.oncue(A.cue),A.cue=null,A.state=A.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},a.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=` `,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(A){d.onparsingerror&&d.onparsingerror(A)}return d.onflush&&d.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(q,K,I){"use strict";I.r(K),I.d(K,"generateCueId",function(){return c}),I.d(K,"parseWebVTT",function(){return a});var k=I("./src/polyfills/number.ts"),E=I("./src/utils/vttparser.ts"),B=I("./src/demux/id3.ts"),M=I("./src/utils/timescale-conversion.ts"),x=I("./src/remux/mp4-remuxer.ts"),T=/\r\n|\n\r|\n|\r/g,p=function(d,A,l){return l===void 0&&(l=0),d.substr(l,A.length)===A},r=function(d){var A=parseInt(d.substr(-3)),l=parseInt(d.substr(-6,2)),m=parseInt(d.substr(-9,2)),_=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(A)||!Object(k.isFiniteNumber)(l)||!Object(k.isFiniteNumber)(m)||!Object(k.isFiniteNumber)(_))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return A+=1e3*l,A+=60*1e3*m,A+=60*60*1e3*_,A},t=function(d){for(var A=5381,l=d.length;l;)A=A*33^d.charCodeAt(--l);return(A>>>0).toString()};function c(o,d,A){return t(o.toString())+t(d.toString())+t(A)}var s=function(d,A,l){var m=d[A],_=d[m.prevCC];if(!_||!_.new&&m.new){d.ccOffset=d.presentationOffset=m.start,m.new=!1;return}for(;(R=_)!==null&&R!==void 0&&R.new;){var R;d.ccOffset+=m.start-_.start,m.new=!1,m=_,_=d[m.prevCC]}d.presentationOffset=l};function a(o,d,A,l,m,_,R,w){var L=new E.VTTParser,b=Object(B.utf8ArrayToStr)(new Uint8Array(o)).trim().replace(T,` `).split(` `),g=[],i=Object(M.toMpegTsClockFromTimescale)(d,A),u="00:00.000",f=0,y=0,h,v=!0,P=!1;L.oncue=function(N){var Q=l[m],G=l.ccOffset,F=(f-i)/9e4;if(Q!=null&&Q.new&&(y!==void 0?G=l.ccOffset=Q.start:s(l,m,F)),F&&(G=F-l.presentationOffset),P){var D=N.endTime-N.startTime,z=Object(x.normalizePts)((N.startTime+G-y)*9e4,_*9e4)/9e4;N.startTime=z,N.endTime=z+D}var j=N.text.trim();N.text=decodeURIComponent(encodeURIComponent(j)),N.id||(N.id=c(N.startTime,N.endTime,j)),N.endTime>0&&g.push(N)},L.onparsingerror=function(N){h=N},L.onflush=function(){if(h){w(h);return}R(g)},b.forEach(function(N){if(v)if(p(N,"X-TIMESTAMP-MAP=")){v=!1,P=!0,N.substr(16).split(",").forEach(function(Q){p(Q,"LOCAL:")?u=Q.substr(6):p(Q,"MPEGTS:")&&(f=parseInt(Q.substr(7)))});try{y=r(u)/1e3}catch(Q){P=!1,h=Q}return}else N===""&&(v=!1);L.parse(N+` `)}),L.flush()}},"./src/utils/xhr-loader.ts":function(q,K,I){"use strict";I.r(K);var k=I("./src/utils/logger.ts"),E=I("./src/loader/load-stats.ts"),B=/^age:\s*[\d.]+\s*$/m,M=function(){function x(p){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=p?p.xhrSetup:null,this.stats=new E.LoadStats,this.retryDelay=0}var T=x.prototype;return T.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},T.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},T.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},T.load=function(r,t,c){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=t,this.callbacks=c,this.retryDelay=t.retryDelay,this.loadInternal()},T.loadInternal=function(){var r=this.config,t=this.context;if(!r)return;var c=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var a=this.xhrSetup;try{if(a)try{a(c,t.url)}catch(A){c.open("GET",t.url,!0),a(c,t.url)}c.readyState||c.open("GET",t.url,!0);var o=this.context.headers;if(o)for(var d in o)c.setRequestHeader(d,o[d])}catch(A){this.callbacks.onError({code:c.status,text:A.message},t,c);return}t.rangeEnd&&c.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),c.onreadystatechange=this.readystatechange.bind(this),c.onprogress=this.loadprogress.bind(this),c.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),c.send()},T.readystatechange=function(){var r=this.context,t=this.loader,c=this.stats;if(!r||!t)return;var s=t.readyState,a=this.config;if(c.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),c.loading.first===0&&(c.loading.first=Math.max(self.performance.now(),c.loading.start)),s===4){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){c.loading.end=Math.max(self.performance.now(),c.loading.first);var d,A;if(r.responseType==="arraybuffer"?(d=t.response,A=d.byteLength):(d=t.responseText,A=d.length),c.loaded=c.total=A,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(c,r,d,t),!this.callbacks)return;var m={url:t.responseURL,data:d};this.callbacks.onSuccess(m,c,r,t)}else c.retry>=a.maxRetry||o>=400&&o<499?(k.logger.error(o+" while loading "+r.url),this.callbacks.onError({code:o,text:t.statusText},r,t)):(k.logger.warn(o+" while loading "+r.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,a.maxRetryDelay),c.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)},T.loadtimeout=function(){k.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},T.loadprogress=function(r){var t=this.stats;t.loaded=r.loaded,r.lengthComputable&&(t.total=r.total)},T.getCacheAge=function(){var r=null;if(this.loader&&B.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");r=t?parseFloat(t):null}return r},x}();K.default=M}}).default})},vHTk:function(Ie,oe,C){Ie.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(Ie,oe,C){var q=C("SrGk"),K=C("bYtY");function I(B,M){q.call(this,B,M,["filter"],"__filter_in_use__","_shadowDom")}K.inherits(I,q),I.prototype.addWithoutUpdate=function(B,M){if(M&&k(M.style)){var x;if(M._shadowDom){x=M._shadowDom;var T=this.getDefs(!0);T.contains(M._shadowDom)||this.addDom(x)}else x=this.add(M);this.markUsed(M);var p=x.getAttribute("id");B.style.filter="url(#"+p+")"}},I.prototype.add=function(B){var M=this.createElement("filter");return B._shadowDomId=B._shadowDomId||this.nextId++,M.setAttribute("id","zr"+this._zrId+"-shadow-"+B._shadowDomId),this.updateDom(B,M),this.addDom(M),M},I.prototype.update=function(B,M){var x=M.style;if(k(x)){var T=this;q.prototype.update.call(this,M,function(){T.updateDom(M,M._shadowDom)})}else this.remove(B,M)},I.prototype.remove=function(B,M){M._shadowDomId!=null&&(this.removeDom(B),B.style.filter="")},I.prototype.updateDom=function(B,M){var x=M.getElementsByTagName("feDropShadow");x.length===0?x=this.createElement("feDropShadow"):x=x[0];var T=B.style,p=B.scale&&B.scale[0]||1,r=B.scale&&B.scale[1]||1,t,c,s,a;if(T.shadowBlur||T.shadowOffsetX||T.shadowOffsetY)t=T.shadowOffsetX||0,c=T.shadowOffsetY||0,s=T.shadowBlur,a=T.shadowColor;else if(T.textShadowBlur)t=T.textShadowOffsetX||0,c=T.textShadowOffsetY||0,s=T.textShadowBlur,a=T.textShadowColor;else{this.removeDom(M,T);return}x.setAttribute("dx",t/p),x.setAttribute("dy",c/r),x.setAttribute("flood-color",a);var o=s/2/p,d=s/2/r,A=o+" "+d;x.setAttribute("stdDeviation",A),M.setAttribute("x","-100%"),M.setAttribute("y","-100%"),M.setAttribute("width",Math.ceil(s/2*200)+"%"),M.setAttribute("height",Math.ceil(s/2*200)+"%"),M.appendChild(x),B._shadowDom=M},I.prototype.markUsed=function(B){B._shadowDom&&q.prototype.markUsed.call(this,B._shadowDom)};function k(B){return B&&(B.shadowBlur||B.shadowOffsetX||B.shadowOffsetY||B.textShadowBlur||B.textShadowOffsetX||B.textShadowOffsetY)}var E=I;Ie.exports=E},vUf6:function(Ie,oe,C){Ie.exports=C.p+"static/xxtj.38a4bc0a.svg"},vWvF:function(Ie,oe,C){var q=C("Bq2U"),K=C("SUKs"),I=C("bYtY"),k=I.isString,E=I.isFunction,B=I.isObject,M=I.isArrayLike,x=I.indexOf,T=function(){this.animators=[]};T.prototype={constructor:T,animate:function(s,a){var o,d=!1,A=this,l=this.__zr;if(s){var m=s.split("."),_=A;d=m[0]==="shape";for(var R=0,w=m.length;R0&&s.animate(a,!1).when(A==null?500:A,_).delay(l||0)}function t(s,a,o,d){if(!a)s.attr(o,d);else{var A={};A[a]={},A[a][o]=d,s.attr(A)}}var c=T;Ie.exports=c},vef1:function(Ie,oe,C){Ie.exports={upload:"upload___3GNI5"}},vkP9:function(Ie,oe,C){"use strict";var q=C("+L6B"),K=C("2/Rp"),I=C("5NDa"),k=C("5rEg"),E=C("y8nQ"),B=C("Vl3Y"),M=C("tJVT"),x=C("q1tI"),T=C.n(x),p=C("a+yL"),r=C.n(p),t=function(s){var a=s.value,o=s.onChange,d=B.a.useForm(),A=Object(M.a)(d,1),l=A[0];Object(x.useEffect)(function(){a&&l.setFieldsValue(a)},a);var m=function(R){o(R)};return T.a.createElement("div",{className:r.a.search},T.a.createElement(B.a,{className:r.a.formWrap,colon:!1,form:l,size:"large",layout:"inline",onFinish:m},T.a.createElement(B.a.Item,{label:"\u5B9E\u8BAD\u4FE1\u606F",name:"keyword",initialValue:""},T.a.createElement(k.a,{style:{width:280,height:40}})),T.a.createElement(B.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"schools",initialValue:"",style:{margin:"0 40px"}},T.a.createElement(k.a,{style:{width:280,height:40}})),T.a.createElement(B.a.Item,{label:"\u521B\u5EFA\u8005",name:"creator",initialValue:""},T.a.createElement(k.a,{style:{width:200,height:40}})),T.a.createElement(K.a,{className:r.a.btn,type:"primary",htmlType:"submit"},"\u641C\u7D22")))};oe.a=t},w8Aa:function(Ie,oe,C){Ie.exports={img:"img___3e4yQ"}},wCXF:function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return It});var q=C("rePB"),K=C("VTBJ"),I=C("KQm4"),k=C("U8pU"),E=C("ODXe"),B=C("q1tI"),M=C("TSYQ"),x=C.n(M),T=C("Gytx"),p=C.n(T),r=C("Kwbf"),t=C("t23M"),c=C("qx4F"),s=C("6eGT"),a=C("IBYe"),o=C("Ff2n"),d=C("c+Xe"),A=C("fyJ8"),l=C("biw7");function m(Qe,ze,yt,St,at){var Ot=yt[Qe]||{},Ye=yt[ze]||{},Ue,ke;Ot.fixed==="left"?Ue=St.left[Qe]:Ye.fixed==="right"&&(ke=St.right[ze]);var Ce=!1,Se=!1,Me=!1,He=!1,Ge=yt[ze+1],mt=yt[Qe-1];if(at==="rtl"){if(Ue!==void 0){var Lt=mt&&mt.fixed==="left";He=!Lt}else if(ke!==void 0){var en=Ge&&Ge.fixed==="right";Me=!en}}else if(Ue!==void 0){var Jt=Ge&&Ge.fixed==="left";Ce=!Jt}else if(ke!==void 0){var Ct=mt&&mt.fixed==="right";Se=!Ct}return{fixLeft:Ue,fixRight:ke,lastFixLeft:Ce,firstFixRight:Se,lastFixRight:Me,firstFixLeft:He,isSticky:St.isSticky}}var _=C("sR1s");function R(Qe){var ze=Qe.cells,yt=Qe.stickyOffsets,St=Qe.flattenColumns,at=Qe.rowComponent,Ot=Qe.cellComponent,Ye=Qe.onHeaderRow,Ue=Qe.index,ke=B.useContext(l.a),Ce=ke.prefixCls,Se=ke.direction,Me;Ye&&(Me=Ye(ze.map(function(Ge){return Ge.column}),Ue));var He=Object(_.a)(ze.map(function(Ge){return Ge.column}));return B.createElement(at,Object.assign({},Me),ze.map(function(Ge,mt){var Lt=Ge.column,en=m(Ge.colStart,Ge.colEnd,St,yt,Se),Jt;return Lt&&Lt.onHeaderCell&&(Jt=Ge.column.onHeaderCell(Lt)),B.createElement(A.a,Object.assign({},Ge,{ellipsis:Lt.ellipsis,align:Lt.align,component:Ot,prefixCls:Ce,key:He[mt]},en,{additionalProps:Jt,rowType:"header"}))}))}R.displayName="HeaderRow";var w=R;function L(Qe){var ze=[];function yt(Ye,Ue){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;ze[ke]=ze[ke]||[];var Ce=Ue,Se=Ye.filter(Boolean).map(function(Me){var He={key:Me.key,className:Me.className||"",children:Me.title,column:Me,colStart:Ce},Ge=1,mt=Me.children;return mt&&mt.length>0&&(Ge=yt(mt,Ce,ke+1).reduce(function(Lt,en){return Lt+en},0),He.hasSubColumns=!0),"colSpan"in Me&&(Ge=Me.colSpan),"rowSpan"in Me&&(He.rowSpan=Me.rowSpan),He.colSpan=Ge,He.colEnd=He.colStart+Ge-1,ze[ke].push(He),Ce+=Ge,Ge});return Se}yt(Qe,0);for(var St=ze.length,at=function(Ue){ze[Ue].forEach(function(ke){!("rowSpan"in ke)&&!ke.hasSubColumns&&(ke.rowSpan=St-Ue)})},Ot=0;Ot=0;Ue-=1){var ke=ze[Ue],Ce=yt&&yt[Ue],Se=Ce&&Ce[i.a];(ke||Se||Ye)&&(at.unshift(B.createElement("col",Object.assign({key:Ue,style:{width:ke,minWidth:ke}},Se))),Ye=!0)}return B.createElement("colgroup",null,at)}var f=u;function y(Qe,ze){return Object(B.useMemo)(function(){for(var yt=[],St=0;St1?ee-1:0),ie=1;ie=Me&&(Tn=Me-He),Ye({scrollLeft:Tn/Me*(Se+2)}),Ct.current.x=ct.pageX},vt=function(){var ct=Object(Le.b)(Ot.current).top,Mt=ct+Ot.current.offsetHeight,Gt=document.documentElement.scrollTop+window.innerHeight;Mt-Object(c.a)()<=Gt||ct>=Gt-Ue?Jt(function(gn){return Object(K.a)(Object(K.a)({},gn),{},{isHiddenScrollBar:!0})}):Jt(function(gn){return Object(K.a)(Object(K.a)({},gn),{},{isHiddenScrollBar:!1})})},Dt=function(ct){Jt(function(Mt){return Object(K.a)(Object(K.a)({},Mt),{},{scrollLeft:ct/Se*Me||0})})};return B.useImperativeHandle(yt,function(){return{setScrollLeft:Dt}}),B.useEffect(function(){var Ht=Object(et.a)(document.body,"mouseup",Te,!1),ct=Object(et.a)(document.body,"mousemove",xt,!1);return vt(),function(){Ht.remove(),ct.remove()}},[He,Xe]),B.useEffect(function(){var Ht=Object(et.a)(window,"scroll",vt,!1),ct=Object(et.a)(window,"resize",vt,!1);return function(){Ht.remove(),ct.remove()}},[]),B.useEffect(function(){en.isHiddenScrollBar||Jt(function(Ht){var ct,Mt;return Object(K.a)(Object(K.a)({},Ht),{},{scrollLeft:Ot.current.scrollLeft/((ct=Ot.current)===null||ct===void 0?void 0:ct.scrollWidth)*((Mt=Ot.current)===null||Mt===void 0?void 0:Mt.clientWidth)})})},[en.isHiddenScrollBar]),Se<=Me||!He||en.isHiddenScrollBar?null:B.createElement("div",{style:{height:Object(c.a)(),width:Me,bottom:Ue},className:"".concat(Ce,"-sticky-scroll")},B.createElement("div",{onMouseDown:Ne,ref:Ge,className:x()("".concat(Ce,"-sticky-scroll-bar"),Object(q.a)({},"".concat(Ce,"-sticky-scroll-bar-active"),Xe)),style:{width:"".concat(He,"px"),transform:"translate3d(".concat(en.scrollLeft,"px, 0, 0)")}}))},Ze=B.forwardRef(We);function $e(Qe,ze){return B.useMemo(function(){var yt=!!Qe;return{isSticky:yt,stickyClassName:yt?"".concat(ze,"-sticky-header"):"",offsetHeader:Object(k.a)(Qe)==="object"&&Qe.offsetHeader||0,offsetScroll:Object(k.a)(Qe)==="object"&&Qe.offsetScroll||0}},[Qe,ze])}var bt=[],wt={},It="rc-table-internal-hook",ft=B.memo(function(Qe){var ze=Qe.children;return ze},function(Qe,ze){return p()(Qe.props,ze.props)?Qe.pingLeft!==ze.pingLeft||Qe.pingRight!==ze.pingRight:!1});function Ft(Qe){var ze,yt=Qe.prefixCls,St=Qe.className,at=Qe.rowClassName,Ot=Qe.style,Ye=Qe.data,Ue=Qe.rowKey,ke=Qe.scroll,Ce=Qe.tableLayout,Se=Qe.direction,Me=Qe.title,He=Qe.footer,Ge=Qe.summary,mt=Qe.id,Lt=Qe.showHeader,en=Qe.components,Jt=Qe.emptyText,Ct=Qe.onRow,Et=Qe.onHeaderRow,pt=Qe.internalHooks,Xe=Qe.transformColumns,Fe=Qe.internalRefs,Te=Qe.sticky,Ne=Ye||bt,xt=!!Ne.length,vt=B.useState(0),Dt=Object(E.a)(vt,2),Ht=Dt[0],ct=Dt[1];B.useEffect(function(){ct(Object(c.a)())});var Mt=B.useMemo(function(){return Object(_.c)(en,{})},[en]),Gt=B.useCallback(function(ti,wa){return Object(_.b)(Mt,ti)||wa},[Mt]),gn=B.useMemo(function(){return typeof Ue=="function"?Ue:function(ti){var wa=ti&&ti[Ue];return wa}},[Ue]),Tn=Object(i.c)(Qe),Gr=Tn.expandIcon,Vr=Tn.expandedRowKeys,Kr=Tn.defaultExpandedRowKeys,kn=Tn.defaultExpandAllRows,Ua=Tn.expandedRowRender,Ya=Tn.onExpand,Ra=Tn.onExpandedRowsChange,Xr=Tn.expandRowByClick,Ja=Tn.rowExpandable,Ri=Tn.expandIconColumnIndex,ji=Tn.expandedRowClassName,_e=Tn.childrenColumnName,Be=Tn.indentSize,Ve=Gr||we,gt=_e||"children",Xt=B.useMemo(function(){return Ua?"row":Qe.expandable&&pt===It&&Qe.expandable.__PARENT_RENDER_ICON__||Ne.some(function(ti){return ti&&Object(k.a)(ti)==="object"&&ti[gt]})?"nest":!1},[!!Ua,Ne]),sn=B.useState(function(){return Kr||(kn?je(Ne,gn,gt):[])}),ne=Object(E.a)(sn,2),H=ne[0],V=ne[1],ee=B.useMemo(function(){return new Set(Vr||H||[])},[Vr,H]),ge=B.useCallback(function(ti){var wa=gn(ti,Ne.indexOf(ti)),Sa,Eo=ee.has(wa);Eo?(ee.delete(wa),Sa=Object(I.a)(ee)):Sa=[].concat(Object(I.a)(ee),[wa]),V(Sa),Ya&&Ya(!Eo,ti),Ra&&Ra(Sa)},[gn,ee,Ne,Ya,Ra]),ie=B.useState(0),tt=Object(E.a)(ie,2),Qt=tt[0],dn=tt[1],_n=Object(ce.b)(Object(K.a)(Object(K.a)(Object(K.a)({},Qe),Tn),{},{expandable:!!Ua,expandedKeys:ee,getRowKey:gn,onTriggerExpand:ge,expandIcon:Ve,expandIconColumnIndex:Ri,direction:Se}),pt===It?Xe:null),Zt=Object(E.a)(_n,2),Vn=Zt[0],Xn=Zt[1],lr=B.useMemo(function(){return{columns:Vn,flattenColumns:Xn}},[Vn,Xn]),Or=B.useRef(),$r=B.useRef(),Hr=B.useRef(),ba=B.useState(!1),Ir=Object(E.a)(ba,2),ga=Ir[0],Na=Ir[1],hi=B.useState(!1),Ha=Object(E.a)(hi,2),qa=Ha[0],xi=Ha[1],fi=ue(new Map),ui=Object(E.a)(fi,2),pi=ui[0],bi=ui[1],ai=Object(_.a)(Xn),Hi=ai.map(function(ti){return pi.get(ti)}),Yi=B.useMemo(function(){return Hi},[Hi.join("_")]),Zr=me(Yi,Xn.length,Se),sa=ke&&Object(_.d)(ke.y),Mr=ke&&Object(_.d)(ke.x),la=Mr&&Xn.some(function(ti){var wa=ti.fixed;return wa}),Yr=B.useRef(),ri=$e(Te,yt),ha=ri.isSticky,mo=ri.offsetHeader,Ii=ri.offsetScroll,ci=ri.stickyClassName,Wo,Lo,ii;sa&&(Lo={overflowY:"scroll",maxHeight:ke.y}),Mr&&(Wo={overflowX:"auto"},sa||(Lo={overflowY:"hidden"}),ii={width:ke.x===!0?"auto":ke.x,minWidth:"100%"});var go=B.useCallback(function(ti,wa){bi(function(Sa){var Eo=new Map(Sa);return Eo.set(ti,wa),Eo})},[]),no=fe(null),As=Object(E.a)(no,2),xo=As[0],Cs=As[1];function ws(ti,wa){if(!wa)return;typeof wa=="function"?wa(ti):wa.scrollLeft!==ti&&(wa.scrollLeft=ti)}var Ao=function(wa){var Sa=wa.currentTarget,Eo=wa.scrollLeft,xs=typeof Eo=="number"?Eo:Sa.scrollLeft,Ts=Sa||wt;if(!Cs()||Cs()===Ts){var Xs;xo(Ts),ws(xs,$r.current),ws(xs,Hr.current),ws(xs,(Xs=Yr.current)===null||Xs===void 0?void 0:Xs.setScrollLeft)}if(Sa){var Ys=Sa.scrollWidth,il=Sa.clientWidth;Na(xs>0),xi(xs * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License */(function(q,K){Ie.exports=K()})(this,function(){"use strict";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var q=function(X,W){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Y){J.__proto__=Y}||function(J,Y){for(var de in Y)Object.prototype.hasOwnProperty.call(Y,de)&&(J[de]=Y[de])},q(X,W)};function K(X,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");q(X,W);function J(){this.constructor=X}X.prototype=W===null?Object.create(W):(J.prototype=W.prototype,new J)}var I=function(){return I=Object.assign||function(W){for(var J,Y=1,de=arguments.length;Y0&&Ee[Ee.length-1])&&(Rt[0]===6||Rt[0]===2)){J=0;continue}if(Rt[0]===3&&(!Ee||Rt[1]>Ee[0]&&Rt[1]=55296&&de<=56319&&J>10)+55296,Pe%1024+56320)),(de+1===J||Y.length>16384)&&(Ee+=String.fromCharCode.apply(String,Y),Y.length=0)}return Ee},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s>4,kt[de++]=(Pe&15)<<4|it>>2,kt[de++]=(it&3)<<6|rt&63;return Rt},l=function(X){for(var W=X.length,J=[],Y=0;Y>_,g=1<<_,i=g-1,u=1024>>_,f=b+u,y=f,h=2048>>6,v=y+h,P=65536>>R,N=1<=0){if(W<55296||W>56319&&W<=65535)return J=this.index[W>>_],J=(J<>_)],J=(J<>R),J=this.index[J],J+=W>>_&Q,J=this.index[J],J=(J<he?(de.push(!0),it-=he):de.push(!1),["normal","auto","loose"].indexOf(W)!==-1&&[8208,8211,12316,12448].indexOf(Ee)!==-1)return Y.push(Pe),J.push(We);if(it===ue||it===De){if(Pe===0)return Y.push(Pe),J.push(Ot);var rt=J[Pe-1];return Ht.indexOf(rt)===-1?(Y.push(Y[Pe-1]),J.push(rt)):(Y.push(Pe),J.push(Ot))}if(Y.push(Pe),it===Ye)return J.push(W==="strict"?It:He);if(it===Jt)return J.push(Ot);if(it===at)return J.push(Ot);if(it===Ct)return Ee>=131072&&Ee<=196605||Ee>=196608&&Ee<=262141?J.push(He):J.push(Ot);J.push(it)}),[Y,J,de]},gn=function(X,W,J,Y){var de=Y[J];if(Array.isArray(X)?X.indexOf(de)!==-1:X===de)for(var Ee=J;Ee<=Y.length;){Ee++;var Pe=Y[Ee];if(Pe===W)return!0;if(Pe!==pe)break}if(de===pe)for(var Ee=J;Ee>0;){Ee--;var it=Y[Ee];if(Array.isArray(X)?X.indexOf(it)!==-1:X===it)for(var rt=J;rt<=Y.length;){rt++;var Pe=Y[rt];if(Pe===W)return!0;if(Pe!==pe)break}if(it!==pe)break}return!1},Tn=function(X,W){for(var J=X;J>=0;){var Y=W[J];if(Y===pe)J--;else return Y}return 0},Gr=function(X,W,J,Y,de){if(J[Y]===0)return Xe;var Ee=Y-1;if(Array.isArray(de)&&de[Ee]===!0)return Xe;var Pe=Ee-1,it=Ee+1,rt=W[Ee],Rt=Pe>=0?W[Pe]:0,kt=W[it];if(rt===ae&&kt===ve)return Xe;if(xt.indexOf(rt)!==-1)return pt;if(xt.indexOf(kt)!==-1)return Xe;if(vt.indexOf(kt)!==-1)return Xe;if(Tn(Ee,W)===me)return Fe;if(Te.get(X[Ee])===De)return Xe;if((rt===Ue||rt===ke)&&Te.get(X[it])===De)return Xe;if(rt===se||kt===se)return Xe;if(rt===re)return Xe;if([pe,je,Le].indexOf(rt)===-1&&kt===re)return Xe;if([Ze,$e,bt,zt,St].indexOf(kt)!==-1)return Xe;if(Tn(Ee,W)===ft)return Xe;if(gn(Ft,ft,Ee,W))return Xe;if(gn([Ze,$e],It,Ee,W))return Xe;if(gn(we,we,Ee,W))return Xe;if(rt===pe)return Fe;if(rt===Ft||kt===Ft)return Xe;if(kt===We||rt===We)return Fe;if([je,Le,It].indexOf(kt)!==-1||rt===et)return Xe;if(Rt===Me&&Mt.indexOf(rt)!==-1)return Xe;if(rt===St&&kt===Me)return Xe;if(kt===wt)return Xe;if(Ne.indexOf(kt)!==-1&&rt===Qe||Ne.indexOf(rt)!==-1&&kt===Qe)return Xe;if(rt===yt&&[He,Ue,ke].indexOf(kt)!==-1||[He,Ue,ke].indexOf(rt)!==-1&&kt===ze)return Xe;if(Ne.indexOf(rt)!==-1&&Dt.indexOf(kt)!==-1||Dt.indexOf(rt)!==-1&&Ne.indexOf(kt)!==-1)return Xe;if([yt,ze].indexOf(rt)!==-1&&(kt===Qe||[ft,Le].indexOf(kt)!==-1&&W[it+1]===Qe)||[ft,Le].indexOf(rt)!==-1&&kt===Qe||rt===Qe&&[Qe,St,zt].indexOf(kt)!==-1)return Xe;if([Qe,St,zt,Ze,$e].indexOf(kt)!==-1)for(var nn=Ee;nn>=0;){var un=W[nn];if(un===Qe)return Xe;if([St,zt].indexOf(un)!==-1)nn--;else break}if([yt,ze].indexOf(kt)!==-1)for(var nn=[Ze,$e].indexOf(rt)!==-1?Pe:Ee;nn>=0;){var un=W[nn];if(un===Qe)return Xe;if([St,zt].indexOf(un)!==-1)nn--;else break}if(Ge===rt&&[Ge,mt,Ce,Se].indexOf(kt)!==-1||[mt,Ce].indexOf(rt)!==-1&&[mt,Lt].indexOf(kt)!==-1||[Lt,Se].indexOf(rt)!==-1&&kt===Lt)return Xe;if(ct.indexOf(rt)!==-1&&[wt,ze].indexOf(kt)!==-1||ct.indexOf(kt)!==-1&&rt===yt)return Xe;if(Ne.indexOf(rt)!==-1&&Ne.indexOf(kt)!==-1)return Xe;if(rt===zt&&Ne.indexOf(kt)!==-1)return Xe;if(Ne.concat(Qe).indexOf(rt)!==-1&&kt===ft&&Et.indexOf(X[it])===-1||Ne.concat(Qe).indexOf(kt)!==-1&&rt===$e)return Xe;if(rt===en&&kt===en){for(var Tr=J[Ee],Qn=1;Tr>0&&(Tr--,W[Tr]===en);)Qn++;if(Qn%2!==0)return Xe}return rt===Ue&&kt===ke?Xe:Fe},Vr=function(X,W){W||(W={lineBreak:"normal",wordBreak:"normal"});var J=Gt(X,W.lineBreak),Y=J[0],de=J[1],Ee=J[2];(W.wordBreak==="break-all"||W.wordBreak==="break-word")&&(de=de.map(function(it){return[Qe,Ot,Jt].indexOf(it)!==-1?He:it}));var Pe=W.wordBreak==="keep-all"?Ee.map(function(it,rt){return it&&X[rt]>=19968&&X[rt]<=40959}):void 0;return[Y,de,Pe]},Kr=function(){function X(W,J,Y,de){this.codePoints=W,this.required=J===pt,this.start=Y,this.end=de}return X.prototype.slice=function(){return r.apply(void 0,this.codePoints.slice(this.start,this.end))},X}(),kn=function(X,W){var J=p(X),Y=Vr(J,W),de=Y[0],Ee=Y[1],Pe=Y[2],it=J.length,rt=0,Rt=0;return{next:function(){if(Rt>=it)return{done:!0,value:null};for(var kt=Xe;Rt=sa&&X<=57},go=function(X){return X>=55296&&X<=57343},no=function(X){return ii(X)||X>=mo&&X<=ci||X>=Mr&&X<=Yr},As=function(X){return X>=Mr&&X<=ha},xo=function(X){return X>=mo&&X<=Lo},Cs=function(X){return As(X)||xo(X)},ws=function(X){return X>=Ir},Ao=function(X){return X===Ja||X===_e||X===Be},hs=function(X){return Cs(X)||ws(X)||X===ge},mr=function(X){return hs(X)||ii(X)||X===ie},Wr=function(X){return X>=ui&&X<=pi||X===bi||X>=ai&&X<=Hi||X===Yi},ur=function(X,W){return X!==ji?!1:W!==Ja},aa=function(X,W,J){return X===ie?hs(W)||ur(W,J):hs(X)?!0:!!(X===ji&&ur(X,W))},Ea=function(X,W,J){return X===hi||X===ie?ii(W)?!0:W===fi&&ii(J):X===fi?ii(W):ii(X)},ei=function(X){var W=0,J=1;(X[W]===hi||X[W]===ie)&&(X[W]===ie&&(J=-1),W++);for(var Y=[];ii(X[W]);)Y.push(X[W++]);var de=Y.length?parseInt(r.apply(void 0,Y),10):0;X[W]===fi&&W++;for(var Ee=[];ii(X[W]);)Ee.push(X[W++]);var Pe=Ee.length,it=Pe?parseInt(r.apply(void 0,Ee),10):0;(X[W]===Ii||X[W]===la)&&W++;var rt=1;(X[W]===hi||X[W]===ie)&&(X[W]===ie&&(rt=-1),W++);for(var Rt=[];ii(X[W]);)Rt.push(X[W++]);var kt=Rt.length?parseInt(r.apply(void 0,Rt),10):0;return J*(de+it*Math.pow(10,-Pe))*Math.pow(10,rt*kt)},Ta={type:2},Ui={type:3},Ia={type:4},_a={type:13},Po={type:8},Za={type:21},ro={type:9},so={type:10},To={type:11},Vs={type:12},ti={type:14},wa={type:23},Sa={type:1},Eo={type:25},xs={type:24},Ts={type:26},Xs={type:27},Ys={type:28},il={type:29},ml={type:31},Js={type:32},Ps=function(){function X(){this._value=[]}return X.prototype.write=function(W){this._value=this._value.concat(p(W))},X.prototype.read=function(){for(var W=[],J=this.consumeToken();J!==Js;)W.push(J),J=this.consumeToken();return W},X.prototype.consumeToken=function(){var W=this.consumeCodePoint();switch(W){case Ve:return this.consumeStringToken(Ve);case Xt:var J=this.peekCodePoint(0),Y=this.peekCodePoint(1),de=this.peekCodePoint(2);if(mr(J)||ur(Y,de)){var Ee=aa(J,Y,de)?Ya:Ua,Pe=this.consumeName();return{type:5,value:Pe,flags:Ee}}break;case sn:if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),_a;break;case H:return this.consumeStringToken(H);case V:return Ta;case ee:return Ui;case Na:if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),ti;break;case hi:if(Ea(W,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(W),this.consumeNumericToken();break;case Ha:return Ia;case ie:var it=W,rt=this.peekCodePoint(0),Rt=this.peekCodePoint(1);if(Ea(it,rt,Rt))return this.reconsumeCodePoint(W),this.consumeNumericToken();if(aa(it,rt,Rt))return this.reconsumeCodePoint(W),this.consumeIdentLikeToken();if(rt===ie&&Rt===dn)return this.consumeCodePoint(),this.consumeCodePoint(),xs;break;case fi:if(Ea(W,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(W),this.consumeNumericToken();break;case Ri:if(this.peekCodePoint(0)===Na)for(this.consumeCodePoint();;){var kt=this.consumeCodePoint();if(kt===Na&&(kt=this.consumeCodePoint(),kt===Ri))return this.consumeToken();if(kt===Zr)return this.consumeToken()}break;case qa:return Ts;case xi:return Xs;case Qt:if(this.peekCodePoint(0)===tt&&this.peekCodePoint(1)===ie&&this.peekCodePoint(2)===ie)return this.consumeCodePoint(),this.consumeCodePoint(),Eo;break;case _n:var nn=this.peekCodePoint(0),un=this.peekCodePoint(1),Tr=this.peekCodePoint(2);if(aa(nn,un,Tr)){var Pe=this.consumeName();return{type:7,value:Pe}}break;case Zt:return Ys;case ji:if(ur(W,this.peekCodePoint(0)))return this.reconsumeCodePoint(W),this.consumeIdentLikeToken();break;case Vn:return il;case Xn:if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),Po;break;case lr:return To;case $r:return Vs;case ri:case Wo:var Qn=this.peekCodePoint(0),hr=this.peekCodePoint(1);return Qn===hi&&(no(hr)||hr===Or)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(W),this.consumeIdentLikeToken();case Hr:if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),ro;if(this.peekCodePoint(0)===Hr)return this.consumeCodePoint(),Za;break;case ba:if(this.peekCodePoint(0)===gt)return this.consumeCodePoint(),so;break;case Zr:return Js}return Ao(W)?(this.consumeWhiteSpace(),ml):ii(W)?(this.reconsumeCodePoint(W),this.consumeNumericToken()):hs(W)?(this.reconsumeCodePoint(W),this.consumeIdentLikeToken()):{type:6,value:r(W)}},X.prototype.consumeCodePoint=function(){var W=this._value.shift();return typeof W=="undefined"?-1:W},X.prototype.reconsumeCodePoint=function(W){this._value.unshift(W)},X.prototype.peekCodePoint=function(W){return W>=this._value.length?-1:this._value[W]},X.prototype.consumeUnicodeRangeToken=function(){for(var W=[],J=this.consumeCodePoint();no(J)&&W.length<6;)W.push(J),J=this.consumeCodePoint();for(var Y=!1;J===Or&&W.length<6;)W.push(J),J=this.consumeCodePoint(),Y=!0;if(Y){var de=parseInt(r.apply(void 0,W.map(function(rt){return rt===Or?sa:rt})),16),Ee=parseInt(r.apply(void 0,W.map(function(rt){return rt===Or?ci:rt})),16);return{type:30,start:de,end:Ee}}var Pe=parseInt(r.apply(void 0,W),16);if(this.peekCodePoint(0)===ie&&no(this.peekCodePoint(1))){this.consumeCodePoint(),J=this.consumeCodePoint();for(var it=[];no(J)&&it.length<6;)it.push(J),J=this.consumeCodePoint();var Ee=parseInt(r.apply(void 0,it),16);return{type:30,start:Pe,end:Ee}}else return{type:30,start:Pe,end:Pe}},X.prototype.consumeIdentLikeToken=function(){var W=this.consumeName();return W.toLowerCase()==="url"&&this.peekCodePoint(0)===V?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===V?(this.consumeCodePoint(),{type:19,value:W}):{type:20,value:W}},X.prototype.consumeUrlToken=function(){var W=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Zr)return{type:22,value:""};var J=this.peekCodePoint(0);if(J===H||J===Ve){var Y=this.consumeStringToken(this.consumeCodePoint());return Y.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Zr||this.peekCodePoint(0)===ee)?(this.consumeCodePoint(),{type:22,value:Y.value}):(this.consumeBadUrlRemnants(),wa)}for(;;){var de=this.consumeCodePoint();if(de===Zr||de===ee)return{type:22,value:r.apply(void 0,W)};if(Ao(de))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Zr||this.peekCodePoint(0)===ee?(this.consumeCodePoint(),{type:22,value:r.apply(void 0,W)}):(this.consumeBadUrlRemnants(),wa);if(de===Ve||de===H||de===V||Wr(de))return this.consumeBadUrlRemnants(),wa;if(de===ji)if(ur(de,this.peekCodePoint(0)))W.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),wa;else W.push(de)}},X.prototype.consumeWhiteSpace=function(){for(;Ao(this.peekCodePoint(0));)this.consumeCodePoint()},X.prototype.consumeBadUrlRemnants=function(){for(;;){var W=this.consumeCodePoint();if(W===ee||W===Zr)return;ur(W,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},X.prototype.consumeStringSlice=function(W){for(var J=5e4,Y="";W>0;){var de=Math.min(J,W);Y+=r.apply(void 0,this._value.splice(0,de)),W-=de}return this._value.shift(),Y},X.prototype.consumeStringToken=function(W){var J="",Y=0;do{var de=this._value[Y];if(de===Zr||de===void 0||de===W)return J+=this.consumeStringSlice(Y),{type:0,value:J};if(de===Ja)return this._value.splice(0,Y),Sa;if(de===ji){var Ee=this._value[Y+1];Ee!==Zr&&Ee!==void 0&&(Ee===Ja?(J+=this.consumeStringSlice(Y),Y=-1,this._value.shift()):ur(de,Ee)&&(J+=this.consumeStringSlice(Y),J+=r(this.consumeEscapedCodePoint()),Y=-1))}Y++}while(!0)},X.prototype.consumeNumber=function(){var W=[],J=Ra,Y=this.peekCodePoint(0);for((Y===hi||Y===ie)&&W.push(this.consumeCodePoint());ii(this.peekCodePoint(0));)W.push(this.consumeCodePoint());Y=this.peekCodePoint(0);var de=this.peekCodePoint(1);if(Y===fi&&ii(de))for(W.push(this.consumeCodePoint(),this.consumeCodePoint()),J=Xr;ii(this.peekCodePoint(0));)W.push(this.consumeCodePoint());Y=this.peekCodePoint(0),de=this.peekCodePoint(1);var Ee=this.peekCodePoint(2);if((Y===Ii||Y===la)&&((de===hi||de===ie)&&ii(Ee)||ii(de)))for(W.push(this.consumeCodePoint(),this.consumeCodePoint()),J=Xr;ii(this.peekCodePoint(0));)W.push(this.consumeCodePoint());return[ei(W),J]},X.prototype.consumeNumericToken=function(){var W=this.consumeNumber(),J=W[0],Y=W[1],de=this.peekCodePoint(0),Ee=this.peekCodePoint(1),Pe=this.peekCodePoint(2);if(aa(de,Ee,Pe)){var it=this.consumeName();return{type:15,number:J,flags:Y,unit:it}}return de===ne?(this.consumeCodePoint(),{type:16,number:J,flags:Y}):{type:17,number:J,flags:Y}},X.prototype.consumeEscapedCodePoint=function(){var W=this.consumeCodePoint();if(no(W)){for(var J=r(W);no(this.peekCodePoint(0))&&J.length<6;)J+=r(this.consumeCodePoint());Ao(this.peekCodePoint(0))&&this.consumeCodePoint();var Y=parseInt(J,16);return Y===0||go(Y)||Y>1114111?ga:Y}return W===Zr?ga:W},X.prototype.consumeName=function(){for(var W="";;){var J=this.consumeCodePoint();if(mr(J))W+=r(J);else if(ur(J,this.peekCodePoint(0)))W+=r(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(J),W}},X}(),gl=function(){function X(W){this._tokens=W}return X.create=function(W){var J=new Ps;return J.write(W),new X(J.read())},X.parseValue=function(W){return X.create(W).parseComponentValue()},X.parseValues=function(W){return X.create(W).parseComponentValues()},X.prototype.parseComponentValue=function(){for(var W=this.consumeToken();W.type===31;)W=this.consumeToken();if(W.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(W);var J=this.consumeComponentValue();do W=this.consumeToken();while(W.type===31);if(W.type===32)return J;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},X.prototype.parseComponentValues=function(){for(var W=[];;){var J=this.consumeComponentValue();if(J.type===32)return W;W.push(J),W.push()}},X.prototype.consumeComponentValue=function(){var W=this.consumeToken();switch(W.type){case 11:case 28:case 2:return this.consumeSimpleBlock(W.type);case 19:return this.consumeFunction(W)}return W},X.prototype.consumeSimpleBlock=function(W){for(var J={type:W,values:[]},Y=this.consumeToken();;){if(Y.type===32||_t(Y,W))return J;this.reconsumeToken(Y),J.values.push(this.consumeComponentValue()),Y=this.consumeToken()}},X.prototype.consumeFunction=function(W){for(var J={name:W.value,values:[],type:18};;){var Y=this.consumeToken();if(Y.type===32||Y.type===3)return J;this.reconsumeToken(Y),J.values.push(this.consumeComponentValue())}},X.prototype.consumeToken=function(){var W=this._tokens.shift();return typeof W=="undefined"?Js:W},X.prototype.reconsumeToken=function(W){this._tokens.unshift(W)},X}(),Us=function(X){return X.type===15},Ns=function(X){return X.type===17},mi=function(X){return X.type===20},Hs=function(X){return X.type===0},$o=function(X,W){return mi(X)&&X.value===W},ol=function(X){return X.type!==31},Je=function(X){return X.type!==31&&X.type!==4},ht=function(X){var W=[],J=[];return X.forEach(function(Y){if(Y.type===4){if(J.length===0)throw new Error("Error parsing function args, zero tokens for arg");W.push(J),J=[];return}Y.type!==31&&J.push(Y)}),J.length&&W.push(J),W},_t=function(X,W){return W===11&&X.type===12||W===28&&X.type===29?!0:W===2&&X.type===3},nt=function(X){return X.type===17||X.type===15},xe=function(X){return X.type===16||nt(X)},Ke=function(X){return X.length>1?[X[0],X[1]]:[X[0]]},Oe={type:17,number:0,flags:Ra},ot={type:16,number:50,flags:Ra},lt={type:16,number:100,flags:Ra},Tt=function(X,W,J){var Y=X[0],de=X[1];return[dt(Y,W),dt(typeof de!="undefined"?de:Y,J)]},dt=function(X,W){if(X.type===16)return X.number/100*W;if(Us(X))switch(X.unit){case"rem":case"em":return 16*X.number;case"px":default:return X.number}return X.number},Pt="deg",tn="grad",ut="rad",qe="turn",Bt={name:"angle",parse:function(X,W){if(W.type===15)switch(W.unit){case Pt:return Math.PI*W.number/180;case tn:return Math.PI/200*W.number;case ut:return W.number;case qe:return Math.PI*2*W.number}throw new Error("Unsupported angle type")}},$t=function(X){return X.type===15&&(X.unit===Pt||X.unit===tn||X.unit===ut||X.unit===qe)},cn=function(X){var W=X.filter(mi).map(function(J){return J.value}).join(" ");switch(W){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Oe,Oe];case"to top":case"bottom":return Kt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Oe,lt];case"to right":case"left":return Kt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[lt,lt];case"to bottom":case"top":return Kt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[lt,Oe];case"to left":case"right":return Kt(270)}return 0},Kt=function(X){return Math.PI*X/180},En={name:"color",parse:function(X,W){if(W.type===18){var J=Cn[W.name];if(typeof J=="undefined")throw new Error('Attempting to parse an unsupported color function "'+W.name+'"');return J(X,W.values)}if(W.type===5){if(W.value.length===3){var Y=W.value.substring(0,1),de=W.value.substring(1,2),Ee=W.value.substring(2,3);return hn(parseInt(Y+Y,16),parseInt(de+de,16),parseInt(Ee+Ee,16),1)}if(W.value.length===4){var Y=W.value.substring(0,1),de=W.value.substring(1,2),Ee=W.value.substring(2,3),Pe=W.value.substring(3,4);return hn(parseInt(Y+Y,16),parseInt(de+de,16),parseInt(Ee+Ee,16),parseInt(Pe+Pe,16)/255)}if(W.value.length===6){var Y=W.value.substring(0,2),de=W.value.substring(2,4),Ee=W.value.substring(4,6);return hn(parseInt(Y,16),parseInt(de,16),parseInt(Ee,16),1)}if(W.value.length===8){var Y=W.value.substring(0,2),de=W.value.substring(2,4),Ee=W.value.substring(4,6),Pe=W.value.substring(6,8);return hn(parseInt(Y,16),parseInt(de,16),parseInt(Ee,16),parseInt(Pe,16)/255)}}if(W.type===20){var it=wn[W.value.toUpperCase()];if(typeof it!="undefined")return it}return wn.TRANSPARENT}},rn=function(X){return(255&X)===0},jt=function(X){var W=255&X,J=255&X>>8,Y=255&X>>16,de=255&X>>24;return W<255?"rgba("+de+","+Y+","+J+","+W/255+")":"rgb("+de+","+Y+","+J+")"},hn=function(X,W,J,Y){return(X<<24|W<<16|J<<8|Math.round(Y*255)<<0)>>>0},qt=function(X,W){if(X.type===17)return X.number;if(X.type===16){var J=W===3?1:255;return W===3?X.number/100*J:Math.round(X.number/100*J)}return 0},bn=function(X,W){var J=W.filter(Je);if(J.length===3){var Y=J.map(qt),de=Y[0],Ee=Y[1],Pe=Y[2];return hn(de,Ee,Pe,1)}if(J.length===4){var it=J.map(qt),de=it[0],Ee=it[1],Pe=it[2],rt=it[3];return hn(de,Ee,Pe,rt)}return 0};function Fn(X,W,J){return J<0&&(J+=1),J>=1&&(J-=1),J<1/6?(W-X)*J*6+X:J<1/2?W:J<2/3?(W-X)*6*(2/3-J)+X:X}var Yt=function(X,W){var J=W.filter(Je),Y=J[0],de=J[1],Ee=J[2],Pe=J[3],it=(Y.type===17?Kt(Y.number):Bt.parse(X,Y))/(Math.PI*2),rt=xe(de)?de.number/100:0,Rt=xe(Ee)?Ee.number/100:0,kt=typeof Pe!="undefined"&&xe(Pe)?dt(Pe,1):1;if(rt===0)return hn(Rt*255,Rt*255,Rt*255,1);var nn=Rt<=.5?Rt*(rt+1):Rt+rt-Rt*rt,un=Rt*2-nn,Tr=Fn(un,nn,it+1/3),Qn=Fn(un,nn,it),hr=Fn(un,nn,it-1/3);return hn(Tr*255,Qn*255,hr*255,kt)},Cn={hsl:Yt,hsla:Yt,rgb:bn,rgba:bn},ln=function(X,W){return En.parse(X,gl.create(W).parseComponentValue())},wn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},an={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(X,W){return W.map(function(J){if(mi(J))switch(J.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Vt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Sn=function(X,W){var J=En.parse(X,W[0]),Y=W[1];return Y&&xe(Y)?{color:J,stop:Y}:{color:J,stop:null}},Ar=function(X,W){var J=X[0],Y=X[X.length-1];J.stop===null&&(J.stop=Oe),Y.stop===null&&(Y.stop=lt);for(var de=[],Ee=0,Pe=0;PeEe?de.push(rt):de.push(Ee),Ee=rt}else de.push(null)}for(var Rt=null,Pe=0;PePe.optimumDistance)?{optimumCorner:it,optimumDistance:kt}:Pe},{optimumDistance:de?Infinity:-Infinity,optimumCorner:null}).optimumCorner},vn=function(X,W,J,Y,de){var Ee=0,Pe=0;switch(X.size){case 0:X.shape===0?Ee=Pe=Math.min(Math.abs(W),Math.abs(W-Y),Math.abs(J),Math.abs(J-de)):X.shape===1&&(Ee=Math.min(Math.abs(W),Math.abs(W-Y)),Pe=Math.min(Math.abs(J),Math.abs(J-de)));break;case 2:if(X.shape===0)Ee=Pe=Math.min(Un(W,J),Un(W,J-de),Un(W-Y,J),Un(W-Y,J-de));else if(X.shape===1){var it=Math.min(Math.abs(J),Math.abs(J-de))/Math.min(Math.abs(W),Math.abs(W-Y)),rt=Gn(Y,de,W,J,!0),Rt=rt[0],kt=rt[1];Ee=Un(Rt-W,(kt-J)/it),Pe=it*Ee}break;case 1:X.shape===0?Ee=Pe=Math.max(Math.abs(W),Math.abs(W-Y),Math.abs(J),Math.abs(J-de)):X.shape===1&&(Ee=Math.max(Math.abs(W),Math.abs(W-Y)),Pe=Math.max(Math.abs(J),Math.abs(J-de)));break;case 3:if(X.shape===0)Ee=Pe=Math.max(Un(W,J),Un(W,J-de),Un(W-Y,J),Un(W-Y,J-de));else if(X.shape===1){var it=Math.max(Math.abs(J),Math.abs(J-de))/Math.max(Math.abs(W),Math.abs(W-Y)),nn=Gn(Y,de,W,J,!1),Rt=nn[0],kt=nn[1];Ee=Un(Rt-W,(kt-J)/it),Pe=it*Ee}break}return Array.isArray(X.size)&&(Ee=dt(X.size[0],Y),Pe=X.size.length===2?dt(X.size[1],de):Ee),[Ee,Pe]},Kn=function(X,W){var J=Kt(180),Y=[];return ht(W).forEach(function(de,Ee){if(Ee===0){var Pe=de[0];if(Pe.type===20&&Pe.value==="to"){J=cn(de);return}else if($t(Pe)){J=Bt.parse(X,Pe);return}}var it=Sn(X,de);Y.push(it)}),{angle:J,stops:Y,type:1}},or=function(X,W){var J=Kt(180),Y=[];return ht(W).forEach(function(de,Ee){if(Ee===0){var Pe=de[0];if(Pe.type===20&&["top","left","right","bottom"].indexOf(Pe.value)!==-1){J=cn(de);return}else if($t(Pe)){J=(Bt.parse(X,Pe)+Kt(270))%Kt(360);return}}var it=Sn(X,de);Y.push(it)}),{angle:J,stops:Y,type:1}},gr=function(X,W){var J=Kt(180),Y=[],de=1,Ee=0,Pe=3,it=[];return ht(W).forEach(function(rt,Rt){var kt=rt[0];if(Rt===0){if(mi(kt)&&kt.value==="linear"){de=1;return}else if(mi(kt)&&kt.value==="radial"){de=2;return}}if(kt.type===18){if(kt.name==="from"){var nn=En.parse(X,kt.values[0]);Y.push({stop:Oe,color:nn})}else if(kt.name==="to"){var nn=En.parse(X,kt.values[0]);Y.push({stop:lt,color:nn})}else if(kt.name==="color-stop"){var un=kt.values.filter(Je);if(un.length===2){var nn=En.parse(X,un[1]),Tr=un[0];Ns(Tr)&&Y.push({stop:{type:16,number:Tr.number*100,flags:Tr.flags},color:nn})}}}}),de===1?{angle:(J+Kt(180))%Kt(360),stops:Y,type:de}:{size:Pe,shape:Ee,stops:Y,position:it,type:de}},Lr="closest-side",er="farthest-side",rr="closest-corner",Dr="farthest-corner",Er="circle",_r="ellipse",ia="cover",ea="contain",tr=function(X,W){var J=0,Y=3,de=[],Ee=[];return ht(W).forEach(function(Pe,it){var rt=!0;if(it===0){var Rt=!1;rt=Pe.reduce(function(nn,un){if(Rt)if(mi(un))switch(un.value){case"center":return Ee.push(ot),nn;case"top":case"left":return Ee.push(Oe),nn;case"right":case"bottom":return Ee.push(lt),nn}else(xe(un)||nt(un))&&Ee.push(un);else if(mi(un))switch(un.value){case Er:return J=0,!1;case _r:return J=1,!1;case"at":return Rt=!0,!1;case Lr:return Y=0,!1;case ia:case er:return Y=1,!1;case ea:case rr:return Y=2,!1;case Dr:return Y=3,!1}else if(nt(un)||xe(un))return Array.isArray(Y)||(Y=[]),Y.push(un),!1;return nn},rt)}if(rt){var kt=Sn(X,Pe);de.push(kt)}}),{size:Y,shape:J,stops:de,position:Ee,type:2}},vr=function(X,W){var J=0,Y=3,de=[],Ee=[];return ht(W).forEach(function(Pe,it){var rt=!0;if(it===0?rt=Pe.reduce(function(kt,nn){if(mi(nn))switch(nn.value){case"center":return Ee.push(ot),!1;case"top":case"left":return Ee.push(Oe),!1;case"right":case"bottom":return Ee.push(lt),!1}else if(xe(nn)||nt(nn))return Ee.push(nn),!1;return kt},rt):it===1&&(rt=Pe.reduce(function(kt,nn){if(mi(nn))switch(nn.value){case Er:return J=0,!1;case _r:return J=1,!1;case ea:case Lr:return Y=0,!1;case er:return Y=1,!1;case rr:return Y=2,!1;case ia:case Dr:return Y=3,!1}else if(nt(nn)||xe(nn))return Array.isArray(Y)||(Y=[]),Y.push(nn),!1;return kt},rt)),rt){var Rt=Sn(X,Pe);de.push(Rt)}}),{size:Y,shape:J,stops:de,position:Ee,type:2}},ka=function(X){return X.type===1},ra=function(X){return X.type===2},Yn={name:"image",parse:function(X,W){if(W.type===22){var J={url:W.value,type:0};return X.cache.addImage(W.value),J}if(W.type===18){var Y=yr[W.name];if(typeof Y=="undefined")throw new Error('Attempting to parse an unsupported image function "'+W.name+'"');return Y(X,W.values)}throw new Error("Unsupported image type "+W.type)}};function mn(X){return!(X.type===20&&X.value==="none")&&(X.type!==18||!!yr[X.name])}var yr={"linear-gradient":Kn,"-moz-linear-gradient":or,"-ms-linear-gradient":or,"-o-linear-gradient":or,"-webkit-linear-gradient":or,"radial-gradient":tr,"-moz-radial-gradient":vr,"-ms-radial-gradient":vr,"-o-radial-gradient":vr,"-webkit-radial-gradient":vr,"-webkit-gradient":gr},oi={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(X,W){if(W.length===0)return[];var J=W[0];return J.type===20&&J.value==="none"?[]:W.filter(function(Y){return Je(Y)&&mn(Y)}).map(function(Y){return Yn.parse(X,Y)})}},Cr={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(X,W){return W.map(function(J){if(mi(J))switch(J.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Rr={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(X,W){return ht(W).map(function(J){return J.filter(xe)}).map(Ke)}},fr={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(X,W){return ht(W).map(function(J){return J.filter(mi).map(function(Y){return Y.value}).join(" ")}).map(ar)}},ar=function(X){switch(X){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Mn;(function(X){X.AUTO="auto",X.CONTAIN="contain",X.COVER="cover"})(Mn||(Mn={}));var Ln={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(X,W){return ht(W).map(function(J){return J.filter(pn)})}},pn=function(X){return mi(X)||xe(X)},qn=function(X){return{name:"border-"+X+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ta=qn("top"),cr=qn("right"),Nr=qn("bottom"),Da=qn("left"),ua=function(X){return{name:"border-radius-"+X,initialValue:"0 0",prefix:!1,type:1,parse:function(W,J){return Ke(J.filter(xe))}}},va=ua("top-left"),ca=ua("top-right"),Ca=ua("bottom-right"),Oa=ua("bottom-left"),Ma=function(X){return{name:"border-"+X+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(W,J){switch(J){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Fr=Ma("top"),Qa=Ma("right"),ya=Ma("bottom"),Ka=Ma("left"),di=function(X){return{name:"border-"+X+"-width",initialValue:"0",type:0,prefix:!1,parse:function(W,J){return Us(J)?J.number:0}}},Ji=di("top"),Di=di("right"),Ei=di("bottom"),Uo=di("left"),ho={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},_o={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(X,W){switch(W){case"rtl":return 1;case"ltr":default:return 0}}},as={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(X,W){return W.filter(mi).reduce(function(J,Y){return J|fs(Y.value)},0)}},fs=function(X){switch(X){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},is={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(X,W){switch(W){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},os={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(X,W){return W.type===20&&W.value==="normal"?0:W.type===17||W.type===15?W.number:0}},So;(function(X){X.NORMAL="normal",X.STRICT="strict"})(So||(So={}));var ps={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(X,W){switch(W){case"strict":return So.STRICT;case"normal":default:return So.NORMAL}}},Qi={name:"line-height",initialValue:"normal",prefix:!1,type:4},da=function(X,W){return mi(X)&&X.value==="normal"?1.2*W:X.type===17?W*X.number:xe(X)?dt(X,W):W},_i={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(X,W){return W.type===20&&W.value==="none"?null:Yn.parse(X,W)}},gi={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(X,W){switch(W){case"inside":return 0;case"outside":default:return 1}}},vo={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(X,W){switch(W){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},uo=function(X){return{name:"margin-"+X,initialValue:"0",prefix:!1,type:4}},Ki=uo("top"),ss=uo("right"),ls=uo("bottom"),qo=uo("left"),fo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(X,W){return W.filter(mi).map(function(J){switch(J.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},zo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(X,W){switch(W){case"break-word":return"break-word";case"normal":default:return"normal"}}},yo=function(X){return{name:"padding-"+X,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},es=yo("top"),Go=yo("right"),xa=yo("bottom"),oa=yo("left"),Ci={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(X,W){switch(W){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Zi={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(X,W){switch(W){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Oo={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(X,W){return W.length===1&&$o(W[0],"none")?[]:ht(W).map(function(J){for(var Y={color:wn.TRANSPARENT,offsetX:Oe,offsetY:Oe,blur:Oe},de=0,Ee=0;Ee1?1:0],this.overflowWrap=Wn(W,zo,J.overflowWrap),this.paddingTop=Wn(W,es,J.paddingTop),this.paddingRight=Wn(W,Go,J.paddingRight),this.paddingBottom=Wn(W,xa,J.paddingBottom),this.paddingLeft=Wn(W,oa,J.paddingLeft),this.paintOrder=Wn(W,zr,J.paintOrder),this.position=Wn(W,Zi,J.position),this.textAlign=Wn(W,Ci,J.textAlign),this.textDecorationColor=Wn(W,ns,(Y=J.textDecorationColor)!==null&&Y!==void 0?Y:J.color),this.textDecorationLine=Wn(W,ms,(de=J.textDecorationLine)!==null&&de!==void 0?de:J.textDecoration),this.textShadow=Wn(W,Oo,J.textShadow),this.textTransform=Wn(W,co,J.textTransform),this.transform=Wn(W,No,J.transform),this.transformOrigin=Wn(W,lo,J.transformOrigin),this.visibility=Wn(W,Fa,J.visibility),this.webkitTextStrokeColor=Wn(W,Si,J.webkitTextStrokeColor),this.webkitTextStrokeWidth=Wn(W,ir,J.webkitTextStrokeWidth),this.wordBreak=Wn(W,wi,J.wordBreak),this.zIndex=Wn(W,Bo,J.zIndex)}return X.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},X.prototype.isTransparent=function(){return rn(this.backgroundColor)},X.prototype.isTransformed=function(){return this.transform!==null},X.prototype.isPositioned=function(){return this.position!==0},X.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},X.prototype.isFloating=function(){return this.float!==0},X.prototype.isInlineLevel=function(){return Wt(this.display,4)||Wt(this.display,33554432)||Wt(this.display,268435456)||Wt(this.display,536870912)||Wt(this.display,67108864)||Wt(this.display,134217728)},X}(),ao=function(){function X(W,J){this.content=Wn(W,on,J.content),this.quotes=Wn(W,pr,J.quotes)}return X}(),zi=function(){function X(W,J){this.counterIncrement=Wn(W,xn,J.counterIncrement),this.counterReset=Wn(W,Hn,J.counterReset)}return X}(),Wn=function(X,W,J){var Y=new Ps,de=J!==null&&typeof J!="undefined"?J.toString():W.initialValue;Y.write(de);var Ee=new gl(Y.read());switch(W.type){case 2:var Pe=Ee.parseComponentValue();return W.parse(X,mi(Pe)?Pe.value:W.initialValue);case 0:return W.parse(X,Ee.parseComponentValue());case 1:return W.parse(X,Ee.parseComponentValues());case 4:return Ee.parseComponentValue();case 3:switch(W.format){case"angle":return Bt.parse(X,Ee.parseComponentValue());case"color":return En.parse(X,Ee.parseComponentValue());case"image":return Yn.parse(X,Ee.parseComponentValue());case"length":var it=Ee.parseComponentValue();return nt(it)?it:Oe;case"length-percentage":var rt=Ee.parseComponentValue();return xe(rt)?rt:Oe;case"time":return Ti.parse(X,Ee.parseComponentValue())}break}},ja="data-html2canvas-debug",Gi=function(X){var W=X.getAttribute(ja);switch(W){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},li=function(X,W){var J=Gi(X);return J===1||W===J},io=function(){function X(W,J){if(this.context=W,this.textNodes=[],this.elements=[],this.flags=0,li(J,3))debugger;this.styles=new si(W,window.getComputedStyle(J,null)),ru(J)&&(this.styles.animationDuration.some(function(Y){return Y>0})&&(J.style.animationDuration="0s"),this.styles.transform!==null&&(J.style.transform="none")),this.bounds=x(this.context,J),li(J,4)&&(this.flags|=16)}return X}(),Yo="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),gs=0;gs>4,kt[de++]=(Pe&15)<<4|it>>2,kt[de++]=(it&3)<<6|rt&63;return Rt},sl=function(X){for(var W=X.length,J=[],Y=0;Y>Os,Sl=1<>Os,cl=ul+rs,Qs=cl,$s=2048>>6,qs=Qs+$s,yl=65536>>Fs,Bs=1<=0){if(W<55296||W>56319&&W<=65535)return J=this.index[W>>Os],J=(J<>Os)],J=(J<>Fs),J=this.index[J],J+=W>>Os&Ol,J=this.index[J],J=(J<=55296&&de<=56319&&J>10)+55296,Pe%1024+56320)),(de+1===J||Y.length>16384)&&(Ee+=String.fromCharCode.apply(String,Y),Y.length=0)}return Ee},vi=Ks(Yo),Va="\xD7",Ro="\xF7",Ho=function(X){return vi.get(X)},el=function(X,W,J){var Y=J-2,de=W[Y],Ee=W[J-1],Pe=W[J];if(Ee===fa&&Pe===pa)return Va;if(Ee===fa||Ee===pa||Ee===La)return Ro;if(Pe===fa||Pe===pa||Pe===La)return Ro;if(Ee===$a&&[$a,ys,xr,In].indexOf(Pe)!==-1)return Va;if((Ee===xr||Ee===ys)&&(Pe===ys||Pe===Bn))return Va;if((Ee===In||Ee===Bn)&&Pe===Bn)return Va;if(Pe===Qr||Pe===Ba)return Va;if(Pe===Vi)return Va;if(Ee===jr)return Va;if(Ee===Qr&&Pe===Jn){for(;de===Ba;)de=W[--Y];if(de===Jn)return Va}if(Ee===na&&Pe===na){for(var it=0;de===na;)it++,de=W[--Y];if(it%2===0)return Va}return Ro},Io=function(X){var W=Pr(X),J=W.length,Y=0,de=0,Ee=W.map(Ho);return{next:function(){if(Y>=J)return{done:!0,value:null};for(var Pe=Va;YPe.x||kt.y>Pe.y;return Pe=kt,Rt===0?!0:nn});return X.body.removeChild(W),it},Ds=function(){return typeof new Image().crossOrigin!="undefined"},Bl=function(){return typeof new XMLHttpRequest().responseType=="string"},Cu=function(X){var W=new Image,J=X.createElement("canvas"),Y=J.getContext("2d");if(!Y)return!1;W.src="data:image/svg+xml,";try{Y.drawImage(W,0,0),J.toDataURL()}catch(de){return!1}return!0},bs=function(X){return X[0]===0&&X[1]===255&&X[2]===0&&X[3]===255},wu=function(X){var W=X.createElement("canvas"),J=100;W.width=J,W.height=J;var Y=W.getContext("2d");if(!Y)return Promise.reject(!1);Y.fillStyle="rgb(0, 255, 0)",Y.fillRect(0,0,J,J);var de=new Image,Ee=W.toDataURL();de.src=Ee;var Pe=Zl(J,J,0,0,de);return Y.fillStyle="red",Y.fillRect(0,0,J,J),cu(Pe).then(function(it){Y.drawImage(it,0,0);var rt=Y.getImageData(0,0,J,J).data;Y.fillStyle="red",Y.fillRect(0,0,J,J);var Rt=X.createElement("div");return Rt.style.backgroundImage="url("+Ee+")",Rt.style.height=J+"px",bs(rt)?cu(Zl(J,J,0,0,Rt)):Promise.reject(!1)}).then(function(it){return Y.drawImage(it,0,0),bs(Y.getImageData(0,0,J,J).data)}).catch(function(){return!1})},Zl=function(X,W,J,Y,de){var Ee="http://www.w3.org/2000/svg",Pe=document.createElementNS(Ee,"svg"),it=document.createElementNS(Ee,"foreignObject");return Pe.setAttributeNS(null,"width",X.toString()),Pe.setAttributeNS(null,"height",W.toString()),it.setAttributeNS(null,"width","100%"),it.setAttributeNS(null,"height","100%"),it.setAttributeNS(null,"x",J.toString()),it.setAttributeNS(null,"y",Y.toString()),it.setAttributeNS(null,"externalResourcesRequired","true"),Pe.appendChild(it),it.appendChild(de),Pe},cu=function(X){return new Promise(function(W,J){var Y=new Image;Y.onload=function(){return W(Y)},Y.onerror=J,Y.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(X))})},bo={get SUPPORT_RANGE_BOUNDS(){var X=cs(document);return Object.defineProperty(bo,"SUPPORT_RANGE_BOUNDS",{value:X}),X},get SUPPORT_WORD_BREAKING(){var X=bo.SUPPORT_RANGE_BOUNDS&&dl(document);return Object.defineProperty(bo,"SUPPORT_WORD_BREAKING",{value:X}),X},get SUPPORT_SVG_DRAWING(){var X=Cu(document);return Object.defineProperty(bo,"SUPPORT_SVG_DRAWING",{value:X}),X},get SUPPORT_FOREIGNOBJECT_DRAWING(){var X=typeof Array.from=="function"&&typeof window.fetch=="function"?wu(document):Promise.resolve(!1);return Object.defineProperty(bo,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:X}),X},get SUPPORT_CORS_IMAGES(){var X=Ds();return Object.defineProperty(bo,"SUPPORT_CORS_IMAGES",{value:X}),X},get SUPPORT_RESPONSE_TYPE(){var X=Bl();return Object.defineProperty(bo,"SUPPORT_RESPONSE_TYPE",{value:X}),X},get SUPPORT_CORS_XHR(){var X="withCredentials"in new XMLHttpRequest;return Object.defineProperty(bo,"SUPPORT_CORS_XHR",{value:X}),X},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var X=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(bo,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:X}),X}},Ws=function(){function X(W,J){this.text=W,this.bounds=J}return X}(),du=function(X,W,J,Y){var de=xu(W,J),Ee=[],Pe=0;return de.forEach(function(it){if(J.textDecorationLine.length||it.trim().length>0)if(bo.SUPPORT_RANGE_BOUNDS){var rt=$l(Y,Pe,it.length).getClientRects();if(rt.length>1){var Rt=hu(it),kt=0;Rt.forEach(function(un){Ee.push(new Ws(un,M.fromDOMRectList(X,$l(Y,kt+Pe,un.length).getClientRects()))),kt+=un.length})}else Ee.push(new Ws(it,M.fromDOMRectList(X,rt)))}else{var nn=Y.splitText(it.length);Ee.push(new Ws(it,Au(X,Y))),Y=nn}else bo.SUPPORT_RANGE_BOUNDS||(Y=Y.splitText(it.length));Pe+=it.length}),Ee},Au=function(X,W){var J=W.ownerDocument;if(J){var Y=J.createElement("html2canvaswrapper");Y.appendChild(W.cloneNode(!0));var de=W.parentNode;if(de){de.replaceChild(Y,W);var Ee=x(X,Y);return Y.firstChild&&de.replaceChild(Y.firstChild,Y),Ee}}return M.EMPTY},$l=function(X,W,J){var Y=X.ownerDocument;if(!Y)throw new Error("Node has no owner document");var de=Y.createRange();return de.setStart(X,W),de.setEnd(X,W+J),de},hu=function(X){if(bo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var W=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(W.segment(X)).map(function(J){return J.segment})}return Do(X)},kl=function(X,W){if(bo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var J=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(J.segment(X)).map(function(Y){return Y.segment})}return Tu(X,W)},xu=function(X,W){return W.letterSpacing!==0?hu(X):kl(X,W)},Xu=[32,160,4961,65792,65793,4153,4241],Tu=function(X,W){for(var J=kn(X,{lineBreak:W.lineBreak,wordBreak:W.overflowWrap==="break-word"?"break-word":W.wordBreak}),Y=[],de,Ee=function(){if(de.value){var Pe=de.value.slice(),it=p(Pe),rt="";it.forEach(function(Rt){Xu.indexOf(Rt)===-1?rt+=r(Rt):(rt.length&&Y.push(rt),Y.push(r(Rt)),rt="")}),rt.length&&Y.push(rt)}};!(de=J.next()).done;)Ee();return Y},ql=function(){function X(W,J,Y){this.text=Yu(J.data,Y.textTransform),this.textBounds=du(W,this.text,Y,J)}return X}(),Yu=function(X,W){switch(W){case 1:return X.toLowerCase();case 3:return X.replace(Ju,Fl);case 2:return X.toUpperCase();default:return X}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,Fl=function(X,W,J){return X.length>0?W+J.toUpperCase():X},fu=function(X){K(W,X);function W(J,Y){var de=X.call(this,J,Y)||this;return de.src=Y.currentSrc||Y.src,de.intrinsicWidth=Y.naturalWidth,de.intrinsicHeight=Y.naturalHeight,de.context.cache.addImage(de.src),de}return W}(io),pu=function(X){K(W,X);function W(J,Y){var de=X.call(this,J,Y)||this;return de.canvas=Y,de.intrinsicWidth=Y.width,de.intrinsicHeight=Y.height,de}return W}(io),Su=function(X){K(W,X);function W(J,Y){var de=X.call(this,J,Y)||this,Ee=new XMLSerializer,Pe=x(J,Y);return Y.setAttribute("width",Pe.width+"px"),Y.setAttribute("height",Pe.height+"px"),de.svg="data:image/svg+xml,"+encodeURIComponent(Ee.serializeToString(Y)),de.intrinsicWidth=Y.width.baseVal.value,de.intrinsicHeight=Y.height.baseVal.value,de.context.cache.addImage(de.svg),de}return W}(io),eu=function(X){K(W,X);function W(J,Y){var de=X.call(this,J,Y)||this;return de.value=Y.value,de}return W}(io),tu=function(X){K(W,X);function W(J,Y){var de=X.call(this,J,Y)||this;return de.start=Y.start,de.reversed=typeof Y.reversed=="boolean"&&Y.reversed===!0,de}return W}(io),Zu=[{type:15,flags:0,unit:"px",number:3}],Ou=[{type:16,flags:0,number:50}],Bu=function(X){return X.width>X.height?new M(X.left+(X.width-X.height)/2,X.top,X.height,X.height):X.width0)J.textNodes.push(new ql(X,de,J.styles));else if(Il(de))if(yu(de)&&de.assignedNodes)de.assignedNodes().forEach(function(it){return Hl(X,it,J,Y)});else{var Pe=Lu(X,de);Pe.styles.isVisible()&&(Uu(de,Pe,Y)?Pe.flags|=4:mu(Pe.styles)&&(Pe.flags|=2),qu.indexOf(de.tagName)!==-1&&(Pe.flags|=8),J.elements.push(Pe),de.slot,de.shadowRoot?Hl(X,de.shadowRoot,Pe,Y):!Kl(de)&&!ku(de)&&!Wl(de)&&Hl(X,de,Pe,Y))}},Lu=function(X,W){return bl(W)?new fu(X,W):Fu(W)?new pu(X,W):ku(W)?new Su(X,W):Nu(W)?new eu(X,W):au(W)?new tu(X,W):ec(W)?new nu(X,W):Wl(W)?new Iu(X,W):Kl(W)?new Du(X,W):Ms(W)?new Mu(X,W):new io(X,W)},Pu=function(X,W){var J=Lu(X,W);return J.flags|=4,Hl(X,W,J,J),J},Uu=function(X,W,J){return W.styles.isPositionedWithZIndex()||W.styles.opacity<1||W.styles.isTransformed()||Xi(X)&&J.styles.isTransparent()},mu=function(X){return X.isPositioned()||X.isFloating()},gu=function(X){return X.nodeType===Node.TEXT_NODE},Il=function(X){return X.nodeType===Node.ELEMENT_NODE},ru=function(X){return Il(X)&&typeof X.style!="undefined"&&!tl(X)},tl=function(X){return typeof X.className=="object"},Nu=function(X){return X.tagName==="LI"},au=function(X){return X.tagName==="OL"},ec=function(X){return X.tagName==="INPUT"},tc=function(X){return X.tagName==="HTML"},ku=function(X){return X.tagName==="svg"},Xi=function(X){return X.tagName==="BODY"},Fu=function(X){return X.tagName==="CANVAS"},iu=function(X){return X.tagName==="VIDEO"},bl=function(X){return X.tagName==="IMG"},Ms=function(X){return X.tagName==="IFRAME"},Ql=function(X){return X.tagName==="STYLE"},vu=function(X){return X.tagName==="SCRIPT"},Kl=function(X){return X.tagName==="TEXTAREA"},Wl=function(X){return X.tagName==="SELECT"},yu=function(X){return X.tagName==="SLOT"},bu=function(X){return X.tagName.indexOf("-")>0},ju=function(){function X(){this.counters={}}return X.prototype.getCounterValue=function(W){var J=this.counters[W];return J&&J.length?J[J.length-1]:1},X.prototype.getCounterValues=function(W){var J=this.counters[W];return J||[]},X.prototype.pop=function(W){var J=this;W.forEach(function(Y){return J.counters[Y].pop()})},X.prototype.parse=function(W){var J=this,Y=W.counterIncrement,de=W.counterReset,Ee=!0;Y!==null&&Y.forEach(function(it){var rt=J.counters[it.counter];rt&&it.increment!==0&&(Ee=!1,rt.length||rt.push(1),rt[Math.max(0,rt.length-1)]+=it.increment)});var Pe=[];return Ee&&de.forEach(function(it){var rt=J.counters[it.counter];Pe.push(it.counter),rt||(rt=J.counters[it.counter]=[]),rt.push(it.reset)}),Pe},X}(),Hu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},ou={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Qu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Oi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},El=function(X,W,J,Y,de,Ee){return XJ?O(X,de,Ee.length>0):Y.integers.reduce(function(Pe,it,rt){for(;X>=it;)X-=it,Pe+=Y.values[rt];return Pe},"")+Ee},Ku=function(X,W,J,Y){var de="";do J||X--,de=Y(X)+de,X/=W;while(X*W>=W);return de},$i=function(X,W,J,Y,de){var Ee=J-W+1;return(X<0?"-":"")+(Ku(Math.abs(X),Ee,Y,function(Pe){return r(Math.floor(Pe%Ee)+W)})+de)},_l=function(X,W,J){J===void 0&&(J=". ");var Y=W.length;return Ku(Math.abs(X),Y,!1,function(de){return W[Math.floor(de%Y)]})+J},nl=1<<0,hl=1<<1,Mi=1<<2,zl=1<<3,rl=function(X,W,J,Y,de,Ee){if(X<-9999||X>9999)return O(X,4,de.length>0);var Pe=Math.abs(X),it=de;if(Pe===0)return W[0]+it;for(var rt=0;Pe>0&&rt<=4;rt++){var Rt=Pe%10;Rt===0&&Wt(Ee,nl)&&it!==""?it=W[Rt]+it:Rt>1||Rt===1&&rt===0||Rt===1&&rt===1&&Wt(Ee,hl)||Rt===1&&rt===1&&Wt(Ee,Mi)&&X>100||Rt===1&&rt>1&&Wt(Ee,zl)?it=W[Rt]+(rt>0?J[rt-1]:"")+it:Rt===1&&rt>0&&(it=J[rt-1]+it),Pe=Math.floor(Pe/10)}return(X<0?Y:"")+it},Wu="\u5341\u767E\u5343\u842C",Gl="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",n="\uB9C8\uC774\uB108\uC2A4",O=function(X,W,J){var Y=J?". ":"",de=J?"\u3001":"",Ee=J?", ":"",Pe=J?" ":"";switch(W){case 0:return"\u2022"+Pe;case 1:return"\u25E6"+Pe;case 2:return"\u25FE"+Pe;case 5:var it=$i(X,48,57,!0,Y);return it.length<4?"0"+it:it;case 4:return _l(X,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",de);case 6:return El(X,1,3999,Hu,3,Y).toLowerCase();case 7:return El(X,1,3999,Hu,3,Y);case 8:return $i(X,945,969,!1,Y);case 9:return $i(X,97,122,!1,Y);case 10:return $i(X,65,90,!1,Y);case 11:return $i(X,1632,1641,!0,Y);case 12:case 49:return El(X,1,9999,ou,3,Y);case 35:return El(X,1,9999,ou,3,Y).toLowerCase();case 13:return $i(X,2534,2543,!0,Y);case 14:case 30:return $i(X,6112,6121,!0,Y);case 15:return _l(X,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",de);case 16:return _l(X,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",de);case 17:case 48:return rl(X,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Wu,"\u8CA0",de,hl|Mi|zl);case 47:return rl(X,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Gl,"\u8CA0",de,nl|hl|Mi|zl);case 42:return rl(X,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Wu,"\u8D1F",de,hl|Mi|zl);case 41:return rl(X,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Gl,"\u8D1F",de,nl|hl|Mi|zl);case 26:return rl(X,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,de,0);case 25:return rl(X,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,de,nl|hl|Mi);case 31:return rl(X,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",n,Ee,nl|hl|Mi);case 33:return rl(X,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",n,Ee,0);case 32:return rl(X,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",n,Ee,nl|hl|Mi);case 18:return $i(X,2406,2415,!0,Y);case 20:return El(X,1,19999,Oi,3,Y);case 21:return $i(X,2790,2799,!0,Y);case 22:return $i(X,2662,2671,!0,Y);case 22:return El(X,1,10999,Qu,3,Y);case 23:return _l(X,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return _l(X,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return $i(X,3302,3311,!0,Y);case 28:return _l(X,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",de);case 29:return _l(X,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",de);case 34:return $i(X,3792,3801,!0,Y);case 37:return $i(X,6160,6169,!0,Y);case 38:return $i(X,4160,4169,!0,Y);case 39:return $i(X,2918,2927,!0,Y);case 40:return $i(X,1776,1785,!0,Y);case 43:return $i(X,3046,3055,!0,Y);case 44:return $i(X,3174,3183,!0,Y);case 45:return $i(X,3664,3673,!0,Y);case 46:return $i(X,3872,3881,!0,Y);case 3:default:return $i(X,48,57,!0,Y)}},S="data-html2canvas-ignore",U=function(){function X(W,J,Y){if(this.context=W,this.options=Y,this.scrolledElements=[],this.referenceElement=J,this.counters=new ju,this.quoteDepth=0,!J.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(J.ownerDocument.documentElement,!1)}return X.prototype.toIFrame=function(W,J){var Y=this,de=le(W,J);if(!de.contentWindow)return Promise.reject("Unable to find iframe window");var Ee=W.defaultView.pageXOffset,Pe=W.defaultView.pageYOffset,it=de.contentWindow,rt=it.document,Rt=Re(de).then(function(){return k(Y,void 0,void 0,function(){var kt,nn;return E(this,function(un){switch(un.label){case 0:return this.scrolledElements.forEach(An),it&&(it.scrollTo(J.left,J.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(it.scrollY!==J.top||it.scrollX!==J.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(it.scrollX-J.left,it.scrollY-J.top,0,0))),kt=this.options.onclone,nn=this.clonedReferenceElement,typeof nn=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:rt.fonts&&rt.fonts.ready?[4,rt.fonts.ready]:[3,2];case 1:un.sent(),un.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,be(rt)]:[3,4];case 3:un.sent(),un.label=4;case 4:return typeof kt=="function"?[2,Promise.resolve().then(function(){return kt(rt,nn)}).then(function(){return de})]:[2,de]}})})});return rt.open(),rt.write(Nt(document.doctype)+""),Ut(this.referenceElement.ownerDocument,Ee,Pe),rt.replaceChild(rt.adoptNode(this.documentElement),rt.documentElement),rt.close(),Rt},X.prototype.createElementClone=function(W){if(li(W,2))debugger;if(Fu(W))return this.createCanvasClone(W);if(iu(W))return this.createVideoClone(W);if(Ql(W))return this.createStyleClone(W);var J=W.cloneNode(!1);return bl(J)&&(bl(W)&&W.currentSrc&&W.currentSrc!==W.src&&(J.src=W.currentSrc,J.srcset=""),J.loading==="lazy"&&(J.loading="eager")),bu(J)?this.createCustomElementClone(J):J},X.prototype.createCustomElementClone=function(W){var J=document.createElement("html2canvascustomelement");return At(W.style,J),J},X.prototype.createStyleClone=function(W){try{var J=W.sheet;if(J&&J.cssRules){var Y=[].slice.call(J.cssRules,0).reduce(function(Ee,Pe){return Pe&&typeof Pe.cssText=="string"?Ee+Pe.cssText:Ee},""),de=W.cloneNode(!1);return de.textContent=Y,de}}catch(Ee){if(this.context.logger.error("Unable to access cssRules property",Ee),Ee.name!=="SecurityError")throw Ee}return W.cloneNode(!1)},X.prototype.createCanvasClone=function(W){var J;if(this.options.inlineImages&&W.ownerDocument){var Y=W.ownerDocument.createElement("img");try{return Y.src=W.toDataURL(),Y}catch(Rt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",W)}}var de=W.cloneNode(!1);try{de.width=W.width,de.height=W.height;var Ee=W.getContext("2d"),Pe=de.getContext("2d");if(Pe)if(!this.options.allowTaint&&Ee)Pe.putImageData(Ee.getImageData(0,0,W.width,W.height),0,0);else{var it=(J=W.getContext("webgl2"))!==null&&J!==void 0?J:W.getContext("webgl");if(it){var rt=it.getContextAttributes();(rt==null?void 0:rt.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",W)}Pe.drawImage(W,0,0)}return de}catch(Rt){this.context.logger.info("Unable to clone canvas as it is tainted",W)}return de},X.prototype.createVideoClone=function(W){var J=W.ownerDocument.createElement("canvas");J.width=W.offsetWidth,J.height=W.offsetHeight;var Y=J.getContext("2d");try{return Y&&(Y.drawImage(W,0,0,J.width,J.height),this.options.allowTaint||Y.getImageData(0,0,J.width,J.height)),J}catch(Ee){this.context.logger.info("Unable to clone video as it is tainted",W)}var de=W.ownerDocument.createElement("canvas");return de.width=W.offsetWidth,de.height=W.offsetHeight,de},X.prototype.appendChildNode=function(W,J,Y){(!Il(J)||!vu(J)&&!J.hasAttribute(S)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(J)))&&((!this.options.copyStyles||!Il(J)||!Ql(J))&&W.appendChild(this.cloneNode(J,Y)))},X.prototype.cloneChildNodes=function(W,J,Y){for(var de=this,Ee=W.shadowRoot?W.shadowRoot.firstChild:W.firstChild;Ee;Ee=Ee.nextSibling)if(Il(Ee)&&yu(Ee)&&typeof Ee.assignedNodes=="function"){var Pe=Ee.assignedNodes();Pe.length&&Pe.forEach(function(it){return de.appendChildNode(J,it,Y)})}else this.appendChildNode(J,Ee,Y)},X.prototype.cloneNode=function(W,J){if(gu(W))return document.createTextNode(W.data);if(!W.ownerDocument)return W.cloneNode(!1);var Y=W.ownerDocument.defaultView;if(Y&&Il(W)&&(ru(W)||tl(W))){var de=this.createElementClone(W);de.style.transitionProperty="none";var Ee=Y.getComputedStyle(W),Pe=Y.getComputedStyle(W,":before"),it=Y.getComputedStyle(W,":after");this.referenceElement===W&&ru(de)&&(this.clonedReferenceElement=de),Xi(de)&&br(de);var rt=this.counters.parse(new zi(this.context,Ee)),Rt=this.resolvePseudoContent(W,de,Pe,$.BEFORE);bu(W)&&(J=!0),iu(W)||this.cloneChildNodes(W,de,J),Rt&&de.insertBefore(Rt,de.firstChild);var kt=this.resolvePseudoContent(W,de,it,$.AFTER);return kt&&de.appendChild(kt),this.counters.pop(rt),(Ee&&(this.options.copyStyles||tl(W))&&!Ms(W)||J)&&At(Ee,de),(W.scrollTop!==0||W.scrollLeft!==0)&&this.scrolledElements.push([de,W.scrollLeft,W.scrollTop]),(Kl(W)||Wl(W))&&(Kl(de)||Wl(de))&&(de.value=W.value),de}return W.cloneNode(!1)},X.prototype.resolvePseudoContent=function(W,J,Y,de){var Ee=this;if(!Y)return;var Pe=Y.content,it=J.ownerDocument;if(!it||!Pe||Pe==="none"||Pe==="-moz-alt-content"||Y.display==="none")return;this.counters.parse(new zi(this.context,Y));var rt=new ao(this.context,Y),Rt=it.createElement("html2canvaspseudoelement");At(Y,Rt),rt.content.forEach(function(nn){if(nn.type===0)Rt.appendChild(it.createTextNode(nn.value));else if(nn.type===22){var un=it.createElement("img");un.src=nn.value,un.style.opacity="1",Rt.appendChild(un)}else if(nn.type===18){if(nn.name==="attr"){var Tr=nn.values.filter(mi);Tr.length&&Rt.appendChild(it.createTextNode(W.getAttribute(Tr[0].value)||""))}else if(nn.name==="counter"){var Qn=nn.values.filter(Je),hr=Qn[0],ma=Qn[1];if(hr&&mi(hr)){var wr=Ee.counters.getCounterValue(hr.value),Br=ma&&mi(ma)?vo.parse(Ee.context,ma.value):3;Rt.appendChild(it.createTextNode(O(wr,Br,!1)))}}else if(nn.name==="counters"){var yi=nn.values.filter(Je),hr=yi[0],Xa=yi[1],ma=yi[2];if(hr&&mi(hr)){var Li=Ee.counters.getCounterValues(hr.value),Sr=ma&&mi(ma)?vo.parse(Ee.context,ma.value):3,Bi=Xa&&Xa.type===0?Xa.value:"",Pi=Li.map(function(_s){return O(_s,Sr,!1)}).join(Bi);Rt.appendChild(it.createTextNode(Pi))}}}else if(nn.type===20)switch(nn.value){case"open-quote":Rt.appendChild(it.createTextNode(dr(rt.quotes,Ee.quoteDepth++,!0)));break;case"close-quote":Rt.appendChild(it.createTextNode(dr(rt.quotes,--Ee.quoteDepth,!1)));break;default:Rt.appendChild(it.createTextNode(nn.value))}}),Rt.className=Zn+" "+sr;var kt=de===$.BEFORE?" "+Zn:" "+sr;return tl(J)?J.className.baseValue+=kt:J.className+=kt,Rt},X.destroy=function(W){return W.parentNode?(W.parentNode.removeChild(W),!0):!1},X}(),$;(function(X){X[X.BEFORE=0]="BEFORE",X[X.AFTER=1]="AFTER"})($||($={}));var le=function(X,W){var J=X.createElement("iframe");return J.className="html2canvas-container",J.style.visibility="hidden",J.style.position="fixed",J.style.left="-10000px",J.style.top="0px",J.style.border="0",J.width=W.width.toString(),J.height=W.height.toString(),J.scrolling="no",J.setAttribute(S,"true"),X.body.appendChild(J),J},ye=function(X){return new Promise(function(W){if(X.complete){W();return}if(!X.src){W();return}X.onload=W,X.onerror=W})},be=function(X){return Promise.all([].slice.call(X.images,0).map(ye))},Re=function(X){return new Promise(function(W,J){var Y=X.contentWindow;if(!Y)return J("No window assigned for iframe");var de=Y.document;Y.onload=X.onload=function(){Y.onload=X.onload=null;var Ee=setInterval(function(){de.body.childNodes.length>0&&de.readyState==="complete"&&(clearInterval(Ee),W(X))},50)}})},st=["all","d","content"],At=function(X,W){for(var J=X.length-1;J>=0;J--){var Y=X.item(J);st.indexOf(Y)===-1&&W.style.setProperty(Y,X.getPropertyValue(Y))}return W},Nt=function(X){var W="";return X&&(W+=""),W},Ut=function(X,W,J){X&&X.defaultView&&(W!==X.defaultView.pageXOffset||J!==X.defaultView.pageYOffset)&&X.defaultView.scrollTo(W,J)},An=function(X){var W=X[0],J=X[1],Y=X[2];W.scrollLeft=J,W.scrollTop=Y},yn=":before",Nn=":after",Zn="___html2canvas___pseudoelement_before",sr="___html2canvas___pseudoelement_after",$n=`{ content: "" !important; display: none !important; }`,br=function(X){Jr(X,"."+Zn+yn+$n+` .`+sr+Nn+$n)},Jr=function(X,W){var J=X.ownerDocument;if(J){var Y=J.createElement("style");Y.textContent=W,X.appendChild(Y)}},kr=function(){function X(){}return X.getOrigin=function(W){var J=X._link;return J?(J.href=W,J.href=J.href,J.protocol+J.hostname+J.port):"about:blank"},X.isSameOrigin=function(W){return X.getOrigin(W)===X._origin},X.setContext=function(W){X._link=W.document.createElement("a"),X._origin=X.getOrigin(W.location.href)},X._origin="about:blank",X}(),Pa=function(){function X(W,J){this.context=W,this._options=J,this._cache={}}return X.prototype.addImage=function(W){var J=Promise.resolve();return this.has(W)||(Ko(W)||ds(W))&&(this._cache[W]=this.loadImage(W)).catch(function(){}),J},X.prototype.match=function(W){return this._cache[W]},X.prototype.loadImage=function(W){return k(this,void 0,void 0,function(){var J,Y,de,Ee,Pe=this;return E(this,function(it){switch(it.label){case 0:return J=kr.isSameOrigin(W),Y=!Qo(W)&&this._options.useCORS===!0&&bo.SUPPORT_CORS_IMAGES&&!J,de=!Qo(W)&&!J&&!Ko(W)&&typeof this._options.proxy=="string"&&bo.SUPPORT_CORS_XHR&&!Y,!J&&this._options.allowTaint===!1&&!Qo(W)&&!Ko(W)&&!de&&!Y?[2]:(Ee=W,de?[4,this.proxy(Ee)]:[3,2]);case 1:Ee=it.sent(),it.label=2;case 2:return this.context.logger.debug("Added image "+W.substring(0,256)),[4,new Promise(function(rt,Rt){var kt=new Image;kt.onload=function(){return rt(kt)},kt.onerror=Rt,(po(Ee)||Y)&&(kt.crossOrigin="anonymous"),kt.src=Ee,kt.complete===!0&&setTimeout(function(){return rt(kt)},500),Pe._options.imageTimeout>0&&setTimeout(function(){return Rt("Timed out ("+Pe._options.imageTimeout+"ms) loading image")},Pe._options.imageTimeout)})];case 3:return[2,it.sent()]}})})},X.prototype.has=function(W){return typeof this._cache[W]!="undefined"},X.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},X.prototype.proxy=function(W){var J=this,Y=this._options.proxy;if(!Y)throw new Error("No proxy defined");var de=W.substring(0,256);return new Promise(function(Ee,Pe){var it=bo.SUPPORT_RESPONSE_TYPE?"blob":"text",rt=new XMLHttpRequest;rt.onload=function(){if(rt.status===200)if(it==="text")Ee(rt.response);else{var nn=new FileReader;nn.addEventListener("load",function(){return Ee(nn.result)},!1),nn.addEventListener("error",function(un){return Pe(un)},!1),nn.readAsDataURL(rt.response)}else Pe("Failed to proxy resource "+de+" with status code "+rt.status)},rt.onerror=Pe;var Rt=Y.indexOf("?")>-1?"&":"?";if(rt.open("GET",""+Y+Rt+"url="+encodeURIComponent(W)+"&responseType="+it),it!=="text"&&rt instanceof XMLHttpRequest&&(rt.responseType=it),J._options.imageTimeout){var kt=J._options.imageTimeout;rt.timeout=kt,rt.ontimeout=function(){return Pe("Timed out ("+kt+"ms) proxying "+de)}}rt.send()})},X}(),Fi=/^data:image\/svg\+xml/i,Co=/^data:image\/.*;base64,/i,oo=/^data:image\/.*/i,ds=function(X){return bo.SUPPORT_SVG_DRAWING||!Mo(X)},Qo=function(X){return oo.test(X)},po=function(X){return Co.test(X)},Ko=function(X){return X.substr(0,4)==="blob"},Mo=function(X){return X.substr(-3).toLowerCase()==="svg"||Fi.test(X)},zn=function(){function X(W,J){this.type=0,this.x=W,this.y=J}return X.prototype.add=function(W,J){return new X(this.x+W,this.y+J)},X}(),qi=function(X,W,J){return new zn(X.x+(W.x-X.x)*J,X.y+(W.y-X.y)*J)},eo=function(){function X(W,J,Y,de){this.type=1,this.start=W,this.startControl=J,this.endControl=Y,this.end=de}return X.prototype.subdivide=function(W,J){var Y=qi(this.start,this.startControl,W),de=qi(this.startControl,this.endControl,W),Ee=qi(this.endControl,this.end,W),Pe=qi(Y,de,W),it=qi(de,Ee,W),rt=qi(Pe,it,W);return J?new X(this.start,Y,Pe,rt):new X(rt,it,Ee,this.end)},X.prototype.add=function(W,J){return new X(this.start.add(W,J),this.startControl.add(W,J),this.endControl.add(W,J),this.end.add(W,J))},X.prototype.reverse=function(){return new X(this.end,this.endControl,this.startControl,this.start)},X}(),to=function(X){return X.type===1},Dl=function(){function X(W){var J=W.styles,Y=W.bounds,de=Tt(J.borderTopLeftRadius,Y.width,Y.height),Ee=de[0],Pe=de[1],it=Tt(J.borderTopRightRadius,Y.width,Y.height),rt=it[0],Rt=it[1],kt=Tt(J.borderBottomRightRadius,Y.width,Y.height),nn=kt[0],un=kt[1],Tr=Tt(J.borderBottomLeftRadius,Y.width,Y.height),Qn=Tr[0],hr=Tr[1],ma=[];ma.push((Ee+rt)/Y.width),ma.push((Qn+nn)/Y.width),ma.push((Pe+hr)/Y.height),ma.push((Rt+un)/Y.height);var wr=Math.max.apply(Math,ma);wr>1&&(Ee/=wr,Pe/=wr,rt/=wr,Rt/=wr,nn/=wr,un/=wr,Qn/=wr,hr/=wr);var Br=Y.width-rt,yi=Y.height-un,Xa=Y.width-nn,Li=Y.height-hr,Sr=J.borderTopWidth,Bi=J.borderRightWidth,Pi=J.borderBottomWidth,Ga=J.borderLeftWidth,Ls=dt(J.paddingTop,W.bounds.width),_s=dt(J.paddingRight,W.bounds.width),js=dt(J.paddingBottom,W.bounds.width),Zo=dt(J.paddingLeft,W.bounds.width);this.topLeftBorderDoubleOuterBox=Ee>0||Pe>0?za(Y.left+Ga/3,Y.top+Sr/3,Ee-Ga/3,Pe-Sr/3,ni.TOP_LEFT):new zn(Y.left+Ga/3,Y.top+Sr/3),this.topRightBorderDoubleOuterBox=Ee>0||Pe>0?za(Y.left+Br,Y.top+Sr/3,rt-Bi/3,Rt-Sr/3,ni.TOP_RIGHT):new zn(Y.left+Y.width-Bi/3,Y.top+Sr/3),this.bottomRightBorderDoubleOuterBox=nn>0||un>0?za(Y.left+Xa,Y.top+yi,nn-Bi/3,un-Pi/3,ni.BOTTOM_RIGHT):new zn(Y.left+Y.width-Bi/3,Y.top+Y.height-Pi/3),this.bottomLeftBorderDoubleOuterBox=Qn>0||hr>0?za(Y.left+Ga/3,Y.top+Li,Qn-Ga/3,hr-Pi/3,ni.BOTTOM_LEFT):new zn(Y.left+Ga/3,Y.top+Y.height-Pi/3),this.topLeftBorderDoubleInnerBox=Ee>0||Pe>0?za(Y.left+Ga*2/3,Y.top+Sr*2/3,Ee-Ga*2/3,Pe-Sr*2/3,ni.TOP_LEFT):new zn(Y.left+Ga*2/3,Y.top+Sr*2/3),this.topRightBorderDoubleInnerBox=Ee>0||Pe>0?za(Y.left+Br,Y.top+Sr*2/3,rt-Bi*2/3,Rt-Sr*2/3,ni.TOP_RIGHT):new zn(Y.left+Y.width-Bi*2/3,Y.top+Sr*2/3),this.bottomRightBorderDoubleInnerBox=nn>0||un>0?za(Y.left+Xa,Y.top+yi,nn-Bi*2/3,un-Pi*2/3,ni.BOTTOM_RIGHT):new zn(Y.left+Y.width-Bi*2/3,Y.top+Y.height-Pi*2/3),this.bottomLeftBorderDoubleInnerBox=Qn>0||hr>0?za(Y.left+Ga*2/3,Y.top+Li,Qn-Ga*2/3,hr-Pi*2/3,ni.BOTTOM_LEFT):new zn(Y.left+Ga*2/3,Y.top+Y.height-Pi*2/3),this.topLeftBorderStroke=Ee>0||Pe>0?za(Y.left+Ga/2,Y.top+Sr/2,Ee-Ga/2,Pe-Sr/2,ni.TOP_LEFT):new zn(Y.left+Ga/2,Y.top+Sr/2),this.topRightBorderStroke=Ee>0||Pe>0?za(Y.left+Br,Y.top+Sr/2,rt-Bi/2,Rt-Sr/2,ni.TOP_RIGHT):new zn(Y.left+Y.width-Bi/2,Y.top+Sr/2),this.bottomRightBorderStroke=nn>0||un>0?za(Y.left+Xa,Y.top+yi,nn-Bi/2,un-Pi/2,ni.BOTTOM_RIGHT):new zn(Y.left+Y.width-Bi/2,Y.top+Y.height-Pi/2),this.bottomLeftBorderStroke=Qn>0||hr>0?za(Y.left+Ga/2,Y.top+Li,Qn-Ga/2,hr-Pi/2,ni.BOTTOM_LEFT):new zn(Y.left+Ga/2,Y.top+Y.height-Pi/2),this.topLeftBorderBox=Ee>0||Pe>0?za(Y.left,Y.top,Ee,Pe,ni.TOP_LEFT):new zn(Y.left,Y.top),this.topRightBorderBox=rt>0||Rt>0?za(Y.left+Br,Y.top,rt,Rt,ni.TOP_RIGHT):new zn(Y.left+Y.width,Y.top),this.bottomRightBorderBox=nn>0||un>0?za(Y.left+Xa,Y.top+yi,nn,un,ni.BOTTOM_RIGHT):new zn(Y.left+Y.width,Y.top+Y.height),this.bottomLeftBorderBox=Qn>0||hr>0?za(Y.left,Y.top+Li,Qn,hr,ni.BOTTOM_LEFT):new zn(Y.left,Y.top+Y.height),this.topLeftPaddingBox=Ee>0||Pe>0?za(Y.left+Ga,Y.top+Sr,Math.max(0,Ee-Ga),Math.max(0,Pe-Sr),ni.TOP_LEFT):new zn(Y.left+Ga,Y.top+Sr),this.topRightPaddingBox=rt>0||Rt>0?za(Y.left+Math.min(Br,Y.width-Bi),Y.top+Sr,Br>Y.width+Bi?0:Math.max(0,rt-Bi),Math.max(0,Rt-Sr),ni.TOP_RIGHT):new zn(Y.left+Y.width-Bi,Y.top+Sr),this.bottomRightPaddingBox=nn>0||un>0?za(Y.left+Math.min(Xa,Y.width-Ga),Y.top+Math.min(yi,Y.height-Pi),Math.max(0,nn-Bi),Math.max(0,un-Pi),ni.BOTTOM_RIGHT):new zn(Y.left+Y.width-Bi,Y.top+Y.height-Pi),this.bottomLeftPaddingBox=Qn>0||hr>0?za(Y.left+Ga,Y.top+Math.min(Li,Y.height-Pi),Math.max(0,Qn-Ga),Math.max(0,hr-Pi),ni.BOTTOM_LEFT):new zn(Y.left+Ga,Y.top+Y.height-Pi),this.topLeftContentBox=Ee>0||Pe>0?za(Y.left+Ga+Zo,Y.top+Sr+Ls,Math.max(0,Ee-(Ga+Zo)),Math.max(0,Pe-(Sr+Ls)),ni.TOP_LEFT):new zn(Y.left+Ga+Zo,Y.top+Sr+Ls),this.topRightContentBox=rt>0||Rt>0?za(Y.left+Math.min(Br,Y.width+Ga+Zo),Y.top+Sr+Ls,Br>Y.width+Ga+Zo?0:rt-Ga+Zo,Rt-(Sr+Ls),ni.TOP_RIGHT):new zn(Y.left+Y.width-(Bi+_s),Y.top+Sr+Ls),this.bottomRightContentBox=nn>0||un>0?za(Y.left+Math.min(Xa,Y.width-(Ga+Zo)),Y.top+Math.min(yi,Y.height+Sr+Ls),Math.max(0,nn-(Bi+_s)),un-(Pi+js),ni.BOTTOM_RIGHT):new zn(Y.left+Y.width-(Bi+_s),Y.top+Y.height-(Pi+js)),this.bottomLeftContentBox=Qn>0||hr>0?za(Y.left+Ga+Zo,Y.top+Li,Math.max(0,Qn-(Ga+Zo)),hr-(Pi+js),ni.BOTTOM_LEFT):new zn(Y.left+Ga+Zo,Y.top+Y.height-(Pi+js))}return X}(),ni;(function(X){X[X.TOP_LEFT=0]="TOP_LEFT",X[X.TOP_RIGHT=1]="TOP_RIGHT",X[X.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",X[X.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(ni||(ni={}));var za=function(X,W,J,Y,de){var Ee=4*((Math.sqrt(2)-1)/3),Pe=J*Ee,it=Y*Ee,rt=X+J,Rt=W+Y;switch(de){case ni.TOP_LEFT:return new eo(new zn(X,Rt),new zn(X,Rt-it),new zn(rt-Pe,W),new zn(rt,W));case ni.TOP_RIGHT:return new eo(new zn(X,W),new zn(X+Pe,W),new zn(rt,Rt-it),new zn(rt,Rt));case ni.BOTTOM_RIGHT:return new eo(new zn(rt,W),new zn(rt,W+it),new zn(X+Pe,Rt),new zn(X,Rt));case ni.BOTTOM_LEFT:default:return new eo(new zn(rt,Rt),new zn(rt-Pe,Rt),new zn(X,W+it),new zn(X,W))}},Es=function(X){return[X.topLeftBorderBox,X.topRightBorderBox,X.bottomRightBorderBox,X.bottomLeftBorderBox]},wo=function(X){return[X.topLeftContentBox,X.topRightContentBox,X.bottomRightContentBox,X.bottomLeftContentBox]},Ml=function(X){return[X.topLeftPaddingBox,X.topRightPaddingBox,X.bottomRightPaddingBox,X.bottomLeftPaddingBox]},al=function(){function X(W,J,Y){this.offsetX=W,this.offsetY=J,this.matrix=Y,this.type=0,this.target=2|4}return X}(),zs=function(){function X(W,J){this.path=W,this.target=J,this.type=1}return X}(),Cl=function(){function X(W){this.opacity=W,this.type=2,this.target=2|4}return X}(),Jo=function(X){return X.type===0},wl=function(X){return X.type===1},Eu=function(X){return X.type===2},ac=function(X,W){return X.length===W.length?X.some(function(J,Y){return J===W[Y]}):!1},Ac=function(X,W,J,Y,de){return X.map(function(Ee,Pe){switch(Pe){case 0:return Ee.add(W,J);case 1:return Ee.add(W+Y,J);case 2:return Ee.add(W+Y,J+de);case 3:return Ee.add(W,J+de)}return Ee})},ic=function(){function X(W){this.element=W,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return X}(),oc=function(){function X(W,J){if(this.container=W,this.parent=J,this.effects=[],this.curves=new Dl(this.container),this.container.styles.opacity<1&&this.effects.push(new Cl(this.container.styles.opacity)),this.container.styles.transform!==null){var Y=this.container.bounds.left+this.container.styles.transformOrigin[0].number,de=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Ee=this.container.styles.transform;this.effects.push(new al(Y,de,Ee))}if(this.container.styles.overflowX!==0){var Pe=Es(this.curves),it=Ml(this.curves);ac(Pe,it)?this.effects.push(new zs(Pe,2|4)):(this.effects.push(new zs(Pe,2)),this.effects.push(new zs(it,4)))}}return X.prototype.getEffects=function(W){for(var J=[2,3].indexOf(this.container.styles.position)===-1,Y=this.parent,de=this.effects.slice(0);Y;){var Ee=Y.effects.filter(function(rt){return!wl(rt)});if(J||Y.container.styles.position!==0||!Y.parent){if(de.unshift.apply(de,Ee),J=[2,3].indexOf(Y.container.styles.position)===-1,Y.container.styles.overflowX!==0){var Pe=Es(Y.curves),it=Ml(Y.curves);ac(Pe,it)||de.unshift(new zs(it,2|4))}}else de.unshift.apply(de,Ee);Y=Y.parent}return de.filter(function(rt){return Wt(rt.target,W)})},X}(),nc=function(X,W,J,Y){X.container.elements.forEach(function(de){var Ee=Wt(de.flags,4),Pe=Wt(de.flags,2),it=new oc(de,X);Wt(de.styles.display,2048)&&Y.push(it);var rt=Wt(de.flags,8)?[]:Y;if(Ee||Pe){var Rt=Ee||de.styles.isPositioned()?J:W,kt=new ic(it);if(de.styles.isPositioned()||de.styles.opacity<1||de.styles.isTransformed()){var nn=de.styles.zIndex.order;if(nn<0){var un=0;Rt.negativeZIndex.some(function(Qn,hr){return nn>Qn.element.container.styles.zIndex.order?(un=hr,!1):un>0}),Rt.negativeZIndex.splice(un,0,kt)}else if(nn>0){var Tr=0;Rt.positiveZIndex.some(function(Qn,hr){return nn>=Qn.element.container.styles.zIndex.order?(Tr=hr+1,!1):Tr>0}),Rt.positiveZIndex.splice(Tr,0,kt)}else Rt.zeroOrAutoZIndexOrTransformedOrOpacity.push(kt)}else de.styles.isFloating()?Rt.nonPositionedFloats.push(kt):Rt.nonPositionedInlineLevel.push(kt);nc(it,kt,Ee?kt:J,rt)}else de.styles.isInlineLevel()?W.inlineLevel.push(it):W.nonInlineLevel.push(it),nc(it,W,J,rt);Wt(de.flags,8)&&sc(de,rt)})},sc=function(X,W){for(var J=X instanceof tu?X.start:1,Y=X instanceof tu?X.reversed:!1,de=0;de0&&J.intrinsicHeight>0){var Ee=Gu(J),Pe=Ml(Y);this.path(Pe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(de,0,0,J.intrinsicWidth,J.intrinsicHeight,Ee.left,Ee.top,Ee.width,Ee.height),this.ctx.restore()}},W.prototype.renderNodeContent=function(J){return k(this,void 0,void 0,function(){var Y,de,Ee,Pe,it,rt,Rt,Rt,kt,nn,un,Tr,Qn,hr,ma,wr,Br,yi,Xa,Rt,Li,Qn,wr;return E(this,function(Sr){switch(Sr.label){case 0:this.applyEffects(J.getEffects(4)),Y=J.container,de=J.curves,Ee=Y.styles,Pe=0,it=Y.textNodes,Sr.label=1;case 1:return Pe0&&Br>0&&(yi=Ee.ctx.createPattern(_s,"repeat"),Ee.renderRepeat(Qn,yi,hr,ma))):ra(kt)&&(fl=rc(J,Y,[null,null,null]),Qn=fl[0],Ll=fl[1],Pl=fl[2],wr=fl[3],Br=fl[4],Ul=kt.position.length===0?[ot]:kt.position,hr=dt(Ul[0],wr),ma=dt(Ul[Ul.length-1],Br),Vl=vn(kt,hr,ma,wr,Br),pl=Vl[0],Nl=Vl[1],pl>0&&Nl>0&&(Xl=Ee.ctx.createRadialGradient(Ll+hr,Pl+ma,0,Ll+hr,Pl+ma,pl),Ar(kt.stops,pl*2).forEach(function(_u){return Xl.addColorStop(_u.stop,jt(_u.color))}),Ee.path(Qn),Ee.ctx.fillStyle=Xl,pl!==Nl?(Yl=J.bounds.left+.5*J.bounds.width,xl=J.bounds.top+.5*J.bounds.height,Jl=Nl/pl,Tl=1/Jl,Ee.ctx.save(),Ee.ctx.translate(Yl,xl),Ee.ctx.transform(1,0,0,Jl,0,0),Ee.ctx.translate(-Yl,-xl),Ee.ctx.fillRect(Ll,Tl*(Pl-xl)+xl,wr,Br*Tl),Ee.ctx.restore()):Ee.ctx.fill())),uu.label=6;case 6:return Y--,[2]}})},Ee=this,Pe=0,it=J.styles.backgroundImage.slice(0).reverse(),Rt.label=1;case 1:return Pe0?kt.style===2?[4,this.renderDashedDottedBorder(kt.color,kt.width,it,J.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return un.sent(),[3,11];case 5:return kt.style===3?[4,this.renderDashedDottedBorder(kt.color,kt.width,it,J.curves,3)]:[3,7];case 6:return un.sent(),[3,11];case 7:return kt.style===4?[4,this.renderDoubleBorder(kt.color,kt.width,it,J.curves)]:[3,9];case 8:return un.sent(),[3,11];case 9:return[4,this.renderSolidBorder(kt.color,it,J.curves)];case 10:un.sent(),un.label=11;case 11:it++,un.label=12;case 12:return rt++,[3,3];case 13:return[2]}})})},W.prototype.renderDashedDottedBorder=function(J,Y,de,Ee,Pe){return k(this,void 0,void 0,function(){var it,rt,Rt,kt,nn,un,Tr,Qn,hr,ma,wr,Br,yi,Xa,Li,Sr,Li,Sr;return E(this,function(Bi){return this.ctx.save(),it=mc(Ee,de),rt=lc(Ee,de),Pe===2&&(this.path(rt),this.ctx.clip()),to(rt[0])?(Rt=rt[0].start.x,kt=rt[0].start.y):(Rt=rt[0].x,kt=rt[0].y),to(rt[1])?(nn=rt[1].end.x,un=rt[1].end.y):(nn=rt[1].x,un=rt[1].y),de===0||de===2?Tr=Math.abs(Rt-nn):Tr=Math.abs(kt-un),this.ctx.beginPath(),Pe===3?this.formatPath(it):this.formatPath(rt.slice(0,2)),Qn=Y<3?Y*3:Y*2,hr=Y<3?Y*2:Y,Pe===3&&(Qn=Y,hr=Y),ma=!0,Tr<=Qn*2?ma=!1:Tr<=Qn*2+hr?(wr=Tr/(2*Qn+hr),Qn*=wr,hr*=wr):(Br=Math.floor((Tr+hr)/(Qn+hr)),yi=(Tr-Br*Qn)/(Br-1),Xa=(Tr-(Br+1)*Qn)/Br,hr=Xa<=0||Math.abs(hr-yi)0?[].concat(Object(K.a)(o),Object(K.a)(r(m).map(function(_){return Object(I.a)({fixed:l},_)}))):[].concat(Object(K.a)(o),[Object(I.a)(Object(I.a)({},d),{},{fixed:l})])},[])}function t(a){for(var o=!0,d=0;d=0;m-=1){var _=a[m];if(l&&_.fixed!=="right")l=!1;else if(!l&&_.fixed==="right"){Object(M.a)(!1,"Index ".concat(m+1," of `columns` missing `fixed='right'` prop."));break}}}function c(a){return a.map(function(o){var d=o.fixed,A=Object(k.a)(o,["fixed"]),l=d;return d==="left"?l="right":d==="right"&&(l="left"),Object(I.a)({fixed:l},A)})}function s(a,o){var d=a.prefixCls,A=a.columns,l=a.children,m=a.expandable,_=a.expandedKeys,R=a.getRowKey,w=a.onTriggerExpand,L=a.expandIcon,b=a.rowExpandable,g=a.expandIconColumnIndex,i=a.direction,u=a.expandRowByClick,f=E.useMemo(function(){return A||p(l)},[A,l]),y=E.useMemo(function(){if(m){var P,N=g||0,Q=f[N],G=(P={},Object(q.a)(P,T.a,{className:"".concat(d,"-expand-icon-col")}),Object(q.a)(P,"title",""),Object(q.a)(P,"fixed",Q?Q.fixed:null),Object(q.a)(P,"className","".concat(d,"-row-expand-icon-cell")),Object(q.a)(P,"render",function(z,j,Z){var te=R(j,Z),Ae=_.has(te),he=b?b(j):!0,ce=L({prefixCls:d,expanded:Ae,expandable:he,record:j,onExpand:w});return u?E.createElement("span",{onClick:function(ve){return ve.stopPropagation()}},ce):ce}),P),F=f.slice();return N>=0&&F.splice(N,0,G),F}return f},[m,f,R,_,L,i]),h=E.useMemo(function(){var P=y;return o&&(P=o(P)),P.length||(P=[{render:function(){return null}}]),P},[o,y,i]),v=E.useMemo(function(){return i==="rtl"?c(r(h)):r(h)},[h,i]);return[h,v]}oe.b=s},wYyv:function(Ie,oe,C){"use strict";const q=(I,k,E)=>{const B=k<0?I.length+k:k;if(B>=0&&B(I=[...I],q(I,k,E),I);Ie.exports=K,Ie.exports.mutate=q},wzkS:function(Ie,oe,C){"use strict";C.d(oe,"c",function(){return E}),C.d(oe,"b",function(){return B}),C.d(oe,"d",function(){return M}),C.d(oe,"a",function(){return T}),C.d(oe,"e",function(){return p});var q=C("9og8"),K=C("WmNS"),I=C.n(K),k=C("ErOA");function E(r){return Object(k.c)("libraries/".concat(r,".json"))}function B(){return Object(k.c)("library_tags.json")}function M(r){return x.apply(this,arguments)}function x(){return x=Object(q.a)(I.a.mark(function r(t){var c;return I.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(k.b)("attachments/".concat(t,".json"));case 2:return c=a.sent,a.abrupt("return",c.status===0);case 4:case"end":return a.stop()}},r)})),x.apply(this,arguments)}function T(r){return Object(k.f)("libraries.json",r)}function p(r,t){return Object(k.g)("libraries/".concat(r,".json"),t)}},x6Kt:function(Ie,oe,C){var q=C("y+Vt"),K=C("VpOo"),I=C("nPnh"),k=I.subPixelOptimizeRect,E={},B=q.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(M,x){var T,p,r,t;this.subPixelOptimize?(k(E,x,this.style),T=E.x,p=E.y,r=E.width,t=E.height,E.r=x.r,x=E):(T=x.x,p=x.y,r=x.width,t=x.height),x.r?K.buildPath(M,x):M.rect(T,p,r,t),M.closePath();return}});Ie.exports=B},"y+Vt":function(Ie,oe,C){var q=C("Gev7"),K=C("bYtY"),I=C("IMiH"),k=C("2DNl"),E=C("3C/r"),B=E.prototype.getCanvasPattern,M=Math.abs,x=new I(!0);function T(r){q.call(this,r),this.path=null}T.prototype={constructor:T,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(r,t){var c=this.style,s=this.path||x,a=c.hasStroke(),o=c.hasFill(),d=c.fill,A=c.stroke,l=o&&!!d.colorStops,m=a&&!!A.colorStops,_=o&&!!d.image,R=a&&!!A.image;if(c.bind(r,this,t),this.setTransform(r),this.__dirty){var w;l&&(w=w||this.getBoundingRect(),this._fillGradient=c.getGradient(r,d,w)),m&&(w=w||this.getBoundingRect(),this._strokeGradient=c.getGradient(r,A,w))}l?r.fillStyle=this._fillGradient:_&&(r.fillStyle=B.call(d,r)),m?r.strokeStyle=this._strokeGradient:R&&(r.strokeStyle=B.call(A,r));var L=c.lineDash,b=c.lineDashOffset,g=!!r.setLineDash,i=this.getGlobalScale();if(s.setScale(i[0],i[1],this.segmentIgnoreThreshold),this.__dirtyPath||L&&!g&&a?(s.beginPath(r),L&&!g&&(s.setLineDash(L),s.setLineDashOffset(b)),this.buildPath(s,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(r.beginPath(),this.path.rebuildPath(r)),o)if(c.fillOpacity!=null){var u=r.globalAlpha;r.globalAlpha=c.fillOpacity*c.opacity,s.fill(r),r.globalAlpha=u}else s.fill(r);if(L&&g&&(r.setLineDash(L),r.lineDashOffset=b),a)if(c.strokeOpacity!=null){var u=r.globalAlpha;r.globalAlpha=c.strokeOpacity*c.opacity,s.stroke(r),r.globalAlpha=u}else s.stroke(r);L&&g&&r.setLineDash([]),c.text!=null&&(this.restoreTransform(r),this.drawRectText(r,this.getBoundingRect()))},buildPath:function(r,t,c){},createPathProxy:function(){this.path=new I},getBoundingRect:function(){var r=this._rect,t=this.style,c=!r;if(c){var s=this.path;s||(s=this.path=new I),this.__dirtyPath&&(s.beginPath(),this.buildPath(s,this.shape,!1)),r=s.getBoundingRect()}if(this._rect=r,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=r.clone());if(this.__dirty||c){a.copy(r);var o=t.lineWidth,d=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),d>1e-10&&(a.width+=o/d,a.height+=o/d,a.x-=o/d/2,a.y-=o/d/2)}return a}return r},contain:function(r,t){var c=this.transformCoordToLocal(r,t),s=this.getBoundingRect(),a=this.style;if(r=c[0],t=c[1],s.contain(r,t)){var o=this.path.data;if(a.hasStroke()){var d=a.lineWidth,A=a.strokeNoScale?this.getLineScale():1;if(A>1e-10&&(a.hasFill()||(d=Math.max(d,this.strokeContainThreshold)),k.containStroke(o,d/A,r,t)))return!0}if(a.hasFill())return k.contain(o,r,t)}return!1},dirty:function(r){r==null&&(r=!0),r&&(this.__dirtyPath=r,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(r){return this.animate("shape",r)},attrKV:function(r,t){r==="shape"?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):q.prototype.attrKV.call(this,r,t)},setShape:function(r,t){var c=this.shape;if(c){if(K.isObject(r))for(var s in r)r.hasOwnProperty(s)&&(c[s]=r[s]);else c[r]=t;this.dirty(!0)}return this},getLineScale:function(){var r=this.transform;return r&&M(r[0]-1)>1e-10&&M(r[3]-1)>1e-10?Math.sqrt(M(r[0]*r[3]-r[2]*r[1])):1}},T.extend=function(r){var t=function(s){T.call(this,s),r.style&&this.style.extendFrom(r.style,!1);var a=r.shape;if(a){this.shape=this.shape||{};var o=this.shape;for(var d in a)!o.hasOwnProperty(d)&&a.hasOwnProperty(d)&&(o[d]=a[d])}r.init&&r.init.call(this,s)};K.inherits(t,T);for(var c in r)c!=="style"&&c!=="shape"&&(t.prototype[c]=r[c]);return t},K.inherits(T,q);var p=T;Ie.exports=p},"y0+3":function(Ie,oe,C){"use strict";C.d(oe,"a",function(){return r}),C.d(oe,"b",function(){return c});var q=/margin|padding|width|height|max|min|offset/,K={left:!0,top:!0},I={cssFloat:1,styleFloat:1,float:1};function k(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function E(s,a,o){if(a=a.toLowerCase(),o==="auto"){if(a==="height")return s.offsetHeight;if(a==="width")return s.offsetWidth}return a in K||(K[a]=q.test(a)),K[a]?parseFloat(o)||0:o}function B(s,a){var o=arguments.length,d=k(s);return a=I[a]?"cssFloat"in s.style?"cssFloat":"styleFloat":a,o===1?d:E(s,a,d[a]||s.style[a])}function M(s,a,o){var d=arguments.length;if(a=I[a]?"cssFloat"in s.style?"cssFloat":"styleFloat":a,d===3)return typeof o=="number"&&q.test(a)&&(o="".concat(o,"px")),s.style[a]=o,o;for(var A in a)a.hasOwnProperty(A)&&M(s,A,a[A]);return k(s)}function x(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function T(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function p(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:a}}function r(){var s=document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:a}}function t(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function c(s){var a=s.getBoundingClientRect(),o=document.documentElement;return{left:a.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:a.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}},"y1J/":function(Ie,oe,C){Ie.exports=C.p+"static/yz.688d901a.png"},y23F:function(Ie,oe){function C(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}C.prototype={constructor:C,_dragStart:function(I){for(var k=I.target;k&&!k.draggable;)k=k.parent;k&&(this._draggingTarget=k,k.dragging=!0,this._x=I.offsetX,this._y=I.offsetY,this.dispatchToElement(q(k,I),"dragstart",I.event))},_drag:function(I){var k=this._draggingTarget;if(k){var E=I.offsetX,B=I.offsetY,M=E-this._x,x=B-this._y;this._x=E,this._y=B,k.drift(M,x,I),this.dispatchToElement(q(k,I),"drag",I.event);var T=this.findHover(E,B,k).target,p=this._dropTarget;this._dropTarget=T,k!==T&&(p&&T!==p&&this.dispatchToElement(q(p,I),"dragleave",I.event),T&&T!==p&&this.dispatchToElement(q(T,I),"dragenter",I.event))}},_dragEnd:function(I){var k=this._draggingTarget;k&&(k.dragging=!1),this.dispatchToElement(q(k,I),"dragend",I.event),this._dropTarget&&this.dispatchToElement(q(this._dropTarget,I),"drop",I.event),this._draggingTarget=null,this._dropTarget=null}};function q(I,k){return{target:I,topTarget:k&&k.topTarget}}var K=C;Ie.exports=K},y5JW:function(Ie,oe,C){"use strict";C.d(oe,"c",function(){return o}),C.d(oe,"a",function(){return d});var q=C("DZo9"),K=C("8z0m"),I=C("+L6B"),k=C("2/Rp"),E=C("9og8"),B=C("miYZ"),M=C("tsqr"),x=C("k1fw"),T=C("oBTY"),p=C("WmNS"),r=C.n(p),t=C("q1tI"),c=C.n(t),s=C("m3rI"),a=C("wzkS"),o="\u3000\u3000";function d(A){var l=["Bytes","KB","MB","GB","TB"];if(A==0)return"0 Byte";var m=parseInt(""+Math.floor(Math.log(A)/Math.log(1024)),10);return(A/Math.pow(1024,m)).toFixed(1)+" "+l[m]}oe.b=function(A){var l=A.value,m=l===void 0?[]:l,_=A.action,R=A.onChange,w=A.className,L=A.maxSize,b=L===void 0?150:L,g=A.title,i=g===void 0?"\u6587\u4EF6\u4E0A\u4F20":g,u=A.accept,f=u===void 0?null:u,y={multiple:!1,fileList:m,accept:f,withCredentials:!0,beforeUpload:function(P){var N=P.size/1024/1024;return!0},action:"".concat(s.a.API_SERVER,"/api/attachments.json"),onChange:function(P){var N,Q,G=Object(T.a)(P.fileList);if(G=G.map(function(z){return z.name.indexOf(o)===-1&&(z.name="".concat(z.name).concat(o).concat(d(z.size))),Object(x.a)({},z)}),P.file.status==="done"&&((N=P.file)===null||N===void 0||((Q=N.response)===null||Q===void 0)?void 0:Q.status)===-1){var F,D;M.b.error((F=P.file)===null||F===void 0||((D=F.response)===null||D===void 0)?void 0:D.message),R([]);return}R(G)},onRemove:function(){var v=Object(E.a)(r.a.mark(function N(Q){var G,F,D;return r.a.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(G=Q.size/1024/1024,!(Q.status==="uploading")){j.next=3;break}return j.abrupt("return",!0);case 3:if(G0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:m.length>0,ghost:!0},i),c.a.createElement("span",{onClick:h,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",b,"M)"," ")))}},"yTi+":function(Ie,oe,C){Ie.exports=C.p+"static/AssistantCode3.fdd8db3c.jpeg"},yslc:function(Ie,oe){Ie.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGoMmBAvNAtPvZlAMmUAX4GQSEMeCf0wrxgmCu+ASF3K4QnBrOVM+Cd0Cnoorw4mIw/guD6Vs4Ba74CGPBe6IInJicDZn4PgDYK4IpBbMUM+CZ0Qey5t4M3bwUhoa2YB4dNT1CHIzkoEkZzDYrrLtvkCeU0aBsULTw7WntRbtARoQrGbWHtBVw/Vpaggq9t1Rh9F7qwOM0ZA45fDgJp7PmJ0i4hCegU3AabjAc9qmF24r14JeXP+MZ4GEN+/69NmVvD0rGn8zThWYghF7XE7JFN+0wL0x5BQfVZLL60D1XE5JUNfxTqEZqC/C7Zgumeh96EvvqMP6ppNpvSCTM/ZxbAz222lousqGtIAnZkPIMETThmndmM1y/scGvB30KfFNcPH7YbLbRjwokVWHJ5v/CzltMgWq112z5HGXgQnDdVeFW2cSEmdFcU6nUfgpBJPrPsBwPhqmCsSM/EA9E3CtaXXPoJk09+4XIk9qfQrwuKhaFLNiLVodh7tQS3HX0HpB735Lj+WNTOu0Ojl0yViC/6u88MMqG7opDkaWCo2AJCBvnMtB8MqMFhQdoIPNPmDsH6+vIijCxegjrwDmvzl9BV4LAtYwr+FJEBEzHj1iML8EvVqYY2MKFL3/nSTV2sbTuWGw2jaReAbtI3VxqLuQkDMC91mGBsXXkhRhUvFcQeBBViNWENlcxocxdeSBqInRXHMLpkmU3lfbRtsbnjk8KzdgdetvlmKDVdBZ1COEuvJA/F7KSBwsfPnVyLdy9Suq6lOLUWafULXbGITYTHwZrzYos1yc9GdE8oPJDdHnXcHhCS7En2lsgzJ2kw8pLvA094YaG5teIoBoRnYFunqT43J6koz+E8mX6jLGz7KJ6KtxzvpwvQJ/5Y5XN9nhp4NLo7empTPcqepIlsaOcHF/fgnMnoUbmi6nNYUZbvUd7mzCT9iG5tfcHMvjDzOwFybYhsTmQe1PVGygPClOGzsl+F3P4UOl0jrGyfiWFRljXCBjptKlnqtbfGA3hNsixLfwyZsf4N3bO6zCDgCrTkP6FTpAbdQyBYA0JUgQbcUXvoiEsFaU26hHvwUvJgbK84ihHHF9sU6RvWDlszpgjPEgr/biNYI19jM3FJ0kRgY4dJoGVo+rxMj3ElnzasDai/flBkZ3xeZoDJyXpBCv6sQj9XZ4TBjbswUhWC/uEWP/qeqyWgmFylm0KTkRIUBWUKnTKj180AIfOl6KjmtiHVYnRB6gg8l3Cn0Pz/lO7CtFNfwtzoT2HtdRMwIvom6KtOo8/h+TafSYnZKnT6h2a/5rCvR+wcfUm7sciK66tgoVMG87PfBfCslJ3WHLZeTByEl1Pux8byA3iw+GObKsVsGD0U1Q2fpj8uuDOt0ySrsYmxt+Dj9DHCrxNPrMD/6n3p/sDHhO4PVhvbJKvU0O9bBxCLq6MFUhgX5LBWOlVwtqv5r5RhyEkcgE8v/4LME595LXQ6HUoPimniDWnsS6dz9uHFi4V1gtWb4wtNtL2rywtsTDCh+8Kop2UL8yJgNn4Hgl6eFpEqHz23Yez+qkNzruaUH7QdhSfjbxWmG8+eWuu10B1VTH3p2zOm4O6IDFw0XUW3Q6/jnKkCAyM64dv6ub8v+McUL8Oqcj0Tej0D/l2M2vfUbzNTUcPvBSFtfelEsWW9FfoX7bPwaMzNmHtuK2af3SKp0F9NHir46GkaXbwUn5cbhJ/bqMNwW/h1biF2CI7D22kjhHxTT67GqbpymzI/V57EadMVJvQWETqttDC3B8zm70FIpNvelDAD3YRpnGa0uVvwqFhHdDrnzoztbZNneFQ3pAfHClv0P1X9YfMZ9TOPiukhPFtYuhtmO2/JS2e+Qhlf3QSBBirBl06/KWj61ngYg+0OjHkCu/Fisctv83C4ptRtMTZ1cUuRxBn0ugdByHqJrYoyNytxAOamDGsQ+oTYvlicPlaUDVeZ6W7pSbtRlrrsVrUfj/ujujYU/eTyzxh/YrnoehsLvetvr+FQzQW3NpjQ3VIkcYb8nH8D/PMSWxVlzl7o9Oz1hLhbGmwkayIxPLobCCH4+NK+Ji6/RE2E4BKk6aOLe5t8PuvMJlw2VzXYS9VEYVPHSeipTROemQkPNacCE7qobvM6c/PO0WkzC3SZMBPbgyNeN9/7gvZCt7f0z6T7hKkNPedyz7GFTSoS4168MSQJX3V8Cu2CYwQ7b5zfgdSgKDwe21sSoYudurANI+9141lJQ3YfEO6HQLiN5ErodIe05MYXhYNVT5xYicWXf/JJ6COiumFth4m4aq7BpJOrsLJMD+sGixQjulihe9ZZ3uVS7s6olS+9LhEg+wPl1TGuhP5A1A3Y0GESKvla0ANajq6RiRnRqddnb+dpGFvyiXCbiKaWFPrB6nNYXe/lcSZnsYe6Hoq6Cd21KQrfGSWLgmA4Qu+V3uXdOCF9KWdCp/7tbzOexoCITlh2aT+y/ljhsHIxQqcGgjm1zcZUSwqdHQGQXk8Wi/qchSC85QRUgCRnQl/UdiQmx/cXFqF3HX0PuyqLJRG6vZGWEPro6B7opU2Dofo0lrs5Siv2rMuo6JvRW9sWBdVnmhxzCIQu9/9i1KB7CjyxvVkcAMgdCb3xhYi/nlqP+aXfOW2p2BE9EIQuhnaxQhdjuyXy+lfollAY2wMxAq/14oV18RSvDsPxG2YLdzgXXPge00+vc9kfTOgtIVfv6/Sf0C3b/T8H4i2jJ+P64d20RxCi0qCGN2FMyTKsu1KEx2J6CrudI4uXurwKR+lmQvdedC1R0j9CP7IgBFdL6Pd+v5YA5arO+anDMSPBEjKyzFyFGLVWuE73t7NbMO/8dtAtek8uP3QLScJH9aEq7jz6nkdlGrerJeboYvqCTV08YSs/m17HmeBJ1ubMMy6mFz5pP06ocvaZzZh3fhueib8d76Q9DI7jsPzyr5hz9mscqXV/bsTXdvsqdHo5e//1M4RmeOpHF9NmJnR3bOl100DI2+6yNffnnYPb4Jfrn0eEOgTvl+7G1FNrGppA/wDoOZcgTi08O1pTiiM1F3DWZASNk0JHeHq7nm7b09v99H4//Z+O/nQbX8OpoIZKKB/CqaFVBWFdeRHWXil0CtNTodPIBF1DE1HF16GSr0MVqQM9M5OXPAQT4/oJ4TKSi/6Bi+ZKSSllQndFJ339ixnfBOJbp3dkTBXiqNDNkt6H56PaLvxbL20q5iQNAT2xSEd3X9PQ3z/AV8ZDkgj9SvdXEKpyfHHEemHD1/bal2dCd8YoDXFRCxpTLSAj6/YMTRVu7tAYLs584xRatCoUPbSp6BqSiFi1FtHqUISpgqHmOGHUpiM4PSKg4jjQf87S9FNf4oqLC8WejujU/u5Of2lyRp1e1th85SDevLDTL3ERmdAd9ezpvDCcr9gFkJ5SjyxS2qMiLndwRlzKOjy1Ra/RxWvChdtF9pF67W3QIwR0Z7VxKjdX++0SNa2HXgAZG2O5DLai7FeUSjw18pQnqfL5/h1NW6LXLQch0h3mlgods8MYqGfAd6EbcmaC519jjDIGApkB34Sen3sfOPPm1hKgKJA7grXNvwx4L/SiWZ1gMu1jb5P2bwcx69Iw4J3QaegKk5G+uyhgI+ZKQw+zIhcGxAudEA56Hd1tscRaYIkx0AoYEC90vW4OCMlrBdhYExkDDQyIE7oQHZesDfSXcrH+ZQzYM+C50Atm3gBeiLLVrIGHWJcxBqRgwDOhH8+LQXnFPoB0lqJSZoMx0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},yxFR:function(Ie,oe,C){var q=C("y+Vt"),K=C("nPnh"),I=K.subPixelOptimizeLine,k={},E=q.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(B,M){var x,T,p,r;this.subPixelOptimize?(I(k,M,this.style),x=k.x1,T=k.y1,p=k.x2,r=k.y2):(x=M.x1,T=M.y1,p=M.x2,r=M.y2);var t=M.percent;if(t===0)return;B.moveTo(x,T),t<1&&(p=x*(1-t)+p*t,r=T*(1-t)+r*t),B.lineTo(p,r)},pointAt:function(B){var M=this.shape;return[M.x1*(1-B)+M.x2*B,M.y1*(1-B)+M.y2*B]}});Ie.exports=E},zarK:function(Ie,oe,C){var q=C("YH21"),K=q.addEventListener,I=q.removeEventListener,k=q.normalizeEvent,E=q.getNativeEvent,B=C("bYtY"),M=C("H6uX"),x=C("ItGF"),T=300,p=x.domSupported,r=function(){var v=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],P=["touchstart","touchend","touchmove"],N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Q=B.map(v,function(G){var F=G.replace("mouse","pointer");return N.hasOwnProperty(F)?F:G});return{mouse:v,touch:P,pointer:Q}}(),t={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function c(v){return v==="mousewheel"&&x.browser.firefox?"DOMMouseScroll":v}function s(v){var P=v.pointerType;return P==="pen"||P==="touch"}function a(v){v.touching=!0,v.touchTimer!=null&&(clearTimeout(v.touchTimer),v.touchTimer=null),v.touchTimer=setTimeout(function(){v.touching=!1,v.touchTimer=null},700)}function o(v){v&&(v.zrByTouch=!0)}function d(v,P){return k(v.dom,new l(v,P),!0)}function A(v,P){for(var N=P,Q=!1;N&&N.nodeType!==9&&!(Q=N.domBelongToZr||N!==P&&N===v.painterRoot);)N=N.parentNode;return Q}function l(v,P){this.type=P.type,this.target=this.currentTarget=v.dom,this.pointerType=P.pointerType,this.clientX=P.clientX,this.clientY=P.clientY}var m=l.prototype;m.stopPropagation=m.stopImmediatePropagation=m.preventDefault=B.noop;var _={mousedown:function(v){v=k(this.dom,v),this._mayPointerCapture=[v.zrX,v.zrY],this.trigger("mousedown",v)},mousemove:function(v){v=k(this.dom,v);var P=this._mayPointerCapture;P&&(v.zrX!==P[0]||v.zrY!==P[1])&&i(this,!0),this.trigger("mousemove",v)},mouseup:function(v){v=k(this.dom,v),i(this,!1),this.trigger("mouseup",v)},mouseout:function(v){v=k(this.dom,v),this._pointerCapturing&&(v.zrEventControl="no_globalout");var P=v.toElement||v.relatedTarget;v.zrIsToLocalDOM=A(this,P),this.trigger("mouseout",v)},touchstart:function(v){v=k(this.dom,v),o(v),this._lastTouchMoment=new Date,this.handler.processGesture(v,"start"),_.mousemove.call(this,v),_.mousedown.call(this,v)},touchmove:function(v){v=k(this.dom,v),o(v),this.handler.processGesture(v,"change"),_.mousemove.call(this,v)},touchend:function(v){v=k(this.dom,v),o(v),this.handler.processGesture(v,"end"),_.mouseup.call(this,v),+new Date-this._lastTouchMoment