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

1106 lines
651 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[6904],{2018:function(){"use strict"},40862:function(Nt,Ht){"use strict";Ht.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74947:function(){"use strict"},75544:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Nt={},Ht="5.0",fe={},ae=null,gt=!1,He=!1,ze=null,me=!1,Xe=null,Le=null,Ke=0;Ke<arguments.length;Ke++){var ke=arguments[Ke];if(ke!==null)switch(typeof ke){case"number":Ht=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ht=ke:ze=ke;break;case"object":typeof ke.is3D!="undefined"?ae=ke:fe=ke;break;case"boolean":gt=ke,He=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!He&&(gt=!0)),ze!==null&&fe.id===void 0&&(fe.id=ze);var de="",Ae="",ye=!1,ut=null,je=null,Re=null,Oe=!1,De=null,ot=null,st=null,St=null,bt=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var ft=function(Ce){return parseFloat(Ce)>4?parseFloat(Ce):5};Nt.setHTML5Codebase=function(Ce,Je){Le=Ce,Ge(Ce,Je)},Nt.setJavaCodebase=Nt.setJavaCodebaseVersion=Nt.isCompiledInstalled=Nt.setPreCompiledScriptPath=Nt.setPreCompiledResourcePath=function(){},Nt.setHTML5CodebaseVersion=function(Ce,Je){var Se=parseFloat(Ce);if(Se!==NaN&&Se<5){console.log("The GeoGebra HTML5 codebase version "+Se+" is deprecated. Using version latest instead.");return}Xe=Ce,ue(Ce,Je)},Nt.getHTML5CodebaseVersion=function(){return je},Nt.getParameters=function(){return fe},Nt.setFontsCSSURL=function(Ce){St=Ce},Nt.setGiacJSURL=function(Ce){},Nt.setJNLPFile=function(Ce){de=Ce},Nt.setJNLPBaseDir=function(Ce){},Nt.inject=function(){function Ce(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Je="auto",Se=fe.id,rt,Ue=!1,xe=0;xe<arguments.length;xe++){var ve=arguments[xe];typeof ve=="string"?(ve=ve.toLowerCase(),ve.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Je=ve:Se=arguments[xe]):typeof ve=="boolean"?Ue=ve:ve instanceof HTMLElement&&(rt=ve)}Ee();function Ee(){if(!me){setTimeout(Ee,200);return}Je=vt(Je);var qe=rt||document.getElementById(Se);if(!qe){console.log("possibly bug on ajax loading? ");return}if(Nt.removeExistingApplet(qe,!1),fe.width===void 0&&qe.clientWidth&&(fe.width=qe.clientWidth),fe.height===void 0&&qe.clientHeight&&(fe.height=qe.clientHeight),!(fe.width&&fe.height)&&Je==="html5"&&(delete fe.width,delete fe.height),ut=Je,Je==="screenshot")Pe(qe,fe);else{var we=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?we=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(we=(!pt()||Ce())&&dt()),we?(ut="screenshot",zt(qe,fe,Ue,Je)):Qe(qe,fe,Ue)}}};function pt(){try{return window.self!==window.top}catch(Ce){return!0}}function dt(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Nt.getViews=function(){return ae},Nt.isJavaInstalled=function(){return!1};var $t=function(Ce){var Je=function(xe){var ve=JSON.parse(xe),Ee=function(Ne){return Ne.type=="G"||Ne.type=="E"},qe=ve.elements?ve.elements.filter(Ee)[0]:ve;if(!qe||!qe.url){Se();return}fe.fileName=qe.url,_e(qe.settings||{}),ae.is3D=!0;var we="https://www.geogebra.org/images/";Nt.setPreviewImage(De||qe.previewUrl,we+"GeoGebra_loading.png",we+"applet_play.png"),Ce()},Se=function(){fe.onError&&fe.onError(),wt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},rt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ue="/materials/"+fe.material_id+"?scope=basic";tt("https://"+rt+"/api/proxy.php?path="+encodeURIComponent(Ue),Je,Se)};function _e(Ce){var Je=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Se){Ce[Se]=!!Ce[Se]}),Je.forEach(function(Se){fe[Se]===void 0&&Ce[Se]!==void 0&&(fe[Se]=Ce[Se])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function tt(Ce,Je,Se){var rt=new XMLHttpRequest;rt.open("GET",Ce),rt.onload=function(){Je(rt.responseText)},rt.onerror=Se,rt.send()}Nt.isHTML5Installed=function(){return!0},Nt.getLoadedAppletType=function(){return ut},Nt.setPreviewImage=function(Ce,Je,Se){De=Ce,ot=Je,st=Se},Nt.removeExistingApplet=function(Ce,Je){var Se;typeof Ce=="string"&&(Ce=document.getElementById(Ce)),ut=null;var rt=null;for(Se=0;Se<Ce.childNodes.length;Se++){var Ue=Ce.childNodes[Se],xe=Ue.className;xe==="applet_screenshot"?Je?(Ue.style.display="block",ut="screenshot"):Ue.style.display="none":xe!=="applet_scaler prerender"&&(Ce.removeChild(Ue),rt=xe&&xe.indexOf("appletParameters")!=-1?Ue.id:null,Se--)}var ve=fe.id!==void 0?fe.id:rt,Ee=window[ve];Ee&&typeof Ee.getBase64=="function"&&(Ee.remove(),window[ve]=null)},Nt.refreshHitPoints=function(){if(ft(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ce=Nt.getAppletObject();return Ce&&typeof Ce.recalculateEnvironments=="function"?(Ce.recalculateEnvironments(),!0):!1},Nt.startAnimation=function(){var Ce=Nt.getAppletObject();return Ce&&typeof Ce.startAnimation=="function"?(Ce.startAnimation(),!0):!1},Nt.stopAnimation=function(){var Ce=Nt.getAppletObject();return Ce&&typeof Ce.stopAnimation=="function"?(Ce.stopAnimation(),!0):!1},Nt.getAppletObject=function(){var Ce=fe.id!==void 0?fe.id:"ggbApplet";return window[Ce]},Nt.resize=function(){};var Lt=function(Ce,Je,Se){var rt=document.createElement("param");rt.setAttribute("name",Je),rt.setAttribute("value",Se),Ce.appendChild(rt)},Fe=function(Ce){return Ce&&Ce!=="false"},Qe=function(Ce,Je,Se){ft(je)<=4.2&&(Se=!0);var rt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==je||ggbHTML5LoadedCodebaseIsWebSimple&&!Oe)&&(rt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ue=document.createElement("div");Ue.classList.add("appletParameters","notranslate");var xe=Je.width,ve=Je.height;if(Je.disableAutoScale=Je.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Je.disableAutoScale,Je.width!==void 0)if(ft(je)<=4.4)Fe(Je.showToolBar)&&(Je.height-=7),Fe(Je.showAlgebraInput)&&(Je.height-=37),Je.width<605&&Fe(Je.showToolBar)&&(Je.width=605,xe=605);else{var Ee=100;(Fe(Je.showToolBar)||Fe(Je.showMenuBar))&&(Je.hasOwnProperty("customToolBar")&&(Je.customToolbar=Je.customToolBar),Ee=Fe(Je.showMenuBar)?245:155),xe<Ee&&(Je.width=Ee,xe=Ee)}Ue.style.border="none",Ue.style.display="inline-block";for(var qe in Je)Je.hasOwnProperty(qe)&&qe!=="appletOnLoad"&&Ue.setAttribute("data-param-"+qe,Je[qe]);St&&Ue.setAttribute("data-param-fontscssurl",St),Nt.resize=function(){GGBAppletUtils.responsiveResize(Ce,Je)},window.addEventListener("resize",function(z){Nt.resize()});var we=typeof Je.appletOnLoad=="function"?Je.appletOnLoad:function(){};if(!Se&&Je.width!==void 0){Je.hasOwnProperty("showSplash")||Ue.setAttribute("data-param-showSplash","false");var Ne=Ce.querySelector(".applet_scaler.prerender"),Ve=Ne!==null;if(Ve)var et=Ne.querySelector(".ggb_preview");else{var et=Tt(xe,ve,Je.borderColor,!1);Ne=document.createElement("div"),Ne.className="applet_scaler",Ne.style.position="relative",Ne.style.display="block",Ne.style.width=xe+"px",Ne.style.height=ve+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ne,"66%"),ft(je)>=5?(Je.appletOnLoad=function(z){var ie=Ce.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ne),window.GGBT_wsf_view&&$(window).trigger("resize"),we(z)},Ve||Ne.appendChild(et)):Ue.appendChild(et),Ne.appendChild(Ue),Ve||Ce.appendChild(Ne),setTimeout(function(){Nt.resize()},1)}else{var it=document.createElement("div");it.className="applet_scaler",it.style.position="relative",it.style.display="block",it.appendChild(Ue),Ce.appendChild(it),Je.appletOnLoad=function(z){Nt.resize(),we(z)}}function We(z,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(z,ie.appletOnLoad):renderGGBElement(z),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function mt(z,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:z,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ce){We(ce.article,ce.params)}),html5AppletsToProcess=null)},ft(je)<5&&(z.className+=" geogebraweb")):We(z,ie)}if(rt){scriptLoadStarted=!0;for(var ct=0;ct<Ue.childNodes.length;ct++){var jt=Ue.childNodes[ct].tagName;jt==="TABLE"&&(Ue.removeChild(Ue.childNodes[ct]),ct--)}if(ggbHTML5LoadedScript!==null){var Ot=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ot!=null&&Ot.parentNode.removeChild(Ot)}var se=document.createElement("script"),te=function(){mt(Ue,Je)};se.src=Ae+Re,ggbHTML5LoadedCodebaseIsWebSimple=Oe,ggbHTML5LoadedCodebaseVersion=je,ggbHTML5LoadedScript=se.src,wt("GeoGebra HTML5 codebase loaded: '"+Ae+"'.",Je),!Le&&(!Xe||Xe=="5.0")?(Oe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):Ae.requirejs?__webpack_require__.e(7989).then(function(){var z=[__webpack_require__(87989)];te.apply(null,z)}.bind(this)).catch(__webpack_require__.oe):(se.onload=te,Ce.appendChild(se))}else mt(Ue,Je);Je.height=ve,Je.width=xe},Pe=function(Ce,Je,Se){var rt=Tt(Je.width,Je.height,Je.borderColor,Se),Ue=document.createElement("div");Ue.style.position="relative",Ue.style.display="block",Ue.style.width=Je.width+"px",Ue.style.height=Je.height+"px",Ue.className="applet_screenshot applet_scaler"+(Se?" applet_screenshot_play":""),Ue.appendChild(rt);var xe=GGBAppletUtils.getScale(Je,Ce,Se);Se?(Ce.appendChild(kt()),window.GGBT_wsf_view||(Ce.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),Ce.appendChild(Ue),xe!==1&&!isNaN(xe)&&(GGBAppletUtils.scaleElement(Ue,xe),Ue.style.width=Je.width+"px",Ue.style.height=Je.height+"px",Ue.parentNode.style.width=Je.width*xe+"px",Ue.parentNode.style.height=Je.height*xe+"px"),Nt.resize=function(){Ye(Ce,rt,Ue,Se)},window.addEventListener("resize",function(ve){Nt.resize()}),Nt.resize()};function Ye(Ce,Je,Se,rt){if(Ce.contains(Je)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ce.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}var Ue=GGBAppletUtils.getScale(fe,Ce,rt);Se.parentNode!==null&&(!isNaN(Ue)&&Ue!==1?(GGBAppletUtils.scaleElement(Se,Ue),Se.parentNode.style.width=fe.width*Ue+"px",Se.parentNode.style.height=fe.height*Ue+"px"):(GGBAppletUtils.scaleElement(Se,1),Se.parentNode.style.width=fe.width+"px",Se.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ce),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Nt.onExitFullscreen=function(Ce,Je){Je.appendChild(Ce)};var zt=function(Ce,Je,Se,rt){Pe(Ce,Je,!0);for(var Ue=function(){var Ee=[];for(ve=0;ve<Ce.childNodes.length;ve++)Ee.push(Ce.childNodes[ve]);if(window.GGBT_wsf_view){var qe=window.GGBT_wsf_view.renderFullScreen(Ce,Je.id),we=document.getElementById("fullscreencontainer"),Ne=jQuery(Ce).find(".fullscreencontent");Ne.length>0?(qe.remove(),Ne.attr("id","fullscreencontent").show(),jQuery(we).append(Ne),window.dispatchEvent(new Event("resize"))):Qe(qe,Je,!1),window.GGBT_wsf_view.launchFullScreen(we)}else ut=rt,Qe(Ce,Je,!1);if(!window.GGBT_wsf_view)for(ve=0;ve<Ee.length;ve++)Ce.removeChild(Ee[ve])},xe=Ce.getElementsByClassName("ggb_preview_play"),ve=0;ve<xe.length;ve++)xe[ve].addEventListener("click",Ue,!1),xe[ve].addEventListener("ontouchstart",Ue,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ce),dt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},kt=function(){var Ce=document.createElement("div");if(Ce.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Je='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Se=document.createElement("style");Se.styleSheet?Se.styleSheet.cssText=Je:Se.appendChild(document.createTextNode(Je)),document.getElementsByTagName("head")[0].appendChild(Se)}return Ce},Tt=function(Ce,Je,Se,rt){var Ue=document.createElement("div");Ue.className="ggb_preview",Ue.style.position="absolute",Ue.style.zIndex="90",Ue.style.width=Ce-2+"px",Ue.style.height=Je-2+"px",Ue.style.top="0px",Ue.style.left="0px",Ue.style.overflow="hidden",Ue.style.backgroundColor="white";var xe="lightgrey";Se!==void 0&&(Se==="none"?xe="transparent":xe=Se),Ue.style.border="1px solid "+xe;var ve=document.createElement("img");if(ve.style.position="relative",ve.style.zIndex="1000",ve.style.top="-1px",ve.style.left="-1px",De!==null&&ve.setAttribute("src",De),ve.style.opacity=.7,ot!==null){var Ee,qe,we;if(!rt){Ee=document.createElement("img"),Ee.style.position="absolute",Ee.style.zIndex="1001",Ee.style.opacity=1,ve.style.opacity=.3,qe=360,qe>Ce/4*3&&(qe=Ce/4*3),we=qe/5.8,Ee.setAttribute("src",ot),Ee.setAttribute("width",qe),Ee.setAttribute("height",we);var Ne=(Ce-qe)/2,Ve=(Je-we)/2;Ee.style.left=Ne+"px",Ee.style.top=Ve+"px",Ue.appendChild(Ee)}}return Ue.appendChild(ve),Ue},vt=function(Ce){return Ce=Ce.toLowerCase(),Ce==="html5"||Ce==="screenshot"?Ce:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ue=function(Ce,Je){if(je=Ce,Je){Ge(je,!0);return}var Se=!gt;if(Se){var rt=ft(je);!isNaN(rt)&&rt<4.4&&(Se=!1)}var Ue,xe;window.location.protocol.substr(0,4)==="http"?Ue=window.location.protocol:Ue="http:";var ve=je.indexOf("//");ve>0?xe=je:ve===0?xe=Ue+je:xe="https://www.geogebra.org/apps/5.2.814.0/";for(var Ee in pe)if(je.slice(pe[Ee].length*-1)===pe[Ee]||je.slice((pe[Ee].length+1)*-1)===pe[Ee]+"/"){Ge(xe,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Se&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Fe(fe.showToolBar)&&!Fe(fe.showMenuBar)&&!Fe(fe.showAlgebraInput)&&!Fe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?xe+="webSimple/":xe+="web3d/",Ge(xe,!1)},Ge=function(Ce,Je){if(Ce.requirejs){Ae=Ce;return}Ce.slice(-1)!=="/"&&(Ce+="/"),Ae=Ce,Je===null&&(Je=Ce.indexOf("http")===-1),ye=Je,Re="web.nocache.js",Oe=!1;var Se=Ae.split("/");Se.length>1&&(!Je&&Se[Se.length-2]==="webSimple"?(Re="webSimple.nocache.js",Oe=!0):pe.indexOf(Se[Se.length-2])>=0&&(Re=Se[Se.length-2]+".nocache.js")),Se=Ce.split("/"),je=Se[Se.length-3],je.substr(0,4)==="test"?je=je.substr(4,1)+"."+je.substr(5,1):(je.substr(0,3)==="war"||je.substr(0,4)==="beta")&&(je="5.0");var rt=parseFloat(je);rt!==NaN&&rt<5&&Ce.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+rt+" is deprecated. Using version latest instead."),ue("5.0",Je))},wt=function(Ce,Je){window.console&&window.console.log&&(!Je||typeof Je.showLogging=="undefined"||Je.showLogging&&Je.showLogging!=="false")&&console.log(Ce)};fe.material_id!==void 0?$t(lt):lt();function lt(){var Ce=Ht;Xe!==null?Ce=Xe:parseFloat(Ce)<5&&(Ce="5.0"),ue(Ce,!1),Le!==null&&Ge(Le,ye),me=!0}return Nt},GGBAppletUtils=function(){"use strict";function Nt(){return window.GGBT_wsf_edit!==void 0}function Ht(me,Xe){Xe!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+Xe+","+Xe+")",me.style.webkitTransform="scale("+Xe+","+Xe+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function fe(me,Xe,Le,Ke,ke,de){var Ae=null;if(de!=null&&de!="")for(var ye=me.parentNode;ye!=null;)if((" "+ye.className+" ").indexOf(" "+de+" ")>-1){Ae=ye;break}else ye=ye.parentNode;var ut=0,je=0,Re=0,Oe=0,De=0,ot=0,st=0;if(Ae)ut=Ae.offsetWidth,je=Math.max(Ke?Ae.offsetWidth:0,Ae.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ut=Math.min(window.innerWidth,document.documentElement.clientWidth),je=Math.min(window.innerHeight,document.documentElement.clientHeight),Re=ut):(ut=window.innerWidth,je=window.innerHeight,Re=window.innerWidth),me){var St=me.getBoundingClientRect();St.left>0&&St.left<=ut&&(ke===void 0||!ke)&&(document.dir==="rtl"?(De=ut-St.width-St.left,ot=Re<=480?10:30):(ot=St.left,De=Re<=480?10:30),Oe=ot+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var bt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Oe=40,st=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Oe=0,st=40)}}return me&&((Le===void 0||!Le)&&Xe>0&&Xe+Oe<ut?ut=Xe:ut-=Oe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Le===void 0||!Le)&&(je-=st)),{width:ut,height:je}}function ae(me,Xe,Le,Ke,ke){if(me.isScreenshoGenerator)return 1;var de=Ke!==void 0&&Ke,Ae=me.noScaleMargin!=null&&me.noScaleMargin,ye=function(bt){return bt&&bt!=="false"},ut=ye(me.autoHeight),je=fe(Xe,me.width,Le,ut,de&&window.GGBT_wsf_view||Ae,ke),Re=parseInt(je.width),Oe=me.width,De=me.height;if(Oe===void 0){var ot=Xe.querySelector(".appletParameters");ot&&(Oe=ot.offsetWidth,De=ot.offsetHeight)}var st=Re/Oe,St=de?1:je.height/De;return Le!==void 0&&!Le&&(st=Math.min(1,st),St=Math.min(1,St)),Math.min(st,St)}function gt(me,Xe,Le){var Ke=1,ke,de=!1;if(me.hasOwnProperty("allowUpscale")&&(de=me.allowUpscale),me.hasOwnProperty("scale")&&(Ke=parseFloat(me.scale),(isNaN(Ke)||Ke===null||Ke===0)&&(Ke=1),Ke>1&&(de=!0)),Xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))ke=ae(me,Xe,de,Le,me.scaleContainerClass);else return Ke;return de&&(!me.hasOwnProperty("scale")||Ke===1)?ke:Math.min(Ke,ke)}function He(me){var Xe=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=me.getBoundingClientRect(),ke=(Xe-Ke.width)/2,de=(Le-Ke.height)/2;de<0&&(de=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?me.style.left="40px":me.style.left=ke+"px",me.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?me.style.top="40px":me.style.top=de+"px",me.style.left=ke+"px")}function ze(me,Xe){var Le=me.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Xe.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Ke=gt(Xe,me);Nt()&&Le.setAttribute("data-param-scale",Ke);for(var ke=null,de=0;de<me.childNodes.length;de++)if(me.childNodes[de].className!==void 0&&me.childNodes[de].className.match(/^applet_scaler/)){ke=me.childNodes[de];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Ae=Xe.id!==void 0?Xe.id:"ggbApplet",ye=window[Ae];(ye==null||!ye.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ke)&&Ke!==1?(ke.parentNode.style.width=Xe.width*Ke+"px",ke.parentNode.style.height=Xe.height*Ke+"px",Ht(ke,Ke)):(Ht(ke,1),ke.parentNode.style.width=Xe.width+"px",ke.parentNode.style.height=Xe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&He(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Le).parents(".content-added-content"))}}return{responsiveResize:ze,isFlexibleWorksheetEditor:Nt,positionCenter:He,getScale:gt,scaleElement:Ht}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Nt=n.location.search;return Nt.indexOf(J)!=-1||Nt.indexOf(K)!=-1}function q(Nt,Ht){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Nt){var Ht=s[L].bindings;s[L].bindings=function(){for(var fe=Ht?Ht():{},ae=Nt[webModule.__softPermutationId],gt=O;gt<ae.length;gt++){var He=ae[gt];fe[He[O]]=He[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Nt=o.createElement(Q);if(Nt.id=L,Nt.style.cssText=R+S,Nt.tabIndex=-1,o.body.appendChild(Nt),t=Nt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ht=document.compatMode==U?V:W;t.write(Ht+X),t.close()}}}function w(Nt){function Ht(ae){function gt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var He=gt();if(He){ae();return}function ze(){if(!He){if(!gt())return;He=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var me=setInterval(function(){ze()},$)}function fe(ae){var gt=u(),He=gt.body,ze=gt.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=ae,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),He.appendChild(ze)}Ht(function(){fe(Nt)})}webModule.__startLoadingFragment=function(Nt){return C(Nt)},webModule.__installRunAsyncCode=function(Nt){var Ht=u(),fe=Ht.body,ae=Ht.createElement(_);ae.language=ab,ae.text=Nt,fe.appendChild(ae),fe.removeChild(ae)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Nt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Nt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Nt){var Ht=c[Nt];return Ht==null?null:Ht},r=d,webModule.__errFn=e}function B(){function Nt(me){var Xe=me.lastIndexOf(rb);Xe==-1&&(Xe=me.length);var Le=me.indexOf(sb);Le==-1&&(Le=me.length);var Ke=me.lastIndexOf(tb,Math.min(Le,Xe));return Ke>=O?me.substring(O,Ke+P):W}function Ht(me){if(!me.match(/^\w+:\/\//)){var Xe=o.createElement(ub);Xe.src=me+vb,me=Nt(Xe.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function ae(){for(var me=o.getElementsByTagName(_),Xe=O;Xe<me.length;++Xe)if(me[Xe].src.indexOf(xb)!=-1)return Nt(me[Xe].src);return W}function gt(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function He(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var ze=fe();return ze==W&&(ze=ae()),ze==W&&(ze=gt()),ze==W&&He()&&(ze=Nt(o.location.href)),ze=Ht(ze),ze}function C(Nt){return Nt.match(/^\//)||Nt.match(/^[a-zA-Z]+:\/\//)?Nt:webModule.__moduleBase+Nt}function D(){var Nt=[],Ht=O,fe=[],ae=[];function gt(me){var Xe=ae[me](),Le=fe[me];if(Xe in Le)return Xe;var Ke=[];for(var ke in Le)Ke[Le[ke]]=ke;throw r&&r(me,Ke,Xe),null}if(__gwt_isKnownPropertyValue=function(me,Xe){return Xe in fe[me]},webModule.__getPropMap=function(){var me={};for(var Xe in fe)fe.hasOwnProperty(Xe)&&(me[Xe]=gt(Xe));return me},webModule.__computePropValue=gt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var He;try{He=Cb;var ze=He.indexOf(Db);ze!=-1&&(Ht=parseInt(He.substring(ze+P),$),He=He.substring(O,ze))}catch(me){}return webModule.__softPermutationId=Ht,C(He+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},52882:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Ax:function(){return ze},Ds:function(){return me},KI:function(){return Le},SI:function(){return He},f1:function(){return gt}});var ae=fe(26869);function gt(Ke){let ke=!0;if(Ke.length>0){for(let de=0;de<Ke.length;de++)if(Ke[de].compile_success==0||!Ke[de].compile_success){ke=!1;break}}else ke=!1;return ke}function He(Ke,ke=""){let de=[];for(let Ae=0;Ae<Ke.length;Ae++){let ye=Ke[Ae],ut=ke?`${ke}/${ye.name}`:`${ye.name}`;de.push({title:ye.name,type:ye.type,isLeaf:ye.type!=="tree",key:ut})}return de}function ze(Ke,ke,de){for(let Ae=0;Ae<Ke.length;Ae++){let ye=Ke[Ae];if(ye.key===ke){ye.children=de;break}ye.children&&ze(ye.children,ke,de)}return Ke}function me(Ke,ke,de){let Ae;return function(){let ye=this,ut=arguments,je=function(){Ae=null,de||Ke.apply(ye,ut)},Re=de&&!Ae;clearTimeout(Ae),Ae=setTimeout(je,ke),Re&&Ke.apply(ye,ut)}}const Xe=!0,Le=ae.Z.API_SERVER},1986:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Ot}});var ae=fe(59301),gt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},He=fe(92310),ze=fe.n(He),me=fe(29787);var Xe=function(se,te){return(Xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ie){z.__proto__=ie}||function(z,ie){for(var ce in ie)Object.prototype.hasOwnProperty.call(ie,ce)&&(z[ce]=ie[ce])})(se,te)};function Le(se,te){function z(){this.constructor=se}Xe(se,te),se.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Ke(se,te,z,ie){return new(z||(z=Promise))(function(ce,ne){function ge(Ct){try{yt(ie.next(Ct))}catch(Ie){ne(Ie)}}function ht(Ct){try{yt(ie.throw(Ct))}catch(Ie){ne(Ie)}}function yt(Ct){var Ie;Ct.done?ce(Ct.value):(Ie=Ct.value,Ie instanceof z?Ie:new z(function(_t){_t(Ie)})).then(ge,ht)}yt((ie=ie.apply(se,te||[])).next())})}function ke(se,te){var z,ie,ce,ne,ge={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return ne={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function ht(yt){return function(Ct){return function(Ie){if(z)throw new TypeError("Generator is already executing.");for(;ge;)try{if(z=1,ie&&(ce=2&Ie[0]?ie.return:Ie[0]?ie.throw||((ce=ie.return)&&ce.call(ie),0):ie.next)&&!(ce=ce.call(ie,Ie[1])).done)return ce;switch(ie=0,ce&&(Ie=[2&Ie[0],ce.value]),Ie[0]){case 0:case 1:ce=Ie;break;case 4:return ge.label++,{value:Ie[1],done:!1};case 5:ge.label++,ie=Ie[1],Ie=[0];continue;case 7:Ie=ge.ops.pop(),ge.trys.pop();continue;default:if(ce=ge.trys,!((ce=ce.length>0&&ce[ce.length-1])||Ie[0]!==6&&Ie[0]!==2)){ge=0;continue}if(Ie[0]===3&&(!ce||Ie[1]>ce[0]&&Ie[1]<ce[3])){ge.label=Ie[1];break}if(Ie[0]===6&&ge.label<ce[1]){ge.label=ce[1],ce=Ie;break}if(ce&&ge.label<ce[2]){ge.label=ce[2],ge.ops.push(Ie);break}ce[2]&&ge.ops.pop(),ge.trys.pop();continue}Ie=te.call(se,ge)}catch(_t){Ie=[6,_t],ie=0}finally{z=ce=0}if(5&Ie[0])throw Ie[1];return{value:Ie[0]?Ie[1]:void 0,done:!0}}([yt,Ct])}}}function de(){for(var se=0,te=0,z=arguments.length;te<z;te++)se+=arguments[te].length;var ie=Array(se),ce=0;for(te=0;te<z;te++)for(var ne=arguments[te],ge=0,ht=ne.length;ge<ht;ge++,ce++)ie[ce]=ne[ge];return ie}var Ae=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(te,z){for(var ie=0,ce=z;ie<ce.length;ie++){var ne=ce[ie],ge=ne[0],ht=ne[1];te.setAttribute(ge,ht)}},se.createRect=function(te,z,ie){var ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return ce.setAttribute("width",te.toString()),ce.setAttribute("height",z.toString()),ie&&se.setAttributes(ce,ie),ce},se.createLine=function(te,z,ie,ce,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",te.toString()),ge.setAttribute("y1",z.toString()),ge.setAttribute("x2",ie.toString()),ge.setAttribute("y2",ce.toString()),ne&&se.setAttributes(ge,ne),ge},se.createPolygon=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),z&&se.setAttributes(ie,z),ie},se.createCircle=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(te/2).toString()),ie.setAttribute("cy",(te/2).toString()),ie.setAttribute("r",te.toString()),z&&se.setAttributes(ie,z),ie},se.createEllipse=function(te,z,ie){var ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ce.setAttribute("cx",(te/2).toString()),ce.setAttribute("cy",(z/2).toString()),ce.setAttribute("rx",(te/2).toString()),ce.setAttribute("ry",(z/2).toString()),ie&&se.setAttributes(ce,ie),ce},se.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&se.setAttributes(z,te),z},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(te,z,ie,ce,ne,ge,ht){var yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(yt,[["id",te],["orient",z],["markerWidth",ie.toString()],["markerHeight",ce.toString()],["refX",ne.toString()],["refY",ge.toString()]]),yt.appendChild(ht),yt},se.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&se.setAttributes(z,te),z},se.createTSpan=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,z&&se.setAttributes(ie,z),ie},se.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&se.setAttributes(z,te),z},se.createPoint=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=z,ie},se.createPath=function(te,z){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),z&&se.setAttributes(ie,z),ie},se}(),ye=function(){function se(){}return se.addKey=function(te){se.key=te},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),ut=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(te,z,ie){var ce=this;return new Promise(function(ne){var ge=ie!==void 0?ie:document.createElement("canvas");te===null&&(ce.markersOnly=!0,ce.naturalSize=!1);var ht=document.createElementNS("http://www.w3.org/2000/svg","svg");ht.setAttribute("xmlns","http://www.w3.org/2000/svg"),ht.setAttribute("width",z.width.baseVal.valueAsString),ht.setAttribute("height",z.height.baseVal.valueAsString),ht.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),ht.innerHTML=z.innerHTML,ce.naturalSize===!0?(ht.width.baseVal.value=te.naturalWidth,ht.height.baseVal.value=te.naturalHeight):ce.width!==void 0&&ce.height!==void 0&&(ht.width.baseVal.value=ce.width,ht.height.baseVal.value=ce.height),ge.width=ht.width.baseVal.value,ge.height=ht.height.baseVal.value;var yt=ht.outerHTML,Ct=ge.getContext("2d");ce.markersOnly!==!0&&Ct.drawImage(te,0,0,ge.width,ge.height);var Ie=window.URL,_t=new Image(ge.width,ge.height);_t.setAttribute("crossOrigin","anonymous");var Ft=new Blob([yt],{type:"image/svg+xml"}),It=Ie.createObjectURL(Ft);_t.onload=function(){Ct.drawImage(_t,0,0),Ie.revokeObjectURL(It);var un=ge.toDataURL(ce.imageType,ce.imageQuality);ne(un)},_t.src=It})},se}(),je=function(){},Re=function(){function se(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},se.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new Oe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new De("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new De("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Oe=function(se,te){this.selector=se,this.style=te},De=function(se,te){this.localName=se,this.style=te},ot=function(){function se(te,z,ie,ce,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=ie,this.uiStyleSettings=ce,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(te){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ne){var ge=document.createElement("div");ge.className=""+z.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){z.markerToolbarButtonClicked(ge,ne)}),z.buttons.push(ge),z.markerButtons.push(ge)}),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 ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'<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(ce,'<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()},se.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},se.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},se.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")},se.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(te,z,ie){var ce=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){ce.actionToolbarButtonClicked(ne,ie)}),ie){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new De("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 De("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new De("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new De("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 De("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new De("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
padding: `+te+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new De("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},se.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},se.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){z.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},se}(),st=function(){function se(te,z,ie,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=ie,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new De("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 De("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new De("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new De("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new De("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 De("toolbox-panel-row_colors",`
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new De("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
padding: `+z+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new De("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(te){var z,ie,ce=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ge;ne.uiStyleSettings=ce.uiStyleSettings;var ht=document.createElement("div");ht.className=ce.toolboxButtonStyleClass.name+" "+((ge=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ce.toolboxButtonStyleColorsClass.name),ht.innerHTML=ne.icon,ht.title=ne.title,ht.addEventListener("click",function(){ce.panelButtonClick(ne)}),ce.panelButtons.push(ht),ce.buttonRow.appendChild(ht)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(te){var z=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var ce=te.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),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=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var ht,yt;ne.className=z.toolboxButtonStyleClass.name+" "+(ge===ie?""+((ht=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ht!==void 0?ht:z.toolboxActiveButtonStyleColorsClass.name):""+((yt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&yt!==void 0?yt:z.toolboxButtonStyleColorsClass.name))})},se}(),St=function(se,te){this.title=se,this.icon=te},bt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'<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 ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=ie,ge.currentColor=ce,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var ne=z.getColorBox(ce);ie.appendChild(ne),z.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(z){var ie=this,ce=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ce,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=ne-2+"px",ge.style.height=ne-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(ne+2)/2+"px",ge.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){ie.setCurrentColor(z,ge)});var ht=document.createElement("div");return ht.style.display="inline-block",ht.style.width=ne-2+"px",ht.style.height=ne-2+"px",ht.style.backgroundColor=z,ht.style.borderRadius=ne/2+"px",z==="transparent"&&(ht.style.fill=this.uiStyleSettings.toolboxAccentColor,ht.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>`),ge.appendChild(ht),ge},te.prototype.setCurrentColor=function(z,ie){var ce=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(St),ft=function(){function se(te,z,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(te){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(te,z){},se.prototype.dblClick=function(te,z){},se.prototype.manipulate=function(te){},se.prototype.pointerUp=function(te){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},se.prototype.scale=function(te,z){},se.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},se.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),pt=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},se}(),dt=function(){function se(){this.GRIP_SIZE=10,this.visual=Ae.createGroup(),this.visual.appendChild(Ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},se}(),$t=function(){function se(){}return se.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},se.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},se}(),_e=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(Ae.createTransform()),ne.setupControlBox(),ne}return Le(te,se),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var ie=Ae.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint(z);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var ie=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var ie=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var ie=this.manipulationStartLeft,ce=this.manipulationStartWidth,ne=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+z.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+z.y-this.manipulationStartY}ce>=0?(this.left=ie,this.width=ce):(this.left=ie+ce,this.width=-ce),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var ie=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM(),ce=Ae.createPoint(z.x,z.y);return{x:(ce=ce.matrixTransform(ie)).x,y:ce.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM();ie=ie.inverse();var ce=Ae.createPoint(z.x,z.y);return{x:(ce=ce.matrixTransform(ie)).x,y:ce.y}},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Ae.createGroup();var z=Ae.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=Ae.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=Ae.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 pt,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,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()},te.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()},te.prototype.createGrip=function(){var z=new dt;return z.visual.transform.baseVal.appendItem(Ae.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,ie=-z/2,ce=ie,ne=(this.width+this.CB_DISTANCE)/2-z/2,ge=(this.height+this.CB_DISTANCE)/2-z/2,ht=this.height+this.CB_DISTANCE-z/2,yt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ce),this.positionGrip(this.controlGrips.topCenter.visual,ne,ce),this.positionGrip(this.controlGrips.topRight.visual,yt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ge),this.positionGrip(this.controlGrips.centerRight.visual,yt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,ht),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ht),this.positionGrip(this.controlGrips.bottomRight.visual,yt,ht),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ce-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,ie,ce){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:$t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:$t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix($t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix($t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie);var ce=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ce.x*z,y:ce.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*ie,this.adjustControlBox()},te}(ft),tt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=Ae.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)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize()},te.title="Rectangle marker",te}(_e),Lt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=ie,ge.currentWidth=ce,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(ce){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ce===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=ce.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var ht=document.createElement("div");ht.style.minHeight="20px",ht.style.flexGrow="2",ht.style.display="flex",ht.style.alignItems="center";var yt=document.createElement("hr");yt.style.minWidth="20px",yt.style.border="0px",yt.style.borderTop=ce+"px solid "+z.uiStyleSettings.toolboxColor,yt.style.flexGrow="2",ht.appendChild(yt),ne.appendChild(ht),z.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(z,ie){var ce=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(St),Fe=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'<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 ge.styles=[],ge.styleBoxes=[],ge.styles=ie,ge.currentStyle=ce,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(ce){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=ce===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var ht=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ce!==""?'stroke-dasharray="'+ce+'"':"")+` />
</svg>`;ge.innerHTML=ht,ne.appendChild(ge),z.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(z,ie){var ce=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(St),Qe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(tt),Pe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ye=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var ie=this.state;se.prototype.pointerUp.call(this,z),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(z),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new dt;return z.visual.transform.baseVal.appendItem(Ae.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,ie,ce){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.x1=this.x1*z,this.y1=this.y1*ie,this.x2=this.x2*z,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(ft),zt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.selectorLine=Ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ae.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)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.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()),Ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(Ye),kt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'<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 ge.fonts=[],ge.fontBoxes=[],ge.fonts=ie,ge.currentFont=ce,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ce){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=ce===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ce,ge.style.overflow="hidden";var ht=document.createElement("div");ht.style.whiteSpace="nowrap",ht.style.overflow="hidden",ht.style.textOverflow="ellipsis",ht.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(ht),ne.appendChild(ge),z.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(z,ie){var ce=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(St),Tt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=ce.defaultColor,ne.fontFamily=ce.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new bt("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Le(te,se),te.prototype.ownsTarget=function(z){if(se.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(ce){ce===z&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.bgRectangle=Ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ae.createTransform()),this.textElement.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=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(ie){z.textElement.appendChild(Ae.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),ie=1;if(z.width>0&&z.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;ie=Math.min(ce,ne)}return ie},te.prototype.getTextPosition=function(z){var ie=this.textElement.getBBox(),ce=0,ne=0;return ie.width>0&&ie.height>0&&(ce=(this.width-ie.width*z)/2,ne=this.height/2-ie.height*z/2),{x:ce,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),ie=this.getTextScale(),ce=this.getTextPosition(ie);ce.y-=z.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,z),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,z.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var ce=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ce)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),ne={x:ce.width*z,y:ce.height*z};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},te.prototype.dblClick=function(z,ie){se.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&Ae.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&Ae.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var ie=z;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.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>',te}(_e),vt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ce.defaultColor,ne.lineWidth=ce.defaultStrokeWidth,ne.pixelRatio=ce.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new bt("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.drawingImage=Ae.createImage(),this.visual.appendChild(this.drawingImage);var z=Ae.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,ie){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(z.x,z.y),this.drawing=!0):se.prototype.pointerDown.call(this,z,ie)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,z)},te.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)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=ie[0],ne=ie[1],ge=ie[2],ht=ie[3],yt=!1,Ct=0;Ct<this.canvasElement.height;Ct++)for(var Ie=0;Ie<this.canvasElement.width;Ie++)z.data[Ct*this.canvasElement.width*4+4*Ie+3]>0&&(yt=!0,Ct<ne&&(ne=Ct),Ie<ce&&(ce=Ie),Ct>ht&&(ht=Ct),Ie>ge&&(ge=Ie));if(yt){this.left=ce/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ce)/this.pixelRatio,this.height=(ht-ne)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ge-ce,_t.height=ht-ne,_t.getContext("2d").putImageData(this.canvasContext.getImageData(ce,ne,ge-ce,ht-ne),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),se.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.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>',te}(_e),pe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ce||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ce=function(ht){var yt="both";switch(ht){case 0:yt="both";break;case 1:yt="start";break;case 2:yt="end";break;case 3:yt="none"}var Ct=document.createElement("div");if(Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=yt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){z.setCurrentType(yt,Ct)}),ie.appendChild(Ct),yt==="both"||yt==="start"){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.minHeight="20px",Ie.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ie.style.marginLeft="5px",Ct.appendChild(Ie)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var Ft=document.createElement("hr");if(Ft.style.minWidth="20px",Ft.style.border="0px",Ft.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Ft.style.flexGrow="2",_t.appendChild(Ft),Ct.appendChild(_t),yt==="both"||yt==="end"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,It.style.marginRight="5px",Ct.appendChild(It)}ne.typeBoxes.push(Ct)},ne=this,ge=0;ge<4;ge++)ce(ge);return ie},te.prototype.setCurrentType=function(z,ie){var ce=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(St),ue=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new pe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,ie){var ce=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-ce/2+","+(ie+ne/2)+" "+z+","+(ie-ne/2)+" "+(z+ce/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=Ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.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",Ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(zt),Ge=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.fillColor=ce.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new bt("Color",ce.defaultColorSet,ce.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(tt),wt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'<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 ge.opacities=[],ge.opacityBoxes=[],ge.opacities=ie,ge.currentOpacity=ce,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(ce){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ce===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ce+"%",ne.appendChild(ge),z.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(z,ie){var ce=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(St),lt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ce.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ce.defaultHighlightOpacity,ne.fillPanel=new bt("Color",ce.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new wt("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Le(te,se),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.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>',te}(Ge),Ce='<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>',Je='<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>',Se=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=ce.defaultStrokeColor,ne.bgColor=ce.defaultFillColor,ne.fontFamily=ce.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new bt("Text color",ce.defaultColorSet,ne.color,Ce),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new bt("Fill color",ce.defaultColorSet,ne.bgColor,Je),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new dt,ne.tipGrip.visual.transform.baseVal.appendItem(Ae.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Le(te,se),te.prototype.ownsTarget=function(z){return se.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){Ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,ie){this.state==="new"&&se.prototype.pointerDown.call(this,z,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,z,ie)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,z);else{var ie=this.state==="creating";se.prototype.pointerUp.call(this,z),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var ie=this.unrotatePoint(z);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(Ae.setAttributes(this.bgRectangle,[["fill",z]]),Ae.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.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},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var ie=Math.min(this.height/2,15),ce=this.height/5;z&&(this.tipPosition={x:ie+ce/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+ce,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ce,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ce,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-ce},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+ce,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-ce})},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){Ae.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var ie=z;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,se.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*ie},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.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>',te}(Tt),rt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new bt("Line color",de(ce.defaultColorSet,["transparent"]),ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new bt("Fill color",de(ce.defaultColorSet,["transparent"]),ne.fillColor,Je),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new wt("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=Ae.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)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Ae.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.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>',te}(_e),Ue=function(se){function te(z,ie,ce){return se.call(this,z,ie,ce)||this}return Le(te,se),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},te.prototype.createTips=function(){this.tip1=Ae.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(Ae.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ae.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(Ae.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ae.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()]]),Ae.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 z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.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>',te}(zt),xe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokePanel.colors=ce.defaultColorSet,ne.fillColor="transparent",ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.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>',te}(rt),ve=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Ee=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.selectorCurve=Ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ae.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)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=Ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ae.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)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/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()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),se.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,ie){this.curveX=this.curveX*z,this.curveY=this.curveY*ie,se.prototype.scale.call(this,z,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.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>',te}(Ye),qe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.defaultFillColor,ne.textColor=ce.defaultStrokeColor,ne.fontFamily=ce.defaultFontFamily,ne.fontSize=ce.defaultCaptionFontSize,ne.captionText=ce.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new bt("Line color",de(ce.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new bt("Fill color",de(ce.defaultColorSet,["transparent"]),ne.fillColor,Je),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new bt("Text color",ce.defaultColorSet,ne.textColor,Ce),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ae.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ae.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Ae.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ae.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Ae.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var z=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.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&Ae.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&Ae.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Ae.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,ie){se.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&Ae.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&Ae.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&Ae.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&Ae.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},se.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',te}(_e),we=function(){function se(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),Ne=function(se){function te(z,ie,ce){var ne=se.call(this,z,!1)||this;return ne.dataUrl=ie,ne.state=ce,ne}return Le(te,se),te}(we),Ve=function(se){function te(z,ie,ce){ce===void 0&&(ce=!1);var ne=se.call(this,z,ce)||this;return ne.marker=ie,ne}return Le(te,se),te}(we),et=function(){function se(){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 se.prototype.addEventListener=function(te,z){this[te].push(z)},se.prototype.removeEventListener=function(te,z){var ie=this[te].indexOf(z);ie>-1&&this[te].splice(ie,1)},se}(),it=function(){function se(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Pe,this._isOpen=!1,this.undoRedoManager=new ve,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new Re(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,xe,rt,lt,Se,Ue,Ge,zt,Ee,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,rt,lt,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var ce=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ce!==void 0&&z._availableMarkerTypes.push(ce)}else z._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&je.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=je.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new we(te))})},se.prototype.render=function(){return Ke(this,void 0,void 0,function(){var te;return ke(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new ut).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},se.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(ce){var ne=new we(z,!0);ce(ne),ne.defaultPrevented&&(ie=!0)}),ie||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ce){return ce(new we(z))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var te,z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];(te=this._availableMarkerTypes).push.apply(te,z)},se.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},se.prototype.removeRenderEventListener=function(te){},se.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},se.prototype.removeCloseEventListener=function(te){},se.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,ie)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(te,z){this._isResizing=!0;var ie=te/this.imageWidth,ce=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),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(ie,ce),this._isResizing=!1},se.prototype.scaleMarkers=function(te,z){var ie,ce=this;this._currentMarker&&this._currentMarker instanceof Tt?this._currentMarker.scale(te,z):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ce._currentMarker&&ne.scale(te,z)}),ie!==void 0&&this.setCurrentMarker(ie)},se.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"},se.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},se.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)},se.prototype.addDefs=function(){for(var te,z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];this.defs=Ae.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.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)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.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)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.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)},se.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 te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.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>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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 ot(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.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new st(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},se.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())},se.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){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()}},se.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var ne=new Ve(te,te._currentMarker,!0);ce(ne),ne.defaultPrevented&&(z=!0)}),!z){var ie=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(ce){return ce(new Ve(te,ie))})}}},se.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var ht=new Ve(te,void 0,!0);ge(ht),ht.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var ie=function(ge){var ht=ce.markers[ge];ce.setCurrentMarker(ce.markers[ge]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(yt){return yt(new Ve(te,ht))})},ce=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var te;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=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===z.width&&ie.height===z.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),ce<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new we(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new we(te))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new we(te))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new we(te))}))},se.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},se.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},se.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var te,z,ie=this;return ke(this,function(ce){switch(ce.label){case 0:return[4,this.render()];case 1:return te=ce.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Ne(ie,te,z))}),this.close(!0),[2]}})})},se.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return z.markers.push(ie.getState())}),z},se.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(ie){var ce=z._availableMarkerTypes.find(function(ge){return ge.typeName===ie.typeName});if(ce!==void 0){var ne=z.addNewMarker(ce);ne.restoreState(ie),z.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new we(z))})},se.prototype.addNewMarker=function(te){var z=Ae.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(te){var z,ie=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(ce){return ce.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),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(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ce){return ce(new Ve(ie,ie._currentMarker))}))},se.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof vt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(vt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new Ve(z,z._currentMarker))})},se.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},se.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},se.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new Ve(z,te))})},se.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new Ve(z,z._currentMarker))})),this._currentMarker=te,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(ie){return ie(new Ve(z,z._currentMarker))}))},se.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(ie){return ie.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},se.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(ie){return ie.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},se.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},se.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(te,z){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(z-ie.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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()},se.prototype.addLicenseKey=function(te){ye.addKey(te)},se.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},se.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},se.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new we(te))}))},se.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new we(te))}))},se.instanceCounter=0,se}(),We=fe(97013),mt=fe(31735),ct=(se,te,z)=>new Promise((ie,ce)=>{var ne=yt=>{try{ht(z.next(yt))}catch(Ct){ce(Ct)}},ge=yt=>{try{ht(z.throw(yt))}catch(Ct){ce(Ct)}},ht=yt=>yt.done?ie(yt.value):Promise.resolve(yt.value).then(ne,ge);ht((z=z.apply(se,te)).next())}),Ot=({data:se,className:te,fullWidth:z,style:ie={},onClose:ce,onOk:ne,showFullTools:ge,noAssociationId:ht})=>{const yt=(0,ae.useRef)(null),Ct=(0,ae.useRef)(null),Ie=(0,ae.useRef)(null),_t=(0,ae.useRef)(null),[Ft,It]=(0,ae.useState)(!1),[un,kn]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(Ie.current||(Ie.current=document.createElement("style"),document.head.appendChild(Ie.current)),se!=null&&se.visible?(document.body.setAttribute("data-custom","y-hidden"),Ie.current.innerHTML=" html { overflow-y: hidden; }",se!=null&&se.src&&cn()):(document.body.removeAttribute("data-custom"),Ie.current&&(document.head.removeChild(Ie.current),Ie.current=null)),()=>{document.body.removeAttribute("data-custom"),Ie.current&&(document.head.removeChild(Ie.current),Ie.current=null)}),[se==null?void 0:se.visible]);const cn=()=>ct(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,mt.ZJ)(se==null?void 0:se.src);yt.current.src="",yt.current.src=mr,yt.current.onload=function(){_n()},It(!1),kn("")}),wn=mr=>ct(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,We.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:se.title,file:mr.dataUrl}});er!=null&&er.id&&!ht?(yield(0,We.ZP)(`/api/attachments/${se.id}/add_subitem.json`,{method:"post",body:{subitem_id:er==null?void 0:er.id,settings:JSON.stringify(mr.state)}})).status===0&&ne():er!=null&&er.id&&ne(er),It(!1),kn("")}),$n=()=>{const mr=document.querySelector('a[href="https://markerjs.com/"]');mr&&mr.parentNode&&(mr.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(ur=>{const nr=document.querySelector(ur.name);nr&&nr.setAttribute("title",ur.title)})},_n=()=>{Ct.current=new it(yt.current),Ct.current.targetRoot=_t.current,Ct.current.addEventListener("render",wn),Ct.current.addEventListener("beforeclose",ce),ge&&(Ct.current.availableMarkerTypes=Ct.current.ALL_MARKER_TYPES,Ct.current.uiStyleSettings.redoButtonVisible=!0,Ct.current.uiStyleSettings.notesButtonVisible=!0,Ct.current.uiStyleSettings.zoomButtonVisible=!0,Ct.current.uiStyleSettings.zoomOutButtonVisible=!0,Ct.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ct.current.uiStyleSettings,Ct.current.show(),se!=null&&se.snapshotData&&Ct.current.restoreState(se.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$n()},300)};return ae.createElement(ae.Fragment,null,(se==null?void 0:se.visible)&&ae.createElement(me.Z,{spinning:Ft,tip:un,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:_t,className:ze()(gt.imageDimensions,te,z?gt.fullWidth:""),style:ie},ae.createElement("img",{className:gt.img,ref:yt}))))}},50047:function(Nt,Ht,fe){"use strict";var ae=fe(59301),gt=fe(77019),He=fe(5269),ze=fe(20554),me=fe(7939),Xe=fe(59944),Le=fe(40862),Ke=fe(48136),ke=fe(59301);const de=(0,ae.forwardRef)(({callback:Ae,showSaveButton:ye,value:ut=""},je)=>{const Re=(0,ae.useRef)(),Oe=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],De=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],ot=bt=>{Re.current.setValue(Re.current.getValue()+" "+bt.value+" ")},st=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(gt.Z,{className:Le.Z.lists,gutter:[10,10]},Oe.map((bt,ft)=>ke.createElement(He.Z,{flex:"110px",className:Le.Z.item},ke.createElement("div",null,ke.createElement(Xe.Z,{value:`$$${bt.value}$$`}),bt.name),ke.createElement("div",{className:Le.Z.children},bt.children.map((pt,dt)=>ke.createElement("div",{key:dt},ke.createElement("h1",null,pt.name),ke.createElement(gt.Z,{gutter:[10,10]},pt.data.map(($t,_e)=>ke.createElement(He.Z,{key:_e,onClick:()=>ot($t),className:Le.Z.diamond},ke.createElement(Xe.Z,{value:"`$$"+$t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(gt.Z,{className:Le.Z.lists,gutter:[10,10]},De.map((bt,ft)=>ke.createElement(He.Z,{flex:"110px",className:Le.Z.item},ke.createElement("div",null,ke.createElement(Xe.Z,{value:"`$$"+bt.value+"$$`"}),bt.name),ke.createElement("div",{className:Le.Z.children},bt.children.map((pt,dt)=>ke.createElement("div",{key:dt},pt.name&&ke.createElement("h1",null,pt.name),ke.createElement(gt.Z,{gutter:[10,10]},pt.data.map(($t,_e)=>ke.createElement(He.Z,{key:_e,onClick:()=>ot($t),className:Le.Z.diamond},ke.createElement(Xe.Z,{value:"`$$"+$t.value+"$$`"}))))))))))}],St=()=>{var bt=document.createElement("div");bt.innerHTML=Re.current.getValue();var ft=bt.innerText;return Ae&&Ae(ft),ft};return(0,ae.useImperativeHandle)(je,()=>({getData:St})),ke.createElement("div",{className:Le.Z.mathWrap},ke.createElement(ze.default,{defaultActiveKey:"1",items:st}),ke.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Re,style:{width:800,marginTop:30,fontSize:18}},ut||""),ye&&ke.createElement("div",{className:Le.Z.button},ke.createElement(me.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ht.Z=de},59243:function(Nt,Ht,fe){"use strict";var ae=fe(59301),gt=fe(93314),He=fe(7939),ze=Object.defineProperty,me=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,de=(je,Re,Oe)=>Re in je?ze(je,Re,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):je[Re]=Oe,Ae=(je,Re)=>{for(var Oe in Re||(Re={}))Ke.call(Re,Oe)&&de(je,Oe,Re[Oe]);if(Le)for(var Oe of Le(Re))ke.call(Re,Oe)&&de(je,Oe,Re[Oe]);return je},ye=(je,Re)=>me(je,Xe(Re));const ut=({img:je,buttonProps:Re={},styles:Oe={},customText:De,ButtonText:ot,ButtonClick:st,Buttonclass:St,ButtonTwo:bt,imgStyles:ft,loading:pt=!1,className:dt=""})=>ae.createElement("section",{className:`tc animated fadeIn ${dt}`,style:Ae({color:"#999",margin:"100px auto",visibility:pt?"hidden":"visible"},Oe)},ae.createElement("img",{src:je||gt,style:ye(Ae({},ft),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ot&&ae.createElement(He.ZP,Ae({className:St,onClick:st},Re),ot),bt&&bt);Ht.Z=ut},47199:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return St}});var ae=fe(59301),gt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},He=fe(7939),ze=fe(70557),me=fe(58478),Xe=fe(25399),Le=fe(31735),Ke=fe(22167),ke=fe(59243),de=fe(26869),Ae=fe(38609),ye=fe(59301),ut=Object.defineProperty,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,De=(bt,ft,pt)=>ft in bt?ut(bt,ft,{enumerable:!0,configurable:!0,writable:!0,value:pt}):bt[ft]=pt,ot=(bt,ft)=>{for(var pt in ft||(ft={}))Re.call(ft,pt)&&De(bt,pt,ft[pt]);if(je)for(var pt of je(ft))Oe.call(ft,pt)&&De(bt,pt,ft[pt]);return bt},st=(bt,ft,pt)=>new Promise((dt,$t)=>{var _e=Fe=>{try{Lt(pt.next(Fe))}catch(Qe){$t(Qe)}},tt=Fe=>{try{Lt(pt.throw(Fe))}catch(Qe){$t(Qe)}},Lt=Fe=>Fe.done?dt(Fe.value):Promise.resolve(Fe.value).then(_e,tt);Lt((pt=pt.apply(bt,ft)).next())}),St=({editOffice:bt="view",data:ft,issaver:pt,onSaver:dt,theme:$t,type:_e,filename:tt,monacoEditor:Lt,className:Fe,style:Qe,close:Pe,onClose:Ye,hasMask:zt,disabledDownload:kt,onImgDimensions:Tt,showNodata:vt,recordInfo:pe})=>{const[ue,Ge]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,lt]=(0,ae.useState)(""),[Ce,Je]=(0,ae.useState)(),Se=window.ENV==="build"?"/react/build":"",rt=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,xe=10*(1024*1024),ve=(0,ae.useRef)();ft!=null&&ft.startsWith("/api")&&_e!=="txt"&&(ft=de.Z.API_SERVER+ft);const Ee=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();tt&&Lt&&(Lt.filename=tt),(0,ae.useEffect)(()=>{var et,it;const We=(it=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:it.split(";");We==null||We.map(mt=>{let ct=mt.split("=");ct[0]==="_educoder_session"&&lt(ct[1])})},[]),(0,ae.useEffect)(()=>{_e==="office"&&(ft.indexOf("bigfilescdn.")>-1||ft.indexOf("bigfiles1")>-1?Je({url:ft,fileType:Ee(ft),model:ft.indexOf("model=edit")?"edit":"view"}):we())},[_e,ft]);function qe(et){return st(this,null,function*(){et.data.type==="pdfdata"&&(dt(et.data.data),window.removeEventListener("message",qe,!1)),console.log("mess---:",et.data)})}const we=()=>st(void 0,null,function*(){console.log("data:",ft);let et=ft;ft.startsWith("http")||(et=location.origin+et);let it=new URL(et).pathname.split("/").pop();const We=yield(0,Ke.gJ)({attachment_id:it});We.url=rt+We.url,Je(We)}),Ne=()=>{if(ft.startsWith("http")||ft.startsWith("blob:")){Ve();return}(0,Le.Sv)(tt||"educoder",ft,tt)},Ve=()=>{pe&&(0,Ae.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Le.Nd)(tt||"educoder",decodeURIComponent(ft))};return ye.createElement("div",{style:ot({},Qe||{}),className:`${zt&&gt.bgBlack} ${_e?gt.wrp:"hide"}`},Pe&&ye.createElement("div",{className:gt.close,ref:ve},!!Tt&&ye.createElement(Xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:()=>{Ye(),Tt()}},ye.createElement("i",{className:"icon-yulanpizhu"}))),!kt&&ye.createElement(Xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:Ve},ye.createElement("i",{className:"icon-quxiaozhiding"}))),pt&&ye.createElement(Xe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",qe,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ye.createElement("i",{className:"icon-baocun"}))),ye.createElement(Xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{Ye()}},ye.createElement("i",{className:"icon-guanbi1"})))),ye.createElement("div",{className:`${gt[Fe]} ${Fe} ${gt.monaco} ${_e==="txt"?"show":"hide"}`},_e==="txt"&&ye.createElement(ye.Fragment,null,ye.createElement(me.ZP,ot({},Lt)))),_e==="audio"&&ye.createElement("audio",{src:`${(ft==null?void 0:ft.indexOf("http://"))>-1||(ft==null?void 0:ft.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ft}`,autoPlay:!0}),_e==="video"&&ye.createElement(ye.Fragment,null,(ft==null?void 0:ft.indexOf("http"))>-1?ye.createElement("video",{controls:!0,src:`${ft}`,autoPlay:!0}):ye.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ft}`,autoPlay:!0})),_e==="office"&&Ce&&ye.createElement("iframe",{src:`${Se}/office.html?key=${Ce.key}&url=${btoa(Ce.url)}&callbackUrl=${rt+(Ce.callbackUrl||"")}&fileType=${Ce.fileType}&title=${Ce.title||""}&model=${bt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!kt}`}),_e==="html"&&ye.createElement("iframe",{src:ft+"&disposition=inline"}),_e==="pdf"&&pt&&ye.createElement("iframe",{id:"pdfiframe",src:`${Se}/js/pdfview/index.html?filename=${tt||"educoder.pdf"}&url=${encodeURIComponent(ft)}&disabledDownload=${!!kt}&model=${bt}`}),_e==="pdf"&&!pt&&ye.createElement("embed",{className:gt.embed,src:ft+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),_e==="image"&&ye.createElement("img",{src:`${(ft==null?void 0:ft.indexOf("http://"))>-1||(ft==null?void 0:ft.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ft}`}),(_e==="other"||_e==="download")&&ye.createElement(ye.Fragment,null,vt?ye.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ye.createElement(He.ZP,{icon:ye.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ne,disabled:kt},"\u4E0B\u8F7D")}):ye.createElement(He.ZP,{type:"primary",size:"middle",onClick:Ne,disabled:kt},ye.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),_e==="flowChart"&&ye.createElement("div",{className:"embed"},ye.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ft||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},59944:function(Nt,Ht,fe){"use strict";fe.d(Ht,{z:function(){return Lt},Z:function(){return Fe}});var ae=fe(59301),gt=fe(54196),He=fe(58489),ze=fe(64018),me=fe(80360),Xe=fe(26869),Le=fe(31735),Ke=fe(15342),ke=fe(44104),de=fe(7939),Ae=fe(1012),ye=fe(47199),ut=fe(59301),Re=({html:Qe})=>{const Pe=(0,ae.useRef)(null),Ye=(0,ae.useRef)(null),zt=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,ae.useEffect)(()=>{const kt=Pe.current.attachShadow({mode:"open"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=Qe,kt.appendChild(Ye.current);const Tt=document.createElement("style");return Tt.textContent=zt,kt.appendChild(Tt),()=>{kt.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Ye.current&&(Ye.current.innerHTML=Qe)},[Qe]),ut.createElement("div",{ref:Pe})};function Oe(Qe){const Pe=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Ye=new RegExp(`\\b(${Pe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(Ye,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ot=Object.defineProperty,st=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,ft=(Qe,Pe,Ye)=>Pe in Qe?ot(Qe,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Qe[Pe]=Ye,pt=(Qe,Pe)=>{for(var Ye in Pe||(Pe={}))St.call(Pe,Ye)&&ft(Qe,Ye,Pe[Ye]);if(st)for(var Ye of st(Pe))bt.call(Pe,Ye)&&ft(Qe,Ye,Pe[Ye]);return Qe};const dt="@\u2581\u2581@",$t="@\u2581@",_e=/<pre[^>]*>/g;function tt(Qe){let Pe=document.createElement("div");return Pe.innerHTML=Qe,Pe.childNodes.length===0?"":Pe.childNodes[0].nodeValue}const Lt=(Qe,Pe)=>{Qe=Qe||"";const Ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,zt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,kt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Tt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Pe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ye,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(Tt,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/attachments/download/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replace(Ye,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replace(zt,(vt,pe,ue,Ge,wt)=>{const lt=pe||Ge,Ce=ue||wt||"";return'"'+Xe.Z.API_SERVER+"/api/attachments/"+lt+Ce+lt+Ce+"&t="+(0,Le.Jn)(lt,Date.now())}).replace(kt,(vt,pe,ue,Ge,wt)=>{const lt=pe||Ge,Ce=ue||wt||"";return"("+Xe.Z.API_SERVER+"/files/uploads/"+lt+Ce+lt+Ce+"&t="+(0,Le.Jn)(lt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').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,`
`),Qe)};var Fe=({value:Qe="",edit:Pe=!1,className:Ye,showTextOnly:zt,showLines:kt,style:Tt={},stylesPrev:vt={},highlightKeywords:pe,showProgramFill:ue,isProgramFill:Ge,disabledFill:wt=!1,programFillValue:lt,openEditor:Ce=()=>{},onFillChange:Je=Ue=>{},onFillBlur:Se=()=>{},onFillFocus:rt=()=>{}})=>{let Ue=Oe(String(Qe||""));const xe=(0,ae.useRef)(),ve=(0,ae.useRef)(),[Ee,qe]=(0,ae.useState)(""),[we,Ne]=(0,ae.useState)("office"),[Ve,et]=(0,ae.useState)([]),it=(0,ae.useRef)("a"+(0,Ae.Z)()),We={},mt=Ie=>/<style[\s\S]*?>/i.test(Ie||""),ct=(Ie,_t,Ft)=>{const It=document.createElement(Ie===$t?"input":"textarea");It.style.width="100%",It.style.height=Ie===$t?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=_t;const un=Object.keys(We).length;return We[un]=It,`<span class="edu-program-fill-wrap ${Ie===$t?"":"show"}" style="width:${Ie===$t?"600px":"100%"}" title=${Ft||""}><span>${It.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function jt(Ie){return Ie=Ie.replace(/!\[.*?\]\(.*?\)/g,""),Ie=Ie.replace(/\[.*?\]\(.*?\)/g,""),Ie=Ie.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ie=Ie.replace(/<embed.*?>/g,""),Ie=Ie.replace(/<img.*?>/g,""),Ie=Ie.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ie=Ie.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ie=Ie.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ie=Ie.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ie}const Ot=Ie=>!zt&&mt(Ue)?Ie:Ie.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(_t,Ft){let It=Ft.replace(/(\n|\r)/g,"").split("}"),un=[];return It.map(kn=>{kn!=""&&un.push(`.${it.current} ${kn}`)}),`<style>${un.join("}")}</style>`}),se=(0,ae.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;Ue=Ue.replace(cn,"("+Xe.Z.API_SERVER+"/attachments/download/").replace(It,"("+Xe.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Xe.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Xe.Z.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,`
`),xe.current.style.display="none"}catch(It){}if(ue){let It=-1;return Ue=Ue.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++It,ct(un,It,(wn=lt==null?void 0:lt[It])==null?void 0:wn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ot(Ue||"")}</pre>`}let Ie=Ot(Ue);Ie=(0,He.ZP)(Ie);const _t=(0,He.ez)();Ue.match(/\[TOC\]/)&&(Ie=Ie.replace("<p>[TOC]</p>",(0,He.Qv)()),(0,He.Iy)()),Ie=Ie.replace(/(__special_katext_id_\d+__)/g,(It,un)=>{const{type:kn,expression:cn}=_t[un];return(0,Ke.renderToString)(tt(cn)||"",{displayMode:kn==="block",throwOnError:!1,output:"html"})}),Ie=Ie.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,He.AL)();const Ft=document.createElement("div");if(Ft.innerHTML=Ie,zt)return Ft.innerText;if(pe){const It=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ce(Ft,It),Ft.innerHTML}return setTimeout(()=>ht(),500),Ft.innerHTML},[Ue,pe]);(0,ae.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(_t=>{_t.oninput=te,_t.onblur=z,_t.onfocus=ie})},[Ve]),(0,ae.useEffect)(()=>{var Ie,_t,Ft,It,un;if(lt!=null&&lt.length)try{const kn=ne.current.querySelectorAll(".edu-program-fill-score"),cn=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,$n]of cn.entries())$n.value=((Ie=lt==null?void 0:lt[wn])==null?void 0:Ie.value)||"",((_t=lt==null?void 0:lt[wn])==null?void 0:_t.type)==="warning"?$n.className="program-fill-warning":((Ft=lt==null?void 0:lt[wn])==null?void 0:Ft.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of kn.entries())$n.innerHTML=(It=lt==null?void 0:lt[wn])!=null&&It.score?`${(un=lt==null?void 0:lt[wn])==null?void 0:un.score}\u5206`:"";et(lt)}catch(kn){console.log(kn,"error")}},[lt]);const te=Ie=>{Ve[Ie.target.dataset.id]=Ve[Ie.target.dataset.id]||{},Ve[Ie.target.dataset.id].value=Ie.target.value,et([...Ve]),Je(Ve,Ie.target.dataset.id)},z=Ie=>{Ve[Ie.target.dataset.id]=Ve[Ie.target.dataset.id]||{},Ve[Ie.target.dataset.id].value=Ie.target.value,et([...Ve]),Se(Ve,Ie.target.dataset.id)},ie=Ie=>{Ve[Ie.target.dataset.id]=Ve[Ie.target.dataset.id]||{},Ve[Ie.target.dataset.id].value=Ie.target.value,et([...Ve]),rt(Ve,Ie.target.dataset.id)};function ce(Ie,_t){return Ie.childNodes.forEach(Ft=>{var It;if(Ft.childNodes.length>0)ce(Ft,_t);else if(Ft.nodeName!=="IMG")if(Ft.innerHTML)Ft.innerHTML=(It=Ft.innerHTML)==null?void 0:It.replace(new RegExp(_t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Ft.textContent.replace(new RegExp(_t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ft.replaceWith(un)}})}const ne=(0,ae.useRef)();He.jb.WebkitLineClamp=kt,kt&&(Tt=pt(pt({},Tt),He.jb));function ge(Ie){let _t=Ie.target;if(_t.tagName.toUpperCase()==="A"){let Ft=_t.getAttribute("href");if(Ft.indexOf("office")>-1)Ie.preventDefault(),qe(Ft),Ne("office");else if(Ft.indexOf("application/pdf")>-1)Ie.preventDefault(),qe(Ft),Ne("pdf");else if(Ft.indexOf("text/html")>-1)Ie.preventDefault(),qe(Ft),Ne("html");else if(Ft.startsWith("#")){Ie.preventDefault();let It=document.getElementById(Ft.replace("#",""));It&&It.scrollIntoView(!0)}}}const ht=()=>{var Ie;const _t=(Ie=ne.current)==null?void 0:Ie.querySelectorAll("video");_t==null||_t.forEach(Ft=>{if(Ft.oncontextmenu=()=>!1,Ft.src.indexOf(".m3u8")>-1&&!Ft.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var It=new me.ZP;It.loadSource(Ft.src),It.attachMedia(Ft)}}})};(0,ae.useEffect)(()=>{if(ne.current&&se&&se.match(_e)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ge),()=>{var Ie;(Ie=ne.current)==null||Ie.removeEventListener("click",ge),(0,He.AL)(),(0,He.Iy)()}},[se,ne.current,ge]);const yt=Ie=>{Ie.target.nodeName==="IMG"&&Ie.target.className.indexOf("draw-flowchart")>-1?(xe.current.style.zIndex=1,xe.current.style.display="flex",xe.current.style.width=Ie.target.clientWidth+"px",xe.current.style.height=Ie.target.clientHeight+"px",xe.current.style.top=Ie.target.offsetTop+"px",xe.current.style.left=Ie.target.offsetLeft+"px",Ie.target.id&&(ve.current=Ie.target.id)):xe.current.style.display="none"},Ct=()=>{xe.current.style.display="none"};return(0,ae.useEffect)(()=>{var Ie;const _t=Ft=>{Ft.preventDefault(),Ft.clipboardData.setData("text",window.getSelection().toString())};return(Ie=ne.current)==null||Ie.addEventListener("copy",_t),()=>{var Ft;(Ft=ne.current)==null||Ft.removeEventListener("copy",_t)}},[ne.current]),ae.createElement("div",{style:{position:"relative"},onMouseLeave:Ct},zt&&ae.createElement("div",{ref:ne,className:`${De.mdBody} `},se),!zt&&!mt(se)&&ae.createElement("div",{ref:ne,style:pt({},Tt),onMouseOver:yt,className:`${Ye||""} ${wt?"disabled-fill":""} markdown-body ${De.mdBody} ${it.current}`,dangerouslySetInnerHTML:{__html:se}}),!zt&&mt(se)&&ae.createElement(Re,{html:se}),ae.createElement("div",{ref:xe,className:`${De.button} ${Pe?"":De.previewFlowChart}`},ae.createElement(ke.Z,null,ae.createElement(de.ZP,{onClick:()=>{Pe?Ce(ve.current):(qe(ve.current),Ne("flowChart"))}},Pe?"\u7F16\u8F91":"\u9884\u89C8"))),ae.createElement(ye.Z,{close:!0,data:Ee,type:Ee!=null&&Ee.length?we:"",style:pt({},vt),onClose:()=>qe("")}))}},52504:function(Nt,Ht,fe){"use strict";fe.d(Ht,{h:function(){return bt},Z:function(){return St}});var ae=fe(59301),gt=fe(82326),He=fe(28284),ze=fe(7939),me=fe(89780),Xe=fe.n(me),Le=fe(2018),Ke=Object.defineProperty,ke=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,je=(ft,pt,dt)=>pt in ft?Ke(ft,pt,{enumerable:!0,configurable:!0,writable:!0,value:dt}):ft[pt]=dt,Re=(ft,pt)=>{for(var dt in pt||(pt={}))ye.call(pt,dt)&&je(ft,dt,pt[dt]);if(Ae)for(var dt of Ae(pt))ut.call(pt,dt)&&je(ft,dt,pt[dt]);return ft},Oe=(ft,pt)=>ke(ft,de(pt));const De=gt.default.Option,ot={labelCol:{span:4},wrapperCol:{span:20}},st={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"]};var St=({callback:ft,onCancel:pt})=>{const[dt,$t]=(0,ae.useState)("python");function _e(Lt){$t(st[Lt][1])}function tt(Lt){ft(Lt)}return ae.createElement(He.default,Oe(Re({},ot),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:tt,style:{width:500}}),ae.createElement(He.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement(gt.default,{getPopupContainer:Lt=>Lt.parentNode,onChange:_e},Object.keys(st).map(Lt=>ae.createElement(De,{key:Lt,value:Lt},st[Lt][0])))),ae.createElement(He.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(bt,{mode:dt})),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(ze.ZP,{type:"ghost",onClick:pt},"\u53D6\u6D88")))};function bt({value:ft,onChange:pt,mode:dt,options:$t={}}){const _e=(0,ae.useRef)(),[tt,Lt]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if(tt){let Fe=function(Qe){const Pe=Qe.getValue();pt&&pt(Pe)};return tt.on("change",Fe),()=>{tt.off("change",Fe)}}},[tt,pt]),(0,ae.useEffect)(()=>{tt&&tt.setOption("mode",dt)},[tt,dt]),(0,ae.useEffect)(()=>{tt&&(ft!==tt.getValue()||ft==="")&&setTimeout(()=>{tt.setValue(ft||"")},300)},[tt,ft]),(0,ae.useEffect)(()=>{if(_e.current&&!tt){const Fe=Xe().fromTextArea(_e.current,Re({mode:dt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},$t));Lt(Fe)}},[_e.current,tt]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:_e}))}},77834:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return xr}});var ae=fe(59301),gt=fe(58106),He=fe(89780),ze=fe.n(He),me=fe(76374),Xe=fe(2018),Le=fe(6313),Ke=fe(25717),ke=fe(99498),de=fe(25419),Ae=fe(67549),ye=fe(59944),ut=({value:Kt="",className:pn,showTextOnly:En,showLines:An,style:Jn={}})=>{const tr=(0,ae.useMemo)(()=>"",[Kt]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},je=Object.defineProperty,Re=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,St=(Kt,pn,En)=>pn in Kt?je(Kt,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Kt[pn]=En,bt=(Kt,pn)=>{for(var En in pn||(pn={}))ot.call(pn,En)&&St(Kt,En,pn[En]);if(De)for(var En of De(pn))st.call(pn,En)&&St(Kt,En,pn[En]);return Kt},ft=(Kt,pn)=>Re(Kt,Oe(pn));let pt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function dt({onActionCallback:Kt,title:pn,icon:En,actionName:An,className:Jn="",children:tr}){function dr(){Kt(An)}return ae.createElement("a",{title:pn,className:Jn,onClick:dr},ae.createElement("i",{className:`${En}`}),tr)}var $t=({watch:Kt,showNullButton:pn,showNullProgramButton:En,onActionCallback:An,fullScreen:Jn,insertTemp:tr,hidetoolBar:dr,extraUse:Zn})=>{const Rn=[...pt,{title:`${Kt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Kt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!dr&&Rn.map((hr,Vt)=>ae.createElement("li",{key:Vt},hr.actionName?ae.createElement(dt,ft(bt({},hr),{onActionCallback:An})):ae.createElement("span",{className:"v-line"}))),pn?ae.createElement("li",null,ae.createElement(dt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:An},ae.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,En?ae.createElement(ae.Fragment,null,ae.createElement("li",null,ae.createElement(dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:An},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(dt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:An},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&ae.createElement("li",null,ae.createElement(dt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:An},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Zn&&ae.createElement("li",null,Zn),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(dt,{icon:`${Jn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Jn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:An})))},_e=fe(35990),tt=fe(28284),Lt=fe(37568),Fe=fe(7939),Qe=Object.defineProperty,Pe=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,vt=(Kt,pn,En)=>pn in Kt?Qe(Kt,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Kt[pn]=En,pe=(Kt,pn)=>{for(var En in pn||(pn={}))kt.call(pn,En)&&vt(Kt,En,pn[En]);if(zt)for(var En of zt(pn))Tt.call(pn,En)&&vt(Kt,En,pn[En]);return Kt},ue=(Kt,pn)=>Pe(Kt,Ye(pn));const Ge={labelCol:{span:4},wrapperCol:{span:20}};var wt=({callback:Kt,onCancel:pn})=>{function En(An){Kt(An)}return ae.createElement(tt.default,ue(pe({},Ge),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:En,style:{width:500}}),ae.createElement(tt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(Lt.default,null)),ae.createElement(tt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(Lt.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Fe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},lt=fe(52504),Ce=fe(82441),Je=fe(62957),Se=fe(77019),rt=fe(1986),Ue=fe(59301),xe=({callback:Kt,onCancel:pn})=>{const En=document.createElement("canvas"),An=En.getContext("2d");En.width=1e3,En.height=800,An.fillStyle="#ffffff",An.fillRect(0,0,En.width,En.height);const Jn=En.toDataURL("image/png");return Ue.createElement(Je.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ue.createElement(Se.Z,{style:{height:"100vh"}},Ue.createElement(rt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Jn,visible:!0,title:String(Date.now())},onOk:tr=>{Kt({src:tr.url})},onClose:pn})))},ve=fe(30641),Ee=fe(5269),qe=fe(6767),we={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},Ne=fe(59301),et=(0,ae.forwardRef)(({onCancel:Kt,editImgId:pn,callback:En},An)=>{let Jn=(0,ae.useRef)(),tr=(0,ae.useRef)(),dr=(0,ae.useRef)(),Zn=(0,ae.useRef)(!1);const Rn=(0,ae.useRef)(!1);console.log("ref:",An);const[hr,Vt]=(0,ae.useState)(0),[at,Qt]=(0,ae.useState)("100vh");return(0,ae.useEffect)(()=>{Vt(1)},[]),(0,ae.useImperativeHandle)(An,()=>({setHeight:Qt})),Ne.createElement("div",{ref:Rn,className:"body-overflow-initial"},Ne.createElement(ve.Z,{width:"100vw",height:at,footer:null,closable:!0,placement:"bottom",open:!!hr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${we.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{En({src:`/api/attachments/${Cn}`,id:Cn})})},title:Ne.createElement(Se.Z,{align:"middle"},Ne.createElement(Ee.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ne.createElement(Ee.Z,{onClick:()=>{Qt(at==="60px"?"100vh":"60px")}},Ne.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Ne.createElement(Ee.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){qe.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}qe.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),En({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},Ne.createElement(Fe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Ne.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${pn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:tr})))}),it=fe(26869),We=fe(47889),mt=fe(71051);const ct=We.ZP.Group,jt={margin:"0 8px"};var Ot=({callback:Kt,onCancel:pn})=>{function En(An){Kt(An)}return ae.createElement(tt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:En},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:jt},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:jt},"\u884C\u6570"),ae.createElement(tt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(mt.Z,null)),ae.createElement("span",{style:jt},"\u5217\u6570"),ae.createElement(tt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(mt.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:jt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(tt.default.Item,{name:"align"},ae.createElement(ct,null,ae.createElement(We.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(We.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(We.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(We.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Fe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},se=fe(71411),te=fe(75544),z=fe.n(te),ce=(0,ae.forwardRef)(({use3d:Kt,width:pn,height:En,callback:An,showSaveButton:Jn},tr)=>{const dr=(0,ae.useRef)(),Zn=(0,ae.useRef)(),[Rn,hr]=(0,ae.useState)(!1),Vt=(0,ae.useRef)({id:dr,appName:"graphing",width:pn||1e3,height:En||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ae.useEffect)(()=>{Zn.current=new(z())(Vt.current,!0),window.onload=function(){Zn.current.inject("applet_container")}},[]);const at=()=>{var Qt=window.ggbApplet.getPNGBase64(1,!0,72);return An&&An(Qt),Qt};return(0,ae.useEffect)(()=>{Vt.current.appName=Rn?"3D":"graphing",Zn.current.inject("applet_container")},[Rn]),(0,ae.useEffect)(()=>{hr(Kt)},[Kt]),(0,ae.useImperativeHandle)(tr,()=>({getImgData:at})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dr}),ae.createElement(Se.Z,{align:"middle"},ae.createElement(Ee.Z,{flex:1},ae.createElement(se.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Rn,onChange:Qt=>hr(Qt)})),ae.createElement(Ee.Z,null,ae.createElement(Fe.ZP,{size:"large",onClick:at,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(50047);const ge="link",ht="upload-image",yt="add-flowchart",Ct="draw-image",Ie="add-flowchart",_t="code-block",Ft="add-table",It="------------",un={default:It,left:`:${It}`,center:`:${It}:`,right:`${It}:`};var kn=fe(61904),cn=fe(31735);function wn(){}let $n=0;const _n=1e4,mr="\u2581",er="@\u2581\u2581@",ur="@\u2581@",nr=`
**\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`,In=["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"];function rr(Kt){return/^\d+$/.test(Kt)?`${Kt}px`:Kt}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},Kn={[ge]:"\u6DFB\u52A0\u94FE\u63A5",[_t]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ht]:"\u6DFB\u52A0\u56FE\u7247",[Ct]:"\u6DFB\u52A0\u753B\u56FE",[yt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ft]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var xr=({defaultValue:Kt="",onChange:pn,width:En="100%",height:An=400,miniToolbar:Jn=!1,isFocus:tr=!1,watch:dr,insertTemp:Zn,mode:Rn="markdown",id:hr="markdown-editor-id",showResizeBar:Vt=!1,noStorage:at=!1,showNullButton:Qt=!1,showNullProgramButton:Cn=!1,hidetoolBar:Gn=!1,fullScreen:Te=!1,onBlur:Be,onCMBeforeChange:Pt,onFullScreen:Et,className:Ze="",disablePaste:Dt=!1,disabled:Xt=!1,disabledFill:tn=!1,placeholder:hn="",values:Zt="",extraUse:qt,onAddBlank:At})=>{const[xt,en]=(0,ae.useState)(null),[vn,mn]=(0,ae.useState)(Kt),[xn,Wn]=(0,ae.useState)(dr),[Yn,dn]=(0,ae.useState)(Te),[Gt,gn]=(0,ae.useState)(""),[nn,Hn]=(0,ae.useState)(0),[wr,Qn]=(0,ae.useState)(An),[Lr,Mr]=(0,ae.useState)(!1),[Cr,ir]=(0,ae.useState)(0),[Nr,gr]=(0,ae.useState)(0),or=(0,ae.useRef)(),Er=(0,ae.useRef)(),Ar=(0,ae.useRef)(),pr=(0,ae.useRef)(),qn=(0,ae.useRef)(),jn=(0,ae.useRef)(),Br=(0,gt.useDispatch)();(0,ae.useEffect)(()=>{const Ut=window.scrollY||window.pageYOffset;mn(Zt),xt==null||xt.setValue(Zt),window.scrollTo(0,Ut)},[Zt]),(0,ae.useEffect)(()=>{Et==null||Et(Yn)},[Yn]),(0,ae.useEffect)(()=>{if(or.current){let Ut=function(rn,ln){var Mn;if(Dt){ln.preventDefault();return}const sr=ln.clipboardData;if(sr){const Vn=sr.types.toString(),yr=sr.items;if(Vn==="Files"||sr.types.indexOf("Files")>-1){if(ln.preventDefault(),Rn=="stex")return;try{let br=yr[1];((Mn=yr[0])==null?void 0:Mn.kind)==="file"&&(br=yr[0]);const Sr=br.getAsFile(),zr=Sr.name.split(".").pop();(0,Ce.I)(Sr,Tr=>{var Wr,ei,Li;Tr.id?((Wr=Sr==null?void 0:Sr.type)==null?void 0:Wr.indexOf("image"))>-1?Rt.replaceSelection(`<img width="100%" src="/api/attachments/${Tr.id}?type=${Tr.content_type})" alt="" />`):((ei=Sr==null?void 0:Sr.type)==null?void 0:ei.indexOf("video"))>-1?Rt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Tr.id}"></video>`):((Li=Sr==null?void 0:Sr.type)==null?void 0:Li.indexOf("pdf"))>-1?Rt.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=${Sr.type}&disposition=inline" target="_blank">${Sr.name}</a>`):In.includes(zr)?Rt.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=office&disposition=inline" target="_blank">${Sr.name}</a>`):Rt.replaceSelection(`[${Sr.name}](/api/attachments/${Tr.id}?type=${Tr.content_type})`):(Tr==null?void 0:Tr.status)===401&&(document.location.href="/user/login")})}catch(br){qe.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Rt=ze().fromTextArea(or.current,{mode:Rn,lineNumbers:!Jn,lineWrapping:!0,value:Kt,autoCloseTags:!0,autoCloseBrackets:!0});return Rt.on("keyup",function(rn,ln){ln.keyCode===8&&(rn.getValue()==""?Rt.setOption("placeholder",hn):Rt.setOption("placeholder",null))}),Rt.on("keydown",function(rn,ln){if(ln.keyCode===8){var Mn=Jr(rn);Mn&&ln.preventDefault()}}),tr&&Rt.focus(),Rt.on("paste",Ut),Xt&&Rt.on("beforeChange",function(rn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),en(Rt),()=>{Rt.off("paste",Ut)}}},[]);const Vr=(0,ae.useCallback)(()=>{if(Er.current)try{}catch(Ut){console.log(Ut,"---- to set md editor body height")}},[wr,Er,Yn]);(0,ae.useEffect)(()=>{function Ut(){let Rt=new me.Z(rn=>{for(let ln of rn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Vr(),xt.setSize("100%","100%"),xt.refresh())});return Rt.observe(or.current.parentElement),Rt}if(xt){const Rt=Ut();return()=>{var rn,ln;(rn=or.current)!=null&&rn.parentElement&&Rt.unobserve((ln=or.current)==null?void 0:ln.parentElement)}}},[xt,Vr]),(0,ae.useEffect)(()=>{if(xt){let Ut=[];for(const[Rt,rn]of Object.entries(Xn)){let ln={[Rt]:()=>{Dr(rn)}};Ut.push(ln),xt.addKeyMap(ln)}return()=>{for(let Rt of Ut)xt.removeKeyMap(Rt)}}},[xt]),(0,ae.useEffect)(()=>{Te!==Yn&&dn(Te)},[Te]),(0,kn.Z)(()=>{if(!at&&nn>0){let Ut=new Date().getTime(),Rt=window.sessionStorage.getItem(hr);Ut>=nn+_n&&(!Rt||Rt!==vn)&&(window.sessionStorage.setItem(hr,vn),Mr(!0))}},_n),(0,ae.useEffect)(()=>{Wn(dr)},[xt,dr]),(0,ae.useEffect)(()=>{xt&&tr&&xt.focus()},[xt,tr]),(0,ae.useEffect)(()=>{if(xn&&xt){let Ut=function(rn){let ln=rn.target;if(pr.current){let Mn=ln.scrollTop/ln.scrollHeight;pr.current.scrollTop=pr.current.scrollHeight*Mn}};const Rt=xt.getScrollerElement();return Rt.addEventListener("scroll",Ut),()=>{Rt.removeEventListener("scroll",Ut)}}},[xt,xn]),(0,ae.useEffect)(()=>{if(xt&&Pt){let Ut=function(Rt,rn){Pt(Rt,rn)};return xt.on("beforeChange",Ut),()=>{xt.off("beforeChange",Ut)}}},[xt,Pt]),(0,ae.useEffect)(()=>{if(xt&&Be){let Ut=function(){Be(xt.getValue())};return xt.on("blur",Ut),()=>{xt.off("blur",Ut)}}},[xt,Be]);function Jr(Ut,Rt){var rn=Ut.getDoc(),ln=rn.getCursor(),Mn=rn.getLine(ln.line),sr=Mn.charAt(ln.ch-1),Vn=Mn.lastIndexOf("@\u2581@",ln.ch),yr=Mn.lastIndexOf("@\u2581\u2581@",ln.ch),br=Vn>yr?Vn:yr,Sr=Vn>yr?3:4;if(er.indexOf(sr)===-1)return null;if(console.log("change1:",Rt,Ut,Mn,ln,br,Vn,yr,sr),br>=0&&ln.ch-br<5){var zr=br+Sr;return rn.replaceRange("",{line:ln.line,ch:br},{line:ln.line,ch:zr}),{line:ln.line,ch:zr}}return null}(0,ae.useEffect)(()=>{if(xt){let Ut=function(Rt,rn){const ln=Rt.getValue();mn(ln),Hn(new Date().getTime()),Rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(ln,Yt(ln)):pn(ln))};return xt.on("change",Ut),()=>{xt.off("change",Ut)}}},[xt,pn]),(0,ae.useEffect)(()=>{if(xt)if(Kt==null)xt.setValue(""),mn("");else{const Ut=window.scrollY||window.pageYOffset;Kt!==xt.getValue()&&(xt.setValue(Kt),mn(Kt),xt.setCursor(Xt?1:xt.lineCount(),0),window.scrollTo(0,Ut))}},[xt,Kt]);const Dr=(0,ae.useCallback)(Ut=>{const Rt=xt.getCursor(),rn=xt.getSelection();let ln=rn.split(`
`);switch(Ut){case"bold":return xt.replaceSelection("**"+rn+"**"),rn===""&&xt.setCursor(Rt.line,Rt.ch+2),xt.focus();case"italic":return xt.replaceSelection("*"+rn+"*"),rn===""&&xt.setCursor(Rt.line,Rt.ch+1),xt.focus();case"code":return xt.replaceSelection("`"+rn+"`"),rn===""&&xt.setCursor(Rt.line,Rt.ch+1),xt.focus();case"inline-latex":return(0,cn.Ye)(Br)?void 0:(gn("inline-latex"),xt.focus());case"latex":return xt.replaceSelection("```latex\n"+rn+"\n```"),xt.setCursor(Rt.line+1,rn.length+1),xt.focus();case"line-break":return xt.replaceSelection(`<br/>
`),xt.focus();case"list-ul":return rn===""?xt.replaceSelection("- "+rn):xt.replaceSelection(ln.map(Mn=>Mn===""?"":`- ${Mn}`).join(`
`)),xt.focus();case"list-ol":return rn===""?xt.replaceSelection("1. "+rn):xt.replaceSelection(ln.map((Mn,sr)=>Mn===""?"":`${sr+1}. ${Mn}`).join(`
`)),xt.focus();case"add-null-ch":At==null||At();return;case"add-signal":return rn===""&&xt.setCursor(Rt.line,Rt.ch),xt.replaceSelection(ur),xt.focus();case"add-multiple":return rn===""&&xt.setCursor(Rt.line,Rt.ch),xt.replaceSelection(er),xt.focus();case"inster-template-1":return rn===""&&xt.setCursor(Rt.line,Rt.ch),xt.replaceSelection(nr),xt.focus();case"eraser":return xt.setValue(""),xt.focus();case"trigger-watch":return Wn(!xn),xt.focus();case"trigger-full-screen":return dn(!Yn),xt.focus();case ge:gn(ge);return;case _t:gn(_t);return;case ht:gn(ht);return;case Ct:gn(Ct);return;case"maths-latex":if((0,cn.Ye)(Br))return;gn("maths-latex");return;case yt:qn.current="",sessionStorage.removeItem("file_id"),gn(yt);return;case Ft:gn(Ft);return;default:throw new Error}},[xt,xn,Yn]),Hr=(0,ae.useCallback)((Ut,Rt)=>{var rn,ln,Mn,sr,Vn,yr;Ut!=null&&Ut.disabledClose||gn("");const{src:br,alt:Sr,id:zr}=Ut||{};switch(Gt){case ge:const{title:Oi,link:xi}=Ut;return xt.replaceSelection(`[${Oi}](${xi})`),xt.focus();case _t:const{language:vi,content:Xi}=Ut;return xt.replaceSelection(["```"+vi,Xi,"```"].join(`
`)),xt.focus();case"maths-latex":for(var Tr=atob(Ut),Wr=new Uint8Array(Tr.length),ei=0;ei<Tr.length;ei++)Wr[ei]=Tr.charCodeAt(ei);var Li=new Blob([Wr],{type:"image/png"});(0,Ce.I)(Li,mi=>{mi.id?xt.replaceSelection(`![,](/api/attachments/${mi.id}?type=${mi.content_type})`):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,cn.Ye)(Br))return;xt.replaceSelection("`$$"+Ut+"$$`");break;case Ie:if(!zr)return;xt.getValue().indexOf(br)===-1?xt.replaceSelection(`<center><img id="${zr}" width="80%" src="${br}" class="draw-flowchart" alt="${Sr||""}" /></center>`):document.getElementById(zr).src=it.Z.API_SERVER+br+"?t="+Date.now();break;case ht:case Ct:const fr=Rt,to=(Mn=(ln=(rn=fr==null?void 0:fr.name)==null?void 0:rn.split("."))==null?void 0:ln.pop)==null?void 0:Mn.call(ln);return((sr=fr==null?void 0:fr.type)==null?void 0:sr.indexOf("image"))>-1||!(fr!=null&&fr.type)?fr!=null&&fr.align||fr!=null&&fr.width?xt.replaceSelection(`<p style="text-align:${fr.align||"initial"}"><img width="${fr.width?fr.width+"%":"initial"}" src="${br}" alt="${Sr||""}" /></p>`):xt.replaceSelection(`<img width="100%" src="${br}" alt="${Sr||""}" />`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?xt.replaceSelection(`<video width="100%" controls src="${br}"></video>`):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?xt.replaceSelection(`<a href="${br}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):In.includes(to)?xt.replaceSelection(`<a href="${br}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):xt.replaceSelection(`[${fr.name}](${br})`),xt.focus();case Ft:const{row:ti,col:Fi,align:ao}=Ut;let Ji=`
`;for(let mi=0;mi<ti;mi++){let Ni=[],_r=[];for(let Wi=0;Wi<Fi;Wi++)mi===1&&_r.push(un[ao]),Ni.push(" ");mi===1&&(Ji+=`| ${_r.join(" | ")} |
`),Ji+=`| ${Ni.join(Fi===1?"":" | ")} |
`}return xt.replaceSelection(Ji+`
`),xt.focus();default:throw new Error}},[xt,Gt]),Fr=(0,ae.useMemo)(()=>{switch(Gt){case ge:return ae.createElement(wt,{callback:Hr,onCancel:Zr});case _t:return ae.createElement(lt.Z,{callback:Hr,onCancel:Zr});case ht:return ae.createElement(Ce.Z,{callback:Hr,onCancel:Zr});case yt:return ae.createElement(et,{editImgId:qn.current,callback:Hr,onCancel:Zr});case Ft:return ae.createElement(Ot,{callback:Hr,onCancel:Zr});case"maths-latex":return ae.createElement(ce,{showSaveButton:!0,callback:Hr});case"inline-latex":return ae.createElement(ne.Z,{showSaveButton:!0,callback:Hr});default:return null}},[Gt]);function Zr(){gn("")}(0,ae.useEffect)(()=>{if(Ar.current){let Ut=function(Vn){Mn=!0,sr=Vn.pageY},Rt=function(){Mn=!1},rn=function(Vn){if(Mn){let yr=Vn.pageY-sr;yr<0&&(yr=0),yr>300&&(yr=300);let br=An+yr+"px";Qn(br)}},ln=Ar.current,Mn=!1,sr=0;return ln.addEventListener("mousedown",Ut),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",Rt),()=>{ln.removeEventListener("mousedown",Ut),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",Rt)}}},[xt,Ar]),(0,ae.useEffect)(()=>{Qn(An)},[An]);const ii=rr(En),Or=rr(wr),Nn={width:ii,height:Or},Wt=(0,ae.useMemo)(()=>{if(nn){let Ut=new Date(nn),Rt=Ut.getHours(),rn=Ut.getMinutes(),ln=Ut.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${Rt}:${rn}:${ln}`}return 0},[nn]),Yt=Ut=>{const Rt=[];if(Cn){let rn=-1;Ut=Ut.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){Rt.push({multiLine:ln!==ur})})}return Rt};function yn(){window.sessionStorage.removeItem(hr),Mr(!1),Hn(0)}function on(){Mr(!1),Hn(0),xt.setValue(window.sessionStorage.getItem(hr))}(0,ae.useEffect)(()=>{Kn[Gt]&&Gt!==Ct&&Gt!==yt&&setTimeout(()=>{const Ut=document.getElementsByClassName("markdown-popup-form")[0],Rt=window.innerWidth/2-Ut.offsetWidth/2,rn=window.innerHeight/2-Ut.offsetHeight/2;ir(Rt),gr(rn)},0)},[Gt]);const Dn=Ut=>{Ut.preventDefault();const Rt=Ut.clientX-Cr,rn=Ut.clientY-Nr;document.body.onmousemove=ln=>{let Mn=ln.clientX-Rt,sr=ln.clientY-rn;const Vn=document.getElementsByClassName("markdown-popup-form")[0],yr=window.innerWidth-Vn.offsetWidth,br=window.innerHeight-Vn.offsetHeight;Mn=Math.max(0,Math.min(Mn,yr)),sr=Math.max(0,Math.min(sr,br)),ar(ln.clientX,ln.clientY,Rt,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Ut,Rt,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Ut<20&&rn>Ut||Ut>sr-20&&rn<Ut||Rt<20&&ln>Rt||Rt>Mn-20&&ln<Rt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:Er},ae.createElement("div",{className:`markdown-editor-container ${Ze} ${xn?"on-preview":""} ${Jn?"mini":""} ${Yn?"full-screen":""}`,style:Nn},ae.createElement($t,{insertTemp:Zn,watch:xn,fullScreen:Yn,showNullButton:Qt,showNullProgramButton:Cn,onActionCallback:Dr,hidetoolBar:Gn,extraUse:qt}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:or,placeholder:hn})),xn?ae.createElement("div",{ref:pr,className:"preview-container"},Rn==="stex"&&ae.createElement(ut,{value:vn}),Rn!=="stex"&&ae.createElement(ye.Z,{edit:!0,disabledFill:tn,showProgramFill:Cn,value:vn,openEditor:Ut=>{var Rt;qn.current=Ut,(Rt=jn.current)==null||Rt.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),Vt?ae.createElement("a",{ref:Ar,className:"editor-resize"}):null,Gt===Ct&&ae.createElement(xe,{callback:Hr,onCancel:Zr}),Gt===yt&&ae.createElement(et,{ref:jn,editImgId:qn.current,callback:Hr,onCancel:Zr}),ae.createElement(_e.Z,null,Kn[Gt]&&Gt!==Ct&&Gt!==yt?ae.createElement(Je.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Nr},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[Gt]),open:!0,onCancel:Zr,footer:null,destroyOnClose:!0,width:Gt===yt?"1200px":null,height:Gt===yt?"80vh":null,className:"markdown-popup-form"},Fr):null))}},82441:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return pt},I:function(){return $t}});var ae=fe(28284),gt=fe(6767),He=fe(37568),ze=fe(44104),me=fe(71051),Xe=fe(47889),Le=fe(7939),Ke=fe(52882),ke=fe(59301),de=fe(59301),Ae=Object.defineProperty,ye=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,De=(_e,tt,Lt)=>tt in _e?Ae(_e,tt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):_e[tt]=Lt,ot=(_e,tt)=>{for(var Lt in tt||(tt={}))Re.call(tt,Lt)&&De(_e,Lt,tt[Lt]);if(je)for(var Lt of je(tt))Oe.call(tt,Lt)&&De(_e,Lt,tt[Lt]);return _e},st=(_e,tt)=>ye(_e,ut(tt));const{useForm:St}=ae.default,bt={width:280,marginRight:10},ft={labelCol:{span:5},wrapperCol:{span:19}};var pt=({callback:_e,onCancel:tt})=>{const[Lt]=St();let Fe=(0,ke.useRef)();function Qe(zt){Fe.current.width=Lt.getFieldValue("width"),Fe.current.align=Lt.getFieldValue("align"),_e(zt,Fe.current)}function Pe(zt,kt){if(zt.status===-1){gt.ZP.error(zt.message);return}Lt.setFieldsValue({src:`/api/attachments/${zt.id}`,type:kt.type})}function Ye(zt){let kt=zt.target.files[0];Fe.current=kt,$t(kt,Pe)}return de.createElement(ae.default,st(ot({form:Lt},ft),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(He.default,{style:bt})),de.createElement(dt,{onFileChange:Ye}))),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(He.default,{style:{width:264}})),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(ze.Z,null,de.createElement(ae.default.Item,{name:"width",style:{margin:0}},de.createElement(me.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Xe.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),de.createElement("aside",null,de.createElement(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Le.ZP,{type:"default",onClick:tt},"\u53D6\u6D88"))))};function dt({onFileChange:_e}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:_e}))}function $t(_e,tt){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");let Lt=new FormData;Lt.append("editormd-image-file",_e),Lt.append("file_param_name","editormd-image-file"),Lt.append("byxhr","true");var Fe=new window.XMLHttpRequest;Fe.withCredentials=!0,Fe.addEventListener("load",function(Qe){tt(JSON.parse(Qe.target.responseText),_e)},!1),Fe.addEventListener("error",function(Qe){console.error(Qe)},!1),Fe.open("POST",`${Ke.KI}/api/attachments.json`),Fe.send(Lt)}},35990:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return He}});var ae=fe(59301),gt=fe(4676);class He extends ae.Component{constructor(me){super(me);const Xe=window.document;this.node=Xe.createElement("div"),Xe.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,gt.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58478:function(Nt,Ht,fe){"use strict";fe.d(Ht,{SV:function(){return xe},ZP:function(){return Ue}});var ae=fe(59301),gt=fe(76374);const He={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ze={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std",content:["using namespace std"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},Xe={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},Le={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var Ke=fe(53184),ke=fe.n(Ke),de=(ve,Ee,qe)=>new Promise((we,Ne)=>{var Ve=We=>{try{it(qe.next(We))}catch(mt){Ne(mt)}},et=We=>{try{it(qe.throw(We))}catch(mt){Ne(mt)}},it=We=>We.done?we(We.value):Promise.resolve(We.value).then(Ve,et);it((qe=qe.apply(ve,Ee)).next())});const Ae={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ye=(ve,Ee,qe,we)=>{const Ne=Ee.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:qe.lineNumber,endColumn:qe.column});return Array.from(new Set(Ne.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:we}))},ut=(ve,Ee,qe,we)=>{ve.languages.registerCompletionItemProvider(Ee,{provideCompletionItems(Ne,Ve){const et=Ne.getWordUntilPosition(Ve),it={startLineNumber:Ve.lineNumber,endLineNumber:Ve.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},We=Ne.getLineContent(Ve.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ye(ve,Ne,Ve,it),...qe.map(ct=>({label:ct,kind:ve.languages.CompletionItemKind.Keyword,documentation:ct,insertText:ct,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),...we.map(ct=>({label:ct.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:ct.content,insertText:We.startsWith("#")?ct.content.replace(/#/,""):ct.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}})};var je=ve=>{Ae.languages.forEach(Ee=>{ve.languages.registerDocumentFormattingEditProvider(Ee,{provideDocumentFormattingEdits(qe){return de(this,null,function*(){const we=ke()(qe.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:qe.getFullModelRange(),text:we}]})}})}),ut(ve,"java",ze.keywords,ze.quickKey),ut(ve,"cpp",me.keywords,me.quickKey),ut(ve,"c",He.keywords,[]),ut(ve,"python",Xe.keywords,Xe.quickKey),ut(ve,"scala",Le.keywords,Le.quickKey)};const Re="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Oe=Object.defineProperty,De=(ve,Ee,qe)=>Ee in ve?Oe(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ve[Ee]=qe,ot=(ve,Ee,qe)=>De(ve,typeof Ee!="symbol"?Ee+"":Ee,qe);const st=class Wl{constructor(Ee,qe,we){this.placeholder=Ee,this.editor=qe,this.monaco=we,qe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};ot(st,"ID","editor.widget.placeholderHint");var bt=st,ft=fe(96236),pt=fe(6767),dt=fe(25399),$t=fe(89392),_e=fe(94276),tt=fe(56102),Lt=Object.defineProperty,Fe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,kt=(ve,Ee,qe)=>Ee in ve?Lt(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ve[Ee]=qe,Tt=(ve,Ee)=>{for(var qe in Ee||(Ee={}))Ye.call(Ee,qe)&&kt(ve,qe,Ee[qe]);if(Pe)for(var qe of Pe(Ee))zt.call(Ee,qe)&&kt(ve,qe,Ee[qe]);return ve},vt=(ve,Ee)=>Fe(ve,Qe(Ee)),pe=(ve,Ee)=>{var qe={};for(var we in ve)Ye.call(ve,we)&&Ee.indexOf(we)<0&&(qe[we]=ve[we]);if(ve!=null&&Pe)for(var we of Pe(ve))Ee.indexOf(we)<0&&zt.call(ve,we)&&(qe[we]=ve[we]);return qe},ue=(ve,Ee,qe)=>new Promise((we,Ne)=>{var Ve=We=>{try{it(qe.next(We))}catch(mt){Ne(mt)}},et=We=>{try{it(qe.throw(We))}catch(mt){Ne(mt)}},it=We=>We.done?we(We.value):Promise.resolve(We.value).then(Ve,et);it((qe=qe.apply(ve,Ee)).next())});function Ge(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function wt(){}let lt=!1;const Ce={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Je(ve=[]){let Ee=ve;if(Array.isArray(ve)){for(let qe=0;qe<ve.length;qe++){let we=Ce[ve[qe]];if(we)return we}return Ee[0]}return Ce[Ee]||Ee}let Se=null;const rt=()=>ue(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ve){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ve)}});var Ue=ve=>{var Ee=ve,{width:qe="100%",height:we="100%",value:Ne,language:Ve="javascript",style:et={},options:it={},overrideServices:We={},theme:mt="vs-dark",onEditBlur:ct,isCopy:jt=!1,onSave:Ot,autoHeight:se=!1,forbidCopy:te=!1,onChange:z=wt,editorDidMount:ie=wt,onFocus:ce=wt,onBreakPoint:ne=wt,breakPointValue:ge=[],filename:ht="educoder.txt",errorLine:yt,errorContent:Ct="",highlightLine:Ie,openBreakPoint:_t=!1,placeholder:Ft="",showMiniMap:It=!0}=Ee,un=pe(Ee,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const kn=(0,ae.useRef)(),cn=(0,ae.useRef)({}),wn=(0,ae.useRef)(),$n=(0,ae.useRef)(),_n=(0,ae.useRef)([]),mr=(0,ae.useRef)(!1),er=(0,ae.useRef)(),ur=(0,ae.useRef)(),nr=(0,ae.useRef)(!1),[In,rr]=(0,ae.useState)(!1);function cr(){let Vt;return kn.current&&(Vt=new gt.Z(at=>{for(let Qt of at)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&cn.current.instance.layout()}),Vt.observe(kn.current)),Vt}function Bn(){pt.ZP.warning({content:decodeURIComponent(Re),key:"monaco-editor-tip"})}const Xn=()=>{let Vt=cn.current.instance;if(Ne!=null&&Vt&&In){const at=Vt.getModel();at&&Ne!==at.getValue()&&(lt=!0,at.setValue(Ne),Vt.layout(),lt=!1)}};(0,ae.useEffect)(()=>{const Vt=_e.Z.subscribe("formatDocument",at=>{var Qt;let Cn=cn.current.instance;(Qt=Cn==null?void 0:Cn.getAction)==null||Qt.call(Cn,"editor.action.formatDocument").run()});return window.updateMonacoValue=at=>{z(at)},Vt},[]),(0,ae.useEffect)(()=>{var Vt;let at=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),Ne&&(Ne!=null&&Ne.length)&&((Vt=at==null?void 0:at.updateOptions)==null||Vt.call(at,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ne,In,cn.current]),(0,ae.useEffect)(()=>{if(yt&&cn.current&&cn.current.instance){let at=cn.current.instance;at.changeViewZones(function(Qt){var Cn=document.createElement("div");Cn.style.padding="10px 20px",Cn.style.width="calc(100% - 20px)",Cn.className="my-error-line-wrp",Cn.innerHTML=Ct,Qt.addZone({afterLineNumber:yt||11,heightInLines:3,domNode:Cn})});var Vt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};at.addOverlayWidget(Vt),at.revealPositionInCenter({lineNumber:20,column:1})}},[yt,cn.current,In]);const Kn=(Vt="",at)=>{if(!Vt||Vt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(at);let Gn=!1;for(let Te=0;Te<2;Te++)Cn.getStandardTokenType(Te)===1&&(Gn=!0);return Gn};(0,ae.useEffect)(()=>{var Vt;const at=(Vt=cn.current)==null?void 0:Vt.instance;if(at&&In&&te){const Qt=at.onDidBlurEditorWidget(()=>{nr.current=!1}),Cn=at.onDidFocusEditorText(()=>{nr.current=!0});return()=>{Qt.dispose(),Cn.dispose()}}},[cn.current,In,te]),(0,ae.useEffect)(()=>{var Vt;if((Vt=cn.current)!=null&&Vt.instance&&In&&_t){let at=cn.current.instance,Qt=at.getModel();if(!Qt)return;(()=>{var Zt;let qt=[],At=[];const xt=Qt.getAllDecorations();for(let vn of xt)vn.options.className==="highlighted-line"&&(qt.push((Zt=vn==null?void 0:vn.range)==null?void 0:Zt.startLineNumber),At.push(vn==null?void 0:vn.id));if(Ie===qt[0])return;Qt.deltaDecorations(At,[]);const en=Qt.getLineCount();Ie&&Ie<=en&&(at.deltaDecorations([],[{range:new Se.Range(Ie,1,Ie,Qt.getLineMaxColumn(Ie)),options:{isWholeLine:!0,className:"highlighted-line"}}]),at.revealLineInCenter(Ie))})();const Gn=(Zt=!1)=>{var qt;let At=[],xt=[];const en=Qt.getAllDecorations();for(let vn of en)vn.options.linesDecorationsClassName==="breakpoints-select"&&(At.push((qt=vn==null?void 0:vn.range)==null?void 0:qt.startLineNumber),xt.push(vn==null?void 0:vn.id));if(Zt)return{lines:At,ids:xt};ne(At)},Te=Zt=>ue(void 0,null,function*(){let qt={range:new Se.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[qt]),Gn()}),Be=Zt=>ue(void 0,null,function*(){let qt=[];const At=at.getLineDecorations(Zt);for(let xt of At)xt.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(xt.id);yield Qt.deltaDecorations(qt,[]),Gn()}),Pt=Zt=>{let qt=at.getLineDecorations(Zt);for(let At of qt)if(At.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,$t.isEqual)(ge,Gn(!0).lines)){Qt.deltaDecorations(Gn(!0).ids,[]);const Zt=ge.map(qt=>({range:new Se.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],Zt)}const Et=at.onDidChangeModelContent(Zt=>{let qt=at.getPosition();if(qt){let At=qt.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(Qt.getLineContent(At),At)?Be(At):Pt(At)?(Be(At),Te(At)):Gn()},100)}}),Ze=at.onMouseDown(Zt=>{var qt,At,xt;if(Zt.target.detail&&((xt=(At=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&xt.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Pt(en)?Be(en):Te(en)}}),Dt=Zt=>{let qt={range:new Se.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};_n.current=at.deltaDecorations(_n.current,[qt])},Xt=()=>{_n.current=at.deltaDecorations(_n.current,[])},tn=at.onMouseMove(Zt=>{var qt,At,xt;if(Xt(),Zt.target.detail&&((xt=(At=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&xt.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Dt(en)}}),hn=at.onMouseLeave(()=>{Xt()});return()=>{Et.dispose(),Ze.dispose(),tn.dispose(),hn.dispose()}}},[cn.current,In,ge,Ie,_t,Ve]),(0,ae.useEffect)(()=>{var Vt;(Vt=cn.current)!=null&&Vt.instance&&_t&&cn.current.instance.setPosition({lineNumber:0,column:0})},[Ie]);function xr(){let Vt=cn.current.instance;if(Vt){const at=Vt.getSelection(),Qt=cn.current.pastePos||{},Cn=new Se.Range(Qt.startLineNumber||at.endLineNumber,Qt.startColumn||at.endColumn,Qt.endLineNumber||at.endLineNumber,Qt.endColumn||at.endColumn);setTimeout(()=>{Vt.executeEdits("",[{range:Cn,text:""}])},300)}}function Kt(Vt){(window.navigator.platform.match("Mac")?Vt.metaKey:Vt.ctrlKey)&&Vt.keyCode==83&&(Vt.preventDefault(),Ot())}const pn=()=>{if(se&&cn.current.instance){const Vt=cn.current.instance.getContentHeight();Rn(Vt<we?we:Vt)}else Rn(we)};function En(Vt){var at=document.createEvent("MouseEvents");at.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Vt.dispatchEvent(at)}const An=Vt=>{if(!nr.current)return;const{keyCode:at,ctrlKey:Qt,metaKey:Cn,target:Gn,type:Te}=Vt;return(Te==="paste"||(at===67||at===86)&&(Cn||Qt))&&Gn.nodeName==="TEXTAREA"&&(Bn(),Vt.preventDefault()),!1};function Jn(Vt,at){var Qt=window.URL||window.webkitURL||window,Cn=new Blob([at]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=Qt.createObjectURL(Cn),Gn.download=Vt,En(Gn)}(0,ae.useEffect)(()=>{pn()},[pn]),(0,ae.useEffect)(()=>{kn.current&&!In&&Promise.all([fe.e(8909),fe.e(4474)]).then(fe.bind(fe,71448)).then(Vt=>{try{Se=Vt,cn.current.instance=Se.editor.create(kn.current,{value:Ne,language:Je(Ve),theme:mt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:It||!1}},We);const at=cn.current.instance;let Gn=[...ft.BH._menuItems].find(Et=>Et[0]._debugName=="EditorContext")[1],Te=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Be=(Et,Ze)=>{var Dt,Xt;let tn=Et._first;do Ze.includes((Xt=(Dt=tn.element)==null?void 0:Dt.command)==null?void 0:Xt.id)&&Et._remove(tn);while(tn=tn.next)};if(ie(at,Se),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(ht||"educoder.txt",at.getValue())}})},500),cn.current.subscription=at.onDidChangeModelContent(Et=>{mr.current?clearTimeout(er.current):(pn(),z(at.getValue(),Et)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||je(Se,Je(Ve)),te&&(Be(Gn,Te),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",An),window.removeEventListener("paste",An),window.addEventListener("keydown",An),window.addEventListener("paste",An)),window.Monaco=Se,ct&&at.onDidBlurEditorWidget(()=>{ct(at.getValue())}),ce&&at.onDidFocusEditorText(()=>{te&&rt(),ce(at.getValue())}),te){rt();try{at.onDidPaste(Et=>{const Ze=at.getSelection(),Dt=cn.current.pastePos||{},Xt=new Se.Range(Dt.startLineNumber||Ze.endLineNumber,Dt.startColumn||Ze.endColumn,Dt.endLineNumber||Ze.endLineNumber,Dt.endColumn||Ze.endColumn);at.executeEdits("",[{range:Et.range,text:""}])})}catch(Et){}}let Pt=cr();return Ft&&typeof Ft=="string"&&new bt(Ft,at,Se),rr(!0),()=>{const Et=cn.current.instance;Et.dispose();const Ze=Et.getModel();Ze&&Ze.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Pt.unobserve(kn.current)}}catch(at){}})},[]),(0,ae.useEffect)(()=>{if(cn.current.instance&&In)return document.addEventListener("keydown",Kt,!1),()=>{document.removeEventListener("keydown",Kt)}},[Ot,In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;if(Vt&&In){let at=Je(Ve);Se.editor.setModelLanguage(Vt.getModel(),at)}},[Ve,In]),(0,ae.useEffect)(()=>{cn.current.instance&&In&&Se.editor.setTheme(mt)},[mt,In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;wn.current=it,Vt&&In&&(Vt.updateOptions(Tt({},it)),setTimeout(()=>{Vt.getModel().updateOptions(Tt({},it))},200))},[JSON.stringify(it),In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;Vt&&In&&Vt.layout()},[qe,we,In]);const[tr,dr]=(0,ae.useState)(Ge(qe)),[Zn,Rn]=(0,ae.useState)(Ge(we)),hr=vt(Tt({},et),{width:tr,height:Zn,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:kn,style:hr,onFocus:()=>{te&&rt()}},jt&&ae.createElement(tt.CopyToClipboard,{text:Ne,onCopy:()=>pt.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(dt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function xe({width:ve="100%",height:Ee="100%",original:qe,modified:we,language:Ne,options:Ve={}}){const et=(0,ae.useRef)(),[it,We]=(0,ae.useState)(null);function mt(se){let te;return et.current&&(te=new gt.Z(z=>{for(let ie of z)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&se.layout()}),te.observe(et.current)),te}(0,ae.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(se=>{Se=se;const te=Se.editor.createDiffEditor(et.current,vt(Tt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ve),{wordWrap:!0}));We(te);let z=mt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),z.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{it&&it.setModel({original:Se.editor.createModel(qe,Ne),modified:Se.editor.createModel(we,Ne)})},[qe,we,Ne,it]);const ct=Ge(ve),jt=Ge(Ee),Ot={width:ct,height:jt};return ae.createElement("div",{className:"my-diff-editor",ref:et,style:Ot})}},61904:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return gt}});var ae=fe(59301);function gt(He,ze){const me=(0,ae.useRef)();(0,ae.useEffect)(()=>{me.current=He}),(0,ae.useEffect)(()=>{function Xe(){me.current()}if(ze!==null){let Le=setInterval(Xe,ze);return()=>clearInterval(Le)}},[ze])}},35375:function(Nt,Ht,fe){"use strict";fe.r(Ht),fe.d(Ht,{default:function(){return Je}});var ae=fe(59301),gt=fe(29787),He=fe(74947),ze=fe(58106),me=fe(62673),Xe=fe(14566),Le=fe(28284),Ke=fe(6767),ke=fe(62957),de=fe(37568),Ae=fe(7939),ye=fe(61481),ut=fe(26869),je=fe(77834),Re=Object.defineProperty,Oe=Object.defineProperties,De=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,bt=(Se,rt,Ue)=>rt in Se?Re(Se,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Se[rt]=Ue,ft=(Se,rt)=>{for(var Ue in rt||(rt={}))st.call(rt,Ue)&&bt(Se,Ue,rt[Ue]);if(ot)for(var Ue of ot(rt))St.call(rt,Ue)&&bt(Se,Ue,rt[Ue]);return Se},pt=(Se,rt)=>Oe(Se,De(rt)),dt=(Se,rt)=>{var Ue={};for(var xe in Se)st.call(Se,xe)&&rt.indexOf(xe)<0&&(Ue[xe]=Se[xe]);if(Se!=null&&ot)for(var xe of ot(Se))rt.indexOf(xe)<0&&St.call(Se,xe)&&(Ue[xe]=Se[xe]);return Ue};const $t=me.default.Group,{Dragger:_e}=Xe.default;function tt(Se,rt){const Ue=new FileReader;Ue.addEventListener("load",()=>rt(Ue.result)),Ue.readAsDataURL(Se)}var Lt=({callback:Se,tags:rt=[],initialValues:Ue={},removeAttachment:xe})=>{const[ve,Ee]=(0,ae.useState)(""),[qe]=Le.default.useForm();function we(We){const mt=We,{cover_id:ct,attachment_ids:jt}=mt,Ot=dt(mt,["cover_id","attachment_ids"]);Se(pt(ft({},Ot),{cover_id:ct==null?void 0:ct.map(se=>se.response?se.response.id:se.uid)[(ct==null?void 0:ct.length)-1],attachment_ids:jt?jt==null?void 0:jt.map(se=>se.response?se.response.id:se.uid):[]}))}function Ne(We){return Array.isArray(We)?We:We&&We.fileList}const Ve={multiple:!0,beforeUpload:We=>{const mt=We.size/1024/1024<100;if(!mt)return Ke.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),mt},action:`${ut.Z.API_SERVER}/api/attachments.json`,onRemove:We=>{ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:()=>xe(We.response?We.response.id:We.uid),onCancel:()=>!1})}};function et(We){We.file.status==="done"&&tt(We.file.originFileObj,mt=>Ee(mt))}const it={showUploadList:!1,withCredentials:!0,action:`${ut.Z.API_SERVER}/api/attachments.json`,onChange:et};return(0,ae.useEffect)(()=>{Ue.title&&(qe.setFieldsValue(Ue),Ue.cover_id.length>0&&Ee(ut.Z.IMG_SERVER+Ue.cover_id[0].url))},[Ue]),ae.createElement(Le.default,{form:qe,initialValues:Ue,className:"moop-panel",style:{marginBottom:20},onFinish:we},ae.createElement(Le.default.Item,{label:"\u6807\u9898",name:"title",extra:ae.createElement("div",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},ae.createElement(de.default,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),ae.createElement("div",{className:"flex-container"},ae.createElement(Le.default.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},ae.createElement(de.default,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),ae.createElement(Le.default.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},ae.createElement(de.default,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),ae.createElement(Le.default.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},ae.createElement($t,null,rt.map(We=>ae.createElement(me.default,{key:We.id,value:We.id}," ",We.name," ")))),ae.createElement(Le.default.Item,{name:"publish",valuePropName:"checked"},ae.createElement(me.default,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),ae.createElement(Le.default.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ae.createElement(je.Z,{id:"moop_cases_content",height:400})),ae.createElement(Le.default.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:Ne},ae.createElement(_e,ft({},Ve),ae.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),ae.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),ae.createElement(Le.default.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:Ne,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},ae.createElement(Xe.default,ft({},it),ve?ae.createElement("img",{src:ve,width:120}):ae.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",ae.createElement(ye.Z,null)," "))),ae.createElement("div",{className:"desc"},ae.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),ae.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),ae.createElement("div",{className:"desc"},ae.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),ae.createElement("ul",{style:{padding:0}},ae.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),ae.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",ae.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",ae.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),ae.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),ae.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),ae.createElement(Le.default.Item,{style:{marginTop:10}},ae.createElement(Ae.ZP,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},Fe=fe(91554),Qe=Object.defineProperty,Pe=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,vt=(Se,rt,Ue)=>rt in Se?Qe(Se,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Se[rt]=Ue,pe=(Se,rt)=>{for(var Ue in rt||(rt={}))kt.call(rt,Ue)&&vt(Se,Ue,rt[Ue]);if(zt)for(var Ue of zt(rt))Tt.call(rt,Ue)&&vt(Se,Ue,rt[Ue]);return Se},ue=(Se,rt)=>Pe(Se,Ye(rt)),Ge=(Se,rt,Ue)=>new Promise((xe,ve)=>{var Ee=Ne=>{try{we(Ue.next(Ne))}catch(Ve){ve(Ve)}},qe=Ne=>{try{we(Ue.throw(Ne))}catch(Ve){ve(Ve)}},we=Ne=>Ne.done?xe(Ne.value):Promise.resolve(Ne.value).then(Ee,qe);we((Ue=Ue.apply(Se,rt)).next())});const wt={loading:!1,data:{},tags:[]};var lt=(Se=>(Se[Se.GET_DATA=0]="GET_DATA",Se[Se.SET_LOADING=1]="SET_LOADING",Se[Se.GET_TAGS=2]="GET_TAGS",Se))(lt||{});function Ce(Se,rt){switch(rt.type){case 0:return pe(pe({},Se),rt.payload);case 2:return ue(pe({},Se),{tags:rt.payload});case 1:return ue(pe({},Se),{loading:rt.payload});default:throw new Error}}var Je=()=>{const{caseId:Se}=(0,ze.useParams)(),[rt,Ue]=(0,ae.useReducer)(Ce,wt),{loading:xe,tags:ve,data:Ee}=rt;(0,ae.useEffect)(()=>{function Ne(){return Ge(this,null,function*(){const Ve=yield(0,Fe.rO)();Ue({type:2,payload:Ve.library_tags})})}Ne()},[]),(0,ae.useEffect)(()=>{let Ne=!1;function Ve(){return Ge(this,null,function*(){Ue({type:1,payload:!1});let et=yield(0,Fe.$J)(Se);const{author_name:it,author_school_name:We,content:mt,cover:ct,attachments:jt,status:Ot,title:se,tags:te}=et;Ne||(et.status===404?ze.history.push("/moop_cases"):Ue({type:0,payload:{data:{title:se,author_name:it,author_school_name:We,content:mt,tag_ids:te.map(z=>z.id),publish:Ot==="published",attachment_ids:jt.map(z=>({uid:z.id,id:z.id,name:z.title,url:z.url,filesize:z.filesize,status:"done"})),cover_id:ct!=null&&ct.id?[{uid:ct==null?void 0:ct.id,id:ct==null?void 0:ct.id,name:ct==null?void 0:ct.title,url:ct==null?void 0:ct.url,filesize:ct==null?void 0:ct.filesize,status:"done"}]:[]},loading:!1}}))})}return!Ne&&Se&&Ve(),()=>{Ne=!0}},[Se]);function qe(Ne){return Ge(this,null,function*(){if(Se)yield(0,Fe.bN)(Se,Ne),ze.history.push(`/moop_cases/${Se}/publish-success`);else{const{id:Ve}=yield(0,Fe.jP)(Ne);Ve&&ze.history.push(`/moop_cases/${Ve}/publish-success`)}})}const we={initialValues:Ee,tags:ve,removeAttachment:Fe.JZ,callback:qe};return ae.createElement(gt.Z,{spinning:xe,delay:500},ae.createElement("div",{className:"moop-info"},ae.createElement("div",{className:"crumb"},ae.createElement(ze.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),ae.createElement("span",null,"\u65B0\u5EFA")),ae.createElement("div",{className:"title"},ae.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),ae.createElement(ze.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),ae.createElement(Lt,pe({},we))))}},91554:function(Nt,Ht,fe){"use strict";fe.d(Ht,{$J:function(){return He},JZ:function(){return me},bN:function(){return Le},jP:function(){return Xe},rO:function(){return ze}});var ae=fe(97013),gt=(Ke,ke,de)=>new Promise((Ae,ye)=>{var ut=Oe=>{try{Re(de.next(Oe))}catch(De){ye(De)}},je=Oe=>{try{Re(de.throw(Oe))}catch(De){ye(De)}},Re=Oe=>Oe.done?Ae(Oe.value):Promise.resolve(Oe.value).then(ut,je);Re((de=de.apply(Ke,ke)).next())});function He(Ke){return(0,ae.U2)(`libraries/${Ke}.json`)}function ze(){return(0,ae.U2)("library_tags.json")}function me(Ke){return gt(this,null,function*(){return(yield(0,ae.IV)(`attachments/${Ke}.json`)).status===0})}function Xe(Ke){return(0,ae.v_)("libraries.json",Ke)}function Le(Ke,ke){return(0,ae.gz)(`libraries/${Ke}.json`,ke)}},58489:function(Nt,Ht,fe){"use strict";fe.d(Ht,{AL:function(){return bt},Iy:function(){return Ae},Qv:function(){return je},ez:function(){return St},jb:function(){return ye}});var ae=fe(32834),gt=fe.n(ae),He=fe(11690),ze=fe.n(He);let me=1;function Xe(_e,tt){const Lt=_e.match(/^(\s+)(?:```)/);if(Lt===null)return tt;const Fe=Lt[1];return tt.split(`
`).map(Qe=>{const Pe=Qe.match(/^\s+/);if(Pe===null)return Qe;const[Ye]=Pe;return Ye.length>=Fe.length?Qe.slice(Fe.length):Qe}).join(`
`)}let Le=[],Ke=["<ul>"];const ke=new(gt()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ae(){Le.length=0,Ke=["<ul>"]}const ye={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ut(_e,tt,Lt,Fe){if(tt>=_e.length||_e[tt].level<=Lt)return tt;var Qe=_e[tt];Fe.push("<li><a href='#"+me+Qe.anchor+"'>"+Qe.text+"</a>"),tt++;var Pe=[];return tt=ut(_e,tt,Qe.level,Pe),Pe.length>0&&(Fe.push("<ul>"),Pe.forEach(function(Ye){Fe.push(Ye)}),Fe.push("</ul>")),Fe.push("</li>"),tt=ut(_e,tt,Lt,Fe),tt}function je(){return ut(Le,0,0,Ke),Ke.push("</ul>"),Ke.join("")}const Re={heading(_e){const tt=de.exec(_e);if(me+=1,tt)return{type:"heading",raw:tt[0],depth:tt[1].length,text:tt[2]}},fences(_e){const tt=this.rules.block.fences.exec(_e);if(tt){const Lt=tt[0];let Fe=Xe(Lt,tt[3]||"");const Qe=tt[2]?tt[2].trim():tt[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Pe=ot(),Ye=Fe;Fe=Pe,st[Pe]={type:"block",expression:Ye}}return{type:"code",raw:Lt,lang:Qe,text:Fe}}}},Oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const ot=()=>`__special_katext_id_${De++}__`;let st={};function St(){return st}function bt(){De=0,st={}}function ft(_e){return _e=_e.replace(Oe,(tt,Lt)=>{const Fe=ot();return st[Fe]={type:"inline",expression:Lt},Fe}),_e}const pt=ke.listitem;ke.listitem=function(_e){return pt(ft(_e))};const dt=ke.paragraph;ke.paragraph=function(_e){return dt(ft(_e))};const $t=ke.tablecell;ke.tablecell=function(_e,tt){return $t(ft(_e),tt)},ke.code=function(_e,tt,Lt){const Fe=(tt||"").match(/\S*/)[0];return Fe?["latex","katex","math"].indexOf(Fe)>=0?`<p class='editormd-tex'>${_e}</p>`:`<pre class="prettyprint linenums"><code class="language-${tt}">${Lt?_e:(0,He.escape)(_e,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Lt?_e:(0,He.escape)(_e,!0))+"</code></pre>"},ke.heading=function(_e,tt,Lt){let Fe=this.options.headerPrefix+Lt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Le.push({anchor:Fe,level:tt,text:_e}),"<h"+tt+' id="'+me+Fe+'">'+_e+"</h"+tt+">"},gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),gt().use({tokenizer:Re,renderer:ke}),Ht.ZP=gt()},99498:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){ae.defineOption("placeholder","",function(Ke,ke,de){var Ae=de&&de!=ae.Init;if(ke&&!Ae)Ke.on("blur",me),Ke.on("change",Xe),Ke.on("swapDoc",Xe),ae.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){ze(Ke)}),Xe(Ke);else if(!ke&&Ae){Ke.off("blur",me),Ke.off("change",Xe),Ke.off("swapDoc",Xe),ae.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),gt(Ke);var ye=Ke.getWrapperElement();ye.className=ye.className.replace(" CodeMirror-empty","")}ke&&!Ke.hasFocus()&&me(Ke)});function gt(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function He(Ke){gt(Ke);var ke=Ke.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=Ke.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var de=Ke.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),ke.appendChild(de),Ke.display.lineSpace.insertBefore(ke,Ke.display.lineSpace.firstChild)}function ze(Ke){setTimeout(function(){var ke=!1,de=Ke.getInputField();de.nodeName=="TEXTAREA"?ke=!de.value:Ke.lineCount()==1&&(ke=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),ke?He(Ke):gt(Ke)},20)}function me(Ke){Le(Ke)&&He(Ke)}function Xe(Ke){var ke=Ke.getWrapperElement(),de=Le(Ke);ke.className=ke.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?He(Ke):gt(Ke)}function Le(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){var gt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},He=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(Re,Oe,De){De&&De!=ae.Init&&(Re.removeKeyMap(me),Re.state.closeBrackets=null),Oe&&(Xe(ze(Oe,"pairs")),Re.state.closeBrackets=Oe,Re.addKeyMap(me))});function ze(Re,Oe){return Oe=="pairs"&&typeof Re=="string"?Re:typeof Re=="object"&&Re[Oe]!=null?Re[Oe]:gt[Oe]}var me={Backspace:ke,Enter:de};function Xe(Re){for(var Oe=0;Oe<Re.length;Oe++){var De=Re.charAt(Oe),ot="'"+De+"'";me[ot]||(me[ot]=Le(De))}}Xe(gt.pairs+"`");function Le(Re){return function(Oe){return ye(Oe,Re)}}function Ke(Re){var Oe=Re.state.closeBrackets;if(!Oe||Oe.override)return Oe;var De=Re.getModeAt(Re.getCursor());return De.closeBrackets||Oe}function ke(Re){var Oe=Ke(Re);if(!Oe||Re.getOption("disableInput"))return ae.Pass;for(var De=ze(Oe,"pairs"),ot=Re.listSelections(),st=0;st<ot.length;st++){if(!ot[st].empty())return ae.Pass;var St=ut(Re,ot[st].head);if(!St||De.indexOf(St)%2!=0)return ae.Pass}for(var st=ot.length-1;st>=0;st--){var bt=ot[st].head;Re.replaceRange("",He(bt.line,bt.ch-1),He(bt.line,bt.ch+1),"+delete")}}function de(Re){var Oe=Ke(Re),De=Oe&&ze(Oe,"explode");if(!De||Re.getOption("disableInput"))return ae.Pass;for(var ot=Re.listSelections(),st=0;st<ot.length;st++){if(!ot[st].empty())return ae.Pass;var St=ut(Re,ot[st].head);if(!St||De.indexOf(St)%2!=0)return ae.Pass}Re.operation(function(){var bt=Re.lineSeparator()||`
`;Re.replaceSelection(bt+bt,null),Re.execCommand("goCharLeft"),ot=Re.listSelections();for(var ft=0;ft<ot.length;ft++){var pt=ot[ft].head.line;Re.indentLine(pt,null,!0),Re.indentLine(pt+1,null,!0)}})}function Ae(Re){var Oe=ae.cmpPos(Re.anchor,Re.head)>0;return{anchor:new He(Re.anchor.line,Re.anchor.ch+(Oe?-1:1)),head:new He(Re.head.line,Re.head.ch+(Oe?1:-1))}}function ye(Re,Oe){var De=Ke(Re);if(!De||Re.getOption("disableInput"))return ae.Pass;var ot=ze(De,"pairs"),st=ot.indexOf(Oe);if(st==-1)return ae.Pass;for(var St=ze(De,"closeBefore"),bt=ze(De,"triples"),ft=ot.charAt(st+1)==Oe,pt=Re.listSelections(),dt=st%2==0,$t,_e=0;_e<pt.length;_e++){var tt=pt[_e],Lt=tt.head,Fe,Qe=Re.getRange(Lt,He(Lt.line,Lt.ch+1));if(dt&&!tt.empty())Fe="surround";else if((ft||!dt)&&Qe==Oe)ft&&je(Re,Lt)?Fe="both":bt.indexOf(Oe)>=0&&Re.getRange(Lt,He(Lt.line,Lt.ch+3))==Oe+Oe+Oe?Fe="skipThree":Fe="skip";else if(ft&&Lt.ch>1&&bt.indexOf(Oe)>=0&&Re.getRange(He(Lt.line,Lt.ch-2),Lt)==Oe+Oe){if(Lt.ch>2&&/\bstring/.test(Re.getTokenTypeAt(He(Lt.line,Lt.ch-2))))return ae.Pass;Fe="addFour"}else if(ft){var Pe=Lt.ch==0?" ":Re.getRange(He(Lt.line,Lt.ch-1),Lt);if(!ae.isWordChar(Qe)&&Pe!=Oe&&!ae.isWordChar(Pe))Fe="both";else return ae.Pass}else if(dt&&(Qe.length===0||/\s/.test(Qe)||St.indexOf(Qe)>-1))Fe="both";else return ae.Pass;if(!$t)$t=Fe;else if($t!=Fe)return ae.Pass}var Ye=st%2?ot.charAt(st-1):Oe,zt=st%2?Oe:ot.charAt(st+1);Re.operation(function(){if($t=="skip")Re.execCommand("goCharRight");else if($t=="skipThree")for(var kt=0;kt<3;kt++)Re.execCommand("goCharRight");else if($t=="surround"){for(var Tt=Re.getSelections(),kt=0;kt<Tt.length;kt++)Tt[kt]=Ye+Tt[kt]+zt;Re.replaceSelections(Tt,"around"),Tt=Re.listSelections().slice();for(var kt=0;kt<Tt.length;kt++)Tt[kt]=Ae(Tt[kt]);Re.setSelections(Tt)}else $t=="both"?(Re.replaceSelection(Ye+zt,null),Re.triggerElectric(Ye+zt),Re.execCommand("goCharLeft")):$t=="addFour"&&(Re.replaceSelection(Ye+Ye+Ye+Ye,"before"),Re.execCommand("goCharRight"))})}function ut(Re,Oe){var De=Re.getRange(He(Oe.line,Oe.ch-1),He(Oe.line,Oe.ch+1));return De.length==2?De:null}function je(Re,Oe){var De=Re.getTokenAt(He(Oe.line,Oe.ch+1));return/\bstring/.test(De.type)&&De.start==Oe.ch&&(Oe.ch==0||!/\bstring/.test(Re.getTokenTypeAt(Oe)))}})},6313:function(Nt,Ht,fe){(function(ae){ae(fe(89780),fe(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(ke,de,Ae){if(Ae!=ae.Init&&Ae&&ke.removeKeyMap("autoCloseTags"),!!de){var ye={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(ye["'/'"]=function(ut){return Xe(ut)}),(typeof de!="object"||de.whenOpening!==!1)&&(ye["'>'"]=function(ut){return ze(ut)}),ke.addKeyMap(ye)}});var gt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],He=["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 ze(ke){if(ke.getOption("disableInput"))return ae.Pass;for(var de=ke.listSelections(),Ae=[],ye=ke.getOption("autoCloseTags"),ut=0;ut<de.length;ut++){if(!de[ut].empty())return ae.Pass;var je=de[ut].head,Re=ke.getTokenAt(je),Oe=ae.innerMode(ke.getMode(),Re.state),De=Oe.state,ot=Oe.mode.xmlCurrentTag&&Oe.mode.xmlCurrentTag(De),st=ot&&ot.name;if(!st)return ae.Pass;var St=Oe.mode.configuration=="html",bt=typeof ye=="object"&&ye.dontCloseTags||St&&gt,ft=typeof ye=="object"&&ye.indentTags||St&&He;Re.end>je.ch&&(st=st.slice(0,st.length-Re.end+je.ch));var pt=st.toLowerCase();if(!st||Re.type=="string"&&(Re.end!=je.ch||!/[\"\']/.test(Re.string.charAt(Re.string.length-1))||Re.string.length==1)||Re.type=="tag"&&ot.close||Re.string.indexOf("/")==je.ch-Re.start-1||bt&&Le(bt,pt)>-1||Ke(ke,Oe.mode.xmlCurrentContext&&Oe.mode.xmlCurrentContext(De)||[],st,je,!0))return ae.Pass;var dt=typeof ye=="object"&&ye.emptyTags;if(dt&&Le(dt,st)>-1){Ae[ut]={text:"/>",newPos:ae.Pos(je.line,je.ch+2)};continue}var $t=ft&&Le(ft,pt)>-1;Ae[ut]={indent:$t,text:">"+($t?`
`:"")+"</"+st+">",newPos:$t?ae.Pos(je.line+1,0):ae.Pos(je.line,je.ch+1)}}for(var _e=typeof ye=="object"&&ye.dontIndentOnAutoClose,ut=de.length-1;ut>=0;ut--){var tt=Ae[ut];ke.replaceRange(tt.text,de[ut].head,de[ut].anchor,"+insert");var Lt=ke.listSelections().slice(0);Lt[ut]={head:tt.newPos,anchor:tt.newPos},ke.setSelections(Lt),!_e&&tt.indent&&(ke.indentLine(tt.newPos.line,null,!0),ke.indentLine(tt.newPos.line+1,null,!0))}}function me(ke,de){for(var Ae=ke.listSelections(),ye=[],ut=de?"/":"</",je=ke.getOption("autoCloseTags"),Re=typeof je=="object"&&je.dontIndentOnSlash,Oe=0;Oe<Ae.length;Oe++){if(!Ae[Oe].empty())return ae.Pass;var De=Ae[Oe].head,ot=ke.getTokenAt(De),st=ae.innerMode(ke.getMode(),ot.state),St=st.state;if(de&&(ot.type=="string"||ot.string.charAt(0)!="<"||ot.start!=De.ch-1))return ae.Pass;var bt,ft=st.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(ft&&st.mode.name=="javascript")bt=ut+"script";else if(ft&&st.mode.name=="css")bt=ut+"style";else{var pt=st.mode.xmlCurrentContext&&st.mode.xmlCurrentContext(St);if(!pt||pt.length&&Ke(ke,pt,pt[pt.length-1],De))return ae.Pass;bt=ut+pt[pt.length-1]}ke.getLine(De.line).charAt(ot.end)!=">"&&(bt+=">"),ye[Oe]=bt}if(ke.replaceSelections(ye),Ae=ke.listSelections(),!Re)for(var Oe=0;Oe<Ae.length;Oe++)(Oe==Ae.length-1||Ae[Oe].head.line<Ae[Oe+1].head.line)&&ke.indentLine(Ae[Oe].head.line)}function Xe(ke){return ke.getOption("disableInput")?ae.Pass:me(ke,!0)}ae.commands.closeTag=function(ke){return me(ke)};function Le(ke,de){if(ke.indexOf)return ke.indexOf(de);for(var Ae=0,ye=ke.length;Ae<ye;++Ae)if(ke[Ae]==de)return Ae;return-1}function Ke(ke,de,Ae,ye,ut){if(!ae.scanForClosingTag)return!1;var je=Math.min(ke.lastLine()+1,ye.line+500),Re=ae.scanForClosingTag(ke,ye,null,je);if(!Re||Re.tag!=Ae)return!1;for(var Oe=ut?1:0,De=de.length-1;De>=0&&de[De]==Ae;De--)++Oe;ye=Re.to;for(var De=1;De<Oe;De++){var ot=ae.scanForClosingTag(ke,ye,null,je);if(!ot||ot.tag!=Ae)return!1;ye=ot.to}return!0}})},32855:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";var gt=ae.Pos;function He(De,ot){return De.line-ot.line||De.ch-ot.ch}var ze="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",me=ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Xe=new RegExp("<(/?)(["+ze+"]["+me+"]*)","g");function Le(De,ot,st,St){this.line=ot,this.ch=st,this.cm=De,this.text=De.getLine(ot),this.min=St?Math.max(St.from,De.firstLine()):De.firstLine(),this.max=St?Math.min(St.to-1,De.lastLine()):De.lastLine()}function Ke(De,ot){var st=De.cm.getTokenTypeAt(gt(De.line,ot));return st&&/\btag\b/.test(st)}function ke(De){if(!(De.line>=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function de(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function Ae(De){for(;;){var ot=De.text.indexOf(">",De.ch);if(ot==-1){if(ke(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot+1;continue}var st=De.text.lastIndexOf("/",ot),St=st>-1&&!/\S/.test(De.text.slice(st+1,ot));return De.ch=ot+1,St?"selfClose":"regular"}}function ye(De){for(;;){var ot=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(ot==-1){if(de(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot;continue}Xe.lastIndex=ot,De.ch=ot;var st=Xe.exec(De.text);if(st&&st.index==ot)return st}}function ut(De){for(;;){Xe.lastIndex=De.ch;var ot=Xe.exec(De.text);if(!ot){if(ke(De))continue;return}if(!Ke(De,ot.index+1)){De.ch=ot.index+1;continue}return De.ch=ot.index+ot[0].length,ot}}function je(De){for(;;){var ot=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(ot==-1){if(de(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot;continue}var st=De.text.lastIndexOf("/",ot),St=st>-1&&!/\S/.test(De.text.slice(st+1,ot));return De.ch=ot+1,St?"selfClose":"regular"}}function Re(De,ot){for(var st=[];;){var St=ut(De),bt,ft=De.line,pt=De.ch-(St?St[0].length:0);if(!St||!(bt=Ae(De)))return;if(bt!="selfClose")if(St[1]){for(var dt=st.length-1;dt>=0;--dt)if(st[dt]==St[2]){st.length=dt;break}if(dt<0&&(!ot||ot==St[2]))return{tag:St[2],from:gt(ft,pt),to:gt(De.line,De.ch)}}else st.push(St[2])}}function Oe(De,ot){for(var st=[];;){var St=je(De);if(!St)return;if(St=="selfClose"){ye(De);continue}var bt=De.line,ft=De.ch,pt=ye(De);if(!pt)return;if(pt[1])st.push(pt[2]);else{for(var dt=st.length-1;dt>=0;--dt)if(st[dt]==pt[2]){st.length=dt;break}if(dt<0&&(!ot||ot==pt[2]))return{tag:pt[2],from:gt(De.line,De.ch),to:gt(bt,ft)}}}}ae.registerHelper("fold","xml",function(De,ot){for(var st=new Le(De,ot.line,0);;){var St=ut(st);if(!St||st.line!=ot.line)return;var bt=Ae(st);if(!bt)return;if(!St[1]&&bt!="selfClose"){var ft=gt(st.line,st.ch),pt=Re(st,St[2]);return pt&&He(pt.from,ft)>0?{from:ft,to:pt.from}:null}}}),ae.findMatchingTag=function(De,ot,st){var St=new Le(De,ot.line,ot.ch,st);if(!(St.text.indexOf(">")==-1&&St.text.indexOf("<")==-1)){var bt=Ae(St),ft=bt&&gt(St.line,St.ch),pt=bt&&ye(St);if(!(!bt||!pt||He(St,ot)>0)){var dt={from:gt(St.line,St.ch),to:ft,tag:pt[2]};return bt=="selfClose"?{open:dt,close:null,at:"open"}:pt[1]?{open:Oe(St,pt[2]),close:dt,at:"close"}:(St=new Le(De,ft.line,ft.ch,st),{open:dt,close:Re(St,pt[2]),at:"open"})}}},ae.findEnclosingTag=function(De,ot,st,St){for(var bt=new Le(De,ot.line,ot.ch,st);;){var ft=Oe(bt,St);if(!ft)break;var pt=new Le(De,ot.line,ot.ch,st),dt=Re(pt,ft.tag);if(dt)return{open:ft,close:dt}}},ae.scanForClosingTag=function(De,ot,st,St){var bt=new Le(De,ot.line,ot.ch,St?{from:0,to:St}:null);return Re(bt,st)}})},89780:function(Nt){(function(Ht,fe){Nt.exports=fe()})(this,function(){"use strict";var Ht=navigator.userAgent,fe=navigator.platform,ae=/gecko\/\d/i.test(Ht),gt=/MSIE \d/.test(Ht),He=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht),ze=/Edge\/(\d+)/.exec(Ht),me=gt||He||ze,Xe=me&&(gt?document.documentMode||6:+(ze||He)[1]),Le=!ze&&/WebKit\//.test(Ht),Ke=Le&&/Qt\/\d+\.\d+/.test(Ht),ke=!ze&&/Chrome\//.test(Ht),de=/Opera\//.test(Ht),Ae=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ht),ut=/PhantomJS/.test(Ht),je=!ze&&/AppleWebKit/.test(Ht)&&/Mobile\/\w+/.test(Ht),Re=/Android/.test(Ht),Oe=je||Re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ht),De=je||/Mac/.test(fe),ot=/\bCrOS\b/.test(Ht),st=/win/i.test(fe),St=de&&Ht.match(/Version\/(\d*\.\d*)/);St&&(St=Number(St[1])),St&&St>=15&&(de=!1,Le=!0);var bt=De&&(Ke||de&&(St==null||St<12.11)),ft=ae||me&&Xe>=9;function pt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var dt=function(a,y){var x=a.className,b=pt(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function $t(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function _e(a,y){return $t(a).appendChild(y)}function tt(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function Lt(a,y,x,b){var E=tt(a,y,x,b);return E.setAttribute("role","presentation"),E}var Fe;document.createRange?Fe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Fe=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function Qe(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Pe(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Ye(a,y){var x=a.className;pt(y).test(x)||(a.className+=(x?" ":"")+y)}function zt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!pt(x[b]).test(y)&&(y+=" "+x[b]);return y}var kt=function(a){a.select()};je?kt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(kt=function(a){try{a.select()}catch(y){}});function Tt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function vt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function pe(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=b||0,re=E||0;;){var oe=a.indexOf(" ",ee);if(oe<0||oe>=y)return re+(y-ee);re+=oe-ee,re+=x-re%x,ee=oe+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=Tt(this.onTimeout,this)};ue.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ue.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function Ge(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var wt=50,lt={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},Je={origin:"*mouse"},Se={origin:"+move"};function rt(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var re=ee-b;if(ee==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var Ue=[""];function xe(a){for(;Ue.length<=a;)Ue.push(ve(Ue)+" ");return Ue[a]}function ve(a){return a[a.length-1]}function Ee(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function qe(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function we(){}function Ne(a,y){var x;return Object.create?x=Object.create(a):(we.prototype=a,x=new we),y&&vt(y,x),x}var Ve=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Ve.test(a))}function it(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function We(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var mt=/[\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 ct(a){return a.charCodeAt(0)>=768&&mt.test(a)}function jt(a,y,x){for(;(x<0?y>0:y<a.length)&&ct(a.charAt(y));)y+=x;return y}function Ot(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function se(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var re=a[ee];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var te=null;function z(a,y,x){var b;te=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:te=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:te=E)}return b!=null?b:te}var ie=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function le(he,be,Me){this.level=he,this.from=be,this.to=Me}return function(he,be){var Me=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var nt=he.length,$e=[],Mt=0;Mt<nt;++Mt)$e.push(x(he.charCodeAt(Mt)));for(var Bt=0,Jt=Me;Bt<nt;++Bt){var an=$e[Bt];an=="m"?$e[Bt]=Jt:Jt=an}for(var fn=0,sn=Me;fn<nt;++fn){var bn=$e[fn];bn=="1"&&sn=="r"?$e[fn]="n":ee.test(bn)&&(sn=bn,bn=="r"&&($e[fn]="R"))}for(var Tn=1,Sn=$e[0];Tn<nt-1;++Tn){var Un=$e[Tn];Un=="+"&&Sn=="1"&&$e[Tn+1]=="1"?$e[Tn]="1":Un==","&&Sn==$e[Tn+1]&&(Sn=="1"||Sn=="n")&&($e[Tn]=Sn),Sn=Un}for(var Rr=0;Rr<nt;++Rr){var si=$e[Rr];if(si==",")$e[Rr]="N";else if(si=="%"){var jr=void 0;for(jr=Rr+1;jr<nt&&$e[jr]=="%";++jr);for(var Bi=Rr&&$e[Rr-1]=="!"||jr<nt&&$e[jr]=="1"?"1":"N",ki=Rr;ki<jr;++ki)$e[ki]=Bi;Rr=jr-1}}for(var qr=0,Ei=Me;qr<nt;++qr){var hi=$e[qr];Ei=="L"&&hi=="1"?$e[qr]="L":ee.test(hi)&&(Ei=hi)}for(var ri=0;ri<nt;++ri)if(E.test($e[ri])){var $r=void 0;for($r=ri+1;$r<nt&&E.test($e[$r]);++$r);for(var Ur=(ri?$e[ri-1]:Me)=="L",Di=($r<nt?$e[$r]:Me)=="L",Vo=Ur==Di?Ur?"L":"R":Me,bo=ri;bo<$r;++bo)$e[bo]=Vo;ri=$r-1}for(var pi=[],eo,li=0;li<nt;)if(re.test($e[li])){var bs=li;for(++li;li<nt&&re.test($e[li]);++li);pi.push(new le(0,bs,li))}else{var oo=li,Mo=pi.length,Ao=be=="rtl"?1:0;for(++li;li<nt&&$e[li]!="L";++li);for(var bi=oo;bi<li;)if(oe.test($e[bi])){oo<bi&&(pi.splice(Mo,0,new le(1,oo,bi)),Mo+=Ao);var Uo=bi;for(++bi;bi<li&&oe.test($e[bi]);++bi);pi.splice(Mo,0,new le(2,Uo,bi)),Mo+=Ao,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new le(1,oo,li))}return be=="ltr"&&(pi[0].level==1&&(eo=he.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new le(0,0,eo[0].length))),ve(pi).level==1&&(eo=he.match(/\s+$/))&&(ve(pi).to-=eo[0].length,pi.push(new le(0,nt-eo[0].length,nt)))),be=="rtl"?pi.reverse():pi}}();function ce(a,y){var x=a.order;return x==null&&(x=a.order=ie(a.text,y)),x}var ne=[],ge=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||ne).concat(x)}};function ht(a,y){return a._handlers&&a._handlers[y]||ne}function yt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var ee=Ge(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function Ct(a,y){var x=ht(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function Ie(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Ct(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function _t(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)Ge(x,y[b])==-1&&x.push(y[b])}function Ft(a,y){return ht(a,y).length>0}function It(a){a.prototype.on=function(y,x){ge(this,y,x)},a.prototype.off=function(y,x){yt(this,y,x)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function kn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){un(a),kn(a)}function $n(a){return a.target||a.srcElement}function _n(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var mr=function(){if(me&&Xe<9)return!1;var a=tt("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=tt("span","\u200B");_e(a,tt("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&Xe<8))}var x=er?tt("span","\u200B"):tt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var nr;function In(a){if(nr!=null)return nr;var y=_e(a,document.createTextNode("A\u062EA")),x=Fe(y,0,1).getBoundingClientRect(),b=Fe(y,1,2).getBoundingClientRect();return $t(a),!x||x.left==x.right?!1:nr=b.right-x.right<3}var rr=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=ee.indexOf("\r");re!=-1?(x.push(ee.slice(0,re)),y+=re+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},cr=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Bn=function(){var a=tt("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Xn=null;function Kn(a){if(Xn!=null)return Xn;var y=_e(a,tt("span","x")),x=y.getBoundingClientRect(),b=Fe(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var xr={},Kt={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xr[a]=y}function En(a,y){Kt[a]=y}function An(a){if(typeof a=="string"&&Kt.hasOwnProperty(a))a=Kt[a];else if(a&&typeof a.name=="string"&&Kt.hasOwnProperty(a.name)){var y=Kt[a.name];typeof y=="string"&&(y={name:y}),a=Ne(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return An("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return An("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=An(y);var x=xr[y.name];if(!x)return Jn(a,"text/plain");var b=x(a,y);if(tr.hasOwnProperty(y.name)){var E=tr[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var tr={};function dr(a,y){var x=tr.hasOwnProperty(a)?tr[a]:tr[a]={};vt(y,x)}function Zn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Rn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function hr(a,y,x){return a.startState?a.startState(y,x):!0}var Vt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};Vt.prototype.eol=function(){return this.pos>=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Vt.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},Vt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Vt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Vt.prototype.backUp=function(a){this.pos-=a},Vt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Vt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Vt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Vt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Vt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function at(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function Qt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var re=ee.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Cn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Gn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Te(a){if(a.parent==null)return null;for(var y=a.parent,x=Ge(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function Be(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var oe=a.lines[re],le=oe.height;if(y<le)break;y-=le}return x+re}function Pt(a,y){return y>=a.first&&y<a.first+a.size}function Et(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Ze(a,y,x){if(x===void 0&&(x=null),!(this instanceof Ze))return new Ze(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Dt(a,y){return a.line-y.line||a.ch-y.ch}function Xt(a,y){return a.sticky==y.sticky&&Dt(a,y)==0}function tn(a){return Ze(a.line,a.ch)}function hn(a,y){return Dt(a,y)<0?y:a}function Zt(a,y){return Dt(a,y)<0?a:y}function qt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function At(a,y){if(y.line<a.first)return Ze(a.first,0);var x=a.first+a.size-1;return y.line>x?Ze(x,at(a,x).text.length):xt(y,at(a,y.line).text.length)}function xt(a,y){var x=a.ch;return x==null||x>y?Ze(a.line,y):x<0?Ze(a.line,0):a}function en(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=At(a,y[b]);return x}var vn=function(a,y){this.state=a,this.lookAhead=y},mn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};mn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},mn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(a,y,x){return y instanceof vn?new mn(a,Zn(a.mode,y.state),x,y.lookAhead):new mn(a,Zn(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?Zn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],ee={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},ee,b);for(var re=x.state,oe=function(he){x.baseTokens=E;var be=a.state.overlays[he],Me=1,nt=0;x.state=!0,Qn(a,y.text,be.mode,x,function($e,Mt){for(var Bt=Me;nt<$e;){var Jt=E[Me];Jt>$e&&E.splice(Me,1,$e,E[Me+1],Jt),Me+=2,nt=Math.min($e,Jt)}if(Mt)if(be.opaque)E.splice(Bt,Me-Bt,$e,"overlay "+Mt),Me=Bt+2;else for(;Bt<Me;Bt+=2){var an=E[Bt+1];E[Bt+1]=(an?an+" ":"")+"overlay "+Mt}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},le=0;le<a.state.overlays.length;++le)oe(le);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function Wn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Yn(a,Te(y)),E=y.text.length>a.options.maxHighlightLength&&Zn(a.doc.mode,b.state),ee=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Yn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new mn(b,!0,y);var ee=Lr(a,y,x),re=ee>b.first&&at(b,ee-1).stateAfter,oe=re?mn.fromSaved(b,re,ee):new mn(b,hr(b.mode),ee);return b.iter(ee,y,function(le){dn(a,le.text,oe);var he=oe.line;le.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?oe.save():null,oe.nextLine()}),x&&(b.modeFrontier=oe.line),oe}function dn(a,y,x,b){var E=a.doc.mode,ee=new Vt(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&Gt(E,x.state);!ee.eol();)gn(E,ee,x.state),ee.start=ee.pos}function Gt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Rn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function gn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Rn(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var nn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Hn(a,y,x,b){var E=a.doc,ee=E.mode,re;y=At(E,y);var oe=at(E,y.line),le=Yn(a,y.line,x),he=new Vt(oe.text,a.options.tabSize,le),be;for(b&&(be=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,re=gn(ee,he,le.state),b&&be.push(new nn(he,re,Zn(E.mode,le.state)));return b?be:new nn(he,re,le.state)}function wr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function Qn(a,y,x,b,E,ee,re){var oe=x.flattenSpans;oe==null&&(oe=a.options.flattenSpans);var le=0,he=null,be=new Vt(y,a.options.tabSize,b),Me,nt=a.options.addModeClass&&[null];for(y==""&&wr(Gt(x,b.state),ee);!be.eol();){if(be.pos>a.options.maxHighlightLength?(oe=!1,re&&dn(a,y,b,be.pos),be.pos=y.length,Me=null):Me=wr(gn(x,be,b.state,nt),ee),nt){var $e=nt[0].name;$e&&(Me="m-"+(Me?$e+" "+Me:$e))}if(!oe||he!=Me){for(;le<be.start;)le=Math.min(be.start,le+5e3),E(le,he);he=Me}be.start=be.pos}for(;le<be.pos;){var Mt=Math.min(be.pos,le+5e3);E(Mt,he),le=Mt}}function Lr(a,y,x){for(var b,E,ee=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),oe=y;oe>re;--oe){if(oe<=ee.first)return ee.first;var le=at(ee,oe-1),he=le.stateAfter;if(he&&(!x||oe+(he instanceof vn?he.lookAhead:0)<=ee.modeFrontier))return oe;var be=pe(le.text,null,a.options.tabSize);(E==null||b>be)&&(E=oe-1,b=be)}return E}function Mr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=at(a,b).stateAfter;if(E&&(!(E instanceof vn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Cr=!1,ir=!1;function Nr(){Cr=!0}function gr(){ir=!0}function or(a,y,x){this.marker=a,this.from=y,this.to=x}function Er(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Ar(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function pr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,oe=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);if(oe||ee.from==y&&re.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var le=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new or(re,ee.from,le?null:ee.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,oe=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);if(oe||ee.from==y&&re.type=="bookmark"&&(!x||ee.marker.insertLeft)){var le=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new or(re,le?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Br(a,y){if(y.full)return null;var x=Pt(a,y.from.line)&&at(a,y.from.line).markedSpans,b=Pt(a,y.to.line)&&at(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=Dt(y.from,y.to)==0,oe=qn(x,E,re),le=jn(b,ee,re),he=y.text.length==1,be=ve(y.text).length+(he?E:0);if(oe)for(var Me=0;Me<oe.length;++Me){var nt=oe[Me];if(nt.to==null){var $e=Er(le,nt.marker);$e?he&&(nt.to=$e.to==null?null:$e.to+be):nt.to=E}}if(le)for(var Mt=0;Mt<le.length;++Mt){var Bt=le[Mt];if(Bt.to!=null&&(Bt.to+=be),Bt.from==null){var Jt=Er(oe,Bt.marker);Jt||(Bt.from=be,he&&(oe||(oe=[])).push(Bt))}else Bt.from+=be,he&&(oe||(oe=[])).push(Bt)}oe&&(oe=Vr(oe)),le&&le!=oe&&(le=Vr(le));var an=[oe];if(!he){var fn=y.text.length-2,sn;if(fn>0&&oe)for(var bn=0;bn<oe.length;++bn)oe[bn].to==null&&(sn||(sn=[])).push(new or(oe[bn].marker,null,null));for(var Tn=0;Tn<fn;++Tn)an.push(sn);an.push(le)}return an}function Vr(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Jr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function($e){if($e.markedSpans)for(var Mt=0;Mt<$e.markedSpans.length;++Mt){var Bt=$e.markedSpans[Mt].marker;Bt.readOnly&&(!b||Ge(b,Bt)==-1)&&(b||(b=[])).push(Bt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var re=b[ee],oe=re.find(0),le=0;le<E.length;++le){var he=E[le];if(!(Dt(he.to,oe.from)<0||Dt(he.from,oe.to)>0)){var be=[le,1],Me=Dt(he.from,oe.from),nt=Dt(he.to,oe.to);(Me<0||!re.inclusiveLeft&&!Me)&&be.push({from:he.from,to:oe.from}),(nt>0||!re.inclusiveRight&&!nt)&&be.push({from:oe.to,to:he.to}),E.splice.apply(E,be),le+=be.length-3}}return E}function Dr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Hr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Fr(a){return a.inclusiveLeft?-1:0}function Zr(a){return a.inclusiveRight?1:0}function ii(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=Dt(b.from,E.from)||Fr(a)-Fr(y);if(ee)return-ee;var re=Dt(b.to,E.to)||Zr(a)-Zr(y);return re||y.id-a.id}function Or(a,y){var x=ir&&a.markedSpans,b;if(x)for(var E=void 0,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function Nn(a){return Or(a,!0)}function Wt(a){return Or(a,!1)}function Yt(a,y){var x=ir&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||ii(b,ee.marker)<0)&&(b=ee.marker)}return b}function yn(a,y,x,b,E){var ee=at(a,y),re=ir&&ee.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var le=re[oe];if(le.marker.collapsed){var he=le.marker.find(0),be=Dt(he.from,x)||Fr(le.marker)-Fr(E),Me=Dt(he.to,b)||Zr(le.marker)-Zr(E);if(!(be>=0&&Me<=0||be<=0&&Me>=0)&&(be<=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Dt(he.to,x)>=0:Dt(he.to,x)>0)||be>=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Dt(he.from,b)<=0:Dt(he.from,b)<0)))return!0}}}function on(a){for(var y;y=Nn(a);)a=y.find(-1,!0).line;return a}function Dn(a){for(var y;y=Wt(a);)a=y.find(1,!0).line;return a}function ar(a){for(var y,x;y=Wt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Ut(a,y){var x=at(a,y),b=on(x);return x==b?y:Te(b)}function Rt(a,y){if(y>a.lastLine())return y;var x=at(a,y),b;if(!rn(a,x))return y;for(;b=Wt(x);)x=b.find(1,!0).line;return Te(x)+1}function rn(a,y){var x=ir&&y.markedSpans;if(x){for(var b=void 0,E=0;E<x.length;++E)if(b=x[E],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&ln(a,y,b))return!0}}}function ln(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return ln(a,b.line,Er(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&ln(a,y,E))return!0}function Mn(a){a=on(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var ee=x.parent;ee;x=ee,ee=x.parent)for(var re=0;re<ee.children.length;++re){var oe=ee.children[re];if(oe==x)break;y+=oe.height}return y}function sr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Nn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Wt(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function Vn(a){var y=a.display,x=a.doc;y.maxLine=at(x,x.first),y.maxLineLength=sr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=sr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var yr=function(a,y,x){this.text=a,Hr(this,y),this.height=x?x(this):1};yr.prototype.lineNo=function(){return Te(this)},It(yr);function br(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Dr(a),Hr(a,x);var E=b?b(a):1;E!=a.height&&Gn(a,E)}function Sr(a){a.parent=null,Dr(a)}var zr={},Tr={};function Wr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Tr:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=Lt("span",null,null,Le?"padding-right: .1px":null),b={pre:Lt("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,In(a.display.measure)&&(re=ce(ee,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&Te(ee);fr(ee,b,Wn(a,ee,oe)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=zt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=zt(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(ur(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Le){var le=b.content.lastChild;(/\bcm-tab\b/.test(le.className)||le.querySelector&&le.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Ct(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=zt(b.pre.className,b.textClass||"")),b}function Li(a){var y=tt("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Oi(a,y,x,b,E,ee,re){if(y){var oe=a.splitSpaces?xi(y,a.trailingSpace):y,le=a.cm.state.specialChars,he=!1,be;if(!le.test(y))a.col+=y.length,be=document.createTextNode(oe),a.map.push(a.pos,a.pos+y.length,be),me&&Xe<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Me=0;;){le.lastIndex=Me;var nt=le.exec(y),$e=nt?nt.index-Me:y.length-Me;if($e){var Mt=document.createTextNode(oe.slice(Me,Me+$e));me&&Xe<9?be.appendChild(tt("span",[Mt])):be.appendChild(Mt),a.map.push(a.pos,a.pos+$e,Mt),a.col+=$e,a.pos+=$e}if(!nt)break;Me+=$e+1;var Bt=void 0;if(nt[0]==" "){var Jt=a.cm.options.tabSize,an=Jt-a.col%Jt;Bt=be.appendChild(tt("span",xe(an),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),a.col+=an}else nt[0]=="\r"||nt[0]==`
`?(Bt=be.appendChild(tt("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",nt[0]),a.col+=1):(Bt=a.cm.options.specialCharPlaceholder(nt[0]),Bt.setAttribute("cm-text",nt[0]),me&&Xe<9?be.appendChild(tt("span",[Bt])):be.appendChild(Bt),a.col+=1);a.map.push(a.pos,a.pos+1,Bt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||he||ee||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=tt("span",[be],fn,ee);if(re)for(var bn in re)re.hasOwnProperty(bn)&&bn!="style"&&bn!="class"&&sn.setAttribute(bn,re[bn]);return a.content.appendChild(sn)}a.content.appendChild(be)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function vi(a,y){return function(x,b,E,ee,re,oe,le){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,be=he+b.length;;){for(var Me=void 0,nt=0;nt<y.length&&(Me=y[nt],!(Me.to>he&&Me.from<=he));nt++);if(Me.to>=be)return a(x,b,E,ee,re,oe,le);a(x,b.slice(0,Me.to-he),E,ee,null,oe,le),ee=null,b=b.slice(Me.to-he),he=Me.to}}}function Xi(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function fr(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(ee,ee=x[re]),Wr(x[re+1],y.cm.options));return}for(var oe=E.length,le=0,he=1,be="",Me,nt,$e=0,Mt,Bt,Jt,an,fn;;){if($e==le){Mt=Bt=Jt=nt="",fn=null,an=null,$e=1/0;for(var sn=[],bn=void 0,Tn=0;Tn<b.length;++Tn){var Sn=b[Tn],Un=Sn.marker;if(Un.type=="bookmark"&&Sn.from==le&&Un.widgetNode)sn.push(Un);else if(Sn.from<=le&&(Sn.to==null||Sn.to>le||Un.collapsed&&Sn.to==le&&Sn.from==le)){if(Sn.to!=null&&Sn.to!=le&&$e>Sn.to&&($e=Sn.to,Bt=""),Un.className&&(Mt+=" "+Un.className),Un.css&&(nt=(nt?nt+";":"")+Un.css),Un.startStyle&&Sn.from==le&&(Jt+=" "+Un.startStyle),Un.endStyle&&Sn.to==$e&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Rr in Un.attributes)(fn||(fn={}))[Rr]=Un.attributes[Rr];Un.collapsed&&(!an||ii(an.marker,Un)<0)&&(an=Sn)}else Sn.from>le&&$e>Sn.from&&($e=Sn.from)}if(bn)for(var si=0;si<bn.length;si+=2)bn[si+1]==$e&&(Bt+=" "+bn[si]);if(!an||an.from==le)for(var jr=0;jr<sn.length;++jr)Xi(y,0,sn[jr]);if(an&&(an.from||0)==le){if(Xi(y,(an.to==null?oe+1:an.to)-le,an.marker,an.from==null),an.to==null)return;an.to==le&&(an=!1)}}if(le>=oe)break;for(var Bi=Math.min(oe,$e);;){if(be){var ki=le+be.length;if(!an){var qr=ki>Bi?be.slice(0,Bi-le):be;y.addToken(y,qr,Me?Me+Mt:Mt,Jt,le+qr.length==$e?Bt:"",nt,fn)}if(ki>=Bi){be=be.slice(Bi-le),le=Bi;break}le=ki,Jt=""}be=E.slice(ee,ee=x[he++]),Me=Wr(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ar(y),this.size=this.rest?Te(ve(this.rest))-x+1:1,this.node=this.text=null,this.hidden=rn(a,y)}function ti(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new to(a.doc,at(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var Fi=null;function ao(a){Fi?Fi.ops.push(a):a.ownsGroup=Fi={ops:[a],delayedCallbacks:[]}}function Ji(a){var y=a.delayedCallbacks,x=0;do{for(;x<y.length;x++)y[x].call(null);for(var b=0;b<a.ops.length;b++){var E=a.ops[b];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(x<y.length)}function mi(a,y){var x=a.ownsGroup;if(x)try{Ji(x)}finally{Fi=null,y(x)}}var Ni=null;function _r(a,y){var x=ht(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Fi?E=Fi.delayedCallbacks:Ni?E=Ni:(E=Ni=[],setTimeout(Wi,0));for(var ee=function(oe){E.push(function(){return x[oe].apply(null,b)})},re=0;re<x.length;++re)ee(re)}}function Wi(){var a=Ni;Ni=null;for(var y=0;y<a.length;++y)a[y]()}function so(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?lo(a,y):ee=="gutter"?On(a,y,x,b):ee=="class"?Ln(a,y):ee=="widget"&&Pn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=tt("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&Xe<8&&(a.node.style.zIndex=2)),a.node}function Qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(tt("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ei(a,y)}function lo(a,y){var x=y.text.className,b=xo(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,Ln(a,y)):x&&(y.text.className=x)}function Ln(a,y){Qr(a,y),y.line.wrapClass?Zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function On(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Zi(y);y.gutterBackground=tt("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var re=Zi(y),oe=y.gutter=tt("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(oe),re.insertBefore(oe,y.text),y.line.gutterClass&&(oe.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=oe.appendChild(tt("div",Et(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var le=0;le<a.display.gutterSpecs.length;++le){var he=a.display.gutterSpecs[le].className,be=ee.hasOwnProperty(he)&&ee[he];be&&oe.appendChild(tt("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Pn(a,y,x){y.alignable&&(y.alignable=null);for(var b=pt("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);vr(a,y,x)}function Fn(a,y,x,b){var E=xo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Ln(a,y),On(a,y,x,b),vr(a,y,b),y.node}function vr(a,y,x){if(Ir(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Ir(a,y.rest[b],y,x,!1)}function Ir(a,y,x,b,E){if(y.widgets)for(var ee=Zi(x),re=0,oe=y.widgets;re<oe.length;++re){var le=oe[re],he=tt("div",[le.node],"CodeMirror-linewidget"+(le.className?" "+le.className:""));le.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Gi(le,he,x,b),a.display.input.setUneditable(he),E&&le.above?ee.insertBefore(he,x.gutter||x.text):ee.appendChild(he),_r(le,"redraw")}}function Gi(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function gi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Qe(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),_e(y.display.measure,tt("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=$n(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function Kr(a){return a.lineSpace.offsetTop}function Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=_e(a.measure,tt("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Mi(a){return wt-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Mi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mi(a)-a.display.barHeight}function ji(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),oe=0;oe<re.length-1;oe++){var le=re[oe],he=re[oe+1];Math.abs(le.bottom-he.bottom)>2&&ee.push((le.bottom+he.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function To(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(Te(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=on(y);var x=Te(y),b=a.display.externalMeasured=new to(a.doc,y,x);b.lineN=x;var E=b.built=ei(a,b);return b.text=E.pre,_e(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return zi(a,uo(a,y),x,b)}function $i(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=Te(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(so(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=To(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function zi(a,y,x,b,E){y.before&&(x=-1);var ee=x+(b||""),re;return y.cache.hasOwnProperty(ee)?re=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(ji(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[ee]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ee,re,oe,le,he=0;he<a.length;he+=3)if(oe=a[he],le=a[he+1],y<oe?(E=0,ee=1,re="left"):y<le?(E=y-oe,ee=E+1):(he==a.length-3||y==le&&a[he+3]>y)&&(ee=le-oe,E=ee-1,y>=le&&(re="right")),E!=null){if(b=a[he+2],oe==le&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],re="left";if(x=="right"&&E==le-oe)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],re="right";break}return{node:b,start:E,end:ee,collapse:re,coverStart:oe,coverEnd:le}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,re=E.start,oe=E.end,le=E.collapse,he;if(ee.nodeType==3){for(var be=0;be<4;be++){for(;re&&ct(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe<E.coverEnd&&ct(y.line.text.charAt(E.coverStart+oe));)++oe;if(me&&Xe<9&&re==0&&oe==E.coverEnd-E.coverStart?he=ee.parentNode.getBoundingClientRect():he=Va(Fe(ee,re,oe).getClientRects(),b),he.left||he.right||re==0)break;oe=re,re=re-1,le="right"}me&&Xe<11&&(he=Ua(a.display.measure,he))}else{re>0&&(le=b="right");var Me;a.options.lineWrapping&&(Me=ee.getClientRects()).length>1?he=Me[b=="right"?Me.length-1:0]:he=ee.getBoundingClientRect()}if(me&&Xe<9&&!re&&(!he||!he.left&&!he.right)){var nt=ee.parentNode.getClientRects()[0];nt?he={left:nt.left,right:nt.left+Ui(a.display),top:nt.top,bottom:nt.bottom}:he=ba}for(var $e=he.top-y.rect.top,Mt=he.bottom-y.rect.top,Bt=($e+Mt)/2,Jt=y.view.measure.heights,an=0;an<Jt.length-1&&!(Bt<Jt[an]);an++);var fn=an?Jt[an-1]:0,sn=Jt[an],bn={left:(le=="right"?he.right:he.left)-y.rect.left,right:(le=="left"?he.left:he.right)-y.rect.left,top:fn,bottom:sn};return!he.left&&!he.right&&(bn.bogus=!0),a.options.singleCursorHeightPerLine||(bn.rtop=$e,bn.rbottom=Mt),bn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kn(a))return y;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*x,right:y.right*x,top:y.top*b,bottom:y.bottom*b}}function Ko(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function Yo(a){a.display.externalMeasure=null,$t(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function wo(a){Yo(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Xo(){return ke&&Re?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return ke&&Re?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=gi(a.widgets[x]));return y}function Po(a,y,x,b,E){if(!E){var ee=Jo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var re=Mn(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var oe=a.display.lineSpace.getBoundingClientRect();re+=oe.top+(b=="window"?0:Ca());var le=oe.left+(b=="window"?0:Xo());x.left+=le,x.right+=le}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Bo(a,y,x,b,E){return b||(b=at(a.doc,y.line)),Po(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,ee){b=b||at(a.doc,y.line),E||(E=uo(a,b));function re(Mt,Bt){var Jt=zi(a,E,Mt,Bt?"right":"left",ee);return Bt?Jt.left=Jt.right:Jt.right=Jt.left,Po(a,b,Jt,x)}var oe=ce(b,a.doc.direction),le=y.ch,he=y.sticky;if(le>=b.text.length?(le=b.text.length,he="before"):le<=0&&(le=0,he="after"),!oe)return re(he=="before"?le-1:le,he=="before");function be(Mt,Bt,Jt){var an=oe[Bt],fn=an.level==1;return re(Jt?Mt-1:Mt,fn!=Jt)}var Me=z(oe,le,he),nt=te,$e=be(le,Me,he=="before");return nt!=null&&($e.other=be(le,nt,he!="before")),$e}function lr(a,y){var x=0;y=At(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=at(a.doc,y.line),E=Mn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function zn(a,y,x,b,E){var ee=Ze(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return zn(b.first,0,null,-1,-1);var E=Be(b,x),ee=b.first+b.size-1;if(E>ee)return zn(b.first+b.size-1,at(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=at(b,E);;){var oe=Vi(a,re,E,y,x),le=Yt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!le)return oe;var he=le.find(1);if(he.line==E)return he;re=at(b,E=he.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,ee=Ot(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Ot(function(re){return zi(a,x,re).top>b},ee,E),{begin:ee,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,zi(a,x,b),"line").top;return fi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=Mn(y);var ee=uo(a,y),re=Jo(y),oe=0,le=y.text.length,he=!0,be=ce(y,a.doc.direction);if(be){var Me=(a.options.lineWrapping?ro:_i)(a,y,x,ee,be,b,E);he=Me.level!=1,oe=he?Me.from:Me.to-1,le=he?Me.to:Me.from-1}var nt=null,$e=null,Mt=Ot(function(Tn){var Sn=zi(a,ee,Tn);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(nt=Tn,$e=Sn),!0):!1},oe,le),Bt,Jt,an=!1;if($e){var fn=b-$e.left<$e.right-b,sn=fn==he;Mt=nt+(sn?0:1),Jt=sn?"after":"before",Bt=fn?$e.left:$e.right}else{!he&&(Mt==le||Mt==oe)&&Mt++,Jt=Mt==0?"after":Mt==y.text.length?"before":zi(a,ee,Mt-(he?1:0)).bottom+re<=E==he?"after":"before";var bn=wi(a,Ze(x,Mt,Jt),"line",y,ee);Bt=bn.left,an=E<bn.top?-1:E>=bn.bottom?1:0}return Mt=jt(y.text,Mt,1),zn(x,Mt,Jt,an,b-Bt)}function _i(a,y,x,b,E,ee,re){var oe=Ot(function(Me){var nt=E[Me],$e=nt.level!=1;return ni(wi(a,Ze(x,$e?nt.to:nt.from,$e?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),le=E[oe];if(oe>0){var he=le.level!=1,be=wi(a,Ze(x,he?le.from:le.to,he?"after":"before"),"line",y,b);ni(be,ee,re,!0)&&be.top>re&&(le=E[oe-1])}return le}function ro(a,y,x,b,E,ee,re){var oe=fi(a,y,b,re),le=oe.begin,he=oe.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,Me=null,nt=0;nt<E.length;nt++){var $e=E[nt];if(!($e.from>=he||$e.to<=le)){var Mt=$e.level!=1,Bt=zi(a,b,Mt?Math.min(he,$e.to)-1:Math.max(le,$e.from)).right,Jt=Bt<ee?ee-Bt+1e9:Bt-ee;(!be||Me>Jt)&&(be=$e,Me=Jt)}}return be||(be=E[E.length-1]),be.from<le&&(be={from:le,to:be.to,level:be.level}),be.to>he&&(be={from:be.from,to:he,level:be.level}),be}var Ai;function Ti(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ai==null){Ai=tt("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ai.appendChild(document.createTextNode("x")),Ai.appendChild(tt("br"));Ai.appendChild(document.createTextNode("x"))}_e(a.measure,Ai);var x=Ai.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),$t(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=tt("span","xxxxxxxxxx"),x=tt("pre",[y],"CodeMirror-line-like");_e(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=ee.offsetLeft+ee.clientLeft+E,b[oe]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ti(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(rn(a.doc,E))return 0;var ee=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(ee+=E.widgets[re].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&Gn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&$n(y).getAttribute("cm-not-content")=="true")return null;var ee,re,oe=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-oe.left,re=y.clientY-oe.top}catch(Me){return null}var le=ci(a,ee,re),he;if(b&&le.xRel>0&&(he=at(a.doc,le.line).text).length==le.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;le=Ze(le.line,Math.max(0,Math.round((ee-Qi(a.display).left)/Ui(a.display))-be))}return le}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function Ci(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)ir&&Ut(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)ir&&Rt(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var oe=ka(a,y,y,-1),le=ka(a,x,x+b,1);oe&&le?(E.view=E.view.slice(0,oe.index).concat(ti(a,oe.lineN,le.lineN)).concat(E.view.slice(le.index)),E.viewTo+=b):fo(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var ee=b.view[So(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);Ge(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),ee,re=a.display.view;if(!ir||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,le=0;le<E;le++)oe+=re[le].size;if(oe!=y){if(b>0){if(E==re.length-1)return null;ee=oe+re[E].size-y,E++}else ee=oe-y;y+=ee,x+=ee}for(;Ut(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=ti(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ti(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(So(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(ti(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cs(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Qo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ee=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var oe=x.sel.ranges[re];if(!(oe.from().line>=a.display.viewTo||oe.to().line<a.display.viewFrom)){var le=oe.empty();(le||a.options.showCursorWhenSelecting)&&ks(a,oe.head,E),le||zl(a,oe,ee)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(tt("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ee=x.appendChild(tt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function zl(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),re=Qi(a.display),oe=re.left,le=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,he=E.direction=="ltr";function be(sn,bn,Tn,Sn){bn<0&&(bn=0),bn=Math.round(bn),Sn=Math.round(Sn),ee.appendChild(tt("div",null,"CodeMirror-selected","position: absolute; left: "+sn+`px;
top: `+bn+"px; width: "+(Tn==null?le-sn:Tn)+`px;
height: `+(Sn-bn)+"px"))}function Me(sn,bn,Tn){var Sn=at(E,sn),Un=Sn.text.length,Rr,si;function jr(qr,Ei){return Bo(a,Ze(sn,qr),"div",Sn,Ei)}function Bi(qr,Ei,hi){var ri=Yr(a,Sn,null,qr),$r=Ei=="ltr"==(hi=="after")?"left":"right",Ur=hi=="after"?ri.begin:ri.end-(/\s/.test(Sn.text.charAt(ri.end-1))?2:1);return jr(Ur,$r)[$r]}var ki=ce(Sn,E.direction);return se(ki,bn||0,Tn==null?Un:Tn,function(qr,Ei,hi,ri){var $r=hi=="ltr",Ur=jr(qr,$r?"left":"right"),Di=jr(Ei-1,$r?"right":"left"),Vo=bn==null&&qr==0,bo=Tn==null&&Ei==Un,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var li=(he?Vo:bo)&&pi,bs=(he?bo:Vo)&&eo,oo=li?oe:($r?Ur:Di).left,Mo=bs?le:($r?Di:Ur).right;be(oo,Ur.top,Mo-oo,Ur.bottom)}else{var Ao,bi,Uo,xs;$r?(Ao=he&&Vo&&pi?oe:Ur.left,bi=he?le:Bi(qr,hi,"before"),Uo=he?oe:Bi(Ei,hi,"after"),xs=he&&bo&&eo?le:Di.right):(Ao=he?Bi(qr,hi,"before"):oe,bi=!he&&Vo&&pi?le:Ur.right,Uo=!he&&bo&&eo?oe:Di.left,xs=he?Bi(Ei,hi,"after"):le),be(Ao,Ur.top,bi-Ao,Ur.bottom),Ur.bottom<Di.top&&be(oe,Ur.bottom,null,Di.top),be(Uo,Di.top,xs-Uo,Di.bottom)}(!Rr||Ea(Ur,Rr)<0)&&(Rr=Ur),Ea(Di,Rr)<0&&(Rr=Di),(!si||Ea(Ur,si)<0)&&(si=Ur),Ea(Di,si)<0&&(si=Di)}),{start:Rr,end:si}}var nt=y.from(),$e=y.to();if(nt.line==$e.line)Me(nt.line,nt.ch,$e.ch);else{var Mt=at(E,nt.line),Bt=at(E,$e.line),Jt=on(Mt)==on(Bt),an=Me(nt.line,nt.ch,Jt?Mt.text.length+1:null).end,fn=Me($e.line,Jt?0:null,$e.ch).start;Jt&&(an.top<fn.top-2?(be(an.right,an.top,null,an.bottom),be(oe,fn.top,fn.left,fn.bottom)):be(an.right,an.top,fn.left-an.right,an.bottom)),an.bottom<fn.top&&be(oe,an.bottom,null,fn.top)}x.appendChild(ee)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Fo(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ds(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Fo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ct(a,"focus",a,y),a.state.focused=!0,Ye(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Le&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ct(a,"blur",a,y),a.state.focused=!1,dt(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Da(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ee=a.options.lineWrapping,re=void 0,oe=0;if(!E.hidden){if(me&&Xe<8){var le=E.node.offsetTop+E.node.offsetHeight;re=le-x,x=le}else{var he=E.node.getBoundingClientRect();re=he.bottom-he.top,!ee&&E.text.firstChild&&(oe=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(Gn(E.line,re),Ls(E.line),E.rest))for(var Me=0;Me<E.rest.length;Me++)Ls(E.rest[Me]);if(oe>a.display.sizerWidth){var nt=Math.ceil(oe/Ui(a.display));nt>a.display.maxLineLength&&(a.display.maxLineLength=nt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ls(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function La(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Kr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=Be(y,b),re=Be(y,E);if(x&&x.ensure){var oe=x.ensure.from.line,le=x.ensure.to.line;oe<ee?(ee=oe,re=Be(y,Mn(at(y,oe))+a.wrapper.clientHeight)):Math.min(le,y.lastLine())>=re&&(ee=Be(y,Mn(at(y,le))-a.wrapper.clientHeight),re=le)}return{from:ee,to:Math.max(re,ee+1)}}function _l(a,y){if(!Ie(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!ut){var ee=tt("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
height: `+(y.bottom-y.top+Mi(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ze(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ze(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,oe=wi(a,y),le=!x||x==y?oe:wi(a,x);E={left:Math.min(oe.left,le.left),top:Math.min(oe.top,le.top)-b,right:Math.max(oe.left,le.left),bottom:Math.max(oe.bottom,le.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,Me=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),he.scrollLeft!=null&&(ko(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Me)>1&&(re=!0)),!re)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&ko(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ti(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=no(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var oe=a.doc.height+Hi(x),le=y.top<b,he=y.bottom>oe-b;if(y.top<E)re.scrollTop=le?0:y.top;else if(y.bottom>E+ee){var be=Math.min(y.top,(he?oe:y.bottom)-ee);be!=E&&(re.scrollTop=be)}var Me=a.options.fixedGutter?0:x.gutters.offsetWidth,nt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Me,$e=qi(a)-x.gutters.offsetWidth,Mt=y.right-y.left>$e;return Mt&&(y.right=y.left+$e),y.left<10?re.scrollLeft=0:y.left<nt?re.scrollLeft=Math.max(0,y.left+Me-(Mt?0:10)):y.right>$e+nt-3&&(re.scrollLeft=y.right+(Mt?0:10)-$e),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function No(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=lr(a,y.from),b=lr(a,y.to);Ms(a,x,b,y.margin)}}function Ms(a,y,x,b){var E=Qa(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(ae||es(a,{top:y}),As(a,y,!0),ae&&es(a),na(a,100))}function As(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ko(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Ns(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Hi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=tt("div",[tt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=tt("div",[tt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ge(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ge(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&Xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=De&&!ye?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue,this.disableVert=new ue},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Io(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ts(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),Ts(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ts(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ps={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&dt(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ge(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?ko(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&Ye(a.display.wrapper,a.display.scrollbars.addClass)}var Vl=0;function Do(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.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:++Vl},ao(a.curOp)}function Lo(a){var y=a.curOp;y&&mi(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Ul(x)})}function Ul(a){for(var y=a.ops,x=0;x<y.length;x++)Kl(y[x]);for(var b=0;b<y.length;b++)Yl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var ee=0;ee<y.length;ee++)Jl(y[ee]);for(var re=0;re<y.length;re++)Ql(y[re])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&Vn(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Aa(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Da(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Mi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ko(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Pe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Io(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fs(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&As(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,At(b,a.scrollToPos.from),At(b,a.scrollToPos.to),a.scrollToPos.margin);_l(y,E)}var ee=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(ee)for(var oe=0;oe<ee.length;++oe)ee[oe].lines.length||Ct(ee[oe],"hide");if(re)for(var le=0;le<re.length;++le)re[le].lines.length&&Ct(re[le],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Ct(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Pi(a,y){if(a.curOp)return y();Do(a);try{return y()}finally{Lo(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Do(a);try{return y.apply(a,arguments)}finally{Lo(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Do(this);try{return a.apply(this,arguments)}finally{Lo(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Do(y);try{return a.apply(this,arguments)}finally{Lo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Tt(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Yn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var re=ee.styles,oe=ee.text.length>a.options.maxHighlightLength?Zn(y.mode,b.state):null,le=xn(a,ee,b,!0);oe&&(b.state=oe),ee.styles=le.styles;var he=ee.styleClasses,be=le.classes;be?ee.styleClasses=be:he&&(ee.styleClasses=null);for(var Me=!re||re.length!=ee.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),nt=0;!Me&&nt<re.length;++nt)Me=re[nt]!=ee.styles[nt];Me&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&dn(a,ee.text,b),ee.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pi(a,function(){for(var ee=0;ee<E.length;ee++)ho(a,E[ee],"text")})}}var Aa=function(a,y,x){var b=a.display;this.viewport=y,this.visible=La(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=qi(a),this.force=x,this.dims=co(a),this.events=[]};Aa.prototype.signal=function(a,y){Ft(a,y)&&this.events.push(arguments)},Aa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ct.apply(null,this.events[a])};function $l(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Mi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Pe();if(!y||!Qe(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Qe(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==Pe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Qe(document.body,a.anchorNode)&&Qe(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Is(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),ir&&(ee=Ut(a.doc,ee),re=Rt(a.doc,re));var oe=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ee,re),x.viewOffset=Mn(at(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var le=Cs(a);if(!oe&&le==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return le>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),le>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),$t(x.cursorDiv),$t(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,oe&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Fs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Hi(a.display)-no(a),x.top)}),y.visible=La(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=La(a.display,a.doc,x));if(!$a(a,y))break;Da(a);var E=ea(a);Qo(a),Io(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Aa(a,y);if($a(a,x)){Da(a),Fs(a,x);var b=ea(a);Qo(a),Io(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,re=ee.firstChild;function oe(Mt){var Bt=Mt.nextSibling;return Le&&De&&a.display.currentWheelTarget==Mt?Mt.style.display="none":Mt.parentNode.removeChild(Mt),Bt}for(var le=b.view,he=b.viewFrom,be=0;be<le.length;be++){var Me=le[be];if(!Me.hidden)if(!Me.node||Me.node.parentNode!=ee){var nt=Fn(a,Me,he,x);ee.insertBefore(nt,re)}else{for(;re!=Me.node;)re=oe(re);var $e=E&&y!=null&&y<=he&&Me.lineNumber;Me.changes&&(Ge(Me.changes,"gutter")>-1&&($e=!1),so(a,Me,he,x)),$e&&($t(Me.lineNumber),Me.lineNumber.appendChild(document.createTextNode(Et(a.options,he)))),re=Me.node.nextSibling}he+=Me.size}for(;re;)re=oe(re)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Mi(a)+"px"}function Ns(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=ee),x[re].gutterBackground&&(x[re].gutterBackground.style.left=ee));var oe=x[re].alignable;if(oe)for(var le=0;le<oe.length;le++)oe[le].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Is(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Et(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(tt("div",[tt("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,re=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],re=null;if(typeof ee!="string"&&(re=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rs(a){var y=a.gutters,x=a.gutterSpecs;$t(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,re=E.style,oe=y.appendChild(tt("div",null,"CodeMirror-gutter "+ee));re&&(oe.style.cssText=re),ee=="CodeMirror-linenumbers"&&(a.lineGutter=oe,oe.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Rs(a.display),Ci(a),Ns(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=tt("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=tt("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Lt("div",null,"CodeMirror-code"),E.selectionDiv=tt("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=tt("div",null,"CodeMirror-cursors"),E.measure=tt("div",null,"CodeMirror-measure"),E.lineMeasure=tt("div",null,"CodeMirror-measure"),E.lineSpace=Lt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=Lt("div",[E.lineSpace],"CodeMirror-lines");E.mover=tt("div",[ee],null,"position: relative"),E.sizer=tt("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=tt("div",null,null,"position: absolute; height: "+wt+"px; width: 1px;"),E.gutters=tt("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=tt("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=tt("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&Xe<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Le&&!(ae&&Oe)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),Rs(E),x.init(E)}var Ta=0,Ii=null;me?Ii=-.53:ae?Ii=15:ke?Ii=-.7:Ae&&(Ii=-1/3);function Os(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Os(a);return y.x*=Ii,y.y*=Ii,y}function Ws(a,y){var x=Os(y),b=x.x,E=x.y,ee=a.display,re=ee.scroller,oe=re.scrollWidth>re.clientWidth,le=re.scrollHeight>re.clientHeight;if(b&&oe||E&&le){if(E&&De&&Le){e:for(var he=y.target,be=ee.view;he!=re;he=he.parentNode)for(var Me=0;Me<be.length;Me++)if(be[Me].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!ae&&!de&&Ii!=null){E&&le&&$o(a,Math.max(0,re.scrollTop+E*Ii)),ko(a,Math.max(0,re.scrollLeft+b*Ii)),(!E||E&&le)&&un(y),ee.wheelStartX=null;return}if(E&&Ii!=null){var nt=E*Ii,$e=a.doc.scrollTop,Mt=$e+ee.wrapper.clientHeight;nt<0?$e=Math.max(0,$e+nt-50):Mt=Math.min(a.doc.height,Mt+nt+50),es(a,{top:$e,bottom:Mt})}Ta<20&&(ee.wheelStartX==null?(ee.wheelStartX=re.scrollLeft,ee.wheelStartY=re.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var Bt=re.scrollLeft-ee.wheelStartX,Jt=re.scrollTop-ee.wheelStartY,an=Jt&&ee.wheelDY&&Jt/ee.wheelDY||Bt&&ee.wheelDX&&Bt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,an&&(Ii=(Ii*Ta+an)/(Ta+1),++Ta)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var Ri=function(a,y){this.ranges=a,this.primIndex=y};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var x=this.ranges[y],b=a.ranges[y];if(!Xt(x.anchor,b.anchor)||!Xt(x.head,b.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new kr(tn(this.ranges[y].anchor),tn(this.ranges[y].head));return new Ri(a,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ri.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Dt(y,b.from())>=0&&Dt(a,b.to())<=0)return x}return-1};var kr=function(a,y){this.anchor=a,this.head=y};kr.prototype.from=function(){return Zt(this.anchor,this.head)},kr.prototype.to=function(){return hn(this.anchor,this.head)},kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(nt,$e){return Dt(nt.from(),$e.from())}),x=Ge(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],oe=y[ee-1],le=Dt(oe.to(),re.from());if(b&&!re.empty()?le>0:le>=0){var he=Zt(oe.from(),re.from()),be=hn(oe.to(),re.to()),Me=oe.empty()?re.from()==re.head:oe.from()==oe.head;ee<=x&&--x,y.splice(--ee,2,new kr(Me?be:he,Me?he:be))}}return new Ri(y,x)}function po(a,y){return new Ri([new kr(a,y||a)],0)}function vo(a){return a.text?Ze(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(Dt(a,y.from)<0)return a;if(Dt(a,y.to)<=0)return vo(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=vo(y).ch-y.to.ch),Ze(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new kr(Hs(E.anchor,y),Hs(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function zs(a,y,x){return a.line==y.line?Ze(x.line,a.ch-y.ch+x.ch):Ze(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Ze(a.first,0),ee=E,re=0;re<y.length;re++){var oe=y[re],le=zs(oe.from,E,ee),he=zs(vo(oe),E,ee);if(E=oe.to,ee=he,x=="around"){var be=a.sel.ranges[re],Me=Dt(be.head,be.anchor)<0;b[re]=new kr(Me?he:le,Me?le:he)}else b[re]=new kr(le,le)}return new Ri(b,a.sel.primIndex)}function os(a){a.doc.mode=Jn(a.options,a.doc.modeOption),ia(a)}function ia(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&Ci(a)}function _s(a,y){return y.from.ch==0&&y.to.ch==0&&ve(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(fn){return x?x[fn]:null}function ee(fn,sn,bn){br(fn,sn,bn,b),_r(fn,"change",fn,y)}function re(fn,sn){for(var bn=[],Tn=fn;Tn<sn;++Tn)bn.push(new yr(he[Tn],E(Tn),b));return bn}var oe=y.from,le=y.to,he=y.text,be=at(a,oe.line),Me=at(a,le.line),nt=ve(he),$e=E(he.length-1),Mt=le.line-oe.line;if(y.full)a.insert(0,re(0,he.length)),a.remove(he.length,a.size-he.length);else if(_s(a,y)){var Bt=re(0,he.length-1);ee(Me,Me.text,$e),Mt&&a.remove(oe.line,Mt),Bt.length&&a.insert(oe.line,Bt)}else if(be==Me)if(he.length==1)ee(be,be.text.slice(0,oe.ch)+nt+be.text.slice(le.ch),$e);else{var Jt=re(1,he.length-1);Jt.push(new yr(nt+be.text.slice(le.ch),$e,b)),ee(be,be.text.slice(0,oe.ch)+he[0],E(0)),a.insert(oe.line+1,Jt)}else if(he.length==1)ee(be,be.text.slice(0,oe.ch)+he[0]+Me.text.slice(le.ch),E(0)),a.remove(oe.line+1,Mt);else{ee(be,be.text.slice(0,oe.ch)+he[0],E(0)),ee(Me,nt+Me.text.slice(le.ch),$e);var an=re(1,he.length-1);Mt>1&&a.remove(oe.line+1,Mt-1),a.insert(oe.line+1,an)}_r(a,"change",a,y)}function mo(a,y,x){function b(E,ee,re){if(E.linked)for(var oe=0;oe<E.linked.length;++oe){var le=E.linked[oe];if(le.doc!=ee){var he=re&&le.sharedHist;x&&!he||(y(le.doc,he),b(le.doc,E,he))}}}b(a,null,!0)}function Zs(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),Gs(a),a.options.lineWrapping||Vn(a),a.options.mode=y.modeOption,Ci(a)}function Gs(a){(a.doc.direction=="rtl"?Ye:dt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Pi(a,function(){Gs(a),Ci(a)})}function Pa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:tn(y.from),to:vo(y),text:Qt(a,y.from,y.to)};return Us(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Us(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=ve(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),ve(a.done);if(a.done.length&&!ve(a.done).ranges)return ve(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ve(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,re,oe;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=su(E,E.lastOp==b)))oe=ve(re.changes),Dt(y.from,y.to)==0&&Dt(y.from,oe.to)==0?oe.to=vo(y):re.changes.push(ss(a,y));else{var le=ve(E.done);for((!le||!le.ranges)&&Ba(a.sel,E.done),re={changes:[ss(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,oe||Ct(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||lu(a,ee,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=ve(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=re.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function hu(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Ks(a,y){var x=hu(a,y),b=Br(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],re=b[E];if(ee&&re)e:for(var oe=0;oe<re.length;++oe){for(var le=re[oe],he=0;he<ee.length;++he)if(ee[he].marker==le.marker)continue e;ee.push(le)}else re&&(x[E]=re)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?Ri.prototype.deepCopy.call(ee):ee);continue}var re=ee.changes,oe=[];b.push({changes:oe});for(var le=0;le<re.length;++le){var he=re[le],be=void 0;if(oe.push({from:he.from,to:he.to,text:he.text}),y)for(var Me in he)(be=Me.match(/^spans_(\d+)$/))&&Ge(y,Number(be[1]))>-1&&(ve(oe)[Me]=he[Me],delete he[Me])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=Dt(y,E)<0;ee!=Dt(x,E)<0?(E=y,y=x):ee!=Dt(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new Ri([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=ls(a.sel.ranges[ee],y[ee],null,E);var re=Ki(a.cm,b,a.sel.primIndex);di(a,re,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,di(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){di(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new kr(At(a,E[ee].anchor),At(a,E[ee].head))},origin:x&&x.origin};return Ct(a,"beforeSelectionChange",a,b),a.cm&&Ct(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=ve(b);E&&E.ranges?(b[b.length-1]=y,Na(a,y,x)):di(a,y,x)}function di(a,y,x){Na(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Na(a,y,x){(Ft(a,"beforeSelectionChange")||a.cm&&Ft(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Dt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&No(a.cm)}function Qs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,_t(a.cm)),_r(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,ee=0;ee<y.ranges.length;ee++){var re=y.ranges[ee],oe=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],le=Ia(a,re.anchor,oe&&oe.anchor,x,b),he=Ia(a,re.head,oe&&oe.head,x,b);(E||le!=re.anchor||he!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new kr(le,he))}return E?Ki(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var ee=at(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var oe=ee.markedSpans[re],le=oe.marker,he="selectLeft"in le?!le.selectLeft:le.inclusiveLeft,be="selectRight"in le?!le.selectRight:le.inclusiveRight;if((oe.from==null||(he?oe.from<=y.ch:oe.from<y.ch))&&(oe.to==null||(be?oe.to>=y.ch:oe.to>y.ch))){if(E&&(Ct(le,"beforeCursorEnter"),le.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(x){var Me=le.find(b<0?1:-1),nt=void 0;if((b<0?be:he)&&(Me=el(a,Me,-b,Me&&Me.line==y.line?ee:null)),Me&&Me.line==y.line&&(nt=Dt(Me,x))&&(b<0?nt<0:nt>0))return Oo(a,Me,y,b,E)}var $e=le.find(b<0?-1:1);return(b<0?he:be)&&($e=el(a,$e,b,$e.line==y.line?ee:null)),$e?Oo(a,$e,y,b,E):null}}return y}function Ia(a,y,x,b,E){var ee=b||1,re=Oo(a,y,x,ee,E)||!E&&Oo(a,y,x,ee,!0)||Oo(a,y,x,-ee,E)||!E&&Oo(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Ze(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?At(a,Ze(y.line-1)):null:x>0&&y.ch==(b||at(a,y.line)).text.length?y.line<a.first+a.size-1?Ze(y.line+1,0):null:new Ze(y.line,y.ch+x)}function tl(a){a.setSelection(Ze(a.firstLine(),0),Ze(a.lastLine()),Ce)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ee,re,oe){E&&(b.from=At(a,E)),ee&&(b.to=At(a,ee)),re&&(b.text=re),oe!==void 0&&(b.origin=oe)}),Ct(a,"beforeChange",a,b),a.cm&&Ct(a.cm,"beforeChange",a.cm,b),b.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function Wo(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,Wo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Ft(a,"beforeChange")||a.cm&&Ft(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=Cr&&!x&&Jr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Dt(y.from,y.to)==0)){var x=is(a,y);Vs(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Br(a,y));var b=[];mo(a,function(E,ee){!ee&&Ge(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Br(E,y))})}}function Ra(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,oe=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,he=0;he<oe.length&&(ee=oe[he],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));he++);if(he!=oe.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=oe.pop(),ee.ranges){if(Ba(ee,le),x&&!ee.equals(a.sel)){di(a,ee,{clearRedo:!1});return}re=ee}else if(b){oe.push(ee);return}else break;var be=[];Ba(re,le),le.push({changes:be,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var Me=Ft(a,"beforeChange")||a.cm&&Ft(a.cm,"beforeChange"),nt=function(Bt){var Jt=ee.changes[Bt];if(Jt.origin=y,Me&&!nl(a,Jt,!1))return oe.length=0,{};be.push(ss(a,Jt));var an=Bt?is(a,Jt):ve(oe);oa(a,Jt,an,Ks(a,Jt)),!Bt&&a.cm&&a.cm.scrollIntoView({from:Jt.from,to:vo(Jt)});var fn=[];mo(a,function(sn,bn){!bn&&Ge(fn,sn.history)==-1&&(sl(sn.history,Jt),fn.push(sn.history)),oa(sn,Jt,null,Ks(sn,Jt))})},$e=ee.changes.length-1;$e>=0;--$e){var Mt=nt($e);if(Mt)return Mt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(Ee(a.sel.ranges,function(E){return new kr(Ze(E.anchor.line+y,E.anchor.ch),Ze(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Ci(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)ho(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);il(a,E),y={from:Ze(a.first,0),to:Ze(y.to.line+E,y.to.ch),text:[ve(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:Ze(ee,at(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?du(a.cm,y,b):as(a,y,b),Na(a,x,Ce),a.cantEdit&&Ia(a,Ze(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,oe=!1,le=ee.line;a.options.lineWrapping||(le=Te(on(at(b,ee.line))),b.iter(le,re.line+1,function($e){if($e==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&_t(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(le,ee.line+y.text.length,function($e){var Mt=sr($e);Mt>E.maxLineLength&&(E.maxLine=$e,E.maxLineLength=Mt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Mr(b,ee.line),na(a,400);var he=y.text.length-(re.line-ee.line)-1;y.full?Ci(a):ee.line==re.line&&y.text.length==1&&!_s(a.doc,y)?ho(a,ee.line,"text"):Ci(a,ee.line,re.line+1,he);var be=Ft(a,"changes"),Me=Ft(a,"change");if(Me||be){var nt={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};Me&&_r(a,"change",a,nt),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(nt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ee;b||(b=x),Dt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Wo(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],re=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var oe=0;oe<ee.ranges.length;oe++)ol(ee.ranges[oe].anchor,y,x,b),ol(ee.ranges[oe].head,y,x,b);continue}for(var le=0;le<ee.changes.length;++le){var he=ee.changes[le];if(x<he.from.line)he.from=Ze(he.from.line+b,he.from.ch),he.to=Ze(he.to.line+b,he.to.ch);else if(y<=he.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=at(a,qt(a,y)):E=Te(y),E==null?null:(b(ee,E)&&a.cm&&ho(a.cm,E,x),ee)}function sa(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Sr(E),_r(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function la(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ee=Math.min(y,E-a),re=b.height;if(b.removeInner(a,ee),this.height-=re-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var oe=[];this.collapse(oe),this.children=[new sa(oe)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,oe=re;oe<E.lines.length;){var le=new sa(E.lines.slice(oe,oe+=25));E.height-=le.height,this.children.splice(++b,0,le),le.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Ge(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<ee){var re=Math.min(y,ee-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=ee}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Te(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ee=gi(this);Gn(x,Math.max(0,x.height-ee)),a&&(Pi(a,function(){ll(a,x,-ee),ho(a,b,"widget")}),_r(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(rn(this.doc,b)||Gn(b,b.height+E),x&&Pi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),_r(x,"lineWidgetChanged",x,a,Te(b))}))},It(ua);function ll(a,y,x){Mn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(re){var oe=re.widgets||(re.widgets=[]);if(E.insertAt==null?oe.push(E):oe.splice(Math.min(oe.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,ee&&!rn(a,re)){var le=Mn(re)<a.scrollTop;Gn(re,re.height+gi(E)),le&&qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&_r(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Te(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Do(a),Ft(this,"clear")){var x=this.find();x&&_r(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var re=this.lines[ee],oe=Er(re.markedSpans,this);a&&!this.collapsed?ho(a,Te(re),"text"):a&&(oe.to!=null&&(E=Te(re)),oe.from!=null&&(b=Te(re))),re.markedSpans=Ar(re.markedSpans,oe),oe.from==null&&this.collapsed&&!rn(this.doc,re)&&a&&Gn(re,Ti(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var le=0;le<this.lines.length;++le){var he=on(this.lines[le]),be=sr(he);be>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Ci(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&_r(a,"markerCleared",a,this,b,E),y&&Lo(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],re=Er(ee.markedSpans,this);if(re.from!=null&&(x=Ze(y?ee:Te(ee),re.from),a==-1))return x;if(re.to!=null&&(b=Ze(y?ee:Te(ee),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Pi(b,function(){var E=y.line,ee=Te(y.line),re=$i(b,ee);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!rn(x.doc,E)&&x.height!=null){var oe=x.height;x.height=null;var le=gi(x)-oe;le&&Gn(E,E.height+le)}_r(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ge(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(Ge(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},It(go);function zo(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return oi(a.cm,zo)(a,y,x,b,E);var ee=new go(a,E),re=Dt(y,x);if(b&&vt(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=Lt("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(yn(a,y.line,y,x,ee)||y.line!=x.line&&yn(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}ee.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var oe=y.line,le=a.cm,he;if(a.iter(oe,x.line+1,function(Me){le&&ee.collapsed&&!le.options.lineWrapping&&on(Me)==le.display.maxLine&&(he=!0),ee.collapsed&&oe!=y.line&&Gn(Me,0),pr(Me,new or(ee,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),ee.collapsed&&a.iter(y.line,x.line+1,function(Me){rn(a,Me)&&Gn(Me,0)}),ee.clearOnEnter&&ge(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Nr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ul,ee.atomic=!0),le){if(he&&(le.curOp.updateMaxLine=!0),ee.collapsed)Ci(le,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var be=y.line;be<=x.line;be++)ho(le,be,"text");ee.atomic&&qs(le.doc),_r(le,"markerAdded",le,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();_r(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},It(ca);function vu(a,y,x,b,E){b=vt(b),b.shared=!1;var ee=[zo(a,y,x,b,E)],re=ee[0],oe=b.widgetNode;return mo(a,function(le){oe&&(b.widgetNode=oe.cloneNode(!0)),ee.push(zo(le,At(le,y),At(le,x),b,E));for(var he=0;he<le.linked.length;++he)if(le.linked[he].isParent)return;re=ve(ee)}),new ca(ee,re)}function cl(a){return a.findMarks(Ze(a.first,0),a.clipPos(Ze(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ee=a.clipPos(E.from),re=a.clipPos(E.to);if(Dt(ee,re)){var oe=zo(a,ee,re,b.primary,b.primary.type);b.markers.push(oe),oe.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];mo(E.primary.doc,function(le){return ee.push(le)});for(var re=0;re<E.markers.length;re++){var oe=E.markers[re];Ge(ee,oe.doc)==-1&&(oe.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Si=function(a,y,x,b,E){if(!(this instanceof Si))return new Si(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new yr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=Ze(x,0);this.sel=po(ee),this.history=new Pa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:ee,to:ee,text:a}),di(this,po(ee),Ce)};Si.prototype=Ne(la.prototype,{constructor:Si,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=Cn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=Ze(this.first,0),x=this.first+this.size-1;Wo(this,{from:y,to:Ze(x,at(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),di(this,po(y),Ce)}),replaceRange:function(a,y,x,b){y=At(this,y),x=x?At(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Qt(this,At(this,a),At(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(Pt(this,a))return at(this,a)},getLineNumber:function(a){return Te(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=at(this,a)),on(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return At(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ai(function(a,y,x){Xs(this,At(this,typeof a=="number"?Ze(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,At(this,a),At(this,y||a),x)}),extendSelection:ai(function(a,y,x){Fa(this,At(this,a),y&&At(this,y),x)}),extendSelections:ai(function(a,y){Ys(this,en(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Ee(this.sel.ranges,a);Ys(this,en(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new kr(At(this,a[E].anchor),At(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),di(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new kr(At(this,a),At(this,y||a))),di(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Qt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Qt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ai(function(a,y,x){for(var b=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var re=E.ranges[ee];b[ee]={from:re.from(),to:re.to(),text:this.splitLines(a[ee]),origin:x}}for(var oe=y&&y!="end"&&ou(this,b,y),le=b.length-1;le>=0;le--)Wo(this,b[le]);oe?Js(this,oe):this.cm&&No(this.cm)}),undo:ai(function(){Ra(this,"undo")}),redo:ai(function(){Ra(this,"redo")}),undoSelection:ai(function(){Ra(this,"undo",!0)}),redoSelection:ai(function(){Ra(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Pa(this.history.maxGeneration),mo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Ro(a.done.slice(0),null,!0),y.undone=Ro(a.undone.slice(0),null,!0)},setGutterMarker:ai(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&We(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ai(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,We(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Pt(this,a)||(y=a,a=at(this,a),!a))return null}else if(y=Te(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!b[E])b[E]=x;else{if(pt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",ee=b[E];if(ee)if(x==null)b[E]=null;else{var re=ee.match(pt(x));if(!re)return!1;var oe=re.index+re[0].length;b[E]=ee.slice(0,re.index)+(!re.index||oe==ee.length?"":" ")+ee.slice(oe)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return zo(this,At(this,a),At(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=At(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=At(this,a);var y=[],x=at(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=At(this,a),y=At(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var re=ee.markedSpans;if(re)for(var oe=0;oe<re.length;oe++){var le=re[oe];!(le.to!=null&&E==a.line&&a.ch>=le.to||le.from==null&&E!=a.line||le.from!=null&&E==y.line&&le.from>=y.ch)&&(!x||x(le.marker))&&b.push(le.marker.parent||le.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),At(this,Ze(x,y))},indexFromPos:function(a){a=At(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Si(Cn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Si(Cn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cl(this)),b},unlinkDoc:function(a){if(a instanceof Gr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cl(this));break}}if(a.history==this.history){var b=[a.id];mo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Ro(this.history.done,b),a.history.undone=Ro(this.history.undone,b)}},iterLinkedDocs:function(a){mo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):rr(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ai(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),Si.prototype.eachLine=Si.prototype.iter;var hl=0;function bu(a){var y=this;if(fl(y),!(Ie(y,a)||ui(y.display,a))){un(a),me&&(hl=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,ee=Array(E),re=0,oe=function(){++re==E&&oi(y,function(){x=At(y.doc,x);var $e={from:x,to:x,text:y.doc.splitLines(ee.filter(function(Mt){return Mt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Wo(y.doc,$e),Js(y.doc,po(At(y.doc,x),At(y.doc,vo($e))))})()},le=function($e,Mt){if(y.options.allowDropFileTypes&&Ge(y.options.allowDropFileTypes,$e.type)==-1){oe();return}var Bt=new FileReader;Bt.onerror=function(){return oe()},Bt.onload=function(){var Jt=Bt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){oe();return}ee[Mt]=Jt,oe()},Bt.readAsText($e)},he=0;he<b.length;he++)le(b[he],he);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var Me;if(y.state.draggingText&&!y.state.draggingText.copy&&(Me=y.listSelections()),Na(y.doc,po(x,x)),Me)for(var nt=0;nt<Me.length;++nt)Ho(y.doc,"",Me[nt].anchor,Me[nt].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch($e){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-hl<100)){wn(y);return}if(!(Ie(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ae)){var x=tt("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),de&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=tt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),_e(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function dl(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var ee=0;ee<x.length;ee++)a(x[ee])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;ge(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,dl(ku)},100))}),ge(window,"blur",function(){return dl(Fo)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={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"},ha=0;ha<10;ha++)yo[ha+48]=yo[ha+96]=String(ha);for(var Oa=65;Oa<=90;Oa++)yo[Oa]=String.fromCharCode(Oa);for(var fa=1;fa<=12;fa++)yo[fa+111]=yo[fa+63235]="F"+fa;var io={};io.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"},io.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"},io.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"},io.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"]},io.default=De?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,re=0;re<y.length-1;re++){var oe=y[re];if(/^(cmd|meta|m)$/i.test(oe))ee=!0;else if(/^a(lt)?$/i.test(oe))x=!0;else if(/^(c|ctrl|control)$/i.test(oe))b=!0;else if(/^s(hift)?$/i.test(oe))E=!0;else throw new Error("Unrecognized modifier name: "+oe)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=Ee(x.split(" "),Eu),ee=0;ee<E.length;ee++){var re=void 0,oe=void 0;ee==E.length-1?(oe=E.join(" "),re=b):(oe=E.slice(0,ee+1).join(" "),re="...");var le=y[oe];if(!le)y[oe]=re;else if(le!=re)throw new Error("Inconsistent bindings for "+oe)}delete a[x]}for(var he in y)a[he]=y[he];return a}function _o(a,y,x,b){y=Wa(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return _o(a,y.fallthrough,x,b);for(var ee=0;ee<y.fallthrough.length;ee++){var re=_o(a,y.fallthrough[ee],x,b);if(re)return re}}}function vl(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ml(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(bt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(bt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(de&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function Wa(a){return typeof a=="string"?io[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&Dt(ee.from,ve(b).to)<=0;){var re=b.pop();if(Dt(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}Pi(a,function(){for(var oe=b.length-1;oe>=0;oe--)Ho(a.doc,"",b[oe].from,b[oe].to,"+delete");No(a)})}function cs(a,y,x){var b=jt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new Ze(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=ce(x,y.doc.direction);if(ee){var re=E<0?ve(ee):ee[0],oe=E<0==(re.level==1),le=oe?"after":"before",he;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);he=E<0?x.text.length-1:0;var Me=zi(y,be,he).top;he=Ot(function(nt){return zi(y,be,nt).top==Me},E<0==(re.level==1)?re.from:re.to-1,he),le=="before"&&(he=cs(x,he,1))}else he=E<0?re.to:re.from;return new Ze(b,he,le)}}return new Ze(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=ce(y,a.doc.direction);if(!E)return hs(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=z(E,x.ch,x.sticky),re=E[ee];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return hs(y,x,b);var oe=function(an,fn){return cs(y,an instanceof Ze?an.ch:an,fn)},le,he=function(an){return a.options.lineWrapping?(le=le||uo(a,y),Yr(a,y,le,an)):{begin:0,end:y.text.length}},be=he(x.sticky=="before"?oe(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var Me=re.level==1==b<0,nt=oe(x,Me?1:-1);if(nt!=null&&(Me?nt<=re.to&&nt<=be.end:nt>=re.from&&nt>=be.begin)){var $e=Me?"before":"after";return new Ze(x.line,nt,$e)}}var Mt=function(an,fn,sn){for(var bn=function(Rr,si){return si?new Ze(x.line,oe(Rr,1),"before"):new Ze(x.line,Rr,"after")};an>=0&&an<E.length;an+=fn){var Tn=E[an],Sn=fn>0==(Tn.level!=1),Un=Sn?sn.begin:oe(sn.end,-1);if(Tn.from<=Un&&Un<Tn.to||(Un=Sn?Tn.from:oe(Tn.to,-1),sn.begin<=Un&&Un<sn.end))return bn(Un,Sn)}},Bt=Mt(ee+b,b,be);if(Bt)return Bt;var Jt=b>0?be.end:oe(be.begin,-1);return Jt!=null&&!(b>0&&Jt==y.text.length)&&(Bt=Mt(b>0?0:E.length-1,b,he(Jt)),Bt)?Bt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ce)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=at(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Ze(y.head.line+1,0)}:{from:y.head,to:Ze(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Ze(y.from().line,0),to:At(a.doc,Ze(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Ze(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return Zo(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Ze(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Ze(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Mu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},Se)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},Se)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bl(a,y.head):b},Se)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var ee=x[E].from(),re=pe(a.getLine(ee.line),ee.ch,b);y.push(xe(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=at(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new Ze(E.line,E.ch-1)),E.ch>0)E=new Ze(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Ze(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=at(a.doc,E.line-1).text;re&&(E=new Ze(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ze(E.line-1,re.length-1),E,"+transpose"))}}x.push(new kr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);No(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=at(a.doc,y),b=on(x);return b!=x&&(y=Te(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=at(a.doc,y),b=Dn(x);return b!=x&&(y=Te(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=at(a.doc,x.line),E=ce(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=ee&&y.ch;return Ze(x.line,re?0:ee,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=da[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=lt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Au(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=_o(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&_o(y,a.options.extraKeys,x,a)||_o(y,a.options.keyMap,x,a)}var Tu=new ue;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Tu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Au(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&_r(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(un(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var ds=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Pe(),!Ie(y,a))){me&&Xe<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);de&&(ds=b?x:null,!b&&x==88&&!Bn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ae&&!De&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;Ye(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(dt(y,"CodeMirror-crosshair"),yt(document,"keyup",x),yt(document,"mouseover",x))}ge(document,"keyup",x),ge(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),Ie(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||Ie(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(de&&x==ds){ds=null,un(a);return}if(!(de&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Fu>a&&Dt(y,this.pos)==0&&x==this.button};var va,ma;function Nu(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(Ie(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Le||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=_n(a),ee=b?Nu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,ee,a))&&(E==1?b?Ou(y,b,ee,a):$n(a)==x.scroller&&un(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(ft?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ml(ee,E),E,function(re){if(typeof re=="string"&&(re=da[re]),!re)return!1;var oe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),oe=re(a,x)!=lt}finally{a.state.suppressEdits=!1}return oe})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=ot?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(Tt(Es,a),0):a.curOp.focus=Pe();var E=Ru(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(Dt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(Dt(re.to(),y)>0||y.xRel<0)?Wu(a,b,y,E):Hu(a,b,y,E)}function Wu(a,y,x,b){var E=a.display,ee=!1,re=oi(a,function(he){Le&&(E.scroller.draggable=!1),a.state.draggingText=!1,yt(E.wrapper.ownerDocument,"mouseup",re),yt(E.wrapper.ownerDocument,"mousemove",oe),yt(E.scroller,"dragstart",le),yt(E.scroller,"drop",re),ee||(un(he),b.addNew||Fa(a.doc,x,null,null,b.extend),Le&&!Ae||me&&Xe==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(he){ee=ee||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},le=function(){return ee=!0};Le&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ge(E.wrapper.ownerDocument,"mouseup",re),ge(E.wrapper.ownerDocument,"mousemove",oe),ge(E.scroller,"dragstart",le),ge(E.scroller,"drop",re),Ds(a),setTimeout(function(){return E.input.focus()},20)}function Dl(a,y,x){if(x=="char")return new kr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new kr(Ze(y.line,0),At(a.doc,Ze(y.line+1,0)));var b=x(a,y);return new kr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;un(y);var re,oe,le=ee.sel,he=le.ranges;if(b.addNew&&!b.extend?(oe=ee.sel.contains(x),oe>-1?re=he[oe]:re=new kr(x,x)):(re=ee.sel.primary(),oe=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new kr(x,x)),x=Co(a,y,!0,!0),oe=-1;else{var be=Dl(a,x,b.unit);b.extend?re=ls(re,be.anchor,be.head,b.extend):re=be}b.addNew?oe==-1?(oe=he.length,di(ee,Ki(a,he.concat([re]),oe),{scroll:!1,origin:"*mouse"})):he.length>1&&he[oe].empty()&&b.unit=="char"&&!b.extend?(di(ee,Ki(a,he.slice(0,oe).concat(he.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),le=ee.sel):us(ee,oe,re,Je):(oe=0,di(ee,new Ri([re],0),Je),le=ee.sel);var Me=x;function nt(sn){if(Dt(Me,sn)!=0)if(Me=sn,b.unit=="rectangle"){for(var bn=[],Tn=a.options.tabSize,Sn=pe(at(ee,x.line).text,x.ch,Tn),Un=pe(at(ee,sn.line).text,sn.ch,Tn),Rr=Math.min(Sn,Un),si=Math.max(Sn,Un),jr=Math.min(x.line,sn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,sn.line));jr<=Bi;jr++){var ki=at(ee,jr).text,qr=rt(ki,Rr,Tn);Rr==si?bn.push(new kr(Ze(jr,qr),Ze(jr,qr))):ki.length>qr&&bn.push(new kr(Ze(jr,qr),Ze(jr,rt(ki,si,Tn))))}bn.length||bn.push(new kr(x,x)),di(ee,Ki(a,le.ranges.slice(0,oe).concat(bn),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(sn)}else{var Ei=re,hi=Dl(a,sn,b.unit),ri=Ei.anchor,$r;Dt(hi.anchor,ri)>0?($r=hi.head,ri=Zt(Ei.from(),hi.anchor)):($r=hi.anchor,ri=hn(Ei.to(),hi.head));var Ur=le.ranges.slice(0);Ur[oe]=zu(a,new kr(At(ee,ri),$r)),di(ee,Ki(a,Ur,oe),Je)}}var $e=E.wrapper.getBoundingClientRect(),Mt=0;function Bt(sn){var bn=++Mt,Tn=Co(a,sn,!0,b.unit=="rectangle");if(Tn)if(Dt(Tn,Me)!=0){a.curOp.focus=Pe(),nt(Tn);var Sn=La(E,ee);(Tn.line>=Sn.to||Tn.line<Sn.from)&&setTimeout(oi(a,function(){Mt==bn&&Bt(sn)}),150)}else{var Un=sn.clientY<$e.top?-20:sn.clientY>$e.bottom?20:0;Un&&setTimeout(oi(a,function(){Mt==bn&&(E.scroller.scrollTop+=Un,Bt(sn))}),50)}}function Jt(sn){a.state.selectingText=!1,Mt=1/0,sn&&(un(sn),E.input.focus()),yt(E.wrapper.ownerDocument,"mousemove",an),yt(E.wrapper.ownerDocument,"mouseup",fn),ee.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!_n(sn)?Jt(sn):Bt(sn)}),fn=oi(a,Jt);a.state.selectingText=fn,ge(E.wrapper.ownerDocument,"mousemove",an),ge(E.wrapper.ownerDocument,"mouseup",fn)}function zu(a,y){var x=y.anchor,b=y.head,E=at(a.doc,x.line);if(Dt(x,b)==0&&x.sticky==b.sticky)return y;var ee=ce(E);if(!ee)return y;var re=z(ee,x.ch,x.sticky),oe=ee[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var le=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(le==0||le==ee.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=z(ee,b.ch,b.sticky),Me=be-re||(b.ch-x.ch)*(oe.level==1?-1:1);be==le-1||be==le?he=Me<0:he=Me>0}var nt=ee[le+(he?-1:0)],$e=he==(nt.level==1),Mt=$e?nt.from:nt.to,Bt=$e?"after":"before";return x.ch==Mt&&x.sticky==Bt?y:new kr(new Ze(x.line,Mt,Bt),b)}function Ll(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(nt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(ee>oe.bottom||!Ft(a,x))return cn(y);ee-=oe.top-re.viewOffset;for(var le=0;le<a.display.gutterSpecs.length;++le){var he=re.gutters.childNodes[le];if(he&&he.getBoundingClientRect().right>=E){var be=Be(a.doc,ee),Me=a.display.gutterSpecs[le];return Ct(a,x,a,be,Me.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||_u(a,y)||Ie(a,y,"contextmenu")||ft||a.display.input.onContextMenu(y)}function _u(a,y){return Ft(a,"gutterContextMenu")?Ll(a,y,"gutterContextMenu",!1):!1}function Al(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var Go={toString:function(){return"CodeMirror.Init"}},Tl={},za={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(oe,le,he){he!=Go&&ee(oe,le,he)}:ee)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),wo(b),Ci(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],re=b.doc.first;b.doc.iter(function(le){for(var he=0;;){var be=le.text.indexOf(E,he);if(be==-1)break;he=be+E.length,ee.push(Ze(re,be))}re++});for(var oe=ee.length-1;oe>=0;oe--)Ho(b.doc,E,ee[oe],Ze(ee[oe].line,ee[oe].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!st),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Al(b),ra(b)},!0),x("keyMap","default",function(b,E,ee){var re=Wa(E),oe=ee!=Go&&Wa(ee);oe&&oe.detach&&oe.detach(b,re),re.attach&&re.attach(b,oe||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Io(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Io(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Fo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,ee=y?ge:yt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Ye(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(dt(a.display.wrapper,"CodeMirror-wrap"),Vn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Io(a)},100)}function Gr(a,y){var x=this;if(!(this instanceof Gr))return new Gr(a,y);this.options=y=y?vt(y):{},vt(Tl,y,!1);var b=y.value;typeof b=="string"?b=new Si(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Gr.inputStyles[y.inputStyle](this),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Al(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(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 ue,keySeq:null,specialChars:null},y.autofocus&&!Oe&&ee.input.focus(),me&&Xe<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Oe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Fo(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],Go);Is(this),y.finishInit&&y.finishInit(this);for(var oe=0;oe<ms.length;++oe)ms[oe](this);Lo(this),Le&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Gr.defaults=Tl,Gr.optionHandlers=za;function Vu(a){var y=a.display;ge(y.scroller,"mousedown",oi(a,El)),me&&Xe<11?ge(y.scroller,"dblclick",oi(a,function(le){if(!Ie(a,le)){var he=Co(a,le);if(!(!he||vs(a,le)||ui(a.display,le))){un(le);var be=a.findWordAt(he);Fa(a.doc,be.anchor,be.head)}}})):ge(y.scroller,"dblclick",function(le){return Ie(a,le)||un(le)}),ge(y.scroller,"contextmenu",function(le){return Ml(a,le)}),ge(y.input.getField(),"contextmenu",function(le){y.scroller.contains(le.target)||Ml(a,le)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function ee(le){if(le.touches.length!=1)return!1;var he=le.touches[0];return he.radiusX<=1&&he.radiusY<=1}function re(le,he){if(he.left==null)return!0;var be=he.left-le.left,Me=he.top-le.top;return be*be+Me*Me>20*20}ge(y.scroller,"touchstart",function(le){if(!Ie(a,le)&&!ee(le)&&!vs(a,le)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},le.touches.length==1&&(y.activeTouch.left=le.touches[0].pageX,y.activeTouch.top=le.touches[0].pageY)}}),ge(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ge(y.scroller,"touchend",function(le){var he=y.activeTouch;if(he&&!ui(y,le)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),Me;!he.prev||re(he,he.prev)?Me=new kr(be,be):!he.prev.prev||re(he,he.prev.prev)?Me=a.findWordAt(be):Me=new kr(Ze(be.line,0),At(a.doc,Ze(be.line+1,0))),a.setSelection(Me.anchor,Me.head),a.focus(),un(le)}E()}),ge(y.scroller,"touchcancel",E),ge(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Ct(a,"scroll",a))}),ge(y.scroller,"mousewheel",function(le){return Ws(a,le)}),ge(y.scroller,"DOMMouseScroll",function(le){return Ws(a,le)}),ge(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(le){Ie(a,le)||wn(le)},over:function(le){Ie(a,le)||(wu(a,le),wn(le))},start:function(le){return xu(a,le)},drop:oi(a,bu),leave:function(le){Ie(a,le)||fl(a)}};var oe=y.input.getField();ge(oe,"keyup",function(le){return Sl.call(a,le)}),ge(oe,"keydown",oi(a,Cl)),ge(oe,"keypress",oi(a,kl)),ge(oe,"focus",function(le){return Ja(a,le)}),ge(oe,"blur",function(le){return Fo(a,le)})}var ms=[];Gr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=Yn(a,y).state:x="prev");var re=a.options.tabSize,oe=at(E,y),le=pe(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var he=oe.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(oe.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(ee,oe.text.slice(he.length),oe.text),be==lt||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(at(E,y-1).text,null,re):be=0:x=="add"?be=le+a.options.indentUnit:x=="subtract"?be=le-a.options.indentUnit:typeof x=="number"&&(be=le+x),be=Math.max(0,be);var Me="",nt=0;if(a.options.indentWithTabs)for(var $e=Math.floor(be/re);$e;--$e)nt+=re,Me+=" ";if(nt<be&&(Me+=xe(be-nt)),Me!=he)return Ho(E,Me,Ze(y,0),Ze(y,he.length),"+input"),oe.stateAfter=null,!0;for(var Mt=0;Mt<E.sel.ranges.length;Mt++){var Bt=E.sel.ranges[Mt];if(Bt.head.line==y&&Bt.head.ch<he.length){var Jt=Ze(y,he.length);us(E,Mt,new kr(Jt,Jt));break}}}var Yi=null;function _a(a){Yi=a}function gs(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var re=+new Date-200,oe=E=="paste"||a.state.pasteIncoming>re,le=rr(y),he=null;if(oe&&b.ranges.length>1)if(Yi&&Yi.text.join(`
`)==y){if(b.ranges.length%Yi.text.length==0){he=[];for(var be=0;be<Yi.text.length;be++)he.push(ee.splitLines(Yi.text[be]))}}else le.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Ee(le,function(an){return[an]}));for(var Me=a.curOp.updateInput,nt=b.ranges.length-1;nt>=0;nt--){var $e=b.ranges[nt],Mt=$e.from(),Bt=$e.to();$e.empty()&&(x&&x>0?Mt=Ze(Mt.line,Mt.ch-x):a.state.overwrite&&!oe?Bt=Ze(Bt.line,Math.min(at(ee,Bt.line).text.length,Bt.ch+ve(le).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==le.join(`
`)&&(Mt=Bt=Ze(Mt.line,0)));var Jt={from:Mt,to:Bt,text:he?he[nt%he.length]:le,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Wo(a.doc,Jt),_r(a,"inputRead",a,Jt)}y&&!oe&&Bl(a,y),No(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Me),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),re=!1;if(ee.electricChars){for(var oe=0;oe<ee.electricChars.length;oe++)if(y.indexOf(ee.electricChars.charAt(oe))>-1){re=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(at(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&_r(a,"electricInput",a,E.head.line)}}}function Fl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:Ze(E,0),head:Ze(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function Nl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Il(){var a=tt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=tt("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Le?a.style.width="1000px":a.setAttribute("wrap","off"),je&&(a.style.border="1px solid black"),Nl(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ee=this.options,re=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,re),Ct(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](Wa(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:yi(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");qe(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Ci(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var re=E[ee].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(ee,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Pt(this.doc,b)&&ga(this,b,E,ee)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,ee=-1,re=0;re<E.length;re++){var oe=E[re];if(oe.empty())oe.head.line>ee&&(ga(this,oe.head.line,b,!0),ee=oe.head.line,re==this.doc.sel.primIndex&&No(this));else{var le=oe.from(),he=oe.to(),be=Math.max(ee,le.line);ee=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Me=be;Me<ee;++Me)ga(this,Me,b);var nt=this.doc.sel.ranges;le.ch==0&&E.length==nt.length&&nt[re].from().ch>0&&us(this.doc,re,new kr(le,nt[re].to()),Ce)}}}),getTokenAt:function(b,E){return Hn(this,b,E)},getLineTokens:function(b,E){return Hn(this,Ze(b),E,!0)},getTokenTypeAt:function(b){b=At(this.doc,b);var E=Wn(this,at(this.doc,b.line)),ee=0,re=(E.length-1)/2,oe=b.ch,le;if(oe==0)le=E[2];else for(;;){var he=ee+re>>1;if((he?E[he*2-1]:0)>=oe)re=he;else if(E[he*2+1]<oe)ee=he+1;else{le=E[he*2+2];break}}var be=le?le.indexOf("overlay "):-1;return be<0?le:be==0?null:le.slice(0,be-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var ee=[];if(!x.hasOwnProperty(E))return ee;var re=x[E],oe=this.getModeAt(b);if(typeof oe[E]=="string")re[oe[E]]&&ee.push(re[oe[E]]);else if(oe[E])for(var le=0;le<oe[E].length;le++){var he=re[oe[E][le]];he&&ee.push(he)}else oe.helperType&&re[oe.helperType]?ee.push(re[oe.helperType]):re[oe.name]&&ee.push(re[oe.name]);for(var be=0;be<re._global.length;be++){var Me=re._global[be];Me.pred(oe,this)&&Ge(ee,Me.val)==-1&&ee.push(Me.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=qt(ee,b==null?ee.first+ee.size-1:b),Yn(this,b+1,E).state},cursorCoords:function(b,E){var ee,re=this.doc.sel.primary();return b==null?ee=re.head:typeof b=="object"?ee=At(this.doc,b):ee=b?re.from():re.to(),wi(this,ee,E||"page")},charCoords:function(b,E){return Bo(this,At(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ci(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Be(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var re=!1,oe;if(typeof b=="number"){var le=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>le&&(b=le,re=!0),oe=at(this.doc,b)}else oe=b;return Po(this,oe,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-Mn(oe):0)},defaultTextHeight:function(){return Ti(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,re,oe){var le=this.display;b=wi(this,At(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),le.sizer.appendChild(E),re=="over")he=b.top;else if(re=="above"||re=="near"){var Me=Math.max(le.wrapper.clientHeight,this.doc.height),nt=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Me)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Me&&(he=b.bottom),be+E.offsetWidth>nt&&(be=nt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",oe=="right"?(be=le.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?be=0:oe=="middle"&&(be=(le.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),ee&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(da.hasOwnProperty(b))return da[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,ee,re){var oe=1;E<0&&(oe=-1,E=-E);for(var le=At(this.doc,b),he=0;he<E&&(le=ys(this.doc,le,oe,ee,re),!le.hitSide);++he);return le},moveH:yi(function(b,E){var ee=this;this.extendSelectionsBy(function(re){return ee.display.shift||ee.doc.extend||re.empty()?ys(ee.doc,re.head,b,E,ee.options.rtlMoveVisually):b<0?re.from():re.to()},Se)}),deleteH:yi(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(oe){var le=ys(re,oe.head,b,E,!1);return b<0?{from:le,to:oe.head}:{from:oe.head,to:le}})}),findPosV:function(b,E,ee,re){var oe=1,le=re;E<0&&(oe=-1,E=-E);for(var he=At(this.doc,b),be=0;be<E;++be){var Me=wi(this,he,"div");if(le==null?le=Me.left:Me.left=le,he=Rl(this,Me,oe,ee),he.hitSide)break}return he},moveV:yi(function(b,E){var ee=this,re=this.doc,oe=[],le=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(le)return b<0?be.from():be.to();var Me=wi(ee,be.head,"div");be.goalColumn!=null&&(Me.left=be.goalColumn),oe.push(Me.left);var nt=Rl(ee,Me,b,E);return E=="page"&&be==re.sel.primary()&&qa(ee,Bo(ee,nt,"div").top-Me.top),nt},Se),oe.length)for(var he=0;he<re.sel.ranges.length;he++)re.sel.ranges[he].goalColumn=oe[he]}),findWordAt:function(b){var E=this.doc,ee=at(E,b.line).text,re=b.ch,oe=b.ch;if(ee){var le=this.getHelper(b,"wordChars");(b.sticky=="before"||oe==ee.length)&&re?--re:++oe;for(var he=ee.charAt(re),be=it(he,le)?function(Me){return it(Me,le)}:/\s/.test(he)?function(Me){return/\s/.test(Me)}:function(Me){return!/\s/.test(Me)&&!it(Me)};re>0&&be(ee.charAt(re-1));)--re;for(;oe<ee.length&&be(ee.charAt(oe));)++oe}return new kr(Ze(b.line,re),Ze(b.line,oe))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ye(this.display.cursorDiv,"CodeMirror-overwrite"):dt(this.display.cursorDiv,"CodeMirror-overwrite"),Ct(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Pe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mi(this)-this.display.barHeight,width:b.scrollWidth-Mi(this)-this.display.barWidth,clientHeight:no(this),clientWidth:qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Ze(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?jl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var ee=this,re=function(le){return typeof le=="number"||/^\d+$/.test(String(le))?le+"px":le};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(le){if(le.widgets){for(var he=0;he<le.widgets.length;he++)if(le.widgets[he].noHScroll){ho(ee,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,Ct(this,"refresh",this)}),operation:function(b){return Pi(this,b)},startOperation:function(){return Do(this)},endOperation:function(){return Lo(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Ci(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ti(this.display))>.5||this.options.lineWrapping)&&Ya(this),Ct(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,_r(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},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}},It(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,re){a.registerHelper(b,E,re),x[b]._global.push({pred:ee,val:re})}}function ys(a,y,x,b,E){var ee=y,re=x,oe=at(a,y.line),le=E&&a.direction=="rtl"?-x:x;function he(){var fn=y.line+le;return fn<a.first||fn>=a.first+a.size?!1:(y=new Ze(fn,y.ch,y.sticky),oe=at(a,fn))}function be(fn){var sn;if(b=="codepoint"){var bn=oe.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(bn)?sn=null:sn=new Ze(y.line,Math.max(0,Math.min(oe.text.length,y.ch+x*(bn>=55296&&bn<56320?2:1))),-x)}else E?sn=Lu(a.cm,oe,y,x):sn=hs(oe,y,x);if(sn==null)if(!fn&&he())y=fs(E,a.cm,oe,y.line,le);else return!1;else y=sn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var Me=null,nt=b=="group",$e=a.cm&&a.cm.getHelper(y,"wordChars"),Mt=!0;!(x<0&&!be(!Mt));Mt=!1){var Bt=oe.text.charAt(y.ch)||`
`,Jt=it(Bt,$e)?"w":nt&&Bt==`
`?"n":!nt||/\s/.test(Bt)?null:"p";if(nt&&!Mt&&!Jt&&(Jt="s"),Me&&Me!=Jt){x<0&&(x=1,be(),y.sticky="after");break}if(Jt&&(Me=Jt),x>0&&!be(!Mt))break}var an=Ia(a,y,ee,re,!0);return Xt(ee,an)&&(an.hitSide=!0),an}function Rl(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(oe-.5*Ti(a.display),3);re=(x>0?y.bottom:y.top)+x*le}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,ee,re),!!he.outside;){if(x<0?re<=0:re>=E.height){he.hitSide=!0;break}re+=x*5}return he}var Pr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Pr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Nl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(oe){for(var le=oe.target;le;le=le.parentNode){if(le==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(le.className))break}return!1}ge(E,"paste",function(oe){!ee(oe)||Ie(b,oe)||Pl(oe,b)||Xe<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ge(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),ge(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),ge(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ge(E,"touchstart",function(){return x.forceCompositionEnd()}),ge(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!ee(oe)||Ie(b,oe))){if(b.somethingSelected())_a({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var le=Fl(b);_a({lineWise:!0,text:le.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(le.ranges,0,Ce),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var he=Yi.text.join(`
`);if(oe.clipboardData.setData("Text",he),oe.clipboardData.getData("Text")==he){oe.preventDefault();return}}var be=Il(),Me=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Me.value=Yi.text.join(`
`);var nt=document.activeElement;kt(Me),setTimeout(function(){b.display.lineSpace.removeChild(be),nt.focus(),nt==E&&x.showPrimarySelection()},50)}}ge(E,"copy",re),ge(E,"cut",re)},Pr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Pr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Pr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Pr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pr.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var ee=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&re&&!re.bad&&Dt(Zt(ee,re),b)==0&&Dt(hn(ee,re),E)==0)){var oe=y.display.view,le=b.line>=y.display.viewFrom&&Ol(y,b)||{node:oe[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Ol(y,E);if(!he){var be=oe[oe.length-1].measure,Me=be.maps?be.maps[be.maps.length-1]:be.map;he={node:Me[Me.length-1],offset:Me[Me.length-2]-Me[Me.length-3]}}if(!le||!he){a.removeAllRanges();return}var nt=a.rangeCount&&a.getRangeAt(0),$e;try{$e=Fe(le.node,le.offset,he.offset,he.node)}catch(Mt){}$e&&(!ae&&y.state.focused?(a.collapse(le.node,le.offset),$e.collapsed||(a.removeAllRanges(),a.addRange($e))):(a.removeAllRanges(),a.addRange($e)),nt&&a.anchorNode==null?a.addRange(nt):ae&&this.startGracePeriod()),this.rememberSelection()}},Pr.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Pr.prototype.showMultipleSelections=function(a){_e(this.cm.display.cursorDiv,a.cursors),_e(this.cm.display.selectionDiv,a.selection)},Pr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Pr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Qe(this.div,y)},Pr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Pr.prototype.blur=function(){this.div.blur()},Pr.prototype.getField=function(){return this.div},Pr.prototype.supportsTouch=function(){return!0},Pr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Pi(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},Pr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Pr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Re&&ke&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Pi(y,function(){di(y.doc,po(x,b),Ce),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Pr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=Ze(b.line-1,at(a.doc,b.line-1).length)),E.ch==at(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Ze(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,oe;b.line==y.viewFrom||(ee=So(a,b.line))==0?(re=Te(y.view[0].line),oe=y.view[0].node):(re=Te(y.view[ee].line),oe=y.view[ee-1].node.nextSibling);var le=So(a,E.line),he,be;if(le==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=Te(y.view[le+1].line)-1,be=y.view[le+1].node.previousSibling),!oe)return!1;for(var Me=a.doc.splitLines(Yu(a,oe,be,re,he)),nt=Qt(a.doc,Ze(re,0),Ze(he,at(a.doc,he).text.length));Me.length>1&&nt.length>1;)if(ve(Me)==ve(nt))Me.pop(),nt.pop(),he--;else if(Me[0]==nt[0])Me.shift(),nt.shift(),re++;else break;for(var $e=0,Mt=0,Bt=Me[0],Jt=nt[0],an=Math.min(Bt.length,Jt.length);$e<an&&Bt.charCodeAt($e)==Jt.charCodeAt($e);)++$e;for(var fn=ve(Me),sn=ve(nt),bn=Math.min(fn.length-(Me.length==1?$e:0),sn.length-(nt.length==1?$e:0));Mt<bn&&fn.charCodeAt(fn.length-Mt-1)==sn.charCodeAt(sn.length-Mt-1);)++Mt;if(Me.length==1&&nt.length==1&&re==b.line)for(;$e&&$e>b.ch&&fn.charCodeAt(fn.length-Mt-1)==sn.charCodeAt(sn.length-Mt-1);)$e--,Mt++;Me[Me.length-1]=fn.slice(0,fn.length-Mt).replace(/^\u200b+/,""),Me[0]=Me[0].slice($e).replace(/\u200b+$/,"");var Tn=Ze(re,$e),Sn=Ze(he,nt.length?ve(nt).length-Mt:0);if(Me.length>1||Me[0]||Dt(Tn,Sn))return Ho(a.doc,Me,Tn,Sn,"+input"),!0},Pr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pr.prototype.reset=function(){this.forceCompositionEnd()},Pr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pr.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Pr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Ci(a.cm)})},Pr.prototype.setUneditable=function(a){a.contentEditable="false"},Pr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Pr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Pr.prototype.onContextMenu=function(){},Pr.prototype.resetPosition=function(){},Pr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=at(a.doc,y.line),E=To(x,b,y.line),ee=ce(b,a.doc.direction),re="left";if(ee){var oe=z(ee,y.ch);re=oe%2?"right":"left"}var le=xa(E.map,y.ch,re);return le.offset=le.collapse=="right"?le.end:le.start,le}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,oe=a.doc.lineSeparator(),le=!1;function he($e){return function(Mt){return Mt.id==$e}}function be(){re&&(ee+=oe,le&&(ee+=oe),re=le=!1)}function Me($e){$e&&(be(),ee+=$e)}function nt($e){if($e.nodeType==1){var Mt=$e.getAttribute("cm-text");if(Mt){Me(Mt);return}var Bt=$e.getAttribute("cm-marker"),Jt;if(Bt){var an=a.findMarks(Ze(b,0),Ze(E+1,0),he(+Bt));an.length&&(Jt=an[0].find(0))&&Me(Qt(a.doc,Jt.from,Jt.to).join(oe));return}if($e.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test($e.nodeName);if(!/^br$/i.test($e.nodeName)&&$e.textContent.length==0)return;fn&&be();for(var sn=0;sn<$e.childNodes.length;sn++)nt($e.childNodes[sn]);/^(pre|p)$/i.test($e.nodeName)&&(le=!0),fn&&(re=!0)}else $e.nodeType==3&&Me($e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;nt(y),y!=x;)y=y.nextSibling,le=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Ze(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return Xu(ee,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Qe(b,y))return jo(Ze(Te(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?ve(a.rest):a.line;return jo(Ze(Te(ee),ee.text.length),E)}var re=y.nodeType==3?y:null,oe=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));oe.parentNode!=b;)oe=oe.parentNode;var le=a.measure,he=le.maps;function be(Jt,an,fn){for(var sn=-1;sn<(he?he.length:0);sn++)for(var bn=sn<0?le.map:he[sn],Tn=0;Tn<bn.length;Tn+=3){var Sn=bn[Tn+2];if(Sn==Jt||Sn==an){var Un=Te(sn<0?a.line:a.rest[sn]),Rr=bn[Tn]+fn;return(fn<0||Sn!=Jt)&&(Rr=bn[Tn+(fn?1:0)]),Ze(Un,Rr)}}}var Me=be(re,oe,x);if(Me)return jo(Me,E);for(var nt=oe.nextSibling,$e=re?re.nodeValue.length-x:0;nt;nt=nt.nextSibling){if(Me=be(nt,nt.firstChild,0),Me)return jo(Ze(Me.line,Me.ch-$e),E);$e+=nt.textContent.length}for(var Mt=oe.previousSibling,Bt=x;Mt;Mt=Mt.previousSibling){if(Me=be(Mt,Mt.firstChild,-1),Me)return jo(Ze(Me.line,Me.ch+Bt),E);Bt+=Mt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ue,this.hasSelection=!1,this.composing=null};Xr.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),je&&(E.style.width="0px"),ge(E,"input",function(){me&&Xe>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ge(E,"paste",function(re){Ie(b,re)||Pl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!Ie(b,re)){if(b.somethingSelected())_a({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Fl(b);_a({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,Ce):(x.prevInput="",E.value=oe.text.join(`
`),kt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ge(E,"cut",ee),ge(E,"copy",ee),ge(a.scroller,"paste",function(re){if(!(ui(a,re)||Ie(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,E.dispatchEvent(oe)}}),ge(a.lineSpace,"selectstart",function(re){ui(a,re)||un(re)}),ge(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),ge(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-ee.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;_e(x.cursorDiv,a.cursors),_e(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&kt(this.textarea),me&&Xe>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&Xe>=9&&(this.hasSelection=null))}},Xr.prototype.getField=function(){return this.textarea},Xr.prototype.supportsTouch=function(){return!1},Xr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Oe||Pe()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xr.prototype.blur=function(){this.textarea.blur()},Xr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xr.prototype.receivedFocus=function(){this.slowPoll()},Xr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Xr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||cr(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&Xe>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(b.length,E.length);re<oe&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Pi(y,function(){gs(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xr.prototype.onKeyPress=function(){me&&Xe>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=Co(x,a),re=b.scroller.scrollTop;if(!ee||de)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(ee)==-1&&oi(x,di)(x.doc,po(ee),Ce);var le=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Me;Le&&(Me=window.scrollY),b.input.focus(),Le&&window.scrollTo(null,Me),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=$e,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function nt(){if(E.selectionStart!=null){var Bt=x.somethingSelected(),Jt="\u200B"+(Bt?E.value:"");E.value="\u21DA",E.value=Jt,y.prevInput=Bt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Jt.length,b.selForContextMenu=x.doc.sel}}function $e(){if(y.contextMenuPending==$e&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=le,me&&Xe<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&Xe<9)&&nt();var Bt=0,Jt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Bt++<10?b.detectingSelectAll=setTimeout(Jt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Jt,200)}}if(me&&Xe>=9&&nt(),ft){wn(a);var Mt=function(){yt(window,"mouseup",Mt),setTimeout($e,20)};ge(window,"mouseup",Mt)}else setTimeout($e,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?vt(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=Pe();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(ge(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=re}}catch(le){}}y.finishInit=function(le){le.save=b,le.getTextArea=function(){return a},le.toTextArea=function(){le.toTextArea=isNaN,b(),a.parentNode.removeChild(le.getWrapperElement()),a.style.display="",a.form&&(yt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var oe=Gr(function(le){return a.parentNode.insertBefore(le,a.nextSibling)},y);return oe}function Qu(a){a.off=yt,a.on=ge,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=rt,a.isWordChar=et,a.Pass=lt,a.signal=Ct,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=Ze,a.cmpPos=Dt,a.modes=xr,a.mimeModes=Kt,a.resolveMode=An,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=dr,a.copyState=Zn,a.startState=hr,a.innerMode=Rn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=_o,a.normalizeKeyMap=Du,a.StringStream=Vt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=kn,a.e_stop=wn,a.addClass=Ye,a.contains=Qe,a.rmClass=dt,a.keyNames=yo}Zu(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&Ge(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return It(Si),Gr.inputStyles={textarea:Xr,contenteditable:Pr},Gr.defineMode=function(a){!Gr.defaults.mode&&a!="null"&&(Gr.defaults.mode=a),pn.apply(this,arguments)},Gr.defineMIME=En,Gr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Gr.defineMIME("text/plain","null"),Gr.defineExtension=function(a,y){Gr.prototype[a]=y},Gr.defineDocExtension=function(a,y){Si.prototype[a]=y},Gr.fromTextArea=Ju,Qu(Gr),Gr.version="5.58.2",Gr})},25419:function(Nt,Ht,fe){(function(ae){ae(fe(89780),fe(15525),fe(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(gt,He){var ze=ae.getMode(gt,"text/html"),me=ze.name=="null";function Xe(pe){if(ae.findModeByName){var ue=ae.findModeByName(pe);ue&&(pe=ue.mime||ue.mimes[0])}var Ge=ae.getMode(gt,pe);return Ge.name=="null"?null:Ge}He.highlightFormatting===void 0&&(He.highlightFormatting=!1),He.maxBlockquoteDepth===void 0&&(He.maxBlockquoteDepth=0),He.taskLists===void 0&&(He.taskLists=!1),He.strikethrough===void 0&&(He.strikethrough=!1),He.emoji===void 0&&(He.emoji=!1),He.fencedCodeBlockHighlighting===void 0&&(He.fencedCodeBlockHighlighting=!0),He.fencedCodeBlockDefaultMode===void 0&&(He.fencedCodeBlockDefaultMode="text/plain"),He.xml===void 0&&(He.xml=!0),He.tokenTypeOverrides===void 0&&(He.tokenTypeOverrides={});var Le={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 Ke in Le)Le.hasOwnProperty(Ke)&&He.tokenTypeOverrides[Ke]&&(Le[Ke]=He.tokenTypeOverrides[Ke]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ae=/^\[(x| )\](?=\s)/i,ye=He.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ut=/^ {0,3}(?:\={1,}|-{2,})\s*$/,je=/^[^#!\[\]*_\\<>` "'(~:]+/,Re=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Oe=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ot=" ";function st(pe,ue,Ge){return ue.f=ue.inline=Ge,Ge(pe,ue)}function St(pe,ue,Ge){return ue.f=ue.block=Ge,Ge(pe,ue)}function bt(pe){return!pe||!/\S/.test(pe.string)}function ft(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==dt){var ue=me;if(!ue){var Ge=ae.innerMode(ze,pe.htmlState);ue=Ge.mode.name=="xml"&&Ge.state.tagStart===null&&!Ge.state.context&&Ge.state.tokenize.isInText}ue&&(pe.f=Lt,pe.block=pt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function pt(pe,ue){var Ge=pe.column()===ue.indentation,wt=bt(ue.prevLine.stream),lt=ue.indentedCode,Ce=ue.prevLine.hr,Je=ue.list!==!1,Se=(ue.listStack[ue.listStack.length-1]||0)+3;ue.indentedCode=!1;var rt=ue.indentation;if(ue.indentationDiff===null&&(ue.indentationDiff=ue.indentation,Je)){for(ue.list=null;rt<ue.listStack[ue.listStack.length-1];)ue.listStack.pop(),ue.listStack.length?ue.indentation=ue.listStack[ue.listStack.length-1]:ue.list=!1;ue.list!==!1&&(ue.indentationDiff=rt-ue.listStack[ue.listStack.length-1])}var Ue=!wt&&!Ce&&!ue.prevLine.header&&(!Je||!lt)&&!ue.prevLine.fencedCodeEnd,xe=(ue.list===!1||Ce||wt)&&ue.indentation<=Se&&pe.match(ke),ve=null;if(ue.indentationDiff>=4&&(lt||ue.prevLine.fencedCodeEnd||ue.prevLine.header||wt))return pe.skipToEnd(),ue.indentedCode=!0,Le.code;if(pe.eatSpace())return null;if(Ge&&ue.indentation<=Se&&(ve=pe.match(ye))&&ve[1].length<=6)return ue.quote=0,ue.header=ve[1].length,ue.thisLine.header=!0,He.highlightFormatting&&(ue.formatting="header"),ue.f=ue.inline,_e(ue);if(ue.indentation<=Se&&pe.eat(">"))return ue.quote=Ge?1:ue.quote+1,He.highlightFormatting&&(ue.formatting="quote"),pe.eatSpace(),_e(ue);if(!xe&&!ue.setext&&Ge&&ue.indentation<=Se&&(ve=pe.match(de))){var Ee=ve[1]?"ol":"ul";return ue.indentation=rt+pe.current().length,ue.list=!0,ue.quote=0,ue.listStack.push(ue.indentation),ue.em=!1,ue.strong=!1,ue.code=!1,ue.strikethrough=!1,He.taskLists&&pe.match(Ae,!1)&&(ue.taskList=!0),ue.f=ue.inline,He.highlightFormatting&&(ue.formatting=["list","list-"+Ee]),_e(ue)}else{if(Ge&&ue.indentation<=Se&&(ve=pe.match(Re,!0)))return ue.quote=0,ue.fencedEndRE=new RegExp(ve[1]+"+ *$"),ue.localMode=He.fencedCodeBlockHighlighting&&Xe(ve[2]||He.fencedCodeBlockDefaultMode),ue.localMode&&(ue.localState=ae.startState(ue.localMode)),ue.f=ue.block=$t,He.highlightFormatting&&(ue.formatting="code-block"),ue.code=-1,_e(ue);if(ue.setext||(!Ue||!Je)&&!ue.quote&&ue.list===!1&&!ue.code&&!xe&&!Oe.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(ut)))return ue.setext?(ue.header=ue.setext,ue.setext=0,pe.skipToEnd(),He.highlightFormatting&&(ue.formatting="header")):(ue.header=ve[0].charAt(0)=="="?1:2,ue.setext=ue.header),ue.thisLine.header=!0,ue.f=ue.inline,_e(ue);if(xe)return pe.skipToEnd(),ue.hr=!0,ue.thisLine.hr=!0,Le.hr;if(pe.peek()==="[")return st(pe,ue,zt)}return st(pe,ue,ue.inline)}function dt(pe,ue){var Ge=ze.token(pe,ue.htmlState);if(!me){var wt=ae.innerMode(ze,ue.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||ue.md_inside&&pe.current().indexOf(">")>-1)&&(ue.f=Lt,ue.block=pt,ue.htmlState=null)}return Ge}function $t(pe,ue){var Ge=ue.listStack[ue.listStack.length-1]||0,wt=ue.indentation<Ge,lt=Ge+3;if(ue.fencedEndRE&&ue.indentation<=lt&&(wt||pe.match(ue.fencedEndRE))){He.highlightFormatting&&(ue.formatting="code-block");var Ce;return wt||(Ce=_e(ue)),ue.localMode=ue.localState=null,ue.block=pt,ue.f=Lt,ue.fencedEndRE=null,ue.code=0,ue.thisLine.fencedCodeEnd=!0,wt?St(pe,ue,ue.block):Ce}else return ue.localMode?ue.localMode.token(pe,ue.localState):(pe.skipToEnd(),Le.code)}function _e(pe){var ue=[];if(pe.formatting){ue.push(Le.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var Ge=0;Ge<pe.formatting.length;Ge++)ue.push(Le.formatting+"-"+pe.formatting[Ge]),pe.formatting[Ge]==="header"&&ue.push(Le.formatting+"-"+pe.formatting[Ge]+"-"+pe.header),pe.formatting[Ge]==="quote"&&(!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=pe.quote?ue.push(Le.formatting+"-"+pe.formatting[Ge]+"-"+pe.quote):ue.push("error"))}if(pe.taskOpen)return ue.push("meta"),ue.length?ue.join(" "):null;if(pe.taskClosed)return ue.push("property"),ue.length?ue.join(" "):null;if(pe.linkHref?ue.push(Le.linkHref,"url"):(pe.strong&&ue.push(Le.strong),pe.em&&ue.push(Le.em),pe.strikethrough&&ue.push(Le.strikethrough),pe.emoji&&ue.push(Le.emoji),pe.linkText&&ue.push(Le.linkText),pe.code&&ue.push(Le.code),pe.image&&ue.push(Le.image),pe.imageAltText&&ue.push(Le.imageAltText,"link"),pe.imageMarker&&ue.push(Le.imageMarker)),pe.header&&ue.push(Le.header,Le.header+"-"+pe.header),pe.quote&&(ue.push(Le.quote),!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=pe.quote?ue.push(Le.quote+"-"+pe.quote):ue.push(Le.quote+"-"+He.maxBlockquoteDepth)),pe.list!==!1){var wt=(pe.listStack.length-1)%3;wt?wt===1?ue.push(Le.list2):ue.push(Le.list3):ue.push(Le.list1)}return pe.trailingSpaceNewLine?ue.push("trailing-space-new-line"):pe.trailingSpace&&ue.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ue.length?ue.join(" "):null}function tt(pe,ue){if(pe.match(je,!0))return _e(ue)}function Lt(pe,ue){var Ge=ue.text(pe,ue);if(typeof Ge!="undefined")return Ge;if(ue.list)return ue.list=null,_e(ue);if(ue.taskList){var wt=pe.match(Ae,!0)[1]===" ";return wt?ue.taskOpen=!0:ue.taskClosed=!0,He.highlightFormatting&&(ue.formatting="task"),ue.taskList=!1,_e(ue)}if(ue.taskOpen=!1,ue.taskClosed=!1,ue.header&&pe.match(/^#+$/,!0))return He.highlightFormatting&&(ue.formatting="header"),_e(ue);var lt=pe.next();if(ue.linkTitle){ue.linkTitle=!1;var Ce=lt;lt==="("&&(Ce=")"),Ce=(Ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Je="^\\s*(?:[^"+Ce+"\\\\]+|\\\\\\\\|\\\\.)"+Ce;if(pe.match(new RegExp(Je),!0))return Le.linkHref}if(lt==="`"){var Se=ue.formatting;He.highlightFormatting&&(ue.formatting="code"),pe.eatWhile("`");var rt=pe.current().length;if(ue.code==0&&(!ue.quote||rt==1))return ue.code=rt,_e(ue);if(rt==ue.code){var Ue=_e(ue);return ue.code=0,Ue}else return ue.formatting=Se,_e(ue)}else if(ue.code)return _e(ue);if(lt==="\\"&&(pe.next(),He.highlightFormatting)){var xe=_e(ue),ve=Le.formatting+"-escape";return xe?xe+" "+ve:ve}if(lt==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ue.imageMarker=!0,ue.image=!0,He.highlightFormatting&&(ue.formatting="image"),_e(ue);if(lt==="["&&ue.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ue.imageMarker=!1,ue.imageAltText=!0,He.highlightFormatting&&(ue.formatting="image"),_e(ue);if(lt==="]"&&ue.imageAltText){He.highlightFormatting&&(ue.formatting="image");var xe=_e(ue);return ue.imageAltText=!1,ue.image=!1,ue.inline=ue.f=Qe,xe}if(lt==="["&&!ue.image)return ue.linkText&&pe.match(/^.*?\]/)||(ue.linkText=!0,He.highlightFormatting&&(ue.formatting="link")),_e(ue);if(lt==="]"&&ue.linkText){He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return ue.linkText=!1,ue.inline=ue.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:Lt,xe}if(lt==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Fe,He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return xe?xe+=" ":xe="",xe+Le.linkInline}if(lt==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Fe,He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return xe?xe+=" ":xe="",xe+Le.linkEmail}if(He.xml&&lt==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ee=pe.string.indexOf(">",pe.pos);if(Ee!=-1){var qe=pe.string.substring(pe.start,Ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(qe)&&(ue.md_inside=!0)}return pe.backUp(1),ue.htmlState=ae.startState(ze),St(pe,ue,dt)}if(He.xml&&lt==="<"&&pe.match(/^\/\w*?>/))return ue.md_inside=!1,"tag";if(lt==="*"||lt==="_"){for(var we=1,Ne=pe.pos==1?" ":pe.string.charAt(pe.pos-2);we<3&&pe.eat(lt);)we++;var Ve=pe.peek()||" ",et=!/\s/.test(Ve)&&(!De.test(Ve)||/\s/.test(Ne)||De.test(Ne)),it=!/\s/.test(Ne)&&(!De.test(Ne)||/\s/.test(Ve)||De.test(Ve)),We=null,mt=null;if(we%2&&(!ue.em&&et&&(lt==="*"||!it||De.test(Ne))?We=!0:ue.em==lt&&it&&(lt==="*"||!et||De.test(Ve))&&(We=!1)),we>1&&(!ue.strong&&et&&(lt==="*"||!it||De.test(Ne))?mt=!0:ue.strong==lt&&it&&(lt==="*"||!et||De.test(Ve))&&(mt=!1)),mt!=null||We!=null){He.highlightFormatting&&(ue.formatting=We==null?"strong":mt==null?"em":"strong em"),We===!0&&(ue.em=lt),mt===!0&&(ue.strong=lt);var Ue=_e(ue);return We===!1&&(ue.em=!1),mt===!1&&(ue.strong=!1),Ue}}else if(lt===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return _e(ue);pe.backUp(1)}if(He.strikethrough){if(lt==="~"&&pe.eatWhile(lt)){if(ue.strikethrough){He.highlightFormatting&&(ue.formatting="strikethrough");var Ue=_e(ue);return ue.strikethrough=!1,Ue}else if(pe.match(/^[^\s]/,!1))return ue.strikethrough=!0,He.highlightFormatting&&(ue.formatting="strikethrough"),_e(ue)}else if(lt===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return _e(ue);pe.backUp(2)}}if(He.emoji&&lt===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ue.emoji=!0,He.highlightFormatting&&(ue.formatting="emoji");var ct=_e(ue);return ue.emoji=!1,ct}return lt===" "&&(pe.match(/^ +$/,!1)?ue.trailingSpace++:ue.trailingSpace&&(ue.trailingSpaceNewLine=!0)),_e(ue)}function Fe(pe,ue){var Ge=pe.next();if(Ge===">"){ue.f=ue.inline=Lt,He.highlightFormatting&&(ue.formatting="link");var wt=_e(ue);return wt?wt+=" ":wt="",wt+Le.linkInline}return pe.match(/^[^>]+/,!0),Le.linkInline}function Qe(pe,ue){if(pe.eatSpace())return null;var Ge=pe.next();return Ge==="("||Ge==="["?(ue.f=ue.inline=Ye(Ge==="("?")":"]"),He.highlightFormatting&&(ue.formatting="link-string"),ue.linkHref=!0,_e(ue)):"error"}var Pe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ye(pe){return function(ue,Ge){var wt=ue.next();if(wt===pe){Ge.f=Ge.inline=Lt,He.highlightFormatting&&(Ge.formatting="link-string");var lt=_e(Ge);return Ge.linkHref=!1,lt}return ue.match(Pe[pe]),Ge.linkHref=!0,_e(Ge)}}function zt(pe,ue){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ue.f=kt,pe.next(),He.highlightFormatting&&(ue.formatting="link"),ue.linkText=!0,_e(ue)):st(pe,ue,Lt)}function kt(pe,ue){if(pe.match(/^\]:/,!0)){ue.f=ue.inline=Tt,He.highlightFormatting&&(ue.formatting="link");var Ge=_e(ue);return ue.linkText=!1,Ge}return pe.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function Tt(pe,ue){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ue.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ue.f=ue.inline=Lt,Le.linkHref+" url")}var vt={startState:function(){return{f:pt,prevLine:{stream:null},thisLine:{stream:null},block:pt,htmlState:null,indentation:0,inline:Lt,text:tt,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(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&ae.copyState(ze,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?ae.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ue){if(ue.formatting=!1,pe!=ue.thisLine.stream){if(ue.header=0,ue.hr=!1,pe.match(/^\s*$/,!0))return ft(ue),null;if(ue.prevLine=ue.thisLine,ue.thisLine={stream:pe},ue.taskList=!1,ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,!ue.localState&&(ue.f=ue.block,ue.f!=dt)){var Ge=pe.match(/^\s*/,!0)[0].replace(/\t/g,ot).length;if(ue.indentation=Ge,ue.indentationDiff=null,Ge>0)return null}}return ue.f(pe,ue)},innerMode:function(pe){return pe.block==dt?{state:pe.htmlState,mode:ze}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:vt}},indent:function(pe,ue,Ge){return pe.block==dt&&ze.indent?ze.indent(pe.htmlState,ue,Ge):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ue,Ge):ae.Pass},blankLine:ft,getType:_e,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return vt},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";ae.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 gt=0;gt<ae.modeInfo.length;gt++){var He=ae.modeInfo[gt];He.mimes&&(He.mime=He.mimes[0])}ae.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Xe=ae.modeInfo[me];if(Xe.mime==ze)return Xe;if(Xe.mimes){for(var Le=0;Le<Xe.mimes.length;Le++)if(Xe.mimes[Le]==ze)return Xe}}if(/\+xml$/.test(ze))return ae.findModeByMIME("application/xml");if(/\+json$/.test(ze))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Xe=ae.modeInfo[me];if(Xe.ext){for(var Le=0;Le<Xe.ext.length;Le++)if(Xe.ext[Le]==ze)return Xe}}},ae.findModeByFileName=function(ze){for(var me=0;me<ae.modeInfo.length;me++){var Xe=ae.modeInfo[me];if(Xe.file&&Xe.file.test(ze))return Xe}var Le=ze.lastIndexOf("."),Ke=Le>-1&&ze.substring(Le+1,ze.length);if(Ke)return ae.findModeByExtension(Ke)},ae.findModeByName=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Xe=ae.modeInfo[me];if(Xe.name.toLowerCase()==ze)return Xe;if(Xe.alias){for(var Le=0;Le<Xe.alias.length;Le++)if(Xe.alias[Le].toLowerCase()==ze)return Xe}}}})},67549:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";ae.defineMode("stex",function(gt,He){"use strict";function ze(je,Re){je.cmdState.push(Re)}function me(je){return je.cmdState.length>0?je.cmdState[je.cmdState.length-1]:null}function Xe(je){var Re=je.cmdState.pop();Re&&Re.closeBracket()}function Le(je){for(var Re=je.cmdState,Oe=Re.length-1;Oe>=0;Oe--){var De=Re[Oe];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ke(je,Re,Oe){return function(){this.name=je,this.bracketNo=0,this.style=Re,this.styles=Oe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=Ke("importmodule","tag",["string","builtin"]),ke.documentclass=Ke("documentclass","tag",["","atom"]),ke.usepackage=Ke("usepackage","tag",["atom"]),ke.begin=Ke("begin","tag",["atom"]),ke.end=Ke("end","tag",["atom"]),ke.label=Ke("label","tag",["atom"]),ke.ref=Ke("ref","tag",["atom"]),ke.eqref=Ke("eqref","tag",["atom"]),ke.cite=Ke("cite","tag",["atom"]),ke.bibitem=Ke("bibitem","tag",["atom"]),ke.Bibitem=Ke("Bibitem","tag",["atom"]),ke.RBibitem=Ke("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(je,Re){je.f=Re}function Ae(je,Re){var Oe;if(je.match(/^\\[a-zA-Z@]+/)){var De=je.current().slice(1);return Oe=ke.hasOwnProperty(De)?ke[De]:ke.DEFAULT,Oe=new Oe,ze(Re,Oe),de(Re,ut),Oe.style}if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/\\]/))return"tag";if(je.match("\\["))return de(Re,function(st,St){return ye(st,St,"\\]")}),"keyword";if(je.match("\\("))return de(Re,function(st,St){return ye(st,St,"\\)")}),"keyword";if(je.match("$$"))return de(Re,function(st,St){return ye(st,St,"$$")}),"keyword";if(je.match("$"))return de(Re,function(st,St){return ye(st,St,"$")}),"keyword";var ot=je.next();if(ot=="%")return je.skipToEnd(),"comment";if(ot=="}"||ot=="]"){if(Oe=me(Re),Oe)Oe.closeBracket(ot),de(Re,ut);else return"error";return"bracket"}else return ot=="{"||ot=="["?(Oe=ke.DEFAULT,Oe=new Oe,ze(Re,Oe),"bracket"):/\d/.test(ot)?(je.eatWhile(/[\w.%]/),"atom"):(je.eatWhile(/[\w\-_]/),Oe=Le(Re),Oe.name=="begin"&&(Oe.argument=je.current()),Oe.styleIdentifier())}function ye(je,Re,Oe){if(je.eatSpace())return null;if(Oe&&je.match(Oe))return de(Re,Ae),"keyword";if(je.match(/^\\[a-zA-Z@]+/))return"tag";if(je.match(/^[a-zA-Z]+/))return"variable-2";if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/]/)||je.match(/^[\^_&]/))return"tag";if(je.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(je.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=je.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(je.skipToEnd(),"comment"):"error"}function ut(je,Re){var Oe=je.peek(),De;return Oe=="{"||Oe=="["?(De=me(Re),De.openBracket(Oe),je.eat(Oe),de(Re,Ae),"bracket"):/[ \t\r]/.test(Oe)?(je.eat(Oe),null):(de(Re,Ae),Xe(Re),Ae(je,Re))}return{startState:function(){var je=He.inMathMode?function(Re,Oe){return ye(Re,Oe)}:Ae;return{cmdState:[],f:je}},copyState:function(je){return{cmdState:je.cmdState.slice(),f:je.f}},token:function(je,Re){return Re.f(je,Re)},blankLine:function(je){je.f=Ae,je.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";var gt={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},He={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(ze,me){var Xe=ze.indentUnit,Le={},Ke=me.htmlMode?gt:He;for(var ke in Ke)Le[ke]=Ke[ke];for(var ke in me)Le[ke]=me[ke];var de,Ae;function ye(Fe,Qe){function Pe(kt){return Qe.tokenize=kt,kt(Fe,Qe)}var Ye=Fe.next();if(Ye=="<")return Fe.eat("!")?Fe.eat("[")?Fe.match("CDATA[")?Pe(Re("atom","]]>")):null:Fe.match("--")?Pe(Re("comment","-->")):Fe.match("DOCTYPE",!0,!0)?(Fe.eatWhile(/[\w\._\-]/),Pe(Oe(1))):null:Fe.eat("?")?(Fe.eatWhile(/[\w\._\-]/),Qe.tokenize=Re("meta","?>"),"meta"):(de=Fe.eat("/")?"closeTag":"openTag",Qe.tokenize=ut,"tag bracket");if(Ye=="&"){var zt;return Fe.eat("#")?Fe.eat("x")?zt=Fe.eatWhile(/[a-fA-F\d]/)&&Fe.eat(";"):zt=Fe.eatWhile(/[\d]/)&&Fe.eat(";"):zt=Fe.eatWhile(/[\w\.\-:]/)&&Fe.eat(";"),zt?"atom":"error"}else return Fe.eatWhile(/[^&<]/),null}ye.isInText=!0;function ut(Fe,Qe){var Pe=Fe.next();if(Pe==">"||Pe=="/"&&Fe.eat(">"))return Qe.tokenize=ye,de=Pe==">"?"endTag":"selfcloseTag","tag bracket";if(Pe=="=")return de="equals",null;if(Pe=="<"){Qe.tokenize=ye,Qe.state=St,Qe.tagName=Qe.tagStart=null;var Ye=Qe.tokenize(Fe,Qe);return Ye?Ye+" tag error":"tag error"}else return/[\'\"]/.test(Pe)?(Qe.tokenize=je(Pe),Qe.stringStartCol=Fe.column(),Qe.tokenize(Fe,Qe)):(Fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function je(Fe){var Qe=function(Pe,Ye){for(;!Pe.eol();)if(Pe.next()==Fe){Ye.tokenize=ut;break}return"string"};return Qe.isInAttribute=!0,Qe}function Re(Fe,Qe){return function(Pe,Ye){for(;!Pe.eol();){if(Pe.match(Qe)){Ye.tokenize=ye;break}Pe.next()}return Fe}}function Oe(Fe){return function(Qe,Pe){for(var Ye;(Ye=Qe.next())!=null;){if(Ye=="<")return Pe.tokenize=Oe(Fe+1),Pe.tokenize(Qe,Pe);if(Ye==">")if(Fe==1){Pe.tokenize=ye;break}else return Pe.tokenize=Oe(Fe-1),Pe.tokenize(Qe,Pe)}return"meta"}}function De(Fe,Qe,Pe){this.prev=Fe.context,this.tagName=Qe,this.indent=Fe.indented,this.startOfLine=Pe,(Le.doNotIndent.hasOwnProperty(Qe)||Fe.context&&Fe.context.noIndent)&&(this.noIndent=!0)}function ot(Fe){Fe.context&&(Fe.context=Fe.context.prev)}function st(Fe,Qe){for(var Pe;;){if(!Fe.context||(Pe=Fe.context.tagName,!Le.contextGrabbers.hasOwnProperty(Pe)||!Le.contextGrabbers[Pe].hasOwnProperty(Qe)))return;ot(Fe)}}function St(Fe,Qe,Pe){return Fe=="openTag"?(Pe.tagStart=Qe.column(),bt):Fe=="closeTag"?ft:St}function bt(Fe,Qe,Pe){return Fe=="word"?(Pe.tagName=Qe.current(),Ae="tag",$t):Le.allowMissingTagName&&Fe=="endTag"?(Ae="tag bracket",$t(Fe,Qe,Pe)):(Ae="error",bt)}function ft(Fe,Qe,Pe){if(Fe=="word"){var Ye=Qe.current();return Pe.context&&Pe.context.tagName!=Ye&&Le.implicitlyClosed.hasOwnProperty(Pe.context.tagName)&&ot(Pe),Pe.context&&Pe.context.tagName==Ye||Le.matchClosing===!1?(Ae="tag",pt):(Ae="tag error",dt)}else return Le.allowMissingTagName&&Fe=="endTag"?(Ae="tag bracket",pt(Fe,Qe,Pe)):(Ae="error",dt)}function pt(Fe,Qe,Pe){return Fe!="endTag"?(Ae="error",pt):(ot(Pe),St)}function dt(Fe,Qe,Pe){return Ae="error",pt(Fe,Qe,Pe)}function $t(Fe,Qe,Pe){if(Fe=="word")return Ae="attribute",_e;if(Fe=="endTag"||Fe=="selfcloseTag"){var Ye=Pe.tagName,zt=Pe.tagStart;return Pe.tagName=Pe.tagStart=null,Fe=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(Ye)?st(Pe,Ye):(st(Pe,Ye),Pe.context=new De(Pe,Ye,zt==Pe.indented)),St}return Ae="error",$t}function _e(Fe,Qe,Pe){return Fe=="equals"?tt:(Le.allowMissing||(Ae="error"),$t(Fe,Qe,Pe))}function tt(Fe,Qe,Pe){return Fe=="string"?Lt:Fe=="word"&&Le.allowUnquoted?(Ae="string",$t):(Ae="error",$t(Fe,Qe,Pe))}function Lt(Fe,Qe,Pe){return Fe=="string"?Lt:$t(Fe,Qe,Pe)}return{startState:function(Fe){var Qe={tokenize:ye,state:St,indented:Fe||0,tagName:null,tagStart:null,context:null};return Fe!=null&&(Qe.baseIndent=Fe),Qe},token:function(Fe,Qe){if(!Qe.tagName&&Fe.sol()&&(Qe.indented=Fe.indentation()),Fe.eatSpace())return null;de=null;var Pe=Qe.tokenize(Fe,Qe);return(Pe||de)&&Pe!="comment"&&(Ae=null,Qe.state=Qe.state(de||Pe,Fe,Qe),Ae&&(Pe=Ae=="error"?Pe+" error":Ae)),Pe},indent:function(Fe,Qe,Pe){var Ye=Fe.context;if(Fe.tokenize.isInAttribute)return Fe.tagStart==Fe.indented?Fe.stringStartCol+1:Fe.indented+Xe;if(Ye&&Ye.noIndent)return ae.Pass;if(Fe.tokenize!=ut&&Fe.tokenize!=ye)return Pe?Pe.match(/^(\s*)/)[0].length:0;if(Fe.tagName)return Le.multilineTagIndentPastTag!==!1?Fe.tagStart+Fe.tagName.length+2:Fe.tagStart+Xe*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var zt=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(zt&&zt[1])for(;Ye;)if(Ye.tagName==zt[2]){Ye=Ye.prev;break}else if(Le.implicitlyClosed.hasOwnProperty(Ye.tagName))Ye=Ye.prev;else break;else if(zt)for(;Ye;){var kt=Le.contextGrabbers[Ye.tagName];if(kt&&kt.hasOwnProperty(zt[2]))Ye=Ye.prev;else break}for(;Ye&&Ye.prev&&!Ye.startOfLine;)Ye=Ye.prev;return Ye?Ye.indent+Xe:Fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(Fe){Fe.state==tt&&(Fe.state=$t)},xmlCurrentTag:function(Fe){return Fe.tagName?{name:Fe.tagName,close:Fe.type=="closeTag"}:null},xmlCurrentContext:function(Fe){for(var Qe=[],Pe=Fe.context;Pe;Pe=Pe.prev)Pe.tagName&&Qe.push(Pe.tagName);return Qe.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Qe}});var ae=fe(33885),gt=fe(42978),He=fe(43403),ze=fe(34280),me=fe(59301),Xe=me.createContext(null),Le=me.createContext({}),Ke=Xe,ke=fe(20068),de=fe(54476),Ae=fe(92310),ye=fe.n(Ae),ut=fe(77900),je=fe(10228),Re=fe(26112),Oe=fe(75931),De=fe(8654),ot=["prefixCls","className","containerRef"],st=function(Ye){var zt=Ye.prefixCls,kt=Ye.className,Tt=Ye.containerRef,vt=(0,Oe.Z)(Ye,ot),pe=me.useContext(Le),ue=pe.panel,Ge=(0,De.x1)(ue,Tt);return me.createElement("div",(0,de.Z)({className:ye()("".concat(zt,"-content"),kt),role:"dialog",ref:Ge},(0,Re.Z)(Ye,{aria:!0}),{"aria-modal":"true"},vt))},St=st,bt=fe(48736);function ft(Pe){return typeof Pe=="string"&&String(Number(Pe))===Pe?((0,bt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Pe)):Pe}function pt(Pe){warning(!("wrapperClassName"in Pe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Pe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var dt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function $t(Pe,Ye){var zt,kt,Tt,vt=Pe.prefixCls,pe=Pe.open,ue=Pe.placement,Ge=Pe.inline,wt=Pe.push,lt=Pe.forceRender,Ce=Pe.autoFocus,Je=Pe.keyboard,Se=Pe.classNames,rt=Pe.rootClassName,Ue=Pe.rootStyle,xe=Pe.zIndex,ve=Pe.className,Ee=Pe.id,qe=Pe.style,we=Pe.motion,Ne=Pe.width,Ve=Pe.height,et=Pe.children,it=Pe.mask,We=Pe.maskClosable,mt=Pe.maskMotion,ct=Pe.maskClassName,jt=Pe.maskStyle,Ot=Pe.afterOpenChange,se=Pe.onClose,te=Pe.onMouseEnter,z=Pe.onMouseOver,ie=Pe.onMouseLeave,ce=Pe.onClick,ne=Pe.onKeyDown,ge=Pe.onKeyUp,ht=Pe.styles,yt=Pe.drawerRender,Ct=me.useRef(),Ie=me.useRef(),_t=me.useRef();me.useImperativeHandle(Ye,function(){return Ct.current});var Ft=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case je.Z.TAB:{if(Kn===je.Z.TAB){if(!xr&&document.activeElement===_t.current){var Kt;(Kt=Ie.current)===null||Kt===void 0||Kt.focus({preventScroll:!0})}else if(xr&&document.activeElement===Ie.current){var pn;(pn=_t.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case je.Z.ESC:{se&&Je&&(Xn.stopPropagation(),se(Xn));break}}};me.useEffect(function(){if(pe&&Ce){var Bn;(Bn=Ct.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var It=me.useState(!1),un=(0,gt.Z)(It,2),kn=un[0],cn=un[1],wn=me.useContext(Ke),$n;typeof wt=="boolean"?$n=wt?{}:{distance:0}:$n=wt||{};var _n=(zt=(kt=(Tt=$n)===null||Tt===void 0?void 0:Tt.distance)!==null&&kt!==void 0?kt:wn==null?void 0:wn.pushDistance)!==null&&zt!==void 0?zt:180,mr=me.useMemo(function(){return{pushDistance:_n,push:function(){cn(!0)},pull:function(){cn(!1)}}},[_n]);me.useEffect(function(){if(pe){var Bn;wn==null||(Bn=wn.push)===null||Bn===void 0||Bn.call(wn)}else{var Xn;wn==null||(Xn=wn.pull)===null||Xn===void 0||Xn.call(wn)}},[pe]),me.useEffect(function(){return function(){var Bn;wn==null||(Bn=wn.pull)===null||Bn===void 0||Bn.call(wn)}},[]);var er=it&&me.createElement(ut.default,(0,de.Z)({key:"mask"},mt,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:ye()("".concat(vt,"-mask"),Kn,Se==null?void 0:Se.mask,ct),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},xr),jt),ht==null?void 0:ht.mask),onClick:We&&pe?se:void 0,ref:Xn})}),ur=typeof we=="function"?we(ue):we,nr={};if(kn&&_n)switch(ue){case"top":nr.transform="translateY(".concat(_n,"px)");break;case"bottom":nr.transform="translateY(".concat(-_n,"px)");break;case"left":nr.transform="translateX(".concat(_n,"px)");break;default:nr.transform="translateX(".concat(-_n,"px)");break}ue==="left"||ue==="right"?nr.width=ft(Ne):nr.height=ft(Ve);var In={onMouseEnter:te,onMouseOver:z,onMouseLeave:ie,onClick:ce,onKeyDown:ne,onKeyUp:ge},rr=me.createElement(ut.default,(0,de.Z)({key:"panel"},ur,{visible:pe,forceRender:lt,onVisibleChanged:function(Xn){Ot==null||Ot(Xn)},removeOnLeave:!1,leavedClassName:"".concat(vt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Kt=me.createElement(St,(0,de.Z)({id:Ee,containerRef:Xn,prefixCls:vt,className:ye()(ve,Se==null?void 0:Se.content),style:(0,ae.Z)((0,ae.Z)({},qe),ht==null?void 0:ht.content)},(0,Re.Z)(Pe,{aria:!0}),In),et);return me.createElement("div",(0,de.Z)({className:ye()("".concat(vt,"-content-wrapper"),Se==null?void 0:Se.wrapper,Kn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},nr),xr),ht==null?void 0:ht.wrapper)},(0,Re.Z)(Pe,{data:!0})),yt?yt(Kt):Kt)}),cr=(0,ae.Z)({},Ue);return xe&&(cr.zIndex=xe),me.createElement(Ke.Provider,{value:mr},me.createElement("div",{className:ye()(vt,"".concat(vt,"-").concat(ue),rt,(0,ke.Z)((0,ke.Z)({},"".concat(vt,"-open"),pe),"".concat(vt,"-inline"),Ge)),style:cr,tabIndex:-1,ref:Ct,onKeyDown:Ft},er,me.createElement("div",{tabIndex:0,ref:Ie,style:dt,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:_t,style:dt,"aria-hidden":"true","data-sentinel":"end"})))}var _e=me.forwardRef($t),tt=_e,Lt=function(Ye){var zt=Ye.open,kt=zt===void 0?!1:zt,Tt=Ye.prefixCls,vt=Tt===void 0?"rc-drawer":Tt,pe=Ye.placement,ue=pe===void 0?"right":pe,Ge=Ye.autoFocus,wt=Ge===void 0?!0:Ge,lt=Ye.keyboard,Ce=lt===void 0?!0:lt,Je=Ye.width,Se=Je===void 0?378:Je,rt=Ye.mask,Ue=rt===void 0?!0:rt,xe=Ye.maskClosable,ve=xe===void 0?!0:xe,Ee=Ye.getContainer,qe=Ye.forceRender,we=Ye.afterOpenChange,Ne=Ye.destroyOnClose,Ve=Ye.onMouseEnter,et=Ye.onMouseOver,it=Ye.onMouseLeave,We=Ye.onClick,mt=Ye.onKeyDown,ct=Ye.onKeyUp,jt=Ye.panelRef,Ot=me.useState(!1),se=(0,gt.Z)(Ot,2),te=se[0],z=se[1],ie=me.useState(!1),ce=(0,gt.Z)(ie,2),ne=ce[0],ge=ce[1];(0,ze.Z)(function(){ge(!0)},[]);var ht=ne?kt:!1,yt=me.useRef(),Ct=me.useRef();(0,ze.Z)(function(){ht&&(Ct.current=document.activeElement)},[ht]);var Ie=function(kn){var cn;if(z(kn),we==null||we(kn),!kn&&Ct.current&&!((cn=yt.current)!==null&&cn!==void 0&&cn.contains(Ct.current))){var wn;(wn=Ct.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},_t=me.useMemo(function(){return{panel:jt}},[jt]);if(!qe&&!te&&!ht&&Ne)return null;var Ft={onMouseEnter:Ve,onMouseOver:et,onMouseLeave:it,onClick:We,onKeyDown:mt,onKeyUp:ct},It=(0,ae.Z)((0,ae.Z)({},Ye),{},{open:ht,prefixCls:vt,placement:ue,autoFocus:wt,keyboard:Ce,width:Se,mask:Ue,maskClosable:ve,inline:Ee===!1,afterOpenChange:Ie,ref:yt},Ft);return me.createElement(Le.Provider,{value:_t},me.createElement(He.Z,{open:ht||qe||te,autoDestroy:!1,getContainer:Ee,autoLock:Ue&&(ht||te)},me.createElement(tt,It)))},Fe=Lt,Qe=Fe},20922:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Ue}});var ae=fe(54476),gt=fe(20068),He=fe(76190),ze=fe(42978),me=fe(75931),Xe=fe(67732),Le=fe(83652);function Ke(){return typeof BigInt=="function"}function ke(xe){return!xe&&xe!==0&&!Number.isNaN(xe)||!String(xe).trim()}function de(xe){var ve=xe.trim(),Ee=ve.startsWith("-");Ee&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var qe=ve||"0",we=qe.split("."),Ne=we[0]||"0",Ve=we[1]||"0";Ne==="0"&&Ve==="0"&&(Ee=!1);var et=Ee?"-":"";return{negative:Ee,negativeStr:et,trimStr:qe,integerStr:Ne,decimalStr:Ve,fullStr:"".concat(et).concat(qe)}}function Ae(xe){var ve=String(xe);return!Number.isNaN(Number(ve))&&ve.includes("e")}function ye(xe){var ve=String(xe);if(Ae(xe)){var Ee=Number(ve.slice(ve.indexOf("e-")+2)),qe=ve.match(/\.(\d+)/);return qe!=null&&qe[1]&&(Ee+=qe[1].length),Ee}return ve.includes(".")&&je(ve)?ve.length-ve.indexOf(".")-1:0}function ut(xe){var ve=String(xe);if(Ae(xe)){if(xe>Number.MAX_SAFE_INTEGER)return String(Ke()?BigInt(xe).toString():Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return String(Ke()?BigInt(xe).toString():Number.MIN_SAFE_INTEGER);ve=xe.toFixed(ye(ve))}return de(ve).fullStr}function je(xe){return typeof xe=="number"?!Number.isNaN(xe):xe?/^\s*-?\d+(\.\d+)?\s*$/.test(xe)||/^\s*-?\d+\.\s*$/.test(xe)||/^\s*-?\.\d+\s*$/.test(xe):!1}var Re=function(){function xe(ve){if((0,Xe.Z)(this,xe),(0,gt.Z)(this,"origin",""),(0,gt.Z)(this,"negative",void 0),(0,gt.Z)(this,"integer",void 0),(0,gt.Z)(this,"decimal",void 0),(0,gt.Z)(this,"decimalLen",void 0),(0,gt.Z)(this,"empty",void 0),(0,gt.Z)(this,"nan",void 0),ke(ve)){this.empty=!0;return}if(this.origin=String(ve),ve==="-"||Number.isNaN(ve)){this.nan=!0;return}var Ee=ve;if(Ae(Ee)&&(Ee=Number(Ee)),Ee=typeof Ee=="string"?Ee:ut(Ee),je(Ee)){var qe=de(Ee);this.negative=qe.negative;var we=qe.trimStr.split(".");this.integer=BigInt(we[0]);var Ne=we[1]||"0";this.decimal=BigInt(Ne),this.decimalLen=Ne.length}else this.nan=!0}return(0,Le.Z)(xe,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Ee){var qe="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ee,"0"));return BigInt(qe)}},{key:"negate",value:function(){var Ee=new xe(this.toString());return Ee.negative=!Ee.negative,Ee}},{key:"cal",value:function(Ee,qe,we){var Ne=Math.max(this.getDecimalStr().length,Ee.getDecimalStr().length),Ve=this.alignDecimal(Ne),et=Ee.alignDecimal(Ne),it=qe(Ve,et).toString(),We=we(Ne),mt=de(it),ct=mt.negativeStr,jt=mt.trimStr,Ot="".concat(ct).concat(jt.padStart(We+1,"0"));return new xe("".concat(Ot.slice(0,-We),".").concat(Ot.slice(-We)))}},{key:"add",value:function(Ee){if(this.isInvalidate())return new xe(Ee);var qe=new xe(Ee);return qe.isInvalidate()?this:this.cal(qe,function(we,Ne){return we+Ne},function(we){return we})}},{key:"multi",value:function(Ee){var qe=new xe(Ee);return this.isInvalidate()||qe.isInvalidate()?new xe(NaN):this.cal(qe,function(we,Ne){return we*Ne},function(we){return we*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ee){return this.toString()===(Ee==null?void 0:Ee.toString())}},{key:"lessEquals",value:function(Ee){return this.add(Ee.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ee?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),xe}(),Oe=function(){function xe(ve){if((0,Xe.Z)(this,xe),(0,gt.Z)(this,"origin",""),(0,gt.Z)(this,"number",void 0),(0,gt.Z)(this,"empty",void 0),ke(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Le.Z)(xe,[{key:"negate",value:function(){return new xe(-this.toNumber())}},{key:"add",value:function(Ee){if(this.isInvalidate())return new xe(Ee);var qe=Number(Ee);if(Number.isNaN(qe))return this;var we=this.number+qe;if(we>Number.MAX_SAFE_INTEGER)return new xe(Number.MAX_SAFE_INTEGER);if(we<Number.MIN_SAFE_INTEGER)return new xe(Number.MIN_SAFE_INTEGER);var Ne=Math.max(ye(this.number),ye(qe));return new xe(we.toFixed(Ne))}},{key:"multi",value:function(Ee){var qe=Number(Ee);if(this.isInvalidate()||Number.isNaN(qe))return new xe(NaN);var we=this.number*qe;if(we>Number.MAX_SAFE_INTEGER)return new xe(Number.MAX_SAFE_INTEGER);if(we<Number.MIN_SAFE_INTEGER)return new xe(Number.MIN_SAFE_INTEGER);var Ne=Math.max(ye(this.number),ye(qe));return new xe(we.toFixed(Ne))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ee){return this.toNumber()===(Ee==null?void 0:Ee.toNumber())}},{key:"lessEquals",value:function(Ee){return this.add(Ee.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ee?this.isInvalidate()?"":ut(this.number):this.origin}}]),xe}();function De(xe){return Ke()?new Re(xe):new Oe(xe)}function ot(xe,ve,Ee){var qe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(xe==="")return"";var we=de(xe),Ne=we.negativeStr,Ve=we.integerStr,et=we.decimalStr,it="".concat(ve).concat(et),We="".concat(Ne).concat(Ve);if(Ee>=0){var mt=Number(et[Ee]);if(mt>=5&&!qe){var ct=De(xe).add("".concat(Ne,"0.").concat("0".repeat(Ee)).concat(10-mt));return ot(ct.toString(),ve,Ee,qe)}return Ee===0?We:"".concat(We).concat(ve).concat(et.padEnd(Ee,"0").slice(0,Ee))}return it===".0"?We:"".concat(We).concat(it)}var st=De,St=fe(92310),bt=fe.n(St),ft=fe(36901),pt=fe(34280);function dt(xe,ve){return typeof Proxy!="undefined"&&xe?new Proxy(xe,{get:function(qe,we){if(ve[we])return ve[we];var Ne=qe[we];return typeof Ne=="function"?Ne.bind(qe):Ne}}):xe}var $t=fe(8654),_e=fe(59301),tt=fe(48736);function Lt(xe,ve){var Ee=(0,_e.useRef)(null);function qe(){try{var Ne=xe.selectionStart,Ve=xe.selectionEnd,et=xe.value,it=et.substring(0,Ne),We=et.substring(Ve);Ee.current={start:Ne,end:Ve,value:et,beforeTxt:it,afterTxt:We}}catch(mt){}}function we(){if(xe&&Ee.current&&ve)try{var Ne=xe.value,Ve=Ee.current,et=Ve.beforeTxt,it=Ve.afterTxt,We=Ve.start,mt=Ne.length;if(Ne.startsWith(et))mt=et.length;else if(Ne.endsWith(it))mt=Ne.length-Ee.current.afterTxt.length;else{var ct=et[We-1],jt=Ne.indexOf(ct,We-1);jt!==-1&&(mt=jt+1)}xe.setSelectionRange(mt,mt)}catch(Ot){(0,tt.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Ot.message))}}return[qe,we]}var Fe=fe(49658),Qe=function(){var ve=(0,_e.useState)(!1),Ee=(0,ze.Z)(ve,2),qe=Ee[0],we=Ee[1];return(0,pt.Z)(function(){we((0,Fe.Z)())},[]),qe},Pe=Qe,Ye=fe(16089),zt=200,kt=600;function Tt(xe){var ve=xe.prefixCls,Ee=xe.upNode,qe=xe.downNode,we=xe.upDisabled,Ne=xe.downDisabled,Ve=xe.onStep,et=_e.useRef(),it=_e.useRef([]),We=_e.useRef();We.current=Ve;var mt=function(){clearTimeout(et.current)},ct=function(ne,ge){ne.preventDefault(),mt(),We.current(ge);function ht(){We.current(ge),et.current=setTimeout(ht,zt)}et.current=setTimeout(ht,kt)};_e.useEffect(function(){return function(){mt(),it.current.forEach(function(ce){return Ye.Z.cancel(ce)})}},[]);var jt=Pe();if(jt)return null;var Ot="".concat(ve,"-handler"),se=bt()(Ot,"".concat(Ot,"-up"),(0,gt.Z)({},"".concat(Ot,"-up-disabled"),we)),te=bt()(Ot,"".concat(Ot,"-down"),(0,gt.Z)({},"".concat(Ot,"-down-disabled"),Ne)),z=function(){return it.current.push((0,Ye.Z)(mt))},ie={unselectable:"on",role:"button",onMouseUp:z,onMouseLeave:z};return _e.createElement("div",{className:"".concat(Ot,"-wrap")},_e.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){ct(ne,!0)},"aria-label":"Increase Value","aria-disabled":we,className:se}),Ee||_e.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),_e.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){ct(ne,!1)},"aria-label":"Decrease Value","aria-disabled":Ne,className:te}),qe||_e.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function vt(xe){var ve=typeof xe=="number"?ut(xe):de(xe).fullStr,Ee=ve.includes(".");return Ee?de(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:xe+"0"}var pe=fe(30292),ue=function(){var xe=(0,_e.useRef)(0),ve=function(){Ye.Z.cancel(xe.current)};return(0,_e.useEffect)(function(){return ve},[]),function(Ee){ve(),xe.current=(0,Ye.Z)(function(){Ee()})}},Ge=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],wt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],lt=function(ve,Ee){return ve||Ee.isEmpty()?Ee.toString():Ee.toNumber()},Ce=function(ve){var Ee=st(ve);return Ee.isInvalidate()?null:Ee},Je=_e.forwardRef(function(xe,ve){var Ee=xe.prefixCls,qe=xe.className,we=xe.style,Ne=xe.min,Ve=xe.max,et=xe.step,it=et===void 0?1:et,We=xe.defaultValue,mt=xe.value,ct=xe.disabled,jt=xe.readOnly,Ot=xe.upHandler,se=xe.downHandler,te=xe.keyboard,z=xe.changeOnWheel,ie=z===void 0?!1:z,ce=xe.controls,ne=ce===void 0?!0:ce,ge=xe.classNames,ht=xe.stringMode,yt=xe.parser,Ct=xe.formatter,Ie=xe.precision,_t=xe.decimalSeparator,Ft=xe.onChange,It=xe.onInput,un=xe.onPressEnter,kn=xe.onStep,cn=xe.changeOnBlur,wn=cn===void 0?!0:cn,$n=xe.domRef,_n=(0,me.Z)(xe,Ge),mr="".concat(Ee,"-input"),er=_e.useRef(null),ur=_e.useState(!1),nr=(0,ze.Z)(ur,2),In=nr[0],rr=nr[1],cr=_e.useRef(!1),Bn=_e.useRef(!1),Xn=_e.useRef(!1),Kn=_e.useState(function(){return st(mt!=null?mt:We)}),xr=(0,ze.Z)(Kn,2),Kt=xr[0],pn=xr[1];function En(dn){mt===void 0&&pn(dn)}var An=_e.useCallback(function(dn,Gt){if(!Gt)return Ie>=0?Ie:Math.max(ye(dn),ye(it))},[Ie,it]),Jn=_e.useCallback(function(dn){var Gt=String(dn);if(yt)return yt(Gt);var gn=Gt;return _t&&(gn=gn.replace(_t,".")),gn.replace(/[^\w.-]+/g,"")},[yt,_t]),tr=_e.useRef(""),dr=_e.useCallback(function(dn,Gt){if(Ct)return Ct(dn,{userTyping:Gt,input:String(tr.current)});var gn=typeof dn=="number"?ut(dn):dn;if(!Gt){var nn=An(gn,Gt);if(je(gn)&&(_t||nn>=0)){var Hn=_t||".";gn=ot(gn,Hn,nn)}}return gn},[Ct,An,_t]),Zn=_e.useState(function(){var dn=We!=null?We:mt;return Kt.isInvalidate()&&["string","number"].includes((0,He.Z)(dn))?Number.isNaN(dn)?"":dn:dr(Kt.toString(),!1)}),Rn=(0,ze.Z)(Zn,2),hr=Rn[0],Vt=Rn[1];tr.current=hr;function at(dn,Gt){Vt(dr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Gt),Gt))}var Qt=_e.useMemo(function(){return Ce(Ve)},[Ve,Ie]),Cn=_e.useMemo(function(){return Ce(Ne)},[Ne,Ie]),Gn=_e.useMemo(function(){return!Qt||!Kt||Kt.isInvalidate()?!1:Qt.lessEquals(Kt)},[Qt,Kt]),Te=_e.useMemo(function(){return!Cn||!Kt||Kt.isInvalidate()?!1:Kt.lessEquals(Cn)},[Cn,Kt]),Be=Lt(er.current,In),Pt=(0,ze.Z)(Be,2),Et=Pt[0],Ze=Pt[1],Dt=function(Gt){return Qt&&!Gt.lessEquals(Qt)?Qt:Cn&&!Cn.lessEquals(Gt)?Cn:null},Xt=function(Gt){return!Dt(Gt)},tn=function(Gt,gn){var nn=Gt,Hn=Xt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=Dt(nn)||nn,Hn=!0),!jt&&!ct&&Hn){var wr=nn.toString(),Qn=An(wr,gn);return Qn>=0&&(nn=st(ot(wr,".",Qn)),Xt(nn)||(nn=st(ot(wr,".",Qn,!0)))),nn.equals(Kt)||(En(nn),Ft==null||Ft(nn.isEmpty()?null:lt(ht,nn)),mt===void 0&&at(nn,gn)),nn}return Kt},hn=ue(),Zt=function dn(Gt){if(Et(),tr.current=Gt,Vt(Gt),!Bn.current){var gn=Jn(Gt),nn=st(gn);nn.isNaN()||tn(nn,!0)}It==null||It(Gt),hn(function(){var Hn=Gt;yt||(Hn=Gt.replace(/。/g,".")),Hn!==Gt&&dn(Hn)})},qt=function(){Bn.current=!0},At=function(){Bn.current=!1,Zt(er.current.value)},xt=function(Gt){Zt(Gt.target.value)},en=function(Gt){var gn;if(!(Gt&&Gn||!Gt&&Te)){cr.current=!1;var nn=st(Xn.current?vt(it):it);Gt||(nn=nn.negate());var Hn=(Kt||st(0)).add(nn.toString()),wr=tn(Hn,!1);kn==null||kn(lt(ht,wr),{offset:Xn.current?vt(it):it,type:Gt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(Gt){var gn=st(Jn(hr)),nn;gn.isNaN()?nn=tn(Kt,Gt):nn=tn(gn,Gt),mt!==void 0?at(Kt,!1):nn.isNaN()||at(nn,!1)},mn=function(){cr.current=!0},xn=function(Gt){var gn=Gt.key,nn=Gt.shiftKey;cr.current=!0,Xn.current=nn,gn==="Enter"&&(Bn.current||(cr.current=!1),vn(!1),un==null||un(Gt)),te!==!1&&!Bn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gn)&&(en(gn==="Up"||gn==="ArrowUp"),Gt.preventDefault())},Wn=function(){cr.current=!1,Xn.current=!1};_e.useEffect(function(){if(ie&&In){var dn=function(nn){en(nn.deltaY<0),nn.preventDefault()},Gt=er.current;if(Gt)return Gt.addEventListener("wheel",dn,{passive:!1}),function(){return Gt.removeEventListener("wheel",dn)}}});var Yn=function(){wn&&vn(!1),rr(!1),cr.current=!1};return(0,pt.o)(function(){Kt.isInvalidate()||at(Kt,!1)},[Ie,Ct]),(0,pt.o)(function(){var dn=st(mt);pn(dn);var Gt=st(Jn(hr));(!dn.equals(Gt)||!cr.current||Ct)&&at(dn,cr.current)},[mt]),(0,pt.o)(function(){Ct&&Ze()},[hr]),_e.createElement("div",{ref:$n,className:bt()(Ee,qe,(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},"".concat(Ee,"-focused"),In),"".concat(Ee,"-disabled"),ct),"".concat(Ee,"-readonly"),jt),"".concat(Ee,"-not-a-number"),Kt.isNaN()),"".concat(Ee,"-out-of-range"),!Kt.isInvalidate()&&!Xt(Kt))),style:we,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Wn,onCompositionStart:qt,onCompositionEnd:At,onBeforeInput:mn},ne&&_e.createElement(Tt,{prefixCls:Ee,upNode:Ot,downNode:se,upDisabled:Gn,downDisabled:Te,onStep:en}),_e.createElement("div",{className:"".concat(mr,"-wrap")},_e.createElement("input",(0,ae.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ne,"aria-valuemax":Ve,"aria-valuenow":Kt.isInvalidate()?null:Kt.toString(),step:it},_n,{ref:(0,$t.sQ)(er,ve),className:mr,value:hr,onChange:xt,disabled:ct,readOnly:jt}))))}),Se=_e.forwardRef(function(xe,ve){var Ee=xe.disabled,qe=xe.style,we=xe.prefixCls,Ne=we===void 0?"rc-input-number":we,Ve=xe.value,et=xe.prefix,it=xe.suffix,We=xe.addonBefore,mt=xe.addonAfter,ct=xe.className,jt=xe.classNames,Ot=(0,me.Z)(xe,wt),se=_e.useRef(null),te=_e.useRef(null),z=_e.useRef(null),ie=function(ne){z.current&&(0,pe.nH)(z.current,ne)};return _e.useImperativeHandle(ve,function(){return dt(z.current,{focus:ie,nativeElement:se.current.nativeElement||te.current})}),_e.createElement(ft.BaseInput,{className:ct,triggerFocus:ie,prefixCls:Ne,value:Ve,disabled:Ee,style:qe,prefix:et,suffix:it,addonAfter:mt,addonBefore:We,classNames:jt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:se},_e.createElement(Je,(0,ae.Z)({prefixCls:Ne,disabled:Ee,ref:z,domRef:te,className:jt==null?void 0:jt.input},Ot)))}),rt=Se,Ue=rt},25930:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Cd:function(){return Lt}});var ae=fe(54476),gt=fe(33885),He=fe(75931),ze=fe(59301),me=fe(92310),Xe=fe.n(me),Le={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ke=function(){var Pe=(0,ze.useRef)([]),Ye=(0,ze.useRef)(null);return(0,ze.useEffect)(function(){var zt=Date.now(),kt=!1;Pe.current.forEach(function(Tt){if(Tt){kt=!0;var vt=Tt.style;vt.transitionDuration=".3s, .3s, .3s, .06s",Ye.current&&zt-Ye.current<100&&(vt.transitionDuration="0s, 0s")}}),kt&&(Ye.current=Date.now())}),Pe.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(Pe){var Ye=(0,gt.Z)((0,gt.Z)({},Le),Pe),zt=Ye.className,kt=Ye.percent,Tt=Ye.prefixCls,vt=Ye.strokeColor,pe=Ye.strokeLinecap,ue=Ye.strokeWidth,Ge=Ye.style,wt=Ye.trailColor,lt=Ye.trailWidth,Ce=Ye.transition,Je=(0,He.Z)(Ye,ke);delete Je.gapPosition;var Se=Array.isArray(kt)?kt:[kt],rt=Array.isArray(vt)?vt:[vt],Ue=Ke(),xe=ue/2,ve=100-ue/2,Ee="M ".concat(pe==="round"?xe:0,",").concat(xe,`
L `).concat(pe==="round"?ve:100,",").concat(xe),qe="0 0 100 ".concat(ue),we=0;return ze.createElement("svg",(0,ae.Z)({className:Xe()("".concat(Tt,"-line"),zt),viewBox:qe,preserveAspectRatio:"none",style:Ge},Je),ze.createElement("path",{className:"".concat(Tt,"-line-trail"),d:Ee,strokeLinecap:pe,stroke:wt,strokeWidth:lt||ue,fillOpacity:"0"}),Se.map(function(Ne,Ve){var et=1;switch(pe){case"round":et=1-ue/100;break;case"square":et=1-ue/2/100;break;default:et=1;break}var it={strokeDasharray:"".concat(Ne*et,"px, 100px"),strokeDashoffset:"-".concat(we,"px"),transition:Ce||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},We=rt[Ve]||rt[rt.length-1];return we+=Ne,ze.createElement("path",{key:Ve,className:"".concat(Tt,"-line-path"),d:Ee,strokeLinecap:pe,stroke:We,strokeWidth:ue,fillOpacity:"0",ref:function(ct){Ue[Ve]=ct},style:it})}))},Ae=de,ye=fe(76190),ut=fe(42978),je=fe(47273),Re=0,Oe=(0,je.Z)();function De(){var Qe;return Oe?(Qe=Re,Re+=1):Qe="TEST_OR_SSR",Qe}var ot=function(Qe){var Pe=ze.useState(),Ye=(0,ut.Z)(Pe,2),zt=Ye[0],kt=Ye[1];return ze.useEffect(function(){kt("rc_progress_".concat(De()))},[]),Qe||zt},st=function(Pe){var Ye=Pe.bg,zt=Pe.children;return ze.createElement("div",{style:{width:"100%",height:"100%",background:Ye}},zt)};function St(Qe,Pe){return Object.keys(Qe).map(function(Ye){var zt=parseFloat(Ye),kt="".concat(Math.floor(zt*Pe),"%");return"".concat(Qe[Ye]," ").concat(kt)})}var bt=ze.forwardRef(function(Qe,Pe){var Ye=Qe.prefixCls,zt=Qe.color,kt=Qe.gradientId,Tt=Qe.radius,vt=Qe.style,pe=Qe.ptg,ue=Qe.strokeLinecap,Ge=Qe.strokeWidth,wt=Qe.size,lt=Qe.gapDegree,Ce=zt&&(0,ye.Z)(zt)==="object",Je=Ce?"#FFF":void 0,Se=wt/2,rt=ze.createElement("circle",{className:"".concat(Ye,"-circle-path"),r:Tt,cx:Se,cy:Se,stroke:Je,strokeLinecap:ue,strokeWidth:Ge,opacity:pe===0?0:1,style:vt,ref:Pe});if(!Ce)return rt;var Ue="".concat(kt,"-conic"),xe=lt?"".concat(180+lt/2,"deg"):"0deg",ve=St(zt,(360-lt)/360),Ee=St(zt,1),qe="conic-gradient(from ".concat(xe,", ").concat(ve.join(", "),")"),we="linear-gradient(to ".concat(lt?"bottom":"top",", ").concat(Ee.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:Ue},rt),ze.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(Ue,")")},ze.createElement(st,{bg:we},ze.createElement(st,{bg:qe}))))}),ft=bt,pt=100,dt=function(Pe,Ye,zt,kt,Tt,vt,pe,ue,Ge,wt){var lt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ce=zt/100*360*((360-vt)/360),Je=vt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Se=(100-kt)/100*Ye;Ge==="round"&&kt!==100&&(Se+=wt/2,Se>=Ye&&(Se=Ye-.01));var rt=pt/2;return{stroke:typeof ue=="string"?ue:void 0,strokeDasharray:"".concat(Ye,"px ").concat(Pe),strokeDashoffset:Se+lt,transform:"rotate(".concat(Tt+Ce+Je,"deg)"),transformOrigin:"".concat(rt,"px ").concat(rt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},$t=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function _e(Qe){var Pe=Qe!=null?Qe:[];return Array.isArray(Pe)?Pe:[Pe]}var tt=function(Pe){var Ye=(0,gt.Z)((0,gt.Z)({},Le),Pe),zt=Ye.id,kt=Ye.prefixCls,Tt=Ye.steps,vt=Ye.strokeWidth,pe=Ye.trailWidth,ue=Ye.gapDegree,Ge=ue===void 0?0:ue,wt=Ye.gapPosition,lt=Ye.trailColor,Ce=Ye.strokeLinecap,Je=Ye.style,Se=Ye.className,rt=Ye.strokeColor,Ue=Ye.percent,xe=(0,He.Z)(Ye,$t),ve=pt/2,Ee=ot(zt),qe="".concat(Ee,"-gradient"),we=ve-vt/2,Ne=Math.PI*2*we,Ve=Ge>0?90+Ge/2:-90,et=Ne*((360-Ge)/360),it=(0,ye.Z)(Tt)==="object"?Tt:{count:Tt,gap:2},We=it.count,mt=it.gap,ct=_e(Ue),jt=_e(rt),Ot=jt.find(function(ge){return ge&&(0,ye.Z)(ge)==="object"}),se=Ot&&(0,ye.Z)(Ot)==="object",te=se?"butt":Ce,z=dt(Ne,et,0,100,Ve,Ge,wt,lt,te,vt),ie=Ke(),ce=function(){var ht=0;return ct.map(function(yt,Ct){var Ie=jt[Ct]||jt[jt.length-1],_t=dt(Ne,et,ht,yt,Ve,Ge,wt,Ie,te,vt);return ht+=yt,ze.createElement(ft,{key:Ct,color:Ie,ptg:yt,radius:we,prefixCls:kt,gradientId:qe,style:_t,strokeLinecap:te,strokeWidth:vt,gapDegree:Ge,ref:function(It){ie[Ct]=It},size:pt})}).reverse()},ne=function(){var ht=Math.round(We*(ct[0]/100)),yt=100/We,Ct=0;return new Array(We).fill(null).map(function(Ie,_t){var Ft=_t<=ht-1?jt[0]:lt,It=Ft&&(0,ye.Z)(Ft)==="object"?"url(#".concat(qe,")"):void 0,un=dt(Ne,et,Ct,yt,Ve,Ge,wt,Ft,"butt",vt,mt);return Ct+=(et-un.strokeDashoffset+mt)*100/et,ze.createElement("circle",{key:_t,className:"".concat(kt,"-circle-path"),r:we,cx:ve,cy:ve,stroke:It,strokeWidth:vt,opacity:1,style:un,ref:function(cn){ie[_t]=cn}})})};return ze.createElement("svg",(0,ae.Z)({className:Xe()("".concat(kt,"-circle"),Se),viewBox:"0 0 ".concat(pt," ").concat(pt),style:Je,id:zt,role:"presentation"},xe),!We&&ze.createElement("circle",{className:"".concat(kt,"-circle-trail"),r:we,cx:ve,cy:ve,stroke:lt,strokeLinecap:te,strokeWidth:pe||vt,style:z}),We?ne():ce())},Lt=tt,Fe={Line:Ae,Circle:Lt}},6551:function(Nt,Ht,fe){"use strict";fe.d(Ht,{ZP:function(){return Le}});var ae=fe(42978),gt=fe(59301),He=fe(47273),ze=0,me=(0,He.Z)();function Xe(){var Ke;return me?(Ke=ze,ze+=1):Ke="TEST_OR_SSR",Ke}function Le(Ke){var ke=gt.useState(),de=(0,ae.Z)(ke,2),Ae=de[0],ye=de[1];return gt.useEffect(function(){ye("rc_select_".concat(Xe()))},[]),Ke||Ae}},37463:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Ac:function(){return Ie},Xo:function(){return Ft},Wx:function(){return un},ZP:function(){return Gn},lk:function(){return St}});var ae=fe(54476),gt=fe(94480),He=fe(20068),ze=fe(33885),me=fe(42978),Xe=fe(75931),Le=fe(76190),Ke=fe(18929),ke=fe(48736),de=fe(59301),Ae=fe(92310),ye=fe.n(Ae),ut=fe(34280),je=fe(49658),Re=fe(8654),Oe=function(Be){var Pt=Be.className,Et=Be.customizeIcon,Ze=Be.customizeIconProps,Dt=Be.children,Xt=Be.onMouseDown,tn=Be.onClick,hn=typeof Et=="function"?Et(Ze):Et;return de.createElement("span",{className:Pt,onMouseDown:function(qt){qt.preventDefault(),Xt==null||Xt(qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:tn,"aria-hidden":!0},hn!==void 0?hn:de.createElement("span",{className:ye()(Pt.split(/\s+/).map(function(Zt){return"".concat(Zt,"-icon")}))},Dt))},De=Oe,ot=function(Be,Pt,Et,Ze,Dt){var Xt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,hn=arguments.length>7?arguments[7]:void 0,Zt=de.useMemo(function(){if((0,Le.Z)(Ze)==="object")return Ze.clearIcon;if(Dt)return Dt},[Ze,Dt]),qt=de.useMemo(function(){return!!(!Xt&&Ze&&(Et.length||tn)&&!(hn==="combobox"&&tn===""))},[Ze,Xt,Et.length,tn,hn]);return{allowClear:qt,clearIcon:de.createElement(De,{className:"".concat(Be,"-clear"),onMouseDown:Pt,customizeIcon:Zt},"\xD7")}},st=de.createContext(null);function St(){return de.useContext(st)}function bt(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Be=de.useState(!1),Pt=(0,me.Z)(Be,2),Et=Pt[0],Ze=Pt[1],Dt=de.useRef(null),Xt=function(){window.clearTimeout(Dt.current)};de.useEffect(function(){return Xt},[]);var tn=function(Zt,qt){Xt(),Dt.current=window.setTimeout(function(){Ze(Zt),qt&&qt()},Te)};return[Et,tn,Xt]}function ft(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Be=de.useRef(null),Pt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Pt.current)}},[]);function Et(Ze){(Ze||Be.current===null)&&(Be.current=Ze),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Be.current=null},Te)}return[function(){return Be.current},Et]}function pt(Te,Be,Pt,Et){var Ze=de.useRef(null);Ze.current={open:Be,triggerOpen:Pt,customizedTrigger:Et},de.useEffect(function(){function Dt(Xt){var tn;if(!((tn=Ze.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var hn=Xt.target;hn.shadowRoot&&Xt.composed&&(hn=Xt.composedPath()[0]||hn),Ze.current.open&&Te().filter(function(Zt){return Zt}).every(function(Zt){return!Zt.contains(hn)&&Zt!==hn})&&Ze.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Dt),function(){return window.removeEventListener("mousedown",Dt)}},[])}var dt=fe(10228);function $t(Te){return Te&&![dt.Z.ESC,dt.Z.SHIFT,dt.Z.BACKSPACE,dt.Z.TAB,dt.Z.WIN_KEY,dt.Z.ALT,dt.Z.META,dt.Z.WIN_KEY_RIGHT,dt.Z.CTRL,dt.Z.SEMICOLON,dt.Z.EQUALS,dt.Z.CAPS_LOCK,dt.Z.CONTEXT_MENU,dt.Z.F1,dt.Z.F2,dt.Z.F3,dt.Z.F4,dt.Z.F5,dt.Z.F6,dt.Z.F7,dt.Z.F8,dt.Z.F9,dt.Z.F10,dt.Z.F11,dt.Z.F12].includes(Te)}var _e=fe(26112),tt=fe(11780);function Lt(Te,Be,Pt){var Et=(0,ze.Z)((0,ze.Z)({},Te),Pt?Be:{});return Object.keys(Be).forEach(function(Ze){var Dt=Be[Ze];typeof Dt=="function"&&(Et[Ze]=function(){for(var Xt,tn=arguments.length,hn=new Array(tn),Zt=0;Zt<tn;Zt++)hn[Zt]=arguments[Zt];return Dt.apply(void 0,hn),(Xt=Te[Ze])===null||Xt===void 0?void 0:Xt.call.apply(Xt,[Te].concat(hn))})}),Et}var Fe=Lt,Qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Pe=function(Be,Pt){var Et=Be.prefixCls,Ze=Be.id,Dt=Be.inputElement,Xt=Be.autoFocus,tn=Be.autoComplete,hn=Be.editable,Zt=Be.activeDescendantId,qt=Be.value,At=Be.open,xt=Be.attrs,en=(0,Xe.Z)(Be,Qe),vn=Dt||de.createElement("input",null),mn=vn,xn=mn.ref,Wn=mn.props;return(0,ke.Kp)(!("maxLength"in vn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),vn=de.cloneElement(vn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},Fe(en,Wn,!0)),{},{id:Ze,ref:(0,Re.sQ)(Pt,xn),autoComplete:tn||"off",autoFocus:Xt,className:ye()("".concat(Et,"-selection-search-input"),Wn==null?void 0:Wn.className),role:"combobox","aria-expanded":At||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ze,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ze,"_list"),"aria-activedescendant":At?Zt:void 0},xt),{},{value:hn?qt:"",readOnly:!hn,unselectable:hn?null:"on",style:(0,ze.Z)((0,ze.Z)({},Wn.style),{},{opacity:hn?null:0})})),vn},Ye=de.forwardRef(Pe),zt=Ye;function kt(Te){return Array.isArray(Te)?Te:Te!==void 0?[Te]:[]}var Tt=typeof window!="undefined"&&window.document&&window.document.documentElement,vt=Tt;function pe(Te){return Te!=null}function ue(Te){return!Te&&Te!==0}function Ge(Te){return["string","number"].includes((0,Le.Z)(Te))}function wt(Te){var Be=void 0;return Te&&(Ge(Te.title)?Be=Te.title.toString():Ge(Te.label)&&(Be=Te.label.toString())),Be}function lt(Te,Be){vt?de.useLayoutEffect(Te,Be):de.useEffect(Te,Be)}function Ce(Te){var Be;return(Be=Te.key)!==null&&Be!==void 0?Be:Te.value}var Je=function(Be){Be.preventDefault(),Be.stopPropagation()},Se=function(Be){var Pt=Be.id,Et=Be.prefixCls,Ze=Be.values,Dt=Be.open,Xt=Be.searchValue,tn=Be.autoClearSearchValue,hn=Be.inputRef,Zt=Be.placeholder,qt=Be.disabled,At=Be.mode,xt=Be.showSearch,en=Be.autoFocus,vn=Be.autoComplete,mn=Be.activeDescendantId,xn=Be.tabIndex,Wn=Be.removeIcon,Yn=Be.maxTagCount,dn=Be.maxTagTextLength,Gt=Be.maxTagPlaceholder,gn=Gt===void 0?function(yn){return"+ ".concat(yn.length," ...")}:Gt,nn=Be.tagRender,Hn=Be.onToggleOpen,wr=Be.onRemove,Qn=Be.onInputChange,Lr=Be.onInputPaste,Mr=Be.onInputKeyDown,Cr=Be.onInputMouseDown,ir=Be.onInputCompositionStart,Nr=Be.onInputCompositionEnd,gr=Be.onInputBlur,or=de.useRef(null),Er=(0,de.useState)(0),Ar=(0,me.Z)(Er,2),pr=Ar[0],qn=Ar[1],jn=(0,de.useState)(!1),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1],Dr="".concat(Et,"-selection"),Hr=Dt||At==="multiple"&&tn===!1||At==="tags"?Xt:"",Fr=At==="tags"||At==="multiple"&&tn===!1||xt&&(Dt||Vr);lt(function(){qn(or.current.scrollWidth)},[Hr]);var Zr=function(on,Dn,ar,Ut,Rt){return de.createElement("span",{title:wt(on),className:ye()("".concat(Dr,"-item"),(0,He.Z)({},"".concat(Dr,"-item-disabled"),ar))},de.createElement("span",{className:"".concat(Dr,"-item-content")},Dn),Ut&&de.createElement(De,{className:"".concat(Dr,"-item-remove"),onMouseDown:Je,onClick:Rt,customizeIcon:Wn},"\xD7"))},ii=function(on,Dn,ar,Ut,Rt,rn){var ln=function(sr){Je(sr),Hn(!Dt)};return de.createElement("span",{onMouseDown:ln},nn({label:Dn,value:on,disabled:ar,closable:Ut,onClose:Rt,isMaxTag:!!rn}))},Or=function(on){var Dn=on.disabled,ar=on.label,Ut=on.value,Rt=!qt&&!Dn,rn=ar;if(typeof dn=="number"&&(typeof ar=="string"||typeof ar=="number")){var ln=String(rn);ln.length>dn&&(rn="".concat(ln.slice(0,dn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Ut,rn,Dn,Rt,Mn):Zr(on,rn,Dn,Rt,Mn)},Nn=function(on){if(!Ze.length)return null;var Dn=typeof gn=="function"?gn(on):gn;return typeof nn=="function"?ii(void 0,Dn,!1,!1,void 0,!0):Zr({title:Dn},Dn,!1)},Wt=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(zt,{ref:hn,open:Dt,prefixCls:Et,id:Pt,inputElement:null,disabled:qt,autoFocus:en,autoComplete:vn,editable:Fr,activeDescendantId:mn,value:Hr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Nr,onBlur:gr,tabIndex:xn,attrs:(0,_e.Z)(Be,!0)}),de.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Hr,"\xA0")),Yt=de.createElement(tt.Z,{prefixCls:"".concat(Dr,"-overflow"),data:Ze,renderItem:Or,renderRest:Nn,suffix:Wt,itemKey:Ce,maxCount:Yn});return de.createElement("span",{className:"".concat(Dr,"-wrap")},Yt,!Ze.length&&!Hr&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},Zt))},rt=Se,Ue=function(Be){var Pt=Be.inputElement,Et=Be.prefixCls,Ze=Be.id,Dt=Be.inputRef,Xt=Be.disabled,tn=Be.autoFocus,hn=Be.autoComplete,Zt=Be.activeDescendantId,qt=Be.mode,At=Be.open,xt=Be.values,en=Be.placeholder,vn=Be.tabIndex,mn=Be.showSearch,xn=Be.searchValue,Wn=Be.activeValue,Yn=Be.maxLength,dn=Be.onInputKeyDown,Gt=Be.onInputMouseDown,gn=Be.onInputChange,nn=Be.onInputPaste,Hn=Be.onInputCompositionStart,wr=Be.onInputCompositionEnd,Qn=Be.onInputBlur,Lr=Be.title,Mr=de.useState(!1),Cr=(0,me.Z)(Mr,2),ir=Cr[0],Nr=Cr[1],gr=qt==="combobox",or=gr||mn,Er=xt[0],Ar=xn||"";gr&&Wn&&!ir&&(Ar=Wn),de.useEffect(function(){gr&&Nr(!1)},[gr,Wn]);var pr=qt!=="combobox"&&!At&&!mn?!1:!!Ar,qn=Lr===void 0?wt(Er):Lr,jn=de.useMemo(function(){return Er?null:de.createElement("span",{className:"".concat(Et,"-selection-placeholder"),style:pr?{visibility:"hidden"}:void 0},en)},[Er,pr,en,Et]);return de.createElement("span",{className:"".concat(Et,"-selection-wrap")},de.createElement("span",{className:"".concat(Et,"-selection-search")},de.createElement(zt,{ref:Dt,prefixCls:Et,id:Ze,open:At,inputElement:Pt,disabled:Xt,autoFocus:tn,autoComplete:hn,editable:or,activeDescendantId:Zt,value:Ar,onKeyDown:dn,onMouseDown:Gt,onChange:function(Vr){Nr(!0),gn(Vr)},onPaste:nn,onCompositionStart:Hn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,_e.Z)(Be,!0),maxLength:gr?Yn:void 0})),!gr&&Er?de.createElement("span",{className:"".concat(Et,"-selection-item"),title:qn,style:pr?{visibility:"hidden"}:void 0},Er.label):null,jn)},xe=Ue,ve=function(Be,Pt){var Et=(0,de.useRef)(null),Ze=(0,de.useRef)(!1),Dt=Be.prefixCls,Xt=Be.open,tn=Be.mode,hn=Be.showSearch,Zt=Be.tokenWithEnter,qt=Be.disabled,At=Be.prefix,xt=Be.autoClearSearchValue,en=Be.onSearch,vn=Be.onSearchSubmit,mn=Be.onToggleOpen,xn=Be.onInputKeyDown,Wn=Be.onInputBlur,Yn=Be.domRef;de.useImperativeHandle(Pt,function(){return{focus:function(qn){Et.current.focus(qn)},blur:function(){Et.current.blur()}}});var dn=ft(0),Gt=(0,me.Z)(dn,2),gn=Gt[0],nn=Gt[1],Hn=function(qn){var jn=qn.which,Br=Et.current instanceof HTMLTextAreaElement;!Br&&Xt&&(jn===dt.Z.UP||jn===dt.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===dt.Z.ENTER&&tn==="tags"&&!Ze.current&&!Xt&&(vn==null||vn(qn.target.value)),!(Br&&!Xt&&~[dt.Z.UP,dt.Z.DOWN,dt.Z.LEFT,dt.Z.RIGHT].indexOf(jn))&&$t(jn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,de.useRef)(null),Lr=function(qn){en(qn,!0,Ze.current)!==!1&&mn(!0)},Mr=function(){Ze.current=!0},Cr=function(qn){Ze.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var jn=qn.target.value;if(Zt&&Qn.current&&/[\r\n]/.test(Qn.current)){var Br=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");jn=jn.replace(Br,Qn.current)}Qn.current=null,Lr(jn)},Nr=function(qn){var jn=qn.clipboardData,Br=jn==null?void 0:jn.getData("text");Qn.current=Br||""},gr=function(qn){var jn=qn.target;if(jn!==Et.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){Et.current.focus()}):Et.current.focus()}},or=function(qn){var jn=gn();qn.target!==Et.current&&!jn&&!(tn==="combobox"&&qt)&&qn.preventDefault(),(tn!=="combobox"&&(!hn||!jn)||!Xt)&&(Xt&&xt!==!1&&en("",!0,!1),mn())},Er={inputRef:Et,onInputKeyDown:Hn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Nr,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:Wn},Ar=tn==="multiple"||tn==="tags"?de.createElement(rt,(0,ae.Z)({},Be,Er)):de.createElement(xe,(0,ae.Z)({},Be,Er));return de.createElement("div",{ref:Yn,className:"".concat(Dt,"-selector"),onClick:gr,onMouseDown:or},At&&de.createElement("div",{className:"".concat(Dt,"-prefix")},At),Ar)},Ee=de.forwardRef(ve),qe=Ee,we=fe(65030),Ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ve=function(Be){var Pt=Be===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"}}},et=function(Be,Pt){var Et=Be.prefixCls,Ze=Be.disabled,Dt=Be.visible,Xt=Be.children,tn=Be.popupElement,hn=Be.animation,Zt=Be.transitionName,qt=Be.dropdownStyle,At=Be.dropdownClassName,xt=Be.direction,en=xt===void 0?"ltr":xt,vn=Be.placement,mn=Be.builtinPlacements,xn=Be.dropdownMatchSelectWidth,Wn=Be.dropdownRender,Yn=Be.dropdownAlign,dn=Be.getPopupContainer,Gt=Be.empty,gn=Be.getTriggerDOMNode,nn=Be.onPopupVisibleChange,Hn=Be.onPopupMouseEnter,wr=(0,Xe.Z)(Be,Ne),Qn="".concat(Et,"-dropdown"),Lr=tn;Wn&&(Lr=Wn(tn));var Mr=de.useMemo(function(){return mn||Ve(xn)},[mn,xn]),Cr=hn?"".concat(Qn,"-").concat(hn):Zt,ir=typeof xn=="number",Nr=de.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=qt;ir&&(gr=(0,ze.Z)((0,ze.Z)({},gr),{},{width:xn}));var or=de.useRef(null);return de.useImperativeHandle(Pt,function(){return{getPopupElement:function(){var Ar;return(Ar=or.current)===null||Ar===void 0?void 0:Ar.popupElement}}}),de.createElement(we.Z,(0,ae.Z)({},wr,{showAction:nn?["click"]:[],hideAction:nn?["click"]:[],popupPlacement:vn||(en==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Mr,prefixCls:Qn,popupTransitionName:Cr,popup:de.createElement("div",{onMouseEnter:Hn},Lr),ref:or,stretch:Nr,popupAlign:Yn,popupVisible:Dt,getPopupContainer:dn,popupClassName:ye()(At,(0,He.Z)({},"".concat(Qn,"-empty"),Gt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Xt)},it=de.forwardRef(et),We=it,mt=fe(66712);function ct(Te,Be){var Pt=Te.key,Et;return"value"in Te&&(Et=Te.value),Pt!=null?Pt:Et!==void 0?Et:"rc-index-key-".concat(Be)}function jt(Te){return typeof Te!="undefined"&&!Number.isNaN(Te)}function Ot(Te,Be){var Pt=Te||{},Et=Pt.label,Ze=Pt.value,Dt=Pt.options,Xt=Pt.groupLabel,tn=Et||(Be?"children":"label");return{label:tn,value:Ze||"value",options:Dt||"options",groupLabel:Xt||tn}}function se(Te){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Be.fieldNames,Et=Be.childrenAsData,Ze=[],Dt=Ot(Pt,!1),Xt=Dt.label,tn=Dt.value,hn=Dt.options,Zt=Dt.groupLabel;function qt(At,xt){Array.isArray(At)&&At.forEach(function(en){if(xt||!(hn in en)){var vn=en[tn];Ze.push({key:ct(en,Ze.length),groupOption:xt,data:en,label:en[Xt],value:vn})}else{var mn=en[Zt];mn===void 0&&Et&&(mn=en.label),Ze.push({key:ct(en,Ze.length),group:!0,data:en,label:mn}),qt(en[hn],!0)}})}return qt(Te,!1),Ze}function te(Te){var Be=(0,ze.Z)({},Te);return"props"in Be||Object.defineProperty(Be,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Be}}),Be}var z=function(Be,Pt,Et){if(!Pt||!Pt.length)return null;var Ze=!1,Dt=function tn(hn,Zt){var qt=(0,mt.Z)(Zt),At=qt[0],xt=qt.slice(1);if(!At)return[hn];var en=hn.split(At);return Ze=Ze||en.length>1,en.reduce(function(vn,mn){return[].concat((0,gt.Z)(vn),(0,gt.Z)(tn(mn,xt)))},[]).filter(Boolean)},Xt=Dt(Be,Pt);return Ze?typeof Et!="undefined"?Xt.slice(0,Et):Xt:null},ie=de.createContext(null),ce=ie;function ne(Te){var Be=Te.visible,Pt=Te.values;if(!Be)return null;var Et=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Pt.slice(0,Et).map(function(Ze){var Dt=Ze.label,Xt=Ze.value;return["number","string"].includes((0,Le.Z)(Dt))?Dt:Xt}).join(", ")),Pt.length>Et?", ...":null)}var ge=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ht=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],yt=function(Be){return Be==="tags"||Be==="multiple"},Ct=de.forwardRef(function(Te,Be){var Pt,Et=Te.id,Ze=Te.prefixCls,Dt=Te.className,Xt=Te.showSearch,tn=Te.tagRender,hn=Te.direction,Zt=Te.omitDomProps,qt=Te.displayValues,At=Te.onDisplayValuesChange,xt=Te.emptyOptions,en=Te.notFoundContent,vn=en===void 0?"Not Found":en,mn=Te.onClear,xn=Te.mode,Wn=Te.disabled,Yn=Te.loading,dn=Te.getInputElement,Gt=Te.getRawInputElement,gn=Te.open,nn=Te.defaultOpen,Hn=Te.onDropdownVisibleChange,wr=Te.activeValue,Qn=Te.onActiveValueChange,Lr=Te.activeDescendantId,Mr=Te.searchValue,Cr=Te.autoClearSearchValue,ir=Te.onSearch,Nr=Te.onSearchSplit,gr=Te.tokenSeparators,or=Te.allowClear,Er=Te.prefix,Ar=Te.suffixIcon,pr=Te.clearIcon,qn=Te.OptionList,jn=Te.animation,Br=Te.transitionName,Vr=Te.dropdownStyle,Jr=Te.dropdownClassName,Dr=Te.dropdownMatchSelectWidth,Hr=Te.dropdownRender,Fr=Te.dropdownAlign,Zr=Te.placement,ii=Te.builtinPlacements,Or=Te.getPopupContainer,Nn=Te.showAction,Wt=Nn===void 0?[]:Nn,Yt=Te.onFocus,yn=Te.onBlur,on=Te.onKeyUp,Dn=Te.onKeyDown,ar=Te.onMouseDown,Ut=(0,Xe.Z)(Te,ge),Rt=yt(xn),rn=(Xt!==void 0?Xt:Rt)||xn==="combobox",ln=(0,ze.Z)({},Ut);ht.forEach(function(lr){delete ln[lr]}),Zt==null||Zt.forEach(function(lr){delete ln[lr]});var Mn=de.useState(!1),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1];de.useEffect(function(){yr((0,je.Z)())},[]);var br=de.useRef(null),Sr=de.useRef(null),zr=de.useRef(null),Tr=de.useRef(null),Wr=de.useRef(null),ei=de.useRef(!1),Li=bt(),Oi=(0,me.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Be,function(){var lr,zn;return{focus:(lr=Tr.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Tr.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=Wr.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:br.current||Sr.current}});var fr=de.useMemo(function(){var lr;if(xn!=="combobox")return Mr;var zn=(lr=qt[0])===null||lr===void 0?void 0:lr.value;return typeof zn=="string"||typeof zn=="number"?String(zn):""},[Mr,xn,qt]),to=xn==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Gt=="function"&&Gt(),Fi=(0,Re.x1)(Sr,ti==null||(Pt=ti.props)===null||Pt===void 0?void 0:Pt.ref),ao=de.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ni=Ji[1];(0,ut.Z)(function(){Ni(!0)},[]);var _r=(0,Ke.Z)(!1,{defaultValue:nn,value:gn}),Wi=(0,me.Z)(_r,2),so=Wi[0],Zi=Wi[1],Qr=mi?so:!1,xo=!vn&&xt;(Wn||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Ln=de.useCallback(function(lr){var zn=lr!==void 0?lr:!Qr;Wn||(Zi(zn),Qr!==zn&&(Hn==null||Hn(zn)))},[Wn,Qr,Zi,Hn]),On=de.useMemo(function(){return(gr||[]).some(function(lr){return[`
`,`\r
`].includes(lr)})},[gr]),Pn=de.useContext(ce)||{},Fn=Pn.maxCount,vr=Pn.rawValues,Ir=function(zn,ci,fi){if(!(Rt&&jt(Fn)&&(vr==null?void 0:vr.size)>=Fn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=z(zn,gr,jt(Fn)?Fn-vr.size:void 0),_i=fi?null:Vi;return xn!=="combobox"&&_i&&(ni="",Nr==null||Nr(_i),Ln(!1),Yr=!1),ir&&fr!==ni&&ir(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(zn){!zn||!zn.trim()||ir(zn,{source:"submit"})};de.useEffect(function(){!Qr&&!Rt&&xn!=="combobox"&&Ir("",!1,!1)},[Qr]),de.useEffect(function(){so&&Wn&&Zi(!1),Wn&&!ei.current&&vi(!1)},[Wn]);var gi=ft(),ui=(0,me.Z)(gi,2),Kr=ui[0],Hi=ui[1],Qi=de.useRef(!1),Mi=function(zn){var ci=Kr(),fi=zn.key,Yr=fi==="Enter";if(Yr&&(xn!=="combobox"&&zn.preventDefault(),Qr||Ln(!0)),Hi(!!fr),fi==="Backspace"&&!ci&&Rt&&!fr&&qt.length){for(var ni=(0,gt.Z)(qt),Vi=null,_i=ni.length-1;_i>=0;_i-=1){var ro=ni[_i];if(!ro.disabled){ni.splice(_i,1),Vi=ro;break}}Vi&&At(ni,{type:"remove",values:[Vi]})}for(var Ai=arguments.length,Ti=new Array(Ai>1?Ai-1:0),Ui=1;Ui<Ai;Ui++)Ti[Ui-1]=arguments[Ui];if(Qr&&(!Yr||!Qi.current)){var co;Yr&&(Qi.current=!0),(co=Wr.current)===null||co===void 0||co.onKeyDown.apply(co,[zn].concat(Ti))}Dn==null||Dn.apply(void 0,[zn].concat(Ti))},qi=function(zn){for(var ci=arguments.length,fi=new Array(ci>1?ci-1:0),Yr=1;Yr<ci;Yr++)fi[Yr-1]=arguments[Yr];if(Qr){var ni;(ni=Wr.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[zn].concat(fi))}zn.key==="Enter"&&(Qi.current=!1),on==null||on.apply(void 0,[zn].concat(fi))},no=function(zn){var ci=qt.filter(function(fi){return fi!==zn});At(ci,{type:"remove",values:[zn]})},ji=function(){Qi.current=!1},To=de.useRef(!1),ja=function(){vi(!0),Wn||(Yt&&!To.current&&Yt.apply(void 0,arguments),Wt.includes("focus")&&Ln(!0)),To.current=!0},ya=function(){ei.current=!0,vi(!1,function(){To.current=!1,ei.current=!1,Ln(!1)}),!Wn&&(fr&&(xn==="tags"?ir(fr,{source:"submit"}):xn==="multiple"&&ir("",{source:"blur"})),yn&&yn.apply(void 0,arguments))},$i=[];de.useEffect(function(){return function(){$i.forEach(function(lr){return clearTimeout(lr)}),$i.splice(0,$i.length)}},[]);var uo=function(zn){var ci,fi=zn.target,Yr=(ci=zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Yr&&Yr.contains(fi)){var ni=setTimeout(function(){var Ai=$i.indexOf(ni);if(Ai!==-1&&$i.splice(Ai,1),Xi(),!Vn&&!Yr.contains(document.activeElement)){var Ti;(Ti=Tr.current)===null||Ti===void 0||Ti.focus()}});$i.push(ni)}for(var Vi=arguments.length,_i=new Array(Vi>1?Vi-1:0),ro=1;ro<Vi;ro++)_i[ro-1]=arguments[ro];ar==null||ar.apply(void 0,[zn].concat(_i))},zi=de.useState({}),ba=(0,me.Z)(zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(zn){Ln(zn)}),pt(function(){var lr;return[br.current,(lr=zr.current)===null||lr===void 0?void 0:lr.getPopupElement()]},lo,Ln,!!ti);var Ua=de.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},Te),{},{notFoundContent:vn,open:Qr,triggerOpen:lo,id:Et,showSearch:rn,multiple:Rt,toggleOpen:Ln})},[Te,vn,lo,Qr,Et,rn,Rt,Ln]),Ko=!!Ar||Yn,Yo;Ko&&(Yo=de.createElement(De,{className:ye()("".concat(Ze,"-arrow"),(0,He.Z)({},"".concat(Ze,"-arrow-loading"),Yn)),customizeIcon:Ar,customizeIconProps:{loading:Yn,searchValue:fr,open:Qr,focused:xi,showSearch:rn}}));var wo=function(){var zn;mn==null||mn(),(zn=Tr.current)===null||zn===void 0||zn.focus(),At([],{type:"clear",values:qt}),Ir("",!1,!1)},Xo=ot(Ze,wo,qt,or,pr,Wn,fr,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=de.createElement(qn,{ref:Wr}),Sa=ye()(Ze,Dt,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Ze,"-focused"),xi),"".concat(Ze,"-multiple"),Rt),"".concat(Ze,"-single"),!Rt),"".concat(Ze,"-allow-clear"),or),"".concat(Ze,"-show-arrow"),Ko),"".concat(Ze,"-disabled"),Wn),"".concat(Ze,"-loading"),Yn),"".concat(Ze,"-open"),Qr),"".concat(Ze,"-customize-input"),to),"".concat(Ze,"-show-search"),rn)),Bo=de.createElement(We,{ref:zr,disabled:Wn,prefixCls:Ze,visible:lo,popupElement:Po,animation:jn,transitionName:Br,dropdownStyle:Vr,dropdownClassName:Jr,direction:hn,dropdownMatchSelectWidth:Dr,dropdownRender:Hr,dropdownAlign:Fr,placement:Zr,builtinPlacements:ii,getPopupContainer:Or,empty:xt,getTriggerDOMNode:function(zn){return Sr.current||zn},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?de.cloneElement(ti,{ref:Fi}):de.createElement(qe,(0,ae.Z)({},Te,{domRef:Sr,prefixCls:Ze,inputElement:to,ref:Tr,id:Et,prefix:Er,showSearch:rn,autoClearSearchValue:Cr,mode:xn,activeDescendantId:Lr,tagRender:tn,values:qt,open:Qr,onToggleOpen:Ln,activeValue:wr,searchValue:fr,onSearch:Ir,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:On,onInputBlur:ji}))),wi;return ti?wi=Bo:wi=de.createElement("div",(0,ae.Z)({className:Sa},ln,{ref:br,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:ja,onBlur:ya}),de.createElement(ne,{visible:xi&&!Qr,values:qt}),Bo,Yo,Ca&&Jo),de.createElement(st.Provider,{value:Ua},wi)}),Ie=Ct,_t=function(){return null};_t.isSelectOptGroup=!0;var Ft=_t,It=function(){return null};It.isSelectOption=!0;var un=It,kn=fe(80547),cn=fe(2738),wn=fe(48911);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var _n=["disabled","title","children","style","className"];function mr(Te){return typeof Te=="string"||typeof Te=="number"}var er=function(Be,Pt){var Et=St(),Ze=Et.prefixCls,Dt=Et.id,Xt=Et.open,tn=Et.multiple,hn=Et.mode,Zt=Et.searchValue,qt=Et.toggleOpen,At=Et.notFoundContent,xt=Et.onPopupScroll,en=de.useContext(ce),vn=en.maxCount,mn=en.flattenOptions,xn=en.onActiveValue,Wn=en.defaultActiveFirstOption,Yn=en.onSelect,dn=en.menuItemSelectedIcon,Gt=en.rawValues,gn=en.fieldNames,nn=en.virtual,Hn=en.direction,wr=en.listHeight,Qn=en.listItemHeight,Lr=en.optionRender,Mr="".concat(Ze,"-item"),Cr=(0,kn.Z)(function(){return mn},[Xt,mn],function(Nn,Wt){return Wt[0]&&Nn[1]!==Wt[1]}),ir=de.useRef(null),Nr=de.useMemo(function(){return tn&&jt(vn)&&(Gt==null?void 0:Gt.size)>=vn},[tn,vn,Gt==null?void 0:Gt.size]),gr=function(Wt){Wt.preventDefault()},or=function(Wt){var Yt;(Yt=ir.current)===null||Yt===void 0||Yt.scrollTo(typeof Wt=="number"?{index:Wt}:Wt)},Er=de.useCallback(function(Nn){return hn==="combobox"?!1:Gt.has(Nn)},[hn,(0,gt.Z)(Gt).toString(),Gt.size]),Ar=function(Wt){for(var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=Cr.length,on=0;on<yn;on+=1){var Dn=(Wt+on*Yt+yn)%yn,ar=Cr[Dn]||{},Ut=ar.group,Rt=ar.data;if(!Ut&&!(Rt!=null&&Rt.disabled)&&(Er(Rt.value)||!Nr))return Dn}return-1},pr=de.useState(function(){return Ar(0)}),qn=(0,me.Z)(pr,2),jn=qn[0],Br=qn[1],Vr=function(Wt){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Br(Wt);var yn={source:Yt?"keyboard":"mouse"},on=Cr[Wt];if(!on){xn(null,-1,yn);return}xn(on.value,Wt,yn)};(0,de.useEffect)(function(){Vr(Wn!==!1?Ar(0):-1)},[Cr.length,Zt]);var Jr=de.useCallback(function(Nn){return hn==="combobox"?String(Nn).toLowerCase()===Zt.toLowerCase():Gt.has(Nn)},[hn,Zt,(0,gt.Z)(Gt).toString(),Gt.size]);(0,de.useEffect)(function(){var Nn=setTimeout(function(){if(!tn&&Xt&&Gt.size===1){var Yt=Array.from(Gt)[0],yn=Cr.findIndex(function(on){var Dn=on.data;return Zt?String(Dn.value).startsWith(Zt):Dn.value===Yt});yn!==-1&&(Vr(yn),or(yn))}});if(Xt){var Wt;(Wt=ir.current)===null||Wt===void 0||Wt.scrollTo(void 0)}return function(){return clearTimeout(Nn)}},[Xt,Zt]);var Dr=function(Wt){Wt!==void 0&&Yn(Wt,{selected:!Gt.has(Wt)}),tn||qt(!1)};if(de.useImperativeHandle(Pt,function(){return{onKeyDown:function(Wt){var Yt=Wt.which,yn=Wt.ctrlKey;switch(Yt){case dt.Z.N:case dt.Z.P:case dt.Z.UP:case dt.Z.DOWN:{var on=0;if(Yt===dt.Z.UP?on=-1:Yt===dt.Z.DOWN?on=1:$n()&&yn&&(Yt===dt.Z.N?on=1:Yt===dt.Z.P&&(on=-1)),on!==0){var Dn=Ar(jn+on,on);or(Dn),Vr(Dn,!0)}break}case dt.Z.TAB:case dt.Z.ENTER:{var ar,Ut=Cr[jn];Ut&&!(Ut!=null&&(ar=Ut.data)!==null&&ar!==void 0&&ar.disabled)&&!Nr?Dr(Ut.value):Dr(void 0),Xt&&Wt.preventDefault();break}case dt.Z.ESC:qt(!1),Xt&&Wt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Wt){or(Wt)}}}),Cr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Dt,"_list"),className:"".concat(Mr,"-empty"),onMouseDown:gr},At);var Hr=Object.keys(gn).map(function(Nn){return gn[Nn]}),Fr=function(Wt){return Wt.label};function Zr(Nn,Wt){var Yt=Nn.group;return{role:Yt?"presentation":"option",id:"".concat(Dt,"_list_").concat(Wt)}}var ii=function(Wt){var Yt=Cr[Wt];if(!Yt)return null;var yn=Yt.data||{},on=yn.value,Dn=Yt.group,ar=(0,_e.Z)(yn,!0),Ut=Fr(Yt);return Yt?de.createElement("div",(0,ae.Z)({"aria-label":typeof Ut=="string"&&!Dn?Ut:null},ar,{key:Wt},Zr(Yt,Wt),{"aria-selected":Jr(on)}),on):null},Or={role:"listbox",id:"".concat(Dt,"_list")};return de.createElement(de.Fragment,null,nn&&de.createElement("div",(0,ae.Z)({},Or,{style:{height:0,width:0,overflow:"hidden"}}),ii(jn-1),ii(jn),ii(jn+1)),de.createElement(wn.Z,{itemKey:"key",ref:ir,data:Cr,height:wr,itemHeight:Qn,fullHeight:!1,onMouseDown:gr,onScroll:xt,virtual:nn,direction:Hn,innerProps:nn?null:Or},function(Nn,Wt){var Yt=Nn.group,yn=Nn.groupOption,on=Nn.data,Dn=Nn.label,ar=Nn.value,Ut=on.key;if(Yt){var Rt,rn=(Rt=on.title)!==null&&Rt!==void 0?Rt:mr(Dn)?Dn.toString():void 0;return de.createElement("div",{className:ye()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Ut)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,Xe.Z)(on,_n),Sr=(0,cn.Z)(br,Hr),zr=Er(ar),Tr=ln||!zr&&Nr,Wr="".concat(Mr,"-option"),ei=ye()(Mr,Wr,yr,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Wr,"-grouped"),yn),"".concat(Wr,"-active"),jn===Wt&&!Tr),"".concat(Wr,"-disabled"),Tr),"".concat(Wr,"-selected"),zr)),Li=Fr(Nn),Oi=!dn||typeof dn=="function"||zr,xi=typeof Li=="number"?Li:Li||ar,vi=mr(xi)?xi.toString():void 0;return Mn!==void 0&&(vi=Mn),de.createElement("div",(0,ae.Z)({},(0,_e.Z)(Sr),nn?{}:Zr(Nn,Wt),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){jn===Wt||Tr||Vr(Wt)},onClick:function(){Tr||Dr(ar)},style:Vn}),de.createElement("div",{className:"".concat(Wr,"-content")},typeof Lr=="function"?Lr(Nn,{index:Wt}):xi),de.isValidElement(dn)||zr,Oi&&de.createElement(De,{className:"".concat(Mr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ar,disabled:Tr,isSelected:zr}},zr?"\u2713":null))}))},ur=de.forwardRef(er),nr=ur,In=function(Te,Be){var Pt=de.useRef({values:new Map,options:new Map}),Et=de.useMemo(function(){var Dt=Pt.current,Xt=Dt.values,tn=Dt.options,hn=Te.map(function(At){if(At.label===void 0){var xt;return(0,ze.Z)((0,ze.Z)({},At),{},{label:(xt=Xt.get(At.value))===null||xt===void 0?void 0:xt.label})}return At}),Zt=new Map,qt=new Map;return hn.forEach(function(At){Zt.set(At.value,At),qt.set(At.value,Be.get(At.value)||tn.get(At.value))}),Pt.current.values=Zt,Pt.current.options=qt,hn},[Te,Be]),Ze=de.useCallback(function(Dt){return Be.get(Dt)||Pt.current.options.get(Dt)},[Be]);return[Et,Ze]};function rr(Te,Be){return kt(Te).join("").toUpperCase().includes(Be)}var cr=function(Te,Be,Pt,Et,Ze){return de.useMemo(function(){if(!Pt||Et===!1)return Te;var Dt=Be.options,Xt=Be.label,tn=Be.value,hn=[],Zt=typeof Et=="function",qt=Pt.toUpperCase(),At=Zt?Et:function(en,vn){return Ze?rr(vn[Ze],qt):vn[Dt]?rr(vn[Xt!=="children"?Xt:"label"],qt):rr(vn[tn],qt)},xt=Zt?function(en){return te(en)}:function(en){return en};return Te.forEach(function(en){if(en[Dt]){var vn=At(Pt,xt(en));if(vn)hn.push(en);else{var mn=en[Dt].filter(function(xn){return At(Pt,xt(xn))});mn.length&&hn.push((0,ze.Z)((0,ze.Z)({},en),{},(0,He.Z)({},Dt,mn)))}return}At(Pt,xt(en))&&hn.push(en)}),hn},[Te,Et,Ze,Pt,Be])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Kt(Te){var Be=Te,Pt=Be.key,Et=Be.props,Ze=Et.children,Dt=Et.value,Xt=(0,Xe.Z)(Et,Kn);return(0,ze.Z)({key:Pt,value:Dt!==void 0?Dt:Pt,children:Ze},Xt)}function pn(Te){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Te).map(function(Pt,Et){if(!de.isValidElement(Pt)||!Pt.type)return null;var Ze=Pt,Dt=Ze.type.isSelectOptGroup,Xt=Ze.key,tn=Ze.props,hn=tn.children,Zt=(0,Xe.Z)(tn,xr);return Be||!Dt?Kt(Pt):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?Et:Xt,"__"),label:Xt},Zt),{},{options:pn(hn)})}).filter(function(Pt){return Pt})}var En=function(Be,Pt,Et,Ze,Dt){return de.useMemo(function(){var Xt=Be,tn=!Be;tn&&(Xt=pn(Pt));var hn=new Map,Zt=new Map,qt=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},At=function xt(en){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn<en.length;mn+=1){var xn=en[mn];!xn[Et.options]||vn?(hn.set(xn[Et.value],xn),qt(Zt,xn,Et.label),qt(Zt,xn,Ze),qt(Zt,xn,Dt)):xt(xn[Et.options],!0)}};return At(Xt),{options:Xt,valueOptions:hn,labelOptions:Zt}},[Be,Pt,Et,Ze,Dt])},An=En;function Jn(Te){var Be=de.useRef();Be.current=Te;var Pt=de.useCallback(function(){return Be.current.apply(Be,arguments)},[]);return Pt}function tr(Te){var Be=Te.mode,Pt=Te.options,Et=Te.children,Ze=Te.backfill,Dt=Te.allowClear,Xt=Te.placeholder,tn=Te.getInputElement,hn=Te.showSearch,Zt=Te.onSearch,qt=Te.defaultOpen,At=Te.autoFocus,xt=Te.labelInValue,en=Te.value,vn=Te.inputValue,mn=Te.optionLabelProp,xn=isMultiple(Be),Wn=hn!==void 0?hn:xn||Be==="combobox",Yn=Pt||convertChildrenToData(Et);if(warning(Be!=="tags"||Yn.every(function(nn){return!nn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Be==="tags"||Be==="combobox"){var dn=Yn.some(function(nn){return nn.options?nn.options.some(function(Hn){return typeof("value"in Hn?Hn.value:Hn.key)=="number"}):typeof("value"in nn?nn.value:nn.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Be!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Be==="combobox"||!Ze,"`backfill` only works with `combobox` mode."),warning(Be==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Be!=="combobox"||!tn||!Dt||!Xt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Zt&&!Wn&&Be!=="combobox"&&Be!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!qt||At,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),en!=null){var Gt=toArray(en);warning(!xt||Gt.every(function(nn){return _typeof(nn)==="object"&&("key"in nn||"value"in nn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!xn||Array.isArray(en),"`value` should be array when `mode` is `multiple` or `tags`")}if(Et){var gn=null;toNodeArray(Et).some(function(nn){if(!React.isValidElement(nn)||!nn.type)return!1;var Hn=nn,wr=Hn.type;if(wr.isSelectOption)return!1;if(wr.isSelectOptGroup){var Qn=toNodeArray(nn.props.children).every(function(Lr){return!React.isValidElement(Lr)||!nn.type||Lr.type.isSelectOption?!0:(gn=Lr.type,!1)});return!Qn}return gn=wr,!0}),gn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(gn.displayName||gn.name||gn,"`.")),warning(vn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function dr(Te,Be){if(Te){var Pt=function Et(Ze){for(var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xt=0;Xt<Ze.length;Xt++){var tn=Ze[Xt];if(tn[Be==null?void 0:Be.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Dt&&Array.isArray(tn[Be==null?void 0:Be.options])&&Et(tn[Be==null?void 0:Be.options],!0))break}};Pt(Te)}}var Zn=null,Rn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],hr=["inputValue"];function Vt(Te){return!Te||(0,Le.Z)(Te)!=="object"}var at=de.forwardRef(function(Te,Be){var Pt=Te.id,Et=Te.mode,Ze=Te.prefixCls,Dt=Ze===void 0?"rc-select":Ze,Xt=Te.backfill,tn=Te.fieldNames,hn=Te.inputValue,Zt=Te.searchValue,qt=Te.onSearch,At=Te.autoClearSearchValue,xt=At===void 0?!0:At,en=Te.onSelect,vn=Te.onDeselect,mn=Te.dropdownMatchSelectWidth,xn=mn===void 0?!0:mn,Wn=Te.filterOption,Yn=Te.filterSort,dn=Te.optionFilterProp,Gt=Te.optionLabelProp,gn=Te.options,nn=Te.optionRender,Hn=Te.children,wr=Te.defaultActiveFirstOption,Qn=Te.menuItemSelectedIcon,Lr=Te.virtual,Mr=Te.direction,Cr=Te.listHeight,ir=Cr===void 0?200:Cr,Nr=Te.listItemHeight,gr=Nr===void 0?20:Nr,or=Te.labelRender,Er=Te.value,Ar=Te.defaultValue,pr=Te.labelInValue,qn=Te.onChange,jn=Te.maxCount,Br=(0,Xe.Z)(Te,Rn),Vr=(0,Bn.ZP)(Pt),Jr=yt(Et),Dr=!!(!gn&&Hn),Hr=de.useMemo(function(){return Wn===void 0&&Et==="combobox"?!1:Wn},[Wn,Et]),Fr=de.useMemo(function(){return Ot(tn,Dr)},[JSON.stringify(tn),Dr]),Zr=(0,Ke.Z)("",{value:Zt!==void 0?Zt:hn,postState:function(On){return On||""}}),ii=(0,me.Z)(Zr,2),Or=ii[0],Nn=ii[1],Wt=An(gn,Hn,Fr,dn,Gt),Yt=Wt.valueOptions,yn=Wt.labelOptions,on=Wt.options,Dn=de.useCallback(function(Ln){var On=kt(Ln);return On.map(function(Pn){var Fn,vr,Ir,Gi,gi;if(Vt(Pn))Fn=Pn;else{var ui;Ir=Pn.key,vr=Pn.label,Fn=(ui=Pn.value)!==null&&ui!==void 0?ui:Ir}var Kr=Yt.get(Fn);if(Kr){var Hi;if(vr===void 0&&(vr=Kr==null?void 0:Kr[Gt||Fr.label]),Ir===void 0&&(Ir=(Hi=Kr==null?void 0:Kr.key)!==null&&Hi!==void 0?Hi:Fn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:vr,value:Fn,key:Ir,disabled:Gi,title:gi}})},[Fr,Gt,Yt]),ar=(0,Ke.Z)(Ar,{value:Er}),Ut=(0,me.Z)(ar,2),Rt=Ut[0],rn=Ut[1],ln=de.useMemo(function(){var Ln,On=Jr&&Rt===null?[]:Rt,Pn=Dn(On);return Et==="combobox"&&ue((Ln=Pn[0])===null||Ln===void 0?void 0:Ln.value)?[]:Pn},[Rt,Dn,Et,Jr]),Mn=In(ln,Yt),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1],br=de.useMemo(function(){if(!Et&&Vn.length===1){var Ln=Vn[0];if(Ln.value===null&&(Ln.label===null||Ln.label===void 0))return[]}return Vn.map(function(On){var Pn;return(0,ze.Z)((0,ze.Z)({},On),{},{label:(Pn=typeof or=="function"?or(On):On.label)!==null&&Pn!==void 0?Pn:On.value})})},[Et,Vn,or]),Sr=de.useMemo(function(){return new Set(Vn.map(function(Ln){return Ln.value}))},[Vn]);de.useEffect(function(){if(Et==="combobox"){var Ln,On=(Ln=Vn[0])===null||Ln===void 0?void 0:Ln.value;Nn(pe(On)?String(On):"")}},[Vn]);var zr=Jn(function(Ln,On){var Pn=On!=null?On:Ln;return(0,He.Z)((0,He.Z)({},Fr.value,Ln),Fr.label,Pn)}),Tr=de.useMemo(function(){if(Et!=="tags")return on;var Ln=(0,gt.Z)(on),On=function(Fn){return Yt.has(Fn)};return(0,gt.Z)(Vn).sort(function(Pn,Fn){return Pn.value<Fn.value?-1:1}).forEach(function(Pn){var Fn=Pn.value;On(Fn)||Ln.push(zr(Fn,Pn.label))}),Ln},[zr,on,Yt,Vn,Et]),Wr=cr(Tr,Fr,Or,Hr,dn),ei=de.useMemo(function(){return Et!=="tags"||!Or||Wr.some(function(Ln){return Ln[dn||"value"]===Or})||Wr.some(function(Ln){return Ln[Fr.value]===Or})?Wr:[zr(Or)].concat((0,gt.Z)(Wr))},[zr,dn,Et,Wr,Or,Fr]),Li=function Ln(On){var Pn=(0,gt.Z)(On).sort(function(Fn,vr){return Yn(Fn,vr,{searchValue:Or})});return Pn.map(function(Fn){return Array.isArray(Fn.options)?(0,ze.Z)((0,ze.Z)({},Fn),{},{options:Fn.options.length>0?Ln(Fn.options):Fn.options}):Fn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=de.useMemo(function(){return se(Oi,{fieldNames:Fr,childrenAsData:Dr})},[Oi,Fr,Dr]),vi=function(On){var Pn=Dn(On);if(rn(Pn),qn&&(Pn.length!==Vn.length||Pn.some(function(Ir,Gi){var gi;return((gi=Vn[Gi])===null||gi===void 0?void 0:gi.value)!==(Ir==null?void 0:Ir.value)}))){var Fn=pr?Pn:Pn.map(function(Ir){return Ir.value}),vr=Pn.map(function(Ir){return te(yr(Ir.value))});qn(Jr?Fn:Fn[0],Jr?vr:vr[0])}},Xi=de.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Fi=de.useState(0),ao=(0,me.Z)(Fi,2),Ji=ao[0],mi=ao[1],Ni=wr!==void 0?wr:Et!=="combobox",_r=de.useCallback(function(Ln,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Fn=Pn.source,vr=Fn===void 0?"keyboard":Fn;mi(On),Xt&&Et==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Xt,Et]),Wi=function(On,Pn,Fn){var vr=function(){var no,ji=yr(On);return[pr?{label:ji==null?void 0:ji[Fr.label],value:On,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:On}:On,te(ji)]};if(Pn&&en){var Ir=vr(),Gi=(0,me.Z)(Ir,2),gi=Gi[0],ui=Gi[1];en(gi,ui)}else if(!Pn&&vn&&Fn!=="clear"){var Kr=vr(),Hi=(0,me.Z)(Kr,2),Qi=Hi[0],Mi=Hi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Pn,Fn=Jr?On.selected:!0;Fn?Pn=Jr?[].concat((0,gt.Z)(Vn),[Ln]):[Ln]:Pn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Pn),Wi(Ln,Fn),Et==="combobox"?ti(""):(!yt||xt)&&(Nn(""),ti(""))}),Zi=function(On,Pn){vi(On);var Fn=Pn.type,vr=Pn.values;(Fn==="remove"||Fn==="clear")&&vr.forEach(function(Ir){Wi(Ir.value,!1,Fn)})},Qr=function(On,Pn){if(Nn(On),ti(null),Pn.source==="submit"){var Fn=(On||"").trim();if(Fn){var vr=Array.from(new Set([].concat((0,gt.Z)(Sr),[Fn])));vi(vr),Wi(Fn,!0),Nn("")}return}Pn.source!=="blur"&&(Et==="combobox"&&vi(On),qt==null||qt(On))},xo=function(On){var Pn=On;Et!=="tags"&&(Pn=On.map(function(vr){var Ir=yn.get(vr);return Ir==null?void 0:Ir.value}).filter(function(vr){return vr!==void 0}));var Fn=Array.from(new Set([].concat((0,gt.Z)(Sr),(0,gt.Z)(Pn))));vi(Fn),Fn.forEach(function(vr){Wi(vr,!0)})},lo=de.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,ze.Z)((0,ze.Z)({},Wt),{},{flattenOptions:xi,onActiveValue:_r,defaultActiveFirstOption:Ni,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Fr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:jn,optionRender:nn})},[jn,Wt,xi,_r,Ni,so,Qn,Sr,Fr,Lr,xn,Mr,ir,gr,Dr,nn]);return de.createElement(ce.Provider,{value:lo},de.createElement(Ie,(0,ae.Z)({},Br,{id:Vr,prefixCls:Dt,ref:Be,omitDomProps:hr,mode:Et,displayValues:br,onDisplayValuesChange:Zi,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:xt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Qt=at;Qt.Option=un,Qt.OptGroup=Ft;var Cn=Qt,Gn=Cn},63158:function(Nt,Ht,fe){"use strict";var ae=fe(54476),gt=fe(20068),He=fe(42978),ze=fe(75931),me=fe(59301),Xe=fe(92310),Le=fe.n(Xe),Ke=fe(18929),ke=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ae=me.forwardRef(function(ye,ut){var je,Re=ye.prefixCls,Oe=Re===void 0?"rc-switch":Re,De=ye.className,ot=ye.checked,st=ye.defaultChecked,St=ye.disabled,bt=ye.loadingIcon,ft=ye.checkedChildren,pt=ye.unCheckedChildren,dt=ye.onClick,$t=ye.onChange,_e=ye.onKeyDown,tt=(0,ze.Z)(ye,de),Lt=(0,Ke.Z)(!1,{value:ot,defaultValue:st}),Fe=(0,He.Z)(Lt,2),Qe=Fe[0],Pe=Fe[1];function Ye(vt,pe){var ue=Qe;return St||(ue=vt,Pe(ue),$t==null||$t(ue,pe)),ue}function zt(vt){vt.which===ke.Z.LEFT?Ye(!1,vt):vt.which===ke.Z.RIGHT&&Ye(!0,vt),_e==null||_e(vt)}function kt(vt){var pe=Ye(!Qe,vt);dt==null||dt(pe,vt)}var Tt=Le()(Oe,De,(je={},(0,gt.Z)(je,"".concat(Oe,"-checked"),Qe),(0,gt.Z)(je,"".concat(Oe,"-disabled"),St),je));return me.createElement("button",(0,ae.Z)({},tt,{type:"button",role:"switch","aria-checked":Qe,disabled:St,className:Tt,ref:ut,onKeyDown:zt,onClick:kt}),bt,me.createElement("span",{className:"".concat(Oe,"-inner")},me.createElement("span",{className:"".concat(Oe,"-inner-checked")},ft),me.createElement("span",{className:"".concat(Oe,"-inner-unchecked")},pt)))});Ae.displayName="Switch",Ht.Z=Ae},22711:function(Nt,Ht,fe){"use strict";fe.r(Ht),fe.d(Ht,{ResizableTextArea:function(){return Fe},default:function(){return zt}});var ae=fe(54476),gt=fe(20068),He=fe(33885),ze=fe(94480),me=fe(42978),Xe=fe(75931),Le=fe(92310),Ke=fe.n(Le),ke=fe(36901),de=fe(66003),Ae=fe(30292),ye=fe(18929),ut=fe(59301),je=fe(76190),Re=fe(29301),Oe=fe(34280),De=fe(16089),ot=`
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;
pointer-events: none !important;
`,st=["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","white-space"],St={},bt;function ft(kt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=kt.getAttribute("id")||kt.getAttribute("data-reactid")||kt.getAttribute("name");if(Tt&&St[vt])return St[vt];var pe=window.getComputedStyle(kt),ue=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ge=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),wt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),lt=st.map(function(Je){return"".concat(Je,":").concat(pe.getPropertyValue(Je))}).join(";"),Ce={sizingStyle:lt,paddingSize:Ge,borderSize:wt,boxSizing:ue};return Tt&&vt&&(St[vt]=Ce),Ce}function pt(kt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;bt||(bt=document.createElement("textarea"),bt.setAttribute("tab-index","-1"),bt.setAttribute("aria-hidden","true"),bt.setAttribute("name","hiddenTextarea"),document.body.appendChild(bt)),kt.getAttribute("wrap")?bt.setAttribute("wrap",kt.getAttribute("wrap")):bt.removeAttribute("wrap");var ue=ft(kt,Tt),Ge=ue.paddingSize,wt=ue.borderSize,lt=ue.boxSizing,Ce=ue.sizingStyle;bt.setAttribute("style","".concat(Ce,";").concat(ot)),bt.value=kt.value||kt.placeholder||"";var Je=void 0,Se=void 0,rt,Ue=bt.scrollHeight;if(lt==="border-box"?Ue+=wt:lt==="content-box"&&(Ue-=Ge),vt!==null||pe!==null){bt.value=" ";var xe=bt.scrollHeight-Ge;vt!==null&&(Je=xe*vt,lt==="border-box"&&(Je=Je+Ge+wt),Ue=Math.max(Je,Ue)),pe!==null&&(Se=xe*pe,lt==="border-box"&&(Se=Se+Ge+wt),rt=Ue>Se?"":"hidden",Ue=Math.min(Se,Ue))}var ve={height:Ue,overflowY:rt,resize:"none"};return Je&&(ve.minHeight=Je),Se&&(ve.maxHeight=Se),ve}var dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],$t=0,_e=1,tt=2,Lt=ut.forwardRef(function(kt,Tt){var vt=kt,pe=vt.prefixCls,ue=vt.defaultValue,Ge=vt.value,wt=vt.autoSize,lt=vt.onResize,Ce=vt.className,Je=vt.style,Se=vt.disabled,rt=vt.onChange,Ue=vt.onInternalAutoSize,xe=(0,Xe.Z)(vt,dt),ve=(0,ye.Z)(ue,{value:Ge,postState:function(un){return un!=null?un:""}}),Ee=(0,me.Z)(ve,2),qe=Ee[0],we=Ee[1],Ne=function(un){we(un.target.value),rt==null||rt(un)},Ve=ut.useRef();ut.useImperativeHandle(Tt,function(){return{textArea:Ve.current}});var et=ut.useMemo(function(){return wt&&(0,je.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),it=(0,me.Z)(et,2),We=it[0],mt=it[1],ct=!!wt,jt=function(){try{if(document.activeElement===Ve.current){var un=Ve.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Ve.current.setSelectionRange(kn,cn),Ve.current.scrollTop=wn}}catch($n){}},Ot=ut.useState(tt),se=(0,me.Z)(Ot,2),te=se[0],z=se[1],ie=ut.useState(),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ht=function(){z($t)};(0,Oe.Z)(function(){ct&&ht()},[Ge,We,mt,ct]),(0,Oe.Z)(function(){if(te===$t)z(_e);else if(te===_e){var It=pt(Ve.current,!1,We,mt);z(tt),ge(It)}else jt()},[te]);var yt=ut.useRef(),Ct=function(){De.Z.cancel(yt.current)},Ie=function(un){te===tt&&(lt==null||lt(un),wt&&(Ct(),yt.current=(0,De.Z)(function(){ht()})))};ut.useEffect(function(){return Ct},[]);var _t=ct?ne:null,Ft=(0,He.Z)((0,He.Z)({},Je),_t);return(te===$t||te===_e)&&(Ft.overflowY="hidden",Ft.overflowX="hidden"),ut.createElement(Re.Z,{onResize:Ie,disabled:!(wt||lt)},ut.createElement("textarea",(0,ae.Z)({},xe,{ref:Ve,style:Ft,className:Ke()(pe,Ce,(0,gt.Z)({},"".concat(pe,"-disabled"),Se)),disabled:Se,value:qe,onChange:Ne})))}),Fe=Lt,Qe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Pe=ut.forwardRef(function(kt,Tt){var vt,pe=kt.defaultValue,ue=kt.value,Ge=kt.onFocus,wt=kt.onBlur,lt=kt.onChange,Ce=kt.allowClear,Je=kt.maxLength,Se=kt.onCompositionStart,rt=kt.onCompositionEnd,Ue=kt.suffix,xe=kt.prefixCls,ve=xe===void 0?"rc-textarea":xe,Ee=kt.showCount,qe=kt.count,we=kt.className,Ne=kt.style,Ve=kt.disabled,et=kt.hidden,it=kt.classNames,We=kt.styles,mt=kt.onResize,ct=kt.onClear,jt=kt.onPressEnter,Ot=kt.readOnly,se=kt.autoSize,te=kt.onKeyDown,z=(0,Xe.Z)(kt,Qe),ie=(0,ye.Z)(pe,{value:ue,defaultValue:pe}),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ht=ne==null?"":String(ne),yt=ut.useState(!1),Ct=(0,me.Z)(yt,2),Ie=Ct[0],_t=Ct[1],Ft=ut.useRef(!1),It=ut.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=(0,ut.useRef)(null),$n=(0,ut.useRef)(null),_n=function(){var Qt;return(Qt=$n.current)===null||Qt===void 0?void 0:Qt.textArea},mr=function(){_n().focus()};(0,ut.useImperativeHandle)(Tt,function(){var at;return{resizableTextArea:$n.current,focus:mr,blur:function(){_n().blur()},nativeElement:((at=wn.current)===null||at===void 0?void 0:at.nativeElement)||_n()}}),(0,ut.useEffect)(function(){_t(function(at){return!Ve&&at})},[Ve]);var er=ut.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],In=ur[1];ut.useEffect(function(){if(nr){var at;(at=_n()).setSelectionRange.apply(at,(0,ze.Z)(nr))}},[nr]);var rr=(0,de.Z)(qe,Ee),cr=(vt=rr.max)!==null&&vt!==void 0?vt:Je,Bn=Number(cr)>0,Xn=rr.strategy(ht),Kn=!!cr&&Xn>cr,xr=function(Qt,Cn){var Gn=Cn;!Ft.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(Gn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==Gn&&In([_n().selectionStart||0,_n().selectionEnd||0])),ge(Gn),(0,Ae.rJ)(Qt.currentTarget,Qt,lt,Gn)},Kt=function(Qt){Ft.current=!0,Se==null||Se(Qt)},pn=function(Qt){Ft.current=!1,xr(Qt,Qt.currentTarget.value),rt==null||rt(Qt)},En=function(Qt){xr(Qt,Qt.target.value)},An=function(Qt){Qt.key==="Enter"&&jt&&jt(Qt),te==null||te(Qt)},Jn=function(Qt){_t(!0),Ge==null||Ge(Qt)},tr=function(Qt){_t(!1),wt==null||wt(Qt)},dr=function(Qt){ge(""),mr(),(0,Ae.rJ)(_n(),Qt,lt)},Zn=Ue,Rn;rr.show&&(rr.showFormatter?Rn=rr.showFormatter({value:ht,count:Xn,maxLength:cr}):Rn="".concat(Xn).concat(Bn?" / ".concat(cr):""),Zn=ut.createElement(ut.Fragment,null,Zn,ut.createElement("span",{className:Ke()("".concat(ve,"-data-count"),it==null?void 0:it.count),style:We==null?void 0:We.count},Rn)));var hr=function(Qt){var Cn;mt==null||mt(Qt),(Cn=_n())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},Vt=!se&&!Ee&&!Ce;return ut.createElement(ke.BaseInput,{ref:wn,value:ht,allowClear:Ce,handleReset:dr,suffix:Zn,prefixCls:ve,classNames:(0,He.Z)((0,He.Z)({},it),{},{affixWrapper:Ke()(it==null?void 0:it.affixWrapper,(0,gt.Z)((0,gt.Z)({},"".concat(ve,"-show-count"),Ee),"".concat(ve,"-textarea-allow-clear"),Ce))}),disabled:Ve,focused:Ie,className:Ke()(we,Kn&&"".concat(ve,"-out-of-range")),style:(0,He.Z)((0,He.Z)({},Ne),kn&&!Vt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Rn=="string"?Rn:void 0}},hidden:et,readOnly:Ot,onClear:ct},ut.createElement(Fe,(0,ae.Z)({},z,{autoSize:se,maxLength:Je,onKeyDown:An,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Kt,onCompositionEnd:pn,className:Ke()(it==null?void 0:it.textarea),style:(0,He.Z)((0,He.Z)({},We==null?void 0:We.textarea),{},{resize:Ne==null?void 0:Ne.resize}),disabled:Ve,prefixCls:ve,onResize:hr,ref:$n,readOnly:Ot})))}),Ye=Pe,zt=Ye},90472:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return kt}});var ae=fe(54476),gt=fe(67732),He=fe(83652),ze=fe(31226),me=fe(42403),Xe=fe(158),Le=fe(20068),Ke=fe(59301),ke=fe(33885),de=fe(75931),Ae=fe(76190),ye=fe(75044),ut=fe(3202),je=fe(94480),Re=fe(92310),Oe=fe.n(Re),De=fe(26112),ot=fe(48736),st=function(Tt,vt){if(Tt&&vt){var pe=Array.isArray(vt)?vt:vt.split(","),ue=Tt.name||"",Ge=Tt.type||"",wt=Ge.replace(/\/.*$/,"");return pe.some(function(lt){var Ce=lt.trim();if(/^\*(\/\*)?$/.test(lt))return!0;if(Ce.charAt(0)==="."){var Je=ue.toLowerCase(),Se=Ce.toLowerCase(),rt=[Se];return(Se===".jpg"||Se===".jpeg")&&(rt=[".jpg",".jpeg"]),rt.some(function(Ue){return Je.endsWith(Ue)})}return/\/\*$/.test(Ce)?wt===Ce.replace(/\/.*$/,""):Ge===Ce?!0:/^\w+$/.test(Ce)?((0,ot.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Ce,"'.Skip for check.")),!0):!1})}return!0};function St(Tt,vt){var pe="cannot ".concat(Tt.method," ").concat(Tt.action," ").concat(vt.status,"'"),ue=new Error(pe);return ue.status=vt.status,ue.method=Tt.method,ue.url=Tt.action,ue}function bt(Tt){var vt=Tt.responseText||Tt.response;if(!vt)return vt;try{return JSON.parse(vt)}catch(pe){return vt}}function ft(Tt){var vt=new XMLHttpRequest;Tt.onProgress&&vt.upload&&(vt.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),Tt.onProgress(wt)});var pe=new FormData;Tt.data&&Object.keys(Tt.data).forEach(function(Ge){var wt=Tt.data[Ge];if(Array.isArray(wt)){wt.forEach(function(lt){pe.append("".concat(Ge,"[]"),lt)});return}pe.append(Ge,wt)}),Tt.file instanceof Blob?pe.append(Tt.filename,Tt.file,Tt.file.name):pe.append(Tt.filename,Tt.file),vt.onerror=function(wt){Tt.onError(wt)},vt.onload=function(){return vt.status<200||vt.status>=300?Tt.onError(St(Tt,vt),bt(vt)):Tt.onSuccess(bt(vt),vt)},vt.open(Tt.method,Tt.action,!0),Tt.withCredentials&&"withCredentials"in vt&&(vt.withCredentials=!0);var ue=Tt.headers||{};return ue["X-Requested-With"]!==null&&vt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ue).forEach(function(Ge){ue[Ge]!==null&&vt.setRequestHeader(Ge,ue[Ge])}),vt.send(pe),{abort:function(){vt.abort()}}}var pt=function(){var Tt=(0,ut.Z)((0,ye.Z)().mark(function vt(pe,ue){var Ge,wt,lt,Ce,Je,Se,rt,Ue;return(0,ye.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Se=function(){return Se=(0,ut.Z)((0,ye.Z)().mark(function qe(we){return(0,ye.Z)().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.abrupt("return",new Promise(function(et){we.file(function(it){ue(it)?(we.fullPath&&!it.webkitRelativePath&&(Object.defineProperties(it,{webkitRelativePath:{writable:!0}}),it.webkitRelativePath=we.fullPath.replace(/^\//,""),Object.defineProperties(it,{webkitRelativePath:{writable:!1}})),et(it)):et(null)})}));case 1:case"end":return Ve.stop()}},qe)})),Se.apply(this,arguments)},Je=function(qe){return Se.apply(this,arguments)},Ce=function(){return Ce=(0,ut.Z)((0,ye.Z)().mark(function qe(we){var Ne,Ve,et,it,We;return(0,ye.Z)().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:Ne=we.createReader(),Ve=[];case 2:return ct.next=5,new Promise(function(jt){Ne.readEntries(jt,function(){return jt([])})});case 5:if(et=ct.sent,it=et.length,it){ct.next=9;break}return ct.abrupt("break",12);case 9:for(We=0;We<it;We++)Ve.push(et[We]);ct.next=2;break;case 12:return ct.abrupt("return",Ve);case 13:case"end":return ct.stop()}},qe)})),Ce.apply(this,arguments)},lt=function(qe){return Ce.apply(this,arguments)},Ge=[],wt=[],pe.forEach(function(Ee){return wt.push(Ee.webkitGetAsEntry())}),rt=function(){var Ee=(0,ut.Z)((0,ye.Z)().mark(function qe(we,Ne){var Ve,et;return(0,ye.Z)().wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(we){We.next=2;break}return We.abrupt("return");case 2:if(we.path=Ne||"",!we.isFile){We.next=10;break}return We.next=6,Je(we);case 6:Ve=We.sent,Ve&&Ge.push(Ve),We.next=15;break;case 10:if(!we.isDirectory){We.next=15;break}return We.next=13,lt(we);case 13:et=We.sent,wt.push.apply(wt,(0,je.Z)(et));case 15:case"end":return We.stop()}},qe)}));return function(we,Ne){return Ee.apply(this,arguments)}}(),Ue=0;case 9:if(!(Ue<wt.length)){ve.next=15;break}return ve.next=12,rt(wt[Ue]);case 12:Ue++,ve.next=9;break;case 15:return ve.abrupt("return",Ge);case 16:case"end":return ve.stop()}},vt)}));return function(pe,ue){return Tt.apply(this,arguments)}}(),dt=pt,$t=+new Date,_e=0;function tt(){return"rc-upload-".concat($t,"-").concat(++_e)}var Lt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Fe=function(Tt){(0,me.Z)(pe,Tt);var vt=(0,Xe.Z)(pe);function pe(){var ue;(0,gt.Z)(this,pe);for(var Ge=arguments.length,wt=new Array(Ge),lt=0;lt<Ge;lt++)wt[lt]=arguments[lt];return ue=vt.call.apply(vt,[this].concat(wt)),(0,Le.Z)((0,ze.Z)(ue),"state",{uid:tt()}),(0,Le.Z)((0,ze.Z)(ue),"reqs",{}),(0,Le.Z)((0,ze.Z)(ue),"fileInput",void 0),(0,Le.Z)((0,ze.Z)(ue),"_isMounted",void 0),(0,Le.Z)((0,ze.Z)(ue),"onChange",function(Ce){var Je=ue.props,Se=Je.accept,rt=Je.directory,Ue=Ce.target.files,xe=(0,je.Z)(Ue).filter(function(ve){return!rt||st(ve,Se)});ue.uploadFiles(xe),ue.reset()}),(0,Le.Z)((0,ze.Z)(ue),"onClick",function(Ce){var Je=ue.fileInput;if(Je){var Se=Ce.target,rt=ue.props.onClick;if(Se&&Se.tagName==="BUTTON"){var Ue=Je.parentNode;Ue.focus(),Se.blur()}Je.click(),rt&&rt(Ce)}}),(0,Le.Z)((0,ze.Z)(ue),"onKeyDown",function(Ce){Ce.key==="Enter"&&ue.onClick(Ce)}),(0,Le.Z)((0,ze.Z)(ue),"onFileDrop",function(){var Ce=(0,ut.Z)((0,ye.Z)().mark(function Je(Se){var rt,Ue,xe;return(0,ye.Z)().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(rt=ue.props.multiple,Se.preventDefault(),Se.type!=="dragover"){Ee.next=4;break}return Ee.abrupt("return");case 4:if(!ue.props.directory){Ee.next=11;break}return Ee.next=7,dt(Array.prototype.slice.call(Se.dataTransfer.items),function(qe){return st(qe,ue.props.accept)});case 7:Ue=Ee.sent,ue.uploadFiles(Ue),Ee.next=14;break;case 11:xe=(0,je.Z)(Se.dataTransfer.files).filter(function(qe){return st(qe,ue.props.accept)}),rt===!1&&(xe=xe.slice(0,1)),ue.uploadFiles(xe);case 14:case"end":return Ee.stop()}},Je)}));return function(Je){return Ce.apply(this,arguments)}}()),(0,Le.Z)((0,ze.Z)(ue),"uploadFiles",function(Ce){var Je=(0,je.Z)(Ce),Se=Je.map(function(rt){return rt.uid=tt(),ue.processFile(rt,Je)});Promise.all(Se).then(function(rt){var Ue=ue.props.onBatchStart;Ue==null||Ue(rt.map(function(xe){var ve=xe.origin,Ee=xe.parsedFile;return{file:ve,parsedFile:Ee}})),rt.filter(function(xe){return xe.parsedFile!==null}).forEach(function(xe){ue.post(xe)})})}),(0,Le.Z)((0,ze.Z)(ue),"processFile",function(){var Ce=(0,ut.Z)((0,ye.Z)().mark(function Je(Se,rt){var Ue,xe,ve,Ee,qe,we,Ne,Ve,et;return(0,ye.Z)().wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(Ue=ue.props.beforeUpload,xe=Se,!Ue){We.next=14;break}return We.prev=3,We.next=6,Ue(Se,rt);case 6:xe=We.sent,We.next=12;break;case 9:We.prev=9,We.t0=We.catch(3),xe=!1;case 12:if(xe!==!1){We.next=14;break}return We.abrupt("return",{origin:Se,parsedFile:null,action:null,data:null});case 14:if(ve=ue.props.action,typeof ve!="function"){We.next=21;break}return We.next=18,ve(Se);case 18:Ee=We.sent,We.next=22;break;case 21:Ee=ve;case 22:if(qe=ue.props.data,typeof qe!="function"){We.next=29;break}return We.next=26,qe(Se);case 26:we=We.sent,We.next=30;break;case 29:we=qe;case 30:return Ne=((0,Ae.Z)(xe)==="object"||typeof xe=="string")&&xe?xe:Se,Ne instanceof File?Ve=Ne:Ve=new File([Ne],Se.name,{type:Se.type}),et=Ve,et.uid=Se.uid,We.abrupt("return",{origin:Se,data:we,parsedFile:et,action:Ee});case 35:case"end":return We.stop()}},Je,null,[[3,9]])}));return function(Je,Se){return Ce.apply(this,arguments)}}()),(0,Le.Z)((0,ze.Z)(ue),"saveFileInput",function(Ce){ue.fileInput=Ce}),ue}return(0,He.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Ge){var wt=this,lt=Ge.data,Ce=Ge.origin,Je=Ge.action,Se=Ge.parsedFile;if(this._isMounted){var rt=this.props,Ue=rt.onStart,xe=rt.customRequest,ve=rt.name,Ee=rt.headers,qe=rt.withCredentials,we=rt.method,Ne=Ce.uid,Ve=xe||ft,et={action:Je,filename:ve,data:lt,file:Se,headers:Ee,withCredentials:qe,method:we||"post",onProgress:function(We){var mt=wt.props.onProgress;mt==null||mt(We,Se)},onSuccess:function(We,mt){var ct=wt.props.onSuccess;ct==null||ct(We,Se,mt),delete wt.reqs[Ne]},onError:function(We,mt){var ct=wt.props.onError;ct==null||ct(We,mt,Se),delete wt.reqs[Ne]}};Ue(Ce),this.reqs[Ne]=Ve(et)}}},{key:"reset",value:function(){this.setState({uid:tt()})}},{key:"abort",value:function(Ge){var wt=this.reqs;if(Ge){var lt=Ge.uid?Ge.uid:Ge;wt[lt]&&wt[lt].abort&&wt[lt].abort(),delete wt[lt]}else Object.keys(wt).forEach(function(Ce){wt[Ce]&&wt[Ce].abort&&wt[Ce].abort(),delete wt[Ce]})}},{key:"render",value:function(){var Ge=this.props,wt=Ge.component,lt=Ge.prefixCls,Ce=Ge.className,Je=Ge.classNames,Se=Je===void 0?{}:Je,rt=Ge.disabled,Ue=Ge.id,xe=Ge.name,ve=Ge.style,Ee=Ge.styles,qe=Ee===void 0?{}:Ee,we=Ge.multiple,Ne=Ge.accept,Ve=Ge.capture,et=Ge.children,it=Ge.directory,We=Ge.openFileDialogOnClick,mt=Ge.onMouseEnter,ct=Ge.onMouseLeave,jt=Ge.hasControlInside,Ot=(0,de.Z)(Ge,Lt),se=Oe()((0,Le.Z)((0,Le.Z)((0,Le.Z)({},lt,!0),"".concat(lt,"-disabled"),rt),Ce,Ce)),te=it?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},z=rt?{}:{onClick:We?this.onClick:function(){},onKeyDown:We?this.onKeyDown:function(){},onMouseEnter:mt,onMouseLeave:ct,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:jt?void 0:"0"};return Ke.createElement(wt,(0,ae.Z)({},z,{className:se,role:jt?void 0:"button",style:ve}),Ke.createElement("input",(0,ae.Z)({},(0,De.Z)(Ot,{aria:!0,data:!0}),{id:Ue,name:xe,disabled:rt,type:"file",ref:this.saveFileInput,onClick:function(ce){return ce.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},qe.input),className:Se.input,accept:Ne},te,{multiple:we,onChange:this.onChange},Ve!=null?{capture:Ve}:{})),et)}}]),pe}(Ke.Component),Qe=Fe;function Pe(){}var Ye=function(Tt){(0,me.Z)(pe,Tt);var vt=(0,Xe.Z)(pe);function pe(){var ue;(0,gt.Z)(this,pe);for(var Ge=arguments.length,wt=new Array(Ge),lt=0;lt<Ge;lt++)wt[lt]=arguments[lt];return ue=vt.call.apply(vt,[this].concat(wt)),(0,Le.Z)((0,ze.Z)(ue),"uploader",void 0),(0,Le.Z)((0,ze.Z)(ue),"saveUploader",function(Ce){ue.uploader=Ce}),ue}return(0,He.Z)(pe,[{key:"abort",value:function(Ge){this.uploader.abort(Ge)}},{key:"render",value:function(){return Ke.createElement(Qe,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Ke.Component);(0,Le.Z)(Ye,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Pe,onError:Pe,onSuccess:Pe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var zt=Ye,kt=zt},48911:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return qe}});var ae=fe(54476),gt=fe(76190),He=fe(33885),ze=fe(20068),me=fe(42978),Xe=fe(75931),Le=fe(92310),Ke=fe.n(Le),ke=fe(29301),de=fe(70425),Ae=fe(34280),ye=fe(59301),ut=fe(4676),je=ye.forwardRef(function(we,Ne){var Ve=we.height,et=we.offsetY,it=we.offsetX,We=we.children,mt=we.prefixCls,ct=we.onInnerResize,jt=we.innerProps,Ot=we.rtl,se=we.extra,te={},z={display:"flex",flexDirection:"column"};return et!==void 0&&(te={height:Ve,position:"relative",overflow:"hidden"},z=(0,He.Z)((0,He.Z)({},z),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(et,"px)")},Ot?"marginRight":"marginLeft",-it),"position","absolute"),"left",0),"right",0),"top",0))),ye.createElement("div",{style:te},ye.createElement(ke.Z,{onResize:function(ce){var ne=ce.offsetHeight;ne&&ct&&ct()}},ye.createElement("div",(0,ae.Z)({style:z,className:Ke()((0,ze.Z)({},"".concat(mt,"-holder-inner"),mt)),ref:Ne},jt),We,se)))});je.displayName="Filler";var Re=je;function Oe(we){var Ne=we.children,Ve=we.setRef,et=ye.useCallback(function(it){Ve(it)},[]);return ye.cloneElement(Ne,{ref:et})}function De(we,Ne,Ve,et,it,We,mt,ct){var jt=ct.getKey;return we.slice(Ne,Ve+1).map(function(Ot,se){var te=Ne+se,z=mt(Ot,te,{style:{width:et},offsetX:it}),ie=jt(Ot);return ye.createElement(Oe,{key:ie,setRef:function(ne){return We(Ot,ne)}},z)})}function ot(we,Ne,Ve,et){var it=Ve-we,We=Ne-Ve,mt=Math.min(it,We)*2;if(et<=mt){var ct=Math.floor(et/2);return et%2?Ve+ct+1:Ve-ct}return it>We?Ve-(et-We):Ve+(et-it)}function st(we,Ne,Ve){var et=we.length,it=Ne.length,We,mt;if(et===0&&it===0)return null;et<it?(We=we,mt=Ne):(We=Ne,mt=we);var ct={__EMPTY_ITEM__:!0};function jt(ce){return ce!==void 0?Ve(ce):ct}for(var Ot=null,se=Math.abs(et-it)!==1,te=0;te<mt.length;te+=1){var z=jt(We[te]),ie=jt(mt[te]);if(z!==ie){Ot=te,se=se||z!==jt(mt[te+1]);break}}return Ot===null?null:{index:Ot,multiple:se}}function St(we,Ne,Ve){var et=ye.useState(we),it=(0,me.Z)(et,2),We=it[0],mt=it[1],ct=ye.useState(null),jt=(0,me.Z)(ct,2),Ot=jt[0],se=jt[1];return ye.useEffect(function(){var te=st(We||[],we||[],Ne);(te==null?void 0:te.index)!==void 0&&(Ve==null||Ve(te.index),se(we[te.index])),mt(we)},[we]),[Ot]}var bt=fe(16089),ft=(typeof navigator=="undefined"?"undefined":(0,gt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),pt=ft,dt=function(we,Ne,Ve,et){var it=(0,ye.useRef)(!1),We=(0,ye.useRef)(null);function mt(){clearTimeout(We.current),it.current=!0,We.current=setTimeout(function(){it.current=!1},50)}var ct=(0,ye.useRef)({top:we,bottom:Ne,left:Ve,right:et});return ct.current.top=we,ct.current.bottom=Ne,ct.current.left=Ve,ct.current.right=et,function(jt,Ot){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=jt?Ot<0&&ct.current.left||Ot>0&&ct.current.right:Ot<0&&ct.current.top||Ot>0&&ct.current.bottom;return se&&te?(clearTimeout(We.current),it.current=!1):(!te||it.current)&&mt(),!it.current&&te}};function $t(we,Ne,Ve,et,it,We,mt){var ct=(0,ye.useRef)(0),jt=(0,ye.useRef)(null),Ot=(0,ye.useRef)(null),se=(0,ye.useRef)(!1),te=dt(Ne,Ve,et,it);function z(yt,Ct){if(bt.Z.cancel(jt.current),!te(!1,Ct)){var Ie=yt;if(!Ie._virtualHandled)Ie._virtualHandled=!0;else return;ct.current+=Ct,Ot.current=Ct,pt||Ie.preventDefault(),jt.current=(0,bt.Z)(function(){var _t=se.current?10:1;mt(ct.current*_t,!1),ct.current=0})}}function ie(yt,Ct){mt(Ct,!0),pt||yt.preventDefault()}var ce=(0,ye.useRef)(null),ne=(0,ye.useRef)(null);function ge(yt){if(we){bt.Z.cancel(ne.current),ne.current=(0,bt.Z)(function(){ce.current=null},2);var Ct=yt.deltaX,Ie=yt.deltaY,_t=yt.shiftKey,Ft=Ct,It=Ie;(ce.current==="sx"||!ce.current&&_t&&Ie&&!Ct)&&(Ft=Ie,It=0,ce.current="sx");var un=Math.abs(Ft),kn=Math.abs(It);ce.current===null&&(ce.current=We&&un>kn?"x":"y"),ce.current==="y"?z(yt,It):ie(yt,Ft)}}function ht(yt){we&&(se.current=yt.detail===Ot.current)}return[ge,ht]}function _e(we,Ne,Ve,et){var it=ye.useMemo(function(){return[new Map,[]]},[we,Ve.id,et]),We=(0,me.Z)(it,2),mt=We[0],ct=We[1],jt=function(se){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se,z=mt.get(se),ie=mt.get(te);if(z===void 0||ie===void 0)for(var ce=we.length,ne=ct.length;ne<ce;ne+=1){var ge,ht=we[ne],yt=Ne(ht);mt.set(yt,ne);var Ct=(ge=Ve.get(yt))!==null&&ge!==void 0?ge:et;if(ct[ne]=(ct[ne-1]||0)+Ct,yt===se&&(z=ne),yt===te&&(ie=ne),z!==void 0&&ie!==void 0)break}return{top:ct[z-1]||0,bottom:ct[ie]}};return jt}var tt=fe(67732),Lt=fe(83652),Fe=function(){function we(){(0,tt.Z)(this,we),(0,ze.Z)(this,"maps",void 0),(0,ze.Z)(this,"id",0),(0,ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Lt.Z)(we,[{key:"set",value:function(Ve,et){this.diffRecords.set(Ve,this.maps[Ve]),this.maps[Ve]=et,this.id+=1}},{key:"get",value:function(Ve){return this.maps[Ve]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),we}(),Qe=Fe;function Pe(we){var Ne=parseFloat(we);return isNaN(Ne)?0:Ne}function Ye(we,Ne,Ve){var et=ye.useState(0),it=(0,me.Z)(et,2),We=it[0],mt=it[1],ct=(0,ye.useRef)(new Map),jt=(0,ye.useRef)(new Qe),Ot=(0,ye.useRef)(0);function se(){Ot.current+=1}function te(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;se();var ce=function(){var ht=!1;ct.current.forEach(function(yt,Ct){if(yt&&yt.offsetParent){var Ie=yt.offsetHeight,_t=getComputedStyle(yt),Ft=_t.marginTop,It=_t.marginBottom,un=Pe(Ft),kn=Pe(It),cn=Ie+un+kn;jt.current.get(Ct)!==cn&&(jt.current.set(Ct,cn),ht=!0)}}),ht&&mt(function(yt){return yt+1})};if(ie)ce();else{Ot.current+=1;var ne=Ot.current;Promise.resolve().then(function(){ne===Ot.current&&ce()})}}function z(ie,ce){var ne=we(ie),ge=ct.current.get(ne);ce?(ct.current.set(ne,ce),te()):ct.current.delete(ne),!ge!=!ce&&(ce?Ne==null||Ne(ie):Ve==null||Ve(ie))}return(0,ye.useEffect)(function(){return se},[]),[z,te,jt.current,We]}var zt=14/15;function kt(we,Ne,Ve){var et=(0,ye.useRef)(!1),it=(0,ye.useRef)(0),We=(0,ye.useRef)(0),mt=(0,ye.useRef)(null),ct=(0,ye.useRef)(null),jt,Ot=function(ie){if(et.current){var ce=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ge=it.current-ce,ht=We.current-ne,yt=Math.abs(ge)>Math.abs(ht);yt?it.current=ce:We.current=ne;var Ct=Ve(yt,yt?ge:ht,!1,ie);Ct&&ie.preventDefault(),clearInterval(ct.current),Ct&&(ct.current=setInterval(function(){yt?ge*=zt:ht*=zt;var Ie=Math.floor(yt?ge:ht);(!Ve(yt,Ie,!0)||Math.abs(Ie)<=.1)&&clearInterval(ct.current)},16))}},se=function(){et.current=!1,jt()},te=function(ie){jt(),ie.touches.length===1&&!et.current&&(et.current=!0,it.current=Math.ceil(ie.touches[0].pageX),We.current=Math.ceil(ie.touches[0].pageY),mt.current=ie.target,mt.current.addEventListener("touchmove",Ot,{passive:!1}),mt.current.addEventListener("touchend",se,{passive:!0}))};jt=function(){mt.current&&(mt.current.removeEventListener("touchmove",Ot),mt.current.removeEventListener("touchend",se))},(0,Ae.Z)(function(){return we&&Ne.current.addEventListener("touchstart",te,{passive:!0}),function(){var z;(z=Ne.current)===null||z===void 0||z.removeEventListener("touchstart",te),jt(),clearInterval(ct.current)}},[we])}function Tt(we){return Math.floor(Math.pow(we,.5))}function vt(we,Ne){var Ve="touches"in we?we.touches[0]:we;return Ve[Ne?"pageX":"pageY"]-window[Ne?"scrollX":"scrollY"]}function pe(we,Ne,Ve){ye.useEffect(function(){var et=Ne.current;if(we&&et){var it=!1,We,mt,ct=function(){bt.Z.cancel(We)},jt=function z(){ct(),We=(0,bt.Z)(function(){Ve(mt),z()})},Ot=function(){it=!1,ct()},se=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ce=ie;ce._virtualHandled||(ce._virtualHandled=!0,it=!0)}},te=function(ie){if(it){var ce=vt(ie,!1),ne=et.getBoundingClientRect(),ge=ne.top,ht=ne.bottom;if(ce<=ge){var yt=ge-ce;mt=-Tt(yt),jt()}else if(ce>=ht){var Ct=ce-ht;mt=Tt(Ct),jt()}else ct()}};return et.addEventListener("mousedown",se),et.ownerDocument.addEventListener("mouseup",Ot),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Ot),function(){et.removeEventListener("mousedown",se),et.ownerDocument.removeEventListener("mouseup",Ot),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Ot),ct()}}},[we])}var ue=10;function Ge(we,Ne,Ve,et,it,We,mt,ct){var jt=ye.useRef(),Ot=ye.useState(null),se=(0,me.Z)(Ot,2),te=se[0],z=se[1];return(0,Ae.Z)(function(){if(te&&te.times<ue){if(!we.current){z(function(rr){return(0,He.Z)({},rr)});return}We();var ie=te.targetAlign,ce=te.originAlign,ne=te.index,ge=te.offset,ht=we.current.clientHeight,yt=!1,Ct=ie,Ie=null;if(ht){for(var _t=ie||ce,Ft=0,It=0,un=0,kn=Math.min(Ne.length-1,ne),cn=0;cn<=kn;cn+=1){var wn=it(Ne[cn]);It=Ft;var $n=Ve.get(wn);un=It+($n===void 0?et:$n),Ft=un}for(var _n=_t==="top"?ge:ht-ge,mr=kn;mr>=0;mr-=1){var er=it(Ne[mr]),ur=Ve.get(er);if(ur===void 0){yt=!0;break}if(_n-=ur,_n<=0)break}switch(_t){case"top":Ie=It-ge;break;case"bottom":Ie=un-ht+ge;break;default:{var nr=we.current.scrollTop,In=nr+ht;It<nr?Ct="top":un>In&&(Ct="bottom")}}Ie!==null&&mt(Ie),Ie!==te.lastTop&&(yt=!0)}yt&&z((0,He.Z)((0,He.Z)({},te),{},{times:te.times+1,targetAlign:Ct,lastTop:Ie}))}},[te,we.current]),function(ie){if(ie==null){ct();return}if(bt.Z.cancel(jt.current),typeof ie=="number")mt(ie);else if(ie&&(0,gt.Z)(ie)==="object"){var ce,ne=ie.align;"index"in ie?ce=ie.index:ce=Ne.findIndex(function(yt){return it(yt)===ie.key});var ge=ie.offset,ht=ge===void 0?0:ge;z({times:0,index:ce,offset:ht,originAlign:ne})}}}var wt=ye.forwardRef(function(we,Ne){var Ve=we.prefixCls,et=we.rtl,it=we.scrollOffset,We=we.scrollRange,mt=we.onStartMove,ct=we.onStopMove,jt=we.onScroll,Ot=we.horizontal,se=we.spinSize,te=we.containerSize,z=we.style,ie=we.thumbStyle,ce=we.showScrollBar,ne=ye.useState(!1),ge=(0,me.Z)(ne,2),ht=ge[0],yt=ge[1],Ct=ye.useState(null),Ie=(0,me.Z)(Ct,2),_t=Ie[0],Ft=Ie[1],It=ye.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=!et,$n=ye.useRef(),_n=ye.useRef(),mr=ye.useState(ce),er=(0,me.Z)(mr,2),ur=er[0],nr=er[1],In=ye.useRef(),rr=function(){ce===!0||ce===!1||(clearTimeout(In.current),nr(!0),In.current=setTimeout(function(){nr(!1)},3e3))},cr=We-te||0,Bn=te-se||0,Xn=ye.useMemo(function(){if(it===0||cr===0)return 0;var dr=it/cr;return dr*Bn},[it,cr,Bn]),Kn=function(Zn){Zn.stopPropagation(),Zn.preventDefault()},xr=ye.useRef({top:Xn,dragging:ht,pageY:_t,startTop:kn});xr.current={top:Xn,dragging:ht,pageY:_t,startTop:kn};var Kt=function(Zn){yt(!0),Ft(vt(Zn,Ot)),cn(xr.current.top),mt(),Zn.stopPropagation(),Zn.preventDefault()};ye.useEffect(function(){var dr=function(Vt){Vt.preventDefault()},Zn=$n.current,Rn=_n.current;return Zn.addEventListener("touchstart",dr,{passive:!1}),Rn.addEventListener("touchstart",Kt,{passive:!1}),function(){Zn.removeEventListener("touchstart",dr),Rn.removeEventListener("touchstart",Kt)}},[]);var pn=ye.useRef();pn.current=cr;var En=ye.useRef();En.current=Bn,ye.useEffect(function(){if(ht){var dr,Zn=function(Vt){var at=xr.current,Qt=at.dragging,Cn=at.pageY,Gn=at.startTop;bt.Z.cancel(dr);var Te=$n.current.getBoundingClientRect(),Be=te/(Ot?Te.width:Te.height);if(Qt){var Pt=(vt(Vt,Ot)-Cn)*Be,Et=Gn;!wn&&Ot?Et-=Pt:Et+=Pt;var Ze=pn.current,Dt=En.current,Xt=Dt?Et/Dt:0,tn=Math.ceil(Xt*Ze);tn=Math.max(tn,0),tn=Math.min(tn,Ze),dr=(0,bt.Z)(function(){jt(tn,Ot)})}},Rn=function(){yt(!1),ct()};return window.addEventListener("mousemove",Zn,{passive:!0}),window.addEventListener("touchmove",Zn,{passive:!0}),window.addEventListener("mouseup",Rn,{passive:!0}),window.addEventListener("touchend",Rn,{passive:!0}),function(){window.removeEventListener("mousemove",Zn),window.removeEventListener("touchmove",Zn),window.removeEventListener("mouseup",Rn),window.removeEventListener("touchend",Rn),bt.Z.cancel(dr)}}},[ht]),ye.useEffect(function(){return rr(),function(){clearTimeout(In.current)}},[it]),ye.useImperativeHandle(Ne,function(){return{delayHidden:rr}});var An="".concat(Ve,"-scrollbar"),Jn={position:"absolute",visibility:ur?null:"hidden"},tr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ot?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,ze.Z)({height:"100%",width:se},wn?"left":"right",Xn))):(Object.assign(Jn,(0,ze.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign(tr,{width:"100%",height:se,top:Xn})),ye.createElement("div",{ref:$n,className:Ke()(An,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(An,"-horizontal"),Ot),"".concat(An,"-vertical"),!Ot),"".concat(An,"-visible"),ur)),style:(0,He.Z)((0,He.Z)({},Jn),z),onMouseDown:Kn,onMouseMove:rr},ye.createElement("div",{ref:_n,className:Ke()("".concat(An,"-thumb"),(0,ze.Z)({},"".concat(An,"-thumb-moving"),ht)),style:(0,He.Z)((0,He.Z)({},tr),ie),onMouseDown:Kt}))}),lt=wt,Ce=20;function Je(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ve=we/Ne*we;return isNaN(Ve)&&(Ve=0),Ve=Math.max(Ve,Ce),Math.floor(Ve)}var Se=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],rt=[],Ue={overflowY:"auto",overflowAnchor:"none"};function xe(we,Ne){var Ve=we.prefixCls,et=Ve===void 0?"rc-virtual-list":Ve,it=we.className,We=we.height,mt=we.itemHeight,ct=we.fullHeight,jt=ct===void 0?!0:ct,Ot=we.style,se=we.data,te=we.children,z=we.itemKey,ie=we.virtual,ce=we.direction,ne=we.scrollWidth,ge=we.component,ht=ge===void 0?"div":ge,yt=we.onScroll,Ct=we.onVirtualScroll,Ie=we.onVisibleChange,_t=we.innerProps,Ft=we.extraRender,It=we.styles,un=we.showScrollBar,kn=un===void 0?"optional":un,cn=(0,Xe.Z)(we,Se),wn=ye.useCallback(function(Wt){return typeof z=="function"?z(Wt):Wt==null?void 0:Wt[z]},[z]),$n=Ye(wn,null,null),_n=(0,me.Z)($n,4),mr=_n[0],er=_n[1],ur=_n[2],nr=_n[3],In=!!(ie!==!1&&We&&mt),rr=ye.useMemo(function(){return Object.values(ur.maps).reduce(function(Wt,Yt){return Wt+Yt},0)},[ur.id,ur.maps]),cr=In&&se&&(Math.max(mt*se.length,rr)>We||!!ne),Bn=ce==="rtl",Xn=Ke()(et,(0,ze.Z)({},"".concat(et,"-rtl"),Bn),it),Kn=se||rt,xr=(0,ye.useRef)(),Kt=(0,ye.useRef)(),pn=(0,ye.useRef)(),En=(0,ye.useState)(0),An=(0,me.Z)(En,2),Jn=An[0],tr=An[1],dr=(0,ye.useState)(0),Zn=(0,me.Z)(dr,2),Rn=Zn[0],hr=Zn[1],Vt=(0,ye.useState)(!1),at=(0,me.Z)(Vt,2),Qt=at[0],Cn=at[1],Gn=function(){Cn(!0)},Te=function(){Cn(!1)},Be={getKey:wn};function Pt(Wt){tr(function(Yt){var yn;typeof Wt=="function"?yn=Wt(Yt):yn=Wt;var on=wr(yn);return xr.current.scrollTop=on,on})}var Et=(0,ye.useRef)({start:0,end:Kn.length}),Ze=(0,ye.useRef)(),Dt=St(Kn,wn),Xt=(0,me.Z)(Dt,1),tn=Xt[0];Ze.current=tn;var hn=ye.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:Kn.length-1,offset:void 0};if(!cr){var Wt;return{scrollHeight:((Wt=Kt.current)===null||Wt===void 0?void 0:Wt.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var Yt=0,yn,on,Dn,ar=Kn.length,Ut=0;Ut<ar;Ut+=1){var Rt=Kn[Ut],rn=wn(Rt),ln=ur.get(rn),Mn=Yt+(ln===void 0?mt:ln);Mn>=Jn&&yn===void 0&&(yn=Ut,on=Yt),Mn>Jn+We&&Dn===void 0&&(Dn=Ut),Yt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(We/mt)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Yt,start:yn,end:Dn,offset:on}},[cr,In,Jn,Kn,nr,We]),Zt=hn.scrollHeight,qt=hn.start,At=hn.end,xt=hn.offset;Et.current.start=qt,Et.current.end=At,ye.useLayoutEffect(function(){var Wt=ur.getRecord();if(Wt.size===1){var Yt=Array.from(Wt.keys())[0],yn=Wt.get(Yt),on=Kn[qt];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Yt){var ar=ur.get(Yt),Ut=ar-mt;Pt(function(Rt){return Rt+Ut})}}}ur.resetRecord()},[Zt]);var en=ye.useState({width:0,height:We}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],Wn=function(Yt){xn({width:Yt.offsetWidth,height:Yt.offsetHeight})},Yn=(0,ye.useRef)(),dn=(0,ye.useRef)(),Gt=ye.useMemo(function(){return Je(mn.width,ne)},[mn.width,ne]),gn=ye.useMemo(function(){return Je(mn.height,Zt)},[mn.height,Zt]),nn=Zt-We,Hn=(0,ye.useRef)(nn);Hn.current=nn;function wr(Wt){var Yt=Wt;return Number.isNaN(Hn.current)||(Yt=Math.min(Yt,Hn.current)),Yt=Math.max(Yt,0),Yt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Rn<=0,Cr=Rn>=ne,ir=dt(Qn,Lr,Mr,Cr),Nr=function(){return{x:Bn?-Rn:Rn,y:Jn}},gr=(0,ye.useRef)(Nr()),or=(0,de.zX)(function(Wt){if(Ct){var Yt=(0,He.Z)((0,He.Z)({},Nr()),Wt);(gr.current.x!==Yt.x||gr.current.y!==Yt.y)&&(Ct(Yt),gr.current=Yt)}});function Er(Wt,Yt){var yn=Wt;Yt?((0,ut.flushSync)(function(){hr(yn)}),or()):Pt(yn)}function Ar(Wt){var Yt=Wt.currentTarget.scrollTop;Yt!==Jn&&Pt(Yt),yt==null||yt(Wt),or()}var pr=function(Yt){var yn=Yt,on=ne?ne-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,on),yn},qn=(0,de.zX)(function(Wt,Yt){Yt?((0,ut.flushSync)(function(){hr(function(yn){var on=yn+(Bn?-Wt:Wt);return pr(on)})}),or()):Pt(function(yn){var on=yn+Wt;return on})}),jn=$t(In,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1];kt(In,xr,function(Wt,Yt,yn,on){var Dn=on;return ir(Wt,Yt,yn)?!1:!Dn||!Dn._virtualHandled?(Dn&&(Dn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Wt?Yt:0,deltaY:Wt?0:Yt}),!0):!1}),pe(cr,xr,function(Wt){Pt(function(Yt){return Yt+Wt})}),(0,Ae.Z)(function(){function Wt(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;In&&!on&&!Dn&&yn.preventDefault()}var Yt=xr.current;return Yt.addEventListener("wheel",Vr,{passive:!1}),Yt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),Yt.addEventListener("MozMousePixelScroll",Wt,{passive:!1}),function(){Yt.removeEventListener("wheel",Vr),Yt.removeEventListener("DOMMouseScroll",Jr),Yt.removeEventListener("MozMousePixelScroll",Wt)}},[In,Qn,Lr]),(0,Ae.Z)(function(){if(ne){var Wt=pr(Rn);hr(Wt),or({x:Wt})}},[mn.width,ne]);var Dr=function(){var Yt,yn;(Yt=Yn.current)===null||Yt===void 0||Yt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Hr=Ge(xr,Kn,ur,mt,wn,function(){return er(!0)},Pt,Dr);ye.useImperativeHandle(Ne,function(){return{nativeElement:pn.current,getScrollInfo:Nr,scrollTo:function(Yt){function yn(on){return on&&(0,gt.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Yt)?(Yt.left!==void 0&&hr(pr(Yt.left)),Hr(Yt.top)):Hr(Yt)}}}),(0,Ae.Z)(function(){if(Ie){var Wt=Kn.slice(qt,At+1);Ie(Wt,Kn)}},[qt,At,Kn]);var Fr=_e(Kn,wn,ur,mt),Zr=Ft==null?void 0:Ft({start:qt,end:At,virtual:cr,offsetX:Rn,offsetY:xt,rtl:Bn,getSize:Fr}),ii=De(Kn,qt,At,ne,Rn,mr,te,Be),Or=null;We&&(Or=(0,He.Z)((0,ze.Z)({},jt?"height":"maxHeight",We),Ue),In&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),Qt&&(Or.pointerEvents="none")));var Nn={};return Bn&&(Nn.dir="rtl"),ye.createElement("div",(0,ae.Z)({ref:pn,style:(0,He.Z)((0,He.Z)({},Ot),{},{position:"relative"}),className:Xn},Nn,cn),ye.createElement(ke.Z,{onResize:Wn},ye.createElement(ht,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Ar,onMouseEnter:Dr},ye.createElement(Re,{prefixCls:et,height:Zt,offsetX:Rn,offsetY:xt,scrollWidth:ne,onInnerResize:er,ref:Kt,innerProps:_t,rtl:Bn,extra:Zr},ii))),cr&&Zt>We&&ye.createElement(lt,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:Zt,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,spinSize:gn,containerSize:mn.height,style:It==null?void 0:It.verticalScrollBar,thumbStyle:It==null?void 0:It.verticalScrollBarThumb,showScrollBar:kn}),cr&&ne>mn.width&&ye.createElement(lt,{ref:dn,prefixCls:et,scrollOffset:Rn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,spinSize:Gt,containerSize:mn.width,horizontal:!0,style:It==null?void 0:It.horizontalScrollBar,thumbStyle:It==null?void 0:It.horizontalScrollBarThumb,showScrollBar:kn}))}var ve=ye.forwardRef(xe);ve.displayName="List";var Ee=ve,qe=Ee},93314:function(Nt){"use strict";Nt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Ke}});const ae=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,gt=(ke,de)=>(!de||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",He=(ke,de)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Ae=getComputedStyle(ke,null);return gt(Ae.overflowY,de)||gt(Ae.overflowX,de)||(ye=>{const ut=(je=>{if(!je.ownerDocument||!je.ownerDocument.defaultView)return null;try{return je.ownerDocument.defaultView.frameElement}catch(Re){return null}})(ye);return!!ut&&(ut.clientHeight<ye.scrollHeight||ut.clientWidth<ye.scrollWidth)})(ke)}return!1},ze=(ke,de,Ae,ye,ut,je,Re,Oe)=>je<ke&&Re>de||je>ke&&Re<de?0:je<=ke&&Oe<=Ae||Re>=de&&Oe>=Ae?je-ke-ye:Re>de&&Oe<Ae||je<ke&&Oe>Ae?Re-de+ut:0,me=ke=>{const de=ke.parentElement;return de==null?ke.getRootNode().host||null:de},Xe=(ke,de)=>{var Ae,ye,ut,je;if(typeof document=="undefined")return[];const{scrollMode:Re,block:Oe,inline:De,boundary:ot,skipOverflowHiddenElements:st}=de,St=typeof ot=="function"?ot:lt=>lt!==ot;if(!ae(ke))throw new TypeError("Invalid target");const bt=document.scrollingElement||document.documentElement,ft=[];let pt=ke;for(;ae(pt)&&St(pt);){if(pt=me(pt),pt===bt){ft.push(pt);break}pt!=null&&pt===document.body&&He(pt)&&!He(document.documentElement)||pt!=null&&He(pt,st)&&ft.push(pt)}const dt=(ye=(Ae=window.visualViewport)==null?void 0:Ae.width)!=null?ye:innerWidth,$t=(je=(ut=window.visualViewport)==null?void 0:ut.height)!=null?je:innerHeight,{scrollX:_e,scrollY:tt}=window,{height:Lt,width:Fe,top:Qe,right:Pe,bottom:Ye,left:zt}=ke.getBoundingClientRect(),{top:kt,right:Tt,bottom:vt,left:pe}=(lt=>{const Ce=window.getComputedStyle(lt);return{top:parseFloat(Ce.scrollMarginTop)||0,right:parseFloat(Ce.scrollMarginRight)||0,bottom:parseFloat(Ce.scrollMarginBottom)||0,left:parseFloat(Ce.scrollMarginLeft)||0}})(ke);let ue=Oe==="start"||Oe==="nearest"?Qe-kt:Oe==="end"?Ye+vt:Qe+Lt/2-kt+vt,Ge=De==="center"?zt+Fe/2-pe+Tt:De==="end"?Pe+Tt:zt-pe;const wt=[];for(let lt=0;lt<ft.length;lt++){const Ce=ft[lt],{height:Je,width:Se,top:rt,right:Ue,bottom:xe,left:ve}=Ce.getBoundingClientRect();if(Re==="if-needed"&&Qe>=0&&zt>=0&&Ye<=$t&&Pe<=dt&&(Ce===bt&&!He(Ce)||Qe>=rt&&Ye<=xe&&zt>=ve&&Pe<=Ue))return wt;const Ee=getComputedStyle(Ce),qe=parseInt(Ee.borderLeftWidth,10),we=parseInt(Ee.borderTopWidth,10),Ne=parseInt(Ee.borderRightWidth,10),Ve=parseInt(Ee.borderBottomWidth,10);let et=0,it=0;const We="offsetWidth"in Ce?Ce.offsetWidth-Ce.clientWidth-qe-Ne:0,mt="offsetHeight"in Ce?Ce.offsetHeight-Ce.clientHeight-we-Ve:0,ct="offsetWidth"in Ce?Ce.offsetWidth===0?0:Se/Ce.offsetWidth:0,jt="offsetHeight"in Ce?Ce.offsetHeight===0?0:Je/Ce.offsetHeight:0;if(bt===Ce)et=Oe==="start"?ue:Oe==="end"?ue-$t:Oe==="nearest"?ze(tt,tt+$t,$t,we,Ve,tt+ue,tt+ue+Lt,Lt):ue-$t/2,it=De==="start"?Ge:De==="center"?Ge-dt/2:De==="end"?Ge-dt:ze(_e,_e+dt,dt,qe,Ne,_e+Ge,_e+Ge+Fe,Fe),et=Math.max(0,et+tt),it=Math.max(0,it+_e);else{et=Oe==="start"?ue-rt-we:Oe==="end"?ue-xe+Ve+mt:Oe==="nearest"?ze(rt,xe,Je,we,Ve+mt,ue,ue+Lt,Lt):ue-(rt+Je/2)+mt/2,it=De==="start"?Ge-ve-qe:De==="center"?Ge-(ve+Se/2)+We/2:De==="end"?Ge-Ue+Ne+We:ze(ve,Ue,Se,qe,Ne+We,Ge,Ge+Fe,Fe);const{scrollLeft:Ot,scrollTop:se}=Ce;et=jt===0?0:Math.max(0,Math.min(se+et/jt,Ce.scrollHeight-Je/jt+mt)),it=ct===0?0:Math.max(0,Math.min(Ot+it/ct,Ce.scrollWidth-Se/ct+We)),ue+=se-et,Ge+=Ot-it}wt.push({el:Ce,top:et,left:it})}return wt},Le=ke=>ke===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ke(ke,de){if(!ke.isConnected||!(ut=>{let je=ut;for(;je&&je.parentNode;){if(je.parentNode===document)return!0;je=je.parentNode instanceof ShadowRoot?je.parentNode.host:je.parentNode}return!1})(ke))return;const Ae=(ut=>{const je=window.getComputedStyle(ut);return{top:parseFloat(je.scrollMarginTop)||0,right:parseFloat(je.scrollMarginRight)||0,bottom:parseFloat(je.scrollMarginBottom)||0,left:parseFloat(je.scrollMarginLeft)||0}})(ke);if((ut=>typeof ut=="object"&&typeof ut.behavior=="function")(de))return de.behavior(Xe(ke,de));const ye=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ut,top:je,left:Re}of Xe(ke,Le(de))){const Oe=je-Ae.top+Ae.bottom,De=Re-Ae.left+Ae.right;ut.scroll({top:Oe,left:De,behavior:ye})}}}}]);