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
636 KiB
1106 lines
636 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[6904],{45559:function(){"use strict"},42313:function(){"use strict"},96408:function(Tt,Rt){"use strict";Rt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},18573:function(){"use strict"},93510: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 Tt={},Rt="5.0",de={},se=null,it=!1,Fe=!1,Ie=null,me=!1,ye=null,Ae=null,ze=0;ze<arguments.length;ze++){var we=arguments[ze];if(we!==null)switch(typeof we){case"number":Rt=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Rt=we:Ie=we;break;case"object":typeof we.is3D!="undefined"?se=we:de=we;break;case"boolean":it=we,Fe=!0;break}}se===null&&(se={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},de.material_id!==void 0&&!Fe&&(it=!0)),Ie!==null&&de.id===void 0&&(de.id=Ie);var fe="",Je="",ve=!1,ot=null,Ne=null,Te=null,Me=!1,Ee=null,qe=null,at=null,ct=null,lt=null;de.height!==void 0&&(de.height=Math.round(de.height)),de.width!==void 0&&(de.width=Math.round(de.width));var Qe=function(xe){return parseFloat(xe)>4?parseFloat(xe):5};Tt.setHTML5Codebase=function(xe,Ge){Ae=xe,We(xe,Ge)},Tt.setJavaCodebase=Tt.setJavaCodebaseVersion=Tt.isCompiledInstalled=Tt.setPreCompiledScriptPath=Tt.setPreCompiledResourcePath=function(){},Tt.setHTML5CodebaseVersion=function(xe,Ge){var Ce=parseFloat(xe);if(Ce!==NaN&&Ce<5){console.log("The GeoGebra HTML5 codebase version "+Ce+" is deprecated. Using version latest instead.");return}ye=xe,ce(xe,Ge)},Tt.getHTML5CodebaseVersion=function(){return Ne},Tt.getParameters=function(){return de},Tt.setFontsCSSURL=function(xe){ct=xe},Tt.setGiacJSURL=function(xe){},Tt.setJNLPFile=function(xe){fe=xe},Tt.setJNLPBaseDir=function(xe){},Tt.inject=function(){function xe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ge="auto",Ce=de.id,Xe,He=!1,ht=0;ht<arguments.length;ht++){var Le=arguments[ht];typeof Le=="string"?(Le=Le.toLowerCase(),Le.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ge=Le:Ce=arguments[ht]):typeof Le=="boolean"?He=Le:Le instanceof HTMLElement&&(Xe=Le)}nt();function nt(){if(!me){setTimeout(nt,200);return}Ge=dt(Ge);var ft=Xe||document.getElementById(Ce);if(!ft){console.log("possibly bug on ajax loading? ");return}if(Tt.removeExistingApplet(ft,!1),de.width===void 0&&ft.clientWidth&&(de.width=ft.clientWidth),de.height===void 0&&ft.clientHeight&&(de.height=ft.clientHeight),!(de.width&&de.height)&&Ge==="html5"&&(delete de.width,delete de.height),ot=Ge,Ge==="screenshot")De(ft,de);else{var oe=!1;de.hasOwnProperty("playButton")&&de.playButton||de.hasOwnProperty("clickToLoad")&&de.clickToLoad?oe=!0:de.hasOwnProperty("playButtonAutoDecide")&&de.playButtonAutoDecide&&(oe=(!et()||xe())&&ut()),oe?(ot="screenshot",Bt(ft,de,He,Ge)):Ze(ft,de,He)}}};function et(){try{return window.self!==window.top}catch(xe){return!0}}function ut(){return de.hasOwnProperty("screenshotGenerator")&&de.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Tt.getViews=function(){return se},Tt.isJavaInstalled=function(){return!1};var Zt=function(xe){var Ge=function(ht){var Le=JSON.parse(ht),nt=function(ee){return ee.type=="G"||ee.type=="E"},ft=Le.elements?Le.elements.filter(nt)[0]:Le;if(!ft||!ft.url){Ce();return}de.fileName=ft.url,Ye(ft.settings||{}),se.is3D=!0;var oe="https://www.geogebra.org/images/";Tt.setPreviewImage(Ee||ft.previewUrl,oe+"GeoGebra_loading.png",oe+"applet_play.png"),xe()},Ce=function(){de.onError&&de.onError(),pt("Error: Fetching material (id "+de.material_id+") failed.",de)},Xe=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",He="/materials/"+de.material_id+"?scope=basic";Ve("https://"+Xe+"/api/proxy.php?path="+encodeURIComponent(He),Ge,Ce)};function Ye(xe){var Ge=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ce){xe[Ce]=!!xe[Ce]}),Ge.forEach(function(Ce){de[Ce]===void 0&&xe[Ce]!==void 0&&(de[Ce]=xe[Ce])}),de.showToolBarHelp===void 0&&(de.showToolBarHelp=de.showToolBar)}function Ve(xe,Ge,Ce){var Xe=new XMLHttpRequest;Xe.open("GET",xe),Xe.onload=function(){Ge(Xe.responseText)},Xe.onerror=Ce,Xe.send()}Tt.isHTML5Installed=function(){return!0},Tt.getLoadedAppletType=function(){return ot},Tt.setPreviewImage=function(xe,Ge,Ce){Ee=xe,qe=Ge,at=Ce},Tt.removeExistingApplet=function(xe,Ge){var Ce;typeof xe=="string"&&(xe=document.getElementById(xe)),ot=null;var Xe=null;for(Ce=0;Ce<xe.childNodes.length;Ce++){var He=xe.childNodes[Ce],ht=He.className;ht==="applet_screenshot"?Ge?(He.style.display="block",ot="screenshot"):He.style.display="none":ht!=="applet_scaler prerender"&&(xe.removeChild(He),Xe=ht&&ht.indexOf("appletParameters")!=-1?He.id:null,Ce--)}var Le=de.id!==void 0?de.id:Xe,nt=window[Le];nt&&typeof nt.getBase64=="function"&&(nt.remove(),window[Le]=null)},Tt.refreshHitPoints=function(){if(Qe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var xe=Tt.getAppletObject();return xe&&typeof xe.recalculateEnvironments=="function"?(xe.recalculateEnvironments(),!0):!1},Tt.startAnimation=function(){var xe=Tt.getAppletObject();return xe&&typeof xe.startAnimation=="function"?(xe.startAnimation(),!0):!1},Tt.stopAnimation=function(){var xe=Tt.getAppletObject();return xe&&typeof xe.stopAnimation=="function"?(xe.stopAnimation(),!0):!1},Tt.getAppletObject=function(){var xe=de.id!==void 0?de.id:"ggbApplet";return window[xe]},Tt.resize=function(){};var gt=function(xe,Ge,Ce){var Xe=document.createElement("param");Xe.setAttribute("name",Ge),Xe.setAttribute("value",Ce),xe.appendChild(Xe)},Be=function(xe){return xe&&xe!=="false"},Ze=function(xe,Ge,Ce){Qe(Ne)<=4.2&&(Ce=!0);var Xe=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ne||ggbHTML5LoadedCodebaseIsWebSimple&&!Me)&&(Xe=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var He=document.createElement("div");He.classList.add("appletParameters","notranslate");var ht=Ge.width,Le=Ge.height;if(Ge.disableAutoScale=Ge.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ge.disableAutoScale,Ge.width!==void 0)if(Qe(Ne)<=4.4)Be(Ge.showToolBar)&&(Ge.height-=7),Be(Ge.showAlgebraInput)&&(Ge.height-=37),Ge.width<605&&Be(Ge.showToolBar)&&(Ge.width=605,ht=605);else{var nt=100;(Be(Ge.showToolBar)||Be(Ge.showMenuBar))&&(Ge.hasOwnProperty("customToolBar")&&(Ge.customToolbar=Ge.customToolBar),nt=Be(Ge.showMenuBar)?245:155),ht<nt&&(Ge.width=nt,ht=nt)}He.style.border="none",He.style.display="inline-block";for(var ft in Ge)Ge.hasOwnProperty(ft)&&ft!=="appletOnLoad"&&He.setAttribute("data-param-"+ft,Ge[ft]);ct&&He.setAttribute("data-param-fontscssurl",ct),Tt.resize=function(){GGBAppletUtils.responsiveResize(xe,Ge)},window.addEventListener("resize",function(It){Tt.resize()});var oe=typeof Ge.appletOnLoad=="function"?Ge.appletOnLoad:function(){};if(!Ce&&Ge.width!==void 0){Ge.hasOwnProperty("showSplash")||He.setAttribute("data-param-showSplash","false");var ee=xe.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var re=ee.querySelector(".ggb_preview");else{var re=Et(ht,Le,Ge.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=ht+"px",ee.style.height=Le+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),Qe(Ne)>=5?(Ge.appletOnLoad=function(It){var Ot=xe.querySelector(".ggb_preview");Ot&&Ot.parentNode.removeChild(Ot),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),oe(It)},z||ee.appendChild(re)):He.appendChild(re),ee.appendChild(He),z||xe.appendChild(ee),setTimeout(function(){Tt.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(He),xe.appendChild(le),Ge.appletOnLoad=function(It){Tt.resize(),oe(It)}}function ne(It,Ot){Ot&&typeof Ot.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(It,Ot.appletOnLoad):renderGGBElement(It),pt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ot)}function ge(It,Ot){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:It,params:Ot}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Xt){ne(Xt.article,Xt.params)}),html5AppletsToProcess=null)},Qe(Ne)<5&&(It.className+=" geogebraweb")):ne(It,Ot)}if(Xe){scriptLoadStarted=!0;for(var Re=0;Re<He.childNodes.length;Re++){var Dt=He.childNodes[Re].tagName;Dt==="TABLE"&&(He.removeChild(He.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var kt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');kt!=null&&kt.parentNode.removeChild(kt)}var vt=document.createElement("script"),Ct=function(){ge(He,Ge)};vt.src=Je+Te,ggbHTML5LoadedCodebaseIsWebSimple=Me,ggbHTML5LoadedCodebaseVersion=Ne,ggbHTML5LoadedScript=vt.src,pt("GeoGebra HTML5 codebase loaded: '"+Je+"'.",Ge),!Ae&&(!ye||ye=="5.0")?(Me?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ct()):Je.requirejs?__webpack_require__.e(3861).then(function(){var It=[__webpack_require__(40341)];Ct.apply(null,It)}.bind(this)).catch(__webpack_require__.oe):(vt.onload=Ct,xe.appendChild(vt))}else ge(He,Ge);Ge.height=Le,Ge.width=ht},De=function(xe,Ge,Ce){var Xe=Et(Ge.width,Ge.height,Ge.borderColor,Ce),He=document.createElement("div");He.style.position="relative",He.style.display="block",He.style.width=Ge.width+"px",He.style.height=Ge.height+"px",He.className="applet_screenshot applet_scaler"+(Ce?" applet_screenshot_play":""),He.appendChild(Xe);var ht=GGBAppletUtils.getScale(Ge,xe,Ce);Ce?(xe.appendChild(mt()),window.GGBT_wsf_view||(xe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(He,"66%"),xe.appendChild(He),ht!==1&&!isNaN(ht)&&(GGBAppletUtils.scaleElement(He,ht),He.style.width=Ge.width+"px",He.style.height=Ge.height+"px",He.parentNode.style.width=Ge.width*ht+"px",He.parentNode.style.height=Ge.height*ht+"px"),Tt.resize=function(){_e(xe,Xe,He,Ce)},window.addEventListener("resize",function(Le){Tt.resize()}),Tt.resize()};function _e(xe,Ge,Ce,Xe){if(xe.contains(Ge)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}var He=GGBAppletUtils.getScale(de,xe,Xe);Ce.parentNode!==null&&(!isNaN(He)&&He!==1?(GGBAppletUtils.scaleElement(Ce,He),Ce.parentNode.style.width=de.width*He+"px",Ce.parentNode.style.height=de.height*He+"px"):(GGBAppletUtils.scaleElement(Ce,1),Ce.parentNode.style.width=de.width+"px",Ce.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(xe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Tt.onExitFullscreen=function(xe,Ge){Ge.appendChild(xe)};var Bt=function(xe,Ge,Ce,Xe){De(xe,Ge,!0);for(var He=function(){var nt=[];for(Le=0;Le<xe.childNodes.length;Le++)nt.push(xe.childNodes[Le]);if(window.GGBT_wsf_view){var ft=window.GGBT_wsf_view.renderFullScreen(xe,Ge.id),oe=document.getElementById("fullscreencontainer"),ee=jQuery(xe).find(".fullscreencontent");ee.length>0?(ft.remove(),ee.attr("id","fullscreencontent").show(),jQuery(oe).append(ee),window.dispatchEvent(new Event("resize"))):Ze(ft,Ge,!1),window.GGBT_wsf_view.launchFullScreen(oe)}else ot=Xe,Ze(xe,Ge,!1);if(!window.GGBT_wsf_view)for(Le=0;Le<nt.length;Le++)xe.removeChild(nt[Le])},ht=xe.getElementsByClassName("ggb_preview_play"),Le=0;Le<ht.length;Le++)ht[Le].addEventListener("click",He,!1),ht[Le].addEventListener("ontouchstart",He,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(xe),ut()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},mt=function(){var xe=document.createElement("div");if(xe.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");}',Ce=document.createElement("style");Ce.styleSheet?Ce.styleSheet.cssText=Ge:Ce.appendChild(document.createTextNode(Ge)),document.getElementsByTagName("head")[0].appendChild(Ce)}return xe},Et=function(xe,Ge,Ce,Xe){var He=document.createElement("div");He.className="ggb_preview",He.style.position="absolute",He.style.zIndex="90",He.style.width=xe-2+"px",He.style.height=Ge-2+"px",He.style.top="0px",He.style.left="0px",He.style.overflow="hidden",He.style.backgroundColor="white";var ht="lightgrey";Ce!==void 0&&(Ce==="none"?ht="transparent":ht=Ce),He.style.border="1px solid "+ht;var Le=document.createElement("img");if(Le.style.position="relative",Le.style.zIndex="1000",Le.style.top="-1px",Le.style.left="-1px",Ee!==null&&Le.setAttribute("src",Ee),Le.style.opacity=.7,qe!==null){var nt,ft,oe;if(!Xe){nt=document.createElement("img"),nt.style.position="absolute",nt.style.zIndex="1001",nt.style.opacity=1,Le.style.opacity=.3,ft=360,ft>xe/4*3&&(ft=xe/4*3),oe=ft/5.8,nt.setAttribute("src",qe),nt.setAttribute("width",ft),nt.setAttribute("height",oe);var ee=(xe-ft)/2,z=(Ge-oe)/2;nt.style.left=ee+"px",nt.style.top=z+"px",He.appendChild(nt)}}return He.appendChild(Le),He},dt=function(xe){return xe=xe.toLowerCase(),xe==="html5"||xe==="screenshot"?xe:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(xe,Ge){if(Ne=xe,Ge){We(Ne,!0);return}var Ce=!it;if(Ce){var Xe=Qe(Ne);!isNaN(Xe)&&Xe<4.4&&(Ce=!1)}var He,ht;window.location.protocol.substr(0,4)==="http"?He=window.location.protocol:He="http:";var Le=Ne.indexOf("//");Le>0?ht=Ne:Le===0?ht=He+Ne:ht="https://www.geogebra.org/apps/5.2.814.0/";for(var nt in pe)if(Ne.slice(pe[nt].length*-1)===pe[nt]||Ne.slice((pe[nt].length+1)*-1)===pe[nt]+"/"){We(ht,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ce&&!se.is3D&&!se.AV&&!se.SV&&!se.CV&&!se.EV2&&!se.CP&&!se.PC&&!se.DA&&!se.FI&&!se.PV&&!Be(de.showToolBar)&&!Be(de.showMenuBar)&&!Be(de.showAlgebraInput)&&!Be(de.enableRightClick)&&(!de.appName||de.appName=="classic")?ht+="webSimple/":ht+="web3d/",We(ht,!1)},We=function(xe,Ge){if(xe.requirejs){Je=xe;return}xe.slice(-1)!=="/"&&(xe+="/"),Je=xe,Ge===null&&(Ge=xe.indexOf("http")===-1),ve=Ge,Te="web.nocache.js",Me=!1;var Ce=Je.split("/");Ce.length>1&&(!Ge&&Ce[Ce.length-2]==="webSimple"?(Te="webSimple.nocache.js",Me=!0):pe.indexOf(Ce[Ce.length-2])>=0&&(Te=Ce[Ce.length-2]+".nocache.js")),Ce=xe.split("/"),Ne=Ce[Ce.length-3],Ne.substr(0,4)==="test"?Ne=Ne.substr(4,1)+"."+Ne.substr(5,1):(Ne.substr(0,3)==="war"||Ne.substr(0,4)==="beta")&&(Ne="5.0");var Xe=parseFloat(Ne);Xe!==NaN&&Xe<5&&xe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Xe+" is deprecated. Using version latest instead."),ce("5.0",Ge))},pt=function(xe,Ge){window.console&&window.console.log&&(!Ge||typeof Ge.showLogging=="undefined"||Ge.showLogging&&Ge.showLogging!=="false")&&console.log(xe)};de.material_id!==void 0?Zt(st):st();function st(){var xe=Rt;ye!==null?xe=ye:parseFloat(xe)<5&&(xe="5.0"),ce(xe,!1),Ae!==null&&We(Ae,ve),me=!0}return Tt},GGBAppletUtils=function(){"use strict";function Tt(){return window.GGBT_wsf_edit!==void 0}function Rt(me,ye){ye!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+ye+","+ye+")",me.style.webkitTransform="scale("+ye+","+ye+")",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 de(me,ye,Ae,ze,we,fe){var Je=null;if(fe!=null&&fe!="")for(var ve=me.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+fe+" ")>-1){Je=ve;break}else ve=ve.parentNode;var ot=0,Ne=0,Te=0,Me=0,Ee=0,qe=0,at=0;if(Je)ot=Je.offsetWidth,Ne=Math.max(ze?Je.offsetWidth:0,Je.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ot=Math.min(window.innerWidth,document.documentElement.clientWidth),Ne=Math.min(window.innerHeight,document.documentElement.clientHeight),Te=ot):(ot=window.innerWidth,Ne=window.innerHeight,Te=window.innerWidth),me){var ct=me.getBoundingClientRect();ct.left>0&&ct.left<=ot&&(we===void 0||!we)&&(document.dir==="rtl"?(Ee=ot-ct.width-ct.left,qe=Te<=480?10:30):(qe=ct.left,Ee=Te<=480?10:30),Me=qe+Ee)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var lt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me=40,at=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Me=0,at=40)}}return me&&((Ae===void 0||!Ae)&&ye>0&&ye+Me<ot?ot=ye:ot-=Me,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ae===void 0||!Ae)&&(Ne-=at)),{width:ot,height:Ne}}function se(me,ye,Ae,ze,we){if(me.isScreenshoGenerator)return 1;var fe=ze!==void 0&&ze,Je=me.noScaleMargin!=null&&me.noScaleMargin,ve=function(lt){return lt&<!=="false"},ot=ve(me.autoHeight),Ne=de(ye,me.width,Ae,ot,fe&&window.GGBT_wsf_view||Je,we),Te=parseInt(Ne.width),Me=me.width,Ee=me.height;if(Me===void 0){var qe=ye.querySelector(".appletParameters");qe&&(Me=qe.offsetWidth,Ee=qe.offsetHeight)}var at=Te/Me,ct=fe?1:Ne.height/Ee;return Ae!==void 0&&!Ae&&(at=Math.min(1,at),ct=Math.min(1,ct)),Math.min(at,ct)}function it(me,ye,Ae){var ze=1,we,fe=!1;if(me.hasOwnProperty("allowUpscale")&&(fe=me.allowUpscale),me.hasOwnProperty("scale")&&(ze=parseFloat(me.scale),(isNaN(ze)||ze===null||ze===0)&&(ze=1),ze>1&&(fe=!0)),ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))we=se(me,ye,fe,Ae,me.scaleContainerClass);else return ze;return fe&&(!me.hasOwnProperty("scale")||ze===1)?we:Math.min(ze,we)}function Fe(me){var ye=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),ze=me.getBoundingClientRect(),we=(ye-ze.width)/2,fe=(Ae-ze.height)/2;fe<0&&(fe=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?me.style.left="40px":me.style.left=we+"px",me.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?me.style.top="40px":me.style.top=fe+"px",me.style.left=we+"px")}function Ie(me,ye){var Ae=me.querySelector(".appletParameters");if(Ae){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ye.id!==Ae.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Ae.parentElement&&/fullscreen/.test(Ae.parentElement.className))return;var ze=it(ye,me);Tt()&&Ae.setAttribute("data-param-scale",ze);for(var we=null,fe=0;fe<me.childNodes.length;fe++)if(me.childNodes[fe].className!==void 0&&me.childNodes[fe].className.match(/^applet_scaler/)){we=me.childNodes[fe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Je=ye.id!==void 0?ye.id:"ggbApplet",ve=window[Je];(ve==null||!ve.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(ze)&&ze!==1?(we.parentNode.style.width=ye.width*ze+"px",we.parentNode.style.height=ye.height*ze+"px",Rt(we,ze)):(Rt(we,1),we.parentNode.style.width=ye.width+"px",we.parentNode.style.height=ye.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($(Ae).parents(".content-added-content"))}}return{responsiveResize:Ie,isFlexibleWorksheetEditor:Tt,positionCenter:Fe,getScale:it,scaleElement:Rt}}();__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 Tt=n.location.search;return Tt.indexOf(J)!=-1||Tt.indexOf(K)!=-1}function q(Tt,Rt){}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(Tt){var Rt=s[L].bindings;s[L].bindings=function(){for(var de=Rt?Rt():{},se=Tt[webModule.__softPermutationId],it=O;it<se.length;it++){var Fe=se[it];de[Fe[O]]=Fe[P]}return de}};var t;function u(){return v(),t}function v(){if(!t){var Tt=o.createElement(Q);if(Tt.id=L,Tt.style.cssText=R+S,Tt.tabIndex=-1,o.body.appendChild(Tt),t=Tt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Rt=document.compatMode==U?V:W;t.write(Rt+X),t.close()}}}function w(Tt){function Rt(se){function it(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=it();if(Fe){se();return}function Ie(){if(!Fe){if(!it())return;Fe=!0,se(),o.removeEventListener&&o.removeEventListener(Z,Ie,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,Ie,!1);var me=setInterval(function(){Ie()},$)}function de(se){var it=u(),Fe=it.body,Ie=it.createElement(_);Ie.language=ab,Ie.crossOrigin=W,Ie.src=se,webModule.__errFn&&(Ie.onerror=function(){webModule.__errFn(L,new Error(bb+se))}),Fe.appendChild(Ie)}Rt(function(){de(Tt)})}webModule.__startLoadingFragment=function(Tt){return C(Tt)},webModule.__installRunAsyncCode=function(Tt){var Rt=u(),de=Rt.body,se=Rt.createElement(_);se.language=ab,se.text=Tt,de.appendChild(se),de.removeChild(se)};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(Tt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Tt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Tt){var Rt=c[Tt];return Rt==null?null:Rt},r=d,webModule.__errFn=e}function B(){function Tt(me){var ye=me.lastIndexOf(rb);ye==-1&&(ye=me.length);var Ae=me.indexOf(sb);Ae==-1&&(Ae=me.length);var ze=me.lastIndexOf(tb,Math.min(Ae,ye));return ze>=O?me.substring(O,ze+P):W}function Rt(me){if(!me.match(/^\w+:\/\//)){var ye=o.createElement(ub);ye.src=me+vb,me=Tt(ye.src)}return me}function de(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function se(){for(var me=o.getElementsByTagName(_),ye=O;ye<me.length;++ye)if(me[ye].src.indexOf(xb)!=-1)return Tt(me[ye].src);return W}function it(){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 Ie=de();return Ie==W&&(Ie=se()),Ie==W&&(Ie=it()),Ie==W&&Fe()&&(Ie=Tt(o.location.href)),Ie=Rt(Ie),Ie}function C(Tt){return Tt.match(/^\//)||Tt.match(/^[a-zA-Z]+:\/\//)?Tt:webModule.__moduleBase+Tt}function D(){var Tt=[],Rt=O,de=[],se=[];function it(me){var ye=se[me](),Ae=de[me];if(ye in Ae)return ye;var ze=[];for(var we in Ae)ze[Ae[we]]=we;throw r&&r(me,ze,ye),null}if(__gwt_isKnownPropertyValue=function(me,ye){return ye in de[me]},webModule.__getPropMap=function(){var me={};for(var ye in de)de.hasOwnProperty(ye)&&(me[ye]=it(ye));return me},webModule.__computePropValue=it,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var Ie=Fe.indexOf(Db);Ie!=-1&&(Rt=parseInt(Fe.substring(Ie+P),$),Fe=Fe.substring(O,Ie))}catch(me){}return webModule.__softPermutationId=Rt,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})()},28735:function(Tt,Rt,de){"use strict";de.d(Rt,{Ax:function(){return Ie},Ds:function(){return me},KI:function(){return Ae},SI:function(){return Fe},f1:function(){return it}});var se=de(74128);function it(ze){let we=!0;if(ze.length>0){for(let fe=0;fe<ze.length;fe++)if(ze[fe].compile_success==0||!ze[fe].compile_success){we=!1;break}}else we=!1;return we}function Fe(ze,we=""){let fe=[];for(let Je=0;Je<ze.length;Je++){let ve=ze[Je],ot=we?`${we}/${ve.name}`:`${ve.name}`;fe.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:ot})}return fe}function Ie(ze,we,fe){for(let Je=0;Je<ze.length;Je++){let ve=ze[Je];if(ve.key===we){ve.children=fe;break}ve.children&&Ie(ve.children,we,fe)}return ze}function me(ze,we,fe){let Je;return function(){let ve=this,ot=arguments,Ne=function(){Je=null,fe||ze.apply(ve,ot)},Te=fe&&!Je;clearTimeout(Je),Je=setTimeout(Ne,we),Te&&ze.apply(ve,ot)}}const ye=!0,Ae=se.Z.API_SERVER},16750:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return Je}});var se=de(59301),it={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=de(92310),Ie=de.n(Fe),me=de(29787),ye=de(2859),Ae=de(38147),ze=de(65862),we=(ve,ot,Ne)=>new Promise((Te,Me)=>{var Ee=ct=>{try{at(Ne.next(ct))}catch(lt){Me(lt)}},qe=ct=>{try{at(Ne.throw(ct))}catch(lt){Me(lt)}},at=ct=>ct.done?Te(ct.value):Promise.resolve(ct.value).then(Ee,qe);at((Ne=Ne.apply(ve,ot)).next())}),Je=({data:ve,className:ot,fullWidth:Ne,style:Te={},onClose:Me,onOk:Ee,showFullTools:qe,noAssociationId:at})=>{const ct=(0,se.useRef)(null),lt=(0,se.useRef)(null),Qe=(0,se.useRef)(null),et=(0,se.useRef)(null),[ut,Zt]=(0,se.useState)(!1),[Ye,Ve]=(0,se.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,se.useEffect)(()=>(Qe.current||(Qe.current=document.createElement("style"),document.head.appendChild(Qe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),Qe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&>()):(document.body.removeAttribute("data-custom"),Qe.current&&(document.head.removeChild(Qe.current),Qe.current=null)),()=>{document.body.removeAttribute("data-custom"),Qe.current&&(document.head.removeChild(Qe.current),Qe.current=null)}),[ve==null?void 0:ve.visible]);const gt=()=>we(void 0,null,function*(){Zt(!0),Ve("\u6B63\u5728\u52A0\u8F7D\u4E2D");const _e=yield(0,ze.ZJ)(ve==null?void 0:ve.src);ct.current.src="",ct.current.src=_e,ct.current.onload=function(){De()},Zt(!1),Ve("")}),Be=_e=>we(void 0,null,function*(){Zt(!0),Ve("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Bt=yield(0,Ae.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:_e.dataUrl}});Bt!=null&&Bt.id&&!at?(yield(0,Ae.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:Bt==null?void 0:Bt.id,settings:JSON.stringify(_e.state)}})).status===0&&Ee():Bt!=null&&Bt.id&&Ee(Bt),Zt(!1),Ve("")}),Ze=()=>{const _e=document.querySelector('a[href="https://markerjs.com/"]');_e&&_e.parentNode&&(_e.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(mt=>{const Et=document.querySelector(mt.name);Et&&Et.setAttribute("title",mt.title)})},De=()=>{lt.current=new ye.hP(ct.current),lt.current.targetRoot=et.current,lt.current.addEventListener("render",Be),lt.current.addEventListener("beforeclose",Me),qe&&(lt.current.availableMarkerTypes=lt.current.ALL_MARKER_TYPES,lt.current.uiStyleSettings.redoButtonVisible=!0,lt.current.uiStyleSettings.notesButtonVisible=!0,lt.current.uiStyleSettings.zoomButtonVisible=!0,lt.current.uiStyleSettings.zoomOutButtonVisible=!0,lt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=lt.current.uiStyleSettings,lt.current.show(),ve!=null&&ve.snapshotData&<.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ze()},300)};return se.createElement(se.Fragment,null,(ve==null?void 0:ve.visible)&&se.createElement(me.Z,{spinning:ut,tip:Ye,style:{position:"absolute",width:"100vw"}},se.createElement("div",{ref:et,className:Ie()(it.imageDimensions,ot,Ne?it.fullWidth:""),style:Te},se.createElement("img",{className:it.img,ref:ct}))))}},99298:function(Tt,Rt,de){"use strict";var se=de(59301),it=de(77019),Fe=de(5269),Ie=de(20554),me=de(99571),ye=de(95097),Ae=de(96408),ze=de(48136),we=de(59301);const fe=(0,se.forwardRef)(({callback:Je,showSaveButton:ve,value:ot=""},Ne)=>{const Te=(0,se.useRef)(),Me=[{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 "}]}]}],Ee=[{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}`}]}]}],qe=lt=>{Te.current.setValue(Te.current.getValue()+" "+lt.value+" ")},at=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(it.Z,{className:Ae.Z.lists,gutter:[10,10]},Me.map((lt,Qe)=>we.createElement(Fe.Z,{flex:"110px",className:Ae.Z.item},we.createElement("div",null,we.createElement(ye.Z,{value:`$$${lt.value}$$`}),lt.name),we.createElement("div",{className:Ae.Z.children},lt.children.map((et,ut)=>we.createElement("div",{key:ut},we.createElement("h1",null,et.name),we.createElement(it.Z,{gutter:[10,10]},et.data.map((Zt,Ye)=>we.createElement(Fe.Z,{key:Ye,onClick:()=>qe(Zt),className:Ae.Z.diamond},we.createElement(ye.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(it.Z,{className:Ae.Z.lists,gutter:[10,10]},Ee.map((lt,Qe)=>we.createElement(Fe.Z,{flex:"110px",className:Ae.Z.item},we.createElement("div",null,we.createElement(ye.Z,{value:"`$$"+lt.value+"$$`"}),lt.name),we.createElement("div",{className:Ae.Z.children},lt.children.map((et,ut)=>we.createElement("div",{key:ut},et.name&&we.createElement("h1",null,et.name),we.createElement(it.Z,{gutter:[10,10]},et.data.map((Zt,Ye)=>we.createElement(Fe.Z,{key:Ye,onClick:()=>qe(Zt),className:Ae.Z.diamond},we.createElement(ye.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],ct=()=>{var lt=document.createElement("div");lt.innerHTML=Te.current.getValue();var Qe=lt.innerText;return Je&&Je(Qe),Qe};return(0,se.useImperativeHandle)(Ne,()=>({getData:ct})),we.createElement("div",{className:Ae.Z.mathWrap},we.createElement(Ie.default,{defaultActiveKey:"1",items:at}),we.createElement("math-field",{locale:"zh_cn",className:Ae.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Te,style:{width:800,marginTop:30,fontSize:18}},ot||""),ve&&we.createElement("div",{className:Ae.Z.button},we.createElement(me.ZP,{size:"large",onClick:ct,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Rt.Z=fe},2524:function(Tt,Rt,de){"use strict";var se=de(59301),it=de(93314),Fe=de(99571),Ie=Object.defineProperty,me=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(Ne,Te,Me)=>Te in Ne?Ie(Ne,Te,{enumerable:!0,configurable:!0,writable:!0,value:Me}):Ne[Te]=Me,Je=(Ne,Te)=>{for(var Me in Te||(Te={}))ze.call(Te,Me)&&fe(Ne,Me,Te[Me]);if(Ae)for(var Me of Ae(Te))we.call(Te,Me)&&fe(Ne,Me,Te[Me]);return Ne},ve=(Ne,Te)=>me(Ne,ye(Te));const ot=({img:Ne,buttonProps:Te={},styles:Me={},customText:Ee,ButtonText:qe,ButtonClick:at,Buttonclass:ct,ButtonTwo:lt,imgStyles:Qe,loading:et=!1,className:ut=""})=>se.createElement("section",{className:`tc animated fadeIn ${ut}`,style:Je({color:"#999",margin:"100px auto",visibility:et?"hidden":"visible"},Me)},se.createElement("img",{src:Ne||it,style:ve(Je({},Qe),{pointerEvents:"none",userSelect:"none"})}),se.createElement("p",{className:"mt20 font14"},Ee||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),qe&&se.createElement(Fe.ZP,Je({className:ct,onClick:at},Te),qe),lt&<);Rt.Z=ot},52918:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return ct}});var se=de(59301),it={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Fe=de(99571),Ie=de(70557),me=de(50258),ye=de(25399),Ae=de(65862),ze=de(87513),we=de(2524),fe=de(74128),Je=de(7310),ve=de(59301),ot=Object.defineProperty,Ne=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ee=(lt,Qe,et)=>Qe in lt?ot(lt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:et}):lt[Qe]=et,qe=(lt,Qe)=>{for(var et in Qe||(Qe={}))Te.call(Qe,et)&&Ee(lt,et,Qe[et]);if(Ne)for(var et of Ne(Qe))Me.call(Qe,et)&&Ee(lt,et,Qe[et]);return lt},at=(lt,Qe,et)=>new Promise((ut,Zt)=>{var Ye=Be=>{try{gt(et.next(Be))}catch(Ze){Zt(Ze)}},Ve=Be=>{try{gt(et.throw(Be))}catch(Ze){Zt(Ze)}},gt=Be=>Be.done?ut(Be.value):Promise.resolve(Be.value).then(Ye,Ve);gt((et=et.apply(lt,Qe)).next())}),ct=({editOffice:lt="view",data:Qe,issaver:et,onSaver:ut,theme:Zt,type:Ye,filename:Ve,monacoEditor:gt,className:Be,style:Ze,close:De,onClose:_e,hasMask:Bt,disabledDownload:mt,onImgDimensions:Et,showNodata:dt,recordInfo:pe})=>{const[ce,We]=(0,se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[pt,st]=(0,se.useState)(""),[xe,Ge]=(0,se.useState)(),Ce=window.ENV==="build"?"/react/build":"",Xe=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,ht=10*(1024*1024),Le=(0,se.useRef)();Qe!=null&&Qe.startsWith("/api")&&Ye!=="txt"&&(Qe=fe.Z.API_SERVER+Qe);const nt=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();Ve&>&&(gt.filename=Ve),(0,se.useEffect)(()=>{var re,le;const ne=(le=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:le.split(";");ne==null||ne.map(ge=>{let Re=ge.split("=");Re[0]==="_educoder_session"&&st(Re[1])})},[]),(0,se.useEffect)(()=>{Ye==="office"&&(Qe.indexOf("bigfilescdn.")>-1||Qe.indexOf("bigfiles1")>-1?Ge({url:Qe,fileType:nt(Qe),model:Qe.indexOf("model=edit")?"edit":"view"}):oe())},[Ye,Qe]);function ft(re){return at(this,null,function*(){re.data.type==="pdfdata"&&(ut(re.data.data),window.removeEventListener("message",ft,!1)),console.log("mess---:",re.data)})}const oe=()=>at(void 0,null,function*(){console.log("data:",Qe);let re=Qe;Qe.startsWith("http")||(re=location.origin+re);let le=new URL(re).pathname.split("/").pop();const ne=yield(0,ze.gJ)({attachment_id:le});ne.url=Xe+ne.url,Ge(ne)}),ee=()=>{if(Qe.startsWith("http")||Qe.startsWith("blob:")){z();return}(0,Ae.Sv)(Ve||"educoder",Qe,Ve)},z=()=>{pe&&(0,Je.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Ae.Nd)(Ve||"educoder",decodeURIComponent(Qe))};return ve.createElement("div",{style:qe({},Ze||{}),className:`${Bt&&it.bgBlack} ${Ye?it.wrp:"hide"}`},De&&ve.createElement("div",{className:it.close,ref:Le},!!Et&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Le.current},ve.createElement("span",{onClick:()=>{_e(),Et()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!mt&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Le.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),et&&ve.createElement(ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Le.current},ve.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",ft,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Le.current},ve.createElement("span",{className:"",onClick:()=>{_e()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${it[Be]} ${Be} ${it.monaco} ${Ye==="txt"?"show":"hide"}`},Ye==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(me.ZP,qe({},gt)))),Ye==="audio"&&ve.createElement("audio",{src:`${(Qe==null?void 0:Qe.indexOf("http://"))>-1||(Qe==null?void 0:Qe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Qe}`,autoPlay:!0}),Ye==="video"&&ve.createElement(ve.Fragment,null,(Qe==null?void 0:Qe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${Qe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Qe}`,autoPlay:!0})),Ye==="office"&&xe&&ve.createElement("iframe",{src:`${Ce}/office.html?key=${xe.key}&url=${btoa(xe.url)}&callbackUrl=${Xe+(xe.callbackUrl||"")}&fileType=${xe.fileType}&title=${xe.title||""}&model=${lt}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!mt}`}),Ye==="html"&&ve.createElement("iframe",{src:Qe+"&disposition=inline"}),Ye==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${Ce}/js/pdfview/index.html?filename=${Ve||"educoder.pdf"}&url=${encodeURIComponent(Qe)}&disabledDownload=${!!mt}&model=${lt}`}),Ye==="image"&&ve.createElement("img",{src:`${(Qe==null?void 0:Qe.indexOf("http://"))>-1||(Qe==null?void 0:Qe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Qe}`}),(Ye==="other"||Ye==="download")&&ve.createElement(ve.Fragment,null,dt?ve.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Fe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:mt},"\u4E0B\u8F7D")}):ve.createElement(Fe.ZP,{type:"primary",size:"middle",onClick:ee,disabled:mt},ve.createElement(Ie.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ye==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Qe||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},95097:function(Tt,Rt,de){"use strict";de.d(Rt,{z:function(){return gt},Z:function(){return Be}});var se=de(59301),it=de(48850),Fe=de(49142),Ie=de(64018),me=de(80360),ye=de(74128),Ae=de(65862),ze=de(15342),we=de(77736),fe=de(99571),Je=de(1012),ve=de(52918),ot=de(59301),Te=({html:Ze})=>{const De=(0,se.useRef)(null),_e=(0,se.useRef)(null),Bt=`.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,se.useEffect)(()=>{const mt=De.current.attachShadow({mode:"open"});_e.current=document.createElement("div"),_e.current.className="markdown-body",_e.current.innerHTML=Ze,mt.appendChild(_e.current);const Et=document.createElement("style");return Et.textContent=Bt,mt.appendChild(Et),()=>{mt.innerHTML=""}},[]),(0,se.useEffect)(()=>{_e.current&&(_e.current.innerHTML=Ze)},[Ze]),ot.createElement("div",{ref:De})};function Me(Ze){const De=["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"],_e=new RegExp(`\\b(${De.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ze.replace(_e,"").trim()}var Ee={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},qe=Object.defineProperty,at=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,Qe=(Ze,De,_e)=>De in Ze?qe(Ze,De,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Ze[De]=_e,et=(Ze,De)=>{for(var _e in De||(De={}))ct.call(De,_e)&&Qe(Ze,_e,De[_e]);if(at)for(var _e of at(De))lt.call(De,_e)&&Qe(Ze,_e,De[_e]);return Ze};const ut="@\u2581\u2581@",Zt="@\u2581@",Ye=/<pre[^>]*>/g;function Ve(Ze){let De=document.createElement("div");return De.innerHTML=Ze,De.childNodes.length===0?"":De.childNodes[0].nodeValue}const gt=(Ze,De)=>{Ze=Ze||"";const _e=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Bt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return De?Ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(_e,(dt,pe,ce,We,pt,st,xe)=>{const Ge=pe||We||st,Ce=ce||pt||xe||"?";return ye.Z.API_SERVER+"/api/attachments/"+Ge+Ce+"&t="+(0,Ae.Jn)(Ge,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ze=Ze.replace(Et,(dt,pe,ce,We,pt,st,xe)=>{const Ge=pe||We||st,Ce=ce||pt||xe||"?";return ye.Z.API_SERVER+"/attachments/download/"+Ge+Ce+"&t="+(0,Ae.Jn)(Ge,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(_e,(dt,pe,ce,We,pt,st,xe)=>{const Ge=pe||We||st,Ce=ce||pt||xe||"?";return ye.Z.API_SERVER+"/api/attachments/"+Ge+Ce+"&t="+(0,Ae.Jn)(Ge,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Bt,(dt,pe,ce,We,pt)=>{const st=pe||We,xe=ce||pt||"";return'"'+ye.Z.API_SERVER+"/api/attachments/"+st+xe+st+xe+"&t="+(0,Ae.Jn)(st,Date.now())}).replace(mt,(dt,pe,ce,We,pt)=>{const st=pe||We,xe=ce||pt||"";return"("+ye.Z.API_SERVER+"/files/uploads/"+st+xe+st+xe+"&t="+(0,Ae.Jn)(st,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,`
|
|
`),Ze)};var Be=({value:Ze="",edit:De=!1,className:_e,showTextOnly:Bt,showLines:mt,style:Et={},stylesPrev:dt={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:We,disabledFill:pt=!1,programFillValue:st,openEditor:xe=()=>{},onFillChange:Ge=He=>{},onFillBlur:Ce=()=>{},onFillFocus:Xe=()=>{}})=>{let He=Me(String(Ze||""));const ht=(0,se.useRef)(),Le=(0,se.useRef)(),[nt,ft]=(0,se.useState)(""),[oe,ee]=(0,se.useState)("office"),[z,re]=(0,se.useState)([]),le=(0,se.useRef)("a"+(0,Je.Z)()),ne={},ge=tt=>/<style[\s\S]*?>/i.test(tt||""),Re=(tt,ln,_t)=>{const Kt=document.createElement(tt===Zt?"input":"textarea");Kt.style.width="100%",Kt.style.height=tt===Zt?"40px":"151px",Kt.rows=5,Kt.spellcheck=!1,Kt.name="edu-program-fill",Kt.placeholder="\u8BF7\u8F93\u5165",Kt.dataset.id=ln;const on=Object.keys(ne).length;return ne[on]=Kt,`<span class="edu-program-fill-wrap ${tt===Zt?"":"show"}" style="width:${tt===Zt?"600px":"100%"}" title=${_t||""}><span>${Kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Dt(tt){return tt=tt.replace(/!\[.*?\]\(.*?\)/g,""),tt=tt.replace(/\[.*?\]\(.*?\)/g,""),tt=tt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),tt=tt.replace(/<embed.*?>/g,""),tt=tt.replace(/<img.*?>/g,""),tt=tt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),tt=tt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),tt=tt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),tt=tt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),tt}const kt=tt=>!Bt&&ge(He)?tt:tt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ln,_t){let Kt=_t.replace(/(\n|\r)/g,"").split("}"),on=[];return Kt.map(En=>{En!=""&&on.push(`.${le.current} ${En}`)}),`<style>${on.join("}")}</style>`}),vt=(0,se.useMemo)(()=>{try{const Kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,on=/\"\/api\/attachments\/|\"\/attachments\/download\//g,En=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;He=He.replace(cn,"("+ye.Z.API_SERVER+"/attachments/download/").replace(Kt,"("+ye.Z.API_SERVER+"/api/attachments/").replace(on,'"'+ye.Z.API_SERVER+"/api/attachments/").replace(En,'"'+ye.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,`
|
|
`),ht.current.style.display="none"}catch(Kt){}if(ce){let Kt=-1;return He=He.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(on,En,cn){var vn;return++Kt,Re(on,Kt,(vn=st==null?void 0:st[Kt])==null?void 0:vn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${kt(He||"")}</pre>`}let tt=kt(He);tt=(0,Fe.ZP)(tt);const ln=(0,Fe.ez)();He.match(/\[TOC\]/)&&(tt=tt.replace("<p>[TOC]</p>",(0,Fe.Qv)()),(0,Fe.Iy)()),tt=tt.replace(/(__special_katext_id_\d+__)/g,(Kt,on)=>{const{type:En,expression:cn}=ln[on];return(0,ze.renderToString)(Ve(cn)||"",{displayMode:En==="block",throwOnError:!1,output:"html"})}),tt=tt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Fe.AL)();const _t=document.createElement("div");if(_t.innerHTML=tt,Bt)return _t.innerText;if(pe){const Kt=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Xt(_t,Kt),_t.innerHTML}return setTimeout(()=>nn(),500),_t.innerHTML},[He,pe]);(0,se.useEffect)(()=>{Yt.current&&Yt.current.querySelectorAll(["input","textarea"]).forEach(ln=>{ln.oninput=Ct,ln.onblur=It,ln.onfocus=Ot})},[z]),(0,se.useEffect)(()=>{var tt,ln,_t,Kt,on;if(st!=null&&st.length)try{const En=Yt.current.querySelectorAll(".edu-program-fill-score"),cn=Yt.current.querySelectorAll('[name="edu-program-fill"]');for(const[vn,Jn]of cn.entries())Jn.value=((tt=st==null?void 0:st[vn])==null?void 0:tt.value)||"",((ln=st==null?void 0:st[vn])==null?void 0:ln.type)==="warning"?Jn.className="program-fill-warning":((_t=st==null?void 0:st[vn])==null?void 0:_t.type)==="success"?Jn.className="program-fill-success":Jn.className="";for(const[vn,Jn]of En.entries())Jn.innerHTML=(Kt=st==null?void 0:st[vn])!=null&&Kt.score?`${(on=st==null?void 0:st[vn])==null?void 0:on.score}\u5206`:"";re(st)}catch(En){console.log(En,"error")}},[st]);const Ct=tt=>{z[tt.target.dataset.id]=z[tt.target.dataset.id]||{},z[tt.target.dataset.id].value=tt.target.value,re([...z]),Ge(z,tt.target.dataset.id)},It=tt=>{z[tt.target.dataset.id]=z[tt.target.dataset.id]||{},z[tt.target.dataset.id].value=tt.target.value,re([...z]),Ce(z,tt.target.dataset.id)},Ot=tt=>{z[tt.target.dataset.id]=z[tt.target.dataset.id]||{},z[tt.target.dataset.id].value=tt.target.value,re([...z]),Xe(z,tt.target.dataset.id)};function Xt(tt,ln){return tt.childNodes.forEach(_t=>{var Kt;if(_t.childNodes.length>0)Xt(_t,ln);else if(_t.nodeName!=="IMG")if(_t.innerHTML)_t.innerHTML=(Kt=_t.innerHTML)==null?void 0:Kt.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const on=document.createElement("span");on.innerHTML=_t.textContent.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),_t.replaceWith(on)}})}const Yt=(0,se.useRef)();Fe.jb.WebkitLineClamp=mt,mt&&(Et=et(et({},Et),Fe.jb));function At(tt){let ln=tt.target;if(ln.tagName.toUpperCase()==="A"){let _t=ln.getAttribute("href");if(_t.indexOf("office")>-1)tt.preventDefault(),ft(_t),ee("office");else if(_t.indexOf("application/pdf")>-1)tt.preventDefault(),ft(_t),ee("pdf");else if(_t.indexOf("text/html")>-1)tt.preventDefault(),ft(_t),ee("html");else if(_t.startsWith("#")){tt.preventDefault();let Kt=document.getElementById(_t.replace("#",""));Kt&&Kt.scrollIntoView(!0)}}}const nn=()=>{var tt;const ln=(tt=Yt.current)==null?void 0:tt.querySelectorAll("video");ln==null||ln.forEach(_t=>{if(_t.oncontextmenu=()=>!1,_t.src.indexOf(".m3u8")>-1&&!_t.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Kt=new me.ZP;Kt.loadSource(_t.src),Kt.attachMedia(_t)}}})};(0,se.useEffect)(()=>{if(Yt.current&&vt&&vt.match(Ye)&&window.PR.prettyPrint(),Yt.current)return Yt.current.addEventListener("click",At),()=>{var tt;(tt=Yt.current)==null||tt.removeEventListener("click",At),(0,Fe.AL)(),(0,Fe.Iy)()}},[vt,Yt.current,At]);const jt=tt=>{tt.target.nodeName==="IMG"&&tt.target.className.indexOf("draw-flowchart")>-1?(ht.current.style.zIndex=1,ht.current.style.display="flex",ht.current.style.width=tt.target.clientWidth+"px",ht.current.style.height=tt.target.clientHeight+"px",ht.current.style.top=tt.target.offsetTop+"px",ht.current.style.left=tt.target.offsetLeft+"px",tt.target.id&&(Le.current=tt.target.id)):ht.current.style.display="none"},tn=()=>{ht.current.style.display="none"};return(0,se.useEffect)(()=>{var tt;const ln=_t=>{_t.preventDefault(),_t.clipboardData.setData("text",window.getSelection().toString())};return(tt=Yt.current)==null||tt.addEventListener("copy",ln),()=>{var _t;(_t=Yt.current)==null||_t.removeEventListener("copy",ln)}},[Yt.current]),se.createElement("div",{style:{position:"relative"},onMouseLeave:tn},Bt&&se.createElement("div",{ref:Yt,className:`${Ee.mdBody} `},vt),!Bt&&!ge(vt)&&se.createElement("div",{ref:Yt,style:et({},Et),onMouseOver:jt,className:`${_e||""} ${pt?"disabled-fill":""} markdown-body ${Ee.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:vt}}),!Bt&&ge(vt)&&se.createElement(Te,{html:vt}),se.createElement("div",{ref:ht,className:`${Ee.button} ${De?"":Ee.previewFlowChart}`},se.createElement(we.Z,null,se.createElement(fe.ZP,{onClick:()=>{De?xe(Le.current):(ft(Le.current),ee("flowChart"))}},De?"\u7F16\u8F91":"\u9884\u89C8"))),se.createElement(ve.Z,{close:!0,data:nt,type:nt!=null&&nt.length?oe:"",style:et({},dt),onClose:()=>ft("")}))}},85533:function(Tt,Rt,de){"use strict";de.d(Rt,{h:function(){return lt}});var se=de(59301),it=de(82326),Fe=de(28284),Ie=de(99571),me=de(89780),ye=de.n(me),Ae=de(45559),ze=de(42313),we=Object.defineProperty,fe=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Te=(Qe,et,ut)=>et in Qe?we(Qe,et,{enumerable:!0,configurable:!0,writable:!0,value:ut}):Qe[et]=ut,Me=(Qe,et)=>{for(var ut in et||(et={}))ot.call(et,ut)&&Te(Qe,ut,et[ut]);if(ve)for(var ut of ve(et))Ne.call(et,ut)&&Te(Qe,ut,et[ut]);return Qe},Ee=(Qe,et)=>fe(Qe,Je(et));const qe=it.default.Option,at={labelCol:{span:4},wrapperCol:{span:20}},ct={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"]};Rt.Z=({callback:Qe,onCancel:et})=>{const[ut,Zt]=(0,se.useState)("python");function Ye(gt){Zt(ct[gt][1])}function Ve(gt){Qe(gt)}return se.createElement(Fe.default,Ee(Me({},at),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ve,style:{width:500}}),se.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},se.createElement(it.default,{getPopupContainer:gt=>gt.parentNode,onChange:Ye},Object.keys(ct).map(gt=>se.createElement(qe,{key:gt,value:gt},ct[gt][0])))),se.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},se.createElement(lt,{mode:ut})),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ie.ZP,{type:"ghost",onClick:et},"\u53D6\u6D88")))};function lt({value:Qe,onChange:et,mode:ut,options:Zt={}}){const Ye=(0,se.useRef)(),[Ve,gt]=(0,se.useState)();return(0,se.useEffect)(()=>{if(Ve){let Be=function(Ze){const De=Ze.getValue();et&&et(De)};return Ve.on("change",Be),()=>{Ve.off("change",Be)}}},[Ve,et]),(0,se.useEffect)(()=>{Ve&&Ve.setOption("mode",ut)},[Ve,ut]),(0,se.useEffect)(()=>{Ve&&(Qe!==Ve.getValue()||Qe==="")&&setTimeout(()=>{Ve.setValue(Qe||"")},300)},[Ve,Qe]),(0,se.useEffect)(()=>{if(Ye.current&&!Ve){const Be=ye().fromTextArea(Ye.current,Me({mode:ut,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));gt(Be)}},[Ye.current,Ve]),se.createElement("div",{className:"my-codemirror-container"},se.createElement("textarea",{ref:Ye}))}},25374:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return qn}});var se=de(59301),it=de(89780),Fe=de.n(it),Ie=de(76374),me=de(45559),ye=de(6313),Ae=de(25717),ze=de(99498),we=de(25419),fe=de(67549),Je=de(95097),ve=({value:$t="",className:sn,showTextOnly:hn,showLines:Dn,style:Rr={}})=>{const Un=(0,se.useMemo)(()=>"",[$t]);return se.createElement(se.Fragment,null,se.createElement("div",{dangerouslySetInnerHTML:{__html:Un}}))},ot=Object.defineProperty,Ne=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,at=($t,sn,hn)=>sn in $t?ot($t,sn,{enumerable:!0,configurable:!0,writable:!0,value:hn}):$t[sn]=hn,ct=($t,sn)=>{for(var hn in sn||(sn={}))Ee.call(sn,hn)&&at($t,hn,sn[hn]);if(Me)for(var hn of Me(sn))qe.call(sn,hn)&&at($t,hn,sn[hn]);return $t},lt=($t,sn)=>Ne($t,Te(sn));let Qe=[{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 et({onActionCallback:$t,title:sn,icon:hn,actionName:Dn,className:Rr="",children:Un}){function $n(){$t(Dn)}return se.createElement("a",{title:sn,className:Rr,onClick:$n},se.createElement("i",{className:`${hn}`}),Un)}var ut=({watch:$t,showNullButton:sn,showNullProgramButton:hn,onActionCallback:Dn,fullScreen:Rr,insertTemp:Un,hidetoolBar:$n,extraUse:Tr})=>{const lr=[...Qe,{title:`${$t?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return se.createElement("ul",{className:"markdown-toolbar-container"},!$n&&lr.map((Bn,Zn)=>se.createElement("li",{key:Zn},Bn.actionName?se.createElement(et,lt(ct({},Bn),{onActionCallback:Dn})):se.createElement("span",{className:"v-line"}))),sn?se.createElement("li",null,se.createElement(et,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Dn},se.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,hn?se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement(et,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Dn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),se.createElement("li",null,se.createElement(et,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Dn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Un&&se.createElement("li",null,se.createElement(et,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Un}`,onActionCallback:Dn},se.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Tr&&se.createElement("li",null,Tr),se.createElement("li",{className:"btn-full-screen"},se.createElement(et,{icon:`${Rr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Rr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Dn})))},Zt=de(57261),Ye=de(28284),Ve=de(37568),gt=de(99571),Be=Object.defineProperty,Ze=Object.defineProperties,De=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Et=($t,sn,hn)=>sn in $t?Be($t,sn,{enumerable:!0,configurable:!0,writable:!0,value:hn}):$t[sn]=hn,dt=($t,sn)=>{for(var hn in sn||(sn={}))Bt.call(sn,hn)&&Et($t,hn,sn[hn]);if(_e)for(var hn of _e(sn))mt.call(sn,hn)&&Et($t,hn,sn[hn]);return $t},pe=($t,sn)=>Ze($t,De(sn));const ce={labelCol:{span:4},wrapperCol:{span:20}};var We=({callback:$t,onCancel:sn})=>{function hn(Dn){$t(Dn)}return se.createElement(Ye.default,pe(dt({},ce),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:hn,style:{width:500}}),se.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},se.createElement(Ve.default,null)),se.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},se.createElement(Ve.default,null)),se.createElement("div",{className:"flex-container flex-end"},se.createElement(gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(gt.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},pt=de(85533),st=de(45053),xe=de(62957),Ge=de(77019),Ce=de(16750),Xe=de(59301),He=({callback:$t,onCancel:sn})=>{const hn=document.createElement("canvas"),Dn=hn.getContext("2d");hn.width=1e3,hn.height=800,Dn.fillStyle="#ffffff",Dn.fillRect(0,0,hn.width,hn.height);const Rr=hn.toDataURL("image/png");return Xe.createElement(xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Xe.createElement(Ge.Z,{style:{height:"100vh"}},Xe.createElement(Ce.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Rr,visible:!0,title:String(Date.now())},onOk:Un=>{$t({src:Un.url})},onClose:sn})))},ht=de(30641),Le=de(5269),nt=de(6767),ft={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},oe=de(59301),z=(0,se.forwardRef)(({onCancel:$t,editImgId:sn,callback:hn},Dn)=>{let Rr=(0,se.useRef)(),Un=(0,se.useRef)(),$n=(0,se.useRef)(),Tr=(0,se.useRef)(!1);const lr=(0,se.useRef)(!1);console.log("ref:",Dn);const[Bn,Zn]=(0,se.useState)(0),[Or,Nt]=(0,se.useState)("100vh");return(0,se.useEffect)(()=>{Zn(1)},[]),(0,se.useImperativeHandle)(Dn,()=>({setHeight:Nt})),oe.createElement("div",{ref:lr,className:"body-overflow-initial"},oe.createElement(ht.Z,{width:"100vw",height:Or,footer:null,closable:!0,placement:"bottom",open:!!Bn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ft.drawerWrap}`,onClose:()=>{window.saveDrawData($e=>{hn({src:`/api/attachments/${$e}`,id:$e})})},title:oe.createElement(Ge.Z,{align:"middle"},oe.createElement(Le.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),oe.createElement(Le.Z,{onClick:()=>{Nt(Or==="60px"?"100vh":"60px")}},oe.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),oe.createElement(Le.Z,{onClick:()=>{window.saveDrawData($e=>{if($e===null){nt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}nt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),hn({src:`/api/attachments/${$e}`,id:$e,disabledClose:!0})})}},oe.createElement(gt.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},oe.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${sn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Un})))}),re=de(74128),le=de(47889),ne=de(71051);const ge=le.ZP.Group,Re={margin:"0 8px"};var Dt=({callback:$t,onCancel:sn})=>{function hn(Dn){$t(Dn)}return se.createElement(Ye.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:hn},se.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},se.createElement("span",{style:Re},"\u5355\u5143\u683C\u6570\uFF1A"),se.createElement("span",{style:Re},"\u884C\u6570"),se.createElement(Ye.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},se.createElement(ne.Z,null)),se.createElement("span",{style:Re},"\u5217\u6570"),se.createElement(Ye.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},se.createElement(ne.Z,null))),se.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},se.createElement("span",{style:Re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),se.createElement(Ye.default.Item,{name:"align"},se.createElement(ge,null,se.createElement(le.ZP,{value:"default"},se.createElement("i",{className:"fa fa-align-justify"})),se.createElement(le.ZP,{value:"left"},se.createElement("i",{className:"fa fa-align-left"})),se.createElement(le.ZP,{value:"center"},se.createElement("i",{className:"fa fa-align-center"})),se.createElement(le.ZP,{value:"right"},se.createElement("i",{className:"fa fa-align-right"}))))),se.createElement("div",{className:"flex-container flex-end"},se.createElement(gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(gt.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},kt=de(71411),vt=de(93510),Ct=de.n(vt),Ot=(0,se.forwardRef)(({use3d:$t,width:sn,height:hn,callback:Dn,showSaveButton:Rr},Un)=>{const $n=(0,se.useRef)(),Tr=(0,se.useRef)(),[lr,Bn]=(0,se.useState)(!1),Zn=(0,se.useRef)({id:$n,appName:"graphing",width:sn||1e3,height:hn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,se.useEffect)(()=>{Tr.current=new(Ct())(Zn.current,!0),window.onload=function(){Tr.current.inject("applet_container")}},[]);const Or=()=>{var Nt=window.ggbApplet.getPNGBase64(1,!0,72);return Dn&&Dn(Nt),Nt};return(0,se.useEffect)(()=>{Zn.current.appName=lr?"3D":"graphing",Tr.current.inject("applet_container")},[lr]),(0,se.useEffect)(()=>{Bn($t)},[$t]),(0,se.useImperativeHandle)(Un,()=>({getImgData:Or})),se.createElement(se.Fragment,null,se.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:$n}),se.createElement(Ge.Z,{align:"middle"},se.createElement(Le.Z,{flex:1},se.createElement(kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:lr,onChange:Nt=>Bn(Nt)})),se.createElement(Le.Z,null,se.createElement(gt.ZP,{size:"large",onClick:Or,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Xt=de(99298);const Yt="link",At="upload-image",nn="add-flowchart",jt="draw-image",tn="add-flowchart",tt="code-block",ln="add-table",_t="------------",Kt={default:_t,left:`:${_t}`,center:`:${_t}:`,right:`${_t}:`};var on=de(31103);function En(){}let cn=0;const vn=1e4,Jn="\u2581",jn="@\u2581\u2581@",Wr="@\u2581@",zr=`
|
|
**\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`,yr=["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 sr($t){return/^\d+$/.test($t)?`${$t}px`:$t}const ir=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Er={[ir+"-B"]:"bold",[ir+"-I"]:"italic"},Tn={[Yt]:"\u6DFB\u52A0\u94FE\u63A5",[tt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[At]:"\u6DFB\u52A0\u56FE\u7247",[jt]:"\u6DFB\u52A0\u753B\u56FE",[nn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ln]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var qn=({defaultValue:$t="",onChange:sn,width:hn="100%",height:Dn=400,miniToolbar:Rr=!1,isFocus:Un=!1,watch:$n,insertTemp:Tr,mode:lr="markdown",id:Bn="markdown-editor-id",showResizeBar:Zn=!1,noStorage:Or=!1,showNullButton:Nt=!1,showNullProgramButton:$e=!1,hidetoolBar:en=!1,fullScreen:Pn=!1,onBlur:In,onCMBeforeChange:ke,onFullScreen:Pe,className:Ft="",disablePaste:yt=!1,disabled:Oe=!1,disabledFill:bt=!1,placeholder:Ut="",values:Jt="",extraUse:rn})=>{const[Ue,Vt]=(0,se.useState)(null),[St,mn]=(0,se.useState)($t),[Gt,fn]=(0,se.useState)($n),[un,xn]=(0,se.useState)(Pn),[yn,Wn]=(0,se.useState)(""),[Kn,On]=(0,se.useState)(0),[ar,Ln]=(0,se.useState)(Dn),[mr,Pr]=(0,se.useState)(!1),[Qn,ur]=(0,se.useState)(0),[wr,cr]=(0,se.useState)(0),Gn=(0,se.useRef)(),Cr=(0,se.useRef)(),er=(0,se.useRef)(),tr=(0,se.useRef)(),hr=(0,se.useRef)(),Dr=(0,se.useRef)();(0,se.useEffect)(()=>{const xt=window.scrollY||window.pageYOffset;mn(Jt),Ue==null||Ue.setValue(Jt),window.scrollTo(0,xt)},[Jt]),(0,se.useEffect)(()=>{Pe==null||Pe(un)},[un]),(0,se.useEffect)(()=>{if(Gn.current){let xt=function(Lt,Wt){var pn;if(yt){Wt.preventDefault();return}const bn=Wt.clipboardData;if(bn){const Rn=bn.types.toString(),Vn=bn.items;if(Rn==="Files"||bn.types.indexOf("Files")>-1){if(Wt.preventDefault(),lr=="stex")return;try{let _n=Vn[1];((pn=Vn[0])==null?void 0:pn.kind)==="file"&&(_n=Vn[0]);const fr=_n.getAsFile(),rr=fr.name.split(".").pop();(0,st.I)(fr,Fr=>{var Di,ii,Gr;Fr.id?((Di=fr==null?void 0:fr.type)==null?void 0:Di.indexOf("image"))>-1?rt.replaceSelection(`<img width="100%" src="/api/attachments/${Fr.id}?type=${Fr.content_type})" alt="" />`):((ii=fr==null?void 0:fr.type)==null?void 0:ii.indexOf("video"))>-1?rt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Fr.id}"></video>`):((Gr=fr==null?void 0:fr.type)==null?void 0:Gr.indexOf("pdf"))>-1?rt.replaceSelection(`<a href="/api/attachments/${Fr.id}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):yr.includes(rr)?rt.replaceSelection(`<a href="/api/attachments/${Fr.id}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):rt.replaceSelection(`[${fr.name}](/api/attachments/${Fr.id}?type=${Fr.content_type})`):(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(_n){nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const rt=Fe().fromTextArea(Gn.current,{mode:lr,lineNumbers:!Rr,lineWrapping:!0,value:$t,autoCloseTags:!0,autoCloseBrackets:!0});return rt.on("keyup",function(Lt,Wt){Wt.keyCode===8&&(Lt.getValue()==""?rt.setOption("placeholder",Ut):rt.setOption("placeholder",null))}),rt.on("keydown",function(Lt,Wt){if(Wt.keyCode===8){var pn=Yn(Lt);pn&&Wt.preventDefault()}}),Un&&rt.focus(),rt.on("paste",xt),Oe&&rt.on("beforeChange",function(Lt,Wt){(Wt.origin==="paste"||Wt.origin==="+input")&&Wt.cancel()}),Vt(rt),()=>{rt.off("paste",xt)}}},[]);const dr=(0,se.useCallback)(()=>{if(Cr.current)try{}catch(xt){console.log(xt,"---- to set md editor body height")}},[ar,Cr,un]);(0,se.useEffect)(()=>{function xt(){let rt=new Ie.Z(Lt=>{for(let Wt of Lt)(Wt.target.offsetHeight>0||Wt.target.offsetWidth>0)&&(dr(),Ue.setSize("100%","100%"),Ue.refresh())});return rt.observe(Gn.current.parentElement),rt}if(Ue){const rt=xt();return()=>{var Lt,Wt;(Lt=Gn.current)!=null&&Lt.parentElement&&rt.unobserve((Wt=Gn.current)==null?void 0:Wt.parentElement)}}},[Ue,dr]),(0,se.useEffect)(()=>{if(Ue){let xt=[];for(const[rt,Lt]of Object.entries(Er)){let Wt={[rt]:()=>{Hn(Lt)}};xt.push(Wt),Ue.addKeyMap(Wt)}return()=>{for(let rt of xt)Ue.removeKeyMap(rt)}}},[Ue]),(0,se.useEffect)(()=>{Pn!==un&&xn(Pn)},[Pn]),(0,on.Z)(()=>{if(!Or&&Kn>0){let xt=new Date().getTime(),rt=window.sessionStorage.getItem(Bn);xt>=Kn+vn&&(!rt||rt!==St)&&(window.sessionStorage.setItem(Bn,St),Pr(!0))}},vn),(0,se.useEffect)(()=>{fn($n)},[Ue,$n]),(0,se.useEffect)(()=>{Ue&&Un&&Ue.focus()},[Ue,Un]),(0,se.useEffect)(()=>{if(Gt&&Ue){let xt=function(Lt){let Wt=Lt.target;if(tr.current){let pn=Wt.scrollTop/Wt.scrollHeight;tr.current.scrollTop=tr.current.scrollHeight*pn}};const rt=Ue.getScrollerElement();return rt.addEventListener("scroll",xt),()=>{rt.removeEventListener("scroll",xt)}}},[Ue,Gt]),(0,se.useEffect)(()=>{if(Ue&&ke){let xt=function(rt,Lt){ke(rt,Lt)};return Ue.on("beforeChange",xt),()=>{Ue.off("beforeChange",xt)}}},[Ue,ke]),(0,se.useEffect)(()=>{if(Ue&&In){let xt=function(){In(Ue.getValue())};return Ue.on("blur",xt),()=>{Ue.off("blur",xt)}}},[Ue,In]);function Yn(xt,rt){var Lt=xt.getDoc(),Wt=Lt.getCursor(),pn=Lt.getLine(Wt.line),bn=pn.charAt(Wt.ch-1),Rn=pn.lastIndexOf("@\u2581@",Wt.ch),Vn=pn.lastIndexOf("@\u2581\u2581@",Wt.ch),_n=Rn>Vn?Rn:Vn,fr=Rn>Vn?3:4;if(jn.indexOf(bn)===-1)return null;if(console.log("change1:",rt,xt,pn,Wt,_n,Rn,Vn,bn),_n>=0&&Wt.ch-_n<5){var rr=_n+fr;return Lt.replaceRange("",{line:Wt.line,ch:_n},{line:Wt.line,ch:rr}),{line:Wt.line,ch:rr}}return null}(0,se.useEffect)(()=>{if(Ue){let xt=function(rt,Lt){const Wt=rt.getValue();mn(Wt),On(new Date().getTime()),rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),sn&&($e?sn(Wt,qr(Wt)):sn(Wt))};return Ue.on("change",xt),()=>{Ue.off("change",xt)}}},[Ue,sn]),(0,se.useEffect)(()=>{if(Ue)if($t==null)Ue.setValue(""),mn("");else{const xt=window.scrollY||window.pageYOffset;$t!==Ue.getValue()&&(Ue.setValue($t),mn($t),Ue.setCursor(Oe?1:Ue.lineCount(),0),window.scrollTo(0,xt))}},[Ue,$t]);const Hn=(0,se.useCallback)(xt=>{const rt=Ue.getCursor(),Lt=Ue.getSelection();let Wt=Lt.split(`
|
|
`);switch(xt){case"bold":return Ue.replaceSelection("**"+Lt+"**"),Lt===""&&Ue.setCursor(rt.line,rt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+Lt+"*"),Lt===""&&Ue.setCursor(rt.line,rt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+Lt+"`"),Lt===""&&Ue.setCursor(rt.line,rt.ch+1),Ue.focus();case"inline-latex":return Wn("inline-latex"),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+Lt+"\n```"),Ue.setCursor(rt.line+1,Lt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
|
|
`),Ue.focus();case"list-ul":return Lt===""?Ue.replaceSelection("- "+Lt):Ue.replaceSelection(Wt.map(pn=>pn===""?"":`- ${pn}`).join(`
|
|
`)),Ue.focus();case"list-ol":return Lt===""?Ue.replaceSelection("1. "+Lt):Ue.replaceSelection(Wt.map((pn,bn)=>pn===""?"":`${bn+1}. ${pn}`).join(`
|
|
`)),Ue.focus();case"add-null-ch":return Lt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(Jn),Ue.focus();case"add-signal":return Lt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(Wr),Ue.focus();case"add-multiple":return Lt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(jn),Ue.focus();case"inster-template-1":return Lt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(zr),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return fn(!Gt),Ue.focus();case"trigger-full-screen":return xn(!un),Ue.focus();case Yt:Wn(Yt);return;case tt:Wn(tt);return;case At:Wn(At);return;case jt:Wn(jt);return;case"maths-latex":Wn("maths-latex");return;case nn:hr.current="",sessionStorage.removeItem("file_id"),Wn(nn);return;case ln:Wn(ln);return;default:throw new Error}},[Ue,Gt,un]),nr=(0,se.useCallback)((xt,rt)=>{var Lt,Wt,pn,bn,Rn,Vn;switch(xt!=null&&xt.disabledClose||Wn(""),yn){case Yt:const{title:Di,link:ii}=xt;return Ue.replaceSelection(`[${Di}](${ii})`),Ue.focus();case tt:const{language:Gr,content:ui}=xt;return Ue.replaceSelection(["```"+Gr,ui,"```"].join(`
|
|
`)),Ue.focus();case"maths-latex":for(var _n=atob(xt),fr=new Uint8Array(_n.length),rr=0;rr<_n.length;rr++)fr[rr]=_n.charCodeAt(rr);var Fr=new Blob([fr],{type:"image/png"});(0,st.I)(Fr,kr=>{kr.id?Ue.replaceSelection(``):(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ue.replaceSelection("`$$"+xt+"$$`");break;case tn:const{src:gr,alt:fi,id:Bi}=xt;if(!Bi)return;Ue.getValue().indexOf(gr)===-1?Ue.replaceSelection(`<center><img id="${Bi}" width="80%" src="${gr}" class="draw-flowchart" alt="${fi||""}" /></center>`):document.getElementById(Bi).src=re.Z.API_SERVER+gr+"?t="+Date.now();break;case At:case jt:const pr=rt,yi=(pn=(Wt=(Lt=pr==null?void 0:pr.name)==null?void 0:Lt.split("."))==null?void 0:Wt.pop)==null?void 0:pn.call(Wt);return((bn=pr==null?void 0:pr.type)==null?void 0:bn.indexOf("image"))>-1||!(pr!=null&&pr.type)?pr!=null&&pr.align||pr!=null&&pr.width?Ue.replaceSelection(`<p style="text-align:${pr.align||"initial"}"><img width="${pr.width?pr.width+"%":"initial"}" src="${gr}" alt="${fi||""}" /></p>`):Ue.replaceSelection(`<img width="100%" src="${gr}" alt="${fi||""}" />`):((Rn=pr==null?void 0:pr.type)==null?void 0:Rn.indexOf("video"))>-1?Ue.replaceSelection(`<video width="100%" controls src="${gr}"></video>`):((Vn=pr==null?void 0:pr.type)==null?void 0:Vn.indexOf("pdf"))>-1?Ue.replaceSelection(`<a href="${gr}?type=${pr.type}&disposition=inline" target="_blank">${pr.name}</a>`):yr.includes(yi)?Ue.replaceSelection(`<a href="${gr}?type=office&disposition=inline" target="_blank">${pr.name}</a>`):Ue.replaceSelection(`[${pr.name}](${gr})`),Ue.focus();case ln:const{row:pi,col:Hi,align:bi}=xt;let _i=`
|
|
`;for(let kr=0;kr<pi;kr++){let Fi=[],$i=[];for(let eo=0;eo<Hi;eo++)kr===1&&$i.push(Kt[bi]),Fi.push(" ");kr===1&&(_i+=`| ${$i.join(" | ")} |
|
|
`),_i+=`| ${Fi.join(Hi===1?"":" | ")} |
|
|
`}return Ue.replaceSelection(_i+`
|
|
`),Ue.focus();default:throw new Error}},[Ue,yn]),Zr=(0,se.useMemo)(()=>{switch(yn){case Yt:return se.createElement(We,{callback:nr,onCancel:Lr});case tt:return se.createElement(pt.Z,{callback:nr,onCancel:Lr});case At:return se.createElement(st.Z,{callback:nr,onCancel:Lr});case nn:return se.createElement(z,{editImgId:hr.current,callback:nr,onCancel:Lr});case ln:return se.createElement(Dt,{callback:nr,onCancel:Lr});case"maths-latex":return se.createElement(Ot,{showSaveButton:!0,callback:nr});case"inline-latex":return se.createElement(Xt.Z,{showSaveButton:!0,callback:nr});default:return null}},[yn]);function Lr(){Wn("")}(0,se.useEffect)(()=>{if(er.current){let xt=function(Rn){pn=!0,bn=Rn.pageY},rt=function(){pn=!1},Lt=function(Rn){if(pn){let Vn=Rn.pageY-bn;Vn<0&&(Vn=0),Vn>300&&(Vn=300);let _n=Dn+Vn+"px";Ln(_n)}},Wt=er.current,pn=!1,bn=0;return Wt.addEventListener("mousedown",xt),document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",rt),()=>{Wt.removeEventListener("mousedown",xt),document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",rt)}}},[Ue,er]),(0,se.useEffect)(()=>{Ln(Dn)},[Dn]);const br=sr(hn),ri=sr(ar),Sr={width:br,height:ri},li=(0,se.useMemo)(()=>{if(Kn){let xt=new Date(Kn),rt=xt.getHours(),Lt=xt.getMinutes(),Wt=xt.getSeconds();return rt=rt<10?"0"+rt:rt,Lt=Lt<10?"0"+Lt:Lt,Wt=Wt<10?"0"+Wt:Wt,`${rt}:${Lt}:${Wt}`}return 0},[Kn]),qr=xt=>{const rt=[];if($e){let Lt=-1;xt=xt.replace(/(@▁▁@|@▁@)/g,function(Wt,pn,bn){rt.push({multiLine:Wt!==Wr})})}return rt};function Br(){window.sessionStorage.removeItem(Bn),Pr(!1),On(0)}function Mn(){Pr(!1),On(0),Ue.setValue(window.sessionStorage.getItem(Bn))}(0,se.useEffect)(()=>{Tn[yn]&&yn!==jt&&yn!==nn&&setTimeout(()=>{const xt=document.getElementsByClassName("markdown-popup-form")[0],rt=window.innerWidth/2-xt.offsetWidth/2,Lt=window.innerHeight/2-xt.offsetHeight/2;ur(rt),cr(Lt)},0)},[yn]);const Pt=xt=>{xt.preventDefault();const rt=xt.clientX-Qn,Lt=xt.clientY-wr;document.body.onmousemove=Wt=>{let pn=Wt.clientX-rt,bn=Wt.clientY-Lt;const Rn=document.getElementsByClassName("markdown-popup-form")[0],Vn=window.innerWidth-Rn.offsetWidth,_n=window.innerHeight-Rn.offsetHeight;pn=Math.max(0,Math.min(pn,Vn)),bn=Math.max(0,Math.min(bn,_n)),Ht(Wt.clientX,Wt.clientY,rt,Lt)&&(ur(pn),cr(bn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ht=(xt,rt,Lt,Wt)=>{const pn=document.body.clientHeight,bn=document.body.clientWidth;return xt<20&&Lt>xt||xt>bn-20&&Lt<xt||rt<20&&Wt>rt||rt>pn-20&&Wt<rt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return se.createElement(se.Fragment,null,se.createElement("div",{className:"markdown-editor-wrapper",ref:Cr},se.createElement("div",{className:`markdown-editor-container ${Ft} ${Gt?"on-preview":""} ${Rr?"mini":""} ${un?"full-screen":""}`,style:Sr},se.createElement(ut,{insertTemp:Tr,watch:Gt,fullScreen:un,showNullButton:Nt,showNullProgramButton:$e,onActionCallback:Hn,hidetoolBar:en,extraUse:rn}),se.createElement("div",{className:"markdown-editor-body"},se.createElement("div",{className:"codemirror-container"},se.createElement("textarea",{ref:Gn,placeholder:Ut})),Gt?se.createElement("div",{ref:tr,className:"preview-container"},lr==="stex"&&se.createElement(ve,{value:St}),lr!=="stex"&&se.createElement(Je.Z,{edit:!0,disabledFill:bt,showProgramFill:$e,value:St,openEditor:xt=>{var rt;hr.current=xt,(rt=Dr.current)==null||rt.setHeight("100vh"),setTimeout(()=>{Wn("add-flowchart")},150)}})):null))),Zn?se.createElement("a",{ref:er,className:"editor-resize"}):null,yn===jt&&se.createElement(He,{callback:nr,onCancel:Lr}),yn===nn&&se.createElement(z,{ref:Dr,editImgId:hr.current,callback:nr,onCancel:Lr}),se.createElement(Zt.Z,null,Tn[yn]&&yn!==jt&&yn!==nn?se.createElement(xe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Qn,top:wr},title:se.createElement("div",{style:{cursor:"move"},onMouseDown:Pt},Tn[yn]),open:!0,onCancel:Lr,footer:null,destroyOnClose:!0,width:yn===nn?"1200px":null,height:yn===nn?"80vh":null,className:"markdown-popup-form"},Zr):null))}},45053:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return et},I:function(){return Zt}});var se=de(28284),it=de(6767),Fe=de(37568),Ie=de(77736),me=de(71051),ye=de(47889),Ae=de(99571),ze=de(28735),we=de(59301),fe=de(59301),Je=Object.defineProperty,ve=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ee=(Ye,Ve,gt)=>Ve in Ye?Je(Ye,Ve,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Ye[Ve]=gt,qe=(Ye,Ve)=>{for(var gt in Ve||(Ve={}))Te.call(Ve,gt)&&Ee(Ye,gt,Ve[gt]);if(Ne)for(var gt of Ne(Ve))Me.call(Ve,gt)&&Ee(Ye,gt,Ve[gt]);return Ye},at=(Ye,Ve)=>ve(Ye,ot(Ve));const{useForm:ct}=se.default,lt={width:280,marginRight:10},Qe={labelCol:{span:5},wrapperCol:{span:19}};var et=({callback:Ye,onCancel:Ve})=>{const[gt]=ct();let Be=(0,we.useRef)();function Ze(Bt){Be.current.width=gt.getFieldValue("width"),Be.current.align=gt.getFieldValue("align"),Ye(Bt,Be.current)}function De(Bt,mt){if(Bt.status===-1){it.ZP.error(Bt.message);return}gt.setFieldsValue({src:`/api/attachments/${Bt.id}`,type:mt.type})}function _e(Bt){let mt=Bt.target.files[0];Be.current=mt,Zt(mt,De)}return fe.createElement(se.default,at(qe({form:gt},Qe),{className:"upload-image-panel",onFinish:Ze,style:{width:470,overflow:"hidden"}}),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(se.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Fe.default,{style:lt})),fe.createElement(ut,{onFileChange:_e}))),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Fe.default,{style:{width:264}})),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Ie.Z,null,fe.createElement(se.default.Item,{name:"width",style:{margin:0}},fe.createElement(me.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(se.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ye.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"}]})),fe.createElement("aside",null,fe.createElement(se.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Ae.ZP,{type:"default",onClick:Ve},"\u53D6\u6D88"))))};function ut({onFileChange:Ye}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Ye}))}function Zt(Ye,Ve){if(!Ye)throw new String("\u6CA1\u6709\u6587\u4EF6");let gt=new FormData;gt.append("editormd-image-file",Ye),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var Be=new window.XMLHttpRequest;Be.withCredentials=!0,Be.addEventListener("load",function(Ze){Ve(JSON.parse(Ze.target.responseText),Ye)},!1),Be.addEventListener("error",function(Ze){console.error(Ze)},!1),Be.open("POST",`${ze.KI}/api/attachments.json`),Be.send(gt)}},57261:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return Fe}});var se=de(59301),it=de(4676);class Fe extends se.Component{constructor(me){super(me);const ye=window.document;this.node=ye.createElement("div"),ye.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,it.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},50258:function(Tt,Rt,de){"use strict";de.d(Rt,{SV:function(){return ht},ZP:function(){return He}});var se=de(59301),it=de(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"]},Ie={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(`
|
|
`)}]},ye={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(`
|
|
`)}]},Ae={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 ze=de(53184),we=de.n(ze),fe=(Le,nt,ft)=>new Promise((oe,ee)=>{var z=ne=>{try{le(ft.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{le(ft.throw(ne))}catch(ge){ee(ge)}},le=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);le((ft=ft.apply(Le,nt)).next())});const Je={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"]}},ve=(Le,nt,ft,oe)=>{const ee=nt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ft.lineNumber,endColumn:ft.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:Le.languages.CompletionItemKind.Text,insertText:re,range:oe}))},ot=(Le,nt,ft,oe)=>{Le.languages.registerCompletionItemProvider(nt,{provideCompletionItems(ee,z){const re=ee.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=ee.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...ve(Le,ee,z,le),...ft.map(Re=>({label:Re,kind:Le.languages.CompletionItemKind.Keyword,documentation:Re,insertText:Re,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...oe.map(Re=>({label:Re.label,kind:Le.languages.CompletionItemKind.Snippet,documentation:Re.content,insertText:ne.startsWith("#")?Re.content.replace(/#/,""):Re.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var Ne=Le=>{Je.languages.forEach(nt=>{Le.languages.registerDocumentFormattingEditProvider(nt,{provideDocumentFormattingEdits(ft){return fe(this,null,function*(){const oe=we()(ft.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:ft.getFullModelRange(),text:oe}]})}})}),ot(Le,"java",Ie.keywords,Ie.quickKey),ot(Le,"cpp",me.keywords,me.quickKey),ot(Le,"c",Fe.keywords,[]),ot(Le,"python",ye.keywords,ye.quickKey),ot(Le,"scala",Ae.keywords,Ae.quickKey)};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,Ee=(Le,nt,ft)=>nt in Le?Me(Le,nt,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Le[nt]=ft,qe=(Le,nt,ft)=>Ee(Le,typeof nt!="symbol"?nt+"":nt,ft);const at=class Wl{constructor(nt,ft,oe){this.placeholder=nt,this.editor=ft,this.monaco=oe,ft.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};qe(at,"ID","editor.widget.placeholderHint");var lt=at,Qe=de(96236),et=de(6767),ut=de(25399),Zt=de(89392),Ye=de(77254),Ve=de(56102),gt=Object.defineProperty,Be=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,mt=(Le,nt,ft)=>nt in Le?gt(Le,nt,{enumerable:!0,configurable:!0,writable:!0,value:ft}):Le[nt]=ft,Et=(Le,nt)=>{for(var ft in nt||(nt={}))_e.call(nt,ft)&&mt(Le,ft,nt[ft]);if(De)for(var ft of De(nt))Bt.call(nt,ft)&&mt(Le,ft,nt[ft]);return Le},dt=(Le,nt)=>Be(Le,Ze(nt)),pe=(Le,nt)=>{var ft={};for(var oe in Le)_e.call(Le,oe)&&nt.indexOf(oe)<0&&(ft[oe]=Le[oe]);if(Le!=null&&De)for(var oe of De(Le))nt.indexOf(oe)<0&&Bt.call(Le,oe)&&(ft[oe]=Le[oe]);return ft},ce=(Le,nt,ft)=>new Promise((oe,ee)=>{var z=ne=>{try{le(ft.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{le(ft.throw(ne))}catch(ge){ee(ge)}},le=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);le((ft=ft.apply(Le,nt)).next())});function We(Le){return/^\d+$/.test(Le)?`${Le}px`:Le}function pt(){}let st=!1;const xe={"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(Le=[]){let nt=Le;if(Array.isArray(Le)){for(let ft=0;ft<Le.length;ft++){let oe=xe[Le[ft]];if(oe)return oe}return nt[0]}return xe[nt]||nt}let Ce=null;const Xe=()=>ce(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Le){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Le)}});var He=Le=>{var nt=Le,{width:ft="100%",height:oe="100%",value:ee,language:z="javascript",style:re={},options:le={},overrideServices:ne={},theme:ge="vs-dark",onEditBlur:Re,isCopy:Dt=!1,onSave:kt,autoHeight:vt=!1,forbidCopy:Ct=!1,onChange:It=pt,editorDidMount:Ot=pt,onFocus:Xt=pt,onBreakPoint:Yt=pt,breakPointValue:At=[],filename:nn="educoder.txt",errorLine:jt,errorContent:tn="",highlightLine:tt,openBreakPoint:ln=!1,placeholder:_t="",showMiniMap:Kt=!0}=nt,on=pe(nt,["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 En=(0,se.useRef)(),cn=(0,se.useRef)({}),vn=(0,se.useRef)(),Jn=(0,se.useRef)(),jn=(0,se.useRef)([]),Wr=(0,se.useRef)(!1),zr=(0,se.useRef)(),yr=(0,se.useRef)(),sr=(0,se.useRef)(!1),[Nn,ir]=(0,se.useState)(!1);function Er(){let Nt;return En.current&&(Nt=new it.Z($e=>{for(let en of $e)(en.target.offsetHeight>0||en.target.offsetWidth>0)&&cn.current.instance.layout()}),Nt.observe(En.current)),Nt}function Tn(){et.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const qn=()=>{let Nt=cn.current.instance;if(ee!=null&&Nt&&Nn){const $e=Nt.getModel();$e&&ee!==$e.getValue()&&(st=!0,$e.setValue(ee),Nt.layout(),st=!1)}};(0,se.useEffect)(()=>{const Nt=Ye.Z.subscribe("formatDocument",$e=>{var en;let Pn=cn.current.instance;(en=Pn==null?void 0:Pn.getAction)==null||en.call(Pn,"editor.action.formatDocument").run()});return window.updateMonacoValue=$e=>{It($e)},Nt},[]),(0,se.useEffect)(()=>{var Nt;let $e=cn.current.instance;Jn.current&&clearTimeout(Jn.current),Jn.current=setTimeout(()=>{qn()},500),ee&&(ee!=null&&ee.length)&&((Nt=$e==null?void 0:$e.updateOptions)==null||Nt.call($e,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,Nn,cn.current]),(0,se.useEffect)(()=>{if(jt&&cn.current&&cn.current.instance){let $e=cn.current.instance;$e.changeViewZones(function(en){var Pn=document.createElement("div");Pn.style.padding="10px 20px",Pn.style.width="calc(100% - 20px)",Pn.className="my-error-line-wrp",Pn.innerHTML=tn,en.addZone({afterLineNumber:jt||11,heightInLines:3,domNode:Pn})});var Nt={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}};$e.addOverlayWidget(Nt),$e.revealPositionInCenter({lineNumber:20,column:1})}},[jt,cn.current,Nn]);const $t=(Nt="",$e)=>{if(!Nt||Nt.trim()==="")return!0;const Pn=cn.current.instance.getModel().getLineTokens($e);let In=!1;for(let ke=0;ke<2;ke++)Pn.getStandardTokenType(ke)===1&&(In=!0);return In};(0,se.useEffect)(()=>{var Nt;const $e=(Nt=cn.current)==null?void 0:Nt.instance;if($e&&Nn&&Ct){const en=$e.onDidBlurEditorWidget(()=>{sr.current=!1}),Pn=$e.onDidFocusEditorText(()=>{sr.current=!0});return()=>{en.dispose(),Pn.dispose()}}},[cn.current,Nn,Ct]),(0,se.useEffect)(()=>{var Nt;if((Nt=cn.current)!=null&&Nt.instance&&Nn&&ln){let $e=cn.current.instance,en=$e.getModel();if(!en)return;(()=>{var Ue;let Vt=[],St=[];const mn=en.getAllDecorations();for(let fn of mn)fn.options.className==="highlighted-line"&&(Vt.push((Ue=fn==null?void 0:fn.range)==null?void 0:Ue.startLineNumber),St.push(fn==null?void 0:fn.id));if(tt===Vt[0])return;en.deltaDecorations(St,[]);const Gt=en.getLineCount();tt&&tt<=Gt&&($e.deltaDecorations([],[{range:new Ce.Range(tt,1,tt,en.getLineMaxColumn(tt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),$e.revealLineInCenter(tt))})();const In=(Ue=!1)=>{var Vt;let St=[],mn=[];const Gt=en.getAllDecorations();for(let fn of Gt)fn.options.linesDecorationsClassName==="breakpoints-select"&&(St.push((Vt=fn==null?void 0:fn.range)==null?void 0:Vt.startLineNumber),mn.push(fn==null?void 0:fn.id));if(Ue)return{lines:St,ids:mn};Yt(St)},ke=Ue=>ce(void 0,null,function*(){let Vt={range:new Ce.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield en.deltaDecorations([],[Vt]),In()}),Pe=Ue=>ce(void 0,null,function*(){let Vt=[];const St=$e.getLineDecorations(Ue);for(let mn of St)mn.options.linesDecorationsClassName==="breakpoints-select"&&Vt.push(mn.id);yield en.deltaDecorations(Vt,[]),In()}),Ft=Ue=>{let Vt=$e.getLineDecorations(Ue);for(let St of Vt)if(St.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Zt.isEqual)(At,In(!0).lines)){en.deltaDecorations(In(!0).ids,[]);const Ue=At.map(Vt=>({range:new Ce.Range(Vt,1,Vt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));en.deltaDecorations([],Ue)}const yt=$e.onDidChangeModelContent(Ue=>{let Vt=$e.getPosition();if(Vt){let St=Vt.lineNumber;clearTimeout(yr.current),yr.current=setTimeout(()=>{$t(en.getLineContent(St),St)?Pe(St):Ft(St)?(Pe(St),ke(St)):In()},100)}}),Oe=$e.onMouseDown(Ue=>{var Vt,St,mn;if(Ue.target.detail&&((mn=(St=(Vt=Ue.target)==null?void 0:Vt.element)==null?void 0:St.className)!=null&&mn.includes("line-numbers"))){let Gt=Ue.target.position.lineNumber;if($t(en.getLineContent(Gt),Gt))return;Ft(Gt)?Pe(Gt):ke(Gt)}}),bt=Ue=>{let Vt={range:new Ce.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};jn.current=$e.deltaDecorations(jn.current,[Vt])},Ut=()=>{jn.current=$e.deltaDecorations(jn.current,[])},Jt=$e.onMouseMove(Ue=>{var Vt,St,mn;if(Ut(),Ue.target.detail&&((mn=(St=(Vt=Ue.target)==null?void 0:Vt.element)==null?void 0:St.className)!=null&&mn.includes("line-numbers"))){let Gt=Ue.target.position.lineNumber;if($t(en.getLineContent(Gt),Gt))return;bt(Gt)}}),rn=$e.onMouseLeave(()=>{Ut()});return()=>{yt.dispose(),Oe.dispose(),Jt.dispose(),rn.dispose()}}},[cn.current,Nn,At,tt,ln,z]),(0,se.useEffect)(()=>{var Nt;(Nt=cn.current)!=null&&Nt.instance&&ln&&cn.current.instance.setPosition({lineNumber:0,column:0})},[tt]);function sn(){let Nt=cn.current.instance;if(Nt){const $e=Nt.getSelection(),en=cn.current.pastePos||{},Pn=new Ce.Range(en.startLineNumber||$e.endLineNumber,en.startColumn||$e.endColumn,en.endLineNumber||$e.endLineNumber,en.endColumn||$e.endColumn);setTimeout(()=>{Nt.executeEdits("",[{range:Pn,text:""}])},300)}}function hn(Nt){(window.navigator.platform.match("Mac")?Nt.metaKey:Nt.ctrlKey)&&Nt.keyCode==83&&(Nt.preventDefault(),kt())}const Dn=()=>{if(vt&&cn.current.instance){const Nt=cn.current.instance.getContentHeight();Zn(Nt<oe?oe:Nt)}else Zn(oe)};function Rr(Nt){var $e=document.createEvent("MouseEvents");$e.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Nt.dispatchEvent($e)}const Un=Nt=>{if(!sr.current)return;const{keyCode:$e,ctrlKey:en,metaKey:Pn,target:In,type:ke}=Nt;return(ke==="paste"||($e===67||$e===86)&&(Pn||en))&&In.nodeName==="TEXTAREA"&&(Tn(),Nt.preventDefault()),!1};function $n(Nt,$e){var en=window.URL||window.webkitURL||window,Pn=new Blob([$e]),In=document.createElementNS("http://www.w3.org/1999/xhtml","a");In.href=en.createObjectURL(Pn),In.download=Nt,Rr(In)}(0,se.useEffect)(()=>{Dn()},[Dn]),(0,se.useEffect)(()=>{En.current&&!Nn&&Promise.all([de.e(8909),de.e(2460)]).then(de.bind(de,71448)).then(Nt=>{try{Ce=Nt,cn.current.instance=Ce.editor.create(En.current,{value:ee,language:Ge(z),theme:ge,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Kt||!1}},ne);const $e=cn.current.instance;let In=[...Qe.BH._menuItems].find(yt=>yt[0]._debugName=="EditorContext")[1],ke=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Pe=(yt,Oe)=>{var bt,Ut;let Jt=yt._first;do Oe.includes((Ut=(bt=Jt.element)==null?void 0:bt.command)==null?void 0:Ut.id)&&yt._remove(Jt);while(Jt=Jt.next)};if(Ot($e,Ce),setTimeout(()=>{Dn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{$n(nn||"educoder.txt",$e.getValue())}})},500),cn.current.subscription=$e.onDidChangeModelContent(yt=>{Wr.current?clearTimeout(zr.current):(Dn(),It($e.getValue(),yt)),zr.current=setTimeout(()=>{Wr.current=!1},500)}),window.Monaco||Ne(Ce,Ge(z)),Ct&&(Pe(In,ke),En.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Un),window.removeEventListener("paste",Un),window.addEventListener("keydown",Un),window.addEventListener("paste",Un)),window.Monaco=Ce,Re&&$e.onDidBlurEditorWidget(()=>{Re($e.getValue())}),Xt&&$e.onDidFocusEditorText(()=>{Ct&&Xe(),Xt($e.getValue())}),Ct){Xe();try{$e.onDidPaste(yt=>{const Oe=$e.getSelection(),bt=cn.current.pastePos||{},Ut=new Ce.Range(bt.startLineNumber||Oe.endLineNumber,bt.startColumn||Oe.endColumn,bt.endLineNumber||Oe.endLineNumber,bt.endColumn||Oe.endColumn);$e.executeEdits("",[{range:yt.range,text:""}])})}catch(yt){}}let Ft=Er();return _t&&typeof _t=="string"&&new lt(_t,$e,Ce),ir(!0),()=>{const yt=cn.current.instance;yt.dispose();const Oe=yt.getModel();Oe&&Oe.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Ft.unobserve(En.current)}}catch($e){}})},[]),(0,se.useEffect)(()=>{if(cn.current.instance&&Nn)return document.addEventListener("keydown",hn,!1),()=>{document.removeEventListener("keydown",hn)}},[kt,Nn]),(0,se.useEffect)(()=>{let Nt=cn.current.instance;if(Nt&&Nn){let $e=Ge(z);Ce.editor.setModelLanguage(Nt.getModel(),$e)}},[z,Nn]),(0,se.useEffect)(()=>{cn.current.instance&&Nn&&Ce.editor.setTheme(ge)},[ge,Nn]),(0,se.useEffect)(()=>{let Nt=cn.current.instance;vn.current=le,Nt&&Nn&&(Nt.updateOptions(Et({},le)),setTimeout(()=>{Nt.getModel().updateOptions(Et({},le))},200))},[JSON.stringify(le),Nn]),(0,se.useEffect)(()=>{let Nt=cn.current.instance;Nt&&Nn&&Nt.layout()},[ft,oe,Nn]);const[Tr,lr]=(0,se.useState)(We(ft)),[Bn,Zn]=(0,se.useState)(We(oe)),Or=dt(Et({},re),{width:Tr,height:Bn,position:"relative"});return se.createElement("div",{className:"my-monaco-editor",ref:En,style:Or},Dt&&se.createElement(Ve.CopyToClipboard,{text:ee,onCopy:()=>et.ZP.success("\u590D\u5236\u6210\u529F")},se.createElement(ut.Z,{title:"\u590D\u5236\u4EE3\u7801"},se.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},se.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ht({width:Le="100%",height:nt="100%",original:ft,modified:oe,language:ee,options:z={}}){const re=(0,se.useRef)(),[le,ne]=(0,se.useState)(null);function ge(vt){let Ct;return re.current&&(Ct=new it.Z(It=>{for(let Ot of It)(Ot.target.offsetHeight>0||Ot.target.offsetWidth>0)&&vt.layout()}),Ct.observe(re.current)),Ct}(0,se.useEffect)(()=>(re.current&&Promise.all([de.e(8909),de.e(9404)]).then(de.bind(de,2550)).then(vt=>{Ce=vt;const Ct=Ce.editor.createDiffEditor(re.current,dt(Et({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},z),{wordWrap:!0}));ne(Ct);let It=ge(Ct);return()=>{Ct.dispose();const Ot=Ct.getModel();Ot&&Ot.dispose(),It.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,se.useEffect)(()=>{le&&le.setModel({original:Ce.editor.createModel(ft,ee),modified:Ce.editor.createModel(oe,ee)})},[ft,oe,ee,le]);const Re=We(Le),Dt=We(nt),kt={width:Re,height:Dt};return se.createElement("div",{className:"my-diff-editor",ref:re,style:kt})}},31103:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return it}});var se=de(59301);function it(Fe,Ie){const me=(0,se.useRef)();(0,se.useEffect)(()=>{me.current=Fe}),(0,se.useEffect)(()=>{function ye(){me.current()}if(Ie!==null){let Ae=setInterval(ye,Ie);return()=>clearInterval(Ae)}},[Ie])}},99198:function(Tt,Rt,de){"use strict";de.r(Rt),de.d(Rt,{default:function(){return Ge}});var se=de(59301),it=de(29787),Fe=de(18573),Ie=de(65582),me=de(62673),ye=de(14566),Ae=de(28284),ze=de(6767),we=de(62957),fe=de(37568),Je=de(99571),ve=de(61481),ot=de(74128),Ne=de(25374),Te=Object.defineProperty,Me=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,lt=(Ce,Xe,He)=>Xe in Ce?Te(Ce,Xe,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ce[Xe]=He,Qe=(Ce,Xe)=>{for(var He in Xe||(Xe={}))at.call(Xe,He)&<(Ce,He,Xe[He]);if(qe)for(var He of qe(Xe))ct.call(Xe,He)&<(Ce,He,Xe[He]);return Ce},et=(Ce,Xe)=>Me(Ce,Ee(Xe)),ut=(Ce,Xe)=>{var He={};for(var ht in Ce)at.call(Ce,ht)&&Xe.indexOf(ht)<0&&(He[ht]=Ce[ht]);if(Ce!=null&&qe)for(var ht of qe(Ce))Xe.indexOf(ht)<0&&ct.call(Ce,ht)&&(He[ht]=Ce[ht]);return He};const Zt=me.default.Group,{Dragger:Ye}=ye.default;function Ve(Ce,Xe){const He=new FileReader;He.addEventListener("load",()=>Xe(He.result)),He.readAsDataURL(Ce)}var gt=({callback:Ce,tags:Xe=[],initialValues:He={},removeAttachment:ht})=>{const[Le,nt]=(0,se.useState)(""),[ft]=Ae.default.useForm();function oe(ne){const ge=ne,{cover_id:Re,attachment_ids:Dt}=ge,kt=ut(ge,["cover_id","attachment_ids"]);Ce(et(Qe({},kt),{cover_id:Re==null?void 0:Re.map(vt=>vt.response?vt.response.id:vt.uid)[(Re==null?void 0:Re.length)-1],attachment_ids:Dt?Dt==null?void 0:Dt.map(vt=>vt.response?vt.response.id:vt.uid):[]}))}function ee(ne){return Array.isArray(ne)?ne:ne&&ne.fileList}const z={multiple:!0,beforeUpload:ne=>{const ge=ne.size/1024/1024<100;if(!ge)return ze.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),ge},action:`${ot.Z.API_SERVER}/api/attachments.json`,onRemove:ne=>{we.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:()=>ht(ne.response?ne.response.id:ne.uid),onCancel:()=>!1})}};function re(ne){ne.file.status==="done"&&Ve(ne.file.originFileObj,ge=>nt(ge))}const le={showUploadList:!1,withCredentials:!0,action:`${ot.Z.API_SERVER}/api/attachments.json`,onChange:re};return(0,se.useEffect)(()=>{He.title&&(ft.setFieldsValue(He),He.cover_id.length>0&&nt(ot.Z.IMG_SERVER+He.cover_id[0].url))},[He]),se.createElement(Ae.default,{form:ft,initialValues:He,className:"moop-panel",style:{marginBottom:20},onFinish:oe},se.createElement(Ae.default.Item,{label:"\u6807\u9898",name:"title",extra:se.createElement("div",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},se.createElement(fe.default,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),se.createElement("div",{className:"flex-container"},se.createElement(Ae.default.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},se.createElement(fe.default,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),se.createElement(Ae.default.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},se.createElement(fe.default,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),se.createElement(Ae.default.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},se.createElement(Zt,null,Xe.map(ne=>se.createElement(me.default,{key:ne.id,value:ne.id}," ",ne.name," ")))),se.createElement(Ae.default.Item,{name:"publish",valuePropName:"checked"},se.createElement(me.default,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),se.createElement(Ae.default.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},se.createElement(Ne.Z,{id:"moop_cases_content",height:400})),se.createElement(Ae.default.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:ee},se.createElement(Ye,Qe({},z),se.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),se.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),se.createElement(Ae.default.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:ee,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},se.createElement(ye.default,Qe({},le),Le?se.createElement("img",{src:Le,width:120}):se.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",se.createElement(ve.Z,null)," "))),se.createElement("div",{className:"desc"},se.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),se.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),se.createElement("div",{className:"desc"},se.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),se.createElement("ul",{style:{padding:0}},se.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),se.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",se.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",se.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),se.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),se.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),se.createElement(Ae.default.Item,{style:{marginTop:10}},se.createElement(Je.ZP,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},Be=de(80024),Ze=Object.defineProperty,De=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,dt=(Ce,Xe,He)=>Xe in Ce?Ze(Ce,Xe,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ce[Xe]=He,pe=(Ce,Xe)=>{for(var He in Xe||(Xe={}))mt.call(Xe,He)&&dt(Ce,He,Xe[He]);if(Bt)for(var He of Bt(Xe))Et.call(Xe,He)&&dt(Ce,He,Xe[He]);return Ce},ce=(Ce,Xe)=>De(Ce,_e(Xe)),We=(Ce,Xe,He)=>new Promise((ht,Le)=>{var nt=ee=>{try{oe(He.next(ee))}catch(z){Le(z)}},ft=ee=>{try{oe(He.throw(ee))}catch(z){Le(z)}},oe=ee=>ee.done?ht(ee.value):Promise.resolve(ee.value).then(nt,ft);oe((He=He.apply(Ce,Xe)).next())});const pt={loading:!1,data:{},tags:[]};var st=(Ce=>(Ce[Ce.GET_DATA=0]="GET_DATA",Ce[Ce.SET_LOADING=1]="SET_LOADING",Ce[Ce.GET_TAGS=2]="GET_TAGS",Ce))(st||{});function xe(Ce,Xe){switch(Xe.type){case 0:return pe(pe({},Ce),Xe.payload);case 2:return ce(pe({},Ce),{tags:Xe.payload});case 1:return ce(pe({},Ce),{loading:Xe.payload});default:throw new Error}}var Ge=()=>{const{caseId:Ce}=(0,Ie.useParams)(),[Xe,He]=(0,se.useReducer)(xe,pt),{loading:ht,tags:Le,data:nt}=Xe;(0,se.useEffect)(()=>{function ee(){return We(this,null,function*(){const z=yield(0,Be.rO)();He({type:2,payload:z.library_tags})})}ee()},[]),(0,se.useEffect)(()=>{let ee=!1;function z(){return We(this,null,function*(){He({type:1,payload:!1});let re=yield(0,Be.$J)(Ce);const{author_name:le,author_school_name:ne,content:ge,cover:Re,attachments:Dt,status:kt,title:vt,tags:Ct}=re;ee||(re.status===404?Ie.history.push("/moop_cases"):He({type:0,payload:{data:{title:vt,author_name:le,author_school_name:ne,content:ge,tag_ids:Ct.map(It=>It.id),publish:kt==="published",attachment_ids:Dt.map(It=>({uid:It.id,id:It.id,name:It.title,url:It.url,filesize:It.filesize,status:"done"})),cover_id:Re!=null&&Re.id?[{uid:Re==null?void 0:Re.id,id:Re==null?void 0:Re.id,name:Re==null?void 0:Re.title,url:Re==null?void 0:Re.url,filesize:Re==null?void 0:Re.filesize,status:"done"}]:[]},loading:!1}}))})}return!ee&&Ce&&z(),()=>{ee=!0}},[Ce]);function ft(ee){return We(this,null,function*(){if(Ce)yield(0,Be.bN)(Ce,ee),Ie.history.push(`/moop_cases/${Ce}/publish-success`);else{const{id:z}=yield(0,Be.jP)(ee);z&&Ie.history.push(`/moop_cases/${z}/publish-success`)}})}const oe={initialValues:nt,tags:Le,removeAttachment:Be.JZ,callback:ft};return se.createElement(it.Z,{spinning:ht,delay:500},se.createElement("div",{className:"moop-info"},se.createElement("div",{className:"crumb"},se.createElement(Ie.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),se.createElement("span",null,"\u65B0\u5EFA")),se.createElement("div",{className:"title"},se.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),se.createElement(Ie.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),se.createElement(gt,pe({},oe))))}},80024:function(Tt,Rt,de){"use strict";de.d(Rt,{$J:function(){return Fe},JZ:function(){return me},bN:function(){return Ae},jP:function(){return ye},rO:function(){return Ie}});var se=de(38147),it=(ze,we,fe)=>new Promise((Je,ve)=>{var ot=Me=>{try{Te(fe.next(Me))}catch(Ee){ve(Ee)}},Ne=Me=>{try{Te(fe.throw(Me))}catch(Ee){ve(Ee)}},Te=Me=>Me.done?Je(Me.value):Promise.resolve(Me.value).then(ot,Ne);Te((fe=fe.apply(ze,we)).next())});function Fe(ze){return(0,se.U2)(`libraries/${ze}.json`)}function Ie(){return(0,se.U2)("library_tags.json")}function me(ze){return it(this,null,function*(){return(yield(0,se.IV)(`attachments/${ze}.json`)).status===0})}function ye(ze){return(0,se.v_)("libraries.json",ze)}function Ae(ze,we){return(0,se.gz)(`libraries/${ze}.json`,we)}},49142:function(Tt,Rt,de){"use strict";de.d(Rt,{AL:function(){return lt},Iy:function(){return Je},Qv:function(){return Ne},ez:function(){return ct},jb:function(){return ve}});var se=de(32834),it=de.n(se),Fe=de(11690),Ie=de.n(Fe);let me=1;function ye(Ye,Ve){const gt=Ye.match(/^(\s+)(?:```)/);if(gt===null)return Ve;const Be=gt[1];return Ve.split(`
|
|
`).map(Ze=>{const De=Ze.match(/^\s+/);if(De===null)return Ze;const[_e]=De;return _e.length>=Be.length?Ze.slice(Be.length):Ze}).join(`
|
|
`)}let Ae=[],ze=["<ul>"];const we=new(it()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Je(){Ae.length=0,ze=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ot(Ye,Ve,gt,Be){if(Ve>=Ye.length||Ye[Ve].level<=gt)return Ve;var Ze=Ye[Ve];Be.push("<li><a href='#"+me+Ze.anchor+"'>"+Ze.text+"</a>"),Ve++;var De=[];return Ve=ot(Ye,Ve,Ze.level,De),De.length>0&&(Be.push("<ul>"),De.forEach(function(_e){Be.push(_e)}),Be.push("</ul>")),Be.push("</li>"),Ve=ot(Ye,Ve,gt,Be),Ve}function Ne(){return ot(Ae,0,0,ze),ze.push("</ul>"),ze.join("")}const Te={heading(Ye){const Ve=fe.exec(Ye);if(me+=1,Ve)return{type:"heading",raw:Ve[0],depth:Ve[1].length,text:Ve[2]}},fences(Ye){const Ve=this.rules.block.fences.exec(Ye);if(Ve){const gt=Ve[0];let Be=ye(gt,Ve[3]||"");const Ze=Ve[2]?Ve[2].trim():Ve[2];if(["latex","katex","math"].indexOf(Ze)>=0){const De=qe(),_e=Be;Be=De,at[De]={type:"block",expression:_e}}return{type:"code",raw:gt,lang:Ze,text:Be}}}},Me=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ee=0;const qe=()=>`__special_katext_id_${Ee++}__`;let at={};function ct(){return at}function lt(){Ee=0,at={}}function Qe(Ye){return Ye=Ye.replace(Me,(Ve,gt)=>{const Be=qe();return at[Be]={type:"inline",expression:gt},Be}),Ye}const et=we.listitem;we.listitem=function(Ye){return et(Qe(Ye))};const ut=we.paragraph;we.paragraph=function(Ye){return ut(Qe(Ye))};const Zt=we.tablecell;we.tablecell=function(Ye,Ve){return Zt(Qe(Ye),Ve)},we.code=function(Ye,Ve,gt){const Be=(Ve||"").match(/\S*/)[0];return Be?["latex","katex","math"].indexOf(Be)>=0?`<p class='editormd-tex'>${Ye}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ve}">${gt?Ye:(0,Fe.escape)(Ye,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(gt?Ye:(0,Fe.escape)(Ye,!0))+"</code></pre>"},we.heading=function(Ye,Ve,gt){let Be=this.options.headerPrefix+gt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ae.push({anchor:Be,level:Ve,text:Ye}),"<h"+Ve+' id="'+me+Be+'">'+Ye+"</h"+Ve+">"},it().setOptions({silent:!0,gfm:!0,pedantic:!1}),it().use({tokenizer:Te,renderer:we}),Rt.ZP=it()},99498:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){se.defineOption("placeholder","",function(ze,we,fe){var Je=fe&&fe!=se.Init;if(we&&!Je)ze.on("blur",me),ze.on("change",ye),ze.on("swapDoc",ye),se.on(ze.getInputField(),"compositionupdate",ze.state.placeholderCompose=function(){Ie(ze)}),ye(ze);else if(!we&&Je){ze.off("blur",me),ze.off("change",ye),ze.off("swapDoc",ye),se.off(ze.getInputField(),"compositionupdate",ze.state.placeholderCompose),it(ze);var ve=ze.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}we&&!ze.hasFocus()&&me(ze)});function it(ze){ze.state.placeholder&&(ze.state.placeholder.parentNode.removeChild(ze.state.placeholder),ze.state.placeholder=null)}function Fe(ze){it(ze);var we=ze.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=ze.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var fe=ze.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),we.appendChild(fe),ze.display.lineSpace.insertBefore(we,ze.display.lineSpace.firstChild)}function Ie(ze){setTimeout(function(){var we=!1,fe=ze.getInputField();fe.nodeName=="TEXTAREA"?we=!fe.value:ze.lineCount()==1&&(we=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),we?Fe(ze):it(ze)},20)}function me(ze){Ae(ze)&&Fe(ze)}function ye(ze){var we=ze.getWrapperElement(),fe=Ae(ze);we.className=we.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Fe(ze):it(ze)}function Ae(ze){return ze.lineCount()===1&&ze.getLine(0)===""}})},25717:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){var it={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=se.Pos;se.defineOption("autoCloseBrackets",!1,function(Te,Me,Ee){Ee&&Ee!=se.Init&&(Te.removeKeyMap(me),Te.state.closeBrackets=null),Me&&(ye(Ie(Me,"pairs")),Te.state.closeBrackets=Me,Te.addKeyMap(me))});function Ie(Te,Me){return Me=="pairs"&&typeof Te=="string"?Te:typeof Te=="object"&&Te[Me]!=null?Te[Me]:it[Me]}var me={Backspace:we,Enter:fe};function ye(Te){for(var Me=0;Me<Te.length;Me++){var Ee=Te.charAt(Me),qe="'"+Ee+"'";me[qe]||(me[qe]=Ae(Ee))}}ye(it.pairs+"`");function Ae(Te){return function(Me){return ve(Me,Te)}}function ze(Te){var Me=Te.state.closeBrackets;if(!Me||Me.override)return Me;var Ee=Te.getModeAt(Te.getCursor());return Ee.closeBrackets||Me}function we(Te){var Me=ze(Te);if(!Me||Te.getOption("disableInput"))return se.Pass;for(var Ee=Ie(Me,"pairs"),qe=Te.listSelections(),at=0;at<qe.length;at++){if(!qe[at].empty())return se.Pass;var ct=ot(Te,qe[at].head);if(!ct||Ee.indexOf(ct)%2!=0)return se.Pass}for(var at=qe.length-1;at>=0;at--){var lt=qe[at].head;Te.replaceRange("",Fe(lt.line,lt.ch-1),Fe(lt.line,lt.ch+1),"+delete")}}function fe(Te){var Me=ze(Te),Ee=Me&&Ie(Me,"explode");if(!Ee||Te.getOption("disableInput"))return se.Pass;for(var qe=Te.listSelections(),at=0;at<qe.length;at++){if(!qe[at].empty())return se.Pass;var ct=ot(Te,qe[at].head);if(!ct||Ee.indexOf(ct)%2!=0)return se.Pass}Te.operation(function(){var lt=Te.lineSeparator()||`
|
|
`;Te.replaceSelection(lt+lt,null),Te.execCommand("goCharLeft"),qe=Te.listSelections();for(var Qe=0;Qe<qe.length;Qe++){var et=qe[Qe].head.line;Te.indentLine(et,null,!0),Te.indentLine(et+1,null,!0)}})}function Je(Te){var Me=se.cmpPos(Te.anchor,Te.head)>0;return{anchor:new Fe(Te.anchor.line,Te.anchor.ch+(Me?-1:1)),head:new Fe(Te.head.line,Te.head.ch+(Me?1:-1))}}function ve(Te,Me){var Ee=ze(Te);if(!Ee||Te.getOption("disableInput"))return se.Pass;var qe=Ie(Ee,"pairs"),at=qe.indexOf(Me);if(at==-1)return se.Pass;for(var ct=Ie(Ee,"closeBefore"),lt=Ie(Ee,"triples"),Qe=qe.charAt(at+1)==Me,et=Te.listSelections(),ut=at%2==0,Zt,Ye=0;Ye<et.length;Ye++){var Ve=et[Ye],gt=Ve.head,Be,Ze=Te.getRange(gt,Fe(gt.line,gt.ch+1));if(ut&&!Ve.empty())Be="surround";else if((Qe||!ut)&&Ze==Me)Qe&&Ne(Te,gt)?Be="both":lt.indexOf(Me)>=0&&Te.getRange(gt,Fe(gt.line,gt.ch+3))==Me+Me+Me?Be="skipThree":Be="skip";else if(Qe&>.ch>1&<.indexOf(Me)>=0&&Te.getRange(Fe(gt.line,gt.ch-2),gt)==Me+Me){if(gt.ch>2&&/\bstring/.test(Te.getTokenTypeAt(Fe(gt.line,gt.ch-2))))return se.Pass;Be="addFour"}else if(Qe){var De=gt.ch==0?" ":Te.getRange(Fe(gt.line,gt.ch-1),gt);if(!se.isWordChar(Ze)&&De!=Me&&!se.isWordChar(De))Be="both";else return se.Pass}else if(ut&&(Ze.length===0||/\s/.test(Ze)||ct.indexOf(Ze)>-1))Be="both";else return se.Pass;if(!Zt)Zt=Be;else if(Zt!=Be)return se.Pass}var _e=at%2?qe.charAt(at-1):Me,Bt=at%2?Me:qe.charAt(at+1);Te.operation(function(){if(Zt=="skip")Te.execCommand("goCharRight");else if(Zt=="skipThree")for(var mt=0;mt<3;mt++)Te.execCommand("goCharRight");else if(Zt=="surround"){for(var Et=Te.getSelections(),mt=0;mt<Et.length;mt++)Et[mt]=_e+Et[mt]+Bt;Te.replaceSelections(Et,"around"),Et=Te.listSelections().slice();for(var mt=0;mt<Et.length;mt++)Et[mt]=Je(Et[mt]);Te.setSelections(Et)}else Zt=="both"?(Te.replaceSelection(_e+Bt,null),Te.triggerElectric(_e+Bt),Te.execCommand("goCharLeft")):Zt=="addFour"&&(Te.replaceSelection(_e+_e+_e+_e,"before"),Te.execCommand("goCharRight"))})}function ot(Te,Me){var Ee=Te.getRange(Fe(Me.line,Me.ch-1),Fe(Me.line,Me.ch+1));return Ee.length==2?Ee:null}function Ne(Te,Me){var Ee=Te.getTokenAt(Fe(Me.line,Me.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==Me.ch&&(Me.ch==0||!/\bstring/.test(Te.getTokenTypeAt(Me)))}})},6313:function(Tt,Rt,de){(function(se){se(de(89780),de(32855))})(function(se){se.defineOption("autoCloseTags",!1,function(we,fe,Je){if(Je!=se.Init&&Je&&we.removeKeyMap("autoCloseTags"),!!fe){var ve={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(ve["'/'"]=function(ot){return ye(ot)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(ve["'>'"]=function(ot){return Ie(ot)}),we.addKeyMap(ve)}});var it=["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 Ie(we){if(we.getOption("disableInput"))return se.Pass;for(var fe=we.listSelections(),Je=[],ve=we.getOption("autoCloseTags"),ot=0;ot<fe.length;ot++){if(!fe[ot].empty())return se.Pass;var Ne=fe[ot].head,Te=we.getTokenAt(Ne),Me=se.innerMode(we.getMode(),Te.state),Ee=Me.state,qe=Me.mode.xmlCurrentTag&&Me.mode.xmlCurrentTag(Ee),at=qe&&qe.name;if(!at)return se.Pass;var ct=Me.mode.configuration=="html",lt=typeof ve=="object"&&ve.dontCloseTags||ct&&it,Qe=typeof ve=="object"&&ve.indentTags||ct&&Fe;Te.end>Ne.ch&&(at=at.slice(0,at.length-Te.end+Ne.ch));var et=at.toLowerCase();if(!at||Te.type=="string"&&(Te.end!=Ne.ch||!/[\"\']/.test(Te.string.charAt(Te.string.length-1))||Te.string.length==1)||Te.type=="tag"&&qe.close||Te.string.indexOf("/")==Ne.ch-Te.start-1||lt&&Ae(lt,et)>-1||ze(we,Me.mode.xmlCurrentContext&&Me.mode.xmlCurrentContext(Ee)||[],at,Ne,!0))return se.Pass;var ut=typeof ve=="object"&&ve.emptyTags;if(ut&&Ae(ut,at)>-1){Je[ot]={text:"/>",newPos:se.Pos(Ne.line,Ne.ch+2)};continue}var Zt=Qe&&Ae(Qe,et)>-1;Je[ot]={indent:Zt,text:">"+(Zt?`
|
|
|
|
`:"")+"</"+at+">",newPos:Zt?se.Pos(Ne.line+1,0):se.Pos(Ne.line,Ne.ch+1)}}for(var Ye=typeof ve=="object"&&ve.dontIndentOnAutoClose,ot=fe.length-1;ot>=0;ot--){var Ve=Je[ot];we.replaceRange(Ve.text,fe[ot].head,fe[ot].anchor,"+insert");var gt=we.listSelections().slice(0);gt[ot]={head:Ve.newPos,anchor:Ve.newPos},we.setSelections(gt),!Ye&&Ve.indent&&(we.indentLine(Ve.newPos.line,null,!0),we.indentLine(Ve.newPos.line+1,null,!0))}}function me(we,fe){for(var Je=we.listSelections(),ve=[],ot=fe?"/":"</",Ne=we.getOption("autoCloseTags"),Te=typeof Ne=="object"&&Ne.dontIndentOnSlash,Me=0;Me<Je.length;Me++){if(!Je[Me].empty())return se.Pass;var Ee=Je[Me].head,qe=we.getTokenAt(Ee),at=se.innerMode(we.getMode(),qe.state),ct=at.state;if(fe&&(qe.type=="string"||qe.string.charAt(0)!="<"||qe.start!=Ee.ch-1))return se.Pass;var lt,Qe=at.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Qe&&at.mode.name=="javascript")lt=ot+"script";else if(Qe&&at.mode.name=="css")lt=ot+"style";else{var et=at.mode.xmlCurrentContext&&at.mode.xmlCurrentContext(ct);if(!et||et.length&&ze(we,et,et[et.length-1],Ee))return se.Pass;lt=ot+et[et.length-1]}we.getLine(Ee.line).charAt(qe.end)!=">"&&(lt+=">"),ve[Me]=lt}if(we.replaceSelections(ve),Je=we.listSelections(),!Te)for(var Me=0;Me<Je.length;Me++)(Me==Je.length-1||Je[Me].head.line<Je[Me+1].head.line)&&we.indentLine(Je[Me].head.line)}function ye(we){return we.getOption("disableInput")?se.Pass:me(we,!0)}se.commands.closeTag=function(we){return me(we)};function Ae(we,fe){if(we.indexOf)return we.indexOf(fe);for(var Je=0,ve=we.length;Je<ve;++Je)if(we[Je]==fe)return Je;return-1}function ze(we,fe,Je,ve,ot){if(!se.scanForClosingTag)return!1;var Ne=Math.min(we.lastLine()+1,ve.line+500),Te=se.scanForClosingTag(we,ve,null,Ne);if(!Te||Te.tag!=Je)return!1;for(var Me=ot?1:0,Ee=fe.length-1;Ee>=0&&fe[Ee]==Je;Ee--)++Me;ve=Te.to;for(var Ee=1;Ee<Me;Ee++){var qe=se.scanForClosingTag(we,ve,null,Ne);if(!qe||qe.tag!=Je)return!1;ve=qe.to}return!0}})},32855:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){"use strict";var it=se.Pos;function Fe(Ee,qe){return Ee.line-qe.line||Ee.ch-qe.ch}var Ie="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=Ie+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("<(/?)(["+Ie+"]["+me+"]*)","g");function Ae(Ee,qe,at,ct){this.line=qe,this.ch=at,this.cm=Ee,this.text=Ee.getLine(qe),this.min=ct?Math.max(ct.from,Ee.firstLine()):Ee.firstLine(),this.max=ct?Math.min(ct.to-1,Ee.lastLine()):Ee.lastLine()}function ze(Ee,qe){var at=Ee.cm.getTokenTypeAt(it(Ee.line,qe));return at&&/\btag\b/.test(at)}function we(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function fe(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function Je(Ee){for(;;){var qe=Ee.text.indexOf(">",Ee.ch);if(qe==-1){if(we(Ee))continue;return}if(!ze(Ee,qe+1)){Ee.ch=qe+1;continue}var at=Ee.text.lastIndexOf("/",qe),ct=at>-1&&!/\S/.test(Ee.text.slice(at+1,qe));return Ee.ch=qe+1,ct?"selfClose":"regular"}}function ve(Ee){for(;;){var qe=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(qe==-1){if(fe(Ee))continue;return}if(!ze(Ee,qe+1)){Ee.ch=qe;continue}ye.lastIndex=qe,Ee.ch=qe;var at=ye.exec(Ee.text);if(at&&at.index==qe)return at}}function ot(Ee){for(;;){ye.lastIndex=Ee.ch;var qe=ye.exec(Ee.text);if(!qe){if(we(Ee))continue;return}if(!ze(Ee,qe.index+1)){Ee.ch=qe.index+1;continue}return Ee.ch=qe.index+qe[0].length,qe}}function Ne(Ee){for(;;){var qe=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(qe==-1){if(fe(Ee))continue;return}if(!ze(Ee,qe+1)){Ee.ch=qe;continue}var at=Ee.text.lastIndexOf("/",qe),ct=at>-1&&!/\S/.test(Ee.text.slice(at+1,qe));return Ee.ch=qe+1,ct?"selfClose":"regular"}}function Te(Ee,qe){for(var at=[];;){var ct=ot(Ee),lt,Qe=Ee.line,et=Ee.ch-(ct?ct[0].length:0);if(!ct||!(lt=Je(Ee)))return;if(lt!="selfClose")if(ct[1]){for(var ut=at.length-1;ut>=0;--ut)if(at[ut]==ct[2]){at.length=ut;break}if(ut<0&&(!qe||qe==ct[2]))return{tag:ct[2],from:it(Qe,et),to:it(Ee.line,Ee.ch)}}else at.push(ct[2])}}function Me(Ee,qe){for(var at=[];;){var ct=Ne(Ee);if(!ct)return;if(ct=="selfClose"){ve(Ee);continue}var lt=Ee.line,Qe=Ee.ch,et=ve(Ee);if(!et)return;if(et[1])at.push(et[2]);else{for(var ut=at.length-1;ut>=0;--ut)if(at[ut]==et[2]){at.length=ut;break}if(ut<0&&(!qe||qe==et[2]))return{tag:et[2],from:it(Ee.line,Ee.ch),to:it(lt,Qe)}}}}se.registerHelper("fold","xml",function(Ee,qe){for(var at=new Ae(Ee,qe.line,0);;){var ct=ot(at);if(!ct||at.line!=qe.line)return;var lt=Je(at);if(!lt)return;if(!ct[1]&<!="selfClose"){var Qe=it(at.line,at.ch),et=Te(at,ct[2]);return et&&Fe(et.from,Qe)>0?{from:Qe,to:et.from}:null}}}),se.findMatchingTag=function(Ee,qe,at){var ct=new Ae(Ee,qe.line,qe.ch,at);if(!(ct.text.indexOf(">")==-1&&ct.text.indexOf("<")==-1)){var lt=Je(ct),Qe=lt&&it(ct.line,ct.ch),et=lt&&ve(ct);if(!(!lt||!et||Fe(ct,qe)>0)){var ut={from:it(ct.line,ct.ch),to:Qe,tag:et[2]};return lt=="selfClose"?{open:ut,close:null,at:"open"}:et[1]?{open:Me(ct,et[2]),close:ut,at:"close"}:(ct=new Ae(Ee,Qe.line,Qe.ch,at),{open:ut,close:Te(ct,et[2]),at:"open"})}}},se.findEnclosingTag=function(Ee,qe,at,ct){for(var lt=new Ae(Ee,qe.line,qe.ch,at);;){var Qe=Me(lt,ct);if(!Qe)break;var et=new Ae(Ee,qe.line,qe.ch,at),ut=Te(et,Qe.tag);if(ut)return{open:Qe,close:ut}}},se.scanForClosingTag=function(Ee,qe,at,ct){var lt=new Ae(Ee,qe.line,qe.ch,ct?{from:0,to:ct}:null);return Te(lt,at)}})},89780:function(Tt){(function(Rt,de){Tt.exports=de()})(this,function(){"use strict";var Rt=navigator.userAgent,de=navigator.platform,se=/gecko\/\d/i.test(Rt),it=/MSIE \d/.test(Rt),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Rt),Ie=/Edge\/(\d+)/.exec(Rt),me=it||Fe||Ie,ye=me&&(it?document.documentMode||6:+(Ie||Fe)[1]),Ae=!Ie&&/WebKit\//.test(Rt),ze=Ae&&/Qt\/\d+\.\d+/.test(Rt),we=!Ie&&/Chrome\//.test(Rt),fe=/Opera\//.test(Rt),Je=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Rt),ot=/PhantomJS/.test(Rt),Ne=!Ie&&/AppleWebKit/.test(Rt)&&/Mobile\/\w+/.test(Rt),Te=/Android/.test(Rt),Me=Ne||Te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Rt),Ee=Ne||/Mac/.test(de),qe=/\bCrOS\b/.test(Rt),at=/win/i.test(de),ct=fe&&Rt.match(/Version\/(\d*\.\d*)/);ct&&(ct=Number(ct[1])),ct&&ct>=15&&(fe=!1,Ae=!0);var lt=Ee&&(ze||fe&&(ct==null||ct<12.11)),Qe=se||me&&ye>=9;function et(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ut=function(a,y){var x=a.className,b=et(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 Zt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ye(a,y){return Zt(a).appendChild(y)}function Ve(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 te=0;te<y.length;++te)E.appendChild(y[te]);return E}function gt(a,y,x,b){var E=Ve(a,y,x,b);return E.setAttribute("role","presentation"),E}var Be;document.createRange?Be=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Be=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 Ze(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 De(){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 _e(a,y){var x=a.className;et(y).test(x)||(a.className+=(x?" ":"")+y)}function Bt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!et(x[b]).test(y)&&(y+=" "+x[b]);return y}var mt=function(a){a.select()};Ne?mt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(mt=function(a){try{a.select()}catch(y){}});function Et(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function dt(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 te=b||0,ie=E||0;;){var ae=a.indexOf(" ",te);if(ae<0||ae>=y)return ie+(y-te);ie+=ae-te,ie+=x-ie%x,te=ae+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=Et(this.onTimeout,this)};ce.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ce.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 We(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var pt=50,st={toString:function(){return"CodeMirror.Pass"}},xe={scroll:!1},Ge={origin:"*mouse"},Ce={origin:"+move"};function Xe(a,y,x){for(var b=0,E=0;;){var te=a.indexOf(" ",b);te==-1&&(te=a.length);var ie=te-b;if(te==a.length||E+ie>=y)return b+Math.min(ie,y-E);if(E+=te-b,E+=x-E%x,b=te+1,E>=y)return b}}var He=[""];function ht(a){for(;He.length<=a;)He.push(Le(He)+" ");return He[a]}function Le(a){return a[a.length-1]}function nt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function ft(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function oe(){}function ee(a,y){var x;return Object.create?x=Object.create(a):(oe.prototype=a,x=new oe),y&&dt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var ge=/[\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 Re(a){return a.charCodeAt(0)>=768&&ge.test(a)}function Dt(a,y,x){for(;(x<0?y>0:y<a.length)&&Re(a.charAt(y));)y+=x;return y}function kt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,te=b<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:x;a(te)?x=te:y=te+b}}function vt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var ie=a[te];(ie.from<x&&ie.to>y||y==x&&ie.to==y)&&(b(Math.max(ie.from,y),Math.min(ie.to,x),ie.level==1?"rtl":"ltr",te),E=!0)}E||b(y,x,"ltr")}var Ct=null;function It(a,y,x){var b;Ct=null;for(var E=0;E<a.length;++E){var te=a[E];if(te.from<y&&te.to>y)return E;te.to==y&&(te.from!=te.to&&x=="before"?b=E:Ct=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:Ct=E)}return b!=null?b:Ct}var Ot=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,te=/[LRr]/,ie=/[Lb1n]/,ae=/[1n]/;function ue(he,be,Se){this.level=he,this.from=be,this.to=Se}return function(he,be){var Se=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var Ke=he.length,je=[],wt=0;wt<Ke;++wt)je.push(x(he.charCodeAt(wt)));for(var Mt=0,zt=Se;Mt<Ke;++Mt){var Qt=je[Mt];Qt=="m"?je[Mt]=zt:zt=Qt}for(var an=0,qt=Se;an<Ke;++an){var dn=je[an];dn=="1"&&qt=="r"?je[an]="n":te.test(dn)&&(qt=dn,dn=="r"&&(je[an]="R"))}for(var Cn=1,gn=je[0];Cn<Ke-1;++Cn){var zn=je[Cn];zn=="+"&&gn=="1"&&je[Cn+1]=="1"?je[Cn]="1":zn==","&&gn==je[Cn+1]&&(gn=="1"||gn=="n")&&(je[Cn]=gn),gn=zn}for(var Ar=0;Ar<Ke;++Ar){var ti=je[Ar];if(ti==",")je[Ar]="N";else if(ti=="%"){var Nr=void 0;for(Nr=Ar+1;Nr<Ke&&je[Nr]=="%";++Nr);for(var Pi=Ar&&je[Ar-1]=="!"||Nr<Ke&&je[Nr]=="1"?"1":"N",Si=Ar;Si<Nr;++Si)je[Si]=Pi;Ar=Nr-1}}for(var Yr=0,ki=Se;Yr<Ke;++Yr){var si=je[Yr];ki=="L"&&si=="1"?je[Yr]="L":te.test(si)&&(ki=si)}for(var Qr=0;Qr<Ke;++Qr)if(E.test(je[Qr])){var Xr=void 0;for(Xr=Qr+1;Xr<Ke&&E.test(je[Xr]);++Xr);for(var _r=(Qr?je[Qr-1]:Se)=="L",Ei=(Xr<Ke?je[Xr]:Se)=="L",jo=_r==Ei?_r?"L":"R":Se,yo=Qr;yo<Xr;++yo)je[yo]=jo;Qr=Xr-1}for(var di=[],qi,ni=0;ni<Ke;)if(ie.test(je[ni])){var bs=ni;for(++ni;ni<Ke&&ie.test(je[ni]);++ni);di.push(new ue(0,bs,ni))}else{var oo=ni,Lo=di.length,Mo=be=="rtl"?1:0;for(++ni;ni<Ke&&je[ni]!="L";++ni);for(var gi=oo;gi<ni;)if(ae.test(je[gi])){oo<gi&&(di.splice(Lo,0,new ue(1,oo,gi)),Lo+=Mo);var Uo=gi;for(++gi;gi<ni&&ae.test(je[gi]);++gi);di.splice(Lo,0,new ue(2,Uo,gi)),Lo+=Mo,oo=gi}else++gi;oo<ni&&di.splice(Lo,0,new ue(1,oo,ni))}return be=="ltr"&&(di[0].level==1&&(qi=he.match(/^\s+/))&&(di[0].from=qi[0].length,di.unshift(new ue(0,0,qi[0].length))),Le(di).level==1&&(qi=he.match(/\s+$/))&&(Le(di).to-=qi[0].length,di.push(new ue(0,Ke-qi[0].length,Ke)))),be=="rtl"?di.reverse():di}}();function Xt(a,y){var x=a.order;return x==null&&(x=a.order=Ot(a.text,y)),x}var Yt=[],At=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]||Yt).concat(x)}};function nn(a,y){return a._handlers&&a._handlers[y]||Yt}function jt(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 te=We(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function tn(a,y){var x=nn(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 tt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),tn(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function ln(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)We(x,y[b])==-1&&x.push(y[b])}function _t(a,y){return nn(a,y).length>0}function Kt(a){a.prototype.on=function(y,x){At(this,y,x)},a.prototype.off=function(y,x){jt(this,y,x)}}function on(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function En(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function vn(a){on(a),En(a)}function Jn(a){return a.target||a.srcElement}function jn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ee&&a.ctrlKey&&y==1&&(y=3),y}var Wr=function(){if(me&&ye<9)return!1;var a=Ve("div");return"draggable"in a||"dragDrop"in a}(),zr;function yr(a){if(zr==null){var y=Ve("span","\u200B");Ye(a,Ve("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(zr=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&ye<8))}var x=zr?Ve("span","\u200B"):Ve("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var sr;function Nn(a){if(sr!=null)return sr;var y=Ye(a,document.createTextNode("A\u062EA")),x=Be(y,0,1).getBoundingClientRect(),b=Be(y,1,2).getBoundingClientRect();return Zt(a),!x||x.left==x.right?!1:sr=b.right-x.right<3}var ir=`
|
|
|
|
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 te=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=te.indexOf("\r");ie!=-1?(x.push(te.slice(0,ie)),y+=ie+1):(x.push(te),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Er=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},Tn=function(){var a=Ve("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),qn=null;function $t(a){if(qn!=null)return qn;var y=Ye(a,Ve("span","x")),x=y.getBoundingClientRect(),b=Be(y,0,1).getBoundingClientRect();return qn=Math.abs(x.left-b.left)>1}var sn={},hn={};function Dn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),sn[a]=y}function Rr(a,y){hn[a]=y}function Un(a){if(typeof a=="string"&&hn.hasOwnProperty(a))a=hn[a];else if(a&&typeof a.name=="string"&&hn.hasOwnProperty(a.name)){var y=hn[a.name];typeof y=="string"&&(y={name:y}),a=ee(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Un("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Un("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function $n(a,y){y=Un(y);var x=sn[y.name];if(!x)return $n(a,"text/plain");var b=x(a,y);if(Tr.hasOwnProperty(y.name)){var E=Tr[y.name];for(var te in E)E.hasOwnProperty(te)&&(b.hasOwnProperty(te)&&(b["_"+te]=b[te]),b[te]=E[te])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)b[ie]=y.modeProps[ie];return b}var Tr={};function lr(a,y){var x=Tr.hasOwnProperty(a)?Tr[a]:Tr[a]={};dt(y,x)}function Bn(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 Zn(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 Or(a,y,x){return a.startState?a.startState(y,x):!0}var Nt=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};Nt.prototype.eol=function(){return this.pos>=this.string.length},Nt.prototype.sol=function(){return this.pos==this.lineStart},Nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Nt.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},Nt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Nt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Nt.prototype.skipToEnd=function(){this.pos=this.string.length},Nt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Nt.prototype.backUp=function(a){this.pos-=a},Nt.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)},Nt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Nt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(ie){return x?ie.toLowerCase():ie},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var te=this.string.slice(this.pos).match(a);return te&&te.index>0?null:(te&&y!==!1&&(this.pos+=te[0].length),te)}},Nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Nt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Nt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function $e(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],te=E.chunkSize();if(y<te){x=E;break}y-=te}return x.lines[y]}function en(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(te){var ie=te.text;E==x.line&&(ie=ie.slice(0,x.ch)),E==y.line&&(ie=ie.slice(y.ch)),b.push(ie),++E}),b}function Pn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function In(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function ke(a){if(a.parent==null)return null;for(var y=a.parent,x=We(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 Pe(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],te=E.height;if(y<te){a=E;continue e}y-=te,x+=E.chunkSize()}return x}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var ae=a.lines[ie],ue=ae.height;if(y<ue)break;y-=ue}return x+ie}function Ft(a,y){return y>=a.first&&y<a.first+a.size}function yt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Oe(a,y,x){if(x===void 0&&(x=null),!(this instanceof Oe))return new Oe(a,y,x);this.line=a,this.ch=y,this.sticky=x}function bt(a,y){return a.line-y.line||a.ch-y.ch}function Ut(a,y){return a.sticky==y.sticky&&bt(a,y)==0}function Jt(a){return Oe(a.line,a.ch)}function rn(a,y){return bt(a,y)<0?y:a}function Ue(a,y){return bt(a,y)<0?a:y}function Vt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function St(a,y){if(y.line<a.first)return Oe(a.first,0);var x=a.first+a.size-1;return y.line>x?Oe(x,$e(a,x).text.length):mn(y,$e(a,y.line).text.length)}function mn(a,y){var x=a.ch;return x==null||x>y?Oe(a.line,y):x<0?Oe(a.line,0):a}function Gt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=St(a,y[b]);return x}var fn=function(a,y){this.state=a,this.lookAhead=y},un=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(a,y,x){return y instanceof fn?new un(a,Bn(a.mode,y.state),x,y.lookAhead):new un(a,Bn(a.mode,y),x)},un.prototype.save=function(a){var y=a!==!1?Bn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],te={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},te,b);for(var ie=x.state,ae=function(he){x.baseTokens=E;var be=a.state.overlays[he],Se=1,Ke=0;x.state=!0,Qn(a,y.text,be.mode,x,function(je,wt){for(var Mt=Se;Ke<je;){var zt=E[Se];zt>je&&E.splice(Se,1,je,E[Se+1],zt),Se+=2,Ke=Math.min(je,zt)}if(wt)if(be.opaque)E.splice(Mt,Se-Mt,je,"overlay "+wt),Se=Mt+2;else for(;Mt<Se;Mt+=2){var Qt=E[Mt+1];E[Mt+1]=(Qt?Qt+" ":"")+"overlay "+wt}},te),x.state=ie,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)ae(ue);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function yn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Wn(a,ke(y)),E=y.text.length>a.options.maxHighlightLength&&Bn(a.doc.mode,b.state),te=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.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 Wn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new un(b,!0,y);var te=ur(a,y,x),ie=te>b.first&&$e(b,te-1).stateAfter,ae=ie?un.fromSaved(b,ie,te):new un(b,Or(b.mode),te);return b.iter(te,y,function(ue){Kn(a,ue.text,ae);var he=ae.line;ue.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function Kn(a,y,x,b){var E=a.doc.mode,te=new Nt(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&On(E,x.state);!te.eol();)ar(E,te,x.state),te.start=te.pos}function On(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Zn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function ar(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Zn(a,x).mode);var te=a.token(y,x);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var Ln=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function mr(a,y,x,b){var E=a.doc,te=E.mode,ie;y=St(E,y);var ae=$e(E,y.line),ue=Wn(a,y.line,x),he=new Nt(ae.text,a.options.tabSize,ue),be;for(b&&(be=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,ie=ar(te,he,ue.state),b&&be.push(new Ln(he,ie,Bn(E.mode,ue.state)));return b?be:new Ln(he,ie,ue.state)}function Pr(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,te,ie){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var ue=0,he=null,be=new Nt(y,a.options.tabSize,b),Se,Ke=a.options.addModeClass&&[null];for(y==""&&Pr(On(x,b.state),te);!be.eol();){if(be.pos>a.options.maxHighlightLength?(ae=!1,ie&&Kn(a,y,b,be.pos),be.pos=y.length,Se=null):Se=Pr(ar(x,be,b.state,Ke),te),Ke){var je=Ke[0].name;je&&(Se="m-"+(Se?je+" "+Se:je))}if(!ae||he!=Se){for(;ue<be.start;)ue=Math.min(be.start,ue+5e3),E(ue,he);he=Se}be.start=be.pos}for(;ue<be.pos;){var wt=Math.min(be.pos,ue+5e3);E(wt,he),ue=wt}}function ur(a,y,x){for(var b,E,te=a.doc,ie=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>ie;--ae){if(ae<=te.first)return te.first;var ue=$e(te,ae-1),he=ue.stateAfter;if(he&&(!x||ae+(he instanceof fn?he.lookAhead:0)<=te.modeFrontier))return ae;var be=pe(ue.text,null,a.options.tabSize);(E==null||b>be)&&(E=ae-1,b=be)}return E}function wr(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=$e(a,b).stateAfter;if(E&&(!(E instanceof fn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var cr=!1,Gn=!1;function Cr(){cr=!0}function er(){Gn=!0}function tr(a,y,x){this.marker=a,this.from=y,this.to=x}function hr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Dr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function dr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Yn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,ae=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);if(ae||te.from==y&&ie.type=="bookmark"&&(!x||!te.marker.insertLeft)){var ue=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);(b||(b=[])).push(new tr(ie,te.from,ue?null:te.to))}}return b}function Hn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,ae=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);if(ae||te.from==y&&ie.type=="bookmark"&&(!x||te.marker.insertLeft)){var ue=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);(b||(b=[])).push(new tr(ie,ue?null:te.from-y,te.to==null?null:te.to-y))}}return b}function nr(a,y){if(y.full)return null;var x=Ft(a,y.from.line)&&$e(a,y.from.line).markedSpans,b=Ft(a,y.to.line)&&$e(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,te=y.to.ch,ie=bt(y.from,y.to)==0,ae=Yn(x,E,ie),ue=Hn(b,te,ie),he=y.text.length==1,be=Le(y.text).length+(he?E:0);if(ae)for(var Se=0;Se<ae.length;++Se){var Ke=ae[Se];if(Ke.to==null){var je=hr(ue,Ke.marker);je?he&&(Ke.to=je.to==null?null:je.to+be):Ke.to=E}}if(ue)for(var wt=0;wt<ue.length;++wt){var Mt=ue[wt];if(Mt.to!=null&&(Mt.to+=be),Mt.from==null){var zt=hr(ae,Mt.marker);zt||(Mt.from=be,he&&(ae||(ae=[])).push(Mt))}else Mt.from+=be,he&&(ae||(ae=[])).push(Mt)}ae&&(ae=Zr(ae)),ue&&ue!=ae&&(ue=Zr(ue));var Qt=[ae];if(!he){var an=y.text.length-2,qt;if(an>0&&ae)for(var dn=0;dn<ae.length;++dn)ae[dn].to==null&&(qt||(qt=[])).push(new tr(ae[dn].marker,null,null));for(var Cn=0;Cn<an;++Cn)Qt.push(qt);Qt.push(ue)}return Qt}function Zr(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 Lr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(je){if(je.markedSpans)for(var wt=0;wt<je.markedSpans.length;++wt){var Mt=je.markedSpans[wt].marker;Mt.readOnly&&(!b||We(b,Mt)==-1)&&(b||(b=[])).push(Mt)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var ie=b[te],ae=ie.find(0),ue=0;ue<E.length;++ue){var he=E[ue];if(!(bt(he.to,ae.from)<0||bt(he.from,ae.to)>0)){var be=[ue,1],Se=bt(he.from,ae.from),Ke=bt(he.to,ae.to);(Se<0||!ie.inclusiveLeft&&!Se)&&be.push({from:he.from,to:ae.from}),(Ke>0||!ie.inclusiveRight&&!Ke)&&be.push({from:ae.to,to:he.to}),E.splice.apply(E,be),ue+=be.length-3}}return E}function br(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function ri(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Sr(a){return a.inclusiveLeft?-1:0}function li(a){return a.inclusiveRight?1:0}function qr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),te=bt(b.from,E.from)||Sr(a)-Sr(y);if(te)return-te;var ie=bt(b.to,E.to)||li(a)-li(y);return ie||y.id-a.id}function Br(a,y){var x=Gn&&a.markedSpans,b;if(x)for(var E=void 0,te=0;te<x.length;++te)E=x[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||qr(b,E.marker)<0)&&(b=E.marker);return b}function Mn(a){return Br(a,!0)}function Pt(a){return Br(a,!1)}function Ht(a,y){var x=Gn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var te=x[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!b||qr(b,te.marker)<0)&&(b=te.marker)}return b}function xt(a,y,x,b,E){var te=$e(a,y),ie=Gn&&te.markedSpans;if(ie)for(var ae=0;ae<ie.length;++ae){var ue=ie[ae];if(ue.marker.collapsed){var he=ue.marker.find(0),be=bt(he.from,x)||Sr(ue.marker)-Sr(E),Se=bt(he.to,b)||li(ue.marker)-li(E);if(!(be>=0&&Se<=0||be<=0&&Se>=0)&&(be<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?bt(he.to,x)>=0:bt(he.to,x)>0)||be>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?bt(he.from,b)<=0:bt(he.from,b)<0)))return!0}}}function rt(a){for(var y;y=Mn(a);)a=y.find(-1,!0).line;return a}function Lt(a){for(var y;y=Pt(a);)a=y.find(1,!0).line;return a}function Wt(a){for(var y,x;y=Pt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function pn(a,y){var x=$e(a,y),b=rt(x);return x==b?y:ke(b)}function bn(a,y){if(y>a.lastLine())return y;var x=$e(a,y),b;if(!Rn(a,x))return y;for(;b=Pt(x);)x=b.find(1,!0).line;return ke(x)+1}function Rn(a,y){var x=Gn&&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&&Vn(a,y,b))return!0}}}function Vn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Vn(a,b.line,hr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,te=0;te<y.markedSpans.length;++te)if(E=y.markedSpans[te],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&Vn(a,y,E))return!0}function _n(a){a=rt(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 te=x.parent;te;x=te,te=x.parent)for(var ie=0;ie<te.children.length;++ie){var ae=te.children[ie];if(ae==x)break;y+=ae.height}return y}function fr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Mn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Pt(b);){var te=x.find(0,!0);y-=b.text.length-te.from.ch,b=te.to.line,y+=b.text.length-te.to.ch}return y}function rr(a){var y=a.display,x=a.doc;y.maxLine=$e(x,x.first),y.maxLineLength=fr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=fr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Fr=function(a,y,x){this.text=a,ri(this,y),this.height=x?x(this):1};Fr.prototype.lineNo=function(){return ke(this)},Kt(Fr);function Di(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),br(a),ri(a,x);var E=b?b(a):1;E!=a.height&&In(a,E)}function ii(a){a.parent=null,br(a)}var Gr={},ui={};function gr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?ui:Gr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function fi(a,y){var x=gt("span",null,null,Ae?"padding-right: .1px":null),b={pre:gt("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 te=E?y.rest[E-1]:y.line,ie=void 0;b.pos=0,b.addToken=pr,Nn(a.display.measure)&&(ie=Xt(te,a.doc.direction))&&(b.addToken=pi(b.addToken,ie)),b.map=[];var ae=y!=a.display.externalMeasured&&ke(te);bi(te,b,yn(a,te,ae)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=Bt(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=Bt(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(yr(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(Ae){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return tn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Bt(b.pre.className,b.textClass||"")),b}function Bi(a){var y=Ve("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function pr(a,y,x,b,E,te,ie){if(y){var ae=a.splitSpaces?yi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,he=!1,be;if(!ue.test(y))a.col+=y.length,be=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,be),me&&ye<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Se=0;;){ue.lastIndex=Se;var Ke=ue.exec(y),je=Ke?Ke.index-Se:y.length-Se;if(je){var wt=document.createTextNode(ae.slice(Se,Se+je));me&&ye<9?be.appendChild(Ve("span",[wt])):be.appendChild(wt),a.map.push(a.pos,a.pos+je,wt),a.col+=je,a.pos+=je}if(!Ke)break;Se+=je+1;var Mt=void 0;if(Ke[0]==" "){var zt=a.cm.options.tabSize,Qt=zt-a.col%zt;Mt=be.appendChild(Ve("span",ht(Qt),"cm-tab")),Mt.setAttribute("role","presentation"),Mt.setAttribute("cm-text"," "),a.col+=Qt}else Ke[0]=="\r"||Ke[0]==`
|
|
`?(Mt=be.appendChild(Ve("span",Ke[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Mt.setAttribute("cm-text",Ke[0]),a.col+=1):(Mt=a.cm.options.specialCharPlaceholder(Ke[0]),Mt.setAttribute("cm-text",Ke[0]),me&&ye<9?be.appendChild(Ve("span",[Mt])):be.appendChild(Mt),a.col+=1);a.map.push(a.pos,a.pos+1,Mt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||he||te||ie){var an=x||"";b&&(an+=b),E&&(an+=E);var qt=Ve("span",[be],an,te);if(ie)for(var dn in ie)ie.hasOwnProperty(dn)&&dn!="style"&&dn!="class"&&qt.setAttribute(dn,ie[dn]);return a.content.appendChild(qt)}a.content.appendChild(be)}}function yi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function pi(a,y){return function(x,b,E,te,ie,ae,ue){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,be=he+b.length;;){for(var Se=void 0,Ke=0;Ke<y.length&&(Se=y[Ke],!(Se.to>he&&Se.from<=he));Ke++);if(Se.to>=be)return a(x,b,E,te,ie,ae,ue);a(x,b.slice(0,Se.to-he),E,te,null,ae,ue),te=null,b=b.slice(Se.to-he),he=Se.to}}}function Hi(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 bi(a,y,x){var b=a.markedSpans,E=a.text,te=0;if(!b){for(var ie=1;ie<x.length;ie+=2)y.addToken(y,E.slice(te,te=x[ie]),gr(x[ie+1],y.cm.options));return}for(var ae=E.length,ue=0,he=1,be="",Se,Ke,je=0,wt,Mt,zt,Qt,an;;){if(je==ue){wt=Mt=zt=Ke="",an=null,Qt=null,je=1/0;for(var qt=[],dn=void 0,Cn=0;Cn<b.length;++Cn){var gn=b[Cn],zn=gn.marker;if(zn.type=="bookmark"&&gn.from==ue&&zn.widgetNode)qt.push(zn);else if(gn.from<=ue&&(gn.to==null||gn.to>ue||zn.collapsed&&gn.to==ue&&gn.from==ue)){if(gn.to!=null&&gn.to!=ue&&je>gn.to&&(je=gn.to,Mt=""),zn.className&&(wt+=" "+zn.className),zn.css&&(Ke=(Ke?Ke+";":"")+zn.css),zn.startStyle&&gn.from==ue&&(zt+=" "+zn.startStyle),zn.endStyle&&gn.to==je&&(dn||(dn=[])).push(zn.endStyle,gn.to),zn.title&&((an||(an={})).title=zn.title),zn.attributes)for(var Ar in zn.attributes)(an||(an={}))[Ar]=zn.attributes[Ar];zn.collapsed&&(!Qt||qr(Qt.marker,zn)<0)&&(Qt=gn)}else gn.from>ue&&je>gn.from&&(je=gn.from)}if(dn)for(var ti=0;ti<dn.length;ti+=2)dn[ti+1]==je&&(Mt+=" "+dn[ti]);if(!Qt||Qt.from==ue)for(var Nr=0;Nr<qt.length;++Nr)Hi(y,0,qt[Nr]);if(Qt&&(Qt.from||0)==ue){if(Hi(y,(Qt.to==null?ae+1:Qt.to)-ue,Qt.marker,Qt.from==null),Qt.to==null)return;Qt.to==ue&&(Qt=!1)}}if(ue>=ae)break;for(var Pi=Math.min(ae,je);;){if(be){var Si=ue+be.length;if(!Qt){var Yr=Si>Pi?be.slice(0,Pi-ue):be;y.addToken(y,Yr,Se?Se+wt:wt,zt,ue+Yr.length==je?Mt:"",Ke,an)}if(Si>=Pi){be=be.slice(Pi-ue),ue=Pi;break}ue=Si,zt=""}be=E.slice(te,te=x[he++]),Se=gr(x[he++],y.cm.options)}}}function _i(a,y,x){this.line=y,this.rest=Wt(y),this.size=this.rest?ke(Le(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Rn(a,y)}function kr(a,y,x){for(var b=[],E,te=y;te<x;te=E){var ie=new _i(a.doc,$e(a.doc,te),te);E=te+ie.size,b.push(ie)}return b}var Fi=null;function $i(a){Fi?Fi.ops.push(a):a.ownsGroup=Fi={ops:[a],delayedCallbacks:[]}}function eo(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 Vo(a,y){var x=a.ownsGroup;if(x)try{eo(x)}finally{Fi=null,y(x)}}var Yi=null;function Hr(a,y){var x=nn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Fi?E=Fi.delayedCallbacks:Yi?E=Yi:(E=Yi=[],setTimeout(to,0));for(var te=function(ae){E.push(function(){return x[ae].apply(null,b)})},ie=0;ie<x.length;++ie)te(ie)}}function to(){var a=Yi;Yi=null;for(var y=0;y<a.length;++y)a[y]()}function ao(a,y,x,b){for(var E=0;E<y.changes.length;E++){var te=y.changes[E];te=="text"?so(a,y):te=="gutter"?An(a,y,x,b):te=="class"?wn(a,y):te=="widget"&&Sn(a,y,b)}y.changes=null}function zi(a){return a.node==a.text&&(a.node=Ve("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&ye<8&&(a.node.style.zIndex=2)),a.node}function Kr(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(Ve("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function bo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):fi(a,y)}function so(a,y){var x=y.text.className,b=bo(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,wn(a,y)):x&&(y.text.className=x)}function wn(a,y){Kr(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 An(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=Ve("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 te=y.line.gutterMarkers;if(a.options.lineNumbers||te){var ie=zi(y),ae=y.gutter=Ve("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),ie.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Ve("div",yt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var he=a.display.gutterSpecs[ue].className,be=te.hasOwnProperty(he)&&te[he];be&&ae.appendChild(Ve("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Sn(a,y,x){y.alignable&&(y.alignable=null);for(var b=et("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);or(a,y,x)}function kn(a,y,x,b){var E=bo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),wn(a,y),An(a,y,x,b),or(a,y,b),y.node}function or(a,y,x){if(Mr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Mr(a,y.rest[b],y,x,!1)}function Mr(a,y,x,b,E){if(y.widgets)for(var te=zi(x),ie=0,ae=y.widgets;ie<ae.length;++ie){var ue=ae[ie],he=Ve("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Zi(ue,he,x,b),a.display.input.setUneditable(he),E&&ue.above?te.insertBefore(he,x.gutter||x.text):te.appendChild(he),Hr(ue,"redraw")}}function Zi(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 vi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ze(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;"),Ye(y.display.measure,Ve("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function oi(a,y){for(var x=Jn(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 jr(a){return a.lineSpace.offsetTop}function Oi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Xi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ye(a.measure,Ve("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 Li(a){return pt-a.display.nativeBarWidth}function Ji(a){return a.display.scroller.clientWidth-Li(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Li(a)-a.display.barHeight}function Gi(a,y,x){var b=a.options.lineWrapping,E=b&&Ji(a);if(!y.measure.heights||b&&y.measure.width!=E){var te=y.measure.heights=[];if(b){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),ae=0;ae<ie.length-1;ae++){var ue=ie[ae],he=ie[ae+1];Math.abs(ue.bottom-he.bottom)>2&&te.push((ue.bottom+he.top)/2-x.top)}}te.push(x.bottom-x.top)}}function Ao(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(ke(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=rt(y);var x=ke(y),b=a.display.externalMeasured=new _i(a.doc,y,x);b.lineN=x;var E=b.built=fi(a,b);return b.text=E.pre,Ye(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Ni(a,lo(a,y),x,b)}function Qi(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[Co(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function lo(a,y){var x=ke(y),b=Qi(a,x);b&&!b.text?b=null:b&&b.changes&&(ao(a,b,x,uo(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Ao(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Ni(a,y,x,b,E){y.before&&(x=-1);var te=x+(b||""),ie;return y.cache.hasOwnProperty(te)?ie=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Gi(a,y.view,y.rect),y.hasHeights=!0),ie=wa(a,y,x,b),ie.bogus||(y.cache[te]=ie)),{left:ie.left,right:ie.right,top:E?ie.rtop:ie.top,bottom:E?ie.rbottom:ie.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,te,ie,ae,ue,he=0;he<a.length;he+=3)if(ae=a[he],ue=a[he+1],y<ae?(E=0,te=1,ie="left"):y<ue?(E=y-ae,te=E+1):(he==a.length-3||y==ue&&a[he+3]>y)&&(te=ue-ae,E=te-1,y>=ue&&(ie="right")),E!=null){if(b=a[he+2],ae==ue&&x==(b.insertLeft?"left":"right")&&(ie=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],ie="left";if(x=="right"&&E==ue-ae)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],ie="right";break}return{node:b,start:E,end:te,collapse:ie,coverStart:ae,coverEnd:ue}}function Ua(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),te=E.node,ie=E.start,ae=E.end,ue=E.collapse,he;if(te.nodeType==3){for(var be=0;be<4;be++){for(;ie&&Re(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+ae<E.coverEnd&&Re(y.line.text.charAt(E.coverStart+ae));)++ae;if(me&&ye<9&&ie==0&&ae==E.coverEnd-E.coverStart?he=te.parentNode.getBoundingClientRect():he=Ua(Be(te,ie,ae).getClientRects(),b),he.left||he.right||ie==0)break;ae=ie,ie=ie-1,ue="right"}me&&ye<11&&(he=Va(a.display.measure,he))}else{ie>0&&(ue=b="right");var Se;a.options.lineWrapping&&(Se=te.getClientRects()).length>1?he=Se[b=="right"?Se.length-1:0]:he=te.getBoundingClientRect()}if(me&&ye<9&&!ie&&(!he||!he.left&&!he.right)){var Ke=te.parentNode.getClientRects()[0];Ke?he={left:Ke.left,right:Ke.left+Ui(a.display),top:Ke.top,bottom:Ke.bottom}:he=ba}for(var je=he.top-y.rect.top,wt=he.bottom-y.rect.top,Mt=(je+wt)/2,zt=y.view.measure.heights,Qt=0;Qt<zt.length-1&&!(Mt<zt[Qt]);Qt++);var an=Qt?zt[Qt-1]:0,qt=zt[Qt],dn={left:(ue=="right"?he.right:he.left)-y.rect.left,right:(ue=="left"?he.left:he.right)-y.rect.left,top:an,bottom:qt};return!he.left&&!he.right&&(dn.bogus=!0),a.options.singleCursorHeightPerLine||(dn.rtop=je,dn.rbottom=wt),dn}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!$t(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,Zt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function xo(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 we&&Te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&Te?-(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+=vi(a.widgets[x]));return y}function To(a,y,x,b,E){if(!E){var te=Jo(y);x.top+=te,x.bottom+=te}if(b=="line")return x;b||(b="local");var ie=_n(y);if(b=="local"?ie+=jr(a.display):ie-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();ie+=ae.top+(b=="window"?0:Ca());var ue=ae.left+(b=="window"?0:Xo());x.left+=ue,x.right+=ue}return x.top+=ie,x.bottom+=ie,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 te=a.display.sizer.getBoundingClientRect();b+=te.left,E+=te.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:b-ie.left,top:E-ie.top}}function Po(a,y,x,b,E){return b||(b=$e(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function xi(a,y,x,b,E,te){b=b||$e(a.doc,y.line),E||(E=lo(a,b));function ie(wt,Mt){var zt=Ni(a,E,wt,Mt?"right":"left",te);return Mt?zt.left=zt.right:zt.right=zt.left,To(a,b,zt,x)}var ae=Xt(b,a.doc.direction),ue=y.ch,he=y.sticky;if(ue>=b.text.length?(ue=b.text.length,he="before"):ue<=0&&(ue=0,he="after"),!ae)return ie(he=="before"?ue-1:ue,he=="before");function be(wt,Mt,zt){var Qt=ae[Mt],an=Qt.level==1;return ie(zt?wt-1:wt,an!=zt)}var Se=It(ae,ue,he),Ke=Ct,je=be(ue,Se,he=="before");return Ke!=null&&(je.other=be(ue,Ke,he!="before")),je}function Xn(a,y){var x=0;y=St(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=$e(a.doc,y.line),E=_n(b)+jr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Fn(a,y,x,b,E){var te=Oe(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function ai(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Fn(b.first,0,null,-1,-1);var E=Pe(b,x),te=b.first+b.size-1;if(E>te)return Fn(b.first+b.size-1,$e(b,te).text.length,null,1,1);y<0&&(y=0);for(var ie=$e(b,E);;){var ae=ji(a,ie,E,y,x),ue=Ht(ie,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!ue)return ae;var he=ue.find(1);if(he.line==E)return he;ie=$e(b,E=he.line)}}function ci(a,y,x,b){b-=Jo(y);var E=y.text.length,te=kt(function(ie){return Ni(a,x,ie-1).bottom<=b},E,0);return E=kt(function(ie){return Ni(a,x,ie).top>b},te,E),{begin:te,end:E}}function Ur(a,y,x,b){x||(x=lo(a,y));var E=To(a,y,Ni(a,x,b),"line").top;return ci(a,y,x,E)}function Jr(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function ji(a,y,x,b,E){E-=_n(y);var te=lo(a,y),ie=Jo(y),ae=0,ue=y.text.length,he=!0,be=Xt(y,a.doc.direction);if(be){var Se=(a.options.lineWrapping?ro:Wi)(a,y,x,te,be,b,E);he=Se.level!=1,ae=he?Se.from:Se.to-1,ue=he?Se.to:Se.from-1}var Ke=null,je=null,wt=kt(function(Cn){var gn=Ni(a,te,Cn);return gn.top+=ie,gn.bottom+=ie,Jr(gn,b,E,!1)?(gn.top<=E&&gn.left<=b&&(Ke=Cn,je=gn),!0):!1},ae,ue),Mt,zt,Qt=!1;if(je){var an=b-je.left<je.right-b,qt=an==he;wt=Ke+(qt?0:1),zt=qt?"after":"before",Mt=an?je.left:je.right}else{!he&&(wt==ue||wt==ae)&&wt++,zt=wt==0?"after":wt==y.text.length?"before":Ni(a,te,wt-(he?1:0)).bottom+ie<=E==he?"after":"before";var dn=xi(a,Oe(x,wt,zt),"line",y,te);Mt=dn.left,Qt=E<dn.top?-1:E>=dn.bottom?1:0}return wt=Dt(y.text,wt,1),Fn(x,wt,zt,Qt,b-Mt)}function Wi(a,y,x,b,E,te,ie){var ae=kt(function(Se){var Ke=E[Se],je=Ke.level!=1;return Jr(xi(a,Oe(x,je?Ke.to:Ke.from,je?"before":"after"),"line",y,b),te,ie,!0)},0,E.length-1),ue=E[ae];if(ae>0){var he=ue.level!=1,be=xi(a,Oe(x,he?ue.from:ue.to,he?"after":"before"),"line",y,b);Jr(be,te,ie,!0)&&be.top>ie&&(ue=E[ae-1])}return ue}function ro(a,y,x,b,E,te,ie){var ae=ci(a,y,b,ie),ue=ae.begin,he=ae.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,Se=null,Ke=0;Ke<E.length;Ke++){var je=E[Ke];if(!(je.from>=he||je.to<=ue)){var wt=je.level!=1,Mt=Ni(a,b,wt?Math.min(he,je.to)-1:Math.max(ue,je.from)).right,zt=Mt<te?te-Mt+1e9:Mt-te;(!be||Se>zt)&&(be=je,Se=zt)}}return be||(be=E[E.length-1]),be.from<ue&&(be={from:ue,to:be.to,level:be.level}),be.to>he&&(be={from:be.from,to:he,level:be.level}),be}var Mi;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Mi==null){Mi=Ve("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Mi.appendChild(document.createTextNode("x")),Mi.appendChild(Ve("br"));Mi.appendChild(document.createTextNode("x"))}Ye(a.measure,Mi);var x=Mi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Zt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ve("span","xxxxxxxxxx"),x=Ve("pre",[y],"CodeMirror-line-like");Ye(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function uo(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,te=y.gutters.firstChild,ie=0;te;te=te.nextSibling,++ie){var ae=a.display.gutterSpecs[ie].className;x[ae]=te.offsetLeft+te.clientLeft+E,b[ae]=te.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=Ai(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 te=0;if(E.widgets)for(var ie=0;ie<E.widgets.length;ie++)E.widgets[ie].height&&(te+=E.widgets[ie].height);return x?te+(Math.ceil(E.text.length/b)||1)*y:te+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&In(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&Jn(y).getAttribute("cm-not-content")=="true")return null;var te,ie,ae=E.lineSpace.getBoundingClientRect();try{te=y.clientX-ae.left,ie=y.clientY-ae.top}catch(Se){return null}var ue=ai(a,te,ie),he;if(b&&ue.xRel>0&&(he=$e(a.doc,ue.line).text).length==ue.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;ue=Oe(ue.line,Math.max(0,Math.round((te-Xi(a.display).left)/Ui(a.display))-be))}return ue}function Co(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 wi(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)Gn&&pn(a.doc,y)<E.viewTo&&ho(a);else if(x<=E.viewFrom)Gn&&bn(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 te=ka(a,x,x+b,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var ie=ka(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):ho(a)}else{var ae=ka(a,y,y,-1),ue=ka(a,x,x+b,1);ae&&ue?(E.view=E.view.slice(0,ae.index).concat(kr(a,ae.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):ho(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function co(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 te=b.view[Co(a,y)];if(te.node!=null){var ie=te.changes||(te.changes=[]);We(ie,x)==-1&&ie.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=Co(a,y),te,ie=a.display.view;if(!Gn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,ue=0;ue<E;ue++)ae+=ie[ue].size;if(ae!=y){if(b>0){if(E==ie.length-1)return null;te=ae+ie[E].size-y,E++}else te=ae-y;y+=te,x+=te}for(;pn(a.doc,x)!=x;){if(E==(b<0?0:ie.length-1))return null;x+=b*ie[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=kr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=kr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(Co(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(kr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,Co(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(),te=b.selection=document.createDocumentFragment(),ie=0;ie<x.sel.ranges.length;ie++)if(!(!y&&ie==x.sel.primIndex)){var ae=x.sel.ranges[ie];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var ue=ae.empty();(ue||a.options.showCursorWhenSelecting)&&ks(a,ae.head,E),ue||_l(a,ae,te)}}return b}function ks(a,y,x){var b=xi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ve("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 te=x.appendChild(Ve("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=b.other.left+"px",te.style.top=b.other.top+"px",te.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function _l(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),ie=Xi(a.display),ae=ie.left,ue=Math.max(b.sizerWidth,Ji(a)-b.sizer.offsetLeft)-ie.right,he=E.direction=="ltr";function be(qt,dn,Cn,gn){dn<0&&(dn=0),dn=Math.round(dn),gn=Math.round(gn),te.appendChild(Ve("div",null,"CodeMirror-selected","position: absolute; left: "+qt+`px;
|
|
top: `+dn+"px; width: "+(Cn==null?ue-qt:Cn)+`px;
|
|
height: `+(gn-dn)+"px"))}function Se(qt,dn,Cn){var gn=$e(E,qt),zn=gn.text.length,Ar,ti;function Nr(Yr,ki){return Po(a,Oe(qt,Yr),"div",gn,ki)}function Pi(Yr,ki,si){var Qr=Ur(a,gn,null,Yr),Xr=ki=="ltr"==(si=="after")?"left":"right",_r=si=="after"?Qr.begin:Qr.end-(/\s/.test(gn.text.charAt(Qr.end-1))?2:1);return Nr(_r,Xr)[Xr]}var Si=Xt(gn,E.direction);return vt(Si,dn||0,Cn==null?zn:Cn,function(Yr,ki,si,Qr){var Xr=si=="ltr",_r=Nr(Yr,Xr?"left":"right"),Ei=Nr(ki-1,Xr?"right":"left"),jo=dn==null&&Yr==0,yo=Cn==null&&ki==zn,di=Qr==0,qi=!Si||Qr==Si.length-1;if(Ei.top-_r.top<=3){var ni=(he?jo:yo)&&di,bs=(he?yo:jo)&&qi,oo=ni?ae:(Xr?_r:Ei).left,Lo=bs?ue:(Xr?Ei:_r).right;be(oo,_r.top,Lo-oo,_r.bottom)}else{var Mo,gi,Uo,xs;Xr?(Mo=he&&jo&&di?ae:_r.left,gi=he?ue:Pi(Yr,si,"before"),Uo=he?ae:Pi(ki,si,"after"),xs=he&&yo&&qi?ue:Ei.right):(Mo=he?Pi(Yr,si,"before"):ae,gi=!he&&jo&&di?ue:_r.right,Uo=!he&&yo&&qi?ae:Ei.left,xs=he?Pi(ki,si,"after"):ue),be(Mo,_r.top,gi-Mo,_r.bottom),_r.bottom<Ei.top&&be(ae,_r.bottom,null,Ei.top),be(Uo,Ei.top,xs-Uo,Ei.bottom)}(!Ar||Ea(_r,Ar)<0)&&(Ar=_r),Ea(Ei,Ar)<0&&(Ar=Ei),(!ti||Ea(_r,ti)<0)&&(ti=_r),Ea(Ei,ti)<0&&(ti=Ei)}),{start:Ar,end:ti}}var Ke=y.from(),je=y.to();if(Ke.line==je.line)Se(Ke.line,Ke.ch,je.ch);else{var wt=$e(E,Ke.line),Mt=$e(E,je.line),zt=rt(wt)==rt(Mt),Qt=Se(Ke.line,Ke.ch,zt?wt.text.length+1:null).end,an=Se(je.line,zt?0:null,je.ch).start;zt&&(Qt.top<an.top-2?(be(Qt.right,Qt.top,null,Qt.bottom),be(ae,an.top,an.left,an.bottom)):be(Qt.right,Qt.top,an.left-Qt.right,Qt.bottom)),Qt.bottom<an.top&&be(ae,Qt.bottom,null,an.top)}x.appendChild(te)}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()||Bo(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,Bo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(tn(a,"focus",a,y),a.state.focused=!0,_e(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ae&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Bo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(tn(a,"blur",a,y),a.state.focused=!1,ut(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],te=a.options.lineWrapping,ie=void 0,ae=0;if(!E.hidden){if(me&&ye<8){var ue=E.node.offsetTop+E.node.offsetHeight;ie=ue-x,x=ue}else{var he=E.node.getBoundingClientRect();ie=he.bottom-he.top,!te&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var be=E.line.height-ie;if((be>.005||be<-.005)&&(In(E.line,ie),Ls(E.line),E.rest))for(var Se=0;Se<E.rest.length;Se++)Ls(E.rest[Se]);if(ae>a.display.sizerWidth){var Ke=Math.ceil(ae/Ui(a.display));Ke>a.display.maxLineLength&&(a.display.maxLineLength=Ke,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-jr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,te=Pe(y,b),ie=Pe(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,ue=x.ensure.to.line;ae<te?(te=ae,ie=Pe(y,_n($e(y,ae))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=ie&&(te=Pe(y,_n($e(y,ue))-a.wrapper.clientHeight),ie=ue)}return{from:te,to:Math.max(ie,te+1)}}function zl(a,y){if(!tt(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&&!ot){var te=Ve("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-jr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Li(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(te),te.scrollIntoView(E),a.display.lineSpace.removeChild(te)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Oe(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Oe(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var ie=!1,ae=xi(a,y),ue=!x||x==y?ae:xi(a,x);E={left:Math.min(ae.left,ue.left),top:Math.min(ae.top,ue.top)-b,right:Math.max(ae.left,ue.left),bottom:Math.max(ae.bottom,ue.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,Se=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(ie=!0)),he.scrollLeft!=null&&(So(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Se)>1&&(ie=!0)),!ie)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&So(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,te=no(a),ie={};y.bottom-y.top>te&&(y.bottom=y.top+te);var ae=a.doc.height+Oi(x),ue=y.top<b,he=y.bottom>ae-b;if(y.top<E)ie.scrollTop=ue?0:y.top;else if(y.bottom>E+te){var be=Math.min(y.top,(he?ae:y.bottom)-te);be!=E&&(ie.scrollTop=be)}var Se=a.options.fixedGutter?0:x.gutters.offsetWidth,Ke=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Se,je=Ji(a)-x.gutters.offsetWidth,wt=y.right-y.left>je;return wt&&(y.right=y.left+je),y.left<10?ie.scrollLeft=0:y.left<Ke?ie.scrollLeft=Math.max(0,y.left+Se-(wt?0:10)):y.right>je+Ke-3&&(ie.scrollLeft=y.right+(wt?0:10)-je),ie}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Fo(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Xn(a,y.from),b=Xn(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||(se||es(a,{top:y}),As(a,y,!0),se&&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 So(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,Rs(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+Oi(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+Li(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=Ve("div",[Ve("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ve("div",[Ve("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),At(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),At(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ye<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.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 te=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+te)+"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}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=Ee&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),te=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);te!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.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 Ro(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ts(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),Ts(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ts(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ps={native:ko,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ut(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),At(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"?So(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&_e(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=0;function Eo(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:++Ul},$i(a.curOp)}function Do(a){var y=a.curOp;y&&Vo(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vl(x)})}function Vl(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 te=0;te<y.length;te++)Jl(y[te]);for(var ie=0;ie<y.length;ie++)Ql(y[ie])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&rr(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+Li(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Ji(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&&So(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==De();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Ro(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fs(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&As(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&So(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,St(b,a.scrollToPos.from),St(b,a.scrollToPos.to),a.scrollToPos.margin);zl(y,E)}var te=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(te)for(var ae=0;ae<te.length;++ae)te[ae].lines.length||tn(te[ae],"hide");if(ie)for(var ue=0;ue<ie.length;++ue)ie[ue].lines.length&&tn(ie[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&tn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Ti(a,y){if(a.curOp)return y();Eo(a);try{return y()}finally{Do(a)}}function $r(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Eo(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function mi(a){return function(){if(this.curOp)return a.apply(this,arguments);Eo(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function ei(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Eo(y);try{return a.apply(this,arguments)}finally{Do(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Et(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Wn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(te){if(b.line>=a.display.viewFrom){var ie=te.styles,ae=te.text.length>a.options.maxHighlightLength?Bn(y.mode,b.state):null,ue=xn(a,te,b,!0);ae&&(b.state=ae),te.styles=ue.styles;var he=te.styleClasses,be=ue.classes;be?te.styleClasses=be:he&&(te.styleClasses=null);for(var Se=!ie||ie.length!=te.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),Ke=0;!Se&&Ke<ie.length;++Ke)Se=ie[Ke]!=te.styles[Ke];Se&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&Kn(a,te.text,b),te.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 te=0;te<E.length;te++)co(a,E[te],"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=Ji(a),this.force=x,this.dims=uo(a),this.events=[]};Aa.prototype.signal=function(a,y){_t(a,y)&&this.events.push(arguments)},Aa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)tn.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=Li(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Li(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=De();if(!y||!Ze(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ze(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==De())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ze(document.body,a.anchorNode)&&Ze(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;Is(a)&&(ho(a),y.dims=uo(a));var E=b.first+b.size,te=Math.max(y.visible.from-a.options.viewportMargin,b.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<te&&te-x.viewFrom<20&&(te=Math.max(b.first,x.viewFrom)),x.viewTo>ie&&x.viewTo-ie<20&&(ie=Math.min(E,x.viewTo)),Gn&&(te=pn(a.doc,te),ie=bn(a.doc,ie));var ae=te!=x.viewFrom||ie!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,te,ie),x.viewOffset=_n($e(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cs(a);if(!ae&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),Zt(x.cursorDiv),Zt(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 Fs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==Ji(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Oi(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),Ro(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Aa(a,y);if($a(a,x)){Da(a),Fs(a,x);var b=ea(a);Qo(a),Ro(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,te=b.lineDiv,ie=te.firstChild;function ae(wt){var Mt=wt.nextSibling;return Ae&&Ee&&a.display.currentWheelTarget==wt?wt.style.display="none":wt.parentNode.removeChild(wt),Mt}for(var ue=b.view,he=b.viewFrom,be=0;be<ue.length;be++){var Se=ue[be];if(!Se.hidden)if(!Se.node||Se.node.parentNode!=te){var Ke=kn(a,Se,he,x);te.insertBefore(Ke,ie)}else{for(;ie!=Se.node;)ie=ae(ie);var je=E&&y!=null&&y<=he&&Se.lineNumber;Se.changes&&(We(Se.changes,"gutter")>-1&&(je=!1),ao(a,Se,he,x)),je&&(Zt(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(yt(a.options,he)))),ie=Se.node.nextSibling}he+=Se.size}for(;ie;)ie=ae(ie)}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+Li(a)+"px"}function Rs(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,te=b+"px",ie=0;ie<x.length;ie++)if(!x[ie].hidden){a.options.fixedGutter&&(x[ie].gutter&&(x[ie].gutter.style.left=te),x[ie].gutterBackground&&(x[ie].gutterBackground.style.left=te));var ae=x[ie].alignable;if(ae)for(var ue=0;ue<ae.length;ue++)ae[ue].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Is(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=yt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ve("div",[Ve("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,ie=E.offsetWidth-te;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(te,b.lineGutter.offsetWidth-ie)+1,b.lineNumWidth=b.lineNumInnerWidth+ie,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 te=a[E],ie=null;if(typeof te!="string"&&(ie=te.style,te=te.className),te=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:te,style:ie})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Os(a){var y=a.gutters,x=a.gutterSpecs;Zt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,ie=E.style,ae=y.appendChild(Ve("div",null,"CodeMirror-gutter "+te));ie&&(ae.style.cssText=ie),te=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Os(a.display),wi(a),Rs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ve("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ve("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=gt("div",null,"CodeMirror-code"),E.selectionDiv=Ve("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ve("div",null,"CodeMirror-cursors"),E.measure=Ve("div",null,"CodeMirror-measure"),E.lineMeasure=Ve("div",null,"CodeMirror-measure"),E.lineSpace=gt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=gt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ve("div",[te],null,"position: relative"),E.sizer=Ve("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ve("div",null,null,"position: absolute; height: "+pt+"px; width: 1px;"),E.gutters=Ve("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ve("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ve("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&ye<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ae&&!(se&&Me)&&(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),Os(E),x.init(E)}var Ta=0,Ri=null;me?Ri=-.53:se?Ri=15:we?Ri=-.7:Je&&(Ri=-1/3);function Ns(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=Ns(a);return y.x*=Ri,y.y*=Ri,y}function Ws(a,y){var x=Ns(y),b=x.x,E=x.y,te=a.display,ie=te.scroller,ae=ie.scrollWidth>ie.clientWidth,ue=ie.scrollHeight>ie.clientHeight;if(b&&ae||E&&ue){if(E&&Ee&&Ae){e:for(var he=y.target,be=te.view;he!=ie;he=he.parentNode)for(var Se=0;Se<be.length;Se++)if(be[Se].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!se&&!fe&&Ri!=null){E&&ue&&$o(a,Math.max(0,ie.scrollTop+E*Ri)),So(a,Math.max(0,ie.scrollLeft+b*Ri)),(!E||E&&ue)&&on(y),te.wheelStartX=null;return}if(E&&Ri!=null){var Ke=E*Ri,je=a.doc.scrollTop,wt=je+te.wrapper.clientHeight;Ke<0?je=Math.max(0,je+Ke-50):wt=Math.min(a.doc.height,wt+Ke+50),es(a,{top:je,bottom:wt})}Ta<20&&(te.wheelStartX==null?(te.wheelStartX=ie.scrollLeft,te.wheelStartY=ie.scrollTop,te.wheelDX=b,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var Mt=ie.scrollLeft-te.wheelStartX,zt=ie.scrollTop-te.wheelStartY,Qt=zt&&te.wheelDY&&zt/te.wheelDY||Mt&&te.wheelDX&&Mt/te.wheelDX;te.wheelStartX=te.wheelStartY=null,Qt&&(Ri=(Ri*Ta+Qt)/(Ta+1),++Ta)}},200)):(te.wheelDX+=b,te.wheelDY+=E))}}var Ii=function(a,y){this.ranges=a,this.primIndex=y};Ii.prototype.primary=function(){return this.ranges[this.primIndex]},Ii.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(!Ut(x.anchor,b.anchor)||!Ut(x.head,b.head))return!1}return!0},Ii.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new vr(Jt(this.ranges[y].anchor),Jt(this.ranges[y].head));return new Ii(a,this.primIndex)},Ii.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ii.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(bt(y,b.from())>=0&&bt(a,b.to())<=0)return x}return-1};var vr=function(a,y){this.anchor=a,this.head=y};vr.prototype.from=function(){return Ue(this.anchor,this.head)},vr.prototype.to=function(){return rn(this.anchor,this.head)},vr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Ke,je){return bt(Ke.from(),je.from())}),x=We(y,E);for(var te=1;te<y.length;te++){var ie=y[te],ae=y[te-1],ue=bt(ae.to(),ie.from());if(b&&!ie.empty()?ue>0:ue>=0){var he=Ue(ae.from(),ie.from()),be=rn(ae.to(),ie.to()),Se=ae.empty()?ie.from()==ie.head:ae.from()==ae.head;te<=x&&--x,y.splice(--te,2,new vr(Se?be:he,Se?he:be))}}return new Ii(y,x)}function fo(a,y){return new Ii([new vr(a,y||a)],0)}function po(a){return a.text?Oe(a.from.line+a.text.length-1,Le(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(bt(a,y.from)<0)return a;if(bt(a,y.to)<=0)return po(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+=po(y).ch-y.to.ch),Oe(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 vr(Hs(E.anchor,y),Hs(E.head,y)))}return Vi(a.cm,x,a.sel.primIndex)}function _s(a,y,x){return a.line==y.line?Oe(x.line,a.ch-y.ch+x.ch):Oe(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Oe(a.first,0),te=E,ie=0;ie<y.length;ie++){var ae=y[ie],ue=_s(ae.from,E,te),he=_s(po(ae),E,te);if(E=ae.to,te=he,x=="around"){var be=a.sel.ranges[ie],Se=bt(be.head,be.anchor)<0;b[ie]=new vr(Se?he:ue,Se?ue:he)}else b[ie]=new vr(ue,ue)}return new Ii(b,a.sel.primIndex)}function os(a){a.doc.mode=$n(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&&wi(a)}function zs(a,y){return y.from.ch==0&&y.to.ch==0&&Le(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(an){return x?x[an]:null}function te(an,qt,dn){Di(an,qt,dn,b),Hr(an,"change",an,y)}function ie(an,qt){for(var dn=[],Cn=an;Cn<qt;++Cn)dn.push(new Fr(he[Cn],E(Cn),b));return dn}var ae=y.from,ue=y.to,he=y.text,be=$e(a,ae.line),Se=$e(a,ue.line),Ke=Le(he),je=E(he.length-1),wt=ue.line-ae.line;if(y.full)a.insert(0,ie(0,he.length)),a.remove(he.length,a.size-he.length);else if(zs(a,y)){var Mt=ie(0,he.length-1);te(Se,Se.text,je),wt&&a.remove(ae.line,wt),Mt.length&&a.insert(ae.line,Mt)}else if(be==Se)if(he.length==1)te(be,be.text.slice(0,ae.ch)+Ke+be.text.slice(ue.ch),je);else{var zt=ie(1,he.length-1);zt.push(new Fr(Ke+be.text.slice(ue.ch),je,b)),te(be,be.text.slice(0,ae.ch)+he[0],E(0)),a.insert(ae.line+1,zt)}else if(he.length==1)te(be,be.text.slice(0,ae.ch)+he[0]+Se.text.slice(ue.ch),E(0)),a.remove(ae.line+1,wt);else{te(be,be.text.slice(0,ae.ch)+he[0],E(0)),te(Se,Ke+Se.text.slice(ue.ch),je);var Qt=ie(1,he.length-1);wt>1&&a.remove(ae.line+1,wt-1),a.insert(ae.line+1,Qt)}Hr(a,"change",a,y)}function vo(a,y,x){function b(E,te,ie){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var ue=E.linked[ae];if(ue.doc!=te){var he=ie&&ue.sharedHist;x&&!he||(y(ue.doc,he),b(ue.doc,E,he))}}}b(a,null,!0)}function Zs(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),Gs(a),a.options.lineWrapping||rr(a),a.options.mode=y.modeOption,wi(a)}function Gs(a){(a.doc.direction=="rtl"?_e:ut)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Ti(a,function(){Gs(a),wi(a)})}function Pa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:Jt(y.from),to:po(y),text:en(a,y.from,y.to)};return Vs(a,x,y.from.line,y.to.line+1),vo(a,function(b){return Vs(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=Le(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),Le(a.done);if(a.done.length&&!Le(a.done).ranges)return Le(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Le(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var te=+new Date,ie,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>te-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=su(E,E.lastOp==b)))ae=Le(ie.changes),bt(y.from,y.to)==0&&bt(y.from,ae.to)==0?ae.to=po(y):ie.changes.push(ss(a,y));else{var ue=Le(E.done);for((!ue||!ue.ranges)&&Ba(a.sel,E.done),ie={changes:[ss(a,y)],generation:E.generation},E.done.push(ie);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=te,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||tn(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,te=b&&b.origin;x==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||lu(a,te,Le(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=Le(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(a,y,x,b){var E=y["spans_"+a.id],te=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=ie.markedSpans),++te})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function hu(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Ks(a,y){var x=hu(a,y),b=nr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var te=x[E],ie=b[E];if(te&&ie)e:for(var ae=0;ae<ie.length;++ae){for(var ue=ie[ae],he=0;he<te.length;++he)if(te[he].marker==ue.marker)continue e;te.push(ue)}else ie&&(x[E]=ie)}return x}function Io(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Ii.prototype.deepCopy.call(te):te);continue}var ie=te.changes,ae=[];b.push({changes:ae});for(var ue=0;ue<ie.length;++ue){var he=ie[ue],be=void 0;if(ae.push({from:he.from,to:he.to,text:he.text}),y)for(var Se in he)(be=Se.match(/^spans_(\d+)$/))&&We(y,Number(be[1]))>-1&&(Le(ae)[Se]=he[Se],delete he[Se])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var te=bt(y,E)<0;te!=bt(x,E)<0?(E=y,y=x):te!=bt(y,x)<0&&(y=x)}return new vr(E,y)}else return new vr(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),hi(a,new Ii([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),te=0;te<a.sel.ranges.length;te++)b[te]=ls(a.sel.ranges[te],y[te],null,E);var ie=Vi(a.cm,b,a.sel.primIndex);hi(a,ie,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,hi(a,Vi(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){hi(a,fo(y,x),b)}function du(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var te=0;te<E.length;te++)this.ranges[te]=new vr(St(a,E[te].anchor),St(a,E[te].head))},origin:x&&x.origin};return tn(a,"beforeSelectionChange",a,b),a.cm&&tn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Vi(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=Le(b);E&&E.ranges?(b[b.length-1]=y,Ra(a,y,x)):hi(a,y,x)}function hi(a,y,x){Ra(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ra(a,y,x){(_t(a,"beforeSelectionChange")||a.cm&&_t(a.cm,"beforeSelectionChange"))&&(y=du(a,y,x));var b=x&&x.bias||(bt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Fo(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,ln(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,te=0;te<y.ranges.length;te++){var ie=y.ranges[te],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ue=Ia(a,ie.anchor,ae&&ae.anchor,x,b),he=Ia(a,ie.head,ae&&ae.head,x,b);(E||ue!=ie.anchor||he!=ie.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new vr(ue,he))}return E?Vi(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var te=$e(a,y.line);if(te.markedSpans)for(var ie=0;ie<te.markedSpans.length;++ie){var ae=te.markedSpans[ie],ue=ae.marker,he="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,be="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((ae.from==null||(he?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(be?ae.to>=y.ch:ae.to>y.ch))){if(E&&(tn(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(te.markedSpans){--ie;continue}else break;if(!ue.atomic)continue;if(x){var Se=ue.find(b<0?1:-1),Ke=void 0;if((b<0?be:he)&&(Se=el(a,Se,-b,Se&&Se.line==y.line?te:null)),Se&&Se.line==y.line&&(Ke=bt(Se,x))&&(b<0?Ke<0:Ke>0))return Oo(a,Se,y,b,E)}var je=ue.find(b<0?-1:1);return(b<0?he:be)&&(je=el(a,je,b,je.line==y.line?te:null)),je?Oo(a,je,y,b,E):null}}return y}function Ia(a,y,x,b,E){var te=b||1,ie=Oo(a,y,x,te,E)||!E&&Oo(a,y,x,te,!0)||Oo(a,y,x,-te,E)||!E&&Oo(a,y,x,-te,!0);return ie||(a.cantEdit=!0,Oe(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?St(a,Oe(y.line-1)):null:x>0&&y.ch==(b||$e(a,y.line)).text.length?y.line<a.first+a.size-1?Oe(y.line+1,0):null:new Oe(y.line,y.ch+x)}function tl(a){a.setSelection(Oe(a.firstLine(),0),Oe(a.lastLine()),xe)}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,te,ie,ae){E&&(b.from=St(a,E)),te&&(b.to=St(a,te)),ie&&(b.text=ie),ae!==void 0&&(b.origin=ae)}),tn(a,"beforeChange",a,b),a.cm&&tn(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 No(a,y,x){if(a.cm){if(!a.cm.curOp)return $r(a.cm,No)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((_t(a,"beforeChange")||a.cm&&_t(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=cr&&!x&&Lr(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]==""&&bt(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,nr(a,y));var b=[];vo(a,function(E,te){!te&&We(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,nr(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,ie=a.sel,ae=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,he=0;he<ae.length&&(te=ae[he],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));he++);if(he!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=ae.pop(),te.ranges){if(Ba(te,ue),x&&!te.equals(a.sel)){hi(a,te,{clearRedo:!1});return}ie=te}else if(b){ae.push(te);return}else break;var be=[];Ba(ie,ue),ue.push({changes:be,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var Se=_t(a,"beforeChange")||a.cm&&_t(a.cm,"beforeChange"),Ke=function(Mt){var zt=te.changes[Mt];if(zt.origin=y,Se&&!nl(a,zt,!1))return ae.length=0,{};be.push(ss(a,zt));var Qt=Mt?is(a,zt):Le(ae);oa(a,zt,Qt,Ks(a,zt)),!Mt&&a.cm&&a.cm.scrollIntoView({from:zt.from,to:po(zt)});var an=[];vo(a,function(qt,dn){!dn&&We(an,qt.history)==-1&&(sl(qt.history,zt),an.push(qt.history)),oa(qt,zt,null,Ks(qt,zt))})},je=te.changes.length-1;je>=0;--je){var wt=Ke(je);if(wt)return wt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ii(nt(a.sel.ranges,function(E){return new vr(Oe(E.anchor.line+y,E.anchor.ch),Oe(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){wi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)co(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return $r(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:Oe(a.first,0),to:Oe(y.to.line+E,y.to.ch),text:[Le(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:Oe(te,$e(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=en(a,y.from,y.to),x||(x=is(a,y)),a.cm?fu(a.cm,y,b):as(a,y,b),Ra(a,x,xe),a.cantEdit&&Ia(a,Oe(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,te=y.from,ie=y.to,ae=!1,ue=te.line;a.options.lineWrapping||(ue=ke(rt($e(b,te.line))),b.iter(ue,ie.line+1,function(je){if(je==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&ln(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ue,te.line+y.text.length,function(je){var wt=fr(je);wt>E.maxLineLength&&(E.maxLine=je,E.maxLineLength=wt,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),wr(b,te.line),na(a,400);var he=y.text.length-(ie.line-te.line)-1;y.full?wi(a):te.line==ie.line&&y.text.length==1&&!zs(a.doc,y)?co(a,te.line,"text"):wi(a,te.line,ie.line+1,he);var be=_t(a,"changes"),Se=_t(a,"change");if(Se||be){var Ke={from:te,to:ie,text:y.text,removed:y.removed,origin:y.origin};Se&&Hr(a,"change",a,Ke),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ke)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var te;b||(b=x),bt(b,x)<0&&(te=[b,x],x=te[0],b=te[1]),typeof y=="string"&&(y=a.splitLines(y)),No(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 te=a[E],ie=!0;if(te.ranges){te.copied||(te=a[E]=te.deepCopy(),te.copied=!0);for(var ae=0;ae<te.ranges.length;ae++)ol(te.ranges[ae].anchor,y,x,b),ol(te.ranges[ae].head,y,x,b);continue}for(var ue=0;ue<te.changes.length;++ue){var he=te.changes[ue];if(x<he.from.line)he.from=Oe(he.from.line+b,he.from.ch),he.to=Oe(he.to.line+b,he.to.ch);else if(y<=he.to.line){ie=!1;break}}ie||(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,te=y;return typeof y=="number"?te=$e(a,Vt(a,y)):E=ke(y),E==null?null:(b(te,E)&&a.cm&&co(a.cm,E,x),te)}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,ii(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 te=Math.min(y,E-a),ie=b.height;if(b.removeInner(a,te),this.height-=ie-b.height,E==te&&(this.children.splice(x--,1),b.parent=null),(y-=te)==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],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,ae=ie;ae<E.lines.length;){var ue=new sa(E.lines.slice(ae,ae+=25));E.height-=ue.height,this.children.splice(++b,0,ue),ue.parent=this}E.lines=E.lines.slice(0,ie),this.maybeSpill()}break}a-=te}},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=We(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],te=E.chunkSize();if(a<te){var ie=Math.min(y,te-a);if(E.iterN(a,ie,x))return!0;if((y-=ie)==0)break;a=0}else a-=te}}};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=ke(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 te=vi(this);In(x,Math.max(0,x.height-te)),a&&(Ti(a,function(){ll(a,x,-te),co(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=vi(this)-y;E&&(Rn(this.doc,b)||In(b,b.height+E),x&&Ti(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Hr(x,"lineWidgetChanged",x,a,ke(b))}))},Kt(ua);function ll(a,y,x){_n(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),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),aa(a,y,"widget",function(ie){var ae=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,te&&!Rn(a,ie)){var ue=_n(ie)<a.scrollTop;In(ie,ie.height+vi(E)),ue&&qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&Hr(te,"lineWidgetAdded",te,E,typeof y=="number"?y:ke(y)),E}var ul=0,mo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};mo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Eo(a),_t(this,"clear")){var x=this.find();x&&Hr(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var ie=this.lines[te],ae=hr(ie.markedSpans,this);a&&!this.collapsed?co(a,ke(ie),"text"):a&&(ae.to!=null&&(E=ke(ie)),ae.from!=null&&(b=ke(ie))),ie.markedSpans=Dr(ie.markedSpans,ae),ae.from==null&&this.collapsed&&!Rn(this.doc,ie)&&a&&In(ie,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var he=rt(this.lines[ue]),be=fr(he);be>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&wi(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&&Do(a),this.parent&&this.parent.clear()}},mo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var te=this.lines[E],ie=hr(te.markedSpans,this);if(ie.from!=null&&(x=Oe(y?te:ke(te),ie.from),a==-1))return x;if(ie.to!=null&&(b=Oe(y?te:ke(te),ie.to),a==1))return b}return x&&{from:x,to:b}},mo.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,te=ke(y.line),ie=Qi(b,te);if(ie&&(Ko(ie),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 ue=vi(x)-ae;ue&&In(E,E.height+ue)}Hr(b,"markerChanged",b,a)})},mo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||We(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},mo.prototype.detachLine=function(a){if(this.lines.splice(We(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Kt(mo);function Ho(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return $r(a.cm,Ho)(a,y,x,b,E);var te=new mo(a,E),ie=bt(y,x);if(b&&dt(b,te,!1),ie>0||ie==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=gt("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(xt(a,y.line,y,x,te)||y.line!=x.line&&xt(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");er()}te.addToHistory&&Us(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,ue=a.cm,he;if(a.iter(ae,x.line+1,function(Se){ue&&te.collapsed&&!ue.options.lineWrapping&&rt(Se)==ue.display.maxLine&&(he=!0),te.collapsed&&ae!=y.line&&In(Se,0),dr(Se,new tr(te,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),te.collapsed&&a.iter(y.line,x.line+1,function(Se){Rn(a,Se)&&In(Se,0)}),te.clearOnEnter&&At(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Cr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++ul,te.atomic=!0),ue){if(he&&(ue.curOp.updateMaxLine=!0),te.collapsed)wi(ue,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var be=y.line;be<=x.line;be++)co(ue,be,"text");te.atomic&&qs(ue.doc),Hr(ue,"markerAdded",ue,te)}return te}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)},Kt(ca);function vu(a,y,x,b,E){b=dt(b),b.shared=!1;var te=[Ho(a,y,x,b,E)],ie=te[0],ae=b.widgetNode;return vo(a,function(ue){ae&&(b.widgetNode=ae.cloneNode(!0)),te.push(Ho(ue,St(ue,y),St(ue,x),b,E));for(var he=0;he<ue.linked.length;++he)if(ue.linked[he].isParent)return;ie=Le(te)}),new ca(te,ie)}function cl(a){return a.findMarks(Oe(a.first,0),a.clipPos(Oe(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(),te=a.clipPos(E.from),ie=a.clipPos(E.to);if(bt(te,ie)){var ae=Ho(a,te,ie,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],te=[E.primary.doc];vo(E.primary.doc,function(ue){return te.push(ue)});for(var ie=0;ie<E.markers.length;ie++){var ae=E.markers[ie];We(te,ae.doc)==-1&&(ae.parent=null,E.markers.splice(ie--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Ci=function(a,y,x,b,E){if(!(this instanceof Ci))return new Ci(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Fr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=Oe(x,0);this.sel=fo(te),this.history=new Pa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:te,to:te,text:a}),hi(this,fo(te),xe)};Ci.prototype=ee(la.prototype,{constructor:Ci,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=Pn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ei(function(a){var y=Oe(this.first,0),x=this.first+this.size-1;No(this,{from:y,to:Oe(x,$e(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),hi(this,fo(y),xe)}),replaceRange:function(a,y,x,b){y=St(this,y),x=x?St(this,x):y,Wo(this,a,y,x,b)},getRange:function(a,y,x){var b=en(this,St(this,a),St(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(Ft(this,a))return $e(this,a)},getLineNumber:function(a){return ke(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=$e(this,a)),rt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return St(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:ei(function(a,y,x){Xs(this,St(this,typeof a=="number"?Oe(a,y||0):a),null,x)}),setSelection:ei(function(a,y,x){Xs(this,St(this,a),St(this,y||a),x)}),extendSelection:ei(function(a,y,x){Fa(this,St(this,a),y&&St(this,y),x)}),extendSelections:ei(function(a,y){Ys(this,Gt(this,a),y)}),extendSelectionsBy:ei(function(a,y){var x=nt(this.sel.ranges,a);Ys(this,Gt(this,x),y)}),setSelections:ei(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new vr(St(this,a[E].anchor),St(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),hi(this,Vi(this.cm,b,y),x)}}),addSelection:ei(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new vr(St(this,a),St(this,y||a))),hi(this,Vi(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=en(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=en(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:ei(function(a,y,x){for(var b=[],E=this.sel,te=0;te<E.ranges.length;te++){var ie=E.ranges[te];b[te]={from:ie.from(),to:ie.to(),text:this.splitLines(a[te]),origin:x}}for(var ae=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)No(this,b[ue]);ae?Js(this,ae):this.cm&&Fo(this.cm)}),undo:ei(function(){Oa(this,"undo")}),redo:ei(function(){Oa(this,"redo")}),undoSelection:ei(function(){Oa(this,"undo",!0)}),redoSelection:ei(function(){Oa(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Pa(this.history.maxGeneration),vo(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:Io(this.history.done),undone:Io(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Io(a.done.slice(0),null,!0),y.undone=Io(a.undone.slice(0),null,!0)},setGutterMarker:ei(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ne(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ei(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Ft(this,a)||(y=a,a=$e(this,a),!a))return null}else if(y=ke(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:ei(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(et(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ei(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",te=b[E];if(te)if(x==null)b[E]=null;else{var ie=te.match(et(x));if(!ie)return!1;var ae=ie.index+ie[0].length;b[E]=te.slice(0,ie.index)+(!ie.index||ae==te.length?"":" ")+te.slice(ae)||null}else return!1;return!0})}),addLineWidget:ei(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,St(this,a),St(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=St(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=St(this,a);var y=[],x=$e(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=St(this,a),y=St(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var ie=te.markedSpans;if(ie)for(var ae=0;ae<ie.length;ae++){var ue=ie[ae];!(ue.to!=null&&E==a.line&&a.ch>=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.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 te=E.text.length+b;if(te>a)return y=a,!0;a-=te,++x}),St(this,Oe(x,y))},indexFromPos:function(a){a=St(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 Ci(Pn(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 Ci(Pn(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 Ir&&(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];vo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Io(this.history.done,b),a.history.undone=Io(this.history.undone,b)}},iterLinkedDocs:function(a){vo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):ir(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ei(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))})}),Ci.prototype.eachLine=Ci.prototype.iter;var hl=0;function bu(a){var y=this;if(dl(y),!(tt(y,a)||oi(y.display,a))){on(a),me&&(hl=+new Date);var x=wo(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,te=Array(E),ie=0,ae=function(){++ie==E&&$r(y,function(){x=St(y.doc,x);var je={from:x,to:x,text:y.doc.splitLines(te.filter(function(wt){return wt!=null}).join(y.doc.lineSeparator())),origin:"paste"};No(y.doc,je),Js(y.doc,fo(St(y.doc,x),St(y.doc,po(je))))})()},ue=function(je,wt){if(y.options.allowDropFileTypes&&We(y.options.allowDropFileTypes,je.type)==-1){ae();return}var Mt=new FileReader;Mt.onerror=function(){return ae()},Mt.onload=function(){var zt=Mt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(zt)){ae();return}te[wt]=zt,ae()},Mt.readAsText(je)},he=0;he<b.length;he++)ue(b[he],he);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var Se;if(y.state.draggingText&&!y.state.draggingText.copy&&(Se=y.listSelections()),Ra(y.doc,fo(x,x)),Se)for(var Ke=0;Ke<Se.length;++Ke)Wo(y.doc,"",Se[Ke].anchor,Se[Ke].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(je){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-hl<100)){vn(y);return}if(!(tt(a,y)||oi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Je)){var x=Ve("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ve("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ye(a.display.dragCursor,b)}}function dl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fl(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 te=0;te<x.length;te++)a(x[te])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;At(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fl(ku)},100))}),At(window,"blur",function(){return fl(Bo)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var go={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ha=0;ha<10;ha++)go[ha+48]=go[ha+96]=String(ha);for(var Na=65;Na<=90;Na++)go[Na]=String.fromCharCode(Na);for(var da=1;da<=12;da++)go[da+111]=go[da+63235]="F"+da;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=Ee?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,te,ie=0;ie<y.length-1;ie++){var ae=y[ie];if(/^(cmd|meta|m)$/i.test(ae))te=!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),te&&(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=nt(x.split(" "),Eu),te=0;te<E.length;te++){var ie=void 0,ae=void 0;te==E.length-1?(ae=E.join(" "),ie=b):(ae=E.slice(0,te+1).join(" "),ie="...");var ue=y[ae];if(!ue)y[ae]=ie;else if(ue!=ie)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var he in y)a[he]=y[he];return a}function _o(a,y,x,b){y=Wa(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return _o(a,y.fallthrough,x,b);for(var te=0;te<y.fallthrough.length;te++){var ie=_o(a,y.fallthrough[te],x,b);if(ie)return ie}}}function vl(a){var y=typeof a=="string"?a:go[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),(lt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(lt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=go[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function Wa(a){return typeof a=="string"?io[a]:a}function zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var te=y(x[E]);b.length&&bt(te.from,Le(b).to)<=0;){var ie=b.pop();if(bt(ie.from,te.from)<0){te.from=ie.from;break}}b.push(te)}Ti(a,function(){for(var ae=b.length-1;ae>=0;ae--)Wo(a.doc,"",b[ae].from,b[ae].to,"+delete");Fo(a)})}function cs(a,y,x){var b=Dt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new Oe(y.line,b,x<0?"after":"before")}function ds(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=Xt(x,y.doc.direction);if(te){var ie=E<0?Le(te):te[0],ae=E<0==(ie.level==1),ue=ae?"after":"before",he;if(ie.level>0||y.doc.direction=="rtl"){var be=lo(y,x);he=E<0?x.text.length-1:0;var Se=Ni(y,be,he).top;he=kt(function(Ke){return Ni(y,be,Ke).top==Se},E<0==(ie.level==1)?ie.from:ie.to-1,he),ue=="before"&&(he=cs(x,he,1))}else he=E<0?ie.to:ie.from;return new Oe(b,he,ue)}}return new Oe(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=Xt(y,a.doc.direction);if(!E)return hs(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var te=It(E,x.ch,x.sticky),ie=E[te];if(a.doc.direction=="ltr"&&ie.level%2==0&&(b>0?ie.to>x.ch:ie.from<x.ch))return hs(y,x,b);var ae=function(Qt,an){return cs(y,Qt instanceof Oe?Qt.ch:Qt,an)},ue,he=function(Qt){return a.options.lineWrapping?(ue=ue||lo(a,y),Ur(a,y,ue,Qt)):{begin:0,end:y.text.length}},be=he(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||ie.level==1){var Se=ie.level==1==b<0,Ke=ae(x,Se?1:-1);if(Ke!=null&&(Se?Ke<=ie.to&&Ke<=be.end:Ke>=ie.from&&Ke>=be.begin)){var je=Se?"before":"after";return new Oe(x.line,Ke,je)}}var wt=function(Qt,an,qt){for(var dn=function(Ar,ti){return ti?new Oe(x.line,ae(Ar,1),"before"):new Oe(x.line,Ar,"after")};Qt>=0&&Qt<E.length;Qt+=an){var Cn=E[Qt],gn=an>0==(Cn.level!=1),zn=gn?qt.begin:ae(qt.end,-1);if(Cn.from<=zn&&zn<Cn.to||(zn=gn?Cn.from:ae(Cn.to,-1),qt.begin<=zn&&zn<qt.end))return dn(zn,gn)}},Mt=wt(te+b,b,be);if(Mt)return Mt;var zt=b>0?be.end:ae(be.begin,-1);return zt!=null&&!(b>0&&zt==y.text.length)&&(Mt=wt(b>0?0:E.length-1,b,he(zt)),Mt)?Mt:null}var fa={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),xe)},killLine:function(a){return zo(a,function(y){if(y.empty()){var x=$e(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Oe(y.head.line+1,0)}:{from:y.head,to:Oe(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return zo(a,function(y){return{from:Oe(y.from().line,0),to:St(a.doc,Oe(y.to().line+1,0))}})},delLineLeft:function(a){return zo(a,function(y){return{from:Oe(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(Oe(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Oe(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")},Ce)},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")},Ce)},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},Ce)},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 te=x[E].from(),ie=pe(a.getLine(te.line),te.ch,b);y.push(ht(b-ie%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,te=$e(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new Oe(E.line,E.ch-1)),E.ch>0)E=new Oe(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),Oe(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=$e(a.doc,E.line-1).text;ie&&(E=new Oe(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),Oe(E.line-1,ie.length-1),E,"+transpose"))}}x.push(new vr(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);Fo(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=$e(a.doc,y),b=rt(x);return b!=x&&(y=ke(b)),ds(!0,a,b,y,1)}function Mu(a,y){var x=$e(a.doc,y),b=Lt(x);return b!=x&&(y=ke(b)),ds(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=$e(a.doc,x.line),E=Xt(b,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(x.ch,b.text.search(/\S/)),ie=y.line==x.line&&y.ch<=te&&y.ch;return Oe(x.line,ie?0:te,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=fa[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)!=st}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Au(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=_o(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&_o(y,a.options.extraKeys,x,a)||_o(y,a.options.keyMap,x,a)}var Tu=new ce;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Tu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Au(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Hr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(on(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var fs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=De(),!tt(y,a))){me&&ye<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);fe&&(fs=b?x:null,!b&&x==88&&!Tn&&(Ee?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),se&&!Ee&&!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;_e(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(ut(y,"CodeMirror-crosshair"),jt(document,"keyup",x),jt(document,"mouseover",x))}At(document,"keyup",x),At(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),tt(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(oi(y.display,a)||tt(y,a)||a.ctrlKey&&!a.altKey||Ee&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fs){fs=null,on(a);return}if(!(fe&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Fu>a&&bt(y,this.pos)==0&&x==this.button};var va,ma;function Ru(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(!(tt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,oi(x,a)){Ae||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=wo(y,a),E=jn(a),te=b?Ru(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,te,a))&&(E==1?b?Nu(y,b,te,a):Jn(a)==x.scroller&&on(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Qe?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var te="Click";return b=="double"?te="Double"+te:b=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,pa(a,ml(te,E),E,function(ie){if(typeof ie=="string"&&(ie=fa[ie]),!ie)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=ie(a,x)!=st}finally{a.state.suppressEdits=!1}return ae})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=qe?x.shiftKey&&x.metaKey:x.altKey;E.unit=te?"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=Ee?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ee?x.altKey:x.ctrlKey)),E}function Nu(a,y,x,b){me?setTimeout(Et(Es,a),0):a.curOp.focus=De();var E=Ou(a,x,b),te=a.doc.sel,ie;a.options.dragDrop&&Wr&&!a.isReadOnly()&&x=="single"&&(ie=te.contains(y))>-1&&(bt((ie=te.ranges[ie]).from(),y)<0||y.xRel>0)&&(bt(ie.to(),y)>0||y.xRel<0)?Wu(a,b,y,E):Hu(a,b,y,E)}function Wu(a,y,x,b){var E=a.display,te=!1,ie=$r(a,function(he){Ae&&(E.scroller.draggable=!1),a.state.draggingText=!1,jt(E.wrapper.ownerDocument,"mouseup",ie),jt(E.wrapper.ownerDocument,"mousemove",ae),jt(E.scroller,"dragstart",ue),jt(E.scroller,"drop",ie),te||(on(he),b.addNew||Fa(a.doc,x,null,null,b.extend),Ae&&!Je||me&&ye==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(he){te=te||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ue=function(){return te=!0};Ae&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),At(E.wrapper.ownerDocument,"mouseup",ie),At(E.wrapper.ownerDocument,"mousemove",ae),At(E.scroller,"dragstart",ue),At(E.scroller,"drop",ie),Ds(a),setTimeout(function(){return E.input.focus()},20)}function Dl(a,y,x){if(x=="char")return new vr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new vr(Oe(y.line,0),St(a.doc,Oe(y.line+1,0)));var b=x(a,y);return new vr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,te=a.doc;on(y);var ie,ae,ue=te.sel,he=ue.ranges;if(b.addNew&&!b.extend?(ae=te.sel.contains(x),ae>-1?ie=he[ae]:ie=new vr(x,x)):(ie=te.sel.primary(),ae=te.sel.primIndex),b.unit=="rectangle")b.addNew||(ie=new vr(x,x)),x=wo(a,y,!0,!0),ae=-1;else{var be=Dl(a,x,b.unit);b.extend?ie=ls(ie,be.anchor,be.head,b.extend):ie=be}b.addNew?ae==-1?(ae=he.length,hi(te,Vi(a,he.concat([ie]),ae),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ae].empty()&&b.unit=="char"&&!b.extend?(hi(te,Vi(a,he.slice(0,ae).concat(he.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),ue=te.sel):us(te,ae,ie,Ge):(ae=0,hi(te,new Ii([ie],0),Ge),ue=te.sel);var Se=x;function Ke(qt){if(bt(Se,qt)!=0)if(Se=qt,b.unit=="rectangle"){for(var dn=[],Cn=a.options.tabSize,gn=pe($e(te,x.line).text,x.ch,Cn),zn=pe($e(te,qt.line).text,qt.ch,Cn),Ar=Math.min(gn,zn),ti=Math.max(gn,zn),Nr=Math.min(x.line,qt.line),Pi=Math.min(a.lastLine(),Math.max(x.line,qt.line));Nr<=Pi;Nr++){var Si=$e(te,Nr).text,Yr=Xe(Si,Ar,Cn);Ar==ti?dn.push(new vr(Oe(Nr,Yr),Oe(Nr,Yr))):Si.length>Yr&&dn.push(new vr(Oe(Nr,Yr),Oe(Nr,Xe(Si,ti,Cn))))}dn.length||dn.push(new vr(x,x)),hi(te,Vi(a,ue.ranges.slice(0,ae).concat(dn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(qt)}else{var ki=ie,si=Dl(a,qt,b.unit),Qr=ki.anchor,Xr;bt(si.anchor,Qr)>0?(Xr=si.head,Qr=Ue(ki.from(),si.anchor)):(Xr=si.anchor,Qr=rn(ki.to(),si.head));var _r=ue.ranges.slice(0);_r[ae]=_u(a,new vr(St(te,Qr),Xr)),hi(te,Vi(a,_r,ae),Ge)}}var je=E.wrapper.getBoundingClientRect(),wt=0;function Mt(qt){var dn=++wt,Cn=wo(a,qt,!0,b.unit=="rectangle");if(Cn)if(bt(Cn,Se)!=0){a.curOp.focus=De(),Ke(Cn);var gn=La(E,te);(Cn.line>=gn.to||Cn.line<gn.from)&&setTimeout($r(a,function(){wt==dn&&Mt(qt)}),150)}else{var zn=qt.clientY<je.top?-20:qt.clientY>je.bottom?20:0;zn&&setTimeout($r(a,function(){wt==dn&&(E.scroller.scrollTop+=zn,Mt(qt))}),50)}}function zt(qt){a.state.selectingText=!1,wt=1/0,qt&&(on(qt),E.input.focus()),jt(E.wrapper.ownerDocument,"mousemove",Qt),jt(E.wrapper.ownerDocument,"mouseup",an),te.history.lastSelOrigin=null}var Qt=$r(a,function(qt){qt.buttons===0||!jn(qt)?zt(qt):Mt(qt)}),an=$r(a,zt);a.state.selectingText=an,At(E.wrapper.ownerDocument,"mousemove",Qt),At(E.wrapper.ownerDocument,"mouseup",an)}function _u(a,y){var x=y.anchor,b=y.head,E=$e(a.doc,x.line);if(bt(x,b)==0&&x.sticky==b.sticky)return y;var te=Xt(E);if(!te)return y;var ie=It(te,x.ch,x.sticky),ae=te[ie];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var ue=ie+(ae.from==x.ch==(ae.level!=1)?0:1);if(ue==0||ue==te.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=It(te,b.ch,b.sticky),Se=be-ie||(b.ch-x.ch)*(ae.level==1?-1:1);be==ue-1||be==ue?he=Se<0:he=Se>0}var Ke=te[ue+(he?-1:0)],je=he==(Ke.level==1),wt=je?Ke.from:Ke.to,Mt=je?"after":"before";return x.ch==wt&&x.sticky==Mt?y:new vr(new Oe(x.line,wt,Mt),b)}function Ll(a,y,x,b){var E,te;if(y.touches)E=y.touches[0].clientX,te=y.touches[0].clientY;else try{E=y.clientX,te=y.clientY}catch(Ke){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&on(y);var ie=a.display,ae=ie.lineDiv.getBoundingClientRect();if(te>ae.bottom||!_t(a,x))return cn(y);te-=ae.top-ie.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var he=ie.gutters.childNodes[ue];if(he&&he.getBoundingClientRect().right>=E){var be=Pe(a.doc,te),Se=a.display.gutterSpecs[ue];return tn(a,x,a,be,Se.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){oi(a.display,y)||zu(a,y)||tt(a,y,"contextmenu")||Qe||a.display.input.onContextMenu(y)}function zu(a,y){return _t(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-"),xo(a)}var Zo={toString:function(){return"CodeMirror.Init"}},Tl={},_a={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,ie){a.defaults[b]=E,te&&(y[b]=ie?function(ae,ue,he){he!=Zo&&te(ae,ue,he)}:te)}a.defineOption=x,a.Init=Zo,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),xo(b),wi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var te=[],ie=b.doc.first;b.doc.iter(function(ue){for(var he=0;;){var be=ue.text.indexOf(E,he);if(be==-1)break;he=be+E.length,te.push(Oe(ie,be))}ie++});for(var ae=te.length-1;ae>=0;ae--)Wo(b.doc,E,te[ae],Oe(te[ae].line,te[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,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=Zo&&b.refresh()}),x("specialCharPlaceholder",Bi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Me?"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",!at),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Al(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var ie=Wa(E),ae=te!=Zo&&Wa(te);ae&&ae.detach&&ae.detach(b,ie),ie.attach&&ie.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Ro(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Ro(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"&&(Bo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Zo;if(!y!=!b){var E=a.display.dragFunctions,te=y?At:jt;te(a.display.scroller,"dragstart",E.start),te(a.display.scroller,"dragenter",E.enter),te(a.display.scroller,"dragover",E.over),te(a.display.scroller,"dragleave",E.leave),te(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(_e(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ut(a.display.wrapper,"CodeMirror-wrap"),rr(a)),Ya(a),wi(a),xo(a),setTimeout(function(){return Ro(a)},100)}function Ir(a,y){var x=this;if(!(this instanceof Ir))return new Ir(a,y);this.options=y=y?dt(y):{},dt(Tl,y,!1);var b=y.value;typeof b=="string"?b=new Ci(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ir.inputStyles[y.inputStyle](this),te=this.display=new ru(a,b,E,y);te.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 ce,keySeq:null,specialChars:null},y.autofocus&&!Me&&te.input.focus(),me&&ye<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),Cu(),Eo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Me||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Bo(this);for(var ie in _a)_a.hasOwnProperty(ie)&&_a[ie](this,y[ie],Zo);Is(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ms.length;++ae)ms[ae](this);Do(this),Ae&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Ir.defaults=Tl,Ir.optionHandlers=_a;function Uu(a){var y=a.display;At(y.scroller,"mousedown",$r(a,El)),me&&ye<11?At(y.scroller,"dblclick",$r(a,function(ue){if(!tt(a,ue)){var he=wo(a,ue);if(!(!he||vs(a,ue)||oi(a.display,ue))){on(ue);var be=a.findWordAt(he);Fa(a.doc,be.anchor,be.head)}}})):At(y.scroller,"dblclick",function(ue){return tt(a,ue)||on(ue)}),At(y.scroller,"contextmenu",function(ue){return Ml(a,ue)}),At(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||Ml(a,ue)});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 te(ue){if(ue.touches.length!=1)return!1;var he=ue.touches[0];return he.radiusX<=1&&he.radiusY<=1}function ie(ue,he){if(he.left==null)return!0;var be=he.left-ue.left,Se=he.top-ue.top;return be*be+Se*Se>20*20}At(y.scroller,"touchstart",function(ue){if(!tt(a,ue)&&!te(ue)&&!vs(a,ue)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),At(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),At(y.scroller,"touchend",function(ue){var he=y.activeTouch;if(he&&!oi(y,ue)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),Se;!he.prev||ie(he,he.prev)?Se=new vr(be,be):!he.prev.prev||ie(he,he.prev.prev)?Se=a.findWordAt(be):Se=new vr(Oe(be.line,0),St(a.doc,Oe(be.line+1,0))),a.setSelection(Se.anchor,Se.head),a.focus(),on(ue)}E()}),At(y.scroller,"touchcancel",E),At(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),So(a,y.scroller.scrollLeft,!0),tn(a,"scroll",a))}),At(y.scroller,"mousewheel",function(ue){return Ws(a,ue)}),At(y.scroller,"DOMMouseScroll",function(ue){return Ws(a,ue)}),At(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){tt(a,ue)||vn(ue)},over:function(ue){tt(a,ue)||(wu(a,ue),vn(ue))},start:function(ue){return xu(a,ue)},drop:$r(a,bu),leave:function(ue){tt(a,ue)||dl(a)}};var ae=y.input.getField();At(ae,"keyup",function(ue){return Sl.call(a,ue)}),At(ae,"keydown",$r(a,Cl)),At(ae,"keypress",$r(a,kl)),At(ae,"focus",function(ue){return Ja(a,ue)}),At(ae,"blur",function(ue){return Bo(a,ue)})}var ms=[];Ir.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,te;x==null&&(x="add"),x=="smart"&&(E.mode.indent?te=Wn(a,y).state:x="prev");var ie=a.options.tabSize,ae=$e(E,y),ue=pe(ae.text,null,ie);ae.stateAfter&&(ae.stateAfter=null);var he=ae.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(ae.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(te,ae.text.slice(he.length),ae.text),be==st||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe($e(E,y-1).text,null,ie):be=0:x=="add"?be=ue+a.options.indentUnit:x=="subtract"?be=ue-a.options.indentUnit:typeof x=="number"&&(be=ue+x),be=Math.max(0,be);var Se="",Ke=0;if(a.options.indentWithTabs)for(var je=Math.floor(be/ie);je;--je)Ke+=ie,Se+=" ";if(Ke<be&&(Se+=ht(be-Ke)),Se!=he)return Wo(E,Se,Oe(y,0),Oe(y,he.length),"+input"),ae.stateAfter=null,!0;for(var wt=0;wt<E.sel.ranges.length;wt++){var Mt=E.sel.ranges[wt];if(Mt.head.line==y&&Mt.head.ch<he.length){var zt=Oe(y,he.length);us(E,wt,new vr(zt,zt));break}}}var Ki=null;function za(a){Ki=a}function gs(a,y,x,b,E){var te=a.doc;a.display.shift=!1,b||(b=te.sel);var ie=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>ie,ue=ir(y),he=null;if(ae&&b.ranges.length>1)if(Ki&&Ki.text.join(`
|
|
`)==y){if(b.ranges.length%Ki.text.length==0){he=[];for(var be=0;be<Ki.text.length;be++)he.push(te.splitLines(Ki.text[be]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=nt(ue,function(Qt){return[Qt]}));for(var Se=a.curOp.updateInput,Ke=b.ranges.length-1;Ke>=0;Ke--){var je=b.ranges[Ke],wt=je.from(),Mt=je.to();je.empty()&&(x&&x>0?wt=Oe(wt.line,wt.ch-x):a.state.overwrite&&!ae?Mt=Oe(Mt.line,Math.min($e(te,Mt.line).text.length,Mt.ch+Le(ue).length)):ae&&Ki&&Ki.lineWise&&Ki.text.join(`
|
|
`)==ue.join(`
|
|
`)&&(wt=Mt=Oe(wt.line,0)));var zt={from:wt,to:Mt,text:he?he[Ke%he.length]:ue,origin:E||(ae?"paste":a.state.cutIncoming>ie?"cut":"+input")};No(a.doc,zt),Hr(a,"inputRead",a,zt)}y&&!ae&&Bl(a,y),Fo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Se),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&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 te=a.getModeAt(E.head),ie=!1;if(te.electricChars){for(var ae=0;ae<te.electricChars.length;ae++)if(y.indexOf(te.electricChars.charAt(ae))>-1){ie=ga(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test($e(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=ga(a,E.head.line,"smart"));ie&&Hr(a,"electricInput",a,E.head.line)}}}function Fl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,te={anchor:Oe(E,0),head:Oe(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:x}}function Rl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Il(){var a=Ve("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ve("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ae?a.style.width="1000px":a.setAttribute("wrap","off"),Ne&&(a.style.border="1px solid black"),Rl(a),y}function Vu(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 te=this.options,ie=te[b];te[b]==E&&b!="mode"||(te[b]=E,y.hasOwnProperty(b)&&$r(this,y[b])(this,E,ie),tn(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](Wa(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,te=0;te<E.length;++te)if(E[te]==b||E[te].name==b)return E.splice(te,1),!0},addOverlay:mi(function(b,E){var te=b.token?b:a.getMode(this.options,b);if(te.startState)throw new Error("Overlays may not be stateful.");ft(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,wi(this)}),removeOverlay:mi(function(b){for(var E=this.state.overlays,te=0;te<E.length;++te){var ie=E[te].modeSpec;if(ie==b||typeof b=="string"&&ie.name==b){E.splice(te,1),this.state.modeGen++,wi(this);return}}}),indentLine:mi(function(b,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Ft(this.doc,b)&&ga(this,b,E,te)}),indentSelection:mi(function(b){for(var E=this.doc.sel.ranges,te=-1,ie=0;ie<E.length;ie++){var ae=E[ie];if(ae.empty())ae.head.line>te&&(ga(this,ae.head.line,b,!0),te=ae.head.line,ie==this.doc.sel.primIndex&&Fo(this));else{var ue=ae.from(),he=ae.to(),be=Math.max(te,ue.line);te=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Se=be;Se<te;++Se)ga(this,Se,b);var Ke=this.doc.sel.ranges;ue.ch==0&&E.length==Ke.length&&Ke[ie].from().ch>0&&us(this.doc,ie,new vr(ue,Ke[ie].to()),xe)}}}),getTokenAt:function(b,E){return mr(this,b,E)},getLineTokens:function(b,E){return mr(this,Oe(b),E,!0)},getTokenTypeAt:function(b){b=St(this.doc,b);var E=yn(this,$e(this.doc,b.line)),te=0,ie=(E.length-1)/2,ae=b.ch,ue;if(ae==0)ue=E[2];else for(;;){var he=te+ie>>1;if((he?E[he*2-1]:0)>=ae)ie=he;else if(E[he*2+1]<ae)te=he+1;else{ue=E[he*2+2];break}}var be=ue?ue.indexOf("overlay "):-1;return be<0?ue:be==0?null:ue.slice(0,be-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var te=[];if(!x.hasOwnProperty(E))return te;var ie=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")ie[ae[E]]&&te.push(ie[ae[E]]);else if(ae[E])for(var ue=0;ue<ae[E].length;ue++){var he=ie[ae[E][ue]];he&&te.push(he)}else ae.helperType&&ie[ae.helperType]?te.push(ie[ae.helperType]):ie[ae.name]&&te.push(ie[ae.name]);for(var be=0;be<ie._global.length;be++){var Se=ie._global[be];Se.pred(ae,this)&&We(te,Se.val)==-1&&te.push(Se.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=Vt(te,b==null?te.first+te.size-1:b),Wn(this,b+1,E).state},cursorCoords:function(b,E){var te,ie=this.doc.sel.primary();return b==null?te=ie.head:typeof b=="object"?te=St(this.doc,b):te=b?ie.from():ie.to(),xi(this,te,E||"page")},charCoords:function(b,E){return Po(this,St(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ai(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Pe(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var ie=!1,ae;if(typeof b=="number"){var ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,ie=!0),ae=$e(this.doc,b)}else ae=b;return To(this,ae,{top:0,left:0},E||"page",te||ie).top+(ie?this.doc.height-_n(ae):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,te,ie,ae){var ue=this.display;b=xi(this,St(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),ie=="over")he=b.top;else if(ie=="above"||ie=="near"){var Se=Math.max(ue.wrapper.clientHeight,this.doc.height),Ke=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ie=="above"||b.bottom+E.offsetHeight>Se)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Se&&(he=b.bottom),be+E.offsetWidth>Ke&&(be=Ke-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ae=="right"?(be=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?be=0:ae=="middle"&&(be=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),te&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:mi(Cl),triggerOnKeyPress:mi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:mi(El),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:mi(function(b){Bl(this,b)}),findPosH:function(b,E,te,ie){var ae=1;E<0&&(ae=-1,E=-E);for(var ue=St(this.doc,b),he=0;he<E&&(ue=ys(this.doc,ue,ae,te,ie),!ue.hitSide);++he);return ue},moveH:mi(function(b,E){var te=this;this.extendSelectionsBy(function(ie){return te.display.shift||te.doc.extend||ie.empty()?ys(te.doc,ie.head,b,E,te.options.rtlMoveVisually):b<0?ie.from():ie.to()},Ce)}),deleteH:mi(function(b,E){var te=this.doc.sel,ie=this.doc;te.somethingSelected()?ie.replaceSelection("",null,"+delete"):zo(this,function(ae){var ue=ys(ie,ae.head,b,E,!1);return b<0?{from:ue,to:ae.head}:{from:ae.head,to:ue}})}),findPosV:function(b,E,te,ie){var ae=1,ue=ie;E<0&&(ae=-1,E=-E);for(var he=St(this.doc,b),be=0;be<E;++be){var Se=xi(this,he,"div");if(ue==null?ue=Se.left:Se.left=ue,he=Ol(this,Se,ae,te),he.hitSide)break}return he},moveV:mi(function(b,E){var te=this,ie=this.doc,ae=[],ue=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(be){if(ue)return b<0?be.from():be.to();var Se=xi(te,be.head,"div");be.goalColumn!=null&&(Se.left=be.goalColumn),ae.push(Se.left);var Ke=Ol(te,Se,b,E);return E=="page"&&be==ie.sel.primary()&&qa(te,Po(te,Ke,"div").top-Se.top),Ke},Ce),ae.length)for(var he=0;he<ie.sel.ranges.length;he++)ie.sel.ranges[he].goalColumn=ae[he]}),findWordAt:function(b){var E=this.doc,te=$e(E,b.line).text,ie=b.ch,ae=b.ch;if(te){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==te.length)&&ie?--ie:++ae;for(var he=te.charAt(ie),be=le(he,ue)?function(Se){return le(Se,ue)}:/\s/.test(he)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!le(Se)};ie>0&&be(te.charAt(ie-1));)--ie;for(;ae<te.length&&be(te.charAt(ae));)++ae}return new vr(Oe(b.line,ie),Oe(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?_e(this.display.cursorDiv,"CodeMirror-overwrite"):ut(this.display.cursorDiv,"CodeMirror-overwrite"),tn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==De()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Li(this)-this.display.barHeight,width:b.scrollWidth-Li(this)-this.display.barWidth,clientHeight:no(this),clientWidth:Ji(this)}},scrollIntoView:mi(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:Oe(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?jl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:mi(function(b,E){var te=this,ie=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=ie(b)),E!=null&&(this.display.wrapper.style.height=ie(E)),this.options.lineWrapping&&Yo(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(ue){if(ue.widgets){for(var he=0;he<ue.widgets.length;he++)if(ue.widgets[he].noHScroll){co(te,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,tn(this,"refresh",this)}),operation:function(b){return Ti(this,b)},startOperation:function(){return Eo(this)},endOperation:function(){return Do(this)},refresh:mi(function(){var b=this.display.cachedTextHeight;wi(this),this.curOp.forceUpdate=!0,xo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ai(this.display))>.5||this.options.lineWrapping)&&Ya(this),tn(this,"refresh",this)}),swapDoc:mi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),xo(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}},Kt(a),a.registerHelper=function(b,E,te){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=te},a.registerGlobalHelper=function(b,E,te,ie){a.registerHelper(b,E,ie),x[b]._global.push({pred:te,val:ie})}}function ys(a,y,x,b,E){var te=y,ie=x,ae=$e(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function he(){var an=y.line+ue;return an<a.first||an>=a.first+a.size?!1:(y=new Oe(an,y.ch,y.sticky),ae=$e(a,an))}function be(an){var qt;if(b=="codepoint"){var dn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(dn)?qt=null:qt=new Oe(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(dn>=55296&&dn<56320?2:1))),-x)}else E?qt=Lu(a.cm,ae,y,x):qt=hs(ae,y,x);if(qt==null)if(!an&&he())y=ds(E,a.cm,ae,y.line,ue);else return!1;else y=qt;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var Se=null,Ke=b=="group",je=a.cm&&a.cm.getHelper(y,"wordChars"),wt=!0;!(x<0&&!be(!wt));wt=!1){var Mt=ae.text.charAt(y.ch)||`
|
|
`,zt=le(Mt,je)?"w":Ke&&Mt==`
|
|
`?"n":!Ke||/\s/.test(Mt)?null:"p";if(Ke&&!wt&&!zt&&(zt="s"),Se&&Se!=zt){x<0&&(x=1,be(),y.sticky="after");break}if(zt&&(Se=zt),x>0&&!be(!wt))break}var Qt=Ia(a,y,te,ie,!0);return Ut(te,Qt)&&(Qt.hitSide=!0),Qt}function Ol(a,y,x,b){var E=a.doc,te=y.left,ie;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(ae-.5*Ai(a.display),3);ie=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(ie=x>0?y.bottom+3:y.top-3);for(var he;he=ai(a,te,ie),!!he.outside;){if(x<0?ie<=0:ie>=E.height){he.hitSide=!0;break}ie+=x*5}return he}var xr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Rl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function te(ae){for(var ue=ae.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}At(E,"paste",function(ae){!te(ae)||tt(b,ae)||Pl(ae,b)||ye<=11&&setTimeout($r(b,function(){return y.updateFromDOM()}),20)}),At(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),At(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),At(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),At(E,"touchstart",function(){return x.forceCompositionEnd()}),At(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(ae){if(!(!te(ae)||tt(b,ae))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Fl(b);za({lineWise:!0,text:ue.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,xe),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var he=Ki.text.join(`
|
|
`);if(ae.clipboardData.setData("Text",he),ae.clipboardData.getData("Text")==he){ae.preventDefault();return}}var be=Il(),Se=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Se.value=Ki.text.join(`
|
|
`);var Ke=document.activeElement;mt(Se),setTimeout(function(){b.display.lineSpace.removeChild(be),Ke.focus(),Ke==E&&x.showPrimarySelection()},50)}}At(E,"copy",ie),At(E,"cut",ie)},xr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},xr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},xr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},xr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xr.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 te=Za(y,a.anchorNode,a.anchorOffset),ie=Za(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&ie&&!ie.bad&&bt(Ue(te,ie),b)==0&&bt(rn(te,ie),E)==0)){var ae=y.display.view,ue=b.line>=y.display.viewFrom&&Nl(y,b)||{node:ae[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Nl(y,E);if(!he){var be=ae[ae.length-1].measure,Se=be.maps?be.maps[be.maps.length-1]:be.map;he={node:Se[Se.length-1],offset:Se[Se.length-2]-Se[Se.length-3]}}if(!ue||!he){a.removeAllRanges();return}var Ke=a.rangeCount&&a.getRangeAt(0),je;try{je=Be(ue.node,ue.offset,he.offset,he.node)}catch(wt){}je&&(!se&&y.state.focused?(a.collapse(ue.node,ue.offset),je.collapsed||(a.removeAllRanges(),a.addRange(je))):(a.removeAllRanges(),a.addRange(je)),Ke&&a.anchorNode==null?a.addRange(Ke):se&&this.startGracePeriod()),this.rememberSelection()}},xr.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)},xr.prototype.showMultipleSelections=function(a){Ye(this.cm.display.cursorDiv,a.cursors),Ye(this.cm.display.selectionDiv,a.selection)},xr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},xr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ze(this.div,y)},xr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},xr.prototype.blur=function(){this.div.blur()},xr.prototype.getField=function(){return this.div},xr.prototype.supportsTouch=function(){return!0},xr.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)},xr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},xr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Te&&we&&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,fo(x,b),xe),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},xr.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=Oe(b.line-1,$e(a.doc,b.line-1).length)),E.ch==$e(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Oe(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,ie,ae;b.line==y.viewFrom||(te=Co(a,b.line))==0?(ie=ke(y.view[0].line),ae=y.view[0].node):(ie=ke(y.view[te].line),ae=y.view[te-1].node.nextSibling);var ue=Co(a,E.line),he,be;if(ue==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=ke(y.view[ue+1].line)-1,be=y.view[ue+1].node.previousSibling),!ae)return!1;for(var Se=a.doc.splitLines(Yu(a,ae,be,ie,he)),Ke=en(a.doc,Oe(ie,0),Oe(he,$e(a.doc,he).text.length));Se.length>1&&Ke.length>1;)if(Le(Se)==Le(Ke))Se.pop(),Ke.pop(),he--;else if(Se[0]==Ke[0])Se.shift(),Ke.shift(),ie++;else break;for(var je=0,wt=0,Mt=Se[0],zt=Ke[0],Qt=Math.min(Mt.length,zt.length);je<Qt&&Mt.charCodeAt(je)==zt.charCodeAt(je);)++je;for(var an=Le(Se),qt=Le(Ke),dn=Math.min(an.length-(Se.length==1?je:0),qt.length-(Ke.length==1?je:0));wt<dn&&an.charCodeAt(an.length-wt-1)==qt.charCodeAt(qt.length-wt-1);)++wt;if(Se.length==1&&Ke.length==1&&ie==b.line)for(;je&&je>b.ch&&an.charCodeAt(an.length-wt-1)==qt.charCodeAt(qt.length-wt-1);)je--,wt++;Se[Se.length-1]=an.slice(0,an.length-wt).replace(/^\u200b+/,""),Se[0]=Se[0].slice(je).replace(/\u200b+$/,"");var Cn=Oe(ie,je),gn=Oe(he,Ke.length?Le(Ke).length-wt:0);if(Se.length>1||Se[0]||bt(Cn,gn))return Wo(a.doc,Se,Cn,gn,"+input"),!0},xr.prototype.ensurePolled=function(){this.forceCompositionEnd()},xr.prototype.reset=function(){this.forceCompositionEnd()},xr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},xr.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))},xr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Ti(this.cm,function(){return wi(a.cm)})},xr.prototype.setUneditable=function(a){a.contentEditable="false"},xr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||$r(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},xr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},xr.prototype.onContextMenu=function(){},xr.prototype.resetPosition=function(){},xr.prototype.needsContentAttribute=!0;function Nl(a,y){var x=Qi(a,y.line);if(!x||x.hidden)return null;var b=$e(a.doc,y.line),E=Ao(x,b,y.line),te=Xt(b,a.doc.direction),ie="left";if(te){var ae=It(te,y.ch);ie=ae%2?"right":"left"}var ue=xa(E.map,y.ch,ie);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}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 te="",ie=!1,ae=a.doc.lineSeparator(),ue=!1;function he(je){return function(wt){return wt.id==je}}function be(){ie&&(te+=ae,ue&&(te+=ae),ie=ue=!1)}function Se(je){je&&(be(),te+=je)}function Ke(je){if(je.nodeType==1){var wt=je.getAttribute("cm-text");if(wt){Se(wt);return}var Mt=je.getAttribute("cm-marker"),zt;if(Mt){var Qt=a.findMarks(Oe(b,0),Oe(E+1,0),he(+Mt));Qt.length&&(zt=Qt[0].find(0))&&Se(en(a.doc,zt.from,zt.to).join(ae));return}if(je.getAttribute("contenteditable")=="false")return;var an=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;an&&be();for(var qt=0;qt<je.childNodes.length;qt++)Ke(je.childNodes[qt]);/^(pre|p)$/i.test(je.nodeName)&&(ue=!0),an&&(ie=!0)}else je.nodeType==3&&Se(je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ke(y),y!=x;)y=y.nextSibling,ue=!1;return te}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(Oe(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 te=a.display.view[E];if(te.node==b)return Xu(te,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ze(b,y))return Go(Oe(ke(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?Le(a.rest):a.line;return Go(Oe(ke(te),te.text.length),E)}var ie=y.nodeType==3?y:null,ae=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,x&&(x=ie.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var ue=a.measure,he=ue.maps;function be(zt,Qt,an){for(var qt=-1;qt<(he?he.length:0);qt++)for(var dn=qt<0?ue.map:he[qt],Cn=0;Cn<dn.length;Cn+=3){var gn=dn[Cn+2];if(gn==zt||gn==Qt){var zn=ke(qt<0?a.line:a.rest[qt]),Ar=dn[Cn]+an;return(an<0||gn!=zt)&&(Ar=dn[Cn+(an?1:0)]),Oe(zn,Ar)}}}var Se=be(ie,ae,x);if(Se)return Go(Se,E);for(var Ke=ae.nextSibling,je=ie?ie.nodeValue.length-x:0;Ke;Ke=Ke.nextSibling){if(Se=be(Ke,Ke.firstChild,0),Se)return Go(Oe(Se.line,Se.ch-je),E);je+=Ke.textContent.length}for(var wt=ae.previousSibling,Mt=x;wt;wt=wt.previousSibling){if(Se=be(wt,wt.firstChild,-1),Se)return Go(Oe(Se.line,Se.ch+Mt),E);Mt+=wt.textContent.length}}var Vr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ce,this.hasSelection=!1,this.composing=null};Vr.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),Ne&&(E.style.width="0px"),At(E,"input",function(){me&&ye>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),At(E,"paste",function(ie){tt(b,ie)||Pl(ie,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(ie){if(!tt(b,ie)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Fl(b);za({lineWise:!0,text:ae.text}),ie.type=="cut"?b.setSelections(ae.ranges,null,xe):(x.prevInput="",E.value=ae.text.join(`
|
|
`),mt(E))}else return;ie.type=="cut"&&(b.state.cutIncoming=+new Date)}}At(E,"cut",te),At(E,"copy",te),At(a.scroller,"paste",function(ie){if(!(oi(a,ie)||tt(b,ie))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=ie.clipboardData,E.dispatchEvent(ae)}}),At(a.lineSpace,"selectstart",function(ie){oi(a,ie)||on(ie)}),At(E,"compositionstart",function(){var ie=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:ie,range:b.markText(ie,b.getCursor("to"),{className:"CodeMirror-composing"})}}),At(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Vr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Vr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Vr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=xi(a,x.sel.primary().head,"div"),te=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-te.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-te.left))}return b},Vr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ye(x.cursorDiv,a.cursors),Ye(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Vr.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&&mt(this.textarea),me&&ye>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ye>=9&&(this.hasSelection=null))}},Vr.prototype.getField=function(){return this.textarea},Vr.prototype.supportsTouch=function(){return!1},Vr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Me||De()!=this.textarea))try{this.textarea.focus()}catch(a){}},Vr.prototype.blur=function(){this.textarea.blur()},Vr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vr.prototype.receivedFocus=function(){this.slowPoll()},Vr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Vr.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)},Vr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Er(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&&ye>=9&&this.hasSelection===E||Ee&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var te=E.charCodeAt(0);if(te==8203&&!b&&(b="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,ae=Math.min(b.length,E.length);ie<ae&&b.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return Ti(y,function(){gs(y,E.slice(ie),b.length-ie,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},Vr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vr.prototype.onKeyPress=function(){me&&ye>=9&&(this.hasSelection=null),this.fastPoll()},Vr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var te=wo(x,a),ie=b.scroller.scrollTop;if(!te||fe)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(te)==-1&&$r(x,hi)(x.doc,fo(te),xe);var ue=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
|
|
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;Ae&&(Se=window.scrollY),b.input.focus(),Ae&&window.scrollTo(null,Se),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ke(){if(E.selectionStart!=null){var Mt=x.somethingSelected(),zt="\u200B"+(Mt?E.value:"");E.value="\u21DA",E.value=zt,y.prevInput=Mt?"":"\u200B",E.selectionStart=1,E.selectionEnd=zt.length,b.selForContextMenu=x.doc.sel}}function je(){if(y.contextMenuPending==je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ue,me&&ye<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ie),E.selectionStart!=null)){(!me||me&&ye<9)&&Ke();var Mt=0,zt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?$r(x,tl)(x):Mt++<10?b.detectingSelectAll=setTimeout(zt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(zt,200)}}if(me&&ye>=9&&Ke(),Qe){vn(a);var wt=function(){jt(window,"mouseup",wt),setTimeout(je,20)};At(window,"mouseup",wt)}else setTimeout(je,50)},Vr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Vr.prototype.setUneditable=function(){},Vr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?dt(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=De();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(At(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var ie=te.submit=function(){b(),te.submit=E,te.submit(),te.submit=ie}}catch(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(jt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Ir(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return ae}function Qu(a){a.off=jt,a.on=At,a.wheelEventPixels=iu,a.Doc=Ci,a.splitLines=ir,a.countColumn=pe,a.findColumn=Xe,a.isWordChar=re,a.Pass=st,a.signal=tn,a.Line=Fr,a.changeEnd=po,a.scrollbarModel=Ps,a.Pos=Oe,a.cmpPos=bt,a.modes=sn,a.mimeModes=hn,a.resolveMode=Un,a.getMode=$n,a.modeExtensions=Tr,a.extendMode=lr,a.copyState=Bn,a.startState=Or,a.innerMode=Zn,a.commands=fa,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=_o,a.normalizeKeyMap=Du,a.StringStream=Nt,a.SharedTextMarker=ca,a.TextMarker=mo,a.LineWidget=ua,a.e_preventDefault=on,a.e_stopPropagation=En,a.e_stop=vn,a.addClass=_e,a.contains=Ze,a.rmClass=ut,a.keyNames=go}Zu(Ir),Vu(Ir);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Ci.prototype)Ci.prototype.hasOwnProperty(Ga)&&We(qu,Ga)<0&&(Ir.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Ci.prototype[Ga]));return Kt(Ci),Ir.inputStyles={textarea:Vr,contenteditable:xr},Ir.defineMode=function(a){!Ir.defaults.mode&&a!="null"&&(Ir.defaults.mode=a),Dn.apply(this,arguments)},Ir.defineMIME=Rr,Ir.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ir.defineMIME("text/plain","null"),Ir.defineExtension=function(a,y){Ir.prototype[a]=y},Ir.defineDocExtension=function(a,y){Ci.prototype[a]=y},Ir.fromTextArea=Ju,Qu(Ir),Ir.version="5.58.2",Ir})},25419:function(Tt,Rt,de){(function(se){se(de(89780),de(15525),de(98101))})(function(se){"use strict";se.defineMode("markdown",function(it,Fe){var Ie=se.getMode(it,"text/html"),me=Ie.name=="null";function ye(pe){if(se.findModeByName){var ce=se.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var We=se.getMode(it,pe);return We.name=="null"?null:We}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 Ae={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 ze in Ae)Ae.hasOwnProperty(ze)&&Fe.tokenTypeOverrides[ze]&&(Ae[ze]=Fe.tokenTypeOverrides[ze]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Je=/^\[(x| )\](?=\s)/i,ve=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ot=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ne=/^[^#!\[\]*_\\<>` "'(~:]+/,Te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Me=/^\s*\[[^\]]+?\]:.*$/,Ee=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,qe=" ";function at(pe,ce,We){return ce.f=ce.inline=We,We(pe,ce)}function ct(pe,ce,We){return ce.f=ce.block=We,We(pe,ce)}function lt(pe){return!pe||!/\S/.test(pe.string)}function Qe(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==ut){var ce=me;if(!ce){var We=se.innerMode(Ie,pe.htmlState);ce=We.mode.name=="xml"&&We.state.tagStart===null&&!We.state.context&&We.state.tokenize.isInText}ce&&(pe.f=gt,pe.block=et,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function et(pe,ce){var We=pe.column()===ce.indentation,pt=lt(ce.prevLine.stream),st=ce.indentedCode,xe=ce.prevLine.hr,Ge=ce.list!==!1,Ce=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var Xe=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Ge)){for(ce.list=null;Xe<ce.listStack[ce.listStack.length-1];)ce.listStack.pop(),ce.listStack.length?ce.indentation=ce.listStack[ce.listStack.length-1]:ce.list=!1;ce.list!==!1&&(ce.indentationDiff=Xe-ce.listStack[ce.listStack.length-1])}var He=!pt&&!xe&&!ce.prevLine.header&&(!Ge||!st)&&!ce.prevLine.fencedCodeEnd,ht=(ce.list===!1||xe||pt)&&ce.indentation<=Ce&&pe.match(we),Le=null;if(ce.indentationDiff>=4&&(st||ce.prevLine.fencedCodeEnd||ce.prevLine.header||pt))return pe.skipToEnd(),ce.indentedCode=!0,Ae.code;if(pe.eatSpace())return null;if(We&&ce.indentation<=Ce&&(Le=pe.match(ve))&&Le[1].length<=6)return ce.quote=0,ce.header=Le[1].length,ce.thisLine.header=!0,Fe.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Ye(ce);if(ce.indentation<=Ce&&pe.eat(">"))return ce.quote=We?1:ce.quote+1,Fe.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Ye(ce);if(!ht&&!ce.setext&&We&&ce.indentation<=Ce&&(Le=pe.match(fe))){var nt=Le[1]?"ol":"ul";return ce.indentation=Xe+pe.current().length,ce.list=!0,ce.quote=0,ce.listStack.push(ce.indentation),ce.em=!1,ce.strong=!1,ce.code=!1,ce.strikethrough=!1,Fe.taskLists&&pe.match(Je,!1)&&(ce.taskList=!0),ce.f=ce.inline,Fe.highlightFormatting&&(ce.formatting=["list","list-"+nt]),Ye(ce)}else{if(We&&ce.indentation<=Ce&&(Le=pe.match(Te,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(Le[1]+"+ *$"),ce.localMode=Fe.fencedCodeBlockHighlighting&&ye(Le[2]||Fe.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=se.startState(ce.localMode)),ce.f=ce.block=Zt,Fe.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Ye(ce);if(ce.setext||(!He||!Ge)&&!ce.quote&&ce.list===!1&&!ce.code&&!ht&&!Me.test(pe.string)&&(Le=pe.lookAhead(1))&&(Le=Le.match(ot)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Fe.highlightFormatting&&(ce.formatting="header")):(ce.header=Le[0].charAt(0)=="="?1:2,ce.setext=ce.header),ce.thisLine.header=!0,ce.f=ce.inline,Ye(ce);if(ht)return pe.skipToEnd(),ce.hr=!0,ce.thisLine.hr=!0,Ae.hr;if(pe.peek()==="[")return at(pe,ce,Bt)}return at(pe,ce,ce.inline)}function ut(pe,ce){var We=Ie.token(pe,ce.htmlState);if(!me){var pt=se.innerMode(Ie,ce.htmlState);(pt.mode.name=="xml"&&pt.state.tagStart===null&&!pt.state.context&&pt.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=gt,ce.block=et,ce.htmlState=null)}return We}function Zt(pe,ce){var We=ce.listStack[ce.listStack.length-1]||0,pt=ce.indentation<We,st=We+3;if(ce.fencedEndRE&&ce.indentation<=st&&(pt||pe.match(ce.fencedEndRE))){Fe.highlightFormatting&&(ce.formatting="code-block");var xe;return pt||(xe=Ye(ce)),ce.localMode=ce.localState=null,ce.block=et,ce.f=gt,ce.fencedEndRE=null,ce.code=0,ce.thisLine.fencedCodeEnd=!0,pt?ct(pe,ce,ce.block):xe}else return ce.localMode?ce.localMode.token(pe,ce.localState):(pe.skipToEnd(),Ae.code)}function Ye(pe){var ce=[];if(pe.formatting){ce.push(Ae.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var We=0;We<pe.formatting.length;We++)ce.push(Ae.formatting+"-"+pe.formatting[We]),pe.formatting[We]==="header"&&ce.push(Ae.formatting+"-"+pe.formatting[We]+"-"+pe.header),pe.formatting[We]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?ce.push(Ae.formatting+"-"+pe.formatting[We]+"-"+pe.quote):ce.push("error"))}if(pe.taskOpen)return ce.push("meta"),ce.length?ce.join(" "):null;if(pe.taskClosed)return ce.push("property"),ce.length?ce.join(" "):null;if(pe.linkHref?ce.push(Ae.linkHref,"url"):(pe.strong&&ce.push(Ae.strong),pe.em&&ce.push(Ae.em),pe.strikethrough&&ce.push(Ae.strikethrough),pe.emoji&&ce.push(Ae.emoji),pe.linkText&&ce.push(Ae.linkText),pe.code&&ce.push(Ae.code),pe.image&&ce.push(Ae.image),pe.imageAltText&&ce.push(Ae.imageAltText,"link"),pe.imageMarker&&ce.push(Ae.imageMarker)),pe.header&&ce.push(Ae.header,Ae.header+"-"+pe.header),pe.quote&&(ce.push(Ae.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?ce.push(Ae.quote+"-"+pe.quote):ce.push(Ae.quote+"-"+Fe.maxBlockquoteDepth)),pe.list!==!1){var pt=(pe.listStack.length-1)%3;pt?pt===1?ce.push(Ae.list2):ce.push(Ae.list3):ce.push(Ae.list1)}return pe.trailingSpaceNewLine?ce.push("trailing-space-new-line"):pe.trailingSpace&&ce.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ce.length?ce.join(" "):null}function Ve(pe,ce){if(pe.match(Ne,!0))return Ye(ce)}function gt(pe,ce){var We=ce.text(pe,ce);if(typeof We!="undefined")return We;if(ce.list)return ce.list=null,Ye(ce);if(ce.taskList){var pt=pe.match(Je,!0)[1]===" ";return pt?ce.taskOpen=!0:ce.taskClosed=!0,Fe.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Ye(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Fe.highlightFormatting&&(ce.formatting="header"),Ye(ce);var st=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var xe=st;st==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ge="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(pe.match(new RegExp(Ge),!0))return Ae.linkHref}if(st==="`"){var Ce=ce.formatting;Fe.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var Xe=pe.current().length;if(ce.code==0&&(!ce.quote||Xe==1))return ce.code=Xe,Ye(ce);if(Xe==ce.code){var He=Ye(ce);return ce.code=0,He}else return ce.formatting=Ce,Ye(ce)}else if(ce.code)return Ye(ce);if(st==="\\"&&(pe.next(),Fe.highlightFormatting)){var ht=Ye(ce),Le=Ae.formatting+"-escape";return ht?ht+" "+Le:Le}if(st==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Fe.highlightFormatting&&(ce.formatting="image"),Ye(ce);if(st==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Fe.highlightFormatting&&(ce.formatting="image"),Ye(ce);if(st==="]"&&ce.imageAltText){Fe.highlightFormatting&&(ce.formatting="image");var ht=Ye(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=Ze,ht}if(st==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Fe.highlightFormatting&&(ce.formatting="link")),Ye(ce);if(st==="]"&&ce.linkText){Fe.highlightFormatting&&(ce.formatting="link");var ht=Ye(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ze:gt,ht}if(st==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Be,Fe.highlightFormatting&&(ce.formatting="link");var ht=Ye(ce);return ht?ht+=" ":ht="",ht+Ae.linkInline}if(st==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Be,Fe.highlightFormatting&&(ce.formatting="link");var ht=Ye(ce);return ht?ht+=" ":ht="",ht+Ae.linkEmail}if(Fe.xml&&st==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var nt=pe.string.indexOf(">",pe.pos);if(nt!=-1){var ft=pe.string.substring(pe.start,nt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ft)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=se.startState(Ie),ct(pe,ce,ut)}if(Fe.xml&&st==="<"&&pe.match(/^\/\w*?>/))return ce.md_inside=!1,"tag";if(st==="*"||st==="_"){for(var oe=1,ee=pe.pos==1?" ":pe.string.charAt(pe.pos-2);oe<3&&pe.eat(st);)oe++;var z=pe.peek()||" ",re=!/\s/.test(z)&&(!Ee.test(z)||/\s/.test(ee)||Ee.test(ee)),le=!/\s/.test(ee)&&(!Ee.test(ee)||/\s/.test(z)||Ee.test(z)),ne=null,ge=null;if(oe%2&&(!ce.em&&re&&(st==="*"||!le||Ee.test(ee))?ne=!0:ce.em==st&&le&&(st==="*"||!re||Ee.test(z))&&(ne=!1)),oe>1&&(!ce.strong&&re&&(st==="*"||!le||Ee.test(ee))?ge=!0:ce.strong==st&&le&&(st==="*"||!re||Ee.test(z))&&(ge=!1)),ge!=null||ne!=null){Fe.highlightFormatting&&(ce.formatting=ne==null?"strong":ge==null?"em":"strong em"),ne===!0&&(ce.em=st),ge===!0&&(ce.strong=st);var He=Ye(ce);return ne===!1&&(ce.em=!1),ge===!1&&(ce.strong=!1),He}}else if(st===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Ye(ce);pe.backUp(1)}if(Fe.strikethrough){if(st==="~"&&pe.eatWhile(st)){if(ce.strikethrough){Fe.highlightFormatting&&(ce.formatting="strikethrough");var He=Ye(ce);return ce.strikethrough=!1,He}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Fe.highlightFormatting&&(ce.formatting="strikethrough"),Ye(ce)}else if(st===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Ye(ce);pe.backUp(2)}}if(Fe.emoji&&st===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Fe.highlightFormatting&&(ce.formatting="emoji");var Re=Ye(ce);return ce.emoji=!1,Re}return st===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Ye(ce)}function Be(pe,ce){var We=pe.next();if(We===">"){ce.f=ce.inline=gt,Fe.highlightFormatting&&(ce.formatting="link");var pt=Ye(ce);return pt?pt+=" ":pt="",pt+Ae.linkInline}return pe.match(/^[^>]+/,!0),Ae.linkInline}function Ze(pe,ce){if(pe.eatSpace())return null;var We=pe.next();return We==="("||We==="["?(ce.f=ce.inline=_e(We==="("?")":"]"),Fe.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Ye(ce)):"error"}var De={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _e(pe){return function(ce,We){var pt=ce.next();if(pt===pe){We.f=We.inline=gt,Fe.highlightFormatting&&(We.formatting="link-string");var st=Ye(We);return We.linkHref=!1,st}return ce.match(De[pe]),We.linkHref=!0,Ye(We)}}function Bt(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=mt,pe.next(),Fe.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Ye(ce)):at(pe,ce,gt)}function mt(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=Et,Fe.highlightFormatting&&(ce.formatting="link");var We=Ye(ce);return ce.linkText=!1,We}return pe.match(/^([^\]\\]|\\.)+/,!0),Ae.linkText}function Et(pe,ce){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ce.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ce.f=ce.inline=gt,Ae.linkHref+" url")}var dt={startState:function(){return{f:et,prevLine:{stream:null},thisLine:{stream:null},block:et,htmlState:null,indentation:0,inline:gt,text:Ve,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&&se.copyState(Ie,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?se.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,ce){if(ce.formatting=!1,pe!=ce.thisLine.stream){if(ce.header=0,ce.hr=!1,pe.match(/^\s*$/,!0))return Qe(ce),null;if(ce.prevLine=ce.thisLine,ce.thisLine={stream:pe},ce.taskList=!1,ce.trailingSpace=0,ce.trailingSpaceNewLine=!1,!ce.localState&&(ce.f=ce.block,ce.f!=ut)){var We=pe.match(/^\s*/,!0)[0].replace(/\t/g,qe).length;if(ce.indentation=We,ce.indentationDiff=null,We>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==ut?{state:pe.htmlState,mode:Ie}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:dt}},indent:function(pe,ce,We){return pe.block==ut&&Ie.indent?Ie.indent(pe.htmlState,ce,We):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,We):se.Pass},blankLine:Qe,getType:Ye,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dt},"xml"),se.defineMIME("text/markdown","markdown"),se.defineMIME("text/x-markdown","markdown")})},98101:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){"use strict";se.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 it=0;it<se.modeInfo.length;it++){var Fe=se.modeInfo[it];Fe.mimes&&(Fe.mime=Fe.mimes[0])}se.findModeByMIME=function(Ie){Ie=Ie.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var ye=se.modeInfo[me];if(ye.mime==Ie)return ye;if(ye.mimes){for(var Ae=0;Ae<ye.mimes.length;Ae++)if(ye.mimes[Ae]==Ie)return ye}}if(/\+xml$/.test(Ie))return se.findModeByMIME("application/xml");if(/\+json$/.test(Ie))return se.findModeByMIME("application/json")},se.findModeByExtension=function(Ie){Ie=Ie.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var ye=se.modeInfo[me];if(ye.ext){for(var Ae=0;Ae<ye.ext.length;Ae++)if(ye.ext[Ae]==Ie)return ye}}},se.findModeByFileName=function(Ie){for(var me=0;me<se.modeInfo.length;me++){var ye=se.modeInfo[me];if(ye.file&&ye.file.test(Ie))return ye}var Ae=Ie.lastIndexOf("."),ze=Ae>-1&&Ie.substring(Ae+1,Ie.length);if(ze)return se.findModeByExtension(ze)},se.findModeByName=function(Ie){Ie=Ie.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var ye=se.modeInfo[me];if(ye.name.toLowerCase()==Ie)return ye;if(ye.alias){for(var Ae=0;Ae<ye.alias.length;Ae++)if(ye.alias[Ae].toLowerCase()==Ie)return ye}}}})},67549:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){"use strict";se.defineMode("stex",function(it,Fe){"use strict";function Ie(Ne,Te){Ne.cmdState.push(Te)}function me(Ne){return Ne.cmdState.length>0?Ne.cmdState[Ne.cmdState.length-1]:null}function ye(Ne){var Te=Ne.cmdState.pop();Te&&Te.closeBracket()}function Ae(Ne){for(var Te=Ne.cmdState,Me=Te.length-1;Me>=0;Me--){var Ee=Te[Me];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function ze(Ne,Te,Me){return function(){this.name=Ne,this.bracketNo=0,this.style=Te,this.styles=Me,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=ze("importmodule","tag",["string","builtin"]),we.documentclass=ze("documentclass","tag",["","atom"]),we.usepackage=ze("usepackage","tag",["atom"]),we.begin=ze("begin","tag",["atom"]),we.end=ze("end","tag",["atom"]),we.label=ze("label","tag",["atom"]),we.ref=ze("ref","tag",["atom"]),we.eqref=ze("eqref","tag",["atom"]),we.cite=ze("cite","tag",["atom"]),we.bibitem=ze("bibitem","tag",["atom"]),we.Bibitem=ze("Bibitem","tag",["atom"]),we.RBibitem=ze("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(Ne,Te){Ne.f=Te}function Je(Ne,Te){var Me;if(Ne.match(/^\\[a-zA-Z@]+/)){var Ee=Ne.current().slice(1);return Me=we.hasOwnProperty(Ee)?we[Ee]:we.DEFAULT,Me=new Me,Ie(Te,Me),fe(Te,ot),Me.style}if(Ne.match(/^\\[$&%#{}_]/)||Ne.match(/^\\[,;!\/\\]/))return"tag";if(Ne.match("\\["))return fe(Te,function(at,ct){return ve(at,ct,"\\]")}),"keyword";if(Ne.match("\\("))return fe(Te,function(at,ct){return ve(at,ct,"\\)")}),"keyword";if(Ne.match("$$"))return fe(Te,function(at,ct){return ve(at,ct,"$$")}),"keyword";if(Ne.match("$"))return fe(Te,function(at,ct){return ve(at,ct,"$")}),"keyword";var qe=Ne.next();if(qe=="%")return Ne.skipToEnd(),"comment";if(qe=="}"||qe=="]"){if(Me=me(Te),Me)Me.closeBracket(qe),fe(Te,ot);else return"error";return"bracket"}else return qe=="{"||qe=="["?(Me=we.DEFAULT,Me=new Me,Ie(Te,Me),"bracket"):/\d/.test(qe)?(Ne.eatWhile(/[\w.%]/),"atom"):(Ne.eatWhile(/[\w\-_]/),Me=Ae(Te),Me.name=="begin"&&(Me.argument=Ne.current()),Me.styleIdentifier())}function ve(Ne,Te,Me){if(Ne.eatSpace())return null;if(Me&&Ne.match(Me))return fe(Te,Je),"keyword";if(Ne.match(/^\\[a-zA-Z@]+/))return"tag";if(Ne.match(/^[a-zA-Z]+/))return"variable-2";if(Ne.match(/^\\[$&%#{}_]/)||Ne.match(/^\\[,;!\/]/)||Ne.match(/^[\^_&]/))return"tag";if(Ne.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ne.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=Ne.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(Ne.skipToEnd(),"comment"):"error"}function ot(Ne,Te){var Me=Ne.peek(),Ee;return Me=="{"||Me=="["?(Ee=me(Te),Ee.openBracket(Me),Ne.eat(Me),fe(Te,Je),"bracket"):/[ \t\r]/.test(Me)?(Ne.eat(Me),null):(fe(Te,Je),ye(Te),Je(Ne,Te))}return{startState:function(){var Ne=Fe.inMathMode?function(Te,Me){return ve(Te,Me)}:Je;return{cmdState:[],f:Ne}},copyState:function(Ne){return{cmdState:Ne.cmdState.slice(),f:Ne.f}},token:function(Ne,Te){return Te.f(Ne,Te)},blankLine:function(Ne){Ne.f=Je,Ne.cmdState.length=0},lineComment:"%"}}),se.defineMIME("text/x-stex","stex"),se.defineMIME("text/x-latex","stex")})},15525:function(Tt,Rt,de){(function(se){se(de(89780))})(function(se){"use strict";var it={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};se.defineMode("xml",function(Ie,me){var ye=Ie.indentUnit,Ae={},ze=me.htmlMode?it:Fe;for(var we in ze)Ae[we]=ze[we];for(var we in me)Ae[we]=me[we];var fe,Je;function ve(Be,Ze){function De(mt){return Ze.tokenize=mt,mt(Be,Ze)}var _e=Be.next();if(_e=="<")return Be.eat("!")?Be.eat("[")?Be.match("CDATA[")?De(Te("atom","]]>")):null:Be.match("--")?De(Te("comment","-->")):Be.match("DOCTYPE",!0,!0)?(Be.eatWhile(/[\w\._\-]/),De(Me(1))):null:Be.eat("?")?(Be.eatWhile(/[\w\._\-]/),Ze.tokenize=Te("meta","?>"),"meta"):(fe=Be.eat("/")?"closeTag":"openTag",Ze.tokenize=ot,"tag bracket");if(_e=="&"){var Bt;return Be.eat("#")?Be.eat("x")?Bt=Be.eatWhile(/[a-fA-F\d]/)&&Be.eat(";"):Bt=Be.eatWhile(/[\d]/)&&Be.eat(";"):Bt=Be.eatWhile(/[\w\.\-:]/)&&Be.eat(";"),Bt?"atom":"error"}else return Be.eatWhile(/[^&<]/),null}ve.isInText=!0;function ot(Be,Ze){var De=Be.next();if(De==">"||De=="/"&&Be.eat(">"))return Ze.tokenize=ve,fe=De==">"?"endTag":"selfcloseTag","tag bracket";if(De=="=")return fe="equals",null;if(De=="<"){Ze.tokenize=ve,Ze.state=ct,Ze.tagName=Ze.tagStart=null;var _e=Ze.tokenize(Be,Ze);return _e?_e+" tag error":"tag error"}else return/[\'\"]/.test(De)?(Ze.tokenize=Ne(De),Ze.stringStartCol=Be.column(),Ze.tokenize(Be,Ze)):(Be.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ne(Be){var Ze=function(De,_e){for(;!De.eol();)if(De.next()==Be){_e.tokenize=ot;break}return"string"};return Ze.isInAttribute=!0,Ze}function Te(Be,Ze){return function(De,_e){for(;!De.eol();){if(De.match(Ze)){_e.tokenize=ve;break}De.next()}return Be}}function Me(Be){return function(Ze,De){for(var _e;(_e=Ze.next())!=null;){if(_e=="<")return De.tokenize=Me(Be+1),De.tokenize(Ze,De);if(_e==">")if(Be==1){De.tokenize=ve;break}else return De.tokenize=Me(Be-1),De.tokenize(Ze,De)}return"meta"}}function Ee(Be,Ze,De){this.prev=Be.context,this.tagName=Ze,this.indent=Be.indented,this.startOfLine=De,(Ae.doNotIndent.hasOwnProperty(Ze)||Be.context&&Be.context.noIndent)&&(this.noIndent=!0)}function qe(Be){Be.context&&(Be.context=Be.context.prev)}function at(Be,Ze){for(var De;;){if(!Be.context||(De=Be.context.tagName,!Ae.contextGrabbers.hasOwnProperty(De)||!Ae.contextGrabbers[De].hasOwnProperty(Ze)))return;qe(Be)}}function ct(Be,Ze,De){return Be=="openTag"?(De.tagStart=Ze.column(),lt):Be=="closeTag"?Qe:ct}function lt(Be,Ze,De){return Be=="word"?(De.tagName=Ze.current(),Je="tag",Zt):Ae.allowMissingTagName&&Be=="endTag"?(Je="tag bracket",Zt(Be,Ze,De)):(Je="error",lt)}function Qe(Be,Ze,De){if(Be=="word"){var _e=Ze.current();return De.context&&De.context.tagName!=_e&&Ae.implicitlyClosed.hasOwnProperty(De.context.tagName)&&qe(De),De.context&&De.context.tagName==_e||Ae.matchClosing===!1?(Je="tag",et):(Je="tag error",ut)}else return Ae.allowMissingTagName&&Be=="endTag"?(Je="tag bracket",et(Be,Ze,De)):(Je="error",ut)}function et(Be,Ze,De){return Be!="endTag"?(Je="error",et):(qe(De),ct)}function ut(Be,Ze,De){return Je="error",et(Be,Ze,De)}function Zt(Be,Ze,De){if(Be=="word")return Je="attribute",Ye;if(Be=="endTag"||Be=="selfcloseTag"){var _e=De.tagName,Bt=De.tagStart;return De.tagName=De.tagStart=null,Be=="selfcloseTag"||Ae.autoSelfClosers.hasOwnProperty(_e)?at(De,_e):(at(De,_e),De.context=new Ee(De,_e,Bt==De.indented)),ct}return Je="error",Zt}function Ye(Be,Ze,De){return Be=="equals"?Ve:(Ae.allowMissing||(Je="error"),Zt(Be,Ze,De))}function Ve(Be,Ze,De){return Be=="string"?gt:Be=="word"&&Ae.allowUnquoted?(Je="string",Zt):(Je="error",Zt(Be,Ze,De))}function gt(Be,Ze,De){return Be=="string"?gt:Zt(Be,Ze,De)}return{startState:function(Be){var Ze={tokenize:ve,state:ct,indented:Be||0,tagName:null,tagStart:null,context:null};return Be!=null&&(Ze.baseIndent=Be),Ze},token:function(Be,Ze){if(!Ze.tagName&&Be.sol()&&(Ze.indented=Be.indentation()),Be.eatSpace())return null;fe=null;var De=Ze.tokenize(Be,Ze);return(De||fe)&&De!="comment"&&(Je=null,Ze.state=Ze.state(fe||De,Be,Ze),Je&&(De=Je=="error"?De+" error":Je)),De},indent:function(Be,Ze,De){var _e=Be.context;if(Be.tokenize.isInAttribute)return Be.tagStart==Be.indented?Be.stringStartCol+1:Be.indented+ye;if(_e&&_e.noIndent)return se.Pass;if(Be.tokenize!=ot&&Be.tokenize!=ve)return De?De.match(/^(\s*)/)[0].length:0;if(Be.tagName)return Ae.multilineTagIndentPastTag!==!1?Be.tagStart+Be.tagName.length+2:Be.tagStart+ye*(Ae.multilineTagIndentFactor||1);if(Ae.alignCDATA&&/<!\[CDATA\[/.test(Ze))return 0;var Bt=Ze&&/^<(\/)?([\w_:\.-]*)/.exec(Ze);if(Bt&&Bt[1])for(;_e;)if(_e.tagName==Bt[2]){_e=_e.prev;break}else if(Ae.implicitlyClosed.hasOwnProperty(_e.tagName))_e=_e.prev;else break;else if(Bt)for(;_e;){var mt=Ae.contextGrabbers[_e.tagName];if(mt&&mt.hasOwnProperty(Bt[2]))_e=_e.prev;else break}for(;_e&&_e.prev&&!_e.startOfLine;)_e=_e.prev;return _e?_e.indent+ye:Be.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ae.htmlMode?"html":"xml",helperType:Ae.htmlMode?"html":"xml",skipAttribute:function(Be){Be.state==Ve&&(Be.state=Zt)},xmlCurrentTag:function(Be){return Be.tagName?{name:Be.tagName,close:Be.type=="closeTag"}:null},xmlCurrentContext:function(Be){for(var Ze=[],De=Be.context;De;De=De.prev)De.tagName&&Ze.push(De.tagName);return Ze.reverse()}}}),se.defineMIME("text/xml","xml"),se.defineMIME("application/xml","xml"),se.mimeModes.hasOwnProperty("text/html")||se.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Tt,Rt,de){"use strict";de.d(Rt,{hP:function(){return ft}});var se=function(oe,ee){return(se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var le in re)Object.prototype.hasOwnProperty.call(re,le)&&(z[le]=re[le])})(oe,ee)};function it(oe,ee){function z(){this.constructor=oe}se(oe,ee),oe.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function Fe(oe,ee,z,re){return new(z||(z=Promise))(function(le,ne){function ge(kt){try{Dt(re.next(kt))}catch(vt){ne(vt)}}function Re(kt){try{Dt(re.throw(kt))}catch(vt){ne(vt)}}function Dt(kt){var vt;kt.done?le(kt.value):(vt=kt.value,vt instanceof z?vt:new z(function(Ct){Ct(vt)})).then(ge,Re)}Dt((re=re.apply(oe,ee||[])).next())})}function Ie(oe,ee){var z,re,le,ne,ge={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Re(Dt){return function(kt){return function(vt){if(z)throw new TypeError("Generator is already executing.");for(;ge;)try{if(z=1,re&&(le=2&vt[0]?re.return:vt[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,vt[1])).done)return le;switch(re=0,le&&(vt=[2&vt[0],le.value]),vt[0]){case 0:case 1:le=vt;break;case 4:return ge.label++,{value:vt[1],done:!1};case 5:ge.label++,re=vt[1],vt=[0];continue;case 7:vt=ge.ops.pop(),ge.trys.pop();continue;default:if(le=ge.trys,!((le=le.length>0&&le[le.length-1])||vt[0]!==6&&vt[0]!==2)){ge=0;continue}if(vt[0]===3&&(!le||vt[1]>le[0]&&vt[1]<le[3])){ge.label=vt[1];break}if(vt[0]===6&&ge.label<le[1]){ge.label=le[1],le=vt;break}if(le&&ge.label<le[2]){ge.label=le[2],ge.ops.push(vt);break}le[2]&&ge.ops.pop(),ge.trys.pop();continue}vt=ee.call(oe,ge)}catch(Ct){vt=[6,Ct],re=0}finally{z=le=0}if(5&vt[0])throw vt[1];return{value:vt[0]?vt[1]:void 0,done:!0}}([Dt,kt])}}}function me(){for(var oe=0,ee=0,z=arguments.length;ee<z;ee++)oe+=arguments[ee].length;var re=Array(oe),le=0;for(ee=0;ee<z;ee++)for(var ne=arguments[ee],ge=0,Re=ne.length;ge<Re;ge++,le++)re[le]=ne[ge];return re}var ye=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(ee,z){for(var re=0,le=z;re<le.length;re++){var ne=le[re],ge=ne[0],Re=ne[1];ee.setAttribute(ge,Re)}},oe.createRect=function(ee,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",ee.toString()),le.setAttribute("height",z.toString()),re&&oe.setAttributes(le,re),le},oe.createLine=function(ee,z,re,le,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",ee.toString()),ge.setAttribute("y1",z.toString()),ge.setAttribute("x2",re.toString()),ge.setAttribute("y2",le.toString()),ne&&oe.setAttributes(ge,ne),ge},oe.createPolygon=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",ee),z&&oe.setAttributes(re,z),re},oe.createCircle=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(ee/2).toString()),re.setAttribute("cy",(ee/2).toString()),re.setAttribute("r",ee.toString()),z&&oe.setAttributes(re,z),re},oe.createEllipse=function(ee,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(ee/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(ee/2).toString()),le.setAttribute("ry",(z/2).toString()),re&&oe.setAttributes(le,re),le},oe.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&oe.setAttributes(z,ee),z},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(ee,z,re,le,ne,ge,Re){var Dt=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(Dt,[["id",ee],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",ge.toString()]]),Dt.appendChild(Re),Dt},oe.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&oe.setAttributes(z,ee),z},oe.createTSpan=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=ee,z&&oe.setAttributes(re,z),re},oe.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&oe.setAttributes(z,ee),z},oe.createPoint=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=ee,re.y=z,re},oe.createPath=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",ee),z&&oe.setAttributes(re,z),re},oe}(),Ae=function(){function oe(){}return oe.addKey=function(ee){oe.key=ee},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),ze=function(){function oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return oe.prototype.rasterize=function(ee,z,re){var le=this;return new Promise(function(ne){var ge=re!==void 0?re:document.createElement("canvas");ee===null&&(le.markersOnly=!0,le.naturalSize=!1);var Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("width",z.width.baseVal.valueAsString),Re.setAttribute("height",z.height.baseVal.valueAsString),Re.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Re.innerHTML=z.innerHTML,le.naturalSize===!0?(Re.width.baseVal.value=ee.naturalWidth,Re.height.baseVal.value=ee.naturalHeight):le.width!==void 0&&le.height!==void 0&&(Re.width.baseVal.value=le.width,Re.height.baseVal.value=le.height),ge.width=Re.width.baseVal.value,ge.height=Re.height.baseVal.value;var Dt=Re.outerHTML,kt=ge.getContext("2d");le.markersOnly!==!0&&kt.drawImage(ee,0,0,ge.width,ge.height);var vt=window.URL,Ct=new Image(ge.width,ge.height);Ct.setAttribute("crossOrigin","anonymous");var It=new Blob([Dt],{type:"image/svg+xml"}),Ot=vt.createObjectURL(It);Ct.onload=function(){kt.drawImage(Ct,0,0),vt.revokeObjectURL(Ot);var Xt=ge.toDataURL(le.imageType,le.imageQuality);ne(Xt)},Ct.src=Ot})},oe}(),we=function(){},fe=function(){function oe(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.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(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(ee){return this.styleSheet===void 0&&this.addStyleSheet(),ee.name=""+this.classNamePrefix+ee.localName,this.classes.push(ee),this.styleSheet.sheet.insertRule("."+ee.name+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length),ee},oe.prototype.addRule=function(ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ee),this.styleSheet.sheet.insertRule(ee.selector+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var ee;this.styleSheet=document.createElement("style"),((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).appendChild(this.styleSheet),this.addRule(new Je("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Je("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Je("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ve("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ve("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},oe.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Je=function(oe,ee){this.selector=oe,this.style=ee},ve=function(oe,ee){this.localName=oe,this.style=ee},ot=function(){function oe(ee,z,re,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=re,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 oe.prototype.show=function(ee){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var ge=document.createElement("div");ge.className=""+z.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){z.markerToolbarButtonClicked(ge,ne)}),z.buttons.push(ge),z.markerButtons.push(ge)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var 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()},oe.prototype.addButtonClickListener=function(ee){this.buttonClickListeners.push(ee)},oe.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ee=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<ee||z===ee&&this.markerButtons.length-1===ee?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===ee&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},oe.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")},oe.prototype.resetButtonStyles=function(){var ee=this;this.buttons.forEach(function(z){z.className=z.className.replace(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(ee,z,re){var le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){le.actionToolbarButtonClicked(ne,re)}),re){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}ee.appendChild(ne),this.buttons.push(ne)},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},oe.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(ee,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},oe.prototype.setActiveButton=function(ee){this.resetButtonStyles(),ee.className=ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},oe.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},oe}(),Ne=function(){function oe(ee,z,re,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=re,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Je("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Je("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},oe.prototype.show=function(ee){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},oe.prototype.setPanelButtons=function(ee){var z,re,le=this;this.panels=ee,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ge;ne.uiStyleSettings=le.uiStyleSettings;var Re=document.createElement("div");Re.className=le.toolboxButtonStyleClass.name+" "+((ge=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:le.toolboxButtonStyleColorsClass.name),Re.innerHTML=ne.icon,Re.title=ne.title,Re.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(Re),le.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(ee){var z=this,re=-1;if(ee!==this.activePanel){re=this.panels.indexOf(ee),this.panelRow.innerHTML="";var le=ee.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=ee}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var Re,Dt;ne.className=z.toolboxButtonStyleClass.name+" "+(ge===re?""+((Re=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:z.toolboxActiveButtonStyleColorsClass.name):""+((Dt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Dt!==void 0?Dt:z.toolboxButtonStyleColorsClass.name))})},oe}(),Te=function(oe,ee){this.title=oe,this.icon=ee},Me=function(oe){function ee(z,re,le,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=re,ge.currentColor=le,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(le){var ne=z.getColorBox(le);re.appendChild(ne),z.colorBoxes.push(ne)}),re},ee.prototype.getColorBox=function(z){var re=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=ne-2+"px",ge.style.height=ne-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(ne+2)/2+"px",ge.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){re.setCurrentColor(z,ge)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=ne-2+"px",Re.style.height=ne-2+"px",Re.style.backgroundColor=z,Re.style.borderRadius=ne/2+"px",z==="transparent"&&(Re.style.fill=this.uiStyleSettings.toolboxAccentColor,Re.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),ge.appendChild(Re),ge},ee.prototype.setCurrentColor=function(z,re){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Te),Ee=function(){function oe(ee,z,re){this._state="new",this._isSelected=!1,this._container=ee,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),oe.prototype.ownsTarget=function(ee){return!1},Object.defineProperty(oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},oe.prototype.pointerDown=function(ee,z){},oe.prototype.dblClick=function(ee,z){},oe.prototype.manipulate=function(ee){},oe.prototype.pointerUp=function(ee){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},oe.prototype.scale=function(ee,z){},oe.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},oe.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ee)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),qe=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(ee){return this.topLeft.ownsTarget(ee)?this.topLeft:this.topCenter.ownsTarget(ee)?this.topCenter:this.topRight.ownsTarget(ee)?this.topRight:this.centerLeft.ownsTarget(ee)?this.centerLeft:this.centerRight.ownsTarget(ee)?this.centerRight:this.bottomLeft.ownsTarget(ee)?this.bottomLeft:this.bottomCenter.ownsTarget(ee)?this.bottomCenter:this.bottomRight.ownsTarget(ee)?this.bottomRight:void 0},oe}(),at=function(){function oe(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},oe}(),ct=function(){function oe(){}return oe.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},oe.toSVGMatrix=function(ee,z){return ee.a=z.a,ee.b=z.b,ee.c=z.c,ee.d=z.d,ee.e=z.e,ee.f=z.f,ee},oe}(),lt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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(ye.createTransform()),ne.setupControlBox(),ne}return it(ee,oe),Object.defineProperty(ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ye.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(z);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(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ee.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ee.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ee.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},ee.prototype.resize=function(z){var re=this.manipulationStartLeft,le=this.manipulationStartWidth,ne=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),this.setSize()},ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ee.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},ee.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},ee.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),le=ye.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var le=ye.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},ee.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=ye.createGroup();var z=ye.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ye.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=ye.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 qe,this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ee.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()},ee.prototype.createGrip=function(){var z=new at;return z.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,le=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,ge=(this.height+this.CB_DISTANCE)/2-z/2,Re=this.height+this.CB_DISTANCE-z/2,Dt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,Dt,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,ge),this.positionGrip(this.controlGrips.centerRight.visual,Dt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Re),this.positionGrip(this.controlGrips.bottomRight.visual,Dt,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ee.prototype.showControlBox=function(){this.controlBox.style.display=""},ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ct.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ct.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ct.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ct.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*z,y:le.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},ee}(Ee),Qe=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this))},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.title="Rectangle marker",ee}(lt),et=function(oe){function ee(z,re,le,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=re,ge.currentWidth=le,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.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===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(le,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=le.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.display="flex",Re.style.alignItems="center";var Dt=document.createElement("hr");Dt.style.minWidth="20px",Dt.style.border="0px",Dt.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,Dt.style.flexGrow="2",Re.appendChild(Dt),ne.appendChild(Re),z.widthBoxes.push(ne)}),re},ee.prototype.setCurrentWidth=function(z,re){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Te),ut=function(oe){function ee(z,re,le,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=re,ge.currentStyle=le,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.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/z.styles.length-5+"%",ne.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(le,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var Re=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;ge.innerHTML=Re,ne.appendChild(ge),z.styleBoxes.push(ne)}),re},ee.prototype.setCurrentStyle=function(z,re){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Te),Zt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Me("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ut("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="FrameMarker",ee.title="Frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ee}(Qe),Ye=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"},Ve=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 it(ee,oe),ee.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ee.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ee.prototype.adjustVisual=function(){},ee.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},ee.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},ee.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=ye.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){this.positionGrips()},ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ee.prototype.createGrip=function(){var z=new at;return z.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},ee.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},ee}(Ee),gt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ut("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ee.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()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},ee.typeName="LineMarker",ee.title="Line marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ee}(Ve),Be=function(oe){function ee(z,re,le,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=re,ge.currentFont=le,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.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/z.fonts.length-5+"%",ne.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(le,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=le,ge.style.overflow="hidden";var Re=document.createElement("div");Re.style.whiteSpace="nowrap",Re.style.overflow="hidden",Re.style.textOverflow="ellipsis",Re.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(Re),ne.appendChild(ge),z.fontBoxes.push(ne)}),re},ee.prototype.setCurrentFont=function(z,re){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Te),Ze=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Be("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){if(oe.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(re=!0)}),re},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(re){z.textElement.appendChild(ye.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(le,ne)}return re},ee.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),le=0,ne=0;return re.width>0&&re.height>0&&(le=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:le,y:ne}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),le=this.getTextPosition(re);le.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ee.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),oe.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var le=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),ne={x:le.width*z,y:le.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},ee.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ee.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setColor=function(z){this.textElement&&ye.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},ee.prototype.setFont=function(z){this.textElement&&ye.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},ee.typeName="TextMarker",ee.title="Text marker",ee.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>',ee}(lt),De=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var z=ye.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):oe.prototype.pointerDown.call(this,z,re)},ee.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):oe.prototype.pointerUp.call(this,z)},ee.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)},ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},ee.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=re[0],ne=re[1],ge=re[2],Re=re[3],Dt=!1,kt=0;kt<this.canvasElement.height;kt++)for(var vt=0;vt<this.canvasElement.width;vt++)z.data[kt*this.canvasElement.width*4+4*vt+3]>0&&(Dt=!0,kt<ne&&(ne=kt),vt<le&&(le=vt),kt>Re&&(Re=kt),vt>ge&&(ge=vt));if(Dt){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-le)/this.pixelRatio,this.height=(Re-ne)/this.pixelRatio;var Ct=document.createElement("canvas");Ct.width=ge-le,Ct.height=Re-ne,Ct.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,ge-le,Re-ne),0,0),this.drawingImgUrl=Ct.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ee.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},ee.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),oe.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setDrawingImage()},ee.typeName="FreehandMarker",ee.title="Freehand marker",ee.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>',ee}(lt),_e=function(oe){function ee(z,re,le){var ne=oe.call(this,z,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=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var le=function(Re){var Dt="both";switch(Re){case 0:Dt="both";break;case 1:Dt="start";break;case 2:Dt="end";break;case 3:Dt="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Dt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){z.setCurrentType(Dt,kt)}),re.appendChild(kt),Dt==="both"||Dt==="start"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.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>`,vt.style.marginLeft="5px",kt.appendChild(vt)}var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.style.flexGrow="2";var It=document.createElement("hr");if(It.style.minWidth="20px",It.style.border="0px",It.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),It.style.flexGrow="2",Ct.appendChild(It),kt.appendChild(Ct),Dt==="both"||Dt==="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",kt.appendChild(Ot)}ne.typeBoxes.push(kt)},ne=this,ge=0;ge<4;ge++)le(ge);return re},ee.prototype.setCurrentType=function(z,re){var le=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Te),Bt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 _e("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,re){var le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+le/2)+","+(re+ne/2)},ee.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow2)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(oe.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",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},ee.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},ee.typeName="ArrowMarker",ee.title="Arrow marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ee}(gt),mt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Me("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return it(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="CoverMarker",ee.title="Cover marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ee}(Qe),Et=function(oe){function ee(z,re,le,ne){var ge=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=re,ge.currentOpacity=le,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return it(ee,oe),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.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===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(le,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*le+"%",ne.appendChild(ge),z.opacityBoxes.push(ne)}),re},ee.prototype.setCurrentOpacity=function(z,re){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Te),dt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new Me("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Et("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return it(ee,oe),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="HighlightMarker",ee.title="Highlight marker",ee.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>',ee}(mt),pe='<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>',ce='<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>',We=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Text color",le.defaultColorSet,ne.color,pe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Me("Fill color",le.defaultColorSet,ne.bgColor,ce),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Be("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new at,ne.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return oe.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ee.prototype.createTip=function(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ee.prototype.pointerDown=function(z,re){this.state==="new"&&oe.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):oe.prototype.pointerDown.call(this,z,re)},ee.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,oe.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";oe.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},ee.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else oe.prototype.manipulate.call(this,z)},ee.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ye.setAttributes(this.bgRectangle,[["fill",z]]),ye.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},ee.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},ee.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:re+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,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+le,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+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,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+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,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-le},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-le})},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){ye.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,oe.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*re},this.positionTip()},ee.typeName="CalloutMarker",ee.title="Callout marker",ee.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>',ee}(Ze),pt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Line color",me(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(le.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ut("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Et("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ee.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="EllipseMarker",ee.title="Ellipse marker",ee.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>',ee}(lt),st=function(oe){function ee(z,re,le){return oe.call(this,z,re,le)||this}return it(ee,oe),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ee.prototype.createTips=function(){this.tip1=ye.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(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.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(ye.createTransform()),this.visual.appendChild(this.tip2)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ye.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()]]),ye.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},ee.typeName="MeasurementMarker",ee.title="Measurement marker",ee.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>',ee}(gt),xe=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return it(ee,oe),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="EllipseFrameMarker",ee.title="Ellipse frame marker",ee.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>',ee}(pt),Ge=function(){function oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),oe.prototype.addUndoStep=function(ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ee)||(this.undoStack.push(ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ee)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},oe.prototype.undo=function(){if(this.undoStack.length>1){var ee=this.undoStack.pop();return ee!==void 0&&this.redoStack.push(ee),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},oe}(),Ce=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ut("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.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)},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.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)},ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},ee.prototype.positionGrips=function(){oe.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ee.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),oe.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),oe.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},ee.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,oe.prototype.scale.call(this,z,re)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},oe.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},ee.typeName="CurveMarker",ee.title="Curve marker",ee.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>',ee}(Ve),Xe=function(oe){function ee(z,re,le){var ne=oe.call(this,z,re,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 Me("Line color",me(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Me("Fill color",me(le.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new et("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ut("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Be("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Me("Text color",le.defaultColorSet,ne.textColor,pe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return it(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ye.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ye.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=ye.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()},ee.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},ee.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},ee.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ye.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')"]]),ye.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')"]])},ee.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ee.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"))},ee.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ee.prototype.setFont=function(z){this.captionElement&&ye.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ee.prototype.setTextColor=function(z){this.captionElement&&ye.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ee.prototype.setSize=function(){oe.prototype.setSize.call(this),ye.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ye.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ye.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ye.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ye.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},oe.prototype.getState.call(this));return z.typeName=this.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="CaptionFrameMarker",ee.title="Caption frame marker",ee.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>',ee}(lt),He=function(){function oe(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,this.cancelable=z}return Object.defineProperty(oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),oe.prototype.preventDefault=function(){this._defaultPrevented=!0},oe}(),ht=function(oe){function ee(z,re,le){var ne=oe.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return it(ee,oe),ee}(He),Le=function(oe){function ee(z,re,le){le===void 0&&(le=!1);var ne=oe.call(this,z,le)||this;return ne.marker=re,ne}return it(ee,oe),ee}(He),nt=function(){function oe(){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 oe.prototype.addEventListener=function(ee,z){this[ee].push(z)},oe.prototype.removeEventListener=function(ee,z){var re=this[ee].indexOf(z);re>-1&&this[ee].splice(re,1)},oe}(),ft=function(){function oe(ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ye,this._isOpen=!1,this.undoRedoManager=new Ge,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 nt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.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(oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Zt,De,Bt,Ze,xe,pt,dt,We,st,mt,gt,Ce,Xe]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,De,Bt,Ze,pt,dt,We]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,De,Bt,Ze,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(re){if(typeof re=="string"){var le=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ee){this._zoomLevel=ee,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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ae.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new He(ee))})},oe.prototype.render=function(){return Fe(this,void 0,void 0,function(){var ee;return Ie(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new ze).naturalSize=this.renderAtNaturalSize,ee.imageType=this.renderImageType,ee.imageQuality=this.renderImageQuality,ee.markersOnly=this.renderMarkersOnly,ee.width=this.renderWidth,ee.height=this.renderHeight,[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},oe.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var re=!1;ee||this.eventListeners.beforeclose.forEach(function(le){var ne=new He(z,!0);le(ne),ne.defaultPrevented&&(re=!0)}),re||(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 He(z))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(ee=this._availableMarkerTypes).push.apply(ee,z)},oe.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},oe.prototype.removeRenderEventListener=function(ee){},oe.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},oe.prototype.removeCloseEventListener=function(ee){},oe.prototype.setupResizeObserver=function(){var ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ee.resize(ee.target.clientWidth,ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var ee=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ee:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,re)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(ee,z){this._isResizing=!0;var re=ee/this.imageWidth,le=z/this.imageHeight;this.imageWidth=Math.round(ee),this.imageHeight=Math.round(z),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(re,le),this._isResizing=!1},oe.prototype.scaleMarkers=function(ee,z){var re,le=this;this._currentMarker&&this._currentMarker instanceof Ze?this._currentMarker.scale(ee,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._currentMarker&&ne.scale(ee,z)}),re!==void 0&&this.setCurrentMarker(re)},oe.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"},oe.prototype.setTopLeft=function(){var ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.top-z.top},oe.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)},oe.prototype.addDefs=function(){for(var ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=ye.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,z)},oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},oe.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)},oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},oe.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)},oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},oe.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)},oe.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 ee=document.createElement("a");ee.href="https://markerjs.com/",ee.target="_blank",ee.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>',ee.title="Powered by marker.js",ee.style.display="grid",ee.style.alignItems="center",ee.style.justifyItems="center",ee.style.padding="3px",ee.style.width="20px",ee.style.height="20px",this.logoUI.appendChild(ee),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},oe.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")},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.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 ee=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=ee+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ot(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Ne(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.removeMarker=function(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.dispose()},oe.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())},oe.prototype.toolbarButtonClicked=function(ee,z){if(ee==="marker"&&z!==void 0)this.createNewMarker(z);else if(ee==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},oe.prototype.deleteSelectedMarker=function(){var ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var ne=new Le(ee,ee._currentMarker,!0);le(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=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 Le(ee,re))})}}},oe.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var Re=new Le(ee,void 0,!0);ge(Re),Re.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(ge){var Re=le.markers[ge];le.setCurrentMarker(le.markers[ge]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(Dt){return Dt(new Le(ee,Re))})},le=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.prototype.showNotesEditor=function(){var ee;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=(ee=this._currentMarker.notes)!==null&&ee!==void 0?ee:"",this.overlayContainer.appendChild(this.notesArea))},oe.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)},oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},oe.prototype.addUndoStep=function(){var ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new He(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new He(ee))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var ee=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new He(ee))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var ee=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new He(ee))}))},oe.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},oe.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},oe.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var ee,z,re=this;return Ie(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return ee=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new ht(re,ee,z))}),this.close(!0),[2]}})})},oe.prototype.getState=function(ee){ee===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return z.markers.push(re.getState())}),z},oe.prototype.restoreState=function(ee){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ee.markers.forEach(function(re){var le=z._availableMarkerTypes.find(function(ge){return ge.typeName===re.typeName});if(le!==void 0){var ne=z.addNewMarker(le);ne.restoreState(re),z.markers.push(ne)}}),ee.width&&ee.height&&(ee.width!==this.imageWidth||ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ee.width,this.imageHeight/ee.height),this.eventListeners.restorestate.forEach(function(re){return re(new He(z))})},oe.prototype.addNewMarker=function(ee){var z=ye.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(ee){var z,re=this;(z=typeof ee=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===ee}):ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new Le(re,re._currentMarker))}))},oe.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof De&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(De):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new Le(z,z._currentMarker))})},oe.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},oe.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},oe.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new Le(z,ee))})},oe.prototype.setCurrentMarker=function(ee){var z=this;this._currentMarker!==ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new Le(z,z._currentMarker))})),this._currentMarker=ee,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(re){return re(new Le(z,z._currentMarker))}))},oe.prototype.onPointerDown=function(ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ee.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(ee.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ee.clientX,y:ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY))},oe.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(ee.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(ee){this.touchPoints!==1&&ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ee.clientX,ee.clientY)):this.zoomLevel>1&&this.panTo({x:ee.clientX,y:ee.clientY}))},oe.prototype.onPointerUp=function(ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ee.clientX,ee.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(ee,z){var re=this.markerImage.getBoundingClientRect();return{x:(ee-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ee+"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()},oe.prototype.addLicenseKey=function(ee){Ae.addKey(ee)},oe.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},oe.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},oe.prototype.renderState=function(ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var ee=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new He(ee))}))},oe.prototype.blur=function(){var ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new He(ee))}))},oe.instanceCounter=0,oe}()},66042:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return Ze}});var se=de(33885),it=de(42978),Fe=de(43403),Ie=de(34280),me=de(59301),ye=me.createContext(null),Ae=me.createContext({}),ze=ye,we=de(20068),fe=de(54476),Je=de(92310),ve=de.n(Je),ot=de(77900),Ne=de(10228),Te=de(26112),Me=de(75931),Ee=de(8654),qe=["prefixCls","className","containerRef"],at=function(_e){var Bt=_e.prefixCls,mt=_e.className,Et=_e.containerRef,dt=(0,Me.Z)(_e,qe),pe=me.useContext(Ae),ce=pe.panel,We=(0,Ee.x1)(ce,Et);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(Bt,"-content"),mt),role:"dialog",ref:We},(0,Te.Z)(_e,{aria:!0}),{"aria-modal":"true"},dt))},ct=at,lt=de(48736);function Qe(De){return typeof De=="string"&&String(Number(De))===De?((0,lt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(De)):De}function et(De){warning(!("wrapperClassName"in De),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!De.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ut={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Zt(De,_e){var Bt,mt,Et,dt=De.prefixCls,pe=De.open,ce=De.placement,We=De.inline,pt=De.push,st=De.forceRender,xe=De.autoFocus,Ge=De.keyboard,Ce=De.classNames,Xe=De.rootClassName,He=De.rootStyle,ht=De.zIndex,Le=De.className,nt=De.id,ft=De.style,oe=De.motion,ee=De.width,z=De.height,re=De.children,le=De.mask,ne=De.maskClosable,ge=De.maskMotion,Re=De.maskClassName,Dt=De.maskStyle,kt=De.afterOpenChange,vt=De.onClose,Ct=De.onMouseEnter,It=De.onMouseOver,Ot=De.onMouseLeave,Xt=De.onClick,Yt=De.onKeyDown,At=De.onKeyUp,nn=De.styles,jt=De.drawerRender,tn=me.useRef(),tt=me.useRef(),ln=me.useRef();me.useImperativeHandle(_e,function(){return tn.current});var _t=function(qn){var $t=qn.keyCode,sn=qn.shiftKey;switch($t){case Ne.Z.TAB:{if($t===Ne.Z.TAB){if(!sn&&document.activeElement===ln.current){var hn;(hn=tt.current)===null||hn===void 0||hn.focus({preventScroll:!0})}else if(sn&&document.activeElement===tt.current){var Dn;(Dn=ln.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}}break}case Ne.Z.ESC:{vt&&Ge&&(qn.stopPropagation(),vt(qn));break}}};me.useEffect(function(){if(pe&&xe){var Tn;(Tn=tn.current)===null||Tn===void 0||Tn.focus({preventScroll:!0})}},[pe]);var Kt=me.useState(!1),on=(0,it.Z)(Kt,2),En=on[0],cn=on[1],vn=me.useContext(ze),Jn;typeof pt=="boolean"?Jn=pt?{}:{distance:0}:Jn=pt||{};var jn=(Bt=(mt=(Et=Jn)===null||Et===void 0?void 0:Et.distance)!==null&&mt!==void 0?mt:vn==null?void 0:vn.pushDistance)!==null&&Bt!==void 0?Bt:180,Wr=me.useMemo(function(){return{pushDistance:jn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[jn]);me.useEffect(function(){if(pe){var Tn;vn==null||(Tn=vn.push)===null||Tn===void 0||Tn.call(vn)}else{var qn;vn==null||(qn=vn.pull)===null||qn===void 0||qn.call(vn)}},[pe]),me.useEffect(function(){return function(){var Tn;vn==null||(Tn=vn.pull)===null||Tn===void 0||Tn.call(vn)}},[]);var zr=le&&me.createElement(ot.default,(0,fe.Z)({key:"mask"},ge,{visible:pe}),function(Tn,qn){var $t=Tn.className,sn=Tn.style;return me.createElement("div",{className:ve()("".concat(dt,"-mask"),$t,Ce==null?void 0:Ce.mask,Re),style:(0,se.Z)((0,se.Z)((0,se.Z)({},sn),Dt),nn==null?void 0:nn.mask),onClick:ne&&pe?vt:void 0,ref:qn})}),yr=typeof oe=="function"?oe(ce):oe,sr={};if(En&&jn)switch(ce){case"top":sr.transform="translateY(".concat(jn,"px)");break;case"bottom":sr.transform="translateY(".concat(-jn,"px)");break;case"left":sr.transform="translateX(".concat(jn,"px)");break;default:sr.transform="translateX(".concat(-jn,"px)");break}ce==="left"||ce==="right"?sr.width=Qe(ee):sr.height=Qe(z);var Nn={onMouseEnter:Ct,onMouseOver:It,onMouseLeave:Ot,onClick:Xt,onKeyDown:Yt,onKeyUp:At},ir=me.createElement(ot.default,(0,fe.Z)({key:"panel"},yr,{visible:pe,forceRender:st,onVisibleChanged:function(qn){kt==null||kt(qn)},removeOnLeave:!1,leavedClassName:"".concat(dt,"-content-wrapper-hidden")}),function(Tn,qn){var $t=Tn.className,sn=Tn.style,hn=me.createElement(ct,(0,fe.Z)({id:nt,containerRef:qn,prefixCls:dt,className:ve()(Le,Ce==null?void 0:Ce.content),style:(0,se.Z)((0,se.Z)({},ft),nn==null?void 0:nn.content)},(0,Te.Z)(De,{aria:!0}),Nn),re);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(dt,"-content-wrapper"),Ce==null?void 0:Ce.wrapper,$t),style:(0,se.Z)((0,se.Z)((0,se.Z)({},sr),sn),nn==null?void 0:nn.wrapper)},(0,Te.Z)(De,{data:!0})),jt?jt(hn):hn)}),Er=(0,se.Z)({},He);return ht&&(Er.zIndex=ht),me.createElement(ze.Provider,{value:Wr},me.createElement("div",{className:ve()(dt,"".concat(dt,"-").concat(ce),Xe,(0,we.Z)((0,we.Z)({},"".concat(dt,"-open"),pe),"".concat(dt,"-inline"),We)),style:Er,tabIndex:-1,ref:tn,onKeyDown:_t},zr,me.createElement("div",{tabIndex:0,ref:tt,style:ut,"aria-hidden":"true","data-sentinel":"start"}),ir,me.createElement("div",{tabIndex:0,ref:ln,style:ut,"aria-hidden":"true","data-sentinel":"end"})))}var Ye=me.forwardRef(Zt),Ve=Ye,gt=function(_e){var Bt=_e.open,mt=Bt===void 0?!1:Bt,Et=_e.prefixCls,dt=Et===void 0?"rc-drawer":Et,pe=_e.placement,ce=pe===void 0?"right":pe,We=_e.autoFocus,pt=We===void 0?!0:We,st=_e.keyboard,xe=st===void 0?!0:st,Ge=_e.width,Ce=Ge===void 0?378:Ge,Xe=_e.mask,He=Xe===void 0?!0:Xe,ht=_e.maskClosable,Le=ht===void 0?!0:ht,nt=_e.getContainer,ft=_e.forceRender,oe=_e.afterOpenChange,ee=_e.destroyOnClose,z=_e.onMouseEnter,re=_e.onMouseOver,le=_e.onMouseLeave,ne=_e.onClick,ge=_e.onKeyDown,Re=_e.onKeyUp,Dt=_e.panelRef,kt=me.useState(!1),vt=(0,it.Z)(kt,2),Ct=vt[0],It=vt[1],Ot=me.useState(!1),Xt=(0,it.Z)(Ot,2),Yt=Xt[0],At=Xt[1];(0,Ie.Z)(function(){At(!0)},[]);var nn=Yt?mt:!1,jt=me.useRef(),tn=me.useRef();(0,Ie.Z)(function(){nn&&(tn.current=document.activeElement)},[nn]);var tt=function(En){var cn;if(It(En),oe==null||oe(En),!En&&tn.current&&!((cn=jt.current)!==null&&cn!==void 0&&cn.contains(tn.current))){var vn;(vn=tn.current)===null||vn===void 0||vn.focus({preventScroll:!0})}},ln=me.useMemo(function(){return{panel:Dt}},[Dt]);if(!ft&&!Ct&&!nn&&ee)return null;var _t={onMouseEnter:z,onMouseOver:re,onMouseLeave:le,onClick:ne,onKeyDown:ge,onKeyUp:Re},Kt=(0,se.Z)((0,se.Z)({},_e),{},{open:nn,prefixCls:dt,placement:ce,autoFocus:pt,keyboard:xe,width:Ce,mask:He,maskClosable:Le,inline:nt===!1,afterOpenChange:tt,ref:jt},_t);return me.createElement(Ae.Provider,{value:ln},me.createElement(Fe.Z,{open:nn||ft||Ct,autoDestroy:!1,getContainer:nt,autoLock:He&&(nn||Ct)},me.createElement(Ve,Kt)))},Be=gt,Ze=Be},25930:function(Tt,Rt,de){"use strict";de.d(Rt,{Cd:function(){return gt}});var se=de(54476),it=de(33885),Fe=de(75931),Ie=de(59301),me=de(92310),ye=de.n(me),Ae={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ze=function(){var De=(0,Ie.useRef)([]),_e=(0,Ie.useRef)(null);return(0,Ie.useEffect)(function(){var Bt=Date.now(),mt=!1;De.current.forEach(function(Et){if(Et){mt=!0;var dt=Et.style;dt.transitionDuration=".3s, .3s, .3s, .06s",_e.current&&Bt-_e.current<100&&(dt.transitionDuration="0s, 0s")}}),mt&&(_e.current=Date.now())}),De.current},we=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],fe=function(De){var _e=(0,it.Z)((0,it.Z)({},Ae),De),Bt=_e.className,mt=_e.percent,Et=_e.prefixCls,dt=_e.strokeColor,pe=_e.strokeLinecap,ce=_e.strokeWidth,We=_e.style,pt=_e.trailColor,st=_e.trailWidth,xe=_e.transition,Ge=(0,Fe.Z)(_e,we);delete Ge.gapPosition;var Ce=Array.isArray(mt)?mt:[mt],Xe=Array.isArray(dt)?dt:[dt],He=ze(),ht=ce/2,Le=100-ce/2,nt="M ".concat(pe==="round"?ht:0,",").concat(ht,`
|
|
L `).concat(pe==="round"?Le:100,",").concat(ht),ft="0 0 100 ".concat(ce),oe=0;return Ie.createElement("svg",(0,se.Z)({className:ye()("".concat(Et,"-line"),Bt),viewBox:ft,preserveAspectRatio:"none",style:We},Ge),Ie.createElement("path",{className:"".concat(Et,"-line-trail"),d:nt,strokeLinecap:pe,stroke:pt,strokeWidth:st||ce,fillOpacity:"0"}),Ce.map(function(ee,z){var re=1;switch(pe){case"round":re=1-ce/100;break;case"square":re=1-ce/2/100;break;default:re=1;break}var le={strokeDasharray:"".concat(ee*re,"px, 100px"),strokeDashoffset:"-".concat(oe,"px"),transition:xe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=Xe[z]||Xe[Xe.length-1];return oe+=ee,Ie.createElement("path",{key:z,className:"".concat(Et,"-line-path"),d:nt,strokeLinecap:pe,stroke:ne,strokeWidth:ce,fillOpacity:"0",ref:function(Re){He[z]=Re},style:le})}))},Je=fe,ve=de(76190),ot=de(42978),Ne=de(47273),Te=0,Me=(0,Ne.Z)();function Ee(){var Ze;return Me?(Ze=Te,Te+=1):Ze="TEST_OR_SSR",Ze}var qe=function(Ze){var De=Ie.useState(),_e=(0,ot.Z)(De,2),Bt=_e[0],mt=_e[1];return Ie.useEffect(function(){mt("rc_progress_".concat(Ee()))},[]),Ze||Bt},at=function(De){var _e=De.bg,Bt=De.children;return Ie.createElement("div",{style:{width:"100%",height:"100%",background:_e}},Bt)};function ct(Ze,De){return Object.keys(Ze).map(function(_e){var Bt=parseFloat(_e),mt="".concat(Math.floor(Bt*De),"%");return"".concat(Ze[_e]," ").concat(mt)})}var lt=Ie.forwardRef(function(Ze,De){var _e=Ze.prefixCls,Bt=Ze.color,mt=Ze.gradientId,Et=Ze.radius,dt=Ze.style,pe=Ze.ptg,ce=Ze.strokeLinecap,We=Ze.strokeWidth,pt=Ze.size,st=Ze.gapDegree,xe=Bt&&(0,ve.Z)(Bt)==="object",Ge=xe?"#FFF":void 0,Ce=pt/2,Xe=Ie.createElement("circle",{className:"".concat(_e,"-circle-path"),r:Et,cx:Ce,cy:Ce,stroke:Ge,strokeLinecap:ce,strokeWidth:We,opacity:pe===0?0:1,style:dt,ref:De});if(!xe)return Xe;var He="".concat(mt,"-conic"),ht=st?"".concat(180+st/2,"deg"):"0deg",Le=ct(Bt,(360-st)/360),nt=ct(Bt,1),ft="conic-gradient(from ".concat(ht,", ").concat(Le.join(", "),")"),oe="linear-gradient(to ".concat(st?"bottom":"top",", ").concat(nt.join(", "),")");return Ie.createElement(Ie.Fragment,null,Ie.createElement("mask",{id:He},Xe),Ie.createElement("foreignObject",{x:0,y:0,width:pt,height:pt,mask:"url(#".concat(He,")")},Ie.createElement(at,{bg:oe},Ie.createElement(at,{bg:ft}))))}),Qe=lt,et=100,ut=function(De,_e,Bt,mt,Et,dt,pe,ce,We,pt){var st=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,xe=Bt/100*360*((360-dt)/360),Ge=dt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ce=(100-mt)/100*_e;We==="round"&&mt!==100&&(Ce+=pt/2,Ce>=_e&&(Ce=_e-.01));var Xe=et/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(_e,"px ").concat(De),strokeDashoffset:Ce+st,transform:"rotate(".concat(Et+xe+Ge,"deg)"),transformOrigin:"".concat(Xe,"px ").concat(Xe,"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}},Zt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ye(Ze){var De=Ze!=null?Ze:[];return Array.isArray(De)?De:[De]}var Ve=function(De){var _e=(0,it.Z)((0,it.Z)({},Ae),De),Bt=_e.id,mt=_e.prefixCls,Et=_e.steps,dt=_e.strokeWidth,pe=_e.trailWidth,ce=_e.gapDegree,We=ce===void 0?0:ce,pt=_e.gapPosition,st=_e.trailColor,xe=_e.strokeLinecap,Ge=_e.style,Ce=_e.className,Xe=_e.strokeColor,He=_e.percent,ht=(0,Fe.Z)(_e,Zt),Le=et/2,nt=qe(Bt),ft="".concat(nt,"-gradient"),oe=Le-dt/2,ee=Math.PI*2*oe,z=We>0?90+We/2:-90,re=ee*((360-We)/360),le=(0,ve.Z)(Et)==="object"?Et:{count:Et,gap:2},ne=le.count,ge=le.gap,Re=Ye(He),Dt=Ye(Xe),kt=Dt.find(function(At){return At&&(0,ve.Z)(At)==="object"}),vt=kt&&(0,ve.Z)(kt)==="object",Ct=vt?"butt":xe,It=ut(ee,re,0,100,z,We,pt,st,Ct,dt),Ot=ze(),Xt=function(){var nn=0;return Re.map(function(jt,tn){var tt=Dt[tn]||Dt[Dt.length-1],ln=ut(ee,re,nn,jt,z,We,pt,tt,Ct,dt);return nn+=jt,Ie.createElement(Qe,{key:tn,color:tt,ptg:jt,radius:oe,prefixCls:mt,gradientId:ft,style:ln,strokeLinecap:Ct,strokeWidth:dt,gapDegree:We,ref:function(Kt){Ot[tn]=Kt},size:et})}).reverse()},Yt=function(){var nn=Math.round(ne*(Re[0]/100)),jt=100/ne,tn=0;return new Array(ne).fill(null).map(function(tt,ln){var _t=ln<=nn-1?Dt[0]:st,Kt=_t&&(0,ve.Z)(_t)==="object"?"url(#".concat(ft,")"):void 0,on=ut(ee,re,tn,jt,z,We,pt,_t,"butt",dt,ge);return tn+=(re-on.strokeDashoffset+ge)*100/re,Ie.createElement("circle",{key:ln,className:"".concat(mt,"-circle-path"),r:oe,cx:Le,cy:Le,stroke:Kt,strokeWidth:dt,opacity:1,style:on,ref:function(cn){Ot[ln]=cn}})})};return Ie.createElement("svg",(0,se.Z)({className:ye()("".concat(mt,"-circle"),Ce),viewBox:"0 0 ".concat(et," ").concat(et),style:Ge,id:Bt,role:"presentation"},ht),!ne&&Ie.createElement("circle",{className:"".concat(mt,"-circle-trail"),r:oe,cx:Le,cy:Le,stroke:st,strokeLinecap:Ct,strokeWidth:pe||dt,style:It}),ne?Yt():Xt())},gt=Ve,Be={Line:Je,Circle:gt}},6551:function(Tt,Rt,de){"use strict";de.d(Rt,{ZP:function(){return Ae}});var se=de(42978),it=de(59301),Fe=de(47273),Ie=0,me=(0,Fe.Z)();function ye(){var ze;return me?(ze=Ie,Ie+=1):ze="TEST_OR_SSR",ze}function Ae(ze){var we=it.useState(),fe=(0,se.Z)(we,2),Je=fe[0],ve=fe[1];return it.useEffect(function(){ve("rc_select_".concat(ye()))},[]),ze||Je}},37463:function(Tt,Rt,de){"use strict";de.d(Rt,{Ac:function(){return tt},Xo:function(){return _t},Wx:function(){return on},ZP:function(){return In},lk:function(){return ct}});var se=de(54476),it=de(94480),Fe=de(20068),Ie=de(33885),me=de(42978),ye=de(75931),Ae=de(76190),ze=de(18929),we=de(48736),fe=de(59301),Je=de(92310),ve=de.n(Je),ot=de(34280),Ne=de(49658),Te=de(8654),Me=function(Pe){var Ft=Pe.className,yt=Pe.customizeIcon,Oe=Pe.customizeIconProps,bt=Pe.children,Ut=Pe.onMouseDown,Jt=Pe.onClick,rn=typeof yt=="function"?yt(Oe):yt;return fe.createElement("span",{className:Ft,onMouseDown:function(Vt){Vt.preventDefault(),Ut==null||Ut(Vt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Jt,"aria-hidden":!0},rn!==void 0?rn:fe.createElement("span",{className:ve()(Ft.split(/\s+/).map(function(Ue){return"".concat(Ue,"-icon")}))},bt))},Ee=Me,qe=function(Pe,Ft,yt,Oe,bt){var Ut=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Jt=arguments.length>6?arguments[6]:void 0,rn=arguments.length>7?arguments[7]:void 0,Ue=fe.useMemo(function(){if((0,Ae.Z)(Oe)==="object")return Oe.clearIcon;if(bt)return bt},[Oe,bt]),Vt=fe.useMemo(function(){return!!(!Ut&&Oe&&(yt.length||Jt)&&!(rn==="combobox"&&Jt===""))},[Oe,Ut,yt.length,Jt,rn]);return{allowClear:Vt,clearIcon:fe.createElement(Ee,{className:"".concat(Pe,"-clear"),onMouseDown:Ft,customizeIcon:Ue},"\xD7")}},at=fe.createContext(null);function ct(){return fe.useContext(at)}function lt(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=fe.useState(!1),Ft=(0,me.Z)(Pe,2),yt=Ft[0],Oe=Ft[1],bt=fe.useRef(null),Ut=function(){window.clearTimeout(bt.current)};fe.useEffect(function(){return Ut},[]);var Jt=function(Ue,Vt){Ut(),bt.current=window.setTimeout(function(){Oe(Ue),Vt&&Vt()},ke)};return[yt,Jt,Ut]}function Qe(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=fe.useRef(null),Ft=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Ft.current)}},[]);function yt(Oe){(Oe||Pe.current===null)&&(Pe.current=Oe),window.clearTimeout(Ft.current),Ft.current=window.setTimeout(function(){Pe.current=null},ke)}return[function(){return Pe.current},yt]}function et(ke,Pe,Ft,yt){var Oe=fe.useRef(null);Oe.current={open:Pe,triggerOpen:Ft,customizedTrigger:yt},fe.useEffect(function(){function bt(Ut){var Jt;if(!((Jt=Oe.current)!==null&&Jt!==void 0&&Jt.customizedTrigger)){var rn=Ut.target;rn.shadowRoot&&Ut.composed&&(rn=Ut.composedPath()[0]||rn),Oe.current.open&&ke().filter(function(Ue){return Ue}).every(function(Ue){return!Ue.contains(rn)&&Ue!==rn})&&Oe.current.triggerOpen(!1)}}return window.addEventListener("mousedown",bt),function(){return window.removeEventListener("mousedown",bt)}},[])}var ut=de(10228);function Zt(ke){return ke&&![ut.Z.ESC,ut.Z.SHIFT,ut.Z.BACKSPACE,ut.Z.TAB,ut.Z.WIN_KEY,ut.Z.ALT,ut.Z.META,ut.Z.WIN_KEY_RIGHT,ut.Z.CTRL,ut.Z.SEMICOLON,ut.Z.EQUALS,ut.Z.CAPS_LOCK,ut.Z.CONTEXT_MENU,ut.Z.F1,ut.Z.F2,ut.Z.F3,ut.Z.F4,ut.Z.F5,ut.Z.F6,ut.Z.F7,ut.Z.F8,ut.Z.F9,ut.Z.F10,ut.Z.F11,ut.Z.F12].includes(ke)}var Ye=de(26112),Ve=de(83836);function gt(ke,Pe,Ft){var yt=(0,Ie.Z)((0,Ie.Z)({},ke),Ft?Pe:{});return Object.keys(Pe).forEach(function(Oe){var bt=Pe[Oe];typeof bt=="function"&&(yt[Oe]=function(){for(var Ut,Jt=arguments.length,rn=new Array(Jt),Ue=0;Ue<Jt;Ue++)rn[Ue]=arguments[Ue];return bt.apply(void 0,rn),(Ut=ke[Oe])===null||Ut===void 0?void 0:Ut.call.apply(Ut,[ke].concat(rn))})}),yt}var Be=gt,Ze=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],De=function(Pe,Ft){var yt=Pe.prefixCls,Oe=Pe.id,bt=Pe.inputElement,Ut=Pe.autoFocus,Jt=Pe.autoComplete,rn=Pe.editable,Ue=Pe.activeDescendantId,Vt=Pe.value,St=Pe.open,mn=Pe.attrs,Gt=(0,ye.Z)(Pe,Ze),fn=bt||fe.createElement("input",null),un=fn,xn=un.ref,yn=un.props;return(0,we.Kp)(!("maxLength"in fn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),fn=fe.cloneElement(fn,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({type:"search"},Be(Gt,yn,!0)),{},{id:Oe,ref:(0,Te.sQ)(Ft,xn),autoComplete:Jt||"off",autoFocus:Ut,className:ve()("".concat(yt,"-selection-search-input"),yn==null?void 0:yn.className),role:"combobox","aria-expanded":St||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Oe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Oe,"_list"),"aria-activedescendant":St?Ue:void 0},mn),{},{value:rn?Vt:"",readOnly:!rn,unselectable:rn?null:"on",style:(0,Ie.Z)((0,Ie.Z)({},yn.style),{},{opacity:rn?null:0})})),fn},_e=fe.forwardRef(De),Bt=_e;function mt(ke){return Array.isArray(ke)?ke:ke!==void 0?[ke]:[]}var Et=typeof window!="undefined"&&window.document&&window.document.documentElement,dt=Et;function pe(ke){return ke!=null}function ce(ke){return!ke&&ke!==0}function We(ke){return["string","number"].includes((0,Ae.Z)(ke))}function pt(ke){var Pe=void 0;return ke&&(We(ke.title)?Pe=ke.title.toString():We(ke.label)&&(Pe=ke.label.toString())),Pe}function st(ke,Pe){dt?fe.useLayoutEffect(ke,Pe):fe.useEffect(ke,Pe)}function xe(ke){var Pe;return(Pe=ke.key)!==null&&Pe!==void 0?Pe:ke.value}var Ge=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},Ce=function(Pe){var Ft=Pe.id,yt=Pe.prefixCls,Oe=Pe.values,bt=Pe.open,Ut=Pe.searchValue,Jt=Pe.autoClearSearchValue,rn=Pe.inputRef,Ue=Pe.placeholder,Vt=Pe.disabled,St=Pe.mode,mn=Pe.showSearch,Gt=Pe.autoFocus,fn=Pe.autoComplete,un=Pe.activeDescendantId,xn=Pe.tabIndex,yn=Pe.removeIcon,Wn=Pe.maxTagCount,Kn=Pe.maxTagTextLength,On=Pe.maxTagPlaceholder,ar=On===void 0?function(xt){return"+ ".concat(xt.length," ...")}:On,Ln=Pe.tagRender,mr=Pe.onToggleOpen,Pr=Pe.onRemove,Qn=Pe.onInputChange,ur=Pe.onInputPaste,wr=Pe.onInputKeyDown,cr=Pe.onInputMouseDown,Gn=Pe.onInputCompositionStart,Cr=Pe.onInputCompositionEnd,er=Pe.onInputBlur,tr=fe.useRef(null),hr=(0,fe.useState)(0),Dr=(0,me.Z)(hr,2),dr=Dr[0],Yn=Dr[1],Hn=(0,fe.useState)(!1),nr=(0,me.Z)(Hn,2),Zr=nr[0],Lr=nr[1],br="".concat(yt,"-selection"),ri=bt||St==="multiple"&&Jt===!1||St==="tags"?Ut:"",Sr=St==="tags"||St==="multiple"&&Jt===!1||mn&&(bt||Zr);st(function(){Yn(tr.current.scrollWidth)},[ri]);var li=function(rt,Lt,Wt,pn,bn){return fe.createElement("span",{title:pt(rt),className:ve()("".concat(br,"-item"),(0,Fe.Z)({},"".concat(br,"-item-disabled"),Wt))},fe.createElement("span",{className:"".concat(br,"-item-content")},Lt),pn&&fe.createElement(Ee,{className:"".concat(br,"-item-remove"),onMouseDown:Ge,onClick:bn,customizeIcon:yn},"\xD7"))},qr=function(rt,Lt,Wt,pn,bn,Rn){var Vn=function(fr){Ge(fr),mr(!bt)};return fe.createElement("span",{onMouseDown:Vn},Ln({label:Lt,value:rt,disabled:Wt,closable:pn,onClose:bn,isMaxTag:!!Rn}))},Br=function(rt){var Lt=rt.disabled,Wt=rt.label,pn=rt.value,bn=!Vt&&!Lt,Rn=Wt;if(typeof Kn=="number"&&(typeof Wt=="string"||typeof Wt=="number")){var Vn=String(Rn);Vn.length>Kn&&(Rn="".concat(Vn.slice(0,Kn),"..."))}var _n=function(rr){rr&&rr.stopPropagation(),Pr(rt)};return typeof Ln=="function"?qr(pn,Rn,Lt,bn,_n):li(rt,Rn,Lt,bn,_n)},Mn=function(rt){if(!Oe.length)return null;var Lt=typeof ar=="function"?ar(rt):ar;return typeof Ln=="function"?qr(void 0,Lt,!1,!1,void 0,!0):li({title:Lt},Lt,!1)},Pt=fe.createElement("div",{className:"".concat(br,"-search"),style:{width:dr},onFocus:function(){Lr(!0)},onBlur:function(){Lr(!1)}},fe.createElement(Bt,{ref:rn,open:bt,prefixCls:yt,id:Ft,inputElement:null,disabled:Vt,autoFocus:Gt,autoComplete:fn,editable:Sr,activeDescendantId:un,value:ri,onKeyDown:wr,onMouseDown:cr,onChange:Qn,onPaste:ur,onCompositionStart:Gn,onCompositionEnd:Cr,onBlur:er,tabIndex:xn,attrs:(0,Ye.Z)(Pe,!0)}),fe.createElement("span",{ref:tr,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},ri,"\xA0")),Ht=fe.createElement(Ve.Z,{prefixCls:"".concat(br,"-overflow"),data:Oe,renderItem:Br,renderRest:Mn,suffix:Pt,itemKey:xe,maxCount:Wn});return fe.createElement("span",{className:"".concat(br,"-wrap")},Ht,!Oe.length&&!ri&&fe.createElement("span",{className:"".concat(br,"-placeholder")},Ue))},Xe=Ce,He=function(Pe){var Ft=Pe.inputElement,yt=Pe.prefixCls,Oe=Pe.id,bt=Pe.inputRef,Ut=Pe.disabled,Jt=Pe.autoFocus,rn=Pe.autoComplete,Ue=Pe.activeDescendantId,Vt=Pe.mode,St=Pe.open,mn=Pe.values,Gt=Pe.placeholder,fn=Pe.tabIndex,un=Pe.showSearch,xn=Pe.searchValue,yn=Pe.activeValue,Wn=Pe.maxLength,Kn=Pe.onInputKeyDown,On=Pe.onInputMouseDown,ar=Pe.onInputChange,Ln=Pe.onInputPaste,mr=Pe.onInputCompositionStart,Pr=Pe.onInputCompositionEnd,Qn=Pe.onInputBlur,ur=Pe.title,wr=fe.useState(!1),cr=(0,me.Z)(wr,2),Gn=cr[0],Cr=cr[1],er=Vt==="combobox",tr=er||un,hr=mn[0],Dr=xn||"";er&&yn&&!Gn&&(Dr=yn),fe.useEffect(function(){er&&Cr(!1)},[er,yn]);var dr=Vt!=="combobox"&&!St&&!un?!1:!!Dr,Yn=ur===void 0?pt(hr):ur,Hn=fe.useMemo(function(){return hr?null:fe.createElement("span",{className:"".concat(yt,"-selection-placeholder"),style:dr?{visibility:"hidden"}:void 0},Gt)},[hr,dr,Gt,yt]);return fe.createElement("span",{className:"".concat(yt,"-selection-wrap")},fe.createElement("span",{className:"".concat(yt,"-selection-search")},fe.createElement(Bt,{ref:bt,prefixCls:yt,id:Oe,open:St,inputElement:Ft,disabled:Ut,autoFocus:Jt,autoComplete:rn,editable:tr,activeDescendantId:Ue,value:Dr,onKeyDown:Kn,onMouseDown:On,onChange:function(Zr){Cr(!0),ar(Zr)},onPaste:Ln,onCompositionStart:mr,onCompositionEnd:Pr,onBlur:Qn,tabIndex:fn,attrs:(0,Ye.Z)(Pe,!0),maxLength:er?Wn:void 0})),!er&&hr?fe.createElement("span",{className:"".concat(yt,"-selection-item"),title:Yn,style:dr?{visibility:"hidden"}:void 0},hr.label):null,Hn)},ht=He,Le=function(Pe,Ft){var yt=(0,fe.useRef)(null),Oe=(0,fe.useRef)(!1),bt=Pe.prefixCls,Ut=Pe.open,Jt=Pe.mode,rn=Pe.showSearch,Ue=Pe.tokenWithEnter,Vt=Pe.disabled,St=Pe.prefix,mn=Pe.autoClearSearchValue,Gt=Pe.onSearch,fn=Pe.onSearchSubmit,un=Pe.onToggleOpen,xn=Pe.onInputKeyDown,yn=Pe.onInputBlur,Wn=Pe.domRef;fe.useImperativeHandle(Ft,function(){return{focus:function(Yn){yt.current.focus(Yn)},blur:function(){yt.current.blur()}}});var Kn=Qe(0),On=(0,me.Z)(Kn,2),ar=On[0],Ln=On[1],mr=function(Yn){var Hn=Yn.which,nr=yt.current instanceof HTMLTextAreaElement;!nr&&Ut&&(Hn===ut.Z.UP||Hn===ut.Z.DOWN)&&Yn.preventDefault(),xn&&xn(Yn),Hn===ut.Z.ENTER&&Jt==="tags"&&!Oe.current&&!Ut&&(fn==null||fn(Yn.target.value)),!(nr&&!Ut&&~[ut.Z.UP,ut.Z.DOWN,ut.Z.LEFT,ut.Z.RIGHT].indexOf(Hn))&&Zt(Hn)&&un(!0)},Pr=function(){Ln(!0)},Qn=(0,fe.useRef)(null),ur=function(Yn){Gt(Yn,!0,Oe.current)!==!1&&un(!0)},wr=function(){Oe.current=!0},cr=function(Yn){Oe.current=!1,Jt!=="combobox"&&ur(Yn.target.value)},Gn=function(Yn){var Hn=Yn.target.value;if(Ue&&Qn.current&&/[\r\n]/.test(Qn.current)){var nr=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Hn=Hn.replace(nr,Qn.current)}Qn.current=null,ur(Hn)},Cr=function(Yn){var Hn=Yn.clipboardData,nr=Hn==null?void 0:Hn.getData("text");Qn.current=nr||""},er=function(Yn){var Hn=Yn.target;if(Hn!==yt.current){var nr=document.body.style.msTouchAction!==void 0;nr?setTimeout(function(){yt.current.focus()}):yt.current.focus()}},tr=function(Yn){var Hn=ar();Yn.target!==yt.current&&!Hn&&!(Jt==="combobox"&&Vt)&&Yn.preventDefault(),(Jt!=="combobox"&&(!rn||!Hn)||!Ut)&&(Ut&&mn!==!1&&Gt("",!0,!1),un())},hr={inputRef:yt,onInputKeyDown:mr,onInputMouseDown:Pr,onInputChange:Gn,onInputPaste:Cr,onInputCompositionStart:wr,onInputCompositionEnd:cr,onInputBlur:yn},Dr=Jt==="multiple"||Jt==="tags"?fe.createElement(Xe,(0,se.Z)({},Pe,hr)):fe.createElement(ht,(0,se.Z)({},Pe,hr));return fe.createElement("div",{ref:Wn,className:"".concat(bt,"-selector"),onClick:er,onMouseDown:tr},St&&fe.createElement("div",{className:"".concat(bt,"-prefix")},St),Dr)},nt=fe.forwardRef(Le),ft=nt,oe=de(65030),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Pe){var Ft=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"}}},re=function(Pe,Ft){var yt=Pe.prefixCls,Oe=Pe.disabled,bt=Pe.visible,Ut=Pe.children,Jt=Pe.popupElement,rn=Pe.animation,Ue=Pe.transitionName,Vt=Pe.dropdownStyle,St=Pe.dropdownClassName,mn=Pe.direction,Gt=mn===void 0?"ltr":mn,fn=Pe.placement,un=Pe.builtinPlacements,xn=Pe.dropdownMatchSelectWidth,yn=Pe.dropdownRender,Wn=Pe.dropdownAlign,Kn=Pe.getPopupContainer,On=Pe.empty,ar=Pe.getTriggerDOMNode,Ln=Pe.onPopupVisibleChange,mr=Pe.onPopupMouseEnter,Pr=(0,ye.Z)(Pe,ee),Qn="".concat(yt,"-dropdown"),ur=Jt;yn&&(ur=yn(Jt));var wr=fe.useMemo(function(){return un||z(xn)},[un,xn]),cr=rn?"".concat(Qn,"-").concat(rn):Ue,Gn=typeof xn=="number",Cr=fe.useMemo(function(){return Gn?null:xn===!1?"minWidth":"width"},[xn,Gn]),er=Vt;Gn&&(er=(0,Ie.Z)((0,Ie.Z)({},er),{},{width:xn}));var tr=fe.useRef(null);return fe.useImperativeHandle(Ft,function(){return{getPopupElement:function(){var Dr;return(Dr=tr.current)===null||Dr===void 0?void 0:Dr.popupElement}}}),fe.createElement(oe.Z,(0,se.Z)({},Pr,{showAction:Ln?["click"]:[],hideAction:Ln?["click"]:[],popupPlacement:fn||(Gt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wr,prefixCls:Qn,popupTransitionName:cr,popup:fe.createElement("div",{onMouseEnter:mr},ur),ref:tr,stretch:Cr,popupAlign:Wn,popupVisible:bt,getPopupContainer:Kn,popupClassName:ve()(St,(0,Fe.Z)({},"".concat(Qn,"-empty"),On)),popupStyle:er,getTriggerDOMNode:ar,onPopupVisibleChange:Ln}),Ut)},le=fe.forwardRef(re),ne=le,ge=de(66712);function Re(ke,Pe){var Ft=ke.key,yt;return"value"in ke&&(yt=ke.value),Ft!=null?Ft:yt!==void 0?yt:"rc-index-key-".concat(Pe)}function Dt(ke){return typeof ke!="undefined"&&!Number.isNaN(ke)}function kt(ke,Pe){var Ft=ke||{},yt=Ft.label,Oe=Ft.value,bt=Ft.options,Ut=Ft.groupLabel,Jt=yt||(Pe?"children":"label");return{label:Jt,value:Oe||"value",options:bt||"options",groupLabel:Ut||Jt}}function vt(ke){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ft=Pe.fieldNames,yt=Pe.childrenAsData,Oe=[],bt=kt(Ft,!1),Ut=bt.label,Jt=bt.value,rn=bt.options,Ue=bt.groupLabel;function Vt(St,mn){Array.isArray(St)&&St.forEach(function(Gt){if(mn||!(rn in Gt)){var fn=Gt[Jt];Oe.push({key:Re(Gt,Oe.length),groupOption:mn,data:Gt,label:Gt[Ut],value:fn})}else{var un=Gt[Ue];un===void 0&&yt&&(un=Gt.label),Oe.push({key:Re(Gt,Oe.length),group:!0,data:Gt,label:un}),Vt(Gt[rn],!0)}})}return Vt(ke,!1),Oe}function Ct(ke){var Pe=(0,Ie.Z)({},ke);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}var It=function(Pe,Ft,yt){if(!Ft||!Ft.length)return null;var Oe=!1,bt=function Jt(rn,Ue){var Vt=(0,ge.Z)(Ue),St=Vt[0],mn=Vt.slice(1);if(!St)return[rn];var Gt=rn.split(St);return Oe=Oe||Gt.length>1,Gt.reduce(function(fn,un){return[].concat((0,it.Z)(fn),(0,it.Z)(Jt(un,mn)))},[]).filter(Boolean)},Ut=bt(Pe,Ft);return Oe?typeof yt!="undefined"?Ut.slice(0,yt):Ut:null},Ot=fe.createContext(null),Xt=Ot;function Yt(ke){var Pe=ke.visible,Ft=ke.values;if(!Pe)return null;var yt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Ft.slice(0,yt).map(function(Oe){var bt=Oe.label,Ut=Oe.value;return["number","string"].includes((0,Ae.Z)(bt))?bt:Ut}).join(", ")),Ft.length>yt?", ...":null)}var At=["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"],nn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],jt=function(Pe){return Pe==="tags"||Pe==="multiple"},tn=fe.forwardRef(function(ke,Pe){var Ft,yt=ke.id,Oe=ke.prefixCls,bt=ke.className,Ut=ke.showSearch,Jt=ke.tagRender,rn=ke.direction,Ue=ke.omitDomProps,Vt=ke.displayValues,St=ke.onDisplayValuesChange,mn=ke.emptyOptions,Gt=ke.notFoundContent,fn=Gt===void 0?"Not Found":Gt,un=ke.onClear,xn=ke.mode,yn=ke.disabled,Wn=ke.loading,Kn=ke.getInputElement,On=ke.getRawInputElement,ar=ke.open,Ln=ke.defaultOpen,mr=ke.onDropdownVisibleChange,Pr=ke.activeValue,Qn=ke.onActiveValueChange,ur=ke.activeDescendantId,wr=ke.searchValue,cr=ke.autoClearSearchValue,Gn=ke.onSearch,Cr=ke.onSearchSplit,er=ke.tokenSeparators,tr=ke.allowClear,hr=ke.prefix,Dr=ke.suffixIcon,dr=ke.clearIcon,Yn=ke.OptionList,Hn=ke.animation,nr=ke.transitionName,Zr=ke.dropdownStyle,Lr=ke.dropdownClassName,br=ke.dropdownMatchSelectWidth,ri=ke.dropdownRender,Sr=ke.dropdownAlign,li=ke.placement,qr=ke.builtinPlacements,Br=ke.getPopupContainer,Mn=ke.showAction,Pt=Mn===void 0?[]:Mn,Ht=ke.onFocus,xt=ke.onBlur,rt=ke.onKeyUp,Lt=ke.onKeyDown,Wt=ke.onMouseDown,pn=(0,ye.Z)(ke,At),bn=jt(xn),Rn=(Ut!==void 0?Ut:bn)||xn==="combobox",Vn=(0,Ie.Z)({},pn);nn.forEach(function(Xn){delete Vn[Xn]}),Ue==null||Ue.forEach(function(Xn){delete Vn[Xn]});var _n=fe.useState(!1),fr=(0,me.Z)(_n,2),rr=fr[0],Fr=fr[1];fe.useEffect(function(){Fr((0,Ne.Z)())},[]);var Di=fe.useRef(null),ii=fe.useRef(null),Gr=fe.useRef(null),ui=fe.useRef(null),gr=fe.useRef(null),fi=fe.useRef(!1),Bi=lt(),pr=(0,me.Z)(Bi,3),yi=pr[0],pi=pr[1],Hi=pr[2];fe.useImperativeHandle(Pe,function(){var Xn,Fn;return{focus:(Xn=ui.current)===null||Xn===void 0?void 0:Xn.focus,blur:(Fn=ui.current)===null||Fn===void 0?void 0:Fn.blur,scrollTo:function(ci){var Ur;return(Ur=gr.current)===null||Ur===void 0?void 0:Ur.scrollTo(ci)},nativeElement:Di.current||ii.current}});var bi=fe.useMemo(function(){var Xn;if(xn!=="combobox")return wr;var Fn=(Xn=Vt[0])===null||Xn===void 0?void 0:Xn.value;return typeof Fn=="string"||typeof Fn=="number"?String(Fn):""},[wr,xn,Vt]),_i=xn==="combobox"&&typeof Kn=="function"&&Kn()||null,kr=typeof On=="function"&&On(),Fi=(0,Te.x1)(ii,kr==null||(Ft=kr.props)===null||Ft===void 0?void 0:Ft.ref),$i=fe.useState(!1),eo=(0,me.Z)($i,2),Vo=eo[0],Yi=eo[1];(0,ot.Z)(function(){Yi(!0)},[]);var Hr=(0,ze.Z)(!1,{defaultValue:Ln,value:ar}),to=(0,me.Z)(Hr,2),ao=to[0],zi=to[1],Kr=Vo?ao:!1,bo=!fn&&mn;(yn||bo&&Kr&&xn==="combobox")&&(Kr=!1);var so=bo?!1:Kr,wn=fe.useCallback(function(Xn){var Fn=Xn!==void 0?Xn:!Kr;yn||(zi(Fn),Kr!==Fn&&(mr==null||mr(Fn)))},[yn,Kr,zi,mr]),An=fe.useMemo(function(){return(er||[]).some(function(Xn){return[`
|
|
`,`\r
|
|
`].includes(Xn)})},[er]),Sn=fe.useContext(Xt)||{},kn=Sn.maxCount,or=Sn.rawValues,Mr=function(Fn,ai,ci){if(!(bn&&Dt(kn)&&(or==null?void 0:or.size)>=kn)){var Ur=!0,Jr=Fn;Qn==null||Qn(null);var ji=It(Fn,er,Dt(kn)?kn-or.size:void 0),Wi=ci?null:ji;return xn!=="combobox"&&Wi&&(Jr="",Cr==null||Cr(Wi),wn(!1),Ur=!1),Gn&&bi!==Jr&&Gn(Jr,{source:ai?"typing":"effect"}),Ur}},Zi=function(Fn){!Fn||!Fn.trim()||Gn(Fn,{source:"submit"})};fe.useEffect(function(){!Kr&&!bn&&xn!=="combobox"&&Mr("",!1,!1)},[Kr]),fe.useEffect(function(){ao&&yn&&zi(!1),yn&&!fi.current&&pi(!1)},[yn]);var vi=Qe(),oi=(0,me.Z)(vi,2),jr=oi[0],Oi=oi[1],Xi=fe.useRef(!1),Li=function(Fn){var ai=jr(),ci=Fn.key,Ur=ci==="Enter";if(Ur&&(xn!=="combobox"&&Fn.preventDefault(),Kr||wn(!0)),Oi(!!bi),ci==="Backspace"&&!ai&&bn&&!bi&&Vt.length){for(var Jr=(0,it.Z)(Vt),ji=null,Wi=Jr.length-1;Wi>=0;Wi-=1){var ro=Jr[Wi];if(!ro.disabled){Jr.splice(Wi,1),ji=ro;break}}ji&&St(Jr,{type:"remove",values:[ji]})}for(var Mi=arguments.length,Ai=new Array(Mi>1?Mi-1:0),Ui=1;Ui<Mi;Ui++)Ai[Ui-1]=arguments[Ui];if(Kr&&(!Ur||!Xi.current)){var uo;Ur&&(Xi.current=!0),(uo=gr.current)===null||uo===void 0||uo.onKeyDown.apply(uo,[Fn].concat(Ai))}Lt==null||Lt.apply(void 0,[Fn].concat(Ai))},Ji=function(Fn){for(var ai=arguments.length,ci=new Array(ai>1?ai-1:0),Ur=1;Ur<ai;Ur++)ci[Ur-1]=arguments[Ur];if(Kr){var Jr;(Jr=gr.current)===null||Jr===void 0||Jr.onKeyUp.apply(Jr,[Fn].concat(ci))}Fn.key==="Enter"&&(Xi.current=!1),rt==null||rt.apply(void 0,[Fn].concat(ci))},no=function(Fn){var ai=Vt.filter(function(ci){return ci!==Fn});St(ai,{type:"remove",values:[Fn]})},Gi=function(){Xi.current=!1},Ao=fe.useRef(!1),ja=function(){pi(!0),yn||(Ht&&!Ao.current&&Ht.apply(void 0,arguments),Pt.includes("focus")&&wn(!0)),Ao.current=!0},ya=function(){fi.current=!0,pi(!1,function(){Ao.current=!1,fi.current=!1,wn(!1)}),!yn&&(bi&&(xn==="tags"?Gn(bi,{source:"submit"}):xn==="multiple"&&Gn("",{source:"blur"})),xt&&xt.apply(void 0,arguments))},Qi=[];fe.useEffect(function(){return function(){Qi.forEach(function(Xn){return clearTimeout(Xn)}),Qi.splice(0,Qi.length)}},[]);var lo=function(Fn){var ai,ci=Fn.target,Ur=(ai=Gr.current)===null||ai===void 0?void 0:ai.getPopupElement();if(Ur&&Ur.contains(ci)){var Jr=setTimeout(function(){var Mi=Qi.indexOf(Jr);if(Mi!==-1&&Qi.splice(Mi,1),Hi(),!rr&&!Ur.contains(document.activeElement)){var Ai;(Ai=ui.current)===null||Ai===void 0||Ai.focus()}});Qi.push(Jr)}for(var ji=arguments.length,Wi=new Array(ji>1?ji-1:0),ro=1;ro<ji;ro++)Wi[ro-1]=arguments[ro];Wt==null||Wt.apply(void 0,[Fn].concat(Wi))},Ni=fe.useState({}),ba=(0,me.Z)(Ni,2),xa=ba[1];function Ua(){xa({})}var wa;kr&&(wa=function(Fn){wn(Fn)}),et(function(){var Xn;return[Di.current,(Xn=Gr.current)===null||Xn===void 0?void 0:Xn.getPopupElement()]},so,wn,!!kr);var Va=fe.useMemo(function(){return(0,Ie.Z)((0,Ie.Z)({},ke),{},{notFoundContent:fn,open:Kr,triggerOpen:so,id:yt,showSearch:Rn,multiple:bn,toggleOpen:wn})},[ke,fn,so,Kr,yt,Rn,bn,wn]),Ko=!!Dr||Wn,Yo;Ko&&(Yo=fe.createElement(Ee,{className:ve()("".concat(Oe,"-arrow"),(0,Fe.Z)({},"".concat(Oe,"-arrow-loading"),Wn)),customizeIcon:Dr,customizeIconProps:{loading:Wn,searchValue:bi,open:Kr,focused:yi,showSearch:Rn}}));var xo=function(){var Fn;un==null||un(),(Fn=ui.current)===null||Fn===void 0||Fn.focus(),St([],{type:"clear",values:Vt}),Mr("",!1,!1)},Xo=qe(Oe,xo,Vt,tr,dr,yn,bi,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,To=fe.createElement(Yn,{ref:gr}),Sa=ve()(Oe,bt,(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(Oe,"-focused"),yi),"".concat(Oe,"-multiple"),bn),"".concat(Oe,"-single"),!bn),"".concat(Oe,"-allow-clear"),tr),"".concat(Oe,"-show-arrow"),Ko),"".concat(Oe,"-disabled"),yn),"".concat(Oe,"-loading"),Wn),"".concat(Oe,"-open"),Kr),"".concat(Oe,"-customize-input"),_i),"".concat(Oe,"-show-search"),Rn)),Po=fe.createElement(ne,{ref:Gr,disabled:yn,prefixCls:Oe,visible:so,popupElement:To,animation:Hn,transitionName:nr,dropdownStyle:Zr,dropdownClassName:Lr,direction:rn,dropdownMatchSelectWidth:br,dropdownRender:ri,dropdownAlign:Sr,placement:li,builtinPlacements:qr,getPopupContainer:Br,empty:mn,getTriggerDOMNode:function(Fn){return ii.current||Fn},onPopupVisibleChange:wa,onPopupMouseEnter:Ua},kr?fe.cloneElement(kr,{ref:Fi}):fe.createElement(ft,(0,se.Z)({},ke,{domRef:ii,prefixCls:Oe,inputElement:_i,ref:ui,id:yt,prefix:hr,showSearch:Rn,autoClearSearchValue:cr,mode:xn,activeDescendantId:ur,tagRender:Jt,values:Vt,open:Kr,onToggleOpen:wn,activeValue:Pr,searchValue:bi,onSearch:Mr,onSearchSubmit:Zi,onRemove:no,tokenWithEnter:An,onInputBlur:Gi}))),xi;return kr?xi=Po:xi=fe.createElement("div",(0,se.Z)({className:Sa},Vn,{ref:Di,onMouseDown:lo,onKeyDown:Li,onKeyUp:Ji,onFocus:ja,onBlur:ya}),fe.createElement(Yt,{visible:yi&&!Kr,values:Vt}),Po,Yo,Ca&&Jo),fe.createElement(at.Provider,{value:Va},xi)}),tt=tn,ln=function(){return null};ln.isSelectOptGroup=!0;var _t=ln,Kt=function(){return null};Kt.isSelectOption=!0;var on=Kt,En=de(80547),cn=de(2738),vn=de(48911);function Jn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jn=["disabled","title","children","style","className"];function Wr(ke){return typeof ke=="string"||typeof ke=="number"}var zr=function(Pe,Ft){var yt=ct(),Oe=yt.prefixCls,bt=yt.id,Ut=yt.open,Jt=yt.multiple,rn=yt.mode,Ue=yt.searchValue,Vt=yt.toggleOpen,St=yt.notFoundContent,mn=yt.onPopupScroll,Gt=fe.useContext(Xt),fn=Gt.maxCount,un=Gt.flattenOptions,xn=Gt.onActiveValue,yn=Gt.defaultActiveFirstOption,Wn=Gt.onSelect,Kn=Gt.menuItemSelectedIcon,On=Gt.rawValues,ar=Gt.fieldNames,Ln=Gt.virtual,mr=Gt.direction,Pr=Gt.listHeight,Qn=Gt.listItemHeight,ur=Gt.optionRender,wr="".concat(Oe,"-item"),cr=(0,En.Z)(function(){return un},[Ut,un],function(Mn,Pt){return Pt[0]&&Mn[1]!==Pt[1]}),Gn=fe.useRef(null),Cr=fe.useMemo(function(){return Jt&&Dt(fn)&&(On==null?void 0:On.size)>=fn},[Jt,fn,On==null?void 0:On.size]),er=function(Pt){Pt.preventDefault()},tr=function(Pt){var Ht;(Ht=Gn.current)===null||Ht===void 0||Ht.scrollTo(typeof Pt=="number"?{index:Pt}:Pt)},hr=fe.useCallback(function(Mn){return rn==="combobox"?!1:On.has(Mn)},[rn,(0,it.Z)(On).toString(),On.size]),Dr=function(Pt){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,xt=cr.length,rt=0;rt<xt;rt+=1){var Lt=(Pt+rt*Ht+xt)%xt,Wt=cr[Lt]||{},pn=Wt.group,bn=Wt.data;if(!pn&&!(bn!=null&&bn.disabled)&&(hr(bn.value)||!Cr))return Lt}return-1},dr=fe.useState(function(){return Dr(0)}),Yn=(0,me.Z)(dr,2),Hn=Yn[0],nr=Yn[1],Zr=function(Pt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;nr(Pt);var xt={source:Ht?"keyboard":"mouse"},rt=cr[Pt];if(!rt){xn(null,-1,xt);return}xn(rt.value,Pt,xt)};(0,fe.useEffect)(function(){Zr(yn!==!1?Dr(0):-1)},[cr.length,Ue]);var Lr=fe.useCallback(function(Mn){return rn==="combobox"?String(Mn).toLowerCase()===Ue.toLowerCase():On.has(Mn)},[rn,Ue,(0,it.Z)(On).toString(),On.size]);(0,fe.useEffect)(function(){var Mn=setTimeout(function(){if(!Jt&&Ut&&On.size===1){var Ht=Array.from(On)[0],xt=cr.findIndex(function(rt){var Lt=rt.data;return Ue?String(Lt.value).startsWith(Ue):Lt.value===Ht});xt!==-1&&(Zr(xt),tr(xt))}});if(Ut){var Pt;(Pt=Gn.current)===null||Pt===void 0||Pt.scrollTo(void 0)}return function(){return clearTimeout(Mn)}},[Ut,Ue]);var br=function(Pt){Pt!==void 0&&Wn(Pt,{selected:!On.has(Pt)}),Jt||Vt(!1)};if(fe.useImperativeHandle(Ft,function(){return{onKeyDown:function(Pt){var Ht=Pt.which,xt=Pt.ctrlKey;switch(Ht){case ut.Z.N:case ut.Z.P:case ut.Z.UP:case ut.Z.DOWN:{var rt=0;if(Ht===ut.Z.UP?rt=-1:Ht===ut.Z.DOWN?rt=1:Jn()&&xt&&(Ht===ut.Z.N?rt=1:Ht===ut.Z.P&&(rt=-1)),rt!==0){var Lt=Dr(Hn+rt,rt);tr(Lt),Zr(Lt,!0)}break}case ut.Z.TAB:case ut.Z.ENTER:{var Wt,pn=cr[Hn];pn&&!(pn!=null&&(Wt=pn.data)!==null&&Wt!==void 0&&Wt.disabled)&&!Cr?br(pn.value):br(void 0),Ut&&Pt.preventDefault();break}case ut.Z.ESC:Vt(!1),Ut&&Pt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Pt){tr(Pt)}}}),cr.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(bt,"_list"),className:"".concat(wr,"-empty"),onMouseDown:er},St);var ri=Object.keys(ar).map(function(Mn){return ar[Mn]}),Sr=function(Pt){return Pt.label};function li(Mn,Pt){var Ht=Mn.group;return{role:Ht?"presentation":"option",id:"".concat(bt,"_list_").concat(Pt)}}var qr=function(Pt){var Ht=cr[Pt];if(!Ht)return null;var xt=Ht.data||{},rt=xt.value,Lt=Ht.group,Wt=(0,Ye.Z)(xt,!0),pn=Sr(Ht);return Ht?fe.createElement("div",(0,se.Z)({"aria-label":typeof pn=="string"&&!Lt?pn:null},Wt,{key:Pt},li(Ht,Pt),{"aria-selected":Lr(rt)}),rt):null},Br={role:"listbox",id:"".concat(bt,"_list")};return fe.createElement(fe.Fragment,null,Ln&&fe.createElement("div",(0,se.Z)({},Br,{style:{height:0,width:0,overflow:"hidden"}}),qr(Hn-1),qr(Hn),qr(Hn+1)),fe.createElement(vn.Z,{itemKey:"key",ref:Gn,data:cr,height:Pr,itemHeight:Qn,fullHeight:!1,onMouseDown:er,onScroll:mn,virtual:Ln,direction:mr,innerProps:Ln?null:Br},function(Mn,Pt){var Ht=Mn.group,xt=Mn.groupOption,rt=Mn.data,Lt=Mn.label,Wt=Mn.value,pn=rt.key;if(Ht){var bn,Rn=(bn=rt.title)!==null&&bn!==void 0?bn:Wr(Lt)?Lt.toString():void 0;return fe.createElement("div",{className:ve()(wr,"".concat(wr,"-group"),rt.className),title:Rn},Lt!==void 0?Lt:pn)}var Vn=rt.disabled,_n=rt.title,fr=rt.children,rr=rt.style,Fr=rt.className,Di=(0,ye.Z)(rt,jn),ii=(0,cn.Z)(Di,ri),Gr=hr(Wt),ui=Vn||!Gr&&Cr,gr="".concat(wr,"-option"),fi=ve()(wr,gr,Fr,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(gr,"-grouped"),xt),"".concat(gr,"-active"),Hn===Pt&&!ui),"".concat(gr,"-disabled"),ui),"".concat(gr,"-selected"),Gr)),Bi=Sr(Mn),pr=!Kn||typeof Kn=="function"||Gr,yi=typeof Bi=="number"?Bi:Bi||Wt,pi=Wr(yi)?yi.toString():void 0;return _n!==void 0&&(pi=_n),fe.createElement("div",(0,se.Z)({},(0,Ye.Z)(ii),Ln?{}:li(Mn,Pt),{"aria-selected":Lr(Wt),className:fi,title:pi,onMouseMove:function(){Hn===Pt||ui||Zr(Pt)},onClick:function(){ui||br(Wt)},style:rr}),fe.createElement("div",{className:"".concat(gr,"-content")},typeof ur=="function"?ur(Mn,{index:Pt}):yi),fe.isValidElement(Kn)||Gr,pr&&fe.createElement(Ee,{className:"".concat(wr,"-option-state"),customizeIcon:Kn,customizeIconProps:{value:Wt,disabled:ui,isSelected:Gr}},Gr?"\u2713":null))}))},yr=fe.forwardRef(zr),sr=yr,Nn=function(ke,Pe){var Ft=fe.useRef({values:new Map,options:new Map}),yt=fe.useMemo(function(){var bt=Ft.current,Ut=bt.values,Jt=bt.options,rn=ke.map(function(St){if(St.label===void 0){var mn;return(0,Ie.Z)((0,Ie.Z)({},St),{},{label:(mn=Ut.get(St.value))===null||mn===void 0?void 0:mn.label})}return St}),Ue=new Map,Vt=new Map;return rn.forEach(function(St){Ue.set(St.value,St),Vt.set(St.value,Pe.get(St.value)||Jt.get(St.value))}),Ft.current.values=Ue,Ft.current.options=Vt,rn},[ke,Pe]),Oe=fe.useCallback(function(bt){return Pe.get(bt)||Ft.current.options.get(bt)},[Pe]);return[yt,Oe]};function ir(ke,Pe){return mt(ke).join("").toUpperCase().includes(Pe)}var Er=function(ke,Pe,Ft,yt,Oe){return fe.useMemo(function(){if(!Ft||yt===!1)return ke;var bt=Pe.options,Ut=Pe.label,Jt=Pe.value,rn=[],Ue=typeof yt=="function",Vt=Ft.toUpperCase(),St=Ue?yt:function(Gt,fn){return Oe?ir(fn[Oe],Vt):fn[bt]?ir(fn[Ut!=="children"?Ut:"label"],Vt):ir(fn[Jt],Vt)},mn=Ue?function(Gt){return Ct(Gt)}:function(Gt){return Gt};return ke.forEach(function(Gt){if(Gt[bt]){var fn=St(Ft,mn(Gt));if(fn)rn.push(Gt);else{var un=Gt[bt].filter(function(xn){return St(Ft,mn(xn))});un.length&&rn.push((0,Ie.Z)((0,Ie.Z)({},Gt),{},(0,Fe.Z)({},bt,un)))}return}St(Ft,mn(Gt))&&rn.push(Gt)}),rn},[ke,yt,Oe,Ft,Pe])},Tn=de(6551),qn=de(11592),$t=["children","value"],sn=["children"];function hn(ke){var Pe=ke,Ft=Pe.key,yt=Pe.props,Oe=yt.children,bt=yt.value,Ut=(0,ye.Z)(yt,$t);return(0,Ie.Z)({key:Ft,value:bt!==void 0?bt:Ft,children:Oe},Ut)}function Dn(ke){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,qn.Z)(ke).map(function(Ft,yt){if(!fe.isValidElement(Ft)||!Ft.type)return null;var Oe=Ft,bt=Oe.type.isSelectOptGroup,Ut=Oe.key,Jt=Oe.props,rn=Jt.children,Ue=(0,ye.Z)(Jt,sn);return Pe||!bt?hn(Ft):(0,Ie.Z)((0,Ie.Z)({key:"__RC_SELECT_GRP__".concat(Ut===null?yt:Ut,"__"),label:Ut},Ue),{},{options:Dn(rn)})}).filter(function(Ft){return Ft})}var Rr=function(Pe,Ft,yt,Oe,bt){return fe.useMemo(function(){var Ut=Pe,Jt=!Pe;Jt&&(Ut=Dn(Ft));var rn=new Map,Ue=new Map,Vt=function(Gt,fn,un){un&&typeof un=="string"&&Gt.set(fn[un],fn)},St=function mn(Gt){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,un=0;un<Gt.length;un+=1){var xn=Gt[un];!xn[yt.options]||fn?(rn.set(xn[yt.value],xn),Vt(Ue,xn,yt.label),Vt(Ue,xn,Oe),Vt(Ue,xn,bt)):mn(xn[yt.options],!0)}};return St(Ut),{options:Ut,valueOptions:rn,labelOptions:Ue}},[Pe,Ft,yt,Oe,bt])},Un=Rr;function $n(ke){var Pe=fe.useRef();Pe.current=ke;var Ft=fe.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return Ft}function Tr(ke){var Pe=ke.mode,Ft=ke.options,yt=ke.children,Oe=ke.backfill,bt=ke.allowClear,Ut=ke.placeholder,Jt=ke.getInputElement,rn=ke.showSearch,Ue=ke.onSearch,Vt=ke.defaultOpen,St=ke.autoFocus,mn=ke.labelInValue,Gt=ke.value,fn=ke.inputValue,un=ke.optionLabelProp,xn=isMultiple(Pe),yn=rn!==void 0?rn:xn||Pe==="combobox",Wn=Ft||convertChildrenToData(yt);if(warning(Pe!=="tags"||Wn.every(function(Ln){return!Ln.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var Kn=Wn.some(function(Ln){return Ln.options?Ln.options.some(function(mr){return typeof("value"in mr?mr.value:mr.key)=="number"}):typeof("value"in Ln?Ln.value:Ln.key)=="number"});warning(!Kn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!un,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!Oe,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!Jt,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!Jt||!bt||!Ut,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ue&&!yn&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Vt||St,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Gt!=null){var On=toArray(Gt);warning(!mn||On.every(function(Ln){return _typeof(Ln)==="object"&&("key"in Ln||"value"in Ln)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!xn||Array.isArray(Gt),"`value` should be array when `mode` is `multiple` or `tags`")}if(yt){var ar=null;toNodeArray(yt).some(function(Ln){if(!React.isValidElement(Ln)||!Ln.type)return!1;var mr=Ln,Pr=mr.type;if(Pr.isSelectOption)return!1;if(Pr.isSelectOptGroup){var Qn=toNodeArray(Ln.props.children).every(function(ur){return!React.isValidElement(ur)||!Ln.type||ur.type.isSelectOption?!0:(ar=ur.type,!1)});return!Qn}return ar=Pr,!0}),ar&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ar.displayName||ar.name||ar,"`.")),warning(fn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function lr(ke,Pe){if(ke){var Ft=function yt(Oe){for(var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ut=0;Ut<Oe.length;Ut++){var Jt=Oe[Ut];if(Jt[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!bt&&Array.isArray(Jt[Pe==null?void 0:Pe.options])&&yt(Jt[Pe==null?void 0:Pe.options],!0))break}};Ft(ke)}}var Bn=null,Zn=["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"],Or=["inputValue"];function Nt(ke){return!ke||(0,Ae.Z)(ke)!=="object"}var $e=fe.forwardRef(function(ke,Pe){var Ft=ke.id,yt=ke.mode,Oe=ke.prefixCls,bt=Oe===void 0?"rc-select":Oe,Ut=ke.backfill,Jt=ke.fieldNames,rn=ke.inputValue,Ue=ke.searchValue,Vt=ke.onSearch,St=ke.autoClearSearchValue,mn=St===void 0?!0:St,Gt=ke.onSelect,fn=ke.onDeselect,un=ke.dropdownMatchSelectWidth,xn=un===void 0?!0:un,yn=ke.filterOption,Wn=ke.filterSort,Kn=ke.optionFilterProp,On=ke.optionLabelProp,ar=ke.options,Ln=ke.optionRender,mr=ke.children,Pr=ke.defaultActiveFirstOption,Qn=ke.menuItemSelectedIcon,ur=ke.virtual,wr=ke.direction,cr=ke.listHeight,Gn=cr===void 0?200:cr,Cr=ke.listItemHeight,er=Cr===void 0?20:Cr,tr=ke.labelRender,hr=ke.value,Dr=ke.defaultValue,dr=ke.labelInValue,Yn=ke.onChange,Hn=ke.maxCount,nr=(0,ye.Z)(ke,Zn),Zr=(0,Tn.ZP)(Ft),Lr=jt(yt),br=!!(!ar&&mr),ri=fe.useMemo(function(){return yn===void 0&&yt==="combobox"?!1:yn},[yn,yt]),Sr=fe.useMemo(function(){return kt(Jt,br)},[JSON.stringify(Jt),br]),li=(0,ze.Z)("",{value:Ue!==void 0?Ue:rn,postState:function(An){return An||""}}),qr=(0,me.Z)(li,2),Br=qr[0],Mn=qr[1],Pt=Un(ar,mr,Sr,Kn,On),Ht=Pt.valueOptions,xt=Pt.labelOptions,rt=Pt.options,Lt=fe.useCallback(function(wn){var An=mt(wn);return An.map(function(Sn){var kn,or,Mr,Zi,vi;if(Nt(Sn))kn=Sn;else{var oi;Mr=Sn.key,or=Sn.label,kn=(oi=Sn.value)!==null&&oi!==void 0?oi:Mr}var jr=Ht.get(kn);if(jr){var Oi;if(or===void 0&&(or=jr==null?void 0:jr[On||Sr.label]),Mr===void 0&&(Mr=(Oi=jr==null?void 0:jr.key)!==null&&Oi!==void 0?Oi:kn),Zi=jr==null?void 0:jr.disabled,vi=jr==null?void 0:jr.title,0)var Xi}return{label:or,value:kn,key:Mr,disabled:Zi,title:vi}})},[Sr,On,Ht]),Wt=(0,ze.Z)(Dr,{value:hr}),pn=(0,me.Z)(Wt,2),bn=pn[0],Rn=pn[1],Vn=fe.useMemo(function(){var wn,An=Lr&&bn===null?[]:bn,Sn=Lt(An);return yt==="combobox"&&ce((wn=Sn[0])===null||wn===void 0?void 0:wn.value)?[]:Sn},[bn,Lt,yt,Lr]),_n=Nn(Vn,Ht),fr=(0,me.Z)(_n,2),rr=fr[0],Fr=fr[1],Di=fe.useMemo(function(){if(!yt&&rr.length===1){var wn=rr[0];if(wn.value===null&&(wn.label===null||wn.label===void 0))return[]}return rr.map(function(An){var Sn;return(0,Ie.Z)((0,Ie.Z)({},An),{},{label:(Sn=typeof tr=="function"?tr(An):An.label)!==null&&Sn!==void 0?Sn:An.value})})},[yt,rr,tr]),ii=fe.useMemo(function(){return new Set(rr.map(function(wn){return wn.value}))},[rr]);fe.useEffect(function(){if(yt==="combobox"){var wn,An=(wn=rr[0])===null||wn===void 0?void 0:wn.value;Mn(pe(An)?String(An):"")}},[rr]);var Gr=$n(function(wn,An){var Sn=An!=null?An:wn;return(0,Fe.Z)((0,Fe.Z)({},Sr.value,wn),Sr.label,Sn)}),ui=fe.useMemo(function(){if(yt!=="tags")return rt;var wn=(0,it.Z)(rt),An=function(kn){return Ht.has(kn)};return(0,it.Z)(rr).sort(function(Sn,kn){return Sn.value<kn.value?-1:1}).forEach(function(Sn){var kn=Sn.value;An(kn)||wn.push(Gr(kn,Sn.label))}),wn},[Gr,rt,Ht,rr,yt]),gr=Er(ui,Sr,Br,ri,Kn),fi=fe.useMemo(function(){return yt!=="tags"||!Br||gr.some(function(wn){return wn[Kn||"value"]===Br})||gr.some(function(wn){return wn[Sr.value]===Br})?gr:[Gr(Br)].concat((0,it.Z)(gr))},[Gr,Kn,yt,gr,Br,Sr]),Bi=function wn(An){var Sn=(0,it.Z)(An).sort(function(kn,or){return Wn(kn,or,{searchValue:Br})});return Sn.map(function(kn){return Array.isArray(kn.options)?(0,Ie.Z)((0,Ie.Z)({},kn),{},{options:kn.options.length>0?wn(kn.options):kn.options}):kn})},pr=fe.useMemo(function(){return Wn?Bi(fi):fi},[fi,Wn,Br]),yi=fe.useMemo(function(){return vt(pr,{fieldNames:Sr,childrenAsData:br})},[pr,Sr,br]),pi=function(An){var Sn=Lt(An);if(Rn(Sn),Yn&&(Sn.length!==rr.length||Sn.some(function(Mr,Zi){var vi;return((vi=rr[Zi])===null||vi===void 0?void 0:vi.value)!==(Mr==null?void 0:Mr.value)}))){var kn=dr?Sn:Sn.map(function(Mr){return Mr.value}),or=Sn.map(function(Mr){return Ct(Fr(Mr.value))});Yn(Lr?kn:kn[0],Lr?or:or[0])}},Hi=fe.useState(null),bi=(0,me.Z)(Hi,2),_i=bi[0],kr=bi[1],Fi=fe.useState(0),$i=(0,me.Z)(Fi,2),eo=$i[0],Vo=$i[1],Yi=Pr!==void 0?Pr:yt!=="combobox",Hr=fe.useCallback(function(wn,An){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},kn=Sn.source,or=kn===void 0?"keyboard":kn;Vo(An),Ut&&yt==="combobox"&&wn!==null&&or==="keyboard"&&kr(String(wn))},[Ut,yt]),to=function(An,Sn,kn){var or=function(){var no,Gi=Fr(An);return[dr?{label:Gi==null?void 0:Gi[Sr.label],value:An,key:(no=Gi==null?void 0:Gi.key)!==null&&no!==void 0?no:An}:An,Ct(Gi)]};if(Sn&&Gt){var Mr=or(),Zi=(0,me.Z)(Mr,2),vi=Zi[0],oi=Zi[1];Gt(vi,oi)}else if(!Sn&&fn&&kn!=="clear"){var jr=or(),Oi=(0,me.Z)(jr,2),Xi=Oi[0],Li=Oi[1];fn(Xi,Li)}},ao=$n(function(wn,An){var Sn,kn=Lr?An.selected:!0;kn?Sn=Lr?[].concat((0,it.Z)(rr),[wn]):[wn]:Sn=rr.filter(function(or){return or.value!==wn}),pi(Sn),to(wn,kn),yt==="combobox"?kr(""):(!jt||mn)&&(Mn(""),kr(""))}),zi=function(An,Sn){pi(An);var kn=Sn.type,or=Sn.values;(kn==="remove"||kn==="clear")&&or.forEach(function(Mr){to(Mr.value,!1,kn)})},Kr=function(An,Sn){if(Mn(An),kr(null),Sn.source==="submit"){var kn=(An||"").trim();if(kn){var or=Array.from(new Set([].concat((0,it.Z)(ii),[kn])));pi(or),to(kn,!0),Mn("")}return}Sn.source!=="blur"&&(yt==="combobox"&&pi(An),Vt==null||Vt(An))},bo=function(An){var Sn=An;yt!=="tags"&&(Sn=An.map(function(or){var Mr=xt.get(or);return Mr==null?void 0:Mr.value}).filter(function(or){return or!==void 0}));var kn=Array.from(new Set([].concat((0,it.Z)(ii),(0,it.Z)(Sn))));pi(kn),kn.forEach(function(or){to(or,!0)})},so=fe.useMemo(function(){var wn=ur!==!1&&xn!==!1;return(0,Ie.Z)((0,Ie.Z)({},Pt),{},{flattenOptions:yi,onActiveValue:Hr,defaultActiveFirstOption:Yi,onSelect:ao,menuItemSelectedIcon:Qn,rawValues:ii,fieldNames:Sr,virtual:wn,direction:wr,listHeight:Gn,listItemHeight:er,childrenAsData:br,maxCount:Hn,optionRender:Ln})},[Hn,Pt,yi,Hr,Yi,ao,Qn,ii,Sr,ur,xn,wr,Gn,er,br,Ln]);return fe.createElement(Xt.Provider,{value:so},fe.createElement(tt,(0,se.Z)({},nr,{id:Zr,prefixCls:bt,ref:Pe,omitDomProps:Or,mode:yt,displayValues:Di,onDisplayValuesChange:zi,direction:wr,searchValue:Br,onSearch:Kr,autoClearSearchValue:mn,onSearchSplit:bo,dropdownMatchSelectWidth:xn,OptionList:sr,emptyOptions:!yi.length,activeValue:_i,activeDescendantId:"".concat(Zr,"_list_").concat(eo)})))}),en=$e;en.Option=on,en.OptGroup=_t;var Pn=en,In=Pn},63158:function(Tt,Rt,de){"use strict";var se=de(54476),it=de(20068),Fe=de(42978),Ie=de(75931),me=de(59301),ye=de(92310),Ae=de.n(ye),ze=de(18929),we=de(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Je=me.forwardRef(function(ve,ot){var Ne,Te=ve.prefixCls,Me=Te===void 0?"rc-switch":Te,Ee=ve.className,qe=ve.checked,at=ve.defaultChecked,ct=ve.disabled,lt=ve.loadingIcon,Qe=ve.checkedChildren,et=ve.unCheckedChildren,ut=ve.onClick,Zt=ve.onChange,Ye=ve.onKeyDown,Ve=(0,Ie.Z)(ve,fe),gt=(0,ze.Z)(!1,{value:qe,defaultValue:at}),Be=(0,Fe.Z)(gt,2),Ze=Be[0],De=Be[1];function _e(dt,pe){var ce=Ze;return ct||(ce=dt,De(ce),Zt==null||Zt(ce,pe)),ce}function Bt(dt){dt.which===we.Z.LEFT?_e(!1,dt):dt.which===we.Z.RIGHT&&_e(!0,dt),Ye==null||Ye(dt)}function mt(dt){var pe=_e(!Ze,dt);ut==null||ut(pe,dt)}var Et=Ae()(Me,Ee,(Ne={},(0,it.Z)(Ne,"".concat(Me,"-checked"),Ze),(0,it.Z)(Ne,"".concat(Me,"-disabled"),ct),Ne));return me.createElement("button",(0,se.Z)({},Ve,{type:"button",role:"switch","aria-checked":Ze,disabled:ct,className:Et,ref:ot,onKeyDown:Bt,onClick:mt}),lt,me.createElement("span",{className:"".concat(Me,"-inner")},me.createElement("span",{className:"".concat(Me,"-inner-checked")},Qe),me.createElement("span",{className:"".concat(Me,"-inner-unchecked")},et)))});Je.displayName="Switch",Rt.Z=Je},22711:function(Tt,Rt,de){"use strict";de.r(Rt),de.d(Rt,{ResizableTextArea:function(){return Be},default:function(){return Bt}});var se=de(54476),it=de(20068),Fe=de(33885),Ie=de(94480),me=de(42978),ye=de(75931),Ae=de(92310),ze=de.n(Ae),we=de(36901),fe=de(66003),Je=de(30292),ve=de(18929),ot=de(59301),Ne=de(76190),Te=de(29301),Me=de(34280),Ee=de(16089),qe=`
|
|
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;
|
|
`,at=["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"],ct={},lt;function Qe(mt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=mt.getAttribute("id")||mt.getAttribute("data-reactid")||mt.getAttribute("name");if(Et&&ct[dt])return ct[dt];var pe=window.getComputedStyle(mt),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),We=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),pt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),st=at.map(function(Ge){return"".concat(Ge,":").concat(pe.getPropertyValue(Ge))}).join(";"),xe={sizingStyle:st,paddingSize:We,borderSize:pt,boxSizing:ce};return Et&&dt&&(ct[dt]=xe),xe}function et(mt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;lt||(lt=document.createElement("textarea"),lt.setAttribute("tab-index","-1"),lt.setAttribute("aria-hidden","true"),lt.setAttribute("name","hiddenTextarea"),document.body.appendChild(lt)),mt.getAttribute("wrap")?lt.setAttribute("wrap",mt.getAttribute("wrap")):lt.removeAttribute("wrap");var ce=Qe(mt,Et),We=ce.paddingSize,pt=ce.borderSize,st=ce.boxSizing,xe=ce.sizingStyle;lt.setAttribute("style","".concat(xe,";").concat(qe)),lt.value=mt.value||mt.placeholder||"";var Ge=void 0,Ce=void 0,Xe,He=lt.scrollHeight;if(st==="border-box"?He+=pt:st==="content-box"&&(He-=We),dt!==null||pe!==null){lt.value=" ";var ht=lt.scrollHeight-We;dt!==null&&(Ge=ht*dt,st==="border-box"&&(Ge=Ge+We+pt),He=Math.max(Ge,He)),pe!==null&&(Ce=ht*pe,st==="border-box"&&(Ce=Ce+We+pt),Xe=He>Ce?"":"hidden",He=Math.min(Ce,He))}var Le={height:He,overflowY:Xe,resize:"none"};return Ge&&(Le.minHeight=Ge),Ce&&(Le.maxHeight=Ce),Le}var ut=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Ye=1,Ve=2,gt=ot.forwardRef(function(mt,Et){var dt=mt,pe=dt.prefixCls,ce=dt.defaultValue,We=dt.value,pt=dt.autoSize,st=dt.onResize,xe=dt.className,Ge=dt.style,Ce=dt.disabled,Xe=dt.onChange,He=dt.onInternalAutoSize,ht=(0,ye.Z)(dt,ut),Le=(0,ve.Z)(ce,{value:We,postState:function(on){return on!=null?on:""}}),nt=(0,me.Z)(Le,2),ft=nt[0],oe=nt[1],ee=function(on){oe(on.target.value),Xe==null||Xe(on)},z=ot.useRef();ot.useImperativeHandle(Et,function(){return{textArea:z.current}});var re=ot.useMemo(function(){return pt&&(0,Ne.Z)(pt)==="object"?[pt.minRows,pt.maxRows]:[]},[pt]),le=(0,me.Z)(re,2),ne=le[0],ge=le[1],Re=!!pt,Dt=function(){try{if(document.activeElement===z.current){var on=z.current,En=on.selectionStart,cn=on.selectionEnd,vn=on.scrollTop;z.current.setSelectionRange(En,cn),z.current.scrollTop=vn}}catch(Jn){}},kt=ot.useState(Ve),vt=(0,me.Z)(kt,2),Ct=vt[0],It=vt[1],Ot=ot.useState(),Xt=(0,me.Z)(Ot,2),Yt=Xt[0],At=Xt[1],nn=function(){It(Zt)};(0,Me.Z)(function(){Re&&nn()},[We,ne,ge,Re]),(0,Me.Z)(function(){if(Ct===Zt)It(Ye);else if(Ct===Ye){var Kt=et(z.current,!1,ne,ge);It(Ve),At(Kt)}else Dt()},[Ct]);var jt=ot.useRef(),tn=function(){Ee.Z.cancel(jt.current)},tt=function(on){Ct===Ve&&(st==null||st(on),pt&&(tn(),jt.current=(0,Ee.Z)(function(){nn()})))};ot.useEffect(function(){return tn},[]);var ln=Re?Yt:null,_t=(0,Fe.Z)((0,Fe.Z)({},Ge),ln);return(Ct===Zt||Ct===Ye)&&(_t.overflowY="hidden",_t.overflowX="hidden"),ot.createElement(Te.Z,{onResize:tt,disabled:!(pt||st)},ot.createElement("textarea",(0,se.Z)({},ht,{ref:z,style:_t,className:ze()(pe,xe,(0,it.Z)({},"".concat(pe,"-disabled"),Ce)),disabled:Ce,value:ft,onChange:ee})))}),Be=gt,Ze=["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"],De=ot.forwardRef(function(mt,Et){var dt,pe=mt.defaultValue,ce=mt.value,We=mt.onFocus,pt=mt.onBlur,st=mt.onChange,xe=mt.allowClear,Ge=mt.maxLength,Ce=mt.onCompositionStart,Xe=mt.onCompositionEnd,He=mt.suffix,ht=mt.prefixCls,Le=ht===void 0?"rc-textarea":ht,nt=mt.showCount,ft=mt.count,oe=mt.className,ee=mt.style,z=mt.disabled,re=mt.hidden,le=mt.classNames,ne=mt.styles,ge=mt.onResize,Re=mt.onClear,Dt=mt.onPressEnter,kt=mt.readOnly,vt=mt.autoSize,Ct=mt.onKeyDown,It=(0,ye.Z)(mt,Ze),Ot=(0,ve.Z)(pe,{value:ce,defaultValue:pe}),Xt=(0,me.Z)(Ot,2),Yt=Xt[0],At=Xt[1],nn=Yt==null?"":String(Yt),jt=ot.useState(!1),tn=(0,me.Z)(jt,2),tt=tn[0],ln=tn[1],_t=ot.useRef(!1),Kt=ot.useState(null),on=(0,me.Z)(Kt,2),En=on[0],cn=on[1],vn=(0,ot.useRef)(null),Jn=(0,ot.useRef)(null),jn=function(){var en;return(en=Jn.current)===null||en===void 0?void 0:en.textArea},Wr=function(){jn().focus()};(0,ot.useImperativeHandle)(Et,function(){var $e;return{resizableTextArea:Jn.current,focus:Wr,blur:function(){jn().blur()},nativeElement:(($e=vn.current)===null||$e===void 0?void 0:$e.nativeElement)||jn()}}),(0,ot.useEffect)(function(){ln(function($e){return!z&&$e})},[z]);var zr=ot.useState(null),yr=(0,me.Z)(zr,2),sr=yr[0],Nn=yr[1];ot.useEffect(function(){if(sr){var $e;($e=jn()).setSelectionRange.apply($e,(0,Ie.Z)(sr))}},[sr]);var ir=(0,fe.Z)(ft,nt),Er=(dt=ir.max)!==null&&dt!==void 0?dt:Ge,Tn=Number(Er)>0,qn=ir.strategy(nn),$t=!!Er&&qn>Er,sn=function(en,Pn){var In=Pn;!_t.current&&ir.exceedFormatter&&ir.max&&ir.strategy(Pn)>ir.max&&(In=ir.exceedFormatter(Pn,{max:ir.max}),Pn!==In&&Nn([jn().selectionStart||0,jn().selectionEnd||0])),At(In),(0,Je.rJ)(en.currentTarget,en,st,In)},hn=function(en){_t.current=!0,Ce==null||Ce(en)},Dn=function(en){_t.current=!1,sn(en,en.currentTarget.value),Xe==null||Xe(en)},Rr=function(en){sn(en,en.target.value)},Un=function(en){en.key==="Enter"&&Dt&&Dt(en),Ct==null||Ct(en)},$n=function(en){ln(!0),We==null||We(en)},Tr=function(en){ln(!1),pt==null||pt(en)},lr=function(en){At(""),Wr(),(0,Je.rJ)(jn(),en,st)},Bn=He,Zn;ir.show&&(ir.showFormatter?Zn=ir.showFormatter({value:nn,count:qn,maxLength:Er}):Zn="".concat(qn).concat(Tn?" / ".concat(Er):""),Bn=ot.createElement(ot.Fragment,null,Bn,ot.createElement("span",{className:ze()("".concat(Le,"-data-count"),le==null?void 0:le.count),style:ne==null?void 0:ne.count},Zn)));var Or=function(en){var Pn;ge==null||ge(en),(Pn=jn())!==null&&Pn!==void 0&&Pn.style.height&&cn(!0)},Nt=!vt&&!nt&&!xe;return ot.createElement(we.BaseInput,{ref:vn,value:nn,allowClear:xe,handleReset:lr,suffix:Bn,prefixCls:Le,classNames:(0,Fe.Z)((0,Fe.Z)({},le),{},{affixWrapper:ze()(le==null?void 0:le.affixWrapper,(0,it.Z)((0,it.Z)({},"".concat(Le,"-show-count"),nt),"".concat(Le,"-textarea-allow-clear"),xe))}),disabled:z,focused:tt,className:ze()(oe,$t&&"".concat(Le,"-out-of-range")),style:(0,Fe.Z)((0,Fe.Z)({},ee),En&&!Nt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Zn=="string"?Zn:void 0}},hidden:re,readOnly:kt,onClear:Re},ot.createElement(Be,(0,se.Z)({},It,{autoSize:vt,maxLength:Ge,onKeyDown:Un,onChange:Rr,onFocus:$n,onBlur:Tr,onCompositionStart:hn,onCompositionEnd:Dn,className:ze()(le==null?void 0:le.textarea),style:(0,Fe.Z)((0,Fe.Z)({},ne==null?void 0:ne.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:Le,onResize:Or,ref:Jn,readOnly:kt})))}),_e=De,Bt=_e},90472:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return mt}});var se=de(54476),it=de(67732),Fe=de(83652),Ie=de(31226),me=de(42403),ye=de(158),Ae=de(20068),ze=de(59301),we=de(33885),fe=de(75931),Je=de(76190),ve=de(75044),ot=de(3202),Ne=de(94480),Te=de(92310),Me=de.n(Te),Ee=de(26112),qe=de(48736),at=function(Et,dt){if(Et&&dt){var pe=Array.isArray(dt)?dt:dt.split(","),ce=Et.name||"",We=Et.type||"",pt=We.replace(/\/.*$/,"");return pe.some(function(st){var xe=st.trim();if(/^\*(\/\*)?$/.test(st))return!0;if(xe.charAt(0)==="."){var Ge=ce.toLowerCase(),Ce=xe.toLowerCase(),Xe=[Ce];return(Ce===".jpg"||Ce===".jpeg")&&(Xe=[".jpg",".jpeg"]),Xe.some(function(He){return Ge.endsWith(He)})}return/\/\*$/.test(xe)?pt===xe.replace(/\/.*$/,""):We===xe?!0:/^\w+$/.test(xe)?((0,qe.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(xe,"'.Skip for check.")),!0):!1})}return!0};function ct(Et,dt){var pe="cannot ".concat(Et.method," ").concat(Et.action," ").concat(dt.status,"'"),ce=new Error(pe);return ce.status=dt.status,ce.method=Et.method,ce.url=Et.action,ce}function lt(Et){var dt=Et.responseText||Et.response;if(!dt)return dt;try{return JSON.parse(dt)}catch(pe){return dt}}function Qe(Et){var dt=new XMLHttpRequest;Et.onProgress&&dt.upload&&(dt.upload.onprogress=function(pt){pt.total>0&&(pt.percent=pt.loaded/pt.total*100),Et.onProgress(pt)});var pe=new FormData;Et.data&&Object.keys(Et.data).forEach(function(We){var pt=Et.data[We];if(Array.isArray(pt)){pt.forEach(function(st){pe.append("".concat(We,"[]"),st)});return}pe.append(We,pt)}),Et.file instanceof Blob?pe.append(Et.filename,Et.file,Et.file.name):pe.append(Et.filename,Et.file),dt.onerror=function(pt){Et.onError(pt)},dt.onload=function(){return dt.status<200||dt.status>=300?Et.onError(ct(Et,dt),lt(dt)):Et.onSuccess(lt(dt),dt)},dt.open(Et.method,Et.action,!0),Et.withCredentials&&"withCredentials"in dt&&(dt.withCredentials=!0);var ce=Et.headers||{};return ce["X-Requested-With"]!==null&&dt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(We){ce[We]!==null&&dt.setRequestHeader(We,ce[We])}),dt.send(pe),{abort:function(){dt.abort()}}}var et=function(){var Et=(0,ot.Z)((0,ve.Z)().mark(function dt(pe,ce){var We,pt,st,xe,Ge,Ce,Xe,He;return(0,ve.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:Ce=function(){return Ce=(0,ot.Z)((0,ve.Z)().mark(function ft(oe){return(0,ve.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){oe.file(function(le){ce(le)?(oe.fullPath&&!le.webkitRelativePath&&(Object.defineProperties(le,{webkitRelativePath:{writable:!0}}),le.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(le,{webkitRelativePath:{writable:!1}})),re(le)):re(null)})}));case 1:case"end":return z.stop()}},ft)})),Ce.apply(this,arguments)},Ge=function(ft){return Ce.apply(this,arguments)},xe=function(){return xe=(0,ot.Z)((0,ve.Z)().mark(function ft(oe){var ee,z,re,le,ne;return(0,ve.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:ee=oe.createReader(),z=[];case 2:return Re.next=5,new Promise(function(Dt){ee.readEntries(Dt,function(){return Dt([])})});case 5:if(re=Re.sent,le=re.length,le){Re.next=9;break}return Re.abrupt("break",12);case 9:for(ne=0;ne<le;ne++)z.push(re[ne]);Re.next=2;break;case 12:return Re.abrupt("return",z);case 13:case"end":return Re.stop()}},ft)})),xe.apply(this,arguments)},st=function(ft){return xe.apply(this,arguments)},We=[],pt=[],pe.forEach(function(nt){return pt.push(nt.webkitGetAsEntry())}),Xe=function(){var nt=(0,ot.Z)((0,ve.Z)().mark(function ft(oe,ee){var z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(oe){ne.next=2;break}return ne.abrupt("return");case 2:if(oe.path=ee||"",!oe.isFile){ne.next=10;break}return ne.next=6,Ge(oe);case 6:z=ne.sent,z&&We.push(z),ne.next=15;break;case 10:if(!oe.isDirectory){ne.next=15;break}return ne.next=13,st(oe);case 13:re=ne.sent,pt.push.apply(pt,(0,Ne.Z)(re));case 15:case"end":return ne.stop()}},ft)}));return function(oe,ee){return nt.apply(this,arguments)}}(),He=0;case 9:if(!(He<pt.length)){Le.next=15;break}return Le.next=12,Xe(pt[He]);case 12:He++,Le.next=9;break;case 15:return Le.abrupt("return",We);case 16:case"end":return Le.stop()}},dt)}));return function(pe,ce){return Et.apply(this,arguments)}}(),ut=et,Zt=+new Date,Ye=0;function Ve(){return"rc-upload-".concat(Zt,"-").concat(++Ye)}var gt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Be=function(Et){(0,me.Z)(pe,Et);var dt=(0,ye.Z)(pe);function pe(){var ce;(0,it.Z)(this,pe);for(var We=arguments.length,pt=new Array(We),st=0;st<We;st++)pt[st]=arguments[st];return ce=dt.call.apply(dt,[this].concat(pt)),(0,Ae.Z)((0,Ie.Z)(ce),"state",{uid:Ve()}),(0,Ae.Z)((0,Ie.Z)(ce),"reqs",{}),(0,Ae.Z)((0,Ie.Z)(ce),"fileInput",void 0),(0,Ae.Z)((0,Ie.Z)(ce),"_isMounted",void 0),(0,Ae.Z)((0,Ie.Z)(ce),"onChange",function(xe){var Ge=ce.props,Ce=Ge.accept,Xe=Ge.directory,He=xe.target.files,ht=(0,Ne.Z)(He).filter(function(Le){return!Xe||at(Le,Ce)});ce.uploadFiles(ht),ce.reset()}),(0,Ae.Z)((0,Ie.Z)(ce),"onClick",function(xe){var Ge=ce.fileInput;if(Ge){var Ce=xe.target,Xe=ce.props.onClick;if(Ce&&Ce.tagName==="BUTTON"){var He=Ge.parentNode;He.focus(),Ce.blur()}Ge.click(),Xe&&Xe(xe)}}),(0,Ae.Z)((0,Ie.Z)(ce),"onKeyDown",function(xe){xe.key==="Enter"&&ce.onClick(xe)}),(0,Ae.Z)((0,Ie.Z)(ce),"onFileDrop",function(){var xe=(0,ot.Z)((0,ve.Z)().mark(function Ge(Ce){var Xe,He,ht;return(0,ve.Z)().wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(Xe=ce.props.multiple,Ce.preventDefault(),Ce.type!=="dragover"){nt.next=4;break}return nt.abrupt("return");case 4:if(!ce.props.directory){nt.next=11;break}return nt.next=7,ut(Array.prototype.slice.call(Ce.dataTransfer.items),function(ft){return at(ft,ce.props.accept)});case 7:He=nt.sent,ce.uploadFiles(He),nt.next=14;break;case 11:ht=(0,Ne.Z)(Ce.dataTransfer.files).filter(function(ft){return at(ft,ce.props.accept)}),Xe===!1&&(ht=ht.slice(0,1)),ce.uploadFiles(ht);case 14:case"end":return nt.stop()}},Ge)}));return function(Ge){return xe.apply(this,arguments)}}()),(0,Ae.Z)((0,Ie.Z)(ce),"uploadFiles",function(xe){var Ge=(0,Ne.Z)(xe),Ce=Ge.map(function(Xe){return Xe.uid=Ve(),ce.processFile(Xe,Ge)});Promise.all(Ce).then(function(Xe){var He=ce.props.onBatchStart;He==null||He(Xe.map(function(ht){var Le=ht.origin,nt=ht.parsedFile;return{file:Le,parsedFile:nt}})),Xe.filter(function(ht){return ht.parsedFile!==null}).forEach(function(ht){ce.post(ht)})})}),(0,Ae.Z)((0,Ie.Z)(ce),"processFile",function(){var xe=(0,ot.Z)((0,ve.Z)().mark(function Ge(Ce,Xe){var He,ht,Le,nt,ft,oe,ee,z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(He=ce.props.beforeUpload,ht=Ce,!He){ne.next=14;break}return ne.prev=3,ne.next=6,He(Ce,Xe);case 6:ht=ne.sent,ne.next=12;break;case 9:ne.prev=9,ne.t0=ne.catch(3),ht=!1;case 12:if(ht!==!1){ne.next=14;break}return ne.abrupt("return",{origin:Ce,parsedFile:null,action:null,data:null});case 14:if(Le=ce.props.action,typeof Le!="function"){ne.next=21;break}return ne.next=18,Le(Ce);case 18:nt=ne.sent,ne.next=22;break;case 21:nt=Le;case 22:if(ft=ce.props.data,typeof ft!="function"){ne.next=29;break}return ne.next=26,ft(Ce);case 26:oe=ne.sent,ne.next=30;break;case 29:oe=ft;case 30:return ee=((0,Je.Z)(ht)==="object"||typeof ht=="string")&&ht?ht:Ce,ee instanceof File?z=ee:z=new File([ee],Ce.name,{type:Ce.type}),re=z,re.uid=Ce.uid,ne.abrupt("return",{origin:Ce,data:oe,parsedFile:re,action:nt});case 35:case"end":return ne.stop()}},Ge,null,[[3,9]])}));return function(Ge,Ce){return xe.apply(this,arguments)}}()),(0,Ae.Z)((0,Ie.Z)(ce),"saveFileInput",function(xe){ce.fileInput=xe}),ce}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(We){var pt=this,st=We.data,xe=We.origin,Ge=We.action,Ce=We.parsedFile;if(this._isMounted){var Xe=this.props,He=Xe.onStart,ht=Xe.customRequest,Le=Xe.name,nt=Xe.headers,ft=Xe.withCredentials,oe=Xe.method,ee=xe.uid,z=ht||Qe,re={action:Ge,filename:Le,data:st,file:Ce,headers:nt,withCredentials:ft,method:oe||"post",onProgress:function(ne){var ge=pt.props.onProgress;ge==null||ge(ne,Ce)},onSuccess:function(ne,ge){var Re=pt.props.onSuccess;Re==null||Re(ne,Ce,ge),delete pt.reqs[ee]},onError:function(ne,ge){var Re=pt.props.onError;Re==null||Re(ne,ge,Ce),delete pt.reqs[ee]}};He(xe),this.reqs[ee]=z(re)}}},{key:"reset",value:function(){this.setState({uid:Ve()})}},{key:"abort",value:function(We){var pt=this.reqs;if(We){var st=We.uid?We.uid:We;pt[st]&&pt[st].abort&&pt[st].abort(),delete pt[st]}else Object.keys(pt).forEach(function(xe){pt[xe]&&pt[xe].abort&&pt[xe].abort(),delete pt[xe]})}},{key:"render",value:function(){var We=this.props,pt=We.component,st=We.prefixCls,xe=We.className,Ge=We.classNames,Ce=Ge===void 0?{}:Ge,Xe=We.disabled,He=We.id,ht=We.name,Le=We.style,nt=We.styles,ft=nt===void 0?{}:nt,oe=We.multiple,ee=We.accept,z=We.capture,re=We.children,le=We.directory,ne=We.openFileDialogOnClick,ge=We.onMouseEnter,Re=We.onMouseLeave,Dt=We.hasControlInside,kt=(0,fe.Z)(We,gt),vt=Me()((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},st,!0),"".concat(st,"-disabled"),Xe),xe,xe)),Ct=le?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},It=Xe?{}:{onClick:ne?this.onClick:function(){},onKeyDown:ne?this.onKeyDown:function(){},onMouseEnter:ge,onMouseLeave:Re,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Dt?void 0:"0"};return ze.createElement(pt,(0,se.Z)({},It,{className:vt,role:Dt?void 0:"button",style:Le}),ze.createElement("input",(0,se.Z)({},(0,Ee.Z)(kt,{aria:!0,data:!0}),{id:He,name:ht,disabled:Xe,type:"file",ref:this.saveFileInput,onClick:function(Xt){return Xt.stopPropagation()},key:this.state.uid,style:(0,we.Z)({display:"none"},ft.input),className:Ce.input,accept:ee},Ct,{multiple:oe,onChange:this.onChange},z!=null?{capture:z}:{})),re)}}]),pe}(ze.Component),Ze=Be;function De(){}var _e=function(Et){(0,me.Z)(pe,Et);var dt=(0,ye.Z)(pe);function pe(){var ce;(0,it.Z)(this,pe);for(var We=arguments.length,pt=new Array(We),st=0;st<We;st++)pt[st]=arguments[st];return ce=dt.call.apply(dt,[this].concat(pt)),(0,Ae.Z)((0,Ie.Z)(ce),"uploader",void 0),(0,Ae.Z)((0,Ie.Z)(ce),"saveUploader",function(xe){ce.uploader=xe}),ce}return(0,Fe.Z)(pe,[{key:"abort",value:function(We){this.uploader.abort(We)}},{key:"render",value:function(){return ze.createElement(Ze,(0,se.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(ze.Component);(0,Ae.Z)(_e,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:De,onError:De,onSuccess:De,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Bt=_e,mt=Bt},48911:function(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return ft}});var se=de(54476),it=de(76190),Fe=de(33885),Ie=de(20068),me=de(42978),ye=de(75931),Ae=de(92310),ze=de.n(Ae),we=de(29301),fe=de(70425),Je=de(34280),ve=de(59301),ot=de(4676),Ne=ve.forwardRef(function(oe,ee){var z=oe.height,re=oe.offsetY,le=oe.offsetX,ne=oe.children,ge=oe.prefixCls,Re=oe.onInnerResize,Dt=oe.innerProps,kt=oe.rtl,vt=oe.extra,Ct={},It={display:"flex",flexDirection:"column"};return re!==void 0&&(Ct={height:z,position:"relative",overflow:"hidden"},It=(0,Fe.Z)((0,Fe.Z)({},It),{},(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({transform:"translateY(".concat(re,"px)")},kt?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Ct},ve.createElement(we.Z,{onResize:function(Xt){var Yt=Xt.offsetHeight;Yt&&Re&&Re()}},ve.createElement("div",(0,se.Z)({style:It,className:ze()((0,Ie.Z)({},"".concat(ge,"-holder-inner"),ge)),ref:ee},Dt),ne,vt)))});Ne.displayName="Filler";var Te=Ne;function Me(oe){var ee=oe.children,z=oe.setRef,re=ve.useCallback(function(le){z(le)},[]);return ve.cloneElement(ee,{ref:re})}function Ee(oe,ee,z,re,le,ne,ge,Re){var Dt=Re.getKey;return oe.slice(ee,z+1).map(function(kt,vt){var Ct=ee+vt,It=ge(kt,Ct,{style:{width:re},offsetX:le}),Ot=Dt(kt);return ve.createElement(Me,{key:Ot,setRef:function(Yt){return ne(kt,Yt)}},It)})}function qe(oe,ee,z,re){var le=z-oe,ne=ee-z,ge=Math.min(le,ne)*2;if(re<=ge){var Re=Math.floor(re/2);return re%2?z+Re+1:z-Re}return le>ne?z-(re-ne):z+(re-le)}function at(oe,ee,z){var re=oe.length,le=ee.length,ne,ge;if(re===0&&le===0)return null;re<le?(ne=oe,ge=ee):(ne=ee,ge=oe);var Re={__EMPTY_ITEM__:!0};function Dt(Xt){return Xt!==void 0?z(Xt):Re}for(var kt=null,vt=Math.abs(re-le)!==1,Ct=0;Ct<ge.length;Ct+=1){var It=Dt(ne[Ct]),Ot=Dt(ge[Ct]);if(It!==Ot){kt=Ct,vt=vt||It!==Dt(ge[Ct+1]);break}}return kt===null?null:{index:kt,multiple:vt}}function ct(oe,ee,z){var re=ve.useState(oe),le=(0,me.Z)(re,2),ne=le[0],ge=le[1],Re=ve.useState(null),Dt=(0,me.Z)(Re,2),kt=Dt[0],vt=Dt[1];return ve.useEffect(function(){var Ct=at(ne||[],oe||[],ee);(Ct==null?void 0:Ct.index)!==void 0&&(z==null||z(Ct.index),vt(oe[Ct.index])),ge(oe)},[oe]),[kt]}var lt=de(16089),Qe=(typeof navigator=="undefined"?"undefined":(0,it.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),et=Qe,ut=function(oe,ee,z,re){var le=(0,ve.useRef)(!1),ne=(0,ve.useRef)(null);function ge(){clearTimeout(ne.current),le.current=!0,ne.current=setTimeout(function(){le.current=!1},50)}var Re=(0,ve.useRef)({top:oe,bottom:ee,left:z,right:re});return Re.current.top=oe,Re.current.bottom=ee,Re.current.left=z,Re.current.right=re,function(Dt,kt){var vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ct=Dt?kt<0&&Re.current.left||kt>0&&Re.current.right:kt<0&&Re.current.top||kt>0&&Re.current.bottom;return vt&&Ct?(clearTimeout(ne.current),le.current=!1):(!Ct||le.current)&&ge(),!le.current&&Ct}};function Zt(oe,ee,z,re,le,ne,ge){var Re=(0,ve.useRef)(0),Dt=(0,ve.useRef)(null),kt=(0,ve.useRef)(null),vt=(0,ve.useRef)(!1),Ct=ut(ee,z,re,le);function It(jt,tn){if(lt.Z.cancel(Dt.current),!Ct(!1,tn)){var tt=jt;if(!tt._virtualHandled)tt._virtualHandled=!0;else return;Re.current+=tn,kt.current=tn,et||tt.preventDefault(),Dt.current=(0,lt.Z)(function(){var ln=vt.current?10:1;ge(Re.current*ln,!1),Re.current=0})}}function Ot(jt,tn){ge(tn,!0),et||jt.preventDefault()}var Xt=(0,ve.useRef)(null),Yt=(0,ve.useRef)(null);function At(jt){if(oe){lt.Z.cancel(Yt.current),Yt.current=(0,lt.Z)(function(){Xt.current=null},2);var tn=jt.deltaX,tt=jt.deltaY,ln=jt.shiftKey,_t=tn,Kt=tt;(Xt.current==="sx"||!Xt.current&&ln&&tt&&!tn)&&(_t=tt,Kt=0,Xt.current="sx");var on=Math.abs(_t),En=Math.abs(Kt);Xt.current===null&&(Xt.current=ne&&on>En?"x":"y"),Xt.current==="y"?It(jt,Kt):Ot(jt,_t)}}function nn(jt){oe&&(vt.current=jt.detail===kt.current)}return[At,nn]}function Ye(oe,ee,z,re){var le=ve.useMemo(function(){return[new Map,[]]},[oe,z.id,re]),ne=(0,me.Z)(le,2),ge=ne[0],Re=ne[1],Dt=function(vt){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt,It=ge.get(vt),Ot=ge.get(Ct);if(It===void 0||Ot===void 0)for(var Xt=oe.length,Yt=Re.length;Yt<Xt;Yt+=1){var At,nn=oe[Yt],jt=ee(nn);ge.set(jt,Yt);var tn=(At=z.get(jt))!==null&&At!==void 0?At:re;if(Re[Yt]=(Re[Yt-1]||0)+tn,jt===vt&&(It=Yt),jt===Ct&&(Ot=Yt),It!==void 0&&Ot!==void 0)break}return{top:Re[It-1]||0,bottom:Re[Ot]}};return Dt}var Ve=de(67732),gt=de(83652),Be=function(){function oe(){(0,Ve.Z)(this,oe),(0,Ie.Z)(this,"maps",void 0),(0,Ie.Z)(this,"id",0),(0,Ie.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,gt.Z)(oe,[{key:"set",value:function(z,re){this.diffRecords.set(z,this.maps[z]),this.maps[z]=re,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),oe}(),Ze=Be;function De(oe){var ee=parseFloat(oe);return isNaN(ee)?0:ee}function _e(oe,ee,z){var re=ve.useState(0),le=(0,me.Z)(re,2),ne=le[0],ge=le[1],Re=(0,ve.useRef)(new Map),Dt=(0,ve.useRef)(new Ze),kt=(0,ve.useRef)(0);function vt(){kt.current+=1}function Ct(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;vt();var Xt=function(){var nn=!1;Re.current.forEach(function(jt,tn){if(jt&&jt.offsetParent){var tt=jt.offsetHeight,ln=getComputedStyle(jt),_t=ln.marginTop,Kt=ln.marginBottom,on=De(_t),En=De(Kt),cn=tt+on+En;Dt.current.get(tn)!==cn&&(Dt.current.set(tn,cn),nn=!0)}}),nn&&ge(function(jt){return jt+1})};if(Ot)Xt();else{kt.current+=1;var Yt=kt.current;Promise.resolve().then(function(){Yt===kt.current&&Xt()})}}function It(Ot,Xt){var Yt=oe(Ot),At=Re.current.get(Yt);Xt?(Re.current.set(Yt,Xt),Ct()):Re.current.delete(Yt),!At!=!Xt&&(Xt?ee==null||ee(Ot):z==null||z(Ot))}return(0,ve.useEffect)(function(){return vt},[]),[It,Ct,Dt.current,ne]}var Bt=14/15;function mt(oe,ee,z){var re=(0,ve.useRef)(!1),le=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),ge=(0,ve.useRef)(null),Re=(0,ve.useRef)(null),Dt,kt=function(Ot){if(re.current){var Xt=Math.ceil(Ot.touches[0].pageX),Yt=Math.ceil(Ot.touches[0].pageY),At=le.current-Xt,nn=ne.current-Yt,jt=Math.abs(At)>Math.abs(nn);jt?le.current=Xt:ne.current=Yt;var tn=z(jt,jt?At:nn,!1,Ot);tn&&Ot.preventDefault(),clearInterval(Re.current),tn&&(Re.current=setInterval(function(){jt?At*=Bt:nn*=Bt;var tt=Math.floor(jt?At:nn);(!z(jt,tt,!0)||Math.abs(tt)<=.1)&&clearInterval(Re.current)},16))}},vt=function(){re.current=!1,Dt()},Ct=function(Ot){Dt(),Ot.touches.length===1&&!re.current&&(re.current=!0,le.current=Math.ceil(Ot.touches[0].pageX),ne.current=Math.ceil(Ot.touches[0].pageY),ge.current=Ot.target,ge.current.addEventListener("touchmove",kt,{passive:!1}),ge.current.addEventListener("touchend",vt,{passive:!0}))};Dt=function(){ge.current&&(ge.current.removeEventListener("touchmove",kt),ge.current.removeEventListener("touchend",vt))},(0,Je.Z)(function(){return oe&&ee.current.addEventListener("touchstart",Ct,{passive:!0}),function(){var It;(It=ee.current)===null||It===void 0||It.removeEventListener("touchstart",Ct),Dt(),clearInterval(Re.current)}},[oe])}function Et(oe){return Math.floor(Math.pow(oe,.5))}function dt(oe,ee){var z="touches"in oe?oe.touches[0]:oe;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function pe(oe,ee,z){ve.useEffect(function(){var re=ee.current;if(oe&&re){var le=!1,ne,ge,Re=function(){lt.Z.cancel(ne)},Dt=function It(){Re(),ne=(0,lt.Z)(function(){z(ge),It()})},kt=function(){le=!1,Re()},vt=function(Ot){if(!(Ot.target.draggable||Ot.button!==0)){var Xt=Ot;Xt._virtualHandled||(Xt._virtualHandled=!0,le=!0)}},Ct=function(Ot){if(le){var Xt=dt(Ot,!1),Yt=re.getBoundingClientRect(),At=Yt.top,nn=Yt.bottom;if(Xt<=At){var jt=At-Xt;ge=-Et(jt),Dt()}else if(Xt>=nn){var tn=Xt-nn;ge=Et(tn),Dt()}else Re()}};return re.addEventListener("mousedown",vt),re.ownerDocument.addEventListener("mouseup",kt),re.ownerDocument.addEventListener("mousemove",Ct),re.ownerDocument.addEventListener("dragend",kt),function(){re.removeEventListener("mousedown",vt),re.ownerDocument.removeEventListener("mouseup",kt),re.ownerDocument.removeEventListener("mousemove",Ct),re.ownerDocument.removeEventListener("dragend",kt),Re()}}},[oe])}var ce=10;function We(oe,ee,z,re,le,ne,ge,Re){var Dt=ve.useRef(),kt=ve.useState(null),vt=(0,me.Z)(kt,2),Ct=vt[0],It=vt[1];return(0,Je.Z)(function(){if(Ct&&Ct.times<ce){if(!oe.current){It(function(ir){return(0,Fe.Z)({},ir)});return}ne();var Ot=Ct.targetAlign,Xt=Ct.originAlign,Yt=Ct.index,At=Ct.offset,nn=oe.current.clientHeight,jt=!1,tn=Ot,tt=null;if(nn){for(var ln=Ot||Xt,_t=0,Kt=0,on=0,En=Math.min(ee.length-1,Yt),cn=0;cn<=En;cn+=1){var vn=le(ee[cn]);Kt=_t;var Jn=z.get(vn);on=Kt+(Jn===void 0?re:Jn),_t=on}for(var jn=ln==="top"?At:nn-At,Wr=En;Wr>=0;Wr-=1){var zr=le(ee[Wr]),yr=z.get(zr);if(yr===void 0){jt=!0;break}if(jn-=yr,jn<=0)break}switch(ln){case"top":tt=Kt-At;break;case"bottom":tt=on-nn+At;break;default:{var sr=oe.current.scrollTop,Nn=sr+nn;Kt<sr?tn="top":on>Nn&&(tn="bottom")}}tt!==null&&ge(tt),tt!==Ct.lastTop&&(jt=!0)}jt&&It((0,Fe.Z)((0,Fe.Z)({},Ct),{},{times:Ct.times+1,targetAlign:tn,lastTop:tt}))}},[Ct,oe.current]),function(Ot){if(Ot==null){Re();return}if(lt.Z.cancel(Dt.current),typeof Ot=="number")ge(Ot);else if(Ot&&(0,it.Z)(Ot)==="object"){var Xt,Yt=Ot.align;"index"in Ot?Xt=Ot.index:Xt=ee.findIndex(function(jt){return le(jt)===Ot.key});var At=Ot.offset,nn=At===void 0?0:At;It({times:0,index:Xt,offset:nn,originAlign:Yt})}}}var pt=ve.forwardRef(function(oe,ee){var z=oe.prefixCls,re=oe.rtl,le=oe.scrollOffset,ne=oe.scrollRange,ge=oe.onStartMove,Re=oe.onStopMove,Dt=oe.onScroll,kt=oe.horizontal,vt=oe.spinSize,Ct=oe.containerSize,It=oe.style,Ot=oe.thumbStyle,Xt=oe.showScrollBar,Yt=ve.useState(!1),At=(0,me.Z)(Yt,2),nn=At[0],jt=At[1],tn=ve.useState(null),tt=(0,me.Z)(tn,2),ln=tt[0],_t=tt[1],Kt=ve.useState(null),on=(0,me.Z)(Kt,2),En=on[0],cn=on[1],vn=!re,Jn=ve.useRef(),jn=ve.useRef(),Wr=ve.useState(Xt),zr=(0,me.Z)(Wr,2),yr=zr[0],sr=zr[1],Nn=ve.useRef(),ir=function(){Xt===!0||Xt===!1||(clearTimeout(Nn.current),sr(!0),Nn.current=setTimeout(function(){sr(!1)},3e3))},Er=ne-Ct||0,Tn=Ct-vt||0,qn=ve.useMemo(function(){if(le===0||Er===0)return 0;var lr=le/Er;return lr*Tn},[le,Er,Tn]),$t=function(Bn){Bn.stopPropagation(),Bn.preventDefault()},sn=ve.useRef({top:qn,dragging:nn,pageY:ln,startTop:En});sn.current={top:qn,dragging:nn,pageY:ln,startTop:En};var hn=function(Bn){jt(!0),_t(dt(Bn,kt)),cn(sn.current.top),ge(),Bn.stopPropagation(),Bn.preventDefault()};ve.useEffect(function(){var lr=function(Nt){Nt.preventDefault()},Bn=Jn.current,Zn=jn.current;return Bn.addEventListener("touchstart",lr,{passive:!1}),Zn.addEventListener("touchstart",hn,{passive:!1}),function(){Bn.removeEventListener("touchstart",lr),Zn.removeEventListener("touchstart",hn)}},[]);var Dn=ve.useRef();Dn.current=Er;var Rr=ve.useRef();Rr.current=Tn,ve.useEffect(function(){if(nn){var lr,Bn=function(Nt){var $e=sn.current,en=$e.dragging,Pn=$e.pageY,In=$e.startTop;lt.Z.cancel(lr);var ke=Jn.current.getBoundingClientRect(),Pe=Ct/(kt?ke.width:ke.height);if(en){var Ft=(dt(Nt,kt)-Pn)*Pe,yt=In;!vn&&kt?yt-=Ft:yt+=Ft;var Oe=Dn.current,bt=Rr.current,Ut=bt?yt/bt:0,Jt=Math.ceil(Ut*Oe);Jt=Math.max(Jt,0),Jt=Math.min(Jt,Oe),lr=(0,lt.Z)(function(){Dt(Jt,kt)})}},Zn=function(){jt(!1),Re()};return window.addEventListener("mousemove",Bn,{passive:!0}),window.addEventListener("touchmove",Bn,{passive:!0}),window.addEventListener("mouseup",Zn,{passive:!0}),window.addEventListener("touchend",Zn,{passive:!0}),function(){window.removeEventListener("mousemove",Bn),window.removeEventListener("touchmove",Bn),window.removeEventListener("mouseup",Zn),window.removeEventListener("touchend",Zn),lt.Z.cancel(lr)}}},[nn]),ve.useEffect(function(){return ir(),function(){clearTimeout(Nn.current)}},[le]),ve.useImperativeHandle(ee,function(){return{delayHidden:ir}});var Un="".concat(z,"-scrollbar"),$n={position:"absolute",visibility:yr?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 kt?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(Tr,(0,Ie.Z)({height:"100%",width:vt},vn?"left":"right",qn))):(Object.assign($n,(0,Ie.Z)({width:8,top:0,bottom:0},vn?"right":"left",0)),Object.assign(Tr,{width:"100%",height:vt,top:qn})),ve.createElement("div",{ref:Jn,className:ze()(Un,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(Un,"-horizontal"),kt),"".concat(Un,"-vertical"),!kt),"".concat(Un,"-visible"),yr)),style:(0,Fe.Z)((0,Fe.Z)({},$n),It),onMouseDown:$t,onMouseMove:ir},ve.createElement("div",{ref:jn,className:ze()("".concat(Un,"-thumb"),(0,Ie.Z)({},"".concat(Un,"-thumb-moving"),nn)),style:(0,Fe.Z)((0,Fe.Z)({},Tr),Ot),onMouseDown:hn}))}),st=pt,xe=20;function Ge(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=oe/ee*oe;return isNaN(z)&&(z=0),z=Math.max(z,xe),Math.floor(z)}var Ce=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Xe=[],He={overflowY:"auto",overflowAnchor:"none"};function ht(oe,ee){var z=oe.prefixCls,re=z===void 0?"rc-virtual-list":z,le=oe.className,ne=oe.height,ge=oe.itemHeight,Re=oe.fullHeight,Dt=Re===void 0?!0:Re,kt=oe.style,vt=oe.data,Ct=oe.children,It=oe.itemKey,Ot=oe.virtual,Xt=oe.direction,Yt=oe.scrollWidth,At=oe.component,nn=At===void 0?"div":At,jt=oe.onScroll,tn=oe.onVirtualScroll,tt=oe.onVisibleChange,ln=oe.innerProps,_t=oe.extraRender,Kt=oe.styles,on=oe.showScrollBar,En=on===void 0?"optional":on,cn=(0,ye.Z)(oe,Ce),vn=ve.useCallback(function(Pt){return typeof It=="function"?It(Pt):Pt==null?void 0:Pt[It]},[It]),Jn=_e(vn,null,null),jn=(0,me.Z)(Jn,4),Wr=jn[0],zr=jn[1],yr=jn[2],sr=jn[3],Nn=!!(Ot!==!1&&ne&&ge),ir=ve.useMemo(function(){return Object.values(yr.maps).reduce(function(Pt,Ht){return Pt+Ht},0)},[yr.id,yr.maps]),Er=Nn&&vt&&(Math.max(ge*vt.length,ir)>ne||!!Yt),Tn=Xt==="rtl",qn=ze()(re,(0,Ie.Z)({},"".concat(re,"-rtl"),Tn),le),$t=vt||Xe,sn=(0,ve.useRef)(),hn=(0,ve.useRef)(),Dn=(0,ve.useRef)(),Rr=(0,ve.useState)(0),Un=(0,me.Z)(Rr,2),$n=Un[0],Tr=Un[1],lr=(0,ve.useState)(0),Bn=(0,me.Z)(lr,2),Zn=Bn[0],Or=Bn[1],Nt=(0,ve.useState)(!1),$e=(0,me.Z)(Nt,2),en=$e[0],Pn=$e[1],In=function(){Pn(!0)},ke=function(){Pn(!1)},Pe={getKey:vn};function Ft(Pt){Tr(function(Ht){var xt;typeof Pt=="function"?xt=Pt(Ht):xt=Pt;var rt=Pr(xt);return sn.current.scrollTop=rt,rt})}var yt=(0,ve.useRef)({start:0,end:$t.length}),Oe=(0,ve.useRef)(),bt=ct($t,vn),Ut=(0,me.Z)(bt,1),Jt=Ut[0];Oe.current=Jt;var rn=ve.useMemo(function(){if(!Nn)return{scrollHeight:void 0,start:0,end:$t.length-1,offset:void 0};if(!Er){var Pt;return{scrollHeight:((Pt=hn.current)===null||Pt===void 0?void 0:Pt.offsetHeight)||0,start:0,end:$t.length-1,offset:void 0}}for(var Ht=0,xt,rt,Lt,Wt=$t.length,pn=0;pn<Wt;pn+=1){var bn=$t[pn],Rn=vn(bn),Vn=yr.get(Rn),_n=Ht+(Vn===void 0?ge:Vn);_n>=$n&&xt===void 0&&(xt=pn,rt=Ht),_n>$n+ne&&Lt===void 0&&(Lt=pn),Ht=_n}return xt===void 0&&(xt=0,rt=0,Lt=Math.ceil(ne/ge)),Lt===void 0&&(Lt=$t.length-1),Lt=Math.min(Lt+1,$t.length-1),{scrollHeight:Ht,start:xt,end:Lt,offset:rt}},[Er,Nn,$n,$t,sr,ne]),Ue=rn.scrollHeight,Vt=rn.start,St=rn.end,mn=rn.offset;yt.current.start=Vt,yt.current.end=St,ve.useLayoutEffect(function(){var Pt=yr.getRecord();if(Pt.size===1){var Ht=Array.from(Pt.keys())[0],xt=Pt.get(Ht),rt=$t[Vt];if(rt&&xt===void 0){var Lt=vn(rt);if(Lt===Ht){var Wt=yr.get(Ht),pn=Wt-ge;Ft(function(bn){return bn+pn})}}}yr.resetRecord()},[Ue]);var Gt=ve.useState({width:0,height:ne}),fn=(0,me.Z)(Gt,2),un=fn[0],xn=fn[1],yn=function(Ht){xn({width:Ht.offsetWidth,height:Ht.offsetHeight})},Wn=(0,ve.useRef)(),Kn=(0,ve.useRef)(),On=ve.useMemo(function(){return Ge(un.width,Yt)},[un.width,Yt]),ar=ve.useMemo(function(){return Ge(un.height,Ue)},[un.height,Ue]),Ln=Ue-ne,mr=(0,ve.useRef)(Ln);mr.current=Ln;function Pr(Pt){var Ht=Pt;return Number.isNaN(mr.current)||(Ht=Math.min(Ht,mr.current)),Ht=Math.max(Ht,0),Ht}var Qn=$n<=0,ur=$n>=Ln,wr=Zn<=0,cr=Zn>=Yt,Gn=ut(Qn,ur,wr,cr),Cr=function(){return{x:Tn?-Zn:Zn,y:$n}},er=(0,ve.useRef)(Cr()),tr=(0,fe.zX)(function(Pt){if(tn){var Ht=(0,Fe.Z)((0,Fe.Z)({},Cr()),Pt);(er.current.x!==Ht.x||er.current.y!==Ht.y)&&(tn(Ht),er.current=Ht)}});function hr(Pt,Ht){var xt=Pt;Ht?((0,ot.flushSync)(function(){Or(xt)}),tr()):Ft(xt)}function Dr(Pt){var Ht=Pt.currentTarget.scrollTop;Ht!==$n&&Ft(Ht),jt==null||jt(Pt),tr()}var dr=function(Ht){var xt=Ht,rt=Yt?Yt-un.width:0;return xt=Math.max(xt,0),xt=Math.min(xt,rt),xt},Yn=(0,fe.zX)(function(Pt,Ht){Ht?((0,ot.flushSync)(function(){Or(function(xt){var rt=xt+(Tn?-Pt:Pt);return dr(rt)})}),tr()):Ft(function(xt){var rt=xt+Pt;return rt})}),Hn=Zt(Nn,Qn,ur,wr,cr,!!Yt,Yn),nr=(0,me.Z)(Hn,2),Zr=nr[0],Lr=nr[1];mt(Nn,sn,function(Pt,Ht,xt,rt){var Lt=rt;return Gn(Pt,Ht,xt)?!1:!Lt||!Lt._virtualHandled?(Lt&&(Lt._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Pt?Ht:0,deltaY:Pt?0:Ht}),!0):!1}),pe(Er,sn,function(Pt){Ft(function(Ht){return Ht+Pt})}),(0,Je.Z)(function(){function Pt(xt){var rt=Qn&&xt.detail<0,Lt=ur&&xt.detail>0;Nn&&!rt&&!Lt&&xt.preventDefault()}var Ht=sn.current;return Ht.addEventListener("wheel",Zr,{passive:!1}),Ht.addEventListener("DOMMouseScroll",Lr,{passive:!0}),Ht.addEventListener("MozMousePixelScroll",Pt,{passive:!1}),function(){Ht.removeEventListener("wheel",Zr),Ht.removeEventListener("DOMMouseScroll",Lr),Ht.removeEventListener("MozMousePixelScroll",Pt)}},[Nn,Qn,ur]),(0,Je.Z)(function(){if(Yt){var Pt=dr(Zn);Or(Pt),tr({x:Pt})}},[un.width,Yt]);var br=function(){var Ht,xt;(Ht=Wn.current)===null||Ht===void 0||Ht.delayHidden(),(xt=Kn.current)===null||xt===void 0||xt.delayHidden()},ri=We(sn,$t,yr,ge,vn,function(){return zr(!0)},Ft,br);ve.useImperativeHandle(ee,function(){return{nativeElement:Dn.current,getScrollInfo:Cr,scrollTo:function(Ht){function xt(rt){return rt&&(0,it.Z)(rt)==="object"&&("left"in rt||"top"in rt)}xt(Ht)?(Ht.left!==void 0&&Or(dr(Ht.left)),ri(Ht.top)):ri(Ht)}}}),(0,Je.Z)(function(){if(tt){var Pt=$t.slice(Vt,St+1);tt(Pt,$t)}},[Vt,St,$t]);var Sr=Ye($t,vn,yr,ge),li=_t==null?void 0:_t({start:Vt,end:St,virtual:Er,offsetX:Zn,offsetY:mn,rtl:Tn,getSize:Sr}),qr=Ee($t,Vt,St,Yt,Zn,Wr,Ct,Pe),Br=null;ne&&(Br=(0,Fe.Z)((0,Ie.Z)({},Dt?"height":"maxHeight",ne),He),Nn&&(Br.overflowY="hidden",Yt&&(Br.overflowX="hidden"),en&&(Br.pointerEvents="none")));var Mn={};return Tn&&(Mn.dir="rtl"),ve.createElement("div",(0,se.Z)({ref:Dn,style:(0,Fe.Z)((0,Fe.Z)({},kt),{},{position:"relative"}),className:qn},Mn,cn),ve.createElement(we.Z,{onResize:yn},ve.createElement(nn,{className:"".concat(re,"-holder"),style:Br,ref:sn,onScroll:Dr,onMouseEnter:br},ve.createElement(Te,{prefixCls:re,height:Ue,offsetX:Zn,offsetY:mn,scrollWidth:Yt,onInnerResize:zr,ref:hn,innerProps:ln,rtl:Tn,extra:li},qr))),Er&&Ue>ne&&ve.createElement(st,{ref:Wn,prefixCls:re,scrollOffset:$n,scrollRange:Ue,rtl:Tn,onScroll:hr,onStartMove:In,onStopMove:ke,spinSize:ar,containerSize:un.height,style:Kt==null?void 0:Kt.verticalScrollBar,thumbStyle:Kt==null?void 0:Kt.verticalScrollBarThumb,showScrollBar:En}),Er&&Yt>un.width&&ve.createElement(st,{ref:Kn,prefixCls:re,scrollOffset:Zn,scrollRange:Yt,rtl:Tn,onScroll:hr,onStartMove:In,onStopMove:ke,spinSize:On,containerSize:un.width,horizontal:!0,style:Kt==null?void 0:Kt.horizontalScrollBar,thumbStyle:Kt==null?void 0:Kt.horizontalScrollBarThumb,showScrollBar:En}))}var Le=ve.forwardRef(ht);Le.displayName="List";var nt=Le,ft=nt},93314:function(Tt){"use strict";Tt.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(Tt,Rt,de){"use strict";de.d(Rt,{Z:function(){return ze}});const se=we=>typeof we=="object"&&we!=null&&we.nodeType===1,it=(we,fe)=>(!fe||we!=="hidden")&&we!=="visible"&&we!=="clip",Fe=(we,fe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Je=getComputedStyle(we,null);return it(Je.overflowY,fe)||it(Je.overflowX,fe)||(ve=>{const ot=(Ne=>{if(!Ne.ownerDocument||!Ne.ownerDocument.defaultView)return null;try{return Ne.ownerDocument.defaultView.frameElement}catch(Te){return null}})(ve);return!!ot&&(ot.clientHeight<ve.scrollHeight||ot.clientWidth<ve.scrollWidth)})(we)}return!1},Ie=(we,fe,Je,ve,ot,Ne,Te,Me)=>Ne<we&&Te>fe||Ne>we&&Te<fe?0:Ne<=we&&Me<=Je||Te>=fe&&Me>=Je?Ne-we-ve:Te>fe&&Me<Je||Ne<we&&Me>Je?Te-fe+ot:0,me=we=>{const fe=we.parentElement;return fe==null?we.getRootNode().host||null:fe},ye=(we,fe)=>{var Je,ve,ot,Ne;if(typeof document=="undefined")return[];const{scrollMode:Te,block:Me,inline:Ee,boundary:qe,skipOverflowHiddenElements:at}=fe,ct=typeof qe=="function"?qe:st=>st!==qe;if(!se(we))throw new TypeError("Invalid target");const lt=document.scrollingElement||document.documentElement,Qe=[];let et=we;for(;se(et)&&ct(et);){if(et=me(et),et===lt){Qe.push(et);break}et!=null&&et===document.body&&Fe(et)&&!Fe(document.documentElement)||et!=null&&Fe(et,at)&&Qe.push(et)}const ut=(ve=(Je=window.visualViewport)==null?void 0:Je.width)!=null?ve:innerWidth,Zt=(Ne=(ot=window.visualViewport)==null?void 0:ot.height)!=null?Ne:innerHeight,{scrollX:Ye,scrollY:Ve}=window,{height:gt,width:Be,top:Ze,right:De,bottom:_e,left:Bt}=we.getBoundingClientRect(),{top:mt,right:Et,bottom:dt,left:pe}=(st=>{const xe=window.getComputedStyle(st);return{top:parseFloat(xe.scrollMarginTop)||0,right:parseFloat(xe.scrollMarginRight)||0,bottom:parseFloat(xe.scrollMarginBottom)||0,left:parseFloat(xe.scrollMarginLeft)||0}})(we);let ce=Me==="start"||Me==="nearest"?Ze-mt:Me==="end"?_e+dt:Ze+gt/2-mt+dt,We=Ee==="center"?Bt+Be/2-pe+Et:Ee==="end"?De+Et:Bt-pe;const pt=[];for(let st=0;st<Qe.length;st++){const xe=Qe[st],{height:Ge,width:Ce,top:Xe,right:He,bottom:ht,left:Le}=xe.getBoundingClientRect();if(Te==="if-needed"&&Ze>=0&&Bt>=0&&_e<=Zt&&De<=ut&&(xe===lt&&!Fe(xe)||Ze>=Xe&&_e<=ht&&Bt>=Le&&De<=He))return pt;const nt=getComputedStyle(xe),ft=parseInt(nt.borderLeftWidth,10),oe=parseInt(nt.borderTopWidth,10),ee=parseInt(nt.borderRightWidth,10),z=parseInt(nt.borderBottomWidth,10);let re=0,le=0;const ne="offsetWidth"in xe?xe.offsetWidth-xe.clientWidth-ft-ee:0,ge="offsetHeight"in xe?xe.offsetHeight-xe.clientHeight-oe-z:0,Re="offsetWidth"in xe?xe.offsetWidth===0?0:Ce/xe.offsetWidth:0,Dt="offsetHeight"in xe?xe.offsetHeight===0?0:Ge/xe.offsetHeight:0;if(lt===xe)re=Me==="start"?ce:Me==="end"?ce-Zt:Me==="nearest"?Ie(Ve,Ve+Zt,Zt,oe,z,Ve+ce,Ve+ce+gt,gt):ce-Zt/2,le=Ee==="start"?We:Ee==="center"?We-ut/2:Ee==="end"?We-ut:Ie(Ye,Ye+ut,ut,ft,ee,Ye+We,Ye+We+Be,Be),re=Math.max(0,re+Ve),le=Math.max(0,le+Ye);else{re=Me==="start"?ce-Xe-oe:Me==="end"?ce-ht+z+ge:Me==="nearest"?Ie(Xe,ht,Ge,oe,z+ge,ce,ce+gt,gt):ce-(Xe+Ge/2)+ge/2,le=Ee==="start"?We-Le-ft:Ee==="center"?We-(Le+Ce/2)+ne/2:Ee==="end"?We-He+ee+ne:Ie(Le,He,Ce,ft,ee+ne,We,We+Be,Be);const{scrollLeft:kt,scrollTop:vt}=xe;re=Dt===0?0:Math.max(0,Math.min(vt+re/Dt,xe.scrollHeight-Ge/Dt+ge)),le=Re===0?0:Math.max(0,Math.min(kt+le/Re,xe.scrollWidth-Ce/Re+ne)),ce+=vt-re,We+=kt-le}pt.push({el:xe,top:re,left:le})}return pt},Ae=we=>we===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(we)?we:{block:"start",inline:"nearest"};function ze(we,fe){if(!we.isConnected||!(ot=>{let Ne=ot;for(;Ne&&Ne.parentNode;){if(Ne.parentNode===document)return!0;Ne=Ne.parentNode instanceof ShadowRoot?Ne.parentNode.host:Ne.parentNode}return!1})(we))return;const Je=(ot=>{const Ne=window.getComputedStyle(ot);return{top:parseFloat(Ne.scrollMarginTop)||0,right:parseFloat(Ne.scrollMarginRight)||0,bottom:parseFloat(Ne.scrollMarginBottom)||0,left:parseFloat(Ne.scrollMarginLeft)||0}})(we);if((ot=>typeof ot=="object"&&typeof ot.behavior=="function")(fe))return fe.behavior(ye(we,fe));const ve=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:ot,top:Ne,left:Te}of ye(we,Ae(fe))){const Me=Ne-Je.top+Je.bottom,Ee=Te-Je.left+Je.right;ot.scroll({top:Me,left:Ee,behavior:ve})}}}}]);
|