You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
351 lines
695 KiB
351 lines
695 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[185,6,7,16],{"+NIl":function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(Pe,Le){"use strict";function He(de,B){de.cmdState.push(B)}function Oe(de){return de.cmdState.length>0?de.cmdState[de.cmdState.length-1]:null}function ye(de){var B=de.cmdState.pop();B&&B.closeBracket()}function F(de){for(var B=de.cmdState,X=B.length-1;X>=0;X--){var z=B[X];if(z.name=="DEFAULT")continue;return z}return{styleIdentifier:function(){return null}}}function q(de,B,X){return function(){this.name=de,this.bracketNo=0,this.style=B,this.styles=X,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var V={};V.importmodule=q("importmodule","tag",["string","builtin"]),V.documentclass=q("documentclass","tag",["","atom"]),V.usepackage=q("usepackage","tag",["atom"]),V.begin=q("begin","tag",["atom"]),V.end=q("end","tag",["atom"]),V.label=q("label","tag",["atom"]),V.ref=q("ref","tag",["atom"]),V.eqref=q("eqref","tag",["atom"]),V.cite=q("cite","tag",["atom"]),V.bibitem=q("bibitem","tag",["atom"]),V.Bibitem=q("Bibitem","tag",["atom"]),V.RBibitem=q("RBibitem","tag",["atom"]),V.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function se(de,B){de.f=B}function j(de,B){var X;if(de.match(/^\\[a-zA-Z@]+/)){var z=de.current().slice(1);return X=V.hasOwnProperty(z)?V[z]:V.DEFAULT,X=new X,He(B,X),se(B,ke),X.style}if(de.match(/^\\[$&%#{}_]/))return"tag";if(de.match(/^\\[,;!\/\\]/))return"tag";if(de.match("\\["))return se(B,function(he,Ne){return Y(he,Ne,"\\]")}),"keyword";if(de.match("\\("))return se(B,function(he,Ne){return Y(he,Ne,"\\)")}),"keyword";if(de.match("$$"))return se(B,function(he,Ne){return Y(he,Ne,"$$")}),"keyword";if(de.match("$"))return se(B,function(he,Ne){return Y(he,Ne,"$")}),"keyword";var fe=de.next();if(fe=="%")return de.skipToEnd(),"comment";if(fe=="}"||fe=="]"){if(X=Oe(B),X)X.closeBracket(fe),se(B,ke);else return"error";return"bracket"}else return fe=="{"||fe=="["?(X=V.DEFAULT,X=new X,He(B,X),"bracket"):/\d/.test(fe)?(de.eatWhile(/[\w.%]/),"atom"):(de.eatWhile(/[\w\-_]/),X=F(B),X.name=="begin"&&(X.argument=de.current()),X.styleIdentifier())}function Y(de,B,X){if(de.eatSpace())return null;if(X&&de.match(X))return se(B,j),"keyword";if(de.match(/^\\[a-zA-Z@]+/))return"tag";if(de.match(/^[a-zA-Z]+/))return"variable-2";if(de.match(/^\\[$&%#{}_]/))return"tag";if(de.match(/^\\[,;!\/]/))return"tag";if(de.match(/^[\^_&]/))return"tag";if(de.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(de.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var z=de.next();return z=="{"||z=="}"||z=="["||z=="]"||z=="("||z==")"?"bracket":z=="%"?(de.skipToEnd(),"comment"):"error"}function ke(de,B){var X=de.peek(),z;return X=="{"||X=="["?(z=Oe(B),z.openBracket(X),de.eat(X),se(B,j),"bracket"):/[ \t\r]/.test(X)?(de.eat(X),null):(se(B,j),ye(B),j(de,B))}return{startState:function(){var de=Le.inMathMode?function(B,X){return Y(B,X)}:j;return{cmdState:[],f:de}},copyState:function(de){return{cmdState:de.cmdState.slice(),f:de.f}},token:function(de,B){return B.f(de,B)},blankLine:function(de){de.f=j,de.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"19Vz":function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(q,V,se){var j=se&&se!=Z.Init;if(V&&!j)q.on("blur",Oe),q.on("change",ye),q.on("swapDoc",ye),Z.on(q.getInputField(),"compositionupdate",q.state.placeholderCompose=function(){He(q)}),ye(q);else if(!V&&j){q.off("blur",Oe),q.off("change",ye),q.off("swapDoc",ye),Z.off(q.getInputField(),"compositionupdate",q.state.placeholderCompose),Pe(q);var Y=q.getWrapperElement();Y.className=Y.className.replace(" CodeMirror-empty","")}V&&!q.hasFocus()&&Oe(q)});function Pe(q){q.state.placeholder&&(q.state.placeholder.parentNode.removeChild(q.state.placeholder),q.state.placeholder=null)}function Le(q){Pe(q);var V=q.state.placeholder=document.createElement("pre");V.style.cssText="height: 0; overflow: visible",V.style.direction=q.getOption("direction"),V.className="CodeMirror-placeholder CodeMirror-line-like";var se=q.getOption("placeholder");typeof se=="string"&&(se=document.createTextNode(se)),V.appendChild(se),q.display.lineSpace.insertBefore(V,q.display.lineSpace.firstChild)}function He(q){setTimeout(function(){var V=!1,se=q.getInputField();se.nodeName=="TEXTAREA"?V=!se.value:q.lineCount()==1&&(V=!/[^\u200b]/.test(se.querySelector(".CodeMirror-line").textContent)),V?Le(q):Pe(q)},20)}function Oe(q){F(q)&&Le(q)}function ye(q){var V=q.getWrapperElement(),se=F(q);V.className=V.className.replace(" CodeMirror-empty","")+(se?" CodeMirror-empty":""),se?Le(q):Pe(q)}function F(q){return q.lineCount()===1&&q.getLine(0)===""}})},"1eCo":function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){"use strict";var Pe={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(He,Oe){var ye=He.indentUnit,F={},q=Oe.htmlMode?Pe:Le;for(var V in q)F[V]=q[V];for(var V in Oe)F[V]=Oe[V];var se,j;function Y(O,me){function ee(ae){return me.tokenize=ae,ae(O,me)}var L=O.next();if(L=="<")return O.eat("!")?O.eat("[")?O.match("CDATA[")?ee(B("atom","]]>")):null:O.match("--")?ee(B("comment","-->")):O.match("DOCTYPE",!0,!0)?(O.eatWhile(/[\w\._\-]/),ee(X(1))):null:O.eat("?")?(O.eatWhile(/[\w\._\-]/),me.tokenize=B("meta","?>"),"meta"):(se=O.eat("/")?"closeTag":"openTag",me.tokenize=ke,"tag bracket");if(L=="&"){var U;return O.eat("#")?O.eat("x")?U=O.eatWhile(/[a-fA-F\d]/)&&O.eat(";"):U=O.eatWhile(/[\d]/)&&O.eat(";"):U=O.eatWhile(/[\w\.\-:]/)&&O.eat(";"),U?"atom":"error"}else return O.eatWhile(/[^&<]/),null}Y.isInText=!0;function ke(O,me){var ee=O.next();if(ee==">"||ee=="/"&&O.eat(">"))return me.tokenize=Y,se=ee==">"?"endTag":"selfcloseTag","tag bracket";if(ee=="=")return se="equals",null;if(ee=="<"){me.tokenize=Y,me.state=Ne,me.tagName=me.tagStart=null;var L=me.tokenize(O,me);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(ee)?(me.tokenize=de(ee),me.stringStartCol=O.column(),me.tokenize(O,me)):(O.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(O){var me=function(ee,L){for(;!ee.eol();)if(ee.next()==O){L.tokenize=ke;break}return"string"};return me.isInAttribute=!0,me}function B(O,me){return function(ee,L){for(;!ee.eol();){if(ee.match(me)){L.tokenize=Y;break}ee.next()}return O}}function X(O){return function(me,ee){for(var L;(L=me.next())!=null;){if(L=="<")return ee.tokenize=X(O+1),ee.tokenize(me,ee);if(L==">")if(O==1){ee.tokenize=Y;break}else return ee.tokenize=X(O-1),ee.tokenize(me,ee)}return"meta"}}function z(O,me,ee){this.prev=O.context,this.tagName=me,this.indent=O.indented,this.startOfLine=ee,(F.doNotIndent.hasOwnProperty(me)||O.context&&O.context.noIndent)&&(this.noIndent=!0)}function fe(O){O.context&&(O.context=O.context.prev)}function he(O,me){for(var ee;;){if(!O.context)return;if(ee=O.context.tagName,!F.contextGrabbers.hasOwnProperty(ee)||!F.contextGrabbers[ee].hasOwnProperty(me))return;fe(O)}}function Ne(O,me,ee){return O=="openTag"?(ee.tagStart=me.column(),Ue):O=="closeTag"?we:Ne}function Ue(O,me,ee){return O=="word"?(ee.tagName=me.current(),j="tag",ce):F.allowMissingTagName&&O=="endTag"?(j="tag bracket",ce(O,me,ee)):(j="error",Ue)}function we(O,me,ee){if(O=="word"){var L=me.current();return ee.context&&ee.context.tagName!=L&&F.implicitlyClosed.hasOwnProperty(ee.context.tagName)&&fe(ee),ee.context&&ee.context.tagName==L||F.matchClosing===!1?(j="tag",Q):(j="tag error",Ce)}else return F.allowMissingTagName&&O=="endTag"?(j="tag bracket",Q(O,me,ee)):(j="error",Ce)}function Q(O,me,ee){return O!="endTag"?(j="error",Q):(fe(ee),Ne)}function Ce(O,me,ee){return j="error",Q(O,me,ee)}function ce(O,me,ee){if(O=="word")return j="attribute",P;if(O=="endTag"||O=="selfcloseTag"){var L=ee.tagName,U=ee.tagStart;return ee.tagName=ee.tagStart=null,O=="selfcloseTag"||F.autoSelfClosers.hasOwnProperty(L)?he(ee,L):(he(ee,L),ee.context=new z(ee,L,U==ee.indented)),Ne}return j="error",ce}function P(O,me,ee){return O=="equals"?le:(F.allowMissing||(j="error"),ce(O,me,ee))}function le(O,me,ee){return O=="string"?$:O=="word"&&F.allowUnquoted?(j="string",ce):(j="error",ce(O,me,ee))}function $(O,me,ee){return O=="string"?$:ce(O,me,ee)}return{startState:function(O){var me={tokenize:Y,state:Ne,indented:O||0,tagName:null,tagStart:null,context:null};return O!=null&&(me.baseIndent=O),me},token:function(O,me){if(!me.tagName&&O.sol()&&(me.indented=O.indentation()),O.eatSpace())return null;se=null;var ee=me.tokenize(O,me);return(ee||se)&&ee!="comment"&&(j=null,me.state=me.state(se||ee,O,me),j&&(ee=j=="error"?ee+" error":j)),ee},indent:function(O,me,ee){var L=O.context;if(O.tokenize.isInAttribute)return O.tagStart==O.indented?O.stringStartCol+1:O.indented+ye;if(L&&L.noIndent)return Z.Pass;if(O.tokenize!=ke&&O.tokenize!=Y)return ee?ee.match(/^(\s*)/)[0].length:0;if(O.tagName)return F.multilineTagIndentPastTag!==!1?O.tagStart+O.tagName.length+2:O.tagStart+ye*(F.multilineTagIndentFactor||1);if(F.alignCDATA&&/<!\[CDATA\[/.test(me))return 0;var U=me&&/^<(\/)?([\w_:\.-]*)/.exec(me);if(U&&U[1])for(;L;)if(L.tagName==U[2]){L=L.prev;break}else if(F.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(U)for(;L;){var ae=F.contextGrabbers[L.tagName];if(ae&&ae.hasOwnProperty(U[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+ye:O.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:F.htmlMode?"html":"xml",helperType:F.htmlMode?"html":"xml",skipAttribute:function(O){O.state==le&&(O.state=ce)},xmlCurrentTag:function(O){return O.tagName?{name:O.tagName,close:O.type=="closeTag"}:null},xmlCurrentContext:function(O){for(var me=[],ee=O.context;ee;ee=ee.prev)ee.tagName&&me.push(ee.tagName);return me.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7Cbv":function(yt,qe,b){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Pe=new Uint8Array(16);function Le(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(Pe)}var He=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Oe(ke){return typeof ke=="string"&&He.test(ke)}for(var ye=Oe,F=[],q=0;q<256;++q)F.push((q+256).toString(16).substr(1));function V(ke){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,B=(F[ke[de+0]]+F[ke[de+1]]+F[ke[de+2]]+F[ke[de+3]]+"-"+F[ke[de+4]]+F[ke[de+5]]+"-"+F[ke[de+6]]+F[ke[de+7]]+"-"+F[ke[de+8]]+F[ke[de+9]]+"-"+F[ke[de+10]]+F[ke[de+11]]+F[ke[de+12]]+F[ke[de+13]]+F[ke[de+14]]+F[ke[de+15]]).toLowerCase();if(!ye(B))throw TypeError("Stringified UUID is invalid");return B}var se=V;function j(ke,de,B){ke=ke||{};var X=ke.random||(ke.rng||Le)();if(X[6]=X[6]&15|64,X[8]=X[8]&63|128,de){B=B||0;for(var z=0;z<16;++z)de[B+z]=X[z];return de}return se(X)}var Y=qe.a=j},"7ahc":function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Ue});var Z=b("k1fw"),Pe=b("0Owb"),Le=b("+L6B"),He=b("2/Rp"),Oe=b("y8nQ"),ye=b("Vl3Y"),F=b("tJVT"),q=b("OaEy"),V=b("2fM7"),se=b("q1tI"),j=b.n(se),Y=b("VrN/"),ke=b.n(Y),de=b("p77/"),B=b.n(de),X=b("c5Ni"),z=b.n(X),fe=V.a.Option,he={labelCol:{span:4},wrapperCol:{span:20}},Ne={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};qe.b=function(we){var Q=we.callback,Ce=we.onCancel,ce=Object(se.useState)("python"),P=Object(F.a)(ce,2),le=P[0],$=P[1];function O(ee){$(Ne[ee][1])}function me(ee){Q(ee)}return j.a.createElement(ye.a,Object(Pe.a)({},he,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:me}),j.a.createElement(ye.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},j.a.createElement(V.a,{onChange:O},Object.keys(Ne).map(function(ee){return j.a.createElement(fe,{key:ee,value:ee},Ne[ee][0])}))),j.a.createElement(ye.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},j.a.createElement(Ue,{mode:le})),j.a.createElement("div",{className:"flex-container flex-end"},j.a.createElement(He.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),j.a.createElement(He.a,{type:"ghost",onClick:Ce},"\u53D6\u6D88")))};function Ue(we){var Q=we.value,Ce=we.onChange,ce=we.mode,P=we.options,le=P===void 0?{}:P,$=Object(se.useRef)(),O=Object(se.useState)(),me=Object(F.a)(O,2),ee=me[0],L=me[1];return Object(se.useEffect)(function(){if(ee){function U(ae){var K=ae.getValue();Ce&&Ce(K)}return ee.on("change",U),function(){ee.off("change",U)}}},[ee,Ce]),Object(se.useEffect)(function(){ee&&ee.setOption("mode",ce)},[ee,ce]),Object(se.useEffect)(function(){ee&&((Q!==ee.getValue()||Q==="")&&setTimeout(function(){ee.setValue(Q||" ")},300))},[ee,Q]),Object(se.useEffect)(function(){if($.current&&!ee){var U=ke.a.fromTextArea($.current,Object(Z.a)({mode:ce,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},le));L(U)}},[$.current,ee]),j.a.createElement("div",{className:"my-codemirror-container"},j.a.createElement("textarea",{ref:$}))}},"7ixt":function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Le});var Z={adjustX:1,adjustY:1},Pe=[0,0],Le={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:Pe},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:Pe},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:Pe},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:Pe},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:Pe},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:Pe},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:Pe},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:Pe},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:Pe},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:Pe},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:Pe},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:Pe}},He=Le},"815F":function(yt,qe,b){"use strict";b.d(qe,"e",function(){return F}),b.d(qe,"c",function(){return V}),b.d(qe,"d",function(){return se}),b.d(qe,"a",function(){return Y}),b.d(qe,"f",function(){return ke}),b.d(qe,"b",function(){return de});var Z=b("KQm4"),Pe=b("VTBJ"),Le=b("Ff2n"),He=b("Zm9Q"),Oe=b("Kwbf"),ye=b("OZM5");function F(B,X){return B!=null?B:X}function q(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=new Map;function z(fe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(fe||[]).forEach(function(Ne){var Ue=Ne.key,we=Ne.children;Object(Oe.a)(Ue!=null,"Tree node must have a certain key: [".concat(he).concat(Ue,"]"));var Q=String(Ue);Object(Oe.a)(!X.has(Q)||Ue===null||Ue===void 0,"Same 'key' exist in the Tree: ".concat(Q)),X.set(Q,!0),z(we,"".concat(he).concat(Q," > "))})}z(B)}function V(B){function X(z){var fe=Object(He.a)(z);return fe.map(function(he){if(!Object(ye.i)(he))return Object(Oe.a)(!he,"Tree/TreeNode can only accept TreeNode as children."),null;var Ne=he.key,Ue=he.props,we=Ue.children,Q=Object(Le.a)(Ue,["children"]),Ce=Object(Pe.a)({key:Ne},Q),ce=X(we);return ce.length&&(Ce.children=ce),Ce}).filter(function(he){return he})}return X(B)}function se(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],z=new Set(X===!0?[]:X),fe=[];function he(Ne){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ne.map(function(we,Q){var Ce=Object(ye.h)(Ue?Ue.pos:"0",Q),ce=F(we.key,Ce),P=Object(Pe.a)(Object(Pe.a)({},we),{},{parent:Ue,pos:Ce,children:null,data:we,isStart:[].concat(Object(Z.a)(Ue?Ue.isStart:[]),[Q===0]),isEnd:[].concat(Object(Z.a)(Ue?Ue.isEnd:[]),[Q===Ne.length-1])});return fe.push(P),X===!0||z.has(ce)?P.children=he(we.children||[],P):P.children=[],P})}return he(B),fe}function j(B,X,z){var fe;z?typeof z=="string"?fe=function(Ue){return Ue[z]}:typeof z=="function"&&(fe=function(Ue){return z(Ue)}):fe=function(Ue,we){return F(Ue.key,we)};function he(Ne,Ue,we){var Q=Ne?Ne.children:B,Ce=Ne?Object(ye.h)(we.pos,Ue):"0";if(Ne){var ce=fe(Ne,Ce),P={node:Ne,index:Ue,pos:Ce,key:ce,parentPos:we.node?we.pos:null,level:we.level+1};X(P)}Q&&Q.forEach(function(le,$){he(le,$,{node:Ne,pos:Ce,level:we?we.level+1:-1})})}he(null)}function Y(B){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=X.initWrapper,fe=X.processEntity,he=X.onProcessFinished,Ne=arguments.length>2?arguments[2]:void 0,Ue={},we={},Q={posEntities:Ue,keyEntities:we};return z&&(Q=z(Q)||Q),j(B,function(Ce){var ce=Ce.node,P=Ce.index,le=Ce.pos,$=Ce.key,O=Ce.parentPos,me=Ce.level,ee={node:ce,index:P,key:$,pos:le,level:me},L=F($,le);Ue[le]=ee,we[L]=ee,ee.parent=Ue[O],ee.parent&&(ee.parent.children=ee.parent.children||[],ee.parent.children.push(ee)),fe&&fe(ee,Q)},Ne),he&&he(Q),Q}function ke(B,X){var z=X.expandedKeys,fe=X.selectedKeys,he=X.loadedKeys,Ne=X.loadingKeys,Ue=X.checkedKeys,we=X.halfCheckedKeys,Q=X.dragOverNodeKey,Ce=X.dropPosition,ce=X.keyEntities,P=ce[B],le={eventKey:B,expanded:z.indexOf(B)!==-1,selected:fe.indexOf(B)!==-1,loaded:he.indexOf(B)!==-1,loading:Ne.indexOf(B)!==-1,checked:Ue.indexOf(B)!==-1,halfChecked:we.indexOf(B)!==-1,pos:String(P?P.pos:""),dragOver:Q===B&&Ce===0,dragOverGapTop:Q===B&&Ce===-1,dragOverGapBottom:Q===B&&Ce===1};return le}function de(B){var X=B.data,z=B.expanded,fe=B.selected,he=B.checked,Ne=B.loaded,Ue=B.loading,we=B.halfChecked,Q=B.dragOver,Ce=B.dragOverGapTop,ce=B.dragOverGapBottom,P=B.pos,le=B.active,$=Object(Pe.a)(Object(Pe.a)({},X),{},{expanded:z,selected:fe,checked:he,loaded:Ne,loading:Ue,halfChecked:we,dragOver:Q,dragOverGapTop:Ce,dragOverGapBottom:ce,pos:P,active:le});return"props"in $||Object.defineProperty($,"props",{get:function(){return Object(Oe.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),B}}),$}},"8EBN":function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){"use strict";Z.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Pe=0;Pe<Z.modeInfo.length;Pe++){var Le=Z.modeInfo[Pe];Le.mimes&&(Le.mime=Le.mimes[0])}Z.findModeByMIME=function(He){He=He.toLowerCase();for(var Oe=0;Oe<Z.modeInfo.length;Oe++){var ye=Z.modeInfo[Oe];if(ye.mime==He)return ye;if(ye.mimes){for(var F=0;F<ye.mimes.length;F++)if(ye.mimes[F]==He)return ye}}if(/\+xml$/.test(He))return Z.findModeByMIME("application/xml");if(/\+json$/.test(He))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(He){He=He.toLowerCase();for(var Oe=0;Oe<Z.modeInfo.length;Oe++){var ye=Z.modeInfo[Oe];if(ye.ext){for(var F=0;F<ye.ext.length;F++)if(ye.ext[F]==He)return ye}}},Z.findModeByFileName=function(He){for(var Oe=0;Oe<Z.modeInfo.length;Oe++){var ye=Z.modeInfo[Oe];if(ye.file&&ye.file.test(He))return ye}var F=He.lastIndexOf("."),q=F>-1&&He.substring(F+1,He.length);if(q)return Z.findModeByExtension(q)},Z.findModeByName=function(He){He=He.toLowerCase();for(var Oe=0;Oe<Z.modeInfo.length;Oe++){var ye=Z.modeInfo[Oe];if(ye.name.toLowerCase()==He)return ye;if(ye.alias){for(var F=0;F<ye.alias.length;F++)if(ye.alias[F].toLowerCase()==He)return ye}}}})},"8Jsi":function(yt,qe,b){"use strict";b.d(qe,"d",function(){return O}),b.d(qe,"a",function(){return E}),b.d(qe,"b",function(){return ue}),b.d(qe,"c",function(){return M});var Z=b("1OyB"),Pe=b("vuIU"),Le=b("Ji7U"),He=b("LK+K"),Oe=b("KQm4"),ye=b("U8pU"),F=b("ODXe"),q=b("VTBJ"),V=b("q1tI"),se=b("qNPg"),j=b("2Qr1"),Y=b("815F"),ke=b("NvD2"),de=b("wPlo"),B=b("6cGi"),X=b("Kwbf"),z=b("4IlW"),fe=b("YrtM"),he=b("fAei"),Ne=V.createContext(null);function Ue(pe,De){if(!pe)return!0;var je=pe.data,Ke=je.disabled,Ye=je.disableCheckbox;switch(De){case"select":return Ke;case"checkbox":return Ke||Ye}return!1}function we(pe,De){var je=V.useCallback(function(Ye){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",xe=arguments.length>2?arguments[2]:void 0,et=pe.get(Ye);return!xe&&Ue(et,Ve)?null:et},[pe]),Ke=V.useCallback(function(Ye){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",xe=arguments.length>2?arguments[2]:void 0,et=De.get(Ye);return!xe&&Ue(et,Ve)?null:et},[De]);return[je,Ke]}function Q(pe){return V.useMemo(function(){var De=new Map,je=new Map;return pe.forEach(function(Ke){De.set(Ke.key,Ke),je.set(Ke.data.value,Ke)}),[De,je]},[pe])}var Ce={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ce=function(De,je){var Ke=De.prefixCls,Ye=De.height,Ve=De.itemHeight,xe=De.virtual,et=De.options,Ze=De.flattenOptions,Ae=De.multiple,We=De.searchValue,ie=De.onSelect,W=De.onToggleOpen,re=De.open,x=De.notFoundContent,T=De.onMouseEnter,_=V.useContext(Ne),N=_.checkable,be=_.checkedKeys,oe=_.halfCheckedKeys,Xe=_.treeExpandedKeys,ot=_.treeDefaultExpandAll,ut=_.treeDefaultExpandedKeys,at=_.onTreeExpand,kt=_.treeIcon,St=_.showTreeIcon,ct=_.switcherIcon,Ft=_.treeLine,Lt=_.treeNodeFilterProp,xt=_.loadData,wt=_.treeLoadedKeys,Tt=_.treeMotion,Bt=_.onTreeLoad,qt=V.useRef(),vt=Object(fe.a)(function(){return et},[re,et],function(st,Ge){return Ge[0]&&st[1]!==Ge[1]}),vn=Q(Ze),jt=Object(F.a)(vn,2),Zt=jt[0],pn=jt[1],en=we(Zt,pn),wn=Object(F.a)(en,2),Pt=wn[0],pt=wn[1],on=V.useMemo(function(){return be.map(function(st){var Ge=pt(st);return Ge?Ge.key:null})},[be]),_n=V.useMemo(function(){return N?{checked:on,halfChecked:oe}:null},[on,oe,N]);V.useEffect(function(){if(re&&!Ae&&on.length){var st;(st=qt.current)===null||st===void 0||st.scrollTo({key:on[0]})}},[re]);var En=String(We).toLowerCase(),Rt=function(Ge){return En?String(Ge[Lt]).toLowerCase().includes(En):!1},bn=V.useState(ut),un=Object(F.a)(bn,2),ei=un[0],Qe=un[1],Ot=V.useState(null),Hn=Object(F.a)(Ot,2),zn=Hn[0],Yn=Hn[1],Jn=V.useMemo(function(){return Xe?Object(Oe.a)(Xe):We?zn:ei},[ei,zn,En,Xe]);V.useEffect(function(){We&&Yn(Ze.map(function(st){return st.key}))},[We]);var d=function(Ge){Qe(Ge),Yn(Ge),at&&at(Ge)},o=function(Ge){Ge.preventDefault()},a=function(Ge,gt){var ft=gt.node.key,Nt=Pt(ft,N?"checkbox":"select");Nt!==null&&ie(Nt.data.value,{selected:!be.includes(Nt.data.value)}),Ae||W(!1)},u=V.useState(null),h=Object(F.a)(u,2),c=h[0],te=h[1],$e=Pt(c);if(V.useImperativeHandle(je,function(){return{onKeyDown:function(Ge){var gt,ft=Ge.which;switch(ft){case z.a.UP:case z.a.DOWN:case z.a.LEFT:case z.a.RIGHT:(gt=qt.current)===null||gt===void 0||gt.onKeyDown(Ge);break;case z.a.ENTER:{$e!==null&&a(null,{node:{key:c},selected:!be.includes($e.data.value)});break}case z.a.ESC:W(!1)}},onKeyUp:function(){}}}),vt.length===0)return V.createElement("div",{role:"listbox",className:"".concat(Ke,"-empty"),onMouseDown:o},x);var it={};return wt&&(it.loadedKeys=wt),Jn&&(it.expandedKeys=Jn),V.createElement("div",{onMouseDown:o,onMouseEnter:T},$e&&re&&V.createElement("span",{style:Ce,"aria-live":"assertive"},$e.data.value),V.createElement(he.b,Object.assign({ref:qt,focusable:!1,prefixCls:"".concat(Ke,"-tree"),treeData:vt,height:Ye,itemHeight:Ve,virtual:xe,multiple:Ae,icon:kt,showIcon:St,switcherIcon:ct,showLine:Ft,loadData:We?null:xt,motion:Tt,checkable:N,checkStrictly:!0,checkedKeys:_n,selectedKeys:N?[]:on,defaultExpandAll:ot},it,{onActiveChange:te,onSelect:a,onCheck:a,onExpand:d,onLoad:Bt,filterTreeNode:Rt})))},P=V.forwardRef(ce);P.displayName="OptionList";var le=P,$=function(){return null},O=$,me=b("Ff2n"),ee=b("Zm9Q");function L(pe){return Object(ee.a)(pe).map(function(De){if(!V.isValidElement(De)||!De.type)return null;var je=De.key,Ke=De.props,Ye=Ke.children,Ve=Ke.value,xe=Object(me.a)(Ke,["children","value"]),et=Object(q.a)({key:je,value:Ve},xe),Ze=L(Ye);return Ze.length&&(et.children=Ze),et}).filter(function(De){return De})}function U(pe){if(!pe)return pe;var De=Object(q.a)({},pe);return"props"in De||Object.defineProperty(De,"props",{get:function(){return Object(X.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),De}}),De}function ae(pe,De,je,Ke,Ye){var Ve=null,xe=null;function et(){function Ze(Ae){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Ae.map(function(W,re){var x="".concat(We,"-").concat(re),T=je.includes(W.value),_=Ze(W.children||[],x,T),N=V.createElement(O,Object.assign({},W),_.map(function(oe){return oe.node}));if(De===W.value&&(Ve=N),T){var be={pos:x,node:N,children:_};return ie||xe.push(be),be}return null}).filter(function(W){return W})}xe||(xe=[],Ze(Ke),xe.sort(function(Ae,We){var ie=Ae.node.props.value,W=We.node.props.value,re=je.indexOf(ie),x=je.indexOf(W);return re-x}))}Object.defineProperty(pe,"triggerNode",{get:function(){return Object(X.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),et(),Ve}}),Object.defineProperty(pe,"allCheckedNodes",{get:function(){return Object(X.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),et(),Ye?xe:xe.map(function(Ae){var We=Ae.node;return We})}})}function K(pe){return Array.isArray(pe)?pe:pe!==void 0?[pe]:[]}function G(pe,De){var je=new Map;return De.forEach(function(Ke){var Ye=Ke.data;je.set(Ye.value,Ye)}),pe.map(function(Ke){return U(je.get(Ke))})}function m(pe,De){var je=G([pe],De)[0];return je?je.disabled:!1}function p(pe){return pe.disabled||pe.disableCheckbox||pe.checkable===!1}function A(pe){for(var De=pe.parent,je=0,Ke=De;Ke;)Ke=Ke.parent,je+=1;return je}function J(pe){function De(Ke){return(Ke||[]).map(function(Ye){var Ve=Ye.value,xe=Ye.key,et=Ye.children,Ze=Object(q.a)(Object(q.a)({},Ye),{},{key:"key"in Ye?xe:Ve});return et&&(Ze.children=De(et)),Ze})}var je=Object(Y.d)(De(pe),!0);return je.map(function(Ke){return{key:Ke.data.key,data:Ke.data,level:A(Ke)}})}function ve(pe){return function(De,je){var Ke=je[pe];return String(Ke).toLowerCase().includes(String(De).toLowerCase())}}function Re(pe,De,je){var Ke=je.optionFilterProp,Ye=je.filterOption;if(Ye===!1)return De;var Ve;typeof Ye=="function"?Ve=Ye:Ve=ve(Ke);function xe(et){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return et.map(function(Ae){var We=Ae.children,ie=Ze||Ve(pe,U(Ae)),W=xe(We||[],ie);return ie||W.length?Object(q.a)(Object(q.a)({},Ae),{},{children:W}):null}).filter(function(Ae){return Ae})}return xe(De)}function Se(pe,De,je,Ke){var Ye=new Map;return K(De).forEach(function(Ve){Ve&&Object(ye.a)(Ve)==="object"&&"value"in Ve&&Ye.set(Ve.value,Ve)}),pe.map(function(Ve){var xe={value:Ve},et=je(Ve,"select",!0),Ze=et?Ke(et.data):Ve;if(Ye.has(Ve)){var Ae=Ye.get(Ve);xe.label="label"in Ae?Ae.label:Ze,"halfChecked"in Ae&&(xe.halfChecked=Ae.halfChecked)}else xe.label=Ze;return xe})}function Te(pe,De){var je=new Set(pe);return je.add(De),Array.from(je)}function R(pe,De){var je=new Set(pe);return je.delete(De),Array.from(je)}function w(pe){var De=pe.searchPlaceholder,je=pe.treeCheckStrictly,Ke=pe.treeCheckable,Ye=pe.labelInValue,Ve=pe.value,xe=pe.multiple;Object(X.a)(!De,"`searchPlaceholder` has been removed."),je&&Ye===!1&&Object(X.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(Ye||je)&&Object(X.a)(K(Ve).every(function(et){return et&&Object(ye.a)(et)==="object"&&"value"in et}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),je||xe||Ke?Object(X.a)(!Ve||Array.isArray(Ve),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(X.a)(!Array.isArray(Ve),"`value` should not be array when `TreeSelect` is single mode.")}var D=w,S=10;function k(pe,De){var je=De.id,Ke=De.pId,Ye=De.rootPId,Ve={},xe=[],et=pe.map(function(Ze){var Ae=Object(q.a)({},Ze),We=Ae[je];return Ve[We]=Ae,Ae.key=Ae.key||We,Ae});return et.forEach(function(Ze){var Ae=Ze[Ke],We=Ve[Ae];We&&(We.children=We.children||[],We.children.push(Ze)),(Ae===Ye||!We&&Ye===null)&&xe.push(Ze)}),xe}function v(pe,De){var je=0,Ke=new Set;function Ye(Ve){return(Ve||[]).map(function(xe){var et=xe.key,Ze=xe.value,Ae=xe.children,We=Object(me.a)(xe,["key","value","children"]),ie="value"in xe?Ze:et,W=Object(q.a)(Object(q.a)({},We),{},{key:et!=null?et:ie,value:ie,title:De(xe)});return"children"in xe&&(W.children=Ye(Ae)),W})}return Ye(pe)}function y(pe,De,je){var Ke=je.getLabelProp,Ye=je.simpleMode,Ve=V.useRef({});return pe?(Ve.current.formatTreeData=Ve.current.treeData===pe?Ve.current.formatTreeData:v(Ye?k(pe,Object(q.a)({id:"id",pId:"pId",rootPId:null},Ye!==!0?Ye:{})):pe,Ke),Ve.current.treeData=pe):Ve.current.formatTreeData=Ve.current.children===De?Ve.current.formatTreeData:v(L(De),Ke),Ve.current.formatTreeData}var E="SHOW_ALL",M="SHOW_PARENT",ue="SHOW_CHILD";function I(pe,De,je){var Ke=new Set(pe);return De===ue?pe.filter(function(Ye){var Ve=je[Ye];return!(Ve&&Ve.children&&Ve.children.every(function(xe){var et=xe.node;return p(et)||Ke.has(et.key)}))}):De===M?pe.filter(function(Ye){var Ve=je[Ye],xe=Ve?Ve.parent:null;return!(xe&&!p(xe.node)&&Ke.has(xe.node.key))}):pe}function ge(pe,De){var je=De.value,Ke=De.getEntityByValue,Ye=De.getEntityByKey,Ve=De.treeConduction,xe=De.showCheckedStrategy,et=De.conductKeyEntities,Ze=De.getLabelProp;return V.useMemo(function(){var Ae=pe;if(Ve){var We=I(pe.map(function(ie){var W=Ke(ie);return W?W.key:ie}),xe,et);Ae=We.map(function(ie){var W=Ye(ie);return W?W.data.value:ie})}return Se(Ae,je,Ke,Ze)},[pe,je,Ve,xe,Ke])}var _e=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],Ie=Object(se.a)({prefixCls:"rc-tree-select",components:{optionList:le},convertChildrenToData:function(){return null},flattenOptions:J,getLabeledValue:j.e,filterOptions:Re,isValueDisabled:m,findValueOption:G,omitDOMProps:function(De){var je=Object(q.a)({},De);return _e.forEach(function(Ke){delete je[Ke]}),je}});Ie.displayName="Select";var ze=V.forwardRef(function(pe,De){var je=pe.multiple,Ke=pe.treeCheckable,Ye=pe.treeCheckStrictly,Ve=pe.showCheckedStrategy,xe=Ve===void 0?"SHOW_CHILD":Ve,et=pe.labelInValue,Ze=pe.loadData,Ae=pe.treeLoadedKeys,We=pe.treeNodeFilterProp,ie=We===void 0?"value":We,W=pe.treeNodeLabelProp,re=pe.treeDataSimpleMode,x=pe.treeData,T=pe.treeExpandedKeys,_=pe.treeDefaultExpandedKeys,N=pe.treeDefaultExpandAll,be=pe.children,oe=pe.treeIcon,Xe=pe.showTreeIcon,ot=pe.switcherIcon,ut=pe.treeLine,at=pe.treeMotion,kt=pe.filterTreeNode,St=pe.dropdownPopupAlign,ct=pe.onChange,Ft=pe.onTreeExpand,Lt=pe.onTreeLoad,xt=pe.onDropdownVisibleChange,wt=pe.onSelect,Tt=pe.onDeselect,Bt=Ke||Ye,qt=je||Bt,vt=Ke&&!Ye,vn=Ye||et,jt=V.useRef(null);V.useImperativeHandle(De,function(){return{focus:jt.current.focus,blur:jt.current.blur}});var Zt=function(ft){return x&&ft.label||ft.title},pn=function(ft){return W?ft[W]:Zt(ft)},en=y(x,be,{getLabelProp:Zt,simpleMode:re}),wn=Object(V.useMemo)(function(){return J(en)},[en]),Pt=Q(wn),pt=Object(F.a)(Pt,2),on=pt[0],_n=pt[1],En=we(on,_n),Rt=Object(F.a)(En,2),bn=Rt[0],un=Rt[1],ei=Object(V.useMemo)(function(){return vt?Object(Y.a)(en):{keyEntities:null}},[en,Ke,Ye]),Qe=ei.keyEntities,Ot=Object(B.a)(pe.defaultValue,{value:pe.value}),Hn=Object(F.a)(Ot,2),zn=Hn[0],Yn=Hn[1],Jn=function(ft){var Nt=[],cn=[];return ft.forEach(function(tn){un(tn)?cn.push(tn):Nt.push(tn)}),{missingRawValues:Nt,existRawValues:cn}},d=Object(V.useMemo)(function(){var gt=[],ft=[];if(K(zn).forEach(function(Vt){if(Vt&&Object(ye.a)(Vt)==="object"&&"value"in Vt)if(Vt.halfChecked&&Ye){var dn=un(Vt.value);gt.push(dn?dn.key:Vt.value)}else ft.push(Vt.value);else ft.push(Vt)}),vt){var Nt=Jn(ft),cn=Nt.missingRawValues,tn=Nt.existRawValues,$t=tn.map(function(Vt){return un(Vt).key}),yn=Object(ke.a)($t,!0,Qe),Kn=yn.checkedKeys,mn=yn.halfCheckedKeys;return[[].concat(Object(Oe.a)(cn),Object(Oe.a)(Kn.map(function(Vt){return bn(Vt).data.value}))),mn]}return[ft,gt]},[zn,qt,vn,Ke,Ye]),o=Object(F.a)(d,2),a=o[0],u=o[1],h=ge(a,{treeConduction:vt,value:zn,showCheckedStrategy:xe,conductKeyEntities:Qe,getEntityByValue:un,getEntityByKey:bn,getLabelProp:pn}),c=function(ft,Nt,cn){if(Yn(qt?ft:ft[0]),ct){var tn=ft;if(vt&&xe!=="SHOW_ALL"){var $t=ft.map(function(Cn){var jn=un(Cn);return jn?jn.key:Cn}),yn=I($t,xe,Qe);tn=yn.map(function(Cn){var jn=bn(Cn);return jn?jn.data.value:Cn})}var Kn=Nt||{triggerValue:void 0,selected:void 0},mn=Kn.triggerValue,Vt=Kn.selected,dn=vn?Se(tn,zn,un,pn):tn;if(Ye){var Zn=u.map(function(Cn){var jn=bn(Cn);return jn?jn.data.value:Cn}).filter(function(Cn){return!tn.includes(Cn)});dn=[].concat(Object(Oe.a)(dn),Object(Oe.a)(Se(Zn,zn,un,pn)))}var gn={preValue:h,triggerValue:mn},ci=!0;(Ye||cn==="selection"&&!Vt)&&(ci=!1),ae(gn,mn,ft,en,ci),Bt?gn.checked=Vt:gn.selected=Vt,ct(qt?dn:dn[0],vn?null:tn.map(function(Cn){var jn=un(Cn);return jn?pn(jn.data):null}),gn)}},te=function(ft,Nt,cn){var tn=ft;if(!qt)c([ft],{selected:!0,triggerValue:ft},cn);else{var $t=Te(a,ft);if(vt){var yn=Jn($t),Kn=yn.missingRawValues,mn=yn.existRawValues,Vt=mn.map(function(gn){return un(gn).key}),dn=Object(ke.a)(Vt,!0,Qe),Zn=dn.checkedKeys;$t=[].concat(Object(Oe.a)(Kn),Object(Oe.a)(Zn.map(function(gn){return bn(gn).data.value})))}c($t,{selected:!0,triggerValue:ft},cn)}wt&&wt(tn,Nt)},$e=function(ft,Nt,cn){var tn=ft,$t=R(a,ft);if(vt){var yn=Jn($t),Kn=yn.missingRawValues,mn=yn.existRawValues,Vt=mn.map(function(gn){return un(gn).key}),dn=Object(ke.a)(Vt,{checked:!1,halfCheckedKeys:u},Qe),Zn=dn.checkedKeys;$t=[].concat(Object(Oe.a)(Kn),Object(Oe.a)(Zn.map(function(gn){return bn(gn).data.value})))}c($t,{selected:!1,triggerValue:ft},cn),Tt&&Tt(tn,Nt)},it=function(){c([],null,"clear")},st=V.useCallback(function(gt){if(xt){var ft={};Object.defineProperty(ft,"documentClickClose",{get:function(){return Object(X.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),xt(gt,ft)}},[xt]),Ge={optionLabelProp:null,optionFilterProp:ie,dropdownAlign:St,internalProps:{mark:de.a,onClear:it,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:te,onRawDeselect:$e}};return"filterTreeNode"in pe&&(Ge.filterOption=kt),V.createElement(Ne.Provider,{value:{checkable:Bt,loadData:Ze,treeLoadedKeys:Ae,onTreeLoad:Lt,checkedKeys:a,halfCheckedKeys:u,treeDefaultExpandAll:N,treeExpandedKeys:T,treeDefaultExpandedKeys:_,onTreeExpand:Ft,treeIcon:oe,treeMotion:at,showTreeIcon:Xe,switcherIcon:ot,treeLine:ut,treeNodeFilterProp:ie}},V.createElement(Ie,Object.assign({ref:jt,mode:qt?"multiple":null},pe,Ge,{value:h,labelInValue:!0,options:en,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:st})))}),Be=function(pe){Object(Le.a)(je,pe);var De=Object(He.a)(je);function je(){var Ke;return Object(Z.a)(this,je),Ke=De.apply(this,arguments),Ke.selectRef=V.createRef(),Ke.focus=function(){Ke.selectRef.current.focus()},Ke.blur=function(){Ke.selectRef.current.blur()},Ke}return Object(Pe.a)(je,[{key:"render",value:function(){return V.createElement(ze,Object.assign({ref:this.selectRef},this.props))}}]),je}(V.Component);Be.TreeNode=O,Be.SHOW_ALL=E,Be.SHOW_PARENT=M,Be.SHOW_CHILD=ue;var Fe=Be,nt=qe.e=Fe},"8hTe":function(yt,qe,b){yt.exports={button:"button___1wy9m"}},"8pgt":function(yt,qe,b){yt.exports={flexRow:"flexRow___2kcn2",flexColumn:"flexColumn___2bS_0",formWrap:"formWrap___3t-wi",example:"example___2J2YZ",footerWrap:"footerWrap___3u6gg"}},"9Bee":function(yt,qe,b){"use strict";var Z=b("DYRE"),Pe=b("zeV3"),Le=b("+L6B"),He=b("2/Rp"),Oe=b("k1fw"),ye=b("9og8"),F=b("tJVT"),q=b("WmNS"),V=b.n(q),se=b("q1tI"),j=b.n(se),Y=b("vg9a"),ke=b("DlQD"),de=b.n(ke),B=b("rUJ1");function X(d,o){var a=d.match(/^(\s+)(?:```)/);if(a===null)return o;var u=a[1];return o.split(`
|
|
`).map(function(h){var c=h.match(/^\s+/);if(c===null)return h;var te=Object(F.a)(c,1),$e=te[0];return $e.length>=u.length?h.slice(u.length):h}).join(`
|
|
`)}var z=[],fe=["<ul>"],he=new de.a.Renderer,Ne=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ue(){z.length=0,fe=["<ul>"]}var we={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Q(d,o,a,u){if(o>=d.length||d[o].level<=a)return o;var h=d[o];u.push("<li><a href='#"+h.anchor+"'>"+h.text+"</a>"),o++;var c=[];return o=Q(d,o,h.level,c),c.length>0&&(u.push("<ul>"),c.forEach(function(te){u.push(te)}),u.push("</ul>")),u.push("</li>"),o=Q(d,o,a,u),o}function Ce(){return Q(z,0,0,fe),fe.push("</ul>"),fe.join("")}var ce={heading:function(o){var a=Ne.exec(o);if(a)return{type:"heading",raw:a[0],depth:a[1].length,text:a[2]}},fences:function(o){var a=this.rules.block.fences.exec(o);if(a){var u=a[0],h=X(u,a[3]||""),c=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(c)>=0){var te=$(),$e=h;h=te,O[te]={type:"block",expression:$e}}return{type:"code",raw:u,lang:c,text:h}}}},P=/(?:\${2})([^\n`]+?)(?:\${2})/gi,le=0,$=function(){return"__special_katext_id_".concat(le++,"__")},O={};function me(){return O}function ee(){le=0,O={}}function L(d){return d=d.replace(P,function(o,a){var u=$();return O[u]={type:"inline",expression:a},u}),d}var U=he.listitem;he.listitem=function(d){return U(L(d))};var ae=he.paragraph;he.paragraph=function(d){return ae(L(d))};var K=he.tablecell;he.tablecell=function(d,o){return K(L(d),o)},he.code=function(d,o,a){var u=(o||"").match(/\S*/)[0];return u?["latex","katex","math"].indexOf(u)>=0?"<p class='editormd-tex'>".concat(d,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(o,'">').concat(a?d:Object(B.escape)(d,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(a?d:Object(B.escape)(d,!0))+"</code></pre>"},he.heading=function(d,o,a){var u=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return z.push({anchor:u,level:o,text:d}),"<h"+o+' id="'+u+'">'+d+"</h"+o+">"},de.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),de.a.use({tokenizer:ce,renderer:he});var G=de.a,m=b("SJMd"),p=b("ulZh"),A=b.n(p),J=b("m3rI"),ve=b("Oy/b"),Re=b("p5ED"),Se=b("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 Te=function(d,o){return(Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(d,o)};function R(d,o){function a(){this.constructor=d}Te(d,o),d.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function w(d,o,a,u){return new(a||(a=Promise))(function(h,c){function te(st){try{it(u.next(st))}catch(Ge){c(Ge)}}function $e(st){try{it(u.throw(st))}catch(Ge){c(Ge)}}function it(st){var Ge;st.done?h(st.value):(Ge=st.value,Ge instanceof a?Ge:new a(function(gt){gt(Ge)})).then(te,$e)}it((u=u.apply(d,o||[])).next())})}function D(d,o){var a,u,h,c,te={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return c={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function $e(it){return function(st){return function(Ge){if(a)throw new TypeError("Generator is already executing.");for(;te;)try{if(a=1,u&&(h=2&Ge[0]?u.return:Ge[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,Ge[1])).done)return h;switch(u=0,h&&(Ge=[2&Ge[0],h.value]),Ge[0]){case 0:case 1:h=Ge;break;case 4:return te.label++,{value:Ge[1],done:!1};case 5:te.label++,u=Ge[1],Ge=[0];continue;case 7:Ge=te.ops.pop(),te.trys.pop();continue;default:if(!(h=te.trys,(h=h.length>0&&h[h.length-1])||Ge[0]!==6&&Ge[0]!==2)){te=0;continue}if(Ge[0]===3&&(!h||Ge[1]>h[0]&&Ge[1]<h[3])){te.label=Ge[1];break}if(Ge[0]===6&&te.label<h[1]){te.label=h[1],h=Ge;break}if(h&&te.label<h[2]){te.label=h[2],te.ops.push(Ge);break}h[2]&&te.ops.pop(),te.trys.pop();continue}Ge=o.call(d,te)}catch(gt){Ge=[6,gt],u=0}finally{a=h=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([it,st])}}}function S(){for(var d=0,o=0,a=arguments.length;o<a;o++)d+=arguments[o].length;var u=Array(d),h=0;for(o=0;o<a;o++)for(var c=arguments[o],te=0,$e=c.length;te<$e;te++,h++)u[h]=c[te];return u}var k=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(o,a){for(var u=0,h=a;u<h.length;u++){var c=h[u],te=c[0],$e=c[1];o.setAttribute(te,$e)}},d.createRect=function(o,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","rect");return h.setAttribute("width",o.toString()),h.setAttribute("height",a.toString()),u&&d.setAttributes(h,u),h},d.createLine=function(o,a,u,h,c){var te=document.createElementNS("http://www.w3.org/2000/svg","line");return te.setAttribute("x1",o.toString()),te.setAttribute("y1",a.toString()),te.setAttribute("x2",u.toString()),te.setAttribute("y2",h.toString()),c&&d.setAttributes(te,c),te},d.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&d.setAttributes(u,a),u},d.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(o,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",(o/2).toString()),h.setAttribute("cy",(a/2).toString()),h.setAttribute("rx",(o/2).toString()),h.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(h,u),h},d.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&d.setAttributes(a,o),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(o,a,u,h,c,te,$e){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(it,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",h.toString()],["refX",c.toString()],["refY",te.toString()]]),it.appendChild($e),it},d.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&d.setAttributes(a,o),a},d.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&d.setAttributes(u,a),u},d.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&d.setAttributes(a,o),a},d.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},d.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&d.setAttributes(u,a),u},d}(),v=function(){function d(){}return d.addKey=function(o){d.key=o},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),y=function(){function d(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return d.prototype.rasterize=function(o,a,u){var h=this;return new Promise(function(c){var te=u!==void 0?u:document.createElement("canvas");o===null&&(h.markersOnly=!0,h.naturalSize=!1);var $e=document.createElementNS("http://www.w3.org/2000/svg","svg");$e.setAttribute("xmlns","http://www.w3.org/2000/svg"),$e.setAttribute("width",a.width.baseVal.valueAsString),$e.setAttribute("height",a.height.baseVal.valueAsString),$e.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),$e.innerHTML=a.innerHTML,h.naturalSize===!0?($e.width.baseVal.value=o.naturalWidth,$e.height.baseVal.value=o.naturalHeight):h.width!==void 0&&h.height!==void 0&&($e.width.baseVal.value=h.width,$e.height.baseVal.value=h.height),te.width=$e.width.baseVal.value,te.height=$e.height.baseVal.value;var it=$e.outerHTML,st=te.getContext("2d");h.markersOnly!==!0&&st.drawImage(o,0,0,te.width,te.height);var Ge=window.URL,gt=new Image(te.width,te.height);gt.setAttribute("crossOrigin","anonymous");var ft=new Blob([it],{type:"image/svg+xml"}),Nt=Ge.createObjectURL(ft);gt.onload=function(){st.drawImage(gt,0,0),Ge.revokeObjectURL(Nt);var cn=te.toDataURL(h.imageType,h.imageQuality);c(cn)},gt.src=Nt})},d}(),E=function(){},M=function(){function d(o){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},d.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new ue("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ue("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new ue("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new I("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new I("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},d.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),ue=function(d,o){this.selector=d,this.style=o},I=function(d,o){this.localName=d,this.style=o},ge=function(){function d(o,a,u,h,c){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=o,this.displayMode=a,this.markerItems=u,this.uiStyleSettings=h,this.styles=c,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return d.prototype.show=function(o){var a=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var u=document.createElement("div");u.className=this.toolbarBlockStyleClass.name,u.style.whiteSpace="nowrap",this.uiContainer.appendChild(u),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(u,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(c){var te=document.createElement("div");te.className=""+a.toolbarButtonStyleClass.name,te.setAttribute("data-type-name",c.typeName),te.innerHTML=c.icon,te.addEventListener("click",function(){a.markerToolbarButtonClicked(te,c)}),a.buttons.push(te),a.markerButtons.push(te)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var h=document.createElement("div");h.className=this.toolbarBlockStyleClass.name,h.style.whiteSpace="nowrap",h.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(h),this.addActionButton(h,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(h,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},d.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},d.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},d.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},d.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var o=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var a=0;a<this.markerButtons.length;a++)a<o||a===o&&this.markerButtons.length-1===o?this.markerButtonBlock.appendChild(this.markerButtons[a]):(a===o&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[a]))}},d.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},d.prototype.resetButtonStyles=function(){var o=this;this.buttons.forEach(function(a){a.className=a.className.replace(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name,"").trim(),a.className=a.className.replace(o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:o.toolbarActiveButtonStyleColorsClass.name,"").trim(),a.className+=" "+(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name)})},d.prototype.addActionButton=function(o,a,u){var h=this,c=document.createElement("div");switch(c.className=""+this.toolbarButtonStyleClass.name,c.innerHTML=a,c.setAttribute("data-action",u),c.addEventListener("click",function(){h.actionToolbarButtonClicked(c,u)}),u){case"select":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":c.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":c.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":c.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":c.style.fill=this.uiStyleSettings.closeButtonColor}o.appendChild(c),this.buttons.push(c)},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new I("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new I("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new I("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new I("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new I("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var o=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new I("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
|
|
padding: `+o+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new I("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new I("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new ue("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new ue("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},d.prototype.markerToolbarButtonClicked=function(o,a){this.setActiveButton(o),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},d.prototype.actionToolbarButtonClicked=function(o,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(u){return u("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},d.prototype.setActiveButton=function(o){this.resetButtonStyles(),o.className=o.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),o.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},d.prototype.setActiveMarkerButton=function(o){var a=this.markerButtons.find(function(u){return u.getAttribute("data-type-name")===o});a&&this.setActiveButton(a)},d.prototype.setCurrentMarker=function(o){var a=this;this.currentMarker=o,this.buttons.filter(function(u){return/delete|notes/.test(u.getAttribute("data-action"))}).forEach(function(u){a.currentMarker===void 0?(u.style.fillOpacity="0.4",u.style.pointerEvents="none"):(u.style.fillOpacity="1",u.style.pointerEvents="all")})},d}(),_e=function(){function d(o,a,u,h){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=u,this.styles=h,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return d.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new I("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 I("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new I("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new I("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new I("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 I("toolbox-panel-row_colors",`
|
|
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new I("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
|
|
padding: `+a+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new I("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new I("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new ue("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new ue("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},d.prototype.show=function(o){var a;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolboxStyleClass.name+" "+((a=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},d.prototype.setPanelButtons=function(o){var a,u,h=this;this.panels=o,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((a=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((u=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&u!==void 0?u:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(c){var te;c.uiStyleSettings=h.uiStyleSettings;var $e=document.createElement("div");$e.className=h.toolboxButtonStyleClass.name+" "+((te=h.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&te!==void 0?te:h.toolboxButtonStyleColorsClass.name),$e.innerHTML=c.icon,$e.title=c.title,$e.addEventListener("click",function(){h.panelButtonClick(c)}),h.panelButtons.push($e),h.buttonRow.appendChild($e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},d.prototype.panelButtonClick=function(o){var a=this,u=-1;if(o!==this.activePanel){u=this.panels.indexOf(o),this.panelRow.innerHTML="";var h=o.getUi();h.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(h),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=o}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){a.displayMode==="inline"?a.panelRow.style.display="none":a.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(c,te){var $e,it;c.className=a.toolboxButtonStyleClass.name+" "+(te===u?""+(($e=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&$e!==void 0?$e:a.toolboxActiveButtonStyleColorsClass.name):""+((it=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&it!==void 0?it:a.toolboxButtonStyleColorsClass.name))})},d}(),Ie=function(d,o){this.title=d,this.icon=o},ze=function(d){function o(a,u,h,c){var te=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return te.colors=[],te.addTransparent=!1,te.colorBoxes=[],te.colors=u,te.currentColor=h,te.setCurrentColor=te.setCurrentColor.bind(te),te.getColorBox=te.getColorBox.bind(te),te}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.whiteSpace="nowrap",this.colors.forEach(function(h){var c=a.getColorBox(h);u.appendChild(c),a.colorBoxes.push(c)}),u},o.prototype.getColorBox=function(a){var u=this,h=this.uiStyleSettings.toolbarHeight/4,c=this.uiStyleSettings.toolbarHeight-h,te=document.createElement("div");te.style.display="inline-block",te.style.boxSizing="content-box",te.style.width=c-2+"px",te.style.height=c-2+"px",te.style.padding="1px",te.style.marginRight="2px",te.style.marginBottom="2px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderRadius=(c+2)/2+"px",te.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){u.setCurrentColor(a,te)});var $e=document.createElement("div");return $e.style.display="inline-block",$e.style.width=c-2+"px",$e.style.height=c-2+"px",$e.style.backgroundColor=a,$e.style.borderRadius=c/2+"px",a==="transparent"&&($e.style.fill=this.uiStyleSettings.toolboxAccentColor,$e.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),te.appendChild($e),te},o.prototype.setCurrentColor=function(a,u){var h=this;this.currentColor=a,this.colorBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}(Ie),Be=function(){function d(o,a,u){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=a,this.globalSettings=u,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(d.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(o){return!1},Object.defineProperty(d.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},d.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},d.prototype.pointerDown=function(o,a){},d.prototype.dblClick=function(o,a){},d.prototype.manipulate=function(o){},d.prototype.pointerUp=function(o){this.stateChanged()},d.prototype.dispose=function(){},d.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},d.prototype.getState=function(){return{typeName:d.typeName,state:this.state,notes:this.notes}},d.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},d.prototype.scale=function(o,a){},d.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},d.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},d.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var o=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),o.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(o)&&this.onStateChanged(this)}},d.typeName="MarkerBase",d}(),Fe=function(){function d(){this.findGripByVisual=this.findGripByVisual.bind(this)}return d.prototype.findGripByVisual=function(o){return this.topLeft.ownsTarget(o)?this.topLeft:this.topCenter.ownsTarget(o)?this.topCenter:this.topRight.ownsTarget(o)?this.topRight:this.centerLeft.ownsTarget(o)?this.centerLeft:this.centerRight.ownsTarget(o)?this.centerRight:this.bottomLeft.ownsTarget(o)?this.bottomLeft:this.bottomCenter.ownsTarget(o)?this.bottomCenter:this.bottomRight.ownsTarget(o)?this.bottomRight:void 0},d}(),nt=function(){function d(){this.GRIP_SIZE=10,this.visual=k.createGroup(),this.visual.appendChild(k.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(k.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return d.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},d}(),pe=function(){function d(){}return d.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},d.toSVGMatrix=function(o,a){return o.a=a.a,o.b=a.b,o.c=a.c,o.d=a.d,o.e=a.e,o.f=a.f,o},d}(),De=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.left=0,c.top=0,c.width=0,c.height=0,c.defaultSize={x:50,y:20},c.offsetX=0,c.offsetY=0,c.rotationAngle=0,c.CB_DISTANCE=10,c._suppressMarkerCreateEvent=!1,c.container.transform.baseVal.appendItem(k.createTransform()),c.setupControlBox(),c}return R(o,d),Object.defineProperty(o.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visual",{get:function(){return this._visual},set:function(a){this._visual=a;var u=k.createTransform();this._visual.transform.baseVal.appendItem(u)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.left=a.x,this.top=a.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var h=this.unrotatePoint(a);if(this.manipulationStartX=h.x,this.manipulationStartY=h.y,this.offsetX=h.x-this.left,this.offsetY=h.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(u),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(u)){this.activeGrip=this.rotatorGrip;var c=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=c.x-this.width/2,this.top=c.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var te=this.container.transform.baseVal.getItem(0);te.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(te,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},o.prototype.moveVisual=function(a){this.visual.style.transform="translate("+a.x+"px, "+a.y+"px)"},o.prototype.manipulate=function(a){var u=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(u.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(u.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(u):this.state==="rotate"&&this.rotate(a)},o.prototype.resize=function(a){var u=this.manipulationStartLeft,h=this.manipulationStartWidth,c=this.manipulationStartTop,te=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:u=this.manipulationStartLeft+a.x-this.manipulationStartX,h=this.manipulationStartWidth+this.manipulationStartLeft-u;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:h=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:c=this.manipulationStartTop+a.y-this.manipulationStartY,te=this.manipulationStartHeight+this.manipulationStartTop-c;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:te=this.manipulationStartHeight+a.y-this.manipulationStartY}h>=0?(this.left=u,this.width=h):(this.left=u+h,this.width=-h),te>=0?(this.top=c,this.height=te):(this.top=c+te,this.height=-te),this.setSize()},o.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},o.prototype.rotate=function(a){if(Math.abs(a.x-this.centerX)>.1){var u=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*u,this.applyRotation()}},o.prototype.applyRotation=function(){var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0)},o.prototype.rotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM(),h=k.createPoint(a.x,a.y);return{x:(h=h.matrixTransform(u)).x,y:h.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var u=this.container.getCTM();u=u.inverse();var h=k.createPoint(a.x,a.y);return{x:(h=h.matrixTransform(u)).x,y:h.y}},o.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=k.createGroup();var a=k.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=k.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=k.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 Fe,this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){var a=this.controlBox.transform.baseVal.getItem(0);a.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(a,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()},o.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()},o.prototype.createGrip=function(){var a=new nt;return a.visual.transform.baseVal.appendItem(k.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,u=-a/2,h=u,c=(this.width+this.CB_DISTANCE)/2-a/2,te=(this.height+this.CB_DISTANCE)/2-a/2,$e=this.height+this.CB_DISTANCE-a/2,it=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,u,h),this.positionGrip(this.controlGrips.topCenter.visual,c,h),this.positionGrip(this.controlGrips.topRight.visual,it,h),this.positionGrip(this.controlGrips.centerLeft.visual,u,te),this.positionGrip(this.controlGrips.centerRight.visual,it,te),this.positionGrip(this.controlGrips.bottomLeft.visual,u,$e),this.positionGrip(this.controlGrips.bottomCenter.visual,c,$e),this.positionGrip(this.controlGrips.bottomRight.visual,it,$e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,c,h-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,u,h){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,h),a.transform.baseVal.replaceItem(c,0)},o.prototype.hideControlBox=function(){this.controlBox.style.display="none"},o.prototype.showControlBox=function(){this.controlBox.style.display=""},o.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.left=u.left,this.top=u.top,this.width=u.width,this.height=u.height,this.rotationAngle=u.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(pe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,u.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,u.containerTransformMatrix))},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u);var h=this.rotatePoint({x:this.left,y:this.top}),c=this.unrotatePoint({x:h.x*a,y:h.y*u});this.left=c.x,this.top=c.y,this.width=this.width*a,this.height=this.height*u,this.adjustControlBox()},o}(Be),je=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.createVisual=c.createVisual.bind(c),c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=k.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)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){d.prototype.setSize.call(this),k.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&k.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&k.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&k.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&k.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},o.title="Rectangle marker",o}(De),Ke=function(d){function o(a,u,h,c){var te=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return te.widths=[],te.widthBoxes=[],te.widths=u,te.currentWidth=h,te.setCurrentWidth=te.setCurrentWidth.bind(te),te}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.widths.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.flexGrow="2",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=h===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentWidth(h,c)}),u.appendChild(c);var te=document.createElement("div");te.innerText=h.toString(),te.style.marginRight="5px",c.appendChild(te);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.display="flex",$e.style.alignItems="center";var it=document.createElement("hr");it.style.minWidth="20px",it.style.border="0px",it.style.borderTop=h+"px solid "+a.uiStyleSettings.toolboxColor,it.style.flexGrow="2",$e.appendChild(it),c.appendChild($e),a.widthBoxes.push(c)}),u},o.prototype.setCurrentWidth=function(a,u){var h=this;this.currentWidth=a,this.widthBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(Ie),Ye=function(d){function o(a,u,h,c){var te=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return te.styles=[],te.styleBoxes=[],te.styles=u,te.currentStyle=h,te.setCurrentStyle=te.setCurrentStyle.bind(te),te}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",this.styles.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.styles.length-5+"%",c.style.borderColor=h===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentStyle(h,c)}),u.appendChild(c);var te=document.createElement("div");te.style.minHeight="20px",te.style.flexGrow="2",te.style.overflow="hidden";var $e=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(h!==""?'stroke-dasharray="'+h+'"':"")+` />
|
|
</svg>`;te.innerHTML=$e,c.appendChild(te),a.styleBoxes.push(c)}),u},o.prototype.setCurrentStyle=function(a,u){var h=this;this.currentStyle=a,this.styleBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(Ie),Ve=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new ze("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new Ye("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return R(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="FrameMarker",o.title="Frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',o}(je),xe=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},et=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.x1=0,c.y1=0,c.x2=0,c.y2=0,c.defaultLength=50,c.manipulationStartX=0,c.manipulationStartY=0,c.manipulationStartX1=0,c.manipulationStartY1=0,c.manipulationStartX2=0,c.manipulationStartY2=0,c.setupControlBox(),c}return R(o,d),o.prototype.ownsTarget=function(a){return!!d.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartX=a.x,this.manipulationStartY=a.y,this.state==="new"&&(this.x1=a.x,this.y1=a.y,this.x2=a.x,this.y2=a.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(u)?this.activeGrip=this.grip1:this.grip2.ownsTarget(u)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(a){var u=this.state;d.prototype.pointerUp.call(this,a),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(a),this._state="select",u==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},o.prototype.adjustVisual=function(){},o.prototype.manipulate=function(a){this.state==="creating"?this.resize(a):this.state==="move"?(this.x1=this.manipulationStartX1+a.x-this.manipulationStartX,this.y1=this.manipulationStartY1+a.y-this.manipulationStartY,this.x2=this.manipulationStartX2+a.x-this.manipulationStartX,this.y2=this.manipulationStartY2+a.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(a)},o.prototype.resize=function(a){switch(this.activeGrip){case this.grip1:this.x1=a.x,this.y1=a.y;break;case this.grip2:case void 0:this.x2=a.x,this.y2=a.y}this.adjustVisual(),this.adjustControlBox()},o.prototype.select=function(){d.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){d.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=k.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){this.positionGrips()},o.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},o.prototype.createGrip=function(){var a=new nt;return a.visual.transform.baseVal.appendItem(k.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-a/2,this.y1-a/2),this.positionGrip(this.grip2.visual,this.x2-a/2,this.y2-a/2)},o.prototype.positionGrip=function(a,u,h){var c=a.transform.baseVal.getItem(0);c.setTranslate(u,h),a.transform.baseVal.replaceItem(c,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},d.prototype.getState.call(this))},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.x1=u.x1,this.y1=u.y1,this.x2=u.x2,this.y2=u.y2},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.x1=this.x1*a,this.y1=this.y1*u,this.x2=this.x2*a,this.y2=this.y2*u,this.adjustVisual(),this.adjustControlBox()},o}(Be),Ze=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new ze("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new Ye("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=k.createGroup(),this.selectorLine=k.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=k.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)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},o.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()),k.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),k.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),k.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',o}(et),Ae=function(d){function o(a,u,h,c){var te=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return te.fonts=[],te.fontBoxes=[],te.fonts=u,te.currentFont=h,te.setCurrentFont=te.setCurrentFont.bind(te),te}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.overflow="hidden",u.style.flexGrow="2",this.fonts.forEach(function(h){var c=document.createElement("div");c.style.display="inline-block",c.style.alignItems="center",c.style.justifyContent="space-between",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.overflow="hidden",c.style.maxWidth=100/a.fonts.length-5+"%",c.style.borderColor=h===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentFont(h,c)}),u.appendChild(c);var te=document.createElement("div");te.style.display="flex",te.style.minHeight="20px",te.style.flexGrow="2",te.style.fontFamily=h,te.style.overflow="hidden";var $e=document.createElement("div");$e.style.whiteSpace="nowrap",$e.style.overflow="hidden",$e.style.textOverflow="ellipsis",$e.innerHTML="The quick brown fox jumps over the lazy dog",te.appendChild($e),c.appendChild(te),a.fontBoxes.push(c)}),u},o.prototype.setCurrentFont=function(a,u){var h=this;this.currentFont=a,this.fontBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(Ie),We=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.color="transparent",c.padding=5,c.DEFAULT_TEXT="your text here",c.text=c.DEFAULT_TEXT,c.isMoved=!1,c.color=h.defaultColor,c.fontFamily=h.defaultFontFamily,c.defaultSize={x:100,y:30},c.setColor=c.setColor.bind(c),c.setFont=c.setFont.bind(c),c.renderText=c.renderText.bind(c),c.sizeText=c.sizeText.bind(c),c.textEditDivClicked=c.textEditDivClicked.bind(c),c.showTextEditor=c.showTextEditor.bind(c),c.setSize=c.setSize.bind(c),c.positionTextEditor=c.positionTextEditor.bind(c),c.colorPanel=new ze("Color",h.defaultColorSet,h.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.fontFamilyPanel=new Ae("Font",h.defaultFontFamilies,h.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c}return R(o,d),o.prototype.ownsTarget=function(a){if(d.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var u=!1;return this.textElement.childNodes.forEach(function(h){h===a&&(u=!0)}),u},o.prototype.createVisual=function(){this.visual=k.createGroup(),this.bgRectangle=k.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=k.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(k.createTransform()),this.textElement.transform.baseVal.appendItem(k.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.isMoved=!1,this.pointerDownPoint=a,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.renderText=function(){var a=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(u){a.textElement.appendChild(k.createTSpan(u.trim()===""?" ":u.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var a=this.textElement.getBBox(),u=1;if(a.width>0&&a.height>0){var h=(1*this.width-this.width*this.padding*2/100)/a.width,c=(1*this.height-this.height*this.padding*2/100)/a.height;u=Math.min(h,c)}return u},o.prototype.getTextPosition=function(a){var u=this.textElement.getBBox(),h=0,c=0;return u.width>0&&u.height>0&&(h=(this.width-u.width*a)/2,c=this.height/2-u.height*a/2),{x:h,y:c}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),u=this.getTextScale(),h=this.getTextPosition(u);h.y-=a.y*u,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+h.x+"px, "+h.y+"px) scale("+u+", "+u+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(h.x,h.y),this.textElement.transform.baseVal.getItem(1).setScale(u,u))},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(a.x-this.pointerDownPoint.x)>5||Math.abs(a.y-this.pointerDownPoint.y)>5)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){d.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(k.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),k.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(a){var u=this.state;u==="creating"&&(this._suppressMarkerCreateEvent=!0),d.prototype.pointerUp.call(this,a),this.setSize(),(u==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},o.prototype.showTextEditor=function(){var a=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(u){u.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var u=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&u>.9;)u-=.1,a.textEditor.style.fontSize=Math.max(u,.9)+"em"}),this.textEditor.addEventListener("keyup",function(u){u.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(u){if(u.clipboardData){var h=u.clipboardData.getData("text"),c=window.getSelection();if(!c.rangeCount)return!1;c.deleteFromDocument(),c.getRangeAt(0).insertNode(document.createTextNode(h)),u.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){a.textEditDivClicked(a.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},o.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var a=this.getTextScale(),u=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),h=this.textElement.getBBox(),c={x:h.width*a,y:h.height*a};u.x-=c.x/2,u.y-=c.y/2,this.textEditor.style.top=u.y+"px",this.textEditor.style.left=u.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-u.x+"px",this.textEditor.style.fontSize=Math.max(16*a,12)+"px",this.textElement.style.display="none"}},o.prototype.textEditDivClicked=function(a){this.text=a.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},o.prototype.select=function(){d.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),d.prototype.deselect.call(this)},o.prototype.dblClick=function(a,u){d.prototype.dblClick.call(this,a,u),this.showTextEditor()},o.prototype.setColor=function(a){this.textElement&&k.setAttributes(this.textElement,[["fill",a]]),this.color=a,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(a)},o.prototype.setFont=function(a){this.textElement&&k.setAttributes(this.textElement,[["font-family",a]]),this.fontFamily=a,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},o.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},o.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.color=u.color,this.fontFamily=u.fontFamily,this.padding=u.padding,this.text=u.text,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',o}(De),ie=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.color="transparent",c.lineWidth=3,c.drawing=!1,c.pixelRatio=1,c.color=h.defaultColor,c.lineWidth=h.defaultStrokeWidth,c.pixelRatio=h.freehandPixelRatio,c.setColor=c.setColor.bind(c),c.addCanvas=c.addCanvas.bind(c),c.finishCreation=c.finishCreation.bind(c),c.setLineWidth=c.setLineWidth.bind(c),c.colorPanel=new ze("Color",h.defaultColorSet,h.defaultColor),c.colorPanel.onColorChanged=c.setColor,c.lineWidthPanel=new Ke("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.lineWidthPanel.onWidthChanged=c.setLineWidth,c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=k.createGroup(),this.drawingImage=k.createImage(),this.visual.appendChild(this.drawingImage);var a=k.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){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(a.x,a.y),this.drawing=!0):d.prototype.pointerDown.call(this,a,u)},o.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),k.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),k.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):d.prototype.pointerUp.call(this,a)},o.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)},o.prototype.select=function(){this.state==="creating"&&this.finishCreation(),d.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),d.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),u=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],h=u[0],c=u[1],te=u[2],$e=u[3],it=!1,st=0;st<this.canvasElement.height;st++)for(var Ge=0;Ge<this.canvasElement.width;Ge++)a.data[st*this.canvasElement.width*4+4*Ge+3]>0&&(it=!0,st<c&&(c=st),Ge<h&&(h=Ge),st>$e&&($e=st),Ge>te&&(te=Ge));if(it){this.left=h/this.pixelRatio,this.top=c/this.pixelRatio,this.width=(te-h)/this.pixelRatio,this.height=($e-c)/this.pixelRatio;var gt=document.createElement("canvas");gt.width=te-h,gt.height=$e-c,gt.getContext("2d").putImageData(this.canvasContext.getImageData(h,c,te-h,$e-c),0,0),this.drawingImgUrl=gt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){k.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),k.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},o.prototype.setColor=function(a){this.color=a,this.colorChanged(a)},o.prototype.setLineWidth=function(a){this.lineWidth=a},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({drawingImgUrl:this.drawingImgUrl},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){this.createVisual(),d.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',o}(De),W=function(d){function o(a,u,h){var c=d.call(this,a,h||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return c.typeBoxes=[],c.currentType=u,c.setCurrentType=c.setCurrentType.bind(c),c}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2";for(var h=function($e){var it="both";switch($e){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var st=document.createElement("div");if(st.style.display="flex",st.style.flexGrow="2",st.style.alignItems="center",st.style.justifyContent="space-between",st.style.padding="5px",st.style.borderWidth="2px",st.style.borderStyle="solid",st.style.borderColor=it===c.currentType?c.uiStyleSettings.toolboxAccentColor:"transparent",st.addEventListener("click",function(){a.setCurrentType(it,st)}),u.appendChild(st),it==="both"||it==="start"){var Ge=document.createElement("div");Ge.style.display="flex",Ge.style.alignItems="center",Ge.style.minHeight="20px",Ge.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ge.style.marginLeft="5px",st.appendChild(Ge)}var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.style.flexGrow="2";var ft=document.createElement("hr");if(ft.style.minWidth="20px",ft.style.border="0px",ft.style.borderTop="3px solid "+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee"),ft.style.flexGrow="2",gt.appendChild(ft),st.appendChild(gt),it==="both"||it==="end"){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(c.uiStyleSettings!==void 0?c.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Nt.style.marginRight="5px",st.appendChild(Nt)}c.typeBoxes.push(st)},c=this,te=0;te<4;te++)h(te);return u},o.prototype.setCurrentType=function(a,u){var h=this;this.currentType=a,this.typeBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings!==void 0?h.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(Ie),re=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.arrowType="end",c.arrowBaseHeight=10,c.arrowBaseWidth=10,c.getArrowPoints=c.getArrowPoints.bind(c),c.setArrowType=c.setArrowType.bind(c),c.arrowTypePanel=new W("Arrow type","end"),c.arrowTypePanel.onArrowTypeChanged=c.setArrowType,c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},o.prototype.getArrowPoints=function(a,u){var h=this.arrowBaseWidth+2*this.strokeWidth,c=this.arrowBaseHeight+2*this.strokeWidth;return a-h/2+","+(u+c/2)+" "+a+","+(u-c/2)+" "+(a+h/2)+","+(u+c/2)},o.prototype.createTips=function(){this.arrow1=k.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(k.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=k.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(k.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(d.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",k.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),k.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.arrow1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(u,0);var h=this.arrow2.transform.baseVal.getItem(0);h.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(h,0)}},o.prototype.setArrowType=function(a){this.arrowType=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({arrowType:this.arrowType},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.arrowType=u.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',o}(Ze),x=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor=h.defaultFillColor,c.strokeWidth=0,c.fillPanel=new ze("Color",h.defaultColorSet,h.defaultFillColor),c.fillPanel.onColorChanged=c.setFillColor,c}return R(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="CoverMarker",o.title="Cover marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',o}(je),T=function(d){function o(a,u,h,c){var te=d.call(this,a,c||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return te.opacities=[],te.opacityBoxes=[],te.opacities=u,te.currentOpacity=h,te.setCurrentOpacity=te.setCurrentOpacity.bind(te),te}return R(o,d),o.prototype.getUi=function(){var a=this,u=document.createElement("div");return u.style.display="flex",u.style.overflow="hidden",u.style.flexGrow="2",u.style.justifyContent="space-between",this.opacities.forEach(function(h){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.padding="5px",c.style.borderWidth="2px",c.style.borderStyle="solid",c.style.borderColor=h===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",c.addEventListener("click",function(){a.setCurrentOpacity(h,c)}),u.appendChild(c);var te=document.createElement("div");te.innerText=100*h+"%",c.appendChild(te),a.opacityBoxes.push(c)}),u},o.prototype.setCurrentOpacity=function(a,u){var h=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(c){c.style.borderColor=c===u?h.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(Ie),_=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.setOpacity=c.setOpacity.bind(c),c.fillColor=h.defaultHighlightColor,c.strokeWidth=0,c.opacity=h.defaultHighlightOpacity,c.fillPanel=new ze("Color",h.defaultColorSet,c.fillColor),c.fillPanel.onColorChanged=c.setFillColor,c.opacityPanel=new T("Opacity",h.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return R(o,d),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&k.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',o}(x),N='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',be=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.bgColor="transparent",c.tipPosition={x:0,y:0},c.tipBase1Position={x:0,y:0},c.tipBase2Position={x:0,y:0},c.tipMoving=!1,c.color=h.defaultStrokeColor,c.bgColor=h.defaultFillColor,c.fontFamily=h.defaultFontFamily,c.defaultSize={x:100,y:30},c.setBgColor=c.setBgColor.bind(c),c.getTipPoints=c.getTipPoints.bind(c),c.positionTip=c.positionTip.bind(c),c.setTipPoints=c.setTipPoints.bind(c),c.colorPanel=new ze("Text color",h.defaultColorSet,c.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),c.colorPanel.onColorChanged=c.setColor,c.bgColorPanel=new ze("Fill color",h.defaultColorSet,c.bgColor,N),c.bgColorPanel.onColorChanged=c.setBgColor,c.fontFamilyPanel=new Ae("Font",h.defaultFontFamilies,h.defaultFontFamily),c.fontFamilyPanel.onFontChanged=c.setFont,c.tipGrip=new nt,c.tipGrip.visual.transform.baseVal.appendItem(k.createTransform()),c.controlBox.appendChild(c.tipGrip.visual),c}return R(o,d),o.prototype.ownsTarget=function(a){return d.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},o.prototype.createTip=function(){k.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=k.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(a,u){this.state==="new"&&d.prototype.pointerDown.call(this,a,u),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(u)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):d.prototype.pointerDown.call(this,a,u)},o.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,d.prototype.pointerUp.call(this,a);else{var u=this.state==="creating";d.prototype.pointerUp.call(this,a),this.setTipPoints(u),this.positionTip()}},o.prototype.manipulate=function(a){if(this.tipMoving){var u=this.unrotatePoint(a);this.tipPosition={x:u.x-this.manipulationStartLeft,y:u.y-this.manipulationStartTop},this.positionTip()}else d.prototype.manipulate.call(this,a)},o.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(k.setAttributes(this.bgRectangle,[["fill",a]]),k.setAttributes(this.tip,[["fill",a]])),this.bgColor=a,this.fillColorChanged(a)},o.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},o.prototype.setTipPoints=function(a){a===void 0&&(a=!1);var u=Math.min(this.height/2,15),h=this.height/5;a&&(this.tipPosition={x:u+h/2,y:this.height+20});var c=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:0},this.tipBase2Position={x:u+h,y:0}):(this.tipBase1Position={x:0,y:u},this.tipBase2Position={x:0,y:u+h}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?c<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-h,y:0},this.tipBase2Position={x:this.width-u,y:0}):(this.tipBase1Position={x:this.width,y:u},this.tipBase2Position={x:this.width,y:u+h}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?c<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-u-h,y:this.height},this.tipBase2Position={x:this.width-u,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-u-h},this.tipBase2Position={x:this.width,y:this.height-u}):c<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(h=this.width/5,u=Math.min(this.width/2,15),this.tipBase1Position={x:u,y:this.height},this.tipBase2Position={x:u+h,y:this.height}):(this.tipBase1Position={x:0,y:this.height-u},this.tipBase2Position={x:0,y:this.height-u-h})},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.positionTip()},o.prototype.positionTip=function(){k.setAttributes(this.tip,[["points",this.getTipPoints()]]);var a=this.tipGrip.visual.transform.baseVal.getItem(0);a.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(a,0)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.positionTip(),d.prototype.select.call(this)},o.prototype.getState=function(){var a=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.bgColor=u.bgColor,this.tipPosition=u.tipPosition,d.prototype.restoreState.call(this,a),this.createTip(),this.setTipPoints()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.tipPosition={x:this.tipPosition.x*a,y:this.tipPosition.y*u},this.positionTip()},o.typeName="CalloutMarker",o.title="Callout marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',o}(We),oe=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.fillColor="transparent",c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.opacity=1,c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.fillColor=h.defaultFillColor,c.setStrokeColor=c.setStrokeColor.bind(c),c.setFillColor=c.setFillColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.setOpacity=c.setOpacity.bind(c),c.createVisual=c.createVisual.bind(c),c.strokePanel=new ze("Line color",S(h.defaultColorSet,["transparent"]),h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.fillPanel=new ze("Fill color",S(h.defaultColorSet,["transparent"]),c.fillColor,N),c.fillPanel.onColorChanged=c.setFillColor,c.strokeWidthPanel=new Ke("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new Ye("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c.opacityPanel=new T("Opacity",h.defaultOpacitySteps,c.opacity),c.opacityPanel.onOpacityChanged=c.setOpacity,c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=k.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){d.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){d.prototype.setSize.call(this),k.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},o.prototype.pointerUp=function(a){d.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&k.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&k.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&k.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&k.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&k.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var u=a;this.fillColor=u.fillColor,this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.opacity=u.opacity,this.createVisual(),d.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,u){d.prototype.scale.call(this,a,u),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(De),Xe=function(d){function o(a,u,h){return d.call(this,a,u,h)||this}return R(o,d),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},o.prototype.createTips=function(){this.tip1=k.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(k.createTransform()),this.visual.appendChild(this.tip1),this.tip2=k.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(k.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(d.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(k.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),k.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),u=this.tip1.transform.baseVal.getItem(0);u.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(u,0);var h=this.tip2.transform.baseVal.getItem(0);h.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(h,0)}},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',o}(Ze),ot=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokePanel.colors=h.defaultColorSet,c.fillColor="transparent",c}return R(o,d),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=d.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(oe),ut=function(){function d(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),d.prototype.addUndoStep=function(o){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(o)||(this.undoStack.push(o),JSON.stringify(this.lastRedoStep)!==JSON.stringify(o)&&this.redoStack.splice(0,this.redoStack.length))},d.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},d.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},d.prototype.undo=function(){if(this.undoStack.length>1){var o=this.undoStack.pop();return o!==void 0&&this.redoStack.push(o),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},d.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},d}(),at=function(d){function o(a,u,h){var c=d.call(this,a,u,h)||this;return c.strokeColor="transparent",c.strokeWidth=0,c.strokeDasharray="",c.curveX=0,c.curveY=0,c.manipulationStartCurveX=0,c.manipulationStartCurveY=0,c.setStrokeColor=c.setStrokeColor.bind(c),c.setStrokeWidth=c.setStrokeWidth.bind(c),c.setStrokeDasharray=c.setStrokeDasharray.bind(c),c.positionGrips=c.positionGrips.bind(c),c.addControlGrips=c.addControlGrips.bind(c),c.adjustVisual=c.adjustVisual.bind(c),c.setupControlBox=c.setupControlBox.bind(c),c.resize=c.resize.bind(c),c.strokeColor=h.defaultColor,c.strokeWidth=h.defaultStrokeWidth,c.strokeDasharray=h.defaultStrokeDasharray,c.strokePanel=new ze("Line color",h.defaultColorSet,h.defaultColor),c.strokePanel.onColorChanged=c.setStrokeColor,c.strokeWidthPanel=new Ke("Line width",h.defaultStrokeWidths,h.defaultStrokeWidth),c.strokeWidthPanel.onWidthChanged=c.setStrokeWidth,c.strokeStylePanel=new Ye("Line style",h.defaultStrokeDasharrays,h.defaultStrokeDasharray),c.strokeStylePanel.onStyleChanged=c.setStrokeDasharray,c}return R(o,d),o.prototype.ownsTarget=function(a){return!(!d.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorCurve&&a!==this.visibleCurve&&!this.curveGrip.ownsTarget(a))},o.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},o.prototype.createVisual=function(){this.visual=k.createGroup(),this.selectorCurve=k.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=k.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)},o.prototype.pointerDown=function(a,u){d.prototype.pointerDown.call(this,a,u),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=a.x,this.curveY=a.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(u)&&(this.activeGrip=this.curveGrip,this._state="resize")},o.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),k.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),k.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),k.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){d.prototype.setupControlBox.call(this),this.curveControlLine1=k.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=k.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)},o.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,d.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){d.prototype.positionGrips.call(this);var a=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-a/2,this.curveY-a/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()))},o.prototype.manipulate=function(a){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+a.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+a.y-this.manipulationStartY),d.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),d.prototype.resize.call(this,a),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual()},o.prototype.scale=function(a,u){this.curveX=this.curveX*a,this.curveY=this.curveY*u,d.prototype.scale.call(this,a,u)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},d.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){d.prototype.restoreState.call(this,a);var u=a;this.strokeColor=u.strokeColor,this.strokeWidth=u.strokeWidth,this.strokeDasharray=u.strokeDasharray,this.curveX=u.curveX,this.curveY=u.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',o}(et),kt=function(){function d(o,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=a}return Object.defineProperty(d.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),d.prototype.preventDefault=function(){this._defaultPrevented=!0},d}(),St=function(d){function o(a,u,h){var c=d.call(this,a,!1)||this;return c.dataUrl=u,c.state=h,c}return R(o,d),o}(kt),ct=function(d){function o(a,u,h){h===void 0&&(h=!1);var c=d.call(this,a,h)||this;return c.marker=u,c}return R(o,d),o}(kt),Ft=function(){function d(){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 d.prototype.addEventListener=function(o,a){this[o].push(a)},d.prototype.removeEventListener=function(o,a){var u=this[o].indexOf(a);u>-1&&this[o].splice(u,1)},d}(),Lt=function(){function d(o){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new xe,this._isOpen=!1,this.undoRedoManager=new ut,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 Ft,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=d.instanceCounter++,this.styles=new M(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=o,this.targetRoot=document.body,this.width=o.clientWidth,this.height=o.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(d.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ve,ie,re,We,ot,oe,_,be,Xe,x,Ze,at]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ve,ie,re,We,oe,_,be]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ve,ie,re,We,_]},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var a=this;this._availableMarkerTypes.splice(0),o.forEach(function(u){if(typeof u=="string"){var h=a.ALL_MARKER_TYPES.find(function(c){return c.typeName===u});h!==void 0&&a._availableMarkerTypes.push(h)}else a._availableMarkerTypes.push(u)})},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(o){this._zoomLevel=o,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(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),d.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),v.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},d.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&E.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=E.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new kt(o))})},d.prototype.render=function(){return w(this,void 0,void 0,function(){var o;return D(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new y).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.markersOnly=this.renderMarkersOnly,o.width=this.renderWidth,o.height=this.renderHeight,[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return a.sent(),[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,a.sent()]}})})},d.prototype.close=function(o){var a=this;if(o===void 0&&(o=!1),this.isOpen){var u=!1;o||this.eventListeners.beforeclose.forEach(function(h){var c=new kt(a,!0);h(c),c.defaultPrevented&&(u=!0)}),u||(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(h){return h(new kt(a))}),this.detachEvents(),this._isOpen=!1)}},d.prototype.addMarkersToToolbar=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];(o=this._availableMarkerTypes).push.apply(o,a)},d.prototype.addRenderEventListener=function(o){this.addEventListener("render",function(a){o(a.dataUrl,a.state)})},d.prototype.removeRenderEventListener=function(o){},d.prototype.addCloseEventListener=function(o){this.addEventListener("close",function(){o()})},d.prototype.removeCloseEventListener=function(o){},d.prototype.setupResizeObserver=function(){var o=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return o.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},d.prototype.onPopupTargetResize=function(){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.editorCanvas.clientWidth/o>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,u=a<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/o;this.resize(a,u)},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.prototype.resize=function(o,a){this._isResizing=!0;var u=o/this.imageWidth,h=a/this.imageHeight;this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(u,h),this._isResizing=!1},d.prototype.scaleMarkers=function(o,a){var u,h=this;this._currentMarker&&this._currentMarker instanceof We?this._currentMarker.scale(o,a):(u=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(c){c!==h._currentMarker&&c.scale(o,a)}),u!==void 0&&this.setCurrentMarker(u)},d.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},d.prototype.setTopLeft=function(){var o=this.editingTarget.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left,this.top=o.top-a.top},d.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},d.prototype.addDefs=function(){for(var o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];this.defs=k.createDefs(),this.addDefsToImage(),(o=this.defs).append.apply(o,a)},d.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},d.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},d.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},d.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},d.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},d.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},d.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},d.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var o=document.createElement("a");o.href="https://markerjs.com/",o.target="_blank",o.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',o.title="Powered by marker.js",o.style.display="grid",o.style.alignItems="center",o.style.justifyItems="center",o.style.padding="3px",o.style.width="20px",o.style.height="20px",this.logoUI.appendChild(o),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},d.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")},d.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"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.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 o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"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 ge(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new _e(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},d.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.removeMarker=function(o){this.markerImage.removeChild(o.container),this.markers.indexOf(o)>-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},d.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())},d.prototype.toolbarButtonClicked=function(o,a){if(o==="marker"&&a!==void 0)this.createNewMarker(a);else if(o==="action")switch(a){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()}},d.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(h){var c=new ct(o,o._currentMarker,!0);h(c),c.defaultPrevented&&(a=!0)}),!a){var u=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(h){return h(new ct(o,u))})}}},d.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(te){var $e=new ct(o,void 0,!0);te($e),$e.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var u=function(te){var $e=h.markers[te];h.setCurrentMarker(h.markers[te]),h._currentMarker.dispose(),h.markerImage.removeChild(h._currentMarker.container),h.markers.splice(h.markers.indexOf(h._currentMarker),1),h.eventListeners.markerdelete.forEach(function(it){return it(new ct(o,$e))})},h=this,c=this.markers.length-1;c>=0;c--)u(c);this.addUndoStep()}},Object.defineProperty(d.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),d.prototype.showNotesEditor=function(){var o;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=(o=this._currentMarker.notes)!==null&&o!==void 0?o:"",this.overlayContainer.appendChild(this.notesArea))},d.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)},d.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},d.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),u=this.undoRedoManager.getLastUndoStep();if(!u||u.width===a.width&&u.height===a.height){var h=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),h<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(c){return c(new kt(o))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(c){return c(new kt(o))})}},d.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},d.prototype.undoStep=function(){var o=this,a=this.undoRedoManager.undo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new kt(o))}))},d.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},d.prototype.redoStep=function(){var o=this,a=this.undoRedoManager.redo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(u){return u(new kt(o))}))},d.prototype.stepZoom=function(){var o=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=o<this.zoomSteps.length-1?this.zoomSteps[o+1]:this.zoomSteps[0]},d.prototype.panTo=function(o){this.contentDiv.scrollBy({left:this.prevPanPoint.x-o.x,top:this.prevPanPoint.y-o.y}),this.prevPanPoint=o},d.prototype.startRenderAndClose=function(){return w(this,void 0,void 0,function(){var o,a,u=this;return D(this,function(h){switch(h.label){case 0:return[4,this.render()];case 1:return o=h.sent(),a=this.getState(),this.eventListeners.render.forEach(function(c){return c(new St(u,o,a))}),this.close(!0),[2]}})})},d.prototype.getState=function(o){o===!0&&this.setCurrentMarker();var a={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(u){return a.markers.push(u.getState())}),a},d.prototype.restoreState=function(o){var a=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);o.markers.forEach(function(u){var h=a._availableMarkerTypes.find(function(te){return te.typeName===u.typeName});if(h!==void 0){var c=a.addNewMarker(h);c.restoreState(u),a.markers.push(c)}}),o.width&&o.height&&(o.width!==this.imageWidth||o.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/o.width,this.imageHeight/o.height),this.eventListeners.restorestate.forEach(function(u){return u(new kt(a))})},d.prototype.addNewMarker=function(o){var a=k.createGroup();return this.markerImage.appendChild(a),new o(a,this.overlayContainer,this.settings)},d.prototype.createNewMarker=function(o){var a,u=this;(a=typeof o=="string"?this._availableMarkerTypes.find(function(h){return h.typeName===o}):o)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(a),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(a.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(h){return h(new ct(u,u._currentMarker))}))},d.prototype.markerCreated=function(o){var a=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(o),this.setCurrentMarker(o),o instanceof ie&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ie):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(u){return u(new ct(a,a._currentMarker))})},d.prototype.colorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=o,this.settings.defaultStrokeColor=o)},d.prototype.fillColorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=o)},d.prototype.markerStateChanged=function(o){var a=this;this.eventListeners.markerchange.forEach(function(u){return u(new ct(a,o))})},d.prototype.setCurrentMarker=function(o){var a=this;this._currentMarker!==o&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(u){return u(new ct(a,a._currentMarker))})),this._currentMarker=o,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(u){return u(new ct(a,a._currentMarker))}))},d.prototype.onPointerDown=function(o){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||o.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0?(this.setCurrentMarker(a),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:o.clientX,y:o.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY))},d.prototype.onDblClick=function(o){if(this._isFocused||this.focus(),this.mode==="select"){var a=this.markers.find(function(u){return u.ownsTarget(o.target)});a!==void 0&&a!==this._currentMarker&&this.setCurrentMarker(a),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target):this.setCurrentMarker()}},d.prototype.onPointerMove=function(o){this.touchPoints!==1&&o.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||o.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(o.clientX,o.clientY)):this.zoomLevel>1&&this.panTo({x:o.clientX,y:o.clientY}))},d.prototype.onPointerUp=function(o){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(o.clientX,o.clientY)),this.isDragging=!1,this.addUndoStep()},d.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},d.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.markerImage.getBoundingClientRect();return{x:(o-u.left)/this.zoomLevel,y:(a-u.top)/this.zoomLevel}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"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()},d.prototype.addLicenseKey=function(o){v.addKey(o)},d.prototype.addEventListener=function(o,a){this.eventListeners.addEventListener(o,a)},d.prototype.removeEventListener=function(o,a){this.eventListeners.removeEventListener(o,a)},d.prototype.renderState=function(o){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(o),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(d.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),d.prototype.focus=function(){var o=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(a){return a(new kt(o))}))},d.prototype.blur=function(){var o=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(a){return a(new kt(o))}))},d.instanceCounter=0,d}();/* **********************************
|
|
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 xt=function(d,o){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(d,o)};function wt(d,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=d}xt(d,o),d.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Tt(d,o,a,u){return new(a||(a=Promise))(function(h,c){function te(st){try{it(u.next(st))}catch(Ge){c(Ge)}}function $e(st){try{it(u.throw(st))}catch(Ge){c(Ge)}}function it(st){var Ge;st.done?h(st.value):(Ge=st.value,Ge instanceof a?Ge:new a(function(gt){gt(Ge)})).then(te,$e)}it((u=u.apply(d,o||[])).next())})}function Bt(d,o){var a,u,h,c,te={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return c={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function $e(it){return function(st){return function(Ge){if(a)throw new TypeError("Generator is already executing.");for(;te;)try{if(a=1,u&&(h=2&Ge[0]?u.return:Ge[0]?u.throw||((h=u.return)&&h.call(u),0):u.next)&&!(h=h.call(u,Ge[1])).done)return h;switch(u=0,h&&(Ge=[2&Ge[0],h.value]),Ge[0]){case 0:case 1:h=Ge;break;case 4:return te.label++,{value:Ge[1],done:!1};case 5:te.label++,u=Ge[1],Ge=[0];continue;case 7:Ge=te.ops.pop(),te.trys.pop();continue;default:if(!(h=te.trys,(h=h.length>0&&h[h.length-1])||Ge[0]!==6&&Ge[0]!==2)){te=0;continue}if(Ge[0]===3&&(!h||Ge[1]>h[0]&&Ge[1]<h[3])){te.label=Ge[1];break}if(Ge[0]===6&&te.label<h[1]){te.label=h[1],h=Ge;break}if(h&&te.label<h[2]){te.label=h[2],te.ops.push(Ge);break}h[2]&&te.ops.pop(),te.trys.pop();continue}Ge=o.call(d,te)}catch(gt){Ge=[6,gt],u=0}finally{a=h=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([it,st])}}}var qt=function(){function d(){}return d.addKey=function(o){d.key=o},Object.defineProperty(d,"isLicensed",{get:function(){return!!d.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(d.key)},enumerable:!1,configurable:!0}),d}(),vt=function(){function d(){}return d.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},d.setAttributes=function(o,a){for(var u=0,h=a;u<h.length;u++){var c=h[u],te=c[0],$e=c[1];o.setAttribute(te,$e)}},d.createRect=function(o,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","rect");return h.setAttribute("width",o.toString()),h.setAttribute("height",a.toString()),u&&d.setAttributes(h,u),h},d.createLine=function(o,a,u,h,c){var te=document.createElementNS("http://www.w3.org/2000/svg","line");return te.setAttribute("x1",o.toString()),te.setAttribute("y1",a.toString()),te.setAttribute("x2",u.toString()),te.setAttribute("y2",h.toString()),c&&d.setAttributes(te,c),te},d.createPolygon=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","polygon");return u.setAttribute("points",o),a&&d.setAttributes(u,a),u},d.createCircle=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","circle");return u.setAttribute("cx",(o/2).toString()),u.setAttribute("cy",(o/2).toString()),u.setAttribute("r",o.toString()),a&&d.setAttributes(u,a),u},d.createEllipse=function(o,a,u){var h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",(o/2).toString()),h.setAttribute("cy",(a/2).toString()),h.setAttribute("rx",(o/2).toString()),h.setAttribute("ry",(a/2).toString()),u&&d.setAttributes(h,u),h},d.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&d.setAttributes(a,o),a},d.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},d.createMarker=function(o,a,u,h,c,te,$e){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return d.setAttributes(it,[["id",o],["orient",a],["markerWidth",u.toString()],["markerHeight",h.toString()],["refX",c.toString()],["refY",te.toString()]]),it.appendChild($e),it},d.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&d.setAttributes(a,o),a},d.createTSpan=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");return u.textContent=o,a&&d.setAttributes(u,a),u},d.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&d.setAttributes(a,o),a},d.createPoint=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return u.x=o,u.y=a,u},d.createPath=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg","path");return u.setAttribute("d",o),a&&d.setAttributes(u,a),u},d.createElement=function(o,a){var u=document.createElementNS("http://www.w3.org/2000/svg",o);return a&&d.setAttributes(u,a),u},d.getHollowRectanglePath=function(o,a,u,h,c,te,$e,it){return"M"+o+","+a+"V"+(a+h)+"H"+(o+u)+"V"+a+"H"+c+"V"+te+"H"+(c+$e)+"V"+(te+it)+"H"+c+"V"+a+"Z"},d}(),vn=function(){function d(o){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(d.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),d.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},d.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},d.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new jt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new jt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new jt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Zt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Zt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},d.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},d}(),jt=function(d,o){this.selector=d,this.style=o},Zt=function(d,o){this.localName=d,this.style=o},pn=function(){function d(){this.blocks=[],this.display=""}return d.prototype.addButtonBlock=function(o){o.className=this.blockClassName,o.buttonClassName=this.buttonClassName,o.buttonColorsClassName=this.buttonColorsClassName,o.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(o)},d.prototype.addElementBlock=function(o){o.className===void 0&&(o.className=this.blockClassName),this.blocks.push(o)},d.prototype.getUI=function(){var o=document.createElement("div");return o.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,o.style.display=this.display,this.blocks.forEach(function(a){return o.appendChild(a.getUI())}),o},d}(),en=function(){function d(){}return d.prototype.getUI=function(){var o=document.createElement("div");if(o.className=this.className,this.minWidth!==void 0&&(o.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":o.style.justifyContent="flex-start";break;case"center":o.style.justifyContent="center";break;case"end":o.style.justifyContent="flex-end"}return o.style.whiteSpace="nowrap",o},d}(),wn=function(d){function o(){var a=d!==null&&d.apply(this,arguments)||this;return a.buttons=[],a}return wt(o,d),o.prototype.addButton=function(a){a.className=this.buttonClassName,a.colorsClassName=this.buttonColorsClassName,a.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(a)},o.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.buttons.forEach(function(u){return a.appendChild(u.getUI())}),a},o}(en),Pt=function(){function d(o,a){this._isActive=!1,this._isHidden=!1,this._icon=o,this.title=a,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(d.prototype,"icon",{get:function(){return this._icon},set:function(o){this._icon=o,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isActive",{get:function(){return this._isActive},set:function(o){this._isActive=o,this.adjustClassName()},enumerable:!1,configurable:!0}),d.prototype.getUI=function(){var o=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return o.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},d.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},d.prototype.hide=function(){this._isHidden=!0},d}(),pt=function(d){function o(){var a=d!==null&&d.apply(this,arguments)||this;return a.elements=[],a}return wt(o,d),o.prototype.addElement=function(a){this.elements.push(a)},o.prototype.getUI=function(){var a=d.prototype.getUI.call(this);return this.elements.forEach(function(u){return a.appendChild(u)}),a},o}(en),on=function(){function d(o,a){this.horizontal=o,this.vertical=a}return Object.defineProperty(d.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),d.prototype.getVerticalLength=function(o){return o/this.ratio},d.prototype.getHorizontalLength=function(o){return o*this.ratio},d}(),_n=function(){function d(){}return d.getIcon=function(o,a){if(o>0&&a>0){var u=new on(o,a),h=u.ratio>=1?20:u.getHorizontalLength(20),c=u.ratio<1?20:u.getVerticalLength(20),te=document.createElementNS("http://www.w3.org/2000/svg","svg");te.setAttribute("xmlns","http://www.w3.org/2000/svg"),te.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(te);var $e=vt.createDefs();te.appendChild($e);var it=vt.createElement("clipPath",[["id","text-bg-clip"]]);$e.appendChild(it);var st=vt.createPath(vt.getHollowRectanglePath((24-h)/2,(24-c)/2,h,c,(24-h)/2+2,(24-c)/2+2,h-4,c-4));te.appendChild(st);var Ge=vt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ge.appendChild(vt.createTSpan(o+":"+a)),te.appendChild(Ge);var gt=Ge.getBBox();vt.setAttributes(Ge,[["x",((24-gt.width)/2).toString()],["y",((24-gt.height)/2-gt.y).toString()]]);var ft=vt.createPath(vt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(gt.width))/2,(24-Math.ceil(gt.height))/2,Math.ceil(gt.width),Math.ceil(gt.height)));return it.appendChild(ft),vt.setAttributes(st,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(te),te.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},d}(),En=function(d){function o(a,u,h){var c=d.call(this,a,u)||this;return c.isDropdownOpen=!1,c.onClick=c.dropdownButtonClicked,c.dropdownButtons=h,c}return wt(o,d),o.prototype.setupDropdown=function(){var a=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(u){u.className=a.className,u.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(u.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},o.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},o.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},o.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},o.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},o.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},o}(Pt),Rt=function(){function d(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=vt.createGroup(),this.visual.appendChild(vt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(vt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return d.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},d.prototype.setCenter=function(o,a){this.visual.childNodes.forEach(function(u){return vt.setAttributes(u,[["cx",o.toString()],["cy",a.toString()]])})},d}(),bn=function(){function d(o,a,u,h){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=o,this.canvasHeight=a,this.margin=u,this.container=h,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(d.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(o){this._aspectRatio=o,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&vt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),d.prototype.open=function(){var o=this;this.cropShadeElement=vt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=vt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(vt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(vt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.verticalGridLines.forEach(function(u){return o.gridContainer.appendChild(u)}),this.cropRectElement=vt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Rt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Rt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Rt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Rt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},d.prototype.setCropRectangle=function(o){this.cropRect=o;var a=Object.assign({},this.cropRect);this.zoomFactor!==1&&(a.width=this.cropRect.width*this.zoomFactor,a.height=this.cropRect.height*this.zoomFactor,a.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-a.width/2,a.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),vt.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var u=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(c,te){var $e=a.y+u*(te+1);vt.setAttributes(c,[["x1",""+a.x],["y1",""+$e],["x2",""+(a.x+a.width)],["y2",""+$e]])});var h=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(c,te){var $e=a.x+h*(te+1);vt.setAttributes(c,[["x1",""+$e],["y1",""+a.y],["x2",""+$e],["y2",""+(a.y+a.height)]])}),vt.setAttributes(this.cropShadeElement,[["d",vt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,a.x,a.y,a.width,a.height)]]),this.topLeftGrip.setCenter(a.x,a.y),this.topRightGrip.setCenter(a.x+a.width,a.y),this.bottomLeftGrip.setCenter(a.x,a.y+a.height),this.bottomRightGrip.setCenter(a.x+a.width,a.y+a.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},d.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)},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.container.getBoundingClientRect();return{x:o-u.left+this.margin,y:a-u.top+this.margin}},d.prototype.onPointerDown=function(o){this.container.setPointerCapture(o.pointerId),this.previousPoint=this.clientToLocalCoordinates(o.clientX,o.clientY),this.cropRectElement===o.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(o.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(o.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(o.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(o.target)&&(this.activeGrip=this.bottomRightGrip)},d.prototype.onPointerMove=function(o){if(this.isMoving)this.move(this.clientToLocalCoordinates(o.clientX,o.clientY));else if(this.activeGrip){var a=this.clientToLocalCoordinates(o.clientX,o.clientY);this.resize(a)}o.preventDefault()},d.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},d.prototype.move=function(o){var a=o.x-this.previousPoint.x,u=o.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,u=-u/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+a),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+u),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},d.prototype.resize=function(o){var a=Object.assign({},this.cropRect),u=o.x-this.previousPoint.x,h=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+u<this.margin&&(u=this.margin-a.x),a.x+=u,a.width=this.cropRect.x+this.cropRect.width-a.x;break;case this.bottomRightGrip:case this.topRightGrip:a.width+u>this.canvasWidth*this.zoomFactor&&(u=this.canvasWidth*this.zoomFactor-a.width),a.width+=u}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(a.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(u),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=h,a.height=this.cropRect.y+this.cropRect.height-a.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?a.height=this.aspectRatio.getVerticalLength(a.width):a.height+=h}a.width<10&&(a.x=this.cropRect.x,a.width=10),a.height<10&&(a.y=this.cropRect.y,a.height=10),this.previousPoint=o,a.x>=this.margin&&a.y>=this.margin&&a.x-this.margin+a.width<=this.canvasWidth&&a.y-this.margin+a.height<=this.canvasHeight&&(this.cropRect=a,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},d.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var o=this.cropRect.x+this.cropRect.width/2,a=this.cropRect.y+this.cropRect.height/2,u=this.aspectRatio.getHorizontalLength(this.cropRect.height),h=this.aspectRatio.getVerticalLength(this.cropRect.width);u/this.canvasWidth<h/this.canvasHeight?this.cropRect.width=u:this.cropRect.height=h,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=o-this.cropRect.width/2,this.cropRect.y=a-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)}},d.prototype.getRescaledRect=function(o,a,u,h,c,te){var $e=u/o,it=h/a;return{x:(c.x-te)*$e+te,y:(c.y-te)*it+te,width:c.width*$e,height:c.height*it}},d.prototype.scaleCanvas=function(o,a){var u=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,a,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=a,this.onCropChange&&this.onCropChange(u),this.setCropRectangle(u)},d}(),un=function(){function d(o){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=o,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(d.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),d.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},d.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},d.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},d.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},d.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();vt.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},d.prototype.positionScaleShape=function(){if(this.scaleShape){var o=this.scaleShape.transform.baseVal.getItem(0);o.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(o,0)}},d.prototype.getVisual=function(){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",this.width+"px"),o.setAttribute("height",this.height+"px"),o.setAttribute("viewBox","0 0 "+this.width+" "+this.height),o.style.flexShrink="0",document.body.appendChild(o);for(var a="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,u=1;u<=this.width/5+10;u++){var h=u%5==0?this.height/3:this.height/6;a+="h4v"+-h+"h1v"+h}a+="v1H0Z",this.scaleShape=vt.createPath(a);var c=vt.createTransform();this.scaleShape.transform.baseVal.appendItem(c),o.appendChild(this.scaleShape),this.angleLabelElement=vt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=vt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var te=vt.createTSpan("");return te.innerHTML="°",this.angleLabelElement.appendChild(te),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},d}(),ei=function(){function d(){this.naturalSize=!1,this.imageType="image/png"}return d.prototype.rasterize=function(o,a,u,h,c,te,$e){var it=this;return new Promise(function(st){var Ge=document.createElement("canvas");Ge.width=o.width.baseVal.value-2*h,Ge.height=o.height.baseVal.value-2*h;var gt=1,ft=1;it.naturalSize===!0?(gt=a.naturalWidth/(o.width.baseVal.value-2*h)/te,ft=a.naturalHeight/(o.height.baseVal.value-2*h)/$e,Ge.width=a.naturalWidth/te,Ge.height=a.naturalHeight/$e):it.width!==void 0&&it.height!==void 0&&(gt=it.width/u.width,ft=it.height/u.height,Ge.width*=gt,Ge.height*=ft);var Nt=Ge.getContext("2d");Nt.translate(Ge.width/2,Ge.height/2),Nt.rotate(c*Math.PI/180),Nt.scale(te,$e),Nt.translate(-Ge.width/2,-Ge.height/2),Nt.drawImage(a,0,0,Ge.width,Ge.height);var cn=document.createElement("canvas");cn.width=u.width*gt,cn.height=u.height*ft,cn.getContext("2d").putImageData(Nt.getImageData((u.x-h)*gt,(u.y-h)*ft,u.width*gt,u.height*ft),0,0),st(cn.toDataURL(it.imageType,it.imageQuality))})},d}(),Qe=function(){function d(o){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=d.instanceCounter++,this.styles=new vn(this.instanceNo),this.target=o,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(d.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"gridLines",{get:function(){return this._gridLines},set:function(o){this._gridLines=o,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(o){this._rotationAngle=o,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"aspectRatio",{get:function(){var o;return(o=this._aspectRatio)!==null&&o!==void 0?o:this.aspectRatios[0]},set:function(o){this._aspectRatio=o},enumerable:!1,configurable:!0}),d.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},d.prototype.show=function(){this.showUI(),this.open()},d.prototype.close=function(o){o===void 0&&(o=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),o||this.closeEventListeners.forEach(function(a){return a()}),this._isOpen=!1)},d.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},d.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},d.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},d.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},d.prototype.setupResizeObserver=function(){var o=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.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))},d.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.contentDiv.clientWidth/o>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*o:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,u=a+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/o;this.resize(a,u)}},d.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},d.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",vt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},d.prototype.resize=function(o,a){this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},d.prototype.setEditingTarget=function(){var o=document.createElement("canvas");o.width=this.target.naturalWidth,o.height=this.target.naturalHeight,o.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var a=o.toDataURL();vt.setAttributes(this.editingTarget,[["href",a]]),this.setEditingTargetSize()},d.prototype.setTopLeft=function(){var o=this.target.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left-this.CANVAS_MARGIN,this.top=o.top-a.top-this.CANVAS_MARGIN},d.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=vt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=vt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=vt.createGroup(),this.editingTargetRotationScaleContainer=vt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var o=vt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(o);var a=vt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=vt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},d.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},d.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=vt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new bn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},d.prototype.zoomToCrop=function(){if(this.cropRect){var o=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,a=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=o+"px "+a+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-o+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-a+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},d.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},d.prototype.cropRectChanged=function(o){this.cropRect=o,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},d.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},d.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"},d.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},d.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,a=this.target.offsetTop>o+this.CANVAS_MARGIN?this.target.offsetTop-(o+this.CANVAS_MARGIN):0;this.coverDiv.style.top=a+"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},d.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},d.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new pn,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 a=new wn;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var u=[];this.aspectRatios.forEach(function(ft){var Nt=new Pt(_n.getIcon(ft.horizontal,ft.vertical),ft.horizontal===0&&ft.vertical===0?"FREE":ft.horizontal+":"+ft.vertical);Nt.onClick=function(){return o.ratioButtonClicked(ft)},u.push(Nt)}),this.aspectRatioButton=new En(_n.getIcon(0,0),"Aspect ratio",u),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,a.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var h=new Pt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");h.isActive=this.isGridVisible,h.onClick=function(){o.isGridVisible=!o.isGridVisible,h.isActive=o.isGridVisible},a.addButton(h);var c=new Pt('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(c.isActive=this.zoomToCropEnabled,c.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,c.isActive=o.zoomToCropEnabled},a.addButton(c),!qt.isLicensed){var te=new pt;this.topToolbar.addElementBlock(te);var $e=document.createElement("div");$e.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var it=document.createElement("a");it.style.color="currentColor",it.href="https://markerjs.com/products/cropro",it.target="_blank",it.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',$e.appendChild(it),te.addElement($e)}var st=new wn;st.minWidth=3*this.toolbarHeight+"px",st.contentAlign="end",this.topToolbar.addButtonBlock(st);var Ge=new Pt('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ge.onClick=this.startRenderAndClose,st.addButton(Ge),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ge.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var gt=new Pt('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");gt.onClick=this.close,st.addButton(gt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(gt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},d.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new pn,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 a=new wn;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var u=new Pt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");u.onClick=this.rotateLeftButtonClicked,a.addButton(u);var h=new Pt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");h.onClick=this.rotateRightButtonClicked,a.addButton(h);var c=new pt;c.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(c),this.straightener=new un("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(st){o.rotateBy(st),o.straightener.angle=o.rotationAngle},c.addElement(this.straightener.getUI());var te=new wn;te.minWidth=2*this.toolbarHeight+"px",te.contentAlign="end",this.bottomToolbar.addButtonBlock(te);var $e=new Pt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");$e.onClick=this.flipHorizontallyButtonClicked,te.addButton($e);var it=new Pt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");it.onClick=this.flipVerticallyButtonClicked,te.addButton(it)},d.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},d.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=_n.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},d.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new on(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},d.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},d.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},d.prototype.restoreState=function(o){if(o){var a=this.cropLayer.getRescaledRect(o.width,o.height,this.imageWidth,this.imageHeight,o.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(a),this.cropRectChanged(a),this.flippedHorizontally=o.flippedHorizontally,this.flippedVertically=o.flippedVertically,this.applyFlip(),this.rotationAngle=o.rotationAngle,this.applyRotation()}},d.prototype.clientToLocalCoordinates=function(o,a){var u=this.cropImage.getBoundingClientRect();return{x:o-u.left,y:a-u.top}},d.prototype.onWindowResize=function(){this.positionUI()},d.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var o=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=o+"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()},d.prototype.rotateLeftButtonClicked=function(){var o=this.rotationAngle-90;this.rotationAngle%90!=0&&(o+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(o)},d.prototype.rotateRightButtonClicked=function(){var o=this.rotationAngle+90;this.rotationAngle%90!=0&&(o-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(o)},d.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},d.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},d.prototype.applyRotation=function(){var o=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var a=this.editingTargetRotationContainer.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(a,0);var u=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/u.width,this.imageHeight/u.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},d.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},d.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},d.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},d.prototype.startRenderAndClose=function(){return Tt(this,void 0,void 0,function(){var o,a;return Bt(this,function(u){switch(u.label){case 0:return[4,this.render()];case 1:return o=u.sent(),a=this.getState(),this.renderEventListeners.forEach(function(h){return h(o,a)}),this.close(!0),[2]}})})},d.prototype.render=function(){return Tt(this,void 0,void 0,function(){var o;return Bt(this,function(a){switch(a.label){case 0:return(o=new ei).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),vt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,o.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 a.sent(),[4,o.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,a.sent()]}})})},d.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Zt("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 Zt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Zt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Zt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*o)+`px;
|
|
height: `+(this.toolbarHeight-2*o)+`px;
|
|
padding: `+o+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Zt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new jt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new jt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Zt("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 Zt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Zt("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 Zt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*o)+`px;
|
|
padding: `+o+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Zt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},d.instanceCounter=0,d}(),Ot=b("8hTe"),Hn=b.n(Ot),zn=/<pre[^>]*>/g;function Yn(d){var o=document.createElement("div");return o.innerHTML=d,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var Jn=qe.a=function(d){var o=d.value,a=o===void 0?"":o,u=d.edit,h=u===void 0?!1:u,c=d.className,te=d.showTextOnly,$e=d.showLines,it=d.replaces,st=d.zoomImg,Ge=d.hasMask,gt=d.style,ft=gt===void 0?{}:gt,Nt=d.stylesPrev,cn=Nt===void 0?{}:Nt,tn=String(a),$t=Object(se.useRef)(),yn=Object(se.useRef)(),Kn=Object(se.useState)(""),mn=Object(F.a)(Kn,2),Vt=mn[0],dn=mn[1],Zn=Object(se.useState)("office"),gn=Object(F.a)(Zn,2),ci=gn[0],Cn=gn[1],jn=function(){var Wt=new Qe(yn.current);Wt.displayMode="popup",Wt.addRenderEventListener(function(){var Sn=Object(ye.a)(V.a.mark(function It(hn){var zt;return V.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return $t.current.style.display="none",ln.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:hn}});case 3:zt=ln.sent,zt!=null&&zt.id&&it(yn.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(zt==null?void 0:zt.id,"?type=").concat(zt.content_type));case 5:case"end":return ln.stop()}},It)}));return function(It){return Sn.apply(this,arguments)}}()),Wt.show()},Gt=function(){var Wt=new Lt(yn.current);Wt.settings.displayMode="popup",Wt.addEventListener("render",function(){var Sn=Object(ye.a)(V.a.mark(function It(hn){var zt;return V.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:if($t.current.style.display="none",!yn.current){ln.next=6;break}return ln.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:hn.dataUrl}});case 4:zt=ln.sent,zt!=null&&zt.id&&it(yn.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(zt==null?void 0:zt.id,"?type=").concat(zt.content_type));case 6:case"end":return ln.stop()}},It)}));return function(It){return Sn.apply(this,arguments)}}()),Wt.show(),window.markerArea=Wt},Ct=Object(se.useMemo)(function(){try{var an=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Wt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Sn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;tn=tn.replace(an,"("+J.a.API_SERVER+"/api/attachments/").replace(Wt,'"'+J.a.API_SERVER+"/api/attachments/").replace(Sn,'"'+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,`
|
|
`),tn=tn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Gn){}var It=G(tn),hn=me();if(tn.match(/\[TOC\]/)&&(It=It.replace("<p>[TOC]</p>",Ce()),Ue()),It=It.replace(/(__special_katext_id_\d+__)/g,function(Gn,ln){var Tn=hn[ln],bi=Tn.type,ii=Tn.expression;return Object(ve.renderToString)(Yn(ii)||"",{displayMode:bi==="block",throwOnError:!1,output:"html"})}),It=It.replace(/▁/g,"\u2581\u2581\u2581"),ee(),te){var zt=document.createElement("div");return zt.innerHTML=It,zt.innerText}return setTimeout(function(){return nn()},500),It},[tn]),lt=Object(se.useRef)();we.WebkitLineClamp=$e,$e&&(ft=Object(Oe.a)(Object(Oe.a)({},ft),we));function An(an){var Wt=an.target;if(Wt.tagName.toUpperCase()==="IMG"){if(st){var Sn=Wt.getAttribute("src");dn(Sn),Cn("image")}}else if(Wt.tagName.toUpperCase()==="A"){var It=Wt.getAttribute("href");if(It.indexOf("office")>-1)an.preventDefault(),dn(It),Cn("office");else if(It.indexOf("application/pdf")>-1)an.preventDefault(),dn(It),Cn("pdf");else if(It.indexOf("type=text")>-1)an.preventDefault(),dn(It),Cn("html");else if(It.startsWith("#")){an.preventDefault();var hn=document.getElementById(It.replace("#",""));hn&&hn.scrollIntoView(!0)}}}var nn=function(){var Wt,Sn=(Wt=lt.current)===null||Wt===void 0?void 0:Wt.querySelectorAll("video");Sn==null||Sn.forEach(function(It){if(It.oncontextmenu=function(){return!1},It.src.indexOf(".m3u8")>-1&&!It.canPlayType("application/vnd.apple.mpegurl")){if(A.a.isSupported()){var hn=new A.a;hn.loadSource(It.src),hn.attachMedia(It)}}})};Object(se.useEffect)(function(){if(lt.current&&Ct&&(Ct.match(zn)&&window.PR.prettyPrint()),lt.current)return lt.current.addEventListener("click",An),function(){lt.current.removeEventListener("click",An),ee(),Ue()}},[Ct,lt.current,An]);var Vn=function(Wt){if(!h)return;Wt.target.nodeName==="IMG"?($t.current.style.display="flex",$t.current.style.width=Wt.target.clientWidth+"px",$t.current.style.height=Wt.target.clientHeight+"px",$t.current.style.top=Wt.target.offsetTop+"px",$t.current.style.left=Wt.target.offsetLeft+"px",yn.current.src=Wt.target.getAttribute("src")):$t.current.style.display="none"};return j.a.createElement("div",{style:{position:"relative"}},j.a.createElement("div",{ref:lt,style:Object(Oe.a)({},ft),className:"".concat(c||""," markdown-body ").concat(Hn.a.mdBody),onMouseOver:Vn,dangerouslySetInnerHTML:{__html:Ct}}),j.a.createElement("div",{ref:$t,className:Hn.a.button},j.a.createElement(Pe.a,null,j.a.createElement(He.a,{onClick:function(){return jn()}},"\u88C1\u526A"),j.a.createElement(He.a,{onClick:function(){return Gt()}},"\u7F16\u8F91"))),j.a.createElement("img",{ref:yn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),j.a.createElement(Re.a,{close:!0,data:Vt,hasMask:Ge,type:Vt!=null&&Vt.length?ci:"",style:Object(Oe.a)({},cn),onClose:function(){return dn("")}}))}},"9VGf":function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Le});var Z=b("q1tI"),Pe=b.n(Z);function Le(He,Oe){var ye=Object(Z.useRef)();Object(Z.useEffect)(function(){ye.current=He}),Object(Z.useEffect)(function(){function F(){ye.current()}if(Oe!==null){var q=setInterval(F,Oe);return function(){return clearInterval(q)}}},[Oe])}},Bd2K:function(yt,qe,b){(function(Z){Z(b("VrN/"),b("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(V,se,j){if(j!=Z.Init&&j&&V.removeKeyMap("autoCloseTags"),!se)return;var Y={name:"autoCloseTags"};(typeof se!="object"||se.whenClosing!==!1)&&(Y["'/'"]=function(ke){return ye(ke)}),(typeof se!="object"||se.whenOpening!==!1)&&(Y["'>'"]=function(ke){return He(ke)}),V.addKeyMap(Y)});var Pe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Le=["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 He(V){if(V.getOption("disableInput"))return Z.Pass;for(var se=V.listSelections(),j=[],Y=V.getOption("autoCloseTags"),ke=0;ke<se.length;ke++){if(!se[ke].empty())return Z.Pass;var de=se[ke].head,B=V.getTokenAt(de),X=Z.innerMode(V.getMode(),B.state),z=X.state,fe=X.mode.xmlCurrentTag&&X.mode.xmlCurrentTag(z),he=fe&&fe.name;if(!he)return Z.Pass;var Ne=X.mode.configuration=="html",Ue=typeof Y=="object"&&Y.dontCloseTags||Ne&&Pe,we=typeof Y=="object"&&Y.indentTags||Ne&&Le;B.end>de.ch&&(he=he.slice(0,he.length-B.end+de.ch));var Q=he.toLowerCase();if(!he||B.type=="string"&&(B.end!=de.ch||!/[\"\']/.test(B.string.charAt(B.string.length-1))||B.string.length==1)||B.type=="tag"&&fe.close||B.string.indexOf("/")==de.ch-B.start-1||Ue&&F(Ue,Q)>-1||q(V,X.mode.xmlCurrentContext&&X.mode.xmlCurrentContext(z)||[],he,de,!0))return Z.Pass;var Ce=typeof Y=="object"&&Y.emptyTags;if(Ce&&F(Ce,he)>-1){j[ke]={text:"/>",newPos:Z.Pos(de.line,de.ch+2)};continue}var ce=we&&F(we,Q)>-1;j[ke]={indent:ce,text:">"+(ce?`
|
|
|
|
`:"")+"</"+he+">",newPos:ce?Z.Pos(de.line+1,0):Z.Pos(de.line,de.ch+1)}}for(var P=typeof Y=="object"&&Y.dontIndentOnAutoClose,ke=se.length-1;ke>=0;ke--){var le=j[ke];V.replaceRange(le.text,se[ke].head,se[ke].anchor,"+insert");var $=V.listSelections().slice(0);$[ke]={head:le.newPos,anchor:le.newPos},V.setSelections($),!P&&le.indent&&(V.indentLine(le.newPos.line,null,!0),V.indentLine(le.newPos.line+1,null,!0))}}function Oe(V,se){for(var j=V.listSelections(),Y=[],ke=se?"/":"</",de=V.getOption("autoCloseTags"),B=typeof de=="object"&&de.dontIndentOnSlash,X=0;X<j.length;X++){if(!j[X].empty())return Z.Pass;var z=j[X].head,fe=V.getTokenAt(z),he=Z.innerMode(V.getMode(),fe.state),Ne=he.state;if(se&&(fe.type=="string"||fe.string.charAt(0)!="<"||fe.start!=z.ch-1))return Z.Pass;var Ue,we=he.mode.name!="xml"&&V.getMode().name=="htmlmixed";if(we&&he.mode.name=="javascript")Ue=ke+"script";else if(we&&he.mode.name=="css")Ue=ke+"style";else{var Q=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(Ne);if(!Q||Q.length&&q(V,Q,Q[Q.length-1],z))return Z.Pass;Ue=ke+Q[Q.length-1]}V.getLine(z.line).charAt(fe.end)!=">"&&(Ue+=">"),Y[X]=Ue}if(V.replaceSelections(Y),j=V.listSelections(),!B)for(var X=0;X<j.length;X++)(X==j.length-1||j[X].head.line<j[X+1].head.line)&&V.indentLine(j[X].head.line)}function ye(V){return V.getOption("disableInput")?Z.Pass:Oe(V,!0)}Z.commands.closeTag=function(V){return Oe(V)};function F(V,se){if(V.indexOf)return V.indexOf(se);for(var j=0,Y=V.length;j<Y;++j)if(V[j]==se)return j;return-1}function q(V,se,j,Y,ke){if(!Z.scanForClosingTag)return!1;var de=Math.min(V.lastLine()+1,Y.line+500),B=Z.scanForClosingTag(V,Y,null,de);if(!B||B.tag!=j)return!1;for(var X=ke?1:0,z=se.length-1;z>=0&&se[z]==j;z--)++X;Y=B.to;for(var z=1;z<X;z++){var fe=Z.scanForClosingTag(V,Y,null,de);if(!fe||fe.tag!=j)return!1;Y=fe.to}return!0}})},BjJ7:function(yt,qe,b){"use strict";b.d(qe,"d",function(){return Pe}),b.d(qe,"c",function(){return Le}),b.d(qe,"e",function(){return He}),b.d(qe,"b",function(){return Oe}),b.d(qe,"a",function(){return F});var Z=b("m3rI");function Pe(q){var V=!0;if(q.length>0){for(var se=0;se<q.length;se++)if(q[se].compile_success==0||!q[se].compile_success){V=!1;break}}else V=!1;return V}function Le(q){for(var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",se=[],j=0;j<q.length;j++){var Y=q[j],ke=V?"".concat(V,"/").concat(Y.name):"".concat(Y.name);se.push({title:Y.name,isLeaf:!(Y.type==="tree"),key:ke})}return se}function He(q,V,se){for(var j=0;j<q.length;j++){var Y=q[j];if(Y.key===V){Y.children=se;break}Y.children&&He(Y.children,V,se)}return q}function Oe(q,V,se){var j;return function(){var Y=this,ke=arguments,de=function(){j=null,se||q.apply(Y,ke)},B=se&&!j;clearTimeout(j),j=setTimeout(de,V),B&&q.apply(Y,ke)}}var ye=!0,F=Z.a.API_SERVER},"C+DQ":function(yt,qe,b){},DlQD:function(yt,qe,b){(function(Z,Pe){yt.exports=Pe()})(this,function(){"use strict";function Z(ie,W){for(var re=0;re<W.length;re++){var x=W[re];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(ie,x.key,x)}}function Pe(ie,W,re){return W&&Z(ie.prototype,W),re&&Z(ie,re),ie}function Le(ie,W){if(!ie)return;if(typeof ie=="string")return He(ie,W);var re=Object.prototype.toString.call(ie).slice(8,-1);if(re==="Object"&&ie.constructor&&(re=ie.constructor.name),re==="Map"||re==="Set")return Array.from(ie);if(re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(re))return He(ie,W)}function He(ie,W){(W==null||W>ie.length)&&(W=ie.length);for(var re=0,x=new Array(W);re<W;re++)x[re]=ie[re];return x}function Oe(ie,W){var re;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(re=Le(ie))||W&&ie&&typeof ie.length=="number"){re&&(ie=re);var x=0;return function(){return x>=ie.length?{done:!0}:{done:!1,value:ie[x++]}}}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 re=ie[Symbol.iterator](),re.next.bind(re)}function ye(ie,W){return W={exports:{}},ie(W,W.exports),W.exports}var F=ye(function(ie){function W(){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 re(x){ie.exports.defaults=x}ie.exports={defaults:W(),getDefaults:W,changeDefaults:re}}),q=F.defaults,V=F.getDefaults,se=F.changeDefaults,j=/[&<>"']/,Y=/[&<>"']/g,ke=/[<>"']|&(?!#?\w+;)/,de=/[<>"']|&(?!#?\w+;)/g,B={"&":"&","<":"<",">":">",'"':""","'":"'"},X=function(W){return B[W]};function z(ie,W){if(W){if(j.test(ie))return ie.replace(Y,X)}else if(ke.test(ie))return ie.replace(de,X);return ie}var fe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function he(ie){return ie.replace(fe,function(W,re){return re=re.toLowerCase(),re==="colon"?":":re.charAt(0)==="#"?re.charAt(1)==="x"?String.fromCharCode(parseInt(re.substring(2),16)):String.fromCharCode(+re.substring(1)):""})}var Ne=/(^|[^\[])\^/g;function Ue(ie,W){ie=ie.source||ie,W=W||"";var re={replace:function(T,_){return _=_.source||_,_=_.replace(Ne,"$1"),ie=ie.replace(T,_),re},getRegex:function(){return new RegExp(ie,W)}};return re}var we=/[^\w:]/g,Q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ce(ie,W,re){if(ie){var x;try{x=decodeURIComponent(he(re)).replace(we,"").toLowerCase()}catch(T){return null}if(x.indexOf("javascript:")===0||x.indexOf("vbscript:")===0||x.indexOf("data:")===0)return null}W&&!Q.test(re)&&(re=O(W,re));try{re=encodeURI(re).replace(/%25/g,"%")}catch(T){return null}return re}var ce={},P=/^[^:]+:\/*[^/]*$/,le=/^([^:]+:)[\s\S]*$/,$=/^([^:]+:\/*[^/]*)[\s\S]*$/;function O(ie,W){ce[" "+ie]||(P.test(ie)?ce[" "+ie]=ie+"/":ce[" "+ie]=U(ie,"/",!0)),ie=ce[" "+ie];var re=ie.indexOf(":")===-1;return W.substring(0,2)==="//"?re?W:ie.replace(le,"$1")+W:W.charAt(0)==="/"?re?W:ie.replace($,"$1")+W:ie+W}var me={exec:function(){}};function ee(ie){for(var W=1,re,x;W<arguments.length;W++){re=arguments[W];for(x in re)Object.prototype.hasOwnProperty.call(re,x)&&(ie[x]=re[x])}return ie}function L(ie,W){var re=ie.replace(/\|/g,function(_,N,be){for(var oe=!1,Xe=N;--Xe>=0&&be[Xe]==="\\";)oe=!oe;return oe?"|":" |"}),x=re.split(/ \|/),T=0;if(x.length>W)x.splice(W);else for(;x.length<W;)x.push("");for(;T<x.length;T++)x[T]=x[T].trim().replace(/\\\|/g,"|");return x}function U(ie,W,re){var x=ie.length;if(x===0)return"";for(var T=0;T<x;){var _=ie.charAt(x-T-1);if(_===W&&!re)T++;else if(_!==W&&re)T++;else break}return ie.substr(0,x-T)}function ae(ie,W){if(ie.indexOf(W[1])===-1)return-1;for(var re=ie.length,x=0,T=0;T<re;T++)if(ie[T]==="\\")T++;else if(ie[T]===W[0])x++;else if(ie[T]===W[1]&&(x--,x<0))return T;return-1}function K(ie){ie&&ie.sanitize&&!ie.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var G={escape:z,unescape:he,edit:Ue,cleanUrl:Ce,resolveUrl:O,noopTest:me,merge:ee,splitCells:L,rtrim:U,findClosingBracket:ae,checkSanitizeDeprecation:K},m=F.defaults,p=G.rtrim,A=G.splitCells,J=G.escape,ve=G.findClosingBracket;function Re(ie,W,re){var x=W.href,T=W.title?J(W.title):null,_=ie[1].replace(/\\([\[\]])/g,"$1");return ie[0].charAt(0)!=="!"?{type:"link",raw:re,href:x,title:T,text:_}:{type:"image",raw:re,href:x,title:T,text:J(_)}}function Se(ie,W){var re=ie.match(/^(\s+)(?:```)/);if(re===null)return W;var x=re[1];return W.split(`
|
|
`).map(function(T){var _=T.match(/^\s+/);if(_===null)return T;var N=_[0];return N.length>=x.length?T.slice(x.length):T}).join(`
|
|
`)}var Te=function(){function ie(re){this.options=re||m}var W=ie.prototype;return W.space=function(x){var T=this.rules.block.newline.exec(x);if(T)return T[0].length>1?{type:"space",raw:T[0]}:{raw:`
|
|
`}},W.code=function(x,T){var _=this.rules.block.code.exec(x);if(_){var N=T[T.length-1];if(N&&N.type==="paragraph")return{raw:_[0],text:_[0].trimRight()};var be=_[0].replace(/^ {4}/gm,"");return{type:"code",raw:_[0],codeBlockStyle:"indented",text:this.options.pedantic?be:p(be,`
|
|
`)}}},W.fences=function(x){var T=this.rules.block.fences.exec(x);if(T){var _=T[0],N=Se(_,T[3]||"");return{type:"code",raw:_,lang:T[2]?T[2].trim():T[2],text:N}}},W.heading=function(x){var T=this.rules.block.heading.exec(x);if(T)return{type:"heading",raw:T[0],depth:T[1].length,text:T[2]}},W.nptable=function(x){var T=this.rules.block.nptable.exec(x);if(T){var _={type:"table",header:A(T[1].replace(/^ *| *\| *$/g,"")),align:T[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:T[3]?T[3].replace(/\n$/,"").split(`
|
|
`):[],raw:T[0]};if(_.header.length===_.align.length){var N=_.align.length,be;for(be=0;be<N;be++)/^ *-+: *$/.test(_.align[be])?_.align[be]="right":/^ *:-+: *$/.test(_.align[be])?_.align[be]="center":/^ *:-+ *$/.test(_.align[be])?_.align[be]="left":_.align[be]=null;for(N=_.cells.length,be=0;be<N;be++)_.cells[be]=A(_.cells[be],_.header.length);return _}}},W.hr=function(x){var T=this.rules.block.hr.exec(x);if(T)return{type:"hr",raw:T[0]}},W.blockquote=function(x){var T=this.rules.block.blockquote.exec(x);if(T){var _=T[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:T[0],text:_}}},W.list=function(x){var T=this.rules.block.list.exec(x);if(T){for(var _=T[0],N=T[2],be=N.length>1,oe=N[N.length-1]===")",Xe={type:"list",raw:_,ordered:be,start:be?+N.slice(0,-1):"",loose:!1,items:[]},ot=T[0].match(this.rules.block.item),ut=!1,at,kt,St,ct,Ft,Lt,xt,wt=ot.length,Tt=0;Tt<wt;Tt++)at=ot[Tt],_=at,kt=at.length,at=at.replace(/^ *([*+-]|\d+[.)]) */,""),~at.indexOf(`
|
|
`)&&(kt-=at.length,at=this.options.pedantic?at.replace(/^ {1,4}/gm,""):at.replace(new RegExp("^ {1,"+kt+"}","gm"),"")),Tt!==wt-1&&(St=this.rules.block.bullet.exec(ot[Tt+1])[0],(be?St.length===1||!oe&&St[St.length-1]===")":St.length>1||this.options.smartLists&&St!==N)&&(ct=ot.slice(Tt+1).join(`
|
|
`),Xe.raw=Xe.raw.substring(0,Xe.raw.length-ct.length),Tt=wt-1)),Ft=ut||/\n\n(?!\s*$)/.test(at),Tt!==wt-1&&(ut=at.charAt(at.length-1)===`
|
|
`,Ft||(Ft=ut)),Ft&&(Xe.loose=!0),Lt=/^\[[ xX]\] /.test(at),xt=void 0,Lt&&(xt=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),Xe.items.push({type:"list_item",raw:_,task:Lt,checked:xt,loose:Ft,text:at});return Xe}},W.html=function(x){var T=this.rules.block.html.exec(x);if(T)return{type:this.options.sanitize?"paragraph":"html",raw:T[0],pre:!this.options.sanitizer&&(T[1]==="pre"||T[1]==="script"||T[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(T[0]):J(T[0]):T[0]}},W.def=function(x){var T=this.rules.block.def.exec(x);if(T){T[3]&&(T[3]=T[3].substring(1,T[3].length-1));var _=T[1].toLowerCase().replace(/\s+/g," ");return{tag:_,raw:T[0],href:T[2],title:T[3]}}},W.table=function(x){var T=this.rules.block.table.exec(x);if(T){var _={type:"table",header:A(T[1].replace(/^ *| *\| *$/g,"")),align:T[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:T[3]?T[3].replace(/\n$/,"").split(`
|
|
`):[]};if(_.header.length===_.align.length){_.raw=T[0];var N=_.align.length,be;for(be=0;be<N;be++)/^ *-+: *$/.test(_.align[be])?_.align[be]="right":/^ *:-+: *$/.test(_.align[be])?_.align[be]="center":/^ *:-+ *$/.test(_.align[be])?_.align[be]="left":_.align[be]=null;for(N=_.cells.length,be=0;be<N;be++)_.cells[be]=A(_.cells[be].replace(/^ *\| *| *\| *$/g,""),_.header.length);return _}}},W.lheading=function(x){var T=this.rules.block.lheading.exec(x);if(T)return{type:"heading",raw:T[0],depth:T[2].charAt(0)==="="?1:2,text:T[1]}},W.paragraph=function(x){var T=this.rules.block.paragraph.exec(x);if(T)return{type:"paragraph",raw:T[0],text:T[1].charAt(T[1].length-1)===`
|
|
`?T[1].slice(0,-1):T[1]}},W.text=function(x,T){var _=this.rules.block.text.exec(x);if(_){var N=T[T.length-1];return N&&N.type==="text"?{raw:_[0],text:_[0]}:{type:"text",raw:_[0],text:_[0]}}},W.escape=function(x){var T=this.rules.inline.escape.exec(x);if(T)return{type:"escape",raw:T[0],text:J(T[1])}},W.tag=function(x,T,_){var N=this.rules.inline.tag.exec(x);if(N)return!T&&/^<a /i.test(N[0])?T=!0:T&&/^<\/a>/i.test(N[0])&&(T=!1),!_&&/^<(pre|code|kbd|script)(\s|>)/i.test(N[0])?_=!0:_&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(N[0])&&(_=!1),{type:this.options.sanitize?"text":"html",raw:N[0],inLink:T,inRawBlock:_,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(N[0]):J(N[0]):N[0]}},W.link=function(x){var T=this.rules.inline.link.exec(x);if(T){var _=ve(T[2],"()");if(_>-1){var N=T[0].indexOf("!")===0?5:4,be=N+T[1].length+_;T[2]=T[2].substring(0,_),T[0]=T[0].substring(0,be).trim(),T[3]=""}var oe=T[2],Xe="";if(this.options.pedantic){var ot=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(oe);ot?(oe=ot[1],Xe=ot[3]):Xe=""}else Xe=T[3]?T[3].slice(1,-1):"";oe=oe.trim().replace(/^<([\s\S]*)>$/,"$1");var ut=Re(T,{href:oe&&oe.replace(this.rules.inline._escapes,"$1"),title:Xe&&Xe.replace(this.rules.inline._escapes,"$1")},T[0]);return ut}},W.reflink=function(x,T){var _;if((_=this.rules.inline.reflink.exec(x))||(_=this.rules.inline.nolink.exec(x))){var N=(_[2]||_[1]).replace(/\s+/g," ");if(N=T[N.toLowerCase()],!N||!N.href){var be=_[0].charAt(0);return{type:"text",raw:be,text:be}}var oe=Re(_,N,_[0]);return oe}},W.strong=function(x,T,_){_===void 0&&(_="");var N=this.rules.inline.strong.start.exec(x);if(N&&(!N[1]||N[1]&&(_===""||this.rules.inline.punctuation.exec(_)))){T=T.slice(-1*x.length);var be=N[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;be.lastIndex=0;for(var oe;(N=be.exec(T))!=null;)if(oe=this.rules.inline.strong.middle.exec(T.slice(0,N.index+3)),oe)return{type:"strong",raw:x.slice(0,oe[0].length),text:x.slice(2,oe[0].length-2)}}},W.em=function(x,T,_){_===void 0&&(_="");var N=this.rules.inline.em.start.exec(x);if(N&&(!N[1]||N[1]&&(_===""||this.rules.inline.punctuation.exec(_)))){T=T.slice(-1*x.length);var be=N[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;be.lastIndex=0;for(var oe;(N=be.exec(T))!=null;)if(oe=this.rules.inline.em.middle.exec(T.slice(0,N.index+2)),oe)return{type:"em",raw:x.slice(0,oe[0].length),text:x.slice(1,oe[0].length-1)}}},W.codespan=function(x){var T=this.rules.inline.code.exec(x);if(T){var _=T[2].replace(/\n/g," "),N=/[^ ]/.test(_),be=_.startsWith(" ")&&_.endsWith(" ");return N&&be&&(_=_.substring(1,_.length-1)),_=J(_,!0),{type:"codespan",raw:T[0],text:_}}},W.br=function(x){var T=this.rules.inline.br.exec(x);if(T)return{type:"br",raw:T[0]}},W.del=function(x){var T=this.rules.inline.del.exec(x);if(T)return{type:"del",raw:T[0],text:T[1]}},W.autolink=function(x,T){var _=this.rules.inline.autolink.exec(x);if(_){var N,be;return _[2]==="@"?(N=J(this.options.mangle?T(_[1]):_[1]),be="mailto:"+N):(N=J(_[1]),be=N),{type:"link",raw:_[0],text:N,href:be,tokens:[{type:"text",raw:N,text:N}]}}},W.url=function(x,T){var _;if(_=this.rules.inline.url.exec(x)){var N,be;if(_[2]==="@")N=J(this.options.mangle?T(_[0]):_[0]),be="mailto:"+N;else{var oe;do oe=_[0],_[0]=this.rules.inline._backpedal.exec(_[0])[0];while(oe!==_[0]);N=J(_[0]),_[1]==="www."?be="http://"+N:be=N}return{type:"link",raw:_[0],text:N,href:be,tokens:[{type:"text",raw:N,text:N}]}}},W.inlineText=function(x,T,_){var N=this.rules.inline.text.exec(x);if(N){var be;return T?be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(N[0]):J(N[0]):N[0]:be=J(this.options.smartypants?_(N[0]):N[0]),{type:"text",raw:N[0],text:be}}},ie}(),R=G.noopTest,w=G.edit,D=G.merge,S={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:R,table:R,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};S._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,S._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,S.def=w(S.def).replace("label",S._label).replace("title",S._title).getRegex(),S.bullet=/(?:[*+-]|\d{1,9}[.)])/,S.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,S.item=w(S.item,"gm").replace(/bull/g,S.bullet).getRegex(),S.list=w(S.list).replace(/bull/g,S.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+S.def.source+")").getRegex(),S._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",S._comment=/<!--(?!-?>)[\s\S]*?-->/,S.html=w(S.html,"i").replace("comment",S._comment).replace("tag",S._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S.paragraph=w(S._paragraph).replace("hr",S.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",S._tag).getRegex(),S.blockquote=w(S.blockquote).replace("paragraph",S.paragraph).getRegex(),S.normal=D({},S),S.gfm=D({},S.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*|$)"}),S.gfm.nptable=w(S.gfm.nptable).replace("hr",S.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",S._tag).getRegex(),S.gfm.table=w(S.gfm.table).replace("hr",S.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",S._tag).getRegex(),S.pedantic=D({},S.normal,{html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",S._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:R,paragraph:w(S.normal._paragraph).replace("hr",S.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",S.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var k={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};k._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",k.punctuation=w(k.punctuation).replace(/punctuation/g,k._punctuation).getRegex(),k._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",k._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",k.em.start=w(k.em.start).replace(/punctuation/g,k._punctuation).getRegex(),k.em.middle=w(k.em.middle).replace(/punctuation/g,k._punctuation).replace(/overlapSkip/g,k._overlapSkip).getRegex(),k.em.endAst=w(k.em.endAst,"g").replace(/punctuation/g,k._punctuation).getRegex(),k.em.endUnd=w(k.em.endUnd,"g").replace(/punctuation/g,k._punctuation).getRegex(),k.strong.start=w(k.strong.start).replace(/punctuation/g,k._punctuation).getRegex(),k.strong.middle=w(k.strong.middle).replace(/punctuation/g,k._punctuation).replace(/blockSkip/g,k._blockSkip).getRegex(),k.strong.endAst=w(k.strong.endAst,"g").replace(/punctuation/g,k._punctuation).getRegex(),k.strong.endUnd=w(k.strong.endUnd,"g").replace(/punctuation/g,k._punctuation).getRegex(),k.blockSkip=w(k._blockSkip,"g").getRegex(),k.overlapSkip=w(k._overlapSkip,"g").getRegex(),k._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,k._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,k._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])?)+(?![-_])/,k.autolink=w(k.autolink).replace("scheme",k._scheme).replace("email",k._email).getRegex(),k._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,k.tag=w(k.tag).replace("comment",S._comment).replace("attribute",k._attribute).getRegex(),k._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,k._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,k._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,k.link=w(k.link).replace("label",k._label).replace("href",k._href).replace("title",k._title).getRegex(),k.reflink=w(k.reflink).replace("label",k._label).getRegex(),k.reflinkSearch=w(k.reflinkSearch,"g").replace("reflink",k.reflink).replace("nolink",k.nolink).getRegex(),k.normal=D({},k),k.pedantic=D({},k.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:w(/^!?\[(label)\]\((.*?)\)/).replace("label",k._label).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k._label).getRegex()}),k.gfm=D({},k.normal,{escape:w(k.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),k.gfm.url=w(k.gfm.url,"i").replace("email",k.gfm._extended_email).getRegex(),k.breaks=D({},k.gfm,{br:w(k.br).replace("{2,}","*").getRegex(),text:w(k.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var v={block:S,inline:k},y=F.defaults,E=v.block,M=v.inline;function ue(ie){return ie.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function I(ie){var W="",re,x,T=ie.length;for(re=0;re<T;re++)x=ie.charCodeAt(re),Math.random()>.5&&(x="x"+x.toString(16)),W+="&#"+x+";";return W}var ge=function(){function ie(re){this.tokens=[],this.tokens.links=Object.create(null),this.options=re||y,this.options.tokenizer=this.options.tokenizer||new Te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var x={block:E.normal,inline:M.normal};this.options.pedantic?(x.block=E.pedantic,x.inline=M.pedantic):this.options.gfm&&(x.block=E.gfm,this.options.breaks?x.inline=M.breaks:x.inline=M.gfm),this.tokenizer.rules=x}ie.lex=function(x,T){var _=new ie(T);return _.lex(x)};var W=ie.prototype;return W.lex=function(x){return x=x.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(x,this.tokens,!0),this.inline(this.tokens),this.tokens},W.blockTokens=function(x,T,_){T===void 0&&(T=[]),_===void 0&&(_=!0),x=x.replace(/^ +$/gm,"");for(var N,be,oe,Xe;x;){if(N=this.tokenizer.space(x)){x=x.substring(N.raw.length),N.type&&T.push(N);continue}if(N=this.tokenizer.code(x,T)){x=x.substring(N.raw.length),N.type?T.push(N):(Xe=T[T.length-1],Xe.raw+=`
|
|
`+N.raw,Xe.text+=`
|
|
`+N.text);continue}if(N=this.tokenizer.fences(x)){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.heading(x)){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.nptable(x)){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.hr(x)){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.blockquote(x)){x=x.substring(N.raw.length),N.tokens=this.blockTokens(N.text,[],_),T.push(N);continue}if(N=this.tokenizer.list(x)){for(x=x.substring(N.raw.length),oe=N.items.length,be=0;be<oe;be++)N.items[be].tokens=this.blockTokens(N.items[be].text,[],!1);T.push(N);continue}if(N=this.tokenizer.html(x)){x=x.substring(N.raw.length),T.push(N);continue}if(_&&(N=this.tokenizer.def(x))){x=x.substring(N.raw.length),this.tokens.links[N.tag]||(this.tokens.links[N.tag]={href:N.href,title:N.title});continue}if(N=this.tokenizer.table(x)){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.lheading(x)){x=x.substring(N.raw.length),T.push(N);continue}if(_&&(N=this.tokenizer.paragraph(x))){x=x.substring(N.raw.length),T.push(N);continue}if(N=this.tokenizer.text(x,T)){x=x.substring(N.raw.length),N.type?T.push(N):(Xe=T[T.length-1],Xe.raw+=`
|
|
`+N.raw,Xe.text+=`
|
|
`+N.text);continue}if(x){var ot="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return T},W.inline=function(x){var T,_,N,be,oe,Xe,ot=x.length;for(T=0;T<ot;T++){Xe=x[T];switch(Xe.type){case"paragraph":case"text":case"heading":{Xe.tokens=[],this.inlineTokens(Xe.text,Xe.tokens);break}case"table":{for(Xe.tokens={header:[],cells:[]},be=Xe.header.length,_=0;_<be;_++)Xe.tokens.header[_]=[],this.inlineTokens(Xe.header[_],Xe.tokens.header[_]);for(be=Xe.cells.length,_=0;_<be;_++)for(oe=Xe.cells[_],Xe.tokens.cells[_]=[],N=0;N<oe.length;N++)Xe.tokens.cells[_][N]=[],this.inlineTokens(oe[N],Xe.tokens.cells[_][N]);break}case"blockquote":{this.inline(Xe.tokens);break}case"list":{for(be=Xe.items.length,_=0;_<be;_++)this.inline(Xe.items[_].tokens);break}}}return x},W.inlineTokens=function(x,T,_,N,be){T===void 0&&(T=[]),_===void 0&&(_=!1),N===void 0&&(N=!1),be===void 0&&(be="");var oe,Xe=x,ot;if(this.tokens.links){var ut=Object.keys(this.tokens.links);if(ut.length>0)for(;(ot=this.tokenizer.rules.inline.reflinkSearch.exec(Xe))!=null;)ut.includes(ot[0].slice(ot[0].lastIndexOf("[")+1,-1))&&(Xe=Xe.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+Xe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ot=this.tokenizer.rules.inline.blockSkip.exec(Xe))!=null;)Xe=Xe.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+Xe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;x;){if(oe=this.tokenizer.escape(x)){x=x.substring(oe.raw.length),T.push(oe);continue}if(oe=this.tokenizer.tag(x,_,N)){x=x.substring(oe.raw.length),_=oe.inLink,N=oe.inRawBlock,T.push(oe);continue}if(oe=this.tokenizer.link(x)){x=x.substring(oe.raw.length),oe.type==="link"&&(oe.tokens=this.inlineTokens(oe.text,[],!0,N)),T.push(oe);continue}if(oe=this.tokenizer.reflink(x,this.tokens.links)){x=x.substring(oe.raw.length),oe.type==="link"&&(oe.tokens=this.inlineTokens(oe.text,[],!0,N)),T.push(oe);continue}if(oe=this.tokenizer.strong(x,Xe,be)){x=x.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],_,N),T.push(oe);continue}if(oe=this.tokenizer.em(x,Xe,be)){x=x.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],_,N),T.push(oe);continue}if(oe=this.tokenizer.codespan(x)){x=x.substring(oe.raw.length),T.push(oe);continue}if(oe=this.tokenizer.br(x)){x=x.substring(oe.raw.length),T.push(oe);continue}if(oe=this.tokenizer.del(x)){x=x.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],_,N),T.push(oe);continue}if(oe=this.tokenizer.autolink(x,I)){x=x.substring(oe.raw.length),T.push(oe);continue}if(!_&&(oe=this.tokenizer.url(x,I))){x=x.substring(oe.raw.length),T.push(oe);continue}if(oe=this.tokenizer.inlineText(x,N,ue)){x=x.substring(oe.raw.length),be=oe.raw.slice(-1),T.push(oe);continue}if(x){var at="Infinite loop on byte: "+x.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return T},Pe(ie,null,[{key:"rules",get:function(){return{block:E,inline:M}}}]),ie}(),_e=F.defaults,Ie=G.cleanUrl,ze=G.escape,Be=function(){function ie(re){this.options=re||_e}var W=ie.prototype;return W.code=function(x,T,_){var N=(T||"").match(/\S*/)[0];if(this.options.highlight){var be=this.options.highlight(x,N);be!=null&&be!==x&&(_=!0,x=be)}return N?'<pre><code class="'+this.options.langPrefix+ze(N,!0)+'">'+(_?x:ze(x,!0))+`</code></pre>
|
|
`:"<pre><code>"+(_?x:ze(x,!0))+`</code></pre>
|
|
`},W.blockquote=function(x){return`<blockquote>
|
|
`+x+`</blockquote>
|
|
`},W.html=function(x){return x},W.heading=function(x,T,_,N){return this.options.headerIds?"<h"+T+' id="'+this.options.headerPrefix+N.slug(_)+'">'+x+"</h"+T+`>
|
|
`:"<h"+T+">"+x+"</h"+T+`>
|
|
`},W.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},W.list=function(x,T,_){var N=T?"ol":"ul",be=T&&_!==1?' start="'+_+'"':"";return"<"+N+be+`>
|
|
`+x+"</"+N+`>
|
|
`},W.listitem=function(x){return"<li>"+x+`</li>
|
|
`},W.checkbox=function(x){return"<input "+(x?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},W.paragraph=function(x){return"<p>"+x+`</p>
|
|
`},W.table=function(x,T){return T&&(T="<tbody>"+T+"</tbody>"),`<table>
|
|
<thead>
|
|
`+x+`</thead>
|
|
`+T+`</table>
|
|
`},W.tablerow=function(x){return`<tr>
|
|
`+x+`</tr>
|
|
`},W.tablecell=function(x,T){var _=T.header?"th":"td",N=T.align?"<"+_+' align="'+T.align+'">':"<"+_+">";return N+x+"</"+_+`>
|
|
`},W.strong=function(x){return"<strong>"+x+"</strong>"},W.em=function(x){return"<em>"+x+"</em>"},W.codespan=function(x){return"<code>"+x+"</code>"},W.br=function(){return this.options.xhtml?"<br/>":"<br>"},W.del=function(x){return"<del>"+x+"</del>"},W.link=function(x,T,_){if(x=Ie(this.options.sanitize,this.options.baseUrl,x),x===null)return _;var N='<a href="'+ze(x)+'"';return T&&(N+=' title="'+T+'"'),N+=">"+_+"</a>",N},W.image=function(x,T,_){if(x=Ie(this.options.sanitize,this.options.baseUrl,x),x===null)return _;var N='<img src="'+x+'" alt="'+_+'"';return T&&(N+=' title="'+T+'"'),N+=this.options.xhtml?"/>":">",N},W.text=function(x){return x},ie}(),Fe=function(){function ie(){}var W=ie.prototype;return W.strong=function(x){return x},W.em=function(x){return x},W.codespan=function(x){return x},W.del=function(x){return x},W.html=function(x){return x},W.text=function(x){return x},W.link=function(x,T,_){return""+_},W.image=function(x,T,_){return""+_},W.br=function(){return""},ie}(),nt=function(){function ie(){this.seen={}}var W=ie.prototype;return W.slug=function(x){var T=x.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(T)){var _=T;do this.seen[_]++,T=_+"-"+this.seen[_];while(this.seen.hasOwnProperty(T))}return this.seen[T]=0,T},ie}(),pe=F.defaults,De=G.unescape,je=function(){function ie(re){this.options=re||pe,this.options.renderer=this.options.renderer||new Be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Fe,this.slugger=new nt}ie.parse=function(x,T){var _=new ie(T);return _.parse(x)};var W=ie.prototype;return W.parse=function(x,T){T===void 0&&(T=!0);var _="",N,be,oe,Xe,ot,ut,at,kt,St,ct,Ft,Lt,xt,wt,Tt,Bt,qt,vt,vn=x.length;for(N=0;N<vn;N++){ct=x[N];switch(ct.type){case"space":continue;case"hr":{_+=this.renderer.hr();continue}case"heading":{_+=this.renderer.heading(this.parseInline(ct.tokens),ct.depth,De(this.parseInline(ct.tokens,this.textRenderer)),this.slugger);continue}case"code":{_+=this.renderer.code(ct.text,ct.lang,ct.escaped);continue}case"table":{for(kt="",at="",Xe=ct.header.length,be=0;be<Xe;be++)at+=this.renderer.tablecell(this.parseInline(ct.tokens.header[be]),{header:!0,align:ct.align[be]});for(kt+=this.renderer.tablerow(at),St="",Xe=ct.cells.length,be=0;be<Xe;be++){for(ut=ct.tokens.cells[be],at="",ot=ut.length,oe=0;oe<ot;oe++)at+=this.renderer.tablecell(this.parseInline(ut[oe]),{header:!1,align:ct.align[oe]});St+=this.renderer.tablerow(at)}_+=this.renderer.table(kt,St);continue}case"blockquote":{St=this.parse(ct.tokens),_+=this.renderer.blockquote(St);continue}case"list":{for(Ft=ct.ordered,Lt=ct.start,xt=ct.loose,Xe=ct.items.length,St="",be=0;be<Xe;be++)Tt=ct.items[be],Bt=Tt.checked,qt=Tt.task,wt="",Tt.task&&(vt=this.renderer.checkbox(Bt),xt?Tt.tokens.length>0&&Tt.tokens[0].type==="text"?(Tt.tokens[0].text=vt+" "+Tt.tokens[0].text,Tt.tokens[0].tokens&&Tt.tokens[0].tokens.length>0&&Tt.tokens[0].tokens[0].type==="text"&&(Tt.tokens[0].tokens[0].text=vt+" "+Tt.tokens[0].tokens[0].text)):Tt.tokens.unshift({type:"text",text:vt}):wt+=vt),wt+=this.parse(Tt.tokens,xt),St+=this.renderer.listitem(wt,qt,Bt);_+=this.renderer.list(St,Ft,Lt);continue}case"html":{_+=this.renderer.html(ct.text);continue}case"paragraph":{_+=this.renderer.paragraph(this.parseInline(ct.tokens));continue}case"text":{for(St=ct.tokens?this.parseInline(ct.tokens):ct.text;N+1<vn&&x[N+1].type==="text";)ct=x[++N],St+=`
|
|
`+(ct.tokens?this.parseInline(ct.tokens):ct.text);_+=T?this.renderer.paragraph(St):St;continue}default:{var jt='Token with "'+ct.type+'" type was not found.';if(this.options.silent){console.error(jt);return}else throw new Error(jt)}}}return _},W.parseInline=function(x,T){T=T||this.renderer;var _="",N,be,oe=x.length;for(N=0;N<oe;N++){be=x[N];switch(be.type){case"escape":{_+=T.text(be.text);break}case"html":{_+=T.html(be.text);break}case"link":{_+=T.link(be.href,be.title,this.parseInline(be.tokens,T));break}case"image":{_+=T.image(be.href,be.title,be.text);break}case"strong":{_+=T.strong(this.parseInline(be.tokens,T));break}case"em":{_+=T.em(this.parseInline(be.tokens,T));break}case"codespan":{_+=T.codespan(be.text);break}case"br":{_+=T.br();break}case"del":{_+=T.del(this.parseInline(be.tokens,T));break}case"text":{_+=T.text(be.text);break}default:{var Xe='Token with "'+be.type+'" type was not found.';if(this.options.silent){console.error(Xe);return}else throw new Error(Xe)}}}return _},ie}(),Ke=G.merge,Ye=G.checkSanitizeDeprecation,Ve=G.escape,xe=F.getDefaults,et=F.changeDefaults,Ze=F.defaults;function Ae(ie,W,re){if(typeof ie=="undefined"||ie===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ie!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ie)+", string expected");if(typeof W=="function"&&(re=W,W=null),W=Ke({},Ae.defaults,W||{}),Ye(W),re){var x=W.highlight,T;try{T=ge.lex(ie,W)}catch(oe){return re(oe)}var _=function(Xe){var ot;if(!Xe)try{ot=je.parse(T,W)}catch(ut){Xe=ut}return W.highlight=x,Xe?re(Xe):re(null,ot)};if(!x||x.length<3)return _();if(delete W.highlight,!T.length)return _();var N=0;Ae.walkTokens(T,function(oe){oe.type==="code"&&(N++,setTimeout(function(){x(oe.text,oe.lang,function(Xe,ot){if(Xe)return _(Xe);ot!=null&&ot!==oe.text&&(oe.text=ot,oe.escaped=!0),N--,N===0&&_()})},0))}),N===0&&_();return}try{var be=ge.lex(ie,W);return W.walkTokens&&Ae.walkTokens(be,W.walkTokens),je.parse(be,W)}catch(oe){if(oe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,W.silent)return"<p>An error occurred:</p><pre>"+Ve(oe.message+"",!0)+"</pre>";throw oe}}Ae.options=Ae.setOptions=function(ie){return Ke(Ae.defaults,ie),et(Ae.defaults),Ae},Ae.getDefaults=xe,Ae.defaults=Ze,Ae.use=function(ie){var W=Ke({},ie);if(ie.renderer&&function(){var x=Ae.defaults.renderer||new Be,T=function(be){var oe=x[be];x[be]=function(){for(var Xe=arguments.length,ot=new Array(Xe),ut=0;ut<Xe;ut++)ot[ut]=arguments[ut];var at=ie.renderer[be].apply(x,ot);return at===!1&&(at=oe.apply(x,ot)),at}};for(var _ in ie.renderer)T(_);W.renderer=x}(),ie.tokenizer&&function(){var x=Ae.defaults.tokenizer||new Te,T=function(be){var oe=x[be];x[be]=function(){for(var Xe=arguments.length,ot=new Array(Xe),ut=0;ut<Xe;ut++)ot[ut]=arguments[ut];var at=ie.tokenizer[be].apply(x,ot);return at===!1&&(at=oe.apply(x,ot)),at}};for(var _ in ie.tokenizer)T(_);W.tokenizer=x}(),ie.walkTokens){var re=Ae.defaults.walkTokens;W.walkTokens=function(x){ie.walkTokens(x),re&&re(x)}}Ae.setOptions(W)},Ae.walkTokens=function(ie,W){for(var re=Oe(ie),x;!(x=re()).done;){var T=x.value;W(T);switch(T.type){case"table":{for(var _=Oe(T.tokens.header),N;!(N=_()).done;){var be=N.value;Ae.walkTokens(be,W)}for(var oe=Oe(T.tokens.cells),Xe;!(Xe=oe()).done;)for(var ot=Xe.value,ut=Oe(ot),at;!(at=ut()).done;){var kt=at.value;Ae.walkTokens(kt,W)}break}case"list":{Ae.walkTokens(T.items,W);break}default:T.tokens&&Ae.walkTokens(T.tokens,W)}}},Ae.Parser=je,Ae.parser=je.parse,Ae.Renderer=Be,Ae.TextRenderer=Fe,Ae.Lexer=ge,Ae.lexer=ge.lex,Ae.Tokenizer=Te,Ae.Slugger=nt,Ae.parse=Ae;var We=Ae;return We})},ELLl:function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){var Pe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Le=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(B,X,z){z&&z!=Z.Init&&(B.removeKeyMap(Oe),B.state.closeBrackets=null),X&&(ye(He(X,"pairs")),B.state.closeBrackets=X,B.addKeyMap(Oe))});function He(B,X){return X=="pairs"&&typeof B=="string"?B:typeof B=="object"&&B[X]!=null?B[X]:Pe[X]}var Oe={Backspace:V,Enter:se};function ye(B){for(var X=0;X<B.length;X++){var z=B.charAt(X),fe="'"+z+"'";Oe[fe]||(Oe[fe]=F(z))}}ye(Pe.pairs+"`");function F(B){return function(X){return Y(X,B)}}function q(B){var X=B.state.closeBrackets;if(!X||X.override)return X;var z=B.getModeAt(B.getCursor());return z.closeBrackets||X}function V(B){var X=q(B);if(!X||B.getOption("disableInput"))return Z.Pass;for(var z=He(X,"pairs"),fe=B.listSelections(),he=0;he<fe.length;he++){if(!fe[he].empty())return Z.Pass;var Ne=ke(B,fe[he].head);if(!Ne||z.indexOf(Ne)%2!=0)return Z.Pass}for(var he=fe.length-1;he>=0;he--){var Ue=fe[he].head;B.replaceRange("",Le(Ue.line,Ue.ch-1),Le(Ue.line,Ue.ch+1),"+delete")}}function se(B){var X=q(B),z=X&&He(X,"explode");if(!z||B.getOption("disableInput"))return Z.Pass;for(var fe=B.listSelections(),he=0;he<fe.length;he++){if(!fe[he].empty())return Z.Pass;var Ne=ke(B,fe[he].head);if(!Ne||z.indexOf(Ne)%2!=0)return Z.Pass}B.operation(function(){var Ue=B.lineSeparator()||`
|
|
`;B.replaceSelection(Ue+Ue,null),B.execCommand("goCharLeft"),fe=B.listSelections();for(var we=0;we<fe.length;we++){var Q=fe[we].head.line;B.indentLine(Q,null,!0),B.indentLine(Q+1,null,!0)}})}function j(B){var X=Z.cmpPos(B.anchor,B.head)>0;return{anchor:new Le(B.anchor.line,B.anchor.ch+(X?-1:1)),head:new Le(B.head.line,B.head.ch+(X?1:-1))}}function Y(B,X){var z=q(B);if(!z||B.getOption("disableInput"))return Z.Pass;var fe=He(z,"pairs"),he=fe.indexOf(X);if(he==-1)return Z.Pass;for(var Ne=He(z,"closeBefore"),Ue=He(z,"triples"),we=fe.charAt(he+1)==X,Q=B.listSelections(),Ce=he%2==0,ce,P=0;P<Q.length;P++){var le=Q[P],$=le.head,O,me=B.getRange($,Le($.line,$.ch+1));if(Ce&&!le.empty())O="surround";else if((we||!Ce)&&me==X)we&&de(B,$)?O="both":Ue.indexOf(X)>=0&&B.getRange($,Le($.line,$.ch+3))==X+X+X?O="skipThree":O="skip";else if(we&&$.ch>1&&Ue.indexOf(X)>=0&&B.getRange(Le($.line,$.ch-2),$)==X+X){if($.ch>2&&/\bstring/.test(B.getTokenTypeAt(Le($.line,$.ch-2))))return Z.Pass;O="addFour"}else if(we){var ee=$.ch==0?" ":B.getRange(Le($.line,$.ch-1),$);if(!Z.isWordChar(me)&&ee!=X&&!Z.isWordChar(ee))O="both";else return Z.Pass}else if(Ce&&(me.length===0||/\s/.test(me)||Ne.indexOf(me)>-1))O="both";else return Z.Pass;if(!ce)ce=O;else if(ce!=O)return Z.Pass}var L=he%2?fe.charAt(he-1):X,U=he%2?X:fe.charAt(he+1);B.operation(function(){if(ce=="skip")B.execCommand("goCharRight");else if(ce=="skipThree")for(var ae=0;ae<3;ae++)B.execCommand("goCharRight");else if(ce=="surround"){for(var K=B.getSelections(),ae=0;ae<K.length;ae++)K[ae]=L+K[ae]+U;B.replaceSelections(K,"around"),K=B.listSelections().slice();for(var ae=0;ae<K.length;ae++)K[ae]=j(K[ae]);B.setSelections(K)}else ce=="both"?(B.replaceSelection(L+U,null),B.triggerElectric(L+U),B.execCommand("goCharLeft")):ce=="addFour"&&(B.replaceSelection(L+L+L+L,"before"),B.execCommand("goCharRight"))})}function ke(B,X){var z=B.getRange(Le(X.line,X.ch-1),Le(X.line,X.ch+1));return z.length==2?z:null}function de(B,X){var z=B.getTokenAt(Le(X.line,X.ch+1));return/\bstring/.test(z.type)&&z.start==X.ch&&(X.ch==0||!/\bstring/.test(B.getTokenTypeAt(X)))}})},GfqC:function(yt,qe,b){"use strict";var Z=b("q1tI"),Pe=b.n(Z),Le=b("TSYQ"),He=b.n(Le);function Oe(G,m){var p="cannot "+G.method+" "+G.action+" "+m.status+"'",A=new Error(p);return A.status=m.status,A.method=G.method,A.url=G.action,A}function ye(G){var m=G.responseText||G.response;if(!m)return m;try{return JSON.parse(m)}catch(p){return m}}function F(G){var m=new XMLHttpRequest;G.onProgress&&m.upload&&(m.upload.onprogress=function(ve){ve.total>0&&(ve.percent=ve.loaded/ve.total*100),G.onProgress(ve)});var p=new FormData;G.data&&Object.keys(G.data).forEach(function(J){var ve=G.data[J];if(Array.isArray(ve)){ve.forEach(function(Re){p.append(J+"[]",Re)});return}p.append(J,G.data[J])}),G.file instanceof Blob?p.append(G.filename,G.file,G.file.name):p.append(G.filename,G.file),m.onerror=function(ve){G.onError(ve)},m.onload=function(){return m.status<200||m.status>=300?G.onError(Oe(G,m),ye(m)):G.onSuccess(ye(m),m)},m.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in m&&(m.withCredentials=!0);var A=G.headers||{};return A["X-Requested-With"]!==null&&m.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(A).forEach(function(J){A[J]!==null&&m.setRequestHeader(J,A[J])}),m.send(p),{abort:function(){m.abort()}}}var q=+new Date,V=0;function se(){return"rc-upload-"+q+"-"+ ++V}function j(G,m){return G.indexOf(m,G.length-m.length)!==-1}var Y=function(G,m){if(G&&m){var p=Array.isArray(m)?m:m.split(","),A=G.name||"",J=G.type||"",ve=J.replace(/\/.*$/,"");return p.some(function(Re){var Se=Re.trim();return Se.charAt(0)==="."?j(A.toLowerCase(),Se.toLowerCase()):/\/\*$/.test(Se)?ve===Se.replace(/\/.*$/,""):J===Se})}return!0};function ke(G,m){var p=G.createReader(),A=[];function J(){p.readEntries(function(ve){var Re=Array.prototype.slice.apply(ve);A=A.concat(Re);var Se=!Re.length;Se?m(A):J()})}J()}var de=function(m,p,A){var J=function ve(Re,Se){Se=Se||"",Re.isFile?Re.file(function(Te){A(Te)&&(Re.fullPath&&!Te.webkitRelativePath&&(Object.defineProperties(Te,{webkitRelativePath:{writable:!0}}),Te.webkitRelativePath=Re.fullPath.replace(/^\//,""),Object.defineProperties(Te,{webkitRelativePath:{writable:!1}})),p([Te]))}):Re.isDirectory&&ke(Re,function(Te){Te.forEach(function(R){ve(R,""+Se+Re.name+"/")})})};m.forEach(function(ve){J(ve.webkitGetAsEntry())})},B=de,X=Object.assign||function(G){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var A in p)Object.prototype.hasOwnProperty.call(p,A)&&(G[A]=p[A])}return G},z=function(){function G(m,p){var A=[],J=!0,ve=!1,Re=void 0;try{for(var Se=m[Symbol.iterator](),Te;!(J=(Te=Se.next()).done)&&!(A.push(Te.value),p&&A.length===p);J=!0);}catch(R){ve=!0,Re=R}finally{try{!J&&Se.return&&Se.return()}finally{if(ve)throw Re}}return A}return function(m,p){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return G(m,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),fe=function(){function G(m,p){for(var A=0;A<p.length;A++){var J=p[A];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(m,J.key,J)}}return function(m,p,A){return p&&G(m.prototype,p),A&&G(m,A),m}}();function he(G,m,p){return m in G?Object.defineProperty(G,m,{value:p,enumerable:!0,configurable:!0,writable:!0}):G[m]=p,G}function Ne(G,m){var p={};for(var A in G){if(m.indexOf(A)>=0)continue;if(!Object.prototype.hasOwnProperty.call(G,A))continue;p[A]=G[A]}return p}function Ue(G,m){if(!(G instanceof m))throw new TypeError("Cannot call a class as a function")}function we(G,m){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:G}function Q(G,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);G.prototype=Object.create(m&&m.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(G,m):G.__proto__=m)}var Ce=function(m){return Object.keys(m).reduce(function(p,A){return(A.substr(0,5)==="data-"||A.substr(0,5)==="aria-"||A==="role")&&(p[A]=m[A]),p},{})},ce=function(G){Q(m,G);function m(){var p,A,J,ve;Ue(this,m);for(var Re=arguments.length,Se=Array(Re),Te=0;Te<Re;Te++)Se[Te]=arguments[Te];return ve=(A=(J=we(this,(p=m.__proto__||Object.getPrototypeOf(m)).call.apply(p,[this].concat(Se))),J),J.state={uid:se()},J.reqs={},J.onChange=function(R){var w=R.target.files;J.uploadFiles(w),J.reset()},J.onClick=function(R){var w=J.fileInput;if(!w)return;var D=J.props,S=D.children,k=D.onClick;S&&S.type==="button"&&(w.parentNode.focus(),w.parentNode.querySelector("button").blur()),w.click(),k&&k(R)},J.onKeyDown=function(R){R.key==="Enter"&&J.onClick()},J.onFileDrop=function(R){var w=J.props.multiple;if(R.preventDefault(),R.type==="dragover")return;if(J.props.directory)B(Array.prototype.slice.call(R.dataTransfer.items),J.uploadFiles,function(S){return Y(S,J.props.accept)});else{var D=Array.prototype.slice.call(R.dataTransfer.files).filter(function(S){return Y(S,J.props.accept)});w===!1&&(D=D.slice(0,1)),J.uploadFiles(D)}},J.uploadFiles=function(R){var w=Array.prototype.slice.call(R);w.map(function(D){return D.uid=se(),D}).forEach(function(D){J.upload(D,w)})},J.saveFileInput=function(R){J.fileInput=R},A),we(J,ve)}return fe(m,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(A,J){var ve=this,Re=this.props;if(!Re.beforeUpload)return setTimeout(function(){return ve.post(A)},0);var Se=Re.beforeUpload(A,J);Se&&Se.then?Se.then(function(Te){var R=Object.prototype.toString.call(Te);return R==="[object File]"||R==="[object Blob]"?ve.post(Te):ve.post(A)}).catch(function(Te){console.log(Te)}):Se!==!1&&setTimeout(function(){return ve.post(A)},0);return}},{key:"post",value:function(A){var J=this;if(!this._isMounted)return;var ve=this.props,Re=ve.onStart,Se=ve.onProgress,Te=ve.transformFile,R=Te===void 0?function(w){return w}:Te;new Promise(function(w){var D=ve.action;return typeof D=="function"&&(D=D(A)),w(D)}).then(function(w){var D=A.uid,S=ve.customRequest||F,k=Promise.resolve(R(A)).then(function(v){var y=ve.data;return typeof y=="function"&&(y=y(v)),Promise.all([v,y])}).catch(function(v){console.error(v)});k.then(function(v){var y=z(v,2),E=y[0],M=y[1],ue={action:w,filename:ve.name,data:M,file:E,headers:ve.headers,withCredentials:ve.withCredentials,method:ve.method||"post",onProgress:Se?function(I){Se(I,A)}:null,onSuccess:function(ge,_e){delete J.reqs[D],ve.onSuccess(ge,A,_e)},onError:function(ge,_e){delete J.reqs[D],ve.onError(ge,_e,A)}};Re(A),J.reqs[D]=S(ue)})})}},{key:"reset",value:function(){this.setState({uid:se()})}},{key:"abort",value:function(A){var J=this.reqs;if(A){var ve=A;A&&A.uid&&(ve=A.uid),J[ve]&&J[ve].abort&&J[ve].abort(),delete J[ve]}else Object.keys(J).forEach(function(Re){J[Re]&&J[Re].abort&&J[Re].abort(),delete J[Re]})}},{key:"render",value:function(){var A,J=this.props,ve=J.component,Re=J.prefixCls,Se=J.className,Te=J.disabled,R=J.id,w=J.style,D=J.multiple,S=J.accept,k=J.children,v=J.directory,y=J.openFileDialogOnClick,E=J.onMouseEnter,M=J.onMouseLeave,ue=Ne(J,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),I=He()((A={},he(A,Re,!0),he(A,Re+"-disabled",Te),he(A,Se,Se),A)),ge=Te?{}:{onClick:y?this.onClick:function(){},onKeyDown:y?this.onKeyDown:function(){},onMouseEnter:E,onMouseLeave:M,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return Pe.a.createElement(ve,X({},ge,{className:I,role:"button",style:w}),Pe.a.createElement("input",X({},Ce(ue),{id:R,type:"file",ref:this.saveFileInput,onClick:function(Ie){return Ie.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:S,directory:v?"directory":null,webkitdirectory:v?"webkitdirectory":null,multiple:D,onChange:this.onChange})),k)}}]),m}(Z.Component),P=ce,le=Object.assign||function(G){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var A in p)Object.prototype.hasOwnProperty.call(p,A)&&(G[A]=p[A])}return G},$=function(){function G(m,p){for(var A=0;A<p.length;A++){var J=p[A];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(m,J.key,J)}}return function(m,p,A){return p&&G(m.prototype,p),A&&G(m,A),m}}();function O(G,m){if(!(G instanceof m))throw new TypeError("Cannot call a class as a function")}function me(G,m){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:G}function ee(G,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);G.prototype=Object.create(m&&m.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(G,m):G.__proto__=m)}function L(){}var U=function(G){ee(m,G);function m(){var p,A,J,ve;O(this,m);for(var Re=arguments.length,Se=Array(Re),Te=0;Te<Re;Te++)Se[Te]=arguments[Te];return ve=(A=(J=me(this,(p=m.__proto__||Object.getPrototypeOf(m)).call.apply(p,[this].concat(Se))),J),J.saveUploader=function(R){J.uploader=R},A),me(J,ve)}return $(m,[{key:"abort",value:function(A){this.uploader.abort(A)}},{key:"render",value:function(){return Pe.a.createElement(P,le({},this.props,{ref:this.saveUploader}))}}]),m}(Z.Component);U.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:L,onError:L,onSuccess:L,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var ae=U,K=qe.a=ae},Gytx:function(yt,qe){yt.exports=function(Z,Pe,Le,He){var Oe=Le?Le.call(He,Z,Pe):void 0;if(Oe!==void 0)return!!Oe;if(Z===Pe)return!0;if(typeof Z!="object"||!Z||typeof Pe!="object"||!Pe)return!1;var ye=Object.keys(Z),F=Object.keys(Pe);if(ye.length!==F.length)return!1;for(var q=Object.prototype.hasOwnProperty.bind(Pe),V=0;V<ye.length;V++){var se=ye[V];if(!q(se))return!1;var j=Z[se],Y=Pe[se];if(Oe=Le?Le.call(He,j,Y,se):void 0,Oe===!1||Oe===void 0&&j!==Y)return!1}return!0}},HmJG:function(yt,qe,b){},LdHM:function(yt,qe,b){"use strict";b.d(qe,"b",function(){return Ne}),b.d(qe,"a",function(){return we});var Z=b("1OyB"),Pe=b("vuIU"),Le=b("Ji7U"),He=b("LK+K"),Oe=b("q1tI"),ye=b("rePB"),F=b("Ff2n"),q=b("ODXe"),V=b("4IlW"),se=b("bX4T"),j=b("YrtM"),Y=b("TSYQ"),ke=b.n(Y),de=b("+nKL"),B=b("8OUc"),X=function(A,J){var ve=A.prefixCls,Re=A.id,Se=A.flattenOptions,Te=A.childrenAsData,R=A.values,w=A.searchValue,D=A.multiple,S=A.defaultActiveFirstOption,k=A.height,v=A.itemHeight,y=A.notFoundContent,E=A.open,M=A.menuItemSelectedIcon,ue=A.virtual,I=A.onSelect,ge=A.onToggleOpen,_e=A.onActiveValue,Ie=A.onScroll,ze=A.onMouseEnter,Be="".concat(ve,"-item"),Fe=Object(j.a)(function(){return Se},[E,Se],function(We,ie){return ie[0]&&We[1]!==ie[1]}),nt=Oe.useRef(null),pe=function(ie){ie.preventDefault()},De=function(ie){nt.current&&nt.current.scrollTo({index:ie})},je=function(ie){for(var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=Fe.length,x=0;x<re;x+=1){var T=(ie+x*W+re)%re,_=Fe[T],N=_.group,be=_.data;if(!N&&!be.disabled)return T}return-1},Ke=Oe.useState(function(){return je(0)}),Ye=Object(q.a)(Ke,2),Ve=Ye[0],xe=Ye[1],et=function(ie){xe(ie);var W=Fe[ie];if(!W){_e(null,-1);return}_e(W.data.value,ie)};Oe.useEffect(function(){et(S!==!1?je(0):-1)},[Fe.length,w]),Oe.useEffect(function(){var We=setTimeout(function(){if(!D&&E&&R.size===1){var ie=Array.from(R)[0],W=Fe.findIndex(function(re){var x=re.data;return x.value===ie});et(W),De(W)}});return function(){return clearTimeout(We)}},[E]);var Ze=function(ie){ie!==void 0&&I(ie,{selected:!R.has(ie)}),D||ge(!1)};if(Oe.useImperativeHandle(J,function(){return{onKeyDown:function(ie){var W=ie.which;switch(W){case V.a.UP:case V.a.DOWN:{var re=0;if(W===V.a.UP?re=-1:W===V.a.DOWN&&(re=1),re!==0){var x=je(Ve+re,re);De(x),et(x)}break}case V.a.ENTER:{var T=Fe[Ve];T&&!T.data.disabled?Ze(T.data.value):Ze(void 0),E&&ie.preventDefault();break}case V.a.ESC:ge(!1)}},onKeyUp:function(){},scrollTo:function(ie){De(ie)}}}),Fe.length===0)return Oe.createElement("div",{role:"listbox",id:"".concat(Re,"_list"),className:"".concat(Be,"-empty"),onMouseDown:pe},y);function Ae(We){var ie=Fe[We];if(!ie)return null;var W=ie.data||{},re=W.value,x=W.label,T=W.children,_=Object(se.a)(W,!0),N=Te?T:x;return ie?Oe.createElement("div",Object.assign({"aria-label":typeof N=="string"?N:null},_,{key:We,role:"option",id:"".concat(Re,"_list_").concat(We),"aria-selected":R.has(re)}),re):null}return Oe.createElement(Oe.Fragment,null,Oe.createElement("div",{role:"listbox",id:"".concat(Re,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ae(Ve-1),Ae(Ve),Ae(Ve+1)),Oe.createElement(de.a,{itemKey:"key",ref:nt,data:Fe,height:k,itemHeight:v,fullHeight:!1,onMouseDown:pe,onScroll:Ie,virtual:ue,onMouseEnter:ze},function(We,ie){var W,re=We.group,x=We.groupOption,T=We.data,_=T.label,N=T.key;if(re)return Oe.createElement("div",{className:ke()(Be,"".concat(Be,"-group"))},_!==void 0?_:N);var be=T.disabled,oe=T.value,Xe=T.title,ot=T.children,ut=T.style,at=T.className,kt=Object(F.a)(T,["disabled","value","title","children","style","className"]),St=R.has(oe),ct="".concat(Be,"-option"),Ft=ke()(Be,ct,at,(W={},Object(ye.a)(W,"".concat(ct,"-grouped"),x),Object(ye.a)(W,"".concat(ct,"-active"),Ve===ie&&!be),Object(ye.a)(W,"".concat(ct,"-disabled"),be),Object(ye.a)(W,"".concat(ct,"-selected"),St),W)),Lt=Te?ot:_,xt=!M||typeof M=="function"||St;return Oe.createElement("div",Object.assign({},kt,{"aria-selected":St,className:Ft,title:Xe,onMouseMove:function(){if(Ve===ie||be)return;et(ie)},onClick:function(){be||Ze(oe)},style:ut}),Oe.createElement("div",{className:"".concat(ct,"-content")},Lt||oe),Oe.isValidElement(M)||St,xt&&Oe.createElement(B.a,{className:"".concat(Be,"-option-state"),customizeIcon:M,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},z=Oe.forwardRef(X);z.displayName="OptionList";var fe=z,he=function(){return null};he.isSelectOption=!0;var Ne=he,Ue=function(){return null};Ue.isSelectOptGroup=!0;var we=Ue,Q=b("VTBJ"),Ce=b("Zm9Q");function ce(p){var A=p.key,J=p.props,ve=J.children,Re=J.value,Se=Object(F.a)(J,["children","value"]);return Object(Q.a)({key:A,value:Re!==void 0?Re:A,children:ve},Se)}function P(p){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Ce.a)(p).map(function(J,ve){if(!Oe.isValidElement(J)||!J.type)return null;var Re=J.type.isSelectOptGroup,Se=J.key,Te=J.props,R=Te.children,w=Object(F.a)(Te,["children"]);return A||!Re?ce(J):Object(Q.a)(Object(Q.a)({key:"__RC_SELECT_GRP__".concat(Se===null?ve:Se,"__"),label:Se},w),{},{options:P(R)})}).filter(function(J){return J})}var le=b("2Qr1"),$=b("qNPg"),O=b("U8pU"),me=b("Kwbf"),ee=b("WKfj");function L(p){var A=p.mode,J=p.options,ve=p.children,Re=p.backfill,Se=p.allowClear,Te=p.placeholder,R=p.getInputElement,w=p.showSearch,D=p.onSearch,S=p.defaultOpen,k=p.autoFocus,v=p.labelInValue,y=p.value,E=p.inputValue,M=p.optionLabelProp,ue=A==="multiple"||A==="tags",I=w!==void 0?w:ue||A==="combobox",ge=J||P(ve);if(Object(me.a)(A!=="tags"||ge.every(function(Be){return!Be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),A==="tags"||A==="combobox"){var _e=ge.some(function(Be){return Be.options?Be.options.some(function(Fe){return typeof("value"in Fe?Fe.value:Fe.key)=="number"}):typeof("value"in Be?Be.value:Be.key)=="number"});Object(me.a)(!_e,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(me.a)(A!=="combobox"||!M,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(me.a)(A==="combobox"||!Re,"`backfill` only works with `combobox` mode."),Object(me.a)(A==="combobox"||!R,"`getInputElement` only work with `combobox` mode."),Object(me.b)(A!=="combobox"||!R||!Se||!Te,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),D&&!I&&A!=="combobox"&&A!=="tags"&&Object(me.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(me.b)(!S||k,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),y!=null){var Ie=Object(ee.d)(y);Object(me.a)(!v||Ie.every(function(Be){return Object(O.a)(Be)==="object"&&("key"in Be||"value"in Be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(me.a)(!ue||Array.isArray(y),"`value` should be array when `mode` is `multiple` or `tags`")}if(ve){var ze=null;Object(Ce.a)(ve).some(function(Be){if(!Oe.isValidElement(Be)||!Be.type)return!1;var Fe=Be.type;if(Fe.isSelectOption)return!1;if(Fe.isSelectOptGroup){var nt=Object(Ce.a)(Be.props.children).every(function(pe){return!Oe.isValidElement(pe)||!Be.type||pe.type.isSelectOption?!0:(ze=pe.type,!1)});return!nt}return ze=Fe,!0}),ze&&Object(me.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ze.displayName||ze.name||ze,"`.")),Object(me.a)(E===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=L,ae=Object($.a)({prefixCls:"rc-select",components:{optionList:fe},convertChildrenToData:P,flattenOptions:le.d,getLabeledValue:le.e,filterOptions:le.b,isValueDisabled:le.g,findValueOption:le.c,warningProps:U,fillOptionsWithMissingValue:le.a}),K=function(p){Object(Le.a)(J,p);var A=Object(He.a)(J);function J(){var ve;return Object(Z.a)(this,J),ve=A.apply(this,arguments),ve.selectRef=Oe.createRef(),ve.focus=function(){ve.selectRef.current.focus()},ve.blur=function(){ve.selectRef.current.blur()},ve}return Object(Pe.a)(J,[{key:"render",value:function(){return Oe.createElement(ae,Object.assign({ref:this.selectRef},this.props))}}]),J}(Oe.Component);K.Option=Ne,K.OptGroup=we;var G=K,m=qe.c=G},M8RZ:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return V});var Z=b("fWQN"),Pe=b("mtLc"),Le=b("yKVA"),He=b("879j"),Oe=b("q1tI"),ye=b.n(Oe),F=b("i8i4"),q=b.n(F),V=function(se){Object(Le.a)(Y,se);var j=Object(He.a)(Y);function Y(ke){var de;Object(Z.a)(this,Y),de=j.call(this,ke);var B=window.document;return de.node=B.createElement("div"),B.body.appendChild(de.node),de}return Object(Pe.a)(Y,[{key:"render",value:function(){var de=this.props.children;return Object(F.createPortal)(de,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),Y}(ye.a.Component)},NvD2:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return ye});var Z=b("Kwbf");function Pe(F,q){var V=new Set;return F.forEach(function(se){q.has(se)||V.add(se)}),V}function Le(F){var q=F||{},V=q.disabled,se=q.disableCheckbox,j=q.checkable;return!!(V||se)||j===!1}function He(F,q,V,se){for(var j=new Set(F),Y=new Set,ke=0;ke<=V;ke+=1){var de=q.get(ke)||new Set;de.forEach(function(fe){var he=fe.key,Ne=fe.node,Ue=fe.children,we=Ue===void 0?[]:Ue;j.has(he)&&!se(Ne)&&we.filter(function(Q){return!se(Q.node)}).forEach(function(Q){j.add(Q.key)})})}for(var B=new Set,X=V;X>=0;X-=1){var z=q.get(X)||new Set;z.forEach(function(fe){var he=fe.parent,Ne=fe.node;if(se(Ne)||!fe.parent||B.has(fe.parent.key))return;if(se(fe.parent.node)){B.add(he.key);return}var Ue=!0,we=!1;(he.children||[]).filter(function(Q){return!se(Q.node)}).forEach(function(Q){var Ce=Q.key,ce=j.has(Ce);Ue&&!ce&&(Ue=!1),!we&&(ce||Y.has(Ce))&&(we=!0)}),Ue&&j.add(he.key),we&&Y.add(he.key),B.add(he.key)})}return{checkedKeys:Array.from(j),halfCheckedKeys:Array.from(Pe(Y,j))}}function Oe(F,q,V,se,j){for(var Y=new Set(F),ke=new Set(q),de=0;de<=se;de+=1){var B=V.get(de)||new Set;B.forEach(function(he){var Ne=he.key,Ue=he.node,we=he.children,Q=we===void 0?[]:we;!Y.has(Ne)&&!ke.has(Ne)&&!j(Ue)&&Q.filter(function(Ce){return!j(Ce.node)}).forEach(function(Ce){Y.delete(Ce.key)})})}ke=new Set;for(var X=new Set,z=se;z>=0;z-=1){var fe=V.get(z)||new Set;fe.forEach(function(he){var Ne=he.parent,Ue=he.node;if(j(Ue)||!he.parent||X.has(he.parent.key))return;if(j(he.parent.node)){X.add(Ne.key);return}var we=!0,Q=!1;(Ne.children||[]).filter(function(Ce){return!j(Ce.node)}).forEach(function(Ce){var ce=Ce.key,P=Y.has(ce);we&&!P&&(we=!1),!Q&&(P||ke.has(ce))&&(Q=!0)}),we||Y.delete(Ne.key),Q&&ke.add(Ne.key),X.add(Ne.key)})}return{checkedKeys:Array.from(Y),halfCheckedKeys:Array.from(Pe(ke,Y))}}function ye(F,q,V,se){var j=[],Y;se?Y=se:Y=Le;var ke=new Set(F.filter(function(z){var fe=!!V[z];return fe||j.push(z),fe})),de=new Map,B=0;Object.keys(V).forEach(function(z){var fe=V[z],he=fe.level,Ne=de.get(he);Ne||(Ne=new Set,de.set(he,Ne)),Ne.add(fe),B=Math.max(B,he)}),Object(Z.a)(!j.length,"Tree missing follow keys: ".concat(j.slice(0,100).map(function(z){return"'".concat(z,"'")}).join(", ")));var X;return q===!0?X=He(ke,de,B,Y):X=Oe(ke,q.halfCheckedKeys,de,B,Y),X}},OLES:function(yt,qe,b){"use strict";var Z=b("U8pU"),Pe=b("VTBJ"),Le=b("Ff2n"),He=b("q1tI"),Oe=b("uciX"),ye=b("7ixt"),F=function(ke){var de=ke.overlay,B=ke.prefixCls,X=ke.id,z=ke.overlayInnerStyle;return He.createElement("div",{className:"".concat(B,"-inner"),id:X,role:"tooltip",style:z},typeof de=="function"?de():de)},q=F,V=function(ke,de){var B=ke.overlayClassName,X=ke.trigger,z=X===void 0?["hover"]:X,fe=ke.mouseEnterDelay,he=fe===void 0?0:fe,Ne=ke.mouseLeaveDelay,Ue=Ne===void 0?.1:Ne,we=ke.overlayStyle,Q=ke.prefixCls,Ce=Q===void 0?"rc-tooltip":Q,ce=ke.children,P=ke.onVisibleChange,le=ke.afterVisibleChange,$=ke.transitionName,O=ke.animation,me=ke.placement,ee=me===void 0?"right":me,L=ke.align,U=L===void 0?{}:L,ae=ke.destroyTooltipOnHide,K=ae===void 0?!1:ae,G=ke.defaultVisible,m=ke.getTooltipContainer,p=ke.overlayInnerStyle,A=Object(Le.a)(ke,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(He.useRef)(null);Object(He.useImperativeHandle)(de,function(){return J.current});var ve=Object(Pe.a)({},A);"visible"in ke&&(ve.popupVisible=ke.visible);var Re=function(){var D=ke.arrowContent,S=D===void 0?null:D,k=ke.overlay,v=ke.id;return[He.createElement("div",{className:"".concat(Ce,"-arrow"),key:"arrow"},S),He.createElement(q,{key:"content",prefixCls:Ce,id:v,overlay:k,overlayInnerStyle:p})]},Se=!1,Te=!1;if(typeof K=="boolean")Se=K;else if(K&&Object(Z.a)(K)==="object"){var R=K.keepParent;Se=R===!0,Te=R===!1}return He.createElement(Oe.a,Object.assign({popupClassName:B,prefixCls:Ce,popup:Re,action:z,builtinPlacements:ye.a,popupPlacement:ee,ref:J,popupAlign:U,getPopupContainer:m,onPopupVisibleChange:P,afterPopupVisibleChange:le,popupTransitionName:$,popupAnimation:O,defaultPopupVisible:G,destroyPopupOnHide:Se,autoDestroy:Te,mouseLeaveDelay:Ue,popupStyle:we,mouseEnterDelay:he},ve),ce)},se=Object(He.forwardRef)(V),j=qe.a=se},OZM5:function(yt,qe,b){"use strict";b.d(qe,"b",function(){return se}),b.d(qe,"a",function(){return j}),b.d(qe,"k",function(){return Y}),b.d(qe,"h",function(){return ke}),b.d(qe,"i",function(){return de}),b.d(qe,"g",function(){return B}),b.d(qe,"c",function(){return X}),b.d(qe,"d",function(){return z}),b.d(qe,"j",function(){return Ne}),b.d(qe,"e",function(){return Ue}),b.d(qe,"f",function(){return we});var Z=b("KQm4"),Pe=b("U8pU"),Le=b("Ff2n"),He=b("q1tI"),Oe=b.n(He),ye=b("Kwbf"),F=b("WaYH"),q=.25,V=2;function se(Q,Ce){var ce=Q.slice(),P=ce.indexOf(Ce);return P>=0&&ce.splice(P,1),ce}function j(Q,Ce){var ce=Q.slice();return ce.indexOf(Ce)===-1&&ce.push(Ce),ce}function Y(Q){return Q.split("-")}function ke(Q,Ce){return"".concat(Q,"-").concat(Ce)}function de(Q){return Q&&Q.type&&Q.type.isTreeNode}function B(Q,Ce){var ce=[Q],P=Ce[Q];function le(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];$.forEach(function(O){var me=O.key,ee=O.children;ce.push(me),le(ee)})}return le(P.children),ce}function X(Q,Ce){var ce=Q.clientY,P=Ce.selectHandle.getBoundingClientRect(),le=P.top,$=P.bottom,O=P.height,me=Math.max(O*q,V);return ce<=le+me?-1:ce>=$-me?1:0}function z(Q,Ce){if(!Q)return;var ce=Ce.multiple;return ce?Q.slice():Q.length?[Q[0]]:Q}var fe=function(Ce){return Ce};function he(Q,Ce){if(!Q)return[];var ce=Ce||{},P=ce.processProps,le=P===void 0?fe:P,$=Array.isArray(Q)?Q:[Q];return $.map(function(O){var me=O.children,ee=Object(Le.a)(O,["children"]),L=he(me,Ce);return Oe.a.createElement(F.a,Object.assign({},le(ee)),L)})}function Ne(Q){if(!Q)return null;var Ce;if(Array.isArray(Q))Ce={checkedKeys:Q,halfCheckedKeys:void 0};else if(Object(Pe.a)(Q)==="object")Ce={checkedKeys:Q.checked||void 0,halfCheckedKeys:Q.halfChecked||void 0};else return Object(ye.a)(!1,"`checkedKeys` is not an array or an object"),null;return Ce}function Ue(Q,Ce){var ce=new Set;function P(le){if(ce.has(le))return;var $=Ce[le];if(!$)return;ce.add(le);var O=$.parent,me=$.node;if(me.disabled)return;O&&P(O.key)}return(Q||[]).forEach(function(le){P(le)}),Object(Z.a)(ce)}function we(Q){var Ce={};return Object.keys(Q).forEach(function(ce){(ce.startsWith("data-")||ce.startsWith("aria-"))&&(Ce[ce]=Q[ce])}),Ce}},Ot1p:function(yt,qe,b){"use strict";var Z=b("2qtc"),Pe=b("kLXV"),Le=b("rAM+"),He=b("miYZ"),Oe=b("tsqr"),ye=b("9og8"),F=b("tJVT"),q=b("jrin"),V=b("WmNS"),se=b.n(V),j=b("q1tI"),Y=b.n(j),ke=b("VrN/"),de=b.n(ke),B=b("bdgK"),X=b("p77/"),z=b("Bd2K"),fe=b("ELLl"),he=b("19Vz"),Ne=b("lZu9"),Ue=b("+NIl"),we=b("kSUc"),Q=b("9Bee"),Ce=function(oe){var Xe=oe.value,ot=Xe===void 0?"":Xe,ut=oe.className,at=oe.showTextOnly,kt=oe.showLines,St=oe.style,ct=St===void 0?{}:St,Ft=Object(j.useMemo)(function(){return""},[ot]);return Y.a.createElement(Y.a.Fragment,null,Y.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ft}}))},ce=b("0Owb"),P=b("dejd"),le=b("C+DQ"),$=b("1vsH"),O=b("m3rI"),me=[{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 ee(oe){var Xe=oe.onActionCallback,ot=oe.title,ut=oe.icon,at=oe.actionName,kt=oe.className,St=kt===void 0?"":kt,ct=oe.children;function Ft(){Xe(at)}return Y.a.createElement("a",{title:ot,className:St,onClick:Ft},Y.a.createElement("i",{className:"md-iconfont ".concat(ut)}),ct)}var L=function(oe){var Xe=oe.watch,ot=oe.showNullButton,ut=oe.onActionCallback,at=oe.fullScreen,kt=oe.insertTemp,St=oe.hidetoolBar,ct=oe.uuid,Ft=oe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object($.E)("_educoder_session_login"),"&_educoder_session=").concat(Object($.E)("_educoder_session"),"&key=").concat(ct,"&api=").concat(encodeURIComponent(O.a.PROXY_SERVER)));var Lt=[].concat(me,[{title:"".concat(Xe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Xe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return Y.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&Lt.map(function(xt,wt){return Y.a.createElement("li",{key:wt},xt.actionName?Y.a.createElement(ee,Object(ce.a)({},xt,{onActionCallback:ut})):Y.a.createElement("span",{className:"v-line"}))}),ot?Y.a.createElement("li",null,Y.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ut},Y.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,kt&&Y.a.createElement("li",null,Y.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(kt),onActionCallback:ut},Y.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Y.a.createElement("li",{className:"btn-full-screen"},Y.a.createElement(ee,{icon:"".concat(at?"icon-shrink":"icon-enlarge"),title:at?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ut})))},U=b("M8RZ"),ae=b("+L6B"),K=b("2/Rp"),G=b("y8nQ"),m=b("Vl3Y"),p=b("5NDa"),A=b("5rEg"),J={labelCol:{span:4},wrapperCol:{span:20}},ve=function(oe){var Xe=oe.callback,ot=oe.onCancel;function ut(at){Xe(at)}return Y.a.createElement(m.a,Object(ce.a)({},J,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ut}),Y.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Y.a.createElement(A.a,null)),Y.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Y.a.createElement(A.a,null)),Y.a.createElement("div",{className:"flex-container flex-end"},Y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Y.a.createElement(K.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},Re=b("7ahc"),Se=b("k1fw"),Te=b("HmJG"),R=b("BjJ7"),w=m.a.useForm,D={width:280,marginRight:10},S={labelCol:{span:5},wrapperCol:{span:19}},k=function(oe){var Xe=oe.callback,ot=oe.onCancel,ut=w(),at=Object(F.a)(ut,1),kt=at[0],St=Object(j.useRef)();function ct(xt){Xe(Object(Se.a)(Object(Se.a)({},xt),{},{name:St.current}))}function Ft(xt,wt){kt.setFieldsValue({src:"/api/attachments/".concat(xt.id,"?type=").concat(xt.content_type),type:wt.type})}function Lt(xt){var wt=xt.target.files[0];St.current=wt.name,y(wt,Ft)}return Y.a.createElement(m.a,Object(ce.a)({form:kt},S,{className:"upload-image-panel",onFinish:ct}),Y.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},Y.a.createElement("div",{className:"flex-container"},Y.a.createElement(m.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},Y.a.createElement(A.a,{style:D})),Y.a.createElement(v,{onFileChange:Lt}))),Y.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},Y.a.createElement(A.a,{style:{width:264}})),Y.a.createElement(m.a.Item,{style:{textAlign:"right"}},Y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Y.a.createElement(K.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))};function v(oe){var Xe=oe.onFileChange;return Y.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",Y.a.createElement("input",{type:"file",onChange:Xe}))}function y(oe,Xe){if(!oe)throw new String("\u6CA1\u6709\u6587\u4EF6");var ot=new FormData;ot.append("editormd-image-file",oe),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var ut=new window.XMLHttpRequest;ut.withCredentials=!0,ut.addEventListener("load",function(at){Xe(JSON.parse(at.target.responseText),oe)},!1),ut.addEventListener("error",function(at){console.error(at)},!1),ut.open("POST","".concat(R.a,"/api/attachments.json")),ut.send(ot)}var E=b("giR+"),M=b("fyUT"),ue=b("7Kak"),I=b("9yH6"),ge=I.a.Group,_e={margin:"0 8px"},Ie=function(oe){var Xe=oe.callback,ot=oe.onCancel;function ut(at){Xe(at)}return Y.a.createElement(m.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ut},Y.a.createElement("div",{className:"flex-container"},Y.a.createElement("span",{style:_e},"\u5355\u5143\u683C\u6570\uFF1A"),Y.a.createElement("span",{style:_e},"\u884C\u6570"),Y.a.createElement(m.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Y.a.createElement(M.a,null)),Y.a.createElement("span",{style:_e},"\u5217\u6570"),Y.a.createElement(m.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Y.a.createElement(M.a,null))),Y.a.createElement("div",{className:"flex-container",style:{marginTop:12}},Y.a.createElement("span",{style:_e},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Y.a.createElement(m.a.Item,{name:"align"},Y.a.createElement(ge,null,Y.a.createElement(I.a,{value:"default"},Y.a.createElement("i",{className:"fa fa-align-justify"})),Y.a.createElement(I.a,{value:"left"},Y.a.createElement("i",{className:"fa fa-align-left"})),Y.a.createElement(I.a,{value:"center"},Y.a.createElement("i",{className:"fa fa-align-center"})),Y.a.createElement(I.a,{value:"right"},Y.a.createElement("i",{className:"fa fa-align-right"}))))),Y.a.createElement("div",{className:"flex-container flex-end"},Y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Y.a.createElement(K.a,{type:"ghost",onClick:ot},"\u53D6\u6D88")))},ze=b("ErOA"),Be=b("7Cbv"),Fe="link",nt="upload-image",pe="code-block",De="add-table",je="------------",Ke={default:je,left:":".concat(je),center:":".concat(je,":"),right:"".concat(je,":")},Ye=b("9VGf"),Ve,xe;function et(){}var Ze=0,Ae=1e4,We="\u2581",ie=`
|
|
**\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 W(oe){return/^\d+$/.test(oe)?"".concat(oe,"px"):oe}var re=navigator.platform.toUpperCase().indexOf("MAC")>=0,x=re?"Cmd":"Ctrl",T=["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"],_=(Ve={},Object(q.a)(Ve,x+"-B","bold"),Object(q.a)(Ve,x+"-I","italic"),Ve),N=(xe={},Object(q.a)(xe,Fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(q.a)(xe,pe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(q.a)(xe,nt,"\u6DFB\u52A0\u6587\u4EF6"),Object(q.a)(xe,De,"\u6DFB\u52A0\u8868\u683C"),xe),be=qe.a=function(oe){var Xe=oe.defaultValue,ot=Xe===void 0?"":Xe,ut=oe.onChange,at=oe.width,kt=at===void 0?"100%":at,St=oe.height,ct=St===void 0?400:St,Ft=oe.miniToolbar,Lt=Ft===void 0?!1:Ft,xt=oe.isFocus,wt=xt===void 0?!1:xt,Tt=oe.watch,Bt=oe.insertTemp,qt=oe.mode,vt=qt===void 0?"markdown":qt,vn=oe.id,jt=vn===void 0?"markdown-editor-id":vn,Zt=oe.showResizeBar,pn=Zt===void 0?!1:Zt,en=oe.noStorage,wn=en===void 0?!1:en,Pt=oe.showNullButton,pt=Pt===void 0?!1:Pt,on=oe.hidetoolBar,_n=on===void 0?!1:on,En=oe.fullScreen,Rt=En===void 0?!1:En,bn=oe.onBlur,un=oe.onCMBeforeChange,ei=oe.onFullScreen,Qe=oe.className,Ot=Qe===void 0?"":Qe,Hn=oe.disablePaste,zn=Hn===void 0?!1:Hn,Yn=oe.placeholder,Jn=Yn===void 0?"":Yn,d=oe.values,o=d===void 0?"":d,a=Object(j.useState)(null),u=Object(F.a)(a,2),h=u[0],c=u[1],te=Object(j.useState)(ot),$e=Object(F.a)(te,2),it=$e[0],st=$e[1],Ge=Object(j.useState)(Tt),gt=Object(F.a)(Ge,2),ft=gt[0],Nt=gt[1],cn=Object(j.useState)(Rt),tn=Object(F.a)(cn,2),$t=tn[0],yn=tn[1],Kn=Object(j.useState)(""),mn=Object(F.a)(Kn,2),Vt=mn[0],dn=mn[1],Zn=Object(j.useState)(0),gn=Object(F.a)(Zn,2),ci=gn[0],Cn=gn[1],jn=Object(j.useState)(ct),Gt=Object(F.a)(jn,2),Ct=Gt[0],lt=Gt[1],An=Object(j.useState)(!1),nn=Object(F.a)(An,2),Vn=nn[0],an=nn[1],Wt=Object(j.useRef)(Object(Be.a)()),Sn=Object(j.useRef)(!1),It=Object(j.useRef)(),hn=Object(j.useRef)(),zt=Object(j.useRef)(),Gn=Object(j.useRef)(),ln=Object(j.useRef)(),Tn=function(){var Et=Object(ye.a)(se.a.mark(function Dt(){var At,Ht;return se.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.next=2,Object(ze.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Wt.current}});case 2:Ht=rn.sent,Ht!=null&&(At=Ht.attachments)!==null&&At!==void 0&&At.length&&(console.log("cm:",h,hn),Ht.attachments.map(function(Xt){Xt.content_type.indexOf("image")>-1?h.replaceSelection(".concat(Xt.content_type,")")):Xt.content_type.indexOf("video")>-1?h.replaceSelection('<video width="100%" controls src="'.concat(O.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Xt.content_type.indexOf("pdf")>-1?h.replaceSelection('<a href="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Xt.content_type,'&disposition=inline" target="_blank">').concat(Xt.name,"</a>")):h.replaceSelection("[".concat(Xt.name,"](").concat(O.a.API_SERVER,"/api/attachments/").concat(Xt.id,"?type=").concat(Xt.content_type,")"))}));case 4:case"end":return rn.stop()}},Dt)}));return function(){return Et.apply(this,arguments)}}();Object(j.useEffect)(function(){st(o),h==null||h.setValue(o)},[o]),Object(j.useEffect)(function(){ei==null||ei($t)},[$t]),Object(j.useEffect)(function(){if(hn.current){var Et=de.a.fromTextArea(hn.current,{mode:vt,lineNumbers:!Lt,lineWrapping:!0,value:ot,autoCloseTags:!0,autoCloseBrackets:!0});wt&&Et.focus();function Dt(At,Ht){if(zn){Ht.preventDefault();return}var Yt=Ht.clipboardData;if(Yt){var rn=Yt.types.toString(),Xt=Yt.items;if(rn==="Files"||Yt.types.indexOf("Files")>-1){if(Ht.preventDefault(),vt=="stex")return;try{var Dn,ri=Xt[1];((Dn=Xt[0])===null||Dn===void 0?void 0:Dn.kind)==="file"&&(ri=Xt[0]);var Kt=ri.getAsFile(),Li=Kt.name.split(".").pop();y(Kt,function(Jt){if(Jt.id){var In,gi,vi;(Kt==null||((In=Kt.type)===null||In===void 0)?void 0:In.indexOf("image"))>-1?Et.replaceSelection(".concat(Jt.content_type,")")):(Kt==null||((gi=Kt.type)===null||gi===void 0)?void 0:gi.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,'"></video>')):(Kt==null||((vi=Kt.type)===null||vi===void 0)?void 0:vi.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,"?type=").concat(Kt.type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):T.includes(Li)?Et.replaceSelection('<a href="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,'?type=office&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):Et.replaceSelection("[".concat(Kt.name,"](").concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,"?type=").concat(Jt.content_type,")"))}else(Jt==null?void 0:Jt.status)===401&&(document.location.href="/user/login")})}catch(Jt){Oe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",Dt),Et.on("dragleave",function(At,Ht){zt.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(At,Ht){zt.current.classList.add("mouse-hover-md")}),Et.on("drop",function(At,Ht){zt.current.classList.add("mouse-hover-md");var Yt;if(Yt=Ht.dataTransfer.files,Yt.length>0){Ht.preventDefault(),Ht.stopPropagation();for(var rn=function(ri){var Kt=Yt[ri],Li=Kt.name.split(".").pop();y(Kt,function(Jt){if(Jt.id){var In,gi,vi;(Kt==null||((In=Kt.type)===null||In===void 0)?void 0:In.indexOf("image"))>-1?Et.replaceSelection(".concat(Jt.content_type,")")):(Kt==null||((gi=Kt.type)===null||gi===void 0)?void 0:gi.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,'"></video>')):(Kt==null||((vi=Kt.type)===null||vi===void 0)?void 0:vi.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,"?type=").concat(Kt.type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):T.includes(Li)?Et.replaceSelection('<a href="'.concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,'?type=office&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):Et.replaceSelection("[".concat(Kt.name,"](").concat(O.a.API_SERVER,"/api/attachments/").concat(Jt.id,"?type=").concat(Jt.content_type,")"))}else(Jt==null?void 0:Jt.status)===401&&(document.location.href="/user/login")})},Xt=0;Xt<Yt.length;Xt++)rn(Xt)}}),c(Et),function(){Et.off("paste",Dt)}}},[]);var bi=Object(j.useCallback)(function(){if(zt.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[Ct,zt,$t]);Object(j.useEffect)(function(){function Et(){var At=new B.default(function(Ht){var Yt=Object(Le.a)(Ht),rn;try{for(Yt.s();!(rn=Yt.n()).done;){var Xt=rn.value;(Xt.target.offsetHeight>0||Xt.target.offsetWidth>0)&&(bi(),h.setSize("100%","100%"),h.refresh())}}catch(Dn){Yt.e(Dn)}finally{Yt.f()}});return At.observe(hn.current.parentElement),At}if(h){var Dt=Et();return function(){Dt.unobserve(hn.current.parentElement)}}},[h,bi]),Object(j.useEffect)(function(){if(h){for(var Et=[],Dt=function(){var Xt=Ht[At];Yt=Object(F.a)(Xt,2);var Dn=Yt[0],ri=Yt[1],Kt=Object(q.a)({},Dn,function(){ii(ri)});Et.push(Kt),h.addKeyMap(Kt)},At=0,Ht=Object.entries(_);At<Ht.length;At++){var Yt;Dt()}return It.current=setInterval(function(){Sn.current&&Tn()},4e3),function(){clearInterval(It.current);var rn=Object(Le.a)(Et),Xt;try{for(rn.s();!(Xt=rn.n()).done;){var Dn=Xt.value;h.removeKeyMap(Dn)}}catch(ri){rn.e(ri)}finally{rn.f()}}}},[h]),Object(j.useEffect)(function(){Rt!==$t&&yn(Rt)},[Rt]),Object(Ye.a)(function(){if(!wn&&ci>0){var Et=new Date().getTime(),Dt=window.sessionStorage.getItem(jt);Et>=ci+Ae&&(!Dt||Dt!==it)&&(window.sessionStorage.setItem(jt,it),an(!0))}},Ae),Object(j.useEffect)(function(){Nt(Tt)},[h,Tt]),Object(j.useEffect)(function(){h&&(wt&&h.focus())},[h,wt]),Object(j.useEffect)(function(){if(ft&&h){var Et=h.getScrollerElement();function Dt(At){var Ht=At.target;if(ln.current){var Yt=Ht.scrollTop/Ht.scrollHeight;ln.current.scrollTop=ln.current.scrollHeight*Yt}}return Et.addEventListener("scroll",Dt),function(){Et.removeEventListener("scroll",Dt)}}},[h,ft]),Object(j.useEffect)(function(){if(h&&un){function Et(Dt,At){un(Dt,At)}return h.on("beforeChange",Et),function(){h.off("beforeChange",Et)}}},[h,un]),Object(j.useEffect)(function(){if(h&&bn){function Et(){bn(h.getValue())}return h.on("blur",Et),function(){h.off("blur",Et)}}},[h,bn]),Object(j.useEffect)(function(){if(h){function Et(Dt){var At=Dt.getValue();st(At),Cn(new Date().getTime()),Dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ut&&ut(At)}return h.on("change",Et),function(){h.off("change",Et)}}},[h,ut]),Object(j.useEffect)(function(){h&&(ot==null?(h.setValue(""),st("")):ot!==h.getValue()&&(h.setValue(ot),st(ot),h.setCursor(h.lineCount(),0)))},[h,ot]);var ii=Object(j.useCallback)(function(Et){var Dt=h.getCursor(),At=h.getSelection(),Ht=At.split(`
|
|
`);switch(Et){case"bold":return h.replaceSelection("**"+At+"**"),At===""&&h.setCursor(Dt.line,Dt.ch+2),h.focus();case"italic":return h.replaceSelection("*"+At+"*"),At===""&&h.setCursor(Dt.line,Dt.ch+1),h.focus();case"code":return h.replaceSelection("`"+At+"`"),At===""&&h.setCursor(Dt.line,Dt.ch+1),h.focus();case"inline-latex":return h.replaceSelection("`$$"+At+"$$`"),At===""&&h.setCursor(Dt.line,Dt.ch+3),h.focus();case"latex":return h.replaceSelection("```latex\n"+At+"\n```"),h.setCursor(Dt.line+1,At.length+1),h.focus();case"line-break":return h.replaceSelection(`<br/>
|
|
`),h.focus();case"list-ul":return At===""?h.replaceSelection("- "+At):h.replaceSelection(Ht.map(function(Yt){return Yt===""?"":"- ".concat(Yt)}).join(`
|
|
`)),h.focus();case"list-ol":return At===""?h.replaceSelection("1. "+At):h.replaceSelection(Ht.map(function(Yt,rn){return Yt===""?"":"".concat(rn+1,". ").concat(Yt)}).join(`
|
|
`)),h.focus();case"add-null-ch":return At===""&&h.setCursor(Dt.line,Dt.ch+1),h.replaceSelection(We),h.focus();case"inster-template-1":return At===""&&h.setCursor(Dt.line,Dt.ch),h.replaceSelection(ie),h.focus();case"eraser":return h.setValue(""),h.focus();case"trigger-watch":return Nt(!ft),h.focus();case"trigger-full-screen":return yn(!$t),h.focus();case Fe:dn(Fe);return;case pe:dn(pe);return;case nt:dn(nt);return;case De:dn(De);return;default:throw new Error}},[h,ft,$t]),di=Object(j.useCallback)(function(Et){dn("");switch(Vt){case Fe:var Dt=Et.title,At=Et.link;return h.replaceSelection("[".concat(Dt,"](").concat(At,")")),h.focus();case pe:var Ht=Et.language,Yt=Et.content;return h.replaceSelection(["```"+Ht,Yt,"```"].join(`
|
|
`)),h.focus();case nt:var rn=Et.src,Xt=Et.alt,Dn=Et.name;return rn.indexOf("type=image")>-1?h.replaceSelection(".concat(rn,' "').concat(Xt||"",'" )')):rn.indexOf("type=application/pdf")>-1?h.replaceSelection('<a href="'.concat(rn,'&disposition=inline" target="_blank">').concat(Dn,"</a>")):h.replaceSelection('<a href="'.concat(rn,'" target="_blank">').concat(Dn,"</a>")),h.focus();case De:for(var ri=Et.row,Kt=Et.col,Li=Et.align,Jt=`
|
|
`,In=0;In<ri;In++){for(var gi=[],vi=[],Wr=0;Wr<Kt;Wr++)In===1&&vi.push(Ke[Li]),gi.push(" ");In===1&&(Jt+="| ".concat(vi.join(" | "),` |
|
|
`)),Jt+="| ".concat(gi.join(Kt===1?"":" | "),` |
|
|
`)}return h.replaceSelection(Jt+`
|
|
`),h.focus();default:throw new Error}},[h,Vt]),pr=Object(j.useMemo)(function(){switch(Vt){case Fe:return Y.a.createElement(ve,{callback:di,onCancel:Ln});case pe:return Y.a.createElement(Re.b,{callback:di,onCancel:Ln});case nt:return Y.a.createElement(k,{callback:di,onCancel:Ln});case De:return Y.a.createElement(Ie,{callback:di,onCancel:Ln});default:return null}},[Vt]);function Ln(){dn("")}Object(j.useEffect)(function(){if(Gn.current){var Et=Gn.current,Dt=!1,At=0;function Ht(Xt){Dt=!0,At=Xt.pageY}function Yt(){Dt=!1}function rn(Xt){if(Dt){var Dn=Xt.pageY-At;Dn<0&&(Dn=0),Dn>300&&(Dn=300);var ri=ct+Dn+"px";lt(ri)}}return Et.addEventListener("mousedown",Ht),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",Yt),function(){Et.removeEventListener("mousedown",Ht),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",Yt)}}},[h,Gn]),Object(j.useEffect)(function(){lt(ct)},[ct]);var Ai=W(kt),yi=W(Ct),Ji={width:Ai,height:yi},Br=Object(j.useMemo)(function(){if(ci){var Et=new Date(ci),Dt=Et.getHours(),At=Et.getMinutes(),Ht=Et.getSeconds();return Dt=Dt<10?"0"+Dt:Dt,At=At<10?"0"+At:At,Ht=Ht<10?"0"+Ht:Ht,"".concat(Dt,":").concat(At,":").concat(Ht)}return 0},[ci]);function Fi(){window.sessionStorage.removeItem(jt),an(!1),Cn(0)}function Jo(){an(!1),Cn(0),h.setValue(window.sessionStorage.getItem(jt))}function co(Et,Dt){var At=h.getValue();At=At.replace(Et,Dt),st(At),h==null||h.setValue(At)}return Y.a.createElement(j.Fragment,null,Y.a.createElement("div",{className:"markdown-editor-wrapper",ref:zt},Y.a.createElement("div",{className:"markdown-editor-container ".concat(Ot," ").concat(ft?"on-preview":""," ").concat(Lt?"mini":""," ").concat($t?"full-screen":""),style:Ji},Y.a.createElement(L,{insertTemp:Bt,watch:ft,fullScreen:$t,showNullButton:pt,onActionCallback:ii,hidetoolBar:_n,uuid:Wt.current,setOpenPhones:function(){Sn.current=!0}}),Y.a.createElement("div",{className:"markdown-editor-body"},Y.a.createElement("div",{className:"codemirror-container"},Y.a.createElement("textarea",{ref:hn,placeholder:Jn})),ft?Y.a.createElement("div",{ref:ln,className:"preview-container"},vt==="stex"&&Y.a.createElement(Ce,{value:it}),vt!=="stex"&&Y.a.createElement(Q.a,{edit:!0,value:it,replaces:co})):null))),pn?Y.a.createElement("a",{ref:Gn,className:"editor-resize"}):null,Y.a.createElement(U.a,null,N[Vt]?Y.a.createElement(Pe.a,{centered:!0,title:N[Vt],visible:!0,onCancel:Ln,footer:null},pr):null))}},RxwV:function(yt,qe,b){"use strict";var Z=b("q1tI"),Pe=b("uciX"),Le=b("2W6z"),He=b.n(Le),Oe=b("4IlW"),ye=b("uK0f"),F=b.n(ye);function q(w,D){if(w===D)return!0;if(!w||!D)return!1;var S=w.length;if(D.length!==S)return!1;for(var k=0;k<S;k++)if(w[k]!==D[k])return!1;return!0}function V(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(S){return typeof S}:V=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},V(w)}function se(w,D){if(!(w instanceof D))throw new TypeError("Cannot call a class as a function")}function j(w,D){for(var S=0;S<D.length;S++){var k=D[S];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(w,k.key,k)}}function Y(w,D,S){return D&&j(w.prototype,D),S&&j(w,S),w}function ke(w,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(D&&D.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),D&&de(w,D)}function de(w,D){return de=Object.setPrototypeOf||function(k,v){return k.__proto__=v,k},de(w,D)}function B(w){var D=fe();return function(){var S=he(w),k;if(D){var v=he(this).constructor;k=Reflect.construct(S,arguments,v)}else k=S.apply(this,arguments);return X(this,k)}}function X(w,D){return D&&(V(D)==="object"||typeof D=="function")?D:z(w)}function z(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function fe(){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(w){return!1}}function he(w){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},he(w)}var Ne=function(){var w=function(D){ke(k,D);var S=B(k);function k(){var v;return se(this,k),v=S.apply(this,arguments),v.menuItems={},v.saveMenuItem=function(y){return function(E){v.menuItems[y]=E}},v}return Y(k,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(y){!y.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(y){var E=this.props,M=E.fieldNames,ue=E.defaultFieldNames;return M[y]||ue[y]}},{key:"getOption",value:function(y,E){var M=this.props,ue=M.prefixCls,I=M.expandTrigger,ge=M.expandIcon,_e=M.loadingIcon,Ie=this.props.onSelect.bind(this,y,E),ze=this.props.onItemDoubleClick.bind(this,y,E),Be={onClick:Ie,onDoubleClick:ze},Fe="".concat(ue,"-menu-item"),nt=null,pe=y[this.getFieldName("children")]&&y[this.getFieldName("children")].length>0;(pe||y.isLeaf===!1)&&(Fe+=" ".concat(ue,"-menu-item-expand"),y.loading||(nt=Z.createElement("span",{className:"".concat(ue,"-menu-item-expand-icon")},ge))),I==="hover"&&(pe||y.isLeaf===!1)&&(Be={onMouseEnter:this.delayOnSelect.bind(this,Ie),onMouseLeave:this.delayOnSelect.bind(this),onClick:Ie}),this.isActiveOption(y,E)&&(Fe+=" ".concat(ue,"-menu-item-active"),Be.ref=this.saveMenuItem(E)),y.disabled&&(Fe+=" ".concat(ue,"-menu-item-disabled"));var De=null;y.loading&&(Fe+=" ".concat(ue,"-menu-item-loading"),De=_e||null);var je="";return"title"in y?je=y.title:typeof y[this.getFieldName("label")]=="string"&&(je=y[this.getFieldName("label")]),Z.createElement("li",Object.assign({key:y[this.getFieldName("value")],className:Fe,title:je},Be,{role:"menuitem",onMouseDown:function(Ye){return Ye.preventDefault()}}),y[this.getFieldName("label")],nt,De)}},{key:"getActiveOptions",value:function(y){var E=this,M=this.props.options,ue=y||this.props.activeValue;return F()(M,function(I,ge){return I[E.getFieldName("value")]===ue[ge]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var y=this,E=this.props.options,M=this.getActiveOptions().map(function(ue){return ue[y.getFieldName("children")]}).filter(function(ue){return!!ue});return M.unshift(E),M}},{key:"delayOnSelect",value:function(y){for(var E=this,M=arguments.length,ue=new Array(M>1?M-1:0),I=1;I<M;I++)ue[I-1]=arguments[I];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof y=="function"&&(this.delayTimer=window.setTimeout(function(){y(ue),E.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var y=this.getShowOptions().length,E=0;E<y;E++){var M=this.menuItems[E];M&&M.parentElement&&(M.parentElement.scrollTop=M.offsetTop)}}},{key:"isActiveOption",value:function(y,E){var M=this.props.activeValue,ue=M===void 0?[]:M;return ue[E]===y[this.getFieldName("value")]}},{key:"render",value:function(){var y=this,E=this.props,M=E.prefixCls,ue=E.dropdownMenuColumnStyle;return Z.createElement("div",null,this.getShowOptions().map(function(I,ge){return Z.createElement("ul",{className:"".concat(M,"-menu"),key:ge,style:ue},I.map(function(_e){return y.getOption(_e,ge)}))}))}}]),k}(Z.Component);return w.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},w}(),Ue=Ne,we={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},Q=we;function Ce(w){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(S){return typeof S}:Ce=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},Ce(w)}function ce(w,D){if(w==null)return{};var S=P(w,D),k,v;if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(w);for(v=0;v<y.length;v++){if(k=y[v],D.indexOf(k)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(w,k))continue;S[k]=w[k]}}return S}function P(w,D){if(w==null)return{};var S={},k=Object.keys(w),v,y;for(y=0;y<k.length;y++){if(v=k[y],D.indexOf(v)>=0)continue;S[v]=w[v]}return S}function le(w){return ee(w)||me(w)||O(w)||$()}function $(){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 O(w,D){if(!w)return;if(typeof w=="string")return L(w,D);var S=Object.prototype.toString.call(w).slice(8,-1);if(S==="Object"&&w.constructor&&(S=w.constructor.name),S==="Map"||S==="Set")return Array.from(w);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return L(w,D)}function me(w){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(w))return Array.from(w)}function ee(w){if(Array.isArray(w))return L(w)}function L(w,D){(D==null||D>w.length)&&(D=w.length);for(var S=0,k=new Array(D);S<D;S++)k[S]=w[S];return k}function U(w,D){if(!(w instanceof D))throw new TypeError("Cannot call a class as a function")}function ae(w,D){for(var S=0;S<D.length;S++){var k=D[S];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(w,k.key,k)}}function K(w,D,S){return D&&ae(w.prototype,D),S&&ae(w,S),w}function G(w,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(D&&D.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),D&&m(w,D)}function m(w,D){return m=Object.setPrototypeOf||function(k,v){return k.__proto__=v,k},m(w,D)}function p(w){var D=ve();return function(){var S=Re(w),k;if(D){var v=Re(this).constructor;k=Reflect.construct(S,arguments,v)}else k=S.apply(this,arguments);return A(this,k)}}function A(w,D){return D&&(Ce(D)==="object"||typeof D=="function")?D:J(w)}function J(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function ve(){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(w){return!1}}function Re(w){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},Re(w)}var Se=function(){var w=function(D){G(k,D);var S=p(k);function k(v){var y;U(this,k),y=S.call(this,v),y.setPopupVisible=function(M){var ue=y.state.value;"popupVisible"in y.props||y.setState({popupVisible:M}),M&&!y.state.popupVisible&&y.setState({activeValue:ue}),y.props.onPopupVisibleChange(M)},y.handleChange=function(M,ue,I){var ge=ue.visible;(I.type!=="keydown"||I.keyCode===Oe.a.ENTER)&&(y.props.onChange(M.map(function(_e){return _e[y.getFieldName("value")]}),M),y.setPopupVisible(ge))},y.handlePopupVisibleChange=function(M){y.setPopupVisible(M)},y.handleMenuSelect=function(M,ue,I){var ge=y.trigger.getRootDomNode();ge&&ge.focus&&ge.focus();var _e=y.props,Ie=_e.changeOnSelect,ze=_e.loadData,Be=_e.expandTrigger;if(!M||M.disabled)return;var Fe=y.state.activeValue;Fe=Fe.slice(0,ue+1),Fe[ue]=M[y.getFieldName("value")];var nt=y.getActiveOptions(Fe);if(M.isLeaf===!1&&!M[y.getFieldName("children")]&&ze){Ie&&y.handleChange(nt,{visible:!0},I),y.setState({activeValue:Fe}),ze(nt);return}var pe={};!M[y.getFieldName("children")]||!M[y.getFieldName("children")].length?(y.handleChange(nt,{visible:!1},I),pe.value=Fe):Ie&&(I.type==="click"||I.type==="keydown")&&(Be==="hover"?y.handleChange(nt,{visible:!1},I):y.handleChange(nt,{visible:!0},I),pe.value=Fe),pe.activeValue=Fe,("value"in y.props||I.type==="keydown"&&I.keyCode!==Oe.a.ENTER)&&delete pe.value,y.setState(pe)},y.handleItemDoubleClick=function(){var M=y.props.changeOnSelect;M&&y.setPopupVisible(!1)},y.handleKeyDown=function(M){var ue=y.props.children;if(ue&&ue.props.onKeyDown){ue.props.onKeyDown(M);return}var I=le(y.state.activeValue),ge=I.length-1<0?0:I.length-1,_e=y.getCurrentLevelOptions(),Ie=_e.map(function(nt){return nt[y.getFieldName("value")]}).indexOf(I[ge]);if(M.keyCode!==Oe.a.DOWN&&M.keyCode!==Oe.a.UP&&M.keyCode!==Oe.a.LEFT&&M.keyCode!==Oe.a.RIGHT&&M.keyCode!==Oe.a.ENTER&&M.keyCode!==Oe.a.SPACE&&M.keyCode!==Oe.a.BACKSPACE&&M.keyCode!==Oe.a.ESC&&M.keyCode!==Oe.a.TAB)return;if(!y.state.popupVisible&&M.keyCode!==Oe.a.BACKSPACE&&M.keyCode!==Oe.a.LEFT&&M.keyCode!==Oe.a.RIGHT&&M.keyCode!==Oe.a.ESC&&M.keyCode!==Oe.a.TAB){y.setPopupVisible(!0);return}if(M.keyCode===Oe.a.DOWN||M.keyCode===Oe.a.UP){M.preventDefault();var ze=Ie;ze!==-1?M.keyCode===Oe.a.DOWN?(ze+=1,ze=ze>=_e.length?0:ze):(ze-=1,ze=ze<0?_e.length-1:ze):ze=0,I[ge]=_e[ze][y.getFieldName("value")]}else if(M.keyCode===Oe.a.LEFT||M.keyCode===Oe.a.BACKSPACE)M.preventDefault(),I.splice(I.length-1,1);else if(M.keyCode===Oe.a.RIGHT)M.preventDefault(),_e[Ie]&&_e[Ie][y.getFieldName("children")]&&I.push(_e[Ie][y.getFieldName("children")][0][y.getFieldName("value")]);else if(M.keyCode===Oe.a.ESC||M.keyCode===Oe.a.TAB){y.setPopupVisible(!1);return}(!I||I.length===0)&&y.setPopupVisible(!1);var Be=y.getActiveOptions(I),Fe=Be[Be.length-1];y.handleMenuSelect(Fe,Be.length-1,M),y.props.onKeyDown&&y.props.onKeyDown(M)},y.saveTrigger=function(M){y.trigger=M};var E=[];return"value"in v?E=v.value||[]:"defaultValue"in v&&(E=v.defaultValue||[]),He()(!("filedNames"in v),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),y.state={popupVisible:v.popupVisible,activeValue:E,value:E,prevProps:v},y.defaultFieldNames={label:"label",value:"value",children:"children"},y}return K(k,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(y){var E=this.defaultFieldNames,M=this.props,ue=M.fieldNames,I=M.filedNames;return"filedNames"in this.props?I[y]||E[y]:ue[y]||E[y]}},{key:"getFieldNames",value:function(){var y=this.props,E=y.fieldNames,M=y.filedNames;return"filedNames"in this.props?M:E}},{key:"getCurrentLevelOptions",value:function(){var y=this,E=this.props.options,M=E===void 0?[]:E,ue=this.state.activeValue,I=ue===void 0?[]:ue,ge=F()(M,function(_e,Ie){return _e[y.getFieldName("value")]===I[Ie]},{childrenKeyName:this.getFieldName("children")});return ge[ge.length-2]?ge[ge.length-2][this.getFieldName("children")]:le(M).filter(function(_e){return!_e.disabled})}},{key:"getActiveOptions",value:function(y){var E=this;return F()(this.props.options||[],function(M,ue){return M[E.getFieldName("value")]===y[ue]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var y=this.props,E=y.prefixCls,M=y.transitionName,ue=y.popupClassName,I=y.options,ge=I===void 0?[]:I,_e=y.disabled,Ie=y.builtinPlacements,ze=y.popupPlacement,Be=y.children,Fe=y.dropdownRender,nt=ce(y,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),pe=Z.createElement("div",null),De="";ge&&ge.length>0?pe=Z.createElement(Ue,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):De=" ".concat(E,"-menus-empty");var je=pe;return Fe&&(je=Fe(pe)),Z.createElement(Pe.a,Object.assign({ref:this.saveTrigger},nt,{popupPlacement:ze,builtinPlacements:Ie,popupTransitionName:M,action:_e?[]:["click"],popupVisible:_e?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(E,"-menus"),popupClassName:ue+De,popup:je}),Z.cloneElement(Be,{onKeyDown:this.handleKeyDown,tabIndex:_e?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(y,E){var M=E.prevProps,ue=M===void 0?{}:M,I={prevProps:y};return"value"in y&&!q(ue.value,y.value)&&(I.value=y.value||[],"loadData"in y||(I.activeValue=y.value||[])),"popupVisible"in y&&(I.popupVisible=y.popupVisible),I}}]),k}(Z.Component);return w.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:Q,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},w}(),Te=Se,R=qe.a=Te},SJMd:function(yt,qe){/**
|
|
* @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 b,Z,Pe,Le=!1,He,Oe;window.PR_SHOULD_USE_CONTINUATION=!0;var ye,F;(function(){var q=window,V=["break,continue,do,else,for,if,return,while"],se=[V,"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"],j=[se,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],Y=[j,"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"],ke=[j,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],de=[j,"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"],B="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",X=[j,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],z="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",fe=[V,"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"],he=[V,"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"],Ne=[V,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Ue=[Y,de,ke,X,z,fe,he,Ne],we=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Q="str",Ce="kwd",ce="com",P="typ",le="lit",$="pun",O="pln",me="tag",ee="dec",L="src",U="atn",ae="atv",K="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function m(I){for(var ge=0,_e=!1,Ie=!1,ze=0,Be=I.length;ze<Be;++ze){var Fe=I[ze];if(Fe.ignoreCase)Ie=!0;else if(/[a-z]/i.test(Fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){_e=!0,Ie=!1;break}}var nt={b:8,t:9,n:10,v:11,f:12,r:13};function pe(Ve){var xe=Ve.charCodeAt(0);if(xe!==92)return xe;var et=Ve.charAt(1);return xe=nt[et],xe||("0"<=et&&et<="7"?parseInt(Ve.substring(1),8):et==="u"||et==="x"?parseInt(Ve.substring(2),16):Ve.charCodeAt(1))}function De(Ve){if(Ve<32)return(Ve<16?"\\x0":"\\x")+Ve.toString(16);var xe=String.fromCharCode(Ve);return xe==="\\"||xe==="-"||xe==="]"||xe==="^"?"\\"+xe:xe}function je(Ve){var xe=Ve.substring(1,Ve.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),et=[],Ze=xe[0]==="^",Ae=["["];Ze&&Ae.push("^");for(var We=Ze?1:0,ie=xe.length;We<ie;++We){var W=xe[We];if(/\\[bdsw]/i.test(W))Ae.push(W);else{var re=pe(W),x;We+2<ie&&xe[We+1]==="-"?(x=pe(xe[We+2]),We+=2):x=re,et.push([re,x]),x<65||re>122||(x<65||re>90||et.push([Math.max(65,re)|32,Math.min(x,90)|32]),x<97||re>122||et.push([Math.max(97,re)&~32,Math.min(x,122)&~32]))}}et.sort(function(be,oe){return be[0]-oe[0]||oe[1]-be[1]});for(var T=[],_=[],We=0;We<et.length;++We){var N=et[We];N[0]<=_[1]+1?_[1]=Math.max(_[1],N[1]):T.push(_=N)}for(var We=0;We<T.length;++We){var N=T[We];Ae.push(De(N[0])),N[1]>N[0]&&(N[1]+1>N[0]&&Ae.push("-"),Ae.push(De(N[1])))}return Ae.push("]"),Ae.join("")}function Ke(Ve){for(var xe=Ve.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")),et=xe.length,Ze=[],Ae=0,We=0;Ae<et;++Ae){var ie=xe[Ae];if(ie==="(")++We;else if(ie.charAt(0)==="\\"){var W=+ie.substring(1);W&&(W<=We?Ze[W]=-1:xe[Ae]=De(W))}}for(var Ae=1;Ae<Ze.length;++Ae)Ze[Ae]===-1&&(Ze[Ae]=++ge);for(var Ae=0,We=0;Ae<et;++Ae){var ie=xe[Ae];if(ie==="(")++We,Ze[We]||(xe[Ae]="(?:");else if(ie.charAt(0)==="\\"){var W=+ie.substring(1);W&&W<=We&&(xe[Ae]="\\"+Ze[W])}}for(var Ae=0;Ae<et;++Ae)xe[Ae]==="^"&&xe[Ae+1]!=="^"&&(xe[Ae]="");if(Ve.ignoreCase&&_e)for(var Ae=0;Ae<et;++Ae){var ie=xe[Ae],re=ie.charAt(0);ie.length>=2&&re==="["?xe[Ae]=je(ie):re!=="\\"&&(xe[Ae]=ie.replace(/[a-zA-Z]/g,function(_){var N=_.charCodeAt(0);return"["+String.fromCharCode(N&~32,N|32)+"]"}))}return xe.join("")}for(var Ye=[],ze=0,Be=I.length;ze<Be;++ze){var Fe=I[ze];if(Fe.global||Fe.multiline)throw new Error(""+Fe);Ye.push("(?:"+Ke(Fe)+")")}return new RegExp(Ye.join("|"),Ie?"gi":"g")}function p(I,ge){var _e=/(?:^|\s)nocode(?:\s|$)/,Ie=[],ze=0,Be=[],Fe=0;function nt(pe){var De=pe.nodeType;if(De==1){if(_e.test(pe.className))return;for(var je=pe.firstChild;je;je=je.nextSibling)nt(je);var Ke=pe.nodeName.toLowerCase();(Ke==="br"||Ke==="li")&&(Ie[Fe]=`
|
|
`,Be[Fe<<1]=ze++,Be[Fe++<<1|1]=pe)}else if(De==3||De==4){var Ye=pe.nodeValue;Ye.length&&(ge?Ye=Ye.replace(/\r\n?/g,`
|
|
`):Ye=Ye.replace(/[ \t\r\n]+/g," "),Ie[Fe]=Ye,Be[Fe<<1]=ze,ze+=Ye.length,Be[Fe++<<1|1]=pe)}}return nt(I),{sourceCode:Ie.join("").replace(/\n$/,""),spans:Be}}function A(I,ge,_e,Ie,ze){if(!_e)return;var Be={sourceNode:I,pre:1,langExtension:null,numberLines:null,sourceCode:_e,spans:null,basePos:ge,decorations:null};Ie(Be),ze.push.apply(ze,Be.decorations)}var J=/\S/;function ve(I){for(var ge=void 0,_e=I.firstChild;_e;_e=_e.nextSibling){var Ie=_e.nodeType;ge=Ie===1?ge?I:_e:Ie===3&&J.test(_e.nodeValue)?I:ge}return ge===I?void 0:ge}function Re(I,ge){var _e={},Ie;(function(){for(var Fe=I.concat(ge),nt=[],pe={},De=0,je=Fe.length;De<je;++De){var Ke=Fe[De],Ye=Ke[3];if(Ye)for(var Ve=Ye.length;--Ve>=0;)_e[Ye.charAt(Ve)]=Ke;var xe=Ke[1],et=""+xe;pe.hasOwnProperty(et)||(nt.push(xe),pe[et]=null)}nt.push(/[\0-\uffff]/),Ie=m(nt)})();var ze=ge.length,Be=function(Fe){for(var nt=Fe.sourceCode,pe=Fe.basePos,De=Fe.sourceNode,je=[pe,O],Ke=0,Ye=nt.match(Ie)||[],Ve={},xe=0,et=Ye.length;xe<et;++xe){var Ze=Ye[xe],Ae=Ve[Ze],We=void 0,ie;if(typeof Ae=="string")ie=!1;else{var W=_e[Ze.charAt(0)];if(W)We=Ze.match(W[1]),Ae=W[0];else{for(var re=0;re<ze;++re)if(W=ge[re],We=Ze.match(W[1]),We){Ae=W[0];break}We||(Ae=O)}ie=Ae.length>=5&&Ae.substring(0,5)==="lang-",ie&&!(We&&typeof We[1]=="string")&&(ie=!1,Ae=L),ie||(Ve[Ze]=Ae)}var x=Ke;if(Ke+=Ze.length,!ie)je.push(pe+x,Ae);else{var T=We[1],_=Ze.indexOf(T),N=_+T.length;We[2]&&(N=Ze.length-We[2].length,_=N-T.length);var be=Ae.substring(5);A(De,pe+x,Ze.substring(0,_),Be,je),A(De,pe+x+_,T,k(be,T),je),A(De,pe+x+N,Ze.substring(N),Be,je)}}Fe.decorations=je};return Be}function Se(I){var ge=[],_e=[];I.tripleQuotedStrings?ge.push([Q,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):I.multiLineStrings?ge.push([Q,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ge.push([Q,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),I.verbatimStrings&&_e.push([Q,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=I.hashComments;Ie&&(I.cStyleComments?(Ie>1?ge.push([ce,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ge.push([ce,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),_e.push([Q,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ge.push([ce,/^#[^\r\n]*/,null,"#"])),I.cStyleComments&&(_e.push([ce,/^\/\/[^\r\n]*/,null]),_e.push([ce,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ze=I.regexLiterals;if(ze){var Be=ze>1?"":`
|
|
\r`,Fe=Be?".":"[\\S\\s]",nt="/(?=[^/*"+Be+"])(?:[^/\\x5B\\x5C"+Be+"]|\\x5C"+Fe+"|\\x5B(?:[^\\x5C\\x5D"+Be+"]|\\x5C"+Fe+")*(?:\\x5D|$))+/";_e.push(["lang-regex",RegExp("^"+G+"("+nt+")")])}var pe=I.types;pe&&_e.push([P,pe]);var De=(""+I.keywords).replace(/^ | $/g,"");De.length&&_e.push([Ce,new RegExp("^(?:"+De.replace(/[\s,]+/g,"|")+")\\b"),null]),ge.push([O,/^\s+/,null,` \r
|
|
\xA0`]);var je="^.[^\\s\\w.$@'\"`/\\\\]*";return I.regexLiterals&&(je+="(?!s*/)"),_e.push([le,/^@[a-z_$][a-z_$@0-9]*/i,null],[P,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[O,/^[a-z_$][a-z_$@0-9]*/i,null],[le,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[O,/^\\[\s\S]?/,null],[$,new RegExp(je),null]),Re(ge,_e)}var Te=Se({keywords:Ue,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function R(I,ge,_e){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,ze=/\r\n?|\n/,Be=I.ownerDocument,Fe=Be.createElement("li");I.firstChild;)Fe.appendChild(I.firstChild);var nt=[Fe];function pe(xe){var et=xe.nodeType;if(et==1&&!Ie.test(xe.className))if(xe.nodeName==="br")De(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var Ze=xe.firstChild;Ze;Ze=Ze.nextSibling)pe(Ze);else if((et==3||et==4)&&_e){var Ae=xe.nodeValue,We=Ae.match(ze);if(We){var ie=Ae.substring(0,We.index);xe.nodeValue=ie;var W=Ae.substring(We.index+We[0].length);if(W){var re=xe.parentNode;re.insertBefore(Be.createTextNode(W),xe.nextSibling)}De(xe),ie||xe.parentNode.removeChild(xe)}}}function De(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function et(We,ie){var W=ie?We.cloneNode(!1):We,re=We.parentNode;if(re){var x=et(re,1),T=We.nextSibling;x.appendChild(W);for(var _=T;_;_=T)T=_.nextSibling,x.appendChild(_)}return W}for(var Ze=et(xe.nextSibling,0),Ae;(Ae=Ze.parentNode)&&Ae.nodeType===1;)Ze=Ae;nt.push(Ze)}for(var je=0;je<nt.length;++je)pe(nt[je]);ge===(ge|0)&&nt[0].setAttribute("value",ge);var Ke=Be.createElement("ol");Ke.className="linenums";for(var Ye=Math.max(0,ge-1|0)||0,je=0,Ve=nt.length;je<Ve;++je)Fe=nt[je],Fe.className="L"+(je+Ye)%10,Fe.firstChild||Fe.appendChild(Be.createTextNode("\xA0")),Ke.appendChild(Fe);I.appendChild(Ke)}function w(I){var ge=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ge=ge&&+ge[1]<=8;var _e=/\n/g,Ie=I.sourceCode,ze=Ie.length,Be=0,Fe=I.spans,nt=Fe.length,pe=0,De=I.decorations,je=De.length,Ke=0;De[je]=ze;var Ye,Ve;for(Ve=Ye=0;Ve<je;)De[Ve]!==De[Ve+2]?(De[Ye++]=De[Ve++],De[Ye++]=De[Ve++]):Ve+=2;for(je=Ye,Ve=Ye=0;Ve<je;){for(var xe=De[Ve],et=De[Ve+1],Ze=Ve+2;Ze+2<=je&&De[Ze+1]===et;)Ze+=2;De[Ye++]=xe,De[Ye++]=et,Ve=Ze}je=De.length=Ye;var Ae=I.sourceNode,We="";Ae&&(We=Ae.style.display,Ae.style.display="none");try{for(var ie=null;pe<nt;){var W=Fe[pe],re=Fe[pe+2]||ze,x=De[Ke+2]||ze,Ze=Math.min(re,x),T=Fe[pe+1],_;if(T.nodeType!==1&&(_=Ie.substring(Be,Ze))){ge&&(_=_.replace(_e,"\r")),T.nodeValue=_;var N=T.ownerDocument,be=N.createElement("span");be.className=De[Ke+1];var oe=T.parentNode;oe.replaceChild(be,T),be.appendChild(T),Be<re&&(Fe[pe+1]=T=N.createTextNode(Ie.substring(Ze,re)),oe.insertBefore(T,be.nextSibling))}Be=Ze,Be>=re&&(pe+=2),Be>=x&&(Ke+=2)}}finally{Ae&&(Ae.style.display=We)}}var D={};function S(I,ge){for(var _e=ge.length;--_e>=0;){var Ie=ge[_e];D.hasOwnProperty(Ie)?q.console&&console.warn("cannot override language handler %s",Ie):D[Ie]=I}}function k(I,ge){return I&&D.hasOwnProperty(I)||(I=/^\s*</.test(ge)?"default-markup":"default-code"),D[I]}S(Te,["default-code"]),S(Re([],[[O,/^[^<?]+/],[ee,/^<!\w[^>]*(?:>|$)/],[ce,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[$,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),S(Re([[O,/^[\s]+/,null,` \r
|
|
`],[ae,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[me,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[$,/^[=<>\/]+/],["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"]),S(Re([],[[ae,/^[\s\S]+/]]),["uq.val"]),S(Se({keywords:Y,hashComments:!0,cStyleComments:!0,types:we}),["c","cc","cpp","cxx","cyc","m"]),S(Se({keywords:"null,true,false"}),["json"]),S(Se({keywords:de,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:we}),["cs"]),S(Se({keywords:ke,cStyleComments:!0}),["java"]),S(Se({keywords:Ne,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),S(Se({keywords:fe,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),S(Se({keywords:z,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),S(Se({keywords:he,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),S(Se({keywords:X,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),S(Se({keywords:B,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),S(Re([],[[Q,/^[\s\S]+/]]),["regex"]);function v(I){var ge=I.langExtension;try{var _e=p(I.sourceNode,I.pre),Ie=_e.sourceCode;I.sourceCode=Ie,I.spans=_e.spans,I.basePos=0,k(ge,Ie)(I),w(I)}catch(ze){q.console&&console.log(ze&&ze.stack||ze)}}function y(I,ge,_e){var Ie=_e||!1,ze=ge||null,Be=document.createElement("div");Be.innerHTML="<pre>"+I+"</pre>",Be=Be.firstChild,Ie&&R(Be,Ie,!0);var Fe={langExtension:ze,numberLines:Ie,sourceNode:Be,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return v(Fe),Be.innerHTML}function E(I,ge){var _e=ge||document.body,Ie=_e.ownerDocument||document;function ze(W){return _e.getElementsByTagName(W)}for(var Be=[ze("pre"),ze("code"),ze("xmp")],Fe=[],nt=0;nt<Be.length;++nt)for(var pe=0,De=Be[nt].length;pe<De;++pe)Fe.push(Be[nt][pe]);Be=null;var je=Date;je.now||(je={now:function(){return+new Date}});var Ke=0,Ye=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ve=/\bprettyprint\b/,xe=/\bprettyprinted\b/,et=/pre|xmp/i,Ze=/^code$/i,Ae=/^(?:pre|code|xmp)$/i,We={};function ie(){for(var W=q.PR_SHOULD_USE_CONTINUATION?je.now()+250:Infinity;Ke<Fe.length&&je.now()<W;Ke++){for(var re=Fe[Ke],x=We,T=re;T=T.previousSibling;){var _=T.nodeType,N=(_===7||_===8)&&T.nodeValue;if(N?!/^\??prettify\b/.test(N):_!==3||/\S/.test(T.nodeValue))break;if(N){x={},N.replace(/\b(\w+)=([\w:.%+-]+)/g,function(wt,Tt,Bt){x[Tt]=Bt});break}}var be=re.className;if((x!==We||Ve.test(be))&&!xe.test(be)){for(var oe=!1,Xe=re.parentNode;Xe;Xe=Xe.parentNode){var ot=Xe.tagName;if(Ae.test(ot)&&Xe.className&&Ve.test(Xe.className)){oe=!0;break}}if(!oe){re.className+=" prettyprinted";var ut=x.lang;if(!ut){ut=be.match(Ye);var at;!ut&&(at=ve(re))&&Ze.test(at.tagName)&&(ut=at.className.match(Ye)),ut&&(ut=ut[1])}var kt;if(et.test(re.tagName))kt=1;else{var St=re.currentStyle,ct=Ie.defaultView,Ft=St?St.whiteSpace:ct&&ct.getComputedStyle?ct.getComputedStyle(re,null).getPropertyValue("white-space"):0;kt=Ft&&Ft.substring(0,3)==="pre"}var Lt=x.linenums;(Lt=Lt==="true"||+Lt)||(Lt=be.match(/\blinenums\b(?::(\d+))?/),Lt=Lt?Lt[1]&&Lt[1].length?+Lt[1]:!0:!1),Lt&&R(re,Lt,kt);var xt={langExtension:ut,sourceNode:re,numberLines:Lt,pre:kt,sourceCode:null,basePos:null,spans:null,decorations:null};v(xt)}}}Ke<Fe.length?q.setTimeout(ie,250):typeof I=="function"&&I()}ie()}var M=q.PR={createSimpleLexer:Re,registerLangHandler:S,sourceDecorator:Se,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:ae,PR_COMMENT:ce,PR_DECLARATION:ee,PR_KEYWORD:Ce,PR_LITERAL:le,PR_NOCODE:K,PR_PLAIN:O,PR_PUNCTUATION:$,PR_SOURCE:L,PR_STRING:Q,PR_TAG:me,PR_TYPE:P,prettyPrintOne:Le?q.prettyPrintOne=y:ye=y,prettyPrint:F=Le?q.prettyPrint=E:F=E},ue=q.define;typeof ue=="function"&&ue.amd&&ue("google-code-prettify",[],function(){return M})})()},"VrN/":function(yt,qe,b){(function(Z,Pe){yt.exports=Pe()})(this,function(){"use strict";var Z=navigator.userAgent,Pe=navigator.platform,Le=/gecko\/\d/i.test(Z),He=/MSIE \d/.test(Z),Oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),ye=/Edge\/(\d+)/.exec(Z),F=He||Oe||ye,q=F&&(He?document.documentMode||6:+(ye||Oe)[1]),V=!ye&&/WebKit\//.test(Z),se=V&&/Qt\/\d+\.\d+/.test(Z),j=!ye&&/Chrome\//.test(Z),Y=/Opera\//.test(Z),ke=/Apple Computer/.test(navigator.vendor),de=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),B=/PhantomJS/.test(Z),X=!ye&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),z=/Android/.test(Z),fe=X||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),he=X||/Mac/.test(Pe),Ne=/\bCrOS\b/.test(Z),Ue=/win/i.test(Pe),we=Y&&Z.match(/Version\/(\d*\.\d*)/);we&&(we=Number(we[1])),we&&we>=15&&(Y=!1,V=!0);var Q=he&&(se||Y&&(we==null||we<12.11)),Ce=Le||F&&q>=9;function ce(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var P=function(e,t){var i=e.className,n=ce(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function le(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function $(e,t){return le(e).appendChild(t)}function O(e,t,i,n){var r=document.createElement(e);if(i&&(r.className=i),n&&(r.style.cssText=n),typeof t=="string")r.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)r.appendChild(t[s]);return r}function me(e,t,i,n){var r=O(e,t,i,n);return r.setAttribute("role","presentation"),r}var ee;document.createRange?ee=function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:ee=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function L(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function U(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ae(e,t){var i=e.className;ce(t).test(i)||(e.className+=(i?" ":"")+t)}function K(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ce(i[n]).test(t)&&(t+=" "+i[n]);return t}var G=function(e){e.select()};X?G=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:F&&(G=function(e){try{e.select()}catch(t){}});function m(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function p(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function A(e,t,i,n,r){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=n||0,l=r||0;;){var f=e.indexOf(" ",s);if(f<0||f>=t)return l+(t-s);l+=f-s,l+=i-l%i,s=f+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=m(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ve(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var Re=50,Se={toString:function(){return"CodeMirror.Pass"}},Te={scroll:!1},R={origin:"*mouse"},w={origin:"+move"};function D(e,t,i){for(var n=0,r=0;;){var s=e.indexOf(" ",n);s==-1&&(s=e.length);var l=s-n;if(s==e.length||r+l>=t)return n+Math.min(l,t-r);if(r+=s-n,r+=i-r%i,n=s+1,r>=t)return n}}var S=[""];function k(e){for(;S.length<=e;)S.push(v(S)+" ");return S[e]}function v(e){return e[e.length-1]}function y(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function E(e,t,i){for(var n=0,r=i(t);n<e.length&&i(e[n])<=r;)n++;e.splice(n,0,t)}function M(){}function ue(e,t){var i;return Object.create?i=Object.create(e):(M.prototype=e,i=new M),t&&p(t,i),i}var I=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ge(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||I.test(e))}function _e(e,t){return t?t.source.indexOf("\\w")>-1&&ge(e)?!0:t.test(e):ge(e)}function Ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ze=/[\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 Be(e){return e.charCodeAt(0)>=768&&ze.test(e)}function Fe(e,t,i){for(;(i<0?t>0:t<e.length)&&Be(e.charAt(t));)t+=i;return t}function nt(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var r=(t+i)/2,s=n<0?Math.ceil(r):Math.floor(r);if(s==t)return e(s)?t:i;e(s)?i=s:t=s+n}}function pe(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var r=!1,s=0;s<e.length;++s){var l=e[s];(l.from<i&&l.to>t||t==i&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",s),r=!0)}r||n(t,i,"ltr")}var De=null;function je(e,t,i){var n;De=null;for(var r=0;r<e.length;++r){var s=e[r];if(s.from<t&&s.to>t)return r;s.to==t&&(s.from!=s.to&&i=="before"?n=r:De=r),s.from==t&&(s.from!=s.to&&i!="before"?n=r:De=r)}return n!=null?n:De}var Ke=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?t.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,l=/[Lb1n]/,f=/[1n]/;function g(C,H,ne){this.level=C,this.from=H,this.to=ne}return function(C,H){var ne=H=="ltr"?"L":"R";if(C.length==0||H=="ltr"&&!n.test(C))return!1;for(var Me=C.length,Ee=[],Je=0;Je<Me;++Je)Ee.push(i(C.charCodeAt(Je)));for(var tt=0,rt=ne;tt<Me;++tt){var dt=Ee[tt];dt=="m"?Ee[tt]=rt:rt=dt}for(var mt=0,ht=ne;mt<Me;++mt){var bt=Ee[mt];bt=="1"&&ht=="r"?Ee[mt]="n":s.test(bt)&&(ht=bt,bt=="r"&&(Ee[mt]="R"))}for(var Mt=1,_t=Ee[0];Mt<Me-1;++Mt){var Ut=Ee[Mt];Ut=="+"&&_t=="1"&&Ee[Mt+1]=="1"?Ee[Mt]="1":Ut==","&&_t==Ee[Mt+1]&&(_t=="1"||_t=="n")&&(Ee[Mt]=_t),_t=Ut}for(var fn=0;fn<Me;++fn){var Bn=Ee[fn];if(Bn==",")Ee[fn]="N";else if(Bn=="%"){var kn=void 0;for(kn=fn+1;kn<Me&&Ee[kn]=="%";++kn);for(var fi=fn&&Ee[fn-1]=="!"||kn<Me&&Ee[kn]=="1"?"1":"N",si=fn;si<kn;++si)Ee[si]=fi;fn=kn-1}}for(var Rn=0,li=ne;Rn<Me;++Rn){var $n=Ee[Rn];li=="L"&&$n=="1"?Ee[Rn]="L":s.test($n)&&(li=$n)}for(var Pn=0;Pn<Me;++Pn)if(r.test(Ee[Pn])){var Nn=void 0;for(Nn=Pn+1;Nn<Me&&r.test(Ee[Nn]);++Nn);for(var On=(Pn?Ee[Pn-1]:ne)=="L",ui=(Nn<Me?Ee[Nn]:ne)=="L",hr=On==ui?On?"L":"R":ne,Ui=Pn;Ui<Nn;++Ui)Ee[Ui]=hr;Pn=Nn-1}for(var qn=[],ki,Wn=0;Wn<Me;)if(l.test(Ee[Wn])){var $o=Wn;for(++Wn;Wn<Me&&l.test(Ee[Wn]);++Wn);qn.push(new g(0,$o,Wn))}else{var _i=Wn,$i=qn.length,Yi=H=="rtl"?1:0;for(++Wn;Wn<Me&&Ee[Wn]!="L";++Wn);for(var ni=_i;ni<Wn;)if(f.test(Ee[ni])){_i<ni&&(qn.splice($i,0,new g(1,_i,ni)),$i+=Yi);var fr=ni;for(++ni;ni<Wn&&f.test(Ee[ni]);++ni);qn.splice($i,0,new g(2,fr,ni)),$i+=Yi,_i=ni}else++ni;_i<Wn&&qn.splice($i,0,new g(1,_i,Wn))}return H=="ltr"&&(qn[0].level==1&&(ki=C.match(/^\s+/))&&(qn[0].from=ki[0].length,qn.unshift(new g(0,0,ki[0].length))),v(qn).level==1&&(ki=C.match(/\s+$/))&&(v(qn).to-=ki[0].length,qn.push(new g(0,Me-ki[0].length,Me)))),H=="rtl"?qn.reverse():qn}}();function Ye(e,t){var i=e.order;return i==null&&(i=e.order=Ke(e.text,t)),i}var Ve=[],xe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ve).concat(i)}};function et(e,t){return e._handlers&&e._handlers[t]||Ve}function Ze(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,r=n&&n[t];if(r){var s=ve(r,i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function Ae(e,t){var i=et(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function We(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ae(e,i||t.type,e,t),_(t)||t.codemirrorIgnore}function ie(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ve(i,t[n])==-1&&i.push(t[n])}function W(e,t){return et(e,t).length>0}function re(e){e.prototype.on=function(t,i){xe(this,t,i)},e.prototype.off=function(t,i){Ze(this,t,i)}}function x(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function T(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function N(e){x(e),T(e)}function be(e){return e.target||e.srcElement}function oe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),he&&e.ctrlKey&&t==1&&(t=3),t}var Xe=function(){if(F&&q<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}(),ot;function ut(e){if(ot==null){var t=O("span","\u200B");$(e,O("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ot=t.offsetWidth<=1&&t.offsetHeight>2&&!(F&&q<8))}var i=ot?O("span","\u200B"):O("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var at;function kt(e){if(at!=null)return at;var t=$(e,document.createTextNode("A\u062EA")),i=ee(t,0,1).getBoundingClientRect(),n=ee(t,1,2).getBoundingClientRect();return le(e),!i||i.left==i.right?!1:at=n.right-i.right<3}var St=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var r=e.indexOf(`
|
|
`,t);r==-1&&(r=e.length);var s=e.slice(t,e.charAt(r-1)=="\r"?r-1:r),l=s.indexOf("\r");l!=-1?(i.push(s.slice(0,l)),t+=l+1):(i.push(s),t=r+1)}return i}:function(e){return e.split(/\r\n?|\n/)},ct=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ft=function(){var e=O("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Lt=null;function xt(e){if(Lt!=null)return Lt;var t=$(e,O("span","x")),i=t.getBoundingClientRect(),n=ee(t,0,1).getBoundingClientRect();return Lt=Math.abs(i.left-n.left)>1}var wt={},Tt={};function Bt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),wt[e]=t}function qt(e,t){Tt[e]=t}function vt(e){if(typeof e=="string"&&Tt.hasOwnProperty(e))e=Tt[e];else if(e&&typeof e.name=="string"&&Tt.hasOwnProperty(e.name)){var t=Tt[e.name];typeof t=="string"&&(t={name:t}),e=ue(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return vt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return vt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function vn(e,t){t=vt(t);var i=wt[t.name];if(!i)return vn(e,"text/plain");var n=i(e,t);if(jt.hasOwnProperty(t.name)){var r=jt[t.name];for(var s in r){if(!r.hasOwnProperty(s))continue;n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=r[s]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var jt={};function Zt(e,t){var i=jt.hasOwnProperty(e)?jt[e]:jt[e]={};p(t,i)}function pn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function en(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function wn(e,t,i){return e.startState?e.startState(t,i):!0}var Pt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Pt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},Pt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=A(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?A(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.indentation=function(){return A(this.string,null,this.tabSize)-(this.lineStart?A(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(l){return i?l.toLowerCase():l},r=this.string.substr(this.pos,e.length);if(n(r)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function pt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var r=i.children[n],s=r.chunkSize();if(t<s){i=r;break}t-=s}return i.lines[t]}function on(e,t,i){var n=[],r=t.line;return e.iter(t.line,i.line+1,function(s){var l=s.text;r==i.line&&(l=l.slice(0,i.ch)),r==t.line&&(l=l.slice(t.ch)),n.push(l),++r}),n}function _n(e,t,i){var n=[];return e.iter(t,i,function(r){n.push(r.text)}),n}function En(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Rt(e){if(e.parent==null)return null;for(var t=e.parent,i=ve(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;!(n.children[r]==t);++r)i+=n.children[r].chunkSize();return i+t.first}function bn(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],s=r.height;if(t<s){e=r;continue e}t-=s,i+=r.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var f=e.lines[l],g=f.height;if(t<g)break;t-=g}return i+l}function un(e,t){return t>=e.first&&t<e.first+e.size}function ei(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Qe(e,t,i){if(i===void 0&&(i=null),!(this instanceof Qe))return new Qe(e,t,i);this.line=e,this.ch=t,this.sticky=i}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function Hn(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function zn(e){return Qe(e.line,e.ch)}function Yn(e,t){return Ot(e,t)<0?t:e}function Jn(e,t){return Ot(e,t)<0?e:t}function d(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function o(e,t){if(t.line<e.first)return Qe(e.first,0);var i=e.first+e.size-1;return t.line>i?Qe(i,pt(e,i).text.length):a(t,pt(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?Qe(e.line,t):i<0?Qe(e.line,0):e}function u(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=o(e,t[n]);return i}var h=function(e,t){this.state=e,this.lookAhead=t},c=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};c.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},c.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},c.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},c.fromSaved=function(e,t,i){return t instanceof h?new c(e,pn(e.mode,t.state),i,t.lookAhead):new c(e,pn(e.mode,t),i)},c.prototype.save=function(e){var t=e!==!1?pn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new h(t,this.maxLookAhead):t};function te(e,t,i,n){var r=[e.state.modeGen],s={};tn(e,t.text,e.doc.mode,i,function(C,H){return r.push(C,H)},s,n);for(var l=i.state,f=function(C){i.baseTokens=r;var H=e.state.overlays[C],ne=1,Me=0;i.state=!0,tn(e,t.text,H.mode,i,function(Ee,Je){for(var tt=ne;Me<Ee;){var rt=r[ne];rt>Ee&&r.splice(ne,1,Ee,r[ne+1],rt),ne+=2,Me=Math.min(Ee,rt)}if(!Je)return;if(H.opaque)r.splice(tt,ne-tt,Ee,"overlay "+Je),ne=tt+2;else for(;tt<ne;tt+=2){var dt=r[tt+1];r[tt+1]=(dt?dt+" ":"")+"overlay "+Je}},s),i.state=l,i.baseTokens=null,i.baseTokenPos=1},g=0;g<e.state.overlays.length;++g)f(g);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function $e(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=it(e,Rt(t)),r=t.text.length>e.options.maxHighlightLength&&pn(e.doc.mode,n.state),s=te(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function it(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new c(n,!0,t);var s=$t(e,t,i),l=s>n.first&&pt(n,s-1).stateAfter,f=l?c.fromSaved(n,l,s):new c(n,wn(n.mode),s);return n.iter(s,t,function(g){st(e,g.text,f);var C=f.line;g.stateAfter=C==t-1||C%5==0||C>=r.viewFrom&&C<r.viewTo?f.save():null,f.nextLine()}),i&&(n.modeFrontier=f.line),f}function st(e,t,i,n){var r=e.doc.mode,s=new Pt(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&Ge(r,i.state);!s.eol();)gt(r,s,i.state),s.start=s.pos}function Ge(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=en(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function gt(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=en(e,i).mode);var s=e.token(t,i);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var ft=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Nt(e,t,i,n){var r=e.doc,s=r.mode,l;t=o(r,t);var f=pt(r,t.line),g=it(e,t.line,i),C=new Pt(f.text,e.options.tabSize,g),H;for(n&&(H=[]);(n||C.pos<t.ch)&&!C.eol();)C.start=C.pos,l=gt(s,C,g.state),n&&H.push(new ft(C,l,pn(r.mode,g.state)));return n?H:new ft(C,l,g.state)}function cn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function tn(e,t,i,n,r,s,l){var f=i.flattenSpans;f==null&&(f=e.options.flattenSpans);var g=0,C=null,H=new Pt(t,e.options.tabSize,n),ne,Me=e.options.addModeClass&&[null];for(t==""&&cn(Ge(i,n.state),s);!H.eol();){if(H.pos>e.options.maxHighlightLength?(f=!1,l&&st(e,t,n,H.pos),H.pos=t.length,ne=null):ne=cn(gt(i,H,n.state,Me),s),Me){var Ee=Me[0].name;Ee&&(ne="m-"+(ne?Ee+" "+ne:Ee))}if(!f||C!=ne){for(;g<H.start;)g=Math.min(H.start,g+5e3),r(g,C);C=ne}H.start=H.pos}for(;g<H.pos;){var Je=Math.min(H.pos,g+5e3);r(Je,C),g=Je}}function $t(e,t,i){for(var n,r,s=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),f=t;f>l;--f){if(f<=s.first)return s.first;var g=pt(s,f-1),C=g.stateAfter;if(C&&(!i||f+(C instanceof h?C.lookAhead:0)<=s.modeFrontier))return f;var H=A(g.text,null,e.options.tabSize);(r==null||n>H)&&(r=f-1,n=H)}return r}function yn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var i=e.first,n=t-1;n>i;n--){var r=pt(e,n).stateAfter;if(r&&(!(r instanceof h)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Kn=!1,mn=!1;function Vt(){Kn=!0}function dn(){mn=!0}function Zn(e,t,i){this.marker=e,this.from=t,this.to=i}function gn(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function ci(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Cn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function jn(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,f=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);if(f||s.from==t&&l.type=="bookmark"&&(!i||!s.marker.insertLeft)){var g=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);(n||(n=[])).push(new Zn(l,s.from,g?null:s.to))}}return n}function Gt(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],l=s.marker,f=s.to==null||(l.inclusiveRight?s.to>=t:s.to>t);if(f||s.from==t&&l.type=="bookmark"&&(!i||s.marker.insertLeft)){var g=s.from==null||(l.inclusiveLeft?s.from<=t:s.from<t);(n||(n=[])).push(new Zn(l,g?null:s.from-t,s.to==null?null:s.to-t))}}return n}function Ct(e,t){if(t.full)return null;var i=un(e,t.from.line)&&pt(e,t.from.line).markedSpans,n=un(e,t.to.line)&&pt(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,s=t.to.ch,l=Ot(t.from,t.to)==0,f=jn(i,r,l),g=Gt(n,s,l),C=t.text.length==1,H=v(t.text).length+(C?r:0);if(f)for(var ne=0;ne<f.length;++ne){var Me=f[ne];if(Me.to==null){var Ee=gn(g,Me.marker);Ee?C&&(Me.to=Ee.to==null?null:Ee.to+H):Me.to=r}}if(g)for(var Je=0;Je<g.length;++Je){var tt=g[Je];if(tt.to!=null&&(tt.to+=H),tt.from==null){var rt=gn(f,tt.marker);rt||(tt.from=H,C&&(f||(f=[])).push(tt))}else tt.from+=H,C&&(f||(f=[])).push(tt)}f&&(f=lt(f)),g&&g!=f&&(g=lt(g));var dt=[f];if(!C){var mt=t.text.length-2,ht;if(mt>0&&f)for(var bt=0;bt<f.length;++bt)f[bt].to==null&&(ht||(ht=[])).push(new Zn(f[bt].marker,null,null));for(var Mt=0;Mt<mt;++Mt)dt.push(ht);dt.push(g)}return dt}function lt(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function An(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(Ee){if(Ee.markedSpans)for(var Je=0;Je<Ee.markedSpans.length;++Je){var tt=Ee.markedSpans[Je].marker;tt.readOnly&&(!n||ve(n,tt)==-1)&&(n||(n=[])).push(tt)}}),!n)return null;for(var r=[{from:t,to:i}],s=0;s<n.length;++s)for(var l=n[s],f=l.find(0),g=0;g<r.length;++g){var C=r[g];if(Ot(C.to,f.from)<0||Ot(C.from,f.to)>0)continue;var H=[g,1],ne=Ot(C.from,f.from),Me=Ot(C.to,f.to);(ne<0||!l.inclusiveLeft&&!ne)&&H.push({from:C.from,to:f.from}),(Me>0||!l.inclusiveRight&&!Me)&&H.push({from:f.to,to:C.to}),r.splice.apply(r,H),g+=H.length-3}return r}function nn(e){var t=e.markedSpans;if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}function Vn(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function an(e){return e.inclusiveLeft?-1:0}function Wt(e){return e.inclusiveRight?1:0}function Sn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),r=t.find(),s=Ot(n.from,r.from)||an(e)-an(t);if(s)return-s;var l=Ot(n.to,r.to)||Wt(e)-Wt(t);return l||t.id-e.id}function It(e,t){var i=mn&&e.markedSpans,n;if(i)for(var r=void 0,s=0;s<i.length;++s)r=i[s],r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||Sn(n,r.marker)<0)&&(n=r.marker);return n}function hn(e){return It(e,!0)}function zt(e){return It(e,!1)}function Gn(e,t){var i=mn&&e.markedSpans,n;if(i)for(var r=0;r<i.length;++r){var s=i[r];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!n||Sn(n,s.marker)<0)&&(n=s.marker)}return n}function ln(e,t,i,n,r){var s=pt(e,t),l=mn&&s.markedSpans;if(l)for(var f=0;f<l.length;++f){var g=l[f];if(!g.marker.collapsed)continue;var C=g.marker.find(0),H=Ot(C.from,i)||an(g.marker)-an(r),ne=Ot(C.to,n)||Wt(g.marker)-Wt(r);if(H>=0&&ne<=0||H<=0&&ne>=0)continue;if(H<=0&&(g.marker.inclusiveRight&&r.inclusiveLeft?Ot(C.to,i)>=0:Ot(C.to,i)>0)||H>=0&&(g.marker.inclusiveRight&&r.inclusiveLeft?Ot(C.from,n)<=0:Ot(C.from,n)<0))return!0}}function Tn(e){for(var t;t=hn(e);)e=t.find(-1,!0).line;return e}function bi(e){for(var t;t=zt(e);)e=t.find(1,!0).line;return e}function ii(e){for(var t,i;t=zt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function di(e,t){var i=pt(e,t),n=Tn(i);return i==n?t:Rt(n)}function pr(e,t){if(t>e.lastLine())return t;var i=pt(e,t),n;if(!Ln(e,i))return t;for(;n=zt(i);)i=n.find(1,!0).line;return Rt(i)+1}function Ln(e,t){var i=mn&&t.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r){if(n=i[r],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Ai(e,t,n))return!0}}function Ai(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Ai(e,n.line,gn(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var r=void 0,s=0;s<t.markedSpans.length;++s)if(r=t.markedSpans[s],r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(r.to==null||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&Ai(e,t,r))return!0}function yi(e){e=Tn(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e)break;t+=r.height}for(var s=i.parent;s;i=s,s=i.parent)for(var l=0;l<s.children.length;++l){var f=s.children[l];if(f==i)break;t+=f.height}return t}function Ji(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=hn(n);){var r=i.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;i=zt(n);){var s=i.find(0,!0);t-=n.text.length-s.from.ch,n=s.to.line,t+=n.text.length-s.to.ch}return t}function Br(e){var t=e.display,i=e.doc;t.maxLine=pt(i,i.first),t.maxLineLength=Ji(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var r=Ji(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Fi=function(e,t,i){this.text=e,Vn(this,t),this.height=i?i(this):1};Fi.prototype.lineNo=function(){return Rt(this)},re(Fi);function Jo(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),nn(e),Vn(e,i);var r=n?n(e):1;r!=e.height&&En(e,r)}function co(e){e.parent=null,nn(e)}var Et={},Dt={};function At(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Dt:Et;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Ht(e,t){var i=me("span",null,null,V?"padding-right: .1px":null),n={pre:me("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var s=r?t.rest[r-1]:t.line,l=void 0;n.pos=0,n.addToken=rn,kt(e.display.measure)&&(l=Ye(s,e.doc.direction))&&(n.addToken=Dn(n.addToken,l)),n.map=[];var f=t!=e.display.externalMeasured&&Rt(s);Kt(s,n,$e(e,s,f)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=K(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=K(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ut(e.display.measure))),r==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(V){var g=n.content.lastChild;(/\bcm-tab\b/.test(g.className)||g.querySelector&&g.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=K(n.pre.className,n.textClass||"")),n}function Yt(e){var t=O("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,i,n,r,s,l){if(!t)return;var f=e.splitSpaces?Xt(t,e.trailingSpace):t,g=e.cm.state.specialChars,C=!1,H;if(!g.test(t))e.col+=t.length,H=document.createTextNode(f),e.map.push(e.pos,e.pos+t.length,H),F&&q<9&&(C=!0),e.pos+=t.length;else{H=document.createDocumentFragment();for(var ne=0;;){g.lastIndex=ne;var Me=g.exec(t),Ee=Me?Me.index-ne:t.length-ne;if(Ee){var Je=document.createTextNode(f.slice(ne,ne+Ee));F&&q<9?H.appendChild(O("span",[Je])):H.appendChild(Je),e.map.push(e.pos,e.pos+Ee,Je),e.col+=Ee,e.pos+=Ee}if(!Me)break;ne+=Ee+1;var tt=void 0;if(Me[0]==" "){var rt=e.cm.options.tabSize,dt=rt-e.col%rt;tt=H.appendChild(O("span",k(dt),"cm-tab")),tt.setAttribute("role","presentation"),tt.setAttribute("cm-text"," "),e.col+=dt}else Me[0]=="\r"||Me[0]==`
|
|
`?(tt=H.appendChild(O("span",Me[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),tt.setAttribute("cm-text",Me[0]),e.col+=1):(tt=e.cm.options.specialCharPlaceholder(Me[0]),tt.setAttribute("cm-text",Me[0]),F&&q<9?H.appendChild(O("span",[tt])):H.appendChild(tt),e.col+=1);e.map.push(e.pos,e.pos+1,tt),e.pos++}}if(e.trailingSpace=f.charCodeAt(t.length-1)==32,i||n||r||C||s||l){var mt=i||"";n&&(mt+=n),r&&(mt+=r);var ht=O("span",[H],mt,s);if(l)for(var bt in l)l.hasOwnProperty(bt)&&bt!="style"&&bt!="class"&&ht.setAttribute(bt,l[bt]);return e.content.appendChild(ht)}e.content.appendChild(H)}function Xt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",r=0;r<e.length;r++){var s=e.charAt(r);s==" "&&i&&(r==e.length-1||e.charCodeAt(r+1)==32)&&(s="\xA0"),n+=s,i=s==" "}return n}function Dn(e,t){return function(i,n,r,s,l,f,g){r=r?r+" cm-force-border":"cm-force-border";for(var C=i.pos,H=C+n.length;;){for(var ne=void 0,Me=0;Me<t.length&&!(ne=t[Me],ne.to>C&&ne.from<=C);Me++);if(ne.to>=H)return e(i,n,r,s,l,f,g);e(i,n.slice(0,ne.to-C),r,s,null,f,g),s=null,n=n.slice(ne.to-C),C=ne.to}}}function ri(e,t,i,n){var r=!n&&i.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function Kt(e,t,i){var n=e.markedSpans,r=e.text,s=0;if(!n){for(var l=1;l<i.length;l+=2)t.addToken(t,r.slice(s,s=i[l]),At(i[l+1],t.cm.options));return}for(var f=r.length,g=0,C=1,H="",ne,Me,Ee=0,Je,tt,rt,dt,mt;;){if(Ee==g){Je=tt=rt=Me="",mt=null,dt=null,Ee=Infinity;for(var ht=[],bt=void 0,Mt=0;Mt<n.length;++Mt){var _t=n[Mt],Ut=_t.marker;if(Ut.type=="bookmark"&&_t.from==g&&Ut.widgetNode)ht.push(Ut);else if(_t.from<=g&&(_t.to==null||_t.to>g||Ut.collapsed&&_t.to==g&&_t.from==g)){if(_t.to!=null&&_t.to!=g&&Ee>_t.to&&(Ee=_t.to,tt=""),Ut.className&&(Je+=" "+Ut.className),Ut.css&&(Me=(Me?Me+";":"")+Ut.css),Ut.startStyle&&_t.from==g&&(rt+=" "+Ut.startStyle),Ut.endStyle&&_t.to==Ee&&(bt||(bt=[])).push(Ut.endStyle,_t.to),Ut.title&&((mt||(mt={})).title=Ut.title),Ut.attributes)for(var fn in Ut.attributes)(mt||(mt={}))[fn]=Ut.attributes[fn];Ut.collapsed&&(!dt||Sn(dt.marker,Ut)<0)&&(dt=_t)}else _t.from>g&&Ee>_t.from&&(Ee=_t.from)}if(bt)for(var Bn=0;Bn<bt.length;Bn+=2)bt[Bn+1]==Ee&&(tt+=" "+bt[Bn]);if(!dt||dt.from==g)for(var kn=0;kn<ht.length;++kn)ri(t,0,ht[kn]);if(dt&&(dt.from||0)==g){if(ri(t,(dt.to==null?f+1:dt.to)-g,dt.marker,dt.from==null),dt.to==null)return;dt.to==g&&(dt=!1)}}if(g>=f)break;for(var fi=Math.min(f,Ee);;){if(H){var si=g+H.length;if(!dt){var Rn=si>fi?H.slice(0,fi-g):H;t.addToken(t,Rn,ne?ne+Je:Je,rt,g+Rn.length==Ee?tt:"",Me,mt)}if(si>=fi){H=H.slice(fi-g),g=fi;break}g=si,rt=""}H=r.slice(s,s=i[C++]),ne=At(i[C++],t.cm.options)}}}function Li(e,t,i){this.line=t,this.rest=ii(t),this.size=this.rest?Rt(v(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Ln(e,t)}function Jt(e,t,i){for(var n=[],r,s=t;s<i;s=r){var l=new Li(e.doc,pt(e.doc,s),s);r=s+l.size,n.push(l)}return n}var In=null;function gi(e){In?In.ops.push(e):e.ownsGroup=In={ops:[e],delayedCallbacks:[]}}function vi(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<t.length)}function Wr(e,t){var i=e.ownsGroup;if(!i)return;try{vi(i)}finally{In=null,t(i)}}var mr=null;function Xn(e,t){var i=et(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),r;In?r=In.delayedCallbacks:mr?r=mr:(r=mr=[],setTimeout(Ds,0));for(var s=function(f){r.push(function(){return i[f].apply(null,n)})},l=0;l<i.length;++l)s(l)}function Ds(){var e=mr;mr=null;for(var t=0;t<e.length;++t)e[t]()}function Zo(e,t,i,n){for(var r=0;r<t.changes.length;r++){var s=t.changes[r];s=="text"?Ns(e,t):s=="gutter"?qo(e,t,i,n):s=="class"?ho(e,t):s=="widget"&&Ps(e,t,n)}t.changes=null}function gr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),F&&q<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=gr(t);t.background=n.insertBefore(O("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Qo(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Ht(e,t)}function Ns(e,t){var i=t.text.className,n=Qo(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ho(e,t)):i&&(t.text.className=i)}function ho(e,t){Rs(e,t),t.line.wrapClass?gr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function qo(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=gr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var l=gr(t),f=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(f),l.insertBefore(f,t.text),t.line.gutterClass&&(f.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=f.appendChild(O("div",ei(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var g=0;g<e.display.gutterSpecs.length;++g){var C=e.display.gutterSpecs[g].className,H=s.hasOwnProperty(C)&&s[C];H&&f.appendChild(O("div",[H],"CodeMirror-gutter-elt","left: "+n.gutterLeft[C]+"px; width: "+n.gutterWidth[C]+"px"))}}}function Ps(e,t,i){t.alignable&&(t.alignable=null);for(var n=ce("CodeMirror-linewidget"),r=t.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);ea(e,t,i)}function js(e,t,i,n){var r=Qo(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),ho(e,t),qo(e,t,i,n),ea(e,t,n),t.node}function ea(e,t,i){if(ta(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ta(e,t.rest[n],t,i,!1)}function ta(e,t,i,n,r){if(!t.widgets)return;for(var s=gr(i),l=0,f=t.widgets;l<f.length;++l){var g=f[l],C=O("div",[g.node],"CodeMirror-linewidget"+(g.className?" "+g.className:""));g.handleMouseEvents||C.setAttribute("cm-ignore-events","true"),Is(g,C,i,n),e.display.input.setUneditable(C),r&&g.above?s.insertBefore(C,i.gutter||i.text):s.appendChild(C),Xn(g,"redraw")}}function Is(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function vr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!L(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),$(t.display.measure,O("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Ti(e,t){for(var i=be(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Hr(e){return e.lineSpace.offsetTop}function fo(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=$(e.measure,O("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Ei(e){return Re-e.display.nativeBarWidth}function Bi(e){return e.display.scroller.clientWidth-Ei(e)-e.display.barWidth}function po(e){return e.display.scroller.clientHeight-Ei(e)-e.display.barHeight}function Us(e,t,i){var n=e.options.lineWrapping,r=n&&Bi(e);if(!t.measure.heights||n&&t.measure.width!=r){var s=t.measure.heights=[];if(n){t.measure.width=r;for(var l=t.text.firstChild.getClientRects(),f=0;f<l.length-1;f++){var g=l[f],C=l[f+1];Math.abs(g.bottom-C.bottom)>2&&s.push((g.bottom+C.top)/2-i.top)}}s.push(i.bottom-i.top)}}function ia(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var r=0;r<e.rest.length;r++)if(Rt(e.rest[r])>i)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Fs(e,t){t=Tn(t);var i=Rt(t),n=e.display.externalMeasured=new Li(e.doc,t,i);n.lineN=i;var r=n.built=Ht(e,n);return n.text=r.pre,$(e.display.lineMeasure,r.pre),n}function ra(e,t,i,n){return Si(e,Zi(e,t),i,n)}function mo(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[zi(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Zi(e,t){var i=Rt(t),n=mo(e,i);n&&!n.text?n=null:n&&n.changes&&(Zo(e,n,i,xo(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var r=ia(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Si(e,t,i,n,r){t.before&&(i=-1);var s=i+(n||""),l;return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),l=Ws(e,t,i,n),l.bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:r?l.rtop:l.top,bottom:r?l.rbottom:l.bottom}}var oa={left:0,right:0,top:0,bottom:0};function aa(e,t,i){for(var n,r,s,l,f,g,C=0;C<e.length;C+=3)if(f=e[C],g=e[C+1],t<f?(r=0,s=1,l="left"):t<g?(r=t-f,s=r+1):(C==e.length-3||t==g&&e[C+3]>t)&&(s=g-f,r=s-1,t>=g&&(l="right")),r!=null){if(n=e[C+2],f==g&&i==(n.insertLeft?"left":"right")&&(l=i),i=="left"&&r==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)n=e[(C-=3)+2],l="left";if(i=="right"&&r==g-f)for(;C<e.length-3&&e[C+3]==e[C+4]&&!e[C+5].insertLeft;)n=e[(C+=3)+2],l="right";break}return{node:n,start:r,end:s,collapse:l,coverStart:f,coverEnd:g}}function Bs(e,t){var i=oa;if(t=="left")for(var n=0;n<e.length&&!((i=e[n]).left!=i.right);n++);else for(var r=e.length-1;r>=0&&!((i=e[r]).left!=i.right);r--);return i}function Ws(e,t,i,n){var r=aa(t.map,i,n),s=r.node,l=r.start,f=r.end,g=r.collapse,C;if(s.nodeType==3){for(var H=0;H<4;H++){for(;l&&Be(t.line.text.charAt(r.coverStart+l));)--l;for(;r.coverStart+f<r.coverEnd&&Be(t.line.text.charAt(r.coverStart+f));)++f;if(F&&q<9&&l==0&&f==r.coverEnd-r.coverStart?C=s.parentNode.getBoundingClientRect():C=Bs(ee(s,l,f).getClientRects(),n),C.left||C.right||l==0)break;f=l,l=l-1,g="right"}F&&q<11&&(C=Hs(e.display.measure,C))}else{l>0&&(g=n="right");var ne;e.options.lineWrapping&&(ne=s.getClientRects()).length>1?C=ne[n=="right"?ne.length-1:0]:C=s.getBoundingClientRect()}if(F&&q<9&&!l&&(!C||!C.left&&!C.right)){var Me=s.parentNode.getClientRects()[0];Me?C={left:Me.left,right:Me.left+qi(e.display),top:Me.top,bottom:Me.bottom}:C=oa}for(var Ee=C.top-t.rect.top,Je=C.bottom-t.rect.top,tt=(Ee+Je)/2,rt=t.view.measure.heights,dt=0;dt<rt.length-1&&!(tt<rt[dt]);dt++);var mt=dt?rt[dt-1]:0,ht=rt[dt],bt={left:(g=="right"?C.right:C.left)-t.rect.left,right:(g=="left"?C.left:C.right)-t.rect.left,top:mt,bottom:ht};return!C.left&&!C.right&&(bt.bogus=!0),e.options.singleCursorHeightPerLine||(bt.rtop=Ee,bt.rbottom=Je),bt}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xt(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function sa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function la(e){e.display.externalMeasure=null,le(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)sa(e.display.view[t])}function br(e){la(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ua(){return j&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ca(){return j&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function go(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=vr(e.widgets[i]));return t}function zr(e,t,i,n,r){if(!r){var s=go(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var l=yi(t);if(n=="local"?l+=Hr(e.display):l-=e.display.viewOffset,n=="page"||n=="window"){var f=e.display.lineSpace.getBoundingClientRect();l+=f.top+(n=="window"?0:ca());var g=f.left+(n=="window"?0:ua());i.left+=g,i.right+=g}return i.top+=l,i.bottom+=l,i}function da(e,t,i){if(i=="div")return t;var n=t.left,r=t.top;if(i=="page")n-=ua(),r-=ca();else if(i=="local"||!i){var s=e.display.sizer.getBoundingClientRect();n+=s.left,r+=s.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:r-l.top}}function vo(e,t,i,n,r){return n||(n=pt(e.doc,t.line)),zr(e,n,ra(e,n,t.ch,r),i)}function Ci(e,t,i,n,r,s){n=n||pt(e.doc,t.line),r||(r=Zi(e,n));function l(Je,tt){var rt=Si(e,r,Je,tt?"right":"left",s);return tt?rt.left=rt.right:rt.right=rt.left,zr(e,n,rt,i)}var f=Ye(n,e.doc.direction),g=t.ch,C=t.sticky;if(g>=n.text.length?(g=n.text.length,C="before"):g<=0&&(g=0,C="after"),!f)return l(C=="before"?g-1:g,C=="before");function H(Je,tt,rt){var dt=f[tt],mt=dt.level==1;return l(rt?Je-1:Je,mt!=rt)}var ne=je(f,g,C),Me=De,Ee=H(g,ne,C=="before");return Me!=null&&(Ee.other=H(g,Me,C!="before")),Ee}function ha(e,t){var i=0;t=o(e.doc,t),e.options.lineWrapping||(i=qi(e.display)*t.ch);var n=pt(e.doc,t.line),r=yi(n)+Hr(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function bo(e,t,i,n,r){var s=Qe(e,t,i);return s.xRel=r,n&&(s.outside=n),s}function yo(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return bo(n.first,0,null,-1,-1);var r=bn(n,i),s=n.first+n.size-1;if(r>s)return bo(n.first+n.size-1,pt(n,s).text.length,null,1,1);t<0&&(t=0);for(var l=pt(n,r);;){var f=zs(e,l,r,t,i),g=Gn(l,f.ch+(f.xRel>0||f.outside>0?1:0));if(!g)return f;var C=g.find(1);if(C.line==r)return C;l=pt(n,r=C.line)}}function fa(e,t,i,n){n-=go(t);var r=t.text.length,s=nt(function(l){return Si(e,i,l-1).bottom<=n},r,0);return r=nt(function(l){return Si(e,i,l).top>n},s,r),{begin:s,end:r}}function pa(e,t,i,n){i||(i=Zi(e,t));var r=zr(e,t,Si(e,i,n),"line").top;return fa(e,t,i,r)}function Co(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function zs(e,t,i,n,r){r-=yi(t);var s=Zi(e,t),l=go(t),f=0,g=t.text.length,C=!0,H=Ye(t,e.doc.direction);if(H){var ne=(e.options.lineWrapping?Vs:Ks)(e,t,i,s,H,n,r);C=ne.level!=1,f=C?ne.from:ne.to-1,g=C?ne.to:ne.from-1}var Me=null,Ee=null,Je=nt(function(Mt){var _t=Si(e,s,Mt);return _t.top+=l,_t.bottom+=l,Co(_t,n,r,!1)?(_t.top<=r&&_t.left<=n&&(Me=Mt,Ee=_t),!0):!1},f,g),tt,rt,dt=!1;if(Ee){var mt=n-Ee.left<Ee.right-n,ht=mt==C;Je=Me+(ht?0:1),rt=ht?"after":"before",tt=mt?Ee.left:Ee.right}else{!C&&(Je==g||Je==f)&&Je++,rt=Je==0?"after":Je==t.text.length?"before":Si(e,s,Je-(C?1:0)).bottom+l<=r==C?"after":"before";var bt=Ci(e,Qe(i,Je,rt),"line",t,s);tt=bt.left,dt=r<bt.top?-1:r>=bt.bottom?1:0}return Je=Fe(t.text,Je,1),bo(i,Je,rt,dt,n-tt)}function Ks(e,t,i,n,r,s,l){var f=nt(function(ne){var Me=r[ne],Ee=Me.level!=1;return Co(Ci(e,Qe(i,Ee?Me.to:Me.from,Ee?"before":"after"),"line",t,n),s,l,!0)},0,r.length-1),g=r[f];if(f>0){var C=g.level!=1,H=Ci(e,Qe(i,C?g.from:g.to,C?"after":"before"),"line",t,n);Co(H,s,l,!0)&&H.top>l&&(g=r[f-1])}return g}function Vs(e,t,i,n,r,s,l){var f=fa(e,t,n,l),g=f.begin,C=f.end;/\s/.test(t.text.charAt(C-1))&&C--;for(var H=null,ne=null,Me=0;Me<r.length;Me++){var Ee=r[Me];if(Ee.from>=C||Ee.to<=g)continue;var Je=Ee.level!=1,tt=Si(e,n,Je?Math.min(C,Ee.to)-1:Math.max(g,Ee.from)).right,rt=tt<s?s-tt+1e9:tt-s;(!H||ne>rt)&&(H=Ee,ne=rt)}return H||(H=r[r.length-1]),H.from<g&&(H={from:g,to:H.to,level:H.level}),H.to>C&&(H={from:H.from,to:C,level:H.level}),H}var Wi;function Qi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Wi==null){Wi=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Wi.appendChild(document.createTextNode("x")),Wi.appendChild(O("br"));Wi.appendChild(document.createTextNode("x"))}$(e.measure,Wi);var i=Wi.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),le(e.measure),i||1}function qi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),i=O("pre",[t],"CodeMirror-line-like");$(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function xo(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,s=t.gutters.firstChild,l=0;s;s=s.nextSibling,++l){var f=e.display.gutterSpecs[l].className;i[f]=s.offsetLeft+s.clientLeft+r,n[f]=s.clientWidth}return{fixedPos:wo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function wo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ma(e){var t=Qi(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/qi(e.display)-3);return function(r){if(Ln(e.doc,r))return 0;var s=0;if(r.widgets)for(var l=0;l<r.widgets.length;l++)r.widgets[l].height&&(s+=r.widgets[l].height);return i?s+(Math.ceil(r.text.length/n)||1)*t:s+t}}function Eo(e){var t=e.doc,i=ma(e);t.iter(function(n){var r=i(n);r!=n.height&&En(n,r)})}function Hi(e,t,i,n){var r=e.display;if(!i&&be(t).getAttribute("cm-not-content")=="true")return null;var s,l,f=r.lineSpace.getBoundingClientRect();try{s=t.clientX-f.left,l=t.clientY-f.top}catch(ne){return null}var g=yo(e,s,l),C;if(n&&g.xRel>0&&(C=pt(e.doc,g.line).text).length==g.ch){var H=A(C,C.length,e.options.tabSize)-C.length;g=Qe(g.line,Math.max(0,Math.round((s-na(e.display).left)/qi(e.display))-H))}return g}function zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function oi(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&i<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)mn&&di(e.doc,t)<r.viewTo&&Di(e);else if(i<=r.viewFrom)mn&&pr(e.doc,i+n)>r.viewFrom?Di(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)Di(e);else if(t<=r.viewFrom){var s=Kr(e,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):Di(e)}else if(i>=r.viewTo){var l=Kr(e,t,t,-1);l?(r.view=r.view.slice(0,l.index),r.viewTo=l.lineN):Di(e)}else{var f=Kr(e,t,t,-1),g=Kr(e,i,i+n,1);f&&g?(r.view=r.view.slice(0,f.index).concat(Jt(e,f.lineN,g.lineN)).concat(r.view.slice(g.index)),r.viewTo+=n):Di(e)}var C=r.externalMeasured;C&&(i<C.lineN?C.lineN+=n:t<C.lineN+C.size&&(r.externalMeasured=null))}function Mi(e,t,i){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var s=n.view[zi(e,t)];if(s.node==null)return;var l=s.changes||(s.changes=[]);ve(l,i)==-1&&l.push(i)}function Di(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kr(e,t,i,n){var r=zi(e,t),s,l=e.display.view;if(!mn||i==e.doc.first+e.doc.size)return{index:r,lineN:i};for(var f=e.display.viewFrom,g=0;g<r;g++)f+=l[g].size;if(f!=t){if(n>0){if(r==l.length-1)return null;s=f+l[r].size-t,r++}else s=f-t;t+=s,i+=s}for(;di(e.doc,i)!=i;){if(r==(n<0?0:l.length-1))return null;i+=n*l[r-(n<0?1:0)].size,r+=n}return{index:r,lineN:i}}function Gs(e,t,i){var n=e.display,r=n.view;r.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Jt(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Jt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(zi(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Jt(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,zi(e,i)))),n.viewTo=i}function ga(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var r=t[n];!r.hidden&&(!r.node||r.changes)&&++i}return i}function yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function va(e,t){t===void 0&&(t=!0);for(var i=e.doc,n={},r=n.cursors=document.createDocumentFragment(),s=n.selection=document.createDocumentFragment(),l=0;l<i.sel.ranges.length;l++){if(!t&&l==i.sel.primIndex)continue;var f=i.sel.ranges[l];if(f.from().line>=e.display.viewTo||f.to().line<e.display.viewFrom)continue;var g=f.empty();(g||e.options.showCursorWhenSelecting)&&ba(e,f.head,r),g||Xs(e,f,s)}return n}function ba(e,t,i){var n=Ci(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild(O("div","\xA0","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var s=i.appendChild(O("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Vr(e,t){return e.top-t.top||e.left-t.left}function Xs(e,t,i){var n=e.display,r=e.doc,s=document.createDocumentFragment(),l=na(e.display),f=l.left,g=Math.max(n.sizerWidth,Bi(e)-n.sizer.offsetLeft)-l.right,C=r.direction=="ltr";function H(ht,bt,Mt,_t){bt<0&&(bt=0),bt=Math.round(bt),_t=Math.round(_t),s.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+ht+`px;
|
|
top: `+bt+"px; width: "+(Mt==null?g-ht:Mt)+`px;
|
|
height: `+(_t-bt)+"px"))}function ne(ht,bt,Mt){var _t=pt(r,ht),Ut=_t.text.length,fn,Bn;function kn(Rn,li){return vo(e,Qe(ht,Rn),"div",_t,li)}function fi(Rn,li,$n){var Pn=pa(e,_t,null,Rn),Nn=li=="ltr"==($n=="after")?"left":"right",On=$n=="after"?Pn.begin:Pn.end-(/\s/.test(_t.text.charAt(Pn.end-1))?2:1);return kn(On,Nn)[Nn]}var si=Ye(_t,r.direction);return pe(si,bt||0,Mt==null?Ut:Mt,function(Rn,li,$n,Pn){var Nn=$n=="ltr",On=kn(Rn,Nn?"left":"right"),ui=kn(li-1,Nn?"right":"left"),hr=bt==null&&Rn==0,Ui=Mt==null&&li==Ut,qn=Pn==0,ki=!si||Pn==si.length-1;if(ui.top-On.top<=3){var Wn=(C?hr:Ui)&&qn,$o=(C?Ui:hr)&&ki,_i=Wn?f:(Nn?On:ui).left,$i=$o?g:(Nn?ui:On).right;H(_i,On.top,$i-_i,On.bottom)}else{var Yi,ni,fr,Yo;Nn?(Yi=C&&hr&&qn?f:On.left,ni=C?g:fi(Rn,$n,"before"),fr=C?f:fi(li,$n,"after"),Yo=C&&Ui&&ki?g:ui.right):(Yi=C?fi(Rn,$n,"before"):f,ni=!C&&hr&&qn?g:On.right,fr=!C&&Ui&&ki?f:ui.left,Yo=C?fi(li,$n,"after"):g),H(Yi,On.top,ni-Yi,On.bottom),On.bottom<ui.top&&H(f,On.bottom,null,ui.top),H(fr,ui.top,Yo-fr,ui.bottom)}(!fn||Vr(On,fn)<0)&&(fn=On),Vr(ui,fn)<0&&(fn=ui),(!Bn||Vr(On,Bn)<0)&&(Bn=On),Vr(ui,Bn)<0&&(Bn=ui)}),{start:fn,end:Bn}}var Me=t.from(),Ee=t.to();if(Me.line==Ee.line)ne(Me.line,Me.ch,Ee.ch);else{var Je=pt(r,Me.line),tt=pt(r,Ee.line),rt=Tn(Je)==Tn(tt),dt=ne(Me.line,Me.ch,rt?Je.text.length+1:null).end,mt=ne(Ee.line,rt?0:null,Ee.ch).start;rt&&(dt.top<mt.top-2?(H(dt.right,dt.top,null,dt.bottom),H(f,mt.top,mt.left,mt.bottom)):H(dt.right,dt.top,mt.left-dt.right,dt.bottom)),dt.bottom<mt.top&&H(f,dt.bottom,null,mt.top)}i.appendChild(s)}function So(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||er(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function ya(e){e.state.focused||(e.display.input.focus(),ko(e))}function Ca(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,er(e))},100)}function ko(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,ae(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),V&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),So(e)}function er(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,P(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Gr(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var r=t.view[n],s=e.options.lineWrapping,l=void 0,f=0;if(r.hidden)continue;if(F&&q<8){var g=r.node.offsetTop+r.node.offsetHeight;l=g-i,i=g}else{var C=r.node.getBoundingClientRect();l=C.bottom-C.top,!s&&r.text.firstChild&&(f=r.text.firstChild.getBoundingClientRect().right-C.left-1)}var H=r.line.height-l;if((H>.005||H<-.005)&&(En(r.line,l),xa(r.line),r.rest))for(var ne=0;ne<r.rest.length;ne++)xa(r.rest[ne]);if(f>e.display.sizerWidth){var Me=Math.ceil(f/qi(e.display));Me>e.display.maxLineLength&&(e.display.maxLineLength=Me,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function xa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Xr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Hr(e));var r=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,s=bn(t,n),l=bn(t,r);if(i&&i.ensure){var f=i.ensure.from.line,g=i.ensure.to.line;f<s?(s=f,l=bn(t,yi(pt(t,f))+e.wrapper.clientHeight)):Math.min(g,t.lastLine())>=l&&(s=bn(t,yi(pt(t,g))-e.wrapper.clientHeight),l=g)}return{from:s,to:Math.max(l,s+1)}}function $s(e,t){if(We(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),r=null;if(t.top+n.top<0?r=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),r!=null&&!B){var s=O("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-i.viewOffset-Hr(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Ei(e)+i.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(r),e.display.lineSpace.removeChild(s)}}function Ys(e,t,i,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==i&&(t=t.ch?Qe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Qe(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var l=!1,f=Ci(e,t),g=!i||i==t?f:Ci(e,i);r={left:Math.min(f.left,g.left),top:Math.min(f.top,g.top)-n,right:Math.max(f.left,g.left),bottom:Math.max(f.bottom,g.bottom)+n};var C=To(e,r),H=e.doc.scrollTop,ne=e.doc.scrollLeft;if(C.scrollTop!=null&&(xr(e,C.scrollTop),Math.abs(e.doc.scrollTop-H)>1&&(l=!0)),C.scrollLeft!=null&&(Ki(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-ne)>1&&(l=!0)),!l)break}return r}function Js(e,t){var i=To(e,t);i.scrollTop!=null&&xr(e,i.scrollTop),i.scrollLeft!=null&&Ki(e,i.scrollLeft)}function To(e,t){var i=e.display,n=Qi(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=po(e),l={};t.bottom-t.top>s&&(t.bottom=t.top+s);var f=e.doc.height+fo(i),g=t.top<n,C=t.bottom>f-n;if(t.top<r)l.scrollTop=g?0:t.top;else if(t.bottom>r+s){var H=Math.min(t.top,(C?f:t.bottom)-s);H!=r&&(l.scrollTop=H)}var ne=e.options.fixedGutter?0:i.gutters.offsetWidth,Me=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-ne,Ee=Bi(e)-i.gutters.offsetWidth,Je=t.right-t.left>Ee;return Je&&(t.right=t.left+Ee),t.left<10?l.scrollLeft=0:t.left<Me?l.scrollLeft=Math.max(0,t.left+ne-(Je?0:10)):t.right>Ee+Me-3&&(l.scrollLeft=t.right+(Je?0:10)-Ee),l}function Oo(e,t){if(t==null)return;$r(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function tr(e){$r(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Cr(e,t,i){(t!=null||i!=null)&&$r(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zs(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=ha(e,t.from),n=ha(e,t.to);wa(e,i,n,t.margin)}}function wa(e,t,i,n){var r=To(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Cr(e,r.scrollLeft,r.scrollTop)}function xr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;Le||Ao(e,{top:t}),Ea(e,t,!0),Le&&Ao(e),Sr(e,100)}function Ea(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ki(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,_a(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function wr(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+fo(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Ei(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Vi=function(e,t,i){this.cm=i;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),xe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),xe(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,F&&q<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vi.prototype.zeroWidthHack=function(){var e=he&&!de?"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},Vi.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var r=e.getBoundingClientRect(),s=i=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Er=function(){};Er.prototype.update=function(){return{bottom:0,right:0}},Er.prototype.setScrollLeft=function(){},Er.prototype.setScrollTop=function(){},Er.prototype.clear=function(){};function nr(e,t){t||(t=wr(e));var i=e.display.barWidth,n=e.display.barHeight;Sa(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&Gr(e),Sa(e,wr(e)),i=e.display.barWidth,n=e.display.barHeight}function Sa(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var ka={native:Vi,null:Er};function Ta(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ka[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),xe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Ki(e,t):xr(e,t)},e),e.display.scrollbars.addClass&&ae(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function Gi(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:++Qs},gi(e.curOp)}function Xi(e){var t=e.curOp;t&&Wr(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;qs(i)})}function qs(e){for(var t=e.ops,i=0;i<t.length;i++)el(t[i]);for(var n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)nl(t[r]);for(var s=0;s<t.length;s++)il(t[s]);for(var l=0;l<t.length;l++)rl(t[l])}function el(e){var t=e.cm,i=t.display;al(t),e.updateMaxLine&&Br(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Yr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&_o(e.cm,e.update)}function nl(e){var t=e.cm,i=t.display;e.updatedDisplay&&Gr(t),e.barMeasure=wr(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ra(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Ei(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Bi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ki(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==U();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&nr(t,e.barMeasure),e.updatedDisplay&&Mo(t,e.barMeasure),e.selectionChanged&&So(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&ya(e.cm)}function rl(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Oa(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Ea(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ki(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Ys(t,o(n,e.scrollToPos.from),o(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,r)}var s=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(s)for(var f=0;f<s.length;++f)s[f].lines.length||Ae(s[f],"hide");if(l)for(var g=0;g<l.length;++g)l[g].lines.length&&Ae(l[g],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ae(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function hi(e,t){if(e.curOp)return t();Gi(e);try{return t()}finally{Xi(e)}}function Un(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gi(e);try{return t.apply(e,arguments)}finally{Xi(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Gi(this);try{return e.apply(this,arguments)}finally{Xi(this)}}}function Fn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gi(t);try{return e.apply(this,arguments)}finally{Xi(t)}}}function Sr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,m(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=it(e,t.highlightFrontier),r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(n.line>=e.display.viewFrom){var l=s.styles,f=s.text.length>e.options.maxHighlightLength?pn(t.mode,n.state):null,g=te(e,s,n,!0);f&&(n.state=f),s.styles=g.styles;var C=s.styleClasses,H=g.classes;H?s.styleClasses=H:C&&(s.styleClasses=null);for(var ne=!l||l.length!=s.styles.length||C!=H&&(!C||!H||C.bgClass!=H.bgClass||C.textClass!=H.textClass),Me=0;!ne&&Me<l.length;++Me)ne=l[Me]!=s.styles[Me];ne&&r.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&st(e,s.text,n),s.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return Sr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&hi(e,function(){for(var s=0;s<r.length;s++)Mi(e,r[s],"text")})}var Yr=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Xr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bi(e),this.force=i,this.dims=xo(e),this.events=[]};Yr.prototype.signal=function(e,t){W(e,t)&&this.events.push(arguments)},Yr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ae.apply(null,this.events[e])};function al(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ei(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ei(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=U();if(!t||!L(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&L(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function ll(e){if(!e||!e.activeElt||e.activeElt==U())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function _o(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Di(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&ga(e)==0)return!1;Aa(e)&&(Di(e),t.dims=xo(e));var r=n.first+n.size,s=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(r,t.visible.to+e.options.viewportMargin);i.viewFrom<s&&s-i.viewFrom<20&&(s=Math.max(n.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(r,i.viewTo)),mn&&(s=di(e.doc,s),l=pr(e.doc,l));var f=s!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Gs(e,s,l),i.viewOffset=yi(pt(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var g=ga(e);if(!f&&g==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var C=sl(e);return g>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),g>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(C),le(i.cursorDiv),le(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,f&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,Sr(e,400)),i.updateLineNumbers=null,!0}function Oa(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Bi(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+fo(e.display)-po(e),i.top)}),t.visible=Xr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Xr(e.display,e.doc,i));if(!_o(e,t))break;Gr(e);var r=wr(e);yr(e),nr(e,r),Mo(e,r),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ao(e,t){var i=new Yr(e,t);if(_o(e,i)){Gr(e),Oa(e,i);var n=wr(e);yr(e),nr(e,n),Mo(e,n),i.finish()}}function ul(e,t,i){var n=e.display,r=e.options.lineNumbers,s=n.lineDiv,l=s.firstChild;function f(Je){var tt=Je.nextSibling;return V&&he&&e.display.currentWheelTarget==Je?Je.style.display="none":Je.parentNode.removeChild(Je),tt}for(var g=n.view,C=n.viewFrom,H=0;H<g.length;H++){var ne=g[H];if(!ne.hidden)if(!ne.node||ne.node.parentNode!=s){var Me=js(e,ne,C,i);s.insertBefore(Me,l)}else{for(;l!=ne.node;)l=f(l);var Ee=r&&t!=null&&t<=C&&ne.lineNumber;ne.changes&&(ve(ne.changes,"gutter")>-1&&(Ee=!1),Zo(e,ne,C,i)),Ee&&(le(ne.lineNumber),ne.lineNumber.appendChild(document.createTextNode(ei(e.options,C)))),l=ne.node.nextSibling}C+=ne.size}for(;l;)l=f(l)}function Lo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ei(e)+"px"}function _a(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=wo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,s=n+"px",l=0;l<i.length;l++)if(!i[l].hidden){e.options.fixedGutter&&(i[l].gutter&&(i[l].gutter.style.left=s),i[l].gutterBackground&&(i[l].gutterBackground.style.left=s));var f=i[l].alignable;if(f)for(var g=0;g<f.length;g++)f[g].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function Aa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=ei(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(O("div",[O("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=r.firstChild.offsetWidth,l=r.offsetWidth-s;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(s,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Lo(e.display),!0}return!1}function Do(e,t){for(var i=[],n=!1,r=0;r<e.length;r++){var s=e[r],l=null;if(typeof s!="string"&&(l=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:s,style:l})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function La(e){var t=e.gutters,i=e.gutterSpecs;le(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],s=r.className,l=r.style,f=t.appendChild(O("div",null,"CodeMirror-gutter "+s));l&&(f.style.cssText=l),s=="CodeMirror-linenumbers"&&(e.lineGutter=f,f.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Lo(e)}function kr(e){La(e.display),oi(e),_a(e)}function cl(e,t,i,n){var r=this;this.input=i,r.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=me("div",null,"CodeMirror-code"),r.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=O("div",null,"CodeMirror-cursors"),r.measure=O("div",null,"CodeMirror-measure"),r.lineMeasure=O("div",null,"CodeMirror-measure"),r.lineSpace=me("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var s=me("div",[r.lineSpace],"CodeMirror-lines");r.mover=O("div",[s],null,"position: relative"),r.sizer=O("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=O("div",null,null,"position: absolute; height: "+Re+"px; width: 1px;"),r.gutters=O("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=O("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=O("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),F&&q<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!V&&!(Le&&fe)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Do(n.gutters,n.lineNumbers),La(r),i.init(r)}var Jr=0,pi=null;F?pi=-.53:Le?pi=15:j?pi=-.7:ke&&(pi=-1/3);function Ma(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function dl(e){var t=Ma(e);return t.x*=pi,t.y*=pi,t}function Da(e,t){var i=Ma(t),n=i.x,r=i.y,s=e.display,l=s.scroller,f=l.scrollWidth>l.clientWidth,g=l.scrollHeight>l.clientHeight;if(!(n&&f||r&&g))return;if(r&&he&&V){e:for(var C=t.target,H=s.view;C!=l;C=C.parentNode)for(var ne=0;ne<H.length;ne++)if(H[ne].node==C){e.display.currentWheelTarget=C;break e}}if(n&&!Le&&!Y&&pi!=null){r&&g&&xr(e,Math.max(0,l.scrollTop+r*pi)),Ki(e,Math.max(0,l.scrollLeft+n*pi)),(!r||r&&g)&&x(t),s.wheelStartX=null;return}if(r&&pi!=null){var Me=r*pi,Ee=e.doc.scrollTop,Je=Ee+s.wrapper.clientHeight;Me<0?Ee=Math.max(0,Ee+Me-50):Je=Math.min(e.doc.height,Je+Me+50),Ao(e,{top:Ee,bottom:Je})}Jr<20&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=n,s.wheelDY=r,setTimeout(function(){if(s.wheelStartX==null)return;var tt=l.scrollLeft-s.wheelStartX,rt=l.scrollTop-s.wheelStartY,dt=rt&&s.wheelDY&&rt/s.wheelDY||tt&&s.wheelDX&&tt/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!dt)return;pi=(pi*Jr+dt)/(Jr+1),++Jr},200)):(s.wheelDX+=n,s.wheelDY+=r))}var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!Hn(i.anchor,n.anchor)||!Hn(i.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Qt(zn(this.ranges[t].anchor),zn(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(Ot(t,n.from())>=0&&Ot(e,n.to())<=0)return i}return-1};var Qt=function(e,t){this.anchor=e,this.head=t};Qt.prototype.from=function(){return Jn(this.anchor,this.head)},Qt.prototype.to=function(){return Yn(this.anchor,this.head)},Qt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xi(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(Me,Ee){return Ot(Me.from(),Ee.from())}),i=ve(t,r);for(var s=1;s<t.length;s++){var l=t[s],f=t[s-1],g=Ot(f.to(),l.from());if(n&&!l.empty()?g>0:g>=0){var C=Jn(f.from(),l.from()),H=Yn(f.to(),l.to()),ne=f.empty()?l.from()==l.head:f.from()==f.head;s<=i&&--i,t.splice(--s,2,new Qt(ne?H:C,ne?C:H))}}return new mi(t,i)}function Ri(e,t){return new mi([new Qt(e,t||e)],0)}function Ni(e){return e.text?Qe(e.from.line+e.text.length-1,v(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ra(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return Ni(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ni(t).ch-t.to.ch),Qe(i,n)}function Ro(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new Qt(Ra(r.anchor,t),Ra(r.head,t)))}return xi(e.cm,i,e.sel.primIndex)}function Na(e,t,i){return e.line==t.line?Qe(i.line,e.ch-t.ch+i.ch):Qe(i.line+(e.line-t.line),e.ch)}function hl(e,t,i){for(var n=[],r=Qe(e.first,0),s=r,l=0;l<t.length;l++){var f=t[l],g=Na(f.from,r,s),C=Na(Ni(f),r,s);if(r=f.to,s=C,i=="around"){var H=e.sel.ranges[l],ne=Ot(H.head,H.anchor)<0;n[l]=new Qt(ne?C:g,ne?g:C)}else n[l]=new Qt(g,g)}return new mi(n,e.sel.primIndex)}function No(e){e.doc.mode=vn(e.options,e.doc.modeOption),Tr(e)}function Tr(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Sr(e,100),e.state.modeGen++,e.curOp&&oi(e)}function Pa(e,t){return t.from.ch==0&&t.to.ch==0&&v(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Po(e,t,i,n){function r(mt){return i?i[mt]:null}function s(mt,ht,bt){Jo(mt,ht,bt,n),Xn(mt,"change",mt,t)}function l(mt,ht){for(var bt=[],Mt=mt;Mt<ht;++Mt)bt.push(new Fi(C[Mt],r(Mt),n));return bt}var f=t.from,g=t.to,C=t.text,H=pt(e,f.line),ne=pt(e,g.line),Me=v(C),Ee=r(C.length-1),Je=g.line-f.line;if(t.full)e.insert(0,l(0,C.length)),e.remove(C.length,e.size-C.length);else if(Pa(e,t)){var tt=l(0,C.length-1);s(ne,ne.text,Ee),Je&&e.remove(f.line,Je),tt.length&&e.insert(f.line,tt)}else if(H==ne)if(C.length==1)s(H,H.text.slice(0,f.ch)+Me+H.text.slice(g.ch),Ee);else{var rt=l(1,C.length-1);rt.push(new Fi(Me+H.text.slice(g.ch),Ee,n)),s(H,H.text.slice(0,f.ch)+C[0],r(0)),e.insert(f.line+1,rt)}else if(C.length==1)s(H,H.text.slice(0,f.ch)+C[0]+ne.text.slice(g.ch),r(0)),e.remove(f.line+1,Je);else{s(H,H.text.slice(0,f.ch)+C[0],r(0)),s(ne,Me+ne.text.slice(g.ch),Ee);var dt=l(1,C.length-1);Je>1&&e.remove(f.line+1,Je-1),e.insert(f.line+1,dt)}Xn(e,"change",e,t)}function Pi(e,t,i){function n(r,s,l){if(r.linked)for(var f=0;f<r.linked.length;++f){var g=r.linked[f];if(g.doc==s)continue;var C=l&&g.sharedHist;if(i&&!C)continue;t(g.doc,C),n(g.doc,r,C)}}n(e,null,!0)}function ja(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Eo(e),No(e),Ia(e),e.options.lineWrapping||Br(e),e.options.mode=t.modeOption,oi(e)}function Ia(e){(e.doc.direction=="rtl"?ae:P)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){hi(e,function(){Ia(e),oi(e)})}function Zr(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function jo(e,t){var i={from:zn(t.from),to:Ni(t),text:on(e,t.from,t.to)};return Ba(e,i,t.from.line,t.to.line+1),Pi(e,function(n){return Ba(n,i,t.from.line,t.to.line+1)},!0),i}function Ua(e){for(;e.length;){var t=v(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Ua(e.done),v(e.done);if(e.done.length&&!v(e.done).ranges)return v(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),v(e.done)}function Fa(e,t,i,n){var r=e.history;r.undone.length=0;var s=+new Date,l,f;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=pl(r,r.lastOp==n)))f=v(l.changes),Ot(t.from,t.to)==0&&Ot(t.from,f.to)==0?f.to=Ni(t):l.changes.push(jo(e,t));else{var g=v(r.done);for((!g||!g.ranges)&&Qr(e.sel,r.done),l={changes:[jo(e,t)],generation:r.generation},r.done.push(l);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,f||Ae(e,"historyAdded")}function ml(e,t,i,n){var r=t.charAt(0);return r=="*"||r=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,i,n){var r=e.history,s=n&&n.origin;i==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||ml(e,s,v(r.done),t))?r.done[r.done.length-1]=t:Qr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&n.clearRedo!==!1&&Ua(r.undone)}function Qr(e,t){var i=v(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Ba(e,t,i,n){var r=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(l){l.markedSpans&&((r||(r=t["spans_"+e.id]={}))[s]=l.markedSpans),++s})}function vl(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function bl(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(vl(i[r]));return n}function Wa(e,t){var i=bl(e,t),n=Ct(e,t);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var s=i[r],l=n[r];if(s&&l){e:for(var f=0;f<l.length;++f){for(var g=l[f],C=0;C<s.length;++C)if(s[C].marker==g.marker)continue e;s.push(g)}}else l&&(i[r]=l)}return i}function ir(e,t,i){for(var n=[],r=0;r<e.length;++r){var s=e[r];if(s.ranges){n.push(i?mi.prototype.deepCopy.call(s):s);continue}var l=s.changes,f=[];n.push({changes:f});for(var g=0;g<l.length;++g){var C=l[g],H=void 0;if(f.push({from:C.from,to:C.to,text:C.text}),t)for(var ne in C)(H=ne.match(/^spans_(\d+)$/))&&(ve(t,Number(H[1]))>-1&&(v(f)[ne]=C[ne],delete C[ne]))}}return n}function Io(e,t,i,n){if(n){var r=e.anchor;if(i){var s=Ot(t,r)<0;s!=Ot(i,r)<0?(r=t,t=i):s!=Ot(t,i)<0&&(t=i)}return new Qt(r,t)}else return new Qt(i||t,t)}function qr(e,t,i,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),Qn(e,new mi([Io(e.sel.primary(),t,i,r)],0),n)}function Ha(e,t,i){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)n[s]=Io(e.sel.ranges[s],t[s],null,r);var l=xi(e.cm,n,e.sel.primIndex);Qn(e,l,i)}function Uo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,Qn(e,xi(e.cm,r,e.sel.primIndex),n)}function za(e,t,i,n){Qn(e,Ri(t,i),n)}function yl(e,t,i){var n={ranges:t.ranges,update:function(r){this.ranges=[];for(var s=0;s<r.length;s++)this.ranges[s]=new Qt(o(e,r[s].anchor),o(e,r[s].head))},origin:i&&i.origin};return Ae(e,"beforeSelectionChange",e,n),e.cm&&Ae(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?xi(e.cm,n.ranges,n.ranges.length-1):t}function Ka(e,t,i){var n=e.history.done,r=v(n);r&&r.ranges?(n[n.length-1]=t,eo(e,t,i)):Qn(e,t,i)}function Qn(e,t,i){eo(e,t,i),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function eo(e,t,i){(W(e,"beforeSelectionChange")||e.cm&&W(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,i));var n=i&&i.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);Va(e,Xa(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&tr(e.cm)}function Va(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ie(e.cm)),Xn(e,"cursorActivity",e)}function Ga(e){Va(e,Xa(e,e.sel,null,!1))}function Xa(e,t,i,n){for(var r,s=0;s<t.ranges.length;s++){var l=t.ranges[s],f=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],g=to(e,l.anchor,f&&f.anchor,i,n),C=to(e,l.head,f&&f.head,i,n);(r||g!=l.anchor||C!=l.head)&&(r||(r=t.ranges.slice(0,s)),r[s]=new Qt(g,C))}return r?xi(e.cm,r,t.primIndex):t}function rr(e,t,i,n,r){var s=pt(e,t.line);if(s.markedSpans)for(var l=0;l<s.markedSpans.length;++l){var f=s.markedSpans[l],g=f.marker,C="selectLeft"in g?!g.selectLeft:g.inclusiveLeft,H="selectRight"in g?!g.selectRight:g.inclusiveRight;if((f.from==null||(C?f.from<=t.ch:f.from<t.ch))&&(f.to==null||(H?f.to>=t.ch:f.to>t.ch))){if(r&&(Ae(g,"beforeCursorEnter"),g.explicitlyCleared))if(s.markedSpans){--l;continue}else break;if(!g.atomic)continue;if(i){var ne=g.find(n<0?1:-1),Me=void 0;if((n<0?H:C)&&(ne=$a(e,ne,-n,ne&&ne.line==t.line?s:null)),ne&&ne.line==t.line&&(Me=Ot(ne,i))&&(n<0?Me<0:Me>0))return rr(e,ne,t,n,r)}var Ee=g.find(n<0?-1:1);return(n<0?C:H)&&(Ee=$a(e,Ee,n,Ee.line==t.line?s:null)),Ee?rr(e,Ee,t,n,r):null}}return t}function to(e,t,i,n,r){var s=n||1,l=rr(e,t,i,s,r)||!r&&rr(e,t,i,s,!0)||rr(e,t,i,-s,r)||!r&&rr(e,t,i,-s,!0);return l||(e.cantEdit=!0,Qe(e.first,0))}function $a(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?o(e,Qe(t.line-1)):null:i>0&&t.ch==(n||pt(e,t.line)).text.length?t.line<e.first+e.size-1?Qe(t.line+1,0):null:new Qe(t.line,t.ch+i)}function Ya(e){e.setSelection(Qe(e.firstLine(),0),Qe(e.lastLine()),Te)}function Ja(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(r,s,l,f){r&&(n.from=o(e,r)),s&&(n.to=o(e,s)),l&&(n.text=l),f!==void 0&&(n.origin=f)}),Ae(e,"beforeChange",e,n),e.cm&&Ae(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function or(e,t,i){if(e.cm){if(!e.cm.curOp)return Un(e.cm,or)(e,t,i);if(e.cm.state.suppressEdits)return}if((W(e,"beforeChange")||e.cm&&W(e.cm,"beforeChange"))&&(t=Ja(e,t,!0),!t))return;var n=Kn&&!i&&An(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)Za(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else Za(e,t)}function Za(e,t){if(t.text.length==1&&t.text[0]==""&&Ot(t.from,t.to)==0)return;var i=Ro(e,t);Fa(e,t,i,e.cm?e.cm.curOp.id:NaN),Or(e,t,i,Ct(e,t));var n=[];Pi(e,function(r,s){!s&&ve(n,r.history)==-1&&(ts(r.history,t),n.push(r.history)),Or(r,t,null,Ct(r,t))})}function no(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var r=e.history,s,l=e.sel,f=t=="undo"?r.done:r.undone,g=t=="undo"?r.undone:r.done,C=0;C<f.length&&!(s=f[C],i?s.ranges&&!s.equals(e.sel):!s.ranges);C++);if(C==f.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(s=f.pop(),s.ranges){if(Qr(s,g),i&&!s.equals(e.sel)){Qn(e,s,{clearRedo:!1});return}l=s}else if(n){f.push(s);return}else break;var H=[];Qr(l,g),g.push({changes:H,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var ne=W(e,"beforeChange")||e.cm&&W(e.cm,"beforeChange"),Me=function(tt){var rt=s.changes[tt];if(rt.origin=t,ne&&!Ja(e,rt,!1))return f.length=0,{};H.push(jo(e,rt));var dt=tt?Ro(e,rt):v(f);Or(e,rt,dt,Wa(e,rt)),!tt&&e.cm&&e.cm.scrollIntoView({from:rt.from,to:Ni(rt)});var mt=[];Pi(e,function(ht,bt){!bt&&ve(mt,ht.history)==-1&&(ts(ht.history,rt),mt.push(ht.history)),Or(ht,rt,null,Wa(ht,rt))})},Ee=s.changes.length-1;Ee>=0;--Ee){var Je=Me(Ee);if(Je)return Je.v}}function Qa(e,t){if(t==0)return;if(e.first+=t,e.sel=new mi(y(e.sel.ranges,function(r){return new Qt(Qe(r.anchor.line+t,r.anchor.ch),Qe(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){oi(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Mi(e.cm,n,"gutter")}}function Or(e,t,i,n){if(e.cm&&!e.cm.curOp)return Un(e.cm,Or)(e,t,i,n);if(t.to.line<e.first){Qa(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);Qa(e,r),t={from:Qe(e.first,0),to:Qe(t.to.line+r,t.to.ch),text:[v(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:Qe(s,pt(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=on(e,t.from,t.to),i||(i=Ro(e,t)),e.cm?Cl(e.cm,t,n):Po(e,t,n),eo(e,i,Te),e.cantEdit&&to(e,Qe(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,r=e.display,s=t.from,l=t.to,f=!1,g=s.line;e.options.lineWrapping||(g=Rt(Tn(pt(n,s.line))),n.iter(g,l.line+1,function(Ee){if(Ee==r.maxLine)return f=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ie(e),Po(n,t,i,ma(e)),e.options.lineWrapping||(n.iter(g,s.line+t.text.length,function(Ee){var Je=Ji(Ee);Je>r.maxLineLength&&(r.maxLine=Ee,r.maxLineLength=Je,r.maxLineChanged=!0,f=!1)}),f&&(e.curOp.updateMaxLine=!0)),yn(n,s.line),Sr(e,400);var C=t.text.length-(l.line-s.line)-1;t.full?oi(e):s.line==l.line&&t.text.length==1&&!Pa(e.doc,t)?Mi(e,s.line,"text"):oi(e,s.line,l.line+1,C);var H=W(e,"changes"),ne=W(e,"change");if(ne||H){var Me={from:s,to:l,text:t.text,removed:t.removed,origin:t.origin};ne&&Xn(e,"change",e,Me),H&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Me)}e.display.selForContextMenu=null}function ar(e,t,i,n,r){var s;n||(n=i),Ot(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),or(e,{from:i,to:n,text:t,origin:r})}function qa(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function es(e,t,i,n){for(var r=0;r<e.length;++r){var s=e[r],l=!0;if(s.ranges){s.copied||(s=e[r]=s.deepCopy(),s.copied=!0);for(var f=0;f<s.ranges.length;f++)qa(s.ranges[f].anchor,t,i,n),qa(s.ranges[f].head,t,i,n);continue}for(var g=0;g<s.changes.length;++g){var C=s.changes[g];if(i<C.from.line)C.from=Qe(C.from.line+n,C.from.ch),C.to=Qe(C.to.line+n,C.to.ch);else if(t<=C.to.line){l=!1;break}}l||(e.splice(0,r+1),r=0)}}function ts(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;es(e.done,i,n,r),es(e.undone,i,n,r)}function _r(e,t,i,n){var r=t,s=t;return typeof t=="number"?s=pt(e,d(e,t)):r=Rt(t),r==null?null:(n(s,r)&&e.cm&&Mi(e.cm,r,i),s)}function Ar(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Ar.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height,co(r),Xn(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Lr(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),i+=r.height,r.parent=this}this.size=t,this.height=i,this.parent=null}Lr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var s=Math.min(t,r-e),l=n.height;if(n.removeInner(e,s),this.height-=l-n.height,r==s&&(this.children.splice(i--,1),n.parent=null),(t-=s)==0)break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ar))){var f=[];this.collapse(f),this.children=[new Ar(f)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<=s){if(r.insertInner(e,t,i),r.lines&&r.lines.length>50){for(var l=r.lines.length%25+25,f=l;f<r.lines.length;){var g=new Ar(r.lines.slice(f,f+=25));r.height-=g.height,this.children.splice(++n,0,g),g.parent=this}r.lines=r.lines.slice(0,l),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Lr(t);if(e.parent){e.size-=i.size,e.height-=i.height;var r=ve(e.parent.children,e);e.parent.children.splice(r+1,0,i)}else{var n=new Lr(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<s){var l=Math.min(t,s-e);if(r.iterN(e,l,i))return!0;if((t-=l)==0)break;e=0}else e-=s}}};var Mr=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Mr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Rt(i);if(n==null||!t)return;for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(i.widgets=null);var s=vr(this);En(i,Math.max(0,i.height-s)),e&&(hi(e,function(){ns(e,i,-s),Mi(e,n,"widget")}),Xn(e,"lineWidgetCleared",e,this,n))},Mr.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=vr(this)-t;if(!r)return;Ln(this.doc,n)||En(n,n.height+r),i&&hi(i,function(){i.curOp.forceUpdate=!0,ns(i,n,r),Xn(i,"lineWidgetChanged",i,e,Rt(n))})},re(Mr);function ns(e,t,i){yi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Oo(e,i)}function xl(e,t,i,n){var r=new Mr(e,i,n),s=e.cm;return s&&r.noHScroll&&(s.display.alignWidgets=!0),_r(e,t,"widget",function(l){var f=l.widgets||(l.widgets=[]);if(r.insertAt==null?f.push(r):f.splice(Math.min(f.length-1,Math.max(0,r.insertAt)),0,r),r.line=l,s&&!Ln(e,l)){var g=yi(l)<e.scrollTop;En(l,l.height+vr(r)),g&&Oo(s,r.height),s.curOp.forceUpdate=!0}return!0}),s&&Xn(s,"lineWidgetAdded",s,r,typeof t=="number"?t:Rt(t)),r}var is=0,ji=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++is};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gi(e),W(this,"clear")){var i=this.find();i&&Xn(this,"clear",i.from,i.to)}for(var n=null,r=null,s=0;s<this.lines.length;++s){var l=this.lines[s],f=gn(l.markedSpans,this);e&&!this.collapsed?Mi(e,Rt(l),"text"):e&&(f.to!=null&&(r=Rt(l)),f.from!=null&&(n=Rt(l))),l.markedSpans=ci(l.markedSpans,f),f.from==null&&this.collapsed&&!Ln(this.doc,l)&&e&&En(l,Qi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var g=0;g<this.lines.length;++g){var C=Tn(this.lines[g]),H=Ji(C);H>e.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=H,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&oi(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ga(e.doc)),e&&Xn(e,"markerCleared",e,this,n,r),t&&Xi(e),this.parent&&this.parent.clear()},ji.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,r=0;r<this.lines.length;++r){var s=this.lines[r],l=gn(s.markedSpans,this);if(l.from!=null&&(i=Qe(t?s:Rt(s),l.from),e==-1))return i;if(l.to!=null&&(n=Qe(t?s:Rt(s),l.to),e==1))return n}return i&&{from:i,to:n}},ji.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;hi(n,function(){var r=t.line,s=Rt(t.line),l=mo(n,s);if(l&&(sa(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ln(i.doc,r)&&i.height!=null){var f=i.height;i.height=null;var g=vr(i)-f;g&&En(r,r.height+g)}Xn(n,"markerChanged",n,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ve(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(ve(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},re(ji);function sr(e,t,i,n,r){if(n&&n.shared)return wl(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return Un(e.cm,sr)(e,t,i,n,r);var s=new ji(e,r),l=Ot(t,i);if(n&&p(n,s,!1),l>0||l==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=me("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ln(e,t.line,t,i,s)||t.line!=i.line&&ln(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");dn()}s.addToHistory&&Fa(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var f=t.line,g=e.cm,C;if(e.iter(f,i.line+1,function(ne){g&&s.collapsed&&!g.options.lineWrapping&&Tn(ne)==g.display.maxLine&&(C=!0),s.collapsed&&f!=t.line&&En(ne,0),Cn(ne,new Zn(s,f==t.line?t.ch:null,f==i.line?i.ch:null)),++f}),s.collapsed&&e.iter(t.line,i.line+1,function(ne){Ln(e,ne)&&En(ne,0)}),s.clearOnEnter&&xe(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Vt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++is,s.atomic=!0),g){if(C&&(g.curOp.updateMaxLine=!0),s.collapsed)oi(g,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var H=t.line;H<=i.line;H++)Mi(g,H,"text");s.atomic&&Ga(g.doc),Xn(g,"markerAdded",g,s)}return s}var Dr=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Dr.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Xn(this,"clear")},Dr.prototype.find=function(e,t){return this.primary.find(e,t)},re(Dr);function wl(e,t,i,n,r){n=p(n),n.shared=!1;var s=[sr(e,t,i,n,r)],l=s[0],f=n.widgetNode;return Pi(e,function(g){f&&(n.widgetNode=f.cloneNode(!0)),s.push(sr(g,o(g,t),o(g,i),n,r));for(var C=0;C<g.linked.length;++C)if(g.linked[C].isParent)return;l=v(s)}),new Dr(s,l)}function rs(e){return e.findMarks(Qe(e.first,0),e.clipPos(Qe(e.lastLine())),function(t){return t.parent})}function El(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find(),s=e.clipPos(r.from),l=e.clipPos(r.to);if(Ot(s,l)){var f=sr(e,s,l,n.primary,n.primary.type);n.markers.push(f),f.parent=n}}}function Sl(e){for(var t=function(n){var r=e[n],s=[r.primary.doc];Pi(r.primary.doc,function(g){return s.push(g)});for(var l=0;l<r.markers.length;l++){var f=r.markers[l];ve(s,f.doc)==-1&&(f.parent=null,r.markers.splice(l--,1))}},i=0;i<e.length;i++)t(i)}var kl=0,ai=function(e,t,i,n,r){if(!(this instanceof ai))return new ai(e,t,i,n,r);i==null&&(i=0),Lr.call(this,[new Ar([new Fi("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=Qe(i,0);this.sel=Ri(s),this.history=new Zr(null),this.id=++kl,this.modeOption=t,this.lineSep=n,this.direction=r=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Po(this,{from:s,to:s,text:e}),Qn(this,Ri(s),Te)};ai.prototype=ue(Lr.prototype,{constructor:ai,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=_n(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Fn(function(e){var t=Qe(this.first,0),i=this.first+this.size-1;or(this,{from:t,to:Qe(i,pt(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Cr(this.cm,0,0),Qn(this,Ri(t),Te)}),replaceRange:function(e,t,i,n){t=o(this,t),i=i?o(this,i):t,ar(this,e,t,i,n)},getRange:function(e,t,i){var n=on(this,o(this,e),o(this,t));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(un(this,e))return pt(this,e)},getLineNumber:function(e){return Rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=pt(this,e)),Tn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return o(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fn(function(e,t,i){za(this,o(this,typeof e=="number"?Qe(e,t||0):e),null,i)}),setSelection:Fn(function(e,t,i){za(this,o(this,e),o(this,t||e),i)}),extendSelection:Fn(function(e,t,i){qr(this,o(this,e),t&&o(this,t),i)}),extendSelections:Fn(function(e,t){Ha(this,u(this,e),t)}),extendSelectionsBy:Fn(function(e,t){var i=y(this.sel.ranges,e);Ha(this,u(this,i),t)}),setSelections:Fn(function(e,t,i){if(!e.length)return;for(var n=[],r=0;r<e.length;r++)n[r]=new Qt(o(this,e[r].anchor),o(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Qn(this,xi(this.cm,n,t),i)}),addSelection:Fn(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Qt(o(this,e),o(this,t||e))),Qn(this,xi(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var r=on(this,t[n].from(),t[n].to());i=i?i.concat(r):r}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=on(this,i[n].from(),i[n].to());e!==!1&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:Fn(function(e,t,i){for(var n=[],r=this.sel,s=0;s<r.ranges.length;s++){var l=r.ranges[s];n[s]={from:l.from(),to:l.to(),text:this.splitLines(e[s]),origin:i}}for(var f=t&&t!="end"&&hl(this,n,t),g=n.length-1;g>=0;g--)or(this,n[g]);f?Ka(this,f):this.cm&&tr(this.cm)}),undo:Fn(function(){no(this,"undo")}),redo:Fn(function(){no(this,"redo")}),undoSelection:Fn(function(){no(this,"undo",!0)}),redoSelection:Fn(function(){no(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Zr(this.history.maxGeneration),Pi(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ir(this.history.done),undone:ir(this.history.undone)}},setHistory:function(e){var t=this.history=new Zr(this.history.maxGeneration);t.done=ir(e.done.slice(0),null,!0),t.undone=ir(e.undone.slice(0),null,!0)},setGutterMarker:Fn(function(e,t,i){return _r(this,e,"gutter",function(n){var r=n.gutterMarkers||(n.gutterMarkers={});return r[t]=i,!i&&Ie(r)&&(n.gutterMarkers=null),!0})}),clearGutter:Fn(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&_r(t,i,"gutter",function(){return i.gutterMarkers[e]=null,Ie(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!un(this,e))return null;if(t=e,e=pt(this,e),!e)return null}else if(t=Rt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Fn(function(e,t,i){return _r(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[r])n[r]=i;else{if(ce(i).test(n[r]))return!1;n[r]+=" "+i}return!0})}),removeLineClass:Fn(function(e,t,i){return _r(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=n[r];if(s)if(i==null)n[r]=null;else{var l=s.match(ce(i));if(!l)return!1;var f=l.index+l[0].length;n[r]=s.slice(0,l.index)+(!l.index||f==s.length?"":" ")+s.slice(f)||null}else return!1;return!0})}),addLineWidget:Fn(function(e,t,i){return xl(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return sr(this,o(this,e),o(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=o(this,e),sr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=o(this,e);var t=[],i=pt(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,i){e=o(this,e),t=o(this,t);var n=[],r=e.line;return this.iter(e.line,t.line+1,function(s){var l=s.markedSpans;if(l)for(var f=0;f<l.length;f++){var g=l[f];!(g.to!=null&&r==e.line&&e.ch>=g.to||g.from==null&&r!=e.line||g.from!=null&&r==t.line&&g.from>=t.ch)&&(!i||i(g.marker))&&n.push(g.marker.parent||g.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var s=r.text.length+n;if(s>e)return t=e,!0;e-=s,++i}),o(this,Qe(i,t))},indexFromPos:function(e){e=o(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new ai(_n(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new ai(_n(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],El(n,rs(this)),n},unlinkDoc:function(e){if(e instanceof xn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(rs(this));break}if(e.history==this.history){var n=[e.id];Pi(e,function(r){return n.push(r.id)},!0),e.history=new Zr(null),e.history.done=ir(this.history.done,n),e.history.undone=ir(this.history.undone,n)}},iterLinkedDocs:function(e){Pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):St(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Fn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),ai.prototype.eachLine=ai.prototype.iter;var os=0;function Tl(e){var t=this;if(as(t),We(t,e)||Ti(t.display,e))return;x(e),F&&(os=+new Date);var i=Hi(t,e,!0),n=e.dataTransfer.files;if(!i||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,s=Array(r),l=0,f=function(){++l==r&&Un(t,function(){i=o(t.doc,i);var Ee={from:i,to:i,text:t.doc.splitLines(s.filter(function(Je){return Je!=null}).join(t.doc.lineSeparator())),origin:"paste"};or(t.doc,Ee),Ka(t.doc,Ri(o(t.doc,i),o(t.doc,Ni(Ee))))})()},g=function(Ee,Je){if(t.options.allowDropFileTypes&&ve(t.options.allowDropFileTypes,Ee.type)==-1){f();return}var tt=new FileReader;tt.onerror=function(){return f()},tt.onload=function(){var rt=tt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(rt)){f();return}s[Je]=rt,f()},tt.readAsText(Ee)},C=0;C<n.length;C++)g(n[C],C);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var H=e.dataTransfer.getData("Text");if(H){var ne;if(t.state.draggingText&&!t.state.draggingText.copy&&(ne=t.listSelections()),eo(t.doc,Ri(i,i)),ne)for(var Me=0;Me<ne.length;++Me)ar(t.doc,"",ne[Me].anchor,ne[Me].head,"drag");t.replaceSelection(H,"around","paste"),t.display.input.focus()}}catch(Ee){}}}function Ol(e,t){if(F&&(!e.state.draggingText||+new Date-os<100)){N(t);return}if(We(e,t)||Ti(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ke){var i=O("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Y&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),Y&&i.parentNode.removeChild(i)}}function _l(e,t){var i=Hi(e,t);if(!i)return;var n=document.createDocumentFragment();ba(e,i,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),$(e.display.dragCursor,n)}function as(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ss(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var s=0;s<i.length;s++)e(i[s])})}var ls=!1;function Al(){if(ls)return;Ll(),ls=!0}function Ll(){var e;xe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ss(Ml)},100))}),xe(window,"blur",function(){return ss(er)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ii={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Rr=0;Rr<10;Rr++)Ii[Rr+48]=Ii[Rr+96]=String(Rr);for(var io=65;io<=90;io++)Ii[io]=String.fromCharCode(io);for(var Nr=1;Nr<=12;Nr++)Ii[Nr+111]=Ii[Nr+63235]="F"+Nr;var Oi={};Oi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Oi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Oi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Oi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Oi.default=he?Oi.macDefault:Oi.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,r,s,l=0;l<t.length-1;l++){var f=t[l];if(/^(cmd|meta|m)$/i.test(f))s=!0;else if(/^a(lt)?$/i.test(f))i=!0;else if(/^(c|ctrl|control)$/i.test(f))n=!0;else if(/^s(hift)?$/i.test(f))r=!0;else throw new Error("Unrecognized modifier name: "+f)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Rl(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var r=y(i.split(" "),Dl),s=0;s<r.length;s++){var l=void 0,f=void 0;s==r.length-1?(f=r.join(" "),l=n):(f=r.slice(0,s+1).join(" "),l="...");var g=t[f];if(!g)t[f]=l;else if(g!=l)throw new Error("Inconsistent bindings for "+f)}delete e[i]}for(var C in t)e[C]=t[C];return e}function lr(e,t,i,n){t=ro(t);var r=t.call?t.call(e,n):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&i(r))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return lr(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var l=lr(e,t.fallthrough[s],i,n);if(l)return l}}}function us(e){var t=typeof e=="string"?e:Ii[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function cs(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Q?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Q?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function ds(e,t){if(Y&&e.keyCode==34&&e.char)return!1;var i=Ii[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),cs(i,e,t))}function ro(e){return typeof e=="string"?Oi[e]:e}function ur(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var s=t(i[r]);n.length&&Ot(s.from,v(n).to)<=0;){var l=n.pop();if(Ot(l.from,s.from)<0){s.from=l.from;break}}n.push(s)}hi(e,function(){for(var f=n.length-1;f>=0;f--)ar(e.doc,"",n[f].from,n[f].to,"+delete");tr(e)})}function Fo(e,t,i){var n=Fe(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Bo(e,t,i){var n=Fo(e,t.ch,i);return n==null?null:new Qe(t.line,n,i<0?"after":"before")}function Wo(e,t,i,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var s=Ye(i,t.doc.direction);if(s){var l=r<0?v(s):s[0],f=r<0==(l.level==1),g=f?"after":"before",C;if(l.level>0||t.doc.direction=="rtl"){var H=Zi(t,i);C=r<0?i.text.length-1:0;var ne=Si(t,H,C).top;C=nt(function(Me){return Si(t,H,Me).top==ne},r<0==(l.level==1)?l.from:l.to-1,C),g=="before"&&(C=Fo(i,C,1))}else C=r<0?l.to:l.from;return new Qe(n,C,g)}}return new Qe(n,r<0?i.text.length:0,r<0?"before":"after")}function Nl(e,t,i,n){var r=Ye(t,e.doc.direction);if(!r)return Bo(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=je(r,i.ch,i.sticky),l=r[s];if(e.doc.direction=="ltr"&&l.level%2==0&&(n>0?l.to>i.ch:l.from<i.ch))return Bo(t,i,n);var f=function(dt,mt){return Fo(t,dt instanceof Qe?dt.ch:dt,mt)},g,C=function(dt){return e.options.lineWrapping?(g=g||Zi(e,t),pa(e,t,g,dt)):{begin:0,end:t.text.length}},H=C(i.sticky=="before"?f(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var ne=l.level==1==n<0,Me=f(i,ne?1:-1);if(Me!=null&&(ne?Me<=l.to&&Me<=H.end:Me>=l.from&&Me>=H.begin)){var Ee=ne?"before":"after";return new Qe(i.line,Me,Ee)}}var Je=function(dt,mt,ht){for(var bt=function(fn,Bn){return Bn?new Qe(i.line,f(fn,1),"before"):new Qe(i.line,fn,"after")};dt>=0&&dt<r.length;dt+=mt){var Mt=r[dt],_t=mt>0==(Mt.level!=1),Ut=_t?ht.begin:f(ht.end,-1);if(Mt.from<=Ut&&Ut<Mt.to)return bt(Ut,_t);if(Ut=_t?Mt.from:f(Mt.to,-1),ht.begin<=Ut&&Ut<ht.end)return bt(Ut,_t)}},tt=Je(s+n,n,H);if(tt)return tt;var rt=n>0?H.end:f(H.begin,-1);return rt!=null&&!(n>0&&rt==t.text.length)&&(tt=Je(n>0?0:r.length-1,n,C(rt)),tt)?tt:null}var Pr={selectAll:Ya,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Te)},killLine:function(e){return ur(e,function(t){if(t.empty()){var i=pt(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:Qe(t.head.line+1,0)}:{from:t.head,to:Qe(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ur(e,function(t){return{from:Qe(t.from().line,0),to:o(e.doc,Qe(t.to().line+1,0))}})},delLineLeft:function(e){return ur(e,function(t){return{from:Qe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Qe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Qe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return hs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return fs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},w)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},w)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?fs(e,t.head):n},w)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,r=0;r<i.length;r++){var s=i[r].from(),l=A(e.getLine(s.line),s.ch,n);t.push(k(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,s=pt(e.doc,r.line).text;if(s){if(r.ch==s.length&&(r=new Qe(r.line,r.ch-1)),r.ch>0)r=new Qe(r.line,r.ch+1),e.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),Qe(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var l=pt(e.doc,r.line-1).text;l&&(r=new Qe(r.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Qe(r.line-1,l.length-1),r,"+transpose"))}}i.push(new Qt(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return hi(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);tr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function hs(e,t){var i=pt(e.doc,t),n=Tn(i);return n!=i&&(t=Rt(n)),Wo(!0,e,n,t,1)}function Pl(e,t){var i=pt(e.doc,t),n=bi(i);return n!=i&&(t=Rt(n)),Wo(!0,e,i,t,-1)}function fs(e,t){var i=hs(e,t.line),n=pt(e.doc,i.line),r=Ye(n,e.doc.direction);if(!r||r[0].level==0){var s=Math.max(i.ch,n.text.search(/\S/)),l=t.line==i.line&&t.ch<=s&&t.ch;return Qe(i.line,l?0:s,i.sticky)}return i}function oo(e,t,i){if(typeof t=="string"&&(t=Pr[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),r=t(e)!=Se}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}function jl(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=lr(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&lr(t,e.options.extraKeys,i,e)||lr(t,e.options.keyMap,i,e)}var Il=new J;function jr(e,t,i,n){var r=e.state.keySeq;if(r){if(us(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),ps(e,r+" "+t,i,n))return!0}return ps(e,t,i,n)}function ps(e,t,i,n){var r=jl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&Xn(e,"keyHandled",e,t,i),(r=="handled"||r=="multi")&&(x(i),So(e)),!!r}function ms(e,t){var i=ds(t,!0);return i?t.shiftKey&&!e.state.keySeq?jr(e,"Shift-"+i,t,function(n){return oo(e,n,!0)})||jr(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return oo(e,n)}):jr(e,i,t,function(n){return oo(e,n)}):!1}function Ul(e,t,i){return jr(e,"'"+i+"'",t,function(n){return oo(e,n,!0)})}var Ho=null;function gs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=U(),We(t,e))return;F&&q<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=ms(t,e);Y&&(Ho=n?i:null,!n&&i==88&&!Ft&&(he?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),Le&&!he&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;ae(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(P(t,"CodeMirror-crosshair"),Ze(document,"keyup",i),Ze(document,"mouseover",i))}xe(document,"keyup",i),xe(document,"mouseover",i)}function vs(e){e.keyCode==16&&(this.doc.sel.shift=!1),We(this,e)}function bs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ti(t.display,e)||We(t,e)||e.ctrlKey&&!e.altKey||he&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(Y&&i==Ho){Ho=null,x(e);return}if(Y&&(!e.which||e.which<10)&&ms(t,e))return;var r=String.fromCharCode(n==null?i:n);if(r=="\b")return;if(Ul(t,e,r))return;t.display.input.onKeyPress(e)}var Bl=400,zo=function(e,t,i){this.time=e,this.pos=t,this.button=i};zo.prototype.compare=function(e,t,i){return this.time+Bl>e&&Ot(t,this.pos)==0&&i==this.button};var Ir,Ur;function Wl(e,t){var i=+new Date;return Ur&&Ur.compare(i,e,t)?(Ir=Ur=null,"triple"):Ir&&Ir.compare(i,e,t)?(Ur=new zo(i,e,t),Ir=null,"double"):(Ir=new zo(i,e,t),Ur=null,"single")}function ys(e){var t=this,i=t.display;if(We(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,Ti(i,e)){V||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Ko(t,e))return;var n=Hi(t,e),r=oe(e),s=n?Wl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,r,n,s,e))return;r==1?n?Kl(t,n,s,e):be(e)==i.scroller&&x(e):r==2?(n&&qr(t.doc,n),setTimeout(function(){return i.input.focus()},20)):r==3&&(Ce?t.display.input.onContextMenu(e):Ca(t))}function Hl(e,t,i,n,r){var s="Click";return n=="double"?s="Double"+s:n=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,jr(e,cs(s,r),r,function(l){if(typeof l=="string"&&(l=Pr[l]),!l)return!1;var f=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),f=l(e,i)!=Se}finally{e.state.suppressEdits=!1}return f})}function zl(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(r.unit==null){var s=Ne?i.shiftKey&&i.metaKey:i.altKey;r.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(r.extend==null||e.doc.extend)&&(r.extend=e.doc.extend||i.shiftKey),r.addNew==null&&(r.addNew=he?i.metaKey:i.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(he?i.altKey:i.ctrlKey)),r}function Kl(e,t,i,n){F?setTimeout(m(ya,e),0):e.curOp.focus=U();var r=zl(e,i,n),s=e.doc.sel,l;e.options.dragDrop&&Xe&&!e.isReadOnly()&&i=="single"&&(l=s.contains(t))>-1&&(Ot((l=s.ranges[l]).from(),t)<0||t.xRel>0)&&(Ot(l.to(),t)>0||t.xRel<0)?Vl(e,n,t,r):Gl(e,n,t,r)}function Vl(e,t,i,n){var r=e.display,s=!1,l=Un(e,function(C){V&&(r.scroller.draggable=!1),e.state.draggingText=!1,Ze(r.wrapper.ownerDocument,"mouseup",l),Ze(r.wrapper.ownerDocument,"mousemove",f),Ze(r.scroller,"dragstart",g),Ze(r.scroller,"drop",l),s||(x(C),n.addNew||qr(e.doc,i,null,null,n.extend),V&&!ke||F&&q==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),f=function(C){s=s||Math.abs(t.clientX-C.clientX)+Math.abs(t.clientY-C.clientY)>=10},g=function(){return s=!0};V&&(r.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),xe(r.wrapper.ownerDocument,"mouseup",l),xe(r.wrapper.ownerDocument,"mousemove",f),xe(r.scroller,"dragstart",g),xe(r.scroller,"drop",l),Ca(e),setTimeout(function(){return r.input.focus()},20)}function Cs(e,t,i){if(i=="char")return new Qt(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Qt(Qe(t.line,0),o(e.doc,Qe(t.line+1,0)));var n=i(e,t);return new Qt(n.from,n.to)}function Gl(e,t,i,n){var r=e.display,s=e.doc;x(t);var l,f,g=s.sel,C=g.ranges;if(n.addNew&&!n.extend?(f=s.sel.contains(i),f>-1?l=C[f]:l=new Qt(i,i)):(l=s.sel.primary(),f=s.sel.primIndex),n.unit=="rectangle")n.addNew||(l=new Qt(i,i)),i=Hi(e,t,!0,!0),f=-1;else{var H=Cs(e,i,n.unit);n.extend?l=Io(l,H.anchor,H.head,n.extend):l=H}n.addNew?f==-1?(f=C.length,Qn(s,xi(e,C.concat([l]),f),{scroll:!1,origin:"*mouse"})):C.length>1&&C[f].empty()&&n.unit=="char"&&!n.extend?(Qn(s,xi(e,C.slice(0,f).concat(C.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),g=s.sel):Uo(s,f,l,R):(f=0,Qn(s,new mi([l],0),R),g=s.sel);var ne=i;function Me(ht){if(Ot(ne,ht)==0)return;if(ne=ht,n.unit=="rectangle"){for(var bt=[],Mt=e.options.tabSize,_t=A(pt(s,i.line).text,i.ch,Mt),Ut=A(pt(s,ht.line).text,ht.ch,Mt),fn=Math.min(_t,Ut),Bn=Math.max(_t,Ut),kn=Math.min(i.line,ht.line),fi=Math.min(e.lastLine(),Math.max(i.line,ht.line));kn<=fi;kn++){var si=pt(s,kn).text,Rn=D(si,fn,Mt);fn==Bn?bt.push(new Qt(Qe(kn,Rn),Qe(kn,Rn))):si.length>Rn&&bt.push(new Qt(Qe(kn,Rn),Qe(kn,D(si,Bn,Mt))))}bt.length||bt.push(new Qt(i,i)),Qn(s,xi(e,g.ranges.slice(0,f).concat(bt),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ht)}else{var li=l,$n=Cs(e,ht,n.unit),Pn=li.anchor,Nn;Ot($n.anchor,Pn)>0?(Nn=$n.head,Pn=Jn(li.from(),$n.anchor)):(Nn=$n.anchor,Pn=Yn(li.to(),$n.head));var On=g.ranges.slice(0);On[f]=Xl(e,new Qt(o(s,Pn),Nn)),Qn(s,xi(e,On,f),R)}}var Ee=r.wrapper.getBoundingClientRect(),Je=0;function tt(ht){var bt=++Je,Mt=Hi(e,ht,!0,n.unit=="rectangle");if(!Mt)return;if(Ot(Mt,ne)!=0){e.curOp.focus=U(),Me(Mt);var _t=Xr(r,s);(Mt.line>=_t.to||Mt.line<_t.from)&&setTimeout(Un(e,function(){Je==bt&&tt(ht)}),150)}else{var Ut=ht.clientY<Ee.top?-20:ht.clientY>Ee.bottom?20:0;Ut&&setTimeout(Un(e,function(){if(Je!=bt)return;r.scroller.scrollTop+=Ut,tt(ht)}),50)}}function rt(ht){e.state.selectingText=!1,Je=Infinity,ht&&(x(ht),r.input.focus()),Ze(r.wrapper.ownerDocument,"mousemove",dt),Ze(r.wrapper.ownerDocument,"mouseup",mt),s.history.lastSelOrigin=null}var dt=Un(e,function(ht){ht.buttons===0||!oe(ht)?rt(ht):tt(ht)}),mt=Un(e,rt);e.state.selectingText=mt,xe(r.wrapper.ownerDocument,"mousemove",dt),xe(r.wrapper.ownerDocument,"mouseup",mt)}function Xl(e,t){var i=t.anchor,n=t.head,r=pt(e.doc,i.line);if(Ot(i,n)==0&&i.sticky==n.sticky)return t;var s=Ye(r);if(!s)return t;var l=je(s,i.ch,i.sticky),f=s[l];if(f.from!=i.ch&&f.to!=i.ch)return t;var g=l+(f.from==i.ch==(f.level!=1)?0:1);if(g==0||g==s.length)return t;var C;if(n.line!=i.line)C=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var H=je(s,n.ch,n.sticky),ne=H-l||(n.ch-i.ch)*(f.level==1?-1:1);H==g-1||H==g?C=ne<0:C=ne>0}var Me=s[g+(C?-1:0)],Ee=C==(Me.level==1),Je=Ee?Me.from:Me.to,tt=Ee?"after":"before";return i.ch==Je&&i.sticky==tt?t:new Qt(new Qe(i.line,Je,tt),n)}function xs(e,t,i,n){var r,s;if(t.touches)r=t.touches[0].clientX,s=t.touches[0].clientY;else try{r=t.clientX,s=t.clientY}catch(Me){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&x(t);var l=e.display,f=l.lineDiv.getBoundingClientRect();if(s>f.bottom||!W(e,i))return _(t);s-=f.top-l.viewOffset;for(var g=0;g<e.display.gutterSpecs.length;++g){var C=l.gutters.childNodes[g];if(C&&C.getBoundingClientRect().right>=r){var H=bn(e.doc,s),ne=e.display.gutterSpecs[g];return Ae(e,i,e,H,ne.className,t),_(t)}}}function Ko(e,t){return xs(e,t,"gutterClick",!0)}function ws(e,t){if(Ti(e.display,t)||$l(e,t))return;if(We(e,t,"contextmenu"))return;Ce||e.display.input.onContextMenu(t)}function $l(e,t){return W(e,"gutterContextMenu")?xs(e,t,"gutterContextMenu",!1):!1}function Es(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),br(e)}var cr={toString:function(){return"CodeMirror.Init"}},Ss={},ao={};function Yl(e){var t=e.optionHandlers;function i(n,r,s,l){e.defaults[n]=r,s&&(t[n]=l?function(f,g,C){C!=cr&&s(f,g,C)}:s)}e.defineOption=i,e.Init=cr,i("value","",function(n,r){return n.setValue(r)},!0),i("mode",null,function(n,r){n.doc.modeOption=r,No(n)},!0),i("indentUnit",2,No,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Tr(n),br(n),oi(n)},!0),i("lineSeparator",null,function(n,r){if(n.doc.lineSep=r,!r)return;var s=[],l=n.doc.first;n.doc.iter(function(g){for(var C=0;;){var H=g.text.indexOf(r,C);if(H==-1)break;C=H+r.length,s.push(Qe(l,H))}l++});for(var f=s.length-1;f>=0;f--)ar(n.doc,r,s[f],Qe(s[f].line,s[f].ch+r.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,r,s){n.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),s!=cr&&n.refresh()}),i("specialCharPlaceholder",Yt,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",fe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,r){return n.getInputField().spellcheck=r},!0),i("autocorrect",!1,function(n,r){return n.getInputField().autocorrect=r},!0),i("autocapitalize",!1,function(n,r){return n.getInputField().autocapitalize=r},!0),i("rtlMoveVisually",!Ue),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Es(n),kr(n)},!0),i("keyMap","default",function(n,r,s){var l=ro(r),f=s!=cr&&ro(s);f&&f.detach&&f.detach(n,l),l.attach&&l.attach(n,f||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,r){n.display.gutterSpecs=Do(r,n.options.lineNumbers),kr(n)},!0),i("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?wo(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return nr(n)},!0),i("scrollbarStyle","native",function(n){Ta(n),nr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,r){n.display.gutterSpecs=Do(n.options.gutters,r),kr(n)},!0),i("firstLineNumber",1,kr,!0),i("lineNumberFormatter",function(n){return n},kr,!0),i("showCursorWhenSelecting",!1,yr,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,r){r=="nocursor"&&(er(n),n.display.input.blur()),n.display.input.readOnlyChanged(r)}),i("screenReaderLabel",null,function(n,r){r=r===""?null:r,n.display.input.screenReaderLabelChanged(r)}),i("disableInput",!1,function(n,r){r||n.display.input.reset()},!0),i("dragDrop",!0,Jl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,yr,!0),i("singleCursorHeightPerLine",!0,yr,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Tr,!0),i("addModeClass",!1,Tr,!0),i("pollInterval",100),i("undoDepth",200,function(n,r){return n.doc.history.undoDepth=r}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Tr,!0),i("moveInputWithCursor",!0,function(n,r){r||n.display.input.resetPosition()}),i("tabindex",null,function(n,r){return n.display.input.getField().tabIndex=r||""}),i("autofocus",null),i("direction","ltr",function(n,r){return n.doc.setDirection(r)},!0),i("phrases",null)}function Jl(e,t,i){var n=i&&i!=cr;if(!t!=!n){var r=e.display.dragFunctions,s=t?xe:Ze;s(e.display.scroller,"dragstart",r.start),s(e.display.scroller,"dragenter",r.enter),s(e.display.scroller,"dragover",r.over),s(e.display.scroller,"dragleave",r.leave),s(e.display.scroller,"drop",r.drop)}}function Zl(e){e.options.lineWrapping?(ae(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(P(e.display.wrapper,"CodeMirror-wrap"),Br(e)),Eo(e),oi(e),br(e),setTimeout(function(){return nr(e)},100)}function xn(e,t){var i=this;if(!(this instanceof xn))return new xn(e,t);this.options=t=t?p(t):{},p(Ss,t,!1);var n=t.value;typeof n=="string"?n=new ai(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new xn.inputStyles[t.inputStyle](this),s=this.display=new cl(e,n,r,t);s.wrapper.CodeMirror=this,Es(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ta(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},t.autofocus&&!fe&&s.input.focus(),F&&q<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ql(this),Al(),Gi(this),this.curOp.forceUpdate=!0,ja(this,n),t.autofocus&&!fe||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&ko(i)},20):er(this);for(var l in ao)ao.hasOwnProperty(l)&&ao[l](this,t[l],cr);Aa(this),t.finishInit&&t.finishInit(this);for(var f=0;f<Vo.length;++f)Vo[f](this);Xi(this),V&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}xn.defaults=Ss,xn.optionHandlers=ao;function Ql(e){var t=e.display;xe(t.scroller,"mousedown",Un(e,ys)),F&&q<11?xe(t.scroller,"dblclick",Un(e,function(g){if(We(e,g))return;var C=Hi(e,g);if(!C||Ko(e,g)||Ti(e.display,g))return;x(g);var H=e.findWordAt(C);qr(e.doc,H.anchor,H.head)})):xe(t.scroller,"dblclick",function(g){return We(e,g)||x(g)}),xe(t.scroller,"contextmenu",function(g){return ws(e,g)}),xe(t.input.getField(),"contextmenu",function(g){t.scroller.contains(g.target)||ws(e,g)});var i,n={end:0};function r(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function s(g){if(g.touches.length!=1)return!1;var C=g.touches[0];return C.radiusX<=1&&C.radiusY<=1}function l(g,C){if(C.left==null)return!0;var H=C.left-g.left,ne=C.top-g.top;return H*H+ne*ne>20*20}xe(t.scroller,"touchstart",function(g){if(!We(e,g)&&!s(g)&&!Ko(e,g)){t.input.ensurePolled(),clearTimeout(i);var C=+new Date;t.activeTouch={start:C,moved:!1,prev:C-n.end<=300?n:null},g.touches.length==1&&(t.activeTouch.left=g.touches[0].pageX,t.activeTouch.top=g.touches[0].pageY)}}),xe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),xe(t.scroller,"touchend",function(g){var C=t.activeTouch;if(C&&!Ti(t,g)&&C.left!=null&&!C.moved&&new Date-C.start<300){var H=e.coordsChar(t.activeTouch,"page"),ne;!C.prev||l(C,C.prev)?ne=new Qt(H,H):!C.prev.prev||l(C,C.prev.prev)?ne=e.findWordAt(H):ne=new Qt(Qe(H.line,0),o(e.doc,Qe(H.line+1,0))),e.setSelection(ne.anchor,ne.head),e.focus(),x(g)}r()}),xe(t.scroller,"touchcancel",r),xe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xr(e,t.scroller.scrollTop),Ki(e,t.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),xe(t.scroller,"mousewheel",function(g){return Da(e,g)}),xe(t.scroller,"DOMMouseScroll",function(g){return Da(e,g)}),xe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(g){We(e,g)||N(g)},over:function(g){We(e,g)||(_l(e,g),N(g))},start:function(g){return Ol(e,g)},drop:Un(e,Tl),leave:function(g){We(e,g)||as(e)}};var f=t.input.getField();xe(f,"keyup",function(g){return vs.call(e,g)}),xe(f,"keydown",Un(e,gs)),xe(f,"keypress",Un(e,bs)),xe(f,"focus",function(g){return ko(e,g)}),xe(f,"blur",function(g){return er(e,g)})}var Vo=[];xn.defineInitHook=function(e){return Vo.push(e)};function Fr(e,t,i,n){var r=e.doc,s;i==null&&(i="add"),i=="smart"&&(r.mode.indent?s=it(e,t).state:i="prev");var l=e.options.tabSize,f=pt(r,t),g=A(f.text,null,l);f.stateAfter&&(f.stateAfter=null);var C=f.text.match(/^\s*/)[0],H;if(!n&&!/\S/.test(f.text))H=0,i="not";else if(i=="smart"&&(H=r.mode.indent(s,f.text.slice(C.length),f.text),H==Se||H>150)){if(!n)return;i="prev"}i=="prev"?t>r.first?H=A(pt(r,t-1).text,null,l):H=0:i=="add"?H=g+e.options.indentUnit:i=="subtract"?H=g-e.options.indentUnit:typeof i=="number"&&(H=g+i),H=Math.max(0,H);var ne="",Me=0;if(e.options.indentWithTabs)for(var Ee=Math.floor(H/l);Ee;--Ee)Me+=l,ne+=" ";if(Me<H&&(ne+=k(H-Me)),ne!=C)return ar(r,ne,Qe(t,0),Qe(t,C.length),"+input"),f.stateAfter=null,!0;for(var Je=0;Je<r.sel.ranges.length;Je++){var tt=r.sel.ranges[Je];if(tt.head.line==t&&tt.head.ch<C.length){var rt=Qe(t,C.length);Uo(r,Je,new Qt(rt,rt));break}}}var wi=null;function so(e){wi=e}function Go(e,t,i,n,r){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var l=+new Date-200,f=r=="paste"||e.state.pasteIncoming>l,g=St(t),C=null;if(f&&n.ranges.length>1)if(wi&&wi.text.join(`
|
|
`)==t){if(n.ranges.length%wi.text.length==0){C=[];for(var H=0;H<wi.text.length;H++)C.push(s.splitLines(wi.text[H]))}}else g.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(C=y(g,function(dt){return[dt]}));for(var ne=e.curOp.updateInput,Me=n.ranges.length-1;Me>=0;Me--){var Ee=n.ranges[Me],Je=Ee.from(),tt=Ee.to();Ee.empty()&&(i&&i>0?Je=Qe(Je.line,Je.ch-i):e.state.overwrite&&!f?tt=Qe(tt.line,Math.min(pt(s,tt.line).text.length,tt.ch+v(g).length)):f&&wi&&wi.lineWise&&wi.text.join(`
|
|
`)==g.join(`
|
|
`)&&(Je=tt=Qe(Je.line,0)));var rt={from:Je,to:tt,text:C?C[Me%C.length]:g,origin:r||(f?"paste":e.state.cutIncoming>l?"cut":"+input")};or(e.doc,rt),Xn(e,"inputRead",e,rt)}t&&!f&&Ts(e,t),tr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ne),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ks(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&hi(t,function(){return Go(t,i,0,null,"paste")}),!0}function Ts(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)continue;var s=e.getModeAt(r.head),l=!1;if(s.electricChars){for(var f=0;f<s.electricChars.length;f++)if(t.indexOf(s.electricChars.charAt(f))>-1){l=Fr(e,r.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(pt(e.doc,r.head.line).text.slice(0,r.head.ch))&&(l=Fr(e,r.head.line,"smart")));l&&Xn(e,"electricInput",e,r.head.line)}}function Os(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,s={anchor:Qe(r,0),head:Qe(r+1,0)};i.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:i}}function _s(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function As(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return V?e.style.width="1000px":e.setAttribute("wrap","off"),X&&(e.style.border="1px solid black"),_s(e),t}function ql(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,r){var s=this.options,l=s[n];if(s[n]==r&&n!="mode")return;s[n]=r,t.hasOwnProperty(n)&&Un(this,t[n])(this,r,l),Ae(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,r){this.state.keyMaps[r?"push":"unshift"](ro(n))},removeKeyMap:function(n){for(var r=this.state.keyMaps,s=0;s<r.length;++s)if(r[s]==n||r[s].name==n)return r.splice(s,1),!0},addOverlay:ti(function(n,r){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");E(this.state.overlays,{mode:s,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(l){return l.priority}),this.state.modeGen++,oi(this)}),removeOverlay:ti(function(n){for(var r=this.state.overlays,s=0;s<r.length;++s){var l=r[s].modeSpec;if(l==n||typeof n=="string"&&l.name==n){r.splice(s,1),this.state.modeGen++,oi(this);return}}}),indentLine:ti(function(n,r,s){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),un(this.doc,n)&&Fr(this,n,r,s)}),indentSelection:ti(function(n){for(var r=this.doc.sel.ranges,s=-1,l=0;l<r.length;l++){var f=r[l];if(f.empty())f.head.line>s&&(Fr(this,f.head.line,n,!0),s=f.head.line,l==this.doc.sel.primIndex&&tr(this));else{var g=f.from(),C=f.to(),H=Math.max(s,g.line);s=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var ne=H;ne<s;++ne)Fr(this,ne,n);var Me=this.doc.sel.ranges;g.ch==0&&r.length==Me.length&&Me[l].from().ch>0&&Uo(this.doc,l,new Qt(g,Me[l].to()),Te)}}}),getTokenAt:function(n,r){return Nt(this,n,r)},getLineTokens:function(n,r){return Nt(this,Qe(n),r,!0)},getTokenTypeAt:function(n){n=o(this.doc,n);var r=$e(this,pt(this.doc,n.line)),s=0,l=(r.length-1)/2,f=n.ch,g;if(f==0)g=r[2];else for(;;){var C=s+l>>1;if((C?r[C*2-1]:0)>=f)l=C;else if(r[C*2+1]<f)s=C+1;else{g=r[C*2+2];break}}var H=g?g.indexOf("overlay "):-1;return H<0?g:H==0?null:g.slice(0,H-1)},getModeAt:function(n){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(n).state).mode:r},getHelper:function(n,r){return this.getHelpers(n,r)[0]},getHelpers:function(n,r){var s=[];if(!i.hasOwnProperty(r))return s;var l=i[r],f=this.getModeAt(n);if(typeof f[r]=="string")l[f[r]]&&s.push(l[f[r]]);else if(f[r])for(var g=0;g<f[r].length;g++){var C=l[f[r][g]];C&&s.push(C)}else f.helperType&&l[f.helperType]?s.push(l[f.helperType]):l[f.name]&&s.push(l[f.name]);for(var H=0;H<l._global.length;H++){var ne=l._global[H];ne.pred(f,this)&&ve(s,ne.val)==-1&&s.push(ne.val)}return s},getStateAfter:function(n,r){var s=this.doc;return n=d(s,n==null?s.first+s.size-1:n),it(this,n+1,r).state},cursorCoords:function(n,r){var s,l=this.doc.sel.primary();return n==null?s=l.head:typeof n=="object"?s=o(this.doc,n):s=n?l.from():l.to(),Ci(this,s,r||"page")},charCoords:function(n,r){return vo(this,o(this.doc,n),r||"page")},coordsChar:function(n,r){return n=da(this,n,r||"page"),yo(this,n.left,n.top)},lineAtHeight:function(n,r){return n=da(this,{top:n,left:0},r||"page").top,bn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,s){var l=!1,f;if(typeof n=="number"){var g=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>g&&(n=g,l=!0),f=pt(this.doc,n)}else f=n;return zr(this,f,{top:0,left:0},r||"page",s||l).top+(l?this.doc.height-yi(f):0)},defaultTextHeight:function(){return Qi(this.display)},defaultCharWidth:function(){return qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,s,l,f){var g=this.display;n=Ci(this,o(this.doc,n));var C=n.bottom,H=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),g.sizer.appendChild(r),l=="over")C=n.top;else if(l=="above"||l=="near"){var ne=Math.max(g.wrapper.clientHeight,this.doc.height),Me=Math.max(g.sizer.clientWidth,g.lineSpace.clientWidth);(l=="above"||n.bottom+r.offsetHeight>ne)&&n.top>r.offsetHeight?C=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=ne&&(C=n.bottom),H+r.offsetWidth>Me&&(H=Me-r.offsetWidth)}r.style.top=C+"px",r.style.left=r.style.right="",f=="right"?(H=g.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(f=="left"?H=0:f=="middle"&&(H=(g.sizer.clientWidth-r.offsetWidth)/2),r.style.left=H+"px"),s&&Js(this,{left:H,top:C,right:H+r.offsetWidth,bottom:C+r.offsetHeight})},triggerOnKeyDown:ti(gs),triggerOnKeyPress:ti(bs),triggerOnKeyUp:vs,triggerOnMouseDown:ti(ys),execCommand:function(n){if(Pr.hasOwnProperty(n))return Pr[n].call(null,this)},triggerElectric:ti(function(n){Ts(this,n)}),findPosH:function(n,r,s,l){var f=1;r<0&&(f=-1,r=-r);for(var g=o(this.doc,n),C=0;C<r&&!(g=Xo(this.doc,g,f,s,l),g.hitSide);++C);return g},moveH:ti(function(n,r){var s=this;this.extendSelectionsBy(function(l){return s.display.shift||s.doc.extend||l.empty()?Xo(s.doc,l.head,n,r,s.options.rtlMoveVisually):n<0?l.from():l.to()},w)}),deleteH:ti(function(n,r){var s=this.doc.sel,l=this.doc;s.somethingSelected()?l.replaceSelection("",null,"+delete"):ur(this,function(f){var g=Xo(l,f.head,n,r,!1);return n<0?{from:g,to:f.head}:{from:f.head,to:g}})}),findPosV:function(n,r,s,l){var f=1,g=l;r<0&&(f=-1,r=-r);for(var C=o(this.doc,n),H=0;H<r;++H){var ne=Ci(this,C,"div");if(g==null?g=ne.left:ne.left=g,C=Ls(this,ne,f,s),C.hitSide)break}return C},moveV:ti(function(n,r){var s=this,l=this.doc,f=[],g=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(H){if(g)return n<0?H.from():H.to();var ne=Ci(s,H.head,"div");H.goalColumn!=null&&(ne.left=H.goalColumn),f.push(ne.left);var Me=Ls(s,ne,n,r);return r=="page"&&H==l.sel.primary()&&Oo(s,vo(s,Me,"div").top-ne.top),Me},w),f.length)for(var C=0;C<l.sel.ranges.length;C++)l.sel.ranges[C].goalColumn=f[C]}),findWordAt:function(n){var r=this.doc,s=pt(r,n.line).text,l=n.ch,f=n.ch;if(s){var g=this.getHelper(n,"wordChars");(n.sticky=="before"||f==s.length)&&l?--l:++f;for(var C=s.charAt(l),H=_e(C,g)?function(ne){return _e(ne,g)}:/\s/.test(C)?function(ne){return/\s/.test(ne)}:function(ne){return!/\s/.test(ne)&&!_e(ne)};l>0&&H(s.charAt(l-1));)--l;for(;f<s.length&&H(s.charAt(f));)++f}return new Qt(Qe(n.line,l),Qe(n.line,f))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?ae(this.display.cursorDiv,"CodeMirror-overwrite"):P(this.display.cursorDiv,"CodeMirror-overwrite"),Ae(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==U()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ti(function(n,r){Cr(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Ei(this)-this.display.barHeight,width:n.scrollWidth-Ei(this)-this.display.barWidth,clientHeight:po(this),clientWidth:Bi(this)}},scrollIntoView:ti(function(n,r){n==null?(n={from:this.doc.sel.primary().head,to:null},r==null&&(r=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Qe(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=r||0,n.from.line!=null?Zs(this,n):wa(this,n.from,n.to,n.margin)}),setSize:ti(function(n,r){var s=this,l=function(g){return typeof g=="number"||/^\d+$/.test(String(g))?g+"px":g};n!=null&&(this.display.wrapper.style.width=l(n)),r!=null&&(this.display.wrapper.style.height=l(r)),this.options.lineWrapping&&la(this);var f=this.display.viewFrom;this.doc.iter(f,this.display.viewTo,function(g){if(g.widgets){for(var C=0;C<g.widgets.length;C++)if(g.widgets[C].noHScroll){Mi(s,f,"widget");break}}++f}),this.curOp.forceUpdate=!0,Ae(this,"refresh",this)}),operation:function(n){return hi(this,n)},startOperation:function(){return Gi(this)},endOperation:function(){return Xi(this)},refresh:ti(function(){var n=this.display.cachedTextHeight;oi(this),this.curOp.forceUpdate=!0,br(this),Cr(this,this.doc.scrollLeft,this.doc.scrollTop),Lo(this.display),(n==null||Math.abs(n-Qi(this.display))>.5||this.options.lineWrapping)&&Eo(this),Ae(this,"refresh",this)}),swapDoc:ti(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),ja(this,n),br(this),this.display.input.reset(),Cr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Xn(this,"swapDoc",this,r),r}),phrase:function(n){var r=this.options.phrases;return r&&Object.prototype.hasOwnProperty.call(r,n)?r[n]:n},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}},re(e),e.registerHelper=function(n,r,s){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][r]=s},e.registerGlobalHelper=function(n,r,s,l){e.registerHelper(n,r,l),i[n]._global.push({pred:s,val:l})}}function Xo(e,t,i,n,r){var s=t,l=i,f=pt(e,t.line),g=r&&e.direction=="rtl"?-i:i;function C(){var mt=t.line+g;return mt<e.first||mt>=e.first+e.size?!1:(t=new Qe(mt,t.ch,t.sticky),f=pt(e,mt))}function H(mt){var ht;if(n=="codepoint"){var bt=f.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(bt)?ht=null:ht=new Qe(t.line,Math.max(0,Math.min(f.text.length,t.ch+i*(bt>=55296&&bt<56320?2:1))),-i)}else r?ht=Nl(e.cm,f,t,i):ht=Bo(f,t,i);if(ht==null)if(!mt&&C())t=Wo(r,e.cm,f,t.line,g);else return!1;else t=ht;return!0}if(n=="char"||n=="codepoint")H();else if(n=="column")H(!0);else if(n=="word"||n=="group")for(var ne=null,Me=n=="group",Ee=e.cm&&e.cm.getHelper(t,"wordChars"),Je=!0;!(i<0&&!H(!Je));Je=!1){var tt=f.text.charAt(t.ch)||`
|
|
`,rt=_e(tt,Ee)?"w":Me&&tt==`
|
|
`?"n":!Me||/\s/.test(tt)?null:"p";if(Me&&!Je&&!rt&&(rt="s"),ne&&ne!=rt){i<0&&(i=1,H(),t.sticky="after");break}if(rt&&(ne=rt),i>0&&!H(!Je))break}var dt=to(e,t,s,l,!0);return Hn(s,dt)&&(dt.hitSide=!0),dt}function Ls(e,t,i,n){var r=e.doc,s=t.left,l;if(n=="page"){var f=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),g=Math.max(f-.5*Qi(e.display),3);l=(i>0?t.bottom:t.top)+i*g}else n=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var C;!(C=yo(e,s,l),!C.outside);){if(i<0?l<=0:l>=r.height){C.hitSide=!0;break}l+=i*5}return C}var sn=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};sn.prototype.init=function(e){var t=this,i=this,n=i.cm,r=i.div=e.lineDiv;_s(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function s(f){for(var g=f.target;g;g=g.parentNode){if(g==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(g.className))break}return!1}xe(r,"paste",function(f){if(!s(f)||We(n,f)||ks(f,n))return;q<=11&&setTimeout(Un(n,function(){return t.updateFromDOM()}),20)}),xe(r,"compositionstart",function(f){t.composing={data:f.data,done:!1}}),xe(r,"compositionupdate",function(f){t.composing||(t.composing={data:f.data,done:!1})}),xe(r,"compositionend",function(f){t.composing&&(f.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),xe(r,"touchstart",function(){return i.forceCompositionEnd()}),xe(r,"input",function(){t.composing||t.readFromDOMSoon()});function l(f){if(!s(f)||We(n,f))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()}),f.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var g=Os(n);so({lineWise:!0,text:g.text}),f.type=="cut"&&n.operation(function(){n.setSelections(g.ranges,0,Te),n.replaceSelection("",null,"cut")})}else return;if(f.clipboardData){f.clipboardData.clearData();var C=wi.text.join(`
|
|
`);if(f.clipboardData.setData("Text",C),f.clipboardData.getData("Text")==C){f.preventDefault();return}}var H=As(),ne=H.firstChild;n.display.lineSpace.insertBefore(H,n.display.lineSpace.firstChild),ne.value=wi.text.join(`
|
|
`);var Me=document.activeElement;G(ne),setTimeout(function(){n.display.lineSpace.removeChild(H),Me.focus(),Me==r&&i.showPrimarySelection()},50)}xe(r,"copy",l),xe(r,"cut",l)},sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},sn.prototype.prepareSelection=function(){var e=va(this.cm,!1);return e.focus=document.activeElement==this.div,e},sn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},sn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},sn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||r.line<t.display.viewFrom){e.removeAllRanges();return}var s=lo(t,e.anchorNode,e.anchorOffset),l=lo(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&l&&!l.bad&&Ot(Jn(s,l),n)==0&&Ot(Yn(s,l),r)==0)return;var f=t.display.view,g=n.line>=t.display.viewFrom&&Ms(t,n)||{node:f[0].measure.map[2],offset:0},C=r.line<t.display.viewTo&&Ms(t,r);if(!C){var H=f[f.length-1].measure,ne=H.maps?H.maps[H.maps.length-1]:H.map;C={node:ne[ne.length-1],offset:ne[ne.length-2]-ne[ne.length-3]}}if(!g||!C){e.removeAllRanges();return}var Me=e.rangeCount&&e.getRangeAt(0),Ee;try{Ee=ee(g.node,g.offset,C.offset,C.node)}catch(Je){}Ee&&(!Le&&t.state.focused?(e.collapse(g.node,g.offset),Ee.collapsed||(e.removeAllRanges(),e.addRange(Ee))):(e.removeAllRanges(),e.addRange(Ee)),Me&&e.anchorNode==null?e.addRange(Me):Le&&this.startGracePeriod()),this.rememberSelection()},sn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},sn.prototype.showMultipleSelections=function(e){$(this.cm.display.cursorDiv,e.cursors),$(this.cm.display.selectionDiv,e.selection)},sn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},sn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return L(this.div,t)},sn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},sn.prototype.blur=function(){this.div.blur()},sn.prototype.getField=function(){return this.div},sn.prototype.supportsTouch=function(){return!0},sn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},sn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},sn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(z&&j&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var i=lo(t,e.anchorNode,e.anchorOffset),n=lo(t,e.focusNode,e.focusOffset);i&&n&&hi(t,function(){Qn(t.doc,Ri(i,n),Te),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},sn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),r=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Qe(n.line-1,pt(e.doc,n.line-1).length)),r.ch==pt(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=Qe(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var s,l,f;n.line==t.viewFrom||(s=zi(e,n.line))==0?(l=Rt(t.view[0].line),f=t.view[0].node):(l=Rt(t.view[s].line),f=t.view[s-1].node.nextSibling);var g=zi(e,r.line),C,H;if(g==t.view.length-1?(C=t.viewTo-1,H=t.lineDiv.lastChild):(C=Rt(t.view[g+1].line)-1,H=t.view[g+1].node.previousSibling),!f)return!1;for(var ne=e.doc.splitLines(tu(e,f,H,l,C)),Me=on(e.doc,Qe(l,0),Qe(C,pt(e.doc,C).text.length));ne.length>1&&Me.length>1;)if(v(ne)==v(Me))ne.pop(),Me.pop(),C--;else if(ne[0]==Me[0])ne.shift(),Me.shift(),l++;else break;for(var Ee=0,Je=0,tt=ne[0],rt=Me[0],dt=Math.min(tt.length,rt.length);Ee<dt&&tt.charCodeAt(Ee)==rt.charCodeAt(Ee);)++Ee;for(var mt=v(ne),ht=v(Me),bt=Math.min(mt.length-(ne.length==1?Ee:0),ht.length-(Me.length==1?Ee:0));Je<bt&&mt.charCodeAt(mt.length-Je-1)==ht.charCodeAt(ht.length-Je-1);)++Je;if(ne.length==1&&Me.length==1&&l==n.line)for(;Ee&&Ee>n.ch&&mt.charCodeAt(mt.length-Je-1)==ht.charCodeAt(ht.length-Je-1);)Ee--,Je++;ne[ne.length-1]=mt.slice(0,mt.length-Je).replace(/^\u200b+/,""),ne[0]=ne[0].slice(Ee).replace(/\u200b+$/,"");var Mt=Qe(l,Ee),_t=Qe(C,Me.length?v(Me).length-Je:0);if(ne.length>1||ne[0]||Ot(Mt,_t))return ar(e.doc,ne,Mt,_t,"+input"),!0},sn.prototype.ensurePolled=function(){this.forceCompositionEnd()},sn.prototype.reset=function(){this.forceCompositionEnd()},sn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},sn.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)},sn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return oi(e.cm)})},sn.prototype.setUneditable=function(e){e.contentEditable="false"},sn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Un(this.cm,Go)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},sn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},sn.prototype.onContextMenu=function(){},sn.prototype.resetPosition=function(){},sn.prototype.needsContentAttribute=!0;function Ms(e,t){var i=mo(e,t.line);if(!i||i.hidden)return null;var n=pt(e.doc,t.line),r=ia(i,n,t.line),s=Ye(n,e.doc.direction),l="left";if(s){var f=je(s,t.ch);l=f%2?"right":"left"}var g=aa(r.map,t.ch,l);return g.offset=g.collapse=="right"?g.end:g.start,g}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dr(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,r){var s="",l=!1,f=e.doc.lineSeparator(),g=!1;function C(Ee){return function(Je){return Je.id==Ee}}function H(){l&&(s+=f,g&&(s+=f),l=g=!1)}function ne(Ee){Ee&&(H(),s+=Ee)}function Me(Ee){if(Ee.nodeType==1){var Je=Ee.getAttribute("cm-text");if(Je){ne(Je);return}var tt=Ee.getAttribute("cm-marker"),rt;if(tt){var dt=e.findMarks(Qe(n,0),Qe(r+1,0),C(+tt));dt.length&&(rt=dt[0].find(0))&&ne(on(e.doc,rt.from,rt.to).join(f));return}if(Ee.getAttribute("contenteditable")=="false")return;var mt=/^(pre|div|p|li|table|br)$/i.test(Ee.nodeName);if(!/^br$/i.test(Ee.nodeName)&&Ee.textContent.length==0)return;mt&&H();for(var ht=0;ht<Ee.childNodes.length;ht++)Me(Ee.childNodes[ht]);/^(pre|p)$/i.test(Ee.nodeName)&&(g=!0),mt&&(l=!0)}else Ee.nodeType==3&&ne(Ee.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Me(t),t==i);)t=t.nextSibling,g=!1;return s}function lo(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return dr(e.clipPos(Qe(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var s=e.display.view[r];if(s.node==n)return nu(s,t,i)}}function nu(e,t,i){var n=e.text.firstChild,r=!1;if(!t||!L(n,t))return dr(Qe(Rt(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?v(e.rest):e.line;return dr(Qe(Rt(s),s.text.length),r)}var l=t.nodeType==3?t:null,f=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));f.parentNode!=n;)f=f.parentNode;var g=e.measure,C=g.maps;function H(rt,dt,mt){for(var ht=-1;ht<(C?C.length:0);ht++)for(var bt=ht<0?g.map:C[ht],Mt=0;Mt<bt.length;Mt+=3){var _t=bt[Mt+2];if(_t==rt||_t==dt){var Ut=Rt(ht<0?e.line:e.rest[ht]),fn=bt[Mt]+mt;return(mt<0||_t!=rt)&&(fn=bt[Mt+(mt?1:0)]),Qe(Ut,fn)}}}var ne=H(l,f,i);if(ne)return dr(ne,r);for(var Me=f.nextSibling,Ee=l?l.nodeValue.length-i:0;Me;Me=Me.nextSibling){if(ne=H(Me,Me.firstChild,0),ne)return dr(Qe(ne.line,ne.ch-Ee),r);Ee+=Me.textContent.length}for(var Je=f.previousSibling,tt=i;Je;Je=Je.previousSibling){if(ne=H(Je,Je.firstChild,-1),ne)return dr(Qe(ne.line,ne.ch+tt),r);tt+=Je.textContent.length}}var Mn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Mn.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),X&&(r.style.width="0px"),xe(r,"input",function(){F&&q>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),xe(r,"paste",function(l){if(We(n,l)||ks(l,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(l){if(We(n,l))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var f=Os(n);so({lineWise:!0,text:f.text}),l.type=="cut"?n.setSelections(f.ranges,null,Te):(i.prevInput="",r.value=f.text.join(`
|
|
`),G(r))}else return;l.type=="cut"&&(n.state.cutIncoming=+new Date)}xe(r,"cut",s),xe(r,"copy",s),xe(e.scroller,"paste",function(l){if(Ti(e,l)||We(n,l))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var f=new Event("paste");f.clipboardData=l.clipboardData,r.dispatchEvent(f)}),xe(e.lineSpace,"selectstart",function(l){Ti(e,l)||x(l)}),xe(r,"compositionstart",function(){var l=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:n.markText(l,n.getCursor("to"),{className:"CodeMirror-composing"})}}),xe(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Mn.prototype.createField=function(e){this.wrapper=As(),this.textarea=this.wrapper.firstChild},Mn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Mn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=va(e);if(e.options.moveInputWithCursor){var r=Ci(e,i.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+l.top-s.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+l.left-s.left))}return n},Mn.prototype.showSelection=function(e){var t=this.cm,i=t.display;$(i.cursorDiv,e.cursors),$(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Mn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&G(this.textarea),F&&q>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",F&&q>=9&&(this.hasSelection=null))},Mn.prototype.getField=function(){return this.textarea},Mn.prototype.supportsTouch=function(){return!1},Mn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!fe||U()!=this.textarea))try{this.textarea.focus()}catch(e){}},Mn.prototype.blur=function(){this.textarea.blur()},Mn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Mn.prototype.receivedFocus=function(){this.slowPoll()},Mn.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()})},Mn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},Mn.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ct(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=i.value;if(r==n&&!t.somethingSelected())return!1;if(F&&q>=9&&this.hasSelection===r||he&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=r.charCodeAt(0);if(s==8203&&!n&&(n="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,f=Math.min(n.length,r.length);l<f&&n.charCodeAt(l)==r.charCodeAt(l);)++l;return hi(t,function(){Go(t,r.slice(l),n.length-l,null,e.composing?"*compose":null),r.length>1e3||r.indexOf(`
|
|
`)>-1?i.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Mn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Mn.prototype.onKeyPress=function(){F&&q>=9&&(this.hasSelection=null),this.fastPoll()},Mn.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Hi(i,e),l=n.scroller.scrollTop;if(!s||Y)return;var f=i.options.resetSelectionOnContextMenu;f&&i.doc.sel.contains(s)==-1&&Un(i,Qn)(i.doc,Ri(s),Te);var g=r.style.cssText,C=t.wrapper.style.cssText,H=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-H.top-5)+"px; left: "+(e.clientX-H.left-5)+`px;
|
|
z-index: 1000; background: `+(F?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ne;V&&(ne=window.scrollY),n.input.focus(),V&&window.scrollTo(null,ne),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=Ee,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Me(){if(r.selectionStart!=null){var tt=i.somethingSelected(),rt="\u200B"+(tt?r.value:"");r.value="\u21DA",r.value=rt,t.prevInput=tt?"":"\u200B",r.selectionStart=1,r.selectionEnd=rt.length,n.selForContextMenu=i.doc.sel}}function Ee(){if(t.contextMenuPending!=Ee)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=C,r.style.cssText=g,F&&q<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),r.selectionStart!=null){(!F||F&&q<9)&&Me();var tt=0,rt=function(){n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?Un(i,Ya)(i):tt++<10?n.detectingSelectAll=setTimeout(rt,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(rt,200)}}if(F&&q>=9&&Me(),Ce){N(e);var Je=function(){Ze(window,"mouseup",Je),setTimeout(Ee,20)};xe(window,"mouseup",Je)}else setTimeout(Ee,50)},Mn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Mn.prototype.setUneditable=function(){},Mn.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?p(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=U();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=f.getValue()}var r;if(e.form&&(xe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var s=e.form;r=s.submit;try{var l=s.submit=function(){n(),s.submit=r,s.submit(),s.submit=l}}catch(g){}}t.finishInit=function(g){g.save=n,g.getTextArea=function(){return e},g.toTextArea=function(){g.toTextArea=isNaN,n(),e.parentNode.removeChild(g.getWrapperElement()),e.style.display="",e.form&&(Ze(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var f=xn(function(g){return e.parentNode.insertBefore(g,e.nextSibling)},t);return f}function ru(e){e.off=Ze,e.on=xe,e.wheelEventPixels=dl,e.Doc=ai,e.splitLines=St,e.countColumn=A,e.findColumn=D,e.isWordChar=ge,e.Pass=Se,e.signal=Ae,e.Line=Fi,e.changeEnd=Ni,e.scrollbarModel=ka,e.Pos=Qe,e.cmpPos=Ot,e.modes=wt,e.mimeModes=Tt,e.resolveMode=vt,e.getMode=vn,e.modeExtensions=jt,e.extendMode=Zt,e.copyState=pn,e.startState=wn,e.innerMode=en,e.commands=Pr,e.keyMap=Oi,e.keyName=ds,e.isModifierKey=us,e.lookupKey=lr,e.normalizeKeyMap=Rl,e.StringStream=Pt,e.SharedTextMarker=Dr,e.TextMarker=ji,e.LineWidget=Mr,e.e_preventDefault=x,e.e_stopPropagation=T,e.e_stop=N,e.addClass=ae,e.contains=L,e.rmClass=P,e.keyNames=Ii}Yl(xn),ql(xn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var uo in ai.prototype)ai.prototype.hasOwnProperty(uo)&&ve(ou,uo)<0&&(xn.prototype[uo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ai.prototype[uo]));return re(ai),xn.inputStyles={textarea:Mn,contenteditable:sn},xn.defineMode=function(e){!xn.defaults.mode&&e!="null"&&(xn.defaults.mode=e),Bt.apply(this,arguments)},xn.defineMIME=qt,xn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),xn.defineMIME("text/plain","null"),xn.defineExtension=function(e,t){xn.prototype[e]=t},xn.defineDocExtension=function(e,t){ai.prototype[e]=t},xn.fromTextArea=iu,ru(xn),xn.version="5.58.2",xn})},WaYH:function(yt,qe,b){"use strict";var Z=b("rePB"),Pe=b("Ff2n"),Le=b("VTBJ"),He=b("1OyB"),Oe=b("vuIU"),ye=b("JX7q"),F=b("Ji7U"),q=b("LK+K"),V=b("q1tI"),se=b("TSYQ"),j=b.n(se),Y=b("sboe"),ke=b("OZM5"),de=function(Ce){var ce=Ce.prefixCls,P=Ce.level,le=Ce.isStart,$=Ce.isEnd;if(!P)return null;for(var O="".concat(ce,"-indent-unit"),me=[],ee=0;ee<P;ee+=1){var L;me.push(V.createElement("span",{key:ee,className:j()(O,(L={},Object(Z.a)(L,"".concat(O,"-start"),le[ee+1]),Object(Z.a)(L,"".concat(O,"-end"),$[ee+1]),Object(Z.a)(L,"".concat(O,"-end-first-level"),!ee&&$[0]),L))}))}return V.createElement("span",{"aria-hidden":"true",className:"".concat(ce,"-indent")},me)},B=de,X=b("815F"),z="open",fe="close",he="---",Ne=function(Q){Object(F.a)(ce,Q);var Ce=Object(q.a)(ce);function ce(){var P;return Object(He.a)(this,ce),P=Ce.apply(this,arguments),P.state={dragNodeHighlight:!1},P.onSelectorClick=function(le){var $=P.props.context.onNodeClick;$(le,Object(X.b)(P.props)),P.isSelectable()?P.onSelect(le):P.onCheck(le)},P.onSelectorDoubleClick=function(le){var $=P.props.context.onNodeDoubleClick;$(le,Object(X.b)(P.props))},P.onSelect=function(le){if(P.isDisabled())return;var $=P.props.context.onNodeSelect;le.preventDefault(),$(le,Object(X.b)(P.props))},P.onCheck=function(le){if(P.isDisabled())return;var $=P.props,O=$.disableCheckbox,me=$.checked,ee=P.props.context.onNodeCheck;if(!P.isCheckable()||O)return;le.preventDefault();var L=!me;ee(le,Object(X.b)(P.props),L)},P.onMouseEnter=function(le){var $=P.props.context.onNodeMouseEnter;$(le,Object(X.b)(P.props))},P.onMouseLeave=function(le){var $=P.props.context.onNodeMouseLeave;$(le,Object(X.b)(P.props))},P.onContextMenu=function(le){var $=P.props.context.onNodeContextMenu;$(le,Object(X.b)(P.props))},P.onDragStart=function(le){var $=P.props.context.onNodeDragStart;le.stopPropagation(),P.setState({dragNodeHighlight:!0}),$(le,Object(ye.a)(P));try{le.dataTransfer.setData("text/plain","")}catch(O){}},P.onDragEnter=function(le){var $=P.props.context.onNodeDragEnter;le.preventDefault(),le.stopPropagation(),$(le,Object(ye.a)(P))},P.onDragOver=function(le){var $=P.props.context.onNodeDragOver;le.preventDefault(),le.stopPropagation(),$(le,Object(ye.a)(P))},P.onDragLeave=function(le){var $=P.props.context.onNodeDragLeave;le.stopPropagation(),$(le,Object(ye.a)(P))},P.onDragEnd=function(le){var $=P.props.context.onNodeDragEnd;le.stopPropagation(),P.setState({dragNodeHighlight:!1}),$(le,Object(ye.a)(P))},P.onDrop=function(le){var $=P.props.context.onNodeDrop;le.preventDefault(),le.stopPropagation(),P.setState({dragNodeHighlight:!1}),$(le,Object(ye.a)(P))},P.onExpand=function(le){var $=P.props.context.onNodeExpand;$(le,Object(X.b)(P.props))},P.setSelectHandle=function(le){P.selectHandle=le},P.getNodeState=function(){var le=P.props.expanded;return P.isLeaf()?null:le?z:fe},P.hasChildren=function(){var le=P.props.eventKey,$=P.props.context.keyEntities,O=$[le]||{},me=O.children;return!!(me||[]).length},P.isLeaf=function(){var le=P.props,$=le.isLeaf,O=le.loaded,me=P.props.context.loadData,ee=P.hasChildren();return $===!1?!1:$||!me&&!ee||me&&O&&!ee},P.isDisabled=function(){var le=P.props.disabled,$=P.props.context.disabled;return!!($||le)},P.isCheckable=function(){var le=P.props.checkable,$=P.props.context.checkable;return!$||le===!1?!1:$},P.syncLoadData=function(le){var $=le.expanded,O=le.loading,me=le.loaded,ee=P.props.context,L=ee.loadData,U=ee.onNodeLoad;if(O)return;L&&$&&!P.isLeaf()&&(!P.hasChildren()&&!me&&U(Object(X.b)(P.props)))},P.renderSwitcher=function(){var le=P.props,$=le.expanded,O=le.switcherIcon,me=P.props.context,ee=me.prefixCls,L=me.switcherIcon,U=O||L;if(P.isLeaf())return V.createElement("span",{className:j()("".concat(ee,"-switcher"),"".concat(ee,"-switcher-noop"))},typeof U=="function"?U(Object(Le.a)(Object(Le.a)({},P.props),{},{isLeaf:!0})):U);var ae=j()("".concat(ee,"-switcher"),"".concat(ee,"-switcher_").concat($?z:fe));return V.createElement("span",{onClick:P.onExpand,className:ae},typeof U=="function"?U(Object(Le.a)(Object(Le.a)({},P.props),{},{isLeaf:!1})):U)},P.renderCheckbox=function(){var le=P.props,$=le.checked,O=le.halfChecked,me=le.disableCheckbox,ee=P.props.context.prefixCls,L=P.isDisabled(),U=P.isCheckable();if(!U)return null;var ae=typeof U!="boolean"?U:null;return V.createElement("span",{className:j()("".concat(ee,"-checkbox"),$&&"".concat(ee,"-checkbox-checked"),!$&&O&&"".concat(ee,"-checkbox-indeterminate"),(L||me)&&"".concat(ee,"-checkbox-disabled")),onClick:P.onCheck},ae)},P.renderIcon=function(){var le=P.props.loading,$=P.props.context.prefixCls;return V.createElement("span",{className:j()("".concat($,"-iconEle"),"".concat($,"-icon__").concat(P.getNodeState()||"docu"),le&&"".concat($,"-icon_loading"))})},P.renderSelector=function(){var le=P.state.dragNodeHighlight,$=P.props,O=$.title,me=$.selected,ee=$.icon,L=$.loading,U=$.data,ae=P.props.context,K=ae.prefixCls,G=ae.showIcon,m=ae.icon,p=ae.draggable,A=ae.loadData,J=ae.titleRender,ve=P.isDisabled(),Re="".concat(K,"-node-content-wrapper"),Se;if(G){var Te=ee||m;Se=Te?V.createElement("span",{className:j()("".concat(K,"-iconEle"),"".concat(K,"-icon__customize"))},typeof Te=="function"?Te(P.props):Te):P.renderIcon()}else A&&L&&(Se=P.renderIcon());var R;typeof O=="function"?R=O(U):J?R=J(U):R=O;var w=V.createElement("span",{className:"".concat(K,"-title")},R);return V.createElement("span",{ref:P.setSelectHandle,title:typeof O=="string"?O:"",className:j()("".concat(Re),"".concat(Re,"-").concat(P.getNodeState()||"normal"),!ve&&(me||le)&&"".concat(K,"-node-selected"),!ve&&p&&"draggable"),draggable:!ve&&p||void 0,"aria-grabbed":!ve&&p||void 0,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onContextMenu:P.onContextMenu,onClick:P.onSelectorClick,onDoubleClick:P.onSelectorDoubleClick,onDragStart:p?P.onDragStart:void 0},Se,w)},P}return Object(Oe.a)(ce,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var le=this.props.selectable,$=this.props.context.selectable;return typeof le=="boolean"?le:$}},{key:"render",value:function(){var le,$=this.props,O=$.eventKey,me=$.className,ee=$.style,L=$.dragOver,U=$.dragOverGapTop,ae=$.dragOverGapBottom,K=$.isLeaf,G=$.isStart,m=$.isEnd,p=$.expanded,A=$.selected,J=$.checked,ve=$.halfChecked,Re=$.loading,Se=$.domRef,Te=$.active,R=$.onMouseMove,w=Object(Pe.a)($,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),D=this.props.context,S=D.prefixCls,k=D.filterTreeNode,v=D.draggable,y=D.keyEntities,E=this.isDisabled(),M=Object(ke.f)(w),ue=y[O]||{},I=ue.level,ge=m[m.length-1];return V.createElement("div",Object.assign({ref:Se,className:j()(me,"".concat(S,"-treenode"),(le={},Object(Z.a)(le,"".concat(S,"-treenode-disabled"),E),Object(Z.a)(le,"".concat(S,"-treenode-switcher-").concat(p?"open":"close"),!K),Object(Z.a)(le,"".concat(S,"-treenode-checkbox-checked"),J),Object(Z.a)(le,"".concat(S,"-treenode-checkbox-indeterminate"),ve),Object(Z.a)(le,"".concat(S,"-treenode-selected"),A),Object(Z.a)(le,"".concat(S,"-treenode-loading"),Re),Object(Z.a)(le,"".concat(S,"-treenode-active"),Te),Object(Z.a)(le,"".concat(S,"-treenode-leaf-last"),ge),Object(Z.a)(le,"drag-over",!E&&L),Object(Z.a)(le,"drag-over-gap-top",!E&&U),Object(Z.a)(le,"drag-over-gap-bottom",!E&&ae),Object(Z.a)(le,"filter-node",k&&k(Object(X.b)(this.props))),le)),style:ee,onDragEnter:v?this.onDragEnter:void 0,onDragOver:v?this.onDragOver:void 0,onDragLeave:v?this.onDragLeave:void 0,onDrop:v?this.onDrop:void 0,onDragEnd:v?this.onDragEnd:void 0,onMouseMove:R},M),V.createElement(B,{prefixCls:S,level:I,isStart:G,isEnd:m}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ce}(V.Component),Ue=function(Ce){return V.createElement(Y.a.Consumer,null,function(ce){return V.createElement(Ne,Object.assign({},Ce,{context:ce}))})};Ue.displayName="TreeNode",Ue.defaultProps={title:he},Ue.isTreeNode=1;var we=qe.a=Ue},X8EC:function(yt,qe,b){"use strict";b.r(qe);var Z=b("DZo9"),Pe=b("8z0m"),Le=b("+L6B"),He=b("2/Rp"),Oe=b("oBTY"),ye=b("sRBo"),F=b("kaz8"),q=b("7Kak"),V=b("9yH6"),se=b("BoS7"),j=b("Sdc0"),Y=b("14J3"),ke=b("BMrR"),de=b("jCWc"),B=b("kPKH"),X=b("O3gP"),z=b("lrIw"),fe=b("k1fw"),he=b("miYZ"),Ne=b("tsqr"),Ue=b("9og8"),we=b("y8nQ"),Q=b("Vl3Y"),Ce=b("tJVT"),ce=b("PpiC"),P=b("nRaC"),le=b("5RzL"),$=b("5NDa"),O=b("5rEg"),me=b("WmNS"),ee=b.n(me),L=b("q1tI"),U=b.n(L),ae=b("9kvl"),K=b("Ot1p"),G=b("hxT0"),m=b.n(G),p=b("1vsH"),A=b("m3rI"),J=b("ErOA"),ve=b("jrin"),Re=b("R9oj"),Se=b("ECub"),Te=b("YNHc"),R=b.n(Te),w=b("4i/N"),D=b("UESt"),S=Object(L.createRef)(),k=function(Ze){var Ae=Ze.dataSource,We=Ze.placeholder,ie=Ze.defaultValue,W=Ze.onChange,re=Object(L.useState)(!1),x=Object(Ce.a)(re,2),T=x[0],_=x[1],N=Object(L.useState)({data:[],objData:{},ids:[]}),be=Object(Ce.a)(N,2),oe=be[0],Xe=be[1],ot=Object(L.useState)({}),ut=Object(Ce.a)(ot,2),at=ut[0],kt=ut[1];Object(L.useEffect)(function(){window.addEventListener("click",function(){_(!1),kt({})})},[]),Object(L.useEffect)(function(){if(ie){var xt={},wt=[];ie.forEach(function(Tt){var Bt=Tt.sub_discipline,qt=Object(ce.a)(Tt,["sub_discipline"]);Bt&&(xt[Bt.id]=Object(fe.a)(Object(fe.a)({},qt),{},{sub_disciplines:[Bt]}),wt.push(Bt.id))}),Xe({ids:wt,data:Object.values(xt),objData:xt}),W(wt)}},[ie]);var St=function(){return U.a.createElement("div",{className:R.a.emptyWrap},U.a.createElement(Se.a,{image:Se.a.PRESENTED_IMAGE_SIMPLE}))},ct=function(wt){if(oe.ids.includes(wt.id))return!1;var Tt=at.sub_disciplines,Bt=Object(ce.a)(at,["sub_disciplines"]),qt=Object(fe.a)(Object(fe.a)({},oe.objData),{},Object(ve.a)({},wt.id,Object(fe.a)(Object(fe.a)({},Bt),{},{sub_disciplines:[wt]})));Xe({ids:[].concat(Object(Oe.a)(oe.ids),[wt.id]),data:Object.values(qt),objData:qt}),W([].concat(Object(Oe.a)(oe.ids),[wt.id]))},Ft=function(wt){var Tt=oe.objData;delete Tt[wt];var Bt=oe.ids.filter(function(qt){return qt!==wt});Xe({data:Object.values(Tt),objData:Tt,ids:Bt}),W(Bt)},Lt=45;return S&&S.current&&S.current.clientHeight>45&&(Lt=S.current.clientHeight+5),U.a.createElement("div",{className:R.a.cascaderContainer,onClick:function(wt){wt.stopPropagation()}},U.a.createElement("div",{ref:S,className:R.a.valueWrap,onClick:function(){return _(!T)}},oe.data.length===0&&U.a.createElement("span",{className:R.a.placeholder},We||"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"),oe.data.map(function(xt){return U.a.createElement("div",{className:R.a.valueItem,key:xt.id},U.a.createElement("span",null,xt.name),U.a.createElement("span",null,"/"),U.a.createElement("span",null,xt.sub_disciplines[0].name),U.a.createElement("span",{onClick:function(Tt){Tt.stopPropagation(),Tt.preventDefault(),Ft(xt.sub_disciplines[0].id)}},U.a.createElement(w.a,null)))})),T&&U.a.createElement("div",{className:R.a.modalWrap,style:{top:Lt}},U.a.createElement("div",{className:R.a.left},Ae.length===0&&St(),Ae.length>0&&Ae.map(function(xt){return U.a.createElement("div",{key:xt.id,onClick:function(){return kt(xt)}},U.a.createElement("span",null,xt.name),U.a.createElement("span",null,U.a.createElement(D.a,null)))})),at.sub_disciplines&&U.a.createElement("div",{className:R.a.right},at.sub_disciplines.length===0&&St(),at.sub_disciplines.length>0&&at.sub_disciplines.map(function(xt){var wt=oe.ids.includes(xt.id);return U.a.createElement("div",{key:xt.id,className:wt?R.a.disabled:"",onClick:function(){return ct(xt)}},xt.name)}))))},v=k,y=b("2qtc"),E=b("kLXV"),M=b("6UJt"),ue=b("DFOY"),I=b("wd/R"),ge=b.n(I),_e=b("jO45"),Ie=b("jN4g"),ze=b("gJ3r"),Be=b("8pgt"),Fe=b.n(Be),nt=function(Ze,Ae){return Ae.some(function(We){return We.label.toLowerCase().indexOf(Ze.toLowerCase())>-1})},pe=O.a.TextArea,De=function(Ze){var Ae=Ze.newCourse,We=Ze.globalSetting,ie=Ze.loading,W=Ze.dispatch,re=Ze.schoolName,x=Ze.onSuccess,T=x===void 0?function(){}:x,_=Object(ce.a)(Ze,["newCourse","globalSetting","loading","dispatch","schoolName","onSuccess"]),N=Q.a.useForm(),be=Object(Ce.a)(N,1),oe=be[0];Object(L.useEffect)(function(){oe.setFieldsValue({name:re})},[re]);var Xe=function(){var ot=Object(Ue.a)(ee.a.mark(function ut(at){var kt,St,ct,Ft,Lt,xt,wt;return ee.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return kt=at||{},St=kt.name,ct=kt.city,Ft=ct===void 0?[]:ct,Lt=kt.address,xt=kt.remarks,Bt.next=3,W({type:"newCourse/appplySchool",payload:{name:St,province:Ft[0],city:Ft[1],address:Lt,remarks:xt}});case 3:wt=Bt.sent,W({type:"newCourse/setActionTabs",payload:{}}),wt&&(Ne.b.success("\u65B0\u589E\u53D1\u5E03\u5355\u4F4D\u6210\u529F\uFF01"),T(St));case 6:case"end":return Bt.stop()}},ut)}));return function(at){return ot.apply(this,arguments)}}();return U.a.createElement(E.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ae.actionTabs.key==="NewCourse-AppplySchool",title:"\u7533\u8BF7\u53D1\u5E03\u5355\u4F4D",width:"600px",footer:null},U.a.createElement(Q.a,{className:Fe.a.formWrap,form:oe,labelCol:{span:4},wrapperCol:{span:20},onFinish:Xe},U.a.createElement(Q.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},U.a.createElement(O.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"})),U.a.createElement("div",{className:"".concat(Fe.a.flexRow," ").concat(Fe.a.example)},U.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),U.a.createElement("div",{className:Fe.a.flexColumn},U.a.createElement("div",null,U.a.createElement(_e.a,{style:{color:"rgb(82, 196, 26)"}}),U.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),U.a.createElement("div",null,U.a.createElement(Ie.a,{style:{color:"red"}}),U.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784",ge()().format("YYYY"),"\u6625")))),U.a.createElement(Q.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},U.a.createElement(ue.a,{allowClear:!0,size:"large",options:ze.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:nt}})),U.a.createElement(Q.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},U.a.createElement(O.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),U.a.createElement(Q.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},U.a.createElement(pe,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),U.a.createElement("div",{className:Fe.a.footerWrap},U.a.createElement(Q.a.Item,null,U.a.createElement(He.a,{className:"mr5",size:"large",onClick:function(){W({type:"newCourse/setActionTabs",payload:{}})}},"\u53D6\u6D88"),U.a.createElement(He.a,{size:"large",type:"primary",htmlType:"submit",loading:ie["newCourse/appplySchool"]},"\u4FDD\u5B58")))))},je=Object(ae.a)(function(et){var Ze=et.newCourse,Ae=et.loading,We=et.globalSetting;return{newCourse:Ze,globalSetting:We,loading:Ae.effects}})(De),Ke=O.a.TextArea,Ye=le.a.TreeNode,Ve=function(Ze){var Ae,We,ie=Ze.user,W=Ze.newCourse,re=Ze.globalSetting,x=Ze.loading,T=Ze.dispatch,_=Object(ce.a)(Ze,["user","newCourse","globalSetting","loading","dispatch"]),N=Q.a.useForm(),be=Object(Ce.a)(N,1),oe=be[0],Xe=Object(L.useState)({}),ot=Object(Ce.a)(Xe,2),ut=ot[0],at=ot[1],kt=Object(L.useState)(),St=Object(Ce.a)(kt,2),ct=St[0],Ft=St[1],Lt=Object(L.useRef)(),xt=Object(L.useState)(!0),wt=Object(Ce.a)(xt,2),Tt=wt[0],Bt=wt[1],qt=Object(L.useState)(!1),vt=Object(Ce.a)(qt,2),vn=vt[0],jt=vt[1],Zt=Object(L.useState)(),pn=Object(Ce.a)(Zt,2),en=pn[0],wn=pn[1],Pt=Object(L.useState)(!0),pt=Object(Ce.a)(Pt,2),on=pt[0],_n=pt[1],En=Object(L.useState)(!1),Rt=Object(Ce.a)(En,2),bn=Rt[0],un=Rt[1],ei=Object(L.useState)(!1),Qe=Object(Ce.a)(ei,2),Ot=Qe[0],Hn=Qe[1],zn=Object(L.useState)(-1),Yn=Object(Ce.a)(zn,2),Jn=Yn[0],d=Yn[1],o=Object(L.useState)(!0),a=Object(Ce.a)(o,2),u=a[0],h=a[1],c=Object(L.useState)([]),te=Object(Ce.a)(c,2),$e=te[0],it=te[1],st=Object(L.useState)([]),Ge=Object(Ce.a)(st,2),gt=Ge[0],ft=Ge[1],Nt=Object(L.useState)([]),cn=Object(Ce.a)(Nt,2),tn=cn[0],$t=cn[1],yn=Object(L.useState)([]),Kn=Object(Ce.a)(yn,2),mn=Kn[0],Vt=Kn[1];Object(L.useEffect)(function(){var Gt,Ct;dn(),Zn(),Lt.current=(Gt=_.match.params)===null||Gt===void 0?void 0:Gt.pathId,Ft(!!Lt.current),Object(p.V)(re==null||((Ct=re.setting)===null||Ct===void 0)?void 0:Ct.name),oe.setFieldsValue({learning_notes_title:"\u8BFE\u7A0B\u987B\u77E5"}),Lt.current&&gn()},[]);var dn=function(){var Gt=Object(Ue.a)(ee.a.mark(function Ct(){var lt;return ee.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Object(J.a)("/api/disciplines.json",{method:"get",params:{source:"subject"}});case 2:lt=nn.sent,$t(lt.disciplines);case 4:case"end":return nn.stop()}},Ct)}));return function(){return Gt.apply(this,arguments)}}(),Zn=function(){var Gt=Object(Ue.a)(ee.a.mark(function Ct(){var lt;return ee.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return h(!0),nn.next=3,T({type:"newCourse/getSchoolOption"});case 3:lt=nn.sent,h(!1),it(lt==null?void 0:lt.schools),ft(lt==null?void 0:lt.schools);case 7:case"end":return nn.stop()}},Ct)}));return function(){return Gt.apply(this,arguments)}}(),gn=function(){var Gt=Object(Ue.a)(ee.a.mark(function Ct(){var lt,An,nn,Vn,an,Wt,Sn,It,hn,zt,Gn,ln,Tn;return ee.a.wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:return ii.next=2,T({type:"newCourse/getEditCourseData",payload:{id:Lt.current}});case 2:lt=ii.sent,lt&&(Sn={name:lt.name,name_en:lt.name_en,intro:lt.description,content:lt==null||((An=lt.toast)===null||An===void 0)?void 0:An.content,notice:lt.learning_notes,school_id:lt==null?void 0:lt.school,learning_notes_title:lt.learning_notes_title||"\u8BFE\u7A0B\u987B\u77E5"},lt.disciplines&<.disciplines.length>0&&Vt(lt.disciplines),oe.setFieldsValue(Sn),Hn(lt==null||((nn=lt.toast)===null||nn===void 0)?void 0:nn.is_open),d(lt==null||((Vn=lt.toast)===null||Vn===void 0)?void 0:Vn.open_num),Bt(lt==null?void 0:lt.cust_seq),jt(lt==null?void 0:lt.show_spoc),un(lt==null?void 0:lt.show_history),_n(lt==null?void 0:lt.show_tag),(lt==null||((an=lt.attachments)===null||an===void 0)?void 0:an.length)>0&&wn([{uid:lt==null||((It=lt.attachments)===null||It===void 0||((hn=It[0])===null||hn===void 0))?void 0:hn.id,name:lt==null||((zt=lt.attachments)===null||zt===void 0||((Gn=zt[0])===null||Gn===void 0))?void 0:Gn.title,response:{id:lt==null||((ln=lt.attachments)===null||ln===void 0||((Tn=ln[0])===null||Tn===void 0))?void 0:Tn.id}}]),at({name:lt.name,intro:lt.description,notice:lt.learning_notes,content:lt==null||((Wt=lt.toast)===null||Wt===void 0)?void 0:Wt.content}));case 4:case"end":return ii.stop()}},Ct)}));return function(){return Gt.apply(this,arguments)}}(),ci=function(){var Gt=Object(Ue.a)(ee.a.mark(function Ct(lt){var An,nn,Vn,an,Wt,Sn,It,hn,zt,Gn,ln,Tn,bi,ii,di;return ee.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:if(Vn=lt||{},an=Vn.name,Wt=Vn.intro,Sn=Vn.notice,It=Vn.name_en,hn=Vn.learning_notes_title,zt=Vn.sub_discipline_ids,Gn=Vn.school_id,ln=ct?"newCourse/editCourse":"newCourse/submitCourse",Tn=!1,bi=null,$e.map(function(Ai){Gn===Ai.name&&(Tn=!0,bi=Ai.id)}),Tn){Ln.next=7;break}return Ln.abrupt("return",Ne.b.error("\u672A\u627E\u5230\u5305\u542B'".concat(Gn,"'\u7684\u53D1\u5E03\u5355\u4F4D")));case 7:return ii={id:Lt.current,name:an,name_en:It,description:Wt,learning_notes:Sn,cust_seq:Tt,show_spoc:vn,school_id:bi,show_tag:on,show_history:bn,learning_notes_title:hn,attachment_ids:[en==null||((An=en[0])===null||An===void 0||((nn=An.response)===null||nn===void 0))?void 0:nn.id],sub_discipline_ids:zt,subject_toast_attributes:{is_open:Ot,open_num:Jn,content:lt.content}},Ln.next=10,T({type:ln,payload:Object(fe.a)({},ii)});case 10:di=Ln.sent,(di==null?void 0:di.subject_id)&&ae.d.push("/paths/".concat(di.subject_id));case 12:case"end":return Ln.stop()}},Ct)}));return function(lt){return Gt.apply(this,arguments)}}(),Cn=function(){T({type:"newCourse/setActionTabs",payload:{key:"NewCourse-AppplySchool"}})},jn=function(Ct){Zn(),at(Object(fe.a)({},oe.getFieldsValue()))};return U.a.createElement("section",{className:m.a.bg},U.a.createElement("div",{className:m.a.titleWrap},U.a.createElement("span",null,ct?"\u7F16\u8F91":"\u521B\u5EFA","\u5B9E\u8DF5\u8BFE\u7A0B")),U.a.createElement(Q.a,{form:oe,className:m.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){var Ct=oe.getFieldsValue();"school_id"in Ct&&ft($e.filter(function(lt){return lt.name.includes(Ct.school_id)})),at(Object(fe.a)({},Ct))},onFinish:ci},U.a.createElement("div",{className:m.a.fieldWrap},U.a.createElement(Q.a.Item,{extra:U.a.createElement("div",{className:"tr c-grey-333 font12 mt3"},"".concat(((Ae=ut.name)===null||Ae===void 0?void 0:Ae.length)||0,"/60")),name:"name",label:"\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0"}]},U.a.createElement(Ke,{maxLength:60,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"})),U.a.createElement(Q.a.Item,{name:"name_en",label:"\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0:",rules:[{message:"\u8BF7\u8F93\u5165\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0"}]},U.a.createElement(O.a,{maxLength:200,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A",addonAfter:"".concat(((We=ut.name_en)===null||We===void 0?void 0:We.length)||0,"/200")})),U.a.createElement(Q.a.Item,{name:"sub_discipline_ids",label:"\u65B9\u5411&\u8BFE\u7A0B:"},U.a.createElement(v,{defaultValue:mn,dataSource:tn,onChange:function(Ct){return oe.setFieldsValue({sub_discipline_ids:Ct})}})),U.a.createElement(Q.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D",name:"school_id",wrapperCol:{span:24},extra:!u&&ut.school_id&&!($e!=null&&$e.find(function(Gt){return Gt.name===ut.school_id}))&&U.a.createElement("div",{className:m.a.schoolHintWrap},U.a.createElement("span",{className:m.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",ut.school_id,"\u201D\u7684\u53D1\u5E03\u5355\u4F4D\uFF0C"),U.a.createElement("span",{className:"".concat(m.a.color0152d9),onClick:Cn},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"}]},U.a.createElement(z.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D",showSearch:!0,options:gt==null?void 0:gt.map(function(Gt){return{value:Gt.name}})}))),U.a.createElement("div",{className:m.a.mdWrap},U.a.createElement(Q.a.Item,{name:"intro",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB"},{max:8e3,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB\u6700\u5927\u9650\u52368000\u4E2A\u5B57\u7B26"}]},U.a.createElement(K.a,{watch:!0,defaultValue:ut.intro}))),U.a.createElement("div",{className:m.a.mdWrap},U.a.createElement(ke.a,{align:"middle",className:"mb10 mt10"},U.a.createElement(B.a,null,U.a.createElement("span",{className:"c-red mr10"},"*")),U.a.createElement(B.a,{flex:"1"},U.a.createElement(Q.a.Item,{name:"learning_notes_title",label:"",style:{marginBottom:0},rules:[{required:!0,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898"},{max:15,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898\u6700\u5927\u9650\u523615\u4E2A\u5B57\u7B26"}]},U.a.createElement(O.a,{placeholder:"\u8BF7\u8F93\u5165"})))),U.a.createElement(Q.a.Item,{name:"notice",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},U.a.createElement(K.a,{insertTemp:"1",watch:!0,defaultValue:ut.notice}))),U.a.createElement("div",{className:m.a.mdWrap},U.a.createElement("div",{style:{display:"flex",alignItems:"center"}},U.a.createElement(j.a,{checked:Ot,style:{marginRight:11},onChange:function(Ct){Hn(Ct)}}),"\u8BFE\u7A0B\u63D0\u793A\uFF08\u8FDB\u5165\u8BFE\u7A0B\u8BE6\u60C5\u9875\uFF0C\u63D0\u793A\u5185\u5BB9\u4EE5\u5F39\u7A97\u7684\u5F62\u5F0F\u8FDB\u884C\u5C55\u793A\uFF09"),Ot&&U.a.createElement(Q.a.Item,{style:{marginTop:10},name:"content",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},U.a.createElement(K.a,{insertTemp:"1",watch:!0,defaultValue:ut.content})),Ot&&U.a.createElement("div",{style:{marginTop:20}},U.a.createElement("label",null,"\u63D0\u793A\u6B21\u6570\uFF1A"),U.a.createElement(V.a.Group,{value:Jn,onChange:function(Ct){d(Ct.target.value)}},U.a.createElement(V.a,{value:-1},"\u6BCF\u6B21"),U.a.createElement(V.a,{value:1},"\u4E00\u6B21")))),U.a.createElement("div",{className:m.a.mdWrap},U.a.createElement(F.a,{checked:Tt,onChange:function(Ct){Bt(Ct==null?void 0:Ct.target.checked)}},"\u5C55\u793A\u9ED8\u8BA4\u7AE0\u8282\u5E8F\u53F7\uFF08\u9009\u4E2D\u5219\u6309\u5E8F\u5C55\u793A\u6240\u7AE0\u8282\u5E8F\u53F7\uFF0C\u4E0D\u9009\u4E2D\u5219\u9690\u85CF\u9ED8\u8BA4\u6392\u5E8F\uFF09"),U.a.createElement("br",null),U.a.createElement(F.a,{style:{marginTop:"10px"},checked:vn,onChange:function(Ct){return jt(Ct==null?void 0:Ct.target.checked)}},"\u81EA\u9009\u5E76\u5C55\u793ASPOC\u8BFE\u5802\uFF08\u9009\u4E2D\u5219\u7ED9\u51FASPOC\u8BFE\u5802\u5C55\u793A\u533A\u57DF\uFF0C\u8BFE\u7A0B\u521B\u5EFA\u8005/\u5408\u4F5C\u8005\u53EF\u4EE5\u81EA\u4E3B\u6DFB\u52A0\u9700\u8981\u5C55\u793A\u7684\u8BFE\u5802\uFF09"),U.a.createElement("br",null),U.a.createElement(F.a,{style:{marginTop:"10px"},checked:on,onChange:function(Ct){return _n(Ct==null?void 0:Ct.target.checked)}},"\u5C55\u793A\u6280\u672F\u6807\u7B7E\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u6280\u80FD\u6807\u7B7E\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),U.a.createElement("br",null),U.a.createElement(F.a,{style:{marginTop:"10px"},checked:bn,onChange:function(Ct){return un(Ct==null?void 0:Ct.target.checked)}},"\u5C55\u793A\u5386\u53F2\u8BFE\u5802\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u5386\u53F2\u8BFE\u5802\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),U.a.createElement("br",null),U.a.createElement("div",{style:{display:"flex",marginTop:"10px"}},"\u81EA\u5B9A\u4E49\u9876\u90E8\u80CC\u666F\u56FE\uFF1A",U.a.createElement(Pe.a,{action:A.a.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:en,onChange:function(Ct){var lt,An=(Ct==null?void 0:Ct.file.size)/1024/1024<2;if(!((lt=Ct.fileList)!==null&<!==void 0&<.length))return!1;if(!An)wn(Object(Oe.a)(en));else{var nn;wn(Ct==null||((nn=Ct.fileList)===null||nn===void 0)?void 0:nn.slice(-1))}},beforeUpload:function(Ct){var lt=Ct.type==="image/jpeg"||Ct.type==="image/png";if(!lt)return Ne.b.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;var An=Ct.size/1024/1024<2;return An?lt&&An:(Ne.b.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:function(Ct){wn([])}},U.a.createElement(He.a,null,"\u4E0A\u4F20\u56FE\u7247"),"\uFF08 \u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81920*240\u50CF\u7D20\uFF09"))),U.a.createElement("div",{className:m.a.backgroundFa},U.a.createElement("div",{className:"pt40 mb30"},U.a.createElement(Q.a.Item,null,U.a.createElement(He.a,{size:"large",type:"primary",className:"".concat(m.a.button," mr20"),htmlType:"submit",loading:x["newCourse/editCourse"]||x["newCourse/submitCourse"]},"\u63D0\u4EA4"),U.a.createElement(He.a,{size:"large",type:"primary",ghost:!0,className:m.a.button,onClick:function(){return ae.d.push(ct?"/paths/".concat(Lt.current):"/paths")}},"\u53D6\u6D88"))))),U.a.createElement(je,{schoolName:ut.school_id,onSuccess:jn}))},xe=qe.default=Object(ae.a)(function(et){var Ze=et.user,Ae=et.newCourse,We=et.loading,ie=et.globalSetting;return{user:Ze,newCourse:Ae,globalSetting:ie,loading:We.effects}})(Ve)},XIdC:function(yt,qe,b){"use strict";var Z=b("rePB"),Pe=b("ODXe"),Le=b("Ff2n"),He=b("q1tI"),Oe=b.n(He),ye=b("TSYQ"),F=b.n(ye),q=b("6cGi"),V=b("4IlW"),se=He.forwardRef(function(j,Y){var ke,de=j.prefixCls,B=de===void 0?"rc-switch":de,X=j.className,z=j.checked,fe=j.defaultChecked,he=j.disabled,Ne=j.loadingIcon,Ue=j.checkedChildren,we=j.unCheckedChildren,Q=j.onClick,Ce=j.onChange,ce=j.onKeyDown,P=Object(Le.a)(j,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),le=Object(q.a)(!1,{value:z,defaultValue:fe}),$=Object(Pe.a)(le,2),O=$[0],me=$[1];function ee(K,G){var m=O;return he||(m=K,me(m),Ce==null||Ce(m,G)),m}function L(K){K.which===V.a.LEFT?ee(!1,K):K.which===V.a.RIGHT&&ee(!0,K),ce==null||ce(K)}function U(K){var G=ee(!O,K);Q==null||Q(G,K)}var ae=F()(B,X,(ke={},Object(Z.a)(ke,"".concat(B,"-checked"),O),Object(Z.a)(ke,"".concat(B,"-disabled"),he),ke));return He.createElement("button",Object.assign({},P,{type:"button",role:"switch","aria-checked":O,disabled:he,className:ae,ref:Y,onKeyDown:L,onClick:U}),Ne,He.createElement("span",{className:"".concat(B,"-inner")},O?Ue:we))});se.displayName="Switch",qe.a=se},Y1PL:function(yt,qe,b){"use strict";b.r(qe),b.d(qe,"ResizableTextArea",function(){return ve});var Z=b("wx14"),Pe=b("1OyB"),Le=b("vuIU"),He=b("Ji7U"),Oe=b("LK+K"),ye=b("q1tI"),F=b("VTBJ"),q=b("rePB"),V=b("Zm9Q"),se=b("Kwbf"),j=b("c+Xe"),Y=b("m+aA"),ke=b("bdgK"),de=new Map;function B(Te){Te.forEach(function(R){var w,D=R.target;(w=de.get(D))===null||w===void 0||w.forEach(function(S){return S(D)})})}var X=new ke.default(B),z=null,fe=null;function he(Te,R){de.has(Te)||(de.set(Te,new Set),X.observe(Te)),de.get(Te).add(R)}function Ne(Te,R){de.has(Te)&&(de.get(Te).delete(R),de.get(Te).size||(X.unobserve(Te),de.delete(Te)))}var Ue=function(Te){Object(He.a)(w,Te);var R=Object(Oe.a)(w);function w(){return Object(Pe.a)(this,w),R.apply(this,arguments)}return Object(Le.a)(w,[{key:"render",value:function(){return this.props.children}}]),w}(ye.Component),we=ye.createContext(null);function Q(Te){var R=Te.children,w=Te.onBatchResize,D=ye.useRef(0),S=ye.useRef([]),k=ye.useContext(we),v=ye.useCallback(function(y,E,M){D.current+=1;var ue=D.current;S.current.push({size:y,element:E,data:M}),Promise.resolve().then(function(){ue===D.current&&(w==null||w(S.current),S.current=[])}),k==null||k(y,E,M)},[w,k]);return ye.createElement(we.Provider,{value:v},R)}function Ce(Te){var R=Te.children,w=Te.disabled,D=ye.useRef(null),S=ye.useRef(null),k=ye.useContext(we),v=ye.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),y=ye.isValidElement(R)&&Object(j.c)(R),E=y?R.ref:null,M=ye.useMemo(function(){return Object(j.a)(E,D)},[E,D]),ue=ye.useRef(Te);ue.current=Te;var I=ye.useCallback(function(ge){var _e=ue.current,Ie=_e.onResize,ze=_e.data,Be=ge.getBoundingClientRect(),Fe=Be.width,nt=Be.height,pe=ge.offsetWidth,De=ge.offsetHeight,je=Math.floor(Fe),Ke=Math.floor(nt);if(v.current.width!==je||v.current.height!==Ke||v.current.offsetWidth!==pe||v.current.offsetHeight!==De){var Ye={width:je,height:Ke,offsetWidth:pe,offsetHeight:De};v.current=Ye;var Ve=pe===Math.round(Fe)?Fe:pe,xe=De===Math.round(nt)?nt:De,et=Object(F.a)(Object(F.a)({},Ye),{},{offsetWidth:Ve,offsetHeight:xe});k==null||k(et,ge,ze),Ie&&Promise.resolve().then(function(){Ie(et,ge)})}},[]);return ye.useEffect(function(){var ge=Object(Y.a)(D.current)||Object(Y.a)(S.current);return ge&&!w&&he(ge,I),function(){return Ne(ge,I)}},[D.current,w]),ye.createElement(Ue,{ref:S},y?ye.cloneElement(R,{ref:M}):R)}var ce="rc-observer-key";function P(Te){var R=Te.children,w=Object(V.a)(R);return w.map(function(D,S){var k=(D==null?void 0:D.key)||"".concat(ce,"-").concat(S);return ye.createElement(Ce,Object(Z.a)({},Te,{key:k}),D)})}P.Collection=Q;var le=P,$=b("bT9E"),O=b("TSYQ"),me=b.n(O),ee=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,L=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],U={},ae;function K(Te){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=Te.getAttribute("id")||Te.getAttribute("data-reactid")||Te.getAttribute("name");if(R&&U[w])return U[w];var D=window.getComputedStyle(Te),S=D.getPropertyValue("box-sizing")||D.getPropertyValue("-moz-box-sizing")||D.getPropertyValue("-webkit-box-sizing"),k=parseFloat(D.getPropertyValue("padding-bottom"))+parseFloat(D.getPropertyValue("padding-top")),v=parseFloat(D.getPropertyValue("border-bottom-width"))+parseFloat(D.getPropertyValue("border-top-width")),y=L.map(function(M){return"".concat(M,":").concat(D.getPropertyValue(M))}).join(";"),E={sizingStyle:y,paddingSize:k,borderSize:v,boxSizing:S};return R&&w&&(U[w]=E),E}function G(Te){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ae||(ae=document.createElement("textarea"),ae.setAttribute("tab-index","-1"),ae.setAttribute("aria-hidden","true"),document.body.appendChild(ae)),Te.getAttribute("wrap")?ae.setAttribute("wrap",Te.getAttribute("wrap")):ae.removeAttribute("wrap");var S=K(Te,R),k=S.paddingSize,v=S.borderSize,y=S.boxSizing,E=S.sizingStyle;ae.setAttribute("style","".concat(E,";").concat(ee)),ae.value=Te.value||Te.placeholder||"";var M=Number.MIN_SAFE_INTEGER,ue=Number.MAX_SAFE_INTEGER,I=ae.scrollHeight,ge;if(y==="border-box"?I+=v:y==="content-box"&&(I-=k),w!==null||D!==null){ae.value=" ";var _e=ae.scrollHeight-k;w!==null&&(M=_e*w,y==="border-box"&&(M=M+k+v),I=Math.max(M,I)),D!==null&&(ue=_e*D,y==="border-box"&&(ue=ue+k+v),ge=I>ue?"":"hidden",I=Math.min(ue,I))}return{height:I,minHeight:M,maxHeight:ue,overflowY:ge,resize:"none"}}var m=b("Gytx"),p=b.n(m),A;(function(Te){Te[Te.NONE=0]="NONE",Te[Te.RESIZING=1]="RESIZING",Te[Te.RESIZED=2]="RESIZED"})(A||(A={}));var J=function(Te){Object(He.a)(w,Te);var R=Object(Oe.a)(w);function w(D){var S;return Object(Pe.a)(this,w),S=R.call(this,D),S.nextFrameActionId=void 0,S.resizeFrameId=void 0,S.textArea=void 0,S.saveTextArea=function(k){S.textArea=k},S.handleResize=function(k){var v=S.state.resizeStatus,y=S.props,E=y.autoSize,M=y.onResize;if(v!==A.NONE)return;typeof M=="function"&&M(k),E&&S.resizeOnNextFrame()},S.resizeOnNextFrame=function(){cancelAnimationFrame(S.nextFrameActionId),S.nextFrameActionId=requestAnimationFrame(S.resizeTextarea)},S.resizeTextarea=function(){var k=S.props.autoSize;if(!k||!S.textArea)return;var v=k.minRows,y=k.maxRows,E=G(S.textArea,!1,v,y);S.setState({textareaStyles:E,resizeStatus:A.RESIZING},function(){cancelAnimationFrame(S.resizeFrameId),S.resizeFrameId=requestAnimationFrame(function(){S.setState({resizeStatus:A.RESIZED},function(){S.resizeFrameId=requestAnimationFrame(function(){S.setState({resizeStatus:A.NONE}),S.fixFirefoxAutoScroll()})})})})},S.renderTextArea=function(){var k=S.props,v=k.prefixCls,y=v===void 0?"rc-textarea":v,E=k.autoSize,M=k.onResize,ue=k.className,I=k.disabled,ge=S.state,_e=ge.textareaStyles,Ie=ge.resizeStatus,ze=Object($.a)(S.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Be=me()(y,ue,Object(q.a)({},"".concat(y,"-disabled"),I));"value"in ze&&(ze.value=ze.value||"");var Fe=Object(F.a)(Object(F.a)(Object(F.a)({},S.props.style),_e),Ie===A.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ye.createElement(le,{onResize:S.handleResize,disabled:!(E||M)},ye.createElement("textarea",Object(Z.a)({},ze,{className:Be,style:Fe,ref:S.saveTextArea})))},S.state={textareaStyles:{},resizeStatus:A.NONE},S}return Object(Le.a)(w,[{key:"componentDidUpdate",value:function(S){(S.value!==this.props.value||!p()(S.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 S=this.textArea.selectionStart,k=this.textArea.selectionEnd;this.textArea.setSelectionRange(S,k)}}catch(v){}}},{key:"render",value:function(){return this.renderTextArea()}}]),w}(ye.Component),ve=J,Re=function(Te){Object(He.a)(w,Te);var R=Object(Oe.a)(w);function w(D){var S;Object(Pe.a)(this,w),S=R.call(this,D),S.resizableTextArea=void 0,S.focus=function(){S.resizableTextArea.textArea.focus()},S.saveTextArea=function(v){S.resizableTextArea=v},S.handleChange=function(v){var y=S.props.onChange;S.setValue(v.target.value,function(){S.resizableTextArea.resizeTextarea()}),y&&y(v)},S.handleKeyDown=function(v){var y=S.props,E=y.onPressEnter,M=y.onKeyDown;v.keyCode===13&&E&&E(v),M&&M(v)};var k=typeof D.value=="undefined"||D.value===null?D.defaultValue:D.value;return S.state={value:k},S}return Object(Le.a)(w,[{key:"setValue",value:function(S,k){"value"in this.props||this.setState({value:S},k)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ye.createElement(ve,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(S){return"value"in S?{value:S.value}:null}}]),w}(ye.Component),Se=qe.default=Re},YNHc:function(yt,qe,b){yt.exports={cascaderContainer:"cascaderContainer___3XtEo",valueWrap:"valueWrap___3ID8a",valueItem:"valueItem___yKIZs",placeholder:"placeholder___MxiA7",modalWrap:"modalWrap___1ge9B",left:"left___10iyZ",right:"right___KVnmg",disabled:"disabled___2c8qt",emptyWrap:"emptyWrap___dYSJ0"}},ZW9T:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Ue});var Z=b("k1fw"),Pe=b("miYZ"),Le=b("tsqr"),He=b("rAM+"),Oe=b("tJVT"),ye=b("PpiC"),F=b("q1tI"),q=b.n(F),V=b("bdgK");function se(we,Q,Ce,ce,P){var le=Q.getWordUntilPosition(Ce),$={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:le.startColumn,endColumn:le.endColumn},O=ce.map(function(me){return{label:me,kind:we.languages.CompletionItemKind.Keyword,insertText:me,insertTextRules:we.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$}});return P.map(function(me){O.push(Object(Z.a)(Object(Z.a)({},me),{},{range:$}))}),O}var j=function(we){var Q={label:"ifelse",kind:we.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:we.languages.CompletionItemInsertTextRule.InsertAsSnippet},Ce=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];we.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function($,O){var me=se(we,$,O,Ce,[Q]);return{suggestions:me}}});var ce=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];we.languages.registerCompletionItemProvider("python",{provideCompletionItems:function($,O){var me=[{label:"print",kind:we.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:we.languages.CompletionItemInsertTextRule.InsertAsSnippet}],ee=se(we,$,O,ce,me);return{suggestions:ee}}});var P=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];we.languages.registerCompletionItemProvider("java",{provideCompletionItems:function($,O){var me=[Q,{label:"main",kind:we.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:we.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:we.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:we.languages.CompletionItemInsertTextRule.InsertAsSnippet}],ee=se(we,$,O,P,me);return{suggestions:ee}}})},Y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ke=b("LvDl");function de(we){return/^\d+$/.test(we)?"".concat(we,"px"):we}function B(){}var X=!1,z={"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 fe(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=we;if(Array.isArray(we)){for(var Ce=0;Ce<we.length;Ce++){var ce=z[we[Ce]];if(ce)return ce}return Q[0]}return z[Q]||Q}var he=null,Ne=qe.b=function(we){var Q=we.width,Ce=Q===void 0?"100%":Q,ce=we.height,P=ce===void 0?"100%":ce,le=we.value,$=we.language,O=$===void 0?"javascript":$,me=we.style,ee=me===void 0?{}:me,L=we.options,U=L===void 0?{}:L,ae=we.overrideServices,K=ae===void 0?{}:ae,G=we.theme,m=G===void 0?"vs-dark":G,p=we.onEditBlur,A=we.onSave,J=we.autoHeight,ve=J===void 0?!1:J,Re=we.forbidCopy,Se=Re===void 0?!1:Re,Te=we.onChange,R=Te===void 0?B:Te,w=we.editorDidMount,D=w===void 0?B:w,S=we.onFocus,k=S===void 0?B:S,v=we.filename,y=v===void 0?"educoder.txt":v,E=Object(ye.a)(we,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),M=Object(F.useRef)(),ue=Object(F.useRef)({}),I=Object(F.useRef)(),ge=Object(F.useRef)(!1),_e=Object(F.useRef)(),Ie=Object(F.useState)(!1),ze=Object(Oe.a)(Ie,2),Be=ze[0],Fe=ze[1];function nt(){var _;return M.current&&(_=new V.default(function(N){var be=Object(He.a)(N),oe;try{for(be.s();!(oe=be.n()).done;){var Xe=oe.value;(Xe.target.offsetHeight>0||Xe.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(ot){be.e(ot)}finally{be.f()}}),_.observe(M.current)),_}function pe(){Le.b.warn(decodeURIComponent(Y))}var De=function(){var N=ue.current.instance;if(le!=null&&N&&Be){var be=N.getModel();be&&le!==be.getValue()&&(X=!0,be.setValue(le),N.layout(),X=!1)}};Object(F.useEffect)(function(){I.current&&clearTimeout(I.current),I.current=setTimeout(function(){De()},500)},[le,Be,ue.current]);function je(){var _=ue.current.instance;if(_){var N=_.getSelection(),be=ue.current.pastePos||{},oe=new he.Range(be.startLineNumber||N.endLineNumber,be.startColumn||N.endColumn,be.endLineNumber||N.endLineNumber,be.endColumn||N.endColumn);setTimeout(function(){_.executeEdits("",[{range:oe,text:""}])},300)}}function Ke(_){(window.navigator.platform.match("Mac")?_.metaKey:_.ctrlKey)&&_.keyCode==83&&(_.preventDefault(),A())}var Ye=function(){if(ve&&ue.current.instance){var N=ue.current.instance.getContentHeight();x(N<P?P:N)}else x(P)};function Ve(_){var N=document.createEvent("MouseEvents");N.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_.dispatchEvent(N)}function xe(_,N){var be=window.URL||window.webkitURL||window,oe=new Blob([N]),Xe=document.createElementNS("http://www.w3.org/1999/xhtml","a");Xe.href=be.createObjectURL(oe),Xe.download=_,Ve(Xe)}Object(F.useEffect)(function(){Ye()},[Ye]),Object(F.useEffect)(function(){M.current&&!Be&&b.e(27).then(b.t.bind(null,"M/lh",7)).then(function(_){try{he=_,ue.current.instance=he.editor.create(M.current,{value:le,language:fe(O),theme:m,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},K);var N=ue.current.instance;if(D(N,he),setTimeout(function(){Ye(),ue.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xe(y||"educoder.txt",N.getValue())}})},500),ue.current.subscription=N.onDidChangeModelContent(function(oe){ge.current?clearTimeout(_e.current):(Ye(),R(N.getValue(),oe)),_e.current=setTimeout(function(){ge.current=!1},500)}),window.Monaco||j(he),Se&&(N.addCommand(he.KeyMod.CtrlCmd|he.KeyMod.Shift|he.KeyCode.KEY_V,function(){return pe(),null}),N.addCommand(he.KeyMod.CtrlCmd|he.KeyCode.KEY_C,function(){return pe(),null})),window.Monaco=he,p&&N.onDidBlurEditorWidget(function(){p(N.getValue())}),k&&N.onDidFocusEditorText(function(){k(N.getValue())}),Se){N.addCommand(he.KeyMod.CtrlCmd|he.KeyCode.KEY_V,function(){return pe(),null}),N.onDidPaste(function(oe){ue.current.pastePos=oe});try{window.addEventListener("paste",je)}catch(oe){}}var be=nt();return Fe(!0),function(){var oe=ue.current.instance;oe.dispose();var Xe=oe.getModel();Xe&&Xe.dispose(),ue.current.subscription&&ue.current.subscription.dispose(),Se&&window.removeEventListener("paste",je),be.unobserve(M.current)}}catch(oe){}})},[]),Object(F.useEffect)(function(){var _=ue.current.instance;if(_&&Be)return document.addEventListener("keydown",Ke,!1),function(){document.removeEventListener("keydown",Ke)}},[A,Be]),Object(F.useEffect)(function(){var _=ue.current.instance;if(_&&Be){var N=fe(O);he.editor.setModelLanguage(_.getModel(),N),console.log("language:",O,_.getModel(),N)}},[O,Be]),Object(F.useEffect)(function(){var _=ue.current.instance;_&&Be&&he.editor.setTheme(m)},[m,Be]),Object(F.useEffect)(function(){var _=ue.current.instance;_&&Be&&(_.updateOptions(Object(Z.a)({},U)),setTimeout(function(){_.getModel().updateOptions(Object(Z.a)({},U))},200))},[JSON.stringify(U),Be]),Object(F.useEffect)(function(){var _=ue.current.instance;_&&Be&&_.layout()},[Ce,P,Be]);var et=Object(F.useState)(de(Ce)),Ze=Object(Oe.a)(et,2),Ae=Ze[0],We=Ze[1],ie=Object(F.useState)(de(P)),W=Object(Oe.a)(ie,2),re=W[0],x=W[1],T=Object(Z.a)(Object(Z.a)({},ee),{},{width:Ae,height:re});return q.a.createElement("div",{className:"my-monaco-editor",ref:M,style:T})};function Ue(we){var Q=we.width,Ce=Q===void 0?"100%":Q,ce=we.height,P=ce===void 0?"100%":ce,le=we.original,$=we.modified,O=we.language,me=we.options,ee=me===void 0?{}:me,L=Object(F.useRef)(),U=Object(F.useState)(null),ae=Object(Oe.a)(U,2),K=ae[0],G=ae[1];function m(ve){var Re;return L.current&&(Re=new V.default(function(Se){var Te=Object(He.a)(Se),R;try{for(Te.s();!(R=Te.n()).done;){var w=R.value;(w.target.offsetHeight>0||w.target.offsetWidth>0)&&ve.layout()}}catch(D){Te.e(D)}finally{Te.f()}}),Re.observe(L.current)),Re}Object(F.useEffect)(function(){L.current&&b.e(27).then(b.t.bind(null,"M/lh",7)).then(function(ve){he=ve;var Re=he.editor.createDiffEditor(L.current,Object(Z.a)(Object(Z.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},ee),{},{wordWrap:!0}));G(Re);var Se=m(Re);return function(){Re.dispose();var Te=Re.getModel();Te&&Te.dispose(),Se.unobserve(L.current)}})},[]),Object(F.useEffect)(function(){K&&K.setModel({original:he.editor.createModel(le,O),modified:he.editor.createModel($,O)})},[le,$,O,K]);var p=de(Ce),A=de(P),J={width:p,height:A};return q.a.createElement("div",{className:"my-diff-editor",ref:L,style:J})}},ZpRC:function(yt,qe,b){"use strict";function Z(j){return typeof j=="object"&&j!=null&&j.nodeType===1}function Pe(j,Y){return(!Y||j!=="hidden")&&j!=="visible"&&j!=="clip"}function Le(j,Y){if(j.clientHeight<j.scrollHeight||j.clientWidth<j.scrollWidth){var ke=getComputedStyle(j,null);return Pe(ke.overflowY,Y)||Pe(ke.overflowX,Y)||function(de){var B=function(X){if(!X.ownerDocument||!X.ownerDocument.defaultView)return null;try{return X.ownerDocument.defaultView.frameElement}catch(z){return null}}(de);return!!B&&(B.clientHeight<de.scrollHeight||B.clientWidth<de.scrollWidth)}(j)}return!1}function He(j,Y,ke,de,B,X,z,fe){return X<j&&z>Y||X>j&&z<Y?0:X<=j&&fe<=ke||z>=Y&&fe>=ke?X-j-de:z>Y&&fe<ke||X<j&&fe>ke?z-Y+B:0}var Oe=function(j,Y){var ke=window,de=Y.scrollMode,B=Y.block,X=Y.inline,z=Y.boundary,fe=Y.skipOverflowHiddenElements,he=typeof z=="function"?z:function(_e){return _e!==z};if(!Z(j))throw new TypeError("Invalid target");for(var Ne=document.scrollingElement||document.documentElement,Ue=[],we=j;Z(we)&&he(we);){if((we=we.parentElement)===Ne){Ue.push(we);break}we!=null&&we===document.body&&Le(we)&&!Le(document.documentElement)||we!=null&&Le(we,fe)&&Ue.push(we)}for(var Q=ke.visualViewport?ke.visualViewport.width:innerWidth,Ce=ke.visualViewport?ke.visualViewport.height:innerHeight,ce=window.scrollX||pageXOffset,P=window.scrollY||pageYOffset,le=j.getBoundingClientRect(),$=le.height,O=le.width,me=le.top,ee=le.right,L=le.bottom,U=le.left,ae=B==="start"||B==="nearest"?me:B==="end"?L:me+$/2,K=X==="center"?U+O/2:X==="end"?ee:U,G=[],m=0;m<Ue.length;m++){var p=Ue[m],A=p.getBoundingClientRect(),J=A.height,ve=A.width,Re=A.top,Se=A.right,Te=A.bottom,R=A.left;if(de==="if-needed"&&me>=0&&U>=0&&L<=Ce&&ee<=Q&&me>=Re&&L<=Te&&U>=R&&ee<=Se)return G;var w=getComputedStyle(p),D=parseInt(w.borderLeftWidth,10),S=parseInt(w.borderTopWidth,10),k=parseInt(w.borderRightWidth,10),v=parseInt(w.borderBottomWidth,10),y=0,E=0,M="offsetWidth"in p?p.offsetWidth-p.clientWidth-D-k:0,ue="offsetHeight"in p?p.offsetHeight-p.clientHeight-S-v:0;if(Ne===p)y=B==="start"?ae:B==="end"?ae-Ce:B==="nearest"?He(P,P+Ce,Ce,S,v,P+ae,P+ae+$,$):ae-Ce/2,E=X==="start"?K:X==="center"?K-Q/2:X==="end"?K-Q:He(ce,ce+Q,Q,D,k,ce+K,ce+K+O,O),y=Math.max(0,y+P),E=Math.max(0,E+ce);else{y=B==="start"?ae-Re-S:B==="end"?ae-Te+v+ue:B==="nearest"?He(Re,Te,J,S,v+ue,ae,ae+$,$):ae-(Re+J/2)+ue/2,E=X==="start"?K-R-D:X==="center"?K-(R+ve/2)+M/2:X==="end"?K-Se+k+M:He(R,Se,ve,D,k+M,K,K+O,O);var I=p.scrollLeft,ge=p.scrollTop;ae+=ge-(y=Math.max(0,Math.min(ge+y,p.scrollHeight-J+ue))),K+=I-(E=Math.max(0,Math.min(I+E,p.scrollWidth-ve+M)))}G.push({el:p,top:y,left:E})}return G};function ye(j){return j===Object(j)&&Object.keys(j).length!==0}function F(j,Y){Y===void 0&&(Y="auto");var ke="scrollBehavior"in document.body.style;j.forEach(function(de){var B=de.el,X=de.top,z=de.left;B.scroll&&ke?B.scroll({top:X,left:z,behavior:Y}):(B.scrollTop=X,B.scrollLeft=z)})}function q(j){return j===!1?{block:"end",inline:"nearest"}:ye(j)?j:{block:"start",inline:"nearest"}}function V(j,Y){var ke=!j.ownerDocument.documentElement.contains(j);if(ye(Y)&&typeof Y.behavior=="function")return Y.behavior(ke?[]:Oe(j,Y));if(ke)return;var de=q(Y);return F(Oe(j,de),de.behavior)}var se=qe.a=V},Zss7:function(yt,qe,b){var Z;(function(Pe){var Le=/^\s+/,He=/\s+$/,Oe=0,ye=Pe.round,F=Pe.min,q=Pe.max,V=Pe.random;function se(v,y){if(v=v||"",y=y||{},v instanceof se)return v;if(!(this instanceof se))return new se(v,y);var E=j(v);this._originalInput=v,this._r=E.r,this._g=E.g,this._b=E.b,this._a=E.a,this._roundA=ye(100*this._a)/100,this._format=y.format||E.format,this._gradientType=y.gradientType,this._r<1&&(this._r=ye(this._r)),this._g<1&&(this._g=ye(this._g)),this._b<1&&(this._b=ye(this._b)),this._ok=E.ok,this._tc_id=Oe++}se.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 v=this.toRgb();return(v.r*299+v.g*587+v.b*114)/1e3},getLuminance:function(){var v=this.toRgb(),y,E,M,ue,I,ge;return y=v.r/255,E=v.g/255,M=v.b/255,y<=.03928?ue=y/12.92:ue=Pe.pow((y+.055)/1.055,2.4),E<=.03928?I=E/12.92:I=Pe.pow((E+.055)/1.055,2.4),M<=.03928?ge=M/12.92:ge=Pe.pow((M+.055)/1.055,2.4),.2126*ue+.7152*I+.0722*ge},setAlpha:function(v){return this._a=G(v),this._roundA=ye(100*this._a)/100,this},toHsv:function(){var v=B(this._r,this._g,this._b);return{h:v.h*360,s:v.s,v:v.v,a:this._a}},toHsvString:function(){var v=B(this._r,this._g,this._b),y=ye(v.h*360),E=ye(v.s*100),M=ye(v.v*100);return this._a==1?"hsv("+y+", "+E+"%, "+M+"%)":"hsva("+y+", "+E+"%, "+M+"%, "+this._roundA+")"},toHsl:function(){var v=ke(this._r,this._g,this._b);return{h:v.h*360,s:v.s,l:v.l,a:this._a}},toHslString:function(){var v=ke(this._r,this._g,this._b),y=ye(v.h*360),E=ye(v.s*100),M=ye(v.l*100);return this._a==1?"hsl("+y+", "+E+"%, "+M+"%)":"hsla("+y+", "+E+"%, "+M+"%, "+this._roundA+")"},toHex:function(v){return z(this._r,this._g,this._b,v)},toHexString:function(v){return"#"+this.toHex(v)},toHex8:function(v){return fe(this._r,this._g,this._b,this._a,v)},toHex8String:function(v){return"#"+this.toHex8(v)},toRgb:function(){return{r:ye(this._r),g:ye(this._g),b:ye(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+ye(this._r)+", "+ye(this._g)+", "+ye(this._b)+")":"rgba("+ye(this._r)+", "+ye(this._g)+", "+ye(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:ye(m(this._r,255)*100)+"%",g:ye(m(this._g,255)*100)+"%",b:ye(m(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+ye(m(this._r,255)*100)+"%, "+ye(m(this._g,255)*100)+"%, "+ye(m(this._b,255)*100)+"%)":"rgba("+ye(m(this._r,255)*100)+"%, "+ye(m(this._g,255)*100)+"%, "+ye(m(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ae[z(this._r,this._g,this._b,!0)]||!1},toFilter:function(v){var y="#"+he(this._r,this._g,this._b,this._a),E=y,M=this._gradientType?"GradientType = 1, ":"";if(v){var ue=se(v);E="#"+he(ue._r,ue._g,ue._b,ue._a)}return"progid:DXImageTransform.Microsoft.gradient("+M+"startColorstr="+y+",endColorstr="+E+")"},toString:function(v){var y=!!v;v=v||this._format;var E=!1,M=this._a<1&&this._a>=0,ue=!y&&M&&(v==="hex"||v==="hex6"||v==="hex3"||v==="hex4"||v==="hex8"||v==="name");return ue?v==="name"&&this._a===0?this.toName():this.toRgbString():(v==="rgb"&&(E=this.toRgbString()),v==="prgb"&&(E=this.toPercentageRgbString()),(v==="hex"||v==="hex6")&&(E=this.toHexString()),v==="hex3"&&(E=this.toHexString(!0)),v==="hex4"&&(E=this.toHex8String(!0)),v==="hex8"&&(E=this.toHex8String()),v==="name"&&(E=this.toName()),v==="hsl"&&(E=this.toHslString()),v==="hsv"&&(E=this.toHsvString()),E||this.toHexString())},clone:function(){return se(this.toString())},_applyModification:function(v,y){var E=v.apply(null,[this].concat([].slice.call(y)));return this._r=E._r,this._g=E._g,this._b=E._b,this.setAlpha(E._a),this},lighten:function(){return this._applyModification(Q,arguments)},brighten:function(){return this._applyModification(Ce,arguments)},darken:function(){return this._applyModification(ce,arguments)},desaturate:function(){return this._applyModification(Ne,arguments)},saturate:function(){return this._applyModification(Ue,arguments)},greyscale:function(){return this._applyModification(we,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(v,y){return v.apply(null,[this].concat([].slice.call(y)))},analogous:function(){return this._applyCombination(ee,arguments)},complement:function(){return this._applyCombination(le,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(me,arguments)},triad:function(){return this._applyCombination($,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},se.fromRatio=function(v,y){if(typeof v=="object"){var E={};for(var M in v)v.hasOwnProperty(M)&&(M==="a"?E[M]=v[M]:E[M]=Se(v[M]));v=E}return se(v,y)};function j(v){var y={r:0,g:0,b:0},E=1,M=null,ue=null,I=null,ge=!1,_e=!1;return typeof v=="string"&&(v=S(v)),typeof v=="object"&&(D(v.r)&&D(v.g)&&D(v.b)?(y=Y(v.r,v.g,v.b),ge=!0,_e=String(v.r).substr(-1)==="%"?"prgb":"rgb"):D(v.h)&&D(v.s)&&D(v.v)?(M=Se(v.s),ue=Se(v.v),y=X(v.h,M,ue),ge=!0,_e="hsv"):D(v.h)&&D(v.s)&&D(v.l)&&(M=Se(v.s),I=Se(v.l),y=de(v.h,M,I),ge=!0,_e="hsl"),v.hasOwnProperty("a")&&(E=v.a)),E=G(E),{ok:ge,format:v.format||_e,r:F(255,q(y.r,0)),g:F(255,q(y.g,0)),b:F(255,q(y.b,0)),a:E}}function Y(v,y,E){return{r:m(v,255)*255,g:m(y,255)*255,b:m(E,255)*255}}function ke(v,y,E){v=m(v,255),y=m(y,255),E=m(E,255);var M=q(v,y,E),ue=F(v,y,E),I,ge,_e=(M+ue)/2;if(M==ue)I=ge=0;else{var Ie=M-ue;ge=_e>.5?Ie/(2-M-ue):Ie/(M+ue);switch(M){case v:I=(y-E)/Ie+(y<E?6:0);break;case y:I=(E-v)/Ie+2;break;case E:I=(v-y)/Ie+4;break}I/=6}return{h:I,s:ge,l:_e}}function de(v,y,E){var M,ue,I;v=m(v,360),y=m(y,100),E=m(E,100);function ge(ze,Be,Fe){return Fe<0&&(Fe+=1),Fe>1&&(Fe-=1),Fe<1/6?ze+(Be-ze)*6*Fe:Fe<1/2?Be:Fe<2/3?ze+(Be-ze)*(2/3-Fe)*6:ze}if(y===0)M=ue=I=E;else{var _e=E<.5?E*(1+y):E+y-E*y,Ie=2*E-_e;M=ge(Ie,_e,v+1/3),ue=ge(Ie,_e,v),I=ge(Ie,_e,v-1/3)}return{r:M*255,g:ue*255,b:I*255}}function B(v,y,E){v=m(v,255),y=m(y,255),E=m(E,255);var M=q(v,y,E),ue=F(v,y,E),I,ge,_e=M,Ie=M-ue;if(ge=M===0?0:Ie/M,M==ue)I=0;else{switch(M){case v:I=(y-E)/Ie+(y<E?6:0);break;case y:I=(E-v)/Ie+2;break;case E:I=(v-y)/Ie+4;break}I/=6}return{h:I,s:ge,v:_e}}function X(v,y,E){v=m(v,360)*6,y=m(y,100),E=m(E,100);var M=Pe.floor(v),ue=v-M,I=E*(1-y),ge=E*(1-ue*y),_e=E*(1-(1-ue)*y),Ie=M%6,ze=[E,ge,I,I,_e,E][Ie],Be=[_e,E,E,ge,I,I][Ie],Fe=[I,I,_e,E,E,ge][Ie];return{r:ze*255,g:Be*255,b:Fe*255}}function z(v,y,E,M){var ue=[Re(ye(v).toString(16)),Re(ye(y).toString(16)),Re(ye(E).toString(16))];return M&&ue[0].charAt(0)==ue[0].charAt(1)&&ue[1].charAt(0)==ue[1].charAt(1)&&ue[2].charAt(0)==ue[2].charAt(1)?ue[0].charAt(0)+ue[1].charAt(0)+ue[2].charAt(0):ue.join("")}function fe(v,y,E,M,ue){var I=[Re(ye(v).toString(16)),Re(ye(y).toString(16)),Re(ye(E).toString(16)),Re(Te(M))];return ue&&I[0].charAt(0)==I[0].charAt(1)&&I[1].charAt(0)==I[1].charAt(1)&&I[2].charAt(0)==I[2].charAt(1)&&I[3].charAt(0)==I[3].charAt(1)?I[0].charAt(0)+I[1].charAt(0)+I[2].charAt(0)+I[3].charAt(0):I.join("")}function he(v,y,E,M){var ue=[Re(Te(M)),Re(ye(v).toString(16)),Re(ye(y).toString(16)),Re(ye(E).toString(16))];return ue.join("")}se.equals=function(v,y){return!v||!y?!1:se(v).toRgbString()==se(y).toRgbString()},se.random=function(){return se.fromRatio({r:V(),g:V(),b:V()})};function Ne(v,y){y=y===0?0:y||10;var E=se(v).toHsl();return E.s-=y/100,E.s=p(E.s),se(E)}function Ue(v,y){y=y===0?0:y||10;var E=se(v).toHsl();return E.s+=y/100,E.s=p(E.s),se(E)}function we(v){return se(v).desaturate(100)}function Q(v,y){y=y===0?0:y||10;var E=se(v).toHsl();return E.l+=y/100,E.l=p(E.l),se(E)}function Ce(v,y){y=y===0?0:y||10;var E=se(v).toRgb();return E.r=q(0,F(255,E.r-ye(255*-(y/100)))),E.g=q(0,F(255,E.g-ye(255*-(y/100)))),E.b=q(0,F(255,E.b-ye(255*-(y/100)))),se(E)}function ce(v,y){y=y===0?0:y||10;var E=se(v).toHsl();return E.l-=y/100,E.l=p(E.l),se(E)}function P(v,y){var E=se(v).toHsl(),M=(E.h+y)%360;return E.h=M<0?360+M:M,se(E)}function le(v){var y=se(v).toHsl();return y.h=(y.h+180)%360,se(y)}function $(v){var y=se(v).toHsl(),E=y.h;return[se(v),se({h:(E+120)%360,s:y.s,l:y.l}),se({h:(E+240)%360,s:y.s,l:y.l})]}function O(v){var y=se(v).toHsl(),E=y.h;return[se(v),se({h:(E+90)%360,s:y.s,l:y.l}),se({h:(E+180)%360,s:y.s,l:y.l}),se({h:(E+270)%360,s:y.s,l:y.l})]}function me(v){var y=se(v).toHsl(),E=y.h;return[se(v),se({h:(E+72)%360,s:y.s,l:y.l}),se({h:(E+216)%360,s:y.s,l:y.l})]}function ee(v,y,E){y=y||6,E=E||30;var M=se(v).toHsl(),ue=360/E,I=[se(v)];for(M.h=(M.h-(ue*y>>1)+720)%360;--y;)M.h=(M.h+ue)%360,I.push(se(M));return I}function L(v,y){y=y||6;for(var E=se(v).toHsv(),M=E.h,ue=E.s,I=E.v,ge=[],_e=1/y;y--;)ge.push(se({h:M,s:ue,v:I})),I=(I+_e)%1;return ge}se.mix=function(v,y,E){E=E===0?0:E||50;var M=se(v).toRgb(),ue=se(y).toRgb(),I=E/100,ge={r:(ue.r-M.r)*I+M.r,g:(ue.g-M.g)*I+M.g,b:(ue.b-M.b)*I+M.b,a:(ue.a-M.a)*I+M.a};return se(ge)},se.readability=function(v,y){var E=se(v),M=se(y);return(Pe.max(E.getLuminance(),M.getLuminance())+.05)/(Pe.min(E.getLuminance(),M.getLuminance())+.05)},se.isReadable=function(v,y,E){var M=se.readability(v,y),ue,I;I=!1,ue=k(E);switch(ue.level+ue.size){case"AAsmall":case"AAAlarge":I=M>=4.5;break;case"AAlarge":I=M>=3;break;case"AAAsmall":I=M>=7;break}return I},se.mostReadable=function(v,y,E){var M=null,ue=0,I,ge,_e,Ie;E=E||{},ge=E.includeFallbackColors,_e=E.level,Ie=E.size;for(var ze=0;ze<y.length;ze++)I=se.readability(v,y[ze]),I>ue&&(ue=I,M=se(y[ze]));return se.isReadable(v,M,{level:_e,size:Ie})||!ge?M:(E.includeFallbackColors=!1,se.mostReadable(v,["#fff","#000"],E))};var U=se.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"},ae=se.hexNames=K(U);function K(v){var y={};for(var E in v)v.hasOwnProperty(E)&&(y[v[E]]=E);return y}function G(v){return v=parseFloat(v),(isNaN(v)||v<0||v>1)&&(v=1),v}function m(v,y){J(v)&&(v="100%");var E=ve(v);return v=F(y,q(0,parseFloat(v))),E&&(v=parseInt(v*y,10)/100),Pe.abs(v-y)<1e-6?1:v%y/parseFloat(y)}function p(v){return F(1,q(0,v))}function A(v){return parseInt(v,16)}function J(v){return typeof v=="string"&&v.indexOf(".")!=-1&&parseFloat(v)===1}function ve(v){return typeof v=="string"&&v.indexOf("%")!=-1}function Re(v){return v.length==1?"0"+v:""+v}function Se(v){return v<=1&&(v=v*100+"%"),v}function Te(v){return Pe.round(parseFloat(v)*255).toString(16)}function R(v){return A(v)/255}var w=function(){var v="[-\\+]?\\d+%?",y="[-\\+]?\\d*\\.\\d+%?",E="(?:"+y+")|(?:"+v+")",M="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",ue="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?";return{CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+M),rgba:new RegExp("rgba"+ue),hsl:new RegExp("hsl"+M),hsla:new RegExp("hsla"+ue),hsv:new RegExp("hsv"+M),hsva:new RegExp("hsva"+ue),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 D(v){return!!w.CSS_UNIT.exec(v)}function S(v){v=v.replace(Le,"").replace(He,"").toLowerCase();var y=!1;if(U[v])v=U[v],y=!0;else if(v=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var E;return(E=w.rgb.exec(v))?{r:E[1],g:E[2],b:E[3]}:(E=w.rgba.exec(v))?{r:E[1],g:E[2],b:E[3],a:E[4]}:(E=w.hsl.exec(v))?{h:E[1],s:E[2],l:E[3]}:(E=w.hsla.exec(v))?{h:E[1],s:E[2],l:E[3],a:E[4]}:(E=w.hsv.exec(v))?{h:E[1],s:E[2],v:E[3]}:(E=w.hsva.exec(v))?{h:E[1],s:E[2],v:E[3],a:E[4]}:(E=w.hex8.exec(v))?{r:A(E[1]),g:A(E[2]),b:A(E[3]),a:R(E[4]),format:y?"name":"hex8"}:(E=w.hex6.exec(v))?{r:A(E[1]),g:A(E[2]),b:A(E[3]),format:y?"name":"hex"}:(E=w.hex4.exec(v))?{r:A(E[1]+""+E[1]),g:A(E[2]+""+E[2]),b:A(E[3]+""+E[3]),a:R(E[4]+""+E[4]),format:y?"name":"hex8"}:(E=w.hex3.exec(v))?{r:A(E[1]+""+E[1]),g:A(E[2]+""+E[2]),b:A(E[3]+""+E[3]),format:y?"name":"hex"}:!1}function k(v){var y,E;return v=v||{level:"AA",size:"small"},y=(v.level||"AA").toUpperCase(),E=(v.size||"small").toLowerCase(),y!=="AA"&&y!=="AAA"&&(y="AA"),E!=="small"&&E!=="large"&&(E="small"),{level:y,size:E}}yt.exports?yt.exports=se:!(Z=function(){return se}.call(qe,b,qe,yt),Z!==void 0&&(yt.exports=Z))})(Math)},bT9E:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Pe});var Z=b("VTBJ");function Pe(Le,He){var Oe=Object(Z.a)({},Le);return Array.isArray(He)&&He.forEach(function(ye){delete Oe[ye]}),Oe}},c5Ni:function(yt,qe,b){},dejd:function(yt,qe,b){},dmUQ:function(yt,qe,b){"use strict";var Z=b("Ff2n"),Pe=b("rePB"),Le=b("1OyB"),He=b("vuIU"),Oe=b("Ji7U"),ye=b("md7G"),F=b("foSv"),q=b("q1tI"),V=b.n(q),se=b("TSYQ"),j=b.n(se),Y=b("4IlW");function ke($,O){var me=Object.keys($);if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols($);O&&(ee=ee.filter(function(L){return Object.getOwnPropertyDescriptor($,L).enumerable})),me.push.apply(me,ee)}return me}function de($){for(var O=1;O<arguments.length;O++){var me=arguments[O]!=null?arguments[O]:{};O%2?ke(Object(me),!0).forEach(function(ee){Object(Pe.a)($,ee,me[ee])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(me)):ke(Object(me)).forEach(function(ee){Object.defineProperty($,ee,Object.getOwnPropertyDescriptor(me,ee))})}return $}function B($){var O=X();return function(){var ee=Object(F.a)($),L;if(O){var U=Object(F.a)(this).constructor;L=Reflect.construct(ee,arguments,U)}else L=ee.apply(this,arguments);return Object(ye.a)(this,L)}}function X(){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($){return!1}}function z(){}function fe($){$.preventDefault()}var he=function(O){return O.replace(/[^\w.-]+/g,"")},Ne=200,Ue=600,we=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Q=function(O){return O!=null},Ce=function(O,me){return me===O||typeof me=="number"&&typeof O=="number"&&isNaN(me)&&isNaN(O)},ce=function($){Object(Oe.a)(me,$);var O=B(me);function me(ee){var L;Object(Le.a)(this,me),L=O.call(this,ee),L.onKeyDown=function(K){var G=L.props,m=G.onKeyDown,p=G.onPressEnter;if(K.keyCode===Y.a.UP){var A=L.getRatio(K);L.up(K,A,null),L.stop()}else if(K.keyCode===Y.a.DOWN){var J=L.getRatio(K);L.down(K,J,null),L.stop()}else K.keyCode===Y.a.ENTER&&p&&p(K);if(L.recordCursorPosition(),L.lastKeyCode=K.keyCode,m){for(var ve=arguments.length,Re=new Array(ve>1?ve-1:0),Se=1;Se<ve;Se++)Re[Se-1]=arguments[Se];m.apply(void 0,[K].concat(Re))}},L.onKeyUp=function(K){var G=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),G){for(var m=arguments.length,p=new Array(m>1?m-1:0),A=1;A<m;A++)p[A-1]=arguments[A];G.apply(void 0,[K].concat(p))}},L.onChange=function(K){var G=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(K)),L.setState({inputValue:L.rawInput}),G(L.toNumber(L.rawInput))},L.onMouseUp=function(){var K=L.props.onMouseUp;L.recordCursorPosition(),K&&K.apply(void 0,arguments)},L.onFocus=function(){var K;L.setState({focused:!0}),(K=L.props).onFocus.apply(K,arguments)},L.onBlur=function(){var K=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var G=L.getCurrentValidValue(L.state.inputValue),m=L.setValue(G,z);if(K){var p=L.input.value,A=L.getInputDisplayValue({focus:!1,value:m});L.input.value=A&&Number(A),K.apply(void 0,arguments),L.input.value=p}},L.getRatio=function(K){var G=1;return K.metaKey||K.ctrlKey?G=.1:K.shiftKey&&(G=10),G},L.getFullNum=function(K){return isNaN(K)?K:/e/i.test(String(K))?Number(K).toFixed(18).replace(/\.?0+$/,""):K},L.getPrecision=function(K){if(Q(L.props.precision))return L.props.precision;var G=String(K);if(G.indexOf("e-")>=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var m=0;return G.indexOf(".")>=0&&(m=G.length-G.indexOf(".")-1),m},L.getInputDisplayValue=function(K){var G=K||L.state,m=G.focused,p=G.inputValue,A=G.value,J;m?J=p:J=L.toPrecisionAsStep(A),J==null&&(J="");var ve=L.formatWrapper(J);return Q(L.props.decimalSeparator)&&(ve=ve.toString().replace(".",L.props.decimalSeparator)),ve},L.recordCursorPosition=function(){try{L.cursorStart=L.input.selectionStart,L.cursorEnd=L.input.selectionEnd,L.currentValue=L.input.value,L.cursorBefore=L.input.value.substring(0,L.cursorStart),L.cursorAfter=L.input.value.substring(L.cursorEnd)}catch(K){}},L.restoreByAfter=function(K){if(K===void 0)return!1;var G=L.input.value,m=G.lastIndexOf(K);if(m===-1)return!1;var p=L.cursorBefore.length;return L.lastKeyCode===Y.a.DELETE&&L.cursorBefore.charAt(p-1)===K[0]?(L.fixCaret(p,p),!0):m+K.length===G.length?(L.fixCaret(m,m),!0):!1},L.partRestoreByAfter=function(K){return K===void 0?!1:Array.prototype.some.call(K,function(G,m){var p=K.substring(m);return L.restoreByAfter(p)})},L.isNotCompleteNumber=function(K){return isNaN(K)||K===""||K===null||K&&K.toString().indexOf(".")===K.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(K,G,m){L.pressingUpOrDown=!0,L.step("down",K,G,m)},L.up=function(K,G,m){L.pressingUpOrDown=!0,L.step("up",K,G,m)},L.saveInput=function(K){L.input=K};var U=ee.value;U===void 0&&(U=ee.defaultValue),L.state={focused:ee.autoFocus};var ae=L.getValidValue(L.toNumber(U));return L.state=de(de({},L.state),{},{inputValue:L.toPrecisionAsStep(ae),value:ae}),L}return Object(He.a)(me,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var U=this.props,ae=U.value,K=U.onChange,G=U.max,m=U.min,p=this.state.focused;if(L){if(!Ce(L.value,ae)||!Ce(L.max,G)||!Ce(L.min,m)){var A=p?ae:this.getValidValue(ae),J;this.pressingUpOrDown?J=A:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(A),this.setState({value:A,inputValue:J})}var ve="value"in this.props?ae:this.state.value;"max"in this.props&&L.max!==G&&typeof ve=="number"&&ve>G&&K&&K(G),"min"in this.props&&L.min!==m&&typeof ve=="number"&&ve<m&&K&&K(m)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Re=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===Y.a.BACKSPACE?Re=this.cursorStart-1:this.lastKeyCode===Y.a.DELETE&&(Re=this.cursorStart):Re=this.input.value.length,this.fixCaret(Re,Re)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case Y.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case Y.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Se){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(L){var U=L;return U===""?U="":this.isNotCompleteNumber(parseFloat(U))?U=this.state.value:U=this.getValidValue(U),this.toNumber(U)}},{key:"getValueFromEvent",value:function(L){var U=L.target.value.trim().replace(/。/g,".");return Q(this.props.decimalSeparator)&&(U=U.replace(this.props.decimalSeparator,".")),U}},{key:"getValidValue",value:function(L){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,K=parseFloat(L);return isNaN(K)?L:(K<U&&(K=U),K>ae&&(K=ae),K)}},{key:"setValue",value:function(L,U){var ae=this.props.precision,K=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),G=this.state.value,m=G===void 0?null:G,p=this.state.inputValue,A=p===void 0?null:p,J=typeof K=="number"?K.toFixed(ae):"".concat(K),ve=K!==m||J!=="".concat(A);return"value"in this.props?(A=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:A},U)):this.setState({value:K,inputValue:this.toPrecisionAsStep(L)},U),ve&&this.props.onChange(K),K}},{key:"getMaxPrecision",value:function(L){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ae=this.props,K=ae.precision,G=ae.step;if(Q(K))return K;var m=this.getPrecision(U),p=this.getPrecision(G),A=this.getPrecision(L);return L?Math.max(A,m+p):m+p}},{key:"getPrecisionFactor",value:function(L){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ae=this.getMaxPrecision(L,U);return Math.pow(10,ae)}},{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(L){return this.props.formatter?this.props.formatter(L):L}},{key:"toPrecisionAsStep",value:function(L){if(this.isNotCompleteNumber(L)||L==="")return L;var U=Math.abs(this.getMaxPrecision(L));return isNaN(U)?L.toString():Number(L).toFixed(U)}},{key:"toNumber",value:function(L){var U=this.props.precision,ae=this.state.focused,K=L&&L.length>16&&ae;return this.isNotCompleteNumber(L)||K?L:Q(U)?Math.round(L*Math.pow(10,U))/Math.pow(10,U):Number(L)}},{key:"upStep",value:function(L,U){var ae=this.props.step,K=this.getPrecisionFactor(L,U),G=Math.abs(this.getMaxPrecision(L,U)),m=((K*L+K*ae*U)/K).toFixed(G);return this.toNumber(m)}},{key:"downStep",value:function(L,U){var ae=this.props.step,K=this.getPrecisionFactor(L,U),G=Math.abs(this.getMaxPrecision(L,U)),m=((K*L-K*ae*U)/K).toFixed(G);return this.toNumber(m)}},{key:"step",value:function(L,U){var ae=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),U&&(U.persist(),U.preventDefault());var m=this.props;if(m.disabled)return;var p=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(p))return;var A=this["".concat(L,"Step")](p,K),J=A>m.max||A<m.min;if(A>m.max?A=m.max:A<m.min&&(A=m.min),this.setValue(A,null),this.setState({focused:!0},function(){ae.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){ae[L](U,K,!0)},G?Ne:Ue)}},{key:"fixCaret",value:function(L,U){if(L===void 0||U===void 0||!this.input||!this.input.value)return;try{var ae=this.input.selectionStart,K=this.input.selectionEnd;(L!==ae||U!==K)&&this.input.setSelectionRange(L,U)}catch(G){}}},{key:"render",value:function(){var L,U=this.props,ae=U.prefixCls,K=U.disabled,G=U.readOnly,m=U.useTouch,p=U.autoComplete,A=U.upHandler,J=U.downHandler,ve=U.className,Re=U.max,Se=U.min,Te=U.style,R=U.title,w=U.onMouseEnter,D=U.onMouseLeave,S=U.onMouseOver,k=U.onMouseOut,v=U.required,y=U.onClick,E=U.tabIndex,M=U.type,ue=U.placeholder,I=U.id,ge=U.inputMode,_e=U.pattern,Ie=U.step,ze=U.maxLength,Be=U.autoFocus,Fe=U.name,nt=U.onPaste,pe=U.onInput,De=Object(Z.a)(U,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),je=this.state,Ke=je.value,Ye=je.focused,Ve=j()(ae,(L={},Object(Pe.a)(L,ve,!!ve),Object(Pe.a)(L,"".concat(ae,"-disabled"),K),Object(Pe.a)(L,"".concat(ae,"-focused"),Ye),L)),xe={};Object.keys(De).forEach(function(N){(N.substr(0,5)==="data-"||N.substr(0,5)==="aria-"||N==="role")&&(xe[N]=De[N])});var et=!G&&!K,Ze=this.getInputDisplayValue(null),Ae=(Ke||Ke===0)&&(isNaN(Ke)||Number(Ke)>=Re),We=(Ke||Ke===0)&&(isNaN(Ke)||Number(Ke)<=Se),ie=Ae||K||G,W=We||K||G,re=j()("".concat(ae,"-handler"),"".concat(ae,"-handler-up"),Object(Pe.a)({},"".concat(ae,"-handler-up-disabled"),ie)),x=j()("".concat(ae,"-handler"),"".concat(ae,"-handler-down"),Object(Pe.a)({},"".concat(ae,"-handler-down-disabled"),W)),T=m?{onTouchStart:ie?z:this.up,onTouchEnd:this.stop}:{onMouseDown:ie?z:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_=m?{onTouchStart:W?z:this.down,onTouchEnd:this.stop}:{onMouseDown:W?z:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return V.a.createElement("div",{className:Ve,style:Te,title:R,onMouseEnter:w,onMouseLeave:D,onMouseOver:S,onMouseOut:k,onFocus:function(){return null},onBlur:function(){return null}},V.a.createElement("div",{className:"".concat(ae,"-handler-wrap")},V.a.createElement("span",Object.assign({unselectable:"on"},T,{role:"button","aria-label":"Increase Value","aria-disabled":ie,className:re}),A||V.a.createElement("span",{unselectable:"on",className:"".concat(ae,"-handler-up-inner"),onClick:fe})),V.a.createElement("span",Object.assign({unselectable:"on"},_,{role:"button","aria-label":"Decrease Value","aria-disabled":W,className:x}),J||V.a.createElement("span",{unselectable:"on",className:"".concat(ae,"-handler-down-inner"),onClick:fe}))),V.a.createElement("div",{className:"".concat(ae,"-input-wrap")},V.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Se,"aria-valuemax":Re,"aria-valuenow":Ke,required:v,type:M,placeholder:ue,onPaste:nt,onClick:y,onMouseUp:this.onMouseUp,className:"".concat(ae,"-input"),tabIndex:E,autoComplete:p,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:et?this.onKeyDown:z,onKeyUp:et?this.onKeyUp:z,autoFocus:Be,maxLength:ze,readOnly:G,disabled:K,max:Re,min:Se,step:Ie,name:Fe,title:R,id:I,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:_e,inputMode:ge,onInput:pe},xe))))}}]),me}(V.a.Component);ce.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:we,min:-we,step:1,style:{},onChange:z,onKeyDown:z,onPressEnter:z,onFocus:z,onBlur:z,parser:he,required:!1,autoComplete:"off"};var P=ce,le=qe.a=P},fAei:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Ne.a});var Z=b("rePB"),Pe=b("VTBJ"),Le=b("KQm4"),He=b("1OyB"),Oe=b("vuIU"),ye=b("Ji7U"),F=b("LK+K"),q=b("q1tI"),V=b("4IlW"),se=b("Kwbf"),j=b("TSYQ"),Y=b.n(j),ke=b("sboe"),de=b("OZM5"),B=b("815F"),X=b("ODXe"),z=b("Ff2n"),fe=b("+nKL"),he=b("8XRh"),Ne=b("WaYH"),Ue=function(Se,Te){var R=Se.className,w=Se.style,D=Se.motion,S=Se.motionNodes,k=Se.motionType,v=Se.onMotionStart,y=Se.onMotionEnd,E=Se.active,M=Se.treeNodeRequiredProps,ue=Object(z.a)(Se,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),I=q.useState(!0),ge=Object(X.a)(I,2),_e=ge[0],Ie=ge[1],ze=q.useContext(ke.a),Be=ze.prefixCls,Fe=q.useRef(!1),nt=function(){Fe.current||y(),Fe.current=!0};return Object(q.useEffect)(function(){S&&k==="hide"&&_e&&Ie(!1)},[S]),Object(q.useEffect)(function(){return S&&v(),function(){S&&nt()}},[]),S?q.createElement(he.default,Object.assign({ref:Te,visible:_e},D,{motionAppear:k==="show",onAppearEnd:nt,onLeaveEnd:nt}),function(pe,De){var je=pe.className,Ke=pe.style;return q.createElement("div",{ref:De,className:Y()("".concat(Be,"-treenode-motion"),je),style:Ke},S.map(function(Ye){var Ve=Ye.data,xe=Ve.key,et=Object(z.a)(Ve,["key"]),Ze=Ye.isStart,Ae=Ye.isEnd;delete et.children;var We=Object(B.f)(xe,M);return q.createElement(Ne.a,Object.assign({},et,We,{active:E,data:Ye.data,key:xe,isStart:Ze,isEnd:Ae}))}))}):q.createElement(Ne.a,Object.assign({domRef:Te,className:R,style:w},ue,{active:E}))};Ue.displayName="MotionTreeNode";var we=q.forwardRef(Ue),Q=we;function Ce(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Te=Re.length,R=Se.length;if(Math.abs(Te-R)!==1)return{add:!1,key:null};function w(D,S){var k=new Map;D.forEach(function(y){k.set(y,!0)});var v=S.filter(function(y){return!k.has(y)});return v.length===1?v[0]:null}return Te<R?{add:!0,key:w(Re,Se)}:{add:!1,key:w(Se,Re)}}function ce(Re,Se,Te){var R=Re.findIndex(function(k){var v=k.data;return v.key===Te}),w=Re[R+1],D=Se.findIndex(function(k){var v=k.data;return v.key===Te});if(w){var S=Se.findIndex(function(k){var v=k.data;return v.key===w.data.key});return Se.slice(D+1,S)}return Se.slice(D+1)}var P={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},le=function(){},$="RC_TREE_MOTION_".concat(Math.random()),O={key:$},me={key:$,level:0,index:0,pos:"0",node:O},ee={parent:null,children:[],pos:me.pos,data:O,isStart:[],isEnd:[]};function L(Re,Se,Te,R){return Se===!1||!Te?Re:Re.slice(0,Math.ceil(Te/R)+1)}function U(Re){var Se=Re.data.key,Te=Re.pos;return Object(B.e)(Se,Te)}function ae(Re){for(var Se=String(Re.data.key),Te=Re;Te.parent;)Te=Te.parent,Se="".concat(Te.data.key," > ").concat(Se);return Se}var K=function(Se,Te){var R=Se.prefixCls,w=Se.data,D=Se.selectable,S=Se.checkable,k=Se.expandedKeys,v=Se.selectedKeys,y=Se.checkedKeys,E=Se.loadedKeys,M=Se.loadingKeys,ue=Se.halfCheckedKeys,I=Se.keyEntities,ge=Se.disabled,_e=Se.dragging,Ie=Se.dragOverNodeKey,ze=Se.dropPosition,Be=Se.motion,Fe=Se.height,nt=Se.itemHeight,pe=Se.virtual,De=Se.focusable,je=Se.activeItem,Ke=Se.focused,Ye=Se.tabIndex,Ve=Se.onKeyDown,xe=Se.onFocus,et=Se.onBlur,Ze=Se.onActiveChange,Ae=Se.onListChangeStart,We=Se.onListChangeEnd,ie=Object(z.a)(Se,["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"]),W=q.useRef(null);q.useImperativeHandle(Te,function(){return{scrollTo:function(Zt){W.current.scrollTo(Zt)}}});var re=q.useState(k),x=Object(X.a)(re,2),T=x[0],_=x[1],N=q.useState(w),be=Object(X.a)(N,2),oe=be[0],Xe=be[1],ot=q.useState(w),ut=Object(X.a)(ot,2),at=ut[0],kt=ut[1],St=q.useState([]),ct=Object(X.a)(St,2),Ft=ct[0],Lt=ct[1],xt=q.useState(null),wt=Object(X.a)(xt,2),Tt=wt[0],Bt=wt[1];function qt(){Xe(w),kt(w),Lt([]),Bt(null),We()}q.useEffect(function(){_(k);var jt=Ce(T,k);if(jt.key!==null)if(jt.add){var Zt=oe.findIndex(function(on){var _n=on.data.key;return _n===jt.key}),pn=L(ce(oe,w,jt.key),pe,Fe,nt),en=oe.slice();en.splice(Zt+1,0,ee),kt(en),Lt(pn),Bt("show")}else{var wn=w.findIndex(function(on){var _n=on.data.key;return _n===jt.key}),Pt=L(ce(w,oe,jt.key),pe,Fe,nt),pt=w.slice();pt.splice(wn+1,0,ee),kt(pt),Lt(Pt),Bt("hide")}else oe!==w&&(Xe(w),kt(w))},[k,w]),q.useEffect(function(){_e||qt()},[_e]);var vt=Be?at:w,vn={expandedKeys:k,selectedKeys:v,loadedKeys:E,loadingKeys:M,checkedKeys:y,halfCheckedKeys:ue,dragOverNodeKey:Ie,dropPosition:ze,keyEntities:I};return q.createElement(q.Fragment,null,Ke&&je&&q.createElement("span",{style:P,"aria-live":"assertive"},ae(je)),q.createElement("div",{role:"tree"},q.createElement("input",{style:P,disabled:De===!1||ge,tabIndex:De!==!1?Ye:null,onKeyDown:Ve,onFocus:xe,onBlur:et,value:"",onChange:le})),q.createElement(fe.a,Object.assign({},ie,{data:vt,itemKey:U,height:Fe,fullHeight:!1,virtual:pe,itemHeight:nt,prefixCls:"".concat(R,"-list"),ref:W}),function(jt){var Zt=jt.pos,pn=jt.data,en=pn.key,wn=Object(z.a)(pn,["key"]),Pt=jt.isStart,pt=jt.isEnd,on=Object(B.e)(en,Zt);delete wn.children;var _n=Object(B.f)(on,vn);return q.createElement(Q,Object.assign({},wn,_n,{active:je&&en===je.data.key,pos:Zt,data:jt.data,isStart:Pt,isEnd:pt,motion:Be,motionNodes:en===$?Ft:null,motionType:Tt,onMotionStart:Ae,onMotionEnd:qt,treeNodeRequiredProps:vn,onMouseMove:function(){Ze(null)}}))}))},G=q.forwardRef(K);G.displayName="NodeList";var m=G,p=b("NvD2"),A=function(Re){Object(ye.a)(Te,Re);var Se=Object(F.a)(Te);function Te(){var R;return Object(He.a)(this,Te),R=Se.apply(this,arguments),R.destroyed=!1,R.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},R.listRef=q.createRef(),R.onNodeDragStart=function(w,D){var S=R.state,k=S.expandedKeys,v=S.keyEntities,y=R.props.onDragStart,E=D.props.eventKey;R.dragNode=D;var M=Object(de.b)(k,E);R.setState({dragging:!0,dragNodesKeys:Object(de.g)(E,v)}),R.setExpandedKeys(M),y&&y({event:w,node:Object(B.b)(D.props)})},R.onNodeDragEnter=function(w,D){var S=R.state,k=S.expandedKeys,v=S.keyEntities,y=S.dragNodesKeys,E=R.props.onDragEnter,M=D.props,ue=M.pos,I=M.eventKey;if(!R.dragNode||y.indexOf(I)!==-1)return;var ge=Object(de.c)(w,D);if(R.dragNode.props.eventKey===I&&ge===0){R.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){R.setState({dragOverNodeKey:I,dropPosition:ge}),R.delayedDragEnterLogic||(R.delayedDragEnterLogic={}),Object.keys(R.delayedDragEnterLogic).forEach(function(_e){clearTimeout(R.delayedDragEnterLogic[_e])}),R.delayedDragEnterLogic[ue]=window.setTimeout(function(){if(!R.state.dragging)return;var _e=Object(Le.a)(k),Ie=v[I];Ie&&(Ie.children||[]).length&&(_e=Object(de.a)(k,I)),"expandedKeys"in R.props||R.setExpandedKeys(_e),E&&E({event:w,node:Object(B.b)(D.props),expandedKeys:_e})},400)},0)},R.onNodeDragOver=function(w,D){var S=R.state.dragNodesKeys,k=R.props.onDragOver,v=D.props.eventKey;if(S.indexOf(v)!==-1)return;if(R.dragNode&&v===R.state.dragOverNodeKey){var y=Object(de.c)(w,D);if(y===R.state.dropPosition)return;R.setState({dropPosition:y})}k&&k({event:w,node:Object(B.b)(D.props)})},R.onNodeDragLeave=function(w,D){var S=R.props.onDragLeave;R.setState({dragOverNodeKey:""}),S&&S({event:w,node:Object(B.b)(D.props)})},R.onNodeDragEnd=function(w,D){var S=R.props.onDragEnd;R.setState({dragOverNodeKey:""}),R.cleanDragState(),S&&S({event:w,node:Object(B.b)(D.props)}),R.dragNode=null},R.onNodeDrop=function(w,D){var S=R.state,k=S.dragNodesKeys,v=k===void 0?[]:k,y=S.dropPosition,E=R.props.onDrop,M=D.props,ue=M.eventKey,I=M.pos;if(R.setState({dragOverNodeKey:""}),R.cleanDragState(),v.indexOf(ue)!==-1){Object(se.a)(!1,"Can not drop to dragNode(include it's children node)");return}var ge=Object(de.k)(I),_e={event:w,node:Object(B.b)(D.props),dragNode:R.dragNode?Object(B.b)(R.dragNode.props):null,dragNodesKeys:v.slice(),dropPosition:y+Number(ge[ge.length-1]),dropToGap:!1};y!==0&&(_e.dropToGap=!0),E&&E(_e),R.dragNode=null},R.cleanDragState=function(){var w=R.state.dragging;w&&R.setState({dragging:!1})},R.onNodeClick=function(w,D){var S=R.props.onClick;S&&S(w,D)},R.onNodeDoubleClick=function(w,D){var S=R.props.onDoubleClick;S&&S(w,D)},R.onNodeSelect=function(w,D){var S=R.state.selectedKeys,k=R.state.keyEntities,v=R.props,y=v.onSelect,E=v.multiple,M=D.selected,ue=D.key,I=!M;I?E?S=Object(de.a)(S,ue):S=[ue]:S=Object(de.b)(S,ue);var ge=S.map(function(_e){var Ie=k[_e];return Ie?Ie.node:null}).filter(function(_e){return _e});R.setUncontrolledState({selectedKeys:S}),y&&y(S,{event:"select",selected:I,node:D,selectedNodes:ge,nativeEvent:w.nativeEvent})},R.onNodeCheck=function(w,D,S){var k=R.state,v=k.keyEntities,y=k.checkedKeys,E=k.halfCheckedKeys,M=R.props,ue=M.checkStrictly,I=M.onCheck,ge=D.key,_e,Ie={event:"check",node:D,checked:S,nativeEvent:w.nativeEvent};if(ue){var ze=S?Object(de.a)(y,ge):Object(de.b)(y,ge),Be=Object(de.b)(E,ge);_e={checked:ze,halfChecked:Be},Ie.checkedNodes=ze.map(function(Ke){return v[Ke]}).filter(function(Ke){return Ke}).map(function(Ke){return Ke.node}),R.setUncontrolledState({checkedKeys:ze})}else{var Fe=Object(p.a)([].concat(Object(Le.a)(y),[ge]),!0,v),nt=Fe.checkedKeys,pe=Fe.halfCheckedKeys;if(!S){var De=new Set(nt);De.delete(ge);var je=Object(p.a)(Array.from(De),{checked:!1,halfCheckedKeys:pe},v);nt=je.checkedKeys,pe=je.halfCheckedKeys}_e=nt,Ie.checkedNodes=[],Ie.checkedNodesPositions=[],Ie.halfCheckedKeys=pe,nt.forEach(function(Ke){var Ye=v[Ke];if(!Ye)return;var Ve=Ye.node,xe=Ye.pos;Ie.checkedNodes.push(Ve),Ie.checkedNodesPositions.push({node:Ve,pos:xe})}),R.setUncontrolledState({checkedKeys:nt},!1,{halfCheckedKeys:pe})}I&&I(_e,Ie)},R.onNodeLoad=function(w){return new Promise(function(D){R.setState(function(S){var k=S.loadedKeys,v=k===void 0?[]:k,y=S.loadingKeys,E=y===void 0?[]:y,M=R.props,ue=M.loadData,I=M.onLoad,ge=w.key;if(!ue||v.indexOf(ge)!==-1||E.indexOf(ge)!==-1)return{};var _e=ue(w);return _e.then(function(){var Ie=R.state,ze=Ie.loadedKeys,Be=Ie.loadingKeys,Fe=Object(de.a)(ze,ge),nt=Object(de.b)(Be,ge);I&&I(Fe,{event:"load",node:w}),R.setUncontrolledState({loadedKeys:Fe}),R.setState({loadingKeys:nt}),D()}),{loadingKeys:Object(de.a)(E,ge)}})})},R.onNodeMouseEnter=function(w,D){var S=R.props.onMouseEnter;S&&S({event:w,node:D})},R.onNodeMouseLeave=function(w,D){var S=R.props.onMouseLeave;S&&S({event:w,node:D})},R.onNodeContextMenu=function(w,D){var S=R.props.onRightClick;S&&(w.preventDefault(),S({event:w,node:D}))},R.onFocus=function(){var w=R.props.onFocus;R.setState({focused:!0}),w&&w.apply(void 0,arguments)},R.onBlur=function(){var w=R.props.onBlur;R.setState({focused:!1}),R.onActiveChange(null),w&&w.apply(void 0,arguments)},R.getTreeNodeRequiredProps=function(){var w=R.state,D=w.expandedKeys,S=w.selectedKeys,k=w.loadedKeys,v=w.loadingKeys,y=w.checkedKeys,E=w.halfCheckedKeys,M=w.dragOverNodeKey,ue=w.dropPosition,I=w.keyEntities;return{expandedKeys:D||[],selectedKeys:S||[],loadedKeys:k||[],loadingKeys:v||[],checkedKeys:y||[],halfCheckedKeys:E||[],dragOverNodeKey:M,dropPosition:ue,keyEntities:I}},R.setExpandedKeys=function(w){var D=R.state.treeData,S=Object(B.d)(D,w);R.setUncontrolledState({expandedKeys:w,flattenNodes:S},!0)},R.onNodeExpand=function(w,D){var S=R.state.expandedKeys,k=R.state.listChanging,v=R.props,y=v.onExpand,E=v.loadData,M=D.key,ue=D.expanded;if(k)return;var I=S.indexOf(M),ge=!ue;if(Object(se.a)(ue&&I!==-1||!ue&&I===-1,"Expand state not sync with index check"),ge?S=Object(de.a)(S,M):S=Object(de.b)(S,M),R.setExpandedKeys(S),y&&y(S,{node:D,expanded:ge,nativeEvent:w.nativeEvent}),ge&&E){var _e=R.onNodeLoad(D);_e&&_e.then(function(){var Ie=Object(B.d)(R.state.treeData,S);R.setUncontrolledState({flattenNodes:Ie})})}},R.onListChangeStart=function(){R.setUncontrolledState({listChanging:!0})},R.onListChangeEnd=function(){setTimeout(function(){R.setUncontrolledState({listChanging:!1})})},R.onActiveChange=function(w){var D=R.state.activeKey,S=R.props.onActiveChange;if(D===w)return;R.setState({activeKey:w}),w!==null&&R.scrollTo({key:w}),S&&S(w)},R.getActiveItem=function(){var w=R.state,D=w.activeKey,S=w.flattenNodes;return D===null?null:S.find(function(k){var v=k.data.key;return v===D})||null},R.offsetActiveKey=function(w){var D=R.state,S=D.flattenNodes,k=D.activeKey,v=S.findIndex(function(M){var ue=M.data.key;return ue===k});v===-1&&w<0&&(v=S.length),v=(v+w+S.length)%S.length;var y=S[v];if(y){var E=y.data.key;R.onActiveChange(E)}else R.onActiveChange(null)},R.onKeyDown=function(w){var D=R.state,S=D.activeKey,k=D.expandedKeys,v=D.checkedKeys,y=R.props,E=y.onKeyDown,M=y.checkable,ue=y.selectable;switch(w.which){case V.a.UP:{R.offsetActiveKey(-1),w.preventDefault();break}case V.a.DOWN:{R.offsetActiveKey(1),w.preventDefault();break}}var I=R.getActiveItem();if(I&&I.data){var ge=R.getTreeNodeRequiredProps(),_e=I.data.isLeaf===!1||!!(I.data.children||[]).length,Ie=Object(B.b)(Object(Pe.a)(Object(Pe.a)({},Object(B.f)(S,ge)),{},{data:I.data,active:!0}));switch(w.which){case V.a.LEFT:{_e&&k.includes(S)?R.onNodeExpand({},Ie):I.parent&&R.onActiveChange(I.parent.data.key),w.preventDefault();break}case V.a.RIGHT:{_e&&!k.includes(S)?R.onNodeExpand({},Ie):I.children&&I.children.length&&R.onActiveChange(I.children[0].data.key),w.preventDefault();break}case V.a.ENTER:case V.a.SPACE:{M&&!Ie.disabled&&Ie.checkable!==!1&&!Ie.disableCheckbox?R.onNodeCheck({},Ie,!v.includes(S)):!M&&ue&&!Ie.disabled&&Ie.selectable!==!1&&R.onNodeSelect({},Ie);break}}}E&&E(w)},R.setUncontrolledState=function(w){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(R.destroyed)return;var k=!1,v=!0,y={};Object.keys(w).forEach(function(E){if(E in R.props){v=!1;return}k=!0,y[E]=w[E]}),k&&(!D||v)&&R.setState(Object(Pe.a)(Object(Pe.a)({},y),S))},R.scrollTo=function(w){R.listRef.current.scrollTo(w)},R}return Object(Oe.a)(Te,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var w,D=this.state,S=D.focused,k=D.flattenNodes,v=D.keyEntities,y=D.dragging,E=D.activeKey,M=this.props,ue=M.prefixCls,I=M.className,ge=M.style,_e=M.showLine,Ie=M.focusable,ze=M.tabIndex,Be=ze===void 0?0:ze,Fe=M.selectable,nt=M.showIcon,pe=M.icon,De=M.switcherIcon,je=M.draggable,Ke=M.checkable,Ye=M.checkStrictly,Ve=M.disabled,xe=M.motion,et=M.loadData,Ze=M.filterTreeNode,Ae=M.height,We=M.itemHeight,ie=M.virtual,W=M.titleRender,re=M.onContextMenu,x=Object(de.f)(this.props);return q.createElement(ke.a.Provider,{value:{prefixCls:ue,selectable:Fe,showIcon:nt,icon:pe,switcherIcon:De,draggable:je,checkable:Ke,checkStrictly:Ye,disabled:Ve,keyEntities:v,loadData:et,filterTreeNode:Ze,titleRender:W,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}},q.createElement("div",{className:Y()(ue,I,(w={},Object(Z.a)(w,"".concat(ue,"-show-line"),_e),Object(Z.a)(w,"".concat(ue,"-focused"),S),Object(Z.a)(w,"".concat(ue,"-active-focused"),E!==null),w))},q.createElement(m,Object.assign({ref:this.listRef,prefixCls:ue,style:ge,data:k,disabled:Ve,selectable:Fe,checkable:!!Ke,motion:xe,dragging:y,height:Ae,itemHeight:We,virtual:ie,focusable:Ie,focused:S,tabIndex:Be,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:re},this.getTreeNodeRequiredProps(),x))))}}],[{key:"getDerivedStateFromProps",value:function(w,D){var S=D.prevProps,k={prevProps:w};function v(pe){return!S&&pe in w||S&&S[pe]!==w[pe]}var y;if(v("treeData")?y=w.treeData:v("children")&&(Object(se.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),y=Object(B.c)(w.children)),y){k.treeData=y;var E=Object(B.a)(y);k.keyEntities=Object(Pe.a)(Object(Z.a)({},$,me),E.keyEntities)}var M=k.keyEntities||D.keyEntities;if(v("expandedKeys")||S&&v("autoExpandParent"))k.expandedKeys=w.autoExpandParent||!S&&w.defaultExpandParent?Object(de.e)(w.expandedKeys,M):w.expandedKeys;else if(!S&&w.defaultExpandAll){var ue=Object(Pe.a)({},M);delete ue[$],k.expandedKeys=Object.keys(ue).map(function(pe){return ue[pe].key})}else!S&&w.defaultExpandedKeys&&(k.expandedKeys=w.autoExpandParent||w.defaultExpandParent?Object(de.e)(w.defaultExpandedKeys,M):w.defaultExpandedKeys);if(k.expandedKeys||delete k.expandedKeys,y||k.expandedKeys){var I=Object(B.d)(y||D.treeData,k.expandedKeys||D.expandedKeys);k.flattenNodes=I}if(w.selectable&&(v("selectedKeys")?k.selectedKeys=Object(de.d)(w.selectedKeys,w):!S&&w.defaultSelectedKeys&&(k.selectedKeys=Object(de.d)(w.defaultSelectedKeys,w))),w.checkable){var ge;if(v("checkedKeys")?ge=Object(de.j)(w.checkedKeys)||{}:!S&&w.defaultCheckedKeys?ge=Object(de.j)(w.defaultCheckedKeys)||{}:y&&(ge=Object(de.j)(w.checkedKeys)||{checkedKeys:D.checkedKeys,halfCheckedKeys:D.halfCheckedKeys}),ge){var _e=ge,Ie=_e.checkedKeys,ze=Ie===void 0?[]:Ie,Be=_e.halfCheckedKeys,Fe=Be===void 0?[]:Be;if(!w.checkStrictly){var nt=Object(p.a)(ze,!0,M);ze=nt.checkedKeys,Fe=nt.halfCheckedKeys}k.checkedKeys=ze,k.halfCheckedKeys=Fe}}return v("loadedKeys")&&(k.loadedKeys=w.loadedKeys),k}}]),Te}(q.Component);A.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:[]},A.TreeNode=Ne.a;var J=A,ve=qe.b=J},gJ3r:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Z});var Z=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},h78n:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return L});var Z=b("q1tI"),Pe=b.n(Z),Le=b("TSYQ"),He=b.n(Le),Oe={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},ye=function(K){var G=K.map(function(){return Object(Z.useRef)()}),m=Object(Z.useRef)();return Object(Z.useEffect)(function(){var p=Date.now(),A=!1;Object.keys(G).forEach(function(J){var ve=G[J].current;if(!ve)return;A=!0;var Re=ve.style;Re.transitionDuration=".3s, .3s, .3s, .06s",m.current&&p-m.current<100&&(Re.transitionDuration="0s, 0s")}),A&&(m.current=Date.now())}),[G]};function F(){return F=Object.assign||function(ae){for(var K=1;K<arguments.length;K++){var G=arguments[K];for(var m in G)Object.prototype.hasOwnProperty.call(G,m)&&(ae[m]=G[m])}return ae},F.apply(this,arguments)}function q(ae,K){return ke(ae)||Y(ae,K)||se(ae,K)||V()}function V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(ae,K){if(!ae)return;if(typeof ae=="string")return j(ae,K);var G=Object.prototype.toString.call(ae).slice(8,-1);if(G==="Object"&&ae.constructor&&(G=ae.constructor.name),G==="Map"||G==="Set")return Array.from(ae);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return j(ae,K)}function j(ae,K){(K==null||K>ae.length)&&(K=ae.length);for(var G=0,m=new Array(K);G<K;G++)m[G]=ae[G];return m}function Y(ae,K){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(ae)))return;var G=[],m=!0,p=!1,A=void 0;try{for(var J=ae[Symbol.iterator](),ve;!(m=(ve=J.next()).done)&&!(G.push(ve.value),K&&G.length===K);m=!0);}catch(Re){p=!0,A=Re}finally{try{!m&&J.return!=null&&J.return()}finally{if(p)throw A}}return G}function ke(ae){if(Array.isArray(ae))return ae}function de(ae,K){if(ae==null)return{};var G=B(ae,K),m,p;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(ae);for(p=0;p<A.length;p++){if(m=A[p],K.indexOf(m)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ae,m))continue;G[m]=ae[m]}}return G}function B(ae,K){if(ae==null)return{};var G={},m=Object.keys(ae),p,A;for(A=0;A<m.length;A++){if(p=m[A],K.indexOf(p)>=0)continue;G[p]=ae[p]}return G}var X=function(K){var G=K.className,m=K.percent,p=K.prefixCls,A=K.strokeColor,J=K.strokeLinecap,ve=K.strokeWidth,Re=K.style,Se=K.trailColor,Te=K.trailWidth,R=K.transition,w=de(K,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete w.gapPosition;var D=Array.isArray(m)?m:[m],S=Array.isArray(A)?A:[A],k=ye(D),v=q(k,1),y=v[0],E=ve/2,M=100-ve/2,ue="M ".concat(J==="round"?E:0,",").concat(E,`
|
|
L `).concat(J==="round"?M:100,",").concat(E),I="0 0 100 ".concat(ve),ge=0;return Pe.a.createElement("svg",F({className:He()("".concat(p,"-line"),G),viewBox:I,preserveAspectRatio:"none",style:Re},w),Pe.a.createElement("path",{className:"".concat(p,"-line-trail"),d:ue,strokeLinecap:J,stroke:Se,strokeWidth:Te||ve,fillOpacity:"0"}),D.map(function(_e,Ie){var ze={strokeDasharray:"".concat(_e,"px, 100px"),strokeDashoffset:"-".concat(ge,"px"),transition:R||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Be=S[Ie]||S[S.length-1];return ge+=_e,Pe.a.createElement("path",{key:Ie,className:"".concat(p,"-line-path"),d:ue,strokeLinecap:J,stroke:Be,strokeWidth:ve,fillOpacity:"0",ref:y[Ie],style:ze})}))};X.defaultProps=Oe;var z=X;function fe(){return fe=Object.assign||function(ae){for(var K=1;K<arguments.length;K++){var G=arguments[K];for(var m in G)Object.prototype.hasOwnProperty.call(G,m)&&(ae[m]=G[m])}return ae},fe.apply(this,arguments)}function he(ae,K){return Ce(ae)||Q(ae,K)||Ue(ae,K)||Ne()}function Ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(ae,K){if(!ae)return;if(typeof ae=="string")return we(ae,K);var G=Object.prototype.toString.call(ae).slice(8,-1);if(G==="Object"&&ae.constructor&&(G=ae.constructor.name),G==="Map"||G==="Set")return Array.from(ae);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return we(ae,K)}function we(ae,K){(K==null||K>ae.length)&&(K=ae.length);for(var G=0,m=new Array(K);G<K;G++)m[G]=ae[G];return m}function Q(ae,K){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(ae)))return;var G=[],m=!0,p=!1,A=void 0;try{for(var J=ae[Symbol.iterator](),ve;!(m=(ve=J.next()).done)&&!(G.push(ve.value),K&&G.length===K);m=!0);}catch(Re){p=!0,A=Re}finally{try{!m&&J.return!=null&&J.return()}finally{if(p)throw A}}return G}function Ce(ae){if(Array.isArray(ae))return ae}function ce(ae,K){if(ae==null)return{};var G=P(ae,K),m,p;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(ae);for(p=0;p<A.length;p++){if(m=A[p],K.indexOf(m)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ae,m))continue;G[m]=ae[m]}}return G}function P(ae,K){if(ae==null)return{};var G={},m=Object.keys(ae),p,A;for(A=0;A<m.length;A++){if(p=m[A],K.indexOf(p)>=0)continue;G[p]=ae[p]}return G}var le=0;function $(ae){return+ae.replace("%","")}function O(ae){return Array.isArray(ae)?ae:[ae]}function me(ae,K,G,m){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,A=arguments.length>5?arguments[5]:void 0,J=50-m/2,ve=0,Re=-J,Se=0,Te=-2*J;switch(A){case"left":ve=-J,Re=0,Se=2*J,Te=0;break;case"right":ve=J,Re=0,Se=-2*J,Te=0;break;case"bottom":Re=J,Te=2*J;break;default:}var R="M 50,50 m ".concat(ve,",").concat(Re,`
|
|
a `).concat(J,",").concat(J," 0 1 1 ").concat(Se,",").concat(-Te,`
|
|
a `).concat(J,",").concat(J," 0 1 1 ").concat(-Se,",").concat(Te),w=Math.PI*2*J,D={stroke:G,strokeDasharray:"".concat(K/100*(w-p),"px ").concat(w,"px"),strokeDashoffset:"-".concat(p/2+ae/100*(w-p),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:R,pathStyle:D}}var ee=function(K){var G=K.prefixCls,m=K.strokeWidth,p=K.trailWidth,A=K.gapDegree,J=K.gapPosition,ve=K.trailColor,Re=K.strokeLinecap,Se=K.style,Te=K.className,R=K.strokeColor,w=K.percent,D=ce(K,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),S=Object(Z.useMemo)(function(){return le+=1,le},[]),k=me(0,100,ve,m,A,J),v=k.pathString,y=k.pathStyle,E=O(w),M=O(R),ue=M.find(function(ze){return Object.prototype.toString.call(ze)==="[object Object]"}),I=ye(E),ge=he(I,1),_e=ge[0],Ie=function(){var Be=0;return E.map(function(Fe,nt){var pe=M[nt]||M[M.length-1],De=Object.prototype.toString.call(pe)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(S,")"):"",je=me(Be,Fe,pe,m,A,J);return Be+=Fe,Pe.a.createElement("path",{key:nt,className:"".concat(G,"-circle-path"),d:je.pathString,stroke:De,strokeLinecap:Re,strokeWidth:m,opacity:Fe===0?0:1,fillOpacity:"0",style:je.pathStyle,ref:_e[nt]})})};return Pe.a.createElement("svg",fe({className:He()("".concat(G,"-circle"),Te),viewBox:"0 0 100 100",style:Se},D),ue&&Pe.a.createElement("defs",null,Pe.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(S),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ue).sort(function(ze,Be){return $(ze)-$(Be)}).map(function(ze,Be){return Pe.a.createElement("stop",{key:Be,offset:ze,stopColor:ue[ze]})}))),Pe.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:v,stroke:ve,strokeLinecap:Re,strokeWidth:p||m,fillOpacity:"0",style:y}),Ie().reverse())};ee.defaultProps=Oe;var L=ee,U={Line:z,Circle:L}},hxT0:function(yt,qe,b){yt.exports={bg:"bg___2samk",flexRow:"flexRow___2Ocys",flexJustifyCenter:"flexJustifyCenter___14s6l",flexAlignEnd:"flexAlignEnd___1lHt8",flexAlignCenter:"flexAlignCenter___2PtCV",flexColumn:"flexColumn___2Ssa4",formWrap:"formWrap___3Fcg8",titleWrap:"titleWrap___3U2TN",fieldWrap:"fieldWrap___3K6pg",mdWrap:"mdWrap___3o_rf",backgroundFa:"backgroundFa___3dwFi",button:"button___1vOOT",cascaderWrap:"cascaderWrap___ETHsj",listItem:"listItem___C62yl",right:"right___1iif8",one:"one___2Qd4F",schoolHintWrap:"schoolHintWrap___34WkA",colorCDCDCD:"colorCDCDCD___HqcpR",color0152d9:"color0152d9___cQ4G4"}},kSUc:function(yt,qe,b){},lZu9:function(yt,qe,b){(function(Z){Z(b("VrN/"),b("1eCo"),b("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(Pe,Le){var He=Z.getMode(Pe,"text/html"),Oe=He.name=="null";function ye(m){if(Z.findModeByName){var p=Z.findModeByName(m);p&&(m=p.mime||p.mimes[0])}var A=Z.getMode(Pe,m);return A.name=="null"?null:A}Le.highlightFormatting===void 0&&(Le.highlightFormatting=!1),Le.maxBlockquoteDepth===void 0&&(Le.maxBlockquoteDepth=0),Le.taskLists===void 0&&(Le.taskLists=!1),Le.strikethrough===void 0&&(Le.strikethrough=!1),Le.emoji===void 0&&(Le.emoji=!1),Le.fencedCodeBlockHighlighting===void 0&&(Le.fencedCodeBlockHighlighting=!0),Le.fencedCodeBlockDefaultMode===void 0&&(Le.fencedCodeBlockDefaultMode="text/plain"),Le.xml===void 0&&(Le.xml=!0),Le.tokenTypeOverrides===void 0&&(Le.tokenTypeOverrides={});var F={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var q in F)F.hasOwnProperty(q)&&Le.tokenTypeOverrides[q]&&(F[q]=Le.tokenTypeOverrides[q]);var V=/^([*\-_])(?:\s*\1){2,}\s*$/,se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,j=/^\[(x| )\](?=\s)/i,Y=Le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ke=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,B=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,X=/^\s*\[[^\]]+?\]:.*$/,z=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,fe=" ";function he(m,p,A){return p.f=p.inline=A,A(m,p)}function Ne(m,p,A){return p.f=p.block=A,A(m,p)}function Ue(m){return!m||!/\S/.test(m.string)}function we(m){if(m.linkTitle=!1,m.linkHref=!1,m.linkText=!1,m.em=!1,m.strong=!1,m.strikethrough=!1,m.quote=0,m.indentedCode=!1,m.f==Ce){var p=Oe;if(!p){var A=Z.innerMode(He,m.htmlState);p=A.mode.name=="xml"&&A.state.tagStart===null&&!A.state.context&&A.state.tokenize.isInText}p&&(m.f=$,m.block=Q,m.htmlState=null)}return m.trailingSpace=0,m.trailingSpaceNewLine=!1,m.prevLine=m.thisLine,m.thisLine={stream:null},null}function Q(m,p){var A=m.column()===p.indentation,J=Ue(p.prevLine.stream),ve=p.indentedCode,Re=p.prevLine.hr,Se=p.list!==!1,Te=(p.listStack[p.listStack.length-1]||0)+3;p.indentedCode=!1;var R=p.indentation;if(p.indentationDiff===null&&(p.indentationDiff=p.indentation,Se)){for(p.list=null;R<p.listStack[p.listStack.length-1];)p.listStack.pop(),p.listStack.length?p.indentation=p.listStack[p.listStack.length-1]:p.list=!1;p.list!==!1&&(p.indentationDiff=R-p.listStack[p.listStack.length-1])}var w=!J&&!Re&&!p.prevLine.header&&(!Se||!ve)&&!p.prevLine.fencedCodeEnd,D=(p.list===!1||Re||J)&&p.indentation<=Te&&m.match(V),S=null;if(p.indentationDiff>=4&&(ve||p.prevLine.fencedCodeEnd||p.prevLine.header||J))return m.skipToEnd(),p.indentedCode=!0,F.code;if(m.eatSpace())return null;if(A&&p.indentation<=Te&&(S=m.match(Y))&&S[1].length<=6)return p.quote=0,p.header=S[1].length,p.thisLine.header=!0,Le.highlightFormatting&&(p.formatting="header"),p.f=p.inline,P(p);if(p.indentation<=Te&&m.eat(">"))return p.quote=A?1:p.quote+1,Le.highlightFormatting&&(p.formatting="quote"),m.eatSpace(),P(p);if(!D&&!p.setext&&A&&p.indentation<=Te&&(S=m.match(se))){var k=S[1]?"ol":"ul";return p.indentation=R+m.current().length,p.list=!0,p.quote=0,p.listStack.push(p.indentation),p.em=!1,p.strong=!1,p.code=!1,p.strikethrough=!1,Le.taskLists&&m.match(j,!1)&&(p.taskList=!0),p.f=p.inline,Le.highlightFormatting&&(p.formatting=["list","list-"+k]),P(p)}else{if(A&&p.indentation<=Te&&(S=m.match(B,!0)))return p.quote=0,p.fencedEndRE=new RegExp(S[1]+"+ *$"),p.localMode=Le.fencedCodeBlockHighlighting&&ye(S[2]||Le.fencedCodeBlockDefaultMode),p.localMode&&(p.localState=Z.startState(p.localMode)),p.f=p.block=ce,Le.highlightFormatting&&(p.formatting="code-block"),p.code=-1,P(p);if(p.setext||(!w||!Se)&&!p.quote&&p.list===!1&&!p.code&&!D&&!X.test(m.string)&&(S=m.lookAhead(1))&&(S=S.match(ke)))return p.setext?(p.header=p.setext,p.setext=0,m.skipToEnd(),Le.highlightFormatting&&(p.formatting="header")):(p.header=S[0].charAt(0)=="="?1:2,p.setext=p.header),p.thisLine.header=!0,p.f=p.inline,P(p);if(D)return m.skipToEnd(),p.hr=!0,p.thisLine.hr=!0,F.hr;if(m.peek()==="[")return he(m,p,U)}return he(m,p,p.inline)}function Ce(m,p){var A=He.token(m,p.htmlState);if(!Oe){var J=Z.innerMode(He,p.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||p.md_inside&&m.current().indexOf(">")>-1)&&(p.f=$,p.block=Q,p.htmlState=null)}return A}function ce(m,p){var A=p.listStack[p.listStack.length-1]||0,J=p.indentation<A,ve=A+3;if(p.fencedEndRE&&p.indentation<=ve&&(J||m.match(p.fencedEndRE))){Le.highlightFormatting&&(p.formatting="code-block");var Re;return J||(Re=P(p)),p.localMode=p.localState=null,p.block=Q,p.f=$,p.fencedEndRE=null,p.code=0,p.thisLine.fencedCodeEnd=!0,J?Ne(m,p,p.block):Re}else return p.localMode?p.localMode.token(m,p.localState):(m.skipToEnd(),F.code)}function P(m){var p=[];if(m.formatting){p.push(F.formatting),typeof m.formatting=="string"&&(m.formatting=[m.formatting]);for(var A=0;A<m.formatting.length;A++)p.push(F.formatting+"-"+m.formatting[A]),m.formatting[A]==="header"&&p.push(F.formatting+"-"+m.formatting[A]+"-"+m.header),m.formatting[A]==="quote"&&(!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=m.quote?p.push(F.formatting+"-"+m.formatting[A]+"-"+m.quote):p.push("error"))}if(m.taskOpen)return p.push("meta"),p.length?p.join(" "):null;if(m.taskClosed)return p.push("property"),p.length?p.join(" "):null;if(m.linkHref?p.push(F.linkHref,"url"):(m.strong&&p.push(F.strong),m.em&&p.push(F.em),m.strikethrough&&p.push(F.strikethrough),m.emoji&&p.push(F.emoji),m.linkText&&p.push(F.linkText),m.code&&p.push(F.code),m.image&&p.push(F.image),m.imageAltText&&p.push(F.imageAltText,"link"),m.imageMarker&&p.push(F.imageMarker)),m.header&&p.push(F.header,F.header+"-"+m.header),m.quote&&(p.push(F.quote),!Le.maxBlockquoteDepth||Le.maxBlockquoteDepth>=m.quote?p.push(F.quote+"-"+m.quote):p.push(F.quote+"-"+Le.maxBlockquoteDepth)),m.list!==!1){var J=(m.listStack.length-1)%3;J?J===1?p.push(F.list2):p.push(F.list3):p.push(F.list1)}return m.trailingSpaceNewLine?p.push("trailing-space-new-line"):m.trailingSpace&&p.push("trailing-space-"+(m.trailingSpace%2?"a":"b")),p.length?p.join(" "):null}function le(m,p){return m.match(de,!0)?P(p):void 0}function $(m,p){var A=p.text(m,p);if(typeof A!="undefined")return A;if(p.list)return p.list=null,P(p);if(p.taskList){var J=m.match(j,!0)[1]===" ";return J?p.taskOpen=!0:p.taskClosed=!0,Le.highlightFormatting&&(p.formatting="task"),p.taskList=!1,P(p)}if(p.taskOpen=!1,p.taskClosed=!1,p.header&&m.match(/^#+$/,!0))return Le.highlightFormatting&&(p.formatting="header"),P(p);var ve=m.next();if(p.linkTitle){p.linkTitle=!1;var Re=ve;ve==="("&&(Re=")"),Re=(Re+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Se="^\\s*(?:[^"+Re+"\\\\]+|\\\\\\\\|\\\\.)"+Re;if(m.match(new RegExp(Se),!0))return F.linkHref}if(ve==="`"){var Te=p.formatting;Le.highlightFormatting&&(p.formatting="code"),m.eatWhile("`");var R=m.current().length;if(p.code==0&&(!p.quote||R==1))return p.code=R,P(p);if(R==p.code){var w=P(p);return p.code=0,w}else return p.formatting=Te,P(p)}else if(p.code)return P(p);if(ve==="\\"&&(m.next(),Le.highlightFormatting)){var D=P(p),S=F.formatting+"-escape";return D?D+" "+S:S}if(ve==="!"&&m.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return p.imageMarker=!0,p.image=!0,Le.highlightFormatting&&(p.formatting="image"),P(p);if(ve==="["&&p.imageMarker&&m.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return p.imageMarker=!1,p.imageAltText=!0,Le.highlightFormatting&&(p.formatting="image"),P(p);if(ve==="]"&&p.imageAltText){Le.highlightFormatting&&(p.formatting="image");var D=P(p);return p.imageAltText=!1,p.image=!1,p.inline=p.f=me,D}if(ve==="["&&!p.image)return p.linkText&&m.match(/^.*?\]/)||(p.linkText=!0,Le.highlightFormatting&&(p.formatting="link")),P(p);if(ve==="]"&&p.linkText){Le.highlightFormatting&&(p.formatting="link");var D=P(p);return p.linkText=!1,p.inline=p.f=m.match(/\(.*?\)| ?\[.*?\]/,!1)?me:$,D}if(ve==="<"&&m.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=O,Le.highlightFormatting&&(p.formatting="link");var D=P(p);return D?D+=" ":D="",D+F.linkInline}if(ve==="<"&&m.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=O,Le.highlightFormatting&&(p.formatting="link");var D=P(p);return D?D+=" ":D="",D+F.linkEmail}if(Le.xml&&ve==="<"&&m.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var k=m.string.indexOf(">",m.pos);if(k!=-1){var v=m.string.substring(m.start,k);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(p.md_inside=!0)}return m.backUp(1),p.htmlState=Z.startState(He),Ne(m,p,Ce)}if(Le.xml&&ve==="<"&&m.match(/^\/\w*?>/))return p.md_inside=!1,"tag";if(ve==="*"||ve==="_"){for(var y=1,E=m.pos==1?" ":m.string.charAt(m.pos-2);y<3&&m.eat(ve);)y++;var M=m.peek()||" ",ue=!/\s/.test(M)&&(!z.test(M)||/\s/.test(E)||z.test(E)),I=!/\s/.test(E)&&(!z.test(E)||/\s/.test(M)||z.test(M)),ge=null,_e=null;if(y%2&&(!p.em&&ue&&(ve==="*"||!I||z.test(E))?ge=!0:p.em==ve&&I&&(ve==="*"||!ue||z.test(M))&&(ge=!1)),y>1&&(!p.strong&&ue&&(ve==="*"||!I||z.test(E))?_e=!0:p.strong==ve&&I&&(ve==="*"||!ue||z.test(M))&&(_e=!1)),_e!=null||ge!=null){Le.highlightFormatting&&(p.formatting=ge==null?"strong":_e==null?"em":"strong em"),ge===!0&&(p.em=ve),_e===!0&&(p.strong=ve);var w=P(p);return ge===!1&&(p.em=!1),_e===!1&&(p.strong=!1),w}}else if(ve===" "&&(m.eat("*")||m.eat("_"))){if(m.peek()===" ")return P(p);m.backUp(1)}if(Le.strikethrough){if(ve==="~"&&m.eatWhile(ve)){if(p.strikethrough){Le.highlightFormatting&&(p.formatting="strikethrough");var w=P(p);return p.strikethrough=!1,w}else if(m.match(/^[^\s]/,!1))return p.strikethrough=!0,Le.highlightFormatting&&(p.formatting="strikethrough"),P(p)}else if(ve===" "&&m.match(/^~~/,!0)){if(m.peek()===" ")return P(p);m.backUp(2)}}if(Le.emoji&&ve===":"&&m.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){p.emoji=!0,Le.highlightFormatting&&(p.formatting="emoji");var Ie=P(p);return p.emoji=!1,Ie}return ve===" "&&(m.match(/^ +$/,!1)?p.trailingSpace++:p.trailingSpace&&(p.trailingSpaceNewLine=!0)),P(p)}function O(m,p){var A=m.next();if(A===">"){p.f=p.inline=$,Le.highlightFormatting&&(p.formatting="link");var J=P(p);return J?J+=" ":J="",J+F.linkInline}return m.match(/^[^>]+/,!0),F.linkInline}function me(m,p){if(m.eatSpace())return null;var A=m.next();return A==="("||A==="["?(p.f=p.inline=L(A==="("?")":"]"),Le.highlightFormatting&&(p.formatting="link-string"),p.linkHref=!0,P(p)):"error"}var ee={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(m){return function(p,A){var J=p.next();if(J===m){A.f=A.inline=$,Le.highlightFormatting&&(A.formatting="link-string");var ve=P(A);return A.linkHref=!1,ve}return p.match(ee[m]),A.linkHref=!0,P(A)}}function U(m,p){return m.match(/^([^\]\\]|\\.)*\]:/,!1)?(p.f=ae,m.next(),Le.highlightFormatting&&(p.formatting="link"),p.linkText=!0,P(p)):he(m,p,$)}function ae(m,p){if(m.match(/^\]:/,!0)){p.f=p.inline=K,Le.highlightFormatting&&(p.formatting="link");var A=P(p);return p.linkText=!1,A}return m.match(/^([^\]\\]|\\.)+/,!0),F.linkText}function K(m,p){return m.eatSpace()?null:(m.match(/^[^\s]+/,!0),m.peek()===void 0?p.linkTitle=!0:m.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),p.f=p.inline=$,F.linkHref+" url")}var G={startState:function(){return{f:Q,prevLine:{stream:null},thisLine:{stream:null},block:Q,htmlState:null,indentation:0,inline:$,text:le,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(m){return{f:m.f,prevLine:m.prevLine,thisLine:m.thisLine,block:m.block,htmlState:m.htmlState&&Z.copyState(He,m.htmlState),indentation:m.indentation,localMode:m.localMode,localState:m.localMode?Z.copyState(m.localMode,m.localState):null,inline:m.inline,text:m.text,formatting:!1,linkText:m.linkText,linkTitle:m.linkTitle,linkHref:m.linkHref,code:m.code,em:m.em,strong:m.strong,strikethrough:m.strikethrough,emoji:m.emoji,header:m.header,setext:m.setext,hr:m.hr,taskList:m.taskList,list:m.list,listStack:m.listStack.slice(0),quote:m.quote,indentedCode:m.indentedCode,trailingSpace:m.trailingSpace,trailingSpaceNewLine:m.trailingSpaceNewLine,md_inside:m.md_inside,fencedEndRE:m.fencedEndRE}},token:function(m,p){if(p.formatting=!1,m!=p.thisLine.stream){if(p.header=0,p.hr=!1,m.match(/^\s*$/,!0))return we(p),null;if(p.prevLine=p.thisLine,p.thisLine={stream:m},p.taskList=!1,p.trailingSpace=0,p.trailingSpaceNewLine=!1,!p.localState&&(p.f=p.block,p.f!=Ce)){var A=m.match(/^\s*/,!0)[0].replace(/\t/g,fe).length;if(p.indentation=A,p.indentationDiff=null,A>0)return null}}return p.f(m,p)},innerMode:function(m){return m.block==Ce?{state:m.htmlState,mode:He}:m.localState?{state:m.localState,mode:m.localMode}:{state:m,mode:G}},indent:function(m,p,A){return m.block==Ce&&He.indent?He.indent(m.htmlState,p,A):m.localState&&m.localMode.indent?m.localMode.indent(m.localState,p,A):Z.Pass},blankLine:we,getType:P,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},osHv:function(yt,qe,b){(function(Z){Z(b("VrN/"))})(function(Z){"use strict";var Pe=Z.Pos;function Le(z,fe){return z.line-fe.line||z.ch-fe.ch}var He="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Oe=He+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("<(/?)(["+He+"]["+Oe+"]*)","g");function F(z,fe,he,Ne){this.line=fe,this.ch=he,this.cm=z,this.text=z.getLine(fe),this.min=Ne?Math.max(Ne.from,z.firstLine()):z.firstLine(),this.max=Ne?Math.min(Ne.to-1,z.lastLine()):z.lastLine()}function q(z,fe){var he=z.cm.getTokenTypeAt(Pe(z.line,fe));return he&&/\btag\b/.test(he)}function V(z){return z.line>=z.max?void 0:(z.ch=0,z.text=z.cm.getLine(++z.line),!0)}function se(z){return z.line<=z.min?void 0:(z.text=z.cm.getLine(--z.line),z.ch=z.text.length,!0)}function j(z){for(;;){var fe=z.text.indexOf(">",z.ch);if(fe==-1){if(V(z))continue;return}if(!q(z,fe+1)){z.ch=fe+1;continue}var he=z.text.lastIndexOf("/",fe),Ne=he>-1&&!/\S/.test(z.text.slice(he+1,fe));return z.ch=fe+1,Ne?"selfClose":"regular"}}function Y(z){for(;;){var fe=z.ch?z.text.lastIndexOf("<",z.ch-1):-1;if(fe==-1){if(se(z))continue;return}if(!q(z,fe+1)){z.ch=fe;continue}ye.lastIndex=fe,z.ch=fe;var he=ye.exec(z.text);if(he&&he.index==fe)return he}}function ke(z){for(;;){ye.lastIndex=z.ch;var fe=ye.exec(z.text);if(!fe){if(V(z))continue;return}if(!q(z,fe.index+1)){z.ch=fe.index+1;continue}return z.ch=fe.index+fe[0].length,fe}}function de(z){for(;;){var fe=z.ch?z.text.lastIndexOf(">",z.ch-1):-1;if(fe==-1){if(se(z))continue;return}if(!q(z,fe+1)){z.ch=fe;continue}var he=z.text.lastIndexOf("/",fe),Ne=he>-1&&!/\S/.test(z.text.slice(he+1,fe));return z.ch=fe+1,Ne?"selfClose":"regular"}}function B(z,fe){for(var he=[];;){var Ne=ke(z),Ue,we=z.line,Q=z.ch-(Ne?Ne[0].length:0);if(!Ne||!(Ue=j(z)))return;if(Ue=="selfClose")continue;if(Ne[1]){for(var Ce=he.length-1;Ce>=0;--Ce)if(he[Ce]==Ne[2]){he.length=Ce;break}if(Ce<0&&(!fe||fe==Ne[2]))return{tag:Ne[2],from:Pe(we,Q),to:Pe(z.line,z.ch)}}else he.push(Ne[2])}}function X(z,fe){for(var he=[];;){var Ne=de(z);if(!Ne)return;if(Ne=="selfClose"){Y(z);continue}var Ue=z.line,we=z.ch,Q=Y(z);if(!Q)return;if(Q[1])he.push(Q[2]);else{for(var Ce=he.length-1;Ce>=0;--Ce)if(he[Ce]==Q[2]){he.length=Ce;break}if(Ce<0&&(!fe||fe==Q[2]))return{tag:Q[2],from:Pe(z.line,z.ch),to:Pe(Ue,we)}}}}Z.registerHelper("fold","xml",function(z,fe){for(var he=new F(z,fe.line,0);;){var Ne=ke(he);if(!Ne||he.line!=fe.line)return;var Ue=j(he);if(!Ue)return;if(!Ne[1]&&Ue!="selfClose"){var we=Pe(he.line,he.ch),Q=B(he,Ne[2]);return Q&&Le(Q.from,we)>0?{from:we,to:Q.from}:null}}}),Z.findMatchingTag=function(z,fe,he){var Ne=new F(z,fe.line,fe.ch,he);if(Ne.text.indexOf(">")==-1&&Ne.text.indexOf("<")==-1)return;var Ue=j(Ne),we=Ue&&Pe(Ne.line,Ne.ch),Q=Ue&&Y(Ne);if(!Ue||!Q||Le(Ne,fe)>0)return;var Ce={from:Pe(Ne.line,Ne.ch),to:we,tag:Q[2]};return Ue=="selfClose"?{open:Ce,close:null,at:"open"}:Q[1]?{open:X(Ne,Q[2]),close:Ce,at:"close"}:(Ne=new F(z,we.line,we.ch,he),{open:Ce,close:B(Ne,Q[2]),at:"open"})},Z.findEnclosingTag=function(z,fe,he,Ne){for(var Ue=new F(z,fe.line,fe.ch,he);;){var we=X(Ue,Ne);if(!we)break;var Q=new F(z,fe.line,fe.ch,he),Ce=B(Q,we.tag);if(Ce)return{open:we,close:Ce}}},Z.scanForClosingTag=function(z,fe,he,Ne){var Ue=new F(z,fe.line,fe.ch,Ne?{from:0,to:Ne}:null);return B(Ue,he)}})},p5ED:function(yt,qe,b){"use strict";var Z=b("+L6B"),Pe=b("2/Rp"),Le=b("5Dmo"),He=b("3S7+"),Oe=b("k1fw"),ye=b("9og8"),F=b("tJVT"),q=b("WmNS"),V=b.n(q),se=b("q1tI"),j=b.n(se),Y=b("vHTk"),ke=b.n(Y),de=b("yEEn"),B=b("ZW9T"),X=b("1vsH"),z=b("V0Rq"),fe=b("m3rI"),he=function(Ue){var we=Ue.name,Q=Ue.data,Ce=Ue.theme,ce=Ue.type,P=Ue.filename,le=Ue.monacoEditor,$=Ue.className,O=Ue.style,me=Ue.close,ee=Ue.onClose,L=Ue.hasMask,U=Ue.otherData,ae=U===void 0?{}:U,K=Object(se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),G=Object(F.a)(K,2),m=G[0],p=G[1],A=Object(se.useState)(""),J=Object(F.a)(A,2),ve=J[0],Re=J[1],Se=Object(se.useState)(),Te=Object(F.a)(Se,2),R=Te[0],w=Te[1],D=window.ENV==="build"?"/react/build/office.html":"/office.html",S,k=1024*1024,v=10*k,y=Object(se.useRef)();ce==="office"&&(S=Object(X.R)(Q).filesize,S>v&&(ce="other")),P&&(le.filename=P),Object(se.useEffect)(function(){var I,ge,_e=(I=document.cookie)===null||I===void 0||((ge=I.replace(/\s/g,""))===null||ge===void 0)?void 0:ge.split(";");_e==null||_e.map(function(Ie){var ze=Ie.split("=");ze[0]==="_educoder_session"&&Re(ze[1])})},[]),Object(se.useEffect)(function(){ce==="office"&&E()},[ce]);var E=function(){var I=Object(ye.a)(V.a.mark(function ge(){var _e,Ie,ze;return V.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return console.log("data:",Q),_e=Q,Q.startsWith("http")||(_e=location.origin+_e),Ie=new URL(_e).pathname.split("/").pop(),Fe.next=6,Object(z.U)({attachment_id:Ie});case 6:ze=Fe.sent,w(ze);case 8:case"end":return Fe.stop()}},ge)}));return function(){return I.apply(this,arguments)}}(),M=function(){if(Q.startsWith("http")||Q.startsWith("/api")||Q.startsWith("blob:")){ue();return}Object(X.x)(P||"educoder",Q,P||"educoder")},ue=function(){Object(X.v)(P||"educoder",decodeURIComponent(Q))};return j.a.createElement("div",{style:Object(Oe.a)({},O||{}),className:"".concat(L&&ke.a.bgBlack," ").concat(ce?ke.a.wrp:"hide")},me&&j.a.createElement("div",{className:ke.a.close,ref:y},j.a.createElement(He.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return y.current}},j.a.createElement("span",{onClick:ue},j.a.createElement("i",{className:"icon-quxiaozhiding"}))),j.a.createElement(He.a,{title:"\u5173\u95ED",getPopupContainer:function(){return y.current}},j.a.createElement("span",{className:"",onClick:function(){ee(),w(null)}},j.a.createElement("i",{className:"icon-guanbi1"})))),j.a.createElement("div",{className:"".concat(ke.a[$]," ").concat($," ").concat(ke.a.monaco," ").concat(ce==="txt"?"show":"hide")},ce==="txt"&&j.a.createElement(B.b,le)),ce==="audio"&&j.a.createElement("audio",{src:"".concat((Q==null?void 0:Q.indexOf("http://"))>-1||(Q==null?void 0:Q.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(Q),autoPlay:!0}),ce==="video"&&j.a.createElement(j.a.Fragment,null,(Q==null?void 0:Q.indexOf("/api"))>-1?j.a.createElement("video",{controls:!0,src:"".concat(Q),autoPlay:!0}):j.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(Q),autoPlay:!0})),ce==="office"&&R&&j.a.createElement("iframe",{src:"".concat(D,"?key=").concat(R.key,"&url=").concat(fe.a.API_SERVER+R.url,"&callbackUrl=").concat(fe.a.API_SERVER+R.callbackUrl,"&fileType=").concat(R.fileType,"&title=").concat(R.title,"&model=view")}),(ce==="xlsx"||ce==="doc"||ce==="pptx"||ce==="docx")&&j.a.createElement("iframe",{src:"".concat(D,"?key=").concat(ae.key,"&url=").concat(fe.a.API_SERVER+ae.url,"&callbackUrl=").concat(fe.a.API_SERVER+ae.callbackUrl,"&fileType=").concat(ae.fileType,"&title=").concat(ae.title,"&model=").concat(ae.model)}),ce==="html"&&j.a.createElement("iframe",{src:Q+"&disposition=inline"}),ce==="pdf"&&j.a.createElement("embed",{className:ke.a.embed,src:Q,type:"application/pdf"}),ce==="image"&&j.a.createElement("img",{src:"".concat((Q==null?void 0:Q.indexOf("http://"))>-1||(Q==null?void 0:Q.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(Q)}),ce==="other"&&j.a.createElement("div",null,j.a.createElement(Pe.a,{type:"primary",size:"large",onClick:M},j.a.createElement(de.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),ce==="download"&&j.a.createElement(Pe.a,{type:"primary",size:"large",onClick:M},j.a.createElement(de.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};qe.a=he},"p77/":function(yt,qe,b){},"rAM+":function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Pe});var Z=b("Qw5x");function Pe(Le,He){var Oe;if(typeof Symbol=="undefined"||Le[Symbol.iterator]==null){if(Array.isArray(Le)||(Oe=Object(Z.a)(Le))||He&&Le&&typeof Le.length=="number"){Oe&&(Le=Oe);var ye=0,F=function(){};return{s:F,n:function(){return ye>=Le.length?{done:!0}:{done:!1,value:Le[ye++]}},e:function(Y){throw Y},f:F}}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 q=!0,V=!1,se;return{s:function(){Oe=Le[Symbol.iterator]()},n:function(){var Y=Oe.next();return q=Y.done,Y},e:function(Y){V=!0,se=Y},f:function(){try{!q&&Oe.return!=null&&Oe.return()}finally{if(V)throw se}}}}},rUJ1:function(yt,qe){const b=/[&<>"']/,Z=/[&<>"']/g,Pe=/[<>"']|&(?!#?\w+;)/,Le=/[<>"']|&(?!#?\w+;)/g,He={"&":"&","<":"<",">":">",'"':""","'":"'"},Oe=ce=>He[ce];function ye(ce,P){if(P){if(b.test(ce))return ce.replace(Z,Oe)}else if(Pe.test(ce))return ce.replace(Le,Oe);return ce}const F=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function q(ce){return ce.replace(F,(P,le)=>(le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""))}const V=/(^|[^\[])\^/g;function se(ce,P){ce=ce.source||ce,P=P||"";const le={replace:($,O)=>(O=O.source||O,O=O.replace(V,"$1"),ce=ce.replace($,O),le),getRegex:()=>new RegExp(ce,P)};return le}const j=/[^\w:]/g,Y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ke(ce,P,le){if(ce){let $;try{$=decodeURIComponent(q(le)).replace(j,"").toLowerCase()}catch(O){return null}if($.indexOf("javascript:")===0||$.indexOf("vbscript:")===0||$.indexOf("data:")===0)return null}P&&!Y.test(le)&&(le=fe(P,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch($){return null}return le}const de={},B=/^[^:]+:\/*[^/]*$/,X=/^([^:]+:)[\s\S]*$/,z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function fe(ce,P){de[" "+ce]||(B.test(ce)?de[" "+ce]=ce+"/":de[" "+ce]=we(ce,"/",!0)),ce=de[" "+ce];const le=ce.indexOf(":")===-1;return P.substring(0,2)==="//"?le?P:ce.replace(X,"$1")+P:P.charAt(0)==="/"?le?P:ce.replace(z,"$1")+P:ce+P}const he={exec:function(){}};function Ne(ce){let P=1,le,$;for(;P<arguments.length;P++){le=arguments[P];for($ in le)Object.prototype.hasOwnProperty.call(le,$)&&(ce[$]=le[$])}return ce}function Ue(ce,P){const le=ce.replace(/\|/g,(me,ee,L)=>{let U=!1,ae=ee;for(;--ae>=0&&L[ae]==="\\";)U=!U;return U?"|":" |"}),$=le.split(/ \|/);let O=0;if($.length>P)$.splice(P);else for(;$.length<P;)$.push("");for(;O<$.length;O++)$[O]=$[O].trim().replace(/\\\|/g,"|");return $}function we(ce,P,le){const $=ce.length;if($===0)return"";let O=0;for(;O<$;){const me=ce.charAt($-O-1);if(me===P&&!le)O++;else if(me!==P&&le)O++;else break}return ce.substr(0,$-O)}function Q(ce,P){if(ce.indexOf(P[1])===-1)return-1;const le=ce.length;let $=0,O=0;for(;O<le;O++)if(ce[O]==="\\")O++;else if(ce[O]===P[0])$++;else if(ce[O]===P[1]&&($--,$<0))return O;return-1}function Ce(ce){ce&&ce.sanitize&&!ce.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}yt.exports={escape:ye,unescape:q,edit:se,cleanUrl:ke,resolveUrl:fe,noopTest:he,merge:Ne,splitCells:Ue,rtrim:we,findClosingBracket:Q,checkSanitizeDeprecation:Ce}},sboe:function(yt,qe,b){"use strict";b.d(qe,"a",function(){return Le});var Z=b("q1tI"),Pe=b.n(Z),Le=Z.createContext(null)},uK0f:function(yt,qe,b){(function(Z,Pe){yt.exports=Pe()})(this,function(){"use strict";function Z(Pe,Le,He){He=He||{},He.childrenKeyName=He.childrenKeyName||"children";var Oe=Pe||[],ye=[],F=0;do{var q=Oe.filter(function(V){return Le(V,F)})[0];if(!q)break;ye.push(q),Oe=q[He.childrenKeyName]||[],F+=1}while(Oe.length>0);return ye}return Z})},vHTk:function(yt,qe,b){yt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);
|