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.
1106 lines
662 KiB
1106 lines
662 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[5888],{4887:function(){"use strict"},27431:function(Ft,zt){"use strict";zt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63089: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 Ft={},zt="5.0",fe={},oe=null,ct=!1,Fe=!1,Ze=null,me=!1,qe=null,Me=null,Ke=0;Ke<arguments.length;Ke++){var ke=arguments[Ke];if(ke!==null)switch(typeof ke){case"number":zt=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?zt=ke:Ze=ke;break;case"object":typeof ke.is3D!="undefined"?oe=ke:fe=ke;break;case"boolean":ct=ke,Fe=!0;break}}oe===null&&(oe={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&&!Fe&&(ct=!0)),Ze!==null&&fe.id===void 0&&(fe.id=Ze);var he="",Le="",we=!1,vt=null,Ve=null,Ie=null,We=!1,De=null,ut=null,dt=null,kt=null,wt=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var xt=function(be){return parseFloat(be)>4?parseFloat(be):5};Ft.setHTML5Codebase=function(be,Ge){Me=be,Ce(be,Ge)},Ft.setJavaCodebase=Ft.setJavaCodebaseVersion=Ft.isCompiledInstalled=Ft.setPreCompiledScriptPath=Ft.setPreCompiledResourcePath=function(){},Ft.setHTML5CodebaseVersion=function(be,Ge){var ze=parseFloat(be);if(ze!==NaN&&ze<5){console.log("The GeoGebra HTML5 codebase version "+ze+" is deprecated. Using version latest instead.");return}qe=be,se(be,Ge)},Ft.getHTML5CodebaseVersion=function(){return Ve},Ft.getParameters=function(){return fe},Ft.setFontsCSSURL=function(be){kt=be},Ft.setGiacJSURL=function(be){},Ft.setJNLPFile=function(be){he=be},Ft.setJNLPBaseDir=function(be){},Ft.inject=function(){function be(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ge="auto",ze=fe.id,ft,it=!1,ge=0;ge<arguments.length;ge++){var ve=arguments[ge];typeof ve=="string"?(ve=ve.toLowerCase(),ve.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ge=ve:ze=arguments[ge]):typeof ve=="boolean"?it=ve:ve instanceof HTMLElement&&(ft=ve)}Ee();function Ee(){if(!me){setTimeout(Ee,200);return}Ge=lt(Ge);var Xe=ft||document.getElementById(ze);if(!Xe){console.log("possibly bug on ajax loading? ");return}if(Ft.removeExistingApplet(Xe,!1),fe.width===void 0&&Xe.clientWidth&&(fe.width=Xe.clientWidth),fe.height===void 0&&Xe.clientHeight&&(fe.height=Xe.clientHeight),!(fe.width&&fe.height)&&Ge==="html5"&&(delete fe.width,delete fe.height),vt=Ge,Ge==="screenshot")Te(Xe,fe);else{var xe=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?xe=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(xe=(!gt()||be())&&yt()),xe?(vt="screenshot",Lt(Xe,fe,it,Ge)):$e(Xe,fe,it)}}};function gt(){try{return window.self!==window.top}catch(be){return!0}}function yt(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Ft.getViews=function(){return oe},Ft.isJavaInstalled=function(){return!1};var Xt=function(be){var Ge=function(ge){var ve=JSON.parse(ge),Ee=function(_e){return _e.type=="G"||_e.type=="E"},Xe=ve.elements?ve.elements.filter(Ee)[0]:ve;if(!Xe||!Xe.url){ze();return}fe.fileName=Xe.url,Re(Xe.settings||{}),oe.is3D=!0;var xe="https://www.geogebra.org/images/";Ft.setPreviewImage(De||Xe.previewUrl,xe+"GeoGebra_loading.png",xe+"applet_play.png"),be()},ze=function(){fe.onError&&fe.onError(),je("Error: Fetching material (id "+fe.material_id+") failed.",fe)},ft=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",it="/materials/"+fe.material_id+"?scope=basic";Je("https://"+ft+"/api/proxy.php?path="+encodeURIComponent(it),Ge,ze)};function Re(be){var Ge=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ze){be[ze]=!!be[ze]}),Ge.forEach(function(ze){fe[ze]===void 0&&be[ze]!==void 0&&(fe[ze]=be[ze])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Je(be,Ge,ze){var ft=new XMLHttpRequest;ft.open("GET",be),ft.onload=function(){Ge(ft.responseText)},ft.onerror=ze,ft.send()}Ft.isHTML5Installed=function(){return!0},Ft.getLoadedAppletType=function(){return vt},Ft.setPreviewImage=function(be,Ge,ze){De=be,ut=Ge,dt=ze},Ft.removeExistingApplet=function(be,Ge){var ze;typeof be=="string"&&(be=document.getElementById(be)),vt=null;var ft=null;for(ze=0;ze<be.childNodes.length;ze++){var it=be.childNodes[ze],ge=it.className;ge==="applet_screenshot"?Ge?(it.style.display="block",vt="screenshot"):it.style.display="none":ge!=="applet_scaler prerender"&&(be.removeChild(it),ft=ge&&ge.indexOf("appletParameters")!=-1?it.id:null,ze--)}var ve=fe.id!==void 0?fe.id:ft,Ee=window[ve];Ee&&typeof Ee.getBase64=="function"&&(Ee.remove(),window[ve]=null)},Ft.refreshHitPoints=function(){if(xt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var be=Ft.getAppletObject();return be&&typeof be.recalculateEnvironments=="function"?(be.recalculateEnvironments(),!0):!1},Ft.startAnimation=function(){var be=Ft.getAppletObject();return be&&typeof be.startAnimation=="function"?(be.startAnimation(),!0):!1},Ft.stopAnimation=function(){var be=Ft.getAppletObject();return be&&typeof be.stopAnimation=="function"?(be.stopAnimation(),!0):!1},Ft.getAppletObject=function(){var be=fe.id!==void 0?fe.id:"ggbApplet";return window[be]},Ft.resize=function(){};var Ct=function(be,Ge,ze){var ft=document.createElement("param");ft.setAttribute("name",Ge),ft.setAttribute("value",ze),be.appendChild(ft)},Ne=function(be){return be&&be!=="false"},$e=function(be,Ge,ze){xt(Ve)<=4.2&&(ze=!0);var ft=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ve||ggbHTML5LoadedCodebaseIsWebSimple&&!We)&&(ft=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var it=document.createElement("div");it.classList.add("appletParameters","notranslate");var ge=Ge.width,ve=Ge.height;if(Ge.disableAutoScale=Ge.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ge.disableAutoScale,Ge.width!==void 0)if(xt(Ve)<=4.4)Ne(Ge.showToolBar)&&(Ge.height-=7),Ne(Ge.showAlgebraInput)&&(Ge.height-=37),Ge.width<605&&Ne(Ge.showToolBar)&&(Ge.width=605,ge=605);else{var Ee=100;(Ne(Ge.showToolBar)||Ne(Ge.showMenuBar))&&(Ge.hasOwnProperty("customToolBar")&&(Ge.customToolbar=Ge.customToolBar),Ee=Ne(Ge.showMenuBar)?245:155),ge<Ee&&(Ge.width=Ee,ge=Ee)}it.style.border="none",it.style.display="inline-block";for(var Xe in Ge)Ge.hasOwnProperty(Xe)&&Xe!=="appletOnLoad"&&it.setAttribute("data-param-"+Xe,Ge[Xe]);kt&&it.setAttribute("data-param-fontscssurl",kt),Ft.resize=function(){GGBAppletUtils.responsiveResize(be,Ge)},window.addEventListener("resize",function(ee){Ft.resize()});var xe=typeof Ge.appletOnLoad=="function"?Ge.appletOnLoad:function(){};if(!ze&&Ge.width!==void 0){Ge.hasOwnProperty("showSplash")||it.setAttribute("data-param-showSplash","false");var _e=be.querySelector(".applet_scaler.prerender"),Be=_e!==null;if(Be)var et=_e.querySelector(".ggb_preview");else{var et=st(ge,ve,Ge.borderColor,!1);_e=document.createElement("div"),_e.className="applet_scaler",_e.style.position="relative",_e.style.display="block",_e.style.width=ge+"px",_e.style.height=ve+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(_e,"66%"),xt(Ve)>=5?(Ge.appletOnLoad=function(ee){var ie=be.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(_e),window.GGBT_wsf_view&&$(window).trigger("resize"),xe(ee)},Be||_e.appendChild(et)):it.appendChild(et),_e.appendChild(it),Be||be.appendChild(_e),setTimeout(function(){Ft.resize()},1)}else{var at=document.createElement("div");at.className="applet_scaler",at.style.position="relative",at.style.display="block",at.appendChild(it),be.appendChild(at),Ge.appletOnLoad=function(ee){Ft.resize(),xe(ee)}}function Qe(ee,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,ie.appletOnLoad):renderGGBElement(ee),je("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function ht(ee,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(le){Qe(le.article,le.params)}),html5AppletsToProcess=null)},xt(Ve)<5&&(ee.className+=" geogebraweb")):Qe(ee,ie)}if(ft){scriptLoadStarted=!0;for(var Et=0;Et<it.childNodes.length;Et++){var Ut=it.childNodes[Et].tagName;Ut==="TABLE"&&(it.removeChild(it.childNodes[Et]),Et--)}if(ggbHTML5LoadedScript!==null){var Bt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Bt!=null&&Bt.parentNode.removeChild(Bt)}var ue=document.createElement("script"),te=function(){ht(it,Ge)};ue.src=Le+Ie,ggbHTML5LoadedCodebaseIsWebSimple=We,ggbHTML5LoadedCodebaseVersion=Ve,ggbHTML5LoadedScript=ue.src,je("GeoGebra HTML5 codebase loaded: '"+Le+"'.",Ge),!Me&&(!qe||qe=="5.0")?(We?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):Le.requirejs?__webpack_require__.e(6954).then(function(){var ee=[__webpack_require__(76954)];te.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(ue.onload=te,be.appendChild(ue))}else ht(it,Ge);Ge.height=ve,Ge.width=ge},Te=function(be,Ge,ze){var ft=st(Ge.width,Ge.height,Ge.borderColor,ze),it=document.createElement("div");it.style.position="relative",it.style.display="block",it.style.width=Ge.width+"px",it.style.height=Ge.height+"px",it.className="applet_screenshot applet_scaler"+(ze?" applet_screenshot_play":""),it.appendChild(ft);var ge=GGBAppletUtils.getScale(Ge,be,ze);ze?(be.appendChild(rt()),window.GGBT_wsf_view||(be.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(it,"66%"),be.appendChild(it),ge!==1&&!isNaN(ge)&&(GGBAppletUtils.scaleElement(it,ge),it.style.width=Ge.width+"px",it.style.height=Ge.height+"px",it.parentNode.style.width=Ge.width*ge+"px",it.parentNode.style.height=Ge.height*ge+"px"),Ft.resize=function(){Ye(be,ft,it,ze)},window.addEventListener("resize",function(ve){Ft.resize()}),Ft.resize()};function Ye(be,Ge,ze,ft){if(be.contains(Ge)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(be.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(be)}var it=GGBAppletUtils.getScale(fe,be,ft);ze.parentNode!==null&&(!isNaN(it)&&it!==1?(GGBAppletUtils.scaleElement(ze,it),ze.parentNode.style.width=fe.width*it+"px",ze.parentNode.style.height=fe.height*it+"px"):(GGBAppletUtils.scaleElement(ze,1),ze.parentNode.style.width=fe.width+"px",ze.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(be),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Ft.onExitFullscreen=function(be,Ge){Ge.appendChild(be)};var Lt=function(be,Ge,ze,ft){Te(be,Ge,!0);for(var it=function(){var Ee=[];for(ve=0;ve<be.childNodes.length;ve++)Ee.push(be.childNodes[ve]);if(window.GGBT_wsf_view){var Xe=window.GGBT_wsf_view.renderFullScreen(be,Ge.id),xe=document.getElementById("fullscreencontainer"),_e=jQuery(be).find(".fullscreencontent");_e.length>0?(Xe.remove(),_e.attr("id","fullscreencontent").show(),jQuery(xe).append(_e),window.dispatchEvent(new Event("resize"))):$e(Xe,Ge,!1),window.GGBT_wsf_view.launchFullScreen(xe)}else vt=ft,$e(be,Ge,!1);if(!window.GGBT_wsf_view)for(ve=0;ve<Ee.length;ve++)be.removeChild(Ee[ve])},ge=be.getElementsByClassName("ggb_preview_play"),ve=0;ve<ge.length;ve++)ge[ve].addEventListener("click",it,!1),ge[ve].addEventListener("ontouchstart",it,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(be),yt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},rt=function(){var be=document.createElement("div");if(be.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ge='.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");}',ze=document.createElement("style");ze.styleSheet?ze.styleSheet.cssText=Ge:ze.appendChild(document.createTextNode(Ge)),document.getElementsByTagName("head")[0].appendChild(ze)}return be},st=function(be,Ge,ze,ft){var it=document.createElement("div");it.className="ggb_preview",it.style.position="absolute",it.style.zIndex="90",it.style.width=be-2+"px",it.style.height=Ge-2+"px",it.style.top="0px",it.style.left="0px",it.style.overflow="hidden",it.style.backgroundColor="white";var ge="lightgrey";ze!==void 0&&(ze==="none"?ge="transparent":ge=ze),it.style.border="1px solid "+ge;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,ut!==null){var Ee,Xe,xe;if(!ft){Ee=document.createElement("img"),Ee.style.position="absolute",Ee.style.zIndex="1001",Ee.style.opacity=1,ve.style.opacity=.3,Xe=360,Xe>be/4*3&&(Xe=be/4*3),xe=Xe/5.8,Ee.setAttribute("src",ut),Ee.setAttribute("width",Xe),Ee.setAttribute("height",xe);var _e=(be-Xe)/2,Be=(Ge-xe)/2;Ee.style.left=_e+"px",Ee.style.top=Be+"px",it.appendChild(Ee)}}return it.appendChild(ve),it},lt=function(be){return be=be.toLowerCase(),be==="html5"||be==="screenshot"?be:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],se=function(be,Ge){if(Ve=be,Ge){Ce(Ve,!0);return}var ze=!ct;if(ze){var ft=xt(Ve);!isNaN(ft)&&ft<4.4&&(ze=!1)}var it,ge;window.location.protocol.substr(0,4)==="http"?it=window.location.protocol:it="http:";var ve=Ve.indexOf("//");ve>0?ge=Ve:ve===0?ge=it+Ve:ge="https://www.geogebra.org/apps/5.2.814.0/";for(var Ee in pe)if(Ve.slice(pe[Ee].length*-1)===pe[Ee]||Ve.slice((pe[Ee].length+1)*-1)===pe[Ee]+"/"){Ce(ge,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ze&&!oe.is3D&&!oe.AV&&!oe.SV&&!oe.CV&&!oe.EV2&&!oe.CP&&!oe.PC&&!oe.DA&&!oe.FI&&!oe.PV&&!Ne(fe.showToolBar)&&!Ne(fe.showMenuBar)&&!Ne(fe.showAlgebraInput)&&!Ne(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?ge+="webSimple/":ge+="web3d/",Ce(ge,!1)},Ce=function(be,Ge){if(be.requirejs){Le=be;return}be.slice(-1)!=="/"&&(be+="/"),Le=be,Ge===null&&(Ge=be.indexOf("http")===-1),we=Ge,Ie="web.nocache.js",We=!1;var ze=Le.split("/");ze.length>1&&(!Ge&&ze[ze.length-2]==="webSimple"?(Ie="webSimple.nocache.js",We=!0):pe.indexOf(ze[ze.length-2])>=0&&(Ie=ze[ze.length-2]+".nocache.js")),ze=be.split("/"),Ve=ze[ze.length-3],Ve.substr(0,4)==="test"?Ve=Ve.substr(4,1)+"."+Ve.substr(5,1):(Ve.substr(0,3)==="war"||Ve.substr(0,4)==="beta")&&(Ve="5.0");var ft=parseFloat(Ve);ft!==NaN&&ft<5&&be.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+ft+" is deprecated. Using version latest instead."),se("5.0",Ge))},je=function(be,Ge){window.console&&window.console.log&&(!Ge||typeof Ge.showLogging=="undefined"||Ge.showLogging&&Ge.showLogging!=="false")&&console.log(be)};fe.material_id!==void 0?Xt(tt):tt();function tt(){var be=zt;qe!==null?be=qe:parseFloat(be)<5&&(be="5.0"),se(be,!1),Me!==null&&Ce(Me,we),me=!0}return Ft},GGBAppletUtils=function(){"use strict";function Ft(){return window.GGBT_wsf_edit!==void 0}function zt(me,qe){qe!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+qe+","+qe+")",me.style.webkitTransform="scale("+qe+","+qe+")",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,qe,Me,Ke,ke,he){var Le=null;if(he!=null&&he!="")for(var we=me.parentNode;we!=null;)if((" "+we.className+" ").indexOf(" "+he+" ")>-1){Le=we;break}else we=we.parentNode;var vt=0,Ve=0,Ie=0,We=0,De=0,ut=0,dt=0;if(Le)vt=Le.offsetWidth,Ve=Math.max(Ke?Le.offsetWidth:0,Le.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(vt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=vt):(vt=window.innerWidth,Ve=window.innerHeight,Ie=window.innerWidth),me){var kt=me.getBoundingClientRect();kt.left>0&&kt.left<=vt&&(ke===void 0||!ke)&&(document.dir==="rtl"?(De=vt-kt.width-kt.left,ut=Ie<=480?10:30):(ut=kt.left,De=Ie<=480?10:30),We=ut+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(We=40,dt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(We=0,dt=40)}}return me&&((Me===void 0||!Me)&&qe>0&&qe+We<vt?vt=qe:vt-=We,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Ve-=dt)),{width:vt,height:Ve}}function oe(me,qe,Me,Ke,ke){if(me.isScreenshoGenerator)return 1;var he=Ke!==void 0&&Ke,Le=me.noScaleMargin!=null&&me.noScaleMargin,we=function(wt){return wt&&wt!=="false"},vt=we(me.autoHeight),Ve=fe(qe,me.width,Me,vt,he&&window.GGBT_wsf_view||Le,ke),Ie=parseInt(Ve.width),We=me.width,De=me.height;if(We===void 0){var ut=qe.querySelector(".appletParameters");ut&&(We=ut.offsetWidth,De=ut.offsetHeight)}var dt=Ie/We,kt=he?1:Ve.height/De;return Me!==void 0&&!Me&&(dt=Math.min(1,dt),kt=Math.min(1,kt)),Math.min(dt,kt)}function ct(me,qe,Me){var Ke=1,ke,he=!1;if(me.hasOwnProperty("allowUpscale")&&(he=me.allowUpscale),me.hasOwnProperty("scale")&&(Ke=parseFloat(me.scale),(isNaN(Ke)||Ke===null||Ke===0)&&(Ke=1),Ke>1&&(he=!0)),qe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))ke=oe(me,qe,he,Me,me.scaleContainerClass);else return Ke;return he&&(!me.hasOwnProperty("scale")||Ke===1)?ke:Math.min(Ke,ke)}function Fe(me){var qe=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=me.getBoundingClientRect(),ke=(qe-Ke.width)/2,he=(Me-Ke.height)/2;he<0&&(he=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=he+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(he<40?me.style.top="40px":me.style.top=he+"px",me.style.left=ke+"px")}function Ze(me,qe){var Me=me.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(qe.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var Ke=ct(qe,me);Ft()&&Me.setAttribute("data-param-scale",Ke);for(var ke=null,he=0;he<me.childNodes.length;he++)if(me.childNodes[he].className!==void 0&&me.childNodes[he].className.match(/^applet_scaler/)){ke=me.childNodes[he];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Le=qe.id!==void 0?qe.id:"ggbApplet",we=window[Le];(we==null||!we.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ke)&&Ke!==1?(ke.parentNode.style.width=qe.width*Ke+"px",ke.parentNode.style.height=qe.height*Ke+"px",zt(ke,Ke)):(zt(ke,1),ke.parentNode.style.width=qe.width+"px",ke.parentNode.style.height=qe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:Ze,isFlexibleWorksheetEditor:Ft,positionCenter:Fe,getScale:ct,scaleElement:zt}}();__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 Ft=n.location.search;return Ft.indexOf(J)!=-1||Ft.indexOf(K)!=-1}function q(Ft,zt){}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(Ft){var zt=s[L].bindings;s[L].bindings=function(){for(var fe=zt?zt():{},oe=Ft[webModule.__softPermutationId],ct=O;ct<oe.length;ct++){var Fe=oe[ct];fe[Fe[O]]=Fe[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Ft=o.createElement(Q);if(Ft.id=L,Ft.style.cssText=R+S,Ft.tabIndex=-1,o.body.appendChild(Ft),t=Ft.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var zt=document.compatMode==U?V:W;t.write(zt+X),t.close()}}}function w(Ft){function zt(oe){function ct(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=ct();if(Fe){oe();return}function Ze(){if(!Fe){if(!ct())return;Fe=!0,oe(),o.removeEventListener&&o.removeEventListener(Z,Ze,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,Ze,!1);var me=setInterval(function(){Ze()},$)}function fe(oe){var ct=u(),Fe=ct.body,Ze=ct.createElement(_);Ze.language=ab,Ze.crossOrigin=W,Ze.src=oe,webModule.__errFn&&(Ze.onerror=function(){webModule.__errFn(L,new Error(bb+oe))}),Fe.appendChild(Ze)}zt(function(){fe(Ft)})}webModule.__startLoadingFragment=function(Ft){return C(Ft)},webModule.__installRunAsyncCode=function(Ft){var zt=u(),fe=zt.body,oe=zt.createElement(_);oe.language=ab,oe.text=Ft,fe.appendChild(oe),fe.removeChild(oe)};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(Ft){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ft){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ft){var zt=c[Ft];return zt==null?null:zt},r=d,webModule.__errFn=e}function B(){function Ft(me){var qe=me.lastIndexOf(rb);qe==-1&&(qe=me.length);var Me=me.indexOf(sb);Me==-1&&(Me=me.length);var Ke=me.lastIndexOf(tb,Math.min(Me,qe));return Ke>=O?me.substring(O,Ke+P):W}function zt(me){if(!me.match(/^\w+:\/\//)){var qe=o.createElement(ub);qe.src=me+vb,me=Ft(qe.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function oe(){for(var me=o.getElementsByTagName(_),qe=O;qe<me.length;++qe)if(me[qe].src.indexOf(xb)!=-1)return Ft(me[qe].src);return W}function ct(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Fe(){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=oe()),Ze==W&&(Ze=ct()),Ze==W&&Fe()&&(Ze=Ft(o.location.href)),Ze=zt(Ze),Ze}function C(Ft){return Ft.match(/^\//)||Ft.match(/^[a-zA-Z]+:\/\//)?Ft:webModule.__moduleBase+Ft}function D(){var Ft=[],zt=O,fe=[],oe=[];function ct(me){var qe=oe[me](),Me=fe[me];if(qe in Me)return qe;var Ke=[];for(var ke in Me)Ke[Me[ke]]=ke;throw r&&r(me,Ke,qe),null}if(__gwt_isKnownPropertyValue=function(me,qe){return qe in fe[me]},webModule.__getPropMap=function(){var me={};for(var qe in fe)fe.hasOwnProperty(qe)&&(me[qe]=ct(qe));return me},webModule.__computePropValue=ct,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var Ze=Fe.indexOf(Db);Ze!=-1&&(zt=parseInt(Fe.substring(Ze+P),$),Fe=Fe.substring(O,Ze))}catch(me){}return webModule.__softPermutationId=zt,C(Fe+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})()},88457:function(Ft,zt,fe){"use strict";fe.d(zt,{Ax:function(){return Ze},Ds:function(){return me},KI:function(){return Me},SI:function(){return Fe},f1:function(){return ct}});var oe=fe(78323);function ct(Ke){let ke=!0;if(Ke.length>0){for(let he=0;he<Ke.length;he++)if(Ke[he].compile_success==0||!Ke[he].compile_success){ke=!1;break}}else ke=!1;return ke}function Fe(Ke,ke=""){let he=[];for(let Le=0;Le<Ke.length;Le++){let we=Ke[Le],vt=ke?`${ke}/${we.name}`:`${we.name}`;he.push({title:we.name,type:we.type,isLeaf:we.type!=="tree",key:vt})}return he}function Ze(Ke,ke,he){for(let Le=0;Le<Ke.length;Le++){let we=Ke[Le];if(we.key===ke){we.children=he;break}we.children&&Ze(we.children,ke,he)}return Ke}function me(Ke,ke,he){let Le;return function(){let we=this,vt=arguments,Ve=function(){Le=null,he||Ke.apply(we,vt)},Ie=he&&!Le;clearTimeout(Le),Le=setTimeout(Ve,ke),Ie&&Ke.apply(we,vt)}}const qe=!0,Me=oe.Z.API_SERVER},37875:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ye}});var oe=fe(59301),ct=fe(95392),Fe=fe(62673),Ze=fe(12893),me=fe(32134),qe=fe(57193),Me=fe(28284),Ke=fe(82326),ke={},he=Object.defineProperty,Le=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ve=(Lt,rt,st)=>rt in Lt?he(Lt,rt,{enumerable:!0,configurable:!0,writable:!0,value:st}):Lt[rt]=st,Ie=(Lt,rt)=>{for(var st in rt||(rt={}))we.call(rt,st)&&Ve(Lt,st,rt[st]);if(Le)for(var st of Le(rt))vt.call(rt,st)&&Ve(Lt,st,rt[st]);return Lt},We=(Lt,rt,st)=>new Promise((lt,pe)=>{var se=tt=>{try{je(st.next(tt))}catch(be){pe(be)}},Ce=tt=>{try{je(st.throw(tt))}catch(be){pe(be)}},je=tt=>tt.done?lt(tt.value):Promise.resolve(tt.value).then(se,Ce);je((st=st.apply(Lt,rt)).next())});const De=Fe.default.Group,ut=({classroomList:Lt,loading:rt,user:st,exercise_id:lt=null,homework_common_id:pe=null,setitem:se,item:Ce,type:je,rz:tt,dispatch:be})=>{var Ge,ze,ft,it,ge,ve,Ee,Xe;const[xe,_e]=(0,oe.useState)([]);let[Be,et]=(0,oe.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20});const at=(0,ct.useParams)(),[Qe,ht]=(0,oe.useState)(!1),[Et,Ut]=(0,oe.useState)(!1),[Bt]=Me.default.useForm();(0,oe.useEffect)(()=>{tt&&(Be.zydatas=tt,et(Ie({},Be)),Ce!=null&&Ce.ec_course_id&&ue())},[Ce,tt]);function ue(){return We(this,null,function*(){console.log("----",Ce),yield te(Ce==null?void 0:Ce.ec_major_school_id),yield ee(Ce==null?void 0:Ce.ec_year_id),yield ie(Ce==null?void 0:Ce.ec_course_id),Bt.setFieldsValue({ec_course_id:Ce==null?void 0:Ce.ec_course_id,ec_major_school_id:Ce==null?void 0:Ce.ec_major_school_id,ec_point_ids:Ce==null?void 0:Ce.ec_point_ids,ec_year_id:Ce==null?void 0:Ce.ec_year_id})})}function te(le){return We(this,null,function*(){const ne=yield(0,qe.ZP)(`/api/ec_major_schools/${le}/ec_years/get_year_list.json`,{method:"get"});Be.jbdatas=ne==null?void 0:ne.data,et(Ie({},Be)),Bt.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]})})}function ee(le){return We(this,null,function*(){const ne=yield(0,qe.ZP)(`/api/ec_years/${le}/ec_courses/get_courses.json`,{method:"get"});Be.kcdatas=ne==null?void 0:ne.data,et(Ie({},Be)),Bt.setFieldsValue({ec_course_id:"",ec_point_ids:[]})})}const ie=le=>We(void 0,null,function*(){const ne=yield(0,qe.ZP)(`/api/ec_courses/${le}/ec_points.json`,{method:"get",params:{ec_course_id:le}});Be.zsdatas=ne==null?void 0:ne.data,et(Ie({},Be))});return oe.createElement("div",{className:ke.from},oe.createElement(Me.default,{form:Bt,layout:"inline",onValuesChange:le=>{console.log("----",le),le.ec_major_school_id&&(Be.jbdatas=[],Be.kcdatas=[],Be.zsdatas=[],et(Ie({},Be)),te(le.ec_major_school_id)),le.ec_year_id&&(Be.kcdatas=[],Be.zsdatas=[],et(Ie({},Be)),ee(le.ec_year_id)),le.ec_course_id&&(Be.zsdatas=[],et(Ie({},Be)),ie(le.ec_course_id))},onFinish:le=>We(void 0,null,function*(){se(le)})},oe.createElement(Me.default.Item,{label:"\u8BA4\u8BC1\u4E13\u4E1A",name:"ec_major_school_id"},oe.createElement(Ke.default,{style:{width:150},disabled:((Ge=Be.zydatas)==null?void 0:Ge.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},(ze=Be==null?void 0:Be.zydatas)==null?void 0:ze.map((le,ne)=>oe.createElement(Ke.default.Option,{key:ne,value:le==null?void 0:le.ec_major_school_id},le==null?void 0:le.name)))),oe.createElement(Me.default.Item,{label:"\u8BA4\u8BC1\u5C4A\u522B",name:"ec_year_id"},oe.createElement(Ke.default,{style:{width:150},disabled:((ft=Be.jbdatas)==null?void 0:ft.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B"},(it=Be==null?void 0:Be.jbdatas)==null?void 0:it.map((le,ne)=>oe.createElement(Ke.default.Option,{key:ne,value:le==null?void 0:le.ec_year_id},le==null?void 0:le.year)))),oe.createElement(Me.default.Item,{label:"\u8BFE\u7A0B",name:"ec_course_id"},oe.createElement(Ke.default,{style:{width:150},disabled:((ge=Be.kcdatas)==null?void 0:ge.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"},(ve=Be==null?void 0:Be.kcdatas)==null?void 0:ve.map((le,ne)=>oe.createElement(Ke.default.Option,{key:ne,value:le==null?void 0:le.id},le==null?void 0:le.name)))),oe.createElement(Me.default.Item,{label:"\u77E5\u8BC6\u70B9",name:"ec_point_ids"},oe.createElement(Ke.default,{onChange:()=>{Bt.submit()},style:{width:150},mode:"multiple",disabled:((Ee=Be.zsdatas)==null?void 0:Ee.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"},(Xe=Be==null?void 0:Be.zsdatas)==null?void 0:Xe.map((le,ne)=>oe.createElement(Ke.default.Option,{key:ne,value:le==null?void 0:le.id},le==null?void 0:le.name))))))};var dt=(0,ct.connect)(({classroomList:Lt,loading:rt,globalSetting:st,user:lt})=>({classroomList:Lt,globalSetting:st,loading:rt.effects,user:lt}))(ut),kt=Object.defineProperty,wt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Re=(Lt,rt,st)=>rt in Lt?kt(Lt,rt,{enumerable:!0,configurable:!0,writable:!0,value:st}):Lt[rt]=st,Je=(Lt,rt)=>{for(var st in rt||(rt={}))yt.call(rt,st)&&Re(Lt,st,rt[st]);if(gt)for(var st of gt(rt))Xt.call(rt,st)&&Re(Lt,st,rt[st]);return Lt},Ct=(Lt,rt)=>wt(Lt,xt(rt)),Ne=(Lt,rt,st)=>new Promise((lt,pe)=>{var se=tt=>{try{je(st.next(tt))}catch(be){pe(be)}},Ce=tt=>{try{je(st.throw(tt))}catch(be){pe(be)}},je=tt=>tt.done?lt(tt.value):Promise.resolve(tt.value).then(se,Ce);je((st=st.apply(Lt,rt)).next())});const $e=Fe.default.Group,Te=({classroomList:Lt,loading:rt,user:st,exercise_id:lt=null,homework_common_id:pe=null,setitem:se,type:Ce,dispatch:je})=>{var tt,be,Ge;let[ze,ft]=(0,oe.useState)([{}]),[it,ge]=(0,oe.useState)([]);function ve(){return Ne(this,null,function*(){var Xe,xe,_e;let Be=yield(0,qe.ZP)("/api/ec_courses/0/ec_points/get_work_points.json",{method:"get",params:{exercise_id:lt,homework_common_id:pe}});if(((Xe=Be==null?void 0:Be.data)==null?void 0:Xe.length)>0){let et=[];(xe=Be==null?void 0:Be.data)==null||xe.map(at=>{var Qe;(Qe=at==null?void 0:at.ec_point_ids)==null||Qe.map(ht=>{et.push(ht)})}),se(Ct(Je({},(_e=Be==null?void 0:Be.data)==null?void 0:_e[0]),{ec_point_ids:et})),ft(Be==null?void 0:Be.data)}})}(0,oe.useEffect)(()=>{var Xe,xe;(xe=(Xe=st==null?void 0:st.userInfo)==null?void 0:Xe.course)!=null&&xe.course_school_id&&Ee()},[(be=(tt=st==null?void 0:st.userInfo)==null?void 0:tt.course)==null?void 0:be.course_school_id]);function Ee(){return Ne(this,null,function*(){var Xe,xe;const _e=yield(0,qe.ZP)(`/api/schools/${(xe=(Xe=st==null?void 0:st.userInfo)==null?void 0:Xe.course)==null?void 0:xe.course_school_id}/ec_majors/get_major_list.json`,{method:"get"});ge(_e==null?void 0:_e.data),(pe||lt)&&ve()})}return oe.createElement("div",{style:{display:(Ge=st.userInfo.course)!=null&&Ge.is_openengineering?"":"none"}},oe.createElement("p",{style:{fontSize:"16px",fontWeight:400}},"\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"),ze==null?void 0:ze.map((Xe,xe)=>oe.createElement("div",{key:xe,style:{display:"flex",alignItems:"center",marginBottom:"10px"}},oe.createElement(dt,{rz:it,item:Xe,type:xe,setitem:_e=>{ze.splice(xe,1,_e),ft([...ze]);let Be=[];ze==null||ze.map(et=>{var at;(at=et==null?void 0:et.ec_point_ids)==null||at.map(Qe=>{Be.push(Qe)})}),se(Ct(Je({},_e),{ec_point_ids:Be}))}}),xe!=0&&oe.createElement(Ze.Z,{onClick:()=>{ze.splice(xe,1),ft([...ze])},style:{marginLeft:10,fontSize:"20px"}}),oe.createElement(me.Z,{onClick:()=>{ze.push({}),ft([...ze])},style:{marginLeft:10,fontSize:"20px"}}))))};var Ye=(0,ct.connect)(({classroomList:Lt,loading:rt,globalSetting:st,user:lt})=>({classroomList:Lt,globalSetting:st,loading:rt.effects,user:lt}))(Te)},54344:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return Bt}});var oe=fe(59301),ct={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=fe(92310),Ze=fe.n(Fe),me=fe(29787);var qe=function(ue,te){return(qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ie){ee.__proto__=ie}||function(ee,ie){for(var le in ie)Object.prototype.hasOwnProperty.call(ie,le)&&(ee[le]=ie[le])})(ue,te)};function Me(ue,te){function ee(){this.constructor=ue}qe(ue,te),ue.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function Ke(ue,te,ee,ie){return new(ee||(ee=Promise))(function(le,ne){function ye(Dt){try{mt(ie.next(Dt))}catch(He){ne(He)}}function bt(Dt){try{mt(ie.throw(Dt))}catch(He){ne(He)}}function mt(Dt){var He;Dt.done?le(Dt.value):(He=Dt.value,He instanceof ee?He:new ee(function(Ht){Ht(He)})).then(ye,bt)}mt((ie=ie.apply(ue,te||[])).next())})}function ke(ue,te){var ee,ie,le,ne,ye={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:bt(0),throw:bt(1),return:bt(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function bt(mt){return function(Dt){return function(He){if(ee)throw new TypeError("Generator is already executing.");for(;ye;)try{if(ee=1,ie&&(le=2&He[0]?ie.return:He[0]?ie.throw||((le=ie.return)&&le.call(ie),0):ie.next)&&!(le=le.call(ie,He[1])).done)return le;switch(ie=0,le&&(He=[2&He[0],le.value]),He[0]){case 0:case 1:le=He;break;case 4:return ye.label++,{value:He[1],done:!1};case 5:ye.label++,ie=He[1],He=[0];continue;case 7:He=ye.ops.pop(),ye.trys.pop();continue;default:if(le=ye.trys,!((le=le.length>0&&le[le.length-1])||He[0]!==6&&He[0]!==2)){ye=0;continue}if(He[0]===3&&(!le||He[1]>le[0]&&He[1]<le[3])){ye.label=He[1];break}if(He[0]===6&&ye.label<le[1]){ye.label=le[1],le=He;break}if(le&&ye.label<le[2]){ye.label=le[2],ye.ops.push(He);break}le[2]&&ye.ops.pop(),ye.trys.pop();continue}He=te.call(ue,ye)}catch(Ht){He=[6,Ht],ie=0}finally{ee=le=0}if(5&He[0])throw He[1];return{value:He[0]?He[1]:void 0,done:!0}}([mt,Dt])}}}function he(){for(var ue=0,te=0,ee=arguments.length;te<ee;te++)ue+=arguments[te].length;var ie=Array(ue),le=0;for(te=0;te<ee;te++)for(var ne=arguments[te],ye=0,bt=ne.length;ye<bt;ye++,le++)ie[le]=ne[ye];return ie}var Le=function(){function ue(){}return ue.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ue.setAttributes=function(te,ee){for(var ie=0,le=ee;ie<le.length;ie++){var ne=le[ie],ye=ne[0],bt=ne[1];te.setAttribute(ye,bt)}},ue.createRect=function(te,ee,ie){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",te.toString()),le.setAttribute("height",ee.toString()),ie&&ue.setAttributes(le,ie),le},ue.createLine=function(te,ee,ie,le,ne){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",te.toString()),ye.setAttribute("y1",ee.toString()),ye.setAttribute("x2",ie.toString()),ye.setAttribute("y2",le.toString()),ne&&ue.setAttributes(ye,ne),ye},ue.createPolygon=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),ee&&ue.setAttributes(ie,ee),ie},ue.createCircle=function(te,ee){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()),ee&&ue.setAttributes(ie,ee),ie},ue.createEllipse=function(te,ee,ie){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(te/2).toString()),le.setAttribute("cy",(ee/2).toString()),le.setAttribute("rx",(te/2).toString()),le.setAttribute("ry",(ee/2).toString()),ie&&ue.setAttributes(le,ie),le},ue.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ue.setAttributes(ee,te),ee},ue.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ue.createMarker=function(te,ee,ie,le,ne,ye,bt){var mt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ue.setAttributes(mt,[["id",te],["orient",ee],["markerWidth",ie.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",ye.toString()]]),mt.appendChild(bt),mt},ue.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&ue.setAttributes(ee,te),ee},ue.createTSpan=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,ee&&ue.setAttributes(ie,ee),ie},ue.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ue.setAttributes(ee,te),ee},ue.createPoint=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=ee,ie},ue.createPath=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),ee&&ue.setAttributes(ie,ee),ie},ue}(),we=function(){function ue(){}return ue.addKey=function(te){ue.key=te},Object.defineProperty(ue,"isLicensed",{get:function(){return!!ue.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ue.key)},enumerable:!1,configurable:!0}),ue}(),vt=function(){function ue(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ue.prototype.rasterize=function(te,ee,ie){var le=this;return new Promise(function(ne){var ye=ie!==void 0?ie:document.createElement("canvas");te===null&&(le.markersOnly=!0,le.naturalSize=!1);var bt=document.createElementNS("http://www.w3.org/2000/svg","svg");bt.setAttribute("xmlns","http://www.w3.org/2000/svg"),bt.setAttribute("width",ee.width.baseVal.valueAsString),bt.setAttribute("height",ee.height.baseVal.valueAsString),bt.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),bt.innerHTML=ee.innerHTML,le.naturalSize===!0?(bt.width.baseVal.value=te.naturalWidth,bt.height.baseVal.value=te.naturalHeight):le.width!==void 0&&le.height!==void 0&&(bt.width.baseVal.value=le.width,bt.height.baseVal.value=le.height),ye.width=bt.width.baseVal.value,ye.height=bt.height.baseVal.value;var mt=bt.outerHTML,Dt=ye.getContext("2d");le.markersOnly!==!0&&Dt.drawImage(te,0,0,ye.width,ye.height);var He=window.URL,Ht=new Image(ye.width,ye.height);Ht.setAttribute("crossOrigin","anonymous");var Rt=new Blob([mt],{type:"image/svg+xml"}),Ot=He.createObjectURL(Rt);Ht.onload=function(){Dt.drawImage(Ht,0,0),He.revokeObjectURL(Ot);var un=ye.toDataURL(le.imageType,le.imageQuality);ne(un)},Ht.src=Ot})},ue}(),Ve=function(){},Ie=function(){function ue(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ue.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ue.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(ue.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ue.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},ue.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)},ue.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 We("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new We("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new We("@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;
|
|
`))},ue.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ue}(),We=function(ue,te){this.selector=ue,this.style=te},De=function(ue,te){this.localName=ue,this.style=te},ut=function(){function ue(te,ee,ie,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=ee,this.markerItems=ie,this.uiStyleSettings=le,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ue.prototype.show=function(te){var ee=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 ye=document.createElement("div");ye.className=""+ee.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",ne.typeName),ye.innerHTML=ne.icon,ye.addEventListener("click",function(){ee.markerToolbarButtonClicked(ye,ne)}),ee.buttons.push(ye),ee.markerButtons.push(ye)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ue.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ue.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ue.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ue.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 ee=0;ee<this.markerButtons.length;ee++)ee<te||ee===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},ue.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")},ue.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},ue.prototype.addActionButton=function(te,ee,ie){var le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=ee,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){le.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)},ue.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 We("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ue.prototype.markerToolbarButtonClicked=function(te,ee){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},ue.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ue.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)},ue.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},ue.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){ee.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ue}(),dt=function(){function ue(te,ee,ie,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,this.uiStyleSettings=ie,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ue.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 ee=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*ee)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
padding: `+ee+`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 We("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new We("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ue.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ue.prototype.setPanelButtons=function(te){var ee,ie,le=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee: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 ye;ne.uiStyleSettings=le.uiStyleSettings;var bt=document.createElement("div");bt.className=le.toolboxButtonStyleClass.name+" "+((ye=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:le.toolboxButtonStyleColorsClass.name),bt.innerHTML=ne.icon,bt.title=ne.title,bt.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(bt),le.buttonRow.appendChild(bt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ue.prototype.panelButtonClick=function(te){var ee=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var le=te.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ye){var bt,mt;ne.className=ee.toolboxButtonStyleClass.name+" "+(ye===ie?""+((bt=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&bt!==void 0?bt:ee.toolboxActiveButtonStyleColorsClass.name):""+((mt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&mt!==void 0?mt:ee.toolboxButtonStyleColorsClass.name))})},ue}(),kt=function(ue,te){this.title=ue,this.icon=te},wt=function(ue){function te(ee,ie,le,ne){var ye=ue.call(this,ee,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 ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=ie,ye.currentColor=le,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return Me(te,ue),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(le){var ne=ee.getColorBox(le);ie.appendChild(ne),ee.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(ee){var ie=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=ne-2+"px",ye.style.height=ne-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(ne+2)/2+"px",ye.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){ie.setCurrentColor(ee,ye)});var bt=document.createElement("div");return bt.style.display="inline-block",bt.style.width=ne-2+"px",bt.style.height=ne-2+"px",bt.style.backgroundColor=ee,bt.style.borderRadius=ne/2+"px",ee==="transparent"&&(bt.style.fill=this.uiStyleSettings.toolboxAccentColor,bt.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>`),ye.appendChild(bt),ye},te.prototype.setCurrentColor=function(ee,ie){var le=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(kt),xt=function(){function ue(te,ee,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ue.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ue.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ue.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ue.prototype.pointerDown=function(te,ee){},ue.prototype.dblClick=function(te,ee){},ue.prototype.manipulate=function(te){},ue.prototype.pointerUp=function(te){this.stateChanged()},ue.prototype.dispose=function(){},ue.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ue.prototype.getState=function(){return{typeName:ue.typeName,state:this.state,notes:this.notes}},ue.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ue.prototype.scale=function(te,ee){},ue.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ue.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ue.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)}},ue.typeName="MarkerBase",ue}(),gt=function(){function ue(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ue.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},ue}(),yt=function(){function ue(){this.GRIP_SIZE=10,this.visual=Le.createGroup(),this.visual.appendChild(Le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ue.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ue}(),Xt=function(){function ue(){}return ue.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ue.toSVGMatrix=function(te,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},ue}(),Re=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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(Le.createTransform()),ne.setupControlBox(),ne}return Me(te,ue),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(ee){this._visual=ee;var ie=Le.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!ue.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(ee);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(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 ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var ie=this.state;ue.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var ie=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):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(ee)},te.prototype.resize=function(ee){var ie=this.manipulationStartLeft,le=this.manipulationStartWidth,ne=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+ee.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+ee.y-this.manipulationStartY}le>=0?(this.left=ie,this.width=le):(this.left=ie+le,this.width=-le),ye>=0?(this.top=ne,this.height=ye):(this.top=ne+ye,this.height=-ye),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var ie=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM(),le=Le.createPoint(ee.x,ee.y);return{x:(le=le.matrixTransform(ie)).x,y:le.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM();ie=ie.inverse();var le=Le.createPoint(ee.x,ee.y);return{x:(le=le.matrixTransform(ie)).x,y:le.y}},te.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Le.createGroup();var ee=Le.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=Le.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=Le.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 gt,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,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 ee=new yt;return ee.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,ie=-ee/2,le=ie,ne=(this.width+this.CB_DISTANCE)/2-ee/2,ye=(this.height+this.CB_DISTANCE)/2-ee/2,bt=this.height+this.CB_DISTANCE-ee/2,mt=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,mt,le),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ye),this.positionGrip(this.controlGrips.centerRight.visual,mt,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,bt),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,bt),this.positionGrip(this.controlGrips.bottomRight.visual,mt,bt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,ie,le){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,le),ee.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:Xt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Xt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ue.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee);var ie=ee;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(Xt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Xt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,ie);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*ee,y:le.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*ie,this.adjustControlBox()},te}(xt),Je=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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 Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Le.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(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ue.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){ue.prototype.setSize.call(this),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){ue.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Le.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},ue.prototype.getState.call(this))},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ue.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,ie),this.setSize()},te.title="Rectangle marker",te}(Re),Ct=function(ue){function te(ee,ie,le,ne){var ye=ue.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=ie,ye.currentWidth=le,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return Me(te,ue),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(le){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=le===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(le,ne)}),ie.appendChild(ne);var ye=document.createElement("div");ye.innerText=le.toString(),ye.style.marginRight="5px",ne.appendChild(ye);var bt=document.createElement("div");bt.style.minHeight="20px",bt.style.flexGrow="2",bt.style.display="flex",bt.style.alignItems="center";var mt=document.createElement("hr");mt.style.minWidth="20px",mt.style.border="0px",mt.style.borderTop=le+"px solid "+ee.uiStyleSettings.toolboxColor,mt.style.flexGrow="2",bt.appendChild(mt),ne.appendChild(bt),ee.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(ee,ie){var le=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(kt),Ne=function(ue){function te(ee,ie,le,ne){var ye=ue.call(this,ee,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 ye.styles=[],ye.styleBoxes=[],ye.styles=ie,ye.currentStyle=le,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return Me(te,ue),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(le){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/ee.styles.length-5+"%",ne.style.borderColor=le===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(le,ne)}),ie.appendChild(ne);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var bt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;ye.innerHTML=bt,ne.appendChild(ye),ee.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(ee,ie){var le=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(kt),$e=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new wt("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ne("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Me(te,ue),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ue.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(Je),Te=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(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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 Me(te,ue),te.prototype.ownsTarget=function(ee){return!!ue.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.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(ee){var ie=this.state;ue.prototype.pointerUp.call(this,ee),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(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Le.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 ee=new yt;return ee.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,ie,le){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,le),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ue.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee);var ie=ee;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,ie),this.x1=this.x1*ee,this.y1=this.y1*ie,this.x2=this.x2*ee,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(xt),Lt=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new wt("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ne("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorLine=Le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Le.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(ee,ie){ue.prototype.pointerDown.call(this,ee,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()),Le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,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 ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee);var ie=ee;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),rt=function(ue){function te(ee,ie,le,ne){var ye=ue.call(this,ee,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 ye.fonts=[],ye.fontBoxes=[],ye.fonts=ie,ye.currentFont=le,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return Me(te,ue),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(le){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/ee.fonts.length-5+"%",ne.style.borderColor=le===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentFont(le,ne)}),ie.appendChild(ne);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=le,ye.style.overflow="hidden";var bt=document.createElement("div");bt.style.whiteSpace="nowrap",bt.style.overflow="hidden",bt.style.textOverflow="ellipsis",bt.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(bt),ne.appendChild(ye),ee.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(ee,ie){var le=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(kt),st=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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=le.defaultColor,ne.fontFamily=le.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 wt("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new rt("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){if(ue.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(le){le===ee&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=Le.createGroup(),this.bgRectangle=Le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=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){ee.textElement.appendChild(Le.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),ie=1;if(ee.width>0&&ee.height>0){var le=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;ie=Math.min(le,ne)}return ie},te.prototype.getTextPosition=function(ee){var ie=this.textElement.getBBox(),le=0,ne=0;return ie.width>0&&ie.height>0&&(le=(this.width-ie.width*ee)/2,ne=this.height/2-ie.height*ee/2),{x:le,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),ie=this.getTextScale(),le=this.getTextPosition(ie);le.y-=ee.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},te.prototype.manipulate=function(ee){ue.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ue.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ue.prototype.pointerUp.call(this,ee),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=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(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,ee.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 le=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.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 ee=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),ne={x:le.width*ee,y:le.height*ee};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*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ue.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ue.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,ie){ue.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&Le.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&Le.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,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 ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ue.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,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}(Re),lt=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=le.defaultColor,ne.lineWidth=le.defaultStrokeWidth,ne.pixelRatio=le.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 wt("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Le.createGroup(),this.drawingImage=Le.createImage(),this.visual.appendChild(this.drawingImage);var ee=Le.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,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(ee.x,ee.y),this.drawing=!0):ue.prototype.pointerDown.call(this,ee,ie)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):ue.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ue.prototype.pointerUp.call(this,ee)},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(),ue.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ue.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=ie[0],ne=ie[1],ye=ie[2],bt=ie[3],mt=!1,Dt=0;Dt<this.canvasElement.height;Dt++)for(var He=0;He<this.canvasElement.width;He++)ee.data[Dt*this.canvasElement.width*4+4*He+3]>0&&(mt=!0,Dt<ne&&(ne=Dt),He<le&&(le=He),Dt>bt&&(bt=Dt),He>ye&&(ye=He));if(mt){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ye-le)/this.pixelRatio,this.height=(bt-ne)/this.pixelRatio;var Ht=document.createElement("canvas");Ht.width=ye-le,Ht.height=bt-ne,Ht.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,ye-le,bt-ne),0,0),this.drawingImgUrl=Ht.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},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 ee=Object.assign({drawingImgUrl:this.drawingImgUrl},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),ue.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,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}(Re),pe=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,le||'<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 Me(te,ue),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var le=function(bt){var mt="both";switch(bt){case 0:mt="both";break;case 1:mt="start";break;case 2:mt="end";break;case 3:mt="none"}var Dt=document.createElement("div");if(Dt.style.display="flex",Dt.style.flexGrow="2",Dt.style.alignItems="center",Dt.style.justifyContent="space-between",Dt.style.padding="5px",Dt.style.borderWidth="2px",Dt.style.borderStyle="solid",Dt.style.borderColor=mt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Dt.addEventListener("click",function(){ee.setCurrentType(mt,Dt)}),ie.appendChild(Dt),mt==="both"||mt==="start"){var He=document.createElement("div");He.style.display="flex",He.style.alignItems="center",He.style.minHeight="20px",He.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>`,He.style.marginLeft="5px",Dt.appendChild(He)}var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.style.flexGrow="2";var Rt=document.createElement("hr");if(Rt.style.minWidth="20px",Rt.style.border="0px",Rt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Rt.style.flexGrow="2",Ht.appendChild(Rt),Dt.appendChild(Ht),mt==="both"||mt==="end"){var Ot=document.createElement("div");Ot.style.display="flex",Ot.style.alignItems="center",Ot.style.minHeight="20px",Ot.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>`,Ot.style.marginRight="5px",Dt.appendChild(Ot)}ne.typeBoxes.push(Dt)},ne=this,ye=0;ye<4;ye++)le(ye);return ie},te.prototype.setCurrentType=function(ee,ie){var le=this;this.currentType=ee,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(kt),se=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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 Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,ie){var le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-le/2+","+(ie+ne/2)+" "+ee+","+(ie-ne/2)+" "+(ee+le/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=Le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ue.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",Le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=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(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,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 ee=Object.assign({arrowType:this.arrowType},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee);var ie=ee;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}(Lt),Ce=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new wt("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Me(te,ue),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ue.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(Je),je=function(ue){function te(ee,ie,le,ne){var ye=ue.call(this,ee,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 ye.opacities=[],ye.opacityBoxes=[],ye.opacities=ie,ye.currentOpacity=le,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return Me(te,ue),te.prototype.getUi=function(){var ee=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(le){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=le===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(le,ne)}),ie.appendChild(ne);var ye=document.createElement("div");ye.innerText=100*le+"%",ne.appendChild(ye),ee.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(ee,ie){var le=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(kt),tt=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new wt("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new je("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Me(te,ue),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Le.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 ee=ue.prototype.getState.call(this);return ee.typeName=te.typeName,ee},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}(Ce),be='<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>',Ge='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ze=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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=le.defaultStrokeColor,ne.bgColor=le.defaultFillColor,ne.fontFamily=le.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 wt("Text color",le.defaultColorSet,ne.color,be),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new wt("Fill color",le.defaultColorSet,ne.bgColor,Ge),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new rt("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new yt,ne.tipGrip.visual.transform.baseVal.appendItem(Le.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return ue.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){Le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&ue.prototype.pointerDown.call(this,ee,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ue.prototype.pointerDown.call(this,ee,ie)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ue.prototype.pointerUp.call(this,ee);else{var ie=this.state==="creating";ue.prototype.pointerUp.call(this,ee),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var ie=this.unrotatePoint(ee);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ue.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(Le.setAttributes(this.bgRectangle,[["fill",ee]]),Le.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},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(ee){ee===void 0&&(ee=!1);var ie=Math.min(this.height/2,15),le=this.height/5;ee&&(this.tipPosition={x:ie+le/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))?(le=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+le,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+le}):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))?(le=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-le,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+le}):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))?(le=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-le,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-le},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-le})},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){Le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,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(),ue.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,ue.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,ie),this.tipPosition={x:this.tipPosition.x*ee,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}(st),ft=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.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 wt("Line color",he(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new wt("Fill color",he(le.defaultColorSet,["transparent"]),ne.fillColor,Ge),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ne("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new je("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Le.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(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ue.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){ue.prototype.setSize.call(this),Le.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(ee){ue.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Le.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 ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ue.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,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}(Re),it=function(ue){function te(ee,ie,le){return ue.call(this,ee,ie,le)||this}return Me(te,ue),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.prototype.createTips=function(){this.tip1=Le.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(Le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Le.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(Le.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ue.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Le.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()]]),Le.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 ee=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(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ue.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee),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}(Lt),ge=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return Me(te,ue),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ue.prototype.getState.call(this);return ee.typeName=te.typeName,ee},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}(ft),ve=function(){function ue(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ue.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))},ue.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ue.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ue.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}},ue.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ue}(),Ee=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new wt("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ne("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},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=Le.createGroup(),this.selectorCurve=Le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Le.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(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.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()),Le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ue.prototype.setupControlBox.call(this),this.curveControlLine1=Le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Le.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,ue.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ue.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/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(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),ue.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),ue.prototype.resize.call(this,ee),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(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,ie){this.curveX=this.curveX*ee,this.curveY=this.curveY*ie,ue.prototype.scale.call(this,ee,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ue.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ue.prototype.restoreState.call(this,ee);var ie=ee;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),Xe=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,ie,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.textColor=le.defaultStrokeColor,ne.fontFamily=le.defaultFontFamily,ne.fontSize=le.defaultCaptionFontSize,ne.captionText=le.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 wt("Line color",he(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new wt("Fill color",he(le.defaultColorSet,["transparent"]),ne.fillColor,Ge),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ct("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ne("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new rt("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new wt("Text color",le.defaultColorSet,ne.textColor,be),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Me(te,ue),te.prototype.ownsTarget=function(ee){return!(!ue.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Le.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Le.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Le.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=Le.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(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,ie){ue.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ue.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){ue.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Le.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')"]]),Le.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 ee=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"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.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(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&Le.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&Le.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ue.prototype.setSize.call(this),Le.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){ue.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,ie){ue.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&Le.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&Le.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&Le.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&Le.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 ee=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},ue.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;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(),ue.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ue.prototype.scale.call(this,ee,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}(Re),xe=function(){function ue(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(ue.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ue.prototype.preventDefault=function(){this._defaultPrevented=!0},ue}(),_e=function(ue){function te(ee,ie,le){var ne=ue.call(this,ee,!1)||this;return ne.dataUrl=ie,ne.state=le,ne}return Me(te,ue),te}(xe),Be=function(ue){function te(ee,ie,le){le===void 0&&(le=!1);var ne=ue.call(this,ee,le)||this;return ne.marker=ie,ne}return Me(te,ue),te}(xe),et=function(){function ue(){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 ue.prototype.addEventListener=function(te,ee){this[te].push(ee)},ue.prototype.removeEventListener=function(te,ee){var ie=this[te].indexOf(ee);ie>-1&&this[te].splice(ie,1)},ue}(),at=function(){function ue(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 Te,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=ue.instanceCounter++,this.styles=new Ie(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(ue.prototype,"ALL_MARKER_TYPES",{get:function(){return[$e,lt,se,st,ge,ft,tt,ze,it,Ce,Lt,Ee,Xe]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[$e,lt,se,st,ft,tt,ze]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"BASIC_MARKER_TYPES",{get:function(){return[$e,lt,se,st,tt]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var le=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});le!==void 0&&ee._availableMarkerTypes.push(le)}else ee._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.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(ue.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ue.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),we.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ue.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ve.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ve.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new xe(te))})},ue.prototype.render=function(){return Ke(this,void 0,void 0,function(){var te;return ke(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new vt).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 ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},ue.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(le){var ne=new xe(ee,!0);le(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(le){return le(new xe(ee))}),this.detachEvents(),this._isOpen=!1)}},ue.prototype.addMarkersToToolbar=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];(te=this._availableMarkerTypes).push.apply(te,ee)},ue.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},ue.prototype.removeRenderEventListener=function(te){},ue.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ue.prototype.removeCloseEventListener=function(te){},ue.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))},ue.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(ee,ie)},ue.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ue.prototype.resize=function(te,ee){this._isResizing=!0;var ie=te/this.imageWidth,le=ee/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(ee),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,le),this._isResizing=!1},ue.prototype.scaleMarkers=function(te,ee){var ie,le=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(te,ee):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._currentMarker&&ne.scale(te,ee)}),ie!==void 0&&this.setCurrentMarker(ie)},ue.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"},ue.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},ue.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)},ue.prototype.addDefs=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];this.defs=Le.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},ue.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ue.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)},ue.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ue.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ue.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)},ue.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ue.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)},ue.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()},ue.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")},ue.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"},ue.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ue.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 ut(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 dt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ue.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ue.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ue.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())},ue.prototype.toolbarButtonClicked=function(te,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){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()}},ue.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var ne=new Be(te,te._currentMarker,!0);le(ne),ne.defaultPrevented&&(ee=!0)}),!ee){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(le){return le(new Be(te,ie))})}}},ue.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var bt=new Be(te,void 0,!0);ye(bt),bt.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var ie=function(ye){var bt=le.markers[ye];le.setCurrentMarker(le.markers[ye]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(mt){return mt(new Be(te,bt))})},le=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(ue.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ue.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))},ue.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)},ue.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ue.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===ee.width&&ie.height===ee.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new xe(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new xe(te))})}},ue.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ue.prototype.undoStep=function(){var te=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new xe(te))}))},ue.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ue.prototype.redoStep=function(){var te=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new xe(te))}))},ue.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ue.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ue.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var te,ee,ie=this;return ke(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return te=le.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new _e(ie,te,ee))}),this.close(!0),[2]}})})},ue.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return ee.markers.push(ie.getState())}),ee},ue.prototype.restoreState=function(te){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(ie){var le=ee._availableMarkerTypes.find(function(ye){return ye.typeName===ie.typeName});if(le!==void 0){var ne=ee.addNewMarker(le);ne.restoreState(ie),ee.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 xe(ee))})},ue.prototype.addNewMarker=function(te){var ee=Le.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},ue.prototype.createNewMarker=function(te){var ee,ie=this;(ee=typeof te=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),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(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new Be(ie,ie._currentMarker))}))},ue.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof lt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(lt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new Be(ee,ee._currentMarker))})},ue.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ue.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ue.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new Be(ee,te))})},ue.prototype.setCurrentMarker=function(te){var ee=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 Be(ee,ee._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 Be(ee,ee._currentMarker))}))},ue.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 ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0?(this.setCurrentMarker(ee),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))},ue.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},ue.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}))},ue.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()},ue.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ue.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ue.prototype.clientToLocalCoordinates=function(te,ee){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(ee-ie.top)/this.zoomLevel}},ue.prototype.onWindowResize=function(){this.positionUI()},ue.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()},ue.prototype.addLicenseKey=function(te){we.addKey(te)},ue.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},ue.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},ue.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(ue.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ue.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(ee){return ee(new xe(te))}))},ue.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new xe(te))}))},ue.instanceCounter=0,ue}(),Qe=fe(57193),ht=fe(63949),Et=(ue,te,ee)=>new Promise((ie,le)=>{var ne=mt=>{try{bt(ee.next(mt))}catch(Dt){le(Dt)}},ye=mt=>{try{bt(ee.throw(mt))}catch(Dt){le(Dt)}},bt=mt=>mt.done?ie(mt.value):Promise.resolve(mt.value).then(ne,ye);bt((ee=ee.apply(ue,te)).next())}),Bt=({data:ue,className:te,fullWidth:ee,style:ie={},onClose:le,onOk:ne,showFullTools:ye,noAssociationId:bt})=>{const mt=(0,oe.useRef)(null),Dt=(0,oe.useRef)(null),He=(0,oe.useRef)(null),Ht=(0,oe.useRef)(null),[Rt,Ot]=(0,oe.useState)(!1),[un,kn]=(0,oe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,oe.useEffect)(()=>(He.current||(He.current=document.createElement("style"),document.head.appendChild(He.current)),ue!=null&&ue.visible?(document.body.setAttribute("data-custom","y-hidden"),He.current.innerHTML=" html { overflow-y: hidden; }",ue!=null&&ue.src&&cn()):(document.body.removeAttribute("data-custom"),He.current&&(document.head.removeChild(He.current),He.current=null)),()=>{document.body.removeAttribute("data-custom"),He.current&&(document.head.removeChild(He.current),He.current=null)}),[ue==null?void 0:ue.visible]);const cn=()=>Et(void 0,null,function*(){Ot(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,ht.ZJ)(ue==null?void 0:ue.src);mt.current.src="",mt.current.src=mr,mt.current.onload=function(){Hn()},Ot(!1),kn("")}),wn=mr=>Et(void 0,null,function*(){Ot(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,Qe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ue.title,file:mr.dataUrl}});er!=null&&er.id&&!bt?(yield(0,Qe.ZP)(`/api/attachments/${ue.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),Ot(!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)})},Hn=()=>{Dt.current=new at(mt.current),Dt.current.targetRoot=Ht.current,Dt.current.addEventListener("render",wn),Dt.current.addEventListener("beforeclose",le),ye&&(Dt.current.availableMarkerTypes=Dt.current.ALL_MARKER_TYPES,Dt.current.uiStyleSettings.redoButtonVisible=!0,Dt.current.uiStyleSettings.notesButtonVisible=!0,Dt.current.uiStyleSettings.zoomButtonVisible=!0,Dt.current.uiStyleSettings.zoomOutButtonVisible=!0,Dt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Dt.current.uiStyleSettings,Dt.current.show(),ue!=null&&ue.snapshotData&&Dt.current.restoreState(ue.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$n()},300)};return oe.createElement(oe.Fragment,null,(ue==null?void 0:ue.visible)&&oe.createElement(me.Z,{spinning:Rt,tip:un,style:{position:"absolute",width:"100vw"}},oe.createElement("div",{ref:Ht,className:Ze()(ct.imageDimensions,te,ee?ct.fullWidth:""),style:ie},oe.createElement("img",{className:ct.img,ref:mt}))))}},24638:function(Ft,zt,fe){"use strict";var oe=fe(59301),ct=fe(77019),Fe=fe(5269),Ze=fe(20554),me=fe(7939),qe=fe(97231),Me=fe(27431),Ke=fe(48136),ke=fe(59301);const he=(0,oe.forwardRef)(({callback:Le,showSaveButton:we,value:vt=""},Ve)=>{const Ie=(0,oe.useRef)(),We=[{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}`}]}]}],ut=wt=>{Ie.current.setValue(Ie.current.getValue()+" "+wt.value+" ")},dt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(ct.Z,{className:Me.Z.lists,gutter:[10,10]},We.map((wt,xt)=>ke.createElement(Fe.Z,{flex:"110px",className:Me.Z.item},ke.createElement("div",null,ke.createElement(qe.Z,{value:`$$${wt.value}$$`}),wt.name),ke.createElement("div",{className:Me.Z.children},wt.children.map((gt,yt)=>ke.createElement("div",{key:yt},ke.createElement("h1",null,gt.name),ke.createElement(ct.Z,{gutter:[10,10]},gt.data.map((Xt,Re)=>ke.createElement(Fe.Z,{key:Re,onClick:()=>ut(Xt),className:Me.Z.diamond},ke.createElement(qe.Z,{value:"`$$"+Xt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(ct.Z,{className:Me.Z.lists,gutter:[10,10]},De.map((wt,xt)=>ke.createElement(Fe.Z,{flex:"110px",className:Me.Z.item},ke.createElement("div",null,ke.createElement(qe.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),ke.createElement("div",{className:Me.Z.children},wt.children.map((gt,yt)=>ke.createElement("div",{key:yt},gt.name&&ke.createElement("h1",null,gt.name),ke.createElement(ct.Z,{gutter:[10,10]},gt.data.map((Xt,Re)=>ke.createElement(Fe.Z,{key:Re,onClick:()=>ut(Xt),className:Me.Z.diamond},ke.createElement(qe.Z,{value:"`$$"+Xt.value+"$$`"}))))))))))}],kt=()=>{var wt=document.createElement("div");wt.innerHTML=Ie.current.getValue();var xt=wt.innerText;return Le&&Le(xt),xt};return(0,oe.useImperativeHandle)(Ve,()=>({getData:kt})),ke.createElement("div",{className:Me.Z.mathWrap},ke.createElement(Ze.default,{defaultActiveKey:"1",items:dt}),ke.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ie,style:{width:800,marginTop:30,fontSize:18}},vt||""),we&&ke.createElement("div",{className:Me.Z.button},ke.createElement(me.ZP,{size:"large",onClick:kt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});zt.Z=he},97041:function(Ft,zt,fe){"use strict";fe.d(zt,{z:function(){return lt},Z:function(){return pe}});var oe=fe(59301),ct=fe(14566),Fe=fe(6767),Ze=fe(62957),me=fe(7939),qe=fe(78323),Me=fe(12480),Ke=Object.defineProperty,ke=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,we=(se,Ce,je)=>Ce in se?Ke(se,Ce,{enumerable:!0,configurable:!0,writable:!0,value:je}):se[Ce]=je,vt=(se,Ce)=>{for(var je in Ce||(Ce={}))he.call(Ce,je)&&we(se,je,Ce[je]);if(ke)for(var je of ke(Ce))Le.call(Ce,je)&&we(se,je,Ce[je]);return se},Ve=(se,Ce,je)=>new Promise((tt,be)=>{var Ge=it=>{try{ft(je.next(it))}catch(ge){be(ge)}},ze=it=>{try{ft(je.throw(it))}catch(ge){be(ge)}},ft=it=>it.done?tt(it.value):Promise.resolve(it.value).then(Ge,ze);ft((je=je.apply(se,Ce)).next())});const Ie="\u3000\u3000";function We(se){var Ce=["Bytes","KB","MB","GB","TB"];if(se==0)return"0 Byte";var je=parseInt(""+Math.floor(Math.log(se)/Math.log(1024)),10);return(se/Math.pow(1024,je)).toFixed(1)+" "+Ce[je]}var De=({value:se=[],action:Ce,onChange:je,className:tt,maxSize:be=150,title:Ge="\u6587\u4EF6\u4E0A\u4F20",accept:ze=null})=>{const ft={multiple:!1,fileList:se,accept:ze,withCredentials:!0,beforeUpload:ge=>ge.size/1024/1024<be?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${be}MB),\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`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(ge){var ve,Ee,Xe,xe;let _e=[...ge.fileList];if(_e=_e.map(Be=>(Be.name.indexOf(Ie)===-1&&(Be.name=`${Be.name}${Ie}${We(Be.size)}`),vt({},Be))),ge.file.status==="done"&&((Ee=(ve=ge.file)==null?void 0:ve.response)==null?void 0:Ee.status)===-1){message.error((xe=(Xe=ge.file)==null?void 0:Xe.response)==null?void 0:xe.message),je([]);return}je(_e)},onRemove:ge=>Ve(void 0,null,function*(){const ve=ge.size/1024/1024;return ge.status==="uploading"?!0:ve<be&&(ge.response?ge.response.id:ge.uid)?yield removeAttachment(ge.response?ge.response.id:ge.id):!0})};function it(ge){ge.preventDefault(),ge.stopPropagation()}return React.createElement("div",{className:`single-upload ${tt||""}`},React.createElement(Upload,vt({},ft),React.createElement(Button,{type:"primary",title:se.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:se.length>0,ghost:!0},Ge),React.createElement("span",{onClick:it,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",be,"M)"," ")))},ut=fe(61481),dt=fe(89392),kt=Object.defineProperty,wt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(se,Ce,je)=>Ce in se?kt(se,Ce,{enumerable:!0,configurable:!0,writable:!0,value:je}):se[Ce]=je,Xt=(se,Ce)=>{for(var je in Ce||(Ce={}))xt.call(Ce,je)&&yt(se,je,Ce[je]);if(wt)for(var je of wt(Ce))gt.call(Ce,je)&&yt(se,je,Ce[je]);return se};const Re=se=>React.createElement("svg",Xt({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},se),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var Je="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",Ct=Object.defineProperty,Ne=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ye=(se,Ce,je)=>Ce in se?Ct(se,Ce,{enumerable:!0,configurable:!0,writable:!0,value:je}):se[Ce]=je,Lt=(se,Ce)=>{for(var je in Ce||(Ce={}))$e.call(Ce,je)&&Ye(se,je,Ce[je]);if(Ne)for(var je of Ne(Ce))Te.call(Ce,je)&&Ye(se,je,Ce[je]);return se},rt=(se,Ce,je)=>new Promise((tt,be)=>{var Ge=it=>{try{ft(je.next(it))}catch(ge){be(ge)}},ze=it=>{try{ft(je.throw(it))}catch(ge){be(ge)}},ft=it=>it.done?tt(it.value):Promise.resolve(it.value).then(Ge,ze);ft((je=je.apply(se,Ce)).next())});const{Dragger:st}=ct.default;function lt(se){let Ce=[];return se&&se.length>0&&(Ce=se.map(je=>({uid:je.id,id:je.id,name:je.title+Ie+je.filesize,url:je.url,filesize:je.filesize,status:"done",response:{id:je.id}}))),Ce}var pe=({value:se,onChange:Ce,action:je,data:tt,className:be,maxSize:Ge=150,title:ze="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:ft=!1,accept:it="",additionalText:ge,isDragger:ve,number:Ee=1e3,aloneClear:Xe=!1,realTimeRemove:xe=!0,uploadText:_e,setFileProgress:Be,showFileProgress:et})=>{const[at,Qe]=(0,oe.useState)(!1);let[ht,Et]=(0,oe.useState)(se||[]),[Ut,Bt]=(0,oe.useState)(1);(0,oe.useEffect)(()=>{se&&(Ut===1&&Et([...se]),Bt(2),Ee===(se==null?void 0:se.length)&&Qe(!0))},[se]);const ue=()=>{setTimeout(()=>{ht.pop(),Et([...ht])},500)};et&&Be(ht.some(ie=>ie.status==="uploading"));const te={multiple:!0,disabled:at,accept:it,withCredentials:!0,fileList:ht,beforeUpload:(ie,le)=>{const ne=ie.size/1024/1024;return ht.concat(le).length>Ee?(ht.pop(),Et([...ht]),Fe.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${Ee}\u4E2A\u6587\u4EF6`),Xe?Promise.reject():(ue(),!1)):ne<Ge?!0:(Fe.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Ge}MB).`),Xe?Promise.reject():(ue(),!1))},data:tt,action:je||`${qe.Z.API_SERVER}/api/attachments.json`,onChange(ie){var le,ne,ye,bt;if(ie.file.status==="removed"?ht=ie.fileList:ht=(0,dt.uniqBy)([...ie.fileList,...ht],"uid"),ie.file.status==="done"&&((ne=(le=ie.file)==null?void 0:le.response)==null?void 0:ne.status)===-1){Fe.ZP.error((bt=(ye=ie.file)==null?void 0:ye.response)==null?void 0:bt.message);return}ht.length>=Ee?Qe(!0):Qe(!1),Et([...ht]),ht=ht.map(mt=>{var Dt,He;return(Dt=mt==null?void 0:mt.response)!=null&&Dt.id&&(mt.url=(He=mt==null?void 0:mt.response)==null?void 0:He.url),mt.name.indexOf(Ie)===-1&&(mt.name=`${mt.name}${Ie}${We(mt.size)}`),Lt({},mt)}),console.log("info:",ie,ht),Ce(ht)},onRemove:ie=>rt(void 0,null,function*(){if(!xe)return!0;const le=()=>rt(void 0,null,function*(){if(ie.response?ie.response.id:ie.id){let ye=yield(0,Me.JZ)(ie.response?ie.response.id:ie.uid);return Promise.resolve(ye)}else return!0});return ft?new Promise((ne,ye)=>{Ze.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:oe.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>rt(void 0,null,function*(){const bt=yield le();Fe.ZP.success("\u5220\u9664\u6210\u529F"),ne(!0)}),onCancel:()=>ne(!1)})}):yield le()})};function ee(ie){ie.preventDefault(),ie.stopPropagation()}return oe.createElement("div",{className:`multi-upload ${be||""}`},ve&&oe.createElement(st,Lt({},te),oe.createElement("p",{className:"ant-upload-drag-icon"},oe.createElement(ut.Z,null)),oe.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",oe.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",Ge,"MB)"," "),ge),!ve&&oe.createElement(ct.default,Lt({},te),oe.createElement(me.ZP,{disabled:at,className:"upload_button"},oe.createElement("img",{className:"aBtn_img",src:Je}),ze),oe.createElement("span",{onClick:ee,className:"upload_text"},_e||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${Ge}MB)`)))}},13922:function(Ft,zt,fe){"use strict";var oe=fe(59301),ct=fe(93314),Fe=fe(7939),Ze=Object.defineProperty,me=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,he=(Ve,Ie,We)=>Ie in Ve?Ze(Ve,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ve[Ie]=We,Le=(Ve,Ie)=>{for(var We in Ie||(Ie={}))Ke.call(Ie,We)&&he(Ve,We,Ie[We]);if(Me)for(var We of Me(Ie))ke.call(Ie,We)&&he(Ve,We,Ie[We]);return Ve},we=(Ve,Ie)=>me(Ve,qe(Ie));const vt=({img:Ve,buttonProps:Ie={},styles:We={},customText:De,ButtonText:ut,ButtonClick:dt,Buttonclass:kt,ButtonTwo:wt,imgStyles:xt,loading:gt=!1,className:yt=""})=>oe.createElement("section",{className:`tc animated fadeIn ${yt}`,style:Le({color:"#999",margin:"100px auto",visibility:gt?"hidden":"visible"},We)},oe.createElement("img",{src:Ve||ct,style:we(Le({},xt),{pointerEvents:"none",userSelect:"none"})}),oe.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ut&&oe.createElement(Fe.ZP,Le({className:kt,onClick:dt},Ie),ut),wt&&wt);zt.Z=vt},9931:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return kt}});var oe=fe(59301),ct={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Fe=fe(7939),Ze=fe(70557),me=fe(95440),qe=fe(25399),Me=fe(63949),Ke=fe(75823),ke=fe(13922),he=fe(78323),Le=fe(14084),we=fe(59301),vt=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,De=(wt,xt,gt)=>xt in wt?vt(wt,xt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):wt[xt]=gt,ut=(wt,xt)=>{for(var gt in xt||(xt={}))Ie.call(xt,gt)&&De(wt,gt,xt[gt]);if(Ve)for(var gt of Ve(xt))We.call(xt,gt)&&De(wt,gt,xt[gt]);return wt},dt=(wt,xt,gt)=>new Promise((yt,Xt)=>{var Re=Ne=>{try{Ct(gt.next(Ne))}catch($e){Xt($e)}},Je=Ne=>{try{Ct(gt.throw(Ne))}catch($e){Xt($e)}},Ct=Ne=>Ne.done?yt(Ne.value):Promise.resolve(Ne.value).then(Re,Je);Ct((gt=gt.apply(wt,xt)).next())}),kt=({editOffice:wt="view",data:xt,issaver:gt,onSaver:yt,theme:Xt,type:Re,filename:Je,monacoEditor:Ct,className:Ne,style:$e,close:Te,onClose:Ye,hasMask:Lt,disabledDownload:rt,onImgDimensions:st,showNodata:lt,recordInfo:pe})=>{const[se,Ce]=(0,oe.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[je,tt]=(0,oe.useState)(""),[be,Ge]=(0,oe.useState)(),ze=window.ENV==="build"?"/react/build":"",ft=location.host.startsWith("localhost")?he.Z.PROXY_SERVER:he.Z.API_SERVER,ge=10*(1024*1024),ve=(0,oe.useRef)();xt!=null&&xt.startsWith("/api")&&Re!=="txt"&&(xt=he.Z.API_SERVER+xt);const Ee=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();Je&&Ct&&(Ct.filename=Je),(0,oe.useEffect)(()=>{var et,at;const Qe=(at=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:at.split(";");Qe==null||Qe.map(ht=>{let Et=ht.split("=");Et[0]==="_educoder_session"&&tt(Et[1])})},[]),(0,oe.useEffect)(()=>{Re==="office"&&(xt.indexOf("bigfilescdn.")>-1||xt.indexOf("bigfiles1")>-1?Ge({url:xt,fileType:Ee(xt),model:xt.indexOf("model=edit")?"edit":"view"}):xe())},[Re,xt]);function Xe(et){return dt(this,null,function*(){et.data.type==="pdfdata"&&(yt(et.data.data),window.removeEventListener("message",Xe,!1)),console.log("mess---:",et.data)})}const xe=()=>dt(void 0,null,function*(){console.log("data:",xt);let et=xt;xt.startsWith("http")||(et=location.origin+et);let at=new URL(et).pathname.split("/").pop();const Qe=yield(0,Ke.gJ)({attachment_id:at});Qe.url=ft+Qe.url,Ge(Qe)}),_e=()=>{if(xt.startsWith("http")||xt.startsWith("blob:")){Be();return}(0,Me.Sv)(Je||"educoder",xt,Je)},Be=()=>{pe&&(0,Le.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Me.Nd)(Je||"educoder",decodeURIComponent(xt))};return we.createElement("div",{style:ut({},$e||{}),className:`${Lt&&ct.bgBlack} ${Re?ct.wrp:"hide"}`},Te&&we.createElement("div",{className:ct.close,ref:ve},!!st&&we.createElement(qe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},we.createElement("span",{onClick:()=>{Ye(),st()}},we.createElement("i",{className:"icon-yulanpizhu"}))),!rt&&we.createElement(qe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},we.createElement("span",{onClick:Be},we.createElement("i",{className:"icon-quxiaozhiding"}))),gt&&we.createElement(qe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},we.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",Xe,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},we.createElement("i",{className:"icon-baocun"}))),we.createElement(qe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},we.createElement("span",{className:"",onClick:()=>{Ye()}},we.createElement("i",{className:"icon-guanbi1"})))),we.createElement("div",{className:`${ct[Ne]} ${Ne} ${ct.monaco} ${Re==="txt"?"show":"hide"}`},Re==="txt"&&we.createElement(we.Fragment,null,we.createElement(me.ZP,ut({},Ct)))),Re==="audio"&&we.createElement("audio",{src:`${(xt==null?void 0:xt.indexOf("http://"))>-1||(xt==null?void 0:xt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${xt}`,autoPlay:!0}),Re==="video"&&we.createElement(we.Fragment,null,(xt==null?void 0:xt.indexOf("http"))>-1?we.createElement("video",{controls:!0,src:`${xt}`,autoPlay:!0}):we.createElement("video",{controls:!0,src:`data:video/mp4;base64,${xt}`,autoPlay:!0})),Re==="office"&&be&&we.createElement("iframe",{src:`${ze}/office.html?key=${be.key}&url=${btoa(be.url)}&callbackUrl=${ft+(be.callbackUrl||"")}&fileType=${be.fileType}&title=${be.title||""}&model=${wt}&officeServer=${he.Z.ONLYOFFICE}&disabledDownload=${!!rt}`}),Re==="html"&&we.createElement("iframe",{src:xt+"&disposition=inline"}),Re==="pdf"&>&&we.createElement("iframe",{id:"pdfiframe",src:`${ze}/js/pdfview/index.html?filename=${Je||"educoder.pdf"}&url=${encodeURIComponent(xt)}&disabledDownload=${!!rt}&model=${wt}`}),Re==="pdf"&&!gt&&we.createElement("embed",{className:ct.embed,src:xt+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),Re==="image"&&we.createElement("img",{src:`${(xt==null?void 0:xt.indexOf("http://"))>-1||(xt==null?void 0:xt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${xt}`}),(Re==="other"||Re==="download")&&we.createElement(we.Fragment,null,lt?we.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:we.createElement(Fe.ZP,{icon:we.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:_e,disabled:rt},"\u4E0B\u8F7D")}):we.createElement(Fe.ZP,{type:"primary",size:"middle",onClick:_e,disabled:rt},we.createElement(Ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Re==="flowChart"&&we.createElement("div",{className:"embed"},we.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${xt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},97231:function(Ft,zt,fe){"use strict";fe.d(zt,{z:function(){return Ct},Z:function(){return Ne}});var oe=fe(59301),ct=fe(79562),Fe=fe(901),Ze=fe(64018),me=fe(80360),qe=fe(78323),Me=fe(63949),Ke=fe(15342),ke=fe(44104),he=fe(7939),Le=fe(1012),we=fe(9931),vt=fe(59301),Ie=({html:$e})=>{const Te=(0,oe.useRef)(null),Ye=(0,oe.useRef)(null),Lt=`.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,oe.useEffect)(()=>{const rt=Te.current.attachShadow({mode:"open"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=$e,rt.appendChild(Ye.current);const st=document.createElement("style");return st.textContent=Lt,rt.appendChild(st),()=>{rt.innerHTML=""}},[]),(0,oe.useEffect)(()=>{Ye.current&&(Ye.current.innerHTML=$e)},[$e]),vt.createElement("div",{ref:Te})};function We($e){const Te=["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(${Te.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return $e.replace(Ye,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ut=Object.defineProperty,dt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,xt=($e,Te,Ye)=>Te in $e?ut($e,Te,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):$e[Te]=Ye,gt=($e,Te)=>{for(var Ye in Te||(Te={}))kt.call(Te,Ye)&&xt($e,Ye,Te[Ye]);if(dt)for(var Ye of dt(Te))wt.call(Te,Ye)&&xt($e,Ye,Te[Ye]);return $e};const yt="@\u2581\u2581@",Xt="@\u2581@",Re=/<pre[^>]*>/g;function Je($e){let Te=document.createElement("div");return Te.innerHTML=$e,Te.childNodes.length===0?"":Te.childNodes[0].nodeValue}const Ct=($e,Te)=>{$e=$e||"";const Ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Lt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,st=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Te?$e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ye,(lt,pe,se,Ce,je,tt,be)=>{const Ge=pe||Ce||tt,ze=se||je||be||"?";return qe.Z.API_SERVER+"/api/attachments/"+Ge+ze+"&t="+(0,Me.Jn)(Ge,Date.now())+(lt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):($e=$e.replace(st,(lt,pe,se,Ce,je,tt,be)=>{const Ge=pe||Ce||tt,ze=se||je||be||"?";return qe.Z.API_SERVER+"/attachments/download/"+Ge+ze+"&t="+(0,Me.Jn)(Ge,Date.now())+(lt.indexOf(")")>-1?")":"&")}).replace(Ye,(lt,pe,se,Ce,je,tt,be)=>{const Ge=pe||Ce||tt,ze=se||je||be||"?";return qe.Z.API_SERVER+"/api/attachments/"+Ge+ze+"&t="+(0,Me.Jn)(Ge,Date.now())+(lt.indexOf(")")>-1?")":"&")}).replace(Lt,(lt,pe,se,Ce,je)=>{const tt=pe||Ce,be=se||je||"";return'"'+qe.Z.API_SERVER+"/api/attachments/"+tt+be+tt+be+"&t="+(0,Me.Jn)(tt,Date.now())}).replace(rt,(lt,pe,se,Ce,je)=>{const tt=pe||Ce,be=se||je||"";return"("+qe.Z.API_SERVER+"/files/uploads/"+tt+be+tt+be+"&t="+(0,Me.Jn)(tt,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,`
|
|
`),$e)};var Ne=({value:$e="",edit:Te=!1,className:Ye,showTextOnly:Lt,showLines:rt,style:st={},stylesPrev:lt={},highlightKeywords:pe,showProgramFill:se,isProgramFill:Ce,disabledFill:je=!1,programFillValue:tt,openEditor:be=()=>{},onFillChange:Ge=it=>{},onFillBlur:ze=()=>{},onFillFocus:ft=()=>{}})=>{let it=We(String($e||""));const ge=(0,oe.useRef)(),ve=(0,oe.useRef)(),[Ee,Xe]=(0,oe.useState)(""),[xe,_e]=(0,oe.useState)("office"),[Be,et]=(0,oe.useState)([]),at=(0,oe.useRef)("a"+(0,Le.Z)()),Qe={},ht=He=>/<style[\s\S]*?>/i.test(He||""),Et=(He,Ht,Rt)=>{const Ot=document.createElement(He===Xt?"input":"textarea");Ot.style.width="100%",Ot.style.height=He===Xt?"40px":"151px",Ot.rows=5,Ot.spellcheck=!1,Ot.name="edu-program-fill",Ot.placeholder="\u8BF7\u8F93\u5165",Ot.dataset.id=Ht;const un=Object.keys(Qe).length;return Qe[un]=Ot,`<span class="edu-program-fill-wrap ${He===Xt?"":"show"}" style="width:${He===Xt?"600px":"100%"}" title=${Rt||""}><span>${Ot.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ut(He){return He=He.replace(/!\[.*?\]\(.*?\)/g,""),He=He.replace(/\[.*?\]\(.*?\)/g,""),He=He.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),He=He.replace(/<embed.*?>/g,""),He=He.replace(/<img.*?>/g,""),He=He.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),He=He.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),He=He.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),He=He.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),He}const Bt=He=>!Lt&&ht(it)?He:He.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ht,Rt){let Ot=Rt.replace(/(\n|\r)/g,"").split("}"),un=[];return Ot.map(kn=>{kn!=""&&un.push(`.${at.current} ${kn}`)}),`<style>${un.join("}")}</style>`}),ue=(0,oe.useMemo)(()=>{try{const Ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;it=it.replace(cn,"("+qe.Z.API_SERVER+"/attachments/download/").replace(Ot,"("+qe.Z.API_SERVER+"/api/attachments/").replace(un,'"'+qe.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+qe.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,`
|
|
`),ge.current.style.display="none"}catch(Ot){}if(se){let Ot=-1;return it=it.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++Ot,Et(un,Ot,(wn=tt==null?void 0:tt[Ot])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Bt(it||"")}</pre>`}let He=Bt(it);He=(0,Fe.ZP)(He);const Ht=(0,Fe.ez)();it.match(/\[TOC\]/)&&(He=He.replace("<p>[TOC]</p>",(0,Fe.Qv)()),(0,Fe.Iy)()),He=He.replace(/(__special_katext_id_\d+__)/g,(Ot,un)=>{const{type:kn,expression:cn}=Ht[un];return(0,Ke.renderToString)(Je(cn)||"",{displayMode:kn==="block",throwOnError:!1,output:"html"})}),He=He.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Fe.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=He,Lt)return Rt.innerText;if(pe){const Ot=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return le(Rt,Ot),Rt.innerHTML}return setTimeout(()=>bt(),500),Rt.innerHTML},[it,pe]);(0,oe.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Ht=>{Ht.oninput=te,Ht.onblur=ee,Ht.onfocus=ie})},[Be]),(0,oe.useEffect)(()=>{var He,Ht,Rt,Ot,un;if(tt!=null&&tt.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=((He=tt==null?void 0:tt[wn])==null?void 0:He.value)||"",((Ht=tt==null?void 0:tt[wn])==null?void 0:Ht.type)==="warning"?$n.className="program-fill-warning":((Rt=tt==null?void 0:tt[wn])==null?void 0:Rt.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of kn.entries())$n.innerHTML=(Ot=tt==null?void 0:tt[wn])!=null&&Ot.score?`${(un=tt==null?void 0:tt[wn])==null?void 0:un.score}\u5206`:"";et(tt)}catch(kn){console.log(kn,"error")}},[tt]);const te=He=>{Be[He.target.dataset.id]=Be[He.target.dataset.id]||{},Be[He.target.dataset.id].value=He.target.value,et([...Be]),Ge(Be,He.target.dataset.id)},ee=He=>{Be[He.target.dataset.id]=Be[He.target.dataset.id]||{},Be[He.target.dataset.id].value=He.target.value,et([...Be]),ze(Be,He.target.dataset.id)},ie=He=>{Be[He.target.dataset.id]=Be[He.target.dataset.id]||{},Be[He.target.dataset.id].value=He.target.value,et([...Be]),ft(Be,He.target.dataset.id)};function le(He,Ht){return He.childNodes.forEach(Rt=>{var Ot;if(Rt.childNodes.length>0)le(Rt,Ht);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(Ot=Rt.innerHTML)==null?void 0:Ot.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Rt.textContent.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(un)}})}const ne=(0,oe.useRef)();Fe.jb.WebkitLineClamp=rt,rt&&(st=gt(gt({},st),Fe.jb));function ye(He){let Ht=He.target;if(Ht.tagName.toUpperCase()==="A"){let Rt=Ht.getAttribute("href");if(Rt.indexOf("office")>-1)He.preventDefault(),Xe(Rt),_e("office");else if(Rt.indexOf("application/pdf")>-1)He.preventDefault(),Xe(Rt),_e("pdf");else if(Rt.indexOf("text/html")>-1)He.preventDefault(),Xe(Rt),_e("html");else if(Rt.startsWith("#")){He.preventDefault();let Ot=document.getElementById(Rt.replace("#",""));Ot&&Ot.scrollIntoView(!0)}}}const bt=()=>{var He;const Ht=(He=ne.current)==null?void 0:He.querySelectorAll("video");Ht==null||Ht.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Ot=new me.ZP;Ot.loadSource(Rt.src),Ot.attachMedia(Rt)}}})};(0,oe.useEffect)(()=>{if(ne.current&&ue&&ue.match(Re)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ye),()=>{var He;(He=ne.current)==null||He.removeEventListener("click",ye),(0,Fe.AL)(),(0,Fe.Iy)()}},[ue,ne.current,ye]);const mt=He=>{He.target.nodeName==="IMG"&&He.target.className.indexOf("draw-flowchart")>-1?(ge.current.style.zIndex=1,ge.current.style.display="flex",ge.current.style.width=He.target.clientWidth+"px",ge.current.style.height=He.target.clientHeight+"px",ge.current.style.top=He.target.offsetTop+"px",ge.current.style.left=He.target.offsetLeft+"px",He.target.id&&(ve.current=He.target.id)):ge.current.style.display="none"},Dt=()=>{ge.current.style.display="none"};return(0,oe.useEffect)(()=>{var He;const Ht=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(He=ne.current)==null||He.addEventListener("copy",Ht),()=>{var Rt;(Rt=ne.current)==null||Rt.removeEventListener("copy",Ht)}},[ne.current]),oe.createElement("div",{style:{position:"relative"},onMouseLeave:Dt},Lt&&oe.createElement("div",{ref:ne,className:`${De.mdBody} `},ue),!Lt&&!ht(ue)&&oe.createElement("div",{ref:ne,style:gt({},st),onMouseOver:mt,className:`${Ye||""} ${je?"disabled-fill":""} markdown-body ${De.mdBody} ${at.current}`,dangerouslySetInnerHTML:{__html:ue}}),!Lt&&ht(ue)&&oe.createElement(Ie,{html:ue}),oe.createElement("div",{ref:ge,className:`${De.button} ${Te?"":De.previewFlowChart}`},oe.createElement(ke.Z,null,oe.createElement(he.ZP,{onClick:()=>{Te?be(ve.current):(Xe(ve.current),_e("flowChart"))}},Te?"\u7F16\u8F91":"\u9884\u89C8"))),oe.createElement(we.Z,{close:!0,data:Ee,type:Ee!=null&&Ee.length?xe:"",style:gt({},lt),onClose:()=>Xe("")}))}},99678:function(Ft,zt,fe){"use strict";fe.d(zt,{h:function(){return wt},Z:function(){return kt}});var oe=fe(59301),ct=fe(82326),Fe=fe(28284),Ze=fe(7939),me=fe(89780),qe=fe.n(me),Me=fe(4887),Ke=Object.defineProperty,ke=Object.defineProperties,he=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ve=(xt,gt,yt)=>gt in xt?Ke(xt,gt,{enumerable:!0,configurable:!0,writable:!0,value:yt}):xt[gt]=yt,Ie=(xt,gt)=>{for(var yt in gt||(gt={}))we.call(gt,yt)&&Ve(xt,yt,gt[yt]);if(Le)for(var yt of Le(gt))vt.call(gt,yt)&&Ve(xt,yt,gt[yt]);return xt},We=(xt,gt)=>ke(xt,he(gt));const De=ct.default.Option,ut={labelCol:{span:4},wrapperCol:{span:20}},dt={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 kt=({callback:xt,onCancel:gt})=>{const[yt,Xt]=(0,oe.useState)("python");function Re(Ct){Xt(dt[Ct][1])}function Je(Ct){xt(Ct)}return oe.createElement(Fe.default,We(Ie({},ut),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Je,style:{width:500}}),oe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},oe.createElement(ct.default,{getPopupContainer:Ct=>Ct.parentNode,onChange:Re},Object.keys(dt).map(Ct=>oe.createElement(De,{key:Ct,value:Ct},dt[Ct][0])))),oe.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},oe.createElement(wt,{mode:yt})),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Ze.ZP,{type:"ghost",onClick:gt},"\u53D6\u6D88")))};function wt({value:xt,onChange:gt,mode:yt,options:Xt={}}){const Re=(0,oe.useRef)(),[Je,Ct]=(0,oe.useState)();return(0,oe.useEffect)(()=>{if(Je){let Ne=function($e){const Te=$e.getValue();gt&>(Te)};return Je.on("change",Ne),()=>{Je.off("change",Ne)}}},[Je,gt]),(0,oe.useEffect)(()=>{Je&&Je.setOption("mode",yt)},[Je,yt]),(0,oe.useEffect)(()=>{Je&&(xt!==Je.getValue()||xt==="")&&setTimeout(()=>{Je.setValue(xt||"")},300)},[Je,xt]),(0,oe.useEffect)(()=>{if(Re.current&&!Je){const Ne=qe().fromTextArea(Re.current,Ie({mode:yt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Xt));Ct(Ne)}},[Re.current,Je]),oe.createElement("div",{className:"my-codemirror-container"},oe.createElement("textarea",{ref:Re}))}},17949:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return xr}});var oe=fe(59301),ct=fe(95392),Fe=fe(89780),Ze=fe.n(Fe),me=fe(76374),qe=fe(4887),Me=fe(6313),Ke=fe(25717),ke=fe(99498),he=fe(25419),Le=fe(67549),we=fe(97231),vt=({value:Kt="",className:pn,showTextOnly:En,showLines:An,style:Jn={}})=>{const tr=(0,oe.useMemo)(()=>"",[Kt]);return oe.createElement(oe.Fragment,null,oe.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},Ve=Object.defineProperty,Ie=Object.defineProperties,We=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,kt=(Kt,pn,En)=>pn in Kt?Ve(Kt,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Kt[pn]=En,wt=(Kt,pn)=>{for(var En in pn||(pn={}))ut.call(pn,En)&&kt(Kt,En,pn[En]);if(De)for(var En of De(pn))dt.call(pn,En)&&kt(Kt,En,pn[En]);return Kt},xt=(Kt,pn)=>Ie(Kt,We(pn));let gt=[{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 yt({onActionCallback:Kt,title:pn,icon:En,actionName:An,className:Jn="",children:tr}){function hr(){Kt(An)}return oe.createElement("a",{title:pn,className:Jn,onClick:hr},oe.createElement("i",{className:`${En}`}),tr)}var Xt=({watch:Kt,showNullButton:pn,showNullProgramButton:En,onActionCallback:An,fullScreen:Jn,insertTemp:tr,hidetoolBar:hr,extraUse:Zn})=>{const Rn=[...gt,{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 oe.createElement("ul",{className:"markdown-toolbar-container"},!hr&&Rn.map((dr,Gt)=>oe.createElement("li",{key:Gt},dr.actionName?oe.createElement(yt,xt(wt({},dr),{onActionCallback:An})):oe.createElement("span",{className:"v-line"}))),pn?oe.createElement("li",null,oe.createElement(yt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:An},oe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,En?oe.createElement(oe.Fragment,null,oe.createElement("li",null,oe.createElement(yt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:An},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),oe.createElement("li",null,oe.createElement(yt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:An},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&oe.createElement("li",null,oe.createElement(yt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:An},oe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Zn&&oe.createElement("li",null,Zn),oe.createElement("li",{className:"btn-full-screen"},oe.createElement(yt,{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})))},Re=fe(81123),Je=fe(28284),Ct=fe(37568),Ne=fe(7939),$e=Object.defineProperty,Te=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Lt=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,lt=(Kt,pn,En)=>pn in Kt?$e(Kt,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Kt[pn]=En,pe=(Kt,pn)=>{for(var En in pn||(pn={}))rt.call(pn,En)&<(Kt,En,pn[En]);if(Lt)for(var En of Lt(pn))st.call(pn,En)&<(Kt,En,pn[En]);return Kt},se=(Kt,pn)=>Te(Kt,Ye(pn));const Ce={labelCol:{span:4},wrapperCol:{span:20}};var je=({callback:Kt,onCancel:pn})=>{function En(An){Kt(An)}return oe.createElement(Je.default,se(pe({},Ce),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:En,style:{width:500}}),oe.createElement(Je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},oe.createElement(Ct.default,null)),oe.createElement(Je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},oe.createElement(Ct.default,null)),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Ne.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},tt=fe(99678),be=fe(90443),Ge=fe(62957),ze=fe(77019),ft=fe(54344),it=fe(59301),ge=({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 it.createElement(Ge.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},it.createElement(ze.Z,{style:{height:"100vh"}},it.createElement(ft.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),Xe=fe(6767),xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},_e=fe(59301),et=(0,oe.forwardRef)(({onCancel:Kt,editImgId:pn,callback:En},An)=>{let Jn=(0,oe.useRef)(),tr=(0,oe.useRef)(),hr=(0,oe.useRef)(),Zn=(0,oe.useRef)(!1);const Rn=(0,oe.useRef)(!1);console.log("ref:",An);const[dr,Gt]=(0,oe.useState)(0),[pt,qt]=(0,oe.useState)("100vh");return(0,oe.useEffect)(()=>{Gt(1)},[]),(0,oe.useImperativeHandle)(An,()=>({setHeight:qt})),_e.createElement("div",{ref:Rn,className:"body-overflow-initial"},_e.createElement(ve.Z,{width:"100vw",height:pt,footer:null,closable:!0,placement:"bottom",open:!!dr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${xe.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{En({src:`/api/attachments/${Cn}`,id:Cn})})},title:_e.createElement(ze.Z,{align:"middle"},_e.createElement(Ee.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),_e.createElement(Ee.Z,{onClick:()=>{qt(pt==="60px"?"100vh":"60px")}},_e.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),_e.createElement(Ee.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){Xe.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Xe.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),En({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},_e.createElement(Ne.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},_e.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})))}),at=fe(78323),Qe=fe(47889),ht=fe(1439);const Et=Qe.ZP.Group,Ut={margin:"0 8px"};var Bt=({callback:Kt,onCancel:pn})=>{function En(An){Kt(An)}return oe.createElement(Je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:En},oe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},oe.createElement("span",{style:Ut},"\u5355\u5143\u683C\u6570\uFF1A"),oe.createElement("span",{style:Ut},"\u884C\u6570"),oe.createElement(Je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},oe.createElement(ht.Z,null)),oe.createElement("span",{style:Ut},"\u5217\u6570"),oe.createElement(Je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},oe.createElement(ht.Z,null))),oe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},oe.createElement("span",{style:Ut},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),oe.createElement(Je.default.Item,{name:"align"},oe.createElement(Et,null,oe.createElement(Qe.ZP,{value:"default"},oe.createElement("i",{className:"fa fa-align-justify"})),oe.createElement(Qe.ZP,{value:"left"},oe.createElement("i",{className:"fa fa-align-left"})),oe.createElement(Qe.ZP,{value:"center"},oe.createElement("i",{className:"fa fa-align-center"})),oe.createElement(Qe.ZP,{value:"right"},oe.createElement("i",{className:"fa fa-align-right"}))))),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Ne.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},ue=fe(71411),te=fe(63089),ee=fe.n(te),le=(0,oe.forwardRef)(({use3d:Kt,width:pn,height:En,callback:An,showSaveButton:Jn},tr)=>{const hr=(0,oe.useRef)(),Zn=(0,oe.useRef)(),[Rn,dr]=(0,oe.useState)(!1),Gt=(0,oe.useRef)({id:hr,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,oe.useEffect)(()=>{Zn.current=new(ee())(Gt.current,!0),window.onload=function(){Zn.current.inject("applet_container")}},[]);const pt=()=>{var qt=window.ggbApplet.getPNGBase64(1,!0,72);return An&&An(qt),qt};return(0,oe.useEffect)(()=>{Gt.current.appName=Rn?"3D":"graphing",Zn.current.inject("applet_container")},[Rn]),(0,oe.useEffect)(()=>{dr(Kt)},[Kt]),(0,oe.useImperativeHandle)(tr,()=>({getImgData:pt})),oe.createElement(oe.Fragment,null,oe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:hr}),oe.createElement(ze.Z,{align:"middle"},oe.createElement(Ee.Z,{flex:1},oe.createElement(ue.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Rn,onChange:qt=>dr(qt)})),oe.createElement(Ee.Z,null,oe.createElement(Ne.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(24638);const ye="link",bt="upload-image",mt="add-flowchart",Dt="draw-image",He="add-flowchart",Ht="code-block",Rt="add-table",Ot="------------",un={default:Ot,left:`:${Ot}`,center:`:${Ot}:`,right:`${Ot}:`};var kn=fe(66991),cn=fe(63949);function wn(){}let $n=0;const Hn=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`,Fn=["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={[ye]:"\u6DFB\u52A0\u94FE\u63A5",[Ht]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[bt]:"\u6DFB\u52A0\u56FE\u7247",[Dt]:"\u6DFB\u52A0\u753B\u56FE",[mt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Rt]:"\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:hr,insertTemp:Zn,mode:Rn="markdown",id:dr="markdown-editor-id",showResizeBar:Gt=!1,noStorage:pt=!1,showNullButton:qt=!1,showNullProgramButton:Cn=!1,hidetoolBar:jn=!1,fullScreen:Pe=!1,onBlur:Oe,onCMBeforeChange:Nt,onFullScreen:Mt,className:Ue="",disablePaste:At=!1,disabled:Jt=!1,disabledFill:tn=!1,placeholder:dn="",values:Zt="",extraUse:$t,onAddBlank:Tt})=>{const[St,en]=(0,oe.useState)(null),[vn,mn]=(0,oe.useState)(Kt),[xn,_n]=(0,oe.useState)(hr),[Yn,hn]=(0,oe.useState)(Pe),[jt,gn]=(0,oe.useState)(""),[nn,Wn]=(0,oe.useState)(0),[wr,Qn]=(0,oe.useState)(An),[Lr,Mr]=(0,oe.useState)(!1),[Cr,ir]=(0,oe.useState)(0),[Ir,gr]=(0,oe.useState)(0),or=(0,oe.useRef)(),Er=(0,oe.useRef)(),Ar=(0,oe.useRef)(),pr=(0,oe.useRef)(),qn=(0,oe.useRef)(),Gn=(0,oe.useRef)(),Br=(0,ct.useDispatch)();(0,oe.useEffect)(()=>{const Vt=window.scrollY||window.pageYOffset;mn(Zt),St==null||St.setValue(Zt),window.scrollTo(0,Vt)},[Zt]),(0,oe.useEffect)(()=>{Mt==null||Mt(Yn)},[Yn]),(0,oe.useEffect)(()=>{if(or.current){let Vt=function(rn,ln){var Mn;if(At){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,be.I)(Sr,Pr=>{var _r,ei,Li;Pr.id?((_r=Sr==null?void 0:Sr.type)==null?void 0:_r.indexOf("image"))>-1?_t.replaceSelection(`<img width="100%" src="/api/attachments/${Pr.id}?type=${Pr.content_type})" alt="" />`):((ei=Sr==null?void 0:Sr.type)==null?void 0:ei.indexOf("video"))>-1?_t.replaceSelection(`<video width="100%" controls src="/api/attachments/${Pr.id}"></video>`):((Li=Sr==null?void 0:Sr.type)==null?void 0:Li.indexOf("pdf"))>-1?_t.replaceSelection(`<a href="/api/attachments/${Pr.id}?type=${Sr.type}&disposition=inline" target="_blank">${Sr.name}</a>`):Fn.includes(zr)?_t.replaceSelection(`<a href="/api/attachments/${Pr.id}?type=office&disposition=inline" target="_blank">${Sr.name}</a>`):_t.replaceSelection(`[${Sr.name}](/api/attachments/${Pr.id}?type=${Pr.content_type})`):(Pr==null?void 0:Pr.status)===401&&(document.location.href="/user/login")})}catch(br){Xe.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const _t=Ze().fromTextArea(or.current,{mode:Rn,lineNumbers:!Jn,lineWrapping:!0,value:Kt,autoCloseTags:!0,autoCloseBrackets:!0});return _t.on("keyup",function(rn,ln){ln.keyCode===8&&(rn.getValue()==""?_t.setOption("placeholder",dn):_t.setOption("placeholder",null))}),_t.on("keydown",function(rn,ln){if(ln.keyCode===8){var Mn=Jr(rn);Mn&&ln.preventDefault()}}),tr&&_t.focus(),_t.on("paste",Vt),Jt&&_t.on("beforeChange",function(rn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),en(_t),()=>{_t.off("paste",Vt)}}},[]);const Vr=(0,oe.useCallback)(()=>{if(Er.current)try{}catch(Vt){console.log(Vt,"---- to set md editor body height")}},[wr,Er,Yn]);(0,oe.useEffect)(()=>{function Vt(){let _t=new me.Z(rn=>{for(let ln of rn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Vr(),St.setSize("100%","100%"),St.refresh())});return _t.observe(or.current.parentElement),_t}if(St){const _t=Vt();return()=>{var rn,ln;(rn=or.current)!=null&&rn.parentElement&&_t.unobserve((ln=or.current)==null?void 0:ln.parentElement)}}},[St,Vr]),(0,oe.useEffect)(()=>{if(St){let Vt=[];for(const[_t,rn]of Object.entries(Xn)){let ln={[_t]:()=>{Dr(rn)}};Vt.push(ln),St.addKeyMap(ln)}return()=>{for(let _t of Vt)St.removeKeyMap(_t)}}},[St]),(0,oe.useEffect)(()=>{Pe!==Yn&&hn(Pe)},[Pe]),(0,kn.Z)(()=>{if(!pt&&nn>0){let Vt=new Date().getTime(),_t=window.sessionStorage.getItem(dr);Vt>=nn+Hn&&(!_t||_t!==vn)&&(window.sessionStorage.setItem(dr,vn),Mr(!0))}},Hn),(0,oe.useEffect)(()=>{_n(hr)},[St,hr]),(0,oe.useEffect)(()=>{St&&tr&&St.focus()},[St,tr]),(0,oe.useEffect)(()=>{if(xn&&St){let Vt=function(rn){let ln=rn.target;if(pr.current){let Mn=ln.scrollTop/ln.scrollHeight;pr.current.scrollTop=pr.current.scrollHeight*Mn}};const _t=St.getScrollerElement();return _t.addEventListener("scroll",Vt),()=>{_t.removeEventListener("scroll",Vt)}}},[St,xn]),(0,oe.useEffect)(()=>{if(St&&Nt){let Vt=function(_t,rn){Nt(_t,rn)};return St.on("beforeChange",Vt),()=>{St.off("beforeChange",Vt)}}},[St,Nt]),(0,oe.useEffect)(()=>{if(St&&Oe){let Vt=function(){Oe(St.getValue())};return St.on("blur",Vt),()=>{St.off("blur",Vt)}}},[St,Oe]);function Jr(Vt,_t){var rn=Vt.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:",_t,Vt,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,oe.useEffect)(()=>{if(St){let Vt=function(_t,rn){const ln=_t.getValue();mn(ln),Wn(new Date().getTime()),_t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(ln,Yt(ln)):pn(ln))};return St.on("change",Vt),()=>{St.off("change",Vt)}}},[St,pn]),(0,oe.useEffect)(()=>{if(St)if(Kt==null)St.setValue(""),mn("");else{const Vt=window.scrollY||window.pageYOffset;Kt!==St.getValue()&&(St.setValue(Kt),mn(Kt),St.setCursor(Jt?1:St.lineCount(),0),window.scrollTo(0,Vt))}},[St,Kt]);const Dr=(0,oe.useCallback)(Vt=>{const _t=St.getCursor(),rn=St.getSelection();let ln=rn.split(`
|
|
`);switch(Vt){case"bold":return St.replaceSelection("**"+rn+"**"),rn===""&&St.setCursor(_t.line,_t.ch+2),St.focus();case"italic":return St.replaceSelection("*"+rn+"*"),rn===""&&St.setCursor(_t.line,_t.ch+1),St.focus();case"code":return St.replaceSelection("`"+rn+"`"),rn===""&&St.setCursor(_t.line,_t.ch+1),St.focus();case"inline-latex":return(0,cn.Ye)(Br)?void 0:(gn("inline-latex"),St.focus());case"latex":return St.replaceSelection("```latex\n"+rn+"\n```"),St.setCursor(_t.line+1,rn.length+1),St.focus();case"line-break":return St.replaceSelection(`<br/>
|
|
`),St.focus();case"list-ul":return rn===""?St.replaceSelection("- "+rn):St.replaceSelection(ln.map(Mn=>Mn===""?"":`- ${Mn}`).join(`
|
|
`)),St.focus();case"list-ol":return rn===""?St.replaceSelection("1. "+rn):St.replaceSelection(ln.map((Mn,sr)=>Mn===""?"":`${sr+1}. ${Mn}`).join(`
|
|
`)),St.focus();case"add-null-ch":Tt==null||Tt();return;case"add-signal":return rn===""&&St.setCursor(_t.line,_t.ch),St.replaceSelection(ur),St.focus();case"add-multiple":return rn===""&&St.setCursor(_t.line,_t.ch),St.replaceSelection(er),St.focus();case"inster-template-1":return rn===""&&St.setCursor(_t.line,_t.ch),St.replaceSelection(nr),St.focus();case"eraser":return St.setValue(""),St.focus();case"trigger-watch":return _n(!xn),St.focus();case"trigger-full-screen":return hn(!Yn),St.focus();case ye:gn(ye);return;case Ht:gn(Ht);return;case bt:gn(bt);return;case Dt:gn(Dt);return;case"maths-latex":if((0,cn.Ye)(Br))return;gn("maths-latex");return;case mt:qn.current="",sessionStorage.removeItem("file_id"),gn(mt);return;case Rt:gn(Rt);return;default:throw new Error}},[St,xn,Yn]),Wr=(0,oe.useCallback)((Vt,_t)=>{var rn,ln,Mn,sr,Vn,yr;Vt!=null&&Vt.disabledClose||gn("");const{src:br,alt:Sr,id:zr}=Vt||{};switch(jt){case ye:const{title:Oi,link:xi}=Vt;return St.replaceSelection(`[${Oi}](${xi})`),St.focus();case Ht:const{language:vi,content:Xi}=Vt;return St.replaceSelection(["```"+vi,Xi,"```"].join(`
|
|
`)),St.focus();case"maths-latex":for(var Pr=atob(Vt),_r=new Uint8Array(Pr.length),ei=0;ei<Pr.length;ei++)_r[ei]=Pr.charCodeAt(ei);var Li=new Blob([_r],{type:"image/png"});(0,be.I)(Li,mi=>{mi.id?St.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,cn.Ye)(Br))return;St.replaceSelection("`$$"+Vt+"$$`");break;case He:if(!zr)return;St.getValue().indexOf(br)===-1?St.replaceSelection(`<center><img id="${zr}" width="80%" src="${br}" class="draw-flowchart" alt="${Sr||""}" /></center>`):document.getElementById(zr).src=at.Z.API_SERVER+br+"?t="+Date.now();break;case bt:case Dt:const fr=_t,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?St.replaceSelection(`<p style="text-align:${fr.align||"initial"}"><img width="${fr.width?fr.width+"%":"initial"}" src="${br}" alt="${Sr||""}" /></p>`):St.replaceSelection(`<img width="100%" src="${br}" alt="${Sr||""}" />`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?St.replaceSelection(`<video width="100%" controls src="${br}"></video>`):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?St.replaceSelection(`<a href="${br}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):Fn.includes(to)?St.replaceSelection(`<a href="${br}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):St.replaceSelection(`[${fr.name}](${br})`),St.focus();case Rt:const{row:ti,col:Ni,align:ao}=Vt;let Ji=`
|
|
`;for(let mi=0;mi<ti;mi++){let Ii=[],Hr=[];for(let _i=0;_i<Ni;_i++)mi===1&&Hr.push(un[ao]),Ii.push(" ");mi===1&&(Ji+=`| ${Hr.join(" | ")} |
|
|
`),Ji+=`| ${Ii.join(Ni===1?"":" | ")} |
|
|
`}return St.replaceSelection(Ji+`
|
|
`),St.focus();default:throw new Error}},[St,jt]),Nr=(0,oe.useMemo)(()=>{switch(jt){case ye:return oe.createElement(je,{callback:Wr,onCancel:Zr});case Ht:return oe.createElement(tt.Z,{callback:Wr,onCancel:Zr});case bt:return oe.createElement(be.Z,{callback:Wr,onCancel:Zr});case mt:return oe.createElement(et,{editImgId:qn.current,callback:Wr,onCancel:Zr});case Rt:return oe.createElement(Bt,{callback:Wr,onCancel:Zr});case"maths-latex":return oe.createElement(le,{showSaveButton:!0,callback:Wr});case"inline-latex":return oe.createElement(ne.Z,{showSaveButton:!0,callback:Wr});default:return null}},[jt]);function Zr(){gn("")}(0,oe.useEffect)(()=>{if(Ar.current){let Vt=function(Vn){Mn=!0,sr=Vn.pageY},_t=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",Vt),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",_t),()=>{ln.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",_t)}}},[St,Ar]),(0,oe.useEffect)(()=>{Qn(An)},[An]);const ii=rr(En),Or=rr(wr),In={width:ii,height:Or},Wt=(0,oe.useMemo)(()=>{if(nn){let Vt=new Date(nn),_t=Vt.getHours(),rn=Vt.getMinutes(),ln=Vt.getSeconds();return _t=_t<10?"0"+_t:_t,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${_t}:${rn}:${ln}`}return 0},[nn]),Yt=Vt=>{const _t=[];if(Cn){let rn=-1;Vt=Vt.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){_t.push({multiLine:ln!==ur})})}return _t};function yn(){window.sessionStorage.removeItem(dr),Mr(!1),Wn(0)}function on(){Mr(!1),Wn(0),St.setValue(window.sessionStorage.getItem(dr))}(0,oe.useEffect)(()=>{Kn[jt]&&jt!==Dt&&jt!==mt&&setTimeout(()=>{const Vt=document.getElementsByClassName("markdown-popup-form")[0],_t=window.innerWidth/2-Vt.offsetWidth/2,rn=window.innerHeight/2-Vt.offsetHeight/2;ir(_t),gr(rn)},0)},[jt]);const Dn=Vt=>{Vt.preventDefault();const _t=Vt.clientX-Cr,rn=Vt.clientY-Ir;document.body.onmousemove=ln=>{let Mn=ln.clientX-_t,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,_t,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Vt,_t,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Vt<20&&rn>Vt||Vt>sr-20&&rn<Vt||_t<20&&ln>_t||_t>Mn-20&&ln<_t?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return oe.createElement(oe.Fragment,null,oe.createElement("div",{className:"markdown-editor-wrapper",ref:Er},oe.createElement("div",{className:`markdown-editor-container ${Ue} ${xn?"on-preview":""} ${Jn?"mini":""} ${Yn?"full-screen":""}`,style:In},oe.createElement(Xt,{insertTemp:Zn,watch:xn,fullScreen:Yn,showNullButton:qt,showNullProgramButton:Cn,onActionCallback:Dr,hidetoolBar:jn,extraUse:$t}),oe.createElement("div",{className:"markdown-editor-body"},oe.createElement("div",{className:"codemirror-container"},oe.createElement("textarea",{ref:or,placeholder:dn})),xn?oe.createElement("div",{ref:pr,className:"preview-container"},Rn==="stex"&&oe.createElement(vt,{value:vn}),Rn!=="stex"&&oe.createElement(we.Z,{edit:!0,disabledFill:tn,showProgramFill:Cn,value:vn,openEditor:Vt=>{var _t;qn.current=Vt,(_t=Gn.current)==null||_t.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),Gt?oe.createElement("a",{ref:Ar,className:"editor-resize"}):null,jt===Dt&&oe.createElement(ge,{callback:Wr,onCancel:Zr}),jt===mt&&oe.createElement(et,{ref:Gn,editImgId:qn.current,callback:Wr,onCancel:Zr}),oe.createElement(Re.Z,null,Kn[jt]&&jt!==Dt&&jt!==mt?oe.createElement(Ge.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Ir},title:oe.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[jt]),open:!0,onCancel:Zr,footer:null,destroyOnClose:!0,width:jt===mt?"1200px":null,height:jt===mt?"80vh":null,className:"markdown-popup-form"},Nr):null))}},90443:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return gt},I:function(){return Xt}});var oe=fe(28284),ct=fe(6767),Fe=fe(37568),Ze=fe(44104),me=fe(1439),qe=fe(47889),Me=fe(7939),Ke=fe(88457),ke=fe(59301),he=fe(59301),Le=Object.defineProperty,we=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,De=(Re,Je,Ct)=>Je in Re?Le(Re,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Re[Je]=Ct,ut=(Re,Je)=>{for(var Ct in Je||(Je={}))Ie.call(Je,Ct)&&De(Re,Ct,Je[Ct]);if(Ve)for(var Ct of Ve(Je))We.call(Je,Ct)&&De(Re,Ct,Je[Ct]);return Re},dt=(Re,Je)=>we(Re,vt(Je));const{useForm:kt}=oe.default,wt={width:280,marginRight:10},xt={labelCol:{span:5},wrapperCol:{span:19}};var gt=({callback:Re,onCancel:Je})=>{const[Ct]=kt();let Ne=(0,ke.useRef)();function $e(Lt){Ne.current.width=Ct.getFieldValue("width"),Ne.current.align=Ct.getFieldValue("align"),Re(Lt,Ne.current)}function Te(Lt,rt){if(Lt.status===-1){ct.ZP.error(Lt.message);return}Ct.setFieldsValue({src:`/api/attachments/${Lt.id}`,type:rt.type})}function Ye(Lt){let rt=Lt.target.files[0];Ne.current=rt,Xt(rt,Te)}return he.createElement(oe.default,dt(ut({form:Ct},xt),{className:"upload-image-panel",onFinish:$e,style:{width:470,overflow:"hidden"}}),he.createElement(oe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(oe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(Fe.default,{style:wt})),he.createElement(yt,{onFileChange:Ye}))),he.createElement(oe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Fe.default,{style:{width:264}})),he.createElement(oe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},he.createElement(Ze.Z,null,he.createElement(oe.default.Item,{name:"width",style:{margin:0}},he.createElement(me.Z,{style:{width:264}})),he.createElement("span",{className:"ml8"},"%"))),he.createElement(oe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},he.createElement(qe.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"}]})),he.createElement("aside",null,he.createElement(oe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},he.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(Me.ZP,{type:"default",onClick:Je},"\u53D6\u6D88"))))};function yt({onFileChange:Re}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:Re}))}function Xt(Re,Je){if(!Re)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ct=new FormData;Ct.append("editormd-image-file",Re),Ct.append("file_param_name","editormd-image-file"),Ct.append("byxhr","true");var Ne=new window.XMLHttpRequest;Ne.withCredentials=!0,Ne.addEventListener("load",function($e){Je(JSON.parse($e.target.responseText),Re)},!1),Ne.addEventListener("error",function($e){console.error($e)},!1),Ne.open("POST",`${Ke.KI}/api/attachments.json`),Ne.send(Ct)}},81123:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return Fe}});var oe=fe(59301),ct=fe(4676);class Fe extends oe.Component{constructor(me){super(me);const qe=window.document;this.node=qe.createElement("div"),qe.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,ct.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},95440:function(Ft,zt,fe){"use strict";fe.d(zt,{SV:function(){return ge},ZP:function(){return it}});var oe=fe(59301),ct=fe(76374);const Fe={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(`
|
|
`)}]},qe={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(`
|
|
`)}]},Me={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),he=(ve,Ee,Xe)=>new Promise((xe,_e)=>{var Be=Qe=>{try{at(Xe.next(Qe))}catch(ht){_e(ht)}},et=Qe=>{try{at(Xe.throw(Qe))}catch(ht){_e(ht)}},at=Qe=>Qe.done?xe(Qe.value):Promise.resolve(Qe.value).then(Be,et);at((Xe=Xe.apply(ve,Ee)).next())});const Le={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"]}},we=(ve,Ee,Xe,xe)=>{const _e=Ee.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Xe.lineNumber,endColumn:Xe.column});return Array.from(new Set(_e.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:xe}))},vt=(ve,Ee,Xe,xe)=>{ve.languages.registerCompletionItemProvider(Ee,{provideCompletionItems(_e,Be){const et=_e.getWordUntilPosition(Be),at={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},Qe=_e.getLineContent(Be.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...we(ve,_e,Be,at),...Xe.map(Et=>({label:Et,kind:ve.languages.CompletionItemKind.Keyword,documentation:Et,insertText:Et,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:at})),...xe.map(Et=>({label:Et.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:Et.content,insertText:Qe.startsWith("#")?Et.content.replace(/#/,""):Et.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:at}))]}}})};var Ve=ve=>{Le.languages.forEach(Ee=>{ve.languages.registerDocumentFormattingEditProvider(Ee,{provideDocumentFormattingEdits(Xe){return he(this,null,function*(){const xe=ke()(Xe.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:Xe.getFullModelRange(),text:xe}]})}})}),vt(ve,"java",Ze.keywords,Ze.quickKey),vt(ve,"cpp",me.keywords,me.quickKey),vt(ve,"c",Fe.keywords,[]),vt(ve,"python",qe.keywords,qe.quickKey),vt(ve,"scala",Me.keywords,Me.quickKey)};const Ie="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var We=Object.defineProperty,De=(ve,Ee,Xe)=>Ee in ve?We(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ve[Ee]=Xe,ut=(ve,Ee,Xe)=>De(ve,typeof Ee!="symbol"?Ee+"":Ee,Xe);const dt=class _l{constructor(Ee,Xe,xe){this.placeholder=Ee,this.editor=Xe,this.monaco=xe,Xe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _l.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)}};ut(dt,"ID","editor.widget.placeholderHint");var wt=dt,xt=fe(96236),gt=fe(6767),yt=fe(25399),Xt=fe(89392),Re=fe(27035),Je=fe(56102),Ct=Object.defineProperty,Ne=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,rt=(ve,Ee,Xe)=>Ee in ve?Ct(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ve[Ee]=Xe,st=(ve,Ee)=>{for(var Xe in Ee||(Ee={}))Ye.call(Ee,Xe)&&rt(ve,Xe,Ee[Xe]);if(Te)for(var Xe of Te(Ee))Lt.call(Ee,Xe)&&rt(ve,Xe,Ee[Xe]);return ve},lt=(ve,Ee)=>Ne(ve,$e(Ee)),pe=(ve,Ee)=>{var Xe={};for(var xe in ve)Ye.call(ve,xe)&&Ee.indexOf(xe)<0&&(Xe[xe]=ve[xe]);if(ve!=null&&Te)for(var xe of Te(ve))Ee.indexOf(xe)<0&&Lt.call(ve,xe)&&(Xe[xe]=ve[xe]);return Xe},se=(ve,Ee,Xe)=>new Promise((xe,_e)=>{var Be=Qe=>{try{at(Xe.next(Qe))}catch(ht){_e(ht)}},et=Qe=>{try{at(Xe.throw(Qe))}catch(ht){_e(ht)}},at=Qe=>Qe.done?xe(Qe.value):Promise.resolve(Qe.value).then(Be,et);at((Xe=Xe.apply(ve,Ee)).next())});function Ce(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function je(){}let tt=!1;const be={"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 Ge(ve=[]){let Ee=ve;if(Array.isArray(ve)){for(let Xe=0;Xe<ve.length;Xe++){let xe=be[ve[Xe]];if(xe)return xe}return Ee[0]}return be[Ee]||Ee}let ze=null;const ft=()=>se(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 it=ve=>{var Ee=ve,{width:Xe="100%",height:xe="100%",value:_e,language:Be="javascript",style:et={},options:at={},overrideServices:Qe={},theme:ht="vs-dark",onEditBlur:Et,isCopy:Ut=!1,onSave:Bt,autoHeight:ue=!1,forbidCopy:te=!1,onChange:ee=je,editorDidMount:ie=je,onFocus:le=je,onBreakPoint:ne=je,breakPointValue:ye=[],filename:bt="educoder.txt",errorLine:mt,errorContent:Dt="",highlightLine:He,openBreakPoint:Ht=!1,placeholder:Rt="",showMiniMap:Ot=!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,oe.useRef)(),cn=(0,oe.useRef)({}),wn=(0,oe.useRef)(),$n=(0,oe.useRef)(),Hn=(0,oe.useRef)([]),mr=(0,oe.useRef)(!1),er=(0,oe.useRef)(),ur=(0,oe.useRef)(),nr=(0,oe.useRef)(!1),[Fn,rr]=(0,oe.useState)(!1);function cr(){let Gt;return kn.current&&(Gt=new ct.Z(pt=>{for(let qt of pt)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&cn.current.instance.layout()}),Gt.observe(kn.current)),Gt}function Bn(){gt.ZP.warning({content:decodeURIComponent(Ie),key:"monaco-editor-tip"})}const Xn=()=>{let Gt=cn.current.instance;if(_e!=null&&Gt&&Fn){const pt=Gt.getModel();pt&&_e!==pt.getValue()&&(tt=!0,pt.setValue(_e),Gt.layout(),tt=!1)}};(0,oe.useEffect)(()=>{const Gt=Re.Z.subscribe("formatDocument",pt=>{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=pt=>{ee(pt)},Gt},[]),(0,oe.useEffect)(()=>{var Gt;let pt=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),_e&&(_e!=null&&_e.length)&&((Gt=pt==null?void 0:pt.updateOptions)==null||Gt.call(pt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(_e.split(/\r\n|\r|\n/g).length))+3,5)}))},[_e,Fn,cn.current]),(0,oe.useEffect)(()=>{if(mt&&cn.current&&cn.current.instance){let pt=cn.current.instance;pt.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=Dt,qt.addZone({afterLineNumber:mt||11,heightInLines:3,domNode:Cn})});var Gt={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}};pt.addOverlayWidget(Gt),pt.revealPositionInCenter({lineNumber:20,column:1})}},[mt,cn.current,Fn]);const Kn=(Gt="",pt)=>{if(!Gt||Gt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(pt);let jn=!1;for(let Pe=0;Pe<2;Pe++)Cn.getStandardTokenType(Pe)===1&&(jn=!0);return jn};(0,oe.useEffect)(()=>{var Gt;const pt=(Gt=cn.current)==null?void 0:Gt.instance;if(pt&&Fn&&te){const qt=pt.onDidBlurEditorWidget(()=>{nr.current=!1}),Cn=pt.onDidFocusEditorText(()=>{nr.current=!0});return()=>{qt.dispose(),Cn.dispose()}}},[cn.current,Fn,te]),(0,oe.useEffect)(()=>{var Gt;if((Gt=cn.current)!=null&&Gt.instance&&Fn&&Ht){let pt=cn.current.instance,qt=pt.getModel();if(!qt)return;(()=>{var Zt;let $t=[],Tt=[];const St=qt.getAllDecorations();for(let vn of St)vn.options.className==="highlighted-line"&&($t.push((Zt=vn==null?void 0:vn.range)==null?void 0:Zt.startLineNumber),Tt.push(vn==null?void 0:vn.id));if(He===$t[0])return;qt.deltaDecorations(Tt,[]);const en=qt.getLineCount();He&&He<=en&&(pt.deltaDecorations([],[{range:new ze.Range(He,1,He,qt.getLineMaxColumn(He)),options:{isWholeLine:!0,className:"highlighted-line"}}]),pt.revealLineInCenter(He))})();const jn=(Zt=!1)=>{var $t;let Tt=[],St=[];const en=qt.getAllDecorations();for(let vn of en)vn.options.linesDecorationsClassName==="breakpoints-select"&&(Tt.push(($t=vn==null?void 0:vn.range)==null?void 0:$t.startLineNumber),St.push(vn==null?void 0:vn.id));if(Zt)return{lines:Tt,ids:St};ne(Tt)},Pe=Zt=>se(void 0,null,function*(){let $t={range:new ze.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[$t]),jn()}),Oe=Zt=>se(void 0,null,function*(){let $t=[];const Tt=pt.getLineDecorations(Zt);for(let St of Tt)St.options.linesDecorationsClassName==="breakpoints-select"&&$t.push(St.id);yield qt.deltaDecorations($t,[]),jn()}),Nt=Zt=>{let $t=pt.getLineDecorations(Zt);for(let Tt of $t)if(Tt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Xt.isEqual)(ye,jn(!0).lines)){qt.deltaDecorations(jn(!0).ids,[]);const Zt=ye.map($t=>({range:new ze.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],Zt)}const Mt=pt.onDidChangeModelContent(Zt=>{let $t=pt.getPosition();if($t){let Tt=$t.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(qt.getLineContent(Tt),Tt)?Oe(Tt):Nt(Tt)?(Oe(Tt),Pe(Tt)):jn()},100)}}),Ue=pt.onMouseDown(Zt=>{var $t,Tt,St;if(Zt.target.detail&&((St=(Tt=($t=Zt.target)==null?void 0:$t.element)==null?void 0:Tt.className)!=null&&St.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(qt.getLineContent(en),en))return;Nt(en)?Oe(en):Pe(en)}}),At=Zt=>{let $t={range:new ze.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Hn.current=pt.deltaDecorations(Hn.current,[$t])},Jt=()=>{Hn.current=pt.deltaDecorations(Hn.current,[])},tn=pt.onMouseMove(Zt=>{var $t,Tt,St;if(Jt(),Zt.target.detail&&((St=(Tt=($t=Zt.target)==null?void 0:$t.element)==null?void 0:Tt.className)!=null&&St.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(qt.getLineContent(en),en))return;At(en)}}),dn=pt.onMouseLeave(()=>{Jt()});return()=>{Mt.dispose(),Ue.dispose(),tn.dispose(),dn.dispose()}}},[cn.current,Fn,ye,He,Ht,Be]),(0,oe.useEffect)(()=>{var Gt;(Gt=cn.current)!=null&&Gt.instance&&Ht&&cn.current.instance.setPosition({lineNumber:0,column:0})},[He]);function xr(){let Gt=cn.current.instance;if(Gt){const pt=Gt.getSelection(),qt=cn.current.pastePos||{},Cn=new ze.Range(qt.startLineNumber||pt.endLineNumber,qt.startColumn||pt.endColumn,qt.endLineNumber||pt.endLineNumber,qt.endColumn||pt.endColumn);setTimeout(()=>{Gt.executeEdits("",[{range:Cn,text:""}])},300)}}function Kt(Gt){(window.navigator.platform.match("Mac")?Gt.metaKey:Gt.ctrlKey)&&Gt.keyCode==83&&(Gt.preventDefault(),Bt())}const pn=()=>{if(ue&&cn.current.instance){const Gt=cn.current.instance.getContentHeight();Rn(Gt<xe?xe:Gt)}else Rn(xe)};function En(Gt){var pt=document.createEvent("MouseEvents");pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Gt.dispatchEvent(pt)}const An=Gt=>{if(!nr.current)return;const{keyCode:pt,ctrlKey:qt,metaKey:Cn,target:jn,type:Pe}=Gt;return(Pe==="paste"||(pt===67||pt===86)&&(Cn||qt))&&jn.nodeName==="TEXTAREA"&&(Bn(),Gt.preventDefault()),!1};function Jn(Gt,pt){var qt=window.URL||window.webkitURL||window,Cn=new Blob([pt]),jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");jn.href=qt.createObjectURL(Cn),jn.download=Gt,En(jn)}(0,oe.useEffect)(()=>{pn()},[pn]),(0,oe.useEffect)(()=>{kn.current&&!Fn&&Promise.all([fe.e(8909),fe.e(4100)]).then(fe.bind(fe,71448)).then(Gt=>{try{ze=Gt,cn.current.instance=ze.editor.create(kn.current,{value:_e,language:Ge(Be),theme:ht,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ot||!1}},Qe);const pt=cn.current.instance;let jn=[...xt.BH._menuItems].find(Mt=>Mt[0]._debugName=="EditorContext")[1],Pe=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Oe=(Mt,Ue)=>{var At,Jt;let tn=Mt._first;do Ue.includes((Jt=(At=tn.element)==null?void 0:At.command)==null?void 0:Jt.id)&&Mt._remove(tn);while(tn=tn.next)};if(ie(pt,ze),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(bt||"educoder.txt",pt.getValue())}})},500),cn.current.subscription=pt.onDidChangeModelContent(Mt=>{mr.current?clearTimeout(er.current):(pn(),ee(pt.getValue(),Mt)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||Ve(ze,Ge(Be)),te&&(Oe(jn,Pe),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",An),window.removeEventListener("paste",An),window.addEventListener("keydown",An),window.addEventListener("paste",An)),window.Monaco=ze,Et&&pt.onDidBlurEditorWidget(()=>{Et(pt.getValue())}),le&&pt.onDidFocusEditorText(()=>{te&&ft(),le(pt.getValue())}),te){ft();try{pt.onDidPaste(Mt=>{const Ue=pt.getSelection(),At=cn.current.pastePos||{},Jt=new ze.Range(At.startLineNumber||Ue.endLineNumber,At.startColumn||Ue.endColumn,At.endLineNumber||Ue.endLineNumber,At.endColumn||Ue.endColumn);pt.executeEdits("",[{range:Mt.range,text:""}])})}catch(Mt){}}let Nt=cr();return Rt&&typeof Rt=="string"&&new wt(Rt,pt,ze),rr(!0),()=>{const Mt=cn.current.instance;Mt.dispose();const Ue=Mt.getModel();Ue&&Ue.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Nt.unobserve(kn.current)}}catch(pt){}})},[]),(0,oe.useEffect)(()=>{if(cn.current.instance&&Fn)return document.addEventListener("keydown",Kt,!1),()=>{document.removeEventListener("keydown",Kt)}},[Bt,Fn]),(0,oe.useEffect)(()=>{let Gt=cn.current.instance;if(Gt&&Fn){let pt=Ge(Be);ze.editor.setModelLanguage(Gt.getModel(),pt)}},[Be,Fn]),(0,oe.useEffect)(()=>{cn.current.instance&&Fn&&ze.editor.setTheme(ht)},[ht,Fn]),(0,oe.useEffect)(()=>{let Gt=cn.current.instance;wn.current=at,Gt&&Fn&&(Gt.updateOptions(st({},at)),setTimeout(()=>{Gt.getModel().updateOptions(st({},at))},200))},[JSON.stringify(at),Fn]),(0,oe.useEffect)(()=>{let Gt=cn.current.instance;Gt&&Fn&&Gt.layout()},[Xe,xe,Fn]);const[tr,hr]=(0,oe.useState)(Ce(Xe)),[Zn,Rn]=(0,oe.useState)(Ce(xe)),dr=lt(st({},et),{width:tr,height:Zn,position:"relative"});return oe.createElement("div",{className:"my-monaco-editor",ref:kn,style:dr},Ut&&oe.createElement(Je.CopyToClipboard,{text:_e,onCopy:()=>gt.ZP.success("\u590D\u5236\u6210\u529F")},oe.createElement(yt.Z,{title:"\u590D\u5236\u4EE3\u7801"},oe.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},oe.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ge({width:ve="100%",height:Ee="100%",original:Xe,modified:xe,language:_e,options:Be={}}){const et=(0,oe.useRef)(),[at,Qe]=(0,oe.useState)(null);function ht(ue){let te;return et.current&&(te=new ct.Z(ee=>{for(let ie of ee)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&ue.layout()}),te.observe(et.current)),te}(0,oe.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(ue=>{ze=ue;const te=ze.editor.createDiffEditor(et.current,lt(st({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},Be),{wordWrap:!0}));Qe(te);let ee=ht(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),ee.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,oe.useEffect)(()=>{at&&at.setModel({original:ze.editor.createModel(Xe,_e),modified:ze.editor.createModel(xe,_e)})},[Xe,xe,_e,at]);const Et=Ce(ve),Ut=Ce(Ee),Bt={width:Et,height:Ut};return oe.createElement("div",{className:"my-diff-editor",ref:et,style:Bt})}},66991:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return ct}});var oe=fe(59301);function ct(Fe,Ze){const me=(0,oe.useRef)();(0,oe.useEffect)(()=>{me.current=Fe}),(0,oe.useEffect)(()=>{function qe(){me.current()}if(Ze!==null){let Me=setInterval(qe,Ze);return()=>clearInterval(Me)}},[Ze])}},5960:function(Ft,zt,fe){"use strict";fe.r(zt),fe.d(zt,{default:function(){return Xt}});var oe=fe(59301),ct=fe(95392),Fe=fe(28284),Ze=fe(91882),me=fe(37568),qe=fe(7939),Me=fe(17949),Ke=fe(79777),ke={bg:"bg___mk00l",flexRow:"flexRow___cF86d",flexJustifyCenter:"flexJustifyCenter___xffJH",flexAlignEnd:"flexAlignEnd___XZNbd",flexAlignCenter:"flexAlignCenter___rBycD",flexColumn:"flexColumn___bvZmC",formWrap:"formWrap___IeMB8",titleWrap:"titleWrap___jBULn",fieldWrap:"fieldWrap___mRoj3",mdWrap:"mdWrap___XC6AD",backgroundFa:"backgroundFa___dCgV1",button:"button___ga1Ue"},he=fe(97041),Le=fe(63949),we=fe(37875),vt=fe(57193),Ve=Object.defineProperty,Ie=Object.defineProperties,We=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,kt=(Re,Je,Ct)=>Je in Re?Ve(Re,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Re[Je]=Ct,wt=(Re,Je)=>{for(var Ct in Je||(Je={}))ut.call(Je,Ct)&&kt(Re,Ct,Je[Ct]);if(De)for(var Ct of De(Je))dt.call(Je,Ct)&&kt(Re,Ct,Je[Ct]);return Re},xt=(Re,Je)=>Ie(Re,We(Je)),gt=(Re,Je,Ct)=>new Promise((Ne,$e)=>{var Te=rt=>{try{Lt(Ct.next(rt))}catch(st){$e(st)}},Ye=rt=>{try{Lt(Ct.throw(rt))}catch(st){$e(st)}},Lt=rt=>rt.done?Ne(rt.value):Promise.resolve(rt.value).then(Te,Ye);Lt((Ct=Ct.apply(Re,Je)).next())});const yt=({shixunHomeworks:Re,newCourse:Je,globalSetting:Ct,loading:Ne,dispatch:$e})=>{var Te;const Ye=(0,ct.useParams)(),[Lt]=Fe.default.useForm(),[rt,st]=(0,oe.useState)({}),[lt,pe]=(0,oe.useState)(),se=(0,oe.useRef)(),{commonHomeWorkAddDefaultData:Ce}=Re;let[je,tt]=(0,oe.useState)({});(0,oe.useEffect)(()=>{setTimeout(()=>{document.body.scrollIntoView()},300);const{coursesId:ft,categoryId:it}=Ye;se.current=Ye==null?void 0:Ye.courseId,pe(!!se.current),se.current&&be(),$e({type:"shixunHomeworks/addCommonHomeWorkDefaultData",payload:{category:it,coursesId:ft,type:1}})},[]);const be=()=>gt(void 0,null,function*(){const ft=yield $e({type:"newCourse/getEditCourseData",payload:{id:se.current}});ft&&(Lt.setFieldsValue({name:ft.name}),Lt.setFieldsValue({intro:ft.description}),Lt.setFieldsValue({notice:ft.learning_notes}),st({name:ft.name,intro:ft.description,notice:ft.learning_notes}))}),Ge=ft=>gt(void 0,null,function*(){var it,ge;const ve=wt({},rt);ve.attachment_ids&&(ve.attachment_ids=(it=ve==null?void 0:ve.attachment_ids)==null?void 0:it.map(_e=>_e.response.id)),ve.reference_attachment_ids&&(ve.reference_attachment_ids=(ge=ve==null?void 0:ve.reference_attachment_ids)==null?void 0:ge.map(_e=>_e.response.id));const{coursesId:Ee,categoryId:Xe}=Ye,xe=yield(0,Ke.H1)(xt(wt({coursesId:Ee,category:Xe},ve),{base_on_project:!0,type:1}));(xe==null?void 0:xe.status)===0&&(ze(xe.homework_id),(0,Le.L9)(["\u6559\u5B66\u8BFE\u5802","\u56FE\u6587\u4F5C\u4E1A","\u65B0\u5EFA\u56FE\u6587\u4F5C\u4E1A"]),ct.history.push(`/classrooms/${Ye.coursesId}/common_homework/${xe.homework_id}/detail`))});function ze(ft){return gt(this,null,function*(){if(!(je!=null&&je.ec_point_ids))return;let it=yield(0,vt.ZP)(`/api/ec_courses/${je==null?void 0:je.ec_course_id}/ec_points/set_work_points.json`,{method:"post",body:wt({homework_common_id:ft},je)})})}return oe.createElement("section",{className:ke.bg},Ce.course_name&&oe.createElement("section",{className:"animated fadeIn"},oe.createElement("aside",{className:"mt10"},Ce.category&&oe.createElement(Ze.Z,{separator:">"},oe.createElement(Ze.Z.Item,null,oe.createElement(ct.Link,{to:`/classrooms/${Ce.course_id}/common_homework`},Ce.course_name)),oe.createElement(Ze.Z.Item,null,oe.createElement(ct.Link,{to:`/classrooms/${Ce.course_id}/common_homework`},Ce.category.category_name)),oe.createElement(Ze.Z.Item,null,"\u65B0\u5EFA\u8BE6\u60C5")))),oe.createElement("aside",{className:"font24 bold mt20 mb20"},"\u65B0\u5EFA\u56FE\u6587\u4F5C\u4E1A"),oe.createElement(Fe.default,{form:Lt,className:ke.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:()=>{console.log("onchange: ",Lt.getFieldsValue()),st(wt({},Lt.getFieldsValue()))},onFinish:Ge},oe.createElement("div",{className:ke.fieldWrap},oe.createElement(Fe.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},oe.createElement(me.default,{maxLength:60,suffix:`${((Te=rt.name)==null?void 0:Te.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),oe.createElement("div",{className:ke.mdWrap},oe.createElement(Fe.default.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},oe.createElement(Me.Z,{watch:!0,defaultValue:rt.intro})),oe.createElement("div",null,oe.createElement(Fe.default.Item,{name:"attachment_ids"},oe.createElement(he.Z,null)))),oe.createElement("div",{className:ke.mdWrap},oe.createElement(Fe.default.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},oe.createElement(Me.Z,{watch:!0,defaultValue:rt.notice})),oe.createElement("div",null,oe.createElement(Fe.default.Item,{name:"reference_attachment_ids"},oe.createElement(he.Z,null))))),oe.createElement("div",{className:ke.mdWrap},oe.createElement(we.Z,{setitem:ft=>tt(wt({},ft))})),oe.createElement("div",{className:ke.backgroundFa},oe.createElement("div",{className:"pt40 mb30"},oe.createElement(Fe.default.Item,null,oe.createElement(qe.ZP,{size:"middle",type:"primary",className:`${ke.button} mr20`,htmlType:"submit",onClick:()=>{Lt.submit()},loading:Ne["newCourse/editCourse"]||Ne["newCourse/submitCourse"]},"\u63D0\u4EA4"),oe.createElement(qe.ZP,{size:"middle",type:"primary",ghost:!0,className:ke.button,onClick:()=>ct.history.push(`/classrooms/${Ye.coursesId}/common_homework`)},"\u53D6\u6D88")))))};var Xt=(0,ct.connect)(({shixunHomeworks:Re,newCourse:Je,loading:Ct,globalSetting:Ne})=>({shixunHomeworks:Re,newCourse:Je,globalSetting:Ne,loading:Ct.effects}))(yt)},12480:function(Ft,zt,fe){"use strict";fe.d(zt,{$J:function(){return Fe},JZ:function(){return me},bN:function(){return Me},jP:function(){return qe},rO:function(){return Ze}});var oe=fe(57193),ct=(Ke,ke,he)=>new Promise((Le,we)=>{var vt=We=>{try{Ie(he.next(We))}catch(De){we(De)}},Ve=We=>{try{Ie(he.throw(We))}catch(De){we(De)}},Ie=We=>We.done?Le(We.value):Promise.resolve(We.value).then(vt,Ve);Ie((he=he.apply(Ke,ke)).next())});function Fe(Ke){return(0,oe.U2)(`libraries/${Ke}.json`)}function Ze(){return(0,oe.U2)("library_tags.json")}function me(Ke){return ct(this,null,function*(){return(yield(0,oe.IV)(`attachments/${Ke}.json`)).status===0})}function qe(Ke){return(0,oe.v_)("libraries.json",Ke)}function Me(Ke,ke){return(0,oe.gz)(`libraries/${Ke}.json`,ke)}},901:function(Ft,zt,fe){"use strict";fe.d(zt,{AL:function(){return wt},Iy:function(){return Le},Qv:function(){return Ve},ez:function(){return kt},jb:function(){return we}});var oe=fe(32834),ct=fe.n(oe),Fe=fe(11690),Ze=fe.n(Fe);let me=1;function qe(Re,Je){const Ct=Re.match(/^(\s+)(?:```)/);if(Ct===null)return Je;const Ne=Ct[1];return Je.split(`
|
|
`).map($e=>{const Te=$e.match(/^\s+/);if(Te===null)return $e;const[Ye]=Te;return Ye.length>=Ne.length?$e.slice(Ne.length):$e}).join(`
|
|
`)}let Me=[],Ke=["<ul>"];const ke=new(ct()).Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Le(){Me.length=0,Ke=["<ul>"]}const we={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function vt(Re,Je,Ct,Ne){if(Je>=Re.length||Re[Je].level<=Ct)return Je;var $e=Re[Je];Ne.push("<li><a href='#"+me+$e.anchor+"'>"+$e.text+"</a>"),Je++;var Te=[];return Je=vt(Re,Je,$e.level,Te),Te.length>0&&(Ne.push("<ul>"),Te.forEach(function(Ye){Ne.push(Ye)}),Ne.push("</ul>")),Ne.push("</li>"),Je=vt(Re,Je,Ct,Ne),Je}function Ve(){return vt(Me,0,0,Ke),Ke.push("</ul>"),Ke.join("")}const Ie={heading(Re){const Je=he.exec(Re);if(me+=1,Je)return{type:"heading",raw:Je[0],depth:Je[1].length,text:Je[2]}},fences(Re){const Je=this.rules.block.fences.exec(Re);if(Je){const Ct=Je[0];let Ne=qe(Ct,Je[3]||"");const $e=Je[2]?Je[2].trim():Je[2];if(["latex","katex","math"].indexOf($e)>=0){const Te=ut(),Ye=Ne;Ne=Te,dt[Te]={type:"block",expression:Ye}}return{type:"code",raw:Ct,lang:$e,text:Ne}}}},We=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const ut=()=>`__special_katext_id_${De++}__`;let dt={};function kt(){return dt}function wt(){De=0,dt={}}function xt(Re){return Re=Re.replace(We,(Je,Ct)=>{const Ne=ut();return dt[Ne]={type:"inline",expression:Ct},Ne}),Re}const gt=ke.listitem;ke.listitem=function(Re){return gt(xt(Re))};const yt=ke.paragraph;ke.paragraph=function(Re){return yt(xt(Re))};const Xt=ke.tablecell;ke.tablecell=function(Re,Je){return Xt(xt(Re),Je)},ke.code=function(Re,Je,Ct){const Ne=(Je||"").match(/\S*/)[0];return Ne?["latex","katex","math"].indexOf(Ne)>=0?`<p class='editormd-tex'>${Re}</p>`:`<pre class="prettyprint linenums"><code class="language-${Je}">${Ct?Re:(0,Fe.escape)(Re,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ct?Re:(0,Fe.escape)(Re,!0))+"</code></pre>"},ke.heading=function(Re,Je,Ct){let Ne=this.options.headerPrefix+Ct.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:Ne,level:Je,text:Re}),"<h"+Je+' id="'+me+Ne+'">'+Re+"</h"+Je+">"},ct().setOptions({silent:!0,gfm:!0,pedantic:!1}),ct().use({tokenizer:Ie,renderer:ke}),zt.ZP=ct()},99498:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){oe.defineOption("placeholder","",function(Ke,ke,he){var Le=he&&he!=oe.Init;if(ke&&!Le)Ke.on("blur",me),Ke.on("change",qe),Ke.on("swapDoc",qe),oe.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){Ze(Ke)}),qe(Ke);else if(!ke&&Le){Ke.off("blur",me),Ke.off("change",qe),Ke.off("swapDoc",qe),oe.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),ct(Ke);var we=Ke.getWrapperElement();we.className=we.className.replace(" CodeMirror-empty","")}ke&&!Ke.hasFocus()&&me(Ke)});function ct(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function Fe(Ke){ct(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 he=Ke.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),ke.appendChild(he),Ke.display.lineSpace.insertBefore(ke,Ke.display.lineSpace.firstChild)}function Ze(Ke){setTimeout(function(){var ke=!1,he=Ke.getInputField();he.nodeName=="TEXTAREA"?ke=!he.value:Ke.lineCount()==1&&(ke=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),ke?Fe(Ke):ct(Ke)},20)}function me(Ke){Me(Ke)&&Fe(Ke)}function qe(Ke){var ke=Ke.getWrapperElement(),he=Me(Ke);ke.className=ke.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?Fe(Ke):ct(Ke)}function Me(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){var ct={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=oe.Pos;oe.defineOption("autoCloseBrackets",!1,function(Ie,We,De){De&&De!=oe.Init&&(Ie.removeKeyMap(me),Ie.state.closeBrackets=null),We&&(qe(Ze(We,"pairs")),Ie.state.closeBrackets=We,Ie.addKeyMap(me))});function Ze(Ie,We){return We=="pairs"&&typeof Ie=="string"?Ie:typeof Ie=="object"&&Ie[We]!=null?Ie[We]:ct[We]}var me={Backspace:ke,Enter:he};function qe(Ie){for(var We=0;We<Ie.length;We++){var De=Ie.charAt(We),ut="'"+De+"'";me[ut]||(me[ut]=Me(De))}}qe(ct.pairs+"`");function Me(Ie){return function(We){return we(We,Ie)}}function Ke(Ie){var We=Ie.state.closeBrackets;if(!We||We.override)return We;var De=Ie.getModeAt(Ie.getCursor());return De.closeBrackets||We}function ke(Ie){var We=Ke(Ie);if(!We||Ie.getOption("disableInput"))return oe.Pass;for(var De=Ze(We,"pairs"),ut=Ie.listSelections(),dt=0;dt<ut.length;dt++){if(!ut[dt].empty())return oe.Pass;var kt=vt(Ie,ut[dt].head);if(!kt||De.indexOf(kt)%2!=0)return oe.Pass}for(var dt=ut.length-1;dt>=0;dt--){var wt=ut[dt].head;Ie.replaceRange("",Fe(wt.line,wt.ch-1),Fe(wt.line,wt.ch+1),"+delete")}}function he(Ie){var We=Ke(Ie),De=We&&Ze(We,"explode");if(!De||Ie.getOption("disableInput"))return oe.Pass;for(var ut=Ie.listSelections(),dt=0;dt<ut.length;dt++){if(!ut[dt].empty())return oe.Pass;var kt=vt(Ie,ut[dt].head);if(!kt||De.indexOf(kt)%2!=0)return oe.Pass}Ie.operation(function(){var wt=Ie.lineSeparator()||`
|
|
`;Ie.replaceSelection(wt+wt,null),Ie.execCommand("goCharLeft"),ut=Ie.listSelections();for(var xt=0;xt<ut.length;xt++){var gt=ut[xt].head.line;Ie.indentLine(gt,null,!0),Ie.indentLine(gt+1,null,!0)}})}function Le(Ie){var We=oe.cmpPos(Ie.anchor,Ie.head)>0;return{anchor:new Fe(Ie.anchor.line,Ie.anchor.ch+(We?-1:1)),head:new Fe(Ie.head.line,Ie.head.ch+(We?1:-1))}}function we(Ie,We){var De=Ke(Ie);if(!De||Ie.getOption("disableInput"))return oe.Pass;var ut=Ze(De,"pairs"),dt=ut.indexOf(We);if(dt==-1)return oe.Pass;for(var kt=Ze(De,"closeBefore"),wt=Ze(De,"triples"),xt=ut.charAt(dt+1)==We,gt=Ie.listSelections(),yt=dt%2==0,Xt,Re=0;Re<gt.length;Re++){var Je=gt[Re],Ct=Je.head,Ne,$e=Ie.getRange(Ct,Fe(Ct.line,Ct.ch+1));if(yt&&!Je.empty())Ne="surround";else if((xt||!yt)&&$e==We)xt&&Ve(Ie,Ct)?Ne="both":wt.indexOf(We)>=0&&Ie.getRange(Ct,Fe(Ct.line,Ct.ch+3))==We+We+We?Ne="skipThree":Ne="skip";else if(xt&&Ct.ch>1&&wt.indexOf(We)>=0&&Ie.getRange(Fe(Ct.line,Ct.ch-2),Ct)==We+We){if(Ct.ch>2&&/\bstring/.test(Ie.getTokenTypeAt(Fe(Ct.line,Ct.ch-2))))return oe.Pass;Ne="addFour"}else if(xt){var Te=Ct.ch==0?" ":Ie.getRange(Fe(Ct.line,Ct.ch-1),Ct);if(!oe.isWordChar($e)&&Te!=We&&!oe.isWordChar(Te))Ne="both";else return oe.Pass}else if(yt&&($e.length===0||/\s/.test($e)||kt.indexOf($e)>-1))Ne="both";else return oe.Pass;if(!Xt)Xt=Ne;else if(Xt!=Ne)return oe.Pass}var Ye=dt%2?ut.charAt(dt-1):We,Lt=dt%2?We:ut.charAt(dt+1);Ie.operation(function(){if(Xt=="skip")Ie.execCommand("goCharRight");else if(Xt=="skipThree")for(var rt=0;rt<3;rt++)Ie.execCommand("goCharRight");else if(Xt=="surround"){for(var st=Ie.getSelections(),rt=0;rt<st.length;rt++)st[rt]=Ye+st[rt]+Lt;Ie.replaceSelections(st,"around"),st=Ie.listSelections().slice();for(var rt=0;rt<st.length;rt++)st[rt]=Le(st[rt]);Ie.setSelections(st)}else Xt=="both"?(Ie.replaceSelection(Ye+Lt,null),Ie.triggerElectric(Ye+Lt),Ie.execCommand("goCharLeft")):Xt=="addFour"&&(Ie.replaceSelection(Ye+Ye+Ye+Ye,"before"),Ie.execCommand("goCharRight"))})}function vt(Ie,We){var De=Ie.getRange(Fe(We.line,We.ch-1),Fe(We.line,We.ch+1));return De.length==2?De:null}function Ve(Ie,We){var De=Ie.getTokenAt(Fe(We.line,We.ch+1));return/\bstring/.test(De.type)&&De.start==We.ch&&(We.ch==0||!/\bstring/.test(Ie.getTokenTypeAt(We)))}})},6313:function(Ft,zt,fe){(function(oe){oe(fe(89780),fe(32855))})(function(oe){oe.defineOption("autoCloseTags",!1,function(ke,he,Le){if(Le!=oe.Init&&Le&&ke.removeKeyMap("autoCloseTags"),!!he){var we={name:"autoCloseTags"};(typeof he!="object"||he.whenClosing!==!1)&&(we["'/'"]=function(vt){return qe(vt)}),(typeof he!="object"||he.whenOpening!==!1)&&(we["'>'"]=function(vt){return Ze(vt)}),ke.addKeyMap(we)}});var ct=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["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 oe.Pass;for(var he=ke.listSelections(),Le=[],we=ke.getOption("autoCloseTags"),vt=0;vt<he.length;vt++){if(!he[vt].empty())return oe.Pass;var Ve=he[vt].head,Ie=ke.getTokenAt(Ve),We=oe.innerMode(ke.getMode(),Ie.state),De=We.state,ut=We.mode.xmlCurrentTag&&We.mode.xmlCurrentTag(De),dt=ut&&ut.name;if(!dt)return oe.Pass;var kt=We.mode.configuration=="html",wt=typeof we=="object"&&we.dontCloseTags||kt&&ct,xt=typeof we=="object"&&we.indentTags||kt&&Fe;Ie.end>Ve.ch&&(dt=dt.slice(0,dt.length-Ie.end+Ve.ch));var gt=dt.toLowerCase();if(!dt||Ie.type=="string"&&(Ie.end!=Ve.ch||!/[\"\']/.test(Ie.string.charAt(Ie.string.length-1))||Ie.string.length==1)||Ie.type=="tag"&&ut.close||Ie.string.indexOf("/")==Ve.ch-Ie.start-1||wt&&Me(wt,gt)>-1||Ke(ke,We.mode.xmlCurrentContext&&We.mode.xmlCurrentContext(De)||[],dt,Ve,!0))return oe.Pass;var yt=typeof we=="object"&&we.emptyTags;if(yt&&Me(yt,dt)>-1){Le[vt]={text:"/>",newPos:oe.Pos(Ve.line,Ve.ch+2)};continue}var Xt=xt&&Me(xt,gt)>-1;Le[vt]={indent:Xt,text:">"+(Xt?`
|
|
|
|
`:"")+"</"+dt+">",newPos:Xt?oe.Pos(Ve.line+1,0):oe.Pos(Ve.line,Ve.ch+1)}}for(var Re=typeof we=="object"&&we.dontIndentOnAutoClose,vt=he.length-1;vt>=0;vt--){var Je=Le[vt];ke.replaceRange(Je.text,he[vt].head,he[vt].anchor,"+insert");var Ct=ke.listSelections().slice(0);Ct[vt]={head:Je.newPos,anchor:Je.newPos},ke.setSelections(Ct),!Re&&Je.indent&&(ke.indentLine(Je.newPos.line,null,!0),ke.indentLine(Je.newPos.line+1,null,!0))}}function me(ke,he){for(var Le=ke.listSelections(),we=[],vt=he?"/":"</",Ve=ke.getOption("autoCloseTags"),Ie=typeof Ve=="object"&&Ve.dontIndentOnSlash,We=0;We<Le.length;We++){if(!Le[We].empty())return oe.Pass;var De=Le[We].head,ut=ke.getTokenAt(De),dt=oe.innerMode(ke.getMode(),ut.state),kt=dt.state;if(he&&(ut.type=="string"||ut.string.charAt(0)!="<"||ut.start!=De.ch-1))return oe.Pass;var wt,xt=dt.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(xt&&dt.mode.name=="javascript")wt=vt+"script";else if(xt&&dt.mode.name=="css")wt=vt+"style";else{var gt=dt.mode.xmlCurrentContext&&dt.mode.xmlCurrentContext(kt);if(!gt||gt.length&&Ke(ke,gt,gt[gt.length-1],De))return oe.Pass;wt=vt+gt[gt.length-1]}ke.getLine(De.line).charAt(ut.end)!=">"&&(wt+=">"),we[We]=wt}if(ke.replaceSelections(we),Le=ke.listSelections(),!Ie)for(var We=0;We<Le.length;We++)(We==Le.length-1||Le[We].head.line<Le[We+1].head.line)&&ke.indentLine(Le[We].head.line)}function qe(ke){return ke.getOption("disableInput")?oe.Pass:me(ke,!0)}oe.commands.closeTag=function(ke){return me(ke)};function Me(ke,he){if(ke.indexOf)return ke.indexOf(he);for(var Le=0,we=ke.length;Le<we;++Le)if(ke[Le]==he)return Le;return-1}function Ke(ke,he,Le,we,vt){if(!oe.scanForClosingTag)return!1;var Ve=Math.min(ke.lastLine()+1,we.line+500),Ie=oe.scanForClosingTag(ke,we,null,Ve);if(!Ie||Ie.tag!=Le)return!1;for(var We=vt?1:0,De=he.length-1;De>=0&&he[De]==Le;De--)++We;we=Ie.to;for(var De=1;De<We;De++){var ut=oe.scanForClosingTag(ke,we,null,Ve);if(!ut||ut.tag!=Le)return!1;we=ut.to}return!0}})},32855:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";var ct=oe.Pos;function Fe(De,ut){return De.line-ut.line||De.ch-ut.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",qe=new RegExp("<(/?)(["+Ze+"]["+me+"]*)","g");function Me(De,ut,dt,kt){this.line=ut,this.ch=dt,this.cm=De,this.text=De.getLine(ut),this.min=kt?Math.max(kt.from,De.firstLine()):De.firstLine(),this.max=kt?Math.min(kt.to-1,De.lastLine()):De.lastLine()}function Ke(De,ut){var dt=De.cm.getTokenTypeAt(ct(De.line,ut));return dt&&/\btag\b/.test(dt)}function ke(De){if(!(De.line>=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function he(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function Le(De){for(;;){var ut=De.text.indexOf(">",De.ch);if(ut==-1){if(ke(De))continue;return}if(!Ke(De,ut+1)){De.ch=ut+1;continue}var dt=De.text.lastIndexOf("/",ut),kt=dt>-1&&!/\S/.test(De.text.slice(dt+1,ut));return De.ch=ut+1,kt?"selfClose":"regular"}}function we(De){for(;;){var ut=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(ut==-1){if(he(De))continue;return}if(!Ke(De,ut+1)){De.ch=ut;continue}qe.lastIndex=ut,De.ch=ut;var dt=qe.exec(De.text);if(dt&&dt.index==ut)return dt}}function vt(De){for(;;){qe.lastIndex=De.ch;var ut=qe.exec(De.text);if(!ut){if(ke(De))continue;return}if(!Ke(De,ut.index+1)){De.ch=ut.index+1;continue}return De.ch=ut.index+ut[0].length,ut}}function Ve(De){for(;;){var ut=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(ut==-1){if(he(De))continue;return}if(!Ke(De,ut+1)){De.ch=ut;continue}var dt=De.text.lastIndexOf("/",ut),kt=dt>-1&&!/\S/.test(De.text.slice(dt+1,ut));return De.ch=ut+1,kt?"selfClose":"regular"}}function Ie(De,ut){for(var dt=[];;){var kt=vt(De),wt,xt=De.line,gt=De.ch-(kt?kt[0].length:0);if(!kt||!(wt=Le(De)))return;if(wt!="selfClose")if(kt[1]){for(var yt=dt.length-1;yt>=0;--yt)if(dt[yt]==kt[2]){dt.length=yt;break}if(yt<0&&(!ut||ut==kt[2]))return{tag:kt[2],from:ct(xt,gt),to:ct(De.line,De.ch)}}else dt.push(kt[2])}}function We(De,ut){for(var dt=[];;){var kt=Ve(De);if(!kt)return;if(kt=="selfClose"){we(De);continue}var wt=De.line,xt=De.ch,gt=we(De);if(!gt)return;if(gt[1])dt.push(gt[2]);else{for(var yt=dt.length-1;yt>=0;--yt)if(dt[yt]==gt[2]){dt.length=yt;break}if(yt<0&&(!ut||ut==gt[2]))return{tag:gt[2],from:ct(De.line,De.ch),to:ct(wt,xt)}}}}oe.registerHelper("fold","xml",function(De,ut){for(var dt=new Me(De,ut.line,0);;){var kt=vt(dt);if(!kt||dt.line!=ut.line)return;var wt=Le(dt);if(!wt)return;if(!kt[1]&&wt!="selfClose"){var xt=ct(dt.line,dt.ch),gt=Ie(dt,kt[2]);return gt&&Fe(gt.from,xt)>0?{from:xt,to:gt.from}:null}}}),oe.findMatchingTag=function(De,ut,dt){var kt=new Me(De,ut.line,ut.ch,dt);if(!(kt.text.indexOf(">")==-1&&kt.text.indexOf("<")==-1)){var wt=Le(kt),xt=wt&&ct(kt.line,kt.ch),gt=wt&&we(kt);if(!(!wt||!gt||Fe(kt,ut)>0)){var yt={from:ct(kt.line,kt.ch),to:xt,tag:gt[2]};return wt=="selfClose"?{open:yt,close:null,at:"open"}:gt[1]?{open:We(kt,gt[2]),close:yt,at:"close"}:(kt=new Me(De,xt.line,xt.ch,dt),{open:yt,close:Ie(kt,gt[2]),at:"open"})}}},oe.findEnclosingTag=function(De,ut,dt,kt){for(var wt=new Me(De,ut.line,ut.ch,dt);;){var xt=We(wt,kt);if(!xt)break;var gt=new Me(De,ut.line,ut.ch,dt),yt=Ie(gt,xt.tag);if(yt)return{open:xt,close:yt}}},oe.scanForClosingTag=function(De,ut,dt,kt){var wt=new Me(De,ut.line,ut.ch,kt?{from:0,to:kt}:null);return Ie(wt,dt)}})},89780:function(Ft){(function(zt,fe){Ft.exports=fe()})(this,function(){"use strict";var zt=navigator.userAgent,fe=navigator.platform,oe=/gecko\/\d/i.test(zt),ct=/MSIE \d/.test(zt),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zt),Ze=/Edge\/(\d+)/.exec(zt),me=ct||Fe||Ze,qe=me&&(ct?document.documentMode||6:+(Ze||Fe)[1]),Me=!Ze&&/WebKit\//.test(zt),Ke=Me&&/Qt\/\d+\.\d+/.test(zt),ke=!Ze&&/Chrome\//.test(zt),he=/Opera\//.test(zt),Le=/Apple Computer/.test(navigator.vendor),we=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(zt),vt=/PhantomJS/.test(zt),Ve=!Ze&&/AppleWebKit/.test(zt)&&/Mobile\/\w+/.test(zt),Ie=/Android/.test(zt),We=Ve||Ie||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(zt),De=Ve||/Mac/.test(fe),ut=/\bCrOS\b/.test(zt),dt=/win/i.test(fe),kt=he&&zt.match(/Version\/(\d*\.\d*)/);kt&&(kt=Number(kt[1])),kt&&kt>=15&&(he=!1,Me=!0);var wt=De&&(Ke||he&&(kt==null||kt<12.11)),xt=oe||me&&qe>=9;function gt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var yt=function(a,y){var x=a.className,b=gt(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 Xt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Re(a,y){return Xt(a).appendChild(y)}function Je(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 z=0;z<y.length;++z)E.appendChild(y[z]);return E}function Ct(a,y,x,b){var E=Je(a,y,x,b);return E.setAttribute("role","presentation"),E}var Ne;document.createRange?Ne=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Ne=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 $e(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 Te(){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;gt(y).test(x)||(a.className+=(x?" ":"")+y)}function Lt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!gt(x[b]).test(y)&&(y+=" "+x[b]);return y}var rt=function(a){a.select()};Ve?rt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(rt=function(a){try{a.select()}catch(y){}});function st(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function lt(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 z=b||0,re=E||0;;){var ae=a.indexOf(" ",z);if(ae<0||ae>=y)return re+(y-z);re+=ae-z,re+=x-re%x,z=ae+1}}var se=function(){this.id=null,this.f=null,this.time=0,this.handler=st(this.onTimeout,this)};se.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},se.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 Ce(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var je=50,tt={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},Ge={origin:"*mouse"},ze={origin:"+move"};function ft(a,y,x){for(var b=0,E=0;;){var z=a.indexOf(" ",b);z==-1&&(z=a.length);var re=z-b;if(z==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var it=[""];function ge(a){for(;it.length<=a;)it.push(ve(it)+" ");return it[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 Xe(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function xe(){}function _e(a,y){var x;return Object.create?x=Object.create(a):(xe.prototype=a,x=new xe),y&<(y,x),x}var Be=/[\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()||Be.test(a))}function at(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function Qe(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var ht=/[\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 Et(a){return a.charCodeAt(0)>=768&&ht.test(a)}function Ut(a,y,x){for(;(x<0?y>0:y<a.length)&&Et(a.charAt(y));)y+=x;return y}function Bt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function ue(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(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",z),E=!0)}E||b(y,x,"ltr")}var te=null;function ee(a,y,x){var b;te=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:te=E),z.from==y&&(z.from!=z.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(de){return de<=247?a.charAt(de):1424<=de&&de<=1524?"R":1536<=de&&de<=1785?y.charAt(de-1536):1774<=de&&de<=2220?"r":8192<=de&&de<=8203?"w":de==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,ae=/[1n]/;function ce(de,Se,Ae){this.level=de,this.from=Se,this.to=Ae}return function(de,Se){var Ae=Se=="ltr"?"L":"R";if(de.length==0||Se=="ltr"&&!b.test(de))return!1;for(var ot=de.length,nt=[],Pt=0;Pt<ot;++Pt)nt.push(x(de.charCodeAt(Pt)));for(var It=0,Qt=Ae;It<ot;++It){var an=nt[It];an=="m"?nt[It]=Qt:Qt=an}for(var fn=0,sn=Ae;fn<ot;++fn){var bn=nt[fn];bn=="1"&&sn=="r"?nt[fn]="n":z.test(bn)&&(sn=bn,bn=="r"&&(nt[fn]="R"))}for(var Pn=1,Sn=nt[0];Pn<ot-1;++Pn){var Un=nt[Pn];Un=="+"&&Sn=="1"&&nt[Pn+1]=="1"?nt[Pn]="1":Un==","&&Sn==nt[Pn+1]&&(Sn=="1"||Sn=="n")&&(nt[Pn]=Sn),Sn=Un}for(var Rr=0;Rr<ot;++Rr){var si=nt[Rr];if(si==",")nt[Rr]="N";else if(si=="%"){var Gr=void 0;for(Gr=Rr+1;Gr<ot&&nt[Gr]=="%";++Gr);for(var Bi=Rr&&nt[Rr-1]=="!"||Gr<ot&&nt[Gr]=="1"?"1":"N",ki=Rr;ki<Gr;++ki)nt[ki]=Bi;Rr=Gr-1}}for(var qr=0,Ei=Ae;qr<ot;++qr){var di=nt[qr];Ei=="L"&&di=="1"?nt[qr]="L":z.test(di)&&(Ei=di)}for(var ri=0;ri<ot;++ri)if(E.test(nt[ri])){var $r=void 0;for($r=ri+1;$r<ot&&E.test(nt[$r]);++$r);for(var Ur=(ri?nt[ri-1]:Ae)=="L",Di=($r<ot?nt[$r]:Ae)=="L",Vo=Ur==Di?Ur?"L":"R":Ae,bo=ri;bo<$r;++bo)nt[bo]=Vo;ri=$r-1}for(var pi=[],eo,li=0;li<ot;)if(re.test(nt[li])){var bs=li;for(++li;li<ot&&re.test(nt[li]);++li);pi.push(new ce(0,bs,li))}else{var oo=li,Mo=pi.length,Ao=Se=="rtl"?1:0;for(++li;li<ot&&nt[li]!="L";++li);for(var bi=oo;bi<li;)if(ae.test(nt[bi])){oo<bi&&(pi.splice(Mo,0,new ce(1,oo,bi)),Mo+=Ao);var Uo=bi;for(++bi;bi<li&&ae.test(nt[bi]);++bi);pi.splice(Mo,0,new ce(2,Uo,bi)),Mo+=Ao,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new ce(1,oo,li))}return Se=="ltr"&&(pi[0].level==1&&(eo=de.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new ce(0,0,eo[0].length))),ve(pi).level==1&&(eo=de.match(/\s+$/))&&(ve(pi).to-=eo[0].length,pi.push(new ce(0,ot-eo[0].length,ot)))),Se=="rtl"?pi.reverse():pi}}();function le(a,y){var x=a.order;return x==null&&(x=a.order=ie(a.text,y)),x}var ne=[],ye=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 bt(a,y){return a._handlers&&a._handlers[y]||ne}function mt(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 z=Ce(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function Dt(a,y){var x=bt(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 He(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Dt(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function Ht(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)Ce(x,y[b])==-1&&x.push(y[b])}function Rt(a,y){return bt(a,y).length>0}function Ot(a){a.prototype.on=function(y,x){ye(this,y,x)},a.prototype.off=function(y,x){mt(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 Hn(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&&qe<9)return!1;var a=Je("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=Je("span","\u200B");Re(a,Je("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&qe<8))}var x=er?Je("span","\u200B"):Je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var nr;function Fn(a){if(nr!=null)return nr;var y=Re(a,document.createTextNode("A\u062EA")),x=Ne(y,0,1).getBoundingClientRect(),b=Ne(y,1,2).getBoundingClientRect();return Xt(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 z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),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=Je("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=Re(a,Je("span","x")),x=y.getBoundingClientRect(),b=Ne(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=_e(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 z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}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 hr(a,y){var x=tr.hasOwnProperty(a)?tr[a]:tr[a]={};lt(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 dr(a,y,x){return a.startState?a.startState(y,x):!0}var Gt=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};Gt.prototype.eol=function(){return this.pos>=this.string.length},Gt.prototype.sol=function(){return this.pos==this.lineStart},Gt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Gt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Gt.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},Gt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Gt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Gt.prototype.skipToEnd=function(){this.pos=this.string.length},Gt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Gt.prototype.backUp=function(a){this.pos-=a},Gt.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)},Gt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Gt.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 z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},Gt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Gt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Gt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Gt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function pt(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],z=E.chunkSize();if(y<z){x=E;break}y-=z}return x.lines[y]}function qt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(z){var re=z.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 jn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Pe(a){if(a.parent==null)return null;for(var y=a.parent,x=Ce(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 Oe(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],z=E.height;if(y<z){a=E;continue e}y-=z,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var ae=a.lines[re],ce=ae.height;if(y<ce)break;y-=ce}return x+re}function Nt(a,y){return y>=a.first&&y<a.first+a.size}function Mt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Ue(a,y,x){if(x===void 0&&(x=null),!(this instanceof Ue))return new Ue(a,y,x);this.line=a,this.ch=y,this.sticky=x}function At(a,y){return a.line-y.line||a.ch-y.ch}function Jt(a,y){return a.sticky==y.sticky&&At(a,y)==0}function tn(a){return Ue(a.line,a.ch)}function dn(a,y){return At(a,y)<0?y:a}function Zt(a,y){return At(a,y)<0?a:y}function $t(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Tt(a,y){if(y.line<a.first)return Ue(a.first,0);var x=a.first+a.size-1;return y.line>x?Ue(x,pt(a,x).text.length):St(y,pt(a,y.line).text.length)}function St(a,y){var x=a.ch;return x==null||x>y?Ue(a.line,y):x<0?Ue(a.line,0):a}function en(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Tt(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],z={};Qn(a,y.text,a.doc.mode,x,function(de,Se){return E.push(de,Se)},z,b);for(var re=x.state,ae=function(de){x.baseTokens=E;var Se=a.state.overlays[de],Ae=1,ot=0;x.state=!0,Qn(a,y.text,Se.mode,x,function(nt,Pt){for(var It=Ae;ot<nt;){var Qt=E[Ae];Qt>nt&&E.splice(Ae,1,nt,E[Ae+1],Qt),Ae+=2,ot=Math.min(nt,Qt)}if(Pt)if(Se.opaque)E.splice(It,Ae-It,nt,"overlay "+Pt),Ae=It+2;else for(;It<Ae;It+=2){var an=E[It+1];E[It+1]=(an?an+" ":"")+"overlay "+Pt}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)ae(ce);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function _n(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Yn(a,Pe(y)),E=y.text.length>a.options.maxHighlightLength&&Zn(a.doc.mode,b.state),z=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.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 z=Lr(a,y,x),re=z>b.first&&pt(b,z-1).stateAfter,ae=re?mn.fromSaved(b,re,z):new mn(b,dr(b.mode),z);return b.iter(z,y,function(ce){hn(a,ce.text,ae);var de=ae.line;ce.stateAfter=de==y-1||de%5==0||de>=E.viewFrom&&de<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function hn(a,y,x,b){var E=a.doc.mode,z=new Gt(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&jt(E,x.state);!z.eol();)gn(E,z,x.state),z.start=z.pos}function jt(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 z=a.token(y,x);if(y.pos>y.start)return z}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 Wn(a,y,x,b){var E=a.doc,z=E.mode,re;y=Tt(E,y);var ae=pt(E,y.line),ce=Yn(a,y.line,x),de=new Gt(ae.text,a.options.tabSize,ce),Se;for(b&&(Se=[]);(b||de.pos<y.ch)&&!de.eol();)de.start=de.pos,re=gn(z,de,ce.state),b&&Se.push(new nn(de,re,Zn(E.mode,ce.state)));return b?Se:new nn(de,re,ce.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,z,re){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var ce=0,de=null,Se=new Gt(y,a.options.tabSize,b),Ae,ot=a.options.addModeClass&&[null];for(y==""&&wr(jt(x,b.state),z);!Se.eol();){if(Se.pos>a.options.maxHighlightLength?(ae=!1,re&&hn(a,y,b,Se.pos),Se.pos=y.length,Ae=null):Ae=wr(gn(x,Se,b.state,ot),z),ot){var nt=ot[0].name;nt&&(Ae="m-"+(Ae?nt+" "+Ae:nt))}if(!ae||de!=Ae){for(;ce<Se.start;)ce=Math.min(Se.start,ce+5e3),E(ce,de);de=Ae}Se.start=Se.pos}for(;ce<Se.pos;){var Pt=Math.min(Se.pos,ce+5e3);E(Pt,de),ce=Pt}}function Lr(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>re;--ae){if(ae<=z.first)return z.first;var ce=pt(z,ae-1),de=ce.stateAfter;if(de&&(!x||ae+(de instanceof vn?de.lookAhead:0)<=z.modeFrontier))return ae;var Se=pe(ce.text,null,a.options.tabSize);(E==null||b>Se)&&(E=ae-1,b=Se)}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=pt(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 Ir(){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 z=a[E],re=z.marker,ae=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var ce=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new or(re,z.from,ce?null:z.to))}}return b}function Gn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var ce=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new or(re,ce?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Br(a,y){if(y.full)return null;var x=Nt(a,y.from.line)&&pt(a,y.from.line).markedSpans,b=Nt(a,y.to.line)&&pt(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=At(y.from,y.to)==0,ae=qn(x,E,re),ce=Gn(b,z,re),de=y.text.length==1,Se=ve(y.text).length+(de?E:0);if(ae)for(var Ae=0;Ae<ae.length;++Ae){var ot=ae[Ae];if(ot.to==null){var nt=Er(ce,ot.marker);nt?de&&(ot.to=nt.to==null?null:nt.to+Se):ot.to=E}}if(ce)for(var Pt=0;Pt<ce.length;++Pt){var It=ce[Pt];if(It.to!=null&&(It.to+=Se),It.from==null){var Qt=Er(ae,It.marker);Qt||(It.from=Se,de&&(ae||(ae=[])).push(It))}else It.from+=Se,de&&(ae||(ae=[])).push(It)}ae&&(ae=Vr(ae)),ce&&ce!=ae&&(ce=Vr(ce));var an=[ae];if(!de){var fn=y.text.length-2,sn;if(fn>0&&ae)for(var bn=0;bn<ae.length;++bn)ae[bn].to==null&&(sn||(sn=[])).push(new or(ae[bn].marker,null,null));for(var Pn=0;Pn<fn;++Pn)an.push(sn);an.push(ce)}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(nt){if(nt.markedSpans)for(var Pt=0;Pt<nt.markedSpans.length;++Pt){var It=nt.markedSpans[Pt].marker;It.readOnly&&(!b||Ce(b,It)==-1)&&(b||(b=[])).push(It)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],ae=re.find(0),ce=0;ce<E.length;++ce){var de=E[ce];if(!(At(de.to,ae.from)<0||At(de.from,ae.to)>0)){var Se=[ce,1],Ae=At(de.from,ae.from),ot=At(de.to,ae.to);(Ae<0||!re.inclusiveLeft&&!Ae)&&Se.push({from:de.from,to:ae.from}),(ot>0||!re.inclusiveRight&&!ot)&&Se.push({from:ae.to,to:de.to}),E.splice.apply(E,Se),ce+=Se.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 Wr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Nr(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(),z=At(b.from,E.from)||Nr(a)-Nr(y);if(z)return-z;var re=At(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,z=0;z<x.length;++z)E=x[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function In(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 z=x[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!b||ii(b,z.marker)<0)&&(b=z.marker)}return b}function yn(a,y,x,b,E){var z=pt(a,y),re=ir&&z.markedSpans;if(re)for(var ae=0;ae<re.length;++ae){var ce=re[ae];if(ce.marker.collapsed){var de=ce.marker.find(0),Se=At(de.from,x)||Nr(ce.marker)-Nr(E),Ae=At(de.to,b)||Zr(ce.marker)-Zr(E);if(!(Se>=0&&Ae<=0||Se<=0&&Ae>=0)&&(Se<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?At(de.to,x)>=0:At(de.to,x)>0)||Se>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?At(de.from,b)<=0:At(de.from,b)<0)))return!0}}}function on(a){for(var y;y=In(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 Vt(a,y){var x=pt(a,y),b=on(x);return x==b?y:Pe(b)}function _t(a,y){if(y>a.lastLine())return y;var x=pt(a,y),b;if(!rn(a,x))return y;for(;b=Wt(x);)x=b.find(1,!0).line;return Pe(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,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],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 z=x.parent;z;x=z,z=x.parent)for(var re=0;re<z.children.length;++re){var ae=z.children[re];if(ae==x)break;y+=ae.height}return y}function sr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=In(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 z=x.find(0,!0);y-=b.text.length-z.from.ch,b=z.to.line,y+=b.text.length-z.to.ch}return y}function Vn(a){var y=a.display,x=a.doc;y.maxLine=pt(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,Wr(this,y),this.height=x?x(this):1};yr.prototype.lineNo=function(){return Pe(this)},Ot(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),Wr(a,x);var E=b?b(a):1;E!=a.height&&jn(a,E)}function Sr(a){a.parent=null,Dr(a)}var zr={},Pr={};function _r(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Pr:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=Ct("span",null,null,Me?"padding-right: .1px":null),b={pre:Ct("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 z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,Fn(a.display.measure)&&(re=le(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var ae=y!=a.display.externalMeasured&&Pe(z);fr(z,b,_n(a,z,ae)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Lt(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Lt(z.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(Me){var ce=b.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Dt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Lt(b.pre.className,b.textClass||"")),b}function Li(a){var y=Je("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,z,re){if(y){var ae=a.splitSpaces?xi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,de=!1,Se;if(!ce.test(y))a.col+=y.length,Se=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,Se),me&&qe<9&&(de=!0),a.pos+=y.length;else{Se=document.createDocumentFragment();for(var Ae=0;;){ce.lastIndex=Ae;var ot=ce.exec(y),nt=ot?ot.index-Ae:y.length-Ae;if(nt){var Pt=document.createTextNode(ae.slice(Ae,Ae+nt));me&&qe<9?Se.appendChild(Je("span",[Pt])):Se.appendChild(Pt),a.map.push(a.pos,a.pos+nt,Pt),a.col+=nt,a.pos+=nt}if(!ot)break;Ae+=nt+1;var It=void 0;if(ot[0]==" "){var Qt=a.cm.options.tabSize,an=Qt-a.col%Qt;It=Se.appendChild(Je("span",ge(an),"cm-tab")),It.setAttribute("role","presentation"),It.setAttribute("cm-text"," "),a.col+=an}else ot[0]=="\r"||ot[0]==`
|
|
`?(It=Se.appendChild(Je("span",ot[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),It.setAttribute("cm-text",ot[0]),a.col+=1):(It=a.cm.options.specialCharPlaceholder(ot[0]),It.setAttribute("cm-text",ot[0]),me&&qe<9?Se.appendChild(Je("span",[It])):Se.appendChild(It),a.col+=1);a.map.push(a.pos,a.pos+1,It),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||de||z||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=Je("span",[Se],fn,z);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(Se)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),b+=z,x=z==" "}return b}function vi(a,y){return function(x,b,E,z,re,ae,ce){E=E?E+" cm-force-border":"cm-force-border";for(var de=x.pos,Se=de+b.length;;){for(var Ae=void 0,ot=0;ot<y.length&&(Ae=y[ot],!(Ae.to>de&&Ae.from<=de));ot++);if(Ae.to>=Se)return a(x,b,E,z,re,ae,ce);a(x,b.slice(0,Ae.to-de),E,z,null,ae,ce),z=null,b=b.slice(Ae.to-de),de=Ae.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,z=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(z,z=x[re]),_r(x[re+1],y.cm.options));return}for(var ae=E.length,ce=0,de=1,Se="",Ae,ot,nt=0,Pt,It,Qt,an,fn;;){if(nt==ce){Pt=It=Qt=ot="",fn=null,an=null,nt=1/0;for(var sn=[],bn=void 0,Pn=0;Pn<b.length;++Pn){var Sn=b[Pn],Un=Sn.marker;if(Un.type=="bookmark"&&Sn.from==ce&&Un.widgetNode)sn.push(Un);else if(Sn.from<=ce&&(Sn.to==null||Sn.to>ce||Un.collapsed&&Sn.to==ce&&Sn.from==ce)){if(Sn.to!=null&&Sn.to!=ce&&nt>Sn.to&&(nt=Sn.to,It=""),Un.className&&(Pt+=" "+Un.className),Un.css&&(ot=(ot?ot+";":"")+Un.css),Un.startStyle&&Sn.from==ce&&(Qt+=" "+Un.startStyle),Un.endStyle&&Sn.to==nt&&(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>ce&&nt>Sn.from&&(nt=Sn.from)}if(bn)for(var si=0;si<bn.length;si+=2)bn[si+1]==nt&&(It+=" "+bn[si]);if(!an||an.from==ce)for(var Gr=0;Gr<sn.length;++Gr)Xi(y,0,sn[Gr]);if(an&&(an.from||0)==ce){if(Xi(y,(an.to==null?ae+1:an.to)-ce,an.marker,an.from==null),an.to==null)return;an.to==ce&&(an=!1)}}if(ce>=ae)break;for(var Bi=Math.min(ae,nt);;){if(Se){var ki=ce+Se.length;if(!an){var qr=ki>Bi?Se.slice(0,Bi-ce):Se;y.addToken(y,qr,Ae?Ae+Pt:Pt,Qt,ce+qr.length==nt?It:"",ot,fn)}if(ki>=Bi){Se=Se.slice(Bi-ce),ce=Bi;break}ce=ki,Qt=""}Se=E.slice(z,z=x[de++]),Ae=_r(x[de++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ar(y),this.size=this.rest?Pe(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,z=y;z<x;z=E){var re=new to(a.doc,pt(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Ni=null;function ao(a){Ni?Ni.ops.push(a):a.ownsGroup=Ni={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{Ni=null,y(x)}}var Ii=null;function Hr(a,y){var x=bt(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ni?E=Ni.delayedCallbacks:Ii?E=Ii:(E=Ii=[],setTimeout(_i,0));for(var z=function(ae){E.push(function(){return x[ae].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function _i(){var a=Ii;Ii=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 z=y.changes[E];z=="text"?lo(a,y):z=="gutter"?On(a,y,x,b):z=="class"?Ln(a,y):z=="widget"&&Tn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=Je("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&qe<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(Je("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=Je("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 z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=Zi(y),ae=y.gutter=Je("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),re.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Je("div",Mt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=a.display.gutterSpecs[ce].className,Se=z.hasOwnProperty(de)&&z[de];Se&&ae.appendChild(Je("div",[Se],"CodeMirror-gutter-elt","left: "+b.gutterLeft[de]+"px; width: "+b.gutterWidth[de]+"px"))}}}function Tn(a,y,x){y.alignable&&(y.alignable=null);for(var b=gt("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);vr(a,y,x)}function Nn(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(Fr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Fr(a,y.rest[b],y,x,!1)}function Fr(a,y,x,b,E){if(y.widgets)for(var z=Zi(x),re=0,ae=y.widgets;re<ae.length;++re){var ce=ae[re],de=Je("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||de.setAttribute("cm-ignore-events","true"),ji(ce,de,x,b),a.display.input.setUneditable(de),E&&ce.above?z.insertBefore(de,x.gutter||x.text):z.appendChild(de),Hr(ce,"redraw")}}function ji(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(!$e(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;"),Re(y.display.measure,Je("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 Wi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Re(a.measure,Je("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 je-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 Gi(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var z=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),ae=0;ae<re.length-1;ae++){var ce=re[ae],de=re[ae+1];Math.abs(ce.bottom-de.bottom)>2&&z.push((ce.bottom+de.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Po(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(Pe(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=on(y);var x=Pe(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,Re(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=Pe(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=Ga(a,y));var E=Po(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 z=x+(b||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Gi(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[z]=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,z,re,ae,ce,de=0;de<a.length;de+=3)if(ae=a[de],ce=a[de+1],y<ae?(E=0,z=1,re="left"):y<ce?(E=y-ae,z=E+1):(de==a.length-3||y==ce&&a[de+3]>y)&&(z=ce-ae,E=z-1,y>=ce&&(re="right")),E!=null){if(b=a[de+2],ae==ce&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;de&&a[de-2]==a[de-3]&&a[de-1].insertLeft;)b=a[(de-=3)+2],re="left";if(x=="right"&&E==ce-ae)for(;de<a.length-3&&a[de+3]==a[de+4]&&!a[de+5].insertLeft;)b=a[(de+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:ae,coverEnd:ce}}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),z=E.node,re=E.start,ae=E.end,ce=E.collapse,de;if(z.nodeType==3){for(var Se=0;Se<4;Se++){for(;re&&Et(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+ae<E.coverEnd&&Et(y.line.text.charAt(E.coverStart+ae));)++ae;if(me&&qe<9&&re==0&&ae==E.coverEnd-E.coverStart?de=z.parentNode.getBoundingClientRect():de=Va(Ne(z,re,ae).getClientRects(),b),de.left||de.right||re==0)break;ae=re,re=re-1,ce="right"}me&&qe<11&&(de=Ua(a.display.measure,de))}else{re>0&&(ce=b="right");var Ae;a.options.lineWrapping&&(Ae=z.getClientRects()).length>1?de=Ae[b=="right"?Ae.length-1:0]:de=z.getBoundingClientRect()}if(me&&qe<9&&!re&&(!de||!de.left&&!de.right)){var ot=z.parentNode.getClientRects()[0];ot?de={left:ot.left,right:ot.left+Ui(a.display),top:ot.top,bottom:ot.bottom}:de=ba}for(var nt=de.top-y.rect.top,Pt=de.bottom-y.rect.top,It=(nt+Pt)/2,Qt=y.view.measure.heights,an=0;an<Qt.length-1&&!(It<Qt[an]);an++);var fn=an?Qt[an-1]:0,sn=Qt[an],bn={left:(ce=="right"?de.right:de.left)-y.rect.left,right:(ce=="left"?de.left:de.right)-y.rect.left,top:fn,bottom:sn};return!de.left&&!de.right&&(bn.bogus=!0),a.options.singleCursorHeightPerLine||(bn.rtop=nt,bn.rbottom=Pt),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,Xt(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&&Ie?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return ke&&Ie?-(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 To(a,y,x,b,E){if(!E){var z=Jo(y);x.top+=z,x.bottom+=z}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 ae=a.display.lineSpace.getBoundingClientRect();re+=ae.top+(b=="window"?0:Ca());var ce=ae.left+(b=="window"?0:Xo());x.left+=ce,x.right+=ce}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 z=a.display.sizer.getBoundingClientRect();b+=z.left,E+=z.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=pt(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,z){b=b||pt(a.doc,y.line),E||(E=uo(a,b));function re(Pt,It){var Qt=zi(a,E,Pt,It?"right":"left",z);return It?Qt.left=Qt.right:Qt.right=Qt.left,To(a,b,Qt,x)}var ae=le(b,a.doc.direction),ce=y.ch,de=y.sticky;if(ce>=b.text.length?(ce=b.text.length,de="before"):ce<=0&&(ce=0,de="after"),!ae)return re(de=="before"?ce-1:ce,de=="before");function Se(Pt,It,Qt){var an=ae[It],fn=an.level==1;return re(Qt?Pt-1:Pt,fn!=Qt)}var Ae=ee(ae,ce,de),ot=te,nt=Se(ce,Ae,de=="before");return ot!=null&&(nt.other=Se(ce,ot,de!="before")),nt}function lr(a,y){var x=0;y=Tt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=pt(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 z=Ue(a,y,x);return z.xRel=E,b&&(z.outside=b),z}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=Oe(b,x),z=b.first+b.size-1;if(E>z)return zn(b.first+b.size-1,pt(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=pt(b,E);;){var ae=Vi(a,re,E,y,x),ce=Yt(re,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!ce)return ae;var de=ce.find(1);if(de.line==E)return de;re=pt(b,E=de.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,z=Bt(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Bt(function(re){return zi(a,x,re).top>b},z,E),{begin:z,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=To(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 z=uo(a,y),re=Jo(y),ae=0,ce=y.text.length,de=!0,Se=le(y,a.doc.direction);if(Se){var Ae=(a.options.lineWrapping?ro:Hi)(a,y,x,z,Se,b,E);de=Ae.level!=1,ae=de?Ae.from:Ae.to-1,ce=de?Ae.to:Ae.from-1}var ot=null,nt=null,Pt=Bt(function(Pn){var Sn=zi(a,z,Pn);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(ot=Pn,nt=Sn),!0):!1},ae,ce),It,Qt,an=!1;if(nt){var fn=b-nt.left<nt.right-b,sn=fn==de;Pt=ot+(sn?0:1),Qt=sn?"after":"before",It=fn?nt.left:nt.right}else{!de&&(Pt==ce||Pt==ae)&&Pt++,Qt=Pt==0?"after":Pt==y.text.length?"before":zi(a,z,Pt-(de?1:0)).bottom+re<=E==de?"after":"before";var bn=wi(a,Ue(x,Pt,Qt),"line",y,z);It=bn.left,an=E<bn.top?-1:E>=bn.bottom?1:0}return Pt=Ut(y.text,Pt,1),zn(x,Pt,Qt,an,b-It)}function Hi(a,y,x,b,E,z,re){var ae=Bt(function(Ae){var ot=E[Ae],nt=ot.level!=1;return ni(wi(a,Ue(x,nt?ot.to:ot.from,nt?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),ce=E[ae];if(ae>0){var de=ce.level!=1,Se=wi(a,Ue(x,de?ce.from:ce.to,de?"after":"before"),"line",y,b);ni(Se,z,re,!0)&&Se.top>re&&(ce=E[ae-1])}return ce}function ro(a,y,x,b,E,z,re){var ae=fi(a,y,b,re),ce=ae.begin,de=ae.end;/\s/.test(y.text.charAt(de-1))&&de--;for(var Se=null,Ae=null,ot=0;ot<E.length;ot++){var nt=E[ot];if(!(nt.from>=de||nt.to<=ce)){var Pt=nt.level!=1,It=zi(a,b,Pt?Math.min(de,nt.to)-1:Math.max(ce,nt.from)).right,Qt=It<z?z-It+1e9:It-z;(!Se||Ae>Qt)&&(Se=nt,Ae=Qt)}}return Se||(Se=E[E.length-1]),Se.from<ce&&(Se={from:ce,to:Se.to,level:Se.level}),Se.to>de&&(Se={from:Se.from,to:de,level:Se.level}),Se}var Ai;function Pi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ai==null){Ai=Je("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ai.appendChild(document.createTextNode("x")),Ai.appendChild(Je("br"));Ai.appendChild(document.createTextNode("x"))}Re(a.measure,Ai);var x=Ai.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Xt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Je("span","xxxxxxxxxx"),x=Je("pre",[y],"CodeMirror-line-like");Re(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,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var ae=a.display.gutterSpecs[re].className;x[ae]=z.offsetLeft+z.clientLeft+E,b[ae]=z.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=Pi(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 z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return x?z+(Math.ceil(E.text.length/b)||1)*y:z+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&jn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&$n(y).getAttribute("cm-not-content")=="true")return null;var z,re,ae=E.lineSpace.getBoundingClientRect();try{z=y.clientX-ae.left,re=y.clientY-ae.top}catch(Ae){return null}var ce=ci(a,z,re),de;if(b&&ce.xRel>0&&(de=pt(a.doc,ce.line).text).length==ce.ch){var Se=pe(de,de.length,a.options.tabSize)-de.length;ce=Ue(ce.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-Se))}return ce}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&&Vt(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)ir&&_t(a.doc,x+b)>E.viewFrom?ho(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ho(a);else if(y<=E.viewFrom){var z=ka(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):ho(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):ho(a)}else{var ae=ka(a,y,y,-1),ce=ka(a,x,x+b,1);ae&&ce?(E.view=E.view.slice(0,ae.index).concat(ti(a,ae.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=b):ho(a)}var de=E.externalMeasured;de&&(x<de.lineN?de.lineN+=b:y<de.lineN+de.size&&(E.externalMeasured=null))}function fo(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 z=b.view[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);Ce(re,x)==-1&&re.push(x)}}}function ho(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),z,re=a.display.view;if(!ir||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,ce=0;ce<E;ce++)ae+=re[ce].size;if(ae!=y){if(b>0){if(E==re.length-1)return null;z=ae+re[E].size-y,E++}else z=ae-y;y+=z,x+=z}for(;Vt(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 Wl(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(),z=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var ae=x.sel.ranges[re];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var ce=ae.empty();(ce||a.options.showCursorWhenSelecting)&&ks(a,ae.head,E),ce||zl(a,ae,z)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Je("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 z=x.appendChild(Je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=b.other.left+"px",z.style.top=b.other.top+"px",z.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,z=document.createDocumentFragment(),re=Qi(a.display),ae=re.left,ce=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,de=E.direction=="ltr";function Se(sn,bn,Pn,Sn){bn<0&&(bn=0),bn=Math.round(bn),Sn=Math.round(Sn),z.appendChild(Je("div",null,"CodeMirror-selected","position: absolute; left: "+sn+`px;
|
|
top: `+bn+"px; width: "+(Pn==null?ce-sn:Pn)+`px;
|
|
height: `+(Sn-bn)+"px"))}function Ae(sn,bn,Pn){var Sn=pt(E,sn),Un=Sn.text.length,Rr,si;function Gr(qr,Ei){return Bo(a,Ue(sn,qr),"div",Sn,Ei)}function Bi(qr,Ei,di){var ri=Yr(a,Sn,null,qr),$r=Ei=="ltr"==(di=="after")?"left":"right",Ur=di=="after"?ri.begin:ri.end-(/\s/.test(Sn.text.charAt(ri.end-1))?2:1);return Gr(Ur,$r)[$r]}var ki=le(Sn,E.direction);return ue(ki,bn||0,Pn==null?Un:Pn,function(qr,Ei,di,ri){var $r=di=="ltr",Ur=Gr(qr,$r?"left":"right"),Di=Gr(Ei-1,$r?"right":"left"),Vo=bn==null&&qr==0,bo=Pn==null&&Ei==Un,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var li=(de?Vo:bo)&&pi,bs=(de?bo:Vo)&&eo,oo=li?ae:($r?Ur:Di).left,Mo=bs?ce:($r?Di:Ur).right;Se(oo,Ur.top,Mo-oo,Ur.bottom)}else{var Ao,bi,Uo,xs;$r?(Ao=de&&Vo&&pi?ae:Ur.left,bi=de?ce:Bi(qr,di,"before"),Uo=de?ae:Bi(Ei,di,"after"),xs=de&&bo&&eo?ce:Di.right):(Ao=de?Bi(qr,di,"before"):ae,bi=!de&&Vo&&pi?ce:Ur.right,Uo=!de&&bo&&eo?ae:Di.left,xs=de?Bi(Ei,di,"after"):ce),Se(Ao,Ur.top,bi-Ao,Ur.bottom),Ur.bottom<Di.top&&Se(ae,Ur.bottom,null,Di.top),Se(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 ot=y.from(),nt=y.to();if(ot.line==nt.line)Ae(ot.line,ot.ch,nt.ch);else{var Pt=pt(E,ot.line),It=pt(E,nt.line),Qt=on(Pt)==on(It),an=Ae(ot.line,ot.ch,Qt?Pt.text.length+1:null).end,fn=Ae(nt.line,Qt?0:null,nt.ch).start;Qt&&(an.top<fn.top-2?(Se(an.right,an.top,null,an.bottom),Se(ae,fn.top,fn.left,fn.bottom)):Se(an.right,an.top,fn.left-an.right,an.bottom)),an.bottom<fn.top&&Se(ae,an.bottom,null,fn.top)}x.appendChild(z)}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()||No(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,No(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Dt(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(),Me&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function No(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Dt(a,"blur",a,y),a.state.focused=!1,yt(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],z=a.options.lineWrapping,re=void 0,ae=0;if(!E.hidden){if(me&&qe<8){var ce=E.node.offsetTop+E.node.offsetHeight;re=ce-x,x=ce}else{var de=E.node.getBoundingClientRect();re=de.bottom-de.top,!z&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-de.left-1)}var Se=E.line.height-re;if((Se>.005||Se<-.005)&&(jn(E.line,re),Ls(E.line),E.rest))for(var Ae=0;Ae<E.rest.length;Ae++)Ls(E.rest[Ae]);if(ae>a.display.sizerWidth){var ot=Math.ceil(ae/Ui(a.display));ot>a.display.maxLineLength&&(a.display.maxLineLength=ot,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,z=Oe(y,b),re=Oe(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,ce=x.ensure.to.line;ae<z?(z=ae,re=Oe(y,Mn(pt(y,ae))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=re&&(z=Oe(y,Mn(pt(y,ce))-a.wrapper.clientHeight),re=ce)}return{from:z,to:Math.max(re,z+1)}}function Hl(a,y){if(!He(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&&!vt){var z=Je("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(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ue(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ue(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,ae=wi(a,y),ce=!x||x==y?ae:wi(a,x);E={left:Math.min(ae.left,ce.left),top:Math.min(ae.top,ce.top)-b,right:Math.max(ae.left,ce.left),bottom:Math.max(ae.bottom,ce.bottom)+b};var de=Qa(a,E),Se=a.doc.scrollTop,Ae=a.doc.scrollLeft;if(de.scrollTop!=null&&($o(a,de.scrollTop),Math.abs(a.doc.scrollTop-Se)>1&&(re=!0)),de.scrollLeft!=null&&(ko(a,de.scrollLeft),Math.abs(a.doc.scrollLeft-Ae)>1&&(re=!0)),!re)break}return E}function jl(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=Pi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=no(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var ae=a.doc.height+Wi(x),ce=y.top<b,de=y.bottom>ae-b;if(y.top<E)re.scrollTop=ce?0:y.top;else if(y.bottom>E+z){var Se=Math.min(y.top,(de?ae:y.bottom)-z);Se!=E&&(re.scrollTop=Se)}var Ae=a.options.fixedGutter?0:x.gutters.offsetWidth,ot=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Ae,nt=qi(a)-x.gutters.offsetWidth,Pt=y.right-y.left>nt;return Pt&&(y.right=y.left+nt),y.left<10?re.scrollLeft=0:y.left<ot?re.scrollLeft=Math.max(0,y.left+Ae-(Pt?0:10)):y.right>nt+ot-3&&(re.scrollLeft=y.right+(Pt?0:10)-nt),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Io(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 Gl(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||(oe||es(a,{top:y}),As(a,y,!0),oe&&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,Is(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+Wi(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=Je("div",[Je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Je("div",[Je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ye(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ye(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&qe<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 z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"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&&!we?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new se,this.disableVert=new se},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=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 Fo(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ps(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),Ps(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ps(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 Ts={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&yt(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ts[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ye(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 z=0;z<y.length;z++)Jl(y[z]);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==Te();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Fo(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&&Ns(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,Tt(b,a.scrollToPos.from),Tt(b,a.scrollToPos.to),a.scrollToPos.margin);Hl(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var ae=0;ae<z.length;++ae)z[ae].lines.length||Dt(z[ae],"hide");if(re)for(var ce=0;ce<re.length;++ce)re[ce].lines.length&&Dt(re[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Dt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Ti(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,st(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(z){if(b.line>=a.display.viewFrom){var re=z.styles,ae=z.text.length>a.options.maxHighlightLength?Zn(y.mode,b.state):null,ce=xn(a,z,b,!0);ae&&(b.state=ae),z.styles=ce.styles;var de=z.styleClasses,Se=ce.classes;Se?z.styleClasses=Se:de&&(z.styleClasses=null);for(var Ae=!re||re.length!=z.styles.length||de!=Se&&(!de||!Se||de.bgClass!=Se.bgClass||de.textClass!=Se.textClass),ot=0;!Ae&&ot<re.length;++ot)Ae=re[ot]!=z.styles[ot];Ae&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&hn(a,z.text,b),z.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&&Ti(a,function(){for(var z=0;z<E.length;z++)fo(a,E[z],"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){Rt(a,y)&&this.events.push(arguments)},Aa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Dt.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=Te();if(!y||!$e(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&$e(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==Te())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&$e(document.body,a.anchorNode)&&$e(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 ho(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;Fs(a)&&(ho(a),y.dims=co(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<z&&z-x.viewFrom<20&&(z=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),ir&&(z=Vt(a.doc,z),re=_t(a.doc,re));var ae=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Wl(a,z,re),x.viewOffset=Mn(pt(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=Cs(a);if(!ae&&ce==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var de=eu(a);return ce>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ce>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(de),Xt(x.cursorDiv),Xt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Ns(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+Wi(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),Fo(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),Ns(a,x);var b=ea(a);Qo(a),Fo(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function ae(Pt){var It=Pt.nextSibling;return Me&&De&&a.display.currentWheelTarget==Pt?Pt.style.display="none":Pt.parentNode.removeChild(Pt),It}for(var ce=b.view,de=b.viewFrom,Se=0;Se<ce.length;Se++){var Ae=ce[Se];if(!Ae.hidden)if(!Ae.node||Ae.node.parentNode!=z){var ot=Nn(a,Ae,de,x);z.insertBefore(ot,re)}else{for(;re!=Ae.node;)re=ae(re);var nt=E&&y!=null&&y<=de&&Ae.lineNumber;Ae.changes&&(Ce(Ae.changes,"gutter")>-1&&(nt=!1),so(a,Ae,de,x)),nt&&(Xt(Ae.lineNumber),Ae.lineNumber.appendChild(document.createTextNode(Mt(a.options,de)))),re=Ae.node.nextSibling}de+=Ae.size}for(;re;)re=ae(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 Is(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,z=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=z),x[re].gutterBackground&&(x[re].gutterBackground.style.left=z));var ae=x[re].alignable;if(ae)for(var ce=0;ce<ae.length;ce++)ae[ce].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Fs(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Mt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Je("div",[Je("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(z,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 z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:z,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rs(a){var y=a.gutters,x=a.gutterSpecs;Xt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,ae=y.appendChild(Je("div",null,"CodeMirror-gutter "+z));re&&(ae.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Rs(a.display),Ci(a),Is(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Je("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Je("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Ct("div",null,"CodeMirror-code"),E.selectionDiv=Je("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Je("div",null,"CodeMirror-cursors"),E.measure=Je("div",null,"CodeMirror-measure"),E.lineMeasure=Je("div",null,"CodeMirror-measure"),E.lineSpace=Ct("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=Ct("div",[E.lineSpace],"CodeMirror-lines");E.mover=Je("div",[z],null,"position: relative"),E.sizer=Je("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Je("div",null,null,"position: absolute; height: "+je+"px; width: 1px;"),E.gutters=Je("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Je("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Je("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&qe<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Me&&!(oe&&We)&&(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 Pa=0,Fi=null;me?Fi=-.53:oe?Fi=15:ke?Fi=-.7:Le&&(Fi=-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*=Fi,y.y*=Fi,y}function _s(a,y){var x=Os(y),b=x.x,E=x.y,z=a.display,re=z.scroller,ae=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(b&&ae||E&&ce){if(E&&De&&Me){e:for(var de=y.target,Se=z.view;de!=re;de=de.parentNode)for(var Ae=0;Ae<Se.length;Ae++)if(Se[Ae].node==de){a.display.currentWheelTarget=de;break e}}if(b&&!oe&&!he&&Fi!=null){E&&ce&&$o(a,Math.max(0,re.scrollTop+E*Fi)),ko(a,Math.max(0,re.scrollLeft+b*Fi)),(!E||E&&ce)&&un(y),z.wheelStartX=null;return}if(E&&Fi!=null){var ot=E*Fi,nt=a.doc.scrollTop,Pt=nt+z.wrapper.clientHeight;ot<0?nt=Math.max(0,nt+ot-50):Pt=Math.min(a.doc.height,Pt+ot+50),es(a,{top:nt,bottom:Pt})}Pa<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=b,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var It=re.scrollLeft-z.wheelStartX,Qt=re.scrollTop-z.wheelStartY,an=Qt&&z.wheelDY&&Qt/z.wheelDY||It&&z.wheelDX&&It/z.wheelDX;z.wheelStartX=z.wheelStartY=null,an&&(Fi=(Fi*Pa+an)/(Pa+1),++Pa)}},200)):(z.wheelDX+=b,z.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(!Jt(x.anchor,b.anchor)||!Jt(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(At(y,b.from())>=0&&At(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 dn(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(ot,nt){return At(ot.from(),nt.from())}),x=Ce(y,E);for(var z=1;z<y.length;z++){var re=y[z],ae=y[z-1],ce=At(ae.to(),re.from());if(b&&!re.empty()?ce>0:ce>=0){var de=Zt(ae.from(),re.from()),Se=dn(ae.to(),re.to()),Ae=ae.empty()?re.from()==re.head:ae.from()==ae.head;z<=x&&--x,y.splice(--z,2,new kr(Ae?Se:de,Ae?de:Se))}}return new Ri(y,x)}function po(a,y){return new Ri([new kr(a,y||a)],0)}function vo(a){return a.text?Ue(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ws(a,y){if(At(a,y.from)<0)return a;if(At(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),Ue(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(Ws(E.anchor,y),Ws(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function zs(a,y,x){return a.line==y.line?Ue(x.line,a.ch-y.ch+x.ch):Ue(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Ue(a.first,0),z=E,re=0;re<y.length;re++){var ae=y[re],ce=zs(ae.from,E,z),de=zs(vo(ae),E,z);if(E=ae.to,z=de,x=="around"){var Se=a.sel.ranges[re],Ae=At(Se.head,Se.anchor)<0;b[re]=new kr(Ae?de:ce,Ae?ce:de)}else b[re]=new kr(ce,ce)}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 Hs(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 z(fn,sn,bn){br(fn,sn,bn,b),Hr(fn,"change",fn,y)}function re(fn,sn){for(var bn=[],Pn=fn;Pn<sn;++Pn)bn.push(new yr(de[Pn],E(Pn),b));return bn}var ae=y.from,ce=y.to,de=y.text,Se=pt(a,ae.line),Ae=pt(a,ce.line),ot=ve(de),nt=E(de.length-1),Pt=ce.line-ae.line;if(y.full)a.insert(0,re(0,de.length)),a.remove(de.length,a.size-de.length);else if(Hs(a,y)){var It=re(0,de.length-1);z(Ae,Ae.text,nt),Pt&&a.remove(ae.line,Pt),It.length&&a.insert(ae.line,It)}else if(Se==Ae)if(de.length==1)z(Se,Se.text.slice(0,ae.ch)+ot+Se.text.slice(ce.ch),nt);else{var Qt=re(1,de.length-1);Qt.push(new yr(ot+Se.text.slice(ce.ch),nt,b)),z(Se,Se.text.slice(0,ae.ch)+de[0],E(0)),a.insert(ae.line+1,Qt)}else if(de.length==1)z(Se,Se.text.slice(0,ae.ch)+de[0]+Ae.text.slice(ce.ch),E(0)),a.remove(ae.line+1,Pt);else{z(Se,Se.text.slice(0,ae.ch)+de[0],E(0)),z(Ae,ot+Ae.text.slice(ce.ch),nt);var an=re(1,de.length-1);Pt>1&&a.remove(ae.line+1,Pt-1),a.insert(ae.line+1,an)}Hr(a,"change",a,y)}function mo(a,y,x){function b(E,z,re){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var ce=E.linked[ae];if(ce.doc!=z){var de=re&&ce.sharedHist;x&&!de||(y(ce.doc,de),b(ce.doc,E,de))}}}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),js(a),a.options.lineWrapping||Vn(a),a.options.mode=y.modeOption,Ci(a)}function js(a){(a.doc.direction=="rtl"?Ye:yt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Ti(a,function(){js(a),Ci(a)})}function Ta(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 Gs(a){for(;a.length;){var y=ve(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return Gs(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 z=+new Date,re,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=su(E,E.lastOp==b)))ae=ve(re.changes),At(y.from,y.to)==0&&At(y.from,ae.to)==0?ae.to=vo(y):re.changes.push(ss(a,y));else{var ce=ve(E.done);for((!ce||!ce.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=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||Dt(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,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||lu(a,z,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gs(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],z=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]={}))[z]=re.markedSpans),++z})}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 du(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=du(a,y),b=Br(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var z=x[E],re=b[E];if(z&&re)e:for(var ae=0;ae<re.length;++ae){for(var ce=re[ae],de=0;de<z.length;++de)if(z[de].marker==ce.marker)continue e;z.push(ce)}else re&&(x[E]=re)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Ri.prototype.deepCopy.call(z):z);continue}var re=z.changes,ae=[];b.push({changes:ae});for(var ce=0;ce<re.length;++ce){var de=re[ce],Se=void 0;if(ae.push({from:de.from,to:de.to,text:de.text}),y)for(var Ae in de)(Se=Ae.match(/^spans_(\d+)$/))&&Ce(y,Number(Se[1]))>-1&&(ve(ae)[Ae]=de[Ae],delete de[Ae])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var z=At(y,E)<0;z!=At(x,E)<0?(E=y,y=x):z!=At(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Na(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),hi(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),z=0;z<a.sel.ranges.length;z++)b[z]=ls(a.sel.ranges[z],y[z],null,E);var re=Ki(a.cm,b,a.sel.primIndex);hi(a,re,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,hi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){hi(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new kr(Tt(a,E[z].anchor),Tt(a,E[z].head))},origin:x&&x.origin};return Dt(a,"beforeSelectionChange",a,b),a.cm&&Dt(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,Ia(a,y,x)):hi(a,y,x)}function hi(a,y,x){Ia(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ia(a,y,x){(Rt(a,"beforeSelectionChange")||a.cm&&Rt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(At(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Io(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,Ht(a.cm)),Hr(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],ce=Fa(a,re.anchor,ae&&ae.anchor,x,b),de=Fa(a,re.head,ae&&ae.head,x,b);(E||ce!=re.anchor||de!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new kr(ce,de))}return E?Ki(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var z=pt(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var ae=z.markedSpans[re],ce=ae.marker,de="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Se="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((ae.from==null||(de?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(Se?ae.to>=y.ch:ae.to>y.ch))){if(E&&(Dt(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(x){var Ae=ce.find(b<0?1:-1),ot=void 0;if((b<0?Se:de)&&(Ae=el(a,Ae,-b,Ae&&Ae.line==y.line?z:null)),Ae&&Ae.line==y.line&&(ot=At(Ae,x))&&(b<0?ot<0:ot>0))return Oo(a,Ae,y,b,E)}var nt=ce.find(b<0?-1:1);return(b<0?de:Se)&&(nt=el(a,nt,b,nt.line==y.line?z:null)),nt?Oo(a,nt,y,b,E):null}}return y}function Fa(a,y,x,b,E){var z=b||1,re=Oo(a,y,x,z,E)||!E&&Oo(a,y,x,z,!0)||Oo(a,y,x,-z,E)||!E&&Oo(a,y,x,-z,!0);return re||(a.cantEdit=!0,Ue(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Tt(a,Ue(y.line-1)):null:x>0&&y.ch==(b||pt(a,y.line)).text.length?y.line<a.first+a.size-1?Ue(y.line+1,0):null:new Ue(y.line,y.ch+x)}function tl(a){a.setSelection(Ue(a.firstLine(),0),Ue(a.lastLine()),be)}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,z,re,ae){E&&(b.from=Tt(a,E)),z&&(b.to=Tt(a,z)),re&&(b.text=re),ae!==void 0&&(b.origin=ae)}),Dt(a,"beforeChange",a,b),a.cm&&Dt(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 _o(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,_o)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Rt(a,"beforeChange")||a.cm&&Rt(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]==""&&At(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,z){!z&&Ce(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,z,re=a.sel,ae=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,de=0;de<ae.length&&(z=ae[de],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));de++);if(de!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=ae.pop(),z.ranges){if(Ba(z,ce),x&&!z.equals(a.sel)){hi(a,z,{clearRedo:!1});return}re=z}else if(b){ae.push(z);return}else break;var Se=[];Ba(re,ce),ce.push({changes:Se,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var Ae=Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"),ot=function(It){var Qt=z.changes[It];if(Qt.origin=y,Ae&&!nl(a,Qt,!1))return ae.length=0,{};Se.push(ss(a,Qt));var an=It?is(a,Qt):ve(ae);oa(a,Qt,an,Ks(a,Qt)),!It&&a.cm&&a.cm.scrollIntoView({from:Qt.from,to:vo(Qt)});var fn=[];mo(a,function(sn,bn){!bn&&Ce(fn,sn.history)==-1&&(sl(sn.history,Qt),fn.push(sn.history)),oa(sn,Qt,null,Ks(sn,Qt))})},nt=z.changes.length-1;nt>=0;--nt){var Pt=ot(nt);if(Pt)return Pt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(Ee(a.sel.ranges,function(E){return new kr(Ue(E.anchor.line+y,E.anchor.ch),Ue(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++)fo(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:Ue(a.first,0),to:Ue(y.to.line+E,y.to.ch),text:[ve(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:Ue(z,pt(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?hu(a.cm,y,b):as(a,y,b),Ia(a,x,be),a.cantEdit&&Fa(a,Ue(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,ae=!1,ce=z.line;a.options.lineWrapping||(ce=Pe(on(pt(b,z.line))),b.iter(ce,re.line+1,function(nt){if(nt==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Ht(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ce,z.line+y.text.length,function(nt){var Pt=sr(nt);Pt>E.maxLineLength&&(E.maxLine=nt,E.maxLineLength=Pt,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),Mr(b,z.line),na(a,400);var de=y.text.length-(re.line-z.line)-1;y.full?Ci(a):z.line==re.line&&y.text.length==1&&!Hs(a.doc,y)?fo(a,z.line,"text"):Ci(a,z.line,re.line+1,de);var Se=Rt(a,"changes"),Ae=Rt(a,"change");if(Ae||Se){var ot={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};Ae&&Hr(a,"change",a,ot),Se&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(ot)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var z;b||(b=x),At(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),_o(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 z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var ae=0;ae<z.ranges.length;ae++)ol(z.ranges[ae].anchor,y,x,b),ol(z.ranges[ae].head,y,x,b);continue}for(var ce=0;ce<z.changes.length;++ce){var de=z.changes[ce];if(x<de.from.line)de.from=Ue(de.from.line+b,de.from.ch),de.to=Ue(de.to.line+b,de.to.ch);else if(y<=de.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,z=y;return typeof y=="number"?z=pt(a,$t(a,y)):E=Pe(y),E==null?null:(b(z,E)&&a.cm&&fo(a.cm,E,x),z)}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),Hr(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 z=Math.min(y,E-a),re=b.height;if(b.removeInner(a,z),this.height-=re-b.height,E==z&&(this.children.splice(x--,1),b.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var ae=[];this.collapse(ae),this.children=[new sa(ae)],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],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,ae=re;ae<E.lines.length;){var ce=new sa(E.lines.slice(ae,ae+=25));E.height-=ce.height,this.children.splice(++b,0,ce),ce.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},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=Ce(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],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=z}}};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=Pe(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 z=gi(this);jn(x,Math.max(0,x.height-z)),a&&(Ti(a,function(){ll(a,x,-z),fo(a,b,"widget")}),Hr(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)||jn(b,b.height+E),x&&Ti(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Hr(x,"lineWidgetChanged",x,a,Pe(b))}))},Ot(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),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),aa(a,y,"widget",function(re){var ae=re.widgets||(re.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!rn(a,re)){var ce=Mn(re)<a.scrollTop;jn(re,re.height+gi(E)),ce&&qa(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Hr(z,"lineWidgetAdded",z,E,typeof y=="number"?y:Pe(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),Rt(this,"clear")){var x=this.find();x&&Hr(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],ae=Er(re.markedSpans,this);a&&!this.collapsed?fo(a,Pe(re),"text"):a&&(ae.to!=null&&(E=Pe(re)),ae.from!=null&&(b=Pe(re))),re.markedSpans=Ar(re.markedSpans,ae),ae.from==null&&this.collapsed&&!rn(this.doc,re)&&a&&jn(re,Pi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var de=on(this.lines[ce]),Se=sr(de);Se>a.display.maxLineLength&&(a.display.maxLine=de,a.display.maxLineLength=Se,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&&Hr(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 z=this.lines[E],re=Er(z.markedSpans,this);if(re.from!=null&&(x=Ue(y?z:Pe(z),re.from),a==-1))return x;if(re.to!=null&&(b=Ue(y?z:Pe(z),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||Ti(b,function(){var E=y.line,z=Pe(y.line),re=$i(b,z);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!rn(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var ce=gi(x)-ae;ce&&jn(E,E.height+ce)}Hr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ce(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(Ce(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ot(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 z=new go(a,E),re=At(y,x);if(b&<(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=Ct("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(yn(a,y.line,y,x,z)||y.line!=x.line&&yn(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}z.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,ce=a.cm,de;if(a.iter(ae,x.line+1,function(Ae){ce&&z.collapsed&&!ce.options.lineWrapping&&on(Ae)==ce.display.maxLine&&(de=!0),z.collapsed&&ae!=y.line&&jn(Ae,0),pr(Ae,new or(z,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),z.collapsed&&a.iter(y.line,x.line+1,function(Ae){rn(a,Ae)&&jn(Ae,0)}),z.clearOnEnter&&ye(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Ir(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++ul,z.atomic=!0),ce){if(de&&(ce.curOp.updateMaxLine=!0),z.collapsed)Ci(ce,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var Se=y.line;Se<=x.line;Se++)fo(ce,Se,"text");z.atomic&&qs(ce.doc),Hr(ce,"markerAdded",ce,z)}return z}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();Hr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Ot(ca);function vu(a,y,x,b,E){b=lt(b),b.shared=!1;var z=[zo(a,y,x,b,E)],re=z[0],ae=b.widgetNode;return mo(a,function(ce){ae&&(b.widgetNode=ae.cloneNode(!0)),z.push(zo(ce,Tt(ce,y),Tt(ce,x),b,E));for(var de=0;de<ce.linked.length;++de)if(ce.linked[de].isParent)return;re=ve(z)}),new ca(z,re)}function cl(a){return a.findMarks(Ue(a.first,0),a.clipPos(Ue(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(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(At(z,re)){var ae=zo(a,z,re,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];mo(E.primary.doc,function(ce){return z.push(ce)});for(var re=0;re<E.markers.length;re++){var ae=E.markers[re];Ce(z,ae.doc)==-1&&(ae.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 z=Ue(x,0);this.sel=po(z),this.history=new Ta(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:z,to:z,text:a}),hi(this,po(z),be)};Si.prototype=_e(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=Ue(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:Ue(x,pt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),hi(this,po(y),be)}),replaceRange:function(a,y,x,b){y=Tt(this,y),x=x?Tt(this,x):y,Wo(this,a,y,x,b)},getRange:function(a,y,x){var b=qt(this,Tt(this,a),Tt(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(Nt(this,a))return pt(this,a)},getLineNumber:function(a){return Pe(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=pt(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 Tt(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,Tt(this,typeof a=="number"?Ue(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,Tt(this,a),Tt(this,y||a),x)}),extendSelection:ai(function(a,y,x){Na(this,Tt(this,a),y&&Tt(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(Tt(this,a[E].anchor),Tt(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),hi(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new kr(Tt(this,a),Tt(this,y||a))),hi(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,z=0;z<E.ranges.length;z++){var re=E.ranges[z];b[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:x}}for(var ae=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)_o(this,b[ce]);ae?Js(this,ae):this.cm&&Io(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 Ta(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 Ta(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&&Qe(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,Qe(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Nt(this,a)||(y=a,a=pt(this,a),!a))return null}else if(y=Pe(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(gt(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",z=b[E];if(z)if(x==null)b[E]=null;else{var re=z.match(gt(x));if(!re)return!1;var ae=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||ae==z.length?"":" ")+z.slice(ae)||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,Tt(this,a),Tt(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=Tt(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Tt(this,a);var y=[],x=pt(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=Tt(this,a),y=Tt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var ae=0;ae<re.length;ae++){var ce=re[ae];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!x||x(ce.marker))&&b.push(ce.marker.parent||ce.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 z=E.text.length+b;if(z>a)return y=a,!0;a-=z,++x}),Tt(this,Ue(x,y))},indexFromPos:function(a){a=Tt(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 jr&&(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 Ta(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 dl=0;function bu(a){var y=this;if(fl(y),!(He(y,a)||ui(y.display,a))){un(a),me&&(dl=+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,z=Array(E),re=0,ae=function(){++re==E&&oi(y,function(){x=Tt(y.doc,x);var nt={from:x,to:x,text:y.doc.splitLines(z.filter(function(Pt){return Pt!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,nt),Js(y.doc,po(Tt(y.doc,x),Tt(y.doc,vo(nt))))})()},ce=function(nt,Pt){if(y.options.allowDropFileTypes&&Ce(y.options.allowDropFileTypes,nt.type)==-1){ae();return}var It=new FileReader;It.onerror=function(){return ae()},It.onload=function(){var Qt=It.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qt)){ae();return}z[Pt]=Qt,ae()},It.readAsText(nt)},de=0;de<b.length;de++)ce(b[de],de);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 Se=a.dataTransfer.getData("Text");if(Se){var Ae;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ae=y.listSelections()),Ia(y.doc,po(x,x)),Ae)for(var ot=0;ot<Ae.length;++ot)Wo(y.doc,"",Ae[ot].anchor,Ae[ot].head,"drag");y.replaceSelection(Se,"around","paste"),y.display.input.focus()}}catch(nt){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-dl<100)){wn(y);return}if(!(He(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Le)){var x=Je("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",he&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),he&&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=Je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Re(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hl(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 z=0;z<x.length;z++)a(x[z])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;ye(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hl(ku)},100))}),ye(window,"blur",function(){return hl(No)})}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"},da=0;da<10;da++)yo[da+48]=yo[da+96]=String(da);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,z,re=0;re<y.length-1;re++){var ae=y[re];if(/^(cmd|meta|m)$/i.test(ae))z=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),z&&(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),z=0;z<E.length;z++){var re=void 0,ae=void 0;z==E.length-1?(ae=E.join(" "),re=b):(ae=E.slice(0,z+1).join(" "),re="...");var ce=y[ae];if(!ce)y[ae]=re;else if(ce!=re)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var de in y)a[de]=y[de];return a}function Ho(a,y,x,b){y=_a(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 Ho(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Ho(a,y.fallthrough[z],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),(wt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(wt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(he&&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 _a(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 z=y(x[E]);b.length&&At(z.from,ve(b).to)<=0;){var re=b.pop();if(At(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}Ti(a,function(){for(var ae=b.length-1;ae>=0;ae--)Wo(a.doc,"",b[ae].from,b[ae].to,"+delete");Io(a)})}function cs(a,y,x){var b=Ut(a.text,y+x,x);return b<0||b>a.text.length?null:b}function ds(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new Ue(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=le(x,y.doc.direction);if(z){var re=E<0?ve(z):z[0],ae=E<0==(re.level==1),ce=ae?"after":"before",de;if(re.level>0||y.doc.direction=="rtl"){var Se=uo(y,x);de=E<0?x.text.length-1:0;var Ae=zi(y,Se,de).top;de=Bt(function(ot){return zi(y,Se,ot).top==Ae},E<0==(re.level==1)?re.from:re.to-1,de),ce=="before"&&(de=cs(x,de,1))}else de=E<0?re.to:re.from;return new Ue(b,de,ce)}}return new Ue(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=le(y,a.doc.direction);if(!E)return ds(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 z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return ds(y,x,b);var ae=function(an,fn){return cs(y,an instanceof Ue?an.ch:an,fn)},ce,de=function(an){return a.options.lineWrapping?(ce=ce||uo(a,y),Yr(a,y,ce,an)):{begin:0,end:y.text.length}},Se=de(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var Ae=re.level==1==b<0,ot=ae(x,Ae?1:-1);if(ot!=null&&(Ae?ot<=re.to&&ot<=Se.end:ot>=re.from&&ot>=Se.begin)){var nt=Ae?"before":"after";return new Ue(x.line,ot,nt)}}var Pt=function(an,fn,sn){for(var bn=function(Rr,si){return si?new Ue(x.line,ae(Rr,1),"before"):new Ue(x.line,Rr,"after")};an>=0&&an<E.length;an+=fn){var Pn=E[an],Sn=fn>0==(Pn.level!=1),Un=Sn?sn.begin:ae(sn.end,-1);if(Pn.from<=Un&&Un<Pn.to||(Un=Sn?Pn.from:ae(Pn.to,-1),sn.begin<=Un&&Un<sn.end))return bn(Un,Sn)}},It=Pt(z+b,b,Se);if(It)return It;var Qt=b>0?Se.end:ae(Se.begin,-1);return Qt!=null&&!(b>0&&Qt==y.text.length)&&(It=Pt(b>0?0:E.length-1,b,de(Qt)),It)?It:null}var ha={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),be)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=pt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Ue(y.head.line+1,0)}:{from:y.head,to:Ue(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Ue(y.from().line,0),to:Tt(a.doc,Ue(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Ue(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(Ue(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Ue(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")},ze)},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")},ze)},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},ze)},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 z=x[E].from(),re=pe(a.getLine(z.line),z.ch,b);y.push(ge(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Ti(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=pt(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new Ue(E.line,E.ch-1)),E.ch>0)E=new Ue(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),Ue(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=pt(a.doc,E.line-1).text;re&&(E=new Ue(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ue(E.line-1,re.length-1),E,"+transpose"))}}x.push(new kr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Ti(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);Io(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=pt(a.doc,y),b=on(x);return b!=x&&(y=Pe(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=pt(a.doc,y),b=Dn(x);return b!=x&&(y=Pe(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=pt(a.doc,x.line),E=le(b,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=z&&y.ch;return Ue(x.line,re?0:z,x.sticky)}return x}function Wa(a,y,x){if(typeof y=="string"&&(y=ha[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)!=tt}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=Ho(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Ho(y,a.options.extraKeys,x,a)||Ho(y,a.options.keyMap,x,a)}var Pu=new se;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:Pu.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"&&Hr(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 Wa(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Wa(a,b)}):pa(a,x,y,function(b){return Wa(a,b)}):!1}function Tu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Wa(a,b,!0)})}var hs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Te(),!He(y,a))){me&&qe<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);he&&(hs=b?x:null,!b&&x==88&&!Bn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),oe&&!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)&&(yt(y,"CodeMirror-crosshair"),mt(document,"keyup",x),mt(document,"mouseover",x))}ye(document,"keyup",x),ye(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),He(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||He(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(he&&x==hs){hs=null,un(a);return}if(!(he&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Tu(y,a,E)||y.display.input.onKeyPress(a))}}}var Nu=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+Nu>a&&At(y,this.pos)==0&&x==this.button};var va,ma;function Iu(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(!(He(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Me||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Hn(a),z=b?Iu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Fu(y,E,b,z,a))&&(E==1?b?Ou(y,b,z,a):$n(a)==x.scroller&&un(a):E==2?(b&&Na(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(xt?y.display.input.onContextMenu(a):Ds(y)))}}}function Fu(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pa(a,ml(z,E),E,function(re){if(typeof re=="string"&&(re=ha[re]),!re)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=re(a,x)!=tt}finally{a.state.suppressEdits=!1}return ae})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=ut?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"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(st(Es,a),0):a.curOp.focus=Te();var E=Ru(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(At((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(At(re.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Wu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,z=!1,re=oi(a,function(de){Me&&(E.scroller.draggable=!1),a.state.draggingText=!1,mt(E.wrapper.ownerDocument,"mouseup",re),mt(E.wrapper.ownerDocument,"mousemove",ae),mt(E.scroller,"dragstart",ce),mt(E.scroller,"drop",re),z||(un(de),b.addNew||Na(a.doc,x,null,null,b.extend),Me&&!Le||me&&qe==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(de){z=z||Math.abs(y.clientX-de.clientX)+Math.abs(y.clientY-de.clientY)>=10},ce=function(){return z=!0};Me&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ye(E.wrapper.ownerDocument,"mouseup",re),ye(E.wrapper.ownerDocument,"mousemove",ae),ye(E.scroller,"dragstart",ce),ye(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(Ue(y.line,0),Tt(a.doc,Ue(y.line+1,0)));var b=x(a,y);return new kr(b.from,b.to)}function Wu(a,y,x,b){var E=a.display,z=a.doc;un(y);var re,ae,ce=z.sel,de=ce.ranges;if(b.addNew&&!b.extend?(ae=z.sel.contains(x),ae>-1?re=de[ae]:re=new kr(x,x)):(re=z.sel.primary(),ae=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new kr(x,x)),x=Co(a,y,!0,!0),ae=-1;else{var Se=Dl(a,x,b.unit);b.extend?re=ls(re,Se.anchor,Se.head,b.extend):re=Se}b.addNew?ae==-1?(ae=de.length,hi(z,Ki(a,de.concat([re]),ae),{scroll:!1,origin:"*mouse"})):de.length>1&&de[ae].empty()&&b.unit=="char"&&!b.extend?(hi(z,Ki(a,de.slice(0,ae).concat(de.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),ce=z.sel):us(z,ae,re,Ge):(ae=0,hi(z,new Ri([re],0),Ge),ce=z.sel);var Ae=x;function ot(sn){if(At(Ae,sn)!=0)if(Ae=sn,b.unit=="rectangle"){for(var bn=[],Pn=a.options.tabSize,Sn=pe(pt(z,x.line).text,x.ch,Pn),Un=pe(pt(z,sn.line).text,sn.ch,Pn),Rr=Math.min(Sn,Un),si=Math.max(Sn,Un),Gr=Math.min(x.line,sn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,sn.line));Gr<=Bi;Gr++){var ki=pt(z,Gr).text,qr=ft(ki,Rr,Pn);Rr==si?bn.push(new kr(Ue(Gr,qr),Ue(Gr,qr))):ki.length>qr&&bn.push(new kr(Ue(Gr,qr),Ue(Gr,ft(ki,si,Pn))))}bn.length||bn.push(new kr(x,x)),hi(z,Ki(a,ce.ranges.slice(0,ae).concat(bn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(sn)}else{var Ei=re,di=Dl(a,sn,b.unit),ri=Ei.anchor,$r;At(di.anchor,ri)>0?($r=di.head,ri=Zt(Ei.from(),di.anchor)):($r=di.anchor,ri=dn(Ei.to(),di.head));var Ur=ce.ranges.slice(0);Ur[ae]=zu(a,new kr(Tt(z,ri),$r)),hi(z,Ki(a,Ur,ae),Ge)}}var nt=E.wrapper.getBoundingClientRect(),Pt=0;function It(sn){var bn=++Pt,Pn=Co(a,sn,!0,b.unit=="rectangle");if(Pn)if(At(Pn,Ae)!=0){a.curOp.focus=Te(),ot(Pn);var Sn=La(E,z);(Pn.line>=Sn.to||Pn.line<Sn.from)&&setTimeout(oi(a,function(){Pt==bn&&It(sn)}),150)}else{var Un=sn.clientY<nt.top?-20:sn.clientY>nt.bottom?20:0;Un&&setTimeout(oi(a,function(){Pt==bn&&(E.scroller.scrollTop+=Un,It(sn))}),50)}}function Qt(sn){a.state.selectingText=!1,Pt=1/0,sn&&(un(sn),E.input.focus()),mt(E.wrapper.ownerDocument,"mousemove",an),mt(E.wrapper.ownerDocument,"mouseup",fn),z.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!Hn(sn)?Qt(sn):It(sn)}),fn=oi(a,Qt);a.state.selectingText=fn,ye(E.wrapper.ownerDocument,"mousemove",an),ye(E.wrapper.ownerDocument,"mouseup",fn)}function zu(a,y){var x=y.anchor,b=y.head,E=pt(a.doc,x.line);if(At(x,b)==0&&x.sticky==b.sticky)return y;var z=le(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),ae=z[re];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var ce=re+(ae.from==x.ch==(ae.level!=1)?0:1);if(ce==0||ce==z.length)return y;var de;if(b.line!=x.line)de=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Se=ee(z,b.ch,b.sticky),Ae=Se-re||(b.ch-x.ch)*(ae.level==1?-1:1);Se==ce-1||Se==ce?de=Ae<0:de=Ae>0}var ot=z[ce+(de?-1:0)],nt=de==(ot.level==1),Pt=nt?ot.from:ot.to,It=nt?"after":"before";return x.ch==Pt&&x.sticky==It?y:new kr(new Ue(x.line,Pt,It),b)}function Ll(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(ot){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var re=a.display,ae=re.lineDiv.getBoundingClientRect();if(z>ae.bottom||!Rt(a,x))return cn(y);z-=ae.top-re.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=re.gutters.childNodes[ce];if(de&&de.getBoundingClientRect().right>=E){var Se=Oe(a.doc,z),Ae=a.display.gutterSpecs[ce];return Dt(a,x,a,Se,Ae.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||Hu(a,y)||He(a,y,"contextmenu")||xt||a.display.input.onContextMenu(y)}function Hu(a,y){return Rt(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 jo={toString:function(){return"CodeMirror.Init"}},Pl={},za={};function Zu(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(ae,ce,de){de!=jo&&z(ae,ce,de)}:z)}a.defineOption=x,a.Init=jo,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 z=[],re=b.doc.first;b.doc.iter(function(ce){for(var de=0;;){var Se=ce.text.indexOf(E,de);if(Se==-1)break;de=Se+E.length,z.push(Ue(re,Se))}re++});for(var ae=z.length-1;ae>=0;ae--)Wo(b.doc,E,z[ae],Ue(z[ae].line,z[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=jo&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",We?"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",!dt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Al(b),ra(b)},!0),x("keyMap","default",function(b,E,z){var re=_a(E),ae=z!=jo&&_a(z);ae&&ae.detach&&ae.detach(b,re),re.attach&&re.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!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 Fo(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Fo(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"&&(No(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,ju),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 ju(a,y,x){var b=x&&x!=jo;if(!y!=!b){var E=a.display.dragFunctions,z=y?ye:mt;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(Ye(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(yt(a.display.wrapper,"CodeMirror-wrap"),Vn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Fo(a)},100)}function jr(a,y){var x=this;if(!(this instanceof jr))return new jr(a,y);this.options=y=y?lt(y):{},lt(Pl,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 jr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.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 se,keySeq:null,specialChars:null},y.autofocus&&!We&&z.input.focus(),me&&qe<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!We||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):No(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],jo);Fs(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ms.length;++ae)ms[ae](this);Lo(this),Me&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}jr.defaults=Pl,jr.optionHandlers=za;function Vu(a){var y=a.display;ye(y.scroller,"mousedown",oi(a,El)),me&&qe<11?ye(y.scroller,"dblclick",oi(a,function(ce){if(!He(a,ce)){var de=Co(a,ce);if(!(!de||vs(a,ce)||ui(a.display,ce))){un(ce);var Se=a.findWordAt(de);Na(a.doc,Se.anchor,Se.head)}}})):ye(y.scroller,"dblclick",function(ce){return He(a,ce)||un(ce)}),ye(y.scroller,"contextmenu",function(ce){return Ml(a,ce)}),ye(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Ml(a,ce)});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 z(ce){if(ce.touches.length!=1)return!1;var de=ce.touches[0];return de.radiusX<=1&&de.radiusY<=1}function re(ce,de){if(de.left==null)return!0;var Se=de.left-ce.left,Ae=de.top-ce.top;return Se*Se+Ae*Ae>20*20}ye(y.scroller,"touchstart",function(ce){if(!He(a,ce)&&!z(ce)&&!vs(a,ce)){y.input.ensurePolled(),clearTimeout(x);var de=+new Date;y.activeTouch={start:de,moved:!1,prev:de-b.end<=300?b:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),ye(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ye(y.scroller,"touchend",function(ce){var de=y.activeTouch;if(de&&!ui(y,ce)&&de.left!=null&&!de.moved&&new Date-de.start<300){var Se=a.coordsChar(y.activeTouch,"page"),Ae;!de.prev||re(de,de.prev)?Ae=new kr(Se,Se):!de.prev.prev||re(de,de.prev.prev)?Ae=a.findWordAt(Se):Ae=new kr(Ue(Se.line,0),Tt(a.doc,Ue(Se.line+1,0))),a.setSelection(Ae.anchor,Ae.head),a.focus(),un(ce)}E()}),ye(y.scroller,"touchcancel",E),ye(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Dt(a,"scroll",a))}),ye(y.scroller,"mousewheel",function(ce){return _s(a,ce)}),ye(y.scroller,"DOMMouseScroll",function(ce){return _s(a,ce)}),ye(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){He(a,ce)||wn(ce)},over:function(ce){He(a,ce)||(wu(a,ce),wn(ce))},start:function(ce){return xu(a,ce)},drop:oi(a,bu),leave:function(ce){He(a,ce)||fl(a)}};var ae=y.input.getField();ye(ae,"keyup",function(ce){return Sl.call(a,ce)}),ye(ae,"keydown",oi(a,Cl)),ye(ae,"keypress",oi(a,kl)),ye(ae,"focus",function(ce){return Ja(a,ce)}),ye(ae,"blur",function(ce){return No(a,ce)})}var ms=[];jr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=Yn(a,y).state:x="prev");var re=a.options.tabSize,ae=pt(E,y),ce=pe(ae.text,null,re);ae.stateAfter&&(ae.stateAfter=null);var de=ae.text.match(/^\s*/)[0],Se;if(!b&&!/\S/.test(ae.text))Se=0,x="not";else if(x=="smart"&&(Se=E.mode.indent(z,ae.text.slice(de.length),ae.text),Se==tt||Se>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?Se=pe(pt(E,y-1).text,null,re):Se=0:x=="add"?Se=ce+a.options.indentUnit:x=="subtract"?Se=ce-a.options.indentUnit:typeof x=="number"&&(Se=ce+x),Se=Math.max(0,Se);var Ae="",ot=0;if(a.options.indentWithTabs)for(var nt=Math.floor(Se/re);nt;--nt)ot+=re,Ae+=" ";if(ot<Se&&(Ae+=ge(Se-ot)),Ae!=de)return Wo(E,Ae,Ue(y,0),Ue(y,de.length),"+input"),ae.stateAfter=null,!0;for(var Pt=0;Pt<E.sel.ranges.length;Pt++){var It=E.sel.ranges[Pt];if(It.head.line==y&&It.head.ch<de.length){var Qt=Ue(y,de.length);us(E,Pt,new kr(Qt,Qt));break}}}var Yi=null;function Ha(a){Yi=a}function gs(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>re,ce=rr(y),de=null;if(ae&&b.ranges.length>1)if(Yi&&Yi.text.join(`
|
|
`)==y){if(b.ranges.length%Yi.text.length==0){de=[];for(var Se=0;Se<Yi.text.length;Se++)de.push(z.splitLines(Yi.text[Se]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(de=Ee(ce,function(an){return[an]}));for(var Ae=a.curOp.updateInput,ot=b.ranges.length-1;ot>=0;ot--){var nt=b.ranges[ot],Pt=nt.from(),It=nt.to();nt.empty()&&(x&&x>0?Pt=Ue(Pt.line,Pt.ch-x):a.state.overwrite&&!ae?It=Ue(It.line,Math.min(pt(z,It.line).text.length,It.ch+ve(ce).length)):ae&&Yi&&Yi.lineWise&&Yi.text.join(`
|
|
`)==ce.join(`
|
|
`)&&(Pt=It=Ue(Pt.line,0)));var Qt={from:Pt,to:It,text:de?de[ot%de.length]:ce,origin:E||(ae?"paste":a.state.cutIncoming>re?"cut":"+input")};_o(a.doc,Qt),Hr(a,"inputRead",a,Qt)}y&&!ae&&Bl(a,y),Io(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ae),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Tl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Ti(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 z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var ae=0;ae<z.electricChars.length;ae++)if(y.indexOf(z.electricChars.charAt(ae))>-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(pt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Hr(a,"electricInput",a,E.head.line)}}}function Nl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,z={anchor:Ue(E,0),head:Ue(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Il(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Fl(){var a=Je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Je("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?a.style.width="1000px":a.setAttribute("wrap","off"),Ve&&(a.style.border="1px solid black"),Il(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 z=this.options,re=z[b];z[b]==E&&b!="mode"||(z[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,re),Dt(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"](_a(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,z=0;z<E.length;++z)if(E[z]==b||E[z].name==b)return E.splice(z,1),!0},addOverlay:yi(function(b,E){var z=b.token?b:a.getMode(this.options,b);if(z.startState)throw new Error("Overlays may not be stateful.");Xe(this.state.overlays,{mode:z,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,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(z,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Nt(this.doc,b)&&ga(this,b,E,z)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var ae=E[re];if(ae.empty())ae.head.line>z&&(ga(this,ae.head.line,b,!0),z=ae.head.line,re==this.doc.sel.primIndex&&Io(this));else{var ce=ae.from(),de=ae.to(),Se=Math.max(z,ce.line);z=Math.min(this.lastLine(),de.line-(de.ch?0:1))+1;for(var Ae=Se;Ae<z;++Ae)ga(this,Ae,b);var ot=this.doc.sel.ranges;ce.ch==0&&E.length==ot.length&&ot[re].from().ch>0&&us(this.doc,re,new kr(ce,ot[re].to()),be)}}}),getTokenAt:function(b,E){return Wn(this,b,E)},getLineTokens:function(b,E){return Wn(this,Ue(b),E,!0)},getTokenTypeAt:function(b){b=Tt(this.doc,b);var E=_n(this,pt(this.doc,b.line)),z=0,re=(E.length-1)/2,ae=b.ch,ce;if(ae==0)ce=E[2];else for(;;){var de=z+re>>1;if((de?E[de*2-1]:0)>=ae)re=de;else if(E[de*2+1]<ae)z=de+1;else{ce=E[de*2+2];break}}var Se=ce?ce.indexOf("overlay "):-1;return Se<0?ce:Se==0?null:ce.slice(0,Se-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 z=[];if(!x.hasOwnProperty(E))return z;var re=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")re[ae[E]]&&z.push(re[ae[E]]);else if(ae[E])for(var ce=0;ce<ae[E].length;ce++){var de=re[ae[E][ce]];de&&z.push(de)}else ae.helperType&&re[ae.helperType]?z.push(re[ae.helperType]):re[ae.name]&&z.push(re[ae.name]);for(var Se=0;Se<re._global.length;Se++){var Ae=re._global[Se];Ae.pred(ae,this)&&Ce(z,Ae.val)==-1&&z.push(Ae.val)}return z},getStateAfter:function(b,E){var z=this.doc;return b=$t(z,b==null?z.first+z.size-1:b),Yn(this,b+1,E).state},cursorCoords:function(b,E){var z,re=this.doc.sel.primary();return b==null?z=re.head:typeof b=="object"?z=Tt(this.doc,b):z=b?re.from():re.to(),wi(this,z,E||"page")},charCoords:function(b,E){return Bo(this,Tt(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,Oe(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,ae;if(typeof b=="number"){var ce=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ce&&(b=ce,re=!0),ae=pt(this.doc,b)}else ae=b;return To(this,ae,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Mn(ae):0)},defaultTextHeight:function(){return Pi(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,ae){var ce=this.display;b=wi(this,Tt(this.doc,b));var de=b.bottom,Se=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),re=="over")de=b.top;else if(re=="above"||re=="near"){var Ae=Math.max(ce.wrapper.clientHeight,this.doc.height),ot=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Ae)&&b.top>E.offsetHeight?de=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Ae&&(de=b.bottom),Se+E.offsetWidth>ot&&(Se=ot-E.offsetWidth)}E.style.top=de+"px",E.style.left=E.style.right="",ae=="right"?(Se=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?Se=0:ae=="middle"&&(Se=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Se+"px"),z&&jl(this,{left:Se,top:de,right:Se+E.offsetWidth,bottom:de+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,z,re){var ae=1;E<0&&(ae=-1,E=-E);for(var ce=Tt(this.doc,b),de=0;de<E&&(ce=ys(this.doc,ce,ae,z,re),!ce.hitSide);++de);return ce},moveH:yi(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?ys(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},ze)}),deleteH:yi(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(ae){var ce=ys(re,ae.head,b,E,!1);return b<0?{from:ce,to:ae.head}:{from:ae.head,to:ce}})}),findPosV:function(b,E,z,re){var ae=1,ce=re;E<0&&(ae=-1,E=-E);for(var de=Tt(this.doc,b),Se=0;Se<E;++Se){var Ae=wi(this,de,"div");if(ce==null?ce=Ae.left:Ae.left=ce,de=Rl(this,Ae,ae,z),de.hitSide)break}return de},moveV:yi(function(b,E){var z=this,re=this.doc,ae=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Se){if(ce)return b<0?Se.from():Se.to();var Ae=wi(z,Se.head,"div");Se.goalColumn!=null&&(Ae.left=Se.goalColumn),ae.push(Ae.left);var ot=Rl(z,Ae,b,E);return E=="page"&&Se==re.sel.primary()&&qa(z,Bo(z,ot,"div").top-Ae.top),ot},ze),ae.length)for(var de=0;de<re.sel.ranges.length;de++)re.sel.ranges[de].goalColumn=ae[de]}),findWordAt:function(b){var E=this.doc,z=pt(E,b.line).text,re=b.ch,ae=b.ch;if(z){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==z.length)&&re?--re:++ae;for(var de=z.charAt(re),Se=at(de,ce)?function(Ae){return at(Ae,ce)}:/\s/.test(de)?function(Ae){return/\s/.test(Ae)}:function(Ae){return!/\s/.test(Ae)&&!at(Ae)};re>0&&Se(z.charAt(re-1));)--re;for(;ae<z.length&&Se(z.charAt(ae));)++ae}return new kr(Ue(b.line,re),Ue(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ye(this.display.cursorDiv,"CodeMirror-overwrite"):yt(this.display.cursorDiv,"CodeMirror-overwrite"),Dt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Te()},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:Ue(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?Gl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var z=this,re=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(ce){if(ce.widgets){for(var de=0;de<ce.widgets.length;de++)if(ce.widgets[de].noHScroll){fo(z,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,Dt(this,"refresh",this)}),operation:function(b){return Ti(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-Pi(this.display))>.5||this.options.lineWrapping)&&Ya(this),Dt(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,Hr(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}},Ot(a),a.registerHelper=function(b,E,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function ys(a,y,x,b,E){var z=y,re=x,ae=pt(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function de(){var fn=y.line+ce;return fn<a.first||fn>=a.first+a.size?!1:(y=new Ue(fn,y.ch,y.sticky),ae=pt(a,fn))}function Se(fn){var sn;if(b=="codepoint"){var bn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(bn)?sn=null:sn=new Ue(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(bn>=55296&&bn<56320?2:1))),-x)}else E?sn=Lu(a.cm,ae,y,x):sn=ds(ae,y,x);if(sn==null)if(!fn&&de())y=fs(E,a.cm,ae,y.line,ce);else return!1;else y=sn;return!0}if(b=="char"||b=="codepoint")Se();else if(b=="column")Se(!0);else if(b=="word"||b=="group")for(var Ae=null,ot=b=="group",nt=a.cm&&a.cm.getHelper(y,"wordChars"),Pt=!0;!(x<0&&!Se(!Pt));Pt=!1){var It=ae.text.charAt(y.ch)||`
|
|
`,Qt=at(It,nt)?"w":ot&&It==`
|
|
`?"n":!ot||/\s/.test(It)?null:"p";if(ot&&!Pt&&!Qt&&(Qt="s"),Ae&&Ae!=Qt){x<0&&(x=1,Se(),y.sticky="after");break}if(Qt&&(Ae=Qt),x>0&&!Se(!Pt))break}var an=Fa(a,y,z,re,!0);return Jt(z,an)&&(an.hitSide=!0),an}function Rl(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(ae-.5*Pi(a.display),3);re=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var de;de=ci(a,z,re),!!de.outside;){if(x<0?re<=0:re>=E.height){de.hitSide=!0;break}re+=x*5}return de}var Tr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Tr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Il(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(ae){for(var ce=ae.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}ye(E,"paste",function(ae){!z(ae)||He(b,ae)||Tl(ae,b)||qe<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ye(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),ye(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),ye(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ye(E,"touchstart",function(){return x.forceCompositionEnd()}),ye(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(ae){if(!(!z(ae)||He(b,ae))){if(b.somethingSelected())Ha({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=Nl(b);Ha({lineWise:!0,text:ce.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,be),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var de=Yi.text.join(`
|
|
`);if(ae.clipboardData.setData("Text",de),ae.clipboardData.getData("Text")==de){ae.preventDefault();return}}var Se=Fl(),Ae=Se.firstChild;b.display.lineSpace.insertBefore(Se,b.display.lineSpace.firstChild),Ae.value=Yi.text.join(`
|
|
`);var ot=document.activeElement;rt(Ae),setTimeout(function(){b.display.lineSpace.removeChild(Se),ot.focus(),ot==E&&x.showPrimarySelection()},50)}}ye(E,"copy",re),ye(E,"cut",re)},Tr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Tr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Tr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Tr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Tr.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 z=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&At(Zt(z,re),b)==0&&At(dn(z,re),E)==0)){var ae=y.display.view,ce=b.line>=y.display.viewFrom&&Ol(y,b)||{node:ae[0].measure.map[2],offset:0},de=E.line<y.display.viewTo&&Ol(y,E);if(!de){var Se=ae[ae.length-1].measure,Ae=Se.maps?Se.maps[Se.maps.length-1]:Se.map;de={node:Ae[Ae.length-1],offset:Ae[Ae.length-2]-Ae[Ae.length-3]}}if(!ce||!de){a.removeAllRanges();return}var ot=a.rangeCount&&a.getRangeAt(0),nt;try{nt=Ne(ce.node,ce.offset,de.offset,de.node)}catch(Pt){}nt&&(!oe&&y.state.focused?(a.collapse(ce.node,ce.offset),nt.collapsed||(a.removeAllRanges(),a.addRange(nt))):(a.removeAllRanges(),a.addRange(nt)),ot&&a.anchorNode==null?a.addRange(ot):oe&&this.startGracePeriod()),this.rememberSelection()}},Tr.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)},Tr.prototype.showMultipleSelections=function(a){Re(this.cm.display.cursorDiv,a.cursors),Re(this.cm.display.selectionDiv,a.selection)},Tr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Tr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return $e(this.div,y)},Tr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Tr.prototype.blur=function(){this.div.blur()},Tr.prototype.getField=function(){return this.div},Tr.prototype.supportsTouch=function(){return!0},Tr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Ti(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)},Tr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Tr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ie&&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&&Ti(y,function(){hi(y.doc,po(x,b),be),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Tr.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=Ue(b.line-1,pt(a.doc,b.line-1).length)),E.ch==pt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Ue(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,ae;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=Pe(y.view[0].line),ae=y.view[0].node):(re=Pe(y.view[z].line),ae=y.view[z-1].node.nextSibling);var ce=So(a,E.line),de,Se;if(ce==y.view.length-1?(de=y.viewTo-1,Se=y.lineDiv.lastChild):(de=Pe(y.view[ce+1].line)-1,Se=y.view[ce+1].node.previousSibling),!ae)return!1;for(var Ae=a.doc.splitLines(Yu(a,ae,Se,re,de)),ot=qt(a.doc,Ue(re,0),Ue(de,pt(a.doc,de).text.length));Ae.length>1&&ot.length>1;)if(ve(Ae)==ve(ot))Ae.pop(),ot.pop(),de--;else if(Ae[0]==ot[0])Ae.shift(),ot.shift(),re++;else break;for(var nt=0,Pt=0,It=Ae[0],Qt=ot[0],an=Math.min(It.length,Qt.length);nt<an&&It.charCodeAt(nt)==Qt.charCodeAt(nt);)++nt;for(var fn=ve(Ae),sn=ve(ot),bn=Math.min(fn.length-(Ae.length==1?nt:0),sn.length-(ot.length==1?nt:0));Pt<bn&&fn.charCodeAt(fn.length-Pt-1)==sn.charCodeAt(sn.length-Pt-1);)++Pt;if(Ae.length==1&&ot.length==1&&re==b.line)for(;nt&&nt>b.ch&&fn.charCodeAt(fn.length-Pt-1)==sn.charCodeAt(sn.length-Pt-1);)nt--,Pt++;Ae[Ae.length-1]=fn.slice(0,fn.length-Pt).replace(/^\u200b+/,""),Ae[0]=Ae[0].slice(nt).replace(/\u200b+$/,"");var Pn=Ue(re,nt),Sn=Ue(de,ot.length?ve(ot).length-Pt:0);if(Ae.length>1||Ae[0]||At(Pn,Sn))return Wo(a.doc,Ae,Pn,Sn,"+input"),!0},Tr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Tr.prototype.reset=function(){this.forceCompositionEnd()},Tr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Tr.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))},Tr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ti(this.cm,function(){return Ci(a.cm)})},Tr.prototype.setUneditable=function(a){a.contentEditable="false"},Tr.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))},Tr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Tr.prototype.onContextMenu=function(){},Tr.prototype.resetPosition=function(){},Tr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=pt(a.doc,y.line),E=Po(x,b,y.line),z=le(b,a.doc.direction),re="left";if(z){var ae=ee(z,y.ch);re=ae%2?"right":"left"}var ce=xa(E.map,y.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,ae=a.doc.lineSeparator(),ce=!1;function de(nt){return function(Pt){return Pt.id==nt}}function Se(){re&&(z+=ae,ce&&(z+=ae),re=ce=!1)}function Ae(nt){nt&&(Se(),z+=nt)}function ot(nt){if(nt.nodeType==1){var Pt=nt.getAttribute("cm-text");if(Pt){Ae(Pt);return}var It=nt.getAttribute("cm-marker"),Qt;if(It){var an=a.findMarks(Ue(b,0),Ue(E+1,0),de(+It));an.length&&(Qt=an[0].find(0))&&Ae(qt(a.doc,Qt.from,Qt.to).join(ae));return}if(nt.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;fn&&Se();for(var sn=0;sn<nt.childNodes.length;sn++)ot(nt.childNodes[sn]);/^(pre|p)$/i.test(nt.nodeName)&&(ce=!0),fn&&(re=!0)}else nt.nodeType==3&&Ae(nt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ot(y),y!=x;)y=y.nextSibling,ce=!1;return z}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(Ue(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 z=a.display.view[E];if(z.node==b)return Xu(z,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!$e(b,y))return Go(Ue(Pe(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?ve(a.rest):a.line;return Go(Ue(Pe(z),z.text.length),E)}var re=y.nodeType==3?y:null,ae=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var ce=a.measure,de=ce.maps;function Se(Qt,an,fn){for(var sn=-1;sn<(de?de.length:0);sn++)for(var bn=sn<0?ce.map:de[sn],Pn=0;Pn<bn.length;Pn+=3){var Sn=bn[Pn+2];if(Sn==Qt||Sn==an){var Un=Pe(sn<0?a.line:a.rest[sn]),Rr=bn[Pn]+fn;return(fn<0||Sn!=Qt)&&(Rr=bn[Pn+(fn?1:0)]),Ue(Un,Rr)}}}var Ae=Se(re,ae,x);if(Ae)return Go(Ae,E);for(var ot=ae.nextSibling,nt=re?re.nodeValue.length-x:0;ot;ot=ot.nextSibling){if(Ae=Se(ot,ot.firstChild,0),Ae)return Go(Ue(Ae.line,Ae.ch-nt),E);nt+=ot.textContent.length}for(var Pt=ae.previousSibling,It=x;Pt;Pt=Pt.previousSibling){if(Ae=Se(Pt,Pt.firstChild,-1),Ae)return Go(Ue(Ae.line,Ae.ch+It),E);It+=Pt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new se,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),Ve&&(E.style.width="0px"),ye(E,"input",function(){me&&qe>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ye(E,"paste",function(re){He(b,re)||Tl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!He(b,re)){if(b.somethingSelected())Ha({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Nl(b);Ha({lineWise:!0,text:ae.text}),re.type=="cut"?b.setSelections(ae.ranges,null,be):(x.prevInput="",E.value=ae.text.join(`
|
|
`),rt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ye(E,"cut",z),ye(E,"copy",z),ye(a.scroller,"paste",function(re){if(!(ui(a,re)||He(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=re.clipboardData,E.dispatchEvent(ae)}}),ye(a.lineSpace,"selectstart",function(re){ui(a,re)||un(re)}),ye(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"})}}),ye(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Fl(),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"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Re(x.cursorDiv,a.cursors),Re(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&&rt(this.textarea),me&&qe>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&qe>=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"&&(!We||Te()!=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&&qe>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ae=Math.min(b.length,E.length);re<ae&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Ti(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&&qe>=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 z=Co(x,a),re=b.scroller.scrollTop;if(!z||he)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(z)==-1&&oi(x,hi)(x.doc,po(z),be);var ce=E.style.cssText,de=y.wrapper.style.cssText,Se=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-Se.top-5)+"px; left: "+(a.clientX-Se.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 Ae;Me&&(Ae=window.scrollY),b.input.focus(),Me&&window.scrollTo(null,Ae),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=nt,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function ot(){if(E.selectionStart!=null){var It=x.somethingSelected(),Qt="\u200B"+(It?E.value:"");E.value="\u21DA",E.value=Qt,y.prevInput=It?"":"\u200B",E.selectionStart=1,E.selectionEnd=Qt.length,b.selForContextMenu=x.doc.sel}}function nt(){if(y.contextMenuPending==nt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=de,E.style.cssText=ce,me&&qe<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&qe<9)&&ot();var It=0,Qt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):It++<10?b.detectingSelectAll=setTimeout(Qt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Qt,200)}}if(me&&qe>=9&&ot(),xt){wn(a);var Pt=function(){mt(window,"mouseup",Pt),setTimeout(nt,20)};ye(window,"mouseup",Pt)}else setTimeout(nt,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?lt(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=Te();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(ye(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(ce){}}y.finishInit=function(ce){ce.save=b,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,b(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(mt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=jr(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return ae}function Qu(a){a.off=mt,a.on=ye,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=ft,a.isWordChar=et,a.Pass=tt,a.signal=Dt,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ts,a.Pos=Ue,a.cmpPos=At,a.modes=xr,a.mimeModes=Kt,a.resolveMode=An,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=hr,a.copyState=Zn,a.startState=dr,a.innerMode=Rn,a.commands=ha,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Ho,a.normalizeKeyMap=Du,a.StringStream=Gt,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=$e,a.rmClass=yt,a.keyNames=yo}Zu(jr),Uu(jr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Si.prototype)Si.prototype.hasOwnProperty(ja)&&Ce(qu,ja)<0&&(jr.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[ja]));return Ot(Si),jr.inputStyles={textarea:Xr,contenteditable:Tr},jr.defineMode=function(a){!jr.defaults.mode&&a!="null"&&(jr.defaults.mode=a),pn.apply(this,arguments)},jr.defineMIME=En,jr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),jr.defineMIME("text/plain","null"),jr.defineExtension=function(a,y){jr.prototype[a]=y},jr.defineDocExtension=function(a,y){Si.prototype[a]=y},jr.fromTextArea=Ju,Qu(jr),jr.version="5.58.2",jr})},25419:function(Ft,zt,fe){(function(oe){oe(fe(89780),fe(15525),fe(98101))})(function(oe){"use strict";oe.defineMode("markdown",function(ct,Fe){var Ze=oe.getMode(ct,"text/html"),me=Ze.name=="null";function qe(pe){if(oe.findModeByName){var se=oe.findModeByName(pe);se&&(pe=se.mime||se.mimes[0])}var Ce=oe.getMode(ct,pe);return Ce.name=="null"?null:Ce}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Me={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 Me)Me.hasOwnProperty(Ke)&&Fe.tokenTypeOverrides[Ke]&&(Me[Ke]=Fe.tokenTypeOverrides[Ke]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Le=/^\[(x| )\](?=\s)/i,we=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,vt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ve=/^[^#!\[\]*_\\<>` "'(~:]+/,Ie=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,We=/^\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]/,ut=" ";function dt(pe,se,Ce){return se.f=se.inline=Ce,Ce(pe,se)}function kt(pe,se,Ce){return se.f=se.block=Ce,Ce(pe,se)}function wt(pe){return!pe||!/\S/.test(pe.string)}function xt(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==yt){var se=me;if(!se){var Ce=oe.innerMode(Ze,pe.htmlState);se=Ce.mode.name=="xml"&&Ce.state.tagStart===null&&!Ce.state.context&&Ce.state.tokenize.isInText}se&&(pe.f=Ct,pe.block=gt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function gt(pe,se){var Ce=pe.column()===se.indentation,je=wt(se.prevLine.stream),tt=se.indentedCode,be=se.prevLine.hr,Ge=se.list!==!1,ze=(se.listStack[se.listStack.length-1]||0)+3;se.indentedCode=!1;var ft=se.indentation;if(se.indentationDiff===null&&(se.indentationDiff=se.indentation,Ge)){for(se.list=null;ft<se.listStack[se.listStack.length-1];)se.listStack.pop(),se.listStack.length?se.indentation=se.listStack[se.listStack.length-1]:se.list=!1;se.list!==!1&&(se.indentationDiff=ft-se.listStack[se.listStack.length-1])}var it=!je&&!be&&!se.prevLine.header&&(!Ge||!tt)&&!se.prevLine.fencedCodeEnd,ge=(se.list===!1||be||je)&&se.indentation<=ze&&pe.match(ke),ve=null;if(se.indentationDiff>=4&&(tt||se.prevLine.fencedCodeEnd||se.prevLine.header||je))return pe.skipToEnd(),se.indentedCode=!0,Me.code;if(pe.eatSpace())return null;if(Ce&&se.indentation<=ze&&(ve=pe.match(we))&&ve[1].length<=6)return se.quote=0,se.header=ve[1].length,se.thisLine.header=!0,Fe.highlightFormatting&&(se.formatting="header"),se.f=se.inline,Re(se);if(se.indentation<=ze&&pe.eat(">"))return se.quote=Ce?1:se.quote+1,Fe.highlightFormatting&&(se.formatting="quote"),pe.eatSpace(),Re(se);if(!ge&&!se.setext&&Ce&&se.indentation<=ze&&(ve=pe.match(he))){var Ee=ve[1]?"ol":"ul";return se.indentation=ft+pe.current().length,se.list=!0,se.quote=0,se.listStack.push(se.indentation),se.em=!1,se.strong=!1,se.code=!1,se.strikethrough=!1,Fe.taskLists&&pe.match(Le,!1)&&(se.taskList=!0),se.f=se.inline,Fe.highlightFormatting&&(se.formatting=["list","list-"+Ee]),Re(se)}else{if(Ce&&se.indentation<=ze&&(ve=pe.match(Ie,!0)))return se.quote=0,se.fencedEndRE=new RegExp(ve[1]+"+ *$"),se.localMode=Fe.fencedCodeBlockHighlighting&&qe(ve[2]||Fe.fencedCodeBlockDefaultMode),se.localMode&&(se.localState=oe.startState(se.localMode)),se.f=se.block=Xt,Fe.highlightFormatting&&(se.formatting="code-block"),se.code=-1,Re(se);if(se.setext||(!it||!Ge)&&!se.quote&&se.list===!1&&!se.code&&!ge&&!We.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(vt)))return se.setext?(se.header=se.setext,se.setext=0,pe.skipToEnd(),Fe.highlightFormatting&&(se.formatting="header")):(se.header=ve[0].charAt(0)=="="?1:2,se.setext=se.header),se.thisLine.header=!0,se.f=se.inline,Re(se);if(ge)return pe.skipToEnd(),se.hr=!0,se.thisLine.hr=!0,Me.hr;if(pe.peek()==="[")return dt(pe,se,Lt)}return dt(pe,se,se.inline)}function yt(pe,se){var Ce=Ze.token(pe,se.htmlState);if(!me){var je=oe.innerMode(Ze,se.htmlState);(je.mode.name=="xml"&&je.state.tagStart===null&&!je.state.context&&je.state.tokenize.isInText||se.md_inside&&pe.current().indexOf(">")>-1)&&(se.f=Ct,se.block=gt,se.htmlState=null)}return Ce}function Xt(pe,se){var Ce=se.listStack[se.listStack.length-1]||0,je=se.indentation<Ce,tt=Ce+3;if(se.fencedEndRE&&se.indentation<=tt&&(je||pe.match(se.fencedEndRE))){Fe.highlightFormatting&&(se.formatting="code-block");var be;return je||(be=Re(se)),se.localMode=se.localState=null,se.block=gt,se.f=Ct,se.fencedEndRE=null,se.code=0,se.thisLine.fencedCodeEnd=!0,je?kt(pe,se,se.block):be}else return se.localMode?se.localMode.token(pe,se.localState):(pe.skipToEnd(),Me.code)}function Re(pe){var se=[];if(pe.formatting){se.push(Me.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var Ce=0;Ce<pe.formatting.length;Ce++)se.push(Me.formatting+"-"+pe.formatting[Ce]),pe.formatting[Ce]==="header"&&se.push(Me.formatting+"-"+pe.formatting[Ce]+"-"+pe.header),pe.formatting[Ce]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?se.push(Me.formatting+"-"+pe.formatting[Ce]+"-"+pe.quote):se.push("error"))}if(pe.taskOpen)return se.push("meta"),se.length?se.join(" "):null;if(pe.taskClosed)return se.push("property"),se.length?se.join(" "):null;if(pe.linkHref?se.push(Me.linkHref,"url"):(pe.strong&&se.push(Me.strong),pe.em&&se.push(Me.em),pe.strikethrough&&se.push(Me.strikethrough),pe.emoji&&se.push(Me.emoji),pe.linkText&&se.push(Me.linkText),pe.code&&se.push(Me.code),pe.image&&se.push(Me.image),pe.imageAltText&&se.push(Me.imageAltText,"link"),pe.imageMarker&&se.push(Me.imageMarker)),pe.header&&se.push(Me.header,Me.header+"-"+pe.header),pe.quote&&(se.push(Me.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?se.push(Me.quote+"-"+pe.quote):se.push(Me.quote+"-"+Fe.maxBlockquoteDepth)),pe.list!==!1){var je=(pe.listStack.length-1)%3;je?je===1?se.push(Me.list2):se.push(Me.list3):se.push(Me.list1)}return pe.trailingSpaceNewLine?se.push("trailing-space-new-line"):pe.trailingSpace&&se.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),se.length?se.join(" "):null}function Je(pe,se){if(pe.match(Ve,!0))return Re(se)}function Ct(pe,se){var Ce=se.text(pe,se);if(typeof Ce!="undefined")return Ce;if(se.list)return se.list=null,Re(se);if(se.taskList){var je=pe.match(Le,!0)[1]===" ";return je?se.taskOpen=!0:se.taskClosed=!0,Fe.highlightFormatting&&(se.formatting="task"),se.taskList=!1,Re(se)}if(se.taskOpen=!1,se.taskClosed=!1,se.header&&pe.match(/^#+$/,!0))return Fe.highlightFormatting&&(se.formatting="header"),Re(se);var tt=pe.next();if(se.linkTitle){se.linkTitle=!1;var be=tt;tt==="("&&(be=")"),be=(be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ge="^\\s*(?:[^"+be+"\\\\]+|\\\\\\\\|\\\\.)"+be;if(pe.match(new RegExp(Ge),!0))return Me.linkHref}if(tt==="`"){var ze=se.formatting;Fe.highlightFormatting&&(se.formatting="code"),pe.eatWhile("`");var ft=pe.current().length;if(se.code==0&&(!se.quote||ft==1))return se.code=ft,Re(se);if(ft==se.code){var it=Re(se);return se.code=0,it}else return se.formatting=ze,Re(se)}else if(se.code)return Re(se);if(tt==="\\"&&(pe.next(),Fe.highlightFormatting)){var ge=Re(se),ve=Me.formatting+"-escape";return ge?ge+" "+ve:ve}if(tt==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return se.imageMarker=!0,se.image=!0,Fe.highlightFormatting&&(se.formatting="image"),Re(se);if(tt==="["&&se.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return se.imageMarker=!1,se.imageAltText=!0,Fe.highlightFormatting&&(se.formatting="image"),Re(se);if(tt==="]"&&se.imageAltText){Fe.highlightFormatting&&(se.formatting="image");var ge=Re(se);return se.imageAltText=!1,se.image=!1,se.inline=se.f=$e,ge}if(tt==="["&&!se.image)return se.linkText&&pe.match(/^.*?\]/)||(se.linkText=!0,Fe.highlightFormatting&&(se.formatting="link")),Re(se);if(tt==="]"&&se.linkText){Fe.highlightFormatting&&(se.formatting="link");var ge=Re(se);return se.linkText=!1,se.inline=se.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?$e:Ct,ge}if(tt==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){se.f=se.inline=Ne,Fe.highlightFormatting&&(se.formatting="link");var ge=Re(se);return ge?ge+=" ":ge="",ge+Me.linkInline}if(tt==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){se.f=se.inline=Ne,Fe.highlightFormatting&&(se.formatting="link");var ge=Re(se);return ge?ge+=" ":ge="",ge+Me.linkEmail}if(Fe.xml&&tt==="<"&&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 Xe=pe.string.substring(pe.start,Ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Xe)&&(se.md_inside=!0)}return pe.backUp(1),se.htmlState=oe.startState(Ze),kt(pe,se,yt)}if(Fe.xml&&tt==="<"&&pe.match(/^\/\w*?>/))return se.md_inside=!1,"tag";if(tt==="*"||tt==="_"){for(var xe=1,_e=pe.pos==1?" ":pe.string.charAt(pe.pos-2);xe<3&&pe.eat(tt);)xe++;var Be=pe.peek()||" ",et=!/\s/.test(Be)&&(!De.test(Be)||/\s/.test(_e)||De.test(_e)),at=!/\s/.test(_e)&&(!De.test(_e)||/\s/.test(Be)||De.test(Be)),Qe=null,ht=null;if(xe%2&&(!se.em&&et&&(tt==="*"||!at||De.test(_e))?Qe=!0:se.em==tt&&at&&(tt==="*"||!et||De.test(Be))&&(Qe=!1)),xe>1&&(!se.strong&&et&&(tt==="*"||!at||De.test(_e))?ht=!0:se.strong==tt&&at&&(tt==="*"||!et||De.test(Be))&&(ht=!1)),ht!=null||Qe!=null){Fe.highlightFormatting&&(se.formatting=Qe==null?"strong":ht==null?"em":"strong em"),Qe===!0&&(se.em=tt),ht===!0&&(se.strong=tt);var it=Re(se);return Qe===!1&&(se.em=!1),ht===!1&&(se.strong=!1),it}}else if(tt===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Re(se);pe.backUp(1)}if(Fe.strikethrough){if(tt==="~"&&pe.eatWhile(tt)){if(se.strikethrough){Fe.highlightFormatting&&(se.formatting="strikethrough");var it=Re(se);return se.strikethrough=!1,it}else if(pe.match(/^[^\s]/,!1))return se.strikethrough=!0,Fe.highlightFormatting&&(se.formatting="strikethrough"),Re(se)}else if(tt===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Re(se);pe.backUp(2)}}if(Fe.emoji&&tt===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){se.emoji=!0,Fe.highlightFormatting&&(se.formatting="emoji");var Et=Re(se);return se.emoji=!1,Et}return tt===" "&&(pe.match(/^ +$/,!1)?se.trailingSpace++:se.trailingSpace&&(se.trailingSpaceNewLine=!0)),Re(se)}function Ne(pe,se){var Ce=pe.next();if(Ce===">"){se.f=se.inline=Ct,Fe.highlightFormatting&&(se.formatting="link");var je=Re(se);return je?je+=" ":je="",je+Me.linkInline}return pe.match(/^[^>]+/,!0),Me.linkInline}function $e(pe,se){if(pe.eatSpace())return null;var Ce=pe.next();return Ce==="("||Ce==="["?(se.f=se.inline=Ye(Ce==="("?")":"]"),Fe.highlightFormatting&&(se.formatting="link-string"),se.linkHref=!0,Re(se)):"error"}var Te={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ye(pe){return function(se,Ce){var je=se.next();if(je===pe){Ce.f=Ce.inline=Ct,Fe.highlightFormatting&&(Ce.formatting="link-string");var tt=Re(Ce);return Ce.linkHref=!1,tt}return se.match(Te[pe]),Ce.linkHref=!0,Re(Ce)}}function Lt(pe,se){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(se.f=rt,pe.next(),Fe.highlightFormatting&&(se.formatting="link"),se.linkText=!0,Re(se)):dt(pe,se,Ct)}function rt(pe,se){if(pe.match(/^\]:/,!0)){se.f=se.inline=st,Fe.highlightFormatting&&(se.formatting="link");var Ce=Re(se);return se.linkText=!1,Ce}return pe.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function st(pe,se){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?se.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),se.f=se.inline=Ct,Me.linkHref+" url")}var lt={startState:function(){return{f:gt,prevLine:{stream:null},thisLine:{stream:null},block:gt,htmlState:null,indentation:0,inline:Ct,text:Je,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&&oe.copyState(Ze,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?oe.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,se){if(se.formatting=!1,pe!=se.thisLine.stream){if(se.header=0,se.hr=!1,pe.match(/^\s*$/,!0))return xt(se),null;if(se.prevLine=se.thisLine,se.thisLine={stream:pe},se.taskList=!1,se.trailingSpace=0,se.trailingSpaceNewLine=!1,!se.localState&&(se.f=se.block,se.f!=yt)){var Ce=pe.match(/^\s*/,!0)[0].replace(/\t/g,ut).length;if(se.indentation=Ce,se.indentationDiff=null,Ce>0)return null}}return se.f(pe,se)},innerMode:function(pe){return pe.block==yt?{state:pe.htmlState,mode:Ze}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:lt}},indent:function(pe,se,Ce){return pe.block==yt&&Ze.indent?Ze.indent(pe.htmlState,se,Ce):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,se,Ce):oe.Pass},blankLine:xt,getType:Re,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return lt},"xml"),oe.defineMIME("text/markdown","markdown"),oe.defineMIME("text/x-markdown","markdown")})},98101:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";oe.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 ct=0;ct<oe.modeInfo.length;ct++){var Fe=oe.modeInfo[ct];Fe.mimes&&(Fe.mime=Fe.mimes[0])}oe.findModeByMIME=function(Ze){Ze=Ze.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var qe=oe.modeInfo[me];if(qe.mime==Ze)return qe;if(qe.mimes){for(var Me=0;Me<qe.mimes.length;Me++)if(qe.mimes[Me]==Ze)return qe}}if(/\+xml$/.test(Ze))return oe.findModeByMIME("application/xml");if(/\+json$/.test(Ze))return oe.findModeByMIME("application/json")},oe.findModeByExtension=function(Ze){Ze=Ze.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var qe=oe.modeInfo[me];if(qe.ext){for(var Me=0;Me<qe.ext.length;Me++)if(qe.ext[Me]==Ze)return qe}}},oe.findModeByFileName=function(Ze){for(var me=0;me<oe.modeInfo.length;me++){var qe=oe.modeInfo[me];if(qe.file&&qe.file.test(Ze))return qe}var Me=Ze.lastIndexOf("."),Ke=Me>-1&&Ze.substring(Me+1,Ze.length);if(Ke)return oe.findModeByExtension(Ke)},oe.findModeByName=function(Ze){Ze=Ze.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var qe=oe.modeInfo[me];if(qe.name.toLowerCase()==Ze)return qe;if(qe.alias){for(var Me=0;Me<qe.alias.length;Me++)if(qe.alias[Me].toLowerCase()==Ze)return qe}}}})},67549:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";oe.defineMode("stex",function(ct,Fe){"use strict";function Ze(Ve,Ie){Ve.cmdState.push(Ie)}function me(Ve){return Ve.cmdState.length>0?Ve.cmdState[Ve.cmdState.length-1]:null}function qe(Ve){var Ie=Ve.cmdState.pop();Ie&&Ie.closeBracket()}function Me(Ve){for(var Ie=Ve.cmdState,We=Ie.length-1;We>=0;We--){var De=Ie[We];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ke(Ve,Ie,We){return function(){this.name=Ve,this.bracketNo=0,this.style=Ie,this.styles=We,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 he(Ve,Ie){Ve.f=Ie}function Le(Ve,Ie){var We;if(Ve.match(/^\\[a-zA-Z@]+/)){var De=Ve.current().slice(1);return We=ke.hasOwnProperty(De)?ke[De]:ke.DEFAULT,We=new We,Ze(Ie,We),he(Ie,vt),We.style}if(Ve.match(/^\\[$&%#{}_]/)||Ve.match(/^\\[,;!\/\\]/))return"tag";if(Ve.match("\\["))return he(Ie,function(dt,kt){return we(dt,kt,"\\]")}),"keyword";if(Ve.match("\\("))return he(Ie,function(dt,kt){return we(dt,kt,"\\)")}),"keyword";if(Ve.match("$$"))return he(Ie,function(dt,kt){return we(dt,kt,"$$")}),"keyword";if(Ve.match("$"))return he(Ie,function(dt,kt){return we(dt,kt,"$")}),"keyword";var ut=Ve.next();if(ut=="%")return Ve.skipToEnd(),"comment";if(ut=="}"||ut=="]"){if(We=me(Ie),We)We.closeBracket(ut),he(Ie,vt);else return"error";return"bracket"}else return ut=="{"||ut=="["?(We=ke.DEFAULT,We=new We,Ze(Ie,We),"bracket"):/\d/.test(ut)?(Ve.eatWhile(/[\w.%]/),"atom"):(Ve.eatWhile(/[\w\-_]/),We=Me(Ie),We.name=="begin"&&(We.argument=Ve.current()),We.styleIdentifier())}function we(Ve,Ie,We){if(Ve.eatSpace())return null;if(We&&Ve.match(We))return he(Ie,Le),"keyword";if(Ve.match(/^\\[a-zA-Z@]+/))return"tag";if(Ve.match(/^[a-zA-Z]+/))return"variable-2";if(Ve.match(/^\\[$&%#{}_]/)||Ve.match(/^\\[,;!\/]/)||Ve.match(/^[\^_&]/))return"tag";if(Ve.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ve.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=Ve.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(Ve.skipToEnd(),"comment"):"error"}function vt(Ve,Ie){var We=Ve.peek(),De;return We=="{"||We=="["?(De=me(Ie),De.openBracket(We),Ve.eat(We),he(Ie,Le),"bracket"):/[ \t\r]/.test(We)?(Ve.eat(We),null):(he(Ie,Le),qe(Ie),Le(Ve,Ie))}return{startState:function(){var Ve=Fe.inMathMode?function(Ie,We){return we(Ie,We)}:Le;return{cmdState:[],f:Ve}},copyState:function(Ve){return{cmdState:Ve.cmdState.slice(),f:Ve.f}},token:function(Ve,Ie){return Ie.f(Ve,Ie)},blankLine:function(Ve){Ve.f=Le,Ve.cmdState.length=0},lineComment:"%"}}),oe.defineMIME("text/x-stex","stex"),oe.defineMIME("text/x-latex","stex")})},15525:function(Ft,zt,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";var ct={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},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};oe.defineMode("xml",function(Ze,me){var qe=Ze.indentUnit,Me={},Ke=me.htmlMode?ct:Fe;for(var ke in Ke)Me[ke]=Ke[ke];for(var ke in me)Me[ke]=me[ke];var he,Le;function we(Ne,$e){function Te(rt){return $e.tokenize=rt,rt(Ne,$e)}var Ye=Ne.next();if(Ye=="<")return Ne.eat("!")?Ne.eat("[")?Ne.match("CDATA[")?Te(Ie("atom","]]>")):null:Ne.match("--")?Te(Ie("comment","-->")):Ne.match("DOCTYPE",!0,!0)?(Ne.eatWhile(/[\w\._\-]/),Te(We(1))):null:Ne.eat("?")?(Ne.eatWhile(/[\w\._\-]/),$e.tokenize=Ie("meta","?>"),"meta"):(he=Ne.eat("/")?"closeTag":"openTag",$e.tokenize=vt,"tag bracket");if(Ye=="&"){var Lt;return Ne.eat("#")?Ne.eat("x")?Lt=Ne.eatWhile(/[a-fA-F\d]/)&&Ne.eat(";"):Lt=Ne.eatWhile(/[\d]/)&&Ne.eat(";"):Lt=Ne.eatWhile(/[\w\.\-:]/)&&Ne.eat(";"),Lt?"atom":"error"}else return Ne.eatWhile(/[^&<]/),null}we.isInText=!0;function vt(Ne,$e){var Te=Ne.next();if(Te==">"||Te=="/"&&Ne.eat(">"))return $e.tokenize=we,he=Te==">"?"endTag":"selfcloseTag","tag bracket";if(Te=="=")return he="equals",null;if(Te=="<"){$e.tokenize=we,$e.state=kt,$e.tagName=$e.tagStart=null;var Ye=$e.tokenize(Ne,$e);return Ye?Ye+" tag error":"tag error"}else return/[\'\"]/.test(Te)?($e.tokenize=Ve(Te),$e.stringStartCol=Ne.column(),$e.tokenize(Ne,$e)):(Ne.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ve(Ne){var $e=function(Te,Ye){for(;!Te.eol();)if(Te.next()==Ne){Ye.tokenize=vt;break}return"string"};return $e.isInAttribute=!0,$e}function Ie(Ne,$e){return function(Te,Ye){for(;!Te.eol();){if(Te.match($e)){Ye.tokenize=we;break}Te.next()}return Ne}}function We(Ne){return function($e,Te){for(var Ye;(Ye=$e.next())!=null;){if(Ye=="<")return Te.tokenize=We(Ne+1),Te.tokenize($e,Te);if(Ye==">")if(Ne==1){Te.tokenize=we;break}else return Te.tokenize=We(Ne-1),Te.tokenize($e,Te)}return"meta"}}function De(Ne,$e,Te){this.prev=Ne.context,this.tagName=$e,this.indent=Ne.indented,this.startOfLine=Te,(Me.doNotIndent.hasOwnProperty($e)||Ne.context&&Ne.context.noIndent)&&(this.noIndent=!0)}function ut(Ne){Ne.context&&(Ne.context=Ne.context.prev)}function dt(Ne,$e){for(var Te;;){if(!Ne.context||(Te=Ne.context.tagName,!Me.contextGrabbers.hasOwnProperty(Te)||!Me.contextGrabbers[Te].hasOwnProperty($e)))return;ut(Ne)}}function kt(Ne,$e,Te){return Ne=="openTag"?(Te.tagStart=$e.column(),wt):Ne=="closeTag"?xt:kt}function wt(Ne,$e,Te){return Ne=="word"?(Te.tagName=$e.current(),Le="tag",Xt):Me.allowMissingTagName&&Ne=="endTag"?(Le="tag bracket",Xt(Ne,$e,Te)):(Le="error",wt)}function xt(Ne,$e,Te){if(Ne=="word"){var Ye=$e.current();return Te.context&&Te.context.tagName!=Ye&&Me.implicitlyClosed.hasOwnProperty(Te.context.tagName)&&ut(Te),Te.context&&Te.context.tagName==Ye||Me.matchClosing===!1?(Le="tag",gt):(Le="tag error",yt)}else return Me.allowMissingTagName&&Ne=="endTag"?(Le="tag bracket",gt(Ne,$e,Te)):(Le="error",yt)}function gt(Ne,$e,Te){return Ne!="endTag"?(Le="error",gt):(ut(Te),kt)}function yt(Ne,$e,Te){return Le="error",gt(Ne,$e,Te)}function Xt(Ne,$e,Te){if(Ne=="word")return Le="attribute",Re;if(Ne=="endTag"||Ne=="selfcloseTag"){var Ye=Te.tagName,Lt=Te.tagStart;return Te.tagName=Te.tagStart=null,Ne=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Ye)?dt(Te,Ye):(dt(Te,Ye),Te.context=new De(Te,Ye,Lt==Te.indented)),kt}return Le="error",Xt}function Re(Ne,$e,Te){return Ne=="equals"?Je:(Me.allowMissing||(Le="error"),Xt(Ne,$e,Te))}function Je(Ne,$e,Te){return Ne=="string"?Ct:Ne=="word"&&Me.allowUnquoted?(Le="string",Xt):(Le="error",Xt(Ne,$e,Te))}function Ct(Ne,$e,Te){return Ne=="string"?Ct:Xt(Ne,$e,Te)}return{startState:function(Ne){var $e={tokenize:we,state:kt,indented:Ne||0,tagName:null,tagStart:null,context:null};return Ne!=null&&($e.baseIndent=Ne),$e},token:function(Ne,$e){if(!$e.tagName&&Ne.sol()&&($e.indented=Ne.indentation()),Ne.eatSpace())return null;he=null;var Te=$e.tokenize(Ne,$e);return(Te||he)&&Te!="comment"&&(Le=null,$e.state=$e.state(he||Te,Ne,$e),Le&&(Te=Le=="error"?Te+" error":Le)),Te},indent:function(Ne,$e,Te){var Ye=Ne.context;if(Ne.tokenize.isInAttribute)return Ne.tagStart==Ne.indented?Ne.stringStartCol+1:Ne.indented+qe;if(Ye&&Ye.noIndent)return oe.Pass;if(Ne.tokenize!=vt&&Ne.tokenize!=we)return Te?Te.match(/^(\s*)/)[0].length:0;if(Ne.tagName)return Me.multilineTagIndentPastTag!==!1?Ne.tagStart+Ne.tagName.length+2:Ne.tagStart+qe*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test($e))return 0;var Lt=$e&&/^<(\/)?([\w_:\.-]*)/.exec($e);if(Lt&&Lt[1])for(;Ye;)if(Ye.tagName==Lt[2]){Ye=Ye.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Ye.tagName))Ye=Ye.prev;else break;else if(Lt)for(;Ye;){var rt=Me.contextGrabbers[Ye.tagName];if(rt&&rt.hasOwnProperty(Lt[2]))Ye=Ye.prev;else break}for(;Ye&&Ye.prev&&!Ye.startOfLine;)Ye=Ye.prev;return Ye?Ye.indent+qe:Ne.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(Ne){Ne.state==Je&&(Ne.state=Xt)},xmlCurrentTag:function(Ne){return Ne.tagName?{name:Ne.tagName,close:Ne.type=="closeTag"}:null},xmlCurrentContext:function(Ne){for(var $e=[],Te=Ne.context;Te;Te=Te.prev)Te.tagName&&$e.push(Te.tagName);return $e.reverse()}}}),oe.defineMIME("text/xml","xml"),oe.defineMIME("application/xml","xml"),oe.mimeModes.hasOwnProperty("text/html")||oe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return $e}});var oe=fe(33885),ct=fe(42978),Fe=fe(43403),Ze=fe(34280),me=fe(59301),qe=me.createContext(null),Me=me.createContext({}),Ke=qe,ke=fe(20068),he=fe(54476),Le=fe(92310),we=fe.n(Le),vt=fe(77900),Ve=fe(10228),Ie=fe(26112),We=fe(75931),De=fe(8654),ut=["prefixCls","className","containerRef"],dt=function(Ye){var Lt=Ye.prefixCls,rt=Ye.className,st=Ye.containerRef,lt=(0,We.Z)(Ye,ut),pe=me.useContext(Me),se=pe.panel,Ce=(0,De.x1)(se,st);return me.createElement("div",(0,he.Z)({className:we()("".concat(Lt,"-content"),rt),role:"dialog",ref:Ce},(0,Ie.Z)(Ye,{aria:!0}),{"aria-modal":"true"},lt))},kt=dt,wt=fe(48736);function xt(Te){return typeof Te=="string"&&String(Number(Te))===Te?((0,wt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Te)):Te}function gt(Te){warning(!("wrapperClassName"in Te),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Te.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var yt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Xt(Te,Ye){var Lt,rt,st,lt=Te.prefixCls,pe=Te.open,se=Te.placement,Ce=Te.inline,je=Te.push,tt=Te.forceRender,be=Te.autoFocus,Ge=Te.keyboard,ze=Te.classNames,ft=Te.rootClassName,it=Te.rootStyle,ge=Te.zIndex,ve=Te.className,Ee=Te.id,Xe=Te.style,xe=Te.motion,_e=Te.width,Be=Te.height,et=Te.children,at=Te.mask,Qe=Te.maskClosable,ht=Te.maskMotion,Et=Te.maskClassName,Ut=Te.maskStyle,Bt=Te.afterOpenChange,ue=Te.onClose,te=Te.onMouseEnter,ee=Te.onMouseOver,ie=Te.onMouseLeave,le=Te.onClick,ne=Te.onKeyDown,ye=Te.onKeyUp,bt=Te.styles,mt=Te.drawerRender,Dt=me.useRef(),He=me.useRef(),Ht=me.useRef();me.useImperativeHandle(Ye,function(){return Dt.current});var Rt=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case Ve.Z.TAB:{if(Kn===Ve.Z.TAB){if(!xr&&document.activeElement===Ht.current){var Kt;(Kt=He.current)===null||Kt===void 0||Kt.focus({preventScroll:!0})}else if(xr&&document.activeElement===He.current){var pn;(pn=Ht.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case Ve.Z.ESC:{ue&&Ge&&(Xn.stopPropagation(),ue(Xn));break}}};me.useEffect(function(){if(pe&&be){var Bn;(Bn=Dt.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var Ot=me.useState(!1),un=(0,ct.Z)(Ot,2),kn=un[0],cn=un[1],wn=me.useContext(Ke),$n;typeof je=="boolean"?$n=je?{}:{distance:0}:$n=je||{};var Hn=(Lt=(rt=(st=$n)===null||st===void 0?void 0:st.distance)!==null&&rt!==void 0?rt:wn==null?void 0:wn.pushDistance)!==null&&Lt!==void 0?Lt:180,mr=me.useMemo(function(){return{pushDistance:Hn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[Hn]);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=at&&me.createElement(vt.default,(0,he.Z)({key:"mask"},ht,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:we()("".concat(lt,"-mask"),Kn,ze==null?void 0:ze.mask,Et),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},xr),Ut),bt==null?void 0:bt.mask),onClick:Qe&&pe?ue:void 0,ref:Xn})}),ur=typeof xe=="function"?xe(se):xe,nr={};if(kn&&Hn)switch(se){case"top":nr.transform="translateY(".concat(Hn,"px)");break;case"bottom":nr.transform="translateY(".concat(-Hn,"px)");break;case"left":nr.transform="translateX(".concat(Hn,"px)");break;default:nr.transform="translateX(".concat(-Hn,"px)");break}se==="left"||se==="right"?nr.width=xt(_e):nr.height=xt(Be);var Fn={onMouseEnter:te,onMouseOver:ee,onMouseLeave:ie,onClick:le,onKeyDown:ne,onKeyUp:ye},rr=me.createElement(vt.default,(0,he.Z)({key:"panel"},ur,{visible:pe,forceRender:tt,onVisibleChanged:function(Xn){Bt==null||Bt(Xn)},removeOnLeave:!1,leavedClassName:"".concat(lt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Kt=me.createElement(kt,(0,he.Z)({id:Ee,containerRef:Xn,prefixCls:lt,className:we()(ve,ze==null?void 0:ze.content),style:(0,oe.Z)((0,oe.Z)({},Xe),bt==null?void 0:bt.content)},(0,Ie.Z)(Te,{aria:!0}),Fn),et);return me.createElement("div",(0,he.Z)({className:we()("".concat(lt,"-content-wrapper"),ze==null?void 0:ze.wrapper,Kn),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},nr),xr),bt==null?void 0:bt.wrapper)},(0,Ie.Z)(Te,{data:!0})),mt?mt(Kt):Kt)}),cr=(0,oe.Z)({},it);return ge&&(cr.zIndex=ge),me.createElement(Ke.Provider,{value:mr},me.createElement("div",{className:we()(lt,"".concat(lt,"-").concat(se),ft,(0,ke.Z)((0,ke.Z)({},"".concat(lt,"-open"),pe),"".concat(lt,"-inline"),Ce)),style:cr,tabIndex:-1,ref:Dt,onKeyDown:Rt},er,me.createElement("div",{tabIndex:0,ref:He,style:yt,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:Ht,style:yt,"aria-hidden":"true","data-sentinel":"end"})))}var Re=me.forwardRef(Xt),Je=Re,Ct=function(Ye){var Lt=Ye.open,rt=Lt===void 0?!1:Lt,st=Ye.prefixCls,lt=st===void 0?"rc-drawer":st,pe=Ye.placement,se=pe===void 0?"right":pe,Ce=Ye.autoFocus,je=Ce===void 0?!0:Ce,tt=Ye.keyboard,be=tt===void 0?!0:tt,Ge=Ye.width,ze=Ge===void 0?378:Ge,ft=Ye.mask,it=ft===void 0?!0:ft,ge=Ye.maskClosable,ve=ge===void 0?!0:ge,Ee=Ye.getContainer,Xe=Ye.forceRender,xe=Ye.afterOpenChange,_e=Ye.destroyOnClose,Be=Ye.onMouseEnter,et=Ye.onMouseOver,at=Ye.onMouseLeave,Qe=Ye.onClick,ht=Ye.onKeyDown,Et=Ye.onKeyUp,Ut=Ye.panelRef,Bt=me.useState(!1),ue=(0,ct.Z)(Bt,2),te=ue[0],ee=ue[1],ie=me.useState(!1),le=(0,ct.Z)(ie,2),ne=le[0],ye=le[1];(0,Ze.Z)(function(){ye(!0)},[]);var bt=ne?rt:!1,mt=me.useRef(),Dt=me.useRef();(0,Ze.Z)(function(){bt&&(Dt.current=document.activeElement)},[bt]);var He=function(kn){var cn;if(ee(kn),xe==null||xe(kn),!kn&&Dt.current&&!((cn=mt.current)!==null&&cn!==void 0&&cn.contains(Dt.current))){var wn;(wn=Dt.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},Ht=me.useMemo(function(){return{panel:Ut}},[Ut]);if(!Xe&&!te&&!bt&&_e)return null;var Rt={onMouseEnter:Be,onMouseOver:et,onMouseLeave:at,onClick:Qe,onKeyDown:ht,onKeyUp:Et},Ot=(0,oe.Z)((0,oe.Z)({},Ye),{},{open:bt,prefixCls:lt,placement:se,autoFocus:je,keyboard:be,width:ze,mask:it,maskClosable:ve,inline:Ee===!1,afterOpenChange:He,ref:mt},Rt);return me.createElement(Me.Provider,{value:Ht},me.createElement(Fe.Z,{open:bt||Xe||te,autoDestroy:!1,getContainer:Ee,autoLock:it&&(bt||te)},me.createElement(Je,Ot)))},Ne=Ct,$e=Ne},20922:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return it}});var oe=fe(54476),ct=fe(20068),Fe=fe(76190),Ze=fe(42978),me=fe(75931),qe=fe(67732),Me=fe(83652);function Ke(){return typeof BigInt=="function"}function ke(ge){return!ge&&ge!==0&&!Number.isNaN(ge)||!String(ge).trim()}function he(ge){var ve=ge.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 Xe=ve||"0",xe=Xe.split("."),_e=xe[0]||"0",Be=xe[1]||"0";_e==="0"&&Be==="0"&&(Ee=!1);var et=Ee?"-":"";return{negative:Ee,negativeStr:et,trimStr:Xe,integerStr:_e,decimalStr:Be,fullStr:"".concat(et).concat(Xe)}}function Le(ge){var ve=String(ge);return!Number.isNaN(Number(ve))&&ve.includes("e")}function we(ge){var ve=String(ge);if(Le(ge)){var Ee=Number(ve.slice(ve.indexOf("e-")+2)),Xe=ve.match(/\.(\d+)/);return Xe!=null&&Xe[1]&&(Ee+=Xe[1].length),Ee}return ve.includes(".")&&Ve(ve)?ve.length-ve.indexOf(".")-1:0}function vt(ge){var ve=String(ge);if(Le(ge)){if(ge>Number.MAX_SAFE_INTEGER)return String(Ke()?BigInt(ge).toString():Number.MAX_SAFE_INTEGER);if(ge<Number.MIN_SAFE_INTEGER)return String(Ke()?BigInt(ge).toString():Number.MIN_SAFE_INTEGER);ve=ge.toFixed(we(ve))}return he(ve).fullStr}function Ve(ge){return typeof ge=="number"?!Number.isNaN(ge):ge?/^\s*-?\d+(\.\d+)?\s*$/.test(ge)||/^\s*-?\d+\.\s*$/.test(ge)||/^\s*-?\.\d+\s*$/.test(ge):!1}var Ie=function(){function ge(ve){if((0,qe.Z)(this,ge),(0,ct.Z)(this,"origin",""),(0,ct.Z)(this,"negative",void 0),(0,ct.Z)(this,"integer",void 0),(0,ct.Z)(this,"decimal",void 0),(0,ct.Z)(this,"decimalLen",void 0),(0,ct.Z)(this,"empty",void 0),(0,ct.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(Le(Ee)&&(Ee=Number(Ee)),Ee=typeof Ee=="string"?Ee:vt(Ee),Ve(Ee)){var Xe=he(Ee);this.negative=Xe.negative;var xe=Xe.trimStr.split(".");this.integer=BigInt(xe[0]);var _e=xe[1]||"0";this.decimal=BigInt(_e),this.decimalLen=_e.length}else this.nan=!0}return(0,Me.Z)(ge,[{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 Xe="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ee,"0"));return BigInt(Xe)}},{key:"negate",value:function(){var Ee=new ge(this.toString());return Ee.negative=!Ee.negative,Ee}},{key:"cal",value:function(Ee,Xe,xe){var _e=Math.max(this.getDecimalStr().length,Ee.getDecimalStr().length),Be=this.alignDecimal(_e),et=Ee.alignDecimal(_e),at=Xe(Be,et).toString(),Qe=xe(_e),ht=he(at),Et=ht.negativeStr,Ut=ht.trimStr,Bt="".concat(Et).concat(Ut.padStart(Qe+1,"0"));return new ge("".concat(Bt.slice(0,-Qe),".").concat(Bt.slice(-Qe)))}},{key:"add",value:function(Ee){if(this.isInvalidate())return new ge(Ee);var Xe=new ge(Ee);return Xe.isInvalidate()?this:this.cal(Xe,function(xe,_e){return xe+_e},function(xe){return xe})}},{key:"multi",value:function(Ee){var Xe=new ge(Ee);return this.isInvalidate()||Xe.isInvalidate()?new ge(NaN):this.cal(Xe,function(xe,_e){return xe*_e},function(xe){return xe*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()?"":he("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),ge}(),We=function(){function ge(ve){if((0,qe.Z)(this,ge),(0,ct.Z)(this,"origin",""),(0,ct.Z)(this,"number",void 0),(0,ct.Z)(this,"empty",void 0),ke(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Me.Z)(ge,[{key:"negate",value:function(){return new ge(-this.toNumber())}},{key:"add",value:function(Ee){if(this.isInvalidate())return new ge(Ee);var Xe=Number(Ee);if(Number.isNaN(Xe))return this;var xe=this.number+Xe;if(xe>Number.MAX_SAFE_INTEGER)return new ge(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new ge(Number.MIN_SAFE_INTEGER);var _e=Math.max(we(this.number),we(Xe));return new ge(xe.toFixed(_e))}},{key:"multi",value:function(Ee){var Xe=Number(Ee);if(this.isInvalidate()||Number.isNaN(Xe))return new ge(NaN);var xe=this.number*Xe;if(xe>Number.MAX_SAFE_INTEGER)return new ge(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new ge(Number.MIN_SAFE_INTEGER);var _e=Math.max(we(this.number),we(Xe));return new ge(xe.toFixed(_e))}},{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()?"":vt(this.number):this.origin}}]),ge}();function De(ge){return Ke()?new Ie(ge):new We(ge)}function ut(ge,ve,Ee){var Xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ge==="")return"";var xe=he(ge),_e=xe.negativeStr,Be=xe.integerStr,et=xe.decimalStr,at="".concat(ve).concat(et),Qe="".concat(_e).concat(Be);if(Ee>=0){var ht=Number(et[Ee]);if(ht>=5&&!Xe){var Et=De(ge).add("".concat(_e,"0.").concat("0".repeat(Ee)).concat(10-ht));return ut(Et.toString(),ve,Ee,Xe)}return Ee===0?Qe:"".concat(Qe).concat(ve).concat(et.padEnd(Ee,"0").slice(0,Ee))}return at===".0"?Qe:"".concat(Qe).concat(at)}var dt=De,kt=fe(92310),wt=fe.n(kt),xt=fe(36901),gt=fe(34280);function yt(ge,ve){return typeof Proxy!="undefined"&&ge?new Proxy(ge,{get:function(Xe,xe){if(ve[xe])return ve[xe];var _e=Xe[xe];return typeof _e=="function"?_e.bind(Xe):_e}}):ge}var Xt=fe(8654),Re=fe(59301),Je=fe(48736);function Ct(ge,ve){var Ee=(0,Re.useRef)(null);function Xe(){try{var _e=ge.selectionStart,Be=ge.selectionEnd,et=ge.value,at=et.substring(0,_e),Qe=et.substring(Be);Ee.current={start:_e,end:Be,value:et,beforeTxt:at,afterTxt:Qe}}catch(ht){}}function xe(){if(ge&&Ee.current&&ve)try{var _e=ge.value,Be=Ee.current,et=Be.beforeTxt,at=Be.afterTxt,Qe=Be.start,ht=_e.length;if(_e.startsWith(et))ht=et.length;else if(_e.endsWith(at))ht=_e.length-Ee.current.afterTxt.length;else{var Et=et[Qe-1],Ut=_e.indexOf(Et,Qe-1);Ut!==-1&&(ht=Ut+1)}ge.setSelectionRange(ht,ht)}catch(Bt){(0,Je.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Bt.message))}}return[Xe,xe]}var Ne=fe(49658),$e=function(){var ve=(0,Re.useState)(!1),Ee=(0,Ze.Z)(ve,2),Xe=Ee[0],xe=Ee[1];return(0,gt.Z)(function(){xe((0,Ne.Z)())},[]),Xe},Te=$e,Ye=fe(16089),Lt=200,rt=600;function st(ge){var ve=ge.prefixCls,Ee=ge.upNode,Xe=ge.downNode,xe=ge.upDisabled,_e=ge.downDisabled,Be=ge.onStep,et=Re.useRef(),at=Re.useRef([]),Qe=Re.useRef();Qe.current=Be;var ht=function(){clearTimeout(et.current)},Et=function(ne,ye){ne.preventDefault(),ht(),Qe.current(ye);function bt(){Qe.current(ye),et.current=setTimeout(bt,Lt)}et.current=setTimeout(bt,rt)};Re.useEffect(function(){return function(){ht(),at.current.forEach(function(le){return Ye.Z.cancel(le)})}},[]);var Ut=Te();if(Ut)return null;var Bt="".concat(ve,"-handler"),ue=wt()(Bt,"".concat(Bt,"-up"),(0,ct.Z)({},"".concat(Bt,"-up-disabled"),xe)),te=wt()(Bt,"".concat(Bt,"-down"),(0,ct.Z)({},"".concat(Bt,"-down-disabled"),_e)),ee=function(){return at.current.push((0,Ye.Z)(ht))},ie={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Re.createElement("div",{className:"".concat(Bt,"-wrap")},Re.createElement("span",(0,oe.Z)({},ie,{onMouseDown:function(ne){Et(ne,!0)},"aria-label":"Increase Value","aria-disabled":xe,className:ue}),Ee||Re.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),Re.createElement("span",(0,oe.Z)({},ie,{onMouseDown:function(ne){Et(ne,!1)},"aria-label":"Decrease Value","aria-disabled":_e,className:te}),Xe||Re.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function lt(ge){var ve=typeof ge=="number"?vt(ge):he(ge).fullStr,Ee=ve.includes(".");return Ee?he(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:ge+"0"}var pe=fe(30292),se=function(){var ge=(0,Re.useRef)(0),ve=function(){Ye.Z.cancel(ge.current)};return(0,Re.useEffect)(function(){return ve},[]),function(Ee){ve(),ge.current=(0,Ye.Z)(function(){Ee()})}},Ce=["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"],je=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],tt=function(ve,Ee){return ve||Ee.isEmpty()?Ee.toString():Ee.toNumber()},be=function(ve){var Ee=dt(ve);return Ee.isInvalidate()?null:Ee},Ge=Re.forwardRef(function(ge,ve){var Ee=ge.prefixCls,Xe=ge.className,xe=ge.style,_e=ge.min,Be=ge.max,et=ge.step,at=et===void 0?1:et,Qe=ge.defaultValue,ht=ge.value,Et=ge.disabled,Ut=ge.readOnly,Bt=ge.upHandler,ue=ge.downHandler,te=ge.keyboard,ee=ge.changeOnWheel,ie=ee===void 0?!1:ee,le=ge.controls,ne=le===void 0?!0:le,ye=ge.classNames,bt=ge.stringMode,mt=ge.parser,Dt=ge.formatter,He=ge.precision,Ht=ge.decimalSeparator,Rt=ge.onChange,Ot=ge.onInput,un=ge.onPressEnter,kn=ge.onStep,cn=ge.changeOnBlur,wn=cn===void 0?!0:cn,$n=ge.domRef,Hn=(0,me.Z)(ge,Ce),mr="".concat(Ee,"-input"),er=Re.useRef(null),ur=Re.useState(!1),nr=(0,Ze.Z)(ur,2),Fn=nr[0],rr=nr[1],cr=Re.useRef(!1),Bn=Re.useRef(!1),Xn=Re.useRef(!1),Kn=Re.useState(function(){return dt(ht!=null?ht:Qe)}),xr=(0,Ze.Z)(Kn,2),Kt=xr[0],pn=xr[1];function En(hn){ht===void 0&&pn(hn)}var An=Re.useCallback(function(hn,jt){if(!jt)return He>=0?He:Math.max(we(hn),we(at))},[He,at]),Jn=Re.useCallback(function(hn){var jt=String(hn);if(mt)return mt(jt);var gn=jt;return Ht&&(gn=gn.replace(Ht,".")),gn.replace(/[^\w.-]+/g,"")},[mt,Ht]),tr=Re.useRef(""),hr=Re.useCallback(function(hn,jt){if(Dt)return Dt(hn,{userTyping:jt,input:String(tr.current)});var gn=typeof hn=="number"?vt(hn):hn;if(!jt){var nn=An(gn,jt);if(Ve(gn)&&(Ht||nn>=0)){var Wn=Ht||".";gn=ut(gn,Wn,nn)}}return gn},[Dt,An,Ht]),Zn=Re.useState(function(){var hn=Qe!=null?Qe:ht;return Kt.isInvalidate()&&["string","number"].includes((0,Fe.Z)(hn))?Number.isNaN(hn)?"":hn:hr(Kt.toString(),!1)}),Rn=(0,Ze.Z)(Zn,2),dr=Rn[0],Gt=Rn[1];tr.current=dr;function pt(hn,jt){Gt(hr(hn.isInvalidate()?hn.toString(!1):hn.toString(!jt),jt))}var qt=Re.useMemo(function(){return be(Be)},[Be,He]),Cn=Re.useMemo(function(){return be(_e)},[_e,He]),jn=Re.useMemo(function(){return!qt||!Kt||Kt.isInvalidate()?!1:qt.lessEquals(Kt)},[qt,Kt]),Pe=Re.useMemo(function(){return!Cn||!Kt||Kt.isInvalidate()?!1:Kt.lessEquals(Cn)},[Cn,Kt]),Oe=Ct(er.current,Fn),Nt=(0,Ze.Z)(Oe,2),Mt=Nt[0],Ue=Nt[1],At=function(jt){return qt&&!jt.lessEquals(qt)?qt:Cn&&!Cn.lessEquals(jt)?Cn:null},Jt=function(jt){return!At(jt)},tn=function(jt,gn){var nn=jt,Wn=Jt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=At(nn)||nn,Wn=!0),!Ut&&!Et&&Wn){var wr=nn.toString(),Qn=An(wr,gn);return Qn>=0&&(nn=dt(ut(wr,".",Qn)),Jt(nn)||(nn=dt(ut(wr,".",Qn,!0)))),nn.equals(Kt)||(En(nn),Rt==null||Rt(nn.isEmpty()?null:tt(bt,nn)),ht===void 0&&pt(nn,gn)),nn}return Kt},dn=se(),Zt=function hn(jt){if(Mt(),tr.current=jt,Gt(jt),!Bn.current){var gn=Jn(jt),nn=dt(gn);nn.isNaN()||tn(nn,!0)}Ot==null||Ot(jt),dn(function(){var Wn=jt;mt||(Wn=jt.replace(/。/g,".")),Wn!==jt&&hn(Wn)})},$t=function(){Bn.current=!0},Tt=function(){Bn.current=!1,Zt(er.current.value)},St=function(jt){Zt(jt.target.value)},en=function(jt){var gn;if(!(jt&&jn||!jt&&Pe)){cr.current=!1;var nn=dt(Xn.current?lt(at):at);jt||(nn=nn.negate());var Wn=(Kt||dt(0)).add(nn.toString()),wr=tn(Wn,!1);kn==null||kn(tt(bt,wr),{offset:Xn.current?lt(at):at,type:jt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(jt){var gn=dt(Jn(dr)),nn;gn.isNaN()?nn=tn(Kt,jt):nn=tn(gn,jt),ht!==void 0?pt(Kt,!1):nn.isNaN()||pt(nn,!1)},mn=function(){cr.current=!0},xn=function(jt){var gn=jt.key,nn=jt.shiftKey;cr.current=!0,Xn.current=nn,gn==="Enter"&&(Bn.current||(cr.current=!1),vn(!1),un==null||un(jt)),te!==!1&&!Bn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gn)&&(en(gn==="Up"||gn==="ArrowUp"),jt.preventDefault())},_n=function(){cr.current=!1,Xn.current=!1};Re.useEffect(function(){if(ie&&Fn){var hn=function(nn){en(nn.deltaY<0),nn.preventDefault()},jt=er.current;if(jt)return jt.addEventListener("wheel",hn,{passive:!1}),function(){return jt.removeEventListener("wheel",hn)}}});var Yn=function(){wn&&vn(!1),rr(!1),cr.current=!1};return(0,gt.o)(function(){Kt.isInvalidate()||pt(Kt,!1)},[He,Dt]),(0,gt.o)(function(){var hn=dt(ht);pn(hn);var jt=dt(Jn(dr));(!hn.equals(jt)||!cr.current||Dt)&&pt(hn,cr.current)},[ht]),(0,gt.o)(function(){Dt&&Ue()},[dr]),Re.createElement("div",{ref:$n,className:wt()(Ee,Xe,(0,ct.Z)((0,ct.Z)((0,ct.Z)((0,ct.Z)((0,ct.Z)({},"".concat(Ee,"-focused"),Fn),"".concat(Ee,"-disabled"),Et),"".concat(Ee,"-readonly"),Ut),"".concat(Ee,"-not-a-number"),Kt.isNaN()),"".concat(Ee,"-out-of-range"),!Kt.isInvalidate()&&!Jt(Kt))),style:xe,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:_n,onCompositionStart:$t,onCompositionEnd:Tt,onBeforeInput:mn},ne&&Re.createElement(st,{prefixCls:Ee,upNode:Bt,downNode:ue,upDisabled:jn,downDisabled:Pe,onStep:en}),Re.createElement("div",{className:"".concat(mr,"-wrap")},Re.createElement("input",(0,oe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":_e,"aria-valuemax":Be,"aria-valuenow":Kt.isInvalidate()?null:Kt.toString(),step:at},Hn,{ref:(0,Xt.sQ)(er,ve),className:mr,value:dr,onChange:St,disabled:Et,readOnly:Ut}))))}),ze=Re.forwardRef(function(ge,ve){var Ee=ge.disabled,Xe=ge.style,xe=ge.prefixCls,_e=xe===void 0?"rc-input-number":xe,Be=ge.value,et=ge.prefix,at=ge.suffix,Qe=ge.addonBefore,ht=ge.addonAfter,Et=ge.className,Ut=ge.classNames,Bt=(0,me.Z)(ge,je),ue=Re.useRef(null),te=Re.useRef(null),ee=Re.useRef(null),ie=function(ne){ee.current&&(0,pe.nH)(ee.current,ne)};return Re.useImperativeHandle(ve,function(){return yt(ee.current,{focus:ie,nativeElement:ue.current.nativeElement||te.current})}),Re.createElement(xt.BaseInput,{className:Et,triggerFocus:ie,prefixCls:_e,value:Be,disabled:Ee,style:Xe,prefix:et,suffix:at,addonAfter:ht,addonBefore:Qe,classNames:Ut,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ue},Re.createElement(Ge,(0,oe.Z)({prefixCls:_e,disabled:Ee,ref:ee,domRef:te,className:Ut==null?void 0:Ut.input},Bt)))}),ft=ze,it=ft},25930:function(Ft,zt,fe){"use strict";fe.d(zt,{Cd:function(){return Ct}});var oe=fe(54476),ct=fe(33885),Fe=fe(75931),Ze=fe(59301),me=fe(92310),qe=fe.n(me),Me={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ke=function(){var Te=(0,Ze.useRef)([]),Ye=(0,Ze.useRef)(null);return(0,Ze.useEffect)(function(){var Lt=Date.now(),rt=!1;Te.current.forEach(function(st){if(st){rt=!0;var lt=st.style;lt.transitionDuration=".3s, .3s, .3s, .06s",Ye.current&&Lt-Ye.current<100&&(lt.transitionDuration="0s, 0s")}}),rt&&(Ye.current=Date.now())}),Te.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],he=function(Te){var Ye=(0,ct.Z)((0,ct.Z)({},Me),Te),Lt=Ye.className,rt=Ye.percent,st=Ye.prefixCls,lt=Ye.strokeColor,pe=Ye.strokeLinecap,se=Ye.strokeWidth,Ce=Ye.style,je=Ye.trailColor,tt=Ye.trailWidth,be=Ye.transition,Ge=(0,Fe.Z)(Ye,ke);delete Ge.gapPosition;var ze=Array.isArray(rt)?rt:[rt],ft=Array.isArray(lt)?lt:[lt],it=Ke(),ge=se/2,ve=100-se/2,Ee="M ".concat(pe==="round"?ge:0,",").concat(ge,`
|
|
L `).concat(pe==="round"?ve:100,",").concat(ge),Xe="0 0 100 ".concat(se),xe=0;return Ze.createElement("svg",(0,oe.Z)({className:qe()("".concat(st,"-line"),Lt),viewBox:Xe,preserveAspectRatio:"none",style:Ce},Ge),Ze.createElement("path",{className:"".concat(st,"-line-trail"),d:Ee,strokeLinecap:pe,stroke:je,strokeWidth:tt||se,fillOpacity:"0"}),ze.map(function(_e,Be){var et=1;switch(pe){case"round":et=1-se/100;break;case"square":et=1-se/2/100;break;default:et=1;break}var at={strokeDasharray:"".concat(_e*et,"px, 100px"),strokeDashoffset:"-".concat(xe,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Qe=ft[Be]||ft[ft.length-1];return xe+=_e,Ze.createElement("path",{key:Be,className:"".concat(st,"-line-path"),d:Ee,strokeLinecap:pe,stroke:Qe,strokeWidth:se,fillOpacity:"0",ref:function(Et){it[Be]=Et},style:at})}))},Le=he,we=fe(76190),vt=fe(42978),Ve=fe(47273),Ie=0,We=(0,Ve.Z)();function De(){var $e;return We?($e=Ie,Ie+=1):$e="TEST_OR_SSR",$e}var ut=function($e){var Te=Ze.useState(),Ye=(0,vt.Z)(Te,2),Lt=Ye[0],rt=Ye[1];return Ze.useEffect(function(){rt("rc_progress_".concat(De()))},[]),$e||Lt},dt=function(Te){var Ye=Te.bg,Lt=Te.children;return Ze.createElement("div",{style:{width:"100%",height:"100%",background:Ye}},Lt)};function kt($e,Te){return Object.keys($e).map(function(Ye){var Lt=parseFloat(Ye),rt="".concat(Math.floor(Lt*Te),"%");return"".concat($e[Ye]," ").concat(rt)})}var wt=Ze.forwardRef(function($e,Te){var Ye=$e.prefixCls,Lt=$e.color,rt=$e.gradientId,st=$e.radius,lt=$e.style,pe=$e.ptg,se=$e.strokeLinecap,Ce=$e.strokeWidth,je=$e.size,tt=$e.gapDegree,be=Lt&&(0,we.Z)(Lt)==="object",Ge=be?"#FFF":void 0,ze=je/2,ft=Ze.createElement("circle",{className:"".concat(Ye,"-circle-path"),r:st,cx:ze,cy:ze,stroke:Ge,strokeLinecap:se,strokeWidth:Ce,opacity:pe===0?0:1,style:lt,ref:Te});if(!be)return ft;var it="".concat(rt,"-conic"),ge=tt?"".concat(180+tt/2,"deg"):"0deg",ve=kt(Lt,(360-tt)/360),Ee=kt(Lt,1),Xe="conic-gradient(from ".concat(ge,", ").concat(ve.join(", "),")"),xe="linear-gradient(to ".concat(tt?"bottom":"top",", ").concat(Ee.join(", "),")");return Ze.createElement(Ze.Fragment,null,Ze.createElement("mask",{id:it},ft),Ze.createElement("foreignObject",{x:0,y:0,width:je,height:je,mask:"url(#".concat(it,")")},Ze.createElement(dt,{bg:xe},Ze.createElement(dt,{bg:Xe}))))}),xt=wt,gt=100,yt=function(Te,Ye,Lt,rt,st,lt,pe,se,Ce,je){var tt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,be=Lt/100*360*((360-lt)/360),Ge=lt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],ze=(100-rt)/100*Ye;Ce==="round"&&rt!==100&&(ze+=je/2,ze>=Ye&&(ze=Ye-.01));var ft=gt/2;return{stroke:typeof se=="string"?se:void 0,strokeDasharray:"".concat(Ye,"px ").concat(Te),strokeDashoffset:ze+tt,transform:"rotate(".concat(st+be+Ge,"deg)"),transformOrigin:"".concat(ft,"px ").concat(ft,"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}},Xt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Re($e){var Te=$e!=null?$e:[];return Array.isArray(Te)?Te:[Te]}var Je=function(Te){var Ye=(0,ct.Z)((0,ct.Z)({},Me),Te),Lt=Ye.id,rt=Ye.prefixCls,st=Ye.steps,lt=Ye.strokeWidth,pe=Ye.trailWidth,se=Ye.gapDegree,Ce=se===void 0?0:se,je=Ye.gapPosition,tt=Ye.trailColor,be=Ye.strokeLinecap,Ge=Ye.style,ze=Ye.className,ft=Ye.strokeColor,it=Ye.percent,ge=(0,Fe.Z)(Ye,Xt),ve=gt/2,Ee=ut(Lt),Xe="".concat(Ee,"-gradient"),xe=ve-lt/2,_e=Math.PI*2*xe,Be=Ce>0?90+Ce/2:-90,et=_e*((360-Ce)/360),at=(0,we.Z)(st)==="object"?st:{count:st,gap:2},Qe=at.count,ht=at.gap,Et=Re(it),Ut=Re(ft),Bt=Ut.find(function(ye){return ye&&(0,we.Z)(ye)==="object"}),ue=Bt&&(0,we.Z)(Bt)==="object",te=ue?"butt":be,ee=yt(_e,et,0,100,Be,Ce,je,tt,te,lt),ie=Ke(),le=function(){var bt=0;return Et.map(function(mt,Dt){var He=Ut[Dt]||Ut[Ut.length-1],Ht=yt(_e,et,bt,mt,Be,Ce,je,He,te,lt);return bt+=mt,Ze.createElement(xt,{key:Dt,color:He,ptg:mt,radius:xe,prefixCls:rt,gradientId:Xe,style:Ht,strokeLinecap:te,strokeWidth:lt,gapDegree:Ce,ref:function(Ot){ie[Dt]=Ot},size:gt})}).reverse()},ne=function(){var bt=Math.round(Qe*(Et[0]/100)),mt=100/Qe,Dt=0;return new Array(Qe).fill(null).map(function(He,Ht){var Rt=Ht<=bt-1?Ut[0]:tt,Ot=Rt&&(0,we.Z)(Rt)==="object"?"url(#".concat(Xe,")"):void 0,un=yt(_e,et,Dt,mt,Be,Ce,je,Rt,"butt",lt,ht);return Dt+=(et-un.strokeDashoffset+ht)*100/et,Ze.createElement("circle",{key:Ht,className:"".concat(rt,"-circle-path"),r:xe,cx:ve,cy:ve,stroke:Ot,strokeWidth:lt,opacity:1,style:un,ref:function(cn){ie[Ht]=cn}})})};return Ze.createElement("svg",(0,oe.Z)({className:qe()("".concat(rt,"-circle"),ze),viewBox:"0 0 ".concat(gt," ").concat(gt),style:Ge,id:Lt,role:"presentation"},ge),!Qe&&Ze.createElement("circle",{className:"".concat(rt,"-circle-trail"),r:xe,cx:ve,cy:ve,stroke:tt,strokeLinecap:te,strokeWidth:pe||lt,style:ee}),Qe?ne():le())},Ct=Je,Ne={Line:Le,Circle:Ct}},6551:function(Ft,zt,fe){"use strict";fe.d(zt,{ZP:function(){return Me}});var oe=fe(42978),ct=fe(59301),Fe=fe(47273),Ze=0,me=(0,Fe.Z)();function qe(){var Ke;return me?(Ke=Ze,Ze+=1):Ke="TEST_OR_SSR",Ke}function Me(Ke){var ke=ct.useState(),he=(0,oe.Z)(ke,2),Le=he[0],we=he[1];return ct.useEffect(function(){we("rc_select_".concat(qe()))},[]),Ke||Le}},37463:function(Ft,zt,fe){"use strict";fe.d(zt,{Ac:function(){return He},Xo:function(){return Rt},Wx:function(){return un},ZP:function(){return jn},lk:function(){return kt}});var oe=fe(54476),ct=fe(94480),Fe=fe(20068),Ze=fe(33885),me=fe(42978),qe=fe(75931),Me=fe(76190),Ke=fe(18929),ke=fe(48736),he=fe(59301),Le=fe(92310),we=fe.n(Le),vt=fe(34280),Ve=fe(49658),Ie=fe(8654),We=function(Oe){var Nt=Oe.className,Mt=Oe.customizeIcon,Ue=Oe.customizeIconProps,At=Oe.children,Jt=Oe.onMouseDown,tn=Oe.onClick,dn=typeof Mt=="function"?Mt(Ue):Mt;return he.createElement("span",{className:Nt,onMouseDown:function($t){$t.preventDefault(),Jt==null||Jt($t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:tn,"aria-hidden":!0},dn!==void 0?dn:he.createElement("span",{className:we()(Nt.split(/\s+/).map(function(Zt){return"".concat(Zt,"-icon")}))},At))},De=We,ut=function(Oe,Nt,Mt,Ue,At){var Jt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,dn=arguments.length>7?arguments[7]:void 0,Zt=he.useMemo(function(){if((0,Me.Z)(Ue)==="object")return Ue.clearIcon;if(At)return At},[Ue,At]),$t=he.useMemo(function(){return!!(!Jt&&Ue&&(Mt.length||tn)&&!(dn==="combobox"&&tn===""))},[Ue,Jt,Mt.length,tn,dn]);return{allowClear:$t,clearIcon:he.createElement(De,{className:"".concat(Oe,"-clear"),onMouseDown:Nt,customizeIcon:Zt},"\xD7")}},dt=he.createContext(null);function kt(){return he.useContext(dt)}function wt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Oe=he.useState(!1),Nt=(0,me.Z)(Oe,2),Mt=Nt[0],Ue=Nt[1],At=he.useRef(null),Jt=function(){window.clearTimeout(At.current)};he.useEffect(function(){return Jt},[]);var tn=function(Zt,$t){Jt(),At.current=window.setTimeout(function(){Ue(Zt),$t&&$t()},Pe)};return[Mt,tn,Jt]}function xt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Oe=he.useRef(null),Nt=he.useRef(null);he.useEffect(function(){return function(){window.clearTimeout(Nt.current)}},[]);function Mt(Ue){(Ue||Oe.current===null)&&(Oe.current=Ue),window.clearTimeout(Nt.current),Nt.current=window.setTimeout(function(){Oe.current=null},Pe)}return[function(){return Oe.current},Mt]}function gt(Pe,Oe,Nt,Mt){var Ue=he.useRef(null);Ue.current={open:Oe,triggerOpen:Nt,customizedTrigger:Mt},he.useEffect(function(){function At(Jt){var tn;if(!((tn=Ue.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var dn=Jt.target;dn.shadowRoot&&Jt.composed&&(dn=Jt.composedPath()[0]||dn),Ue.current.open&&Pe().filter(function(Zt){return Zt}).every(function(Zt){return!Zt.contains(dn)&&Zt!==dn})&&Ue.current.triggerOpen(!1)}}return window.addEventListener("mousedown",At),function(){return window.removeEventListener("mousedown",At)}},[])}var yt=fe(10228);function Xt(Pe){return Pe&&![yt.Z.ESC,yt.Z.SHIFT,yt.Z.BACKSPACE,yt.Z.TAB,yt.Z.WIN_KEY,yt.Z.ALT,yt.Z.META,yt.Z.WIN_KEY_RIGHT,yt.Z.CTRL,yt.Z.SEMICOLON,yt.Z.EQUALS,yt.Z.CAPS_LOCK,yt.Z.CONTEXT_MENU,yt.Z.F1,yt.Z.F2,yt.Z.F3,yt.Z.F4,yt.Z.F5,yt.Z.F6,yt.Z.F7,yt.Z.F8,yt.Z.F9,yt.Z.F10,yt.Z.F11,yt.Z.F12].includes(Pe)}var Re=fe(26112),Je=fe(11780);function Ct(Pe,Oe,Nt){var Mt=(0,Ze.Z)((0,Ze.Z)({},Pe),Nt?Oe:{});return Object.keys(Oe).forEach(function(Ue){var At=Oe[Ue];typeof At=="function"&&(Mt[Ue]=function(){for(var Jt,tn=arguments.length,dn=new Array(tn),Zt=0;Zt<tn;Zt++)dn[Zt]=arguments[Zt];return At.apply(void 0,dn),(Jt=Pe[Ue])===null||Jt===void 0?void 0:Jt.call.apply(Jt,[Pe].concat(dn))})}),Mt}var Ne=Ct,$e=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Te=function(Oe,Nt){var Mt=Oe.prefixCls,Ue=Oe.id,At=Oe.inputElement,Jt=Oe.autoFocus,tn=Oe.autoComplete,dn=Oe.editable,Zt=Oe.activeDescendantId,$t=Oe.value,Tt=Oe.open,St=Oe.attrs,en=(0,qe.Z)(Oe,$e),vn=At||he.createElement("input",null),mn=vn,xn=mn.ref,_n=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=he.cloneElement(vn,(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({type:"search"},Ne(en,_n,!0)),{},{id:Ue,ref:(0,Ie.sQ)(Nt,xn),autoComplete:tn||"off",autoFocus:Jt,className:we()("".concat(Mt,"-selection-search-input"),_n==null?void 0:_n.className),role:"combobox","aria-expanded":Tt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ue,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ue,"_list"),"aria-activedescendant":Tt?Zt:void 0},St),{},{value:dn?$t:"",readOnly:!dn,unselectable:dn?null:"on",style:(0,Ze.Z)((0,Ze.Z)({},_n.style),{},{opacity:dn?null:0})})),vn},Ye=he.forwardRef(Te),Lt=Ye;function rt(Pe){return Array.isArray(Pe)?Pe:Pe!==void 0?[Pe]:[]}var st=typeof window!="undefined"&&window.document&&window.document.documentElement,lt=st;function pe(Pe){return Pe!=null}function se(Pe){return!Pe&&Pe!==0}function Ce(Pe){return["string","number"].includes((0,Me.Z)(Pe))}function je(Pe){var Oe=void 0;return Pe&&(Ce(Pe.title)?Oe=Pe.title.toString():Ce(Pe.label)&&(Oe=Pe.label.toString())),Oe}function tt(Pe,Oe){lt?he.useLayoutEffect(Pe,Oe):he.useEffect(Pe,Oe)}function be(Pe){var Oe;return(Oe=Pe.key)!==null&&Oe!==void 0?Oe:Pe.value}var Ge=function(Oe){Oe.preventDefault(),Oe.stopPropagation()},ze=function(Oe){var Nt=Oe.id,Mt=Oe.prefixCls,Ue=Oe.values,At=Oe.open,Jt=Oe.searchValue,tn=Oe.autoClearSearchValue,dn=Oe.inputRef,Zt=Oe.placeholder,$t=Oe.disabled,Tt=Oe.mode,St=Oe.showSearch,en=Oe.autoFocus,vn=Oe.autoComplete,mn=Oe.activeDescendantId,xn=Oe.tabIndex,_n=Oe.removeIcon,Yn=Oe.maxTagCount,hn=Oe.maxTagTextLength,jt=Oe.maxTagPlaceholder,gn=jt===void 0?function(yn){return"+ ".concat(yn.length," ...")}:jt,nn=Oe.tagRender,Wn=Oe.onToggleOpen,wr=Oe.onRemove,Qn=Oe.onInputChange,Lr=Oe.onInputPaste,Mr=Oe.onInputKeyDown,Cr=Oe.onInputMouseDown,ir=Oe.onInputCompositionStart,Ir=Oe.onInputCompositionEnd,gr=Oe.onInputBlur,or=he.useRef(null),Er=(0,he.useState)(0),Ar=(0,me.Z)(Er,2),pr=Ar[0],qn=Ar[1],Gn=(0,he.useState)(!1),Br=(0,me.Z)(Gn,2),Vr=Br[0],Jr=Br[1],Dr="".concat(Mt,"-selection"),Wr=At||Tt==="multiple"&&tn===!1||Tt==="tags"?Jt:"",Nr=Tt==="tags"||Tt==="multiple"&&tn===!1||St&&(At||Vr);tt(function(){qn(or.current.scrollWidth)},[Wr]);var Zr=function(on,Dn,ar,Vt,_t){return he.createElement("span",{title:je(on),className:we()("".concat(Dr,"-item"),(0,Fe.Z)({},"".concat(Dr,"-item-disabled"),ar))},he.createElement("span",{className:"".concat(Dr,"-item-content")},Dn),Vt&&he.createElement(De,{className:"".concat(Dr,"-item-remove"),onMouseDown:Ge,onClick:_t,customizeIcon:_n},"\xD7"))},ii=function(on,Dn,ar,Vt,_t,rn){var ln=function(sr){Ge(sr),Wn(!At)};return he.createElement("span",{onMouseDown:ln},nn({label:Dn,value:on,disabled:ar,closable:Vt,onClose:_t,isMaxTag:!!rn}))},Or=function(on){var Dn=on.disabled,ar=on.label,Vt=on.value,_t=!$t&&!Dn,rn=ar;if(typeof hn=="number"&&(typeof ar=="string"||typeof ar=="number")){var ln=String(rn);ln.length>hn&&(rn="".concat(ln.slice(0,hn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Vt,rn,Dn,_t,Mn):Zr(on,rn,Dn,_t,Mn)},In=function(on){if(!Ue.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=he.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},he.createElement(Lt,{ref:dn,open:At,prefixCls:Mt,id:Nt,inputElement:null,disabled:$t,autoFocus:en,autoComplete:vn,editable:Nr,activeDescendantId:mn,value:Wr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Ir,onBlur:gr,tabIndex:xn,attrs:(0,Re.Z)(Oe,!0)}),he.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Wr,"\xA0")),Yt=he.createElement(Je.Z,{prefixCls:"".concat(Dr,"-overflow"),data:Ue,renderItem:Or,renderRest:In,suffix:Wt,itemKey:be,maxCount:Yn});return he.createElement("span",{className:"".concat(Dr,"-wrap")},Yt,!Ue.length&&!Wr&&he.createElement("span",{className:"".concat(Dr,"-placeholder")},Zt))},ft=ze,it=function(Oe){var Nt=Oe.inputElement,Mt=Oe.prefixCls,Ue=Oe.id,At=Oe.inputRef,Jt=Oe.disabled,tn=Oe.autoFocus,dn=Oe.autoComplete,Zt=Oe.activeDescendantId,$t=Oe.mode,Tt=Oe.open,St=Oe.values,en=Oe.placeholder,vn=Oe.tabIndex,mn=Oe.showSearch,xn=Oe.searchValue,_n=Oe.activeValue,Yn=Oe.maxLength,hn=Oe.onInputKeyDown,jt=Oe.onInputMouseDown,gn=Oe.onInputChange,nn=Oe.onInputPaste,Wn=Oe.onInputCompositionStart,wr=Oe.onInputCompositionEnd,Qn=Oe.onInputBlur,Lr=Oe.title,Mr=he.useState(!1),Cr=(0,me.Z)(Mr,2),ir=Cr[0],Ir=Cr[1],gr=$t==="combobox",or=gr||mn,Er=St[0],Ar=xn||"";gr&&_n&&!ir&&(Ar=_n),he.useEffect(function(){gr&&Ir(!1)},[gr,_n]);var pr=$t!=="combobox"&&!Tt&&!mn?!1:!!Ar,qn=Lr===void 0?je(Er):Lr,Gn=he.useMemo(function(){return Er?null:he.createElement("span",{className:"".concat(Mt,"-selection-placeholder"),style:pr?{visibility:"hidden"}:void 0},en)},[Er,pr,en,Mt]);return he.createElement("span",{className:"".concat(Mt,"-selection-wrap")},he.createElement("span",{className:"".concat(Mt,"-selection-search")},he.createElement(Lt,{ref:At,prefixCls:Mt,id:Ue,open:Tt,inputElement:Nt,disabled:Jt,autoFocus:tn,autoComplete:dn,editable:or,activeDescendantId:Zt,value:Ar,onKeyDown:hn,onMouseDown:jt,onChange:function(Vr){Ir(!0),gn(Vr)},onPaste:nn,onCompositionStart:Wn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,Re.Z)(Oe,!0),maxLength:gr?Yn:void 0})),!gr&&Er?he.createElement("span",{className:"".concat(Mt,"-selection-item"),title:qn,style:pr?{visibility:"hidden"}:void 0},Er.label):null,Gn)},ge=it,ve=function(Oe,Nt){var Mt=(0,he.useRef)(null),Ue=(0,he.useRef)(!1),At=Oe.prefixCls,Jt=Oe.open,tn=Oe.mode,dn=Oe.showSearch,Zt=Oe.tokenWithEnter,$t=Oe.disabled,Tt=Oe.prefix,St=Oe.autoClearSearchValue,en=Oe.onSearch,vn=Oe.onSearchSubmit,mn=Oe.onToggleOpen,xn=Oe.onInputKeyDown,_n=Oe.onInputBlur,Yn=Oe.domRef;he.useImperativeHandle(Nt,function(){return{focus:function(qn){Mt.current.focus(qn)},blur:function(){Mt.current.blur()}}});var hn=xt(0),jt=(0,me.Z)(hn,2),gn=jt[0],nn=jt[1],Wn=function(qn){var Gn=qn.which,Br=Mt.current instanceof HTMLTextAreaElement;!Br&&Jt&&(Gn===yt.Z.UP||Gn===yt.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),Gn===yt.Z.ENTER&&tn==="tags"&&!Ue.current&&!Jt&&(vn==null||vn(qn.target.value)),!(Br&&!Jt&&~[yt.Z.UP,yt.Z.DOWN,yt.Z.LEFT,yt.Z.RIGHT].indexOf(Gn))&&Xt(Gn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,he.useRef)(null),Lr=function(qn){en(qn,!0,Ue.current)!==!1&&mn(!0)},Mr=function(){Ue.current=!0},Cr=function(qn){Ue.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var Gn=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," ");Gn=Gn.replace(Br,Qn.current)}Qn.current=null,Lr(Gn)},Ir=function(qn){var Gn=qn.clipboardData,Br=Gn==null?void 0:Gn.getData("text");Qn.current=Br||""},gr=function(qn){var Gn=qn.target;if(Gn!==Mt.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){Mt.current.focus()}):Mt.current.focus()}},or=function(qn){var Gn=gn();qn.target!==Mt.current&&!Gn&&!(tn==="combobox"&&$t)&&qn.preventDefault(),(tn!=="combobox"&&(!dn||!Gn)||!Jt)&&(Jt&&St!==!1&&en("",!0,!1),mn())},Er={inputRef:Mt,onInputKeyDown:Wn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Ir,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:_n},Ar=tn==="multiple"||tn==="tags"?he.createElement(ft,(0,oe.Z)({},Oe,Er)):he.createElement(ge,(0,oe.Z)({},Oe,Er));return he.createElement("div",{ref:Yn,className:"".concat(At,"-selector"),onClick:gr,onMouseDown:or},Tt&&he.createElement("div",{className:"".concat(At,"-prefix")},Tt),Ar)},Ee=he.forwardRef(ve),Xe=Ee,xe=fe(65030),_e=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Be=function(Oe){var Nt=Oe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Nt,adjustY:1},htmlRegion:"scroll"}}},et=function(Oe,Nt){var Mt=Oe.prefixCls,Ue=Oe.disabled,At=Oe.visible,Jt=Oe.children,tn=Oe.popupElement,dn=Oe.animation,Zt=Oe.transitionName,$t=Oe.dropdownStyle,Tt=Oe.dropdownClassName,St=Oe.direction,en=St===void 0?"ltr":St,vn=Oe.placement,mn=Oe.builtinPlacements,xn=Oe.dropdownMatchSelectWidth,_n=Oe.dropdownRender,Yn=Oe.dropdownAlign,hn=Oe.getPopupContainer,jt=Oe.empty,gn=Oe.getTriggerDOMNode,nn=Oe.onPopupVisibleChange,Wn=Oe.onPopupMouseEnter,wr=(0,qe.Z)(Oe,_e),Qn="".concat(Mt,"-dropdown"),Lr=tn;_n&&(Lr=_n(tn));var Mr=he.useMemo(function(){return mn||Be(xn)},[mn,xn]),Cr=dn?"".concat(Qn,"-").concat(dn):Zt,ir=typeof xn=="number",Ir=he.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=$t;ir&&(gr=(0,Ze.Z)((0,Ze.Z)({},gr),{},{width:xn}));var or=he.useRef(null);return he.useImperativeHandle(Nt,function(){return{getPopupElement:function(){var Ar;return(Ar=or.current)===null||Ar===void 0?void 0:Ar.popupElement}}}),he.createElement(xe.Z,(0,oe.Z)({},wr,{showAction:nn?["click"]:[],hideAction:nn?["click"]:[],popupPlacement:vn||(en==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Mr,prefixCls:Qn,popupTransitionName:Cr,popup:he.createElement("div",{onMouseEnter:Wn},Lr),ref:or,stretch:Ir,popupAlign:Yn,popupVisible:At,getPopupContainer:hn,popupClassName:we()(Tt,(0,Fe.Z)({},"".concat(Qn,"-empty"),jt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Jt)},at=he.forwardRef(et),Qe=at,ht=fe(66712);function Et(Pe,Oe){var Nt=Pe.key,Mt;return"value"in Pe&&(Mt=Pe.value),Nt!=null?Nt:Mt!==void 0?Mt:"rc-index-key-".concat(Oe)}function Ut(Pe){return typeof Pe!="undefined"&&!Number.isNaN(Pe)}function Bt(Pe,Oe){var Nt=Pe||{},Mt=Nt.label,Ue=Nt.value,At=Nt.options,Jt=Nt.groupLabel,tn=Mt||(Oe?"children":"label");return{label:tn,value:Ue||"value",options:At||"options",groupLabel:Jt||tn}}function ue(Pe){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=Oe.fieldNames,Mt=Oe.childrenAsData,Ue=[],At=Bt(Nt,!1),Jt=At.label,tn=At.value,dn=At.options,Zt=At.groupLabel;function $t(Tt,St){Array.isArray(Tt)&&Tt.forEach(function(en){if(St||!(dn in en)){var vn=en[tn];Ue.push({key:Et(en,Ue.length),groupOption:St,data:en,label:en[Jt],value:vn})}else{var mn=en[Zt];mn===void 0&&Mt&&(mn=en.label),Ue.push({key:Et(en,Ue.length),group:!0,data:en,label:mn}),$t(en[dn],!0)}})}return $t(Pe,!1),Ue}function te(Pe){var Oe=(0,Ze.Z)({},Pe);return"props"in Oe||Object.defineProperty(Oe,"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`."),Oe}}),Oe}var ee=function(Oe,Nt,Mt){if(!Nt||!Nt.length)return null;var Ue=!1,At=function tn(dn,Zt){var $t=(0,ht.Z)(Zt),Tt=$t[0],St=$t.slice(1);if(!Tt)return[dn];var en=dn.split(Tt);return Ue=Ue||en.length>1,en.reduce(function(vn,mn){return[].concat((0,ct.Z)(vn),(0,ct.Z)(tn(mn,St)))},[]).filter(Boolean)},Jt=At(Oe,Nt);return Ue?typeof Mt!="undefined"?Jt.slice(0,Mt):Jt:null},ie=he.createContext(null),le=ie;function ne(Pe){var Oe=Pe.visible,Nt=Pe.values;if(!Oe)return null;var Mt=50;return he.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Nt.slice(0,Mt).map(function(Ue){var At=Ue.label,Jt=Ue.value;return["number","string"].includes((0,Me.Z)(At))?At:Jt}).join(", ")),Nt.length>Mt?", ...":null)}var ye=["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"],bt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],mt=function(Oe){return Oe==="tags"||Oe==="multiple"},Dt=he.forwardRef(function(Pe,Oe){var Nt,Mt=Pe.id,Ue=Pe.prefixCls,At=Pe.className,Jt=Pe.showSearch,tn=Pe.tagRender,dn=Pe.direction,Zt=Pe.omitDomProps,$t=Pe.displayValues,Tt=Pe.onDisplayValuesChange,St=Pe.emptyOptions,en=Pe.notFoundContent,vn=en===void 0?"Not Found":en,mn=Pe.onClear,xn=Pe.mode,_n=Pe.disabled,Yn=Pe.loading,hn=Pe.getInputElement,jt=Pe.getRawInputElement,gn=Pe.open,nn=Pe.defaultOpen,Wn=Pe.onDropdownVisibleChange,wr=Pe.activeValue,Qn=Pe.onActiveValueChange,Lr=Pe.activeDescendantId,Mr=Pe.searchValue,Cr=Pe.autoClearSearchValue,ir=Pe.onSearch,Ir=Pe.onSearchSplit,gr=Pe.tokenSeparators,or=Pe.allowClear,Er=Pe.prefix,Ar=Pe.suffixIcon,pr=Pe.clearIcon,qn=Pe.OptionList,Gn=Pe.animation,Br=Pe.transitionName,Vr=Pe.dropdownStyle,Jr=Pe.dropdownClassName,Dr=Pe.dropdownMatchSelectWidth,Wr=Pe.dropdownRender,Nr=Pe.dropdownAlign,Zr=Pe.placement,ii=Pe.builtinPlacements,Or=Pe.getPopupContainer,In=Pe.showAction,Wt=In===void 0?[]:In,Yt=Pe.onFocus,yn=Pe.onBlur,on=Pe.onKeyUp,Dn=Pe.onKeyDown,ar=Pe.onMouseDown,Vt=(0,qe.Z)(Pe,ye),_t=mt(xn),rn=(Jt!==void 0?Jt:_t)||xn==="combobox",ln=(0,Ze.Z)({},Vt);bt.forEach(function(lr){delete ln[lr]}),Zt==null||Zt.forEach(function(lr){delete ln[lr]});var Mn=he.useState(!1),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1];he.useEffect(function(){yr((0,Ve.Z)())},[]);var br=he.useRef(null),Sr=he.useRef(null),zr=he.useRef(null),Pr=he.useRef(null),_r=he.useRef(null),ei=he.useRef(!1),Li=wt(),Oi=(0,me.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];he.useImperativeHandle(Oe,function(){var lr,zn;return{focus:(lr=Pr.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Pr.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=_r.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:br.current||Sr.current}});var fr=he.useMemo(function(){var lr;if(xn!=="combobox")return Mr;var zn=(lr=$t[0])===null||lr===void 0?void 0:lr.value;return typeof zn=="string"||typeof zn=="number"?String(zn):""},[Mr,xn,$t]),to=xn==="combobox"&&typeof hn=="function"&&hn()||null,ti=typeof jt=="function"&&jt(),Ni=(0,Ie.x1)(Sr,ti==null||(Nt=ti.props)===null||Nt===void 0?void 0:Nt.ref),ao=he.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ii=Ji[1];(0,vt.Z)(function(){Ii(!0)},[]);var Hr=(0,Ke.Z)(!1,{defaultValue:nn,value:gn}),_i=(0,me.Z)(Hr,2),so=_i[0],Zi=_i[1],Qr=mi?so:!1,xo=!vn&&St;(_n||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Ln=he.useCallback(function(lr){var zn=lr!==void 0?lr:!Qr;_n||(Zi(zn),Qr!==zn&&(Wn==null||Wn(zn)))},[_n,Qr,Zi,Wn]),On=he.useMemo(function(){return(gr||[]).some(function(lr){return[`
|
|
`,`\r
|
|
`].includes(lr)})},[gr]),Tn=he.useContext(le)||{},Nn=Tn.maxCount,vr=Tn.rawValues,Fr=function(zn,ci,fi){if(!(_t&&Ut(Nn)&&(vr==null?void 0:vr.size)>=Nn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=ee(zn,gr,Ut(Nn)?Nn-vr.size:void 0),Hi=fi?null:Vi;return xn!=="combobox"&&Hi&&(ni="",Ir==null||Ir(Hi),Ln(!1),Yr=!1),ir&&fr!==ni&&ir(ni,{source:ci?"typing":"effect"}),Yr}},ji=function(zn){!zn||!zn.trim()||ir(zn,{source:"submit"})};he.useEffect(function(){!Qr&&!_t&&xn!=="combobox"&&Fr("",!1,!1)},[Qr]),he.useEffect(function(){so&&_n&&Zi(!1),_n&&!ei.current&&vi(!1)},[_n]);var gi=xt(),ui=(0,me.Z)(gi,2),Kr=ui[0],Wi=ui[1],Qi=he.useRef(!1),Mi=function(zn){var ci=Kr(),fi=zn.key,Yr=fi==="Enter";if(Yr&&(xn!=="combobox"&&zn.preventDefault(),Qr||Ln(!0)),Wi(!!fr),fi==="Backspace"&&!ci&&_t&&!fr&&$t.length){for(var ni=(0,ct.Z)($t),Vi=null,Hi=ni.length-1;Hi>=0;Hi-=1){var ro=ni[Hi];if(!ro.disabled){ni.splice(Hi,1),Vi=ro;break}}Vi&&Tt(ni,{type:"remove",values:[Vi]})}for(var Ai=arguments.length,Pi=new Array(Ai>1?Ai-1:0),Ui=1;Ui<Ai;Ui++)Pi[Ui-1]=arguments[Ui];if(Qr&&(!Yr||!Qi.current)){var co;Yr&&(Qi.current=!0),(co=_r.current)===null||co===void 0||co.onKeyDown.apply(co,[zn].concat(Pi))}Dn==null||Dn.apply(void 0,[zn].concat(Pi))},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=_r.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=$t.filter(function(fi){return fi!==zn});Tt(ci,{type:"remove",values:[zn]})},Gi=function(){Qi.current=!1},Po=he.useRef(!1),Ga=function(){vi(!0),_n||(Yt&&!Po.current&&Yt.apply(void 0,arguments),Wt.includes("focus")&&Ln(!0)),Po.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Po.current=!1,ei.current=!1,Ln(!1)}),!_n&&(fr&&(xn==="tags"?ir(fr,{source:"submit"}):xn==="multiple"&&ir("",{source:"blur"})),yn&&yn.apply(void 0,arguments))},$i=[];he.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 Pi;(Pi=Pr.current)===null||Pi===void 0||Pi.focus()}});$i.push(ni)}for(var Vi=arguments.length,Hi=new Array(Vi>1?Vi-1:0),ro=1;ro<Vi;ro++)Hi[ro-1]=arguments[ro];ar==null||ar.apply(void 0,[zn].concat(Hi))},zi=he.useState({}),ba=(0,me.Z)(zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(zn){Ln(zn)}),gt(function(){var lr;return[br.current,(lr=zr.current)===null||lr===void 0?void 0:lr.getPopupElement()]},lo,Ln,!!ti);var Ua=he.useMemo(function(){return(0,Ze.Z)((0,Ze.Z)({},Pe),{},{notFoundContent:vn,open:Qr,triggerOpen:lo,id:Mt,showSearch:rn,multiple:_t,toggleOpen:Ln})},[Pe,vn,lo,Qr,Mt,rn,_t,Ln]),Ko=!!Ar||Yn,Yo;Ko&&(Yo=he.createElement(De,{className:we()("".concat(Ue,"-arrow"),(0,Fe.Z)({},"".concat(Ue,"-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=Pr.current)===null||zn===void 0||zn.focus(),Tt([],{type:"clear",values:$t}),Fr("",!1,!1)},Xo=ut(Ue,wo,$t,or,pr,_n,fr,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,To=he.createElement(qn,{ref:_r}),Sa=we()(Ue,At,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(Ue,"-focused"),xi),"".concat(Ue,"-multiple"),_t),"".concat(Ue,"-single"),!_t),"".concat(Ue,"-allow-clear"),or),"".concat(Ue,"-show-arrow"),Ko),"".concat(Ue,"-disabled"),_n),"".concat(Ue,"-loading"),Yn),"".concat(Ue,"-open"),Qr),"".concat(Ue,"-customize-input"),to),"".concat(Ue,"-show-search"),rn)),Bo=he.createElement(Qe,{ref:zr,disabled:_n,prefixCls:Ue,visible:lo,popupElement:To,animation:Gn,transitionName:Br,dropdownStyle:Vr,dropdownClassName:Jr,direction:dn,dropdownMatchSelectWidth:Dr,dropdownRender:Wr,dropdownAlign:Nr,placement:Zr,builtinPlacements:ii,getPopupContainer:Or,empty:St,getTriggerDOMNode:function(zn){return Sr.current||zn},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?he.cloneElement(ti,{ref:Ni}):he.createElement(Xe,(0,oe.Z)({},Pe,{domRef:Sr,prefixCls:Ue,inputElement:to,ref:Pr,id:Mt,prefix:Er,showSearch:rn,autoClearSearchValue:Cr,mode:xn,activeDescendantId:Lr,tagRender:tn,values:$t,open:Qr,onToggleOpen:Ln,activeValue:wr,searchValue:fr,onSearch:Fr,onSearchSubmit:ji,onRemove:no,tokenWithEnter:On,onInputBlur:Gi}))),wi;return ti?wi=Bo:wi=he.createElement("div",(0,oe.Z)({className:Sa},ln,{ref:br,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:Ga,onBlur:ya}),he.createElement(ne,{visible:xi&&!Qr,values:$t}),Bo,Yo,Ca&&Jo),he.createElement(dt.Provider,{value:Ua},wi)}),He=Dt,Ht=function(){return null};Ht.isSelectOptGroup=!0;var Rt=Ht,Ot=function(){return null};Ot.isSelectOption=!0;var un=Ot,kn=fe(80547),cn=fe(2738),wn=fe(48911);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Hn=["disabled","title","children","style","className"];function mr(Pe){return typeof Pe=="string"||typeof Pe=="number"}var er=function(Oe,Nt){var Mt=kt(),Ue=Mt.prefixCls,At=Mt.id,Jt=Mt.open,tn=Mt.multiple,dn=Mt.mode,Zt=Mt.searchValue,$t=Mt.toggleOpen,Tt=Mt.notFoundContent,St=Mt.onPopupScroll,en=he.useContext(le),vn=en.maxCount,mn=en.flattenOptions,xn=en.onActiveValue,_n=en.defaultActiveFirstOption,Yn=en.onSelect,hn=en.menuItemSelectedIcon,jt=en.rawValues,gn=en.fieldNames,nn=en.virtual,Wn=en.direction,wr=en.listHeight,Qn=en.listItemHeight,Lr=en.optionRender,Mr="".concat(Ue,"-item"),Cr=(0,kn.Z)(function(){return mn},[Jt,mn],function(In,Wt){return Wt[0]&&In[1]!==Wt[1]}),ir=he.useRef(null),Ir=he.useMemo(function(){return tn&&Ut(vn)&&(jt==null?void 0:jt.size)>=vn},[tn,vn,jt==null?void 0:jt.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=he.useCallback(function(In){return dn==="combobox"?!1:jt.has(In)},[dn,(0,ct.Z)(jt).toString(),jt.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]||{},Vt=ar.group,_t=ar.data;if(!Vt&&!(_t!=null&&_t.disabled)&&(Er(_t.value)||!Ir))return Dn}return-1},pr=he.useState(function(){return Ar(0)}),qn=(0,me.Z)(pr,2),Gn=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,he.useEffect)(function(){Vr(_n!==!1?Ar(0):-1)},[Cr.length,Zt]);var Jr=he.useCallback(function(In){return dn==="combobox"?String(In).toLowerCase()===Zt.toLowerCase():jt.has(In)},[dn,Zt,(0,ct.Z)(jt).toString(),jt.size]);(0,he.useEffect)(function(){var In=setTimeout(function(){if(!tn&&Jt&&jt.size===1){var Yt=Array.from(jt)[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(Jt){var Wt;(Wt=ir.current)===null||Wt===void 0||Wt.scrollTo(void 0)}return function(){return clearTimeout(In)}},[Jt,Zt]);var Dr=function(Wt){Wt!==void 0&&Yn(Wt,{selected:!jt.has(Wt)}),tn||$t(!1)};if(he.useImperativeHandle(Nt,function(){return{onKeyDown:function(Wt){var Yt=Wt.which,yn=Wt.ctrlKey;switch(Yt){case yt.Z.N:case yt.Z.P:case yt.Z.UP:case yt.Z.DOWN:{var on=0;if(Yt===yt.Z.UP?on=-1:Yt===yt.Z.DOWN?on=1:$n()&&yn&&(Yt===yt.Z.N?on=1:Yt===yt.Z.P&&(on=-1)),on!==0){var Dn=Ar(Gn+on,on);or(Dn),Vr(Dn,!0)}break}case yt.Z.TAB:case yt.Z.ENTER:{var ar,Vt=Cr[Gn];Vt&&!(Vt!=null&&(ar=Vt.data)!==null&&ar!==void 0&&ar.disabled)&&!Ir?Dr(Vt.value):Dr(void 0),Jt&&Wt.preventDefault();break}case yt.Z.ESC:$t(!1),Jt&&Wt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Wt){or(Wt)}}}),Cr.length===0)return he.createElement("div",{role:"listbox",id:"".concat(At,"_list"),className:"".concat(Mr,"-empty"),onMouseDown:gr},Tt);var Wr=Object.keys(gn).map(function(In){return gn[In]}),Nr=function(Wt){return Wt.label};function Zr(In,Wt){var Yt=In.group;return{role:Yt?"presentation":"option",id:"".concat(At,"_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,Re.Z)(yn,!0),Vt=Nr(Yt);return Yt?he.createElement("div",(0,oe.Z)({"aria-label":typeof Vt=="string"&&!Dn?Vt:null},ar,{key:Wt},Zr(Yt,Wt),{"aria-selected":Jr(on)}),on):null},Or={role:"listbox",id:"".concat(At,"_list")};return he.createElement(he.Fragment,null,nn&&he.createElement("div",(0,oe.Z)({},Or,{style:{height:0,width:0,overflow:"hidden"}}),ii(Gn-1),ii(Gn),ii(Gn+1)),he.createElement(wn.Z,{itemKey:"key",ref:ir,data:Cr,height:wr,itemHeight:Qn,fullHeight:!1,onMouseDown:gr,onScroll:St,virtual:nn,direction:Wn,innerProps:nn?null:Or},function(In,Wt){var Yt=In.group,yn=In.groupOption,on=In.data,Dn=In.label,ar=In.value,Vt=on.key;if(Yt){var _t,rn=(_t=on.title)!==null&&_t!==void 0?_t:mr(Dn)?Dn.toString():void 0;return he.createElement("div",{className:we()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Vt)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,qe.Z)(on,Hn),Sr=(0,cn.Z)(br,Wr),zr=Er(ar),Pr=ln||!zr&&Ir,_r="".concat(Mr,"-option"),ei=we()(Mr,_r,yr,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(_r,"-grouped"),yn),"".concat(_r,"-active"),Gn===Wt&&!Pr),"".concat(_r,"-disabled"),Pr),"".concat(_r,"-selected"),zr)),Li=Nr(In),Oi=!hn||typeof hn=="function"||zr,xi=typeof Li=="number"?Li:Li||ar,vi=mr(xi)?xi.toString():void 0;return Mn!==void 0&&(vi=Mn),he.createElement("div",(0,oe.Z)({},(0,Re.Z)(Sr),nn?{}:Zr(In,Wt),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){Gn===Wt||Pr||Vr(Wt)},onClick:function(){Pr||Dr(ar)},style:Vn}),he.createElement("div",{className:"".concat(_r,"-content")},typeof Lr=="function"?Lr(In,{index:Wt}):xi),he.isValidElement(hn)||zr,Oi&&he.createElement(De,{className:"".concat(Mr,"-option-state"),customizeIcon:hn,customizeIconProps:{value:ar,disabled:Pr,isSelected:zr}},zr?"\u2713":null))}))},ur=he.forwardRef(er),nr=ur,Fn=function(Pe,Oe){var Nt=he.useRef({values:new Map,options:new Map}),Mt=he.useMemo(function(){var At=Nt.current,Jt=At.values,tn=At.options,dn=Pe.map(function(Tt){if(Tt.label===void 0){var St;return(0,Ze.Z)((0,Ze.Z)({},Tt),{},{label:(St=Jt.get(Tt.value))===null||St===void 0?void 0:St.label})}return Tt}),Zt=new Map,$t=new Map;return dn.forEach(function(Tt){Zt.set(Tt.value,Tt),$t.set(Tt.value,Oe.get(Tt.value)||tn.get(Tt.value))}),Nt.current.values=Zt,Nt.current.options=$t,dn},[Pe,Oe]),Ue=he.useCallback(function(At){return Oe.get(At)||Nt.current.options.get(At)},[Oe]);return[Mt,Ue]};function rr(Pe,Oe){return rt(Pe).join("").toUpperCase().includes(Oe)}var cr=function(Pe,Oe,Nt,Mt,Ue){return he.useMemo(function(){if(!Nt||Mt===!1)return Pe;var At=Oe.options,Jt=Oe.label,tn=Oe.value,dn=[],Zt=typeof Mt=="function",$t=Nt.toUpperCase(),Tt=Zt?Mt:function(en,vn){return Ue?rr(vn[Ue],$t):vn[At]?rr(vn[Jt!=="children"?Jt:"label"],$t):rr(vn[tn],$t)},St=Zt?function(en){return te(en)}:function(en){return en};return Pe.forEach(function(en){if(en[At]){var vn=Tt(Nt,St(en));if(vn)dn.push(en);else{var mn=en[At].filter(function(xn){return Tt(Nt,St(xn))});mn.length&&dn.push((0,Ze.Z)((0,Ze.Z)({},en),{},(0,Fe.Z)({},At,mn)))}return}Tt(Nt,St(en))&&dn.push(en)}),dn},[Pe,Mt,Ue,Nt,Oe])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Kt(Pe){var Oe=Pe,Nt=Oe.key,Mt=Oe.props,Ue=Mt.children,At=Mt.value,Jt=(0,qe.Z)(Mt,Kn);return(0,Ze.Z)({key:Nt,value:At!==void 0?At:Nt,children:Ue},Jt)}function pn(Pe){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Pe).map(function(Nt,Mt){if(!he.isValidElement(Nt)||!Nt.type)return null;var Ue=Nt,At=Ue.type.isSelectOptGroup,Jt=Ue.key,tn=Ue.props,dn=tn.children,Zt=(0,qe.Z)(tn,xr);return Oe||!At?Kt(Nt):(0,Ze.Z)((0,Ze.Z)({key:"__RC_SELECT_GRP__".concat(Jt===null?Mt:Jt,"__"),label:Jt},Zt),{},{options:pn(dn)})}).filter(function(Nt){return Nt})}var En=function(Oe,Nt,Mt,Ue,At){return he.useMemo(function(){var Jt=Oe,tn=!Oe;tn&&(Jt=pn(Nt));var dn=new Map,Zt=new Map,$t=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},Tt=function St(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[Mt.options]||vn?(dn.set(xn[Mt.value],xn),$t(Zt,xn,Mt.label),$t(Zt,xn,Ue),$t(Zt,xn,At)):St(xn[Mt.options],!0)}};return Tt(Jt),{options:Jt,valueOptions:dn,labelOptions:Zt}},[Oe,Nt,Mt,Ue,At])},An=En;function Jn(Pe){var Oe=he.useRef();Oe.current=Pe;var Nt=he.useCallback(function(){return Oe.current.apply(Oe,arguments)},[]);return Nt}function tr(Pe){var Oe=Pe.mode,Nt=Pe.options,Mt=Pe.children,Ue=Pe.backfill,At=Pe.allowClear,Jt=Pe.placeholder,tn=Pe.getInputElement,dn=Pe.showSearch,Zt=Pe.onSearch,$t=Pe.defaultOpen,Tt=Pe.autoFocus,St=Pe.labelInValue,en=Pe.value,vn=Pe.inputValue,mn=Pe.optionLabelProp,xn=isMultiple(Oe),_n=dn!==void 0?dn:xn||Oe==="combobox",Yn=Nt||convertChildrenToData(Mt);if(warning(Oe!=="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."),Oe==="tags"||Oe==="combobox"){var hn=Yn.some(function(nn){return nn.options?nn.options.some(function(Wn){return typeof("value"in Wn?Wn.value:Wn.key)=="number"}):typeof("value"in nn?nn.value:nn.key)=="number"});warning(!hn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Oe!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Oe==="combobox"||!Ue,"`backfill` only works with `combobox` mode."),warning(Oe==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Oe!=="combobox"||!tn||!At||!Jt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Zt&&!_n&&Oe!=="combobox"&&Oe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!$t||Tt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),en!=null){var jt=toArray(en);warning(!St||jt.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(Mt){var gn=null;toNodeArray(Mt).some(function(nn){if(!React.isValidElement(nn)||!nn.type)return!1;var Wn=nn,wr=Wn.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 hr(Pe,Oe){if(Pe){var Nt=function Mt(Ue){for(var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Jt=0;Jt<Ue.length;Jt++){var tn=Ue[Jt];if(tn[Oe==null?void 0:Oe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!At&&Array.isArray(tn[Oe==null?void 0:Oe.options])&&Mt(tn[Oe==null?void 0:Oe.options],!0))break}};Nt(Pe)}}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"],dr=["inputValue"];function Gt(Pe){return!Pe||(0,Me.Z)(Pe)!=="object"}var pt=he.forwardRef(function(Pe,Oe){var Nt=Pe.id,Mt=Pe.mode,Ue=Pe.prefixCls,At=Ue===void 0?"rc-select":Ue,Jt=Pe.backfill,tn=Pe.fieldNames,dn=Pe.inputValue,Zt=Pe.searchValue,$t=Pe.onSearch,Tt=Pe.autoClearSearchValue,St=Tt===void 0?!0:Tt,en=Pe.onSelect,vn=Pe.onDeselect,mn=Pe.dropdownMatchSelectWidth,xn=mn===void 0?!0:mn,_n=Pe.filterOption,Yn=Pe.filterSort,hn=Pe.optionFilterProp,jt=Pe.optionLabelProp,gn=Pe.options,nn=Pe.optionRender,Wn=Pe.children,wr=Pe.defaultActiveFirstOption,Qn=Pe.menuItemSelectedIcon,Lr=Pe.virtual,Mr=Pe.direction,Cr=Pe.listHeight,ir=Cr===void 0?200:Cr,Ir=Pe.listItemHeight,gr=Ir===void 0?20:Ir,or=Pe.labelRender,Er=Pe.value,Ar=Pe.defaultValue,pr=Pe.labelInValue,qn=Pe.onChange,Gn=Pe.maxCount,Br=(0,qe.Z)(Pe,Rn),Vr=(0,Bn.ZP)(Nt),Jr=mt(Mt),Dr=!!(!gn&&Wn),Wr=he.useMemo(function(){return _n===void 0&&Mt==="combobox"?!1:_n},[_n,Mt]),Nr=he.useMemo(function(){return Bt(tn,Dr)},[JSON.stringify(tn),Dr]),Zr=(0,Ke.Z)("",{value:Zt!==void 0?Zt:dn,postState:function(On){return On||""}}),ii=(0,me.Z)(Zr,2),Or=ii[0],In=ii[1],Wt=An(gn,Wn,Nr,hn,jt),Yt=Wt.valueOptions,yn=Wt.labelOptions,on=Wt.options,Dn=he.useCallback(function(Ln){var On=rt(Ln);return On.map(function(Tn){var Nn,vr,Fr,ji,gi;if(Gt(Tn))Nn=Tn;else{var ui;Fr=Tn.key,vr=Tn.label,Nn=(ui=Tn.value)!==null&&ui!==void 0?ui:Fr}var Kr=Yt.get(Nn);if(Kr){var Wi;if(vr===void 0&&(vr=Kr==null?void 0:Kr[jt||Nr.label]),Fr===void 0&&(Fr=(Wi=Kr==null?void 0:Kr.key)!==null&&Wi!==void 0?Wi:Nn),ji=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:vr,value:Nn,key:Fr,disabled:ji,title:gi}})},[Nr,jt,Yt]),ar=(0,Ke.Z)(Ar,{value:Er}),Vt=(0,me.Z)(ar,2),_t=Vt[0],rn=Vt[1],ln=he.useMemo(function(){var Ln,On=Jr&&_t===null?[]:_t,Tn=Dn(On);return Mt==="combobox"&&se((Ln=Tn[0])===null||Ln===void 0?void 0:Ln.value)?[]:Tn},[_t,Dn,Mt,Jr]),Mn=Fn(ln,Yt),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1],br=he.useMemo(function(){if(!Mt&&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 Tn;return(0,Ze.Z)((0,Ze.Z)({},On),{},{label:(Tn=typeof or=="function"?or(On):On.label)!==null&&Tn!==void 0?Tn:On.value})})},[Mt,Vn,or]),Sr=he.useMemo(function(){return new Set(Vn.map(function(Ln){return Ln.value}))},[Vn]);he.useEffect(function(){if(Mt==="combobox"){var Ln,On=(Ln=Vn[0])===null||Ln===void 0?void 0:Ln.value;In(pe(On)?String(On):"")}},[Vn]);var zr=Jn(function(Ln,On){var Tn=On!=null?On:Ln;return(0,Fe.Z)((0,Fe.Z)({},Nr.value,Ln),Nr.label,Tn)}),Pr=he.useMemo(function(){if(Mt!=="tags")return on;var Ln=(0,ct.Z)(on),On=function(Nn){return Yt.has(Nn)};return(0,ct.Z)(Vn).sort(function(Tn,Nn){return Tn.value<Nn.value?-1:1}).forEach(function(Tn){var Nn=Tn.value;On(Nn)||Ln.push(zr(Nn,Tn.label))}),Ln},[zr,on,Yt,Vn,Mt]),_r=cr(Pr,Nr,Or,Wr,hn),ei=he.useMemo(function(){return Mt!=="tags"||!Or||_r.some(function(Ln){return Ln[hn||"value"]===Or})||_r.some(function(Ln){return Ln[Nr.value]===Or})?_r:[zr(Or)].concat((0,ct.Z)(_r))},[zr,hn,Mt,_r,Or,Nr]),Li=function Ln(On){var Tn=(0,ct.Z)(On).sort(function(Nn,vr){return Yn(Nn,vr,{searchValue:Or})});return Tn.map(function(Nn){return Array.isArray(Nn.options)?(0,Ze.Z)((0,Ze.Z)({},Nn),{},{options:Nn.options.length>0?Ln(Nn.options):Nn.options}):Nn})},Oi=he.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=he.useMemo(function(){return ue(Oi,{fieldNames:Nr,childrenAsData:Dr})},[Oi,Nr,Dr]),vi=function(On){var Tn=Dn(On);if(rn(Tn),qn&&(Tn.length!==Vn.length||Tn.some(function(Fr,ji){var gi;return((gi=Vn[ji])===null||gi===void 0?void 0:gi.value)!==(Fr==null?void 0:Fr.value)}))){var Nn=pr?Tn:Tn.map(function(Fr){return Fr.value}),vr=Tn.map(function(Fr){return te(yr(Fr.value))});qn(Jr?Nn:Nn[0],Jr?vr:vr[0])}},Xi=he.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Ni=he.useState(0),ao=(0,me.Z)(Ni,2),Ji=ao[0],mi=ao[1],Ii=wr!==void 0?wr:Mt!=="combobox",Hr=he.useCallback(function(Ln,On){var Tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nn=Tn.source,vr=Nn===void 0?"keyboard":Nn;mi(On),Jt&&Mt==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Jt,Mt]),_i=function(On,Tn,Nn){var vr=function(){var no,Gi=yr(On);return[pr?{label:Gi==null?void 0:Gi[Nr.label],value:On,key:(no=Gi==null?void 0:Gi.key)!==null&&no!==void 0?no:On}:On,te(Gi)]};if(Tn&&en){var Fr=vr(),ji=(0,me.Z)(Fr,2),gi=ji[0],ui=ji[1];en(gi,ui)}else if(!Tn&&vn&&Nn!=="clear"){var Kr=vr(),Wi=(0,me.Z)(Kr,2),Qi=Wi[0],Mi=Wi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Tn,Nn=Jr?On.selected:!0;Nn?Tn=Jr?[].concat((0,ct.Z)(Vn),[Ln]):[Ln]:Tn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Tn),_i(Ln,Nn),Mt==="combobox"?ti(""):(!mt||St)&&(In(""),ti(""))}),Zi=function(On,Tn){vi(On);var Nn=Tn.type,vr=Tn.values;(Nn==="remove"||Nn==="clear")&&vr.forEach(function(Fr){_i(Fr.value,!1,Nn)})},Qr=function(On,Tn){if(In(On),ti(null),Tn.source==="submit"){var Nn=(On||"").trim();if(Nn){var vr=Array.from(new Set([].concat((0,ct.Z)(Sr),[Nn])));vi(vr),_i(Nn,!0),In("")}return}Tn.source!=="blur"&&(Mt==="combobox"&&vi(On),$t==null||$t(On))},xo=function(On){var Tn=On;Mt!=="tags"&&(Tn=On.map(function(vr){var Fr=yn.get(vr);return Fr==null?void 0:Fr.value}).filter(function(vr){return vr!==void 0}));var Nn=Array.from(new Set([].concat((0,ct.Z)(Sr),(0,ct.Z)(Tn))));vi(Nn),Nn.forEach(function(vr){_i(vr,!0)})},lo=he.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,Ze.Z)((0,Ze.Z)({},Wt),{},{flattenOptions:xi,onActiveValue:Hr,defaultActiveFirstOption:Ii,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Nr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:Gn,optionRender:nn})},[Gn,Wt,xi,Hr,Ii,so,Qn,Sr,Nr,Lr,xn,Mr,ir,gr,Dr,nn]);return he.createElement(le.Provider,{value:lo},he.createElement(He,(0,oe.Z)({},Br,{id:Vr,prefixCls:At,ref:Oe,omitDomProps:dr,mode:Mt,displayValues:br,onDisplayValuesChange:Zi,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:St,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),qt=pt;qt.Option=un,qt.OptGroup=Rt;var Cn=qt,jn=Cn},63158:function(Ft,zt,fe){"use strict";var oe=fe(54476),ct=fe(20068),Fe=fe(42978),Ze=fe(75931),me=fe(59301),qe=fe(92310),Me=fe.n(qe),Ke=fe(18929),ke=fe(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Le=me.forwardRef(function(we,vt){var Ve,Ie=we.prefixCls,We=Ie===void 0?"rc-switch":Ie,De=we.className,ut=we.checked,dt=we.defaultChecked,kt=we.disabled,wt=we.loadingIcon,xt=we.checkedChildren,gt=we.unCheckedChildren,yt=we.onClick,Xt=we.onChange,Re=we.onKeyDown,Je=(0,Ze.Z)(we,he),Ct=(0,Ke.Z)(!1,{value:ut,defaultValue:dt}),Ne=(0,Fe.Z)(Ct,2),$e=Ne[0],Te=Ne[1];function Ye(lt,pe){var se=$e;return kt||(se=lt,Te(se),Xt==null||Xt(se,pe)),se}function Lt(lt){lt.which===ke.Z.LEFT?Ye(!1,lt):lt.which===ke.Z.RIGHT&&Ye(!0,lt),Re==null||Re(lt)}function rt(lt){var pe=Ye(!$e,lt);yt==null||yt(pe,lt)}var st=Me()(We,De,(Ve={},(0,ct.Z)(Ve,"".concat(We,"-checked"),$e),(0,ct.Z)(Ve,"".concat(We,"-disabled"),kt),Ve));return me.createElement("button",(0,oe.Z)({},Je,{type:"button",role:"switch","aria-checked":$e,disabled:kt,className:st,ref:vt,onKeyDown:Lt,onClick:rt}),wt,me.createElement("span",{className:"".concat(We,"-inner")},me.createElement("span",{className:"".concat(We,"-inner-checked")},xt),me.createElement("span",{className:"".concat(We,"-inner-unchecked")},gt)))});Le.displayName="Switch",zt.Z=Le},22711:function(Ft,zt,fe){"use strict";fe.r(zt),fe.d(zt,{ResizableTextArea:function(){return Ne},default:function(){return Lt}});var oe=fe(54476),ct=fe(20068),Fe=fe(33885),Ze=fe(94480),me=fe(42978),qe=fe(75931),Me=fe(92310),Ke=fe.n(Me),ke=fe(36901),he=fe(66003),Le=fe(30292),we=fe(18929),vt=fe(59301),Ve=fe(76190),Ie=fe(29301),We=fe(34280),De=fe(16089),ut=`
|
|
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;
|
|
`,dt=["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"],kt={},wt;function xt(rt){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=rt.getAttribute("id")||rt.getAttribute("data-reactid")||rt.getAttribute("name");if(st&&kt[lt])return kt[lt];var pe=window.getComputedStyle(rt),se=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ce=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),je=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),tt=dt.map(function(Ge){return"".concat(Ge,":").concat(pe.getPropertyValue(Ge))}).join(";"),be={sizingStyle:tt,paddingSize:Ce,borderSize:je,boxSizing:se};return st&<&&(kt[lt]=be),be}function gt(rt){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;wt||(wt=document.createElement("textarea"),wt.setAttribute("tab-index","-1"),wt.setAttribute("aria-hidden","true"),wt.setAttribute("name","hiddenTextarea"),document.body.appendChild(wt)),rt.getAttribute("wrap")?wt.setAttribute("wrap",rt.getAttribute("wrap")):wt.removeAttribute("wrap");var se=xt(rt,st),Ce=se.paddingSize,je=se.borderSize,tt=se.boxSizing,be=se.sizingStyle;wt.setAttribute("style","".concat(be,";").concat(ut)),wt.value=rt.value||rt.placeholder||"";var Ge=void 0,ze=void 0,ft,it=wt.scrollHeight;if(tt==="border-box"?it+=je:tt==="content-box"&&(it-=Ce),lt!==null||pe!==null){wt.value=" ";var ge=wt.scrollHeight-Ce;lt!==null&&(Ge=ge*lt,tt==="border-box"&&(Ge=Ge+Ce+je),it=Math.max(Ge,it)),pe!==null&&(ze=ge*pe,tt==="border-box"&&(ze=ze+Ce+je),ft=it>ze?"":"hidden",it=Math.min(ze,it))}var ve={height:it,overflowY:ft,resize:"none"};return Ge&&(ve.minHeight=Ge),ze&&(ve.maxHeight=ze),ve}var yt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Xt=0,Re=1,Je=2,Ct=vt.forwardRef(function(rt,st){var lt=rt,pe=lt.prefixCls,se=lt.defaultValue,Ce=lt.value,je=lt.autoSize,tt=lt.onResize,be=lt.className,Ge=lt.style,ze=lt.disabled,ft=lt.onChange,it=lt.onInternalAutoSize,ge=(0,qe.Z)(lt,yt),ve=(0,we.Z)(se,{value:Ce,postState:function(un){return un!=null?un:""}}),Ee=(0,me.Z)(ve,2),Xe=Ee[0],xe=Ee[1],_e=function(un){xe(un.target.value),ft==null||ft(un)},Be=vt.useRef();vt.useImperativeHandle(st,function(){return{textArea:Be.current}});var et=vt.useMemo(function(){return je&&(0,Ve.Z)(je)==="object"?[je.minRows,je.maxRows]:[]},[je]),at=(0,me.Z)(et,2),Qe=at[0],ht=at[1],Et=!!je,Ut=function(){try{if(document.activeElement===Be.current){var un=Be.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Be.current.setSelectionRange(kn,cn),Be.current.scrollTop=wn}}catch($n){}},Bt=vt.useState(Je),ue=(0,me.Z)(Bt,2),te=ue[0],ee=ue[1],ie=vt.useState(),le=(0,me.Z)(ie,2),ne=le[0],ye=le[1],bt=function(){ee(Xt)};(0,We.Z)(function(){Et&&bt()},[Ce,Qe,ht,Et]),(0,We.Z)(function(){if(te===Xt)ee(Re);else if(te===Re){var Ot=gt(Be.current,!1,Qe,ht);ee(Je),ye(Ot)}else Ut()},[te]);var mt=vt.useRef(),Dt=function(){De.Z.cancel(mt.current)},He=function(un){te===Je&&(tt==null||tt(un),je&&(Dt(),mt.current=(0,De.Z)(function(){bt()})))};vt.useEffect(function(){return Dt},[]);var Ht=Et?ne:null,Rt=(0,Fe.Z)((0,Fe.Z)({},Ge),Ht);return(te===Xt||te===Re)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),vt.createElement(Ie.Z,{onResize:He,disabled:!(je||tt)},vt.createElement("textarea",(0,oe.Z)({},ge,{ref:Be,style:Rt,className:Ke()(pe,be,(0,ct.Z)({},"".concat(pe,"-disabled"),ze)),disabled:ze,value:Xe,onChange:_e})))}),Ne=Ct,$e=["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"],Te=vt.forwardRef(function(rt,st){var lt,pe=rt.defaultValue,se=rt.value,Ce=rt.onFocus,je=rt.onBlur,tt=rt.onChange,be=rt.allowClear,Ge=rt.maxLength,ze=rt.onCompositionStart,ft=rt.onCompositionEnd,it=rt.suffix,ge=rt.prefixCls,ve=ge===void 0?"rc-textarea":ge,Ee=rt.showCount,Xe=rt.count,xe=rt.className,_e=rt.style,Be=rt.disabled,et=rt.hidden,at=rt.classNames,Qe=rt.styles,ht=rt.onResize,Et=rt.onClear,Ut=rt.onPressEnter,Bt=rt.readOnly,ue=rt.autoSize,te=rt.onKeyDown,ee=(0,qe.Z)(rt,$e),ie=(0,we.Z)(pe,{value:se,defaultValue:pe}),le=(0,me.Z)(ie,2),ne=le[0],ye=le[1],bt=ne==null?"":String(ne),mt=vt.useState(!1),Dt=(0,me.Z)(mt,2),He=Dt[0],Ht=Dt[1],Rt=vt.useRef(!1),Ot=vt.useState(null),un=(0,me.Z)(Ot,2),kn=un[0],cn=un[1],wn=(0,vt.useRef)(null),$n=(0,vt.useRef)(null),Hn=function(){var qt;return(qt=$n.current)===null||qt===void 0?void 0:qt.textArea},mr=function(){Hn().focus()};(0,vt.useImperativeHandle)(st,function(){var pt;return{resizableTextArea:$n.current,focus:mr,blur:function(){Hn().blur()},nativeElement:((pt=wn.current)===null||pt===void 0?void 0:pt.nativeElement)||Hn()}}),(0,vt.useEffect)(function(){Ht(function(pt){return!Be&&pt})},[Be]);var er=vt.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],Fn=ur[1];vt.useEffect(function(){if(nr){var pt;(pt=Hn()).setSelectionRange.apply(pt,(0,Ze.Z)(nr))}},[nr]);var rr=(0,he.Z)(Xe,Ee),cr=(lt=rr.max)!==null&<!==void 0?lt:Ge,Bn=Number(cr)>0,Xn=rr.strategy(bt),Kn=!!cr&&Xn>cr,xr=function(qt,Cn){var jn=Cn;!Rt.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(jn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==jn&&Fn([Hn().selectionStart||0,Hn().selectionEnd||0])),ye(jn),(0,Le.rJ)(qt.currentTarget,qt,tt,jn)},Kt=function(qt){Rt.current=!0,ze==null||ze(qt)},pn=function(qt){Rt.current=!1,xr(qt,qt.currentTarget.value),ft==null||ft(qt)},En=function(qt){xr(qt,qt.target.value)},An=function(qt){qt.key==="Enter"&&Ut&&Ut(qt),te==null||te(qt)},Jn=function(qt){Ht(!0),Ce==null||Ce(qt)},tr=function(qt){Ht(!1),je==null||je(qt)},hr=function(qt){ye(""),mr(),(0,Le.rJ)(Hn(),qt,tt)},Zn=it,Rn;rr.show&&(rr.showFormatter?Rn=rr.showFormatter({value:bt,count:Xn,maxLength:cr}):Rn="".concat(Xn).concat(Bn?" / ".concat(cr):""),Zn=vt.createElement(vt.Fragment,null,Zn,vt.createElement("span",{className:Ke()("".concat(ve,"-data-count"),at==null?void 0:at.count),style:Qe==null?void 0:Qe.count},Rn)));var dr=function(qt){var Cn;ht==null||ht(qt),(Cn=Hn())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},Gt=!ue&&!Ee&&!be;return vt.createElement(ke.BaseInput,{ref:wn,value:bt,allowClear:be,handleReset:hr,suffix:Zn,prefixCls:ve,classNames:(0,Fe.Z)((0,Fe.Z)({},at),{},{affixWrapper:Ke()(at==null?void 0:at.affixWrapper,(0,ct.Z)((0,ct.Z)({},"".concat(ve,"-show-count"),Ee),"".concat(ve,"-textarea-allow-clear"),be))}),disabled:Be,focused:He,className:Ke()(xe,Kn&&"".concat(ve,"-out-of-range")),style:(0,Fe.Z)((0,Fe.Z)({},_e),kn&&!Gt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Rn=="string"?Rn:void 0}},hidden:et,readOnly:Bt,onClear:Et},vt.createElement(Ne,(0,oe.Z)({},ee,{autoSize:ue,maxLength:Ge,onKeyDown:An,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Kt,onCompositionEnd:pn,className:Ke()(at==null?void 0:at.textarea),style:(0,Fe.Z)((0,Fe.Z)({},Qe==null?void 0:Qe.textarea),{},{resize:_e==null?void 0:_e.resize}),disabled:Be,prefixCls:ve,onResize:dr,ref:$n,readOnly:Bt})))}),Ye=Te,Lt=Ye},90472:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return rt}});var oe=fe(54476),ct=fe(67732),Fe=fe(83652),Ze=fe(31226),me=fe(42403),qe=fe(158),Me=fe(20068),Ke=fe(59301),ke=fe(33885),he=fe(75931),Le=fe(76190),we=fe(75044),vt=fe(3202),Ve=fe(94480),Ie=fe(92310),We=fe.n(Ie),De=fe(26112),ut=fe(48736),dt=function(st,lt){if(st&<){var pe=Array.isArray(lt)?lt:lt.split(","),se=st.name||"",Ce=st.type||"",je=Ce.replace(/\/.*$/,"");return pe.some(function(tt){var be=tt.trim();if(/^\*(\/\*)?$/.test(tt))return!0;if(be.charAt(0)==="."){var Ge=se.toLowerCase(),ze=be.toLowerCase(),ft=[ze];return(ze===".jpg"||ze===".jpeg")&&(ft=[".jpg",".jpeg"]),ft.some(function(it){return Ge.endsWith(it)})}return/\/\*$/.test(be)?je===be.replace(/\/.*$/,""):Ce===be?!0:/^\w+$/.test(be)?((0,ut.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(be,"'.Skip for check.")),!0):!1})}return!0};function kt(st,lt){var pe="cannot ".concat(st.method," ").concat(st.action," ").concat(lt.status,"'"),se=new Error(pe);return se.status=lt.status,se.method=st.method,se.url=st.action,se}function wt(st){var lt=st.responseText||st.response;if(!lt)return lt;try{return JSON.parse(lt)}catch(pe){return lt}}function xt(st){var lt=new XMLHttpRequest;st.onProgress&<.upload&&(lt.upload.onprogress=function(je){je.total>0&&(je.percent=je.loaded/je.total*100),st.onProgress(je)});var pe=new FormData;st.data&&Object.keys(st.data).forEach(function(Ce){var je=st.data[Ce];if(Array.isArray(je)){je.forEach(function(tt){pe.append("".concat(Ce,"[]"),tt)});return}pe.append(Ce,je)}),st.file instanceof Blob?pe.append(st.filename,st.file,st.file.name):pe.append(st.filename,st.file),lt.onerror=function(je){st.onError(je)},lt.onload=function(){return lt.status<200||lt.status>=300?st.onError(kt(st,lt),wt(lt)):st.onSuccess(wt(lt),lt)},lt.open(st.method,st.action,!0),st.withCredentials&&"withCredentials"in lt&&(lt.withCredentials=!0);var se=st.headers||{};return se["X-Requested-With"]!==null&<.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(se).forEach(function(Ce){se[Ce]!==null&<.setRequestHeader(Ce,se[Ce])}),lt.send(pe),{abort:function(){lt.abort()}}}var gt=function(){var st=(0,vt.Z)((0,we.Z)().mark(function lt(pe,se){var Ce,je,tt,be,Ge,ze,ft,it;return(0,we.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:ze=function(){return ze=(0,vt.Z)((0,we.Z)().mark(function Xe(xe){return(0,we.Z)().wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return Be.abrupt("return",new Promise(function(et){xe.file(function(at){se(at)?(xe.fullPath&&!at.webkitRelativePath&&(Object.defineProperties(at,{webkitRelativePath:{writable:!0}}),at.webkitRelativePath=xe.fullPath.replace(/^\//,""),Object.defineProperties(at,{webkitRelativePath:{writable:!1}})),et(at)):et(null)})}));case 1:case"end":return Be.stop()}},Xe)})),ze.apply(this,arguments)},Ge=function(Xe){return ze.apply(this,arguments)},be=function(){return be=(0,vt.Z)((0,we.Z)().mark(function Xe(xe){var _e,Be,et,at,Qe;return(0,we.Z)().wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:_e=xe.createReader(),Be=[];case 2:return Et.next=5,new Promise(function(Ut){_e.readEntries(Ut,function(){return Ut([])})});case 5:if(et=Et.sent,at=et.length,at){Et.next=9;break}return Et.abrupt("break",12);case 9:for(Qe=0;Qe<at;Qe++)Be.push(et[Qe]);Et.next=2;break;case 12:return Et.abrupt("return",Be);case 13:case"end":return Et.stop()}},Xe)})),be.apply(this,arguments)},tt=function(Xe){return be.apply(this,arguments)},Ce=[],je=[],pe.forEach(function(Ee){return je.push(Ee.webkitGetAsEntry())}),ft=function(){var Ee=(0,vt.Z)((0,we.Z)().mark(function Xe(xe,_e){var Be,et;return(0,we.Z)().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(xe){Qe.next=2;break}return Qe.abrupt("return");case 2:if(xe.path=_e||"",!xe.isFile){Qe.next=10;break}return Qe.next=6,Ge(xe);case 6:Be=Qe.sent,Be&&Ce.push(Be),Qe.next=15;break;case 10:if(!xe.isDirectory){Qe.next=15;break}return Qe.next=13,tt(xe);case 13:et=Qe.sent,je.push.apply(je,(0,Ve.Z)(et));case 15:case"end":return Qe.stop()}},Xe)}));return function(xe,_e){return Ee.apply(this,arguments)}}(),it=0;case 9:if(!(it<je.length)){ve.next=15;break}return ve.next=12,ft(je[it]);case 12:it++,ve.next=9;break;case 15:return ve.abrupt("return",Ce);case 16:case"end":return ve.stop()}},lt)}));return function(pe,se){return st.apply(this,arguments)}}(),yt=gt,Xt=+new Date,Re=0;function Je(){return"rc-upload-".concat(Xt,"-").concat(++Re)}var Ct=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ne=function(st){(0,me.Z)(pe,st);var lt=(0,qe.Z)(pe);function pe(){var se;(0,ct.Z)(this,pe);for(var Ce=arguments.length,je=new Array(Ce),tt=0;tt<Ce;tt++)je[tt]=arguments[tt];return se=lt.call.apply(lt,[this].concat(je)),(0,Me.Z)((0,Ze.Z)(se),"state",{uid:Je()}),(0,Me.Z)((0,Ze.Z)(se),"reqs",{}),(0,Me.Z)((0,Ze.Z)(se),"fileInput",void 0),(0,Me.Z)((0,Ze.Z)(se),"_isMounted",void 0),(0,Me.Z)((0,Ze.Z)(se),"onChange",function(be){var Ge=se.props,ze=Ge.accept,ft=Ge.directory,it=be.target.files,ge=(0,Ve.Z)(it).filter(function(ve){return!ft||dt(ve,ze)});se.uploadFiles(ge),se.reset()}),(0,Me.Z)((0,Ze.Z)(se),"onClick",function(be){var Ge=se.fileInput;if(Ge){var ze=be.target,ft=se.props.onClick;if(ze&&ze.tagName==="BUTTON"){var it=Ge.parentNode;it.focus(),ze.blur()}Ge.click(),ft&&ft(be)}}),(0,Me.Z)((0,Ze.Z)(se),"onKeyDown",function(be){be.key==="Enter"&&se.onClick(be)}),(0,Me.Z)((0,Ze.Z)(se),"onFileDrop",function(){var be=(0,vt.Z)((0,we.Z)().mark(function Ge(ze){var ft,it,ge;return(0,we.Z)().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(ft=se.props.multiple,ze.preventDefault(),ze.type!=="dragover"){Ee.next=4;break}return Ee.abrupt("return");case 4:if(!se.props.directory){Ee.next=11;break}return Ee.next=7,yt(Array.prototype.slice.call(ze.dataTransfer.items),function(Xe){return dt(Xe,se.props.accept)});case 7:it=Ee.sent,se.uploadFiles(it),Ee.next=14;break;case 11:ge=(0,Ve.Z)(ze.dataTransfer.files).filter(function(Xe){return dt(Xe,se.props.accept)}),ft===!1&&(ge=ge.slice(0,1)),se.uploadFiles(ge);case 14:case"end":return Ee.stop()}},Ge)}));return function(Ge){return be.apply(this,arguments)}}()),(0,Me.Z)((0,Ze.Z)(se),"uploadFiles",function(be){var Ge=(0,Ve.Z)(be),ze=Ge.map(function(ft){return ft.uid=Je(),se.processFile(ft,Ge)});Promise.all(ze).then(function(ft){var it=se.props.onBatchStart;it==null||it(ft.map(function(ge){var ve=ge.origin,Ee=ge.parsedFile;return{file:ve,parsedFile:Ee}})),ft.filter(function(ge){return ge.parsedFile!==null}).forEach(function(ge){se.post(ge)})})}),(0,Me.Z)((0,Ze.Z)(se),"processFile",function(){var be=(0,vt.Z)((0,we.Z)().mark(function Ge(ze,ft){var it,ge,ve,Ee,Xe,xe,_e,Be,et;return(0,we.Z)().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(it=se.props.beforeUpload,ge=ze,!it){Qe.next=14;break}return Qe.prev=3,Qe.next=6,it(ze,ft);case 6:ge=Qe.sent,Qe.next=12;break;case 9:Qe.prev=9,Qe.t0=Qe.catch(3),ge=!1;case 12:if(ge!==!1){Qe.next=14;break}return Qe.abrupt("return",{origin:ze,parsedFile:null,action:null,data:null});case 14:if(ve=se.props.action,typeof ve!="function"){Qe.next=21;break}return Qe.next=18,ve(ze);case 18:Ee=Qe.sent,Qe.next=22;break;case 21:Ee=ve;case 22:if(Xe=se.props.data,typeof Xe!="function"){Qe.next=29;break}return Qe.next=26,Xe(ze);case 26:xe=Qe.sent,Qe.next=30;break;case 29:xe=Xe;case 30:return _e=((0,Le.Z)(ge)==="object"||typeof ge=="string")&&ge?ge:ze,_e instanceof File?Be=_e:Be=new File([_e],ze.name,{type:ze.type}),et=Be,et.uid=ze.uid,Qe.abrupt("return",{origin:ze,data:xe,parsedFile:et,action:Ee});case 35:case"end":return Qe.stop()}},Ge,null,[[3,9]])}));return function(Ge,ze){return be.apply(this,arguments)}}()),(0,Me.Z)((0,Ze.Z)(se),"saveFileInput",function(be){se.fileInput=be}),se}return(0,Fe.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Ce){var je=this,tt=Ce.data,be=Ce.origin,Ge=Ce.action,ze=Ce.parsedFile;if(this._isMounted){var ft=this.props,it=ft.onStart,ge=ft.customRequest,ve=ft.name,Ee=ft.headers,Xe=ft.withCredentials,xe=ft.method,_e=be.uid,Be=ge||xt,et={action:Ge,filename:ve,data:tt,file:ze,headers:Ee,withCredentials:Xe,method:xe||"post",onProgress:function(Qe){var ht=je.props.onProgress;ht==null||ht(Qe,ze)},onSuccess:function(Qe,ht){var Et=je.props.onSuccess;Et==null||Et(Qe,ze,ht),delete je.reqs[_e]},onError:function(Qe,ht){var Et=je.props.onError;Et==null||Et(Qe,ht,ze),delete je.reqs[_e]}};it(be),this.reqs[_e]=Be(et)}}},{key:"reset",value:function(){this.setState({uid:Je()})}},{key:"abort",value:function(Ce){var je=this.reqs;if(Ce){var tt=Ce.uid?Ce.uid:Ce;je[tt]&&je[tt].abort&&je[tt].abort(),delete je[tt]}else Object.keys(je).forEach(function(be){je[be]&&je[be].abort&&je[be].abort(),delete je[be]})}},{key:"render",value:function(){var Ce=this.props,je=Ce.component,tt=Ce.prefixCls,be=Ce.className,Ge=Ce.classNames,ze=Ge===void 0?{}:Ge,ft=Ce.disabled,it=Ce.id,ge=Ce.name,ve=Ce.style,Ee=Ce.styles,Xe=Ee===void 0?{}:Ee,xe=Ce.multiple,_e=Ce.accept,Be=Ce.capture,et=Ce.children,at=Ce.directory,Qe=Ce.openFileDialogOnClick,ht=Ce.onMouseEnter,Et=Ce.onMouseLeave,Ut=Ce.hasControlInside,Bt=(0,he.Z)(Ce,Ct),ue=We()((0,Me.Z)((0,Me.Z)((0,Me.Z)({},tt,!0),"".concat(tt,"-disabled"),ft),be,be)),te=at?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},ee=ft?{}:{onClick:Qe?this.onClick:function(){},onKeyDown:Qe?this.onKeyDown:function(){},onMouseEnter:ht,onMouseLeave:Et,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Ut?void 0:"0"};return Ke.createElement(je,(0,oe.Z)({},ee,{className:ue,role:Ut?void 0:"button",style:ve}),Ke.createElement("input",(0,oe.Z)({},(0,De.Z)(Bt,{aria:!0,data:!0}),{id:it,name:ge,disabled:ft,type:"file",ref:this.saveFileInput,onClick:function(le){return le.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},Xe.input),className:ze.input,accept:_e},te,{multiple:xe,onChange:this.onChange},Be!=null?{capture:Be}:{})),et)}}]),pe}(Ke.Component),$e=Ne;function Te(){}var Ye=function(st){(0,me.Z)(pe,st);var lt=(0,qe.Z)(pe);function pe(){var se;(0,ct.Z)(this,pe);for(var Ce=arguments.length,je=new Array(Ce),tt=0;tt<Ce;tt++)je[tt]=arguments[tt];return se=lt.call.apply(lt,[this].concat(je)),(0,Me.Z)((0,Ze.Z)(se),"uploader",void 0),(0,Me.Z)((0,Ze.Z)(se),"saveUploader",function(be){se.uploader=be}),se}return(0,Fe.Z)(pe,[{key:"abort",value:function(Ce){this.uploader.abort(Ce)}},{key:"render",value:function(){return Ke.createElement($e,(0,oe.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Ke.Component);(0,Me.Z)(Ye,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Te,onError:Te,onSuccess:Te,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Lt=Ye,rt=Lt},48911:function(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return Xe}});var oe=fe(54476),ct=fe(76190),Fe=fe(33885),Ze=fe(20068),me=fe(42978),qe=fe(75931),Me=fe(92310),Ke=fe.n(Me),ke=fe(29301),he=fe(70425),Le=fe(34280),we=fe(59301),vt=fe(4676),Ve=we.forwardRef(function(xe,_e){var Be=xe.height,et=xe.offsetY,at=xe.offsetX,Qe=xe.children,ht=xe.prefixCls,Et=xe.onInnerResize,Ut=xe.innerProps,Bt=xe.rtl,ue=xe.extra,te={},ee={display:"flex",flexDirection:"column"};return et!==void 0&&(te={height:Be,position:"relative",overflow:"hidden"},ee=(0,Fe.Z)((0,Fe.Z)({},ee),{},(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({transform:"translateY(".concat(et,"px)")},Bt?"marginRight":"marginLeft",-at),"position","absolute"),"left",0),"right",0),"top",0))),we.createElement("div",{style:te},we.createElement(ke.Z,{onResize:function(le){var ne=le.offsetHeight;ne&&Et&&Et()}},we.createElement("div",(0,oe.Z)({style:ee,className:Ke()((0,Ze.Z)({},"".concat(ht,"-holder-inner"),ht)),ref:_e},Ut),Qe,ue)))});Ve.displayName="Filler";var Ie=Ve;function We(xe){var _e=xe.children,Be=xe.setRef,et=we.useCallback(function(at){Be(at)},[]);return we.cloneElement(_e,{ref:et})}function De(xe,_e,Be,et,at,Qe,ht,Et){var Ut=Et.getKey;return xe.slice(_e,Be+1).map(function(Bt,ue){var te=_e+ue,ee=ht(Bt,te,{style:{width:et},offsetX:at}),ie=Ut(Bt);return we.createElement(We,{key:ie,setRef:function(ne){return Qe(Bt,ne)}},ee)})}function ut(xe,_e,Be,et){var at=Be-xe,Qe=_e-Be,ht=Math.min(at,Qe)*2;if(et<=ht){var Et=Math.floor(et/2);return et%2?Be+Et+1:Be-Et}return at>Qe?Be-(et-Qe):Be+(et-at)}function dt(xe,_e,Be){var et=xe.length,at=_e.length,Qe,ht;if(et===0&&at===0)return null;et<at?(Qe=xe,ht=_e):(Qe=_e,ht=xe);var Et={__EMPTY_ITEM__:!0};function Ut(le){return le!==void 0?Be(le):Et}for(var Bt=null,ue=Math.abs(et-at)!==1,te=0;te<ht.length;te+=1){var ee=Ut(Qe[te]),ie=Ut(ht[te]);if(ee!==ie){Bt=te,ue=ue||ee!==Ut(ht[te+1]);break}}return Bt===null?null:{index:Bt,multiple:ue}}function kt(xe,_e,Be){var et=we.useState(xe),at=(0,me.Z)(et,2),Qe=at[0],ht=at[1],Et=we.useState(null),Ut=(0,me.Z)(Et,2),Bt=Ut[0],ue=Ut[1];return we.useEffect(function(){var te=dt(Qe||[],xe||[],_e);(te==null?void 0:te.index)!==void 0&&(Be==null||Be(te.index),ue(xe[te.index])),ht(xe)},[xe]),[Bt]}var wt=fe(16089),xt=(typeof navigator=="undefined"?"undefined":(0,ct.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),gt=xt,yt=function(xe,_e,Be,et){var at=(0,we.useRef)(!1),Qe=(0,we.useRef)(null);function ht(){clearTimeout(Qe.current),at.current=!0,Qe.current=setTimeout(function(){at.current=!1},50)}var Et=(0,we.useRef)({top:xe,bottom:_e,left:Be,right:et});return Et.current.top=xe,Et.current.bottom=_e,Et.current.left=Be,Et.current.right=et,function(Ut,Bt){var ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=Ut?Bt<0&&Et.current.left||Bt>0&&Et.current.right:Bt<0&&Et.current.top||Bt>0&&Et.current.bottom;return ue&&te?(clearTimeout(Qe.current),at.current=!1):(!te||at.current)&&ht(),!at.current&&te}};function Xt(xe,_e,Be,et,at,Qe,ht){var Et=(0,we.useRef)(0),Ut=(0,we.useRef)(null),Bt=(0,we.useRef)(null),ue=(0,we.useRef)(!1),te=yt(_e,Be,et,at);function ee(mt,Dt){if(wt.Z.cancel(Ut.current),!te(!1,Dt)){var He=mt;if(!He._virtualHandled)He._virtualHandled=!0;else return;Et.current+=Dt,Bt.current=Dt,gt||He.preventDefault(),Ut.current=(0,wt.Z)(function(){var Ht=ue.current?10:1;ht(Et.current*Ht,!1),Et.current=0})}}function ie(mt,Dt){ht(Dt,!0),gt||mt.preventDefault()}var le=(0,we.useRef)(null),ne=(0,we.useRef)(null);function ye(mt){if(xe){wt.Z.cancel(ne.current),ne.current=(0,wt.Z)(function(){le.current=null},2);var Dt=mt.deltaX,He=mt.deltaY,Ht=mt.shiftKey,Rt=Dt,Ot=He;(le.current==="sx"||!le.current&&Ht&&He&&!Dt)&&(Rt=He,Ot=0,le.current="sx");var un=Math.abs(Rt),kn=Math.abs(Ot);le.current===null&&(le.current=Qe&&un>kn?"x":"y"),le.current==="y"?ee(mt,Ot):ie(mt,Rt)}}function bt(mt){xe&&(ue.current=mt.detail===Bt.current)}return[ye,bt]}function Re(xe,_e,Be,et){var at=we.useMemo(function(){return[new Map,[]]},[xe,Be.id,et]),Qe=(0,me.Z)(at,2),ht=Qe[0],Et=Qe[1],Ut=function(ue){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue,ee=ht.get(ue),ie=ht.get(te);if(ee===void 0||ie===void 0)for(var le=xe.length,ne=Et.length;ne<le;ne+=1){var ye,bt=xe[ne],mt=_e(bt);ht.set(mt,ne);var Dt=(ye=Be.get(mt))!==null&&ye!==void 0?ye:et;if(Et[ne]=(Et[ne-1]||0)+Dt,mt===ue&&(ee=ne),mt===te&&(ie=ne),ee!==void 0&&ie!==void 0)break}return{top:Et[ee-1]||0,bottom:Et[ie]}};return Ut}var Je=fe(67732),Ct=fe(83652),Ne=function(){function xe(){(0,Je.Z)(this,xe),(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,Ct.Z)(xe,[{key:"set",value:function(Be,et){this.diffRecords.set(Be,this.maps[Be]),this.maps[Be]=et,this.id+=1}},{key:"get",value:function(Be){return this.maps[Be]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),xe}(),$e=Ne;function Te(xe){var _e=parseFloat(xe);return isNaN(_e)?0:_e}function Ye(xe,_e,Be){var et=we.useState(0),at=(0,me.Z)(et,2),Qe=at[0],ht=at[1],Et=(0,we.useRef)(new Map),Ut=(0,we.useRef)(new $e),Bt=(0,we.useRef)(0);function ue(){Bt.current+=1}function te(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ue();var le=function(){var bt=!1;Et.current.forEach(function(mt,Dt){if(mt&&mt.offsetParent){var He=mt.offsetHeight,Ht=getComputedStyle(mt),Rt=Ht.marginTop,Ot=Ht.marginBottom,un=Te(Rt),kn=Te(Ot),cn=He+un+kn;Ut.current.get(Dt)!==cn&&(Ut.current.set(Dt,cn),bt=!0)}}),bt&&ht(function(mt){return mt+1})};if(ie)le();else{Bt.current+=1;var ne=Bt.current;Promise.resolve().then(function(){ne===Bt.current&&le()})}}function ee(ie,le){var ne=xe(ie),ye=Et.current.get(ne);le?(Et.current.set(ne,le),te()):Et.current.delete(ne),!ye!=!le&&(le?_e==null||_e(ie):Be==null||Be(ie))}return(0,we.useEffect)(function(){return ue},[]),[ee,te,Ut.current,Qe]}var Lt=14/15;function rt(xe,_e,Be){var et=(0,we.useRef)(!1),at=(0,we.useRef)(0),Qe=(0,we.useRef)(0),ht=(0,we.useRef)(null),Et=(0,we.useRef)(null),Ut,Bt=function(ie){if(et.current){var le=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ye=at.current-le,bt=Qe.current-ne,mt=Math.abs(ye)>Math.abs(bt);mt?at.current=le:Qe.current=ne;var Dt=Be(mt,mt?ye:bt,!1,ie);Dt&&ie.preventDefault(),clearInterval(Et.current),Dt&&(Et.current=setInterval(function(){mt?ye*=Lt:bt*=Lt;var He=Math.floor(mt?ye:bt);(!Be(mt,He,!0)||Math.abs(He)<=.1)&&clearInterval(Et.current)},16))}},ue=function(){et.current=!1,Ut()},te=function(ie){Ut(),ie.touches.length===1&&!et.current&&(et.current=!0,at.current=Math.ceil(ie.touches[0].pageX),Qe.current=Math.ceil(ie.touches[0].pageY),ht.current=ie.target,ht.current.addEventListener("touchmove",Bt,{passive:!1}),ht.current.addEventListener("touchend",ue,{passive:!0}))};Ut=function(){ht.current&&(ht.current.removeEventListener("touchmove",Bt),ht.current.removeEventListener("touchend",ue))},(0,Le.Z)(function(){return xe&&_e.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=_e.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),Ut(),clearInterval(Et.current)}},[xe])}function st(xe){return Math.floor(Math.pow(xe,.5))}function lt(xe,_e){var Be="touches"in xe?xe.touches[0]:xe;return Be[_e?"pageX":"pageY"]-window[_e?"scrollX":"scrollY"]}function pe(xe,_e,Be){we.useEffect(function(){var et=_e.current;if(xe&&et){var at=!1,Qe,ht,Et=function(){wt.Z.cancel(Qe)},Ut=function ee(){Et(),Qe=(0,wt.Z)(function(){Be(ht),ee()})},Bt=function(){at=!1,Et()},ue=function(ie){if(!(ie.target.draggable||ie.button!==0)){var le=ie;le._virtualHandled||(le._virtualHandled=!0,at=!0)}},te=function(ie){if(at){var le=lt(ie,!1),ne=et.getBoundingClientRect(),ye=ne.top,bt=ne.bottom;if(le<=ye){var mt=ye-le;ht=-st(mt),Ut()}else if(le>=bt){var Dt=le-bt;ht=st(Dt),Ut()}else Et()}};return et.addEventListener("mousedown",ue),et.ownerDocument.addEventListener("mouseup",Bt),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Bt),function(){et.removeEventListener("mousedown",ue),et.ownerDocument.removeEventListener("mouseup",Bt),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Bt),Et()}}},[xe])}var se=10;function Ce(xe,_e,Be,et,at,Qe,ht,Et){var Ut=we.useRef(),Bt=we.useState(null),ue=(0,me.Z)(Bt,2),te=ue[0],ee=ue[1];return(0,Le.Z)(function(){if(te&&te.times<se){if(!xe.current){ee(function(rr){return(0,Fe.Z)({},rr)});return}Qe();var ie=te.targetAlign,le=te.originAlign,ne=te.index,ye=te.offset,bt=xe.current.clientHeight,mt=!1,Dt=ie,He=null;if(bt){for(var Ht=ie||le,Rt=0,Ot=0,un=0,kn=Math.min(_e.length-1,ne),cn=0;cn<=kn;cn+=1){var wn=at(_e[cn]);Ot=Rt;var $n=Be.get(wn);un=Ot+($n===void 0?et:$n),Rt=un}for(var Hn=Ht==="top"?ye:bt-ye,mr=kn;mr>=0;mr-=1){var er=at(_e[mr]),ur=Be.get(er);if(ur===void 0){mt=!0;break}if(Hn-=ur,Hn<=0)break}switch(Ht){case"top":He=Ot-ye;break;case"bottom":He=un-bt+ye;break;default:{var nr=xe.current.scrollTop,Fn=nr+bt;Ot<nr?Dt="top":un>Fn&&(Dt="bottom")}}He!==null&&ht(He),He!==te.lastTop&&(mt=!0)}mt&&ee((0,Fe.Z)((0,Fe.Z)({},te),{},{times:te.times+1,targetAlign:Dt,lastTop:He}))}},[te,xe.current]),function(ie){if(ie==null){Et();return}if(wt.Z.cancel(Ut.current),typeof ie=="number")ht(ie);else if(ie&&(0,ct.Z)(ie)==="object"){var le,ne=ie.align;"index"in ie?le=ie.index:le=_e.findIndex(function(mt){return at(mt)===ie.key});var ye=ie.offset,bt=ye===void 0?0:ye;ee({times:0,index:le,offset:bt,originAlign:ne})}}}var je=we.forwardRef(function(xe,_e){var Be=xe.prefixCls,et=xe.rtl,at=xe.scrollOffset,Qe=xe.scrollRange,ht=xe.onStartMove,Et=xe.onStopMove,Ut=xe.onScroll,Bt=xe.horizontal,ue=xe.spinSize,te=xe.containerSize,ee=xe.style,ie=xe.thumbStyle,le=xe.showScrollBar,ne=we.useState(!1),ye=(0,me.Z)(ne,2),bt=ye[0],mt=ye[1],Dt=we.useState(null),He=(0,me.Z)(Dt,2),Ht=He[0],Rt=He[1],Ot=we.useState(null),un=(0,me.Z)(Ot,2),kn=un[0],cn=un[1],wn=!et,$n=we.useRef(),Hn=we.useRef(),mr=we.useState(le),er=(0,me.Z)(mr,2),ur=er[0],nr=er[1],Fn=we.useRef(),rr=function(){le===!0||le===!1||(clearTimeout(Fn.current),nr(!0),Fn.current=setTimeout(function(){nr(!1)},3e3))},cr=Qe-te||0,Bn=te-ue||0,Xn=we.useMemo(function(){if(at===0||cr===0)return 0;var hr=at/cr;return hr*Bn},[at,cr,Bn]),Kn=function(Zn){Zn.stopPropagation(),Zn.preventDefault()},xr=we.useRef({top:Xn,dragging:bt,pageY:Ht,startTop:kn});xr.current={top:Xn,dragging:bt,pageY:Ht,startTop:kn};var Kt=function(Zn){mt(!0),Rt(lt(Zn,Bt)),cn(xr.current.top),ht(),Zn.stopPropagation(),Zn.preventDefault()};we.useEffect(function(){var hr=function(Gt){Gt.preventDefault()},Zn=$n.current,Rn=Hn.current;return Zn.addEventListener("touchstart",hr,{passive:!1}),Rn.addEventListener("touchstart",Kt,{passive:!1}),function(){Zn.removeEventListener("touchstart",hr),Rn.removeEventListener("touchstart",Kt)}},[]);var pn=we.useRef();pn.current=cr;var En=we.useRef();En.current=Bn,we.useEffect(function(){if(bt){var hr,Zn=function(Gt){var pt=xr.current,qt=pt.dragging,Cn=pt.pageY,jn=pt.startTop;wt.Z.cancel(hr);var Pe=$n.current.getBoundingClientRect(),Oe=te/(Bt?Pe.width:Pe.height);if(qt){var Nt=(lt(Gt,Bt)-Cn)*Oe,Mt=jn;!wn&&Bt?Mt-=Nt:Mt+=Nt;var Ue=pn.current,At=En.current,Jt=At?Mt/At:0,tn=Math.ceil(Jt*Ue);tn=Math.max(tn,0),tn=Math.min(tn,Ue),hr=(0,wt.Z)(function(){Ut(tn,Bt)})}},Rn=function(){mt(!1),Et()};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),wt.Z.cancel(hr)}}},[bt]),we.useEffect(function(){return rr(),function(){clearTimeout(Fn.current)}},[at]),we.useImperativeHandle(_e,function(){return{delayHidden:rr}});var An="".concat(Be,"-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 Bt?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,Ze.Z)({height:"100%",width:ue},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:ue,top:Xn})),we.createElement("div",{ref:$n,className:Ke()(An,(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},"".concat(An,"-horizontal"),Bt),"".concat(An,"-vertical"),!Bt),"".concat(An,"-visible"),ur)),style:(0,Fe.Z)((0,Fe.Z)({},Jn),ee),onMouseDown:Kn,onMouseMove:rr},we.createElement("div",{ref:Hn,className:Ke()("".concat(An,"-thumb"),(0,Ze.Z)({},"".concat(An,"-thumb-moving"),bt)),style:(0,Fe.Z)((0,Fe.Z)({},tr),ie),onMouseDown:Kt}))}),tt=je,be=20;function Ge(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Be=xe/_e*xe;return isNaN(Be)&&(Be=0),Be=Math.max(Be,be),Math.floor(Be)}var ze=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],ft=[],it={overflowY:"auto",overflowAnchor:"none"};function ge(xe,_e){var Be=xe.prefixCls,et=Be===void 0?"rc-virtual-list":Be,at=xe.className,Qe=xe.height,ht=xe.itemHeight,Et=xe.fullHeight,Ut=Et===void 0?!0:Et,Bt=xe.style,ue=xe.data,te=xe.children,ee=xe.itemKey,ie=xe.virtual,le=xe.direction,ne=xe.scrollWidth,ye=xe.component,bt=ye===void 0?"div":ye,mt=xe.onScroll,Dt=xe.onVirtualScroll,He=xe.onVisibleChange,Ht=xe.innerProps,Rt=xe.extraRender,Ot=xe.styles,un=xe.showScrollBar,kn=un===void 0?"optional":un,cn=(0,qe.Z)(xe,ze),wn=we.useCallback(function(Wt){return typeof ee=="function"?ee(Wt):Wt==null?void 0:Wt[ee]},[ee]),$n=Ye(wn,null,null),Hn=(0,me.Z)($n,4),mr=Hn[0],er=Hn[1],ur=Hn[2],nr=Hn[3],Fn=!!(ie!==!1&&Qe&&ht),rr=we.useMemo(function(){return Object.values(ur.maps).reduce(function(Wt,Yt){return Wt+Yt},0)},[ur.id,ur.maps]),cr=Fn&&ue&&(Math.max(ht*ue.length,rr)>Qe||!!ne),Bn=le==="rtl",Xn=Ke()(et,(0,Ze.Z)({},"".concat(et,"-rtl"),Bn),at),Kn=ue||ft,xr=(0,we.useRef)(),Kt=(0,we.useRef)(),pn=(0,we.useRef)(),En=(0,we.useState)(0),An=(0,me.Z)(En,2),Jn=An[0],tr=An[1],hr=(0,we.useState)(0),Zn=(0,me.Z)(hr,2),Rn=Zn[0],dr=Zn[1],Gt=(0,we.useState)(!1),pt=(0,me.Z)(Gt,2),qt=pt[0],Cn=pt[1],jn=function(){Cn(!0)},Pe=function(){Cn(!1)},Oe={getKey:wn};function Nt(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 Mt=(0,we.useRef)({start:0,end:Kn.length}),Ue=(0,we.useRef)(),At=kt(Kn,wn),Jt=(0,me.Z)(At,1),tn=Jt[0];Ue.current=tn;var dn=we.useMemo(function(){if(!Fn)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,Vt=0;Vt<ar;Vt+=1){var _t=Kn[Vt],rn=wn(_t),ln=ur.get(rn),Mn=Yt+(ln===void 0?ht:ln);Mn>=Jn&&yn===void 0&&(yn=Vt,on=Yt),Mn>Jn+Qe&&Dn===void 0&&(Dn=Vt),Yt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(Qe/ht)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Yt,start:yn,end:Dn,offset:on}},[cr,Fn,Jn,Kn,nr,Qe]),Zt=dn.scrollHeight,$t=dn.start,Tt=dn.end,St=dn.offset;Mt.current.start=$t,Mt.current.end=Tt,we.useLayoutEffect(function(){var Wt=ur.getRecord();if(Wt.size===1){var Yt=Array.from(Wt.keys())[0],yn=Wt.get(Yt),on=Kn[$t];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Yt){var ar=ur.get(Yt),Vt=ar-ht;Nt(function(_t){return _t+Vt})}}}ur.resetRecord()},[Zt]);var en=we.useState({width:0,height:Qe}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],_n=function(Yt){xn({width:Yt.offsetWidth,height:Yt.offsetHeight})},Yn=(0,we.useRef)(),hn=(0,we.useRef)(),jt=we.useMemo(function(){return Ge(mn.width,ne)},[mn.width,ne]),gn=we.useMemo(function(){return Ge(mn.height,Zt)},[mn.height,Zt]),nn=Zt-Qe,Wn=(0,we.useRef)(nn);Wn.current=nn;function wr(Wt){var Yt=Wt;return Number.isNaN(Wn.current)||(Yt=Math.min(Yt,Wn.current)),Yt=Math.max(Yt,0),Yt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Rn<=0,Cr=Rn>=ne,ir=yt(Qn,Lr,Mr,Cr),Ir=function(){return{x:Bn?-Rn:Rn,y:Jn}},gr=(0,we.useRef)(Ir()),or=(0,he.zX)(function(Wt){if(Dt){var Yt=(0,Fe.Z)((0,Fe.Z)({},Ir()),Wt);(gr.current.x!==Yt.x||gr.current.y!==Yt.y)&&(Dt(Yt),gr.current=Yt)}});function Er(Wt,Yt){var yn=Wt;Yt?((0,vt.flushSync)(function(){dr(yn)}),or()):Nt(yn)}function Ar(Wt){var Yt=Wt.currentTarget.scrollTop;Yt!==Jn&&Nt(Yt),mt==null||mt(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,he.zX)(function(Wt,Yt){Yt?((0,vt.flushSync)(function(){dr(function(yn){var on=yn+(Bn?-Wt:Wt);return pr(on)})}),or()):Nt(function(yn){var on=yn+Wt;return on})}),Gn=Xt(Fn,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(Gn,2),Vr=Br[0],Jr=Br[1];rt(Fn,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){Nt(function(Yt){return Yt+Wt})}),(0,Le.Z)(function(){function Wt(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;Fn&&!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)}},[Fn,Qn,Lr]),(0,Le.Z)(function(){if(ne){var Wt=pr(Rn);dr(Wt),or({x:Wt})}},[mn.width,ne]);var Dr=function(){var Yt,yn;(Yt=Yn.current)===null||Yt===void 0||Yt.delayHidden(),(yn=hn.current)===null||yn===void 0||yn.delayHidden()},Wr=Ce(xr,Kn,ur,ht,wn,function(){return er(!0)},Nt,Dr);we.useImperativeHandle(_e,function(){return{nativeElement:pn.current,getScrollInfo:Ir,scrollTo:function(Yt){function yn(on){return on&&(0,ct.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Yt)?(Yt.left!==void 0&&dr(pr(Yt.left)),Wr(Yt.top)):Wr(Yt)}}}),(0,Le.Z)(function(){if(He){var Wt=Kn.slice($t,Tt+1);He(Wt,Kn)}},[$t,Tt,Kn]);var Nr=Re(Kn,wn,ur,ht),Zr=Rt==null?void 0:Rt({start:$t,end:Tt,virtual:cr,offsetX:Rn,offsetY:St,rtl:Bn,getSize:Nr}),ii=De(Kn,$t,Tt,ne,Rn,mr,te,Oe),Or=null;Qe&&(Or=(0,Fe.Z)((0,Ze.Z)({},Ut?"height":"maxHeight",Qe),it),Fn&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),qt&&(Or.pointerEvents="none")));var In={};return Bn&&(In.dir="rtl"),we.createElement("div",(0,oe.Z)({ref:pn,style:(0,Fe.Z)((0,Fe.Z)({},Bt),{},{position:"relative"}),className:Xn},In,cn),we.createElement(ke.Z,{onResize:_n},we.createElement(bt,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Ar,onMouseEnter:Dr},we.createElement(Ie,{prefixCls:et,height:Zt,offsetX:Rn,offsetY:St,scrollWidth:ne,onInnerResize:er,ref:Kt,innerProps:Ht,rtl:Bn,extra:Zr},ii))),cr&&Zt>Qe&&we.createElement(tt,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:Zt,rtl:Bn,onScroll:Er,onStartMove:jn,onStopMove:Pe,spinSize:gn,containerSize:mn.height,style:Ot==null?void 0:Ot.verticalScrollBar,thumbStyle:Ot==null?void 0:Ot.verticalScrollBarThumb,showScrollBar:kn}),cr&&ne>mn.width&&we.createElement(tt,{ref:hn,prefixCls:et,scrollOffset:Rn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:jn,onStopMove:Pe,spinSize:jt,containerSize:mn.width,horizontal:!0,style:Ot==null?void 0:Ot.horizontalScrollBar,thumbStyle:Ot==null?void 0:Ot.horizontalScrollBarThumb,showScrollBar:kn}))}var ve=we.forwardRef(ge);ve.displayName="List";var Ee=ve,Xe=Ee},93314:function(Ft){"use strict";Ft.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(Ft,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ke}});const oe=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,ct=(ke,he)=>(!he||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",Fe=(ke,he)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Le=getComputedStyle(ke,null);return ct(Le.overflowY,he)||ct(Le.overflowX,he)||(we=>{const vt=(Ve=>{if(!Ve.ownerDocument||!Ve.ownerDocument.defaultView)return null;try{return Ve.ownerDocument.defaultView.frameElement}catch(Ie){return null}})(we);return!!vt&&(vt.clientHeight<we.scrollHeight||vt.clientWidth<we.scrollWidth)})(ke)}return!1},Ze=(ke,he,Le,we,vt,Ve,Ie,We)=>Ve<ke&&Ie>he||Ve>ke&&Ie<he?0:Ve<=ke&&We<=Le||Ie>=he&&We>=Le?Ve-ke-we:Ie>he&&We<Le||Ve<ke&&We>Le?Ie-he+vt:0,me=ke=>{const he=ke.parentElement;return he==null?ke.getRootNode().host||null:he},qe=(ke,he)=>{var Le,we,vt,Ve;if(typeof document=="undefined")return[];const{scrollMode:Ie,block:We,inline:De,boundary:ut,skipOverflowHiddenElements:dt}=he,kt=typeof ut=="function"?ut:tt=>tt!==ut;if(!oe(ke))throw new TypeError("Invalid target");const wt=document.scrollingElement||document.documentElement,xt=[];let gt=ke;for(;oe(gt)&&kt(gt);){if(gt=me(gt),gt===wt){xt.push(gt);break}gt!=null&>===document.body&&Fe(gt)&&!Fe(document.documentElement)||gt!=null&&Fe(gt,dt)&&xt.push(gt)}const yt=(we=(Le=window.visualViewport)==null?void 0:Le.width)!=null?we:innerWidth,Xt=(Ve=(vt=window.visualViewport)==null?void 0:vt.height)!=null?Ve:innerHeight,{scrollX:Re,scrollY:Je}=window,{height:Ct,width:Ne,top:$e,right:Te,bottom:Ye,left:Lt}=ke.getBoundingClientRect(),{top:rt,right:st,bottom:lt,left:pe}=(tt=>{const be=window.getComputedStyle(tt);return{top:parseFloat(be.scrollMarginTop)||0,right:parseFloat(be.scrollMarginRight)||0,bottom:parseFloat(be.scrollMarginBottom)||0,left:parseFloat(be.scrollMarginLeft)||0}})(ke);let se=We==="start"||We==="nearest"?$e-rt:We==="end"?Ye+lt:$e+Ct/2-rt+lt,Ce=De==="center"?Lt+Ne/2-pe+st:De==="end"?Te+st:Lt-pe;const je=[];for(let tt=0;tt<xt.length;tt++){const be=xt[tt],{height:Ge,width:ze,top:ft,right:it,bottom:ge,left:ve}=be.getBoundingClientRect();if(Ie==="if-needed"&&$e>=0&&Lt>=0&&Ye<=Xt&&Te<=yt&&(be===wt&&!Fe(be)||$e>=ft&&Ye<=ge&&Lt>=ve&&Te<=it))return je;const Ee=getComputedStyle(be),Xe=parseInt(Ee.borderLeftWidth,10),xe=parseInt(Ee.borderTopWidth,10),_e=parseInt(Ee.borderRightWidth,10),Be=parseInt(Ee.borderBottomWidth,10);let et=0,at=0;const Qe="offsetWidth"in be?be.offsetWidth-be.clientWidth-Xe-_e:0,ht="offsetHeight"in be?be.offsetHeight-be.clientHeight-xe-Be:0,Et="offsetWidth"in be?be.offsetWidth===0?0:ze/be.offsetWidth:0,Ut="offsetHeight"in be?be.offsetHeight===0?0:Ge/be.offsetHeight:0;if(wt===be)et=We==="start"?se:We==="end"?se-Xt:We==="nearest"?Ze(Je,Je+Xt,Xt,xe,Be,Je+se,Je+se+Ct,Ct):se-Xt/2,at=De==="start"?Ce:De==="center"?Ce-yt/2:De==="end"?Ce-yt:Ze(Re,Re+yt,yt,Xe,_e,Re+Ce,Re+Ce+Ne,Ne),et=Math.max(0,et+Je),at=Math.max(0,at+Re);else{et=We==="start"?se-ft-xe:We==="end"?se-ge+Be+ht:We==="nearest"?Ze(ft,ge,Ge,xe,Be+ht,se,se+Ct,Ct):se-(ft+Ge/2)+ht/2,at=De==="start"?Ce-ve-Xe:De==="center"?Ce-(ve+ze/2)+Qe/2:De==="end"?Ce-it+_e+Qe:Ze(ve,it,ze,Xe,_e+Qe,Ce,Ce+Ne,Ne);const{scrollLeft:Bt,scrollTop:ue}=be;et=Ut===0?0:Math.max(0,Math.min(ue+et/Ut,be.scrollHeight-Ge/Ut+ht)),at=Et===0?0:Math.max(0,Math.min(Bt+at/Et,be.scrollWidth-ze/Et+Qe)),se+=ue-et,Ce+=Bt-at}je.push({el:be,top:et,left:at})}return je},Me=ke=>ke===!1?{block:"end",inline:"nearest"}:(he=>he===Object(he)&&Object.keys(he).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ke(ke,he){if(!ke.isConnected||!(vt=>{let Ve=vt;for(;Ve&&Ve.parentNode;){if(Ve.parentNode===document)return!0;Ve=Ve.parentNode instanceof ShadowRoot?Ve.parentNode.host:Ve.parentNode}return!1})(ke))return;const Le=(vt=>{const Ve=window.getComputedStyle(vt);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(ke);if((vt=>typeof vt=="object"&&typeof vt.behavior=="function")(he))return he.behavior(qe(ke,he));const we=typeof he=="boolean"||he==null?void 0:he.behavior;for(const{el:vt,top:Ve,left:Ie}of qe(ke,Me(he))){const We=Ve-Le.top+Le.bottom,De=Ie-Le.left+Le.right;vt.scroll({top:We,left:De,behavior:we})}}}}]);
|