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.
1105 lines
743 KiB
1105 lines
743 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[1578],{63524:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Qe}});var ae=ue(54476),je=ue(59301),Ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},at=Ie,be=ue(7657),he=function(de,Ne){return je.createElement(be.Z,(0,ae.Z)({},de,{ref:Ne,icon:at}))},De=je.forwardRef(he),Qe=De},4887:function(){"use strict"},27431:function(cn,an){"use strict";an.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63089:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var cn={},an="5.0",ue={},ae=null,je=!1,Ie=!1,at=null,be=!1,he=null,De=null,Qe=0;Qe<arguments.length;Qe++){var we=arguments[Qe];if(we!==null)switch(typeof we){case"number":an=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?an=we:at=we;break;case"object":typeof we.is3D!="undefined"?ae=we:ue=we;break;case"boolean":je=we,Ie=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ue.material_id!==void 0&&!Ie&&(je=!0)),at!==null&&ue.id===void 0&&(ue.id=at);var de="",Ne="",Ce=!1,yt=null,Je=null,Ye=null,Re=!1,Pe=null,vt=null,mt=null,St=null,Fe=null;ue.height!==void 0&&(ue.height=Math.round(ue.height)),ue.width!==void 0&&(ue.width=Math.round(ue.width));var ge=function(We){return parseFloat(We)>4?parseFloat(We):5};cn.setHTML5Codebase=function(We,gt){De=We,wt(We,gt)},cn.setJavaCodebase=cn.setJavaCodebaseVersion=cn.isCompiledInstalled=cn.setPreCompiledScriptPath=cn.setPreCompiledResourcePath=function(){},cn.setHTML5CodebaseVersion=function(We,gt){var xt=parseFloat(We);if(xt!==NaN&&xt<5){console.log("The GeoGebra HTML5 codebase version "+xt+" is deprecated. Using version latest instead.");return}he=We,fe(We,gt)},cn.getHTML5CodebaseVersion=function(){return Je},cn.getParameters=function(){return ue},cn.setFontsCSSURL=function(We){St=We},cn.setGiacJSURL=function(We){},cn.setJNLPFile=function(We){de=We},cn.setJNLPBaseDir=function(We){},cn.inject=function(){function We(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var gt="auto",xt=ue.id,bn,Xe=!1,Me=0;Me<arguments.length;Me++){var ke=arguments[Me];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?gt=ke:xt=arguments[Me]):typeof ke=="boolean"?Xe=ke:ke instanceof HTMLElement&&(bn=ke)}Ve();function Ve(){if(!be){setTimeout(Ve,200);return}gt=Ht(gt);var st=bn||document.getElementById(xt);if(!st){console.log("possibly bug on ajax loading? ");return}if(cn.removeExistingApplet(st,!1),ue.width===void 0&&st.clientWidth&&(ue.width=st.clientWidth),ue.height===void 0&&st.clientHeight&&(ue.height=st.clientHeight),!(ue.width&&ue.height)&>==="html5"&&(delete ue.width,delete ue.height),yt=gt,gt==="screenshot")Ze(st,ue);else{var Be=!1;ue.hasOwnProperty("playButton")&&ue.playButton||ue.hasOwnProperty("clickToLoad")&&ue.clickToLoad?Be=!0:ue.hasOwnProperty("playButtonAutoDecide")&&ue.playButtonAutoDecide&&(Be=(!He()||We())&&Ue()),Be?(yt="screenshot",nn(st,ue,Xe,gt)):$e(st,ue,Xe)}}};function He(){try{return window.self!==window.top}catch(We){return!0}}function Ue(){return ue.hasOwnProperty("screenshotGenerator")&&ue.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}cn.getViews=function(){return ae},cn.isJavaInstalled=function(){return!1};var Dt=function(We){var gt=function(Me){var ke=JSON.parse(Me),Ve=function(tt){return tt.type=="G"||tt.type=="E"},st=ke.elements?ke.elements.filter(Ve)[0]:ke;if(!st||!st.url){xt();return}ue.fileName=st.url,me(st.settings||{}),ae.is3D=!0;var Be="https://www.geogebra.org/images/";cn.setPreviewImage(Pe||st.previewUrl,Be+"GeoGebra_loading.png",Be+"applet_play.png"),We()},xt=function(){ue.onError&&ue.onError(),qt("Error: Fetching material (id "+ue.material_id+") failed.",ue)},bn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Xe="/materials/"+ue.material_id+"?scope=basic";Ee("https://"+bn+"/api/proxy.php?path="+encodeURIComponent(Xe),gt,xt)};function me(We){var gt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(xt){We[xt]=!!We[xt]}),gt.forEach(function(xt){ue[xt]===void 0&&We[xt]!==void 0&&(ue[xt]=We[xt])}),ue.showToolBarHelp===void 0&&(ue.showToolBarHelp=ue.showToolBar)}function Ee(We,gt,xt){var bn=new XMLHttpRequest;bn.open("GET",We),bn.onload=function(){gt(bn.responseText)},bn.onerror=xt,bn.send()}cn.isHTML5Installed=function(){return!0},cn.getLoadedAppletType=function(){return yt},cn.setPreviewImage=function(We,gt,xt){Pe=We,vt=gt,mt=xt},cn.removeExistingApplet=function(We,gt){var xt;typeof We=="string"&&(We=document.getElementById(We)),yt=null;var bn=null;for(xt=0;xt<We.childNodes.length;xt++){var Xe=We.childNodes[xt],Me=Xe.className;Me==="applet_screenshot"?gt?(Xe.style.display="block",yt="screenshot"):Xe.style.display="none":Me!=="applet_scaler prerender"&&(We.removeChild(Xe),bn=Me&&Me.indexOf("appletParameters")!=-1?Xe.id:null,xt--)}var ke=ue.id!==void 0?ue.id:bn,Ve=window[ke];Ve&&typeof Ve.getBase64=="function"&&(Ve.remove(),window[ke]=null)},cn.refreshHitPoints=function(){if(ge(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var We=cn.getAppletObject();return We&&typeof We.recalculateEnvironments=="function"?(We.recalculateEnvironments(),!0):!1},cn.startAnimation=function(){var We=cn.getAppletObject();return We&&typeof We.startAnimation=="function"?(We.startAnimation(),!0):!1},cn.stopAnimation=function(){var We=cn.getAppletObject();return We&&typeof We.stopAnimation=="function"?(We.stopAnimation(),!0):!1},cn.getAppletObject=function(){var We=ue.id!==void 0?ue.id:"ggbApplet";return window[We]},cn.resize=function(){};var Ke=function(We,gt,xt){var bn=document.createElement("param");bn.setAttribute("name",gt),bn.setAttribute("value",xt),We.appendChild(bn)},Se=function(We){return We&&We!=="false"},$e=function(We,gt,xt){ge(Je)<=4.2&&(xt=!0);var bn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Je||ggbHTML5LoadedCodebaseIsWebSimple&&!Re)&&(bn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Xe=document.createElement("div");Xe.classList.add("appletParameters","notranslate");var Me=gt.width,ke=gt.height;if(gt.disableAutoScale=gt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():gt.disableAutoScale,gt.width!==void 0)if(ge(Je)<=4.4)Se(gt.showToolBar)&&(gt.height-=7),Se(gt.showAlgebraInput)&&(gt.height-=37),gt.width<605&&Se(gt.showToolBar)&&(gt.width=605,Me=605);else{var Ve=100;(Se(gt.showToolBar)||Se(gt.showMenuBar))&&(gt.hasOwnProperty("customToolBar")&&(gt.customToolbar=gt.customToolBar),Ve=Se(gt.showMenuBar)?245:155),Me<Ve&&(gt.width=Ve,Me=Ve)}Xe.style.border="none",Xe.style.display="inline-block";for(var st in gt)gt.hasOwnProperty(st)&&st!=="appletOnLoad"&&Xe.setAttribute("data-param-"+st,gt[st]);St&&Xe.setAttribute("data-param-fontscssurl",St),cn.resize=function(){GGBAppletUtils.responsiveResize(We,gt)},window.addEventListener("resize",function(z){cn.resize()});var Be=typeof gt.appletOnLoad=="function"?gt.appletOnLoad:function(){};if(!xt&>.width!==void 0){gt.hasOwnProperty("showSplash")||Xe.setAttribute("data-param-showSplash","false");var tt=We.querySelector(".applet_scaler.prerender"),et=tt!==null;if(et)var Oe=tt.querySelector(".ggb_preview");else{var Oe=Qt(Me,ke,gt.borderColor,!1);tt=document.createElement("div"),tt.className="applet_scaler",tt.style.position="relative",tt.style.display="block",tt.style.width=Me+"px",tt.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(tt,"66%"),ge(Je)>=5?(gt.appletOnLoad=function(z){var re=We.querySelector(".ggb_preview");re&&re.parentNode.removeChild(re),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(tt),window.GGBT_wsf_view&&$(window).trigger("resize"),Be(z)},et||tt.appendChild(Oe)):Xe.appendChild(Oe),tt.appendChild(Xe),et||We.appendChild(tt),setTimeout(function(){cn.resize()},1)}else{var dt=document.createElement("div");dt.className="applet_scaler",dt.style.position="relative",dt.style.display="block",dt.appendChild(Xe),We.appendChild(dt),gt.appletOnLoad=function(z){cn.resize(),Be(z)}}function ut(z,re){re&&typeof re.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(z,re.appletOnLoad):renderGGBElement(z),qt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",re)}function ve(z,re){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:z,params:re}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(le){ut(le.article,le.params)}),html5AppletsToProcess=null)},ge(Je)<5&&(z.className+=" geogebraweb")):ut(z,re)}if(bn){scriptLoadStarted=!0;for(var ct=0;ct<Xe.childNodes.length;ct++){var Yt=Xe.childNodes[ct].tagName;Yt==="TABLE"&&(Xe.removeChild(Xe.childNodes[ct]),ct--)}if(ggbHTML5LoadedScript!==null){var Vt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Vt!=null&&Vt.parentNode.removeChild(Vt)}var oe=document.createElement("script"),ee=function(){ve(Xe,gt)};oe.src=Ne+Ye,ggbHTML5LoadedCodebaseIsWebSimple=Re,ggbHTML5LoadedCodebaseVersion=Je,ggbHTML5LoadedScript=oe.src,qt("GeoGebra HTML5 codebase loaded: '"+Ne+"'.",gt),!De&&(!he||he=="5.0")?(Re?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ee()):Ne.requirejs?__webpack_require__.e(6954).then(function(){var z=[__webpack_require__(76954)];ee.apply(null,z)}.bind(this)).catch(__webpack_require__.oe):(oe.onload=ee,We.appendChild(oe))}else ve(Xe,gt);gt.height=ke,gt.width=Me},Ze=function(We,gt,xt){var bn=Qt(gt.width,gt.height,gt.borderColor,xt),Xe=document.createElement("div");Xe.style.position="relative",Xe.style.display="block",Xe.style.width=gt.width+"px",Xe.style.height=gt.height+"px",Xe.className="applet_screenshot applet_scaler"+(xt?" applet_screenshot_play":""),Xe.appendChild(bn);var Me=GGBAppletUtils.getScale(gt,We,xt);xt?(We.appendChild(Ot()),window.GGBT_wsf_view||(We.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Xe,"66%"),We.appendChild(Xe),Me!==1&&!isNaN(Me)&&(GGBAppletUtils.scaleElement(Xe,Me),Xe.style.width=gt.width+"px",Xe.style.height=gt.height+"px",Xe.parentNode.style.width=gt.width*Me+"px",Xe.parentNode.style.height=gt.height*Me+"px"),cn.resize=function(){lt(We,bn,Xe,xt)},window.addEventListener("resize",function(ke){cn.resize()}),cn.resize()};function lt(We,gt,xt,bn){if(We.contains(gt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(We.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(We)}var Xe=GGBAppletUtils.getScale(ue,We,bn);xt.parentNode!==null&&(!isNaN(Xe)&&Xe!==1?(GGBAppletUtils.scaleElement(xt,Xe),xt.parentNode.style.width=ue.width*Xe+"px",xt.parentNode.style.height=ue.height*Xe+"px"):(GGBAppletUtils.scaleElement(xt,1),xt.parentNode.style.width=ue.width+"px",xt.parentNode.style.height=ue.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(We),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}cn.onExitFullscreen=function(We,gt){gt.appendChild(We)};var nn=function(We,gt,xt,bn){Ze(We,gt,!0);for(var Xe=function(){var Ve=[];for(ke=0;ke<We.childNodes.length;ke++)Ve.push(We.childNodes[ke]);if(window.GGBT_wsf_view){var st=window.GGBT_wsf_view.renderFullScreen(We,gt.id),Be=document.getElementById("fullscreencontainer"),tt=jQuery(We).find(".fullscreencontent");tt.length>0?(st.remove(),tt.attr("id","fullscreencontent").show(),jQuery(Be).append(tt),window.dispatchEvent(new Event("resize"))):$e(st,gt,!1),window.GGBT_wsf_view.launchFullScreen(Be)}else yt=bn,$e(We,gt,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<Ve.length;ke++)We.removeChild(Ve[ke])},Me=We.getElementsByClassName("ggb_preview_play"),ke=0;ke<Me.length;ke++)Me[ke].addEventListener("click",Xe,!1),Me[ke].addEventListener("ontouchstart",Xe,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(We),Ue()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ot=function(){var We=document.createElement("div");if(We.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var gt='.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");}',xt=document.createElement("style");xt.styleSheet?xt.styleSheet.cssText=gt:xt.appendChild(document.createTextNode(gt)),document.getElementsByTagName("head")[0].appendChild(xt)}return We},Qt=function(We,gt,xt,bn){var Xe=document.createElement("div");Xe.className="ggb_preview",Xe.style.position="absolute",Xe.style.zIndex="90",Xe.style.width=We-2+"px",Xe.style.height=gt-2+"px",Xe.style.top="0px",Xe.style.left="0px",Xe.style.overflow="hidden",Xe.style.backgroundColor="white";var Me="lightgrey";xt!==void 0&&(xt==="none"?Me="transparent":Me=xt),Xe.style.border="1px solid "+Me;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",Pe!==null&&ke.setAttribute("src",Pe),ke.style.opacity=.7,vt!==null){var Ve,st,Be;if(!bn){Ve=document.createElement("img"),Ve.style.position="absolute",Ve.style.zIndex="1001",Ve.style.opacity=1,ke.style.opacity=.3,st=360,st>We/4*3&&(st=We/4*3),Be=st/5.8,Ve.setAttribute("src",vt),Ve.setAttribute("width",st),Ve.setAttribute("height",Be);var tt=(We-st)/2,et=(gt-Be)/2;Ve.style.left=tt+"px",Ve.style.top=et+"px",Xe.appendChild(Ve)}}return Xe.appendChild(ke),Xe},Ht=function(We){return We=We.toLowerCase(),We==="html5"||We==="screenshot"?We:"html5"},ye=["web","webSimple","web3d","tablet","tablet3d","phone"],fe=function(We,gt){if(Je=We,gt){wt(Je,!0);return}var xt=!je;if(xt){var bn=ge(Je);!isNaN(bn)&&bn<4.4&&(xt=!1)}var Xe,Me;window.location.protocol.substr(0,4)==="http"?Xe=window.location.protocol:Xe="http:";var ke=Je.indexOf("//");ke>0?Me=Je:ke===0?Me=Xe+Je:Me="https://www.geogebra.org/apps/5.2.814.0/";for(var Ve in ye)if(Je.slice(ye[Ve].length*-1)===ye[Ve]||Je.slice((ye[Ve].length+1)*-1)===ye[Ve]+"/"){wt(Me,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&xt&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Se(ue.showToolBar)&&!Se(ue.showMenuBar)&&!Se(ue.showAlgebraInput)&&!Se(ue.enableRightClick)&&(!ue.appName||ue.appName=="classic")?Me+="webSimple/":Me+="web3d/",wt(Me,!1)},wt=function(We,gt){if(We.requirejs){Ne=We;return}We.slice(-1)!=="/"&&(We+="/"),Ne=We,gt===null&&(gt=We.indexOf("http")===-1),Ce=gt,Ye="web.nocache.js",Re=!1;var xt=Ne.split("/");xt.length>1&&(!gt&&xt[xt.length-2]==="webSimple"?(Ye="webSimple.nocache.js",Re=!0):ye.indexOf(xt[xt.length-2])>=0&&(Ye=xt[xt.length-2]+".nocache.js")),xt=We.split("/"),Je=xt[xt.length-3],Je.substr(0,4)==="test"?Je=Je.substr(4,1)+"."+Je.substr(5,1):(Je.substr(0,3)==="war"||Je.substr(0,4)==="beta")&&(Je="5.0");var bn=parseFloat(Je);bn!==NaN&&bn<5&&We.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+bn+" is deprecated. Using version latest instead."),fe("5.0",gt))},qt=function(We,gt){window.console&&window.console.log&&(!gt||typeof gt.showLogging=="undefined"||gt.showLogging&>.showLogging!=="false")&&console.log(We)};ue.material_id!==void 0?Dt(Bt):Bt();function Bt(){var We=an;he!==null?We=he:parseFloat(We)<5&&(We="5.0"),fe(We,!1),De!==null&&wt(De,Ce),be=!0}return cn},GGBAppletUtils=function(){"use strict";function cn(){return window.GGBT_wsf_edit!==void 0}function an(be,he){he!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+he+","+he+")",be.style.webkitTransform="scale("+he+","+he+")",be.style.maxWidth="initial",be.querySelector(".ggb_preview")!==null&&(be.querySelector(".ggb_preview").style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[0]!==void 0&&(be.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[1]!==void 0&&(be.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(be.style.transform="none",be.style.webkitTransform="none")}function ue(be,he,De,Qe,we,de){var Ne=null;if(de!=null&&de!="")for(var Ce=be.parentNode;Ce!=null;)if((" "+Ce.className+" ").indexOf(" "+de+" ")>-1){Ne=Ce;break}else Ce=Ce.parentNode;var yt=0,Je=0,Ye=0,Re=0,Pe=0,vt=0,mt=0;if(Ne)yt=Ne.offsetWidth,Je=Math.max(Qe?Ne.offsetWidth:0,Ne.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(yt=Math.min(window.innerWidth,document.documentElement.clientWidth),Je=Math.min(window.innerHeight,document.documentElement.clientHeight),Ye=yt):(yt=window.innerWidth,Je=window.innerHeight,Ye=window.innerWidth),be){var St=be.getBoundingClientRect();St.left>0&&St.left<=yt&&(we===void 0||!we)&&(document.dir==="rtl"?(Pe=yt-St.width-St.left,vt=Ye<=480?10:30):(vt=St.left,Pe=Ye<=480?10:30),Re=vt+Pe)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Fe=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Re=40,mt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Re=0,mt=40)}}return be&&((De===void 0||!De)&&he>0&&he+Re<yt?yt=he:yt-=Re,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(De===void 0||!De)&&(Je-=mt)),{width:yt,height:Je}}function ae(be,he,De,Qe,we){if(be.isScreenshoGenerator)return 1;var de=Qe!==void 0&&Qe,Ne=be.noScaleMargin!=null&&be.noScaleMargin,Ce=function(Fe){return Fe&&Fe!=="false"},yt=Ce(be.autoHeight),Je=ue(he,be.width,De,yt,de&&window.GGBT_wsf_view||Ne,we),Ye=parseInt(Je.width),Re=be.width,Pe=be.height;if(Re===void 0){var vt=he.querySelector(".appletParameters");vt&&(Re=vt.offsetWidth,Pe=vt.offsetHeight)}var mt=Ye/Re,St=de?1:Je.height/Pe;return De!==void 0&&!De&&(mt=Math.min(1,mt),St=Math.min(1,St)),Math.min(mt,St)}function je(be,he,De){var Qe=1,we,de=!1;if(be.hasOwnProperty("allowUpscale")&&(de=be.allowUpscale),be.hasOwnProperty("scale")&&(Qe=parseFloat(be.scale),(isNaN(Qe)||Qe===null||Qe===0)&&(Qe=1),Qe>1&&(de=!0)),he&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))we=ae(be,he,de,De,be.scaleContainerClass);else return Qe;return de&&(!be.hasOwnProperty("scale")||Qe===1)?we:Math.min(Qe,we)}function Ie(be){var he=Math.min(window.innerWidth,document.documentElement.clientWidth),De=Math.min(window.innerHeight,document.documentElement.clientHeight),Qe=be.getBoundingClientRect(),we=(he-Qe.width)/2,de=(De-Qe.height)/2;de<0&&(de=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?be.style.left="40px":be.style.left=we+"px",be.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?be.style.top="40px":be.style.top=de+"px",be.style.left=we+"px")}function at(be,he){var De=be.querySelector(".appletParameters");if(De){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(he.id!==De.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(De.parentElement&&/fullscreen/.test(De.parentElement.className))return;var Qe=je(he,be);cn()&&De.setAttribute("data-param-scale",Qe);for(var we=null,de=0;de<be.childNodes.length;de++)if(be.childNodes[de].className!==void 0&&be.childNodes[de].className.match(/^applet_scaler/)){we=be.childNodes[de];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Ne=he.id!==void 0?he.id:"ggbApplet",Ce=window[Ne];(Ce==null||!Ce.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Qe)&&Qe!==1?(we.parentNode.style.width=he.width*Qe+"px",we.parentNode.style.height=he.height*Qe+"px",an(we,Qe)):(an(we,1),we.parentNode.style.width=he.width+"px",we.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ie(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(De).parents(".content-added-content"))}}return{responsiveResize:at,isFlexibleWorksheetEditor:cn,positionCenter:Ie,getScale:je,scaleElement:an}}();__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 cn=n.location.search;return cn.indexOf(J)!=-1||cn.indexOf(K)!=-1}function q(cn,an){}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(cn){var an=s[L].bindings;s[L].bindings=function(){for(var ue=an?an():{},ae=cn[webModule.__softPermutationId],je=O;je<ae.length;je++){var Ie=ae[je];ue[Ie[O]]=Ie[P]}return ue}};var t;function u(){return v(),t}function v(){if(!t){var cn=o.createElement(Q);if(cn.id=L,cn.style.cssText=R+S,cn.tabIndex=-1,o.body.appendChild(cn),t=cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var an=document.compatMode==U?V:W;t.write(an+X),t.close()}}}function w(cn){function an(ae){function je(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ie=je();if(Ie){ae();return}function at(){if(!Ie){if(!je())return;Ie=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,at,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,at,!1);var be=setInterval(function(){at()},$)}function ue(ae){var je=u(),Ie=je.body,at=je.createElement(_);at.language=ab,at.crossOrigin=W,at.src=ae,webModule.__errFn&&(at.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),Ie.appendChild(at)}an(function(){ue(cn)})}webModule.__startLoadingFragment=function(cn){return C(cn)},webModule.__installRunAsyncCode=function(cn){var an=u(),ue=an.body,ae=an.createElement(_);ae.language=ab,ae.text=cn,ue.appendChild(ae),ue.removeChild(ae)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(cn){var an=c[cn];return an==null?null:an},r=d,webModule.__errFn=e}function B(){function cn(be){var he=be.lastIndexOf(rb);he==-1&&(he=be.length);var De=be.indexOf(sb);De==-1&&(De=be.length);var Qe=be.lastIndexOf(tb,Math.min(De,he));return Qe>=O?be.substring(O,Qe+P):W}function an(be){if(!be.match(/^\w+:\/\//)){var he=o.createElement(ub);he.src=be+vb,be=cn(he.src)}return be}function ue(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function ae(){for(var be=o.getElementsByTagName(_),he=O;he<be.length;++he)if(be[he].src.indexOf(xb)!=-1)return cn(be[he].src);return W}function je(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function Ie(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var at=ue();return at==W&&(at=ae()),at==W&&(at=je()),at==W&&Ie()&&(at=cn(o.location.href)),at=an(at),at}function C(cn){return cn.match(/^\//)||cn.match(/^[a-zA-Z]+:\/\//)?cn:webModule.__moduleBase+cn}function D(){var cn=[],an=O,ue=[],ae=[];function je(be){var he=ae[be](),De=ue[be];if(he in De)return he;var Qe=[];for(var we in De)Qe[De[we]]=we;throw r&&r(be,Qe,he),null}if(__gwt_isKnownPropertyValue=function(be,he){return he in ue[be]},webModule.__getPropMap=function(){var be={};for(var he in ue)ue.hasOwnProperty(he)&&(be[he]=je(he));return be},webModule.__computePropValue=je,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ie;try{Ie=Cb;var at=Ie.indexOf(Db);at!=-1&&(an=parseInt(Ie.substring(at+P),$),Ie=Ie.substring(O,at))}catch(be){}return webModule.__softPermutationId=an,C(Ie+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},88457:function(cn,an,ue){"use strict";ue.d(an,{Ax:function(){return at},Ds:function(){return be},KI:function(){return De},SI:function(){return Ie},f1:function(){return je}});var ae=ue(78323);function je(Qe){let we=!0;if(Qe.length>0){for(let de=0;de<Qe.length;de++)if(Qe[de].compile_success==0||!Qe[de].compile_success){we=!1;break}}else we=!1;return we}function Ie(Qe,we=""){let de=[];for(let Ne=0;Ne<Qe.length;Ne++){let Ce=Qe[Ne],yt=we?`${we}/${Ce.name}`:`${Ce.name}`;de.push({title:Ce.name,type:Ce.type,isLeaf:Ce.type!=="tree",key:yt})}return de}function at(Qe,we,de){for(let Ne=0;Ne<Qe.length;Ne++){let Ce=Qe[Ne];if(Ce.key===we){Ce.children=de;break}Ce.children&&at(Ce.children,we,de)}return Qe}function be(Qe,we,de){let Ne;return function(){let Ce=this,yt=arguments,Je=function(){Ne=null,de||Qe.apply(Ce,yt)},Ye=de&&!Ne;clearTimeout(Ne),Ne=setTimeout(Je,we),Ye&&Qe.apply(Ce,yt)}}const he=!0,De=ae.Z.API_SERVER},54344:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Vt}});var ae=ue(59301),je={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ie=ue(92310),at=ue.n(Ie),be=ue(29787);var he=function(oe,ee){return(he=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 De(oe,ee){function z(){this.constructor=oe}he(oe,ee),oe.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function Qe(oe,ee,z,re){return new(z||(z=Promise))(function(le,ne){function xe(nt){try{ft(re.next(nt))}catch(Le){ne(Le)}}function ot(nt){try{ft(re.throw(nt))}catch(Le){ne(Le)}}function ft(nt){var Le;nt.done?le(nt.value):(Le=nt.value,Le instanceof z?Le:new z(function(Gt){Gt(Le)})).then(xe,ot)}ft((re=re.apply(oe,ee||[])).next())})}function we(oe,ee){var z,re,le,ne,xe={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:ot(0),throw:ot(1),return:ot(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function ot(ft){return function(nt){return function(Le){if(z)throw new TypeError("Generator is already executing.");for(;xe;)try{if(z=1,re&&(le=2&Le[0]?re.return:Le[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,Le[1])).done)return le;switch(re=0,le&&(Le=[2&Le[0],le.value]),Le[0]){case 0:case 1:le=Le;break;case 4:return xe.label++,{value:Le[1],done:!1};case 5:xe.label++,re=Le[1],Le=[0];continue;case 7:Le=xe.ops.pop(),xe.trys.pop();continue;default:if(le=xe.trys,!((le=le.length>0&&le[le.length-1])||Le[0]!==6&&Le[0]!==2)){xe=0;continue}if(Le[0]===3&&(!le||Le[1]>le[0]&&Le[1]<le[3])){xe.label=Le[1];break}if(Le[0]===6&&xe.label<le[1]){xe.label=le[1],le=Le;break}if(le&&xe.label<le[2]){xe.label=le[2],xe.ops.push(Le);break}le[2]&&xe.ops.pop(),xe.trys.pop();continue}Le=ee.call(oe,xe)}catch(Gt){Le=[6,Gt],re=0}finally{z=le=0}if(5&Le[0])throw Le[1];return{value:Le[0]?Le[1]:void 0,done:!0}}([ft,nt])}}}function de(){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],xe=0,ot=ne.length;xe<ot;xe++,le++)re[le]=ne[xe];return re}var Ne=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],xe=ne[0],ot=ne[1];ee.setAttribute(xe,ot)}},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 xe=document.createElementNS("http://www.w3.org/2000/svg","line");return xe.setAttribute("x1",ee.toString()),xe.setAttribute("y1",z.toString()),xe.setAttribute("x2",re.toString()),xe.setAttribute("y2",le.toString()),ne&&oe.setAttributes(xe,ne),xe},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,xe,ot){var ft=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(ft,[["id",ee],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",xe.toString()]]),ft.appendChild(ot),ft},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}(),Ce=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}(),yt=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 xe=re!==void 0?re:document.createElement("canvas");ee===null&&(le.markersOnly=!0,le.naturalSize=!1);var ot=document.createElementNS("http://www.w3.org/2000/svg","svg");ot.setAttribute("xmlns","http://www.w3.org/2000/svg"),ot.setAttribute("width",z.width.baseVal.valueAsString),ot.setAttribute("height",z.height.baseVal.valueAsString),ot.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),ot.innerHTML=z.innerHTML,le.naturalSize===!0?(ot.width.baseVal.value=ee.naturalWidth,ot.height.baseVal.value=ee.naturalHeight):le.width!==void 0&&le.height!==void 0&&(ot.width.baseVal.value=le.width,ot.height.baseVal.value=le.height),xe.width=ot.width.baseVal.value,xe.height=ot.height.baseVal.value;var ft=ot.outerHTML,nt=xe.getContext("2d");le.markersOnly!==!0&&nt.drawImage(ee,0,0,xe.width,xe.height);var Le=window.URL,Gt=new Image(xe.width,xe.height);Gt.setAttribute("crossOrigin","anonymous");var Lt=new Blob([ft],{type:"image/svg+xml"}),_t=Le.createObjectURL(Lt);Gt.onload=function(){nt.drawImage(Gt,0,0),Le.revokeObjectURL(_t);var hn=xe.toDataURL(le.imageType,le.imageQuality);ne(hn)},Gt.src=_t})},oe}(),Je=function(){},Ye=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 Re("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Re("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Re("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Pe("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Pe("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}(),Re=function(oe,ee){this.selector=oe,this.style=ee},Pe=function(oe,ee){this.localName=oe,this.style=ee},vt=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 xe=document.createElement("div");xe.className=""+z.toolbarButtonStyleClass.name,xe.setAttribute("data-type-name",ne.typeName),xe.innerHTML=ne.icon,xe.addEventListener("click",function(){z.markerToolbarButtonClicked(xe,ne)}),z.buttons.push(xe),z.markerButtons.push(xe)}),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 Pe("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 Pe("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Pe("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Re("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Re("."+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}(),mt=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 Pe("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 Pe("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Pe("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Pe("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox-panel-row_colors",`
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Re("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Re("."+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 xe;ne.uiStyleSettings=le.uiStyleSettings;var ot=document.createElement("div");ot.className=le.toolboxButtonStyleClass.name+" "+((xe=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:le.toolboxButtonStyleColorsClass.name),ot.innerHTML=ne.icon,ot.title=ne.title,ot.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(ot),le.buttonRow.appendChild(ot)}),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,xe){var ot,ft;ne.className=z.toolboxButtonStyleClass.name+" "+(xe===re?""+((ot=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ot!==void 0?ot:z.toolboxActiveButtonStyleColorsClass.name):""+((ft=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ft!==void 0?ft:z.toolboxButtonStyleColorsClass.name))})},oe}(),St=function(oe,ee){this.title=oe,this.icon=ee},Fe=function(oe){function ee(z,re,le,ne){var xe=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 xe.colors=[],xe.addTransparent=!1,xe.colorBoxes=[],xe.colors=re,xe.currentColor=le,xe.setCurrentColor=xe.setCurrentColor.bind(xe),xe.getColorBox=xe.getColorBox.bind(xe),xe}return De(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,xe=document.createElement("div");xe.style.display="inline-block",xe.style.boxSizing="content-box",xe.style.width=ne-2+"px",xe.style.height=ne-2+"px",xe.style.padding="1px",xe.style.marginRight="2px",xe.style.marginBottom="2px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderRadius=(ne+2)/2+"px",xe.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){re.setCurrentColor(z,xe)});var ot=document.createElement("div");return ot.style.display="inline-block",ot.style.width=ne-2+"px",ot.style.height=ne-2+"px",ot.style.backgroundColor=z,ot.style.borderRadius=ne/2+"px",z==="transparent"&&(ot.style.fill=this.uiStyleSettings.toolboxAccentColor,ot.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>`),xe.appendChild(ot),xe},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}(St),ge=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}(),He=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}(),Ue=function(){function oe(){this.GRIP_SIZE=10,this.visual=Ne.createGroup(),this.visual.appendChild(Ne.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ne.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}(),Dt=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}(),me=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(Ne.createTransform()),ne.setupControlBox(),ne}return De(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=Ne.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 xe=this.container.transform.baseVal.getItem(0);xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xe,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,xe=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,xe=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:xe=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),xe>=0?(this.top=ne,this.height=xe):(this.top=ne+xe,this.height=-xe),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=Ne.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=Ne.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=Ne.createGroup();var z=Ne.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=Ne.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=Ne.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 He,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 Ue;return z.visual.transform.baseVal.appendItem(Ne.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,xe=(this.height+this.CB_DISTANCE)/2-z/2,ot=this.height+this.CB_DISTANCE-z/2,ft=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,ft,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,xe),this.positionGrip(this.controlGrips.centerRight.visual,ft,xe),this.positionGrip(this.controlGrips.bottomLeft.visual,re,ot),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ot),this.positionGrip(this.controlGrips.bottomRight.visual,ft,ot),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:Dt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Dt.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(Dt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Dt.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}(ge),Ee=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 De(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Ne.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),Ne.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&&Ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ne.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}(me),Ke=function(oe){function ee(z,re,le,ne){var xe=oe.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return xe.widths=[],xe.widthBoxes=[],xe.widths=re,xe.currentWidth=le,xe.setCurrentWidth=xe.setCurrentWidth.bind(xe),xe}return De(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 xe=document.createElement("div");xe.innerText=le.toString(),xe.style.marginRight="5px",ne.appendChild(xe);var ot=document.createElement("div");ot.style.minHeight="20px",ot.style.flexGrow="2",ot.style.display="flex",ot.style.alignItems="center";var ft=document.createElement("hr");ft.style.minWidth="20px",ft.style.border="0px",ft.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,ft.style.flexGrow="2",ot.appendChild(ft),ne.appendChild(ot),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}(St),Se=function(oe){function ee(z,re,le,ne){var xe=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 xe.styles=[],xe.styleBoxes=[],xe.styles=re,xe.currentStyle=le,xe.setCurrentStyle=xe.setCurrentStyle.bind(xe),xe}return De(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 xe=document.createElement("div");xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.overflow="hidden";var ot=`<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>`;xe.innerHTML=ot,ne.appendChild(xe),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}(St),$e=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 Fe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Se("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return De(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}(Ee),Ze=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},lt=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 De(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=Ne.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 Ue;return z.visual.transform.baseVal.appendItem(Ne.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}(ge),nn=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 Fe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Se("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return De(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=Ne.createGroup(),this.selectorLine=Ne.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ne.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()),Ne.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ne.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ne.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}(lt),Ot=function(oe){function ee(z,re,le,ne){var xe=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 xe.fonts=[],xe.fontBoxes=[],xe.fonts=re,xe.currentFont=le,xe.setCurrentFont=xe.setCurrentFont.bind(xe),xe}return De(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 xe=document.createElement("div");xe.style.display="flex",xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.fontFamily=le,xe.style.overflow="hidden";var ot=document.createElement("div");ot.style.whiteSpace="nowrap",ot.style.overflow="hidden",ot.style.textOverflow="ellipsis",ot.innerHTML="The quick brown fox jumps over the lazy dog",xe.appendChild(ot),ne.appendChild(xe),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}(St),Qt=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 Fe("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Ot("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return De(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=Ne.createGroup(),this.bgRectangle=Ne.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ne.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ne.createTransform()),this.textElement.transform.baseVal.appendItem(Ne.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(Ne.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&&(Ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ne.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&&Ne.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&&Ne.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}(me),Ht=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 Fe("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return De(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=Ne.createGroup(),this.drawingImage=Ne.createImage(),this.visual.appendChild(this.drawingImage);var z=Ne.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),Ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ne.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],xe=re[2],ot=re[3],ft=!1,nt=0;nt<this.canvasElement.height;nt++)for(var Le=0;Le<this.canvasElement.width;Le++)z.data[nt*this.canvasElement.width*4+4*Le+3]>0&&(ft=!0,nt<ne&&(ne=nt),Le<le&&(le=Le),nt>ot&&(ot=nt),Le>xe&&(xe=Le));if(ft){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(xe-le)/this.pixelRatio,this.height=(ot-ne)/this.pixelRatio;var Gt=document.createElement("canvas");Gt.width=xe-le,Gt.height=ot-ne,Gt.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,xe-le,ot-ne),0,0),this.drawingImgUrl=Gt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){Ne.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ne.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}(me),ye=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 De(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(ot){var ft="both";switch(ot){case 0:ft="both";break;case 1:ft="start";break;case 2:ft="end";break;case 3:ft="none"}var nt=document.createElement("div");if(nt.style.display="flex",nt.style.flexGrow="2",nt.style.alignItems="center",nt.style.justifyContent="space-between",nt.style.padding="5px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderColor=ft===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){z.setCurrentType(ft,nt)}),re.appendChild(nt),ft==="both"||ft==="start"){var Le=document.createElement("div");Le.style.display="flex",Le.style.alignItems="center",Le.style.minHeight="20px",Le.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>`,Le.style.marginLeft="5px",nt.appendChild(Le)}var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.style.flexGrow="2";var Lt=document.createElement("hr");if(Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Lt.style.flexGrow="2",Gt.appendChild(Lt),nt.appendChild(Gt),ft==="both"||ft==="end"){var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.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>`,_t.style.marginRight="5px",nt.appendChild(_t)}ne.typeBoxes.push(nt)},ne=this,xe=0;xe<4;xe++)le(xe);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}(St),fe=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 ye("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return De(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=Ne.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ne.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ne.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ne.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",Ne.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ne.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}(nn),wt=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 Fe("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return De(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}(Ee),qt=function(oe){function ee(z,re,le,ne){var xe=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 xe.opacities=[],xe.opacityBoxes=[],xe.opacities=re,xe.currentOpacity=le,xe.setCurrentOpacity=xe.setCurrentOpacity.bind(xe),xe}return De(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 xe=document.createElement("div");xe.innerText=100*le+"%",ne.appendChild(xe),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}(St),Bt=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 Fe("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new qt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return De(ee,oe),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ne.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}(wt),We='<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>',gt='<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>',xt=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 Fe("Text color",le.defaultColorSet,ne.color,We),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Fe("Fill color",le.defaultColorSet,ne.bgColor,gt),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Ot("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new Ue,ne.tipGrip.visual.transform.baseVal.appendItem(Ne.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return De(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(){Ne.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ne.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&&(Ne.setAttributes(this.bgRectangle,[["fill",z]]),Ne.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(){Ne.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}(Qt),bn=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 Fe("Line color",de(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Fe("Fill color",de(le.defaultColorSet,["transparent"]),ne.fillColor,gt),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Se("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new qt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return De(ee,oe),ee.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=Ne.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),Ne.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&&Ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ne.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ne.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}(me),Xe=function(oe){function ee(z,re,le){return oe.call(this,z,re,le)||this}return De(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=Ne.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(Ne.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ne.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(Ne.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&&(Ne.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()]]),Ne.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}(nn),Me=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 De(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}(bn),ke=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}(),Ve=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 Fe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Se("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return De(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=Ne.createGroup(),this.selectorCurve=Ne.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ne.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()),Ne.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ne.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ne.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=Ne.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ne.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}(lt),st=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 Fe("Line color",de(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Fe("Fill color",de(le.defaultColorSet,["transparent"]),ne.fillColor,gt),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ke("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Se("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Ot("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Fe("Text color",le.defaultColorSet,ne.textColor,We),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return De(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=Ne.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ne.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ne.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=Ne.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),Ne.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')"]]),Ne.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&&Ne.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&&Ne.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),Ne.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&&Ne.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&Ne.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&Ne.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&Ne.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}(me),Be=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}(),tt=function(oe){function ee(z,re,le){var ne=oe.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return De(ee,oe),ee}(Be),et=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 De(ee,oe),ee}(Be),Oe=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}(),dt=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 Ze,this._isOpen=!1,this.undoRedoManager=new ke,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 Oe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new Ye(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[$e,Ht,fe,Qt,Me,bn,Bt,xt,Xe,wt,nn,Ve,st]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[$e,Ht,fe,Qt,bn,Bt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[$e,Ht,fe,Qt,Bt]},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(),Ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&Je.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Je.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Be(ee))})},oe.prototype.render=function(){return Qe(this,void 0,void 0,function(){var ee;return we(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new yt).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 Be(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 Be(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 Qt?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=Ne.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 vt(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 mt(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 et(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 et(ee,re))})}}},oe.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(xe){var ot=new et(ee,void 0,!0);xe(ot),ot.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(xe){var ot=le.markers[xe];le.setCurrentMarker(le.markers[xe]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(ft){return ft(new et(ee,ot))})},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 Be(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Be(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 Be(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 Be(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 Qe(this,void 0,void 0,function(){var ee,z,re=this;return we(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 tt(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(xe){return xe.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 Be(z))})},oe.prototype.addNewMarker=function(ee){var z=Ne.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 et(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 Ht&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ht):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new et(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 et(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 et(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 et(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){Ce.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 Be(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 Be(ee))}))},oe.instanceCounter=0,oe}(),ut=ue(57193),ve=ue(63949),ct=(oe,ee,z)=>new Promise((re,le)=>{var ne=ft=>{try{ot(z.next(ft))}catch(nt){le(nt)}},xe=ft=>{try{ot(z.throw(ft))}catch(nt){le(nt)}},ot=ft=>ft.done?re(ft.value):Promise.resolve(ft.value).then(ne,xe);ot((z=z.apply(oe,ee)).next())}),Vt=({data:oe,className:ee,fullWidth:z,style:re={},onClose:le,onOk:ne,showFullTools:xe,noAssociationId:ot})=>{const ft=(0,ae.useRef)(null),nt=(0,ae.useRef)(null),Le=(0,ae.useRef)(null),Gt=(0,ae.useRef)(null),[Lt,_t]=(0,ae.useState)(!1),[hn,Nn]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(Le.current||(Le.current=document.createElement("style"),document.head.appendChild(Le.current)),oe!=null&&oe.visible?(document.body.setAttribute("data-custom","y-hidden"),Le.current.innerHTML=" html { overflow-y: hidden; }",oe!=null&&oe.src&&Wt()):(document.body.removeAttribute("data-custom"),Le.current&&(document.head.removeChild(Le.current),Le.current=null)),()=>{document.body.removeAttribute("data-custom"),Le.current&&(document.head.removeChild(Le.current),Le.current=null)}),[oe==null?void 0:oe.visible]);const Wt=()=>ct(void 0,null,function*(){_t(!0),Nn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const It=yield(0,ve.ZJ)(oe==null?void 0:oe.src);ft.current.src="",ft.current.src=It,ft.current.onload=function(){$n()},_t(!1),Nn("")}),Ln=It=>ct(void 0,null,function*(){_t(!0),Nn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Mt=yield(0,ut.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:oe.title,file:It.dataUrl}});Mt!=null&&Mt.id&&!ot?(yield(0,ut.ZP)(`/api/attachments/${oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Mt==null?void 0:Mt.id,settings:JSON.stringify(It.state)}})).status===0&&ne():Mt!=null&&Mt.id&&ne(Mt),_t(!1),Nn("")}),nr=()=>{const It=document.querySelector('a[href="https://markerjs.com/"]');It&&It.parentNode&&(It.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(At=>{const Cn=document.querySelector(At.name);Cn&&Cn.setAttribute("title",At.title)})},$n=()=>{nt.current=new dt(ft.current),nt.current.targetRoot=Gt.current,nt.current.addEventListener("render",Ln),nt.current.addEventListener("beforeclose",le),xe&&(nt.current.availableMarkerTypes=nt.current.ALL_MARKER_TYPES,nt.current.uiStyleSettings.redoButtonVisible=!0,nt.current.uiStyleSettings.notesButtonVisible=!0,nt.current.uiStyleSettings.zoomButtonVisible=!0,nt.current.uiStyleSettings.zoomOutButtonVisible=!0,nt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=nt.current.uiStyleSettings,nt.current.show(),oe!=null&&oe.snapshotData&&nt.current.restoreState(oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),nr()},300)};return ae.createElement(ae.Fragment,null,(oe==null?void 0:oe.visible)&&ae.createElement(be.Z,{spinning:Lt,tip:hn,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:Gt,className:at()(je.imageDimensions,ee,z?je.fullWidth:""),style:re},ae.createElement("img",{className:je.img,ref:ft}))))}},24638:function(cn,an,ue){"use strict";var ae=ue(59301),je=ue(77019),Ie=ue(5269),at=ue(20554),be=ue(99571),he=ue(97231),De=ue(27431),Qe=ue(48136),we=ue(59301);const de=(0,ae.forwardRef)(({callback:Ne,showSaveButton:Ce,value:yt=""},Je)=>{const Ye=(0,ae.useRef)(),Re=[{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 "}]}]}],Pe=[{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}`}]}]}],vt=Fe=>{Ye.current.setValue(Ye.current.getValue()+" "+Fe.value+" ")},mt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(je.Z,{className:De.Z.lists,gutter:[10,10]},Re.map((Fe,ge)=>we.createElement(Ie.Z,{flex:"110px",className:De.Z.item},we.createElement("div",null,we.createElement(he.Z,{value:`$$${Fe.value}$$`}),Fe.name),we.createElement("div",{className:De.Z.children},Fe.children.map((He,Ue)=>we.createElement("div",{key:Ue},we.createElement("h1",null,He.name),we.createElement(je.Z,{gutter:[10,10]},He.data.map((Dt,me)=>we.createElement(Ie.Z,{key:me,onClick:()=>vt(Dt),className:De.Z.diamond},we.createElement(he.Z,{value:"`$$"+Dt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(je.Z,{className:De.Z.lists,gutter:[10,10]},Pe.map((Fe,ge)=>we.createElement(Ie.Z,{flex:"110px",className:De.Z.item},we.createElement("div",null,we.createElement(he.Z,{value:"`$$"+Fe.value+"$$`"}),Fe.name),we.createElement("div",{className:De.Z.children},Fe.children.map((He,Ue)=>we.createElement("div",{key:Ue},He.name&&we.createElement("h1",null,He.name),we.createElement(je.Z,{gutter:[10,10]},He.data.map((Dt,me)=>we.createElement(Ie.Z,{key:me,onClick:()=>vt(Dt),className:De.Z.diamond},we.createElement(he.Z,{value:"`$$"+Dt.value+"$$`"}))))))))))}],St=()=>{var Fe=document.createElement("div");Fe.innerHTML=Ye.current.getValue();var ge=Fe.innerText;return Ne&&Ne(ge),ge};return(0,ae.useImperativeHandle)(Je,()=>({getData:St})),we.createElement("div",{className:De.Z.mathWrap},we.createElement(at.default,{defaultActiveKey:"1",items:mt}),we.createElement("math-field",{locale:"zh_cn",className:De.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ye,style:{width:800,marginTop:30,fontSize:18}},yt||""),Ce&&we.createElement("div",{className:De.Z.button},we.createElement(be.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});an.Z=de},13922:function(cn,an,ue){"use strict";var ae=ue(59301),je=ue(93314),Ie=ue(99571),at=Object.defineProperty,be=Object.defineProperties,he=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,de=(Je,Ye,Re)=>Ye in Je?at(Je,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Je[Ye]=Re,Ne=(Je,Ye)=>{for(var Re in Ye||(Ye={}))Qe.call(Ye,Re)&&de(Je,Re,Ye[Re]);if(De)for(var Re of De(Ye))we.call(Ye,Re)&&de(Je,Re,Ye[Re]);return Je},Ce=(Je,Ye)=>be(Je,he(Ye));const yt=({img:Je,buttonProps:Ye={},styles:Re={},customText:Pe,ButtonText:vt,ButtonClick:mt,Buttonclass:St,ButtonTwo:Fe,imgStyles:ge,loading:He=!1,className:Ue=""})=>ae.createElement("section",{className:`tc animated fadeIn ${Ue}`,style:Ne({color:"#999",margin:"100px auto",visibility:He?"hidden":"visible"},Re)},ae.createElement("img",{src:Je||je,style:Ce(Ne({},ge),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},Pe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),vt&&ae.createElement(Ie.ZP,Ne({className:St,onClick:mt},Ye),vt),Fe&&Fe);an.Z=yt},9931:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return St}});var ae=ue(59301),je={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=ue(99571),at=ue(70557),be=ue(95440),he=ue(25399),De=ue(63949),Qe=ue(75823),we=ue(13922),de=ue(78323),Ne=ue(14084),Ce=ue(59301),yt=Object.defineProperty,Je=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(Fe,ge,He)=>ge in Fe?yt(Fe,ge,{enumerable:!0,configurable:!0,writable:!0,value:He}):Fe[ge]=He,vt=(Fe,ge)=>{for(var He in ge||(ge={}))Ye.call(ge,He)&&Pe(Fe,He,ge[He]);if(Je)for(var He of Je(ge))Re.call(ge,He)&&Pe(Fe,He,ge[He]);return Fe},mt=(Fe,ge,He)=>new Promise((Ue,Dt)=>{var me=Se=>{try{Ke(He.next(Se))}catch($e){Dt($e)}},Ee=Se=>{try{Ke(He.throw(Se))}catch($e){Dt($e)}},Ke=Se=>Se.done?Ue(Se.value):Promise.resolve(Se.value).then(me,Ee);Ke((He=He.apply(Fe,ge)).next())}),St=({editOffice:Fe="view",data:ge,issaver:He,onSaver:Ue,theme:Dt,type:me,filename:Ee,monacoEditor:Ke,className:Se,style:$e,close:Ze,onClose:lt,hasMask:nn,disabledDownload:Ot,onImgDimensions:Qt,showNodata:Ht,recordInfo:ye})=>{const[fe,wt]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[qt,Bt]=(0,ae.useState)(""),[We,gt]=(0,ae.useState)(),xt=window.ENV==="build"?"/react/build":"",bn=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Me=10*(1024*1024),ke=(0,ae.useRef)();ge!=null&&ge.startsWith("/api")&&me!=="txt"&&(ge=de.Z.API_SERVER+ge);const Ve=Oe=>Oe.substring(Oe.lastIndexOf("/")+1).split(".").pop();Ee&&Ke&&(Ke.filename=Ee),(0,ae.useEffect)(()=>{var Oe,dt;const ut=(dt=(Oe=document.cookie)==null?void 0:Oe.replace(/\s/g,""))==null?void 0:dt.split(";");ut==null||ut.map(ve=>{let ct=ve.split("=");ct[0]==="_educoder_session"&&Bt(ct[1])})},[]),(0,ae.useEffect)(()=>{me==="office"&&(ge.indexOf("bigfilescdn.")>-1||ge.indexOf("bigfiles1")>-1?gt({url:ge,fileType:Ve(ge),model:ge.indexOf("model=edit")?"edit":"view"}):Be())},[me,ge]);function st(Oe){return mt(this,null,function*(){Oe.data.type==="pdfdata"&&(Ue(Oe.data.data),window.removeEventListener("message",st,!1)),console.log("mess---:",Oe.data)})}const Be=()=>mt(void 0,null,function*(){console.log("data:",ge);let Oe=ge;ge.startsWith("http")||(Oe=location.origin+Oe);let dt=new URL(Oe).pathname.split("/").pop();const ut=yield(0,Qe.gJ)({attachment_id:dt});ut.url=bn+ut.url,gt(ut)}),tt=()=>{if(ge.startsWith("http")||ge.startsWith("blob:")){et();return}(0,De.Sv)(Ee||"educoder",ge,Ee)},et=()=>{ye&&(0,Ne.fc)({id:ye==null?void 0:ye.id,watch_type:1,course_id:ye==null?void 0:ye.course_id}),(0,De.Nd)(Ee||"educoder",decodeURIComponent(ge))};return Ce.createElement("div",{style:vt({},$e||{}),className:`${nn&&je.bgBlack} ${me?je.wrp:"hide"}`},Ze&&Ce.createElement("div",{className:je.close,ref:ke},!!Qt&&Ce.createElement(he.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},Ce.createElement("span",{onClick:()=>{lt(),Qt()}},Ce.createElement("i",{className:"icon-yulanpizhu"}))),!Ot&&Ce.createElement(he.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},Ce.createElement("span",{onClick:et},Ce.createElement("i",{className:"icon-quxiaozhiding"}))),He&&Ce.createElement(he.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},Ce.createElement("span",{className:"",onClick:()=>{const Oe=document.getElementById("pdfiframe");window.addEventListener("message",st,!1),setTimeout(()=>{Oe.contentWindow.postMessage("getData","*")},300)}},Ce.createElement("i",{className:"icon-baocun"}))),Ce.createElement(he.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},Ce.createElement("span",{className:"",onClick:()=>{lt()}},Ce.createElement("i",{className:"icon-guanbi1"})))),Ce.createElement("div",{className:`${je[Se]} ${Se} ${je.monaco} ${me==="txt"?"show":"hide"}`},me==="txt"&&Ce.createElement(Ce.Fragment,null,Ce.createElement(be.ZP,vt({},Ke)))),me==="audio"&&Ce.createElement("audio",{src:`${(ge==null?void 0:ge.indexOf("http://"))>-1||(ge==null?void 0:ge.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ge}`,autoPlay:!0}),me==="video"&&Ce.createElement(Ce.Fragment,null,(ge==null?void 0:ge.indexOf("http"))>-1?Ce.createElement("video",{controls:!0,src:`${ge}`,autoPlay:!0}):Ce.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ge}`,autoPlay:!0})),me==="office"&&We&&Ce.createElement("iframe",{src:`${xt}/office.html?key=${We.key}&url=${btoa(We.url)}&callbackUrl=${bn+(We.callbackUrl||"")}&fileType=${We.fileType}&title=${We.title||""}&model=${Fe}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!Ot}`}),me==="html"&&Ce.createElement("iframe",{src:ge+"&disposition=inline"}),me==="pdf"&&Ce.createElement("iframe",{id:"pdfiframe",src:`${xt}/js/pdfview/index.html?filename=${Ee||"educoder.pdf"}&url=${encodeURIComponent(ge)}&disabledDownload=${!!Ot}&model=${Fe}`}),me==="image"&&Ce.createElement("img",{src:`${(ge==null?void 0:ge.indexOf("http://"))>-1||(ge==null?void 0:ge.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ge}`}),(me==="other"||me==="download")&&Ce.createElement(Ce.Fragment,null,Ht?Ce.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ce.createElement(Ie.ZP,{icon:Ce.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:tt,disabled:Ot},"\u4E0B\u8F7D")}):Ce.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:tt,disabled:Ot},Ce.createElement(at.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),me==="flowChart"&&Ce.createElement("div",{className:"embed"},Ce.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ge||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},97231:function(cn,an,ue){"use strict";ue.d(an,{z:function(){return Ke},Z:function(){return Se}});var ae=ue(59301),je=ue(79562),Ie=ue(901),at=ue(64018),be=ue(80360),he=ue(78323),De=ue(63949),Qe=ue(15342),we=ue(44104),de=ue(99571),Ne=ue(1012),Ce=ue(9931),yt=ue(59301),Ye=({html:$e})=>{const Ze=(0,ae.useRef)(null),lt=(0,ae.useRef)(null),nn=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,ae.useEffect)(()=>{const Ot=Ze.current.attachShadow({mode:"open"});lt.current=document.createElement("div"),lt.current.className="markdown-body",lt.current.innerHTML=$e,Ot.appendChild(lt.current);const Qt=document.createElement("style");return Qt.textContent=nn,Ot.appendChild(Qt),()=>{Ot.innerHTML=""}},[]),(0,ae.useEffect)(()=>{lt.current&&(lt.current.innerHTML=$e)},[$e]),yt.createElement("div",{ref:Ze})};function Re($e){const Ze=["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"],lt=new RegExp(`\\b(${Ze.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return $e.replace(lt,"").trim()}var Pe={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},vt=Object.defineProperty,mt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,ge=($e,Ze,lt)=>Ze in $e?vt($e,Ze,{enumerable:!0,configurable:!0,writable:!0,value:lt}):$e[Ze]=lt,He=($e,Ze)=>{for(var lt in Ze||(Ze={}))St.call(Ze,lt)&&ge($e,lt,Ze[lt]);if(mt)for(var lt of mt(Ze))Fe.call(Ze,lt)&&ge($e,lt,Ze[lt]);return $e};const Ue="@\u2581\u2581@",Dt="@\u2581@",me=/<pre[^>]*>/g;function Ee($e){let Ze=document.createElement("div");return Ze.innerHTML=$e,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const Ke=($e,Ze)=>{$e=$e||"";const lt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,nn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ot=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Qt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?$e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(lt,(Ht,ye,fe,wt,qt,Bt,We)=>{const gt=ye||wt||Bt,xt=fe||qt||We||"?";return he.Z.API_SERVER+"/api/attachments/"+gt+xt+"&t="+(0,De.Jn)(gt,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):($e=$e.replace(Qt,(Ht,ye,fe,wt,qt,Bt,We)=>{const gt=ye||wt||Bt,xt=fe||qt||We||"?";return he.Z.API_SERVER+"/attachments/download/"+gt+xt+"&t="+(0,De.Jn)(gt,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(lt,(Ht,ye,fe,wt,qt,Bt,We)=>{const gt=ye||wt||Bt,xt=fe||qt||We||"?";return he.Z.API_SERVER+"/api/attachments/"+gt+xt+"&t="+(0,De.Jn)(gt,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(nn,(Ht,ye,fe,wt,qt)=>{const Bt=ye||wt,We=fe||qt||"";return'"'+he.Z.API_SERVER+"/api/attachments/"+Bt+We+Bt+We+"&t="+(0,De.Jn)(Bt,Date.now())}).replace(Ot,(Ht,ye,fe,wt,qt)=>{const Bt=ye||wt,We=fe||qt||"";return"("+he.Z.API_SERVER+"/files/uploads/"+Bt+We+Bt+We+"&t="+(0,De.Jn)(Bt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),$e)};var Se=({value:$e="",edit:Ze=!1,className:lt,showTextOnly:nn,showLines:Ot,style:Qt={},stylesPrev:Ht={},highlightKeywords:ye,showProgramFill:fe,isProgramFill:wt,disabledFill:qt=!1,programFillValue:Bt,openEditor:We=()=>{},onFillChange:gt=Xe=>{},onFillBlur:xt=()=>{},onFillFocus:bn=()=>{}})=>{let Xe=Re(String($e||""));const Me=(0,ae.useRef)(),ke=(0,ae.useRef)(),[Ve,st]=(0,ae.useState)(""),[Be,tt]=(0,ae.useState)("office"),[et,Oe]=(0,ae.useState)([]),dt=(0,ae.useRef)("a"+(0,Ne.Z)()),ut={},ve=Le=>/<style[\s\S]*?>/i.test(Le||""),ct=(Le,Gt,Lt)=>{const _t=document.createElement(Le===Dt?"input":"textarea");_t.style.width="100%",_t.style.height=Le===Dt?"40px":"151px",_t.rows=5,_t.spellcheck=!1,_t.name="edu-program-fill",_t.placeholder="\u8BF7\u8F93\u5165",_t.dataset.id=Gt;const hn=Object.keys(ut).length;return ut[hn]=_t,`<span class="edu-program-fill-wrap ${Le===Dt?"":"show"}" style="width:${Le===Dt?"600px":"100%"}" title=${Lt||""}><span>${_t.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Yt(Le){return Le=Le.replace(/!\[.*?\]\(.*?\)/g,""),Le=Le.replace(/\[.*?\]\(.*?\)/g,""),Le=Le.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Le=Le.replace(/<embed.*?>/g,""),Le=Le.replace(/<img.*?>/g,""),Le=Le.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Le=Le.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Le=Le.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Le=Le.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Le}const Vt=Le=>!nn&&ve(Xe)?Le:Le.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Gt,Lt){let _t=Lt.replace(/(\n|\r)/g,"").split("}"),hn=[];return _t.map(Nn=>{Nn!=""&&hn.push(`.${dt.current} ${Nn}`)}),`<style>${hn.join("}")}</style>`}),oe=(0,ae.useMemo)(()=>{try{const _t=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,hn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Wt=/\(\/attachments\/download\//g;Xe=Xe.replace(Wt,"("+he.Z.API_SERVER+"/attachments/download/").replace(_t,"("+he.Z.API_SERVER+"/api/attachments/").replace(hn,'"'+he.Z.API_SERVER+"/api/attachments/").replace(Nn,'"'+he.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,`
|
|
`),Me.current.style.display="none"}catch(_t){}if(fe){let _t=-1;return Xe=Xe.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(hn,Nn,Wt){var Ln;return++_t,ct(hn,_t,(Ln=Bt==null?void 0:Bt[_t])==null?void 0:Ln.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Vt(Xe||"")}</pre>`}let Le=Vt(Xe);Le=(0,Ie.ZP)(Le);const Gt=(0,Ie.ez)();Xe.match(/\[TOC\]/)&&(Le=Le.replace("<p>[TOC]</p>",(0,Ie.Qv)()),(0,Ie.Iy)()),Le=Le.replace(/(__special_katext_id_\d+__)/g,(_t,hn)=>{const{type:Nn,expression:Wt}=Gt[hn];return(0,Qe.renderToString)(Ee(Wt)||"",{displayMode:Nn==="block",throwOnError:!1,output:"html"})}),Le=Le.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const Lt=document.createElement("div");if(Lt.innerHTML=Le,nn)return Lt.innerText;if(ye){const _t=ye.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return le(Lt,_t),Lt.innerHTML}return setTimeout(()=>ot(),500),Lt.innerHTML},[Xe,ye]);(0,ae.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Gt=>{Gt.oninput=ee,Gt.onblur=z,Gt.onfocus=re})},[et]),(0,ae.useEffect)(()=>{var Le,Gt,Lt,_t,hn;if(Bt!=null&&Bt.length)try{const Nn=ne.current.querySelectorAll(".edu-program-fill-score"),Wt=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ln,nr]of Wt.entries())nr.value=((Le=Bt==null?void 0:Bt[Ln])==null?void 0:Le.value)||"",((Gt=Bt==null?void 0:Bt[Ln])==null?void 0:Gt.type)==="warning"?nr.className="program-fill-warning":((Lt=Bt==null?void 0:Bt[Ln])==null?void 0:Lt.type)==="success"?nr.className="program-fill-success":nr.className="";for(const[Ln,nr]of Nn.entries())nr.innerHTML=(_t=Bt==null?void 0:Bt[Ln])!=null&&_t.score?`${(hn=Bt==null?void 0:Bt[Ln])==null?void 0:hn.score}\u5206`:"";Oe(Bt)}catch(Nn){console.log(Nn,"error")}},[Bt]);const ee=Le=>{et[Le.target.dataset.id]=et[Le.target.dataset.id]||{},et[Le.target.dataset.id].value=Le.target.value,Oe([...et]),gt(et,Le.target.dataset.id)},z=Le=>{et[Le.target.dataset.id]=et[Le.target.dataset.id]||{},et[Le.target.dataset.id].value=Le.target.value,Oe([...et]),xt(et,Le.target.dataset.id)},re=Le=>{et[Le.target.dataset.id]=et[Le.target.dataset.id]||{},et[Le.target.dataset.id].value=Le.target.value,Oe([...et]),bn(et,Le.target.dataset.id)};function le(Le,Gt){return Le.childNodes.forEach(Lt=>{var _t;if(Lt.childNodes.length>0)le(Lt,Gt);else if(Lt.nodeName!=="IMG")if(Lt.innerHTML)Lt.innerHTML=(_t=Lt.innerHTML)==null?void 0:_t.replace(new RegExp(Gt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const hn=document.createElement("span");hn.innerHTML=Lt.textContent.replace(new RegExp(Gt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Lt.replaceWith(hn)}})}const ne=(0,ae.useRef)();Ie.jb.WebkitLineClamp=Ot,Ot&&(Qt=He(He({},Qt),Ie.jb));function xe(Le){let Gt=Le.target;if(Gt.tagName.toUpperCase()==="A"){let Lt=Gt.getAttribute("href");if(Lt.indexOf("office")>-1)Le.preventDefault(),st(Lt),tt("office");else if(Lt.indexOf("application/pdf")>-1)Le.preventDefault(),st(Lt),tt("pdf");else if(Lt.indexOf("text/html")>-1)Le.preventDefault(),st(Lt),tt("html");else if(Lt.startsWith("#")){Le.preventDefault();let _t=document.getElementById(Lt.replace("#",""));_t&&_t.scrollIntoView(!0)}}}const ot=()=>{var Le;const Gt=(Le=ne.current)==null?void 0:Le.querySelectorAll("video");Gt==null||Gt.forEach(Lt=>{if(Lt.oncontextmenu=()=>!1,Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var _t=new be.ZP;_t.loadSource(Lt.src),_t.attachMedia(Lt)}}})};(0,ae.useEffect)(()=>{if(ne.current&&oe&&oe.match(me)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",xe),()=>{var Le;(Le=ne.current)==null||Le.removeEventListener("click",xe),(0,Ie.AL)(),(0,Ie.Iy)()}},[oe,ne.current,xe]);const ft=Le=>{Le.target.nodeName==="IMG"&&Le.target.className.indexOf("draw-flowchart")>-1?(Me.current.style.zIndex=1,Me.current.style.display="flex",Me.current.style.width=Le.target.clientWidth+"px",Me.current.style.height=Le.target.clientHeight+"px",Me.current.style.top=Le.target.offsetTop+"px",Me.current.style.left=Le.target.offsetLeft+"px",Le.target.id&&(ke.current=Le.target.id)):Me.current.style.display="none"},nt=()=>{Me.current.style.display="none"};return(0,ae.useEffect)(()=>{var Le;const Gt=Lt=>{Lt.preventDefault(),Lt.clipboardData.setData("text",window.getSelection().toString())};return(Le=ne.current)==null||Le.addEventListener("copy",Gt),()=>{var Lt;(Lt=ne.current)==null||Lt.removeEventListener("copy",Gt)}},[ne.current]),ae.createElement("div",{style:{position:"relative"},onMouseLeave:nt},nn&&ae.createElement("div",{ref:ne,className:`${Pe.mdBody} `},oe),!nn&&!ve(oe)&&ae.createElement("div",{ref:ne,style:He({},Qt),onMouseOver:ft,className:`${lt||""} ${qt?"disabled-fill":""} markdown-body ${Pe.mdBody} ${dt.current}`,dangerouslySetInnerHTML:{__html:oe}}),!nn&&ve(oe)&&ae.createElement(Ye,{html:oe}),ae.createElement("div",{ref:Me,className:`${Pe.button} ${Ze?"":Pe.previewFlowChart}`},ae.createElement(we.Z,null,ae.createElement(de.ZP,{onClick:()=>{Ze?We(ke.current):(st(ke.current),tt("flowChart"))}},Ze?"\u7F16\u8F91":"\u9884\u89C8"))),ae.createElement(Ce.Z,{close:!0,data:Ve,type:Ve!=null&&Ve.length?Be:"",style:He({},Ht),onClose:()=>st("")}))}},99678:function(cn,an,ue){"use strict";ue.d(an,{h:function(){return Fe},Z:function(){return St}});var ae=ue(59301),je=ue(82326),Ie=ue(28284),at=ue(99571),be=ue(89780),he=ue.n(be),De=ue(4887),Qe=Object.defineProperty,we=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Je=(ge,He,Ue)=>He in ge?Qe(ge,He,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):ge[He]=Ue,Ye=(ge,He)=>{for(var Ue in He||(He={}))Ce.call(He,Ue)&&Je(ge,Ue,He[Ue]);if(Ne)for(var Ue of Ne(He))yt.call(He,Ue)&&Je(ge,Ue,He[Ue]);return ge},Re=(ge,He)=>we(ge,de(He));const Pe=je.default.Option,vt={labelCol:{span:4},wrapperCol:{span:20}},mt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var St=({callback:ge,onCancel:He})=>{const[Ue,Dt]=(0,ae.useState)("python");function me(Ke){Dt(mt[Ke][1])}function Ee(Ke){ge(Ke)}return ae.createElement(Ie.default,Re(Ye({},vt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ee,style:{width:500}}),ae.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement(je.default,{getPopupContainer:Ke=>Ke.parentNode,onChange:me},Object.keys(mt).map(Ke=>ae.createElement(Pe,{key:Ke,value:Ke},mt[Ke][0])))),ae.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(Fe,{mode:Ue})),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(at.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(at.ZP,{type:"ghost",onClick:He},"\u53D6\u6D88")))};function Fe({value:ge,onChange:He,mode:Ue,options:Dt={}}){const me=(0,ae.useRef)(),[Ee,Ke]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if(Ee){let Se=function($e){const Ze=$e.getValue();He&&He(Ze)};return Ee.on("change",Se),()=>{Ee.off("change",Se)}}},[Ee,He]),(0,ae.useEffect)(()=>{Ee&&Ee.setOption("mode",Ue)},[Ee,Ue]),(0,ae.useEffect)(()=>{Ee&&(ge!==Ee.getValue()||ge==="")&&setTimeout(()=>{Ee.setValue(ge||"")},300)},[Ee,ge]),(0,ae.useEffect)(()=>{if(me.current&&!Ee){const Se=he().fromTextArea(me.current,Ye({mode:Ue,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Dt));Ke(Se)}},[me.current,Ee]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:me}))}},17949:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Sr}});var ae=ue(59301),je=ue(95392),Ie=ue(89780),at=ue.n(Ie),be=ue(76374),he=ue(4887),De=ue(6313),Qe=ue(25717),we=ue(99498),de=ue(25419),Ne=ue(67549),Ce=ue(97231),yt=({value:rn="",className:Mn,showTextOnly:Rn,showLines:Hn,style:Er={}})=>{const mr=(0,ae.useMemo)(()=>"",[rn]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:mr}}))},Je=Object.defineProperty,Ye=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,St=(rn,Mn,Rn)=>Mn in rn?Je(rn,Mn,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):rn[Mn]=Rn,Fe=(rn,Mn)=>{for(var Rn in Mn||(Mn={}))vt.call(Mn,Rn)&&St(rn,Rn,Mn[Rn]);if(Pe)for(var Rn of Pe(Mn))mt.call(Mn,Rn)&&St(rn,Rn,Mn[Rn]);return rn},ge=(rn,Mn)=>Ye(rn,Re(Mn));let He=[{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 Ue({onActionCallback:rn,title:Mn,icon:Rn,actionName:Hn,className:Er="",children:mr}){function Or(){rn(Hn)}return ae.createElement("a",{title:Mn,className:Er,onClick:Or},ae.createElement("i",{className:`${Rn}`}),mr)}var Dt=({watch:rn,showNullButton:Mn,showNullProgramButton:Rn,onActionCallback:Hn,fullScreen:Er,insertTemp:mr,hidetoolBar:Or,extraUse:yr})=>{const ur=[...He,{title:`${rn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${rn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!Or&&ur.map((Mr,vn)=>ae.createElement("li",{key:vn},Mr.actionName?ae.createElement(Ue,ge(Fe({},Mr),{onActionCallback:Hn})):ae.createElement("span",{className:"v-line"}))),Mn?ae.createElement("li",null,ae.createElement(Ue,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Hn},ae.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Rn?ae.createElement(ae.Fragment,null,ae.createElement("li",null,ae.createElement(Ue,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Hn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(Ue,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Hn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,mr&&ae.createElement("li",null,ae.createElement(Ue,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mr}`,onActionCallback:Hn},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),yr&&ae.createElement("li",null,yr),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(Ue,{icon:`${Er?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Er?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Hn})))},me=ue(81123),Ee=ue(28284),Ke=ue(37568),Se=ue(99571),$e=Object.defineProperty,Ze=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Ht=(rn,Mn,Rn)=>Mn in rn?$e(rn,Mn,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):rn[Mn]=Rn,ye=(rn,Mn)=>{for(var Rn in Mn||(Mn={}))Ot.call(Mn,Rn)&&Ht(rn,Rn,Mn[Rn]);if(nn)for(var Rn of nn(Mn))Qt.call(Mn,Rn)&&Ht(rn,Rn,Mn[Rn]);return rn},fe=(rn,Mn)=>Ze(rn,lt(Mn));const wt={labelCol:{span:4},wrapperCol:{span:20}};var qt=({callback:rn,onCancel:Mn})=>{function Rn(Hn){rn(Hn)}return ae.createElement(Ee.default,fe(ye({},wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Rn,style:{width:500}}),ae.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(Ke.default,null)),ae.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(Ke.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Se.ZP,{type:"ghost",onClick:Mn},"\u53D6\u6D88")))},Bt=ue(99678),We=ue(90443),gt=ue(62957),xt=ue(77019),bn=ue(54344),Xe=ue(59301),Me=({callback:rn,onCancel:Mn})=>{const Rn=document.createElement("canvas"),Hn=Rn.getContext("2d");Rn.width=1e3,Rn.height=800,Hn.fillStyle="#ffffff",Hn.fillRect(0,0,Rn.width,Rn.height);const Er=Rn.toDataURL("image/png");return Xe.createElement(gt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Xe.createElement(xt.Z,{style:{height:"100vh"}},Xe.createElement(bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Er,visible:!0,title:String(Date.now())},onOk:mr=>{rn({src:mr.url})},onClose:Mn})))},ke=ue(30641),Ve=ue(5269),st=ue(6767),Be={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},tt=ue(59301),Oe=(0,ae.forwardRef)(({onCancel:rn,editImgId:Mn,callback:Rn},Hn)=>{let Er=(0,ae.useRef)(),mr=(0,ae.useRef)(),Or=(0,ae.useRef)(),yr=(0,ae.useRef)(!1);const ur=(0,ae.useRef)(!1);console.log("ref:",Hn);const[Mr,vn]=(0,ae.useState)(0),[kt,un]=(0,ae.useState)("100vh");return(0,ae.useEffect)(()=>{vn(1)},[]),(0,ae.useImperativeHandle)(Hn,()=>({setHeight:un})),tt.createElement("div",{ref:ur,className:"body-overflow-initial"},tt.createElement(ke.Z,{width:"100vw",height:kt,footer:null,closable:!0,placement:"bottom",open:!!Mr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Be.drawerWrap}`,onClose:()=>{window.saveDrawData(qn=>{Rn({src:`/api/attachments/${qn}`,id:qn})})},title:tt.createElement(xt.Z,{align:"middle"},tt.createElement(Ve.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),tt.createElement(Ve.Z,{onClick:()=>{un(kt==="60px"?"100vh":"60px")}},tt.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),tt.createElement(Ve.Z,{onClick:()=>{window.saveDrawData(qn=>{if(qn===null){st.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}st.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Rn({src:`/api/attachments/${qn}`,id:qn,disabledClose:!0})})}},tt.createElement(Se.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},tt.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Mn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:mr})))}),dt=ue(78323),ut=ue(47889),ve=ue(1439);const ct=ut.ZP.Group,Yt={margin:"0 8px"};var Vt=({callback:rn,onCancel:Mn})=>{function Rn(Hn){rn(Hn)}return ae.createElement(Ee.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Rn},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Yt},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Yt},"\u884C\u6570"),ae.createElement(Ee.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(ve.Z,null)),ae.createElement("span",{style:Yt},"\u5217\u6570"),ae.createElement(Ee.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(ve.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Yt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(Ee.default.Item,{name:"align"},ae.createElement(ct,null,ae.createElement(ut.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(ut.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(ut.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(ut.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Se.ZP,{type:"ghost",onClick:Mn},"\u53D6\u6D88")))},oe=ue(71411),ee=ue(63089),z=ue.n(ee),le=(0,ae.forwardRef)(({use3d:rn,width:Mn,height:Rn,callback:Hn,showSaveButton:Er},mr)=>{const Or=(0,ae.useRef)(),yr=(0,ae.useRef)(),[ur,Mr]=(0,ae.useState)(!1),vn=(0,ae.useRef)({id:Or,appName:"graphing",width:Mn||1e3,height:Rn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ae.useEffect)(()=>{yr.current=new(z())(vn.current,!0),window.onload=function(){yr.current.inject("applet_container")}},[]);const kt=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return Hn&&Hn(un),un};return(0,ae.useEffect)(()=>{vn.current.appName=ur?"3D":"graphing",yr.current.inject("applet_container")},[ur]),(0,ae.useEffect)(()=>{Mr(rn)},[rn]),(0,ae.useImperativeHandle)(mr,()=>({getImgData:kt})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Or}),ae.createElement(xt.Z,{align:"middle"},ae.createElement(Ve.Z,{flex:1},ae.createElement(oe.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:ur,onChange:un=>Mr(un)})),ae.createElement(Ve.Z,null,ae.createElement(Se.ZP,{size:"large",onClick:kt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=ue(24638);const xe="link",ot="upload-image",ft="add-flowchart",nt="draw-image",Le="add-flowchart",Gt="code-block",Lt="add-table",_t="------------",hn={default:_t,left:`:${_t}`,center:`:${_t}:`,right:`${_t}:`};var Nn=ue(66991),Wt=ue(63949);function Ln(){}let nr=0;const $n=1e4,It="\u2581",Mt="@\u2581\u2581@",At="@\u2581@",Cn=`
|
|
**\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`,Sn=["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 Wn(rn){return/^\d+$/.test(rn)?`${rn}px`:rn}const gn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Jt={[gn+"-B"]:"bold",[gn+"-I"]:"italic"},Bn={[xe]:"\u6DFB\u52A0\u94FE\u63A5",[Gt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ot]:"\u6DFB\u52A0\u56FE\u7247",[nt]:"\u6DFB\u52A0\u753B\u56FE",[ft]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Lt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Sr=({defaultValue:rn="",onChange:Mn,width:Rn="100%",height:Hn=400,miniToolbar:Er=!1,isFocus:mr=!1,watch:Or,insertTemp:yr,mode:ur="markdown",id:Mr="markdown-editor-id",showResizeBar:vn=!1,noStorage:kt=!1,showNullButton:un=!1,showNullProgramButton:qn=!1,hidetoolBar:kr=!1,fullScreen:_e=!1,onBlur:Ge,onCMBeforeChange:ln,onFullScreen:Kt,className:qe="",disablePaste:Xt=!1,disabled:dn=!1,disabledFill:pn=!1,placeholder:En="",values:mn="",extraUse:kn,onAddBlank:$t})=>{const[Ft,Tn]=(0,ae.useState)(null),[Fn,Vn]=(0,ae.useState)(rn),[Un,xr]=(0,ae.useState)(Or),[Nr,Kn]=(0,ae.useState)(_e),[wn,Gn]=(0,ae.useState)(""),[An,Tr]=(0,ae.useState)(0),[jr,Fr]=(0,ae.useState)(Hn),[Ur,Jr]=(0,ae.useState)(!1),[Vr,Ir]=(0,ae.useState)(0),[ei,Yr]=(0,ae.useState)(0),On=(0,ae.useRef)(),or=(0,ae.useRef)(),Dr=(0,ae.useRef)(),Zr=(0,ae.useRef)(),Br=(0,ae.useRef)(),Wr=(0,ae.useRef)(),oi=(0,je.useDispatch)();(0,ae.useEffect)(()=>{const jt=window.scrollY||window.pageYOffset;Vn(mn),Ft==null||Ft.setValue(mn),window.scrollTo(0,jt)},[mn]),(0,ae.useEffect)(()=>{Kt==null||Kt(Nr)},[Nr]),(0,ae.useEffect)(()=>{if(On.current){let jt=function(on,sn){var Dn;if(Xt){sn.preventDefault();return}const jn=sn.clipboardData;if(jn){const In=jn.types.toString(),lr=jn.items;if(In==="Files"||jn.types.indexOf("Files")>-1){if(sn.preventDefault(),ur=="stex")return;try{let er=lr[1];((Dn=lr[0])==null?void 0:Dn.kind)==="file"&&(er=lr[0]);const ar=er.getAsFile(),dr=ar.name.split(".").pop();(0,We.I)(ar,sr=>{var Pr,hr,br;sr.id?((Pr=ar==null?void 0:ar.type)==null?void 0:Pr.indexOf("image"))>-1?Rt.replaceSelection(`<img width="100%" src="/api/attachments/${sr.id}?type=${sr.content_type})" alt="" />`):((hr=ar==null?void 0:ar.type)==null?void 0:hr.indexOf("video"))>-1?Rt.replaceSelection(`<video width="100%" controls src="/api/attachments/${sr.id}"></video>`):((br=ar==null?void 0:ar.type)==null?void 0:br.indexOf("pdf"))>-1?Rt.replaceSelection(`<a href="/api/attachments/${sr.id}?type=${ar.type}&disposition=inline" target="_blank">${ar.name}</a>`):Sn.includes(dr)?Rt.replaceSelection(`<a href="/api/attachments/${sr.id}?type=office&disposition=inline" target="_blank">${ar.name}</a>`):Rt.replaceSelection(`[${ar.name}](/api/attachments/${sr.id}?type=${sr.content_type})`):(sr==null?void 0:sr.status)===401&&(document.location.href="/user/login")})}catch(er){st.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Rt=at().fromTextArea(On.current,{mode:ur,lineNumbers:!Er,lineWrapping:!0,value:rn,autoCloseTags:!0,autoCloseBrackets:!0});return Rt.on("keyup",function(on,sn){sn.keyCode===8&&(on.getValue()==""?Rt.setOption("placeholder",En):Rt.setOption("placeholder",null))}),Rt.on("keydown",function(on,sn){if(sn.keyCode===8){var Dn=bt(on);Dn&&sn.preventDefault()}}),mr&&Rt.focus(),Rt.on("paste",jt),dn&&Rt.on("beforeChange",function(on,sn){(sn.origin==="paste"||sn.origin==="+input")&&sn.cancel()}),Tn(Rt),()=>{Rt.off("paste",jt)}}},[]);const Te=(0,ae.useCallback)(()=>{if(or.current)try{}catch(jt){console.log(jt,"---- to set md editor body height")}},[jr,or,Nr]);(0,ae.useEffect)(()=>{function jt(){let Rt=new be.Z(on=>{for(let sn of on)(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&(Te(),Ft.setSize("100%","100%"),Ft.refresh())});return Rt.observe(On.current.parentElement),Rt}if(Ft){const Rt=jt();return()=>{var on,sn;(on=On.current)!=null&&on.parentElement&&Rt.unobserve((sn=On.current)==null?void 0:sn.parentElement)}}},[Ft,Te]),(0,ae.useEffect)(()=>{if(Ft){let jt=[];for(const[Rt,on]of Object.entries(Jt)){let sn={[Rt]:()=>{it(on)}};jt.push(sn),Ft.addKeyMap(sn)}return()=>{for(let Rt of jt)Ft.removeKeyMap(Rt)}}},[Ft]),(0,ae.useEffect)(()=>{_e!==Nr&&Kn(_e)},[_e]),(0,Nn.Z)(()=>{if(!kt&&An>0){let jt=new Date().getTime(),Rt=window.sessionStorage.getItem(Mr);jt>=An+$n&&(!Rt||Rt!==Fn)&&(window.sessionStorage.setItem(Mr,Fn),Jr(!0))}},$n),(0,ae.useEffect)(()=>{xr(Or)},[Ft,Or]),(0,ae.useEffect)(()=>{Ft&&mr&&Ft.focus()},[Ft,mr]),(0,ae.useEffect)(()=>{if(Un&&Ft){let jt=function(on){let sn=on.target;if(Zr.current){let Dn=sn.scrollTop/sn.scrollHeight;Zr.current.scrollTop=Zr.current.scrollHeight*Dn}};const Rt=Ft.getScrollerElement();return Rt.addEventListener("scroll",jt),()=>{Rt.removeEventListener("scroll",jt)}}},[Ft,Un]),(0,ae.useEffect)(()=>{if(Ft&&ln){let jt=function(Rt,on){ln(Rt,on)};return Ft.on("beforeChange",jt),()=>{Ft.off("beforeChange",jt)}}},[Ft,ln]),(0,ae.useEffect)(()=>{if(Ft&&Ge){let jt=function(){Ge(Ft.getValue())};return Ft.on("blur",jt),()=>{Ft.off("blur",jt)}}},[Ft,Ge]);function bt(jt,Rt){var on=jt.getDoc(),sn=on.getCursor(),Dn=on.getLine(sn.line),jn=Dn.charAt(sn.ch-1),In=Dn.lastIndexOf("@\u2581@",sn.ch),lr=Dn.lastIndexOf("@\u2581\u2581@",sn.ch),er=In>lr?In:lr,ar=In>lr?3:4;if(Mt.indexOf(jn)===-1)return null;if(console.log("change1:",Rt,jt,Dn,sn,er,In,lr,jn),er>=0&&sn.ch-er<5){var dr=er+ar;return on.replaceRange("",{line:sn.line,ch:er},{line:sn.line,ch:dr}),{line:sn.line,ch:dr}}return null}(0,ae.useEffect)(()=>{if(Ft){let jt=function(Rt,on){const sn=Rt.getValue();Vn(sn),Tr(new Date().getTime()),Rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Mn&&(qn?Mn(sn,Et(sn)):Mn(sn))};return Ft.on("change",jt),()=>{Ft.off("change",jt)}}},[Ft,Mn]),(0,ae.useEffect)(()=>{if(Ft)if(rn==null)Ft.setValue(""),Vn("");else{const jt=window.scrollY||window.pageYOffset;rn!==Ft.getValue()&&(Ft.setValue(rn),Vn(rn),Ft.setCursor(dn?1:Ft.lineCount(),0),window.scrollTo(0,jt))}},[Ft,rn]);const it=(0,ae.useCallback)(jt=>{const Rt=Ft.getCursor(),on=Ft.getSelection();let sn=on.split(`
|
|
`);switch(jt){case"bold":return Ft.replaceSelection("**"+on+"**"),on===""&&Ft.setCursor(Rt.line,Rt.ch+2),Ft.focus();case"italic":return Ft.replaceSelection("*"+on+"*"),on===""&&Ft.setCursor(Rt.line,Rt.ch+1),Ft.focus();case"code":return Ft.replaceSelection("`"+on+"`"),on===""&&Ft.setCursor(Rt.line,Rt.ch+1),Ft.focus();case"inline-latex":return(0,Wt.Ye)(oi)?void 0:(Gn("inline-latex"),Ft.focus());case"latex":return Ft.replaceSelection("```latex\n"+on+"\n```"),Ft.setCursor(Rt.line+1,on.length+1),Ft.focus();case"line-break":return Ft.replaceSelection(`<br/>
|
|
`),Ft.focus();case"list-ul":return on===""?Ft.replaceSelection("- "+on):Ft.replaceSelection(sn.map(Dn=>Dn===""?"":`- ${Dn}`).join(`
|
|
`)),Ft.focus();case"list-ol":return on===""?Ft.replaceSelection("1. "+on):Ft.replaceSelection(sn.map((Dn,jn)=>Dn===""?"":`${jn+1}. ${Dn}`).join(`
|
|
`)),Ft.focus();case"add-null-ch":$t==null||$t();return;case"add-signal":return on===""&&Ft.setCursor(Rt.line,Rt.ch),Ft.replaceSelection(At),Ft.focus();case"add-multiple":return on===""&&Ft.setCursor(Rt.line,Rt.ch),Ft.replaceSelection(Mt),Ft.focus();case"inster-template-1":return on===""&&Ft.setCursor(Rt.line,Rt.ch),Ft.replaceSelection(Cn),Ft.focus();case"eraser":return Ft.setValue(""),Ft.focus();case"trigger-watch":return xr(!Un),Ft.focus();case"trigger-full-screen":return Kn(!Nr),Ft.focus();case xe:Gn(xe);return;case Gt:Gn(Gt);return;case ot:Gn(ot);return;case nt:Gn(nt);return;case"maths-latex":if((0,Wt.Ye)(oi))return;Gn("maths-latex");return;case ft:Br.current="",sessionStorage.removeItem("file_id"),Gn(ft);return;case Lt:Gn(Lt);return;default:throw new Error}},[Ft,Un,Nr]),ht=(0,ae.useCallback)((jt,Rt)=>{var on,sn,Dn,jn,In,lr;jt!=null&&jt.disabledClose||Gn("");const{src:er,alt:ar,id:dr}=jt||{};switch(wn){case xe:const{title:ir,link:zn}=jt;return Ft.replaceSelection(`[${ir}](${zn})`),Ft.focus();case Gt:const{language:Qn,content:cr}=jt;return Ft.replaceSelection(["```"+Qn,cr,"```"].join(`
|
|
`)),Ft.focus();case"maths-latex":for(var sr=atob(jt),Pr=new Uint8Array(sr.length),hr=0;hr<sr.length;hr++)Pr[hr]=sr.charCodeAt(hr);var br=new Blob([Pr],{type:"image/png"});(0,We.I)(br,yi=>{yi.id?Ft.replaceSelection(``):(yi==null?void 0:yi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Wt.Ye)(oi))return;Ft.replaceSelection("`$$"+jt+"$$`");break;case Le:if(!dr)return;Ft.getValue().indexOf(er)===-1?Ft.replaceSelection(`<center><img id="${dr}" width="80%" src="${er}" class="draw-flowchart" alt="${ar||""}" /></center>`):document.getElementById(dr).src=dt.Z.API_SERVER+er+"?t="+Date.now();break;case ot:case nt:const Xn=Rt,Cr=(Dn=(sn=(on=Xn==null?void 0:Xn.name)==null?void 0:on.split("."))==null?void 0:sn.pop)==null?void 0:Dn.call(sn);return((jn=Xn==null?void 0:Xn.type)==null?void 0:jn.indexOf("image"))>-1||!(Xn!=null&&Xn.type)?Xn!=null&&Xn.align||Xn!=null&&Xn.width?Ft.replaceSelection(`<p style="text-align:${Xn.align||"initial"}"><img width="${Xn.width?Xn.width+"%":"initial"}" src="${er}" alt="${ar||""}" /></p>`):Ft.replaceSelection(`<img width="100%" src="${er}" alt="${ar||""}" />`):((In=Xn==null?void 0:Xn.type)==null?void 0:In.indexOf("video"))>-1?Ft.replaceSelection(`<video width="100%" controls src="${er}"></video>`):((lr=Xn==null?void 0:Xn.type)==null?void 0:lr.indexOf("pdf"))>-1?Ft.replaceSelection(`<a href="${er}?type=${Xn.type}&disposition=inline" target="_blank">${Xn.name}</a>`):Sn.includes(Cr)?Ft.replaceSelection(`<a href="${er}?type=office&disposition=inline" target="_blank">${Xn.name}</a>`):Ft.replaceSelection(`[${Xn.name}](${er})`),Ft.focus();case Lt:const{row:Lr,col:Qr,align:Li}=jt;let wi=`
|
|
`;for(let yi=0;yi<Lr;yi++){let Ni=[],$r=[];for(let Xr=0;Xr<Qr;Xr++)yi===1&&$r.push(hn[Li]),Ni.push(" ");yi===1&&(wi+=`| ${$r.join(" | ")} |
|
|
`),wi+=`| ${Ni.join(Qr===1?"":" | ")} |
|
|
`}return Ft.replaceSelection(wi+`
|
|
`),Ft.focus();default:throw new Error}},[Ft,wn]),Pt=(0,ae.useMemo)(()=>{switch(wn){case xe:return ae.createElement(qt,{callback:ht,onCancel:Zt});case Gt:return ae.createElement(Bt.Z,{callback:ht,onCancel:Zt});case ot:return ae.createElement(We.Z,{callback:ht,onCancel:Zt});case ft:return ae.createElement(Oe,{editImgId:Br.current,callback:ht,onCancel:Zt});case Lt:return ae.createElement(Vt,{callback:ht,onCancel:Zt});case"maths-latex":return ae.createElement(le,{showSaveButton:!0,callback:ht});case"inline-latex":return ae.createElement(ne.Z,{showSaveButton:!0,callback:ht});default:return null}},[wn]);function Zt(){Gn("")}(0,ae.useEffect)(()=>{if(Dr.current){let jt=function(In){Dn=!0,jn=In.pageY},Rt=function(){Dn=!1},on=function(In){if(Dn){let lr=In.pageY-jn;lr<0&&(lr=0),lr>300&&(lr=300);let er=Hn+lr+"px";Fr(er)}},sn=Dr.current,Dn=!1,jn=0;return sn.addEventListener("mousedown",jt),document.addEventListener("mousemove",on),document.addEventListener("mouseup",Rt),()=>{sn.removeEventListener("mousedown",jt),document.removeEventListener("mousemove",on),document.removeEventListener("mouseup",Rt)}}},[Ft,Dr]),(0,ae.useEffect)(()=>{Fr(Hn)},[Hn]);const fn=Wn(Rn),en=Wn(jr),Ut={width:fn,height:en},rt=(0,ae.useMemo)(()=>{if(An){let jt=new Date(An),Rt=jt.getHours(),on=jt.getMinutes(),sn=jt.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,on=on<10?"0"+on:on,sn=sn<10?"0"+sn:sn,`${Rt}:${on}:${sn}`}return 0},[An]),Et=jt=>{const Rt=[];if(qn){let on=-1;jt=jt.replace(/(@▁▁@|@▁@)/g,function(sn,Dn,jn){Rt.push({multiLine:sn!==At})})}return Rt};function Nt(){window.sessionStorage.removeItem(Mr),Jr(!1),Tr(0)}function Tt(){Jr(!1),Tr(0),Ft.setValue(window.sessionStorage.getItem(Mr))}(0,ae.useEffect)(()=>{Bn[wn]&&wn!==nt&&wn!==ft&&setTimeout(()=>{const jt=document.getElementsByClassName("markdown-popup-form")[0],Rt=window.innerWidth/2-jt.offsetWidth/2,on=window.innerHeight/2-jt.offsetHeight/2;Ir(Rt),Yr(on)},0)},[wn]);const zt=jt=>{jt.preventDefault();const Rt=jt.clientX-Vr,on=jt.clientY-ei;document.body.onmousemove=sn=>{let Dn=sn.clientX-Rt,jn=sn.clientY-on;const In=document.getElementsByClassName("markdown-popup-form")[0],lr=window.innerWidth-In.offsetWidth,er=window.innerHeight-In.offsetHeight;Dn=Math.max(0,Math.min(Dn,lr)),jn=Math.max(0,Math.min(jn,er)),xn(sn.clientX,sn.clientY,Rt,on)&&(Ir(Dn),Yr(jn))},document.body.onmouseup=function(){document.body.onmousemove=null}},xn=(jt,Rt,on,sn)=>{const Dn=document.body.clientHeight,jn=document.body.clientWidth;return jt<20&&on>jt||jt>jn-20&&on<jt||Rt<20&&sn>Rt||Rt>Dn-20&&sn<Rt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:or},ae.createElement("div",{className:`markdown-editor-container ${qe} ${Un?"on-preview":""} ${Er?"mini":""} ${Nr?"full-screen":""}`,style:Ut},ae.createElement(Dt,{insertTemp:yr,watch:Un,fullScreen:Nr,showNullButton:un,showNullProgramButton:qn,onActionCallback:it,hidetoolBar:kr,extraUse:kn}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:On,placeholder:En})),Un?ae.createElement("div",{ref:Zr,className:"preview-container"},ur==="stex"&&ae.createElement(yt,{value:Fn}),ur!=="stex"&&ae.createElement(Ce.Z,{edit:!0,disabledFill:pn,showProgramFill:qn,value:Fn,openEditor:jt=>{var Rt;Br.current=jt,(Rt=Wr.current)==null||Rt.setHeight("100vh"),setTimeout(()=>{Gn("add-flowchart")},150)}})):null))),vn?ae.createElement("a",{ref:Dr,className:"editor-resize"}):null,wn===nt&&ae.createElement(Me,{callback:ht,onCancel:Zt}),wn===ft&&ae.createElement(Oe,{ref:Wr,editImgId:Br.current,callback:ht,onCancel:Zt}),ae.createElement(me.Z,null,Bn[wn]&&wn!==nt&&wn!==ft?ae.createElement(gt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Vr,top:ei},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:zt},Bn[wn]),open:!0,onCancel:Zt,footer:null,destroyOnClose:!0,width:wn===ft?"1200px":null,height:wn===ft?"80vh":null,className:"markdown-popup-form"},Pt):null))}},90443:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return He},I:function(){return Dt}});var ae=ue(28284),je=ue(6767),Ie=ue(37568),at=ue(44104),be=ue(1439),he=ue(47889),De=ue(99571),Qe=ue(88457),we=ue(59301),de=ue(59301),Ne=Object.defineProperty,Ce=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(me,Ee,Ke)=>Ee in me?Ne(me,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):me[Ee]=Ke,vt=(me,Ee)=>{for(var Ke in Ee||(Ee={}))Ye.call(Ee,Ke)&&Pe(me,Ke,Ee[Ke]);if(Je)for(var Ke of Je(Ee))Re.call(Ee,Ke)&&Pe(me,Ke,Ee[Ke]);return me},mt=(me,Ee)=>Ce(me,yt(Ee));const{useForm:St}=ae.default,Fe={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}};var He=({callback:me,onCancel:Ee})=>{const[Ke]=St();let Se=(0,we.useRef)();function $e(nn){Se.current.width=Ke.getFieldValue("width"),Se.current.align=Ke.getFieldValue("align"),me(nn,Se.current)}function Ze(nn,Ot){if(nn.status===-1){je.ZP.error(nn.message);return}Ke.setFieldsValue({src:`/api/attachments/${nn.id}`,type:Ot.type})}function lt(nn){let Ot=nn.target.files[0];Se.current=Ot,Dt(Ot,Ze)}return de.createElement(ae.default,mt(vt({form:Ke},ge),{className:"upload-image-panel",onFinish:$e,style:{width:470,overflow:"hidden"}}),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(Ie.default,{style:Fe})),de.createElement(Ue,{onFileChange:lt}))),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Ie.default,{style:{width:264}})),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(at.Z,null,de.createElement(ae.default.Item,{name:"width",style:{margin:0}},de.createElement(be.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(he.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),de.createElement("aside",null,de.createElement(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(De.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(De.ZP,{type:"default",onClick:Ee},"\u53D6\u6D88"))))};function Ue({onFileChange:me}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:me}))}function Dt(me,Ee){if(!me)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ke=new FormData;Ke.append("editormd-image-file",me),Ke.append("file_param_name","editormd-image-file"),Ke.append("byxhr","true");var Se=new window.XMLHttpRequest;Se.withCredentials=!0,Se.addEventListener("load",function($e){Ee(JSON.parse($e.target.responseText),me)},!1),Se.addEventListener("error",function($e){console.error($e)},!1),Se.open("POST",`${Qe.KI}/api/attachments.json`),Se.send(Ke)}},81123:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Ie}});var ae=ue(59301),je=ue(4676);class Ie extends ae.Component{constructor(be){super(be);const he=window.document;this.node=he.createElement("div"),he.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,je.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},95440:function(cn,an,ue){"use strict";ue.d(an,{SV:function(){return Me},ZP:function(){return Xe}});var ae=ue(59301),je=ue(76374);const Ie={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"]},at={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"]},be={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(`
|
|
`)}]},he={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(`
|
|
`)}]},De={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 Qe=ue(53184),we=ue.n(Qe),de=(ke,Ve,st)=>new Promise((Be,tt)=>{var et=ut=>{try{dt(st.next(ut))}catch(ve){tt(ve)}},Oe=ut=>{try{dt(st.throw(ut))}catch(ve){tt(ve)}},dt=ut=>ut.done?Be(ut.value):Promise.resolve(ut.value).then(et,Oe);dt((st=st.apply(ke,Ve)).next())});const Ne={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"]}},Ce=(ke,Ve,st,Be)=>{const tt=Ve.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:st.lineNumber,endColumn:st.column});return Array.from(new Set(tt.match(/\b\w{2,}\b/g)||[])).map(Oe=>({label:Oe,kind:ke.languages.CompletionItemKind.Text,insertText:Oe,range:Be}))},yt=(ke,Ve,st,Be)=>{ke.languages.registerCompletionItemProvider(Ve,{provideCompletionItems(tt,et){const Oe=tt.getWordUntilPosition(et),dt={startLineNumber:et.lineNumber,endLineNumber:et.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},ut=tt.getLineContent(et.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...Ce(ke,tt,et,dt),...st.map(ct=>({label:ct,kind:ke.languages.CompletionItemKind.Keyword,documentation:ct,insertText:ct,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Be.map(ct=>({label:ct.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:ct.content,insertText:ut.startsWith("#")?ct.content.replace(/#/,""):ct.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}})};var Je=ke=>{Ne.languages.forEach(Ve=>{ke.languages.registerDocumentFormattingEditProvider(Ve,{provideDocumentFormattingEdits(st){return de(this,null,function*(){const Be=we()(st.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:st.getFullModelRange(),text:Be}]})}})}),yt(ke,"java",at.keywords,at.quickKey),yt(ke,"cpp",be.keywords,be.quickKey),yt(ke,"c",Ie.keywords,[]),yt(ke,"python",he.keywords,he.quickKey),yt(ke,"scala",De.keywords,De.quickKey)};const Ye="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Re=Object.defineProperty,Pe=(ke,Ve,st)=>Ve in ke?Re(ke,Ve,{enumerable:!0,configurable:!0,writable:!0,value:st}):ke[Ve]=st,vt=(ke,Ve,st)=>Pe(ke,typeof Ve!="symbol"?Ve+"":Ve,st);const mt=class js{constructor(Ve,st,Be){this.placeholder=Ve,this.editor=st,this.monaco=Be,st.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return js.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)}};vt(mt,"ID","editor.widget.placeholderHint");var Fe=mt,ge=ue(96236),He=ue(6767),Ue=ue(25399),Dt=ue(89392),me=ue(27035),Ee=ue(56102),Ke=Object.defineProperty,Se=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,Ot=(ke,Ve,st)=>Ve in ke?Ke(ke,Ve,{enumerable:!0,configurable:!0,writable:!0,value:st}):ke[Ve]=st,Qt=(ke,Ve)=>{for(var st in Ve||(Ve={}))lt.call(Ve,st)&&Ot(ke,st,Ve[st]);if(Ze)for(var st of Ze(Ve))nn.call(Ve,st)&&Ot(ke,st,Ve[st]);return ke},Ht=(ke,Ve)=>Se(ke,$e(Ve)),ye=(ke,Ve)=>{var st={};for(var Be in ke)lt.call(ke,Be)&&Ve.indexOf(Be)<0&&(st[Be]=ke[Be]);if(ke!=null&&Ze)for(var Be of Ze(ke))Ve.indexOf(Be)<0&&nn.call(ke,Be)&&(st[Be]=ke[Be]);return st},fe=(ke,Ve,st)=>new Promise((Be,tt)=>{var et=ut=>{try{dt(st.next(ut))}catch(ve){tt(ve)}},Oe=ut=>{try{dt(st.throw(ut))}catch(ve){tt(ve)}},dt=ut=>ut.done?Be(ut.value):Promise.resolve(ut.value).then(et,Oe);dt((st=st.apply(ke,Ve)).next())});function wt(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function qt(){}let Bt=!1;const We={"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 gt(ke=[]){let Ve=ke;if(Array.isArray(ke)){for(let st=0;st<ke.length;st++){let Be=We[ke[st]];if(Be)return Be}return Ve[0]}return We[Ve]||Ve}let xt=null;const bn=()=>fe(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var Xe=ke=>{var Ve=ke,{width:st="100%",height:Be="100%",value:tt,language:et="javascript",style:Oe={},options:dt={},overrideServices:ut={},theme:ve="vs-dark",onEditBlur:ct,isCopy:Yt=!1,onSave:Vt,autoHeight:oe=!1,forbidCopy:ee=!1,onChange:z=qt,editorDidMount:re=qt,onFocus:le=qt,onBreakPoint:ne=qt,breakPointValue:xe=[],filename:ot="educoder.txt",errorLine:ft,errorContent:nt="",highlightLine:Le,openBreakPoint:Gt=!1,placeholder:Lt="",showMiniMap:_t=!0}=Ve,hn=ye(Ve,["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 Nn=(0,ae.useRef)(),Wt=(0,ae.useRef)({}),Ln=(0,ae.useRef)(),nr=(0,ae.useRef)(),$n=(0,ae.useRef)([]),It=(0,ae.useRef)(!1),Mt=(0,ae.useRef)(),At=(0,ae.useRef)(),Cn=(0,ae.useRef)(!1),[Sn,Wn]=(0,ae.useState)(!1);function rr(){let vn;return Nn.current&&(vn=new je.Z(kt=>{for(let un of kt)(un.target.offsetHeight>0||un.target.offsetWidth>0)&&Wt.current.instance.layout()}),vn.observe(Nn.current)),vn}function gn(){He.ZP.warning({content:decodeURIComponent(Ye),key:"monaco-editor-tip"})}const Jt=()=>{let vn=Wt.current.instance;if(tt!=null&&vn&&Sn){const kt=vn.getModel();kt&&tt!==kt.getValue()&&(Bt=!0,kt.setValue(tt),vn.layout(),Bt=!1)}};(0,ae.useEffect)(()=>{const vn=me.Z.subscribe("formatDocument",kt=>{var un;let qn=Wt.current.instance;(un=qn==null?void 0:qn.getAction)==null||un.call(qn,"editor.action.formatDocument").run()});return window.updateMonacoValue=kt=>{z(kt)},vn},[]),(0,ae.useEffect)(()=>{var vn;let kt=Wt.current.instance;nr.current&&clearTimeout(nr.current),nr.current=setTimeout(()=>{Jt()},500),tt&&(tt!=null&&tt.length)&&((vn=kt==null?void 0:kt.updateOptions)==null||vn.call(kt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(tt.split(/\r\n|\r|\n/g).length))+3,5)}))},[tt,Sn,Wt.current]),(0,ae.useEffect)(()=>{if(ft&&Wt.current&&Wt.current.instance){let kt=Wt.current.instance;kt.changeViewZones(function(un){var qn=document.createElement("div");qn.style.padding="10px 20px",qn.style.width="calc(100% - 20px)",qn.className="my-error-line-wrp",qn.innerHTML=nt,un.addZone({afterLineNumber:ft||11,heightInLines:3,domNode:qn})});var vn={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}};kt.addOverlayWidget(vn),kt.revealPositionInCenter({lineNumber:20,column:1})}},[ft,Wt.current,Sn]);const Bn=(vn="",kt)=>{if(!vn||vn.trim()==="")return!0;const qn=Wt.current.instance.getModel().getLineTokens(kt);let kr=!1;for(let _e=0;_e<2;_e++)qn.getStandardTokenType(_e)===1&&(kr=!0);return kr};(0,ae.useEffect)(()=>{var vn;const kt=(vn=Wt.current)==null?void 0:vn.instance;if(kt&&Sn&&ee){const un=kt.onDidBlurEditorWidget(()=>{Cn.current=!1}),qn=kt.onDidFocusEditorText(()=>{Cn.current=!0});return()=>{un.dispose(),qn.dispose()}}},[Wt.current,Sn,ee]),(0,ae.useEffect)(()=>{var vn;if((vn=Wt.current)!=null&&vn.instance&&Sn&&Gt){let kt=Wt.current.instance,un=kt.getModel();if(!un)return;(()=>{var mn;let kn=[],$t=[];const Ft=un.getAllDecorations();for(let Fn of Ft)Fn.options.className==="highlighted-line"&&(kn.push((mn=Fn==null?void 0:Fn.range)==null?void 0:mn.startLineNumber),$t.push(Fn==null?void 0:Fn.id));if(Le===kn[0])return;un.deltaDecorations($t,[]);const Tn=un.getLineCount();Le&&Le<=Tn&&(kt.deltaDecorations([],[{range:new xt.Range(Le,1,Le,un.getLineMaxColumn(Le)),options:{isWholeLine:!0,className:"highlighted-line"}}]),kt.revealLineInCenter(Le))})();const kr=(mn=!1)=>{var kn;let $t=[],Ft=[];const Tn=un.getAllDecorations();for(let Fn of Tn)Fn.options.linesDecorationsClassName==="breakpoints-select"&&($t.push((kn=Fn==null?void 0:Fn.range)==null?void 0:kn.startLineNumber),Ft.push(Fn==null?void 0:Fn.id));if(mn)return{lines:$t,ids:Ft};ne($t)},_e=mn=>fe(void 0,null,function*(){let kn={range:new xt.Range(mn,1,mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield un.deltaDecorations([],[kn]),kr()}),Ge=mn=>fe(void 0,null,function*(){let kn=[];const $t=kt.getLineDecorations(mn);for(let Ft of $t)Ft.options.linesDecorationsClassName==="breakpoints-select"&&kn.push(Ft.id);yield un.deltaDecorations(kn,[]),kr()}),ln=mn=>{let kn=kt.getLineDecorations(mn);for(let $t of kn)if($t.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Dt.isEqual)(xe,kr(!0).lines)){un.deltaDecorations(kr(!0).ids,[]);const mn=xe.map(kn=>({range:new xt.Range(kn,1,kn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));un.deltaDecorations([],mn)}const Kt=kt.onDidChangeModelContent(mn=>{let kn=kt.getPosition();if(kn){let $t=kn.lineNumber;clearTimeout(At.current),At.current=setTimeout(()=>{Bn(un.getLineContent($t),$t)?Ge($t):ln($t)?(Ge($t),_e($t)):kr()},100)}}),qe=kt.onMouseDown(mn=>{var kn,$t,Ft;if(mn.target.detail&&((Ft=($t=(kn=mn.target)==null?void 0:kn.element)==null?void 0:$t.className)!=null&&Ft.includes("line-numbers"))){let Tn=mn.target.position.lineNumber;if(Bn(un.getLineContent(Tn),Tn))return;ln(Tn)?Ge(Tn):_e(Tn)}}),Xt=mn=>{let kn={range:new xt.Range(mn,1,mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};$n.current=kt.deltaDecorations($n.current,[kn])},dn=()=>{$n.current=kt.deltaDecorations($n.current,[])},pn=kt.onMouseMove(mn=>{var kn,$t,Ft;if(dn(),mn.target.detail&&((Ft=($t=(kn=mn.target)==null?void 0:kn.element)==null?void 0:$t.className)!=null&&Ft.includes("line-numbers"))){let Tn=mn.target.position.lineNumber;if(Bn(un.getLineContent(Tn),Tn))return;Xt(Tn)}}),En=kt.onMouseLeave(()=>{dn()});return()=>{Kt.dispose(),qe.dispose(),pn.dispose(),En.dispose()}}},[Wt.current,Sn,xe,Le,Gt,et]),(0,ae.useEffect)(()=>{var vn;(vn=Wt.current)!=null&&vn.instance&&Gt&&Wt.current.instance.setPosition({lineNumber:0,column:0})},[Le]);function Sr(){let vn=Wt.current.instance;if(vn){const kt=vn.getSelection(),un=Wt.current.pastePos||{},qn=new xt.Range(un.startLineNumber||kt.endLineNumber,un.startColumn||kt.endColumn,un.endLineNumber||kt.endLineNumber,un.endColumn||kt.endColumn);setTimeout(()=>{vn.executeEdits("",[{range:qn,text:""}])},300)}}function rn(vn){(window.navigator.platform.match("Mac")?vn.metaKey:vn.ctrlKey)&&vn.keyCode==83&&(vn.preventDefault(),Vt())}const Mn=()=>{if(oe&&Wt.current.instance){const vn=Wt.current.instance.getContentHeight();ur(vn<Be?Be:vn)}else ur(Be)};function Rn(vn){var kt=document.createEvent("MouseEvents");kt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),vn.dispatchEvent(kt)}const Hn=vn=>{if(!Cn.current)return;const{keyCode:kt,ctrlKey:un,metaKey:qn,target:kr,type:_e}=vn;return(_e==="paste"||(kt===67||kt===86)&&(qn||un))&&kr.nodeName==="TEXTAREA"&&(gn(),vn.preventDefault()),!1};function Er(vn,kt){var un=window.URL||window.webkitURL||window,qn=new Blob([kt]),kr=document.createElementNS("http://www.w3.org/1999/xhtml","a");kr.href=un.createObjectURL(qn),kr.download=vn,Rn(kr)}(0,ae.useEffect)(()=>{Mn()},[Mn]),(0,ae.useEffect)(()=>{Nn.current&&!Sn&&Promise.all([ue.e(8909),ue.e(4100)]).then(ue.bind(ue,71448)).then(vn=>{try{xt=vn,Wt.current.instance=xt.editor.create(Nn.current,{value:tt,language:gt(et),theme:ve,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:_t||!1}},ut);const kt=Wt.current.instance;let kr=[...ge.BH._menuItems].find(Kt=>Kt[0]._debugName=="EditorContext")[1],_e=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ge=(Kt,qe)=>{var Xt,dn;let pn=Kt._first;do qe.includes((dn=(Xt=pn.element)==null?void 0:Xt.command)==null?void 0:dn.id)&&Kt._remove(pn);while(pn=pn.next)};if(re(kt,xt),setTimeout(()=>{Mn(),Wt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Er(ot||"educoder.txt",kt.getValue())}})},500),Wt.current.subscription=kt.onDidChangeModelContent(Kt=>{It.current?clearTimeout(Mt.current):(Mn(),z(kt.getValue(),Kt)),Mt.current=setTimeout(()=>{It.current=!1},500)}),window.Monaco||Je(xt,gt(et)),ee&&(Ge(kr,_e),Nn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Hn),window.removeEventListener("paste",Hn),window.addEventListener("keydown",Hn),window.addEventListener("paste",Hn)),window.Monaco=xt,ct&&kt.onDidBlurEditorWidget(()=>{ct(kt.getValue())}),le&&kt.onDidFocusEditorText(()=>{ee&&bn(),le(kt.getValue())}),ee){bn();try{kt.onDidPaste(Kt=>{const qe=kt.getSelection(),Xt=Wt.current.pastePos||{},dn=new xt.Range(Xt.startLineNumber||qe.endLineNumber,Xt.startColumn||qe.endColumn,Xt.endLineNumber||qe.endLineNumber,Xt.endColumn||qe.endColumn);kt.executeEdits("",[{range:Kt.range,text:""}])})}catch(Kt){}}let ln=rr();return Lt&&typeof Lt=="string"&&new Fe(Lt,kt,xt),Wn(!0),()=>{const Kt=Wt.current.instance;Kt.dispose();const qe=Kt.getModel();qe&&qe.dispose(),Wt.current.subscription&&Wt.current.subscription.dispose(),ln.unobserve(Nn.current)}}catch(kt){}})},[]),(0,ae.useEffect)(()=>{if(Wt.current.instance&&Sn)return document.addEventListener("keydown",rn,!1),()=>{document.removeEventListener("keydown",rn)}},[Vt,Sn]),(0,ae.useEffect)(()=>{let vn=Wt.current.instance;if(vn&&Sn){let kt=gt(et);xt.editor.setModelLanguage(vn.getModel(),kt)}},[et,Sn]),(0,ae.useEffect)(()=>{Wt.current.instance&&Sn&&xt.editor.setTheme(ve)},[ve,Sn]),(0,ae.useEffect)(()=>{let vn=Wt.current.instance;Ln.current=dt,vn&&Sn&&(vn.updateOptions(Qt({},dt)),setTimeout(()=>{vn.getModel().updateOptions(Qt({},dt))},200))},[JSON.stringify(dt),Sn]),(0,ae.useEffect)(()=>{let vn=Wt.current.instance;vn&&Sn&&vn.layout()},[st,Be,Sn]);const[mr,Or]=(0,ae.useState)(wt(st)),[yr,ur]=(0,ae.useState)(wt(Be)),Mr=Ht(Qt({},Oe),{width:mr,height:yr,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:Nn,style:Mr},Yt&&ae.createElement(Ee.CopyToClipboard,{text:tt,onCopy:()=>He.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(Ue.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Me({width:ke="100%",height:Ve="100%",original:st,modified:Be,language:tt,options:et={}}){const Oe=(0,ae.useRef)(),[dt,ut]=(0,ae.useState)(null);function ve(oe){let ee;return Oe.current&&(ee=new je.Z(z=>{for(let re of z)(re.target.offsetHeight>0||re.target.offsetWidth>0)&&oe.layout()}),ee.observe(Oe.current)),ee}(0,ae.useEffect)(()=>(Oe.current&&Promise.all([ue.e(8909),ue.e(9404)]).then(ue.bind(ue,2550)).then(oe=>{xt=oe;const ee=xt.editor.createDiffEditor(Oe.current,Ht(Qt({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},et),{wordWrap:!0}));ut(ee);let z=ve(ee);return()=>{ee.dispose();const re=ee.getModel();re&&re.dispose(),z.unobserve(Oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{dt&&dt.setModel({original:xt.editor.createModel(st,tt),modified:xt.editor.createModel(Be,tt)})},[st,Be,tt,dt]);const ct=wt(ke),Yt=wt(Ve),Vt={width:ct,height:Yt};return ae.createElement("div",{className:"my-diff-editor",ref:Oe,style:Vt})}},66991:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return je}});var ae=ue(59301);function je(Ie,at){const be=(0,ae.useRef)();(0,ae.useEffect)(()=>{be.current=Ie}),(0,ae.useEffect)(()=>{function he(){be.current()}if(at!==null){let De=setInterval(he,at);return()=>clearInterval(De)}},[at])}},80667:function(cn,an,ue){"use strict";ue.r(an),ue.d(an,{default:function(){return $n}});var ae=ue(59301),je=ue(95392),Ie=ue(91882),at=ue(20554),be=ue(27812),he=ue(63949),De=ue(17949),Qe=ue(78323),we=ue(97231),de=ue(62957),Ne=ue(6767),Ce=Object.defineProperty,yt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Re=(It,Mt,At)=>Mt in It?Ce(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,Pe=(It,Mt)=>{for(var At in Mt||(Mt={}))Je.call(Mt,At)&&Re(It,At,Mt[At]);if(yt)for(var At of yt(Mt))Ye.call(Mt,At)&&Re(It,At,Mt[At]);return It},vt=(It,Mt,At)=>new Promise((Cn,Sn)=>{var Wn=Jt=>{try{gn(At.next(Jt))}catch(Bn){Sn(Bn)}},rr=Jt=>{try{gn(At.throw(Jt))}catch(Bn){Sn(Bn)}},gn=Jt=>Jt.done?Cn(Jt.value):Promise.resolve(Jt.value).then(Wn,rr);gn((At=At.apply(It,Mt)).next())});const mt=({shixunHomeworks:It,dispatch:Mt})=>{const At=(0,je.useParams)();return ae.createElement(de.default,{centered:!0,title:"\u63D0\u793A",open:It.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>vt(void 0,null,function*(){(yield Mt({type:"shixunHomeworks/deleteReply",payload:{object_id:It.actionTabs.selectArr.id,object_type:"journals_for_message"}})).status===0&&(Ne.ZP.success("\u5220\u9664\u6210\u529F"),Mt({type:"shixunHomeworks/setActionTabs",payload:{}}),Mt({type:"shixunHomeworks/getReplyList",payload:Pe({},It.actionTabs.params)}))}),onCancel:()=>{Mt({type:"shixunHomeworks/setActionTabs",payload:{}})}},ae.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))};var St=(0,je.connect)(({shixunHomeworks:It})=>({shixunHomeworks:It}))(mt),Fe=ue(56656),ge=ue.n(Fe),He=ue(77019),Ue=ue(5269),Dt=ue(37568),me=ue(99571),Ee=ue(25399),Ke=ue(13747),Se=ue(26227),$e=ue(63524),Ze={flex_box_center:"flex_box_center___rwkot",flex_space_between:"flex_space_between___CV5Yi",flex_box_vertical_center:"flex_box_vertical_center___meeO5",flex_box_center_end:"flex_box_center_end___RXqc0",flex_box_column:"flex_box_column___HwZxi",listItem:"listItem___Cb1Ly",description:"description___UqYVS",liked:"liked___xlDpa",likedActive:"likedActive___GqNt1",reply:"reply___R3gEt",replyList:"replyList___AA3m5",comment:"comment___JuJKy"},lt=Object.defineProperty,nn=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Ht=(It,Mt,At)=>Mt in It?lt(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,ye=(It,Mt)=>{for(var At in Mt||(Mt={}))Ot.call(Mt,At)&&Ht(It,At,Mt[At]);if(nn)for(var At of nn(Mt))Qt.call(Mt,At)&&Ht(It,At,Mt[At]);return It},fe=(It,Mt,At)=>new Promise((Cn,Sn)=>{var Wn=Jt=>{try{gn(At.next(Jt))}catch(Bn){Sn(Bn)}},rr=Jt=>{try{gn(At.throw(Jt))}catch(Bn){Sn(Bn)}},gn=Jt=>Jt.done?Cn(Jt.value):Promise.resolve(Jt.value).then(Wn,rr);gn((At=At.apply(It,Mt)).next())});ge().locale("ZH-cn");const wt=({graduation:It,classroomList:Mt,globalSetting:At,loading:Cn,dispatch:Sn})=>{const[Wn,rr]=(0,ae.useState)(ye({},(0,je.useParams)())),[gn,Jt]=(0,ae.useState)(!1),[Bn,Sr]=(0,ae.useState)(-1),[rn,Mn]=(0,ae.useState)(""),{detail:Rn}=It,{detailLeftMenus:Hn}=Mt,{graduationDetail:Er,replyList:mr,workDetail:Or}=It,yr={1:"\u8BBE\u8BA1",2:"\u8BBA\u6587",3:"\u521B\u4F5C"},ur={1:"\u751F\u4EA7/\u793E\u4F1A\u5B9E\u9645",2:"\u7ED3\u5408\u79D1\u7814",3:"\u5176\u5B83"},Mr={1:"\u771F\u9898",2:"\u6A21\u62DF\u9898"},vn={1:"\u7EB5\u5411\u8BFE\u9898",2:"\u6A2A\u5411\u8BFE\u9898",3:"\u81EA\u9009"},kt={1:"\u65B0\u9898",2:"\u5F80\u5C4A\u9898\uFF0C\u6709\u65B0\u8981\u6C42",3:"\u5F80\u5C4A\u9898\uFF0C\u65E0\u65B0\u8981\u6C42"};return Wn.page_size=10,(0,ae.useEffect)(()=>{Sn({type:"graduation/getReplyList",payload:ye({},Wn)}),Sn({type:"graduation/getTopisDetail",payload:ye({},Wn)})},[Wn.categoryId]),ae.createElement("section",{className:Ze.bg},ae.createElement("section",{className:" edu-container"},ae.createElement("aside",{className:[Ze.desc,"c-black","font14","bg-white"].join(" ")},ae.createElement("h1",{className:Ze.description},Rn.description),ae.createElement("div",{className:"mt30"},ae.createElement("ul",{className:Ze.listItem},ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u7C7B\u578B\uFF1A"),ae.createElement("span",null,yr[Rn==null?void 0:Rn.topic_type]||"--")),ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\uFF1A"),ae.createElement("span",null,ur[Rn==null?void 0:Rn.topic_source]||"--")),ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D281\uFF1A"),ae.createElement("span",null,Mr[Rn==null?void 0:Rn.topic_property_first]||"--")),ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6027\u8D282\uFF1A"),ae.createElement("span",null,vn[Rn==null?void 0:Rn.topic_property_second]||"--")),ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"),ae.createElement("span",null,kt[Rn==null?void 0:Rn.topic_repeat]||"--")),ae.createElement("li",null,ae.createElement("span",{className:"c-light-black"},"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"),ae.createElement("span",null,Rn.city||"--")),ae.createElement("li",{className:"fl with50"},ae.createElement("span",{className:"c-light-black"},"\u8BFE\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"),ae.createElement("span",null,Rn.source_unit||"--"))))),ae.createElement("aside",{className:[Ze.reply,"bg-white","mt20"].join(" ")},gn&&ae.createElement(De.Z,{onChange:un=>{Mn(un)},height:200,isFocus:!0,watch:!0}),ae.createElement(He.Z,{onClick:()=>{Jt(!0)}},ae.createElement(Ue.Z,{flex:"1"},!gn&&ae.createElement(Dt.default,{size:"middle",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),ae.createElement(Ue.Z,null,ae.createElement(me.ZP,{type:"primary",size:"middle",onClick:()=>fe(void 0,null,function*(){rn===""?Ne.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield Sn({type:"graduation/createReply",payload:{journals_for_message:{jour_id:Wn.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:rn}}})).status===0&&(Ne.ZP.success("\u53D1\u5E03\u6210\u529F"),Sn({type:"graduation/getReplyList",payload:ye({},Wn)}),Jt(!1))})},"\u53D1\u8868")))),(mr==null?void 0:mr.comments)&&mr.comments!=""&&ae.createElement("aside",{className:[Ze.replyList,"bg-white"].join(" ")},mr==null?void 0:mr.comments.map(function(un,qn){var kr,_e;return ae.createElement(He.Z,{gutter:[12,12],key:qn},ae.createElement(Ue.Z,{flex:"40px"},ae.createElement("img",{width:"40",src:`${Qe.Z.IMG_SERVER}/images/${(kr=un==null?void 0:un.author)==null?void 0:kr.image_url}`})),ae.createElement(Ue.Z,{flex:"1"},ae.createElement(He.Z,{align:"middle"},ae.createElement(Ue.Z,{span:24},ae.createElement("span",{className:"c-light-black"},(_e=un==null?void 0:un.author)==null?void 0:_e.name),ae.createElement("span",{className:"c-light-black ml10"},ge()(un==null?void 0:un.created_on).fromNow()," \u53D1\u5E03")),ae.createElement(Ue.Z,{span:24},ae.createElement(we.Z,{value:un.content})),un.children&&ae.createElement("aside",{className:Ze.comment},un.children.map(function(Ge,ln){return ae.createElement(He.Z,{key:ln},ae.createElement(Ue.Z,{span:24},ae.createElement(He.Z,null,ae.createElement(Ue.Z,{flex:"1"},Ge.author.name,ae.createElement("span",{className:"c-light-black ml10"},ge()(Ge==null?void 0:Ge.created_on).fromNow())),ae.createElement(Ue.Z,null,ae.createElement(Ee.Z,{title:"\u5220\u9664"},ae.createElement(Se.Z,{className:"current",onClick:()=>{Sn({type:"graduation/setActionTabs",payload:{key:"\u5220\u9664",params:Wn,selectArr:un}})}}))))),ae.createElement(Ue.Z,null,ae.createElement("strong",null,ae.createElement(we.Z,{value:Ge.content}))))})),ae.createElement(Ue.Z,{span:24,className:"mt5 c-light-black"},Bn===qn&&ae.createElement("aside",null,ae.createElement(De.Z,{onChange:Ge=>{Mn(Ge)},height:150,isFocus:!0}),ae.createElement(He.Z,null,ae.createElement(Ue.Z,{span:24,className:"tr"},ae.createElement(me.ZP,{type:"primary",size:"middle",onClick:()=>fe(this,null,function*(){rn===""?Ne.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):(yield Sn({type:"graduation/createReply",payload:{journals_for_message:{jour_id:Wn.categoryId,jour_type:"HomeworkCommon",m_parent_id:un.id,reply_id:1,notes:rn}}}),Sn({type:"graduation/getReplyList",payload:ye({},Wn)}),Ne.ZP.success("\u53D1\u5E03\u6210\u529F"),Sr(-1))})},"\u53D1\u8868")))),Bn!==qn&&ae.createElement("div",{className:"tr"},ae.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:()=>Sr(qn)}),un.liked&&ae.createElement("span",{className:"c-orange"},ae.createElement($e.Z,{className:"mr5 ml30",onClick:()=>fe(this,null,function*(){yield Sn({type:"graduation/replyUnLike",payload:{object_id:un.id,object_type:"message"}}),Sn({type:"graduation/getReplyList",payload:ye({},Wn)})})}),un.praises_count),!un.liked&&ae.createElement("span",null,ae.createElement($e.Z,{className:"mr5 ml30",onClick:()=>fe(this,null,function*(){yield Sn({type:"graduation/replyLike",payload:{object_id:un.id,object_type:"message"}}),Sn({type:"graduation/getReplyList",payload:ye({},Wn)})})}),un.praises_count))))))}))),ae.createElement("aside",{className:"tc mt30 pb30"},ae.createElement(Ke.Z,{defaultCurrent:1,total:mr==null?void 0:mr.total_count,hideOnSinglePage:!0,current:Wn.page||1,onChange:un=>{Wn.page=un,Sn({type:"graduation/getReplyList",payload:ye({},Wn)})}})),ae.createElement(St,null))};var qt=(0,je.connect)(({graduation:It,classroomList:Mt,loading:At,globalSetting:Cn})=>({graduation:It,globalSetting:Cn,classroomList:Mt,loading:At.effects}))(wt),Bt=ue(28284),We=ue(54172),gt=Object.defineProperty,xt=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,Me=(It,Mt,At)=>Mt in It?gt(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,ke=(It,Mt)=>{for(var At in Mt||(Mt={}))bn.call(Mt,At)&&Me(It,At,Mt[At]);if(xt)for(var At of xt(Mt))Xe.call(Mt,At)&&Me(It,At,Mt[At]);return It},Ve=(It,Mt)=>{var At={};for(var Cn in It)bn.call(It,Cn)&&Mt.indexOf(Cn)<0&&(At[Cn]=It[Cn]);if(It!=null&&xt)for(var Cn of xt(It))Mt.indexOf(Cn)<0&&Xe.call(It,Cn)&&(At[Cn]=It[Cn]);return At},st=(It,Mt,At)=>new Promise((Cn,Sn)=>{var Wn=Jt=>{try{gn(At.next(Jt))}catch(Bn){Sn(Bn)}},rr=Jt=>{try{gn(At.throw(Jt))}catch(Bn){Sn(Bn)}},gn=Jt=>Jt.done?Cn(Jt.value):Promise.resolve(Jt.value).then(Wn,rr);gn((At=At.apply(It,Mt)).next())});const Be=It=>{var Mt=It,{graduation:At,dispatch:Cn}=Mt,Sn=Ve(Mt,["graduation","dispatch"]);const Wn=(0,je.useParams)();return ae.createElement(de.default,{centered:!0,title:"\u63D0\u793A",open:At.actionTabs.key==="\u62D2\u7EDD",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>st(void 0,null,function*(){(yield Cn({type:"graduation/refuseTopic",payload:ke({student_graduation_topic:At.actionTabs.selectArrs.id},Wn)})).status===0&&(Ne.ZP.success("\u62D2\u7EDD\u6210\u529F"),Cn({type:"graduation/setActionTabs",payload:{}}),Cn({type:"graduation/getTopisDetailList",payload:ke({},At.actionTabs.params)}))}),onCancel:()=>{Cn({type:"graduation/setActionTabs",payload:{}})}},ae.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u5B66\u751F\u9009\u9898?"))};var tt=(0,je.connect)(({graduation:It})=>({graduation:It}))(Be),et=ue(82326),Oe=Object.defineProperty,dt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ct=(It,Mt,At)=>Mt in It?Oe(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,Yt=(It,Mt)=>{for(var At in Mt||(Mt={}))ut.call(Mt,At)&&ct(It,At,Mt[At]);if(dt)for(var At of dt(Mt))ve.call(Mt,At)&&ct(It,At,Mt[At]);return It},Vt=(It,Mt)=>{var At={};for(var Cn in It)ut.call(It,Cn)&&Mt.indexOf(Cn)<0&&(At[Cn]=It[Cn]);if(It!=null&&dt)for(var Cn of dt(It))Mt.indexOf(Cn)<0&&ve.call(It,Cn)&&(At[Cn]=It[Cn]);return At},oe=(It,Mt,At)=>new Promise((Cn,Sn)=>{var Wn=Jt=>{try{gn(At.next(Jt))}catch(Bn){Sn(Bn)}},rr=Jt=>{try{gn(At.throw(Jt))}catch(Bn){Sn(Bn)}},gn=Jt=>Jt.done?Cn(Jt.value):Promise.resolve(Jt.value).then(Wn,rr);gn((At=At.apply(It,Mt)).next())});const ee=It=>{var Mt=It,{graduation:At,dispatch:Cn}=Mt,Sn=Vt(Mt,["graduation","dispatch"]),Wn;const rr=(0,je.useParams)(),{detailList:gn}=At,[Jt]=Bt.default.useForm();return ae.createElement(de.default,{centered:!0,title:"\u540C\u610F\u9009\u9898",open:At.actionTabs.key==="\u540C\u610F",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>oe(void 0,null,function*(){var Bn;yield Jt.validateFields();const Sr=Jt.getFieldsValue();(yield Cn({type:"graduation/agreeTopic",payload:Yt({group_id:Sr.group_id,course_group_name:(Bn=gn==null?void 0:gn.group_list)==null?void 0:Bn.filter(Mn=>Mn.group_id==Sr.group_id)[0].group_name,student_graduation_topic:At.actionTabs.selectArrs.id},rr)})).status===0&&(Ne.ZP.success("\u540C\u610F\u6210\u529F"),Cn({type:"graduation/setActionTabs",payload:{}}),Cn({type:"graduation/getTopisDetailList",payload:Yt({},At.actionTabs.params)}))}),onCancel:()=>{Cn({type:"graduation/setActionTabs",payload:{}})}},ae.createElement("p",null,"\u786E\u8BA4\u540C\u610F\u5B66\u751F\u7684\u9009\u9898\uFF0C\u5C06\u5B66\u751F\u52A0\u5165\u6211\u7684\u5206\u73ED"),ae.createElement(Bt.default,{form:Jt},ae.createElement(Bt.default.Item,{name:"group_id",label:"\u9009\u62E9\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5206\u73ED"}]},ae.createElement(et.default,{placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED",size:"middle"},(Wn=gn==null?void 0:gn.group_list)==null?void 0:Wn.map(function(Bn,Sr){return ae.createElement(et.default.Option,{value:Bn.group_id},Bn.group_name)})))))};var z=(0,je.connect)(({graduation:It})=>({graduation:It}))(ee),re=Object.defineProperty,le=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ot=(It,Mt,At)=>Mt in It?re(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,ft=(It,Mt)=>{for(var At in Mt||(Mt={}))ne.call(Mt,At)&&ot(It,At,Mt[At]);if(le)for(var At of le(Mt))xe.call(Mt,At)&&ot(It,At,Mt[At]);return It};const nt=({graduation:It,loading:Mt,dispatch:At})=>{const[Cn,Sn]=(0,ae.useState)(ft({},(0,je.useParams)())),Wn=(0,je.useLocation)(),{detailList:rr}=It,[gn,Jt]=(0,ae.useState)({}),[Bn]=Bt.default.useForm(),Sr=(Mn,Rn)=>{Cn.page=Mn,Cn.limit=20,At({type:"graduation/getTopisDetailList",payload:ft({},Cn)})},rn=[{title:"\u5E8F\u53F7",dataIndex:"name",width:200,align:"center",render:(Mn,Rn,Hn)=>Hn+1},{title:"\u59D3\u540D",dataIndex:"student_name"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u5206\u73ED",dataIndex:"class_group_name"},{title:"\u9009\u9898\u65F6\u95F4",dataIndex:"selected_time"},{title:"\u786E\u8BA4\u7ED3\u679C",dataIndex:"result",render:Mn=>Mn==="\u5DF2\u62D2\u7EDD"?ae.createElement("span",{className:"c-orange"},"\u5DF2\u62D2\u7EDD"):Mn},{title:"\u64CD\u4F5C",dataInex:"action",render:(Mn,Rn)=>ae.createElement("div",null,(Rn.result==="\u5F85\u786E\u8BA4"||Rn.result==="\u5DF2\u540C\u610F")&&ae.createElement("span",{className:"current",onClick:()=>{At({type:"graduation/setActionTabs",payload:{key:"\u62D2\u7EDD",selectArrs:Rn,params:Cn}})}},"\u62D2\u7EDD"),Rn.result==="\u5F85\u786E\u8BA4"&&ae.createElement("span",{className:"current ml20 c-blue",onClick:()=>{At({type:"graduation/setActionTabs",payload:{key:"\u540C\u610F",selectArrs:Rn,params:Cn}})}},"\u540C\u610F"))}];return ae.createElement(ae.Fragment,null,ae.createElement("section",{className:"minH500 bg-white "},ae.createElement(We.default,{loading:Mt["graduation/getTopisDetailList"],pagination:!1,dataSource:rr.users_list,columns:rn}),ae.createElement(tt,null),ae.createElement(z,null)),ae.createElement("aside",{className:"tc mb50 mt30"},ae.createElement(Ke.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:Sr,defaultCurrent:Cn.page||1,current:Cn.page||1,defaultPageSize:15,total:It.users_count})))};var Le=(0,je.connect)(({graduation:It,loading:Mt})=>({graduation:It,loading:Mt.effects}))(nt),Gt={flex_box_center:"flex_box_center___D_8YV",flex_space_between:"flex_space_between___DI3Lx",flex_box_vertical_center:"flex_box_vertical_center___HQIdb",flex_box_center_end:"flex_box_center_end___jBPdg",flex_box_column:"flex_box_column___oBJ_R",title:"title___vQC28",menuTabs:"menuTabs___ZWqcp",rightMenu:"rightMenu___JdFEE",shixunDetail:"shixunDetail___rsPHS"},Lt=Object.defineProperty,_t=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,Wt=(It,Mt,At)=>Mt in It?Lt(It,Mt,{enumerable:!0,configurable:!0,writable:!0,value:At}):It[Mt]=At,Ln=(It,Mt)=>{for(var At in Mt||(Mt={}))hn.call(Mt,At)&&Wt(It,At,Mt[At]);if(_t)for(var At of _t(Mt))Nn.call(Mt,At)&&Wt(It,At,Mt[At]);return It};const nr=({graduation:It,globalSetting:Mt,loading:At,dispatch:Cn})=>{const Sn=(0,je.useParams)(),Wn=(0,je.useLocation)(),[rr]=(0,je.useSearchParams)(),[gn,Jt]=(0,ae.useState)([]),[Bn,Sr]=(0,ae.useState)(rr.get("tabs")||0),{detailList:rn}=It;let Mn;Sn.category=rr.get("category_id"),(0,ae.useEffect)(()=>{Cn({type:"graduation/getTopisDetailList",payload:Ln({},Sn)})},[Sn.coursesId]);const Rn=[{name:"\u9009\u9898\u5217\u8868",id:0,compontent:ae.createElement(Le,null)},{name:"\u9009\u9898\u63CF\u8FF0",id:1,compontent:ae.createElement(qt,null)}];return ae.createElement("section",null,ae.createElement("div",{className:"edu-container"},rn.course_name&&ae.createElement("section",{className:"animated fadeIn"},ae.createElement("aside",{className:"mt10"},ae.createElement(Ie.Z,{separator:">"},ae.createElement(Ie.Z.Item,null,ae.createElement(je.Link,{to:`/classrooms/${rn.course_id}/shixun_homework`},rn.course_name)),ae.createElement(Ie.Z.Item,null,ae.createElement(je.Link,{to:`/classrooms/${rn.course_id}/graduation_topics/${rn.graduation_id}`},"\u6BD5\u8BBE\u9009\u9898")),ae.createElement(Ie.Z.Item,null,"\u9009\u9898\u8BE6\u60C5"))),ae.createElement("aside",{className:[Gt.title,"mt20"].join(" ")},ae.createElement(je.Link,{to:`/classrooms/${rn.course_id}/graduation_topics/${rn.graduation_id}`},ae.createElement(be.Z,{className:"font16 c-black"})),ae.createElement("strong",{className:"font20 ml5"},rn.graduation_topic_name),ae.createElement(he.VV,{status:[rn.status_name]}))),ae.createElement("aside",{className:"mt30 relative"},ae.createElement("aside",{className:Gt.rightMenu},ae.createElement(je.Link,{className:Gt.shixunDetail,to:`/classrooms/${Sn.coursesId}/graduation_topics/${Sn.categoryId}/edit`},ae.createElement("span",{className:"iconfont icon-shixunxiangqing"}),"\u7F16\u8F91\u9009\u9898")),ae.createElement(at.default,{defaultActiveKey:Bn,className:Gt.menuTabs},Rn.map((Hn,Er)=>ae.createElement(at.default.TabPane,{tab:Hn.name,key:Hn.id},Hn.compontent))))))};var $n=(0,je.connect)(({graduation:It,loading:Mt,globalSetting:At})=>({graduation:It,globalSetting:At,loading:Mt.effects}))(nr)},901:function(cn,an,ue){"use strict";ue.d(an,{AL:function(){return Fe},Iy:function(){return Ne},Qv:function(){return Je},ez:function(){return St},jb:function(){return Ce}});var ae=ue(32834),je=ue.n(ae),Ie=ue(11690),at=ue.n(Ie);let be=1;function he(me,Ee){const Ke=me.match(/^(\s+)(?:```)/);if(Ke===null)return Ee;const Se=Ke[1];return Ee.split(`
|
|
`).map($e=>{const Ze=$e.match(/^\s+/);if(Ze===null)return $e;const[lt]=Ze;return lt.length>=Se.length?$e.slice(Se.length):$e}).join(`
|
|
`)}let De=[],Qe=["<ul>"];const we=new(je()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ne(){De.length=0,Qe=["<ul>"]}const Ce={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function yt(me,Ee,Ke,Se){if(Ee>=me.length||me[Ee].level<=Ke)return Ee;var $e=me[Ee];Se.push("<li><a href='#"+be+$e.anchor+"'>"+$e.text+"</a>"),Ee++;var Ze=[];return Ee=yt(me,Ee,$e.level,Ze),Ze.length>0&&(Se.push("<ul>"),Ze.forEach(function(lt){Se.push(lt)}),Se.push("</ul>")),Se.push("</li>"),Ee=yt(me,Ee,Ke,Se),Ee}function Je(){return yt(De,0,0,Qe),Qe.push("</ul>"),Qe.join("")}const Ye={heading(me){const Ee=de.exec(me);if(be+=1,Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},fences(me){const Ee=this.rules.block.fences.exec(me);if(Ee){const Ke=Ee[0];let Se=he(Ke,Ee[3]||"");const $e=Ee[2]?Ee[2].trim():Ee[2];if(["latex","katex","math"].indexOf($e)>=0){const Ze=vt(),lt=Se;Se=Ze,mt[Ze]={type:"block",expression:lt}}return{type:"code",raw:Ke,lang:$e,text:Se}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Pe=0;const vt=()=>`__special_katext_id_${Pe++}__`;let mt={};function St(){return mt}function Fe(){Pe=0,mt={}}function ge(me){return me=me.replace(Re,(Ee,Ke)=>{const Se=vt();return mt[Se]={type:"inline",expression:Ke},Se}),me}const He=we.listitem;we.listitem=function(me){return He(ge(me))};const Ue=we.paragraph;we.paragraph=function(me){return Ue(ge(me))};const Dt=we.tablecell;we.tablecell=function(me,Ee){return Dt(ge(me),Ee)},we.code=function(me,Ee,Ke){const Se=(Ee||"").match(/\S*/)[0];return Se?["latex","katex","math"].indexOf(Se)>=0?`<p class='editormd-tex'>${me}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ee}">${Ke?me:(0,Ie.escape)(me,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ke?me:(0,Ie.escape)(me,!0))+"</code></pre>"},we.heading=function(me,Ee,Ke){let Se=this.options.headerPrefix+Ke.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return De.push({anchor:Se,level:Ee,text:me}),"<h"+Ee+' id="'+be+Se+'">'+me+"</h"+Ee+">"},je().setOptions({silent:!0,gfm:!0,pedantic:!1}),je().use({tokenizer:Ye,renderer:we}),an.ZP=je()},99498:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){ae.defineOption("placeholder","",function(Qe,we,de){var Ne=de&&de!=ae.Init;if(we&&!Ne)Qe.on("blur",be),Qe.on("change",he),Qe.on("swapDoc",he),ae.on(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose=function(){at(Qe)}),he(Qe);else if(!we&&Ne){Qe.off("blur",be),Qe.off("change",he),Qe.off("swapDoc",he),ae.off(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose),je(Qe);var Ce=Qe.getWrapperElement();Ce.className=Ce.className.replace(" CodeMirror-empty","")}we&&!Qe.hasFocus()&&be(Qe)});function je(Qe){Qe.state.placeholder&&(Qe.state.placeholder.parentNode.removeChild(Qe.state.placeholder),Qe.state.placeholder=null)}function Ie(Qe){je(Qe);var we=Qe.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Qe.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var de=Qe.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),we.appendChild(de),Qe.display.lineSpace.insertBefore(we,Qe.display.lineSpace.firstChild)}function at(Qe){setTimeout(function(){var we=!1,de=Qe.getInputField();de.nodeName=="TEXTAREA"?we=!de.value:Qe.lineCount()==1&&(we=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),we?Ie(Qe):je(Qe)},20)}function be(Qe){De(Qe)&&Ie(Qe)}function he(Qe){var we=Qe.getWrapperElement(),de=De(Qe);we.className=we.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Ie(Qe):je(Qe)}function De(Qe){return Qe.lineCount()===1&&Qe.getLine(0)===""}})},25717:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){var je={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ie=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(Ye,Re,Pe){Pe&&Pe!=ae.Init&&(Ye.removeKeyMap(be),Ye.state.closeBrackets=null),Re&&(he(at(Re,"pairs")),Ye.state.closeBrackets=Re,Ye.addKeyMap(be))});function at(Ye,Re){return Re=="pairs"&&typeof Ye=="string"?Ye:typeof Ye=="object"&&Ye[Re]!=null?Ye[Re]:je[Re]}var be={Backspace:we,Enter:de};function he(Ye){for(var Re=0;Re<Ye.length;Re++){var Pe=Ye.charAt(Re),vt="'"+Pe+"'";be[vt]||(be[vt]=De(Pe))}}he(je.pairs+"`");function De(Ye){return function(Re){return Ce(Re,Ye)}}function Qe(Ye){var Re=Ye.state.closeBrackets;if(!Re||Re.override)return Re;var Pe=Ye.getModeAt(Ye.getCursor());return Pe.closeBrackets||Re}function we(Ye){var Re=Qe(Ye);if(!Re||Ye.getOption("disableInput"))return ae.Pass;for(var Pe=at(Re,"pairs"),vt=Ye.listSelections(),mt=0;mt<vt.length;mt++){if(!vt[mt].empty())return ae.Pass;var St=yt(Ye,vt[mt].head);if(!St||Pe.indexOf(St)%2!=0)return ae.Pass}for(var mt=vt.length-1;mt>=0;mt--){var Fe=vt[mt].head;Ye.replaceRange("",Ie(Fe.line,Fe.ch-1),Ie(Fe.line,Fe.ch+1),"+delete")}}function de(Ye){var Re=Qe(Ye),Pe=Re&&at(Re,"explode");if(!Pe||Ye.getOption("disableInput"))return ae.Pass;for(var vt=Ye.listSelections(),mt=0;mt<vt.length;mt++){if(!vt[mt].empty())return ae.Pass;var St=yt(Ye,vt[mt].head);if(!St||Pe.indexOf(St)%2!=0)return ae.Pass}Ye.operation(function(){var Fe=Ye.lineSeparator()||`
|
|
`;Ye.replaceSelection(Fe+Fe,null),Ye.execCommand("goCharLeft"),vt=Ye.listSelections();for(var ge=0;ge<vt.length;ge++){var He=vt[ge].head.line;Ye.indentLine(He,null,!0),Ye.indentLine(He+1,null,!0)}})}function Ne(Ye){var Re=ae.cmpPos(Ye.anchor,Ye.head)>0;return{anchor:new Ie(Ye.anchor.line,Ye.anchor.ch+(Re?-1:1)),head:new Ie(Ye.head.line,Ye.head.ch+(Re?1:-1))}}function Ce(Ye,Re){var Pe=Qe(Ye);if(!Pe||Ye.getOption("disableInput"))return ae.Pass;var vt=at(Pe,"pairs"),mt=vt.indexOf(Re);if(mt==-1)return ae.Pass;for(var St=at(Pe,"closeBefore"),Fe=at(Pe,"triples"),ge=vt.charAt(mt+1)==Re,He=Ye.listSelections(),Ue=mt%2==0,Dt,me=0;me<He.length;me++){var Ee=He[me],Ke=Ee.head,Se,$e=Ye.getRange(Ke,Ie(Ke.line,Ke.ch+1));if(Ue&&!Ee.empty())Se="surround";else if((ge||!Ue)&&$e==Re)ge&&Je(Ye,Ke)?Se="both":Fe.indexOf(Re)>=0&&Ye.getRange(Ke,Ie(Ke.line,Ke.ch+3))==Re+Re+Re?Se="skipThree":Se="skip";else if(ge&&Ke.ch>1&&Fe.indexOf(Re)>=0&&Ye.getRange(Ie(Ke.line,Ke.ch-2),Ke)==Re+Re){if(Ke.ch>2&&/\bstring/.test(Ye.getTokenTypeAt(Ie(Ke.line,Ke.ch-2))))return ae.Pass;Se="addFour"}else if(ge){var Ze=Ke.ch==0?" ":Ye.getRange(Ie(Ke.line,Ke.ch-1),Ke);if(!ae.isWordChar($e)&&Ze!=Re&&!ae.isWordChar(Ze))Se="both";else return ae.Pass}else if(Ue&&($e.length===0||/\s/.test($e)||St.indexOf($e)>-1))Se="both";else return ae.Pass;if(!Dt)Dt=Se;else if(Dt!=Se)return ae.Pass}var lt=mt%2?vt.charAt(mt-1):Re,nn=mt%2?Re:vt.charAt(mt+1);Ye.operation(function(){if(Dt=="skip")Ye.execCommand("goCharRight");else if(Dt=="skipThree")for(var Ot=0;Ot<3;Ot++)Ye.execCommand("goCharRight");else if(Dt=="surround"){for(var Qt=Ye.getSelections(),Ot=0;Ot<Qt.length;Ot++)Qt[Ot]=lt+Qt[Ot]+nn;Ye.replaceSelections(Qt,"around"),Qt=Ye.listSelections().slice();for(var Ot=0;Ot<Qt.length;Ot++)Qt[Ot]=Ne(Qt[Ot]);Ye.setSelections(Qt)}else Dt=="both"?(Ye.replaceSelection(lt+nn,null),Ye.triggerElectric(lt+nn),Ye.execCommand("goCharLeft")):Dt=="addFour"&&(Ye.replaceSelection(lt+lt+lt+lt,"before"),Ye.execCommand("goCharRight"))})}function yt(Ye,Re){var Pe=Ye.getRange(Ie(Re.line,Re.ch-1),Ie(Re.line,Re.ch+1));return Pe.length==2?Pe:null}function Je(Ye,Re){var Pe=Ye.getTokenAt(Ie(Re.line,Re.ch+1));return/\bstring/.test(Pe.type)&&Pe.start==Re.ch&&(Re.ch==0||!/\bstring/.test(Ye.getTokenTypeAt(Re)))}})},6313:function(cn,an,ue){(function(ae){ae(ue(89780),ue(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(we,de,Ne){if(Ne!=ae.Init&&Ne&&we.removeKeyMap("autoCloseTags"),!!de){var Ce={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(Ce["'/'"]=function(yt){return he(yt)}),(typeof de!="object"||de.whenOpening!==!1)&&(Ce["'>'"]=function(yt){return at(yt)}),we.addKeyMap(Ce)}});var je=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ie=["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 at(we){if(we.getOption("disableInput"))return ae.Pass;for(var de=we.listSelections(),Ne=[],Ce=we.getOption("autoCloseTags"),yt=0;yt<de.length;yt++){if(!de[yt].empty())return ae.Pass;var Je=de[yt].head,Ye=we.getTokenAt(Je),Re=ae.innerMode(we.getMode(),Ye.state),Pe=Re.state,vt=Re.mode.xmlCurrentTag&&Re.mode.xmlCurrentTag(Pe),mt=vt&&vt.name;if(!mt)return ae.Pass;var St=Re.mode.configuration=="html",Fe=typeof Ce=="object"&&Ce.dontCloseTags||St&&je,ge=typeof Ce=="object"&&Ce.indentTags||St&&Ie;Ye.end>Je.ch&&(mt=mt.slice(0,mt.length-Ye.end+Je.ch));var He=mt.toLowerCase();if(!mt||Ye.type=="string"&&(Ye.end!=Je.ch||!/[\"\']/.test(Ye.string.charAt(Ye.string.length-1))||Ye.string.length==1)||Ye.type=="tag"&&vt.close||Ye.string.indexOf("/")==Je.ch-Ye.start-1||Fe&&De(Fe,He)>-1||Qe(we,Re.mode.xmlCurrentContext&&Re.mode.xmlCurrentContext(Pe)||[],mt,Je,!0))return ae.Pass;var Ue=typeof Ce=="object"&&Ce.emptyTags;if(Ue&&De(Ue,mt)>-1){Ne[yt]={text:"/>",newPos:ae.Pos(Je.line,Je.ch+2)};continue}var Dt=ge&&De(ge,He)>-1;Ne[yt]={indent:Dt,text:">"+(Dt?`
|
|
|
|
`:"")+"</"+mt+">",newPos:Dt?ae.Pos(Je.line+1,0):ae.Pos(Je.line,Je.ch+1)}}for(var me=typeof Ce=="object"&&Ce.dontIndentOnAutoClose,yt=de.length-1;yt>=0;yt--){var Ee=Ne[yt];we.replaceRange(Ee.text,de[yt].head,de[yt].anchor,"+insert");var Ke=we.listSelections().slice(0);Ke[yt]={head:Ee.newPos,anchor:Ee.newPos},we.setSelections(Ke),!me&&Ee.indent&&(we.indentLine(Ee.newPos.line,null,!0),we.indentLine(Ee.newPos.line+1,null,!0))}}function be(we,de){for(var Ne=we.listSelections(),Ce=[],yt=de?"/":"</",Je=we.getOption("autoCloseTags"),Ye=typeof Je=="object"&&Je.dontIndentOnSlash,Re=0;Re<Ne.length;Re++){if(!Ne[Re].empty())return ae.Pass;var Pe=Ne[Re].head,vt=we.getTokenAt(Pe),mt=ae.innerMode(we.getMode(),vt.state),St=mt.state;if(de&&(vt.type=="string"||vt.string.charAt(0)!="<"||vt.start!=Pe.ch-1))return ae.Pass;var Fe,ge=mt.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(ge&&mt.mode.name=="javascript")Fe=yt+"script";else if(ge&&mt.mode.name=="css")Fe=yt+"style";else{var He=mt.mode.xmlCurrentContext&&mt.mode.xmlCurrentContext(St);if(!He||He.length&&Qe(we,He,He[He.length-1],Pe))return ae.Pass;Fe=yt+He[He.length-1]}we.getLine(Pe.line).charAt(vt.end)!=">"&&(Fe+=">"),Ce[Re]=Fe}if(we.replaceSelections(Ce),Ne=we.listSelections(),!Ye)for(var Re=0;Re<Ne.length;Re++)(Re==Ne.length-1||Ne[Re].head.line<Ne[Re+1].head.line)&&we.indentLine(Ne[Re].head.line)}function he(we){return we.getOption("disableInput")?ae.Pass:be(we,!0)}ae.commands.closeTag=function(we){return be(we)};function De(we,de){if(we.indexOf)return we.indexOf(de);for(var Ne=0,Ce=we.length;Ne<Ce;++Ne)if(we[Ne]==de)return Ne;return-1}function Qe(we,de,Ne,Ce,yt){if(!ae.scanForClosingTag)return!1;var Je=Math.min(we.lastLine()+1,Ce.line+500),Ye=ae.scanForClosingTag(we,Ce,null,Je);if(!Ye||Ye.tag!=Ne)return!1;for(var Re=yt?1:0,Pe=de.length-1;Pe>=0&&de[Pe]==Ne;Pe--)++Re;Ce=Ye.to;for(var Pe=1;Pe<Re;Pe++){var vt=ae.scanForClosingTag(we,Ce,null,Je);if(!vt||vt.tag!=Ne)return!1;Ce=vt.to}return!0}})},32855:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";var je=ae.Pos;function Ie(Pe,vt){return Pe.line-vt.line||Pe.ch-vt.ch}var at="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",be=at+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",he=new RegExp("<(/?)(["+at+"]["+be+"]*)","g");function De(Pe,vt,mt,St){this.line=vt,this.ch=mt,this.cm=Pe,this.text=Pe.getLine(vt),this.min=St?Math.max(St.from,Pe.firstLine()):Pe.firstLine(),this.max=St?Math.min(St.to-1,Pe.lastLine()):Pe.lastLine()}function Qe(Pe,vt){var mt=Pe.cm.getTokenTypeAt(je(Pe.line,vt));return mt&&/\btag\b/.test(mt)}function we(Pe){if(!(Pe.line>=Pe.max))return Pe.ch=0,Pe.text=Pe.cm.getLine(++Pe.line),!0}function de(Pe){if(!(Pe.line<=Pe.min))return Pe.text=Pe.cm.getLine(--Pe.line),Pe.ch=Pe.text.length,!0}function Ne(Pe){for(;;){var vt=Pe.text.indexOf(">",Pe.ch);if(vt==-1){if(we(Pe))continue;return}if(!Qe(Pe,vt+1)){Pe.ch=vt+1;continue}var mt=Pe.text.lastIndexOf("/",vt),St=mt>-1&&!/\S/.test(Pe.text.slice(mt+1,vt));return Pe.ch=vt+1,St?"selfClose":"regular"}}function Ce(Pe){for(;;){var vt=Pe.ch?Pe.text.lastIndexOf("<",Pe.ch-1):-1;if(vt==-1){if(de(Pe))continue;return}if(!Qe(Pe,vt+1)){Pe.ch=vt;continue}he.lastIndex=vt,Pe.ch=vt;var mt=he.exec(Pe.text);if(mt&&mt.index==vt)return mt}}function yt(Pe){for(;;){he.lastIndex=Pe.ch;var vt=he.exec(Pe.text);if(!vt){if(we(Pe))continue;return}if(!Qe(Pe,vt.index+1)){Pe.ch=vt.index+1;continue}return Pe.ch=vt.index+vt[0].length,vt}}function Je(Pe){for(;;){var vt=Pe.ch?Pe.text.lastIndexOf(">",Pe.ch-1):-1;if(vt==-1){if(de(Pe))continue;return}if(!Qe(Pe,vt+1)){Pe.ch=vt;continue}var mt=Pe.text.lastIndexOf("/",vt),St=mt>-1&&!/\S/.test(Pe.text.slice(mt+1,vt));return Pe.ch=vt+1,St?"selfClose":"regular"}}function Ye(Pe,vt){for(var mt=[];;){var St=yt(Pe),Fe,ge=Pe.line,He=Pe.ch-(St?St[0].length:0);if(!St||!(Fe=Ne(Pe)))return;if(Fe!="selfClose")if(St[1]){for(var Ue=mt.length-1;Ue>=0;--Ue)if(mt[Ue]==St[2]){mt.length=Ue;break}if(Ue<0&&(!vt||vt==St[2]))return{tag:St[2],from:je(ge,He),to:je(Pe.line,Pe.ch)}}else mt.push(St[2])}}function Re(Pe,vt){for(var mt=[];;){var St=Je(Pe);if(!St)return;if(St=="selfClose"){Ce(Pe);continue}var Fe=Pe.line,ge=Pe.ch,He=Ce(Pe);if(!He)return;if(He[1])mt.push(He[2]);else{for(var Ue=mt.length-1;Ue>=0;--Ue)if(mt[Ue]==He[2]){mt.length=Ue;break}if(Ue<0&&(!vt||vt==He[2]))return{tag:He[2],from:je(Pe.line,Pe.ch),to:je(Fe,ge)}}}}ae.registerHelper("fold","xml",function(Pe,vt){for(var mt=new De(Pe,vt.line,0);;){var St=yt(mt);if(!St||mt.line!=vt.line)return;var Fe=Ne(mt);if(!Fe)return;if(!St[1]&&Fe!="selfClose"){var ge=je(mt.line,mt.ch),He=Ye(mt,St[2]);return He&&Ie(He.from,ge)>0?{from:ge,to:He.from}:null}}}),ae.findMatchingTag=function(Pe,vt,mt){var St=new De(Pe,vt.line,vt.ch,mt);if(!(St.text.indexOf(">")==-1&&St.text.indexOf("<")==-1)){var Fe=Ne(St),ge=Fe&&je(St.line,St.ch),He=Fe&&Ce(St);if(!(!Fe||!He||Ie(St,vt)>0)){var Ue={from:je(St.line,St.ch),to:ge,tag:He[2]};return Fe=="selfClose"?{open:Ue,close:null,at:"open"}:He[1]?{open:Re(St,He[2]),close:Ue,at:"close"}:(St=new De(Pe,ge.line,ge.ch,mt),{open:Ue,close:Ye(St,He[2]),at:"open"})}}},ae.findEnclosingTag=function(Pe,vt,mt,St){for(var Fe=new De(Pe,vt.line,vt.ch,mt);;){var ge=Re(Fe,St);if(!ge)break;var He=new De(Pe,vt.line,vt.ch,mt),Ue=Ye(He,ge.tag);if(Ue)return{open:ge,close:Ue}}},ae.scanForClosingTag=function(Pe,vt,mt,St){var Fe=new De(Pe,vt.line,vt.ch,St?{from:0,to:St}:null);return Ye(Fe,mt)}})},89780:function(cn){(function(an,ue){cn.exports=ue()})(this,function(){"use strict";var an=navigator.userAgent,ue=navigator.platform,ae=/gecko\/\d/i.test(an),je=/MSIE \d/.test(an),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(an),at=/Edge\/(\d+)/.exec(an),be=je||Ie||at,he=be&&(je?document.documentMode||6:+(at||Ie)[1]),De=!at&&/WebKit\//.test(an),Qe=De&&/Qt\/\d+\.\d+/.test(an),we=!at&&/Chrome\//.test(an),de=/Opera\//.test(an),Ne=/Apple Computer/.test(navigator.vendor),Ce=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(an),yt=/PhantomJS/.test(an),Je=!at&&/AppleWebKit/.test(an)&&/Mobile\/\w+/.test(an),Ye=/Android/.test(an),Re=Je||Ye||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(an),Pe=Je||/Mac/.test(ue),vt=/\bCrOS\b/.test(an),mt=/win/i.test(ue),St=de&&an.match(/Version\/(\d*\.\d*)/);St&&(St=Number(St[1])),St&&St>=15&&(de=!1,De=!0);var Fe=Pe&&(Qe||de&&(St==null||St<12.11)),ge=ae||be&&he>=9;function He(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var Ue=function(a,y){var b=a.className,x=He(y).exec(b);if(x){var E=b.slice(x.index+x[0].length);a.className=b.slice(0,x.index)+(E?x[1]+E:"")}};function Dt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function me(a,y){return Dt(a).appendChild(y)}function Ee(a,y,b,x){var E=document.createElement(a);if(b&&(E.className=b),x&&(E.style.cssText=x),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 Ke(a,y,b,x){var E=Ee(a,y,b,x);return E.setAttribute("role","presentation"),E}var Se;document.createRange?Se=function(a,y,b,x){var E=document.createRange();return E.setEnd(x||a,b),E.setStart(a,y),E}:Se=function(a,y,b){var x=document.body.createTextRange();try{x.moveToElementText(a.parentNode)}catch(E){return x}return x.collapse(!0),x.moveEnd("character",b),x.moveStart("character",y),x};function $e(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Ze(){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 lt(a,y){var b=a.className;He(y).test(b)||(a.className+=(b?" ":"")+y)}function nn(a,y){for(var b=a.split(" "),x=0;x<b.length;x++)b[x]&&!He(b[x]).test(y)&&(y+=" "+b[x]);return y}var Ot=function(a){a.select()};Je?Ot=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:be&&(Ot=function(a){try{a.select()}catch(y){}});function Qt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Ht(a,y,b){y||(y={});for(var x in a)a.hasOwnProperty(x)&&(b!==!1||!y.hasOwnProperty(x))&&(y[x]=a[x]);return y}function ye(a,y,b,x,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var te=x||0,ie=E||0;;){var se=a.indexOf(" ",te);if(se<0||se>=y)return ie+(y-te);ie+=se-te,ie+=b-ie%b,te=se+1}}var fe=function(){this.id=null,this.f=null,this.time=0,this.handler=Qt(this.onTimeout,this)};fe.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},fe.prototype.set=function(a,y){this.f=y;var b=+new Date+a;(!this.id||b<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=b)};function wt(a,y){for(var b=0;b<a.length;++b)if(a[b]==y)return b;return-1}var qt=50,Bt={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},gt={origin:"*mouse"},xt={origin:"+move"};function bn(a,y,b){for(var x=0,E=0;;){var te=a.indexOf(" ",x);te==-1&&(te=a.length);var ie=te-x;if(te==a.length||E+ie>=y)return x+Math.min(ie,y-E);if(E+=te-x,E+=b-E%b,x=te+1,E>=y)return x}}var Xe=[""];function Me(a){for(;Xe.length<=a;)Xe.push(ke(Xe)+" ");return Xe[a]}function ke(a){return a[a.length-1]}function Ve(a,y){for(var b=[],x=0;x<a.length;x++)b[x]=y(a[x],x);return b}function st(a,y,b){for(var x=0,E=b(y);x<a.length&&b(a[x])<=E;)x++;a.splice(x,0,y)}function Be(){}function tt(a,y){var b;return Object.create?b=Object.create(a):(Be.prototype=a,b=new Be),y&&Ht(y,b),b}var et=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Oe(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||et.test(a))}function dt(a,y){return y?y.source.indexOf("\\w")>-1&&Oe(a)?!0:y.test(a):Oe(a)}function ut(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var ve=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ct(a){return a.charCodeAt(0)>=768&&ve.test(a)}function Yt(a,y,b){for(;(b<0?y>0:y<a.length)&&ct(a.charAt(y));)y+=b;return y}function Vt(a,y,b){for(var x=y>b?-1:1;;){if(y==b)return y;var E=(y+b)/2,te=x<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:b;a(te)?b=te:y=te+x}}function oe(a,y,b,x){if(!a)return x(y,b,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var ie=a[te];(ie.from<b&&ie.to>y||y==b&&ie.to==y)&&(x(Math.max(ie.from,y),Math.min(ie.to,b),ie.level==1?"rtl":"ltr",te),E=!0)}E||x(y,b,"ltr")}var ee=null;function z(a,y,b){var x;ee=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&&b=="before"?x=E:ee=E),te.from==y&&(te.from!=te.to&&b!="before"?x=E:ee=E)}return x!=null?x:ee}var re=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function b(pe){return pe<=247?a.charAt(pe):1424<=pe&&pe<=1524?"R":1536<=pe&&pe<=1785?y.charAt(pe-1536):1774<=pe&&pe<=2220?"r":8192<=pe&&pe<=8203?"w":pe==8204?"b":"L"}var x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,te=/[LRr]/,ie=/[Lb1n]/,se=/[1n]/;function ce(pe,Ae,ze){this.level=pe,this.from=Ae,this.to=ze}return function(pe,Ae){var ze=Ae=="ltr"?"L":"R";if(pe.length==0||Ae=="ltr"&&!x.test(pe))return!1;for(var Ct=pe.length,pt=[],tn=0;tn<Ct;++tn)pt.push(b(pe.charCodeAt(tn)));for(var yn=0,Pn=ze;yn<Ct;++yn){var Zn=pt[yn];Zn=="m"?pt[yn]=Pn:Pn=Zn}for(var Yn=0,_n=ze;Yn<Ct;++Yn){var tr=pt[Yn];tr=="1"&&_n=="r"?pt[Yn]="n":te.test(tr)&&(_n=tr,tr=="r"&&(pt[Yn]="R"))}for(var wr=1,fr=pt[0];wr<Ct-1;++wr){var Gr=pt[wr];Gr=="+"&&fr=="1"&&pt[wr+1]=="1"?pt[wr]="1":Gr==","&&fr==pt[wr+1]&&(fr=="1"||fr=="n")&&(pt[wr]=fr),fr=Gr}for(var ui=0;ui<Ct;++ui){var Zi=pt[ui];if(Zi==",")pt[ui]="N";else if(Zi=="%"){var Ci=void 0;for(Ci=ui+1;Ci<Ct&&pt[Ci]=="%";++Ci);for(var ao=ui&&pt[ui-1]=="!"||Ci<Ct&&pt[Ci]=="1"?"1":"N",eo=ui;eo<Ci;++eo)pt[eo]=ao;ui=Ci-1}}for(var Mi=0,to=ze;Mi<Ct;++Mi){var Wi=pt[Mi];to=="L"&&Wi=="1"?pt[Mi]="L":te.test(Wi)&&(to=Wi)}for(var Bi=0;Bi<Ct;++Bi)if(E.test(pt[Bi])){var Pi=void 0;for(Pi=Bi+1;Pi<Ct&&E.test(pt[Pi]);++Pi);for(var Ei=(Bi?pt[Bi-1]:ze)=="L",no=(Pi<Ct?pt[Pi]:ze)=="L",Ca=Ei==no?Ei?"L":"R":ze,Xo=Bi;Xo<Pi;++Xo)pt[Xo]=Ca;Bi=Pi-1}for(var ji=[],So,_i=0;_i<Ct;)if(ie.test(pt[_i])){var Zl=_i;for(++_i;_i<Ct&&ie.test(pt[_i]);++_i);ji.push(new ce(0,Zl,_i))}else{var Fo=_i,ta=ji.length,na=Ae=="rtl"?1:0;for(++_i;_i<Ct&&pt[_i]!="L";++_i);for(var Xi=Fo;Xi<_i;)if(se.test(pt[Xi])){Fo<Xi&&(ji.splice(ta,0,new ce(1,Fo,Xi)),ta+=na);var wa=Xi;for(++Xi;Xi<_i&&se.test(pt[Xi]);++Xi);ji.splice(ta,0,new ce(2,wa,Xi)),ta+=na,Fo=Xi}else++Xi;Fo<_i&&ji.splice(ta,0,new ce(1,Fo,_i))}return Ae=="ltr"&&(ji[0].level==1&&(So=pe.match(/^\s+/))&&(ji[0].from=So[0].length,ji.unshift(new ce(0,0,So[0].length))),ke(ji).level==1&&(So=pe.match(/\s+$/))&&(ke(ji).to-=So[0].length,ji.push(new ce(0,Ct-So[0].length,Ct)))),Ae=="rtl"?ji.reverse():ji}}();function le(a,y){var b=a.order;return b==null&&(b=a.order=re(a.text,y)),b}var ne=[],xe=function(a,y,b){if(a.addEventListener)a.addEventListener(y,b,!1);else if(a.attachEvent)a.attachEvent("on"+y,b);else{var x=a._handlers||(a._handlers={});x[y]=(x[y]||ne).concat(b)}};function ot(a,y){return a._handlers&&a._handlers[y]||ne}function ft(a,y,b){if(a.removeEventListener)a.removeEventListener(y,b,!1);else if(a.detachEvent)a.detachEvent("on"+y,b);else{var x=a._handlers,E=x&&x[y];if(E){var te=wt(E,b);te>-1&&(x[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function nt(a,y){var b=ot(a,y);if(b.length)for(var x=Array.prototype.slice.call(arguments,2),E=0;E<b.length;++E)b[E].apply(null,x)}function Le(a,y,b){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),nt(a,b||y.type,a,y),Wt(y)||y.codemirrorIgnore}function Gt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var b=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),x=0;x<y.length;++x)wt(b,y[x])==-1&&b.push(y[x])}function Lt(a,y){return ot(a,y).length>0}function _t(a){a.prototype.on=function(y,b){xe(this,y,b)},a.prototype.off=function(y,b){ft(this,y,b)}}function hn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Nn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Wt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Ln(a){hn(a),Nn(a)}function nr(a){return a.target||a.srcElement}function $n(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Pe&&a.ctrlKey&&y==1&&(y=3),y}var It=function(){if(be&&he<9)return!1;var a=Ee("div");return"draggable"in a||"dragDrop"in a}(),Mt;function At(a){if(Mt==null){var y=Ee("span","\u200B");me(a,Ee("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Mt=y.offsetWidth<=1&&y.offsetHeight>2&&!(be&&he<8))}var b=Mt?Ee("span","\u200B"):Ee("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return b.setAttribute("cm-text",""),b}var Cn;function Sn(a){if(Cn!=null)return Cn;var y=me(a,document.createTextNode("A\u062EA")),b=Se(y,0,1).getBoundingClientRect(),x=Se(y,1,2).getBoundingClientRect();return Dt(a),!b||b.left==b.right?!1:Cn=x.right-b.right<3}var Wn=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,b=[],x=a.length;y<=x;){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?(b.push(te.slice(0,ie)),y+=ie+1):(b.push(te),y=E+1)}return b}:function(a){return a.split(/\r\n?|\n/)},rr=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(b){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},gn=function(){var a=Ee("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Jt=null;function Bn(a){if(Jt!=null)return Jt;var y=me(a,Ee("span","x")),b=y.getBoundingClientRect(),x=Se(y,0,1).getBoundingClientRect();return Jt=Math.abs(b.left-x.left)>1}var Sr={},rn={};function Mn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Sr[a]=y}function Rn(a,y){rn[a]=y}function Hn(a){if(typeof a=="string"&&rn.hasOwnProperty(a))a=rn[a];else if(a&&typeof a.name=="string"&&rn.hasOwnProperty(a.name)){var y=rn[a.name];typeof y=="string"&&(y={name:y}),a=tt(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Hn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Hn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Er(a,y){y=Hn(y);var b=Sr[y.name];if(!b)return Er(a,"text/plain");var x=b(a,y);if(mr.hasOwnProperty(y.name)){var E=mr[y.name];for(var te in E)E.hasOwnProperty(te)&&(x.hasOwnProperty(te)&&(x["_"+te]=x[te]),x[te]=E[te])}if(x.name=y.name,y.helperType&&(x.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)x[ie]=y.modeProps[ie];return x}var mr={};function Or(a,y){var b=mr.hasOwnProperty(a)?mr[a]:mr[a]={};Ht(y,b)}function yr(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var b={};for(var x in y){var E=y[x];E instanceof Array&&(E=E.concat([])),b[x]=E}return b}function ur(a,y){for(var b;a.innerMode&&(b=a.innerMode(y),!(!b||b.mode==a));)y=b.state,a=b.mode;return b||{mode:a,state:y}}function Mr(a,y,b){return a.startState?a.startState(y,b):!0}var vn=function(a,y,b){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=b};vn.prototype.eol=function(){return this.pos>=this.string.length},vn.prototype.sol=function(){return this.pos==this.lineStart},vn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},vn.prototype.eat=function(a){var y=this.string.charAt(this.pos),b;if(typeof a=="string"?b=y==a:b=y&&(a.test?a.test(y):a(y)),b)return++this.pos,y},vn.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},vn.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},vn.prototype.skipToEnd=function(){this.pos=this.string.length},vn.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},vn.prototype.backUp=function(a){this.pos-=a},vn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ye(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},vn.prototype.indentation=function(){return ye(this.string,null,this.tabSize)-(this.lineStart?ye(this.string,this.lineStart,this.tabSize):0)},vn.prototype.match=function(a,y,b){if(typeof a=="string"){var x=function(ie){return b?ie.toLowerCase():ie},E=this.string.substr(this.pos,a.length);if(x(E)==x(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)}},vn.prototype.current=function(){return this.string.slice(this.start,this.pos)},vn.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},vn.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},vn.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function kt(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 b=a;!b.lines;)for(var x=0;;++x){var E=b.children[x],te=E.chunkSize();if(y<te){b=E;break}y-=te}return b.lines[y]}function un(a,y,b){var x=[],E=y.line;return a.iter(y.line,b.line+1,function(te){var ie=te.text;E==b.line&&(ie=ie.slice(0,b.ch)),E==y.line&&(ie=ie.slice(y.ch)),x.push(ie),++E}),x}function qn(a,y,b){var x=[];return a.iter(y,b,function(E){x.push(E.text)}),x}function kr(a,y){var b=y-a.height;if(b)for(var x=a;x;x=x.parent)x.height+=b}function _e(a){if(a.parent==null)return null;for(var y=a.parent,b=wt(y.lines,a),x=y.parent;x;y=x,x=x.parent)for(var E=0;x.children[E]!=y;++E)b+=x.children[E].chunkSize();return b+y.first}function Ge(a,y){var b=a.first;e:do{for(var x=0;x<a.children.length;++x){var E=a.children[x],te=E.height;if(y<te){a=E;continue e}y-=te,b+=E.chunkSize()}return b}while(!a.lines);for(var ie=0;ie<a.lines.length;++ie){var se=a.lines[ie],ce=se.height;if(y<ce)break;y-=ce}return b+ie}function ln(a,y){return y>=a.first&&y<a.first+a.size}function Kt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function qe(a,y,b){if(b===void 0&&(b=null),!(this instanceof qe))return new qe(a,y,b);this.line=a,this.ch=y,this.sticky=b}function Xt(a,y){return a.line-y.line||a.ch-y.ch}function dn(a,y){return a.sticky==y.sticky&&Xt(a,y)==0}function pn(a){return qe(a.line,a.ch)}function En(a,y){return Xt(a,y)<0?y:a}function mn(a,y){return Xt(a,y)<0?a:y}function kn(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function $t(a,y){if(y.line<a.first)return qe(a.first,0);var b=a.first+a.size-1;return y.line>b?qe(b,kt(a,b).text.length):Ft(y,kt(a,y.line).text.length)}function Ft(a,y){var b=a.ch;return b==null||b>y?qe(a.line,y):b<0?qe(a.line,0):a}function Tn(a,y){for(var b=[],x=0;x<y.length;x++)b[x]=$t(a,y[x]);return b}var Fn=function(a,y){this.state=a,this.lookAhead=y},Vn=function(a,y,b,x){this.state=y,this.doc=a,this.line=b,this.maxLookAhead=x||0,this.baseTokens=null,this.baseTokenPos=1};Vn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Vn.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}},Vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Vn.fromSaved=function(a,y,b){return y instanceof Fn?new Vn(a,yr(a.mode,y.state),b,y.lookAhead):new Vn(a,yr(a.mode,y),b)},Vn.prototype.save=function(a){var y=a!==!1?yr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Fn(y,this.maxLookAhead):y};function Un(a,y,b,x){var E=[a.state.modeGen],te={};Fr(a,y.text,a.doc.mode,b,function(pe,Ae){return E.push(pe,Ae)},te,x);for(var ie=b.state,se=function(pe){b.baseTokens=E;var Ae=a.state.overlays[pe],ze=1,Ct=0;b.state=!0,Fr(a,y.text,Ae.mode,b,function(pt,tn){for(var yn=ze;Ct<pt;){var Pn=E[ze];Pn>pt&&E.splice(ze,1,pt,E[ze+1],Pn),ze+=2,Ct=Math.min(pt,Pn)}if(tn)if(Ae.opaque)E.splice(yn,ze-yn,pt,"overlay "+tn),ze=yn+2;else for(;yn<ze;yn+=2){var Zn=E[yn+1];E[yn+1]=(Zn?Zn+" ":"")+"overlay "+tn}},te),b.state=ie,b.baseTokens=null,b.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)se(ce);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function xr(a,y,b){if(!y.styles||y.styles[0]!=a.state.modeGen){var x=Nr(a,_e(y)),E=y.text.length>a.options.maxHighlightLength&&yr(a.doc.mode,x.state),te=Un(a,y,x);E&&(x.state=E),y.stateAfter=x.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.classes:y.styleClasses&&(y.styleClasses=null),b===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Nr(a,y,b){var x=a.doc,E=a.display;if(!x.mode.startState)return new Vn(x,!0,y);var te=Ur(a,y,b),ie=te>x.first&&kt(x,te-1).stateAfter,se=ie?Vn.fromSaved(x,ie,te):new Vn(x,Mr(x.mode),te);return x.iter(te,y,function(ce){Kn(a,ce.text,se);var pe=se.line;ce.stateAfter=pe==y-1||pe%5==0||pe>=E.viewFrom&&pe<E.viewTo?se.save():null,se.nextLine()}),b&&(x.modeFrontier=se.line),se}function Kn(a,y,b,x){var E=a.doc.mode,te=new vn(y,a.options.tabSize,b);for(te.start=te.pos=x||0,y==""&&wn(E,b.state);!te.eol();)Gn(E,te,b.state),te.start=te.pos}function wn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var b=ur(a,y);if(b.mode.blankLine)return b.mode.blankLine(b.state)}}function Gn(a,y,b,x){for(var E=0;E<10;E++){x&&(x[0]=ur(a,b).mode);var te=a.token(y,b);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var An=function(a,y,b){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=b};function Tr(a,y,b,x){var E=a.doc,te=E.mode,ie;y=$t(E,y);var se=kt(E,y.line),ce=Nr(a,y.line,b),pe=new vn(se.text,a.options.tabSize,ce),Ae;for(x&&(Ae=[]);(x||pe.pos<y.ch)&&!pe.eol();)pe.start=pe.pos,ie=Gn(te,pe,ce.state),x&&Ae.push(new An(pe,ie,yr(E.mode,ce.state)));return x?Ae:new An(pe,ie,ce.state)}function jr(a,y){if(a)for(;;){var b=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!b)break;a=a.slice(0,b.index)+a.slice(b.index+b[0].length);var x=b[1]?"bgClass":"textClass";y[x]==null?y[x]=b[2]:new RegExp("(?:^|\\s)"+b[2]+"(?:$|\\s)").test(y[x])||(y[x]+=" "+b[2])}return a}function Fr(a,y,b,x,E,te,ie){var se=b.flattenSpans;se==null&&(se=a.options.flattenSpans);var ce=0,pe=null,Ae=new vn(y,a.options.tabSize,x),ze,Ct=a.options.addModeClass&&[null];for(y==""&&jr(wn(b,x.state),te);!Ae.eol();){if(Ae.pos>a.options.maxHighlightLength?(se=!1,ie&&Kn(a,y,x,Ae.pos),Ae.pos=y.length,ze=null):ze=jr(Gn(b,Ae,x.state,Ct),te),Ct){var pt=Ct[0].name;pt&&(ze="m-"+(ze?pt+" "+ze:pt))}if(!se||pe!=ze){for(;ce<Ae.start;)ce=Math.min(Ae.start,ce+5e3),E(ce,pe);pe=ze}Ae.start=Ae.pos}for(;ce<Ae.pos;){var tn=Math.min(Ae.pos,ce+5e3);E(tn,pe),ce=tn}}function Ur(a,y,b){for(var x,E,te=a.doc,ie=b?-1:y-(a.doc.mode.innerMode?1e3:100),se=y;se>ie;--se){if(se<=te.first)return te.first;var ce=kt(te,se-1),pe=ce.stateAfter;if(pe&&(!b||se+(pe instanceof Fn?pe.lookAhead:0)<=te.modeFrontier))return se;var Ae=ye(ce.text,null,a.options.tabSize);(E==null||x>Ae)&&(E=se-1,x=Ae)}return E}function Jr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var b=a.first,x=y-1;x>b;x--){var E=kt(a,x).stateAfter;if(E&&(!(E instanceof Fn)||x+E.lookAhead<y)){b=x+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,b)}}var Vr=!1,Ir=!1;function ei(){Vr=!0}function Yr(){Ir=!0}function On(a,y,b){this.marker=a,this.from=y,this.to=b}function or(a,y){if(a)for(var b=0;b<a.length;++b){var x=a[b];if(x.marker==y)return x}}function Dr(a,y){for(var b,x=0;x<a.length;++x)a[x]!=y&&(b||(b=[])).push(a[x]);return b}function Zr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Br(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,se=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);if(se||te.from==y&&ie.type=="bookmark"&&(!b||!te.marker.insertLeft)){var ce=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);(x||(x=[])).push(new On(ie,te.from,ce?null:te.to))}}return x}function Wr(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var te=a[E],ie=te.marker,se=te.to==null||(ie.inclusiveRight?te.to>=y:te.to>y);if(se||te.from==y&&ie.type=="bookmark"&&(!b||te.marker.insertLeft)){var ce=te.from==null||(ie.inclusiveLeft?te.from<=y:te.from<y);(x||(x=[])).push(new On(ie,ce?null:te.from-y,te.to==null?null:te.to-y))}}return x}function oi(a,y){if(y.full)return null;var b=ln(a,y.from.line)&&kt(a,y.from.line).markedSpans,x=ln(a,y.to.line)&&kt(a,y.to.line).markedSpans;if(!b&&!x)return null;var E=y.from.ch,te=y.to.ch,ie=Xt(y.from,y.to)==0,se=Br(b,E,ie),ce=Wr(x,te,ie),pe=y.text.length==1,Ae=ke(y.text).length+(pe?E:0);if(se)for(var ze=0;ze<se.length;++ze){var Ct=se[ze];if(Ct.to==null){var pt=or(ce,Ct.marker);pt?pe&&(Ct.to=pt.to==null?null:pt.to+Ae):Ct.to=E}}if(ce)for(var tn=0;tn<ce.length;++tn){var yn=ce[tn];if(yn.to!=null&&(yn.to+=Ae),yn.from==null){var Pn=or(se,yn.marker);Pn||(yn.from=Ae,pe&&(se||(se=[])).push(yn))}else yn.from+=Ae,pe&&(se||(se=[])).push(yn)}se&&(se=Te(se)),ce&&ce!=se&&(ce=Te(ce));var Zn=[se];if(!pe){var Yn=y.text.length-2,_n;if(Yn>0&&se)for(var tr=0;tr<se.length;++tr)se[tr].to==null&&(_n||(_n=[])).push(new On(se[tr].marker,null,null));for(var wr=0;wr<Yn;++wr)Zn.push(_n);Zn.push(ce)}return Zn}function Te(a){for(var y=0;y<a.length;++y){var b=a[y];b.from!=null&&b.from==b.to&&b.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function bt(a,y,b){var x=null;if(a.iter(y.line,b.line+1,function(pt){if(pt.markedSpans)for(var tn=0;tn<pt.markedSpans.length;++tn){var yn=pt.markedSpans[tn].marker;yn.readOnly&&(!x||wt(x,yn)==-1)&&(x||(x=[])).push(yn)}}),!x)return null;for(var E=[{from:y,to:b}],te=0;te<x.length;++te)for(var ie=x[te],se=ie.find(0),ce=0;ce<E.length;++ce){var pe=E[ce];if(!(Xt(pe.to,se.from)<0||Xt(pe.from,se.to)>0)){var Ae=[ce,1],ze=Xt(pe.from,se.from),Ct=Xt(pe.to,se.to);(ze<0||!ie.inclusiveLeft&&!ze)&&Ae.push({from:pe.from,to:se.from}),(Ct>0||!ie.inclusiveRight&&!Ct)&&Ae.push({from:se.to,to:pe.to}),E.splice.apply(E,Ae),ce+=Ae.length-3}}return E}function it(a){var y=a.markedSpans;if(y){for(var b=0;b<y.length;++b)y[b].marker.detachLine(a);a.markedSpans=null}}function ht(a,y){if(y){for(var b=0;b<y.length;++b)y[b].marker.attachLine(a);a.markedSpans=y}}function Pt(a){return a.inclusiveLeft?-1:0}function Zt(a){return a.inclusiveRight?1:0}function fn(a,y){var b=a.lines.length-y.lines.length;if(b!=0)return b;var x=a.find(),E=y.find(),te=Xt(x.from,E.from)||Pt(a)-Pt(y);if(te)return-te;var ie=Xt(x.to,E.to)||Zt(a)-Zt(y);return ie||y.id-a.id}function en(a,y){var b=Ir&&a.markedSpans,x;if(b)for(var E=void 0,te=0;te<b.length;++te)E=b[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!x||fn(x,E.marker)<0)&&(x=E.marker);return x}function Ut(a){return en(a,!0)}function rt(a){return en(a,!1)}function Et(a,y){var b=Ir&&a.markedSpans,x;if(b)for(var E=0;E<b.length;++E){var te=b[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!x||fn(x,te.marker)<0)&&(x=te.marker)}return x}function Nt(a,y,b,x,E){var te=kt(a,y),ie=Ir&&te.markedSpans;if(ie)for(var se=0;se<ie.length;++se){var ce=ie[se];if(ce.marker.collapsed){var pe=ce.marker.find(0),Ae=Xt(pe.from,b)||Pt(ce.marker)-Pt(E),ze=Xt(pe.to,x)||Zt(ce.marker)-Zt(E);if(!(Ae>=0&&ze<=0||Ae<=0&&ze>=0)&&(Ae<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Xt(pe.to,b)>=0:Xt(pe.to,b)>0)||Ae>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?Xt(pe.from,x)<=0:Xt(pe.from,x)<0)))return!0}}}function Tt(a){for(var y;y=Ut(a);)a=y.find(-1,!0).line;return a}function zt(a){for(var y;y=rt(a);)a=y.find(1,!0).line;return a}function xn(a){for(var y,b;y=rt(a);)a=y.find(1,!0).line,(b||(b=[])).push(a);return b}function jt(a,y){var b=kt(a,y),x=Tt(b);return b==x?y:_e(x)}function Rt(a,y){if(y>a.lastLine())return y;var b=kt(a,y),x;if(!on(a,b))return y;for(;x=rt(b);)b=x.find(1,!0).line;return _e(b)+1}function on(a,y){var b=Ir&&y.markedSpans;if(b){for(var x=void 0,E=0;E<b.length;++E)if(x=b[E],!!x.marker.collapsed){if(x.from==null)return!0;if(!x.marker.widgetNode&&x.from==0&&x.marker.inclusiveLeft&&sn(a,y,x))return!0}}}function sn(a,y,b){if(b.to==null){var x=b.marker.find(1,!0);return sn(a,x.line,or(x.line.markedSpans,b.marker))}if(b.marker.inclusiveRight&&b.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==b.to&&(E.to==null||E.to!=b.from)&&(E.marker.inclusiveLeft||b.marker.inclusiveRight)&&sn(a,y,E))return!0}function Dn(a){a=Tt(a);for(var y=0,b=a.parent,x=0;x<b.lines.length;++x){var E=b.lines[x];if(E==a)break;y+=E.height}for(var te=b.parent;te;b=te,te=b.parent)for(var ie=0;ie<te.children.length;++ie){var se=te.children[ie];if(se==b)break;y+=se.height}return y}function jn(a){if(a.height==0)return 0;for(var y=a.text.length,b,x=a;b=Ut(x);){var E=b.find(0,!0);x=E.from.line,y+=E.from.ch-E.to.ch}for(x=a;b=rt(x);){var te=b.find(0,!0);y-=x.text.length-te.from.ch,x=te.to.line,y+=x.text.length-te.to.ch}return y}function In(a){var y=a.display,b=a.doc;y.maxLine=kt(b,b.first),y.maxLineLength=jn(y.maxLine),y.maxLineChanged=!0,b.iter(function(x){var E=jn(x);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=x)})}var lr=function(a,y,b){this.text=a,ht(this,y),this.height=b?b(this):1};lr.prototype.lineNo=function(){return _e(this)},_t(lr);function er(a,y,b,x){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),it(a),ht(a,b);var E=x?x(a):1;E!=a.height&&kr(a,E)}function ar(a){a.parent=null,it(a)}var dr={},sr={};function Pr(a,y){if(!a||/^\s*$/.test(a))return null;var b=y.addModeClass?sr:dr;return b[a]||(b[a]=a.replace(/\S+/g,"cm-$&"))}function hr(a,y){var b=Ke("span",null,null,De?"padding-right: .1px":null),x={pre:Ke("pre",[b],"CodeMirror-line"),content:b,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;x.pos=0,x.addToken=ir,Sn(a.display.measure)&&(ie=le(te,a.doc.direction))&&(x.addToken=Qn(x.addToken,ie)),x.map=[];var se=y!=a.display.externalMeasured&&_e(te);Xn(te,x,xr(a,te,se)),te.styleClasses&&(te.styleClasses.bgClass&&(x.bgClass=nn(te.styleClasses.bgClass,x.bgClass||"")),te.styleClasses.textClass&&(x.textClass=nn(te.styleClasses.textClass,x.textClass||""))),x.map.length==0&&x.map.push(0,0,x.content.appendChild(At(a.display.measure))),E==0?(y.measure.map=x.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(x.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(De){var ce=x.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(x.content.className="cm-tab-wrap-hack")}return nt(a,"renderLine",a,y.line,x.pre),x.pre.className&&(x.textClass=nn(x.pre.className,x.textClass||"")),x}function br(a){var y=Ee("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function ir(a,y,b,x,E,te,ie){if(y){var se=a.splitSpaces?zn(y,a.trailingSpace):y,ce=a.cm.state.specialChars,pe=!1,Ae;if(!ce.test(y))a.col+=y.length,Ae=document.createTextNode(se),a.map.push(a.pos,a.pos+y.length,Ae),be&&he<9&&(pe=!0),a.pos+=y.length;else{Ae=document.createDocumentFragment();for(var ze=0;;){ce.lastIndex=ze;var Ct=ce.exec(y),pt=Ct?Ct.index-ze:y.length-ze;if(pt){var tn=document.createTextNode(se.slice(ze,ze+pt));be&&he<9?Ae.appendChild(Ee("span",[tn])):Ae.appendChild(tn),a.map.push(a.pos,a.pos+pt,tn),a.col+=pt,a.pos+=pt}if(!Ct)break;ze+=pt+1;var yn=void 0;if(Ct[0]==" "){var Pn=a.cm.options.tabSize,Zn=Pn-a.col%Pn;yn=Ae.appendChild(Ee("span",Me(Zn),"cm-tab")),yn.setAttribute("role","presentation"),yn.setAttribute("cm-text"," "),a.col+=Zn}else Ct[0]=="\r"||Ct[0]==`
|
|
`?(yn=Ae.appendChild(Ee("span",Ct[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yn.setAttribute("cm-text",Ct[0]),a.col+=1):(yn=a.cm.options.specialCharPlaceholder(Ct[0]),yn.setAttribute("cm-text",Ct[0]),be&&he<9?Ae.appendChild(Ee("span",[yn])):Ae.appendChild(yn),a.col+=1);a.map.push(a.pos,a.pos+1,yn),a.pos++}}if(a.trailingSpace=se.charCodeAt(y.length-1)==32,b||x||E||pe||te||ie){var Yn=b||"";x&&(Yn+=x),E&&(Yn+=E);var _n=Ee("span",[Ae],Yn,te);if(ie)for(var tr in ie)ie.hasOwnProperty(tr)&&tr!="style"&&tr!="class"&&_n.setAttribute(tr,ie[tr]);return a.content.appendChild(_n)}a.content.appendChild(Ae)}}function zn(a,y){if(a.length>1&&!/ /.test(a))return a;for(var b=y,x="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&b&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),x+=te,b=te==" "}return x}function Qn(a,y){return function(b,x,E,te,ie,se,ce){E=E?E+" cm-force-border":"cm-force-border";for(var pe=b.pos,Ae=pe+x.length;;){for(var ze=void 0,Ct=0;Ct<y.length&&(ze=y[Ct],!(ze.to>pe&&ze.from<=pe));Ct++);if(ze.to>=Ae)return a(b,x,E,te,ie,se,ce);a(b,x.slice(0,ze.to-pe),E,te,null,se,ce),te=null,x=x.slice(ze.to-pe),pe=ze.to}}}function cr(a,y,b,x){var E=!x&&b.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!x&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",b.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function Xn(a,y,b){var x=a.markedSpans,E=a.text,te=0;if(!x){for(var ie=1;ie<b.length;ie+=2)y.addToken(y,E.slice(te,te=b[ie]),Pr(b[ie+1],y.cm.options));return}for(var se=E.length,ce=0,pe=1,Ae="",ze,Ct,pt=0,tn,yn,Pn,Zn,Yn;;){if(pt==ce){tn=yn=Pn=Ct="",Yn=null,Zn=null,pt=1/0;for(var _n=[],tr=void 0,wr=0;wr<x.length;++wr){var fr=x[wr],Gr=fr.marker;if(Gr.type=="bookmark"&&fr.from==ce&&Gr.widgetNode)_n.push(Gr);else if(fr.from<=ce&&(fr.to==null||fr.to>ce||Gr.collapsed&&fr.to==ce&&fr.from==ce)){if(fr.to!=null&&fr.to!=ce&&pt>fr.to&&(pt=fr.to,yn=""),Gr.className&&(tn+=" "+Gr.className),Gr.css&&(Ct=(Ct?Ct+";":"")+Gr.css),Gr.startStyle&&fr.from==ce&&(Pn+=" "+Gr.startStyle),Gr.endStyle&&fr.to==pt&&(tr||(tr=[])).push(Gr.endStyle,fr.to),Gr.title&&((Yn||(Yn={})).title=Gr.title),Gr.attributes)for(var ui in Gr.attributes)(Yn||(Yn={}))[ui]=Gr.attributes[ui];Gr.collapsed&&(!Zn||fn(Zn.marker,Gr)<0)&&(Zn=fr)}else fr.from>ce&&pt>fr.from&&(pt=fr.from)}if(tr)for(var Zi=0;Zi<tr.length;Zi+=2)tr[Zi+1]==pt&&(yn+=" "+tr[Zi]);if(!Zn||Zn.from==ce)for(var Ci=0;Ci<_n.length;++Ci)cr(y,0,_n[Ci]);if(Zn&&(Zn.from||0)==ce){if(cr(y,(Zn.to==null?se+1:Zn.to)-ce,Zn.marker,Zn.from==null),Zn.to==null)return;Zn.to==ce&&(Zn=!1)}}if(ce>=se)break;for(var ao=Math.min(se,pt);;){if(Ae){var eo=ce+Ae.length;if(!Zn){var Mi=eo>ao?Ae.slice(0,ao-ce):Ae;y.addToken(y,Mi,ze?ze+tn:tn,Pn,ce+Mi.length==pt?yn:"",Ct,Yn)}if(eo>=ao){Ae=Ae.slice(ao-ce),ce=ao;break}ce=eo,Pn=""}Ae=E.slice(te,te=b[pe++]),ze=Pr(b[pe++],y.cm.options)}}}function Cr(a,y,b){this.line=y,this.rest=xn(y),this.size=this.rest?_e(ke(this.rest))-b+1:1,this.node=this.text=null,this.hidden=on(a,y)}function Lr(a,y,b){for(var x=[],E,te=y;te<b;te=E){var ie=new Cr(a.doc,kt(a.doc,te),te);E=te+ie.size,x.push(ie)}return x}var Qr=null;function Li(a){Qr?Qr.ops.push(a):a.ownsGroup=Qr={ops:[a],delayedCallbacks:[]}}function wi(a){var y=a.delayedCallbacks,b=0;do{for(;b<y.length;b++)y[b].call(null);for(var x=0;x<a.ops.length;x++){var E=a.ops[x];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(b<y.length)}function yi(a,y){var b=a.ownsGroup;if(b)try{wi(b)}finally{Qr=null,y(b)}}var Ni=null;function $r(a,y){var b=ot(a,y);if(b.length){var x=Array.prototype.slice.call(arguments,2),E;Qr?E=Qr.delayedCallbacks:Ni?E=Ni:(E=Ni=[],setTimeout(Xr,0));for(var te=function(se){E.push(function(){return b[se].apply(null,x)})},ie=0;ie<b.length;++ie)te(ie)}}function Xr(){var a=Ni;Ni=null;for(var y=0;y<a.length;++y)a[y]()}function ti(a,y,b,x){for(var E=0;E<y.changes.length;E++){var te=y.changes[E];te=="text"?ai(a,y):te=="gutter"?pr(a,y,b,x):te=="class"?Jn(a,y):te=="widget"&&vr(a,y,x)}y.changes=null}function ki(a){return a.node==a.text&&(a.node=Ee("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),be&&he<8&&(a.node.style.zIndex=2)),a.node}function ii(a,y){var b=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),y.background)b?y.background.className=b:(y.background.parentNode.removeChild(y.background),y.background=null);else if(b){var x=ki(y);y.background=x.insertBefore(Ee("div",null,b),x.firstChild),a.display.input.setUneditable(y.background)}}function si(a,y){var b=a.display.externalMeasured;return b&&b.line==y.line?(a.display.externalMeasured=null,y.measure=b.measure,b.built):hr(a,y)}function ai(a,y){var b=y.text.className,x=si(a,y);y.text==y.node&&(y.node=x.pre),y.text.parentNode.replaceChild(x.pre,y.text),y.text=x.pre,x.bgClass!=y.bgClass||x.textClass!=y.textClass?(y.bgClass=x.bgClass,y.textClass=x.textClass,Jn(a,y)):b&&(y.text.className=b)}function Jn(a,y){ii(a,y),y.line.wrapClass?ki(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var b=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=b||""}function pr(a,y,b,x){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=ki(y);y.gutterBackground=Ee("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px; width: "+x.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=ki(y),se=y.gutter=Ee("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px");if(a.display.input.setUneditable(se),ie.insertBefore(se,y.text),y.line.gutterClass&&(se.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=se.appendChild(Ee("div",Kt(a.options,b),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+x.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var pe=a.display.gutterSpecs[ce].className,Ae=te.hasOwnProperty(pe)&&te[pe];Ae&&se.appendChild(Ee("div",[Ae],"CodeMirror-gutter-elt","left: "+x.gutterLeft[pe]+"px; width: "+x.gutterWidth[pe]+"px"))}}}function vr(a,y,b){y.alignable&&(y.alignable=null);for(var x=He("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,x.test(E.className)&&y.node.removeChild(E);Kr(a,y,b)}function gr(a,y,b,x){var E=si(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Jn(a,y),pr(a,y,b,x),Kr(a,y,x),y.node}function Kr(a,y,b){if(qr(a,y.line,y,b,!0),y.rest)for(var x=0;x<y.rest.length;x++)qr(a,y.rest[x],y,b,!1)}function qr(a,y,b,x,E){if(y.widgets)for(var te=ki(b),ie=0,se=y.widgets;ie<se.length;++ie){var ce=se[ie],pe=Ee("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),Ki(ce,pe,b,x),a.display.input.setUneditable(pe),E&&ce.above?te.insertBefore(pe,b.gutter||b.text):te.appendChild(pe),$r(ce,"redraw")}}function Ki(a,y,b,x){if(a.noHScroll){(b.alignable||(b.alignable=[])).push(y);var E=x.wrapperWidth;y.style.left=x.fixedPos+"px",a.coverGutter||(E-=x.gutterTotalWidth,y.style.paddingLeft=x.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-x.gutterTotalWidth+"px"))}function di(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!$e(document.body,a.node)){var b="position: relative;";a.coverGutter&&(b+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(b+="width: "+y.display.wrapper.clientWidth+"px;"),me(y.display.measure,Ee("div",[a.node],null,b))}return a.height=a.node.parentNode.offsetHeight}function ci(a,y){for(var b=nr(y);b!=a.wrapper;b=b.parentNode)if(!b||b.nodeType==1&&b.getAttribute("cm-ignore-events")=="true"||b.parentNode==a.sizer&&b!=a.mover)return!0}function Ar(a){return a.lineSpace.offsetTop}function xi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Vi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=me(a.measure,Ee("pre","x","CodeMirror-line-like")),b=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,x={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};return!isNaN(x.left)&&!isNaN(x.right)&&(a.cachedPaddingH=x),x}function ni(a){return qt-a.display.nativeBarWidth}function lo(a){return a.display.scroller.clientWidth-ni(a)-a.display.barWidth}function Ui(a){return a.display.scroller.clientHeight-ni(a)-a.display.barHeight}function Ji(a,y,b){var x=a.options.lineWrapping,E=x&&lo(a);if(!y.measure.heights||x&&y.measure.width!=E){var te=y.measure.heights=[];if(x){y.measure.width=E;for(var ie=y.text.firstChild.getClientRects(),se=0;se<ie.length-1;se++){var ce=ie[se],pe=ie[se+1];Math.abs(ce.bottom-pe.bottom)>2&&te.push((ce.bottom+pe.top)/2-b.top)}}te.push(b.bottom-b.top)}}function vi(a,y,b){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var x=0;x<a.rest.length;x++)if(a.rest[x]==y)return{map:a.measure.maps[x],cache:a.measure.caches[x]};for(var E=0;E<a.rest.length;E++)if(_e(a.rest[E])>b)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ra(a,y){y=Tt(y);var b=_e(y),x=a.display.externalMeasured=new Cr(a.doc,y,b);x.lineN=b;var E=x.built=hr(a,x);return x.text=E.pre,me(a.display.lineMeasure,E.pre),x}function Jo(a,y,b,x){return ro(a,mo(a,y),b,x)}function vo(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[Lo(a,y)];var b=a.display.externalMeasured;if(b&&y>=b.lineN&&y<b.lineN+b.size)return b}function mo(a,y){var b=_e(y),x=vo(a,b);x&&!x.text?x=null:x&&x.changes&&(ti(a,x,b,uo(a)),a.curOp.forceUpdate=!0),x||(x=ra(a,y));var E=vi(x,y,b);return{line:y,view:x,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function ro(a,y,b,x,E){y.before&&(b=-1);var te=b+(x||""),ie;return y.cache.hasOwnProperty(te)?ie=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Ji(a,y.view,y.rect),y.hasHeights=!0),ie=aa(a,y,b,x),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 Eo={left:0,right:0,top:0,bottom:0};function ia(a,y,b){for(var x,E,te,ie,se,ce,pe=0;pe<a.length;pe+=3)if(se=a[pe],ce=a[pe+1],y<se?(E=0,te=1,ie="left"):y<ce?(E=y-se,te=E+1):(pe==a.length-3||y==ce&&a[pe+3]>y)&&(te=ce-se,E=te-1,y>=ce&&(ie="right")),E!=null){if(x=a[pe+2],se==ce&&b==(x.insertLeft?"left":"right")&&(ie=b),b=="left"&&E==0)for(;pe&&a[pe-2]==a[pe-3]&&a[pe-1].insertLeft;)x=a[(pe-=3)+2],ie="left";if(b=="right"&&E==ce-se)for(;pe<a.length-3&&a[pe+3]==a[pe+4]&&!a[pe+5].insertLeft;)x=a[(pe+=3)+2],ie="right";break}return{node:x,start:E,end:te,collapse:ie,coverStart:se,coverEnd:ce}}function oa(a,y){var b=Eo;if(y=="left")for(var x=0;x<a.length&&(b=a[x]).left==b.right;x++);else for(var E=a.length-1;E>=0&&(b=a[E]).left==b.right;E--);return b}function aa(a,y,b,x){var E=ia(y.map,b,x),te=E.node,ie=E.start,se=E.end,ce=E.collapse,pe;if(te.nodeType==3){for(var Ae=0;Ae<4;Ae++){for(;ie&&ct(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+se<E.coverEnd&&ct(y.line.text.charAt(E.coverStart+se));)++se;if(be&&he<9&&ie==0&&se==E.coverEnd-E.coverStart?pe=te.parentNode.getBoundingClientRect():pe=oa(Se(te,ie,se).getClientRects(),x),pe.left||pe.right||ie==0)break;se=ie,ie=ie-1,ce="right"}be&&he<11&&(pe=Zo(a.display.measure,pe))}else{ie>0&&(ce=x="right");var ze;a.options.lineWrapping&&(ze=te.getClientRects()).length>1?pe=ze[x=="right"?ze.length-1:0]:pe=te.getBoundingClientRect()}if(be&&he<9&&!ie&&(!pe||!pe.left&&!pe.right)){var Ct=te.parentNode.getClientRects()[0];Ct?pe={left:Ct.left,right:Ct.left+Qi(a.display),top:Ct.top,bottom:Ct.bottom}:pe=Eo}for(var pt=pe.top-y.rect.top,tn=pe.bottom-y.rect.top,yn=(pt+tn)/2,Pn=y.view.measure.heights,Zn=0;Zn<Pn.length-1&&!(yn<Pn[Zn]);Zn++);var Yn=Zn?Pn[Zn-1]:0,_n=Pn[Zn],tr={left:(ce=="right"?pe.right:pe.left)-y.rect.left,right:(ce=="left"?pe.left:pe.right)-y.rect.left,top:Yn,bottom:_n};return!pe.left&&!pe.right&&(tr.bogus=!0),a.options.singleCursorHeightPerLine||(tr.rtop=pt,tr.rbottom=tn),tr}function Zo(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Bn(a))return y;var b=screen.logicalXDPI/screen.deviceXDPI,x=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*b,right:y.right*b,top:y.top*x,bottom:y.bottom*x}}function Qo(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 _o(a){a.display.externalMeasure=null,Dt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Qo(a.display.view[y])}function ko(a){_o(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function $o(){return we&&Ye?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function la(){return we&&Ye?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ho(a){var y=0;if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].above&&(y+=di(a.widgets[b]));return y}function Do(a,y,b,x,E){if(!E){var te=Ho(y);b.top+=te,b.bottom+=te}if(x=="line")return b;x||(x="local");var ie=Dn(y);if(x=="local"?ie+=Ar(a.display):ie-=a.display.viewOffset,x=="page"||x=="window"){var se=a.display.lineSpace.getBoundingClientRect();ie+=se.top+(x=="window"?0:la());var ce=se.left+(x=="window"?0:$o());b.left+=ce,b.right+=ce}return b.top+=ie,b.bottom+=ie,b}function To(a,y,b){if(b=="div")return y;var x=y.left,E=y.top;if(b=="page")x-=$o(),E-=la();else if(b=="local"||!b){var te=a.display.sizer.getBoundingClientRect();x+=te.left,E+=te.top}var ie=a.display.lineSpace.getBoundingClientRect();return{left:x-ie.left,top:E-ie.top}}function Hi(a,y,b,x,E){return x||(x=kt(a.doc,y.line)),Do(a,x,Jo(a,x,y.ch,E),b)}function fi(a,y,b,x,E,te){x=x||kt(a.doc,y.line),E||(E=mo(a,x));function ie(tn,yn){var Pn=ro(a,E,tn,yn?"right":"left",te);return yn?Pn.left=Pn.right:Pn.right=Pn.left,Do(a,x,Pn,b)}var se=le(x,a.doc.direction),ce=y.ch,pe=y.sticky;if(ce>=x.text.length?(ce=x.text.length,pe="before"):ce<=0&&(ce=0,pe="after"),!se)return ie(pe=="before"?ce-1:ce,pe=="before");function Ae(tn,yn,Pn){var Zn=se[yn],Yn=Zn.level==1;return ie(Pn?tn-1:tn,Yn!=Pn)}var ze=z(se,ce,pe),Ct=ee,pt=Ae(ce,ze,pe=="before");return Ct!=null&&(pt.other=Ae(ce,Ct,pe!="before")),pt}function zr(a,y){var b=0;y=$t(a.doc,y),a.options.lineWrapping||(b=Qi(a.display)*y.ch);var x=kt(a.doc,y.line),E=Dn(x)+Ar(a.display);return{left:b,right:b,top:E,bottom:E+x.height}}function Rr(a,y,b,x,E){var te=qe(a,y,b);return te.xRel=E,x&&(te.outside=x),te}function mi(a,y,b){var x=a.doc;if(b+=a.display.viewOffset,b<0)return Rr(x.first,0,null,-1,-1);var E=Ge(x,b),te=x.first+x.size-1;if(E>te)return Rr(x.first+x.size-1,kt(x,te).text.length,null,1,1);y<0&&(y=0);for(var ie=kt(x,E);;){var se=so(a,ie,E,y,b),ce=Et(ie,se.ch+(se.xRel>0||se.outside>0?1:0));if(!ce)return se;var pe=ce.find(1);if(pe.line==E)return pe;ie=kt(x,E=pe.line)}}function hi(a,y,b,x){x-=Ho(y);var E=y.text.length,te=Vt(function(ie){return ro(a,b,ie-1).bottom<=x},E,0);return E=Vt(function(ie){return ro(a,b,ie).top>x},te,E),{begin:te,end:E}}function bi(a,y,b,x){b||(b=mo(a,y));var E=Do(a,y,ro(a,b,x),"line").top;return hi(a,y,b,E)}function Di(a,y,b,x){return a.bottom<=b?!1:a.top>b?!0:(x?a.left:a.right)>y}function so(a,y,b,x,E){E-=Dn(y);var te=mo(a,y),ie=Ho(y),se=0,ce=y.text.length,pe=!0,Ae=le(y,a.doc.direction);if(Ae){var ze=(a.options.lineWrapping?go:io)(a,y,b,te,Ae,x,E);pe=ze.level!=1,se=pe?ze.from:ze.to-1,ce=pe?ze.to:ze.from-1}var Ct=null,pt=null,tn=Vt(function(wr){var fr=ro(a,te,wr);return fr.top+=ie,fr.bottom+=ie,Di(fr,x,E,!1)?(fr.top<=E&&fr.left<=x&&(Ct=wr,pt=fr),!0):!1},se,ce),yn,Pn,Zn=!1;if(pt){var Yn=x-pt.left<pt.right-x,_n=Yn==pe;tn=Ct+(_n?0:1),Pn=_n?"after":"before",yn=Yn?pt.left:pt.right}else{!pe&&(tn==ce||tn==se)&&tn++,Pn=tn==0?"after":tn==y.text.length?"before":ro(a,te,tn-(pe?1:0)).bottom+ie<=E==pe?"after":"before";var tr=fi(a,qe(b,tn,Pn),"line",y,te);yn=tr.left,Zn=E<tr.top?-1:E>=tr.bottom?1:0}return tn=Yt(y.text,tn,1),Rr(b,tn,Pn,Zn,x-yn)}function io(a,y,b,x,E,te,ie){var se=Vt(function(ze){var Ct=E[ze],pt=Ct.level!=1;return Di(fi(a,qe(b,pt?Ct.to:Ct.from,pt?"before":"after"),"line",y,x),te,ie,!0)},0,E.length-1),ce=E[se];if(se>0){var pe=ce.level!=1,Ae=fi(a,qe(b,pe?ce.from:ce.to,pe?"after":"before"),"line",y,x);Di(Ae,te,ie,!0)&&Ae.top>ie&&(ce=E[se-1])}return ce}function go(a,y,b,x,E,te,ie){var se=hi(a,y,x,ie),ce=se.begin,pe=se.end;/\s/.test(y.text.charAt(pe-1))&&pe--;for(var Ae=null,ze=null,Ct=0;Ct<E.length;Ct++){var pt=E[Ct];if(!(pt.from>=pe||pt.to<=ce)){var tn=pt.level!=1,yn=ro(a,x,tn?Math.min(pe,pt.to)-1:Math.max(ce,pt.from)).right,Pn=yn<te?te-yn+1e9:yn-te;(!Ae||ze>Pn)&&(Ae=pt,ze=Pn)}}return Ae||(Ae=E[E.length-1]),Ae.from<ce&&(Ae={from:ce,to:Ae.to,level:Ae.level}),Ae.to>pe&&(Ae={from:Ae.from,to:pe,level:Ae.level}),Ae}var pi;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(pi==null){pi=Ee("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)pi.appendChild(document.createTextNode("x")),pi.appendChild(Ee("br"));pi.appendChild(document.createTextNode("x"))}me(a.measure,pi);var b=pi.offsetHeight/50;return b>3&&(a.cachedTextHeight=b),Dt(a.measure),b||1}function Qi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ee("span","xxxxxxxxxx"),b=Ee("pre",[y],"CodeMirror-line-like");me(a.measure,b);var x=y.getBoundingClientRect(),E=(x.right-x.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function uo(a){for(var y=a.display,b={},x={},E=y.gutters.clientLeft,te=y.gutters.firstChild,ie=0;te;te=te.nextSibling,++ie){var se=a.display.gutterSpecs[ie].className;b[se]=te.offsetLeft+te.clientLeft+E,x[se]=te.clientWidth}return{fixedPos:qo(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:b,gutterWidth:x,wrapperWidth:y.wrapper.clientWidth}}function qo(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Sa(a){var y=Ai(a.display),b=a.options.lineWrapping,x=b&&Math.max(5,a.display.scroller.clientWidth/Qi(a.display)-3);return function(E){if(on(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 b?te+(Math.ceil(E.text.length/x)||1)*y:te+y}}function Ea(a){var y=a.doc,b=Sa(a);y.iter(function(x){var E=b(x);E!=x.height&&kr(x,E)})}function Co(a,y,b,x){var E=a.display;if(!b&&nr(y).getAttribute("cm-not-content")=="true")return null;var te,ie,se=E.lineSpace.getBoundingClientRect();try{te=y.clientX-se.left,ie=y.clientY-se.top}catch(ze){return null}var ce=mi(a,te,ie),pe;if(x&&ce.xRel>0&&(pe=kt(a.doc,ce.line).text).length==ce.ch){var Ae=ye(pe,pe.length,a.options.tabSize)-pe.length;ce=qe(ce.line,Math.max(0,Math.round((te-Vi(a.display).left)/Qi(a.display))-Ae))}return ce}function Lo(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var b=a.display.view,x=0;x<b.length;x++)if(y-=b[x].size,y<0)return x}function zi(a,y,b,x){y==null&&(y=a.doc.first),b==null&&(b=a.doc.first+a.doc.size),x||(x=0);var E=a.display;if(x&&b<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)Ir&&jt(a.doc,y)<E.viewTo&&$i(a);else if(b<=E.viewFrom)Ir&&Rt(a.doc,b+x)>E.viewFrom?$i(a):(E.viewFrom+=x,E.viewTo+=x);else if(y<=E.viewFrom&&b>=E.viewTo)$i(a);else if(y<=E.viewFrom){var te=sa(a,b,b+x,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.lineN,E.viewTo+=x):$i(a)}else if(b>=E.viewTo){var ie=sa(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):$i(a)}else{var se=sa(a,y,y,-1),ce=sa(a,b,b+x,1);se&&ce?(E.view=E.view.slice(0,se.index).concat(Lr(a,se.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=x):$i(a)}var pe=E.externalMeasured;pe&&(b<pe.lineN?pe.lineN+=x:y<pe.lineN+pe.size&&(E.externalMeasured=null))}function co(a,y,b){a.curOp.viewChanged=!0;var x=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(x.externalMeasured=null),!(y<x.viewFrom||y>=x.viewTo)){var te=x.view[Lo(a,y)];if(te.node!=null){var ie=te.changes||(te.changes=[]);wt(ie,b)==-1&&ie.push(b)}}}function $i(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function sa(a,y,b,x){var E=Lo(a,y),te,ie=a.display.view;if(!Ir||b==a.doc.first+a.doc.size)return{index:E,lineN:b};for(var se=a.display.viewFrom,ce=0;ce<E;ce++)se+=ie[ce].size;if(se!=y){if(x>0){if(E==ie.length-1)return null;te=se+ie[E].size-y,E++}else te=se-y;y+=te,b+=te}for(;jt(a.doc,b)!=b;){if(E==(x<0?0:ie.length-1))return null;b+=x*ie[E-(x<0?1:0)].size,E+=x}return{index:E,lineN:b}}function Qa(a,y,b){var x=a.display,E=x.view;E.length==0||y>=x.viewTo||b<=x.viewFrom?(x.view=Lr(a,y,b),x.viewFrom=y):(x.viewFrom>y?x.view=Lr(a,y,x.viewFrom).concat(x.view):x.viewFrom<y&&(x.view=x.view.slice(Lo(a,y))),x.viewFrom=y,x.viewTo<b?x.view=x.view.concat(Lr(a,x.viewTo,b)):x.viewTo>b&&(x.view=x.view.slice(0,Lo(a,b)))),x.viewTo=b}function $a(a){for(var y=a.display.view,b=0,x=0;x<y.length;x++){var E=y[x];!E.hidden&&(!E.node||E.changes)&&++b}return b}function zo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function qa(a,y){y===void 0&&(y=!0);for(var b=a.doc,x={},E=x.cursors=document.createDocumentFragment(),te=x.selection=document.createDocumentFragment(),ie=0;ie<b.sel.ranges.length;ie++)if(!(!y&&ie==b.sel.primIndex)){var se=b.sel.ranges[ie];if(!(se.from().line>=a.display.viewTo||se.to().line<a.display.viewFrom)){var ce=se.empty();(ce||a.options.showCursorWhenSelecting)&&ka(a,se.head,E),ce||el(a,se,te)}}return x}function ka(a,y,b){var x=fi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=b.appendChild(Ee("div","\xA0","CodeMirror-cursor"));if(E.style.left=x.left+"px",E.style.top=x.top+"px",E.style.height=Math.max(0,x.bottom-x.top)*a.options.cursorHeight+"px",x.other){var te=b.appendChild(Ee("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=x.other.left+"px",te.style.top=x.other.top+"px",te.style.height=(x.other.bottom-x.other.top)*.85+"px"}}function No(a,y){return a.top-y.top||a.left-y.left}function el(a,y,b){var x=a.display,E=a.doc,te=document.createDocumentFragment(),ie=Vi(a.display),se=ie.left,ce=Math.max(x.sizerWidth,lo(a)-x.sizer.offsetLeft)-ie.right,pe=E.direction=="ltr";function Ae(_n,tr,wr,fr){tr<0&&(tr=0),tr=Math.round(tr),fr=Math.round(fr),te.appendChild(Ee("div",null,"CodeMirror-selected","position: absolute; left: "+_n+`px;
|
|
top: `+tr+"px; width: "+(wr==null?ce-_n:wr)+`px;
|
|
height: `+(fr-tr)+"px"))}function ze(_n,tr,wr){var fr=kt(E,_n),Gr=fr.text.length,ui,Zi;function Ci(Mi,to){return Hi(a,qe(_n,Mi),"div",fr,to)}function ao(Mi,to,Wi){var Bi=bi(a,fr,null,Mi),Pi=to=="ltr"==(Wi=="after")?"left":"right",Ei=Wi=="after"?Bi.begin:Bi.end-(/\s/.test(fr.text.charAt(Bi.end-1))?2:1);return Ci(Ei,Pi)[Pi]}var eo=le(fr,E.direction);return oe(eo,tr||0,wr==null?Gr:wr,function(Mi,to,Wi,Bi){var Pi=Wi=="ltr",Ei=Ci(Mi,Pi?"left":"right"),no=Ci(to-1,Pi?"right":"left"),Ca=tr==null&&Mi==0,Xo=wr==null&&to==Gr,ji=Bi==0,So=!eo||Bi==eo.length-1;if(no.top-Ei.top<=3){var _i=(pe?Ca:Xo)&&ji,Zl=(pe?Xo:Ca)&&So,Fo=_i?se:(Pi?Ei:no).left,ta=Zl?ce:(Pi?no:Ei).right;Ae(Fo,Ei.top,ta-Fo,Ei.bottom)}else{var na,Xi,wa,_l;Pi?(na=pe&&Ca&&ji?se:Ei.left,Xi=pe?ce:ao(Mi,Wi,"before"),wa=pe?se:ao(to,Wi,"after"),_l=pe&&Xo&&So?ce:no.right):(na=pe?ao(Mi,Wi,"before"):se,Xi=!pe&&Ca&&ji?ce:Ei.right,wa=!pe&&Xo&&So?se:no.left,_l=pe?ao(to,Wi,"after"):ce),Ae(na,Ei.top,Xi-na,Ei.bottom),Ei.bottom<no.top&&Ae(se,Ei.bottom,null,no.top),Ae(wa,no.top,_l-wa,no.bottom)}(!ui||No(Ei,ui)<0)&&(ui=Ei),No(no,ui)<0&&(ui=no),(!Zi||No(Ei,Zi)<0)&&(Zi=Ei),No(no,Zi)<0&&(Zi=no)}),{start:ui,end:Zi}}var Ct=y.from(),pt=y.to();if(Ct.line==pt.line)ze(Ct.line,Ct.ch,pt.ch);else{var tn=kt(E,Ct.line),yn=kt(E,pt.line),Pn=Tt(tn)==Tt(yn),Zn=ze(Ct.line,Ct.ch,Pn?tn.text.length+1:null).end,Yn=ze(pt.line,Pn?0:null,pt.ch).start;Pn&&(Zn.top<Yn.top-2?(Ae(Zn.right,Zn.top,null,Zn.bottom),Ae(se,Yn.top,Yn.left,Yn.bottom)):Ae(Zn.right,Zn.top,Yn.left-Zn.right,Zn.bottom)),Zn.bottom<Yn.top&&Ae(se,Zn.bottom,null,Yn.top)}b.appendChild(te)}function Da(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var b=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Wo(a),y.cursorDiv.style.visibility=(b=!b)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Ta(a){a.state.focused||(a.display.input.focus(),Na(a))}function La(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Wo(a))},100)}function Na(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(nt(a,"focus",a,y),a.state.focused=!0,lt(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),De&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Da(a))}function Wo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(nt(a,"blur",a,y),a.state.focused=!1,Ue(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function ua(a){for(var y=a.display,b=y.lineDiv.offsetTop,x=0;x<y.view.length;x++){var E=y.view[x],te=a.options.lineWrapping,ie=void 0,se=0;if(!E.hidden){if(be&&he<8){var ce=E.node.offsetTop+E.node.offsetHeight;ie=ce-b,b=ce}else{var pe=E.node.getBoundingClientRect();ie=pe.bottom-pe.top,!te&&E.text.firstChild&&(se=E.text.firstChild.getBoundingClientRect().right-pe.left-1)}var Ae=E.line.height-ie;if((Ae>.005||Ae<-.005)&&(kr(E.line,ie),Ma(E.line),E.rest))for(var ze=0;ze<E.rest.length;ze++)Ma(E.rest[ze]);if(se>a.display.sizerWidth){var Ct=Math.ceil(se/Qi(a.display));Ct>a.display.maxLineLength&&(a.display.maxLineLength=Ct,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ma(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var b=a.widgets[y],x=b.node.parentNode;x&&(b.height=x.offsetHeight)}}function Mo(a,y,b){var x=b&&b.top!=null?Math.max(0,b.top):a.scroller.scrollTop;x=Math.floor(x-Ar(a));var E=b&&b.bottom!=null?b.bottom:x+a.wrapper.clientHeight,te=Ge(y,x),ie=Ge(y,E);if(b&&b.ensure){var se=b.ensure.from.line,ce=b.ensure.to.line;se<te?(te=se,ie=Ge(y,Dn(kt(y,se))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=ie&&(te=Ge(y,Dn(kt(y,ce))-a.wrapper.clientHeight),ie=ce)}return{from:te,to:Math.max(ie,te+1)}}function Pa(a,y){if(!Le(a,"scrollCursorIntoView")){var b=a.display,x=b.sizer.getBoundingClientRect(),E=null;if(y.top+x.top<0?E=!0:y.bottom+x.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!yt){var te=Ee("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-b.viewOffset-Ar(a.display))+`px;
|
|
height: `+(y.bottom-y.top+ni(a)+b.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 Aa(a,y,b,x){x==null&&(x=0);var E;!a.options.lineWrapping&&y==b&&(y=y.ch?qe(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,b=y.sticky=="before"?qe(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var ie=!1,se=fi(a,y),ce=!b||b==y?se:fi(a,b);E={left:Math.min(se.left,ce.left),top:Math.min(se.top,ce.top)-x,right:Math.max(se.left,ce.left),bottom:Math.max(se.bottom,ce.bottom)+x};var pe=ca(a,E),Ae=a.doc.scrollTop,ze=a.doc.scrollLeft;if(pe.scrollTop!=null&&(Ao(a,pe.scrollTop),Math.abs(a.doc.scrollTop-Ae)>1&&(ie=!0)),pe.scrollLeft!=null&&(Ro(a,pe.scrollLeft),Math.abs(a.doc.scrollLeft-ze)>1&&(ie=!0)),!ie)break}return E}function tl(a,y){var b=ca(a,y);b.scrollTop!=null&&Ao(a,b.scrollTop),b.scrollLeft!=null&&Ro(a,b.scrollLeft)}function ca(a,y){var b=a.display,x=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:b.scroller.scrollTop,te=Ui(a),ie={};y.bottom-y.top>te&&(y.bottom=y.top+te);var se=a.doc.height+xi(b),ce=y.top<x,pe=y.bottom>se-x;if(y.top<E)ie.scrollTop=ce?0:y.top;else if(y.bottom>E+te){var Ae=Math.min(y.top,(pe?se:y.bottom)-te);Ae!=E&&(ie.scrollTop=Ae)}var ze=a.options.fixedGutter?0:b.gutters.offsetWidth,Ct=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:b.scroller.scrollLeft-ze,pt=lo(a)-b.gutters.offsetWidth,tn=y.right-y.left>pt;return tn&&(y.right=y.left+pt),y.left<10?ie.scrollLeft=0:y.left<Ct?ie.scrollLeft=Math.max(0,y.left+ze-(tn?0:10)):y.right>pt+Ct-3&&(ie.scrollLeft=y.right+(tn?0:10)-pt),ie}function da(a,y){y!=null&&(Ko(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Po(a){Ko(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function ea(a,y,b){(y!=null||b!=null)&&Ko(a),y!=null&&(a.curOp.scrollLeft=y),b!=null&&(a.curOp.scrollTop=b)}function nl(a,y){Ko(a),a.curOp.scrollToPos=y}function Ko(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var b=zr(a,y.from),x=zr(a,y.to);Ra(a,b,x,y.margin)}}function Ra(a,y,b,x){var E=ca(a,{left:Math.min(y.left,b.left),top:Math.min(y.top,b.top)-x,right:Math.max(y.right,b.right),bottom:Math.max(y.bottom,b.bottom)+x});ea(a,E.scrollLeft,E.scrollTop)}function Ao(a,y){Math.abs(a.doc.scrollTop-y)<2||(ae||xl(a,{top:y}),Ba(a,y,!0),ae&&xl(a),Ia(a,100))}function Ba(a,y,b){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!b)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Ro(a,y,b,x){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((b?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!x)&&(a.doc.scrollLeft=y,zl(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function _r(a){var y=a.display,b=y.gutters.offsetWidth,x=Math.round(a.doc.height+xi(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?b:0,docHeight:x,scrollHeight:x+ni(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:b}}var Hr=function(a,y,b){this.cm=b;var x=this.vert=Ee("div",[Ee("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ee("div",[Ee("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");x.tabIndex=E.tabIndex=-1,a(x),a(E),xe(x,"scroll",function(){x.clientHeight&&y(x.scrollTop,"vertical")}),xe(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&he<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Hr.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,b=a.scrollHeight>a.clientHeight+1,x=a.nativeBarWidth;if(b){this.vert.style.display="block",this.vert.style.bottom=y?x+"px":"0";var E=a.viewHeight-(y?x: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=b?x+"px":"0",this.horiz.style.left=a.barLeft+"px";var te=a.viewWidth-a.barLeft-(b?x: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&&(x==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:b?x:0,bottom:y?x:0}},Hr.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Hr.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Hr.prototype.zeroWidthHack=function(){var a=Pe&&!Ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new fe,this.disableVert=new fe},Hr.prototype.enableZeroWidthBar=function(a,y,b){a.style.pointerEvents="auto";function x(){var E=a.getBoundingClientRect(),te=b=="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,x)}y.set(1e3,x)},Hr.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Si=function(){};Si.prototype.update=function(){return{bottom:0,right:0}},Si.prototype.setScrollLeft=function(){},Si.prototype.setScrollTop=function(){},Si.prototype.clear=function(){};function Ii(a,y){y||(y=_r(a));var b=a.display.barWidth,x=a.display.barHeight;Ri(a,y);for(var E=0;E<4&&b!=a.display.barWidth||x!=a.display.barHeight;E++)b!=a.display.barWidth&&a.options.lineWrapping&&ua(a),Ri(a,_r(a)),b=a.display.barWidth,x=a.display.barHeight}function Ri(a,y){var b=a.display,x=b.scrollbars.update(y);b.sizer.style.paddingRight=(b.barWidth=x.right)+"px",b.sizer.style.paddingBottom=(b.barHeight=x.bottom)+"px",b.heightForcer.style.borderBottom=x.bottom+"px solid transparent",x.right&&x.bottom?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=x.bottom+"px",b.scrollbarFiller.style.width=x.right+"px"):b.scrollbarFiller.style.display="",x.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=x.bottom+"px",b.gutterFiller.style.width=y.gutterWidth+"px"):b.gutterFiller.style.display=""}var Bo={native:Hr,null:Si};function wo(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ue(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Bo[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),xe(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,b){b=="horizontal"?Ro(a,y):Ao(a,y)},a),a.display.scrollbars.addClass&<(a.display.wrapper,a.display.scrollbars.addClass)}var Io=0;function fo(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:++Io},Li(a.curOp)}function yo(a){var y=a.curOp;y&&yi(y,function(b){for(var x=0;x<b.ops.length;x++)b.ops[x].cm.curOp=null;Vs(b)})}function Vs(a){for(var y=a.ops,b=0;b<y.length;b++)Us(y[b]);for(var x=0;x<y.length;x++)Ys(y[x]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var te=0;te<y.length;te++)Js(y[te]);for(var ie=0;ie<y.length;ie++)Qs(y[ie])}function Us(a){var y=a.cm,b=y.display;qs(y),a.updateMaxLine&&In(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<b.viewFrom||a.scrollToPos.to.line>=b.viewTo)||b.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new rl(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&yl(a.cm,a.update)}function Xs(a){var y=a.cm,b=y.display;a.updatedDisplay&&ua(y),a.barMeasure=_r(y),b.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=Jo(y,b.maxLine,b.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(b.scroller.clientWidth,b.sizer.offsetLeft+a.adjustWidthTo+ni(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,b.sizer.offsetLeft+a.adjustWidthTo-lo(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=b.input.prepareSelection())}function Js(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Ro(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var b=a.focus&&a.focus==Ze();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,b),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Ii(y,a.barMeasure),a.updatedDisplay&&Cl(y,a.barMeasure),a.selectionChanged&&Da(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),b&&Ta(a.cm)}function Qs(a){var y=a.cm,b=y.display,x=y.doc;if(a.updatedDisplay&&Hl(y,a.update),b.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(b.wheelStartX=b.wheelStartY=null),a.scrollTop!=null&&Ba(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Ro(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Aa(y,$t(x,a.scrollToPos.from),$t(x,a.scrollToPos.to),a.scrollToPos.margin);Pa(y,E)}var te=a.maybeHiddenMarkers,ie=a.maybeUnhiddenMarkers;if(te)for(var se=0;se<te.length;++se)te[se].lines.length||nt(te[se],"hide");if(ie)for(var ce=0;ce<ie.length;++ce)ie[ce].lines.length&&nt(ie[ce],"unhide");b.wrapper.offsetHeight&&(x.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&nt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function oo(a,y){if(a.curOp)return y();fo(a);try{return y()}finally{yo(a)}}function Oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);fo(a);try{return y.apply(a,arguments)}finally{yo(a)}}}function Yi(a){return function(){if(this.curOp)return a.apply(this,arguments);fo(this);try{return a.apply(this,arguments)}finally{yo(this)}}}function Fi(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);fo(y);try{return a.apply(this,arguments)}finally{yo(y)}}}function Ia(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Qt($s,a))}function $s(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var b=+new Date+a.options.workTime,x=Nr(a,y.highlightFrontier),E=[];y.iter(x.line,Math.min(y.first+y.size,a.display.viewTo+500),function(te){if(x.line>=a.display.viewFrom){var ie=te.styles,se=te.text.length>a.options.maxHighlightLength?yr(y.mode,x.state):null,ce=Un(a,te,x,!0);se&&(x.state=se),te.styles=ce.styles;var pe=te.styleClasses,Ae=ce.classes;Ae?te.styleClasses=Ae:pe&&(te.styleClasses=null);for(var ze=!ie||ie.length!=te.styles.length||pe!=Ae&&(!pe||!Ae||pe.bgClass!=Ae.bgClass||pe.textClass!=Ae.textClass),Ct=0;!ze&&Ct<ie.length;++Ct)ze=ie[Ct]!=te.styles[Ct];ze&&E.push(x.line),te.stateAfter=x.save(),x.nextLine()}else te.text.length<=a.options.maxHighlightLength&&Kn(a,te.text,x),te.stateAfter=x.line%5==0?x.save():null,x.nextLine();if(+new Date>b)return Ia(a,a.options.workDelay),!0}),y.highlightFrontier=x.line,y.modeFrontier=Math.max(y.modeFrontier,x.line),E.length&&oo(a,function(){for(var te=0;te<E.length;te++)co(a,E[te],"text")})}}var rl=function(a,y,b){var x=a.display;this.viewport=y,this.visible=Mo(x,a.doc,y),this.editorIsHidden=!x.wrapper.offsetWidth,this.wrapperHeight=x.wrapper.clientHeight,this.wrapperWidth=x.wrapper.clientWidth,this.oldDisplayWidth=lo(a),this.force=b,this.dims=uo(a),this.events=[]};rl.prototype.signal=function(a,y){Lt(a,y)&&this.events.push(arguments)},rl.prototype.finish=function(){for(var a=0;a<this.events.length;a++)nt.apply(null,this.events[a])};function qs(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=ni(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=ni(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ze();if(!y||!$e(a.display.lineDiv,y))return null;var b={activeElt:y};if(window.getSelection){var x=window.getSelection();x.anchorNode&&x.extend&&$e(a.display.lineDiv,x.anchorNode)&&(b.anchorNode=x.anchorNode,b.anchorOffset=x.anchorOffset,b.focusNode=x.focusNode,b.focusOffset=x.focusOffset)}return b}function tu(a){if(!(!a||!a.activeElt||a.activeElt==Ze())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&$e(document.body,a.anchorNode)&&$e(document.body,a.focusNode))){var y=window.getSelection(),b=document.createRange();b.setEnd(a.anchorNode,a.anchorOffset),b.collapse(!1),y.removeAllRanges(),y.addRange(b),y.extend(a.focusNode,a.focusOffset)}}function yl(a,y){var b=a.display,x=a.doc;if(y.editorIsHidden)return $i(a),!1;if(!y.force&&y.visible.from>=b.viewFrom&&y.visible.to<=b.viewTo&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo)&&b.renderedView==b.view&&$a(a)==0)return!1;Wl(a)&&($i(a),y.dims=uo(a));var E=x.first+x.size,te=Math.max(y.visible.from-a.options.viewportMargin,x.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);b.viewFrom<te&&te-b.viewFrom<20&&(te=Math.max(x.first,b.viewFrom)),b.viewTo>ie&&b.viewTo-ie<20&&(ie=Math.min(E,b.viewTo)),Ir&&(te=jt(a.doc,te),ie=Rt(a.doc,ie));var se=te!=b.viewFrom||ie!=b.viewTo||b.lastWrapHeight!=y.wrapperHeight||b.lastWrapWidth!=y.wrapperWidth;Qa(a,te,ie),b.viewOffset=Dn(kt(a.doc,b.viewFrom)),a.display.mover.style.top=b.viewOffset+"px";var ce=$a(a);if(!se&&ce==0&&!y.force&&b.renderedView==b.view&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo))return!1;var pe=eu(a);return ce>4&&(b.lineDiv.style.display="none"),nu(a,b.updateLineNumbers,y.dims),ce>4&&(b.lineDiv.style.display=""),b.renderedView=b.view,tu(pe),Dt(b.cursorDiv),Dt(b.selectionDiv),b.gutters.style.height=b.sizer.style.minHeight=0,se&&(b.lastWrapHeight=y.wrapperHeight,b.lastWrapWidth=y.wrapperWidth,Ia(a,400)),b.updateLineNumbers=null,!0}function Hl(a,y){for(var b=y.viewport,x=!0;;x=!1){if(!x||!a.options.lineWrapping||y.oldDisplayWidth==lo(a)){if(b&&b.top!=null&&(b={top:Math.min(a.doc.height+xi(a.display)-Ui(a),b.top)}),y.visible=Mo(a.display,a.doc,b),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else x&&(y.visible=Mo(a.display,a.doc,b));if(!yl(a,y))break;ua(a);var E=_r(a);zo(a),Ii(a,E),Cl(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 xl(a,y){var b=new rl(a,y);if(yl(a,b)){ua(a),Hl(a,b);var x=_r(a);zo(a),Ii(a,x),Cl(a,x),b.finish()}}function nu(a,y,b){var x=a.display,E=a.options.lineNumbers,te=x.lineDiv,ie=te.firstChild;function se(tn){var yn=tn.nextSibling;return De&&Pe&&a.display.currentWheelTarget==tn?tn.style.display="none":tn.parentNode.removeChild(tn),yn}for(var ce=x.view,pe=x.viewFrom,Ae=0;Ae<ce.length;Ae++){var ze=ce[Ae];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=te){var Ct=gr(a,ze,pe,b);te.insertBefore(Ct,ie)}else{for(;ie!=ze.node;)ie=se(ie);var pt=E&&y!=null&&y<=pe&&ze.lineNumber;ze.changes&&(wt(ze.changes,"gutter")>-1&&(pt=!1),ti(a,ze,pe,b)),pt&&(Dt(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(Kt(a.options,pe)))),ie=ze.node.nextSibling}pe+=ze.size}for(;ie;)ie=se(ie)}function bl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function Cl(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+ni(a)+"px"}function zl(a){var y=a.display,b=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var x=qo(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,te=x+"px",ie=0;ie<b.length;ie++)if(!b[ie].hidden){a.options.fixedGutter&&(b[ie].gutter&&(b[ie].gutter.style.left=te),b[ie].gutterBackground&&(b[ie].gutterBackground.style.left=te));var se=b[ie].alignable;if(se)for(var ce=0;ce<se.length;ce++)se[ce].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=x+E+"px")}}function Wl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,b=Kt(a.options,y.first+y.size-1),x=a.display;if(b.length!=x.lineNumChars){var E=x.measure.appendChild(Ee("div",[Ee("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,ie=E.offsetWidth-te;return x.lineGutter.style.width="",x.lineNumInnerWidth=Math.max(te,x.lineGutter.offsetWidth-ie)+1,x.lineNumWidth=x.lineNumInnerWidth+ie,x.lineNumChars=x.lineNumInnerWidth?b.length:-1,x.lineGutter.style.width=x.lineNumWidth+"px",bl(a.display),!0}return!1}function wl(a,y){for(var b=[],x=!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)x=!0;else continue;b.push({className:te,style:ie})}return y&&!x&&b.push({className:"CodeMirror-linenumbers",style:null}),b}function Kl(a){var y=a.gutters,b=a.gutterSpecs;Dt(y),a.lineGutter=null;for(var x=0;x<b.length;++x){var E=b[x],te=E.className,ie=E.style,se=y.appendChild(Ee("div",null,"CodeMirror-gutter "+te));ie&&(se.style.cssText=ie),te=="CodeMirror-linenumbers"&&(a.lineGutter=se,se.style.width=(a.lineNumWidth||1)+"px")}y.style.display=b.length?"":"none",bl(a)}function Oa(a){Kl(a.display),zi(a),zl(a)}function ru(a,y,b,x){var E=this;this.input=b,E.scrollbarFiller=Ee("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ee("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Ke("div",null,"CodeMirror-code"),E.selectionDiv=Ee("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ee("div",null,"CodeMirror-cursors"),E.measure=Ee("div",null,"CodeMirror-measure"),E.lineMeasure=Ee("div",null,"CodeMirror-measure"),E.lineSpace=Ke("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=Ke("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ee("div",[te],null,"position: relative"),E.sizer=Ee("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ee("div",null,null,"position: absolute; height: "+qt+"px; width: 1px;"),E.gutters=Ee("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ee("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ee("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),be&&he<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!De&&!(ae&&Re)&&(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=wl(x.gutters,x.lineNumbers),Kl(E),b.init(E)}var il=0,ho=null;be?ho=-.53:ae?ho=15:we?ho=-.7:Ne&&(ho=-1/3);function Gl(a){var y=a.wheelDeltaX,b=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),b==null&&a.detail&&a.axis==a.VERTICAL_AXIS?b=a.detail:b==null&&(b=a.wheelDelta),{x:y,y:b}}function iu(a){var y=Gl(a);return y.x*=ho,y.y*=ho,y}function jl(a,y){var b=Gl(y),x=b.x,E=b.y,te=a.display,ie=te.scroller,se=ie.scrollWidth>ie.clientWidth,ce=ie.scrollHeight>ie.clientHeight;if(x&&se||E&&ce){if(E&&Pe&&De){e:for(var pe=y.target,Ae=te.view;pe!=ie;pe=pe.parentNode)for(var ze=0;ze<Ae.length;ze++)if(Ae[ze].node==pe){a.display.currentWheelTarget=pe;break e}}if(x&&!ae&&!de&&ho!=null){E&&ce&&Ao(a,Math.max(0,ie.scrollTop+E*ho)),Ro(a,Math.max(0,ie.scrollLeft+x*ho)),(!E||E&&ce)&&hn(y),te.wheelStartX=null;return}if(E&&ho!=null){var Ct=E*ho,pt=a.doc.scrollTop,tn=pt+te.wrapper.clientHeight;Ct<0?pt=Math.max(0,pt+Ct-50):tn=Math.min(a.doc.height,tn+Ct+50),xl(a,{top:pt,bottom:tn})}il<20&&(te.wheelStartX==null?(te.wheelStartX=ie.scrollLeft,te.wheelStartY=ie.scrollTop,te.wheelDX=x,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var yn=ie.scrollLeft-te.wheelStartX,Pn=ie.scrollTop-te.wheelStartY,Zn=Pn&&te.wheelDY&&Pn/te.wheelDY||yn&&te.wheelDX&&yn/te.wheelDX;te.wheelStartX=te.wheelStartY=null,Zn&&(ho=(ho*il+Zn)/(il+1),++il)}},200)):(te.wheelDX+=x,te.wheelDY+=E))}}var po=function(a,y){this.ranges=a,this.primIndex=y};po.prototype.primary=function(){return this.ranges[this.primIndex]},po.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 b=this.ranges[y],x=a.ranges[y];if(!dn(b.anchor,x.anchor)||!dn(b.head,x.head))return!1}return!0},po.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new ri(pn(this.ranges[y].anchor),pn(this.ranges[y].head));return new po(a,this.primIndex)},po.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},po.prototype.contains=function(a,y){y||(y=a);for(var b=0;b<this.ranges.length;b++){var x=this.ranges[b];if(Xt(y,x.from())>=0&&Xt(a,x.to())<=0)return b}return-1};var ri=function(a,y){this.anchor=a,this.head=y};ri.prototype.from=function(){return mn(this.anchor,this.head)},ri.prototype.to=function(){return En(this.anchor,this.head)},ri.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xo(a,y,b){var x=a&&a.options.selectionsMayTouch,E=y[b];y.sort(function(Ct,pt){return Xt(Ct.from(),pt.from())}),b=wt(y,E);for(var te=1;te<y.length;te++){var ie=y[te],se=y[te-1],ce=Xt(se.to(),ie.from());if(x&&!ie.empty()?ce>0:ce>=0){var pe=mn(se.from(),ie.from()),Ae=En(se.to(),ie.to()),ze=se.empty()?ie.from()==ie.head:se.from()==se.head;te<=b&&--b,y.splice(--te,2,new ri(ze?Ae:pe,ze?pe:Ae))}}return new po(y,b)}function Go(a,y){return new po([new ri(a,y||a)],0)}function jo(a){return a.text?qe(a.from.line+a.text.length-1,ke(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Vl(a,y){if(Xt(a,y.from)<0)return a;if(Xt(a,y.to)<=0)return jo(y);var b=a.line+y.text.length-(y.to.line-y.from.line)-1,x=a.ch;return a.line==y.to.line&&(x+=jo(y).ch-y.to.ch),qe(b,x)}function Sl(a,y){for(var b=[],x=0;x<a.sel.ranges.length;x++){var E=a.sel.ranges[x];b.push(new ri(Vl(E.anchor,y),Vl(E.head,y)))}return xo(a.cm,b,a.sel.primIndex)}function Ul(a,y,b){return a.line==y.line?qe(b.line,a.ch-y.ch+b.ch):qe(b.line+(a.line-y.line),a.ch)}function ou(a,y,b){for(var x=[],E=qe(a.first,0),te=E,ie=0;ie<y.length;ie++){var se=y[ie],ce=Ul(se.from,E,te),pe=Ul(jo(se),E,te);if(E=se.to,te=pe,b=="around"){var Ae=a.sel.ranges[ie],ze=Xt(Ae.head,Ae.anchor)<0;x[ie]=new ri(ze?pe:ce,ze?ce:pe)}else x[ie]=new ri(ce,ce)}return new po(x,a.sel.primIndex)}function El(a){a.doc.mode=Er(a.options,a.doc.modeOption),Fa(a)}function Fa(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,Ia(a,100),a.state.modeGen++,a.curOp&&zi(a)}function Yl(a,y){return y.from.ch==0&&y.to.ch==0&&ke(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function kl(a,y,b,x){function E(Yn){return b?b[Yn]:null}function te(Yn,_n,tr){er(Yn,_n,tr,x),$r(Yn,"change",Yn,y)}function ie(Yn,_n){for(var tr=[],wr=Yn;wr<_n;++wr)tr.push(new lr(pe[wr],E(wr),x));return tr}var se=y.from,ce=y.to,pe=y.text,Ae=kt(a,se.line),ze=kt(a,ce.line),Ct=ke(pe),pt=E(pe.length-1),tn=ce.line-se.line;if(y.full)a.insert(0,ie(0,pe.length)),a.remove(pe.length,a.size-pe.length);else if(Yl(a,y)){var yn=ie(0,pe.length-1);te(ze,ze.text,pt),tn&&a.remove(se.line,tn),yn.length&&a.insert(se.line,yn)}else if(Ae==ze)if(pe.length==1)te(Ae,Ae.text.slice(0,se.ch)+Ct+Ae.text.slice(ce.ch),pt);else{var Pn=ie(1,pe.length-1);Pn.push(new lr(Ct+Ae.text.slice(ce.ch),pt,x)),te(Ae,Ae.text.slice(0,se.ch)+pe[0],E(0)),a.insert(se.line+1,Pn)}else if(pe.length==1)te(Ae,Ae.text.slice(0,se.ch)+pe[0]+ze.text.slice(ce.ch),E(0)),a.remove(se.line+1,tn);else{te(Ae,Ae.text.slice(0,se.ch)+pe[0],E(0)),te(ze,Ct+ze.text.slice(ce.ch),pt);var Zn=ie(1,pe.length-1);tn>1&&a.remove(se.line+1,tn-1),a.insert(se.line+1,Zn)}$r(a,"change",a,y)}function Vo(a,y,b){function x(E,te,ie){if(E.linked)for(var se=0;se<E.linked.length;++se){var ce=E.linked[se];if(ce.doc!=te){var pe=ie&&ce.sharedHist;b&&!pe||(y(ce.doc,pe),x(ce.doc,E,pe))}}}x(a,null,!0)}function Xl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ea(a),El(a),Jl(a),a.options.lineWrapping||In(a),a.options.mode=y.modeOption,zi(a)}function Jl(a){(a.doc.direction=="rtl"?lt:Ue)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){oo(a,function(){Jl(a),zi(a)})}function ol(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 Dl(a,y){var b={from:pn(y.from),to:jo(y),text:un(a,y.from,y.to)};return ql(a,b,y.from.line,y.to.line+1),Vo(a,function(x){return ql(x,b,y.from.line,y.to.line+1)},!0),b}function Ql(a){for(;a.length;){var y=ke(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Ql(a.done),ke(a.done);if(a.done.length&&!ke(a.done).ranges)return ke(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ke(a.done)}function $l(a,y,b,x){var E=a.history;E.undone.length=0;var te=+new Date,ie,se;if((E.lastOp==x||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=lu(E,E.lastOp==x)))se=ke(ie.changes),Xt(y.from,y.to)==0&&Xt(y.from,se.to)==0?se.to=jo(y):ie.changes.push(Dl(a,y));else{var ce=ke(E.done);for((!ce||!ce.ranges)&&al(a.sel,E.done),ie={changes:[Dl(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(b),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=te,E.lastOp=E.lastSelOp=x,E.lastOrigin=E.lastSelOrigin=y.origin,se||nt(a,"historyAdded")}function su(a,y,b,x){var E=y.charAt(0);return E=="*"||E=="+"&&b.ranges.length==x.ranges.length&&b.somethingSelected()==x.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,b,x){var E=a.history,te=x&&x.origin;b==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||su(a,te,ke(E.done),y))?E.done[E.done.length-1]=y:al(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,E.lastSelOp=b,x&&x.clearRedo!==!1&&Ql(E.undone)}function al(a,y){var b=ke(y);b&&b.ranges&&b.equals(a)||y.push(a)}function ql(a,y,b,x){var E=y["spans_"+a.id],te=0;a.iter(Math.max(a.first,b),Math.min(a.first+a.size,x),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=ie.markedSpans),++te})}function cu(a){if(!a)return null;for(var y,b=0;b<a.length;++b)a[b].marker.explicitlyCleared?y||(y=a.slice(0,b)):y&&y.push(a[b]);return y?y.length?y:null:a}function du(a,y){var b=y["spans_"+a.id];if(!b)return null;for(var x=[],E=0;E<y.text.length;++E)x.push(cu(b[E]));return x}function es(a,y){var b=du(a,y),x=oi(a,y);if(!b)return x;if(!x)return b;for(var E=0;E<b.length;++E){var te=b[E],ie=x[E];if(te&&ie)e:for(var se=0;se<ie.length;++se){for(var ce=ie[se],pe=0;pe<te.length;++pe)if(te[pe].marker==ce.marker)continue e;te.push(ce)}else ie&&(b[E]=ie)}return b}function fa(a,y,b){for(var x=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){x.push(b?po.prototype.deepCopy.call(te):te);continue}var ie=te.changes,se=[];x.push({changes:se});for(var ce=0;ce<ie.length;++ce){var pe=ie[ce],Ae=void 0;if(se.push({from:pe.from,to:pe.to,text:pe.text}),y)for(var ze in pe)(Ae=ze.match(/^spans_(\d+)$/))&&wt(y,Number(Ae[1]))>-1&&(ke(se)[ze]=pe[ze],delete pe[ze])}}return x}function Tl(a,y,b,x){if(x){var E=a.anchor;if(b){var te=Xt(y,E)<0;te!=Xt(b,E)<0?(E=y,y=b):te!=Xt(y,b)<0&&(y=b)}return new ri(E,y)}else return new ri(b||y,y)}function ll(a,y,b,x,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),Gi(a,new po([Tl(a.sel.primary(),y,b,E)],0),x)}function ts(a,y,b){for(var x=[],E=a.cm&&(a.cm.display.shift||a.extend),te=0;te<a.sel.ranges.length;te++)x[te]=Tl(a.sel.ranges[te],y[te],null,E);var ie=xo(a.cm,x,a.sel.primIndex);Gi(a,ie,b)}function Ll(a,y,b,x){var E=a.sel.ranges.slice(0);E[y]=b,Gi(a,xo(a.cm,E,a.sel.primIndex),x)}function ns(a,y,b,x){Gi(a,Go(y,b),x)}function fu(a,y,b){var x={ranges:y.ranges,update:function(E){this.ranges=[];for(var te=0;te<E.length;te++)this.ranges[te]=new ri($t(a,E[te].anchor),$t(a,E[te].head))},origin:b&&b.origin};return nt(a,"beforeSelectionChange",a,x),a.cm&&nt(a.cm,"beforeSelectionChange",a.cm,x),x.ranges!=y.ranges?xo(a.cm,x.ranges,x.ranges.length-1):y}function rs(a,y,b){var x=a.history.done,E=ke(x);E&&E.ranges?(x[x.length-1]=y,sl(a,y,b)):Gi(a,y,b)}function Gi(a,y,b){sl(a,y,b),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,b)}function sl(a,y,b){(Lt(a,"beforeSelectionChange")||a.cm&&Lt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,b));var x=b&&b.bias||(Xt(y.primary().head,a.sel.primary().head)<0?-1:1);is(a,as(a,y,x,!0)),!(b&&b.scroll===!1)&&a.cm&&Po(a.cm)}function is(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Gt(a.cm)),$r(a,"cursorActivity",a))}function os(a){is(a,as(a,a.sel,null,!1))}function as(a,y,b,x){for(var E,te=0;te<y.ranges.length;te++){var ie=y.ranges[te],se=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ce=ul(a,ie.anchor,se&&se.anchor,b,x),pe=ul(a,ie.head,se&&se.head,b,x);(E||ce!=ie.anchor||pe!=ie.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new ri(ce,pe))}return E?xo(a.cm,E,y.primIndex):y}function ha(a,y,b,x,E){var te=kt(a,y.line);if(te.markedSpans)for(var ie=0;ie<te.markedSpans.length;++ie){var se=te.markedSpans[ie],ce=se.marker,pe="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ae="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((se.from==null||(pe?se.from<=y.ch:se.from<y.ch))&&(se.to==null||(Ae?se.to>=y.ch:se.to>y.ch))){if(E&&(nt(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(te.markedSpans){--ie;continue}else break;if(!ce.atomic)continue;if(b){var ze=ce.find(x<0?1:-1),Ct=void 0;if((x<0?Ae:pe)&&(ze=ls(a,ze,-x,ze&&ze.line==y.line?te:null)),ze&&ze.line==y.line&&(Ct=Xt(ze,b))&&(x<0?Ct<0:Ct>0))return ha(a,ze,y,x,E)}var pt=ce.find(x<0?-1:1);return(x<0?pe:Ae)&&(pt=ls(a,pt,x,pt.line==y.line?te:null)),pt?ha(a,pt,y,x,E):null}}return y}function ul(a,y,b,x,E){var te=x||1,ie=ha(a,y,b,te,E)||!E&&ha(a,y,b,te,!0)||ha(a,y,b,-te,E)||!E&&ha(a,y,b,-te,!0);return ie||(a.cantEdit=!0,qe(a.first,0))}function ls(a,y,b,x){return b<0&&y.ch==0?y.line>a.first?$t(a,qe(y.line-1)):null:b>0&&y.ch==(x||kt(a,y.line)).text.length?y.line<a.first+a.size-1?qe(y.line+1,0):null:new qe(y.line,y.ch+b)}function ss(a){a.setSelection(qe(a.firstLine(),0),qe(a.lastLine()),We)}function us(a,y,b){var x={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return x.canceled=!0}};return b&&(x.update=function(E,te,ie,se){E&&(x.from=$t(a,E)),te&&(x.to=$t(a,te)),ie&&(x.text=ie),se!==void 0&&(x.origin=se)}),nt(a,"beforeChange",a,x),a.cm&&nt(a.cm,"beforeChange",a.cm,x),x.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:x.from,to:x.to,text:x.text,origin:x.origin}}function pa(a,y,b){if(a.cm){if(!a.cm.curOp)return Oi(a.cm,pa)(a,y,b);if(a.cm.state.suppressEdits)return}if(!((Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"))&&(y=us(a,y,!0),!y))){var x=Vr&&!b&&bt(a,y.from,y.to);if(x)for(var E=x.length-1;E>=0;--E)cs(a,{from:x[E].from,to:x[E].to,text:E?[""]:y.text,origin:y.origin});else cs(a,y)}}function cs(a,y){if(!(y.text.length==1&&y.text[0]==""&&Xt(y.from,y.to)==0)){var b=Sl(a,y);$l(a,y,b,a.cm?a.cm.curOp.id:NaN),Za(a,y,b,oi(a,y));var x=[];Vo(a,function(E,te){!te&&wt(x,E.history)==-1&&(ps(E.history,y),x.push(E.history)),Za(E,y,null,oi(E,y))})}}function cl(a,y,b){var x=a.cm&&a.cm.state.suppressEdits;if(!(x&&!b)){for(var E=a.history,te,ie=a.sel,se=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,pe=0;pe<se.length&&(te=se[pe],!(b?te.ranges&&!te.equals(a.sel):!te.ranges));pe++);if(pe!=se.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=se.pop(),te.ranges){if(al(te,ce),b&&!te.equals(a.sel)){Gi(a,te,{clearRedo:!1});return}ie=te}else if(x){se.push(te);return}else break;var Ae=[];al(ie,ce),ce.push({changes:Ae,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var ze=Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"),Ct=function(yn){var Pn=te.changes[yn];if(Pn.origin=y,ze&&!us(a,Pn,!1))return se.length=0,{};Ae.push(Dl(a,Pn));var Zn=yn?Sl(a,Pn):ke(se);Za(a,Pn,Zn,es(a,Pn)),!yn&&a.cm&&a.cm.scrollIntoView({from:Pn.from,to:jo(Pn)});var Yn=[];Vo(a,function(_n,tr){!tr&&wt(Yn,_n.history)==-1&&(ps(_n.history,Pn),Yn.push(_n.history)),Za(_n,Pn,null,es(_n,Pn))})},pt=te.changes.length-1;pt>=0;--pt){var tn=Ct(pt);if(tn)return tn.v}}}}function ds(a,y){if(y!=0&&(a.first+=y,a.sel=new po(Ve(a.sel.ranges,function(E){return new ri(qe(E.anchor.line+y,E.anchor.ch),qe(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){zi(a.cm,a.first,a.first-y,y);for(var b=a.cm.display,x=b.viewFrom;x<b.viewTo;x++)co(a.cm,x,"gutter")}}function Za(a,y,b,x){if(a.cm&&!a.cm.curOp)return Oi(a.cm,Za)(a,y,b,x);if(y.to.line<a.first){ds(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);ds(a,E),y={from:qe(a.first,0),to:qe(y.to.line+E,y.to.ch),text:[ke(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:qe(te,kt(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=un(a,y.from,y.to),b||(b=Sl(a,y)),a.cm?hu(a.cm,y,x):kl(a,y,x),sl(a,b,We),a.cantEdit&&ul(a,qe(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,b){var x=a.doc,E=a.display,te=y.from,ie=y.to,se=!1,ce=te.line;a.options.lineWrapping||(ce=_e(Tt(kt(x,te.line))),x.iter(ce,ie.line+1,function(pt){if(pt==E.maxLine)return se=!0,!0})),x.sel.contains(y.from,y.to)>-1&&Gt(a),kl(x,y,b,Sa(a)),a.options.lineWrapping||(x.iter(ce,te.line+y.text.length,function(pt){var tn=jn(pt);tn>E.maxLineLength&&(E.maxLine=pt,E.maxLineLength=tn,E.maxLineChanged=!0,se=!1)}),se&&(a.curOp.updateMaxLine=!0)),Jr(x,te.line),Ia(a,400);var pe=y.text.length-(ie.line-te.line)-1;y.full?zi(a):te.line==ie.line&&y.text.length==1&&!Yl(a.doc,y)?co(a,te.line,"text"):zi(a,te.line,ie.line+1,pe);var Ae=Lt(a,"changes"),ze=Lt(a,"change");if(ze||Ae){var Ct={from:te,to:ie,text:y.text,removed:y.removed,origin:y.origin};ze&&$r(a,"change",a,Ct),Ae&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ct)}a.display.selForContextMenu=null}function va(a,y,b,x,E){var te;x||(x=b),Xt(x,b)<0&&(te=[x,b],b=te[0],x=te[1]),typeof y=="string"&&(y=a.splitLines(y)),pa(a,{from:b,to:x,text:y,origin:E})}function fs(a,y,b,x){b<a.line?a.line+=x:y<a.line&&(a.line=y,a.ch=0)}function hs(a,y,b,x){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 se=0;se<te.ranges.length;se++)fs(te.ranges[se].anchor,y,b,x),fs(te.ranges[se].head,y,b,x);continue}for(var ce=0;ce<te.changes.length;++ce){var pe=te.changes[ce];if(b<pe.from.line)pe.from=qe(pe.from.line+x,pe.from.ch),pe.to=qe(pe.to.line+x,pe.to.ch);else if(y<=pe.to.line){ie=!1;break}}ie||(a.splice(0,E+1),E=0)}}function ps(a,y){var b=y.from.line,x=y.to.line,E=y.text.length-(x-b)-1;hs(a.done,b,x,E),hs(a.undone,b,x,E)}function _a(a,y,b,x){var E=y,te=y;return typeof y=="number"?te=kt(a,kn(a,y)):E=_e(y),E==null?null:(x(te,E)&&a.cm&&co(a.cm,E,b),te)}function Ha(a){this.lines=a,this.parent=null;for(var y=0,b=0;b<a.length;++b)a[b].parent=this,y+=a[b].height;this.height=y}Ha.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var b=a,x=a+y;b<x;++b){var E=this.lines[b];this.height-=E.height,ar(E),$r(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,b){this.height+=b,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var x=0;x<y.length;++x)y[x].parent=this},iterN:function(a,y,b){for(var x=a+y;a<x;++a)if(b(this.lines[a]))return!0}};function za(a){this.children=a;for(var y=0,b=0,x=0;x<a.length;++x){var E=a[x];y+=E.chunkSize(),b+=E.height,E.parent=this}this.size=y,this.height=b,this.parent=null}za.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var b=0;b<this.children.length;++b){var x=this.children[b],E=x.chunkSize();if(a<E){var te=Math.min(y,E-a),ie=x.height;if(x.removeInner(a,te),this.height-=ie-x.height,E==te&&(this.children.splice(b--,1),x.parent=null),(y-=te)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof Ha))){var se=[];this.collapse(se),this.children=[new Ha(se)],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,b){this.size+=y.length,this.height+=b;for(var x=0;x<this.children.length;++x){var E=this.children[x],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,b),E.lines&&E.lines.length>50){for(var ie=E.lines.length%25+25,se=ie;se<E.lines.length;){var ce=new Ha(E.lines.slice(se,se+=25));E.height-=ce.height,this.children.splice(++x,0,ce),ce.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),b=new za(y);if(a.parent){a.size-=b.size,a.height-=b.height;var E=wt(a.parent.children,a);a.parent.children.splice(E+1,0,b)}else{var x=new za(a.children);x.parent=a,a.children=[x,b],a=x}b.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,b){for(var x=0;x<this.children.length;++x){var E=this.children[x],te=E.chunkSize();if(a<te){var ie=Math.min(y,te-a);if(E.iterN(a,ie,b))return!0;if((y-=ie)==0)break;a=0}else a-=te}}};var Wa=function(a,y,b){if(b)for(var x in b)b.hasOwnProperty(x)&&(this[x]=b[x]);this.doc=a,this.node=y};Wa.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,b=this.line,x=_e(b);if(!(x==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(b.widgets=null);var te=di(this);kr(b,Math.max(0,b.height-te)),a&&(oo(a,function(){vs(a,b,-te),co(a,x,"widget")}),$r(a,"lineWidgetCleared",a,this,x))}},Wa.prototype.changed=function(){var a=this,y=this.height,b=this.doc.cm,x=this.line;this.height=null;var E=di(this)-y;E&&(on(this.doc,x)||kr(x,x.height+E),b&&oo(b,function(){b.curOp.forceUpdate=!0,vs(b,x,E),$r(b,"lineWidgetChanged",b,a,_e(x))}))},_t(Wa);function vs(a,y,b){Dn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&da(a,b)}function pu(a,y,b,x){var E=new Wa(a,b,x),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),_a(a,y,"widget",function(ie){var se=ie.widgets||(ie.widgets=[]);if(E.insertAt==null?se.push(E):se.splice(Math.min(se.length-1,Math.max(0,E.insertAt)),0,E),E.line=ie,te&&!on(a,ie)){var ce=Dn(ie)<a.scrollTop;kr(ie,ie.height+di(E)),ce&&da(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&$r(te,"lineWidgetAdded",te,E,typeof y=="number"?y:_e(y)),E}var ms=0,Uo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ms};Uo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&fo(a),Lt(this,"clear")){var b=this.find();b&&$r(this,"clear",b.from,b.to)}for(var x=null,E=null,te=0;te<this.lines.length;++te){var ie=this.lines[te],se=or(ie.markedSpans,this);a&&!this.collapsed?co(a,_e(ie),"text"):a&&(se.to!=null&&(E=_e(ie)),se.from!=null&&(x=_e(ie))),ie.markedSpans=Dr(ie.markedSpans,se),se.from==null&&this.collapsed&&!on(this.doc,ie)&&a&&kr(ie,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var pe=Tt(this.lines[ce]),Ae=jn(pe);Ae>a.display.maxLineLength&&(a.display.maxLine=pe,a.display.maxLineLength=Ae,a.display.maxLineChanged=!0)}x!=null&&a&&this.collapsed&&zi(a,x,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&os(a.doc)),a&&$r(a,"markerCleared",a,this,x,E),y&&yo(a),this.parent&&this.parent.clear()}},Uo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var b,x,E=0;E<this.lines.length;++E){var te=this.lines[E],ie=or(te.markedSpans,this);if(ie.from!=null&&(b=qe(y?te:_e(te),ie.from),a==-1))return b;if(ie.to!=null&&(x=qe(y?te:_e(te),ie.to),a==1))return x}return b&&{from:b,to:x}},Uo.prototype.changed=function(){var a=this,y=this.find(-1,!0),b=this,x=this.doc.cm;!y||!x||oo(x,function(){var E=y.line,te=_e(y.line),ie=vo(x,te);if(ie&&(Qo(ie),x.curOp.selectionChanged=x.curOp.forceUpdate=!0),x.curOp.updateMaxLine=!0,!on(b.doc,E)&&b.height!=null){var se=b.height;b.height=null;var ce=di(b)-se;ce&&kr(E,E.height+ce)}$r(x,"markerChanged",x,a)})},Uo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||wt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},Uo.prototype.detachLine=function(a){if(this.lines.splice(wt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},_t(Uo);function ma(a,y,b,x,E){if(x&&x.shared)return vu(a,y,b,x,E);if(a.cm&&!a.cm.curOp)return Oi(a.cm,ma)(a,y,b,x,E);var te=new Uo(a,E),ie=Xt(y,b);if(x&&Ht(x,te,!1),ie>0||ie==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=Ke("span",[te.replacedWith],"CodeMirror-widget"),x.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),x.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(Nt(a,y.line,y,b,te)||y.line!=b.line&&Nt(a,b.line,y,b,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");Yr()}te.addToHistory&&$l(a,{from:y,to:b,origin:"markText"},a.sel,NaN);var se=y.line,ce=a.cm,pe;if(a.iter(se,b.line+1,function(ze){ce&&te.collapsed&&!ce.options.lineWrapping&&Tt(ze)==ce.display.maxLine&&(pe=!0),te.collapsed&&se!=y.line&&kr(ze,0),Zr(ze,new On(te,se==y.line?y.ch:null,se==b.line?b.ch:null)),++se}),te.collapsed&&a.iter(y.line,b.line+1,function(ze){on(a,ze)&&kr(ze,0)}),te.clearOnEnter&&xe(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(ei(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++ms,te.atomic=!0),ce){if(pe&&(ce.curOp.updateMaxLine=!0),te.collapsed)zi(ce,y.line,b.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var Ae=y.line;Ae<=b.line;Ae++)co(ce,Ae,"text");te.atomic&&os(ce.doc),$r(ce,"markerAdded",ce,te)}return te}var Ka=function(a,y){this.markers=a,this.primary=y;for(var b=0;b<a.length;++b)a[b].parent=this};Ka.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();$r(this,"clear")}},Ka.prototype.find=function(a,y){return this.primary.find(a,y)},_t(Ka);function vu(a,y,b,x,E){x=Ht(x),x.shared=!1;var te=[ma(a,y,b,x,E)],ie=te[0],se=x.widgetNode;return Vo(a,function(ce){se&&(x.widgetNode=se.cloneNode(!0)),te.push(ma(ce,$t(ce,y),$t(ce,b),x,E));for(var pe=0;pe<ce.linked.length;++pe)if(ce.linked[pe].isParent)return;ie=ke(te)}),new Ka(te,ie)}function gs(a){return a.findMarks(qe(a.first,0),a.clipPos(qe(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var b=0;b<y.length;b++){var x=y[b],E=x.find(),te=a.clipPos(E.from),ie=a.clipPos(E.to);if(Xt(te,ie)){var se=ma(a,te,ie,x.primary,x.primary.type);x.markers.push(se),se.parent=x}}}function gu(a){for(var y=function(x){var E=a[x],te=[E.primary.doc];Vo(E.primary.doc,function(ce){return te.push(ce)});for(var ie=0;ie<E.markers.length;ie++){var se=E.markers[ie];wt(te,se.doc)==-1&&(se.parent=null,E.markers.splice(ie--,1))}},b=0;b<a.length;b++)y(b)}var yu=0,qi=function(a,y,b,x,E){if(!(this instanceof qi))return new qi(a,y,b,x,E);b==null&&(b=0),za.call(this,[new Ha([new lr("",null)])]),this.first=b,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=b;var te=qe(b,0);this.sel=Go(te),this.history=new ol(null),this.id=++yu,this.modeOption=y,this.lineSep=x,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),kl(this,{from:te,to:te,text:a}),Gi(this,Go(te),We)};qi.prototype=tt(za.prototype,{constructor:qi,iter:function(a,y,b){b?this.iterN(a-this.first,y-a,b):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var b=0,x=0;x<y.length;++x)b+=y[x].height;this.insertInner(a-this.first,y,b)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=qn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:Fi(function(a){var y=qe(this.first,0),b=this.first+this.size-1;pa(this,{from:y,to:qe(b,kt(this,b).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&ea(this.cm,0,0),Gi(this,Go(y),We)}),replaceRange:function(a,y,b,x){y=$t(this,y),b=b?$t(this,b):y,va(this,a,y,b,x)},getRange:function(a,y,b){var x=un(this,$t(this,a),$t(this,y));return b===!1?x:x.join(b||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(ln(this,a))return kt(this,a)},getLineNumber:function(a){return _e(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=kt(this,a)),Tt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return $t(this,a)},getCursor:function(a){var y=this.sel.primary(),b;return a==null||a=="head"?b=y.head:a=="anchor"?b=y.anchor:a=="end"||a=="to"||a===!1?b=y.to():b=y.from(),b},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fi(function(a,y,b){ns(this,$t(this,typeof a=="number"?qe(a,y||0):a),null,b)}),setSelection:Fi(function(a,y,b){ns(this,$t(this,a),$t(this,y||a),b)}),extendSelection:Fi(function(a,y,b){ll(this,$t(this,a),y&&$t(this,y),b)}),extendSelections:Fi(function(a,y){ts(this,Tn(this,a),y)}),extendSelectionsBy:Fi(function(a,y){var b=Ve(this.sel.ranges,a);ts(this,Tn(this,b),y)}),setSelections:Fi(function(a,y,b){if(a.length){for(var x=[],E=0;E<a.length;E++)x[E]=new ri($t(this,a[E].anchor),$t(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),Gi(this,xo(this.cm,x,y),b)}}),addSelection:Fi(function(a,y,b){var x=this.sel.ranges.slice(0);x.push(new ri($t(this,a),$t(this,y||a))),Gi(this,xo(this.cm,x,x.length-1),b)}),getSelection:function(a){for(var y=this.sel.ranges,b,x=0;x<y.length;x++){var E=un(this,y[x].from(),y[x].to());b=b?b.concat(E):E}return a===!1?b:b.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],b=this.sel.ranges,x=0;x<b.length;x++){var E=un(this,b[x].from(),b[x].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[x]=E}return y},replaceSelection:function(a,y,b){for(var x=[],E=0;E<this.sel.ranges.length;E++)x[E]=a;this.replaceSelections(x,y,b||"+input")},replaceSelections:Fi(function(a,y,b){for(var x=[],E=this.sel,te=0;te<E.ranges.length;te++){var ie=E.ranges[te];x[te]={from:ie.from(),to:ie.to(),text:this.splitLines(a[te]),origin:b}}for(var se=y&&y!="end"&&ou(this,x,y),ce=x.length-1;ce>=0;ce--)pa(this,x[ce]);se?rs(this,se):this.cm&&Po(this.cm)}),undo:Fi(function(){cl(this,"undo")}),redo:Fi(function(){cl(this,"redo")}),undoSelection:Fi(function(){cl(this,"undo",!0)}),redoSelection:Fi(function(){cl(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,b=0,x=0;x<a.done.length;x++)a.done[x].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++b;return{undo:y,redo:b}},clearHistory:function(){var a=this;this.history=new ol(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:fa(this.history.done),undone:fa(this.history.undone)}},setHistory:function(a){var y=this.history=new ol(this.history.maxGeneration);y.done=fa(a.done.slice(0),null,!0),y.undone=fa(a.undone.slice(0),null,!0)},setGutterMarker:Fi(function(a,y,b){return _a(this,a,"gutter",function(x){var E=x.gutterMarkers||(x.gutterMarkers={});return E[y]=b,!b&&ut(E)&&(x.gutterMarkers=null),!0})}),clearGutter:Fi(function(a){var y=this;this.iter(function(b){b.gutterMarkers&&b.gutterMarkers[a]&&_a(y,b,"gutter",function(){return b.gutterMarkers[a]=null,ut(b.gutterMarkers)&&(b.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!ln(this,a)||(y=a,a=kt(this,a),!a))return null}else if(y=_e(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:Fi(function(a,y,b){return _a(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!x[E])x[E]=b;else{if(He(b).test(x[E]))return!1;x[E]+=" "+b}return!0})}),removeLineClass:Fi(function(a,y,b){return _a(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",te=x[E];if(te)if(b==null)x[E]=null;else{var ie=te.match(He(b));if(!ie)return!1;var se=ie.index+ie[0].length;x[E]=te.slice(0,ie.index)+(!ie.index||se==te.length?"":" ")+te.slice(se)||null}else return!1;return!0})}),addLineWidget:Fi(function(a,y,b){return pu(this,a,y,b)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,b){return ma(this,$t(this,a),$t(this,y),b,b&&b.type||"range")},setBookmark:function(a,y){var b={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=$t(this,a),ma(this,a,a,b,"bookmark")},findMarksAt:function(a){a=$t(this,a);var y=[],b=kt(this,a.line).markedSpans;if(b)for(var x=0;x<b.length;++x){var E=b[x];(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,b){a=$t(this,a),y=$t(this,y);var x=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var ie=te.markedSpans;if(ie)for(var se=0;se<ie.length;se++){var ce=ie[se];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!b||b(ce.marker))&&x.push(ce.marker.parent||ce.marker)}++E}),x},getAllMarks:function(){var a=[];return this.iter(function(y){var b=y.markedSpans;if(b)for(var x=0;x<b.length;++x)b[x].from!=null&&a.push(b[x].marker)}),a},posFromIndex:function(a){var y,b=this.first,x=this.lineSeparator().length;return this.iter(function(E){var te=E.text.length+x;if(te>a)return y=a,!0;a-=te,++b}),$t(this,qe(b,y))},indexFromPos:function(a){a=$t(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var b=this.lineSeparator().length;return this.iter(this.first,a.line,function(x){y+=x.text.length+b}),y},copy:function(a){var y=new qi(qn(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,b=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<b&&(b=a.to);var x=new qi(qn(this,y,b),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(x.history=this.history),(this.linked||(this.linked=[])).push({doc:x,sharedHist:a.sharedHist}),x.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(x,gs(this)),x},unlinkDoc:function(a){if(a instanceof gi&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var b=this.linked[y];if(b.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(gs(this));break}}if(a.history==this.history){var x=[a.id];Vo(a,function(E){return x.push(E.id)},!0),a.history=new ol(null),a.history.done=fa(this.history.done,x),a.history.undone=fa(this.history.undone,x)}},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):Wn(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Fi(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))})}),qi.prototype.eachLine=qi.prototype.iter;var ys=0;function xu(a){var y=this;if(xs(y),!(Le(y,a)||ci(y.display,a))){hn(a),be&&(ys=+new Date);var b=Co(y,a,!0),x=a.dataTransfer.files;if(!(!b||y.isReadOnly()))if(x&&x.length&&window.FileReader&&window.File)for(var E=x.length,te=Array(E),ie=0,se=function(){++ie==E&&Oi(y,function(){b=$t(y.doc,b);var pt={from:b,to:b,text:y.doc.splitLines(te.filter(function(tn){return tn!=null}).join(y.doc.lineSeparator())),origin:"paste"};pa(y.doc,pt),rs(y.doc,Go($t(y.doc,b),$t(y.doc,jo(pt))))})()},ce=function(pt,tn){if(y.options.allowDropFileTypes&&wt(y.options.allowDropFileTypes,pt.type)==-1){se();return}var yn=new FileReader;yn.onerror=function(){return se()},yn.onload=function(){var Pn=yn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pn)){se();return}te[tn]=Pn,se()},yn.readAsText(pt)},pe=0;pe<x.length;pe++)ce(x[pe],pe);else{if(y.state.draggingText&&y.doc.sel.contains(b)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var Ae=a.dataTransfer.getData("Text");if(Ae){var ze;if(y.state.draggingText&&!y.state.draggingText.copy&&(ze=y.listSelections()),sl(y.doc,Go(b,b)),ze)for(var Ct=0;Ct<ze.length;++Ct)va(y.doc,"",ze[Ct].anchor,ze[Ct].head,"drag");y.replaceSelection(Ae,"around","paste"),y.display.input.focus()}}catch(pt){}}}}function bu(a,y){if(be&&(!a.state.draggingText||+new Date-ys<100)){Ln(y);return}if(!(Le(a,y)||ci(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ne)){var b=Ee("img",null,null,"position: fixed; left: 0; top: 0;");b.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(b.width=b.height=1,a.display.wrapper.appendChild(b),b._top=b.offsetTop),y.dataTransfer.setDragImage(b,0,0),de&&b.parentNode.removeChild(b)}}function Cu(a,y){var b=Co(a,y);if(b){var x=document.createDocumentFragment();ka(a,b,x),a.display.dragCursor||(a.display.dragCursor=Ee("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),me(a.display.dragCursor,x)}}function xs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function bs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),b=[],x=0;x<y.length;x++){var E=y[x].CodeMirror;E&&b.push(E)}b.length&&b[0].operation(function(){for(var te=0;te<b.length;te++)a(b[te])})}}var Cs=!1;function wu(){Cs||(Su(),Cs=!0)}function Su(){var a;xe(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,bs(Eu)},100))}),xe(window,"blur",function(){return bs(Wo)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var Yo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ga=0;Ga<10;Ga++)Yo[Ga+48]=Yo[Ga+96]=String(Ga);for(var dl=65;dl<=90;dl++)Yo[dl]=String.fromCharCode(dl);for(var ja=1;ja<=12;ja++)Yo[ja+111]=Yo[ja+63235]="F"+ja;var Oo={};Oo.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"},Oo.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"},Oo.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"},Oo.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"]},Oo.default=Pe?Oo.macDefault:Oo.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var b,x,E,te,ie=0;ie<y.length-1;ie++){var se=y[ie];if(/^(cmd|meta|m)$/i.test(se))te=!0;else if(/^a(lt)?$/i.test(se))b=!0;else if(/^(c|ctrl|control)$/i.test(se))x=!0;else if(/^s(hift)?$/i.test(se))E=!0;else throw new Error("Unrecognized modifier name: "+se)}return b&&(a="Alt-"+a),x&&(a="Ctrl-"+a),te&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var b in a)if(a.hasOwnProperty(b)){var x=a[b];if(/^(name|fallthrough|(de|at)tach)$/.test(b))continue;if(x=="..."){delete a[b];continue}for(var E=Ve(b.split(" "),ku),te=0;te<E.length;te++){var ie=void 0,se=void 0;te==E.length-1?(se=E.join(" "),ie=x):(se=E.slice(0,te+1).join(" "),ie="...");var ce=y[se];if(!ce)y[se]=ie;else if(ce!=ie)throw new Error("Inconsistent bindings for "+se)}delete a[b]}for(var pe in y)a[pe]=y[pe];return a}function ga(a,y,b,x){y=fl(y);var E=y.call?y.call(a,x):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&b(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return ga(a,y.fallthrough,b,x);for(var te=0;te<y.fallthrough.length;te++){var ie=ga(a,y.fallthrough[te],b,x);if(ie)return ie}}}function ws(a){var y=typeof a=="string"?a:Yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function Ss(a,y,b){var x=a;return y.altKey&&x!="Alt"&&(a="Alt-"+a),(Fe?y.metaKey:y.ctrlKey)&&x!="Ctrl"&&(a="Ctrl-"+a),(Fe?y.ctrlKey:y.metaKey)&&x!="Mod"&&(a="Cmd-"+a),!b&&y.shiftKey&&x!="Shift"&&(a="Shift-"+a),a}function Es(a,y){if(de&&a.keyCode==34&&a.char)return!1;var b=Yo[a.keyCode];return b==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(b=a.code),Ss(b,a,y))}function fl(a){return typeof a=="string"?Oo[a]:a}function ya(a,y){for(var b=a.doc.sel.ranges,x=[],E=0;E<b.length;E++){for(var te=y(b[E]);x.length&&Xt(te.from,ke(x).to)<=0;){var ie=x.pop();if(Xt(ie.from,te.from)<0){te.from=ie.from;break}}x.push(te)}oo(a,function(){for(var se=x.length-1;se>=0;se--)va(a.doc,"",x[se].from,x[se].to,"+delete");Po(a)})}function Nl(a,y,b){var x=Yt(a.text,y+b,b);return x<0||x>a.text.length?null:x}function Ml(a,y,b){var x=Nl(a,y.ch,b);return x==null?null:new qe(y.line,x,b<0?"after":"before")}function Pl(a,y,b,x,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=le(b,y.doc.direction);if(te){var ie=E<0?ke(te):te[0],se=E<0==(ie.level==1),ce=se?"after":"before",pe;if(ie.level>0||y.doc.direction=="rtl"){var Ae=mo(y,b);pe=E<0?b.text.length-1:0;var ze=ro(y,Ae,pe).top;pe=Vt(function(Ct){return ro(y,Ae,Ct).top==ze},E<0==(ie.level==1)?ie.from:ie.to-1,pe),ce=="before"&&(pe=Nl(b,pe,1))}else pe=E<0?ie.to:ie.from;return new qe(x,pe,ce)}}return new qe(x,E<0?b.text.length:0,E<0?"before":"after")}function Tu(a,y,b,x){var E=le(y,a.doc.direction);if(!E)return Ml(y,b,x);b.ch>=y.text.length?(b.ch=y.text.length,b.sticky="before"):b.ch<=0&&(b.ch=0,b.sticky="after");var te=z(E,b.ch,b.sticky),ie=E[te];if(a.doc.direction=="ltr"&&ie.level%2==0&&(x>0?ie.to>b.ch:ie.from<b.ch))return Ml(y,b,x);var se=function(Zn,Yn){return Nl(y,Zn instanceof qe?Zn.ch:Zn,Yn)},ce,pe=function(Zn){return a.options.lineWrapping?(ce=ce||mo(a,y),bi(a,y,ce,Zn)):{begin:0,end:y.text.length}},Ae=pe(b.sticky=="before"?se(b,-1):b.ch);if(a.doc.direction=="rtl"||ie.level==1){var ze=ie.level==1==x<0,Ct=se(b,ze?1:-1);if(Ct!=null&&(ze?Ct<=ie.to&&Ct<=Ae.end:Ct>=ie.from&&Ct>=Ae.begin)){var pt=ze?"before":"after";return new qe(b.line,Ct,pt)}}var tn=function(Zn,Yn,_n){for(var tr=function(ui,Zi){return Zi?new qe(b.line,se(ui,1),"before"):new qe(b.line,ui,"after")};Zn>=0&&Zn<E.length;Zn+=Yn){var wr=E[Zn],fr=Yn>0==(wr.level!=1),Gr=fr?_n.begin:se(_n.end,-1);if(wr.from<=Gr&&Gr<wr.to||(Gr=fr?wr.from:se(wr.to,-1),_n.begin<=Gr&&Gr<_n.end))return tr(Gr,fr)}},yn=tn(te+x,x,Ae);if(yn)return yn;var Pn=x>0?Ae.end:se(Ae.begin,-1);return Pn!=null&&!(x>0&&Pn==y.text.length)&&(yn=tn(x>0?0:E.length-1,x,pe(Pn)),yn)?yn:null}var Va={selectAll:ss,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),We)},killLine:function(a){return ya(a,function(y){if(y.empty()){var b=kt(a.doc,y.head.line).text.length;return y.head.ch==b&&y.head.line<a.lastLine()?{from:y.head,to:qe(y.head.line+1,0)}:{from:y.head,to:qe(y.head.line,b)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return ya(a,function(y){return{from:qe(y.from().line,0),to:$t(a.doc,qe(y.to().line+1,0))}})},delLineLeft:function(a){return ya(a,function(y){return{from:qe(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return ya(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return{from:x,to:y.from()}})},delWrappedLineRight:function(a){return ya(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div");return{from:y.from(),to:x}})},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(qe(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(qe(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ks(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return Ds(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Lu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div")},xt)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},xt)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return x.ch<a.getLine(x.line).search(/\S/)?Ds(a,y.head):x},xt)},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=[],b=a.listSelections(),x=a.options.tabSize,E=0;E<b.length;E++){var te=b[E].from(),ie=ye(a.getLine(te.line),te.ch,x);y.push(Me(x-ie%x))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return oo(a,function(){for(var y=a.listSelections(),b=[],x=0;x<y.length;x++)if(y[x].empty()){var E=y[x].head,te=kt(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new qe(E.line,E.ch-1)),E.ch>0)E=new qe(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),qe(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=kt(a.doc,E.line-1).text;ie&&(E=new qe(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),qe(E.line-1,ie.length-1),E,"+transpose"))}}b.push(new ri(E,E))}a.setSelections(b)})},newlineAndIndent:function(a){return oo(a,function(){for(var y=a.listSelections(),b=y.length-1;b>=0;b--)a.replaceRange(a.doc.lineSeparator(),y[b].anchor,y[b].head,"+input");y=a.listSelections();for(var x=0;x<y.length;x++)a.indentLine(y[x].from().line,null,!0);Po(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ks(a,y){var b=kt(a.doc,y),x=Tt(b);return x!=b&&(y=_e(x)),Pl(!0,a,x,y,1)}function Lu(a,y){var b=kt(a.doc,y),x=zt(b);return x!=b&&(y=_e(x)),Pl(!0,a,b,y,-1)}function Ds(a,y){var b=ks(a,y.line),x=kt(a.doc,b.line),E=le(x,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(b.ch,x.text.search(/\S/)),ie=y.line==b.line&&y.ch<=te&&y.ch;return qe(b.line,ie?0:te,b.sticky)}return b}function hl(a,y,b){if(typeof y=="string"&&(y=Va[y],!y))return!1;a.display.input.ensurePolled();var x=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),b&&(a.display.shift=!1),E=y(a)!=Bt}finally{a.display.shift=x,a.state.suppressEdits=!1}return E}function Nu(a,y,b){for(var x=0;x<a.state.keyMaps.length;x++){var E=ga(y,a.state.keyMaps[x],b,a);if(E)return E}return a.options.extraKeys&&ga(y,a.options.extraKeys,b,a)||ga(y,a.options.keyMap,b,a)}var Mu=new fe;function Ua(a,y,b,x){var E=a.state.keySeq;if(E){if(ws(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),Ts(a,E+" "+y,b,x))return!0}return Ts(a,y,b,x)}function Ts(a,y,b,x){var E=Nu(a,y,x);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&$r(a,"keyHandled",a,y,b),(E=="handled"||E=="multi")&&(hn(b),Da(a)),!!E}function Ls(a,y){var b=Es(y,!0);return b?y.shiftKey&&!a.state.keySeq?Ua(a,"Shift-"+b,y,function(x){return hl(a,x,!0)})||Ua(a,b,y,function(x){if(typeof x=="string"?/^go[A-Z]/.test(x):x.motion)return hl(a,x)}):Ua(a,b,y,function(x){return hl(a,x)}):!1}function Pu(a,y,b){return Ua(a,"'"+b+"'",y,function(x){return hl(a,x,!0)})}var Al=null;function Ns(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ze(),!Le(y,a))){be&&he<11&&a.keyCode==27&&(a.returnValue=!1);var b=a.keyCode;y.display.shift=b==16||a.shiftKey;var x=Ls(y,a);de&&(Al=x?b:null,!x&&b==88&&!gn&&(Pe?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ae&&!Pe&&!x&&b==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),b==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Au(y)}}function Au(a){var y=a.display.lineDiv;lt(y,"CodeMirror-crosshair");function b(x){(x.keyCode==18||!x.altKey)&&(Ue(y,"CodeMirror-crosshair"),ft(document,"keyup",b),ft(document,"mouseover",b))}xe(document,"keyup",b),xe(document,"mouseover",b)}function Ms(a){a.keyCode==16&&(this.doc.sel.shift=!1),Le(this,a)}function Ps(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ci(y.display,a)||Le(y,a)||a.ctrlKey&&!a.altKey||Pe&&a.metaKey)){var b=a.keyCode,x=a.charCode;if(de&&b==Al){Al=null,hn(a);return}if(!(de&&(!a.which||a.which<10)&&Ls(y,a))){var E=String.fromCharCode(x==null?b:x);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Ru=400,Rl=function(a,y,b){this.time=a,this.pos=y,this.button=b};Rl.prototype.compare=function(a,y,b){return this.time+Ru>a&&Xt(y,this.pos)==0&&b==this.button};var Ya,Xa;function Bu(a,y){var b=+new Date;return Xa&&Xa.compare(b,a,y)?(Ya=Xa=null,"triple"):Ya&&Ya.compare(b,a,y)?(Xa=new Rl(b,a,y),Ya=null,"double"):(Ya=new Rl(b,a,y),Xa=null,"single")}function As(a){var y=this,b=y.display;if(!(Le(y,a)||b.activeTouch&&b.input.supportsTouch())){if(b.input.ensurePolled(),b.shift=a.shiftKey,ci(b,a)){De||(b.scroller.draggable=!1,setTimeout(function(){return b.scroller.draggable=!0},100));return}if(!Bl(y,a)){var x=Co(y,a),E=$n(a),te=x?Bu(x,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(x&&Iu(y,E,x,te,a))&&(E==1?x?Fu(y,x,te,a):nr(a)==b.scroller&&hn(a):E==2?(x&&ll(y.doc,x),setTimeout(function(){return b.input.focus()},20)):E==3&&(ge?y.display.input.onContextMenu(a):La(y)))}}}function Iu(a,y,b,x,E){var te="Click";return x=="double"?te="Double"+te:x=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,Ua(a,Ss(te,E),E,function(ie){if(typeof ie=="string"&&(ie=Va[ie]),!ie)return!1;var se=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),se=ie(a,b)!=Bt}finally{a.state.suppressEdits=!1}return se})}function Ou(a,y,b){var x=a.getOption("configureMouse"),E=x?x(a,y,b):{};if(E.unit==null){var te=vt?b.shiftKey&&b.metaKey:b.altKey;E.unit=te?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||b.shiftKey),E.addNew==null&&(E.addNew=Pe?b.metaKey:b.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Pe?b.altKey:b.ctrlKey)),E}function Fu(a,y,b,x){be?setTimeout(Qt(Ta,a),0):a.curOp.focus=Ze();var E=Ou(a,b,x),te=a.doc.sel,ie;a.options.dragDrop&&It&&!a.isReadOnly()&&b=="single"&&(ie=te.contains(y))>-1&&(Xt((ie=te.ranges[ie]).from(),y)<0||y.xRel>0)&&(Xt(ie.to(),y)>0||y.xRel<0)?Zu(a,x,y,E):_u(a,x,y,E)}function Zu(a,y,b,x){var E=a.display,te=!1,ie=Oi(a,function(pe){De&&(E.scroller.draggable=!1),a.state.draggingText=!1,ft(E.wrapper.ownerDocument,"mouseup",ie),ft(E.wrapper.ownerDocument,"mousemove",se),ft(E.scroller,"dragstart",ce),ft(E.scroller,"drop",ie),te||(hn(pe),x.addNew||ll(a.doc,b,null,null,x.extend),De&&!Ne||be&&he==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),se=function(pe){te=te||Math.abs(y.clientX-pe.clientX)+Math.abs(y.clientY-pe.clientY)>=10},ce=function(){return te=!0};De&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!x.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),xe(E.wrapper.ownerDocument,"mouseup",ie),xe(E.wrapper.ownerDocument,"mousemove",se),xe(E.scroller,"dragstart",ce),xe(E.scroller,"drop",ie),La(a),setTimeout(function(){return E.input.focus()},20)}function Rs(a,y,b){if(b=="char")return new ri(y,y);if(b=="word")return a.findWordAt(y);if(b=="line")return new ri(qe(y.line,0),$t(a.doc,qe(y.line+1,0)));var x=b(a,y);return new ri(x.from,x.to)}function _u(a,y,b,x){var E=a.display,te=a.doc;hn(y);var ie,se,ce=te.sel,pe=ce.ranges;if(x.addNew&&!x.extend?(se=te.sel.contains(b),se>-1?ie=pe[se]:ie=new ri(b,b)):(ie=te.sel.primary(),se=te.sel.primIndex),x.unit=="rectangle")x.addNew||(ie=new ri(b,b)),b=Co(a,y,!0,!0),se=-1;else{var Ae=Rs(a,b,x.unit);x.extend?ie=Tl(ie,Ae.anchor,Ae.head,x.extend):ie=Ae}x.addNew?se==-1?(se=pe.length,Gi(te,xo(a,pe.concat([ie]),se),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[se].empty()&&x.unit=="char"&&!x.extend?(Gi(te,xo(a,pe.slice(0,se).concat(pe.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),ce=te.sel):Ll(te,se,ie,gt):(se=0,Gi(te,new po([ie],0),gt),ce=te.sel);var ze=b;function Ct(_n){if(Xt(ze,_n)!=0)if(ze=_n,x.unit=="rectangle"){for(var tr=[],wr=a.options.tabSize,fr=ye(kt(te,b.line).text,b.ch,wr),Gr=ye(kt(te,_n.line).text,_n.ch,wr),ui=Math.min(fr,Gr),Zi=Math.max(fr,Gr),Ci=Math.min(b.line,_n.line),ao=Math.min(a.lastLine(),Math.max(b.line,_n.line));Ci<=ao;Ci++){var eo=kt(te,Ci).text,Mi=bn(eo,ui,wr);ui==Zi?tr.push(new ri(qe(Ci,Mi),qe(Ci,Mi))):eo.length>Mi&&tr.push(new ri(qe(Ci,Mi),qe(Ci,bn(eo,Zi,wr))))}tr.length||tr.push(new ri(b,b)),Gi(te,xo(a,ce.ranges.slice(0,se).concat(tr),se),{origin:"*mouse",scroll:!1}),a.scrollIntoView(_n)}else{var to=ie,Wi=Rs(a,_n,x.unit),Bi=to.anchor,Pi;Xt(Wi.anchor,Bi)>0?(Pi=Wi.head,Bi=mn(to.from(),Wi.anchor)):(Pi=Wi.anchor,Bi=En(to.to(),Wi.head));var Ei=ce.ranges.slice(0);Ei[se]=Hu(a,new ri($t(te,Bi),Pi)),Gi(te,xo(a,Ei,se),gt)}}var pt=E.wrapper.getBoundingClientRect(),tn=0;function yn(_n){var tr=++tn,wr=Co(a,_n,!0,x.unit=="rectangle");if(wr)if(Xt(wr,ze)!=0){a.curOp.focus=Ze(),Ct(wr);var fr=Mo(E,te);(wr.line>=fr.to||wr.line<fr.from)&&setTimeout(Oi(a,function(){tn==tr&&yn(_n)}),150)}else{var Gr=_n.clientY<pt.top?-20:_n.clientY>pt.bottom?20:0;Gr&&setTimeout(Oi(a,function(){tn==tr&&(E.scroller.scrollTop+=Gr,yn(_n))}),50)}}function Pn(_n){a.state.selectingText=!1,tn=1/0,_n&&(hn(_n),E.input.focus()),ft(E.wrapper.ownerDocument,"mousemove",Zn),ft(E.wrapper.ownerDocument,"mouseup",Yn),te.history.lastSelOrigin=null}var Zn=Oi(a,function(_n){_n.buttons===0||!$n(_n)?Pn(_n):yn(_n)}),Yn=Oi(a,Pn);a.state.selectingText=Yn,xe(E.wrapper.ownerDocument,"mousemove",Zn),xe(E.wrapper.ownerDocument,"mouseup",Yn)}function Hu(a,y){var b=y.anchor,x=y.head,E=kt(a.doc,b.line);if(Xt(b,x)==0&&b.sticky==x.sticky)return y;var te=le(E);if(!te)return y;var ie=z(te,b.ch,b.sticky),se=te[ie];if(se.from!=b.ch&&se.to!=b.ch)return y;var ce=ie+(se.from==b.ch==(se.level!=1)?0:1);if(ce==0||ce==te.length)return y;var pe;if(x.line!=b.line)pe=(x.line-b.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Ae=z(te,x.ch,x.sticky),ze=Ae-ie||(x.ch-b.ch)*(se.level==1?-1:1);Ae==ce-1||Ae==ce?pe=ze<0:pe=ze>0}var Ct=te[ce+(pe?-1:0)],pt=pe==(Ct.level==1),tn=pt?Ct.from:Ct.to,yn=pt?"after":"before";return b.ch==tn&&b.sticky==yn?y:new ri(new qe(b.line,tn,yn),x)}function Bs(a,y,b,x){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(Ct){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;x&&hn(y);var ie=a.display,se=ie.lineDiv.getBoundingClientRect();if(te>se.bottom||!Lt(a,b))return Wt(y);te-=se.top-ie.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var pe=ie.gutters.childNodes[ce];if(pe&&pe.getBoundingClientRect().right>=E){var Ae=Ge(a.doc,te),ze=a.display.gutterSpecs[ce];return nt(a,b,a,Ae,ze.className,y),Wt(y)}}}function Bl(a,y){return Bs(a,y,"gutterClick",!0)}function Is(a,y){ci(a.display,y)||zu(a,y)||Le(a,y,"contextmenu")||ge||a.display.input.onContextMenu(y)}function zu(a,y){return Lt(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Os(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ko(a)}var xa={toString:function(){return"CodeMirror.Init"}},Fs={},pl={};function Wu(a){var y=a.optionHandlers;function b(x,E,te,ie){a.defaults[x]=E,te&&(y[x]=ie?function(se,ce,pe){pe!=xa&&te(se,ce,pe)}:te)}a.defineOption=b,a.Init=xa,b("value","",function(x,E){return x.setValue(E)},!0),b("mode",null,function(x,E){x.doc.modeOption=E,El(x)},!0),b("indentUnit",2,El,!0),b("indentWithTabs",!1),b("smartIndent",!0),b("tabSize",4,function(x){Fa(x),ko(x),zi(x)},!0),b("lineSeparator",null,function(x,E){if(x.doc.lineSep=E,!!E){var te=[],ie=x.doc.first;x.doc.iter(function(ce){for(var pe=0;;){var Ae=ce.text.indexOf(E,pe);if(Ae==-1)break;pe=Ae+E.length,te.push(qe(ie,Ae))}ie++});for(var se=te.length-1;se>=0;se--)va(x.doc,E,te[se],qe(te[se].line,te[se].ch+E.length))}}),b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(x,E,te){x.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=xa&&x.refresh()}),b("specialCharPlaceholder",br,function(x){return x.refresh()},!0),b("electricChars",!0),b("inputStyle",Re?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),b("spellcheck",!1,function(x,E){return x.getInputField().spellcheck=E},!0),b("autocorrect",!1,function(x,E){return x.getInputField().autocorrect=E},!0),b("autocapitalize",!1,function(x,E){return x.getInputField().autocapitalize=E},!0),b("rtlMoveVisually",!mt),b("wholeLineUpdateBefore",!0),b("theme","default",function(x){Os(x),Oa(x)},!0),b("keyMap","default",function(x,E,te){var ie=fl(E),se=te!=xa&&fl(te);se&&se.detach&&se.detach(x,ie),ie.attach&&ie.attach(x,se||null)}),b("extraKeys",null),b("configureMouse",null),b("lineWrapping",!1,Gu,!0),b("gutters",[],function(x,E){x.display.gutterSpecs=wl(E,x.options.lineNumbers),Oa(x)},!0),b("fixedGutter",!0,function(x,E){x.display.gutters.style.left=E?qo(x.display)+"px":"0",x.refresh()},!0),b("coverGutterNextToScrollbar",!1,function(x){return Ii(x)},!0),b("scrollbarStyle","native",function(x){wo(x),Ii(x),x.display.scrollbars.setScrollTop(x.doc.scrollTop),x.display.scrollbars.setScrollLeft(x.doc.scrollLeft)},!0),b("lineNumbers",!1,function(x,E){x.display.gutterSpecs=wl(x.options.gutters,E),Oa(x)},!0),b("firstLineNumber",1,Oa,!0),b("lineNumberFormatter",function(x){return x},Oa,!0),b("showCursorWhenSelecting",!1,zo,!0),b("resetSelectionOnContextMenu",!0),b("lineWiseCopyCut",!0),b("pasteLinesPerSelection",!0),b("selectionsMayTouch",!1),b("readOnly",!1,function(x,E){E=="nocursor"&&(Wo(x),x.display.input.blur()),x.display.input.readOnlyChanged(E)}),b("screenReaderLabel",null,function(x,E){E=E===""?null:E,x.display.input.screenReaderLabelChanged(E)}),b("disableInput",!1,function(x,E){E||x.display.input.reset()},!0),b("dragDrop",!0,Ku),b("allowDropFileTypes",null),b("cursorBlinkRate",530),b("cursorScrollMargin",0),b("cursorHeight",1,zo,!0),b("singleCursorHeightPerLine",!0,zo,!0),b("workTime",100),b("workDelay",100),b("flattenSpans",!0,Fa,!0),b("addModeClass",!1,Fa,!0),b("pollInterval",100),b("undoDepth",200,function(x,E){return x.doc.history.undoDepth=E}),b("historyEventDelay",1250),b("viewportMargin",10,function(x){return x.refresh()},!0),b("maxHighlightLength",1e4,Fa,!0),b("moveInputWithCursor",!0,function(x,E){E||x.display.input.resetPosition()}),b("tabindex",null,function(x,E){return x.display.input.getField().tabIndex=E||""}),b("autofocus",null),b("direction","ltr",function(x,E){return x.doc.setDirection(E)},!0),b("phrases",null)}function Ku(a,y,b){var x=b&&b!=xa;if(!y!=!x){var E=a.display.dragFunctions,te=y?xe:ft;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 Gu(a){a.options.lineWrapping?(lt(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ue(a.display.wrapper,"CodeMirror-wrap"),In(a)),Ea(a),zi(a),ko(a),setTimeout(function(){return Ii(a)},100)}function gi(a,y){var b=this;if(!(this instanceof gi))return new gi(a,y);this.options=y=y?Ht(y):{},Ht(Fs,y,!1);var x=y.value;typeof x=="string"?x=new qi(x,y.mode,null,y.lineSeparator,y.direction):y.mode&&(x.modeOption=y.mode),this.doc=x;var E=new gi.inputStyles[y.inputStyle](this),te=this.display=new ru(a,x,E,y);te.wrapper.CodeMirror=this,Os(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wo(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 fe,keySeq:null,specialChars:null},y.autofocus&&!Re&&te.input.focus(),be&&he<11&&setTimeout(function(){return b.display.input.reset(!0)},20),ju(this),wu(),fo(this),this.curOp.forceUpdate=!0,Xl(this,x),y.autofocus&&!Re||this.hasFocus()?setTimeout(function(){b.hasFocus()&&!b.state.focused&&Na(b)},20):Wo(this);for(var ie in pl)pl.hasOwnProperty(ie)&&pl[ie](this,y[ie],xa);Wl(this),y.finishInit&&y.finishInit(this);for(var se=0;se<Il.length;++se)Il[se](this);yo(this),De&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}gi.defaults=Fs,gi.optionHandlers=pl;function ju(a){var y=a.display;xe(y.scroller,"mousedown",Oi(a,As)),be&&he<11?xe(y.scroller,"dblclick",Oi(a,function(ce){if(!Le(a,ce)){var pe=Co(a,ce);if(!(!pe||Bl(a,ce)||ci(a.display,ce))){hn(ce);var Ae=a.findWordAt(pe);ll(a.doc,Ae.anchor,Ae.head)}}})):xe(y.scroller,"dblclick",function(ce){return Le(a,ce)||hn(ce)}),xe(y.scroller,"contextmenu",function(ce){return Is(a,ce)}),xe(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Is(a,ce)});var b,x={end:0};function E(){y.activeTouch&&(b=setTimeout(function(){return y.activeTouch=null},1e3),x=y.activeTouch,x.end=+new Date)}function te(ce){if(ce.touches.length!=1)return!1;var pe=ce.touches[0];return pe.radiusX<=1&&pe.radiusY<=1}function ie(ce,pe){if(pe.left==null)return!0;var Ae=pe.left-ce.left,ze=pe.top-ce.top;return Ae*Ae+ze*ze>20*20}xe(y.scroller,"touchstart",function(ce){if(!Le(a,ce)&&!te(ce)&&!Bl(a,ce)){y.input.ensurePolled(),clearTimeout(b);var pe=+new Date;y.activeTouch={start:pe,moved:!1,prev:pe-x.end<=300?x:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),xe(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),xe(y.scroller,"touchend",function(ce){var pe=y.activeTouch;if(pe&&!ci(y,ce)&&pe.left!=null&&!pe.moved&&new Date-pe.start<300){var Ae=a.coordsChar(y.activeTouch,"page"),ze;!pe.prev||ie(pe,pe.prev)?ze=new ri(Ae,Ae):!pe.prev.prev||ie(pe,pe.prev.prev)?ze=a.findWordAt(Ae):ze=new ri(qe(Ae.line,0),$t(a.doc,qe(Ae.line+1,0))),a.setSelection(ze.anchor,ze.head),a.focus(),hn(ce)}E()}),xe(y.scroller,"touchcancel",E),xe(y.scroller,"scroll",function(){y.scroller.clientHeight&&(Ao(a,y.scroller.scrollTop),Ro(a,y.scroller.scrollLeft,!0),nt(a,"scroll",a))}),xe(y.scroller,"mousewheel",function(ce){return jl(a,ce)}),xe(y.scroller,"DOMMouseScroll",function(ce){return jl(a,ce)}),xe(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){Le(a,ce)||Ln(ce)},over:function(ce){Le(a,ce)||(Cu(a,ce),Ln(ce))},start:function(ce){return bu(a,ce)},drop:Oi(a,xu),leave:function(ce){Le(a,ce)||xs(a)}};var se=y.input.getField();xe(se,"keyup",function(ce){return Ms.call(a,ce)}),xe(se,"keydown",Oi(a,Ns)),xe(se,"keypress",Oi(a,Ps)),xe(se,"focus",function(ce){return Na(a,ce)}),xe(se,"blur",function(ce){return Wo(a,ce)})}var Il=[];gi.defineInitHook=function(a){return Il.push(a)};function Ja(a,y,b,x){var E=a.doc,te;b==null&&(b="add"),b=="smart"&&(E.mode.indent?te=Nr(a,y).state:b="prev");var ie=a.options.tabSize,se=kt(E,y),ce=ye(se.text,null,ie);se.stateAfter&&(se.stateAfter=null);var pe=se.text.match(/^\s*/)[0],Ae;if(!x&&!/\S/.test(se.text))Ae=0,b="not";else if(b=="smart"&&(Ae=E.mode.indent(te,se.text.slice(pe.length),se.text),Ae==Bt||Ae>150)){if(!x)return;b="prev"}b=="prev"?y>E.first?Ae=ye(kt(E,y-1).text,null,ie):Ae=0:b=="add"?Ae=ce+a.options.indentUnit:b=="subtract"?Ae=ce-a.options.indentUnit:typeof b=="number"&&(Ae=ce+b),Ae=Math.max(0,Ae);var ze="",Ct=0;if(a.options.indentWithTabs)for(var pt=Math.floor(Ae/ie);pt;--pt)Ct+=ie,ze+=" ";if(Ct<Ae&&(ze+=Me(Ae-Ct)),ze!=pe)return va(E,ze,qe(y,0),qe(y,pe.length),"+input"),se.stateAfter=null,!0;for(var tn=0;tn<E.sel.ranges.length;tn++){var yn=E.sel.ranges[tn];if(yn.head.line==y&&yn.head.ch<pe.length){var Pn=qe(y,pe.length);Ll(E,tn,new ri(Pn,Pn));break}}}var bo=null;function vl(a){bo=a}function Ol(a,y,b,x,E){var te=a.doc;a.display.shift=!1,x||(x=te.sel);var ie=+new Date-200,se=E=="paste"||a.state.pasteIncoming>ie,ce=Wn(y),pe=null;if(se&&x.ranges.length>1)if(bo&&bo.text.join(`
|
|
`)==y){if(x.ranges.length%bo.text.length==0){pe=[];for(var Ae=0;Ae<bo.text.length;Ae++)pe.push(te.splitLines(bo.text[Ae]))}}else ce.length==x.ranges.length&&a.options.pasteLinesPerSelection&&(pe=Ve(ce,function(Zn){return[Zn]}));for(var ze=a.curOp.updateInput,Ct=x.ranges.length-1;Ct>=0;Ct--){var pt=x.ranges[Ct],tn=pt.from(),yn=pt.to();pt.empty()&&(b&&b>0?tn=qe(tn.line,tn.ch-b):a.state.overwrite&&!se?yn=qe(yn.line,Math.min(kt(te,yn.line).text.length,yn.ch+ke(ce).length)):se&&bo&&bo.lineWise&&bo.text.join(`
|
|
`)==ce.join(`
|
|
`)&&(tn=yn=qe(tn.line,0)));var Pn={from:tn,to:yn,text:pe?pe[Ct%pe.length]:ce,origin:E||(se?"paste":a.state.cutIncoming>ie?"cut":"+input")};pa(a.doc,Pn),$r(a,"inputRead",a,Pn)}y&&!se&&_s(a,y),Po(a),a.curOp.updateInput<2&&(a.curOp.updateInput=ze),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Zs(a,y){var b=a.clipboardData&&a.clipboardData.getData("Text");if(b)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&oo(y,function(){return Ol(y,b,0,null,"paste")}),!0}function _s(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var b=a.doc.sel,x=b.ranges.length-1;x>=0;x--){var E=b.ranges[x];if(!(E.head.ch>100||x&&b.ranges[x-1].head.line==E.head.line)){var te=a.getModeAt(E.head),ie=!1;if(te.electricChars){for(var se=0;se<te.electricChars.length;se++)if(y.indexOf(te.electricChars.charAt(se))>-1){ie=Ja(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(kt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=Ja(a,E.head.line,"smart"));ie&&$r(a,"electricInput",a,E.head.line)}}}function Hs(a){for(var y=[],b=[],x=0;x<a.doc.sel.ranges.length;x++){var E=a.doc.sel.ranges[x].head.line,te={anchor:qe(E,0),head:qe(E+1,0)};b.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:b}}function zs(a,y,b,x){a.setAttribute("autocorrect",b?"":"off"),a.setAttribute("autocapitalize",x?"":"off"),a.setAttribute("spellcheck",!!y)}function Ws(){var a=Ee("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ee("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return De?a.style.width="1000px":a.setAttribute("wrap","off"),Je&&(a.style.border="1px solid black"),zs(a),y}function Vu(a){var y=a.optionHandlers,b=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(x,E){var te=this.options,ie=te[x];te[x]==E&&x!="mode"||(te[x]=E,y.hasOwnProperty(x)&&Oi(this,y[x])(this,E,ie),nt(this,"optionChange",this,x))},getOption:function(x){return this.options[x]},getDoc:function(){return this.doc},addKeyMap:function(x,E){this.state.keyMaps[E?"push":"unshift"](fl(x))},removeKeyMap:function(x){for(var E=this.state.keyMaps,te=0;te<E.length;++te)if(E[te]==x||E[te].name==x)return E.splice(te,1),!0},addOverlay:Yi(function(x,E){var te=x.token?x:a.getMode(this.options,x);if(te.startState)throw new Error("Overlays may not be stateful.");st(this.state.overlays,{mode:te,modeSpec:x,opaque:E&&E.opaque,priority:E&&E.priority||0},function(ie){return ie.priority}),this.state.modeGen++,zi(this)}),removeOverlay:Yi(function(x){for(var E=this.state.overlays,te=0;te<E.length;++te){var ie=E[te].modeSpec;if(ie==x||typeof x=="string"&&ie.name==x){E.splice(te,1),this.state.modeGen++,zi(this);return}}}),indentLine:Yi(function(x,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),ln(this.doc,x)&&Ja(this,x,E,te)}),indentSelection:Yi(function(x){for(var E=this.doc.sel.ranges,te=-1,ie=0;ie<E.length;ie++){var se=E[ie];if(se.empty())se.head.line>te&&(Ja(this,se.head.line,x,!0),te=se.head.line,ie==this.doc.sel.primIndex&&Po(this));else{var ce=se.from(),pe=se.to(),Ae=Math.max(te,ce.line);te=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var ze=Ae;ze<te;++ze)Ja(this,ze,x);var Ct=this.doc.sel.ranges;ce.ch==0&&E.length==Ct.length&&Ct[ie].from().ch>0&&Ll(this.doc,ie,new ri(ce,Ct[ie].to()),We)}}}),getTokenAt:function(x,E){return Tr(this,x,E)},getLineTokens:function(x,E){return Tr(this,qe(x),E,!0)},getTokenTypeAt:function(x){x=$t(this.doc,x);var E=xr(this,kt(this.doc,x.line)),te=0,ie=(E.length-1)/2,se=x.ch,ce;if(se==0)ce=E[2];else for(;;){var pe=te+ie>>1;if((pe?E[pe*2-1]:0)>=se)ie=pe;else if(E[pe*2+1]<se)te=pe+1;else{ce=E[pe*2+2];break}}var Ae=ce?ce.indexOf("overlay "):-1;return Ae<0?ce:Ae==0?null:ce.slice(0,Ae-1)},getModeAt:function(x){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(x).state).mode:E},getHelper:function(x,E){return this.getHelpers(x,E)[0]},getHelpers:function(x,E){var te=[];if(!b.hasOwnProperty(E))return te;var ie=b[E],se=this.getModeAt(x);if(typeof se[E]=="string")ie[se[E]]&&te.push(ie[se[E]]);else if(se[E])for(var ce=0;ce<se[E].length;ce++){var pe=ie[se[E][ce]];pe&&te.push(pe)}else se.helperType&&ie[se.helperType]?te.push(ie[se.helperType]):ie[se.name]&&te.push(ie[se.name]);for(var Ae=0;Ae<ie._global.length;Ae++){var ze=ie._global[Ae];ze.pred(se,this)&&wt(te,ze.val)==-1&&te.push(ze.val)}return te},getStateAfter:function(x,E){var te=this.doc;return x=kn(te,x==null?te.first+te.size-1:x),Nr(this,x+1,E).state},cursorCoords:function(x,E){var te,ie=this.doc.sel.primary();return x==null?te=ie.head:typeof x=="object"?te=$t(this.doc,x):te=x?ie.from():ie.to(),fi(this,te,E||"page")},charCoords:function(x,E){return Hi(this,$t(this.doc,x),E||"page")},coordsChar:function(x,E){return x=To(this,x,E||"page"),mi(this,x.left,x.top)},lineAtHeight:function(x,E){return x=To(this,{top:x,left:0},E||"page").top,Ge(this.doc,x+this.display.viewOffset)},heightAtLine:function(x,E,te){var ie=!1,se;if(typeof x=="number"){var ce=this.doc.first+this.doc.size-1;x<this.doc.first?x=this.doc.first:x>ce&&(x=ce,ie=!0),se=kt(this.doc,x)}else se=x;return Do(this,se,{top:0,left:0},E||"page",te||ie).top+(ie?this.doc.height-Dn(se):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(x,E,te,ie,se){var ce=this.display;x=fi(this,$t(this.doc,x));var pe=x.bottom,Ae=x.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),ie=="over")pe=x.top;else if(ie=="above"||ie=="near"){var ze=Math.max(ce.wrapper.clientHeight,this.doc.height),Ct=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(ie=="above"||x.bottom+E.offsetHeight>ze)&&x.top>E.offsetHeight?pe=x.top-E.offsetHeight:x.bottom+E.offsetHeight<=ze&&(pe=x.bottom),Ae+E.offsetWidth>Ct&&(Ae=Ct-E.offsetWidth)}E.style.top=pe+"px",E.style.left=E.style.right="",se=="right"?(Ae=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(se=="left"?Ae=0:se=="middle"&&(Ae=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=Ae+"px"),te&&tl(this,{left:Ae,top:pe,right:Ae+E.offsetWidth,bottom:pe+E.offsetHeight})},triggerOnKeyDown:Yi(Ns),triggerOnKeyPress:Yi(Ps),triggerOnKeyUp:Ms,triggerOnMouseDown:Yi(As),execCommand:function(x){if(Va.hasOwnProperty(x))return Va[x].call(null,this)},triggerElectric:Yi(function(x){_s(this,x)}),findPosH:function(x,E,te,ie){var se=1;E<0&&(se=-1,E=-E);for(var ce=$t(this.doc,x),pe=0;pe<E&&(ce=Fl(this.doc,ce,se,te,ie),!ce.hitSide);++pe);return ce},moveH:Yi(function(x,E){var te=this;this.extendSelectionsBy(function(ie){return te.display.shift||te.doc.extend||ie.empty()?Fl(te.doc,ie.head,x,E,te.options.rtlMoveVisually):x<0?ie.from():ie.to()},xt)}),deleteH:Yi(function(x,E){var te=this.doc.sel,ie=this.doc;te.somethingSelected()?ie.replaceSelection("",null,"+delete"):ya(this,function(se){var ce=Fl(ie,se.head,x,E,!1);return x<0?{from:ce,to:se.head}:{from:se.head,to:ce}})}),findPosV:function(x,E,te,ie){var se=1,ce=ie;E<0&&(se=-1,E=-E);for(var pe=$t(this.doc,x),Ae=0;Ae<E;++Ae){var ze=fi(this,pe,"div");if(ce==null?ce=ze.left:ze.left=ce,pe=Ks(this,ze,se,te),pe.hitSide)break}return pe},moveV:Yi(function(x,E){var te=this,ie=this.doc,se=[],ce=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Ae){if(ce)return x<0?Ae.from():Ae.to();var ze=fi(te,Ae.head,"div");Ae.goalColumn!=null&&(ze.left=Ae.goalColumn),se.push(ze.left);var Ct=Ks(te,ze,x,E);return E=="page"&&Ae==ie.sel.primary()&&da(te,Hi(te,Ct,"div").top-ze.top),Ct},xt),se.length)for(var pe=0;pe<ie.sel.ranges.length;pe++)ie.sel.ranges[pe].goalColumn=se[pe]}),findWordAt:function(x){var E=this.doc,te=kt(E,x.line).text,ie=x.ch,se=x.ch;if(te){var ce=this.getHelper(x,"wordChars");(x.sticky=="before"||se==te.length)&&ie?--ie:++se;for(var pe=te.charAt(ie),Ae=dt(pe,ce)?function(ze){return dt(ze,ce)}:/\s/.test(pe)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!dt(ze)};ie>0&&Ae(te.charAt(ie-1));)--ie;for(;se<te.length&&Ae(te.charAt(se));)++se}return new ri(qe(x.line,ie),qe(x.line,se))},toggleOverwrite:function(x){x!=null&&x==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?lt(this.display.cursorDiv,"CodeMirror-overwrite"):Ue(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ze()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yi(function(x,E){ea(this,x,E)}),getScrollInfo:function(){var x=this.display.scroller;return{left:x.scrollLeft,top:x.scrollTop,height:x.scrollHeight-ni(this)-this.display.barHeight,width:x.scrollWidth-ni(this)-this.display.barWidth,clientHeight:Ui(this),clientWidth:lo(this)}},scrollIntoView:Yi(function(x,E){x==null?(x={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof x=="number"?x={from:qe(x,0),to:null}:x.from==null&&(x={from:x,to:null}),x.to||(x.to=x.from),x.margin=E||0,x.from.line!=null?nl(this,x):Ra(this,x.from,x.to,x.margin)}),setSize:Yi(function(x,E){var te=this,ie=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};x!=null&&(this.display.wrapper.style.width=ie(x)),E!=null&&(this.display.wrapper.style.height=ie(E)),this.options.lineWrapping&&_o(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(ce){if(ce.widgets){for(var pe=0;pe<ce.widgets.length;pe++)if(ce.widgets[pe].noHScroll){co(te,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(x){return oo(this,x)},startOperation:function(){return fo(this)},endOperation:function(){return yo(this)},refresh:Yi(function(){var x=this.display.cachedTextHeight;zi(this),this.curOp.forceUpdate=!0,ko(this),ea(this,this.doc.scrollLeft,this.doc.scrollTop),bl(this.display),(x==null||Math.abs(x-Ai(this.display))>.5||this.options.lineWrapping)&&Ea(this),nt(this,"refresh",this)}),swapDoc:Yi(function(x){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Xl(this,x),ko(this),this.display.input.reset(),ea(this,x.scrollLeft,x.scrollTop),this.curOp.forceScroll=!0,$r(this,"swapDoc",this,E),E}),phrase:function(x){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,x)?E[x]:x},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}},_t(a),a.registerHelper=function(x,E,te){b.hasOwnProperty(x)||(b[x]=a[x]={_global:[]}),b[x][E]=te},a.registerGlobalHelper=function(x,E,te,ie){a.registerHelper(x,E,ie),b[x]._global.push({pred:te,val:ie})}}function Fl(a,y,b,x,E){var te=y,ie=b,se=kt(a,y.line),ce=E&&a.direction=="rtl"?-b:b;function pe(){var Yn=y.line+ce;return Yn<a.first||Yn>=a.first+a.size?!1:(y=new qe(Yn,y.ch,y.sticky),se=kt(a,Yn))}function Ae(Yn){var _n;if(x=="codepoint"){var tr=se.text.charCodeAt(y.ch+(x>0?0:-1));isNaN(tr)?_n=null:_n=new qe(y.line,Math.max(0,Math.min(se.text.length,y.ch+b*(tr>=55296&&tr<56320?2:1))),-b)}else E?_n=Tu(a.cm,se,y,b):_n=Ml(se,y,b);if(_n==null)if(!Yn&&pe())y=Pl(E,a.cm,se,y.line,ce);else return!1;else y=_n;return!0}if(x=="char"||x=="codepoint")Ae();else if(x=="column")Ae(!0);else if(x=="word"||x=="group")for(var ze=null,Ct=x=="group",pt=a.cm&&a.cm.getHelper(y,"wordChars"),tn=!0;!(b<0&&!Ae(!tn));tn=!1){var yn=se.text.charAt(y.ch)||`
|
|
`,Pn=dt(yn,pt)?"w":Ct&&yn==`
|
|
`?"n":!Ct||/\s/.test(yn)?null:"p";if(Ct&&!tn&&!Pn&&(Pn="s"),ze&&ze!=Pn){b<0&&(b=1,Ae(),y.sticky="after");break}if(Pn&&(ze=Pn),b>0&&!Ae(!tn))break}var Zn=ul(a,y,te,ie,!0);return dn(te,Zn)&&(Zn.hitSide=!0),Zn}function Ks(a,y,b,x){var E=a.doc,te=y.left,ie;if(x=="page"){var se=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(se-.5*Ai(a.display),3);ie=(b>0?y.bottom:y.top)+b*ce}else x=="line"&&(ie=b>0?y.bottom+3:y.top-3);for(var pe;pe=mi(a,te,ie),!!pe.outside;){if(b<0?ie<=0:ie>=E.height){pe.hitSide=!0;break}ie+=b*5}return pe}var li=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};li.prototype.init=function(a){var y=this,b=this,x=b.cm,E=b.div=a.lineDiv;zs(E,x.options.spellcheck,x.options.autocorrect,x.options.autocapitalize);function te(se){for(var ce=se.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}xe(E,"paste",function(se){!te(se)||Le(x,se)||Zs(se,x)||he<=11&&setTimeout(Oi(x,function(){return y.updateFromDOM()}),20)}),xe(E,"compositionstart",function(se){y.composing={data:se.data,done:!1}}),xe(E,"compositionupdate",function(se){y.composing||(y.composing={data:se.data,done:!1})}),xe(E,"compositionend",function(se){y.composing&&(se.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),xe(E,"touchstart",function(){return b.forceCompositionEnd()}),xe(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(se){if(!(!te(se)||Le(x,se))){if(x.somethingSelected())vl({lineWise:!1,text:x.getSelections()}),se.type=="cut"&&x.replaceSelection("",null,"cut");else if(x.options.lineWiseCopyCut){var ce=Hs(x);vl({lineWise:!0,text:ce.text}),se.type=="cut"&&x.operation(function(){x.setSelections(ce.ranges,0,We),x.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var pe=bo.text.join(`
|
|
`);if(se.clipboardData.setData("Text",pe),se.clipboardData.getData("Text")==pe){se.preventDefault();return}}var Ae=Ws(),ze=Ae.firstChild;x.display.lineSpace.insertBefore(Ae,x.display.lineSpace.firstChild),ze.value=bo.text.join(`
|
|
`);var Ct=document.activeElement;Ot(ze),setTimeout(function(){x.display.lineSpace.removeChild(Ae),Ct.focus(),Ct==E&&b.showPrimarySelection()},50)}}xe(E,"copy",ie),xe(E,"cut",ie)},li.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var a=qa(this.cm,!1);return a.focus=document.activeElement==this.div,a},li.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},li.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},li.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,b=y.doc.sel.primary(),x=b.from(),E=b.to();if(y.display.viewTo==y.display.viewFrom||x.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var te=ml(y,a.anchorNode,a.anchorOffset),ie=ml(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&ie&&!ie.bad&&Xt(mn(te,ie),x)==0&&Xt(En(te,ie),E)==0)){var se=y.display.view,ce=x.line>=y.display.viewFrom&&Gs(y,x)||{node:se[0].measure.map[2],offset:0},pe=E.line<y.display.viewTo&&Gs(y,E);if(!pe){var Ae=se[se.length-1].measure,ze=Ae.maps?Ae.maps[Ae.maps.length-1]:Ae.map;pe={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ce||!pe){a.removeAllRanges();return}var Ct=a.rangeCount&&a.getRangeAt(0),pt;try{pt=Se(ce.node,ce.offset,pe.offset,pe.node)}catch(tn){}pt&&(!ae&&y.state.focused?(a.collapse(ce.node,ce.offset),pt.collapsed||(a.removeAllRanges(),a.addRange(pt))):(a.removeAllRanges(),a.addRange(pt)),Ct&&a.anchorNode==null?a.addRange(Ct):ae&&this.startGracePeriod()),this.rememberSelection()}},li.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)},li.prototype.showMultipleSelections=function(a){me(this.cm.display.cursorDiv,a.cursors),me(this.cm.display.selectionDiv,a.selection)},li.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},li.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return $e(this.div,y)},li.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},li.prototype.blur=function(){this.div.blur()},li.prototype.getField=function(){return this.div},li.prototype.supportsTouch=function(){return!0},li.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():oo(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)},li.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},li.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ye&&we&&this.cm.display.gutterSpecs.length&&Uu(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var b=ml(y,a.anchorNode,a.anchorOffset),x=ml(y,a.focusNode,a.focusOffset);b&&x&&oo(y,function(){Gi(y.doc,Go(b,x),We),(b.bad||x.bad)&&(y.curOp.selectionChanged=!0)})}}},li.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,b=a.doc.sel.primary(),x=b.from(),E=b.to();if(x.ch==0&&x.line>a.firstLine()&&(x=qe(x.line-1,kt(a.doc,x.line-1).length)),E.ch==kt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=qe(E.line+1,0)),x.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,ie,se;x.line==y.viewFrom||(te=Lo(a,x.line))==0?(ie=_e(y.view[0].line),se=y.view[0].node):(ie=_e(y.view[te].line),se=y.view[te-1].node.nextSibling);var ce=Lo(a,E.line),pe,Ae;if(ce==y.view.length-1?(pe=y.viewTo-1,Ae=y.lineDiv.lastChild):(pe=_e(y.view[ce+1].line)-1,Ae=y.view[ce+1].node.previousSibling),!se)return!1;for(var ze=a.doc.splitLines(Yu(a,se,Ae,ie,pe)),Ct=un(a.doc,qe(ie,0),qe(pe,kt(a.doc,pe).text.length));ze.length>1&&Ct.length>1;)if(ke(ze)==ke(Ct))ze.pop(),Ct.pop(),pe--;else if(ze[0]==Ct[0])ze.shift(),Ct.shift(),ie++;else break;for(var pt=0,tn=0,yn=ze[0],Pn=Ct[0],Zn=Math.min(yn.length,Pn.length);pt<Zn&&yn.charCodeAt(pt)==Pn.charCodeAt(pt);)++pt;for(var Yn=ke(ze),_n=ke(Ct),tr=Math.min(Yn.length-(ze.length==1?pt:0),_n.length-(Ct.length==1?pt:0));tn<tr&&Yn.charCodeAt(Yn.length-tn-1)==_n.charCodeAt(_n.length-tn-1);)++tn;if(ze.length==1&&Ct.length==1&&ie==x.line)for(;pt&&pt>x.ch&&Yn.charCodeAt(Yn.length-tn-1)==_n.charCodeAt(_n.length-tn-1);)pt--,tn++;ze[ze.length-1]=Yn.slice(0,Yn.length-tn).replace(/^\u200b+/,""),ze[0]=ze[0].slice(pt).replace(/\u200b+$/,"");var wr=qe(ie,pt),fr=qe(pe,Ct.length?ke(Ct).length-tn:0);if(ze.length>1||ze[0]||Xt(wr,fr))return va(a.doc,ze,wr,fr,"+input"),!0},li.prototype.ensurePolled=function(){this.forceCompositionEnd()},li.prototype.reset=function(){this.forceCompositionEnd()},li.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},li.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))},li.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&oo(this.cm,function(){return zi(a.cm)})},li.prototype.setUneditable=function(a){a.contentEditable="false"},li.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||Oi(this.cm,Ol)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},li.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},li.prototype.onContextMenu=function(){},li.prototype.resetPosition=function(){},li.prototype.needsContentAttribute=!0;function Gs(a,y){var b=vo(a,y.line);if(!b||b.hidden)return null;var x=kt(a.doc,y.line),E=vi(b,x,y.line),te=le(x,a.doc.direction),ie="left";if(te){var se=z(te,y.ch);ie=se%2?"right":"left"}var ce=ia(E.map,y.ch,ie);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function Uu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function ba(a,y){return y&&(a.bad=!0),a}function Yu(a,y,b,x,E){var te="",ie=!1,se=a.doc.lineSeparator(),ce=!1;function pe(pt){return function(tn){return tn.id==pt}}function Ae(){ie&&(te+=se,ce&&(te+=se),ie=ce=!1)}function ze(pt){pt&&(Ae(),te+=pt)}function Ct(pt){if(pt.nodeType==1){var tn=pt.getAttribute("cm-text");if(tn){ze(tn);return}var yn=pt.getAttribute("cm-marker"),Pn;if(yn){var Zn=a.findMarks(qe(x,0),qe(E+1,0),pe(+yn));Zn.length&&(Pn=Zn[0].find(0))&&ze(un(a.doc,Pn.from,Pn.to).join(se));return}if(pt.getAttribute("contenteditable")=="false")return;var Yn=/^(pre|div|p|li|table|br)$/i.test(pt.nodeName);if(!/^br$/i.test(pt.nodeName)&&pt.textContent.length==0)return;Yn&&Ae();for(var _n=0;_n<pt.childNodes.length;_n++)Ct(pt.childNodes[_n]);/^(pre|p)$/i.test(pt.nodeName)&&(ce=!0),Yn&&(ie=!0)}else pt.nodeType==3&&ze(pt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ct(y),y!=b;)y=y.nextSibling,ce=!1;return te}function ml(a,y,b){var x;if(y==a.display.lineDiv){if(x=a.display.lineDiv.childNodes[b],!x)return ba(a.clipPos(qe(a.display.viewTo-1)),!0);y=null,b=0}else for(x=y;;x=x.parentNode){if(!x||x==a.display.lineDiv)return null;if(x.parentNode&&x.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var te=a.display.view[E];if(te.node==x)return Xu(te,y,b)}}function Xu(a,y,b){var x=a.text.firstChild,E=!1;if(!y||!$e(x,y))return ba(qe(_e(a.line),0),!0);if(y==x&&(E=!0,y=x.childNodes[b],b=0,!y)){var te=a.rest?ke(a.rest):a.line;return ba(qe(_e(te),te.text.length),E)}var ie=y.nodeType==3?y:null,se=y;for(!ie&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ie=y.firstChild,b&&(b=ie.nodeValue.length));se.parentNode!=x;)se=se.parentNode;var ce=a.measure,pe=ce.maps;function Ae(Pn,Zn,Yn){for(var _n=-1;_n<(pe?pe.length:0);_n++)for(var tr=_n<0?ce.map:pe[_n],wr=0;wr<tr.length;wr+=3){var fr=tr[wr+2];if(fr==Pn||fr==Zn){var Gr=_e(_n<0?a.line:a.rest[_n]),ui=tr[wr]+Yn;return(Yn<0||fr!=Pn)&&(ui=tr[wr+(Yn?1:0)]),qe(Gr,ui)}}}var ze=Ae(ie,se,b);if(ze)return ba(ze,E);for(var Ct=se.nextSibling,pt=ie?ie.nodeValue.length-b:0;Ct;Ct=Ct.nextSibling){if(ze=Ae(Ct,Ct.firstChild,0),ze)return ba(qe(ze.line,ze.ch-pt),E);pt+=Ct.textContent.length}for(var tn=se.previousSibling,yn=b;tn;tn=tn.previousSibling){if(ze=Ae(tn,tn.firstChild,-1),ze)return ba(qe(ze.line,ze.ch+yn),E);yn+=tn.textContent.length}}var Ti=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new fe,this.hasSelection=!1,this.composing=null};Ti.prototype.init=function(a){var y=this,b=this,x=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),Je&&(E.style.width="0px"),xe(E,"input",function(){be&&he>=9&&y.hasSelection&&(y.hasSelection=null),b.poll()}),xe(E,"paste",function(ie){Le(x,ie)||Zs(ie,x)||(x.state.pasteIncoming=+new Date,b.fastPoll())});function te(ie){if(!Le(x,ie)){if(x.somethingSelected())vl({lineWise:!1,text:x.getSelections()});else if(x.options.lineWiseCopyCut){var se=Hs(x);vl({lineWise:!0,text:se.text}),ie.type=="cut"?x.setSelections(se.ranges,null,We):(b.prevInput="",E.value=se.text.join(`
|
|
`),Ot(E))}else return;ie.type=="cut"&&(x.state.cutIncoming=+new Date)}}xe(E,"cut",te),xe(E,"copy",te),xe(a.scroller,"paste",function(ie){if(!(ci(a,ie)||Le(x,ie))){if(!E.dispatchEvent){x.state.pasteIncoming=+new Date,b.focus();return}var se=new Event("paste");se.clipboardData=ie.clipboardData,E.dispatchEvent(se)}}),xe(a.lineSpace,"selectstart",function(ie){ci(a,ie)||hn(ie)}),xe(E,"compositionstart",function(){var ie=x.getCursor("from");b.composing&&b.composing.range.clear(),b.composing={start:ie,range:x.markText(ie,x.getCursor("to"),{className:"CodeMirror-composing"})}}),xe(E,"compositionend",function(){b.composing&&(b.poll(),b.composing.range.clear(),b.composing=null)})},Ti.prototype.createField=function(a){this.wrapper=Ws(),this.textarea=this.wrapper.firstChild},Ti.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Ti.prototype.prepareSelection=function(){var a=this.cm,y=a.display,b=a.doc,x=qa(a);if(a.options.moveInputWithCursor){var E=fi(a,b.sel.primary().head,"div"),te=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();x.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-te.top)),x.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-te.left))}return x},Ti.prototype.showSelection=function(a){var y=this.cm,b=y.display;me(b.cursorDiv,a.cursors),me(b.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Ti.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var b=y.getSelection();this.textarea.value=b,y.state.focused&&Ot(this.textarea),be&&he>=9&&(this.hasSelection=b)}else a||(this.prevInput=this.textarea.value="",be&&he>=9&&(this.hasSelection=null))}},Ti.prototype.getField=function(){return this.textarea},Ti.prototype.supportsTouch=function(){return!1},Ti.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Re||Ze()!=this.textarea))try{this.textarea.focus()}catch(a){}},Ti.prototype.blur=function(){this.textarea.blur()},Ti.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ti.prototype.receivedFocus=function(){this.slowPoll()},Ti.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Ti.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function b(){var x=y.poll();!x&&!a?(a=!0,y.polling.set(60,b)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,b)},Ti.prototype.poll=function(){var a=this,y=this.cm,b=this.textarea,x=this.prevInput;if(this.contextMenuPending||!y.state.focused||rr(b)&&!x&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=b.value;if(E==x&&!y.somethingSelected())return!1;if(be&&he>=9&&this.hasSelection===E||Pe&&/[\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&&!x&&(x="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,se=Math.min(x.length,E.length);ie<se&&x.charCodeAt(ie)==E.charCodeAt(ie);)++ie;return oo(y,function(){Ol(y,E.slice(ie),x.length-ie,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
`)>-1?b.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},Ti.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ti.prototype.onKeyPress=function(){be&&he>=9&&(this.hasSelection=null),this.fastPoll()},Ti.prototype.onContextMenu=function(a){var y=this,b=y.cm,x=b.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var te=Co(b,a),ie=x.scroller.scrollTop;if(!te||de)return;var se=b.options.resetSelectionOnContextMenu;se&&b.doc.sel.contains(te)==-1&&Oi(b,Gi)(b.doc,Go(te),We);var ce=E.style.cssText,pe=y.wrapper.style.cssText,Ae=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-Ae.top-5)+"px; left: "+(a.clientX-Ae.left-5)+`px;
|
|
z-index: 1000; background: `+(be?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ze;De&&(ze=window.scrollY),x.input.focus(),De&&window.scrollTo(null,ze),x.input.reset(),b.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=pt,x.selForContextMenu=b.doc.sel,clearTimeout(x.detectingSelectAll);function Ct(){if(E.selectionStart!=null){var yn=b.somethingSelected(),Pn="\u200B"+(yn?E.value:"");E.value="\u21DA",E.value=Pn,y.prevInput=yn?"":"\u200B",E.selectionStart=1,E.selectionEnd=Pn.length,x.selForContextMenu=b.doc.sel}}function pt(){if(y.contextMenuPending==pt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=pe,E.style.cssText=ce,be&&he<9&&x.scrollbars.setScrollTop(x.scroller.scrollTop=ie),E.selectionStart!=null)){(!be||be&&he<9)&&Ct();var yn=0,Pn=function(){x.selForContextMenu==b.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?Oi(b,ss)(b):yn++<10?x.detectingSelectAll=setTimeout(Pn,500):(x.selForContextMenu=null,x.input.reset())};x.detectingSelectAll=setTimeout(Pn,200)}}if(be&&he>=9&&Ct(),ge){Ln(a);var tn=function(){ft(window,"mouseup",tn),setTimeout(pt,20)};xe(window,"mouseup",tn)}else setTimeout(pt,50)},Ti.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Ti.prototype.setUneditable=function(){},Ti.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Ht(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 b=Ze();y.autofocus=b==a||a.getAttribute("autofocus")!=null&&b==document.body}function x(){a.value=se.getValue()}var E;if(a.form&&(xe(a.form,"submit",x),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var ie=te.submit=function(){x(),te.submit=E,te.submit(),te.submit=ie}}catch(ce){}}y.finishInit=function(ce){ce.save=x,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,x(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(ft(a.form,"submit",x),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var se=gi(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return se}function Qu(a){a.off=ft,a.on=xe,a.wheelEventPixels=iu,a.Doc=qi,a.splitLines=Wn,a.countColumn=ye,a.findColumn=bn,a.isWordChar=Oe,a.Pass=Bt,a.signal=nt,a.Line=lr,a.changeEnd=jo,a.scrollbarModel=Bo,a.Pos=qe,a.cmpPos=Xt,a.modes=Sr,a.mimeModes=rn,a.resolveMode=Hn,a.getMode=Er,a.modeExtensions=mr,a.extendMode=Or,a.copyState=yr,a.startState=Mr,a.innerMode=ur,a.commands=Va,a.keyMap=Oo,a.keyName=Es,a.isModifierKey=ws,a.lookupKey=ga,a.normalizeKeyMap=Du,a.StringStream=vn,a.SharedTextMarker=Ka,a.TextMarker=Uo,a.LineWidget=Wa,a.e_preventDefault=hn,a.e_stopPropagation=Nn,a.e_stop=Ln,a.addClass=lt,a.contains=$e,a.rmClass=Ue,a.keyNames=Yo}Wu(gi),Vu(gi);var $u="iter insert remove copy getEditor constructor".split(" ");for(var gl in qi.prototype)qi.prototype.hasOwnProperty(gl)&&wt($u,gl)<0&&(gi.prototype[gl]=function(a){return function(){return a.apply(this.doc,arguments)}}(qi.prototype[gl]));return _t(qi),gi.inputStyles={textarea:Ti,contenteditable:li},gi.defineMode=function(a){!gi.defaults.mode&&a!="null"&&(gi.defaults.mode=a),Mn.apply(this,arguments)},gi.defineMIME=Rn,gi.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),gi.defineMIME("text/plain","null"),gi.defineExtension=function(a,y){gi.prototype[a]=y},gi.defineDocExtension=function(a,y){qi.prototype[a]=y},gi.fromTextArea=Ju,Qu(gi),gi.version="5.58.2",gi})},25419:function(cn,an,ue){(function(ae){ae(ue(89780),ue(15525),ue(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(je,Ie){var at=ae.getMode(je,"text/html"),be=at.name=="null";function he(ye){if(ae.findModeByName){var fe=ae.findModeByName(ye);fe&&(ye=fe.mime||fe.mimes[0])}var wt=ae.getMode(je,ye);return wt.name=="null"?null:wt}Ie.highlightFormatting===void 0&&(Ie.highlightFormatting=!1),Ie.maxBlockquoteDepth===void 0&&(Ie.maxBlockquoteDepth=0),Ie.taskLists===void 0&&(Ie.taskLists=!1),Ie.strikethrough===void 0&&(Ie.strikethrough=!1),Ie.emoji===void 0&&(Ie.emoji=!1),Ie.fencedCodeBlockHighlighting===void 0&&(Ie.fencedCodeBlockHighlighting=!0),Ie.fencedCodeBlockDefaultMode===void 0&&(Ie.fencedCodeBlockDefaultMode="text/plain"),Ie.xml===void 0&&(Ie.xml=!0),Ie.tokenTypeOverrides===void 0&&(Ie.tokenTypeOverrides={});var De={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 Qe in De)De.hasOwnProperty(Qe)&&Ie.tokenTypeOverrides[Qe]&&(De[Qe]=Ie.tokenTypeOverrides[Qe]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ne=/^\[(x| )\](?=\s)/i,Ce=Ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,yt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Je=/^[^#!\[\]*_\\<>` "'(~:]+/,Ye=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Re=/^\s*\[[^\]]+?\]:.*$/,Pe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,vt=" ";function mt(ye,fe,wt){return fe.f=fe.inline=wt,wt(ye,fe)}function St(ye,fe,wt){return fe.f=fe.block=wt,wt(ye,fe)}function Fe(ye){return!ye||!/\S/.test(ye.string)}function ge(ye){if(ye.linkTitle=!1,ye.linkHref=!1,ye.linkText=!1,ye.em=!1,ye.strong=!1,ye.strikethrough=!1,ye.quote=0,ye.indentedCode=!1,ye.f==Ue){var fe=be;if(!fe){var wt=ae.innerMode(at,ye.htmlState);fe=wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText}fe&&(ye.f=Ke,ye.block=He,ye.htmlState=null)}return ye.trailingSpace=0,ye.trailingSpaceNewLine=!1,ye.prevLine=ye.thisLine,ye.thisLine={stream:null},null}function He(ye,fe){var wt=ye.column()===fe.indentation,qt=Fe(fe.prevLine.stream),Bt=fe.indentedCode,We=fe.prevLine.hr,gt=fe.list!==!1,xt=(fe.listStack[fe.listStack.length-1]||0)+3;fe.indentedCode=!1;var bn=fe.indentation;if(fe.indentationDiff===null&&(fe.indentationDiff=fe.indentation,gt)){for(fe.list=null;bn<fe.listStack[fe.listStack.length-1];)fe.listStack.pop(),fe.listStack.length?fe.indentation=fe.listStack[fe.listStack.length-1]:fe.list=!1;fe.list!==!1&&(fe.indentationDiff=bn-fe.listStack[fe.listStack.length-1])}var Xe=!qt&&!We&&!fe.prevLine.header&&(!gt||!Bt)&&!fe.prevLine.fencedCodeEnd,Me=(fe.list===!1||We||qt)&&fe.indentation<=xt&&ye.match(we),ke=null;if(fe.indentationDiff>=4&&(Bt||fe.prevLine.fencedCodeEnd||fe.prevLine.header||qt))return ye.skipToEnd(),fe.indentedCode=!0,De.code;if(ye.eatSpace())return null;if(wt&&fe.indentation<=xt&&(ke=ye.match(Ce))&&ke[1].length<=6)return fe.quote=0,fe.header=ke[1].length,fe.thisLine.header=!0,Ie.highlightFormatting&&(fe.formatting="header"),fe.f=fe.inline,me(fe);if(fe.indentation<=xt&&ye.eat(">"))return fe.quote=wt?1:fe.quote+1,Ie.highlightFormatting&&(fe.formatting="quote"),ye.eatSpace(),me(fe);if(!Me&&!fe.setext&&wt&&fe.indentation<=xt&&(ke=ye.match(de))){var Ve=ke[1]?"ol":"ul";return fe.indentation=bn+ye.current().length,fe.list=!0,fe.quote=0,fe.listStack.push(fe.indentation),fe.em=!1,fe.strong=!1,fe.code=!1,fe.strikethrough=!1,Ie.taskLists&&ye.match(Ne,!1)&&(fe.taskList=!0),fe.f=fe.inline,Ie.highlightFormatting&&(fe.formatting=["list","list-"+Ve]),me(fe)}else{if(wt&&fe.indentation<=xt&&(ke=ye.match(Ye,!0)))return fe.quote=0,fe.fencedEndRE=new RegExp(ke[1]+"+ *$"),fe.localMode=Ie.fencedCodeBlockHighlighting&&he(ke[2]||Ie.fencedCodeBlockDefaultMode),fe.localMode&&(fe.localState=ae.startState(fe.localMode)),fe.f=fe.block=Dt,Ie.highlightFormatting&&(fe.formatting="code-block"),fe.code=-1,me(fe);if(fe.setext||(!Xe||!gt)&&!fe.quote&&fe.list===!1&&!fe.code&&!Me&&!Re.test(ye.string)&&(ke=ye.lookAhead(1))&&(ke=ke.match(yt)))return fe.setext?(fe.header=fe.setext,fe.setext=0,ye.skipToEnd(),Ie.highlightFormatting&&(fe.formatting="header")):(fe.header=ke[0].charAt(0)=="="?1:2,fe.setext=fe.header),fe.thisLine.header=!0,fe.f=fe.inline,me(fe);if(Me)return ye.skipToEnd(),fe.hr=!0,fe.thisLine.hr=!0,De.hr;if(ye.peek()==="[")return mt(ye,fe,nn)}return mt(ye,fe,fe.inline)}function Ue(ye,fe){var wt=at.token(ye,fe.htmlState);if(!be){var qt=ae.innerMode(at,fe.htmlState);(qt.mode.name=="xml"&&qt.state.tagStart===null&&!qt.state.context&&qt.state.tokenize.isInText||fe.md_inside&&ye.current().indexOf(">")>-1)&&(fe.f=Ke,fe.block=He,fe.htmlState=null)}return wt}function Dt(ye,fe){var wt=fe.listStack[fe.listStack.length-1]||0,qt=fe.indentation<wt,Bt=wt+3;if(fe.fencedEndRE&&fe.indentation<=Bt&&(qt||ye.match(fe.fencedEndRE))){Ie.highlightFormatting&&(fe.formatting="code-block");var We;return qt||(We=me(fe)),fe.localMode=fe.localState=null,fe.block=He,fe.f=Ke,fe.fencedEndRE=null,fe.code=0,fe.thisLine.fencedCodeEnd=!0,qt?St(ye,fe,fe.block):We}else return fe.localMode?fe.localMode.token(ye,fe.localState):(ye.skipToEnd(),De.code)}function me(ye){var fe=[];if(ye.formatting){fe.push(De.formatting),typeof ye.formatting=="string"&&(ye.formatting=[ye.formatting]);for(var wt=0;wt<ye.formatting.length;wt++)fe.push(De.formatting+"-"+ye.formatting[wt]),ye.formatting[wt]==="header"&&fe.push(De.formatting+"-"+ye.formatting[wt]+"-"+ye.header),ye.formatting[wt]==="quote"&&(!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ye.quote?fe.push(De.formatting+"-"+ye.formatting[wt]+"-"+ye.quote):fe.push("error"))}if(ye.taskOpen)return fe.push("meta"),fe.length?fe.join(" "):null;if(ye.taskClosed)return fe.push("property"),fe.length?fe.join(" "):null;if(ye.linkHref?fe.push(De.linkHref,"url"):(ye.strong&&fe.push(De.strong),ye.em&&fe.push(De.em),ye.strikethrough&&fe.push(De.strikethrough),ye.emoji&&fe.push(De.emoji),ye.linkText&&fe.push(De.linkText),ye.code&&fe.push(De.code),ye.image&&fe.push(De.image),ye.imageAltText&&fe.push(De.imageAltText,"link"),ye.imageMarker&&fe.push(De.imageMarker)),ye.header&&fe.push(De.header,De.header+"-"+ye.header),ye.quote&&(fe.push(De.quote),!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ye.quote?fe.push(De.quote+"-"+ye.quote):fe.push(De.quote+"-"+Ie.maxBlockquoteDepth)),ye.list!==!1){var qt=(ye.listStack.length-1)%3;qt?qt===1?fe.push(De.list2):fe.push(De.list3):fe.push(De.list1)}return ye.trailingSpaceNewLine?fe.push("trailing-space-new-line"):ye.trailingSpace&&fe.push("trailing-space-"+(ye.trailingSpace%2?"a":"b")),fe.length?fe.join(" "):null}function Ee(ye,fe){if(ye.match(Je,!0))return me(fe)}function Ke(ye,fe){var wt=fe.text(ye,fe);if(typeof wt!="undefined")return wt;if(fe.list)return fe.list=null,me(fe);if(fe.taskList){var qt=ye.match(Ne,!0)[1]===" ";return qt?fe.taskOpen=!0:fe.taskClosed=!0,Ie.highlightFormatting&&(fe.formatting="task"),fe.taskList=!1,me(fe)}if(fe.taskOpen=!1,fe.taskClosed=!1,fe.header&&ye.match(/^#+$/,!0))return Ie.highlightFormatting&&(fe.formatting="header"),me(fe);var Bt=ye.next();if(fe.linkTitle){fe.linkTitle=!1;var We=Bt;Bt==="("&&(We=")"),We=(We+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var gt="^\\s*(?:[^"+We+"\\\\]+|\\\\\\\\|\\\\.)"+We;if(ye.match(new RegExp(gt),!0))return De.linkHref}if(Bt==="`"){var xt=fe.formatting;Ie.highlightFormatting&&(fe.formatting="code"),ye.eatWhile("`");var bn=ye.current().length;if(fe.code==0&&(!fe.quote||bn==1))return fe.code=bn,me(fe);if(bn==fe.code){var Xe=me(fe);return fe.code=0,Xe}else return fe.formatting=xt,me(fe)}else if(fe.code)return me(fe);if(Bt==="\\"&&(ye.next(),Ie.highlightFormatting)){var Me=me(fe),ke=De.formatting+"-escape";return Me?Me+" "+ke:ke}if(Bt==="!"&&ye.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return fe.imageMarker=!0,fe.image=!0,Ie.highlightFormatting&&(fe.formatting="image"),me(fe);if(Bt==="["&&fe.imageMarker&&ye.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return fe.imageMarker=!1,fe.imageAltText=!0,Ie.highlightFormatting&&(fe.formatting="image"),me(fe);if(Bt==="]"&&fe.imageAltText){Ie.highlightFormatting&&(fe.formatting="image");var Me=me(fe);return fe.imageAltText=!1,fe.image=!1,fe.inline=fe.f=$e,Me}if(Bt==="["&&!fe.image)return fe.linkText&&ye.match(/^.*?\]/)||(fe.linkText=!0,Ie.highlightFormatting&&(fe.formatting="link")),me(fe);if(Bt==="]"&&fe.linkText){Ie.highlightFormatting&&(fe.formatting="link");var Me=me(fe);return fe.linkText=!1,fe.inline=fe.f=ye.match(/\(.*?\)| ?\[.*?\]/,!1)?$e:Ke,Me}if(Bt==="<"&&ye.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){fe.f=fe.inline=Se,Ie.highlightFormatting&&(fe.formatting="link");var Me=me(fe);return Me?Me+=" ":Me="",Me+De.linkInline}if(Bt==="<"&&ye.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){fe.f=fe.inline=Se,Ie.highlightFormatting&&(fe.formatting="link");var Me=me(fe);return Me?Me+=" ":Me="",Me+De.linkEmail}if(Ie.xml&&Bt==="<"&&ye.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=ye.string.indexOf(">",ye.pos);if(Ve!=-1){var st=ye.string.substring(ye.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(st)&&(fe.md_inside=!0)}return ye.backUp(1),fe.htmlState=ae.startState(at),St(ye,fe,Ue)}if(Ie.xml&&Bt==="<"&&ye.match(/^\/\w*?>/))return fe.md_inside=!1,"tag";if(Bt==="*"||Bt==="_"){for(var Be=1,tt=ye.pos==1?" ":ye.string.charAt(ye.pos-2);Be<3&&ye.eat(Bt);)Be++;var et=ye.peek()||" ",Oe=!/\s/.test(et)&&(!Pe.test(et)||/\s/.test(tt)||Pe.test(tt)),dt=!/\s/.test(tt)&&(!Pe.test(tt)||/\s/.test(et)||Pe.test(et)),ut=null,ve=null;if(Be%2&&(!fe.em&&Oe&&(Bt==="*"||!dt||Pe.test(tt))?ut=!0:fe.em==Bt&&dt&&(Bt==="*"||!Oe||Pe.test(et))&&(ut=!1)),Be>1&&(!fe.strong&&Oe&&(Bt==="*"||!dt||Pe.test(tt))?ve=!0:fe.strong==Bt&&dt&&(Bt==="*"||!Oe||Pe.test(et))&&(ve=!1)),ve!=null||ut!=null){Ie.highlightFormatting&&(fe.formatting=ut==null?"strong":ve==null?"em":"strong em"),ut===!0&&(fe.em=Bt),ve===!0&&(fe.strong=Bt);var Xe=me(fe);return ut===!1&&(fe.em=!1),ve===!1&&(fe.strong=!1),Xe}}else if(Bt===" "&&(ye.eat("*")||ye.eat("_"))){if(ye.peek()===" ")return me(fe);ye.backUp(1)}if(Ie.strikethrough){if(Bt==="~"&&ye.eatWhile(Bt)){if(fe.strikethrough){Ie.highlightFormatting&&(fe.formatting="strikethrough");var Xe=me(fe);return fe.strikethrough=!1,Xe}else if(ye.match(/^[^\s]/,!1))return fe.strikethrough=!0,Ie.highlightFormatting&&(fe.formatting="strikethrough"),me(fe)}else if(Bt===" "&&ye.match(/^~~/,!0)){if(ye.peek()===" ")return me(fe);ye.backUp(2)}}if(Ie.emoji&&Bt===":"&&ye.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){fe.emoji=!0,Ie.highlightFormatting&&(fe.formatting="emoji");var ct=me(fe);return fe.emoji=!1,ct}return Bt===" "&&(ye.match(/^ +$/,!1)?fe.trailingSpace++:fe.trailingSpace&&(fe.trailingSpaceNewLine=!0)),me(fe)}function Se(ye,fe){var wt=ye.next();if(wt===">"){fe.f=fe.inline=Ke,Ie.highlightFormatting&&(fe.formatting="link");var qt=me(fe);return qt?qt+=" ":qt="",qt+De.linkInline}return ye.match(/^[^>]+/,!0),De.linkInline}function $e(ye,fe){if(ye.eatSpace())return null;var wt=ye.next();return wt==="("||wt==="["?(fe.f=fe.inline=lt(wt==="("?")":"]"),Ie.highlightFormatting&&(fe.formatting="link-string"),fe.linkHref=!0,me(fe)):"error"}var Ze={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function lt(ye){return function(fe,wt){var qt=fe.next();if(qt===ye){wt.f=wt.inline=Ke,Ie.highlightFormatting&&(wt.formatting="link-string");var Bt=me(wt);return wt.linkHref=!1,Bt}return fe.match(Ze[ye]),wt.linkHref=!0,me(wt)}}function nn(ye,fe){return ye.match(/^([^\]\\]|\\.)*\]:/,!1)?(fe.f=Ot,ye.next(),Ie.highlightFormatting&&(fe.formatting="link"),fe.linkText=!0,me(fe)):mt(ye,fe,Ke)}function Ot(ye,fe){if(ye.match(/^\]:/,!0)){fe.f=fe.inline=Qt,Ie.highlightFormatting&&(fe.formatting="link");var wt=me(fe);return fe.linkText=!1,wt}return ye.match(/^([^\]\\]|\\.)+/,!0),De.linkText}function Qt(ye,fe){return ye.eatSpace()?null:(ye.match(/^[^\s]+/,!0),ye.peek()===void 0?fe.linkTitle=!0:ye.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),fe.f=fe.inline=Ke,De.linkHref+" url")}var Ht={startState:function(){return{f:He,prevLine:{stream:null},thisLine:{stream:null},block:He,htmlState:null,indentation:0,inline:Ke,text:Ee,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(ye){return{f:ye.f,prevLine:ye.prevLine,thisLine:ye.thisLine,block:ye.block,htmlState:ye.htmlState&&ae.copyState(at,ye.htmlState),indentation:ye.indentation,localMode:ye.localMode,localState:ye.localMode?ae.copyState(ye.localMode,ye.localState):null,inline:ye.inline,text:ye.text,formatting:!1,linkText:ye.linkText,linkTitle:ye.linkTitle,linkHref:ye.linkHref,code:ye.code,em:ye.em,strong:ye.strong,strikethrough:ye.strikethrough,emoji:ye.emoji,header:ye.header,setext:ye.setext,hr:ye.hr,taskList:ye.taskList,list:ye.list,listStack:ye.listStack.slice(0),quote:ye.quote,indentedCode:ye.indentedCode,trailingSpace:ye.trailingSpace,trailingSpaceNewLine:ye.trailingSpaceNewLine,md_inside:ye.md_inside,fencedEndRE:ye.fencedEndRE}},token:function(ye,fe){if(fe.formatting=!1,ye!=fe.thisLine.stream){if(fe.header=0,fe.hr=!1,ye.match(/^\s*$/,!0))return ge(fe),null;if(fe.prevLine=fe.thisLine,fe.thisLine={stream:ye},fe.taskList=!1,fe.trailingSpace=0,fe.trailingSpaceNewLine=!1,!fe.localState&&(fe.f=fe.block,fe.f!=Ue)){var wt=ye.match(/^\s*/,!0)[0].replace(/\t/g,vt).length;if(fe.indentation=wt,fe.indentationDiff=null,wt>0)return null}}return fe.f(ye,fe)},innerMode:function(ye){return ye.block==Ue?{state:ye.htmlState,mode:at}:ye.localState?{state:ye.localState,mode:ye.localMode}:{state:ye,mode:Ht}},indent:function(ye,fe,wt){return ye.block==Ue&&at.indent?at.indent(ye.htmlState,fe,wt):ye.localState&&ye.localMode.indent?ye.localMode.indent(ye.localState,fe,wt):ae.Pass},blankLine:ge,getType:me,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ht},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";ae.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var je=0;je<ae.modeInfo.length;je++){var Ie=ae.modeInfo[je];Ie.mimes&&(Ie.mime=Ie.mimes[0])}ae.findModeByMIME=function(at){at=at.toLowerCase();for(var be=0;be<ae.modeInfo.length;be++){var he=ae.modeInfo[be];if(he.mime==at)return he;if(he.mimes){for(var De=0;De<he.mimes.length;De++)if(he.mimes[De]==at)return he}}if(/\+xml$/.test(at))return ae.findModeByMIME("application/xml");if(/\+json$/.test(at))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(at){at=at.toLowerCase();for(var be=0;be<ae.modeInfo.length;be++){var he=ae.modeInfo[be];if(he.ext){for(var De=0;De<he.ext.length;De++)if(he.ext[De]==at)return he}}},ae.findModeByFileName=function(at){for(var be=0;be<ae.modeInfo.length;be++){var he=ae.modeInfo[be];if(he.file&&he.file.test(at))return he}var De=at.lastIndexOf("."),Qe=De>-1&&at.substring(De+1,at.length);if(Qe)return ae.findModeByExtension(Qe)},ae.findModeByName=function(at){at=at.toLowerCase();for(var be=0;be<ae.modeInfo.length;be++){var he=ae.modeInfo[be];if(he.name.toLowerCase()==at)return he;if(he.alias){for(var De=0;De<he.alias.length;De++)if(he.alias[De].toLowerCase()==at)return he}}}})},67549:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";ae.defineMode("stex",function(je,Ie){"use strict";function at(Je,Ye){Je.cmdState.push(Ye)}function be(Je){return Je.cmdState.length>0?Je.cmdState[Je.cmdState.length-1]:null}function he(Je){var Ye=Je.cmdState.pop();Ye&&Ye.closeBracket()}function De(Je){for(var Ye=Je.cmdState,Re=Ye.length-1;Re>=0;Re--){var Pe=Ye[Re];if(Pe.name!="DEFAULT")return Pe}return{styleIdentifier:function(){return null}}}function Qe(Je,Ye,Re){return function(){this.name=Je,this.bracketNo=0,this.style=Ye,this.styles=Re,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=Qe("importmodule","tag",["string","builtin"]),we.documentclass=Qe("documentclass","tag",["","atom"]),we.usepackage=Qe("usepackage","tag",["atom"]),we.begin=Qe("begin","tag",["atom"]),we.end=Qe("end","tag",["atom"]),we.label=Qe("label","tag",["atom"]),we.ref=Qe("ref","tag",["atom"]),we.eqref=Qe("eqref","tag",["atom"]),we.cite=Qe("cite","tag",["atom"]),we.bibitem=Qe("bibitem","tag",["atom"]),we.Bibitem=Qe("Bibitem","tag",["atom"]),we.RBibitem=Qe("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Je,Ye){Je.f=Ye}function Ne(Je,Ye){var Re;if(Je.match(/^\\[a-zA-Z@]+/)){var Pe=Je.current().slice(1);return Re=we.hasOwnProperty(Pe)?we[Pe]:we.DEFAULT,Re=new Re,at(Ye,Re),de(Ye,yt),Re.style}if(Je.match(/^\\[$&%#{}_]/)||Je.match(/^\\[,;!\/\\]/))return"tag";if(Je.match("\\["))return de(Ye,function(mt,St){return Ce(mt,St,"\\]")}),"keyword";if(Je.match("\\("))return de(Ye,function(mt,St){return Ce(mt,St,"\\)")}),"keyword";if(Je.match("$$"))return de(Ye,function(mt,St){return Ce(mt,St,"$$")}),"keyword";if(Je.match("$"))return de(Ye,function(mt,St){return Ce(mt,St,"$")}),"keyword";var vt=Je.next();if(vt=="%")return Je.skipToEnd(),"comment";if(vt=="}"||vt=="]"){if(Re=be(Ye),Re)Re.closeBracket(vt),de(Ye,yt);else return"error";return"bracket"}else return vt=="{"||vt=="["?(Re=we.DEFAULT,Re=new Re,at(Ye,Re),"bracket"):/\d/.test(vt)?(Je.eatWhile(/[\w.%]/),"atom"):(Je.eatWhile(/[\w\-_]/),Re=De(Ye),Re.name=="begin"&&(Re.argument=Je.current()),Re.styleIdentifier())}function Ce(Je,Ye,Re){if(Je.eatSpace())return null;if(Re&&Je.match(Re))return de(Ye,Ne),"keyword";if(Je.match(/^\\[a-zA-Z@]+/))return"tag";if(Je.match(/^[a-zA-Z]+/))return"variable-2";if(Je.match(/^\\[$&%#{}_]/)||Je.match(/^\\[,;!\/]/)||Je.match(/^[\^_&]/))return"tag";if(Je.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Je.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Pe=Je.next();return Pe=="{"||Pe=="}"||Pe=="["||Pe=="]"||Pe=="("||Pe==")"?"bracket":Pe=="%"?(Je.skipToEnd(),"comment"):"error"}function yt(Je,Ye){var Re=Je.peek(),Pe;return Re=="{"||Re=="["?(Pe=be(Ye),Pe.openBracket(Re),Je.eat(Re),de(Ye,Ne),"bracket"):/[ \t\r]/.test(Re)?(Je.eat(Re),null):(de(Ye,Ne),he(Ye),Ne(Je,Ye))}return{startState:function(){var Je=Ie.inMathMode?function(Ye,Re){return Ce(Ye,Re)}:Ne;return{cmdState:[],f:Je}},copyState:function(Je){return{cmdState:Je.cmdState.slice(),f:Je.f}},token:function(Je,Ye){return Ye.f(Je,Ye)},blankLine:function(Je){Je.f=Ne,Je.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(cn,an,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";var je={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},Ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(at,be){var he=at.indentUnit,De={},Qe=be.htmlMode?je:Ie;for(var we in Qe)De[we]=Qe[we];for(var we in be)De[we]=be[we];var de,Ne;function Ce(Se,$e){function Ze(Ot){return $e.tokenize=Ot,Ot(Se,$e)}var lt=Se.next();if(lt=="<")return Se.eat("!")?Se.eat("[")?Se.match("CDATA[")?Ze(Ye("atom","]]>")):null:Se.match("--")?Ze(Ye("comment","-->")):Se.match("DOCTYPE",!0,!0)?(Se.eatWhile(/[\w\._\-]/),Ze(Re(1))):null:Se.eat("?")?(Se.eatWhile(/[\w\._\-]/),$e.tokenize=Ye("meta","?>"),"meta"):(de=Se.eat("/")?"closeTag":"openTag",$e.tokenize=yt,"tag bracket");if(lt=="&"){var nn;return Se.eat("#")?Se.eat("x")?nn=Se.eatWhile(/[a-fA-F\d]/)&&Se.eat(";"):nn=Se.eatWhile(/[\d]/)&&Se.eat(";"):nn=Se.eatWhile(/[\w\.\-:]/)&&Se.eat(";"),nn?"atom":"error"}else return Se.eatWhile(/[^&<]/),null}Ce.isInText=!0;function yt(Se,$e){var Ze=Se.next();if(Ze==">"||Ze=="/"&&Se.eat(">"))return $e.tokenize=Ce,de=Ze==">"?"endTag":"selfcloseTag","tag bracket";if(Ze=="=")return de="equals",null;if(Ze=="<"){$e.tokenize=Ce,$e.state=St,$e.tagName=$e.tagStart=null;var lt=$e.tokenize(Se,$e);return lt?lt+" tag error":"tag error"}else return/[\'\"]/.test(Ze)?($e.tokenize=Je(Ze),$e.stringStartCol=Se.column(),$e.tokenize(Se,$e)):(Se.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Je(Se){var $e=function(Ze,lt){for(;!Ze.eol();)if(Ze.next()==Se){lt.tokenize=yt;break}return"string"};return $e.isInAttribute=!0,$e}function Ye(Se,$e){return function(Ze,lt){for(;!Ze.eol();){if(Ze.match($e)){lt.tokenize=Ce;break}Ze.next()}return Se}}function Re(Se){return function($e,Ze){for(var lt;(lt=$e.next())!=null;){if(lt=="<")return Ze.tokenize=Re(Se+1),Ze.tokenize($e,Ze);if(lt==">")if(Se==1){Ze.tokenize=Ce;break}else return Ze.tokenize=Re(Se-1),Ze.tokenize($e,Ze)}return"meta"}}function Pe(Se,$e,Ze){this.prev=Se.context,this.tagName=$e,this.indent=Se.indented,this.startOfLine=Ze,(De.doNotIndent.hasOwnProperty($e)||Se.context&&Se.context.noIndent)&&(this.noIndent=!0)}function vt(Se){Se.context&&(Se.context=Se.context.prev)}function mt(Se,$e){for(var Ze;;){if(!Se.context||(Ze=Se.context.tagName,!De.contextGrabbers.hasOwnProperty(Ze)||!De.contextGrabbers[Ze].hasOwnProperty($e)))return;vt(Se)}}function St(Se,$e,Ze){return Se=="openTag"?(Ze.tagStart=$e.column(),Fe):Se=="closeTag"?ge:St}function Fe(Se,$e,Ze){return Se=="word"?(Ze.tagName=$e.current(),Ne="tag",Dt):De.allowMissingTagName&&Se=="endTag"?(Ne="tag bracket",Dt(Se,$e,Ze)):(Ne="error",Fe)}function ge(Se,$e,Ze){if(Se=="word"){var lt=$e.current();return Ze.context&&Ze.context.tagName!=lt&&De.implicitlyClosed.hasOwnProperty(Ze.context.tagName)&&vt(Ze),Ze.context&&Ze.context.tagName==lt||De.matchClosing===!1?(Ne="tag",He):(Ne="tag error",Ue)}else return De.allowMissingTagName&&Se=="endTag"?(Ne="tag bracket",He(Se,$e,Ze)):(Ne="error",Ue)}function He(Se,$e,Ze){return Se!="endTag"?(Ne="error",He):(vt(Ze),St)}function Ue(Se,$e,Ze){return Ne="error",He(Se,$e,Ze)}function Dt(Se,$e,Ze){if(Se=="word")return Ne="attribute",me;if(Se=="endTag"||Se=="selfcloseTag"){var lt=Ze.tagName,nn=Ze.tagStart;return Ze.tagName=Ze.tagStart=null,Se=="selfcloseTag"||De.autoSelfClosers.hasOwnProperty(lt)?mt(Ze,lt):(mt(Ze,lt),Ze.context=new Pe(Ze,lt,nn==Ze.indented)),St}return Ne="error",Dt}function me(Se,$e,Ze){return Se=="equals"?Ee:(De.allowMissing||(Ne="error"),Dt(Se,$e,Ze))}function Ee(Se,$e,Ze){return Se=="string"?Ke:Se=="word"&&De.allowUnquoted?(Ne="string",Dt):(Ne="error",Dt(Se,$e,Ze))}function Ke(Se,$e,Ze){return Se=="string"?Ke:Dt(Se,$e,Ze)}return{startState:function(Se){var $e={tokenize:Ce,state:St,indented:Se||0,tagName:null,tagStart:null,context:null};return Se!=null&&($e.baseIndent=Se),$e},token:function(Se,$e){if(!$e.tagName&&Se.sol()&&($e.indented=Se.indentation()),Se.eatSpace())return null;de=null;var Ze=$e.tokenize(Se,$e);return(Ze||de)&&Ze!="comment"&&(Ne=null,$e.state=$e.state(de||Ze,Se,$e),Ne&&(Ze=Ne=="error"?Ze+" error":Ne)),Ze},indent:function(Se,$e,Ze){var lt=Se.context;if(Se.tokenize.isInAttribute)return Se.tagStart==Se.indented?Se.stringStartCol+1:Se.indented+he;if(lt&<.noIndent)return ae.Pass;if(Se.tokenize!=yt&&Se.tokenize!=Ce)return Ze?Ze.match(/^(\s*)/)[0].length:0;if(Se.tagName)return De.multilineTagIndentPastTag!==!1?Se.tagStart+Se.tagName.length+2:Se.tagStart+he*(De.multilineTagIndentFactor||1);if(De.alignCDATA&&/<!\[CDATA\[/.test($e))return 0;var nn=$e&&/^<(\/)?([\w_:\.-]*)/.exec($e);if(nn&&nn[1])for(;lt;)if(lt.tagName==nn[2]){lt=lt.prev;break}else if(De.implicitlyClosed.hasOwnProperty(lt.tagName))lt=lt.prev;else break;else if(nn)for(;lt;){var Ot=De.contextGrabbers[lt.tagName];if(Ot&&Ot.hasOwnProperty(nn[2]))lt=lt.prev;else break}for(;lt&<.prev&&!lt.startOfLine;)lt=lt.prev;return lt?lt.indent+he:Se.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:De.htmlMode?"html":"xml",helperType:De.htmlMode?"html":"xml",skipAttribute:function(Se){Se.state==Ee&&(Se.state=Dt)},xmlCurrentTag:function(Se){return Se.tagName?{name:Se.tagName,close:Se.type=="closeTag"}:null},xmlCurrentContext:function(Se){for(var $e=[],Ze=Se.context;Ze;Ze=Ze.prev)Ze.tagName&&$e.push(Ze.tagName);return $e.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return $e}});var ae=ue(33885),je=ue(42978),Ie=ue(43403),at=ue(34280),be=ue(59301),he=be.createContext(null),De=be.createContext({}),Qe=he,we=ue(20068),de=ue(54476),Ne=ue(92310),Ce=ue.n(Ne),yt=ue(77900),Je=ue(10228),Ye=ue(26112),Re=ue(75931),Pe=ue(8654),vt=["prefixCls","className","containerRef"],mt=function(lt){var nn=lt.prefixCls,Ot=lt.className,Qt=lt.containerRef,Ht=(0,Re.Z)(lt,vt),ye=be.useContext(De),fe=ye.panel,wt=(0,Pe.x1)(fe,Qt);return be.createElement("div",(0,de.Z)({className:Ce()("".concat(nn,"-content"),Ot),role:"dialog",ref:wt},(0,Ye.Z)(lt,{aria:!0}),{"aria-modal":"true"},Ht))},St=mt,Fe=ue(48736);function ge(Ze){return typeof Ze=="string"&&String(Number(Ze))===Ze?((0,Fe.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ze)):Ze}function He(Ze){warning(!("wrapperClassName"in Ze),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ze.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ue={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Dt(Ze,lt){var nn,Ot,Qt,Ht=Ze.prefixCls,ye=Ze.open,fe=Ze.placement,wt=Ze.inline,qt=Ze.push,Bt=Ze.forceRender,We=Ze.autoFocus,gt=Ze.keyboard,xt=Ze.classNames,bn=Ze.rootClassName,Xe=Ze.rootStyle,Me=Ze.zIndex,ke=Ze.className,Ve=Ze.id,st=Ze.style,Be=Ze.motion,tt=Ze.width,et=Ze.height,Oe=Ze.children,dt=Ze.mask,ut=Ze.maskClosable,ve=Ze.maskMotion,ct=Ze.maskClassName,Yt=Ze.maskStyle,Vt=Ze.afterOpenChange,oe=Ze.onClose,ee=Ze.onMouseEnter,z=Ze.onMouseOver,re=Ze.onMouseLeave,le=Ze.onClick,ne=Ze.onKeyDown,xe=Ze.onKeyUp,ot=Ze.styles,ft=Ze.drawerRender,nt=be.useRef(),Le=be.useRef(),Gt=be.useRef();be.useImperativeHandle(lt,function(){return nt.current});var Lt=function(Jt){var Bn=Jt.keyCode,Sr=Jt.shiftKey;switch(Bn){case Je.Z.TAB:{if(Bn===Je.Z.TAB){if(!Sr&&document.activeElement===Gt.current){var rn;(rn=Le.current)===null||rn===void 0||rn.focus({preventScroll:!0})}else if(Sr&&document.activeElement===Le.current){var Mn;(Mn=Gt.current)===null||Mn===void 0||Mn.focus({preventScroll:!0})}}break}case Je.Z.ESC:{oe&>&&(Jt.stopPropagation(),oe(Jt));break}}};be.useEffect(function(){if(ye&&We){var gn;(gn=nt.current)===null||gn===void 0||gn.focus({preventScroll:!0})}},[ye]);var _t=be.useState(!1),hn=(0,je.Z)(_t,2),Nn=hn[0],Wt=hn[1],Ln=be.useContext(Qe),nr;typeof qt=="boolean"?nr=qt?{}:{distance:0}:nr=qt||{};var $n=(nn=(Ot=(Qt=nr)===null||Qt===void 0?void 0:Qt.distance)!==null&&Ot!==void 0?Ot:Ln==null?void 0:Ln.pushDistance)!==null&&nn!==void 0?nn:180,It=be.useMemo(function(){return{pushDistance:$n,push:function(){Wt(!0)},pull:function(){Wt(!1)}}},[$n]);be.useEffect(function(){if(ye){var gn;Ln==null||(gn=Ln.push)===null||gn===void 0||gn.call(Ln)}else{var Jt;Ln==null||(Jt=Ln.pull)===null||Jt===void 0||Jt.call(Ln)}},[ye]),be.useEffect(function(){return function(){var gn;Ln==null||(gn=Ln.pull)===null||gn===void 0||gn.call(Ln)}},[]);var Mt=dt&&be.createElement(yt.default,(0,de.Z)({key:"mask"},ve,{visible:ye}),function(gn,Jt){var Bn=gn.className,Sr=gn.style;return be.createElement("div",{className:Ce()("".concat(Ht,"-mask"),Bn,xt==null?void 0:xt.mask,ct),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Sr),Yt),ot==null?void 0:ot.mask),onClick:ut&&ye?oe:void 0,ref:Jt})}),At=typeof Be=="function"?Be(fe):Be,Cn={};if(Nn&&$n)switch(fe){case"top":Cn.transform="translateY(".concat($n,"px)");break;case"bottom":Cn.transform="translateY(".concat(-$n,"px)");break;case"left":Cn.transform="translateX(".concat($n,"px)");break;default:Cn.transform="translateX(".concat(-$n,"px)");break}fe==="left"||fe==="right"?Cn.width=ge(tt):Cn.height=ge(et);var Sn={onMouseEnter:ee,onMouseOver:z,onMouseLeave:re,onClick:le,onKeyDown:ne,onKeyUp:xe},Wn=be.createElement(yt.default,(0,de.Z)({key:"panel"},At,{visible:ye,forceRender:Bt,onVisibleChanged:function(Jt){Vt==null||Vt(Jt)},removeOnLeave:!1,leavedClassName:"".concat(Ht,"-content-wrapper-hidden")}),function(gn,Jt){var Bn=gn.className,Sr=gn.style,rn=be.createElement(St,(0,de.Z)({id:Ve,containerRef:Jt,prefixCls:Ht,className:Ce()(ke,xt==null?void 0:xt.content),style:(0,ae.Z)((0,ae.Z)({},st),ot==null?void 0:ot.content)},(0,Ye.Z)(Ze,{aria:!0}),Sn),Oe);return be.createElement("div",(0,de.Z)({className:Ce()("".concat(Ht,"-content-wrapper"),xt==null?void 0:xt.wrapper,Bn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Cn),Sr),ot==null?void 0:ot.wrapper)},(0,Ye.Z)(Ze,{data:!0})),ft?ft(rn):rn)}),rr=(0,ae.Z)({},Xe);return Me&&(rr.zIndex=Me),be.createElement(Qe.Provider,{value:It},be.createElement("div",{className:Ce()(Ht,"".concat(Ht,"-").concat(fe),bn,(0,we.Z)((0,we.Z)({},"".concat(Ht,"-open"),ye),"".concat(Ht,"-inline"),wt)),style:rr,tabIndex:-1,ref:nt,onKeyDown:Lt},Mt,be.createElement("div",{tabIndex:0,ref:Le,style:Ue,"aria-hidden":"true","data-sentinel":"start"}),Wn,be.createElement("div",{tabIndex:0,ref:Gt,style:Ue,"aria-hidden":"true","data-sentinel":"end"})))}var me=be.forwardRef(Dt),Ee=me,Ke=function(lt){var nn=lt.open,Ot=nn===void 0?!1:nn,Qt=lt.prefixCls,Ht=Qt===void 0?"rc-drawer":Qt,ye=lt.placement,fe=ye===void 0?"right":ye,wt=lt.autoFocus,qt=wt===void 0?!0:wt,Bt=lt.keyboard,We=Bt===void 0?!0:Bt,gt=lt.width,xt=gt===void 0?378:gt,bn=lt.mask,Xe=bn===void 0?!0:bn,Me=lt.maskClosable,ke=Me===void 0?!0:Me,Ve=lt.getContainer,st=lt.forceRender,Be=lt.afterOpenChange,tt=lt.destroyOnClose,et=lt.onMouseEnter,Oe=lt.onMouseOver,dt=lt.onMouseLeave,ut=lt.onClick,ve=lt.onKeyDown,ct=lt.onKeyUp,Yt=lt.panelRef,Vt=be.useState(!1),oe=(0,je.Z)(Vt,2),ee=oe[0],z=oe[1],re=be.useState(!1),le=(0,je.Z)(re,2),ne=le[0],xe=le[1];(0,at.Z)(function(){xe(!0)},[]);var ot=ne?Ot:!1,ft=be.useRef(),nt=be.useRef();(0,at.Z)(function(){ot&&(nt.current=document.activeElement)},[ot]);var Le=function(Nn){var Wt;if(z(Nn),Be==null||Be(Nn),!Nn&&nt.current&&!((Wt=ft.current)!==null&&Wt!==void 0&&Wt.contains(nt.current))){var Ln;(Ln=nt.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}},Gt=be.useMemo(function(){return{panel:Yt}},[Yt]);if(!st&&!ee&&!ot&&tt)return null;var Lt={onMouseEnter:et,onMouseOver:Oe,onMouseLeave:dt,onClick:ut,onKeyDown:ve,onKeyUp:ct},_t=(0,ae.Z)((0,ae.Z)({},lt),{},{open:ot,prefixCls:Ht,placement:fe,autoFocus:qt,keyboard:We,width:xt,mask:Xe,maskClosable:ke,inline:Ve===!1,afterOpenChange:Le,ref:ft},Lt);return be.createElement(De.Provider,{value:Gt},be.createElement(Ie.Z,{open:ot||st||ee,autoDestroy:!1,getContainer:Ve,autoLock:Xe&&(ot||ee)},be.createElement(Ee,_t)))},Se=Ke,$e=Se},20922:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Xe}});var ae=ue(54476),je=ue(20068),Ie=ue(76190),at=ue(42978),be=ue(75931),he=ue(67732),De=ue(83652);function Qe(){return typeof BigInt=="function"}function we(Me){return!Me&&Me!==0&&!Number.isNaN(Me)||!String(Me).trim()}function de(Me){var ke=Me.trim(),Ve=ke.startsWith("-");Ve&&(ke=ke.slice(1)),ke=ke.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ke.startsWith(".")&&(ke="0".concat(ke));var st=ke||"0",Be=st.split("."),tt=Be[0]||"0",et=Be[1]||"0";tt==="0"&&et==="0"&&(Ve=!1);var Oe=Ve?"-":"";return{negative:Ve,negativeStr:Oe,trimStr:st,integerStr:tt,decimalStr:et,fullStr:"".concat(Oe).concat(st)}}function Ne(Me){var ke=String(Me);return!Number.isNaN(Number(ke))&&ke.includes("e")}function Ce(Me){var ke=String(Me);if(Ne(Me)){var Ve=Number(ke.slice(ke.indexOf("e-")+2)),st=ke.match(/\.(\d+)/);return st!=null&&st[1]&&(Ve+=st[1].length),Ve}return ke.includes(".")&&Je(ke)?ke.length-ke.indexOf(".")-1:0}function yt(Me){var ke=String(Me);if(Ne(Me)){if(Me>Number.MAX_SAFE_INTEGER)return String(Qe()?BigInt(Me).toString():Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return String(Qe()?BigInt(Me).toString():Number.MIN_SAFE_INTEGER);ke=Me.toFixed(Ce(ke))}return de(ke).fullStr}function Je(Me){return typeof Me=="number"?!Number.isNaN(Me):Me?/^\s*-?\d+(\.\d+)?\s*$/.test(Me)||/^\s*-?\d+\.\s*$/.test(Me)||/^\s*-?\.\d+\s*$/.test(Me):!1}var Ye=function(){function Me(ke){if((0,he.Z)(this,Me),(0,je.Z)(this,"origin",""),(0,je.Z)(this,"negative",void 0),(0,je.Z)(this,"integer",void 0),(0,je.Z)(this,"decimal",void 0),(0,je.Z)(this,"decimalLen",void 0),(0,je.Z)(this,"empty",void 0),(0,je.Z)(this,"nan",void 0),we(ke)){this.empty=!0;return}if(this.origin=String(ke),ke==="-"||Number.isNaN(ke)){this.nan=!0;return}var Ve=ke;if(Ne(Ve)&&(Ve=Number(Ve)),Ve=typeof Ve=="string"?Ve:yt(Ve),Je(Ve)){var st=de(Ve);this.negative=st.negative;var Be=st.trimStr.split(".");this.integer=BigInt(Be[0]);var tt=Be[1]||"0";this.decimal=BigInt(tt),this.decimalLen=tt.length}else this.nan=!0}return(0,De.Z)(Me,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Ve){var st="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ve,"0"));return BigInt(st)}},{key:"negate",value:function(){var Ve=new Me(this.toString());return Ve.negative=!Ve.negative,Ve}},{key:"cal",value:function(Ve,st,Be){var tt=Math.max(this.getDecimalStr().length,Ve.getDecimalStr().length),et=this.alignDecimal(tt),Oe=Ve.alignDecimal(tt),dt=st(et,Oe).toString(),ut=Be(tt),ve=de(dt),ct=ve.negativeStr,Yt=ve.trimStr,Vt="".concat(ct).concat(Yt.padStart(ut+1,"0"));return new Me("".concat(Vt.slice(0,-ut),".").concat(Vt.slice(-ut)))}},{key:"add",value:function(Ve){if(this.isInvalidate())return new Me(Ve);var st=new Me(Ve);return st.isInvalidate()?this:this.cal(st,function(Be,tt){return Be+tt},function(Be){return Be})}},{key:"multi",value:function(Ve){var st=new Me(Ve);return this.isInvalidate()||st.isInvalidate()?new Me(NaN):this.cal(st,function(Be,tt){return Be*tt},function(Be){return Be*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ve){return this.toString()===(Ve==null?void 0:Ve.toString())}},{key:"lessEquals",value:function(Ve){return this.add(Ve.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ve?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Me}(),Re=function(){function Me(ke){if((0,he.Z)(this,Me),(0,je.Z)(this,"origin",""),(0,je.Z)(this,"number",void 0),(0,je.Z)(this,"empty",void 0),we(ke)){this.empty=!0;return}this.origin=String(ke),this.number=Number(ke)}return(0,De.Z)(Me,[{key:"negate",value:function(){return new Me(-this.toNumber())}},{key:"add",value:function(Ve){if(this.isInvalidate())return new Me(Ve);var st=Number(Ve);if(Number.isNaN(st))return this;var Be=this.number+st;if(Be>Number.MAX_SAFE_INTEGER)return new Me(Number.MAX_SAFE_INTEGER);if(Be<Number.MIN_SAFE_INTEGER)return new Me(Number.MIN_SAFE_INTEGER);var tt=Math.max(Ce(this.number),Ce(st));return new Me(Be.toFixed(tt))}},{key:"multi",value:function(Ve){var st=Number(Ve);if(this.isInvalidate()||Number.isNaN(st))return new Me(NaN);var Be=this.number*st;if(Be>Number.MAX_SAFE_INTEGER)return new Me(Number.MAX_SAFE_INTEGER);if(Be<Number.MIN_SAFE_INTEGER)return new Me(Number.MIN_SAFE_INTEGER);var tt=Math.max(Ce(this.number),Ce(st));return new Me(Be.toFixed(tt))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ve){return this.toNumber()===(Ve==null?void 0:Ve.toNumber())}},{key:"lessEquals",value:function(Ve){return this.add(Ve.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ve?this.isInvalidate()?"":yt(this.number):this.origin}}]),Me}();function Pe(Me){return Qe()?new Ye(Me):new Re(Me)}function vt(Me,ke,Ve){var st=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Me==="")return"";var Be=de(Me),tt=Be.negativeStr,et=Be.integerStr,Oe=Be.decimalStr,dt="".concat(ke).concat(Oe),ut="".concat(tt).concat(et);if(Ve>=0){var ve=Number(Oe[Ve]);if(ve>=5&&!st){var ct=Pe(Me).add("".concat(tt,"0.").concat("0".repeat(Ve)).concat(10-ve));return vt(ct.toString(),ke,Ve,st)}return Ve===0?ut:"".concat(ut).concat(ke).concat(Oe.padEnd(Ve,"0").slice(0,Ve))}return dt===".0"?ut:"".concat(ut).concat(dt)}var mt=Pe,St=ue(92310),Fe=ue.n(St),ge=ue(36901),He=ue(34280);function Ue(Me,ke){return typeof Proxy!="undefined"&&Me?new Proxy(Me,{get:function(st,Be){if(ke[Be])return ke[Be];var tt=st[Be];return typeof tt=="function"?tt.bind(st):tt}}):Me}var Dt=ue(8654),me=ue(59301),Ee=ue(48736);function Ke(Me,ke){var Ve=(0,me.useRef)(null);function st(){try{var tt=Me.selectionStart,et=Me.selectionEnd,Oe=Me.value,dt=Oe.substring(0,tt),ut=Oe.substring(et);Ve.current={start:tt,end:et,value:Oe,beforeTxt:dt,afterTxt:ut}}catch(ve){}}function Be(){if(Me&&Ve.current&&ke)try{var tt=Me.value,et=Ve.current,Oe=et.beforeTxt,dt=et.afterTxt,ut=et.start,ve=tt.length;if(tt.startsWith(Oe))ve=Oe.length;else if(tt.endsWith(dt))ve=tt.length-Ve.current.afterTxt.length;else{var ct=Oe[ut-1],Yt=tt.indexOf(ct,ut-1);Yt!==-1&&(ve=Yt+1)}Me.setSelectionRange(ve,ve)}catch(Vt){(0,Ee.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Vt.message))}}return[st,Be]}var Se=ue(49658),$e=function(){var ke=(0,me.useState)(!1),Ve=(0,at.Z)(ke,2),st=Ve[0],Be=Ve[1];return(0,He.Z)(function(){Be((0,Se.Z)())},[]),st},Ze=$e,lt=ue(16089),nn=200,Ot=600;function Qt(Me){var ke=Me.prefixCls,Ve=Me.upNode,st=Me.downNode,Be=Me.upDisabled,tt=Me.downDisabled,et=Me.onStep,Oe=me.useRef(),dt=me.useRef([]),ut=me.useRef();ut.current=et;var ve=function(){clearTimeout(Oe.current)},ct=function(ne,xe){ne.preventDefault(),ve(),ut.current(xe);function ot(){ut.current(xe),Oe.current=setTimeout(ot,nn)}Oe.current=setTimeout(ot,Ot)};me.useEffect(function(){return function(){ve(),dt.current.forEach(function(le){return lt.Z.cancel(le)})}},[]);var Yt=Ze();if(Yt)return null;var Vt="".concat(ke,"-handler"),oe=Fe()(Vt,"".concat(Vt,"-up"),(0,je.Z)({},"".concat(Vt,"-up-disabled"),Be)),ee=Fe()(Vt,"".concat(Vt,"-down"),(0,je.Z)({},"".concat(Vt,"-down-disabled"),tt)),z=function(){return dt.current.push((0,lt.Z)(ve))},re={unselectable:"on",role:"button",onMouseUp:z,onMouseLeave:z};return me.createElement("div",{className:"".concat(Vt,"-wrap")},me.createElement("span",(0,ae.Z)({},re,{onMouseDown:function(ne){ct(ne,!0)},"aria-label":"Increase Value","aria-disabled":Be,className:oe}),Ve||me.createElement("span",{unselectable:"on",className:"".concat(ke,"-handler-up-inner")})),me.createElement("span",(0,ae.Z)({},re,{onMouseDown:function(ne){ct(ne,!1)},"aria-label":"Decrease Value","aria-disabled":tt,className:ee}),st||me.createElement("span",{unselectable:"on",className:"".concat(ke,"-handler-down-inner")})))}function Ht(Me){var ke=typeof Me=="number"?yt(Me):de(Me).fullStr,Ve=ke.includes(".");return Ve?de(ke.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Me+"0"}var ye=ue(30292),fe=function(){var Me=(0,me.useRef)(0),ke=function(){lt.Z.cancel(Me.current)};return(0,me.useEffect)(function(){return ke},[]),function(Ve){ke(),Me.current=(0,lt.Z)(function(){Ve()})}},wt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],qt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Bt=function(ke,Ve){return ke||Ve.isEmpty()?Ve.toString():Ve.toNumber()},We=function(ke){var Ve=mt(ke);return Ve.isInvalidate()?null:Ve},gt=me.forwardRef(function(Me,ke){var Ve=Me.prefixCls,st=Me.className,Be=Me.style,tt=Me.min,et=Me.max,Oe=Me.step,dt=Oe===void 0?1:Oe,ut=Me.defaultValue,ve=Me.value,ct=Me.disabled,Yt=Me.readOnly,Vt=Me.upHandler,oe=Me.downHandler,ee=Me.keyboard,z=Me.changeOnWheel,re=z===void 0?!1:z,le=Me.controls,ne=le===void 0?!0:le,xe=Me.classNames,ot=Me.stringMode,ft=Me.parser,nt=Me.formatter,Le=Me.precision,Gt=Me.decimalSeparator,Lt=Me.onChange,_t=Me.onInput,hn=Me.onPressEnter,Nn=Me.onStep,Wt=Me.changeOnBlur,Ln=Wt===void 0?!0:Wt,nr=Me.domRef,$n=(0,be.Z)(Me,wt),It="".concat(Ve,"-input"),Mt=me.useRef(null),At=me.useState(!1),Cn=(0,at.Z)(At,2),Sn=Cn[0],Wn=Cn[1],rr=me.useRef(!1),gn=me.useRef(!1),Jt=me.useRef(!1),Bn=me.useState(function(){return mt(ve!=null?ve:ut)}),Sr=(0,at.Z)(Bn,2),rn=Sr[0],Mn=Sr[1];function Rn(Kn){ve===void 0&&Mn(Kn)}var Hn=me.useCallback(function(Kn,wn){if(!wn)return Le>=0?Le:Math.max(Ce(Kn),Ce(dt))},[Le,dt]),Er=me.useCallback(function(Kn){var wn=String(Kn);if(ft)return ft(wn);var Gn=wn;return Gt&&(Gn=Gn.replace(Gt,".")),Gn.replace(/[^\w.-]+/g,"")},[ft,Gt]),mr=me.useRef(""),Or=me.useCallback(function(Kn,wn){if(nt)return nt(Kn,{userTyping:wn,input:String(mr.current)});var Gn=typeof Kn=="number"?yt(Kn):Kn;if(!wn){var An=Hn(Gn,wn);if(Je(Gn)&&(Gt||An>=0)){var Tr=Gt||".";Gn=vt(Gn,Tr,An)}}return Gn},[nt,Hn,Gt]),yr=me.useState(function(){var Kn=ut!=null?ut:ve;return rn.isInvalidate()&&["string","number"].includes((0,Ie.Z)(Kn))?Number.isNaN(Kn)?"":Kn:Or(rn.toString(),!1)}),ur=(0,at.Z)(yr,2),Mr=ur[0],vn=ur[1];mr.current=Mr;function kt(Kn,wn){vn(Or(Kn.isInvalidate()?Kn.toString(!1):Kn.toString(!wn),wn))}var un=me.useMemo(function(){return We(et)},[et,Le]),qn=me.useMemo(function(){return We(tt)},[tt,Le]),kr=me.useMemo(function(){return!un||!rn||rn.isInvalidate()?!1:un.lessEquals(rn)},[un,rn]),_e=me.useMemo(function(){return!qn||!rn||rn.isInvalidate()?!1:rn.lessEquals(qn)},[qn,rn]),Ge=Ke(Mt.current,Sn),ln=(0,at.Z)(Ge,2),Kt=ln[0],qe=ln[1],Xt=function(wn){return un&&!wn.lessEquals(un)?un:qn&&!qn.lessEquals(wn)?qn:null},dn=function(wn){return!Xt(wn)},pn=function(wn,Gn){var An=wn,Tr=dn(An)||An.isEmpty();if(!An.isEmpty()&&!Gn&&(An=Xt(An)||An,Tr=!0),!Yt&&!ct&&Tr){var jr=An.toString(),Fr=Hn(jr,Gn);return Fr>=0&&(An=mt(vt(jr,".",Fr)),dn(An)||(An=mt(vt(jr,".",Fr,!0)))),An.equals(rn)||(Rn(An),Lt==null||Lt(An.isEmpty()?null:Bt(ot,An)),ve===void 0&&kt(An,Gn)),An}return rn},En=fe(),mn=function Kn(wn){if(Kt(),mr.current=wn,vn(wn),!gn.current){var Gn=Er(wn),An=mt(Gn);An.isNaN()||pn(An,!0)}_t==null||_t(wn),En(function(){var Tr=wn;ft||(Tr=wn.replace(/。/g,".")),Tr!==wn&&Kn(Tr)})},kn=function(){gn.current=!0},$t=function(){gn.current=!1,mn(Mt.current.value)},Ft=function(wn){mn(wn.target.value)},Tn=function(wn){var Gn;if(!(wn&&kr||!wn&&_e)){rr.current=!1;var An=mt(Jt.current?Ht(dt):dt);wn||(An=An.negate());var Tr=(rn||mt(0)).add(An.toString()),jr=pn(Tr,!1);Nn==null||Nn(Bt(ot,jr),{offset:Jt.current?Ht(dt):dt,type:wn?"up":"down"}),(Gn=Mt.current)===null||Gn===void 0||Gn.focus()}},Fn=function(wn){var Gn=mt(Er(Mr)),An;Gn.isNaN()?An=pn(rn,wn):An=pn(Gn,wn),ve!==void 0?kt(rn,!1):An.isNaN()||kt(An,!1)},Vn=function(){rr.current=!0},Un=function(wn){var Gn=wn.key,An=wn.shiftKey;rr.current=!0,Jt.current=An,Gn==="Enter"&&(gn.current||(rr.current=!1),Fn(!1),hn==null||hn(wn)),ee!==!1&&!gn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Gn)&&(Tn(Gn==="Up"||Gn==="ArrowUp"),wn.preventDefault())},xr=function(){rr.current=!1,Jt.current=!1};me.useEffect(function(){if(re&&Sn){var Kn=function(An){Tn(An.deltaY<0),An.preventDefault()},wn=Mt.current;if(wn)return wn.addEventListener("wheel",Kn,{passive:!1}),function(){return wn.removeEventListener("wheel",Kn)}}});var Nr=function(){Ln&&Fn(!1),Wn(!1),rr.current=!1};return(0,He.o)(function(){rn.isInvalidate()||kt(rn,!1)},[Le,nt]),(0,He.o)(function(){var Kn=mt(ve);Mn(Kn);var wn=mt(Er(Mr));(!Kn.equals(wn)||!rr.current||nt)&&kt(Kn,rr.current)},[ve]),(0,He.o)(function(){nt&&qe()},[Mr]),me.createElement("div",{ref:nr,className:Fe()(Ve,st,(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Ve,"-focused"),Sn),"".concat(Ve,"-disabled"),ct),"".concat(Ve,"-readonly"),Yt),"".concat(Ve,"-not-a-number"),rn.isNaN()),"".concat(Ve,"-out-of-range"),!rn.isInvalidate()&&!dn(rn))),style:Be,onFocus:function(){Wn(!0)},onBlur:Nr,onKeyDown:Un,onKeyUp:xr,onCompositionStart:kn,onCompositionEnd:$t,onBeforeInput:Vn},ne&&me.createElement(Qt,{prefixCls:Ve,upNode:Vt,downNode:oe,upDisabled:kr,downDisabled:_e,onStep:Tn}),me.createElement("div",{className:"".concat(It,"-wrap")},me.createElement("input",(0,ae.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":tt,"aria-valuemax":et,"aria-valuenow":rn.isInvalidate()?null:rn.toString(),step:dt},$n,{ref:(0,Dt.sQ)(Mt,ke),className:It,value:Mr,onChange:Ft,disabled:ct,readOnly:Yt}))))}),xt=me.forwardRef(function(Me,ke){var Ve=Me.disabled,st=Me.style,Be=Me.prefixCls,tt=Be===void 0?"rc-input-number":Be,et=Me.value,Oe=Me.prefix,dt=Me.suffix,ut=Me.addonBefore,ve=Me.addonAfter,ct=Me.className,Yt=Me.classNames,Vt=(0,be.Z)(Me,qt),oe=me.useRef(null),ee=me.useRef(null),z=me.useRef(null),re=function(ne){z.current&&(0,ye.nH)(z.current,ne)};return me.useImperativeHandle(ke,function(){return Ue(z.current,{focus:re,nativeElement:oe.current.nativeElement||ee.current})}),me.createElement(ge.BaseInput,{className:ct,triggerFocus:re,prefixCls:tt,value:et,disabled:Ve,style:st,prefix:Oe,suffix:dt,addonAfter:ve,addonBefore:ut,classNames:Yt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:oe},me.createElement(gt,(0,ae.Z)({prefixCls:tt,disabled:Ve,ref:z,domRef:ee,className:Yt==null?void 0:Yt.input},Vt)))}),bn=xt,Xe=bn},23425:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Ue}});var ae=ue(20068),je=ue(54476),Ie=ue(76190),at=ue(33885),be=ue(42978),he=ue(92310),De=ue.n(he),Qe=ue(18929),we=ue(10228),de=ue(26112),Ne=ue(48736),Ce=ue(59301),yt=ue(17119),Je=[10,20,50,100],Ye=function(me){var Ee=me.pageSizeOptions,Ke=Ee===void 0?Je:Ee,Se=me.locale,$e=me.changeSize,Ze=me.pageSize,lt=me.goButton,nn=me.quickGo,Ot=me.rootPrefixCls,Qt=me.disabled,Ht=me.buildOptionText,ye=me.showSizeChanger,fe=me.sizeChangerRender,wt=Ce.useState(""),qt=(0,be.Z)(wt,2),Bt=qt[0],We=qt[1],gt=function(){return!Bt||Number.isNaN(Bt)?void 0:Number(Bt)},xt=typeof Ht=="function"?Ht:function(et){return"".concat(et," ").concat(Se.items_per_page)},bn=function(Oe){We(Oe.target.value)},Xe=function(Oe){lt||Bt===""||(We(""),!(Oe.relatedTarget&&(Oe.relatedTarget.className.indexOf("".concat(Ot,"-item-link"))>=0||Oe.relatedTarget.className.indexOf("".concat(Ot,"-item"))>=0))&&(nn==null||nn(gt())))},Me=function(Oe){Bt!==""&&(Oe.keyCode===we.Z.ENTER||Oe.type==="click")&&(We(""),nn==null||nn(gt()))},ke=function(){return Ke.some(function(Oe){return Oe.toString()===Ze.toString()})?Ke:Ke.concat([Ze]).sort(function(Oe,dt){var ut=Number.isNaN(Number(Oe))?0:Number(Oe),ve=Number.isNaN(Number(dt))?0:Number(dt);return ut-ve})},Ve="".concat(Ot,"-options");if(!ye&&!nn)return null;var st=null,Be=null,tt=null;return ye&&fe&&(st=fe({disabled:Qt,size:Ze,onSizeChange:function(Oe){$e==null||$e(Number(Oe))},"aria-label":Se.page_size,className:"".concat(Ve,"-size-changer"),options:ke().map(function(et){return{label:xt(et),value:et}})})),nn&&(lt&&(tt=typeof lt=="boolean"?Ce.createElement("button",{type:"button",onClick:Me,onKeyUp:Me,disabled:Qt,className:"".concat(Ve,"-quick-jumper-button")},Se.jump_to_confirm):Ce.createElement("span",{onClick:Me,onKeyUp:Me},lt)),Be=Ce.createElement("div",{className:"".concat(Ve,"-quick-jumper")},Se.jump_to,Ce.createElement("input",{disabled:Qt,type:"text",value:Bt,onChange:bn,onKeyUp:Me,onBlur:Xe,"aria-label":Se.page}),Se.page,tt)),Ce.createElement("li",{className:Ve},st,Be)},Re=Ye,Pe=function(me){var Ee=me.rootPrefixCls,Ke=me.page,Se=me.active,$e=me.className,Ze=me.showTitle,lt=me.onClick,nn=me.onKeyPress,Ot=me.itemRender,Qt="".concat(Ee,"-item"),Ht=De()(Qt,"".concat(Qt,"-").concat(Ke),(0,ae.Z)((0,ae.Z)({},"".concat(Qt,"-active"),Se),"".concat(Qt,"-disabled"),!Ke),$e),ye=function(){lt(Ke)},fe=function(Bt){nn(Bt,lt,Ke)},wt=Ot(Ke,"page",Ce.createElement("a",{rel:"nofollow"},Ke));return wt?Ce.createElement("li",{title:Ze?String(Ke):null,className:Ht,onClick:ye,onKeyDown:fe,tabIndex:0},wt):null},vt=Pe,mt=function(me,Ee,Ke){return Ke};function St(){}function Fe(Dt){var me=Number(Dt);return typeof me=="number"&&!Number.isNaN(me)&&isFinite(me)&&Math.floor(me)===me}function ge(Dt,me,Ee){var Ke=typeof Dt=="undefined"?me:Dt;return Math.floor((Ee-1)/Ke)+1}var He=function(me){var Ee=me.prefixCls,Ke=Ee===void 0?"rc-pagination":Ee,Se=me.selectPrefixCls,$e=Se===void 0?"rc-select":Se,Ze=me.className,lt=me.current,nn=me.defaultCurrent,Ot=nn===void 0?1:nn,Qt=me.total,Ht=Qt===void 0?0:Qt,ye=me.pageSize,fe=me.defaultPageSize,wt=fe===void 0?10:fe,qt=me.onChange,Bt=qt===void 0?St:qt,We=me.hideOnSinglePage,gt=me.align,xt=me.showPrevNextJumpers,bn=xt===void 0?!0:xt,Xe=me.showQuickJumper,Me=me.showLessItems,ke=me.showTitle,Ve=ke===void 0?!0:ke,st=me.onShowSizeChange,Be=st===void 0?St:st,tt=me.locale,et=tt===void 0?yt.Z:tt,Oe=me.style,dt=me.totalBoundaryShowSizeChanger,ut=dt===void 0?50:dt,ve=me.disabled,ct=me.simple,Yt=me.showTotal,Vt=me.showSizeChanger,oe=Vt===void 0?Ht>ut:Vt,ee=me.sizeChangerRender,z=me.pageSizeOptions,re=me.itemRender,le=re===void 0?mt:re,ne=me.jumpPrevIcon,xe=me.jumpNextIcon,ot=me.prevIcon,ft=me.nextIcon,nt=Ce.useRef(null),Le=(0,Qe.Z)(10,{value:ye,defaultValue:wt}),Gt=(0,be.Z)(Le,2),Lt=Gt[0],_t=Gt[1],hn=(0,Qe.Z)(1,{value:lt,defaultValue:Ot,postState:function(or){return Math.max(1,Math.min(or,ge(void 0,Lt,Ht)))}}),Nn=(0,be.Z)(hn,2),Wt=Nn[0],Ln=Nn[1],nr=Ce.useState(Wt),$n=(0,be.Z)(nr,2),It=$n[0],Mt=$n[1];(0,Ce.useEffect)(function(){Mt(Wt)},[Wt]);var At=Bt!==St,Cn="current"in me,Sn=Math.max(1,Wt-(Me?3:5)),Wn=Math.min(ge(void 0,Lt,Ht),Wt+(Me?3:5));function rr(On,or){var Dr=On||Ce.createElement("button",{type:"button","aria-label":or,className:"".concat(Ke,"-item-link")});return typeof On=="function"&&(Dr=Ce.createElement(On,(0,at.Z)({},me))),Dr}function gn(On){var or=On.target.value,Dr=ge(void 0,Lt,Ht),Zr;return or===""?Zr=or:Number.isNaN(Number(or))?Zr=It:or>=Dr?Zr=Dr:Zr=Number(or),Zr}function Jt(On){return Fe(On)&&On!==Wt&&Fe(Ht)&&Ht>0}var Bn=Ht>Lt?Xe:!1;function Sr(On){(On.keyCode===we.Z.UP||On.keyCode===we.Z.DOWN)&&On.preventDefault()}function rn(On){var or=gn(On);switch(or!==It&&Mt(or),On.keyCode){case we.Z.ENTER:Hn(or);break;case we.Z.UP:Hn(or-1);break;case we.Z.DOWN:Hn(or+1);break;default:break}}function Mn(On){Hn(gn(On))}function Rn(On){var or=ge(On,Lt,Ht),Dr=Wt>or&&or!==0?or:Wt;_t(On),Mt(Dr),Be==null||Be(Wt,On),Ln(Dr),Bt==null||Bt(Dr,On)}function Hn(On){if(Jt(On)&&!ve){var or=ge(void 0,Lt,Ht),Dr=On;return On>or?Dr=or:On<1&&(Dr=1),Dr!==It&&Mt(Dr),Ln(Dr),Bt==null||Bt(Dr,Lt),Dr}return Wt}var Er=Wt>1,mr=Wt<ge(void 0,Lt,Ht);function Or(){Er&&Hn(Wt-1)}function yr(){mr&&Hn(Wt+1)}function ur(){Hn(Sn)}function Mr(){Hn(Wn)}function vn(On,or){if(On.key==="Enter"||On.charCode===we.Z.ENTER||On.keyCode===we.Z.ENTER){for(var Dr=arguments.length,Zr=new Array(Dr>2?Dr-2:0),Br=2;Br<Dr;Br++)Zr[Br-2]=arguments[Br];or.apply(void 0,Zr)}}function kt(On){vn(On,Or)}function un(On){vn(On,yr)}function qn(On){vn(On,ur)}function kr(On){vn(On,Mr)}function _e(On){var or=le(On,"prev",rr(ot,"prev page"));return Ce.isValidElement(or)?Ce.cloneElement(or,{disabled:!Er}):or}function Ge(On){var or=le(On,"next",rr(ft,"next page"));return Ce.isValidElement(or)?Ce.cloneElement(or,{disabled:!mr}):or}function ln(On){(On.type==="click"||On.keyCode===we.Z.ENTER)&&Hn(It)}var Kt=null,qe=(0,de.Z)(me,{aria:!0,data:!0}),Xt=Yt&&Ce.createElement("li",{className:"".concat(Ke,"-total-text")},Yt(Ht,[Ht===0?0:(Wt-1)*Lt+1,Wt*Lt>Ht?Ht:Wt*Lt])),dn=null,pn=ge(void 0,Lt,Ht);if(We&&Ht<=Lt)return null;var En=[],mn={rootPrefixCls:Ke,onClick:Hn,onKeyPress:vn,showTitle:Ve,itemRender:le,page:-1},kn=Wt-1>0?Wt-1:0,$t=Wt+1<pn?Wt+1:pn,Ft=Xe&&Xe.goButton,Tn=(0,Ie.Z)(ct)==="object"?ct.readOnly:!ct,Fn=Ft,Vn=null;ct&&(Ft&&(typeof Ft=="boolean"?Fn=Ce.createElement("button",{type:"button",onClick:ln,onKeyUp:ln},et.jump_to_confirm):Fn=Ce.createElement("span",{onClick:ln,onKeyUp:ln},Ft),Fn=Ce.createElement("li",{title:Ve?"".concat(et.jump_to).concat(Wt,"/").concat(pn):null,className:"".concat(Ke,"-simple-pager")},Fn)),Vn=Ce.createElement("li",{title:Ve?"".concat(Wt,"/").concat(pn):null,className:"".concat(Ke,"-simple-pager")},Tn?It:Ce.createElement("input",{type:"text","aria-label":et.jump_to,value:It,disabled:ve,onKeyDown:Sr,onKeyUp:rn,onChange:rn,onBlur:Mn,size:3}),Ce.createElement("span",{className:"".concat(Ke,"-slash")},"/"),pn));var Un=Me?1:2;if(pn<=3+Un*2){pn||En.push(Ce.createElement(vt,(0,je.Z)({},mn,{key:"noPager",page:1,className:"".concat(Ke,"-item-disabled")})));for(var xr=1;xr<=pn;xr+=1)En.push(Ce.createElement(vt,(0,je.Z)({},mn,{key:xr,page:xr,active:Wt===xr})))}else{var Nr=Me?et.prev_3:et.prev_5,Kn=Me?et.next_3:et.next_5,wn=le(Sn,"jump-prev",rr(ne,"prev page")),Gn=le(Wn,"jump-next",rr(xe,"next page"));bn&&(Kt=wn?Ce.createElement("li",{title:Ve?Nr:null,key:"prev",onClick:ur,tabIndex:0,onKeyDown:qn,className:De()("".concat(Ke,"-jump-prev"),(0,ae.Z)({},"".concat(Ke,"-jump-prev-custom-icon"),!!ne))},wn):null,dn=Gn?Ce.createElement("li",{title:Ve?Kn:null,key:"next",onClick:Mr,tabIndex:0,onKeyDown:kr,className:De()("".concat(Ke,"-jump-next"),(0,ae.Z)({},"".concat(Ke,"-jump-next-custom-icon"),!!xe))},Gn):null);var An=Math.max(1,Wt-Un),Tr=Math.min(Wt+Un,pn);Wt-1<=Un&&(Tr=1+Un*2),pn-Wt<=Un&&(An=pn-Un*2);for(var jr=An;jr<=Tr;jr+=1)En.push(Ce.createElement(vt,(0,je.Z)({},mn,{key:jr,page:jr,active:Wt===jr})));if(Wt-1>=Un*2&&Wt!==3&&(En[0]=Ce.cloneElement(En[0],{className:De()("".concat(Ke,"-item-after-jump-prev"),En[0].props.className)}),En.unshift(Kt)),pn-Wt>=Un*2&&Wt!==pn-2){var Fr=En[En.length-1];En[En.length-1]=Ce.cloneElement(Fr,{className:De()("".concat(Ke,"-item-before-jump-next"),Fr.props.className)}),En.push(dn)}An!==1&&En.unshift(Ce.createElement(vt,(0,je.Z)({},mn,{key:1,page:1}))),Tr!==pn&&En.push(Ce.createElement(vt,(0,je.Z)({},mn,{key:pn,page:pn})))}var Ur=_e(kn);if(Ur){var Jr=!Er||!pn;Ur=Ce.createElement("li",{title:Ve?et.prev_page:null,onClick:Or,tabIndex:Jr?null:0,onKeyDown:kt,className:De()("".concat(Ke,"-prev"),(0,ae.Z)({},"".concat(Ke,"-disabled"),Jr)),"aria-disabled":Jr},Ur)}var Vr=Ge($t);if(Vr){var Ir,ei;ct?(Ir=!mr,ei=Er?0:null):(Ir=!mr||!pn,ei=Ir?null:0),Vr=Ce.createElement("li",{title:Ve?et.next_page:null,onClick:yr,tabIndex:ei,onKeyDown:un,className:De()("".concat(Ke,"-next"),(0,ae.Z)({},"".concat(Ke,"-disabled"),Ir)),"aria-disabled":Ir},Vr)}var Yr=De()(Ke,Ze,(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Ke,"-start"),gt==="start"),"".concat(Ke,"-center"),gt==="center"),"".concat(Ke,"-end"),gt==="end"),"".concat(Ke,"-simple"),ct),"".concat(Ke,"-disabled"),ve));return Ce.createElement("ul",(0,je.Z)({className:Yr,style:Oe,ref:nt},qe),Xt,Ur,ct?Vn:En,Vr,Ce.createElement(Re,{locale:et,rootPrefixCls:Ke,disabled:ve,selectPrefixCls:$e,changeSize:Rn,pageSize:Lt,pageSizeOptions:z,quickGo:Bn?Hn:null,goButton:Fn,showSizeChanger:oe,sizeChangerRender:ee}))},Ue=He},6551:function(cn,an,ue){"use strict";ue.d(an,{ZP:function(){return De}});var ae=ue(42978),je=ue(59301),Ie=ue(47273),at=0,be=(0,Ie.Z)();function he(){var Qe;return be?(Qe=at,at+=1):Qe="TEST_OR_SSR",Qe}function De(Qe){var we=je.useState(),de=(0,ae.Z)(we,2),Ne=de[0],Ce=de[1];return je.useEffect(function(){Ce("rc_select_".concat(he()))},[]),Qe||Ne}},37463:function(cn,an,ue){"use strict";ue.d(an,{Ac:function(){return Le},Xo:function(){return Lt},Wx:function(){return hn},ZP:function(){return kr},lk:function(){return St}});var ae=ue(54476),je=ue(94480),Ie=ue(20068),at=ue(33885),be=ue(42978),he=ue(75931),De=ue(76190),Qe=ue(18929),we=ue(48736),de=ue(59301),Ne=ue(92310),Ce=ue.n(Ne),yt=ue(34280),Je=ue(49658),Ye=ue(8654),Re=function(Ge){var ln=Ge.className,Kt=Ge.customizeIcon,qe=Ge.customizeIconProps,Xt=Ge.children,dn=Ge.onMouseDown,pn=Ge.onClick,En=typeof Kt=="function"?Kt(qe):Kt;return de.createElement("span",{className:ln,onMouseDown:function(kn){kn.preventDefault(),dn==null||dn(kn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:pn,"aria-hidden":!0},En!==void 0?En:de.createElement("span",{className:Ce()(ln.split(/\s+/).map(function(mn){return"".concat(mn,"-icon")}))},Xt))},Pe=Re,vt=function(Ge,ln,Kt,qe,Xt){var dn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,pn=arguments.length>6?arguments[6]:void 0,En=arguments.length>7?arguments[7]:void 0,mn=de.useMemo(function(){if((0,De.Z)(qe)==="object")return qe.clearIcon;if(Xt)return Xt},[qe,Xt]),kn=de.useMemo(function(){return!!(!dn&&qe&&(Kt.length||pn)&&!(En==="combobox"&&pn===""))},[qe,dn,Kt.length,pn,En]);return{allowClear:kn,clearIcon:de.createElement(Pe,{className:"".concat(Ge,"-clear"),onMouseDown:ln,customizeIcon:mn},"\xD7")}},mt=de.createContext(null);function St(){return de.useContext(mt)}function Fe(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ge=de.useState(!1),ln=(0,be.Z)(Ge,2),Kt=ln[0],qe=ln[1],Xt=de.useRef(null),dn=function(){window.clearTimeout(Xt.current)};de.useEffect(function(){return dn},[]);var pn=function(mn,kn){dn(),Xt.current=window.setTimeout(function(){qe(mn),kn&&kn()},_e)};return[Kt,pn,dn]}function ge(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ge=de.useRef(null),ln=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(ln.current)}},[]);function Kt(qe){(qe||Ge.current===null)&&(Ge.current=qe),window.clearTimeout(ln.current),ln.current=window.setTimeout(function(){Ge.current=null},_e)}return[function(){return Ge.current},Kt]}function He(_e,Ge,ln,Kt){var qe=de.useRef(null);qe.current={open:Ge,triggerOpen:ln,customizedTrigger:Kt},de.useEffect(function(){function Xt(dn){var pn;if(!((pn=qe.current)!==null&&pn!==void 0&&pn.customizedTrigger)){var En=dn.target;En.shadowRoot&&dn.composed&&(En=dn.composedPath()[0]||En),qe.current.open&&_e().filter(function(mn){return mn}).every(function(mn){return!mn.contains(En)&&mn!==En})&&qe.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Xt),function(){return window.removeEventListener("mousedown",Xt)}},[])}var Ue=ue(10228);function Dt(_e){return _e&&![Ue.Z.ESC,Ue.Z.SHIFT,Ue.Z.BACKSPACE,Ue.Z.TAB,Ue.Z.WIN_KEY,Ue.Z.ALT,Ue.Z.META,Ue.Z.WIN_KEY_RIGHT,Ue.Z.CTRL,Ue.Z.SEMICOLON,Ue.Z.EQUALS,Ue.Z.CAPS_LOCK,Ue.Z.CONTEXT_MENU,Ue.Z.F1,Ue.Z.F2,Ue.Z.F3,Ue.Z.F4,Ue.Z.F5,Ue.Z.F6,Ue.Z.F7,Ue.Z.F8,Ue.Z.F9,Ue.Z.F10,Ue.Z.F11,Ue.Z.F12].includes(_e)}var me=ue(26112),Ee=ue(11780);function Ke(_e,Ge,ln){var Kt=(0,at.Z)((0,at.Z)({},_e),ln?Ge:{});return Object.keys(Ge).forEach(function(qe){var Xt=Ge[qe];typeof Xt=="function"&&(Kt[qe]=function(){for(var dn,pn=arguments.length,En=new Array(pn),mn=0;mn<pn;mn++)En[mn]=arguments[mn];return Xt.apply(void 0,En),(dn=_e[qe])===null||dn===void 0?void 0:dn.call.apply(dn,[_e].concat(En))})}),Kt}var Se=Ke,$e=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ze=function(Ge,ln){var Kt=Ge.prefixCls,qe=Ge.id,Xt=Ge.inputElement,dn=Ge.autoFocus,pn=Ge.autoComplete,En=Ge.editable,mn=Ge.activeDescendantId,kn=Ge.value,$t=Ge.open,Ft=Ge.attrs,Tn=(0,he.Z)(Ge,$e),Fn=Xt||de.createElement("input",null),Vn=Fn,Un=Vn.ref,xr=Vn.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=de.cloneElement(Fn,(0,at.Z)((0,at.Z)((0,at.Z)({type:"search"},Se(Tn,xr,!0)),{},{id:qe,ref:(0,Ye.sQ)(ln,Un),autoComplete:pn||"off",autoFocus:dn,className:Ce()("".concat(Kt,"-selection-search-input"),xr==null?void 0:xr.className),role:"combobox","aria-expanded":$t||!1,"aria-haspopup":"listbox","aria-owns":"".concat(qe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(qe,"_list"),"aria-activedescendant":$t?mn:void 0},Ft),{},{value:En?kn:"",readOnly:!En,unselectable:En?null:"on",style:(0,at.Z)((0,at.Z)({},xr.style),{},{opacity:En?null:0})})),Fn},lt=de.forwardRef(Ze),nn=lt;function Ot(_e){return Array.isArray(_e)?_e:_e!==void 0?[_e]:[]}var Qt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ht=Qt;function ye(_e){return _e!=null}function fe(_e){return!_e&&_e!==0}function wt(_e){return["string","number"].includes((0,De.Z)(_e))}function qt(_e){var Ge=void 0;return _e&&(wt(_e.title)?Ge=_e.title.toString():wt(_e.label)&&(Ge=_e.label.toString())),Ge}function Bt(_e,Ge){Ht?de.useLayoutEffect(_e,Ge):de.useEffect(_e,Ge)}function We(_e){var Ge;return(Ge=_e.key)!==null&&Ge!==void 0?Ge:_e.value}var gt=function(Ge){Ge.preventDefault(),Ge.stopPropagation()},xt=function(Ge){var ln=Ge.id,Kt=Ge.prefixCls,qe=Ge.values,Xt=Ge.open,dn=Ge.searchValue,pn=Ge.autoClearSearchValue,En=Ge.inputRef,mn=Ge.placeholder,kn=Ge.disabled,$t=Ge.mode,Ft=Ge.showSearch,Tn=Ge.autoFocus,Fn=Ge.autoComplete,Vn=Ge.activeDescendantId,Un=Ge.tabIndex,xr=Ge.removeIcon,Nr=Ge.maxTagCount,Kn=Ge.maxTagTextLength,wn=Ge.maxTagPlaceholder,Gn=wn===void 0?function(Nt){return"+ ".concat(Nt.length," ...")}:wn,An=Ge.tagRender,Tr=Ge.onToggleOpen,jr=Ge.onRemove,Fr=Ge.onInputChange,Ur=Ge.onInputPaste,Jr=Ge.onInputKeyDown,Vr=Ge.onInputMouseDown,Ir=Ge.onInputCompositionStart,ei=Ge.onInputCompositionEnd,Yr=Ge.onInputBlur,On=de.useRef(null),or=(0,de.useState)(0),Dr=(0,be.Z)(or,2),Zr=Dr[0],Br=Dr[1],Wr=(0,de.useState)(!1),oi=(0,be.Z)(Wr,2),Te=oi[0],bt=oi[1],it="".concat(Kt,"-selection"),ht=Xt||$t==="multiple"&&pn===!1||$t==="tags"?dn:"",Pt=$t==="tags"||$t==="multiple"&&pn===!1||Ft&&(Xt||Te);Bt(function(){Br(On.current.scrollWidth)},[ht]);var Zt=function(Tt,zt,xn,jt,Rt){return de.createElement("span",{title:qt(Tt),className:Ce()("".concat(it,"-item"),(0,Ie.Z)({},"".concat(it,"-item-disabled"),xn))},de.createElement("span",{className:"".concat(it,"-item-content")},zt),jt&&de.createElement(Pe,{className:"".concat(it,"-item-remove"),onMouseDown:gt,onClick:Rt,customizeIcon:xr},"\xD7"))},fn=function(Tt,zt,xn,jt,Rt,on){var sn=function(jn){gt(jn),Tr(!Xt)};return de.createElement("span",{onMouseDown:sn},An({label:zt,value:Tt,disabled:xn,closable:jt,onClose:Rt,isMaxTag:!!on}))},en=function(Tt){var zt=Tt.disabled,xn=Tt.label,jt=Tt.value,Rt=!kn&&!zt,on=xn;if(typeof Kn=="number"&&(typeof xn=="string"||typeof xn=="number")){var sn=String(on);sn.length>Kn&&(on="".concat(sn.slice(0,Kn),"..."))}var Dn=function(In){In&&In.stopPropagation(),jr(Tt)};return typeof An=="function"?fn(jt,on,zt,Rt,Dn):Zt(Tt,on,zt,Rt,Dn)},Ut=function(Tt){if(!qe.length)return null;var zt=typeof Gn=="function"?Gn(Tt):Gn;return typeof An=="function"?fn(void 0,zt,!1,!1,void 0,!0):Zt({title:zt},zt,!1)},rt=de.createElement("div",{className:"".concat(it,"-search"),style:{width:Zr},onFocus:function(){bt(!0)},onBlur:function(){bt(!1)}},de.createElement(nn,{ref:En,open:Xt,prefixCls:Kt,id:ln,inputElement:null,disabled:kn,autoFocus:Tn,autoComplete:Fn,editable:Pt,activeDescendantId:Vn,value:ht,onKeyDown:Jr,onMouseDown:Vr,onChange:Fr,onPaste:Ur,onCompositionStart:Ir,onCompositionEnd:ei,onBlur:Yr,tabIndex:Un,attrs:(0,me.Z)(Ge,!0)}),de.createElement("span",{ref:On,className:"".concat(it,"-search-mirror"),"aria-hidden":!0},ht,"\xA0")),Et=de.createElement(Ee.Z,{prefixCls:"".concat(it,"-overflow"),data:qe,renderItem:en,renderRest:Ut,suffix:rt,itemKey:We,maxCount:Nr});return de.createElement("span",{className:"".concat(it,"-wrap")},Et,!qe.length&&!ht&&de.createElement("span",{className:"".concat(it,"-placeholder")},mn))},bn=xt,Xe=function(Ge){var ln=Ge.inputElement,Kt=Ge.prefixCls,qe=Ge.id,Xt=Ge.inputRef,dn=Ge.disabled,pn=Ge.autoFocus,En=Ge.autoComplete,mn=Ge.activeDescendantId,kn=Ge.mode,$t=Ge.open,Ft=Ge.values,Tn=Ge.placeholder,Fn=Ge.tabIndex,Vn=Ge.showSearch,Un=Ge.searchValue,xr=Ge.activeValue,Nr=Ge.maxLength,Kn=Ge.onInputKeyDown,wn=Ge.onInputMouseDown,Gn=Ge.onInputChange,An=Ge.onInputPaste,Tr=Ge.onInputCompositionStart,jr=Ge.onInputCompositionEnd,Fr=Ge.onInputBlur,Ur=Ge.title,Jr=de.useState(!1),Vr=(0,be.Z)(Jr,2),Ir=Vr[0],ei=Vr[1],Yr=kn==="combobox",On=Yr||Vn,or=Ft[0],Dr=Un||"";Yr&&xr&&!Ir&&(Dr=xr),de.useEffect(function(){Yr&&ei(!1)},[Yr,xr]);var Zr=kn!=="combobox"&&!$t&&!Vn?!1:!!Dr,Br=Ur===void 0?qt(or):Ur,Wr=de.useMemo(function(){return or?null:de.createElement("span",{className:"".concat(Kt,"-selection-placeholder"),style:Zr?{visibility:"hidden"}:void 0},Tn)},[or,Zr,Tn,Kt]);return de.createElement("span",{className:"".concat(Kt,"-selection-wrap")},de.createElement("span",{className:"".concat(Kt,"-selection-search")},de.createElement(nn,{ref:Xt,prefixCls:Kt,id:qe,open:$t,inputElement:ln,disabled:dn,autoFocus:pn,autoComplete:En,editable:On,activeDescendantId:mn,value:Dr,onKeyDown:Kn,onMouseDown:wn,onChange:function(Te){ei(!0),Gn(Te)},onPaste:An,onCompositionStart:Tr,onCompositionEnd:jr,onBlur:Fr,tabIndex:Fn,attrs:(0,me.Z)(Ge,!0),maxLength:Yr?Nr:void 0})),!Yr&&or?de.createElement("span",{className:"".concat(Kt,"-selection-item"),title:Br,style:Zr?{visibility:"hidden"}:void 0},or.label):null,Wr)},Me=Xe,ke=function(Ge,ln){var Kt=(0,de.useRef)(null),qe=(0,de.useRef)(!1),Xt=Ge.prefixCls,dn=Ge.open,pn=Ge.mode,En=Ge.showSearch,mn=Ge.tokenWithEnter,kn=Ge.disabled,$t=Ge.prefix,Ft=Ge.autoClearSearchValue,Tn=Ge.onSearch,Fn=Ge.onSearchSubmit,Vn=Ge.onToggleOpen,Un=Ge.onInputKeyDown,xr=Ge.onInputBlur,Nr=Ge.domRef;de.useImperativeHandle(ln,function(){return{focus:function(Br){Kt.current.focus(Br)},blur:function(){Kt.current.blur()}}});var Kn=ge(0),wn=(0,be.Z)(Kn,2),Gn=wn[0],An=wn[1],Tr=function(Br){var Wr=Br.which,oi=Kt.current instanceof HTMLTextAreaElement;!oi&&dn&&(Wr===Ue.Z.UP||Wr===Ue.Z.DOWN)&&Br.preventDefault(),Un&&Un(Br),Wr===Ue.Z.ENTER&&pn==="tags"&&!qe.current&&!dn&&(Fn==null||Fn(Br.target.value)),!(oi&&!dn&&~[Ue.Z.UP,Ue.Z.DOWN,Ue.Z.LEFT,Ue.Z.RIGHT].indexOf(Wr))&&Dt(Wr)&&Vn(!0)},jr=function(){An(!0)},Fr=(0,de.useRef)(null),Ur=function(Br){Tn(Br,!0,qe.current)!==!1&&Vn(!0)},Jr=function(){qe.current=!0},Vr=function(Br){qe.current=!1,pn!=="combobox"&&Ur(Br.target.value)},Ir=function(Br){var Wr=Br.target.value;if(mn&&Fr.current&&/[\r\n]/.test(Fr.current)){var oi=Fr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Wr=Wr.replace(oi,Fr.current)}Fr.current=null,Ur(Wr)},ei=function(Br){var Wr=Br.clipboardData,oi=Wr==null?void 0:Wr.getData("text");Fr.current=oi||""},Yr=function(Br){var Wr=Br.target;if(Wr!==Kt.current){var oi=document.body.style.msTouchAction!==void 0;oi?setTimeout(function(){Kt.current.focus()}):Kt.current.focus()}},On=function(Br){var Wr=Gn();Br.target!==Kt.current&&!Wr&&!(pn==="combobox"&&kn)&&Br.preventDefault(),(pn!=="combobox"&&(!En||!Wr)||!dn)&&(dn&&Ft!==!1&&Tn("",!0,!1),Vn())},or={inputRef:Kt,onInputKeyDown:Tr,onInputMouseDown:jr,onInputChange:Ir,onInputPaste:ei,onInputCompositionStart:Jr,onInputCompositionEnd:Vr,onInputBlur:xr},Dr=pn==="multiple"||pn==="tags"?de.createElement(bn,(0,ae.Z)({},Ge,or)):de.createElement(Me,(0,ae.Z)({},Ge,or));return de.createElement("div",{ref:Nr,className:"".concat(Xt,"-selector"),onClick:Yr,onMouseDown:On},$t&&de.createElement("div",{className:"".concat(Xt,"-prefix")},$t),Dr)},Ve=de.forwardRef(ke),st=Ve,Be=ue(65030),tt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],et=function(Ge){var ln=Ge===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ln,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ln,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ln,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ln,adjustY:1},htmlRegion:"scroll"}}},Oe=function(Ge,ln){var Kt=Ge.prefixCls,qe=Ge.disabled,Xt=Ge.visible,dn=Ge.children,pn=Ge.popupElement,En=Ge.animation,mn=Ge.transitionName,kn=Ge.dropdownStyle,$t=Ge.dropdownClassName,Ft=Ge.direction,Tn=Ft===void 0?"ltr":Ft,Fn=Ge.placement,Vn=Ge.builtinPlacements,Un=Ge.dropdownMatchSelectWidth,xr=Ge.dropdownRender,Nr=Ge.dropdownAlign,Kn=Ge.getPopupContainer,wn=Ge.empty,Gn=Ge.getTriggerDOMNode,An=Ge.onPopupVisibleChange,Tr=Ge.onPopupMouseEnter,jr=(0,he.Z)(Ge,tt),Fr="".concat(Kt,"-dropdown"),Ur=pn;xr&&(Ur=xr(pn));var Jr=de.useMemo(function(){return Vn||et(Un)},[Vn,Un]),Vr=En?"".concat(Fr,"-").concat(En):mn,Ir=typeof Un=="number",ei=de.useMemo(function(){return Ir?null:Un===!1?"minWidth":"width"},[Un,Ir]),Yr=kn;Ir&&(Yr=(0,at.Z)((0,at.Z)({},Yr),{},{width:Un}));var On=de.useRef(null);return de.useImperativeHandle(ln,function(){return{getPopupElement:function(){var Dr;return(Dr=On.current)===null||Dr===void 0?void 0:Dr.popupElement}}}),de.createElement(Be.Z,(0,ae.Z)({},jr,{showAction:An?["click"]:[],hideAction:An?["click"]:[],popupPlacement:Fn||(Tn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Jr,prefixCls:Fr,popupTransitionName:Vr,popup:de.createElement("div",{onMouseEnter:Tr},Ur),ref:On,stretch:ei,popupAlign:Nr,popupVisible:Xt,getPopupContainer:Kn,popupClassName:Ce()($t,(0,Ie.Z)({},"".concat(Fr,"-empty"),wn)),popupStyle:Yr,getTriggerDOMNode:Gn,onPopupVisibleChange:An}),dn)},dt=de.forwardRef(Oe),ut=dt,ve=ue(66712);function ct(_e,Ge){var ln=_e.key,Kt;return"value"in _e&&(Kt=_e.value),ln!=null?ln:Kt!==void 0?Kt:"rc-index-key-".concat(Ge)}function Yt(_e){return typeof _e!="undefined"&&!Number.isNaN(_e)}function Vt(_e,Ge){var ln=_e||{},Kt=ln.label,qe=ln.value,Xt=ln.options,dn=ln.groupLabel,pn=Kt||(Ge?"children":"label");return{label:pn,value:qe||"value",options:Xt||"options",groupLabel:dn||pn}}function oe(_e){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ln=Ge.fieldNames,Kt=Ge.childrenAsData,qe=[],Xt=Vt(ln,!1),dn=Xt.label,pn=Xt.value,En=Xt.options,mn=Xt.groupLabel;function kn($t,Ft){Array.isArray($t)&&$t.forEach(function(Tn){if(Ft||!(En in Tn)){var Fn=Tn[pn];qe.push({key:ct(Tn,qe.length),groupOption:Ft,data:Tn,label:Tn[dn],value:Fn})}else{var Vn=Tn[mn];Vn===void 0&&Kt&&(Vn=Tn.label),qe.push({key:ct(Tn,qe.length),group:!0,data:Tn,label:Vn}),kn(Tn[En],!0)}})}return kn(_e,!1),qe}function ee(_e){var Ge=(0,at.Z)({},_e);return"props"in Ge||Object.defineProperty(Ge,"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`."),Ge}}),Ge}var z=function(Ge,ln,Kt){if(!ln||!ln.length)return null;var qe=!1,Xt=function pn(En,mn){var kn=(0,ve.Z)(mn),$t=kn[0],Ft=kn.slice(1);if(!$t)return[En];var Tn=En.split($t);return qe=qe||Tn.length>1,Tn.reduce(function(Fn,Vn){return[].concat((0,je.Z)(Fn),(0,je.Z)(pn(Vn,Ft)))},[]).filter(Boolean)},dn=Xt(Ge,ln);return qe?typeof Kt!="undefined"?dn.slice(0,Kt):dn:null},re=de.createContext(null),le=re;function ne(_e){var Ge=_e.visible,ln=_e.values;if(!Ge)return null;var Kt=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ln.slice(0,Kt).map(function(qe){var Xt=qe.label,dn=qe.value;return["number","string"].includes((0,De.Z)(Xt))?Xt:dn}).join(", ")),ln.length>Kt?", ...":null)}var xe=["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"],ot=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ft=function(Ge){return Ge==="tags"||Ge==="multiple"},nt=de.forwardRef(function(_e,Ge){var ln,Kt=_e.id,qe=_e.prefixCls,Xt=_e.className,dn=_e.showSearch,pn=_e.tagRender,En=_e.direction,mn=_e.omitDomProps,kn=_e.displayValues,$t=_e.onDisplayValuesChange,Ft=_e.emptyOptions,Tn=_e.notFoundContent,Fn=Tn===void 0?"Not Found":Tn,Vn=_e.onClear,Un=_e.mode,xr=_e.disabled,Nr=_e.loading,Kn=_e.getInputElement,wn=_e.getRawInputElement,Gn=_e.open,An=_e.defaultOpen,Tr=_e.onDropdownVisibleChange,jr=_e.activeValue,Fr=_e.onActiveValueChange,Ur=_e.activeDescendantId,Jr=_e.searchValue,Vr=_e.autoClearSearchValue,Ir=_e.onSearch,ei=_e.onSearchSplit,Yr=_e.tokenSeparators,On=_e.allowClear,or=_e.prefix,Dr=_e.suffixIcon,Zr=_e.clearIcon,Br=_e.OptionList,Wr=_e.animation,oi=_e.transitionName,Te=_e.dropdownStyle,bt=_e.dropdownClassName,it=_e.dropdownMatchSelectWidth,ht=_e.dropdownRender,Pt=_e.dropdownAlign,Zt=_e.placement,fn=_e.builtinPlacements,en=_e.getPopupContainer,Ut=_e.showAction,rt=Ut===void 0?[]:Ut,Et=_e.onFocus,Nt=_e.onBlur,Tt=_e.onKeyUp,zt=_e.onKeyDown,xn=_e.onMouseDown,jt=(0,he.Z)(_e,xe),Rt=ft(Un),on=(dn!==void 0?dn:Rt)||Un==="combobox",sn=(0,at.Z)({},jt);ot.forEach(function(zr){delete sn[zr]}),mn==null||mn.forEach(function(zr){delete sn[zr]});var Dn=de.useState(!1),jn=(0,be.Z)(Dn,2),In=jn[0],lr=jn[1];de.useEffect(function(){lr((0,Je.Z)())},[]);var er=de.useRef(null),ar=de.useRef(null),dr=de.useRef(null),sr=de.useRef(null),Pr=de.useRef(null),hr=de.useRef(!1),br=Fe(),ir=(0,be.Z)(br,3),zn=ir[0],Qn=ir[1],cr=ir[2];de.useImperativeHandle(Ge,function(){var zr,Rr;return{focus:(zr=sr.current)===null||zr===void 0?void 0:zr.focus,blur:(Rr=sr.current)===null||Rr===void 0?void 0:Rr.blur,scrollTo:function(hi){var bi;return(bi=Pr.current)===null||bi===void 0?void 0:bi.scrollTo(hi)},nativeElement:er.current||ar.current}});var Xn=de.useMemo(function(){var zr;if(Un!=="combobox")return Jr;var Rr=(zr=kn[0])===null||zr===void 0?void 0:zr.value;return typeof Rr=="string"||typeof Rr=="number"?String(Rr):""},[Jr,Un,kn]),Cr=Un==="combobox"&&typeof Kn=="function"&&Kn()||null,Lr=typeof wn=="function"&&wn(),Qr=(0,Ye.x1)(ar,Lr==null||(ln=Lr.props)===null||ln===void 0?void 0:ln.ref),Li=de.useState(!1),wi=(0,be.Z)(Li,2),yi=wi[0],Ni=wi[1];(0,yt.Z)(function(){Ni(!0)},[]);var $r=(0,Qe.Z)(!1,{defaultValue:An,value:Gn}),Xr=(0,be.Z)($r,2),ti=Xr[0],ki=Xr[1],ii=yi?ti:!1,si=!Fn&&Ft;(xr||si&&ii&&Un==="combobox")&&(ii=!1);var ai=si?!1:ii,Jn=de.useCallback(function(zr){var Rr=zr!==void 0?zr:!ii;xr||(ki(Rr),ii!==Rr&&(Tr==null||Tr(Rr)))},[xr,ii,ki,Tr]),pr=de.useMemo(function(){return(Yr||[]).some(function(zr){return[`
|
|
`,`\r
|
|
`].includes(zr)})},[Yr]),vr=de.useContext(le)||{},gr=vr.maxCount,Kr=vr.rawValues,qr=function(Rr,mi,hi){if(!(Rt&&Yt(gr)&&(Kr==null?void 0:Kr.size)>=gr)){var bi=!0,Di=Rr;Fr==null||Fr(null);var so=z(Rr,Yr,Yt(gr)?gr-Kr.size:void 0),io=hi?null:so;return Un!=="combobox"&&io&&(Di="",ei==null||ei(io),Jn(!1),bi=!1),Ir&&Xn!==Di&&Ir(Di,{source:mi?"typing":"effect"}),bi}},Ki=function(Rr){!Rr||!Rr.trim()||Ir(Rr,{source:"submit"})};de.useEffect(function(){!ii&&!Rt&&Un!=="combobox"&&qr("",!1,!1)},[ii]),de.useEffect(function(){ti&&xr&&ki(!1),xr&&!hr.current&&Qn(!1)},[xr]);var di=ge(),ci=(0,be.Z)(di,2),Ar=ci[0],xi=ci[1],Vi=de.useRef(!1),ni=function(Rr){var mi=Ar(),hi=Rr.key,bi=hi==="Enter";if(bi&&(Un!=="combobox"&&Rr.preventDefault(),ii||Jn(!0)),xi(!!Xn),hi==="Backspace"&&!mi&&Rt&&!Xn&&kn.length){for(var Di=(0,je.Z)(kn),so=null,io=Di.length-1;io>=0;io-=1){var go=Di[io];if(!go.disabled){Di.splice(io,1),so=go;break}}so&&$t(Di,{type:"remove",values:[so]})}for(var pi=arguments.length,Ai=new Array(pi>1?pi-1:0),Qi=1;Qi<pi;Qi++)Ai[Qi-1]=arguments[Qi];if(ii&&(!bi||!Vi.current)){var uo;bi&&(Vi.current=!0),(uo=Pr.current)===null||uo===void 0||uo.onKeyDown.apply(uo,[Rr].concat(Ai))}zt==null||zt.apply(void 0,[Rr].concat(Ai))},lo=function(Rr){for(var mi=arguments.length,hi=new Array(mi>1?mi-1:0),bi=1;bi<mi;bi++)hi[bi-1]=arguments[bi];if(ii){var Di;(Di=Pr.current)===null||Di===void 0||Di.onKeyUp.apply(Di,[Rr].concat(hi))}Rr.key==="Enter"&&(Vi.current=!1),Tt==null||Tt.apply(void 0,[Rr].concat(hi))},Ui=function(Rr){var mi=kn.filter(function(hi){return hi!==Rr});$t(mi,{type:"remove",values:[Rr]})},Ji=function(){Vi.current=!1},vi=de.useRef(!1),ra=function(){Qn(!0),xr||(Et&&!vi.current&&Et.apply(void 0,arguments),rt.includes("focus")&&Jn(!0)),vi.current=!0},Jo=function(){hr.current=!0,Qn(!1,function(){vi.current=!1,hr.current=!1,Jn(!1)}),!xr&&(Xn&&(Un==="tags"?Ir(Xn,{source:"submit"}):Un==="multiple"&&Ir("",{source:"blur"})),Nt&&Nt.apply(void 0,arguments))},vo=[];de.useEffect(function(){return function(){vo.forEach(function(zr){return clearTimeout(zr)}),vo.splice(0,vo.length)}},[]);var mo=function(Rr){var mi,hi=Rr.target,bi=(mi=dr.current)===null||mi===void 0?void 0:mi.getPopupElement();if(bi&&bi.contains(hi)){var Di=setTimeout(function(){var pi=vo.indexOf(Di);if(pi!==-1&&vo.splice(pi,1),cr(),!In&&!bi.contains(document.activeElement)){var Ai;(Ai=sr.current)===null||Ai===void 0||Ai.focus()}});vo.push(Di)}for(var so=arguments.length,io=new Array(so>1?so-1:0),go=1;go<so;go++)io[go-1]=arguments[go];xn==null||xn.apply(void 0,[Rr].concat(io))},ro=de.useState({}),Eo=(0,be.Z)(ro,2),ia=Eo[1];function oa(){ia({})}var aa;Lr&&(aa=function(Rr){Jn(Rr)}),He(function(){var zr;return[er.current,(zr=dr.current)===null||zr===void 0?void 0:zr.getPopupElement()]},ai,Jn,!!Lr);var Zo=de.useMemo(function(){return(0,at.Z)((0,at.Z)({},_e),{},{notFoundContent:Fn,open:ii,triggerOpen:ai,id:Kt,showSearch:on,multiple:Rt,toggleOpen:Jn})},[_e,Fn,ai,ii,Kt,on,Rt,Jn]),Qo=!!Dr||Nr,_o;Qo&&(_o=de.createElement(Pe,{className:Ce()("".concat(qe,"-arrow"),(0,Ie.Z)({},"".concat(qe,"-arrow-loading"),Nr)),customizeIcon:Dr,customizeIconProps:{loading:Nr,searchValue:Xn,open:ii,focused:zn,showSearch:on}}));var ko=function(){var Rr;Vn==null||Vn(),(Rr=sr.current)===null||Rr===void 0||Rr.focus(),$t([],{type:"clear",values:kn}),qr("",!1,!1)},$o=vt(qe,ko,kn,On,Zr,xr,Xn,Un),la=$o.allowClear,Ho=$o.clearIcon,Do=de.createElement(Br,{ref:Pr}),To=Ce()(qe,Xt,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(qe,"-focused"),zn),"".concat(qe,"-multiple"),Rt),"".concat(qe,"-single"),!Rt),"".concat(qe,"-allow-clear"),On),"".concat(qe,"-show-arrow"),Qo),"".concat(qe,"-disabled"),xr),"".concat(qe,"-loading"),Nr),"".concat(qe,"-open"),ii),"".concat(qe,"-customize-input"),Cr),"".concat(qe,"-show-search"),on)),Hi=de.createElement(ut,{ref:dr,disabled:xr,prefixCls:qe,visible:ai,popupElement:Do,animation:Wr,transitionName:oi,dropdownStyle:Te,dropdownClassName:bt,direction:En,dropdownMatchSelectWidth:it,dropdownRender:ht,dropdownAlign:Pt,placement:Zt,builtinPlacements:fn,getPopupContainer:en,empty:Ft,getTriggerDOMNode:function(Rr){return ar.current||Rr},onPopupVisibleChange:aa,onPopupMouseEnter:oa},Lr?de.cloneElement(Lr,{ref:Qr}):de.createElement(st,(0,ae.Z)({},_e,{domRef:ar,prefixCls:qe,inputElement:Cr,ref:sr,id:Kt,prefix:or,showSearch:on,autoClearSearchValue:Vr,mode:Un,activeDescendantId:Ur,tagRender:pn,values:kn,open:ii,onToggleOpen:Jn,activeValue:jr,searchValue:Xn,onSearch:qr,onSearchSubmit:Ki,onRemove:Ui,tokenWithEnter:pr,onInputBlur:Ji}))),fi;return Lr?fi=Hi:fi=de.createElement("div",(0,ae.Z)({className:To},sn,{ref:er,onMouseDown:mo,onKeyDown:ni,onKeyUp:lo,onFocus:ra,onBlur:Jo}),de.createElement(ne,{visible:zn&&!ii,values:kn}),Hi,_o,la&&Ho),de.createElement(mt.Provider,{value:Zo},fi)}),Le=nt,Gt=function(){return null};Gt.isSelectOptGroup=!0;var Lt=Gt,_t=function(){return null};_t.isSelectOption=!0;var hn=_t,Nn=ue(80547),Wt=ue(2738),Ln=ue(48911);function nr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var $n=["disabled","title","children","style","className"];function It(_e){return typeof _e=="string"||typeof _e=="number"}var Mt=function(Ge,ln){var Kt=St(),qe=Kt.prefixCls,Xt=Kt.id,dn=Kt.open,pn=Kt.multiple,En=Kt.mode,mn=Kt.searchValue,kn=Kt.toggleOpen,$t=Kt.notFoundContent,Ft=Kt.onPopupScroll,Tn=de.useContext(le),Fn=Tn.maxCount,Vn=Tn.flattenOptions,Un=Tn.onActiveValue,xr=Tn.defaultActiveFirstOption,Nr=Tn.onSelect,Kn=Tn.menuItemSelectedIcon,wn=Tn.rawValues,Gn=Tn.fieldNames,An=Tn.virtual,Tr=Tn.direction,jr=Tn.listHeight,Fr=Tn.listItemHeight,Ur=Tn.optionRender,Jr="".concat(qe,"-item"),Vr=(0,Nn.Z)(function(){return Vn},[dn,Vn],function(Ut,rt){return rt[0]&&Ut[1]!==rt[1]}),Ir=de.useRef(null),ei=de.useMemo(function(){return pn&&Yt(Fn)&&(wn==null?void 0:wn.size)>=Fn},[pn,Fn,wn==null?void 0:wn.size]),Yr=function(rt){rt.preventDefault()},On=function(rt){var Et;(Et=Ir.current)===null||Et===void 0||Et.scrollTo(typeof rt=="number"?{index:rt}:rt)},or=de.useCallback(function(Ut){return En==="combobox"?!1:wn.has(Ut)},[En,(0,je.Z)(wn).toString(),wn.size]),Dr=function(rt){for(var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Nt=Vr.length,Tt=0;Tt<Nt;Tt+=1){var zt=(rt+Tt*Et+Nt)%Nt,xn=Vr[zt]||{},jt=xn.group,Rt=xn.data;if(!jt&&!(Rt!=null&&Rt.disabled)&&(or(Rt.value)||!ei))return zt}return-1},Zr=de.useState(function(){return Dr(0)}),Br=(0,be.Z)(Zr,2),Wr=Br[0],oi=Br[1],Te=function(rt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;oi(rt);var Nt={source:Et?"keyboard":"mouse"},Tt=Vr[rt];if(!Tt){Un(null,-1,Nt);return}Un(Tt.value,rt,Nt)};(0,de.useEffect)(function(){Te(xr!==!1?Dr(0):-1)},[Vr.length,mn]);var bt=de.useCallback(function(Ut){return En==="combobox"?String(Ut).toLowerCase()===mn.toLowerCase():wn.has(Ut)},[En,mn,(0,je.Z)(wn).toString(),wn.size]);(0,de.useEffect)(function(){var Ut=setTimeout(function(){if(!pn&&dn&&wn.size===1){var Et=Array.from(wn)[0],Nt=Vr.findIndex(function(Tt){var zt=Tt.data;return mn?String(zt.value).startsWith(mn):zt.value===Et});Nt!==-1&&(Te(Nt),On(Nt))}});if(dn){var rt;(rt=Ir.current)===null||rt===void 0||rt.scrollTo(void 0)}return function(){return clearTimeout(Ut)}},[dn,mn]);var it=function(rt){rt!==void 0&&Nr(rt,{selected:!wn.has(rt)}),pn||kn(!1)};if(de.useImperativeHandle(ln,function(){return{onKeyDown:function(rt){var Et=rt.which,Nt=rt.ctrlKey;switch(Et){case Ue.Z.N:case Ue.Z.P:case Ue.Z.UP:case Ue.Z.DOWN:{var Tt=0;if(Et===Ue.Z.UP?Tt=-1:Et===Ue.Z.DOWN?Tt=1:nr()&&Nt&&(Et===Ue.Z.N?Tt=1:Et===Ue.Z.P&&(Tt=-1)),Tt!==0){var zt=Dr(Wr+Tt,Tt);On(zt),Te(zt,!0)}break}case Ue.Z.TAB:case Ue.Z.ENTER:{var xn,jt=Vr[Wr];jt&&!(jt!=null&&(xn=jt.data)!==null&&xn!==void 0&&xn.disabled)&&!ei?it(jt.value):it(void 0),dn&&rt.preventDefault();break}case Ue.Z.ESC:kn(!1),dn&&rt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(rt){On(rt)}}}),Vr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Xt,"_list"),className:"".concat(Jr,"-empty"),onMouseDown:Yr},$t);var ht=Object.keys(Gn).map(function(Ut){return Gn[Ut]}),Pt=function(rt){return rt.label};function Zt(Ut,rt){var Et=Ut.group;return{role:Et?"presentation":"option",id:"".concat(Xt,"_list_").concat(rt)}}var fn=function(rt){var Et=Vr[rt];if(!Et)return null;var Nt=Et.data||{},Tt=Nt.value,zt=Et.group,xn=(0,me.Z)(Nt,!0),jt=Pt(Et);return Et?de.createElement("div",(0,ae.Z)({"aria-label":typeof jt=="string"&&!zt?jt:null},xn,{key:rt},Zt(Et,rt),{"aria-selected":bt(Tt)}),Tt):null},en={role:"listbox",id:"".concat(Xt,"_list")};return de.createElement(de.Fragment,null,An&&de.createElement("div",(0,ae.Z)({},en,{style:{height:0,width:0,overflow:"hidden"}}),fn(Wr-1),fn(Wr),fn(Wr+1)),de.createElement(Ln.Z,{itemKey:"key",ref:Ir,data:Vr,height:jr,itemHeight:Fr,fullHeight:!1,onMouseDown:Yr,onScroll:Ft,virtual:An,direction:Tr,innerProps:An?null:en},function(Ut,rt){var Et=Ut.group,Nt=Ut.groupOption,Tt=Ut.data,zt=Ut.label,xn=Ut.value,jt=Tt.key;if(Et){var Rt,on=(Rt=Tt.title)!==null&&Rt!==void 0?Rt:It(zt)?zt.toString():void 0;return de.createElement("div",{className:Ce()(Jr,"".concat(Jr,"-group"),Tt.className),title:on},zt!==void 0?zt:jt)}var sn=Tt.disabled,Dn=Tt.title,jn=Tt.children,In=Tt.style,lr=Tt.className,er=(0,he.Z)(Tt,$n),ar=(0,Wt.Z)(er,ht),dr=or(xn),sr=sn||!dr&&ei,Pr="".concat(Jr,"-option"),hr=Ce()(Jr,Pr,lr,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(Pr,"-grouped"),Nt),"".concat(Pr,"-active"),Wr===rt&&!sr),"".concat(Pr,"-disabled"),sr),"".concat(Pr,"-selected"),dr)),br=Pt(Ut),ir=!Kn||typeof Kn=="function"||dr,zn=typeof br=="number"?br:br||xn,Qn=It(zn)?zn.toString():void 0;return Dn!==void 0&&(Qn=Dn),de.createElement("div",(0,ae.Z)({},(0,me.Z)(ar),An?{}:Zt(Ut,rt),{"aria-selected":bt(xn),className:hr,title:Qn,onMouseMove:function(){Wr===rt||sr||Te(rt)},onClick:function(){sr||it(xn)},style:In}),de.createElement("div",{className:"".concat(Pr,"-content")},typeof Ur=="function"?Ur(Ut,{index:rt}):zn),de.isValidElement(Kn)||dr,ir&&de.createElement(Pe,{className:"".concat(Jr,"-option-state"),customizeIcon:Kn,customizeIconProps:{value:xn,disabled:sr,isSelected:dr}},dr?"\u2713":null))}))},At=de.forwardRef(Mt),Cn=At,Sn=function(_e,Ge){var ln=de.useRef({values:new Map,options:new Map}),Kt=de.useMemo(function(){var Xt=ln.current,dn=Xt.values,pn=Xt.options,En=_e.map(function($t){if($t.label===void 0){var Ft;return(0,at.Z)((0,at.Z)({},$t),{},{label:(Ft=dn.get($t.value))===null||Ft===void 0?void 0:Ft.label})}return $t}),mn=new Map,kn=new Map;return En.forEach(function($t){mn.set($t.value,$t),kn.set($t.value,Ge.get($t.value)||pn.get($t.value))}),ln.current.values=mn,ln.current.options=kn,En},[_e,Ge]),qe=de.useCallback(function(Xt){return Ge.get(Xt)||ln.current.options.get(Xt)},[Ge]);return[Kt,qe]};function Wn(_e,Ge){return Ot(_e).join("").toUpperCase().includes(Ge)}var rr=function(_e,Ge,ln,Kt,qe){return de.useMemo(function(){if(!ln||Kt===!1)return _e;var Xt=Ge.options,dn=Ge.label,pn=Ge.value,En=[],mn=typeof Kt=="function",kn=ln.toUpperCase(),$t=mn?Kt:function(Tn,Fn){return qe?Wn(Fn[qe],kn):Fn[Xt]?Wn(Fn[dn!=="children"?dn:"label"],kn):Wn(Fn[pn],kn)},Ft=mn?function(Tn){return ee(Tn)}:function(Tn){return Tn};return _e.forEach(function(Tn){if(Tn[Xt]){var Fn=$t(ln,Ft(Tn));if(Fn)En.push(Tn);else{var Vn=Tn[Xt].filter(function(Un){return $t(ln,Ft(Un))});Vn.length&&En.push((0,at.Z)((0,at.Z)({},Tn),{},(0,Ie.Z)({},Xt,Vn)))}return}$t(ln,Ft(Tn))&&En.push(Tn)}),En},[_e,Kt,qe,ln,Ge])},gn=ue(6551),Jt=ue(11592),Bn=["children","value"],Sr=["children"];function rn(_e){var Ge=_e,ln=Ge.key,Kt=Ge.props,qe=Kt.children,Xt=Kt.value,dn=(0,he.Z)(Kt,Bn);return(0,at.Z)({key:ln,value:Xt!==void 0?Xt:ln,children:qe},dn)}function Mn(_e){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Jt.Z)(_e).map(function(ln,Kt){if(!de.isValidElement(ln)||!ln.type)return null;var qe=ln,Xt=qe.type.isSelectOptGroup,dn=qe.key,pn=qe.props,En=pn.children,mn=(0,he.Z)(pn,Sr);return Ge||!Xt?rn(ln):(0,at.Z)((0,at.Z)({key:"__RC_SELECT_GRP__".concat(dn===null?Kt:dn,"__"),label:dn},mn),{},{options:Mn(En)})}).filter(function(ln){return ln})}var Rn=function(Ge,ln,Kt,qe,Xt){return de.useMemo(function(){var dn=Ge,pn=!Ge;pn&&(dn=Mn(ln));var En=new Map,mn=new Map,kn=function(Tn,Fn,Vn){Vn&&typeof Vn=="string"&&Tn.set(Fn[Vn],Fn)},$t=function Ft(Tn){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Vn=0;Vn<Tn.length;Vn+=1){var Un=Tn[Vn];!Un[Kt.options]||Fn?(En.set(Un[Kt.value],Un),kn(mn,Un,Kt.label),kn(mn,Un,qe),kn(mn,Un,Xt)):Ft(Un[Kt.options],!0)}};return $t(dn),{options:dn,valueOptions:En,labelOptions:mn}},[Ge,ln,Kt,qe,Xt])},Hn=Rn;function Er(_e){var Ge=de.useRef();Ge.current=_e;var ln=de.useCallback(function(){return Ge.current.apply(Ge,arguments)},[]);return ln}function mr(_e){var Ge=_e.mode,ln=_e.options,Kt=_e.children,qe=_e.backfill,Xt=_e.allowClear,dn=_e.placeholder,pn=_e.getInputElement,En=_e.showSearch,mn=_e.onSearch,kn=_e.defaultOpen,$t=_e.autoFocus,Ft=_e.labelInValue,Tn=_e.value,Fn=_e.inputValue,Vn=_e.optionLabelProp,Un=isMultiple(Ge),xr=En!==void 0?En:Un||Ge==="combobox",Nr=ln||convertChildrenToData(Kt);if(warning(Ge!=="tags"||Nr.every(function(An){return!An.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ge==="tags"||Ge==="combobox"){var Kn=Nr.some(function(An){return An.options?An.options.some(function(Tr){return typeof("value"in Tr?Tr.value:Tr.key)=="number"}):typeof("value"in An?An.value:An.key)=="number"});warning(!Kn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ge!=="combobox"||!Vn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ge==="combobox"||!qe,"`backfill` only works with `combobox` mode."),warning(Ge==="combobox"||!pn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ge!=="combobox"||!pn||!Xt||!dn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),mn&&!xr&&Ge!=="combobox"&&Ge!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!kn||$t,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Tn!=null){var wn=toArray(Tn);warning(!Ft||wn.every(function(An){return _typeof(An)==="object"&&("key"in An||"value"in An)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Un||Array.isArray(Tn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Kt){var Gn=null;toNodeArray(Kt).some(function(An){if(!React.isValidElement(An)||!An.type)return!1;var Tr=An,jr=Tr.type;if(jr.isSelectOption)return!1;if(jr.isSelectOptGroup){var Fr=toNodeArray(An.props.children).every(function(Ur){return!React.isValidElement(Ur)||!An.type||Ur.type.isSelectOption?!0:(Gn=Ur.type,!1)});return!Fr}return Gn=jr,!0}),Gn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Gn.displayName||Gn.name||Gn,"`.")),warning(Fn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Or(_e,Ge){if(_e){var ln=function Kt(qe){for(var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dn=0;dn<qe.length;dn++){var pn=qe[dn];if(pn[Ge==null?void 0:Ge.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Xt&&Array.isArray(pn[Ge==null?void 0:Ge.options])&&Kt(pn[Ge==null?void 0:Ge.options],!0))break}};ln(_e)}}var yr=null,ur=["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"],Mr=["inputValue"];function vn(_e){return!_e||(0,De.Z)(_e)!=="object"}var kt=de.forwardRef(function(_e,Ge){var ln=_e.id,Kt=_e.mode,qe=_e.prefixCls,Xt=qe===void 0?"rc-select":qe,dn=_e.backfill,pn=_e.fieldNames,En=_e.inputValue,mn=_e.searchValue,kn=_e.onSearch,$t=_e.autoClearSearchValue,Ft=$t===void 0?!0:$t,Tn=_e.onSelect,Fn=_e.onDeselect,Vn=_e.dropdownMatchSelectWidth,Un=Vn===void 0?!0:Vn,xr=_e.filterOption,Nr=_e.filterSort,Kn=_e.optionFilterProp,wn=_e.optionLabelProp,Gn=_e.options,An=_e.optionRender,Tr=_e.children,jr=_e.defaultActiveFirstOption,Fr=_e.menuItemSelectedIcon,Ur=_e.virtual,Jr=_e.direction,Vr=_e.listHeight,Ir=Vr===void 0?200:Vr,ei=_e.listItemHeight,Yr=ei===void 0?20:ei,On=_e.labelRender,or=_e.value,Dr=_e.defaultValue,Zr=_e.labelInValue,Br=_e.onChange,Wr=_e.maxCount,oi=(0,he.Z)(_e,ur),Te=(0,gn.ZP)(ln),bt=ft(Kt),it=!!(!Gn&&Tr),ht=de.useMemo(function(){return xr===void 0&&Kt==="combobox"?!1:xr},[xr,Kt]),Pt=de.useMemo(function(){return Vt(pn,it)},[JSON.stringify(pn),it]),Zt=(0,Qe.Z)("",{value:mn!==void 0?mn:En,postState:function(pr){return pr||""}}),fn=(0,be.Z)(Zt,2),en=fn[0],Ut=fn[1],rt=Hn(Gn,Tr,Pt,Kn,wn),Et=rt.valueOptions,Nt=rt.labelOptions,Tt=rt.options,zt=de.useCallback(function(Jn){var pr=Ot(Jn);return pr.map(function(vr){var gr,Kr,qr,Ki,di;if(vn(vr))gr=vr;else{var ci;qr=vr.key,Kr=vr.label,gr=(ci=vr.value)!==null&&ci!==void 0?ci:qr}var Ar=Et.get(gr);if(Ar){var xi;if(Kr===void 0&&(Kr=Ar==null?void 0:Ar[wn||Pt.label]),qr===void 0&&(qr=(xi=Ar==null?void 0:Ar.key)!==null&&xi!==void 0?xi:gr),Ki=Ar==null?void 0:Ar.disabled,di=Ar==null?void 0:Ar.title,0)var Vi}return{label:Kr,value:gr,key:qr,disabled:Ki,title:di}})},[Pt,wn,Et]),xn=(0,Qe.Z)(Dr,{value:or}),jt=(0,be.Z)(xn,2),Rt=jt[0],on=jt[1],sn=de.useMemo(function(){var Jn,pr=bt&&Rt===null?[]:Rt,vr=zt(pr);return Kt==="combobox"&&fe((Jn=vr[0])===null||Jn===void 0?void 0:Jn.value)?[]:vr},[Rt,zt,Kt,bt]),Dn=Sn(sn,Et),jn=(0,be.Z)(Dn,2),In=jn[0],lr=jn[1],er=de.useMemo(function(){if(!Kt&&In.length===1){var Jn=In[0];if(Jn.value===null&&(Jn.label===null||Jn.label===void 0))return[]}return In.map(function(pr){var vr;return(0,at.Z)((0,at.Z)({},pr),{},{label:(vr=typeof On=="function"?On(pr):pr.label)!==null&&vr!==void 0?vr:pr.value})})},[Kt,In,On]),ar=de.useMemo(function(){return new Set(In.map(function(Jn){return Jn.value}))},[In]);de.useEffect(function(){if(Kt==="combobox"){var Jn,pr=(Jn=In[0])===null||Jn===void 0?void 0:Jn.value;Ut(ye(pr)?String(pr):"")}},[In]);var dr=Er(function(Jn,pr){var vr=pr!=null?pr:Jn;return(0,Ie.Z)((0,Ie.Z)({},Pt.value,Jn),Pt.label,vr)}),sr=de.useMemo(function(){if(Kt!=="tags")return Tt;var Jn=(0,je.Z)(Tt),pr=function(gr){return Et.has(gr)};return(0,je.Z)(In).sort(function(vr,gr){return vr.value<gr.value?-1:1}).forEach(function(vr){var gr=vr.value;pr(gr)||Jn.push(dr(gr,vr.label))}),Jn},[dr,Tt,Et,In,Kt]),Pr=rr(sr,Pt,en,ht,Kn),hr=de.useMemo(function(){return Kt!=="tags"||!en||Pr.some(function(Jn){return Jn[Kn||"value"]===en})||Pr.some(function(Jn){return Jn[Pt.value]===en})?Pr:[dr(en)].concat((0,je.Z)(Pr))},[dr,Kn,Kt,Pr,en,Pt]),br=function Jn(pr){var vr=(0,je.Z)(pr).sort(function(gr,Kr){return Nr(gr,Kr,{searchValue:en})});return vr.map(function(gr){return Array.isArray(gr.options)?(0,at.Z)((0,at.Z)({},gr),{},{options:gr.options.length>0?Jn(gr.options):gr.options}):gr})},ir=de.useMemo(function(){return Nr?br(hr):hr},[hr,Nr,en]),zn=de.useMemo(function(){return oe(ir,{fieldNames:Pt,childrenAsData:it})},[ir,Pt,it]),Qn=function(pr){var vr=zt(pr);if(on(vr),Br&&(vr.length!==In.length||vr.some(function(qr,Ki){var di;return((di=In[Ki])===null||di===void 0?void 0:di.value)!==(qr==null?void 0:qr.value)}))){var gr=Zr?vr:vr.map(function(qr){return qr.value}),Kr=vr.map(function(qr){return ee(lr(qr.value))});Br(bt?gr:gr[0],bt?Kr:Kr[0])}},cr=de.useState(null),Xn=(0,be.Z)(cr,2),Cr=Xn[0],Lr=Xn[1],Qr=de.useState(0),Li=(0,be.Z)(Qr,2),wi=Li[0],yi=Li[1],Ni=jr!==void 0?jr:Kt!=="combobox",$r=de.useCallback(function(Jn,pr){var vr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},gr=vr.source,Kr=gr===void 0?"keyboard":gr;yi(pr),dn&&Kt==="combobox"&&Jn!==null&&Kr==="keyboard"&&Lr(String(Jn))},[dn,Kt]),Xr=function(pr,vr,gr){var Kr=function(){var Ui,Ji=lr(pr);return[Zr?{label:Ji==null?void 0:Ji[Pt.label],value:pr,key:(Ui=Ji==null?void 0:Ji.key)!==null&&Ui!==void 0?Ui:pr}:pr,ee(Ji)]};if(vr&&Tn){var qr=Kr(),Ki=(0,be.Z)(qr,2),di=Ki[0],ci=Ki[1];Tn(di,ci)}else if(!vr&&Fn&&gr!=="clear"){var Ar=Kr(),xi=(0,be.Z)(Ar,2),Vi=xi[0],ni=xi[1];Fn(Vi,ni)}},ti=Er(function(Jn,pr){var vr,gr=bt?pr.selected:!0;gr?vr=bt?[].concat((0,je.Z)(In),[Jn]):[Jn]:vr=In.filter(function(Kr){return Kr.value!==Jn}),Qn(vr),Xr(Jn,gr),Kt==="combobox"?Lr(""):(!ft||Ft)&&(Ut(""),Lr(""))}),ki=function(pr,vr){Qn(pr);var gr=vr.type,Kr=vr.values;(gr==="remove"||gr==="clear")&&Kr.forEach(function(qr){Xr(qr.value,!1,gr)})},ii=function(pr,vr){if(Ut(pr),Lr(null),vr.source==="submit"){var gr=(pr||"").trim();if(gr){var Kr=Array.from(new Set([].concat((0,je.Z)(ar),[gr])));Qn(Kr),Xr(gr,!0),Ut("")}return}vr.source!=="blur"&&(Kt==="combobox"&&Qn(pr),kn==null||kn(pr))},si=function(pr){var vr=pr;Kt!=="tags"&&(vr=pr.map(function(Kr){var qr=Nt.get(Kr);return qr==null?void 0:qr.value}).filter(function(Kr){return Kr!==void 0}));var gr=Array.from(new Set([].concat((0,je.Z)(ar),(0,je.Z)(vr))));Qn(gr),gr.forEach(function(Kr){Xr(Kr,!0)})},ai=de.useMemo(function(){var Jn=Ur!==!1&&Un!==!1;return(0,at.Z)((0,at.Z)({},rt),{},{flattenOptions:zn,onActiveValue:$r,defaultActiveFirstOption:Ni,onSelect:ti,menuItemSelectedIcon:Fr,rawValues:ar,fieldNames:Pt,virtual:Jn,direction:Jr,listHeight:Ir,listItemHeight:Yr,childrenAsData:it,maxCount:Wr,optionRender:An})},[Wr,rt,zn,$r,Ni,ti,Fr,ar,Pt,Ur,Un,Jr,Ir,Yr,it,An]);return de.createElement(le.Provider,{value:ai},de.createElement(Le,(0,ae.Z)({},oi,{id:Te,prefixCls:Xt,ref:Ge,omitDomProps:Mr,mode:Kt,displayValues:er,onDisplayValuesChange:ki,direction:Jr,searchValue:en,onSearch:ii,autoClearSearchValue:Ft,onSearchSplit:si,dropdownMatchSelectWidth:Un,OptionList:Cn,emptyOptions:!zn.length,activeValue:Cr,activeDescendantId:"".concat(Te,"_list_").concat(wi)})))}),un=kt;un.Option=hn,un.OptGroup=Lt;var qn=un,kr=qn},63158:function(cn,an,ue){"use strict";var ae=ue(54476),je=ue(20068),Ie=ue(42978),at=ue(75931),be=ue(59301),he=ue(92310),De=ue.n(he),Qe=ue(18929),we=ue(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ne=be.forwardRef(function(Ce,yt){var Je,Ye=Ce.prefixCls,Re=Ye===void 0?"rc-switch":Ye,Pe=Ce.className,vt=Ce.checked,mt=Ce.defaultChecked,St=Ce.disabled,Fe=Ce.loadingIcon,ge=Ce.checkedChildren,He=Ce.unCheckedChildren,Ue=Ce.onClick,Dt=Ce.onChange,me=Ce.onKeyDown,Ee=(0,at.Z)(Ce,de),Ke=(0,Qe.Z)(!1,{value:vt,defaultValue:mt}),Se=(0,Ie.Z)(Ke,2),$e=Se[0],Ze=Se[1];function lt(Ht,ye){var fe=$e;return St||(fe=Ht,Ze(fe),Dt==null||Dt(fe,ye)),fe}function nn(Ht){Ht.which===we.Z.LEFT?lt(!1,Ht):Ht.which===we.Z.RIGHT&<(!0,Ht),me==null||me(Ht)}function Ot(Ht){var ye=lt(!$e,Ht);Ue==null||Ue(ye,Ht)}var Qt=De()(Re,Pe,(Je={},(0,je.Z)(Je,"".concat(Re,"-checked"),$e),(0,je.Z)(Je,"".concat(Re,"-disabled"),St),Je));return be.createElement("button",(0,ae.Z)({},Ee,{type:"button",role:"switch","aria-checked":$e,disabled:St,className:Qt,ref:yt,onKeyDown:nn,onClick:Ot}),Fe,be.createElement("span",{className:"".concat(Re,"-inner")},be.createElement("span",{className:"".concat(Re,"-inner-checked")},ge),be.createElement("span",{className:"".concat(Re,"-inner-unchecked")},He)))});Ne.displayName="Switch",an.Z=Ne},86351:function(cn,an,ue){"use strict";ue.d(an,{R:function(){return je},w:function(){return ae}});var ae={},je="rc-table-internal-hook"},97347:function(cn,an,ue){"use strict";ue.d(an,{L:function(){return Re},Z:function(){return Fe}});var ae=ue(42978),je=ue(20068),Ie=ue(94480),at=ue(76190),be=ue(33885),he=ue(75931),De=ue(11592),Qe=ue(48736),we=ue(59301),de=ue(86351),Ne=ue(54451);function Ce(ge){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof He=="number"?He:He.endsWith("%")?ge*parseFloat(He)/100:null}function yt(ge,He,Ue){return we.useMemo(function(){if(He&&He>0){var Dt=0,me=0;ge.forEach(function(Ot){var Qt=Ce(He,Ot.width);Qt?Dt+=Qt:me+=1});var Ee=Math.max(He,Ue),Ke=Math.max(Ee-Dt,me),Se=me,$e=Ke/me,Ze=0,lt=ge.map(function(Ot){var Qt=(0,be.Z)({},Ot),Ht=Ce(He,Qt.width);if(Ht)Qt.width=Ht;else{var ye=Math.floor($e);Qt.width=Se===1?Ke:ye,Ke-=ye,Se-=1}return Ze+=Qt.width,Qt});if(Ze<Ee){var nn=Ee/Ze;Ke=Ee,lt.forEach(function(Ot,Qt){var Ht=Math.floor(Ot.width*nn);Ot.width=Qt===lt.length-1?Ke:Ht,Ke-=Ht})}return[lt,Math.max(Ze,Ee)]}return[ge,He]},[ge,He,Ue])}var Je=["children"],Ye=["fixed"];function Re(ge){return(0,De.Z)(ge).filter(function(He){return we.isValidElement(He)}).map(function(He){var Ue=He.key,Dt=He.props,me=Dt.children,Ee=(0,he.Z)(Dt,Je),Ke=(0,be.Z)({key:Ue},Ee);return me&&(Ke.children=Re(me)),Ke})}function Pe(ge){return ge.filter(function(He){return He&&(0,at.Z)(He)==="object"&&!He.hidden}).map(function(He){var Ue=He.children;return Ue&&Ue.length>0?(0,be.Z)((0,be.Z)({},He),{},{children:Pe(Ue)}):He})}function vt(ge){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ge.filter(function(Ue){return Ue&&(0,at.Z)(Ue)==="object"}).reduce(function(Ue,Dt,me){var Ee=Dt.fixed,Ke=Ee===!0?"left":Ee,Se="".concat(He,"-").concat(me),$e=Dt.children;return $e&&$e.length>0?[].concat((0,Ie.Z)(Ue),(0,Ie.Z)(vt($e,Se).map(function(Ze){return(0,be.Z)({fixed:Ke},Ze)}))):[].concat((0,Ie.Z)(Ue),[(0,be.Z)((0,be.Z)({key:Se},Dt),{},{fixed:Ke})])},[])}function mt(ge){return ge.map(function(He){var Ue=He.fixed,Dt=(0,he.Z)(He,Ye),me=Ue;return Ue==="left"?me="right":Ue==="right"&&(me="left"),(0,be.Z)({fixed:me},Dt)})}function St(ge,He){var Ue=ge.prefixCls,Dt=ge.columns,me=ge.children,Ee=ge.expandable,Ke=ge.expandedKeys,Se=ge.columnTitle,$e=ge.getRowKey,Ze=ge.onTriggerExpand,lt=ge.expandIcon,nn=ge.rowExpandable,Ot=ge.expandIconColumnIndex,Qt=ge.direction,Ht=ge.expandRowByClick,ye=ge.columnWidth,fe=ge.fixed,wt=ge.scrollWidth,qt=ge.clientWidth,Bt=we.useMemo(function(){var st=Dt||Re(me)||[];return Pe(st.slice())},[Dt,me]),We=we.useMemo(function(){if(Ee){var st=Bt.slice();if(!st.includes(de.w)){var Be=Ot||0;Be>=0&&(Be||fe==="left"||!fe)&&st.splice(Be,0,de.w),fe==="right"&&st.splice(Bt.length,0,de.w)}var tt=st.indexOf(de.w);st=st.filter(function(ut,ve){return ut!==de.w||ve===tt});var et=Bt[tt],Oe;fe?Oe=fe:Oe=et?et.fixed:null;var dt=(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},Ne.v,{className:"".concat(Ue,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Se),"fixed",Oe),"className","".concat(Ue,"-row-expand-icon-cell")),"width",ye),"render",function(ve,ct,Yt){var Vt=$e(ct,Yt),oe=Ke.has(Vt),ee=nn?nn(ct):!0,z=lt({prefixCls:Ue,expanded:oe,expandable:ee,record:ct,onExpand:Ze});return Ht?we.createElement("span",{onClick:function(le){return le.stopPropagation()}},z):z});return st.map(function(ut){return ut===de.w?dt:ut})}return Bt.filter(function(ut){return ut!==de.w})},[Ee,Bt,$e,Ke,lt,Qt]),gt=we.useMemo(function(){var st=We;return He&&(st=He(st)),st.length||(st=[{render:function(){return null}}]),st},[He,We,Qt]),xt=we.useMemo(function(){return Qt==="rtl"?mt(vt(gt)):vt(gt)},[gt,Qt,wt]),bn=we.useMemo(function(){for(var st=-1,Be=xt.length-1;Be>=0;Be-=1){var tt=xt[Be].fixed;if(tt==="left"||tt===!0){st=Be;break}}if(st>=0)for(var et=0;et<=st;et+=1){var Oe=xt[et].fixed;if(Oe!=="left"&&Oe!==!0)return!0}var dt=xt.findIndex(function(ct){var Yt=ct.fixed;return Yt==="right"});if(dt>=0)for(var ut=dt;ut<xt.length;ut+=1){var ve=xt[ut].fixed;if(ve!=="right")return!0}return!1},[xt]),Xe=yt(xt,wt,qt),Me=(0,ae.Z)(Xe,2),ke=Me[0],Ve=Me[1];return[gt,ke,Ve,bn]}var Fe=St},4030:function(cn,an,ue){"use strict";ue.d(an,{w2:function(){return ae.w},vP:function(){return It.v},RQ:function(){return ae.R},ER:function(){return Vt},Q$:function(){return xr},TN:function(){return Br}});var ae=ue(86351),je=ue(42978),Ie=ue(6089),at=ue(34280),be=ue(13697),he=ue(59301),De=ue(4676);function Qe(Te){var bt=he.createContext(void 0),it=function(Pt){var Zt=Pt.value,fn=Pt.children,en=he.useRef(Zt);en.current=Zt;var Ut=he.useState(function(){return{getValue:function(){return en.current},listeners:new Set}}),rt=(0,je.Z)(Ut,1),Et=rt[0];return(0,at.Z)(function(){(0,De.unstable_batchedUpdates)(function(){Et.listeners.forEach(function(Nt){Nt(Zt)})})},[Zt]),he.createElement(bt.Provider,{value:Et},fn)};return{Context:bt,Provider:it,defaultValue:Te}}function we(Te,bt){var it=(0,Ie.Z)(typeof bt=="function"?bt:function(Nt){if(bt===void 0)return Nt;if(!Array.isArray(bt))return Nt[bt];var Tt={};return bt.forEach(function(zt){Tt[zt]=Nt[zt]}),Tt}),ht=he.useContext(Te==null?void 0:Te.Context),Pt=ht||{},Zt=Pt.listeners,fn=Pt.getValue,en=he.useRef();en.current=it(ht?fn():Te==null?void 0:Te.defaultValue);var Ut=he.useState({}),rt=(0,je.Z)(Ut,2),Et=rt[1];return(0,at.Z)(function(){if(!ht)return;function Nt(Tt){var zt=it(Tt);(0,be.Z)(en.current,zt,!0)||Et({})}return Zt.add(Nt),function(){Zt.delete(Nt)}},[ht]),en.current}var de=ue(54476),Ne=ue(8654);function Ce(){var Te=he.createContext(null);function bt(){return he.useContext(Te)}function it(Pt,Zt){var fn=(0,Ne.Yr)(Pt),en=function(rt,Et){var Nt=fn?{ref:Et}:{},Tt=he.useRef(0),zt=he.useRef(rt),xn=bt();return xn!==null?he.createElement(Pt,(0,de.Z)({},rt,Nt)):((!Zt||Zt(zt.current,rt))&&(Tt.current+=1),zt.current=rt,he.createElement(Te.Provider,{value:Tt.current},he.createElement(Pt,(0,de.Z)({},rt,Nt))))};return fn?he.forwardRef(en):en}function ht(Pt,Zt){var fn=(0,Ne.Yr)(Pt),en=function(rt,Et){var Nt=fn?{ref:Et}:{};return bt(),he.createElement(Pt,(0,de.Z)({},rt,Nt))};return fn?he.memo(he.forwardRef(en),Zt):he.memo(en,Zt)}return{makeImmutable:it,responseImmutable:ht,useImmutableMark:bt}}var yt=Ce(),Je=yt.makeImmutable,Ye=yt.responseImmutable,Re=yt.useImmutableMark,Pe=Ce(),vt=Pe.makeImmutable,mt=Pe.responseImmutable,St=Pe.useImmutableMark,Fe=Qe(),ge=Fe;function He(Te,bt){var it=React.useRef(0);it.current+=1;var ht=React.useRef(Te),Pt=[];Object.keys(Te||{}).map(function(fn){var en;(Te==null?void 0:Te[fn])!==((en=ht.current)===null||en===void 0?void 0:en[fn])&&Pt.push(fn)}),ht.current=Te;var Zt=React.useRef([]);return Pt.length&&(Zt.current=Pt),React.useDebugValue(it.current),React.useDebugValue(Zt.current.join(", ")),bt&&console.log("".concat(bt,":"),it.current,Zt.current),it.current}var Ue=null,Dt=null,me=ue(76190),Ee=ue(33885),Ke=ue(20068),Se=ue(92310),$e=ue.n(Se),Ze=ue(80547),lt=ue(97938),nn=ue(48736),Ot=he.createContext({renderWithProps:!1}),Qt=Ot,Ht="RC_TABLE_KEY";function ye(Te){return Te==null?[]:Array.isArray(Te)?Te:[Te]}function fe(Te){var bt=[],it={};return Te.forEach(function(ht){for(var Pt=ht||{},Zt=Pt.key,fn=Pt.dataIndex,en=Zt||ye(fn).join("-")||Ht;it[en];)en="".concat(en,"_next");it[en]=!0,bt.push(en)}),bt}function wt(Te){return Te!=null}function qt(Te){return typeof Te=="number"&&!Number.isNaN(Te)}function Bt(Te){return Te&&(0,me.Z)(Te)==="object"&&!Array.isArray(Te)&&!he.isValidElement(Te)}function We(Te,bt,it,ht,Pt,Zt){var fn=he.useContext(Qt),en=St(),Ut=(0,Ze.Z)(function(){if(wt(ht))return[ht];var rt=bt==null||bt===""?[]:Array.isArray(bt)?bt:[bt],Et=(0,lt.Z)(Te,rt),Nt=Et,Tt=void 0;if(Pt){var zt=Pt(Et,Te,it);Bt(zt)?(Nt=zt.children,Tt=zt.props,fn.renderWithProps=!0):Nt=zt}return[Nt,Tt]},[en,Te,ht,bt,Pt,it],function(rt,Et){if(Zt){var Nt=(0,je.Z)(rt,2),Tt=Nt[1],zt=(0,je.Z)(Et,2),xn=zt[1];return Zt(xn,Tt)}return fn.renderWithProps?!0:!(0,be.Z)(rt,Et,!0)});return Ut}function gt(Te,bt,it,ht){var Pt=Te+bt-1;return Te<=ht&&Pt>=it}function xt(Te,bt){return we(ge,function(it){var ht=gt(Te,bt||1,it.hoverStartRow,it.hoverEndRow);return[ht,it.onHover]})}var bn=ue(70425),Xe=function(bt){var it=bt.ellipsis,ht=bt.rowType,Pt=bt.children,Zt,fn=it===!0?{showTitle:!0}:it;return fn&&(fn.showTitle||ht==="header")&&(typeof Pt=="string"||typeof Pt=="number"?Zt=Pt.toString():he.isValidElement(Pt)&&typeof Pt.props.children=="string"&&(Zt=Pt.props.children)),Zt};function Me(Te){var bt,it,ht,Pt,Zt,fn,en,Ut,rt=Te.component,Et=Te.children,Nt=Te.ellipsis,Tt=Te.scope,zt=Te.prefixCls,xn=Te.className,jt=Te.align,Rt=Te.record,on=Te.render,sn=Te.dataIndex,Dn=Te.renderIndex,jn=Te.shouldCellUpdate,In=Te.index,lr=Te.rowType,er=Te.colSpan,ar=Te.rowSpan,dr=Te.fixLeft,sr=Te.fixRight,Pr=Te.firstFixLeft,hr=Te.lastFixLeft,br=Te.firstFixRight,ir=Te.lastFixRight,zn=Te.appendNode,Qn=Te.additionalProps,cr=Qn===void 0?{}:Qn,Xn=Te.isSticky,Cr="".concat(zt,"-cell"),Lr=we(ge,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Qr=Lr.supportSticky,Li=Lr.allColumnsFixedLeft,wi=Lr.rowHoverable,yi=We(Rt,sn,Dn,Et,on,jn),Ni=(0,je.Z)(yi,2),$r=Ni[0],Xr=Ni[1],ti={},ki=typeof dr=="number"&&Qr,ii=typeof sr=="number"&&Qr;ki&&(ti.position="sticky",ti.left=dr),ii&&(ti.position="sticky",ti.right=sr);var si=(bt=(it=(ht=Xr==null?void 0:Xr.colSpan)!==null&&ht!==void 0?ht:cr.colSpan)!==null&&it!==void 0?it:er)!==null&&bt!==void 0?bt:1,ai=(Pt=(Zt=(fn=Xr==null?void 0:Xr.rowSpan)!==null&&fn!==void 0?fn:cr.rowSpan)!==null&&Zt!==void 0?Zt:ar)!==null&&Pt!==void 0?Pt:1,Jn=xt(In,ai),pr=(0,je.Z)(Jn,2),vr=pr[0],gr=pr[1],Kr=(0,bn.zX)(function(Vi){var ni;Rt&&gr(In,In+ai-1),cr==null||(ni=cr.onMouseEnter)===null||ni===void 0||ni.call(cr,Vi)}),qr=(0,bn.zX)(function(Vi){var ni;Rt&&gr(-1,-1),cr==null||(ni=cr.onMouseLeave)===null||ni===void 0||ni.call(cr,Vi)});if(si===0||ai===0)return null;var Ki=(en=cr.title)!==null&&en!==void 0?en:Xe({rowType:lr,ellipsis:Nt,children:$r}),di=$e()(Cr,xn,(Ut={},(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)(Ut,"".concat(Cr,"-fix-left"),ki&&Qr),"".concat(Cr,"-fix-left-first"),Pr&&Qr),"".concat(Cr,"-fix-left-last"),hr&&Qr),"".concat(Cr,"-fix-left-all"),hr&&Li&&Qr),"".concat(Cr,"-fix-right"),ii&&Qr),"".concat(Cr,"-fix-right-first"),br&&Qr),"".concat(Cr,"-fix-right-last"),ir&&Qr),"".concat(Cr,"-ellipsis"),Nt),"".concat(Cr,"-with-append"),zn),"".concat(Cr,"-fix-sticky"),(ki||ii)&&Xn&&Qr),(0,Ke.Z)(Ut,"".concat(Cr,"-row-hover"),!Xr&&vr)),cr.className,Xr==null?void 0:Xr.className),ci={};jt&&(ci.textAlign=jt);var Ar=(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},Xr==null?void 0:Xr.style),ti),ci),cr.style),xi=$r;return(0,me.Z)(xi)==="object"&&!Array.isArray(xi)&&!he.isValidElement(xi)&&(xi=null),Nt&&(hr||br)&&(xi=he.createElement("span",{className:"".concat(Cr,"-content")},xi)),he.createElement(rt,(0,de.Z)({},Xr,cr,{className:di,style:Ar,title:Ki,scope:Tt,onMouseEnter:wi?Kr:void 0,onMouseLeave:wi?qr:void 0,colSpan:si!==1?si:null,rowSpan:ai!==1?ai:null}),zn,xi)}var ke=he.memo(Me);function Ve(Te,bt,it,ht,Pt){var Zt=it[Te]||{},fn=it[bt]||{},en,Ut;Zt.fixed==="left"?en=ht.left[Pt==="rtl"?bt:Te]:fn.fixed==="right"&&(Ut=ht.right[Pt==="rtl"?Te:bt]);var rt=!1,Et=!1,Nt=!1,Tt=!1,zt=it[bt+1],xn=it[Te-1],jt=zt&&!zt.fixed||xn&&!xn.fixed||it.every(function(jn){return jn.fixed==="left"});if(Pt==="rtl"){if(en!==void 0){var Rt=xn&&xn.fixed==="left";Tt=!Rt&&jt}else if(Ut!==void 0){var on=zt&&zt.fixed==="right";Nt=!on&&jt}}else if(en!==void 0){var sn=zt&&zt.fixed==="left";rt=!sn&&jt}else if(Ut!==void 0){var Dn=xn&&xn.fixed==="right";Et=!Dn&&jt}return{fixLeft:en,fixRight:Ut,lastFixLeft:rt,firstFixRight:Et,lastFixRight:Nt,firstFixLeft:Tt,isSticky:ht.isSticky}}var st=he.createContext({}),Be=st;function tt(Te){var bt=Te.className,it=Te.index,ht=Te.children,Pt=Te.colSpan,Zt=Pt===void 0?1:Pt,fn=Te.rowSpan,en=Te.align,Ut=we(ge,["prefixCls","direction"]),rt=Ut.prefixCls,Et=Ut.direction,Nt=he.useContext(Be),Tt=Nt.scrollColumnIndex,zt=Nt.stickyOffsets,xn=Nt.flattenColumns,jt=it+Zt-1,Rt=jt+1===Tt?Zt+1:Zt,on=Ve(it,it+Rt-1,xn,zt,Et);return he.createElement(ke,(0,de.Z)({className:bt,index:it,component:"td",prefixCls:rt,record:null,dataIndex:null,align:en,colSpan:Rt,rowSpan:fn,render:function(){return ht}},on))}var et=ue(75931),Oe=["children"];function dt(Te){var bt=Te.children,it=(0,et.Z)(Te,Oe);return he.createElement("tr",it,bt)}function ut(Te){var bt=Te.children;return bt}ut.Row=dt,ut.Cell=tt;var ve=ut;function ct(Te){var bt=Te.children,it=Te.stickyOffsets,ht=Te.flattenColumns,Pt=we(ge,"prefixCls"),Zt=ht.length-1,fn=ht[Zt],en=he.useMemo(function(){return{stickyOffsets:it,flattenColumns:ht,scrollColumnIndex:fn!=null&&fn.scrollbar?Zt:null}},[fn,ht,Zt,it]);return he.createElement(Be.Provider,{value:en},he.createElement("tfoot",{className:"".concat(Pt,"-summary")},bt))}var Yt=mt(ct),Vt=ve,oe=ue(29301),ee=ue(24514),z=ue(75152),re=ue(26112);function le(Te,bt,it,ht,Pt,Zt,fn){Te.push({record:bt,indent:it,index:fn});var en=Zt(bt),Ut=Pt==null?void 0:Pt.has(en);if(bt&&Array.isArray(bt[ht])&&Ut)for(var rt=0;rt<bt[ht].length;rt+=1)le(Te,bt[ht][rt],it+1,ht,Pt,Zt,rt)}function ne(Te,bt,it,ht){var Pt=he.useMemo(function(){if(it!=null&&it.size){for(var Zt=[],fn=0;fn<(Te==null?void 0:Te.length);fn+=1){var en=Te[fn];le(Zt,en,0,bt,it,ht,fn)}return Zt}return Te==null?void 0:Te.map(function(Ut,rt){return{record:Ut,indent:0,index:rt}})},[Te,bt,it,ht]);return Pt}function xe(Te,bt,it,ht){var Pt=we(ge,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Zt=Pt.flattenColumns,fn=Pt.expandableType,en=Pt.expandedKeys,Ut=Pt.childrenColumnName,rt=Pt.onTriggerExpand,Et=Pt.rowExpandable,Nt=Pt.onRow,Tt=Pt.expandRowByClick,zt=Pt.rowClassName,xn=fn==="nest",jt=fn==="row"&&(!Et||Et(Te)),Rt=jt||xn,on=en&&en.has(bt),sn=Ut&&Te&&Te[Ut],Dn=(0,bn.zX)(rt),jn=Nt==null?void 0:Nt(Te,it),In=jn==null?void 0:jn.onClick,lr=function(sr){Tt&&Rt&&rt(Te,sr);for(var Pr=arguments.length,hr=new Array(Pr>1?Pr-1:0),br=1;br<Pr;br++)hr[br-1]=arguments[br];In==null||In.apply(void 0,[sr].concat(hr))},er;typeof zt=="string"?er=zt:typeof zt=="function"&&(er=zt(Te,it,ht));var ar=fe(Zt);return(0,Ee.Z)((0,Ee.Z)({},Pt),{},{columnsKey:ar,nestExpandable:xn,expanded:on,hasNestChildren:sn,record:Te,onTriggerExpand:Dn,rowSupportExpand:jt,expandable:Rt,rowProps:(0,Ee.Z)((0,Ee.Z)({},jn),{},{className:$e()(er,jn==null?void 0:jn.className),onClick:lr})})}function ot(Te){var bt=Te.prefixCls,it=Te.children,ht=Te.component,Pt=Te.cellComponent,Zt=Te.className,fn=Te.expanded,en=Te.colSpan,Ut=Te.isEmpty,rt=we(ge,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Et=rt.scrollbarSize,Nt=rt.fixHeader,Tt=rt.fixColumn,zt=rt.componentWidth,xn=rt.horizonScroll,jt=it;return(Ut?xn&&zt:Tt)&&(jt=he.createElement("div",{style:{width:zt-(Nt&&!Ut?Et:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(bt,"-expanded-row-fixed")},jt)),he.createElement(ht,{className:Zt,style:{display:fn?null:"none"}},he.createElement(ke,{component:Pt,prefixCls:bt,colSpan:en},jt))}var ft=ot;function nt(Te){var bt=Te.prefixCls,it=Te.record,ht=Te.onExpand,Pt=Te.expanded,Zt=Te.expandable,fn="".concat(bt,"-row-expand-icon");if(!Zt)return he.createElement("span",{className:$e()(fn,"".concat(bt,"-row-spaced"))});var en=function(rt){ht(it,rt),rt.stopPropagation()};return he.createElement("span",{className:$e()(fn,(0,Ke.Z)((0,Ke.Z)({},"".concat(bt,"-row-expanded"),Pt),"".concat(bt,"-row-collapsed"),!Pt)),onClick:en})}function Le(Te,bt,it){var ht=[];function Pt(Zt){(Zt||[]).forEach(function(fn,en){ht.push(bt(fn,en)),Pt(fn[it])})}return Pt(Te),ht}function Gt(Te,bt,it,ht){return typeof Te=="string"?Te:typeof Te=="function"?Te(bt,it,ht):""}function Lt(Te,bt,it,ht,Pt){var Zt=Te.record,fn=Te.prefixCls,en=Te.columnsKey,Ut=Te.fixedInfoList,rt=Te.expandIconColumnIndex,Et=Te.nestExpandable,Nt=Te.indentSize,Tt=Te.expandIcon,zt=Te.expanded,xn=Te.hasNestChildren,jt=Te.onTriggerExpand,Rt=en[it],on=Ut[it],sn;it===(rt||0)&&Et&&(sn=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(Nt*ht,"px")},className:"".concat(fn,"-row-indent indent-level-").concat(ht)}),Tt({prefixCls:fn,expanded:zt,expandable:xn,record:Zt,onExpand:jt})));var Dn;return bt.onCell&&(Dn=bt.onCell(Zt,Pt)),{key:Rt,fixedInfo:on,appendCellNode:sn,additionalCellProps:Dn||{}}}function _t(Te){var bt=Te.className,it=Te.style,ht=Te.record,Pt=Te.index,Zt=Te.renderIndex,fn=Te.rowKey,en=Te.indent,Ut=en===void 0?0:en,rt=Te.rowComponent,Et=Te.cellComponent,Nt=Te.scopeCellComponent,Tt=xe(ht,fn,Pt,Ut),zt=Tt.prefixCls,xn=Tt.flattenColumns,jt=Tt.expandedRowClassName,Rt=Tt.expandedRowRender,on=Tt.rowProps,sn=Tt.expanded,Dn=Tt.rowSupportExpand,jn=he.useRef(!1);jn.current||(jn.current=sn);var In=Gt(jt,ht,Pt,Ut),lr=he.createElement(rt,(0,de.Z)({},on,{"data-row-key":fn,className:$e()(bt,"".concat(zt,"-row"),"".concat(zt,"-row-level-").concat(Ut),on==null?void 0:on.className,(0,Ke.Z)({},In,Ut>=1)),style:(0,Ee.Z)((0,Ee.Z)({},it),on==null?void 0:on.style)}),xn.map(function(dr,sr){var Pr=dr.render,hr=dr.dataIndex,br=dr.className,ir=Lt(Tt,dr,sr,Ut,Pt),zn=ir.key,Qn=ir.fixedInfo,cr=ir.appendCellNode,Xn=ir.additionalCellProps;return he.createElement(ke,(0,de.Z)({className:br,ellipsis:dr.ellipsis,align:dr.align,scope:dr.rowScope,component:dr.rowScope?Nt:Et,prefixCls:zt,key:zn,record:ht,index:Pt,renderIndex:Zt,dataIndex:hr,render:Pr,shouldCellUpdate:dr.shouldCellUpdate},Qn,{appendNode:cr,additionalProps:Xn}))})),er;if(Dn&&(jn.current||sn)){var ar=Rt(ht,Pt,Ut+1,sn);er=he.createElement(ft,{expanded:sn,className:$e()("".concat(zt,"-expanded-row"),"".concat(zt,"-expanded-row-level-").concat(Ut+1),In),prefixCls:zt,component:rt,cellComponent:Et,colSpan:xn.length,isEmpty:!1},ar)}return he.createElement(he.Fragment,null,lr,er)}var hn=mt(_t);function Nn(Te){var bt=Te.columnKey,it=Te.onColumnResize,ht=he.useRef();return(0,at.Z)(function(){ht.current&&it(bt,ht.current.offsetWidth)},[]),he.createElement(oe.Z,{data:bt},he.createElement("td",{ref:ht,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Wt=ue(29194);function Ln(Te){var bt=Te.prefixCls,it=Te.columnsKey,ht=Te.onColumnResize,Pt=he.useRef(null);return he.createElement("tr",{"aria-hidden":"true",className:"".concat(bt,"-measure-row"),style:{height:0,fontSize:0},ref:Pt},he.createElement(oe.Z.Collection,{onBatchResize:function(fn){(0,Wt.Z)(Pt.current)&&fn.forEach(function(en){var Ut=en.data,rt=en.size;ht(Ut,rt.offsetWidth)})}},it.map(function(Zt){return he.createElement(Nn,{key:Zt,columnKey:Zt,onColumnResize:ht})})))}function nr(Te){var bt=Te.data,it=Te.measureColumnWidth,ht=we(ge,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Pt=ht.prefixCls,Zt=ht.getComponent,fn=ht.onColumnResize,en=ht.flattenColumns,Ut=ht.getRowKey,rt=ht.expandedKeys,Et=ht.childrenColumnName,Nt=ht.emptyNode,Tt=ne(bt,Et,rt,Ut),zt=he.useRef({renderWithProps:!1}),xn=Zt(["body","wrapper"],"tbody"),jt=Zt(["body","row"],"tr"),Rt=Zt(["body","cell"],"td"),on=Zt(["body","cell"],"th"),sn;bt.length?sn=Tt.map(function(jn,In){var lr=jn.record,er=jn.indent,ar=jn.index,dr=Ut(lr,In);return he.createElement(hn,{key:dr,rowKey:dr,record:lr,index:In,renderIndex:ar,rowComponent:jt,cellComponent:Rt,scopeCellComponent:on,indent:er})}):sn=he.createElement(ft,{expanded:!0,className:"".concat(Pt,"-placeholder"),prefixCls:Pt,component:jt,cellComponent:Rt,colSpan:en.length,isEmpty:!0},Nt);var Dn=fe(en);return he.createElement(Qt.Provider,{value:zt.current},he.createElement(xn,{className:"".concat(Pt,"-tbody")},it&&he.createElement(Ln,{prefixCls:Pt,columnsKey:Dn,onColumnResize:fn}),sn))}var $n=mt(nr),It=ue(54451),Mt=["columnType"];function At(Te){for(var bt=Te.colWidths,it=Te.columns,ht=Te.columCount,Pt=we(ge,["tableLayout"]),Zt=Pt.tableLayout,fn=[],en=ht||it.length,Ut=!1,rt=en-1;rt>=0;rt-=1){var Et=bt[rt],Nt=it&&it[rt],Tt=void 0,zt=void 0;if(Nt&&(Tt=Nt[It.v],Zt==="auto"&&(zt=Nt.minWidth)),Et||zt||Tt||Ut){var xn=Tt||{},jt=xn.columnType,Rt=(0,et.Z)(xn,Mt);fn.unshift(he.createElement("col",(0,de.Z)({key:rt,style:{width:Et,minWidth:zt}},Rt))),Ut=!0}}return he.createElement("colgroup",null,fn)}var Cn=At,Sn=ue(94480),Wn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function rr(Te,bt){return(0,he.useMemo)(function(){for(var it=[],ht=0;ht<bt;ht+=1){var Pt=Te[ht];if(Pt!==void 0)it[ht]=Pt;else return null}return it},[Te.join("_"),bt])}var gn=he.forwardRef(function(Te,bt){var it=Te.className,ht=Te.noData,Pt=Te.columns,Zt=Te.flattenColumns,fn=Te.colWidths,en=Te.columCount,Ut=Te.stickyOffsets,rt=Te.direction,Et=Te.fixHeader,Nt=Te.stickyTopOffset,Tt=Te.stickyBottomOffset,zt=Te.stickyClassName,xn=Te.onScroll,jt=Te.maxContentScroll,Rt=Te.children,on=(0,et.Z)(Te,Wn),sn=we(ge,["prefixCls","scrollbarSize","isSticky","getComponent"]),Dn=sn.prefixCls,jn=sn.scrollbarSize,In=sn.isSticky,lr=sn.getComponent,er=lr(["header","table"],"table"),ar=In&&!Et?0:jn,dr=he.useRef(null),sr=he.useCallback(function(Xn){(0,Ne.mH)(bt,Xn),(0,Ne.mH)(dr,Xn)},[]);he.useEffect(function(){var Xn;function Cr(Lr){var Qr=Lr,Li=Qr.currentTarget,wi=Qr.deltaX;wi&&(xn({currentTarget:Li,scrollLeft:Li.scrollLeft+wi}),Lr.preventDefault())}return(Xn=dr.current)===null||Xn===void 0||Xn.addEventListener("wheel",Cr,{passive:!1}),function(){var Lr;(Lr=dr.current)===null||Lr===void 0||Lr.removeEventListener("wheel",Cr)}},[]);var Pr=he.useMemo(function(){return Zt.every(function(Xn){return Xn.width})},[Zt]),hr=Zt[Zt.length-1],br={fixed:hr?hr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Dn,"-cell-scrollbar")}}},ir=(0,he.useMemo)(function(){return ar?[].concat((0,Sn.Z)(Pt),[br]):Pt},[ar,Pt]),zn=(0,he.useMemo)(function(){return ar?[].concat((0,Sn.Z)(Zt),[br]):Zt},[ar,Zt]),Qn=(0,he.useMemo)(function(){var Xn=Ut.right,Cr=Ut.left;return(0,Ee.Z)((0,Ee.Z)({},Ut),{},{left:rt==="rtl"?[].concat((0,Sn.Z)(Cr.map(function(Lr){return Lr+ar})),[0]):Cr,right:rt==="rtl"?Xn:[].concat((0,Sn.Z)(Xn.map(function(Lr){return Lr+ar})),[0]),isSticky:In})},[ar,Ut,In]),cr=rr(fn,en);return he.createElement("div",{style:(0,Ee.Z)({overflow:"hidden"},In?{top:Nt,bottom:Tt}:{}),ref:sr,className:$e()(it,(0,Ke.Z)({},zt,!!zt))},he.createElement(er,{style:{tableLayout:"fixed",visibility:ht||cr?null:"hidden"}},(!ht||!jt||Pr)&&he.createElement(Cn,{colWidths:cr?[].concat((0,Sn.Z)(cr),[ar]):[],columCount:en+1,columns:zn}),Rt((0,Ee.Z)((0,Ee.Z)({},on),{},{stickyOffsets:Qn,columns:ir,flattenColumns:zn}))))}),Jt=he.memo(gn),Bn=function(bt){var it=bt.cells,ht=bt.stickyOffsets,Pt=bt.flattenColumns,Zt=bt.rowComponent,fn=bt.cellComponent,en=bt.onHeaderRow,Ut=bt.index,rt=we(ge,["prefixCls","direction"]),Et=rt.prefixCls,Nt=rt.direction,Tt;en&&(Tt=en(it.map(function(xn){return xn.column}),Ut));var zt=fe(it.map(function(xn){return xn.column}));return he.createElement(Zt,Tt,it.map(function(xn,jt){var Rt=xn.column,on=Ve(xn.colStart,xn.colEnd,Pt,ht,Nt),sn;return Rt&&Rt.onHeaderCell&&(sn=xn.column.onHeaderCell(Rt)),he.createElement(ke,(0,de.Z)({},xn,{scope:Rt.title?xn.colSpan>1?"colgroup":"col":null,ellipsis:Rt.ellipsis,align:Rt.align,component:fn,prefixCls:Et,key:zt[jt]},on,{additionalProps:sn,rowType:"header"}))}))},Sr=Bn;function rn(Te){var bt=[];function it(fn,en){var Ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;bt[Ut]=bt[Ut]||[];var rt=en,Et=fn.filter(Boolean).map(function(Nt){var Tt={key:Nt.key,className:Nt.className||"",children:Nt.title,column:Nt,colStart:rt},zt=1,xn=Nt.children;return xn&&xn.length>0&&(zt=it(xn,rt,Ut+1).reduce(function(jt,Rt){return jt+Rt},0),Tt.hasSubColumns=!0),"colSpan"in Nt&&(zt=Nt.colSpan),"rowSpan"in Nt&&(Tt.rowSpan=Nt.rowSpan),Tt.colSpan=zt,Tt.colEnd=Tt.colStart+zt-1,bt[Ut].push(Tt),rt+=zt,zt});return Et}it(Te,0);for(var ht=bt.length,Pt=function(en){bt[en].forEach(function(Ut){!("rowSpan"in Ut)&&!Ut.hasSubColumns&&(Ut.rowSpan=ht-en)})},Zt=0;Zt<ht;Zt+=1)Pt(Zt);return bt}var Mn=function(bt){var it=bt.stickyOffsets,ht=bt.columns,Pt=bt.flattenColumns,Zt=bt.onHeaderRow,fn=we(ge,["prefixCls","getComponent"]),en=fn.prefixCls,Ut=fn.getComponent,rt=he.useMemo(function(){return rn(ht)},[ht]),Et=Ut(["header","wrapper"],"thead"),Nt=Ut(["header","row"],"tr"),Tt=Ut(["header","cell"],"th");return he.createElement(Et,{className:"".concat(en,"-thead")},rt.map(function(zt,xn){var jt=he.createElement(Sr,{key:xn,flattenColumns:Pt,cells:zt,stickyOffsets:it,rowComponent:Nt,cellComponent:Tt,onHeaderRow:Zt,index:xn});return jt}))},Rn=mt(Mn),Hn=ue(97347);function Er(Te,bt,it){var ht=(0,It.g)(Te),Pt=ht.expandIcon,Zt=ht.expandedRowKeys,fn=ht.defaultExpandedRowKeys,en=ht.defaultExpandAllRows,Ut=ht.expandedRowRender,rt=ht.onExpand,Et=ht.onExpandedRowsChange,Nt=ht.childrenColumnName,Tt=Pt||nt,zt=Nt||"children",xn=he.useMemo(function(){return Ut?"row":Te.expandable&&Te.internalHooks===ae.R&&Te.expandable.__PARENT_RENDER_ICON__||bt.some(function(In){return In&&(0,me.Z)(In)==="object"&&In[zt]})?"nest":!1},[!!Ut,bt]),jt=he.useState(function(){return fn||(en?Le(bt,it,zt):[])}),Rt=(0,je.Z)(jt,2),on=Rt[0],sn=Rt[1],Dn=he.useMemo(function(){return new Set(Zt||on||[])},[Zt,on]),jn=he.useCallback(function(In){var lr=it(In,bt.indexOf(In)),er,ar=Dn.has(lr);ar?(Dn.delete(lr),er=(0,Sn.Z)(Dn)):er=[].concat((0,Sn.Z)(Dn),[lr]),sn(er),rt&&rt(!ar,In),Et&&Et(er)},[it,Dn,bt,rt,Et]);return[ht,xn,Dn,Tt,zt,jn]}function mr(Te,bt,it){var ht=Te.map(function(Pt,Zt){return Ve(Zt,Zt,Te,bt,it)});return(0,Ze.Z)(function(){return ht},[ht],function(Pt,Zt){return!(0,be.Z)(Pt,Zt)})}function Or(Te){var bt=(0,he.useRef)(Te),it=(0,he.useState)({}),ht=(0,je.Z)(it,2),Pt=ht[1],Zt=(0,he.useRef)(null),fn=(0,he.useRef)([]);function en(Ut){fn.current.push(Ut);var rt=Promise.resolve();Zt.current=rt,rt.then(function(){if(Zt.current===rt){var Et=fn.current,Nt=bt.current;fn.current=[],Et.forEach(function(Tt){bt.current=Tt(bt.current)}),Zt.current=null,Nt!==bt.current&&Pt({})}})}return(0,he.useEffect)(function(){return function(){Zt.current=null}},[]),[bt.current,en]}function yr(Te){var bt=(0,he.useRef)(Te||null),it=(0,he.useRef)();function ht(){window.clearTimeout(it.current)}function Pt(fn){bt.current=fn,ht(),it.current=window.setTimeout(function(){bt.current=null,it.current=void 0},100)}function Zt(){return bt.current}return(0,he.useEffect)(function(){return ht},[]),[Pt,Zt]}function ur(){var Te=he.useState(-1),bt=(0,je.Z)(Te,2),it=bt[0],ht=bt[1],Pt=he.useState(-1),Zt=(0,je.Z)(Pt,2),fn=Zt[0],en=Zt[1],Ut=he.useCallback(function(rt,Et){ht(rt),en(Et)},[]);return[it,fn,Ut]}var Mr=ue(47273),vn=(0,Mr.Z)()?window:null;function kt(Te,bt){var it=(0,me.Z)(Te)==="object"?Te:{},ht=it.offsetHeader,Pt=ht===void 0?0:ht,Zt=it.offsetSummary,fn=Zt===void 0?0:Zt,en=it.offsetScroll,Ut=en===void 0?0:en,rt=it.getContainer,Et=rt===void 0?function(){return vn}:rt,Nt=Et()||vn,Tt=!!Te;return he.useMemo(function(){return{isSticky:Tt,stickyClassName:Tt?"".concat(bt,"-sticky-holder"):"",offsetHeader:Pt,offsetSummary:fn,offsetScroll:Ut,container:Nt}},[Tt,Ut,Pt,fn,bt,Nt])}function un(Te,bt,it){var ht=(0,he.useMemo)(function(){var Pt=bt.length,Zt=function(rt,Et,Nt){for(var Tt=[],zt=0,xn=rt;xn!==Et;xn+=Nt)Tt.push(zt),bt[xn].fixed&&(zt+=Te[xn]||0);return Tt},fn=Zt(0,Pt,1),en=Zt(Pt-1,-1,-1).reverse();return it==="rtl"?{left:en,right:fn}:{left:fn,right:en}},[Te,bt,it]);return ht}var qn=un;function kr(Te){var bt=Te.className,it=Te.children;return he.createElement("div",{className:bt},it)}var _e=kr,Ge=ue(8224),ln=ue(16089),Kt=ue(76846);function qe(Te){var bt=(0,Kt.bn)(Te),it=bt.getBoundingClientRect(),ht=document.documentElement;return{left:it.left+(window.pageXOffset||ht.scrollLeft)-(ht.clientLeft||document.body.clientLeft||0),top:it.top+(window.pageYOffset||ht.scrollTop)-(ht.clientTop||document.body.clientTop||0)}}var Xt=function(bt,it){var ht,Pt,Zt=bt.scrollBodyRef,fn=bt.onScroll,en=bt.offsetScroll,Ut=bt.container,rt=bt.direction,Et=we(ge,"prefixCls"),Nt=((ht=Zt.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,Tt=((Pt=Zt.current)===null||Pt===void 0?void 0:Pt.clientWidth)||0,zt=Nt&&Tt*(Tt/Nt),xn=he.useRef(),jt=Or({scrollLeft:0,isHiddenScrollBar:!0}),Rt=(0,je.Z)(jt,2),on=Rt[0],sn=Rt[1],Dn=he.useRef({delta:0,x:0}),jn=he.useState(!1),In=(0,je.Z)(jn,2),lr=In[0],er=In[1],ar=he.useRef(null);he.useEffect(function(){return function(){ln.Z.cancel(ar.current)}},[]);var dr=function(){er(!1)},sr=function(zn){zn.persist(),Dn.current.delta=zn.pageX-on.scrollLeft,Dn.current.x=0,er(!0),zn.preventDefault()},Pr=function(zn){var Qn,cr=zn||((Qn=window)===null||Qn===void 0?void 0:Qn.event),Xn=cr.buttons;if(!lr||Xn===0){lr&&er(!1);return}var Cr=Dn.current.x+zn.pageX-Dn.current.x-Dn.current.delta,Lr=rt==="rtl";Cr=Math.max(Lr?zt-Tt:0,Math.min(Lr?0:Tt-zt,Cr));var Qr=!Lr||Math.abs(Cr)+Math.abs(zt)<Tt;Qr&&(fn({scrollLeft:Cr/Tt*(Nt+2)}),Dn.current.x=zn.pageX)},hr=function(){ln.Z.cancel(ar.current),ar.current=(0,ln.Z)(function(){if(Zt.current){var zn=qe(Zt.current).top,Qn=zn+Zt.current.offsetHeight,cr=Ut===window?document.documentElement.scrollTop+window.innerHeight:qe(Ut).top+Ut.clientHeight;Qn-(0,z.Z)()<=cr||zn>=cr-en?sn(function(Xn){return(0,Ee.Z)((0,Ee.Z)({},Xn),{},{isHiddenScrollBar:!0})}):sn(function(Xn){return(0,Ee.Z)((0,Ee.Z)({},Xn),{},{isHiddenScrollBar:!1})})}})},br=function(zn){sn(function(Qn){return(0,Ee.Z)((0,Ee.Z)({},Qn),{},{scrollLeft:zn/Nt*Tt||0})})};return he.useImperativeHandle(it,function(){return{setScrollLeft:br,checkScrollBarVisible:hr}}),he.useEffect(function(){var ir=(0,Ge.Z)(document.body,"mouseup",dr,!1),zn=(0,Ge.Z)(document.body,"mousemove",Pr,!1);return hr(),function(){ir.remove(),zn.remove()}},[zt,lr]),he.useEffect(function(){if(Zt.current){for(var ir=[],zn=(0,Kt.bn)(Zt.current);zn;)ir.push(zn),zn=zn.parentElement;return ir.forEach(function(Qn){return Qn.addEventListener("scroll",hr,!1)}),window.addEventListener("resize",hr,!1),window.addEventListener("scroll",hr,!1),Ut.addEventListener("scroll",hr,!1),function(){ir.forEach(function(Qn){return Qn.removeEventListener("scroll",hr)}),window.removeEventListener("resize",hr),window.removeEventListener("scroll",hr),Ut.removeEventListener("scroll",hr)}}},[Ut]),he.useEffect(function(){on.isHiddenScrollBar||sn(function(ir){var zn=Zt.current;return zn?(0,Ee.Z)((0,Ee.Z)({},ir),{},{scrollLeft:zn.scrollLeft/zn.scrollWidth*zn.clientWidth}):ir})},[on.isHiddenScrollBar]),Nt<=Tt||!zt||on.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,z.Z)(),width:Tt,bottom:en},className:"".concat(Et,"-sticky-scroll")},he.createElement("div",{onMouseDown:sr,ref:xn,className:$e()("".concat(Et,"-sticky-scroll-bar"),(0,Ke.Z)({},"".concat(Et,"-sticky-scroll-bar-active"),lr)),style:{width:"".concat(zt,"px"),transform:"translate3d(".concat(on.scrollLeft,"px, 0, 0)")}}))},dn=he.forwardRef(Xt);function pn(Te){return null}var En=pn;function mn(Te){return null}var kn=mn,$t="rc-table",Ft=[],Tn={};function Fn(){return"No Data"}function Vn(Te,bt){var it=(0,Ee.Z)({rowKey:"key",prefixCls:$t,emptyText:Fn},Te),ht=it.prefixCls,Pt=it.className,Zt=it.rowClassName,fn=it.style,en=it.data,Ut=it.rowKey,rt=it.scroll,Et=it.tableLayout,Nt=it.direction,Tt=it.title,zt=it.footer,xn=it.summary,jt=it.caption,Rt=it.id,on=it.showHeader,sn=it.components,Dn=it.emptyText,jn=it.onRow,In=it.onHeaderRow,lr=it.onScroll,er=it.internalHooks,ar=it.transformColumns,dr=it.internalRefs,sr=it.tailor,Pr=it.getContainerWidth,hr=it.sticky,br=it.rowHoverable,ir=br===void 0?!0:br,zn=en||Ft,Qn=!!zn.length,cr=er===ae.R,Xn=he.useCallback(function(_r,Hr){return(0,lt.Z)(sn,_r)||Hr},[sn]),Cr=he.useMemo(function(){return typeof Ut=="function"?Ut:function(_r){var Hr=_r&&_r[Ut];return Hr}},[Ut]),Lr=Xn(["body"]),Qr=ur(),Li=(0,je.Z)(Qr,3),wi=Li[0],yi=Li[1],Ni=Li[2],$r=Er(it,zn,Cr),Xr=(0,je.Z)($r,6),ti=Xr[0],ki=Xr[1],ii=Xr[2],si=Xr[3],ai=Xr[4],Jn=Xr[5],pr=rt==null?void 0:rt.x,vr=he.useState(0),gr=(0,je.Z)(vr,2),Kr=gr[0],qr=gr[1],Ki=(0,Hn.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},it),ti),{},{expandable:!!ti.expandedRowRender,columnTitle:ti.columnTitle,expandedKeys:ii,getRowKey:Cr,onTriggerExpand:Jn,expandIcon:si,expandIconColumnIndex:ti.expandIconColumnIndex,direction:Nt,scrollWidth:cr&&sr&&typeof pr=="number"?pr:null,clientWidth:Kr}),cr?ar:null),di=(0,je.Z)(Ki,4),ci=di[0],Ar=di[1],xi=di[2],Vi=di[3],ni=xi!=null?xi:pr,lo=he.useMemo(function(){return{columns:ci,flattenColumns:Ar}},[ci,Ar]),Ui=he.useRef(),Ji=he.useRef(),vi=he.useRef(),ra=he.useRef();he.useImperativeHandle(bt,function(){return{nativeElement:Ui.current,scrollTo:function(Hr){var Si;if(vi.current instanceof HTMLElement){var Ii=Hr.index,Ri=Hr.top,Bo=Hr.key;if(qt(Ri)){var wo;(wo=vi.current)===null||wo===void 0||wo.scrollTo({top:Ri})}else{var Io,fo=Bo!=null?Bo:Cr(zn[Ii]);(Io=vi.current.querySelector('[data-row-key="'.concat(fo,'"]')))===null||Io===void 0||Io.scrollIntoView()}}else(Si=vi.current)!==null&&Si!==void 0&&Si.scrollTo&&vi.current.scrollTo(Hr)}}});var Jo=he.useRef(),vo=he.useState(!1),mo=(0,je.Z)(vo,2),ro=mo[0],Eo=mo[1],ia=he.useState(!1),oa=(0,je.Z)(ia,2),aa=oa[0],Zo=oa[1],Qo=he.useState(new Map),_o=(0,je.Z)(Qo,2),ko=_o[0],$o=_o[1],la=fe(Ar),Ho=la.map(function(_r){return ko.get(_r)}),Do=he.useMemo(function(){return Ho},[Ho.join("_")]),To=qn(Do,Ar,Nt),Hi=rt&&wt(rt.y),fi=rt&&wt(ni)||!!ti.fixed,zr=fi&&Ar.some(function(_r){var Hr=_r.fixed;return Hr}),Rr=he.useRef(),mi=kt(hr,ht),hi=mi.isSticky,bi=mi.offsetHeader,Di=mi.offsetSummary,so=mi.offsetScroll,io=mi.stickyClassName,go=mi.container,pi=he.useMemo(function(){return xn==null?void 0:xn(zn)},[xn,zn]),Ai=(Hi||hi)&&he.isValidElement(pi)&&pi.type===ve&&pi.props.fixed,Qi,uo,qo;Hi&&(uo={overflowY:Qn?"scroll":"auto",maxHeight:rt.y}),fi&&(Qi={overflowX:"auto"},Hi||(uo={overflowY:"hidden"}),qo={width:ni===!0?"auto":ni,minWidth:"100%"});var Sa=he.useCallback(function(_r,Hr){$o(function(Si){if(Si.get(_r)!==Hr){var Ii=new Map(Si);return Ii.set(_r,Hr),Ii}return Si})},[]),Ea=yr(null),Co=(0,je.Z)(Ea,2),Lo=Co[0],zi=Co[1];function co(_r,Hr){Hr&&(typeof Hr=="function"?Hr(_r):Hr.scrollLeft!==_r&&(Hr.scrollLeft=_r,Hr.scrollLeft!==_r&&setTimeout(function(){Hr.scrollLeft=_r},0)))}var $i=(0,Ie.Z)(function(_r){var Hr=_r.currentTarget,Si=_r.scrollLeft,Ii=Nt==="rtl",Ri=typeof Si=="number"?Si:Hr.scrollLeft,Bo=Hr||Tn;if(!zi()||zi()===Bo){var wo;Lo(Bo),co(Ri,Ji.current),co(Ri,vi.current),co(Ri,Jo.current),co(Ri,(wo=Rr.current)===null||wo===void 0?void 0:wo.setScrollLeft)}var Io=Hr||Ji.current;if(Io){var fo=cr&&sr&&typeof ni=="number"?ni:Io.scrollWidth,yo=Io.clientWidth;if(fo===yo){Eo(!1),Zo(!1);return}Ii?(Eo(-Ri<fo-yo),Zo(-Ri>0)):(Eo(Ri>0),Zo(Ri<fo-yo))}}),sa=(0,Ie.Z)(function(_r){$i(_r),lr==null||lr(_r)}),Qa=function(){if(fi&&vi.current){var Hr;$i({currentTarget:(0,Kt.bn)(vi.current),scrollLeft:(Hr=vi.current)===null||Hr===void 0?void 0:Hr.scrollLeft})}else Eo(!1),Zo(!1)},$a=function(Hr){var Si,Ii=Hr.width;(Si=Rr.current)===null||Si===void 0||Si.checkScrollBarVisible();var Ri=Ui.current?Ui.current.offsetWidth:Ii;cr&&Pr&&Ui.current&&(Ri=Pr(Ui.current,Ri)||Ri),Ri!==Kr&&(Qa(),qr(Ri))},zo=he.useRef(!1);he.useEffect(function(){zo.current&&Qa()},[fi,en,ci.length]),he.useEffect(function(){zo.current=!0},[]);var qa=he.useState(0),ka=(0,je.Z)(qa,2),No=ka[0],el=ka[1],Da=he.useState(!0),Ta=(0,je.Z)(Da,2),La=Ta[0],Na=Ta[1];(0,at.Z)(function(){(!sr||!cr)&&(vi.current instanceof Element?el((0,z.o)(vi.current).width):el((0,z.o)(ra.current).width)),Na((0,ee.G)("position","sticky"))},[]),he.useEffect(function(){cr&&dr&&(dr.body.current=vi.current)});var Wo=he.useCallback(function(_r){return he.createElement(he.Fragment,null,he.createElement(Rn,_r),Ai==="top"&&he.createElement(Yt,_r,pi))},[Ai,pi]),ua=he.useCallback(function(_r){return he.createElement(Yt,_r,pi)},[pi]),Ma=Xn(["table"],"table"),Mo=he.useMemo(function(){return Et||(zr?ni==="max-content"?"auto":"fixed":Hi||hi||Ar.some(function(_r){var Hr=_r.ellipsis;return Hr})?"fixed":"auto")},[Hi,zr,Ar,Et,hi]),Pa,Aa={colWidths:Do,columCount:Ar.length,stickyOffsets:To,onHeaderRow:In,fixHeader:Hi,scroll:rt},tl=he.useMemo(function(){return Qn?null:typeof Dn=="function"?Dn():Dn},[Qn,Dn]),ca=he.createElement($n,{data:zn,measureColumnWidth:Hi||fi||hi}),da=he.createElement(Cn,{colWidths:Ar.map(function(_r){var Hr=_r.width;return Hr}),columns:Ar}),Po=jt!=null?he.createElement("caption",{className:"".concat(ht,"-caption")},jt):void 0,ea=(0,re.Z)(it,{data:!0}),nl=(0,re.Z)(it,{aria:!0});if(Hi||hi){var Ko;typeof Lr=="function"?(Ko=Lr(zn,{scrollbarSize:No,ref:vi,onScroll:$i}),Aa.colWidths=Ar.map(function(_r,Hr){var Si=_r.width,Ii=Hr===Ar.length-1?Si-No:Si;return typeof Ii=="number"&&!Number.isNaN(Ii)?Ii:0})):Ko=he.createElement("div",{style:(0,Ee.Z)((0,Ee.Z)({},Qi),uo),onScroll:sa,ref:vi,className:$e()("".concat(ht,"-body"))},he.createElement(Ma,(0,de.Z)({style:(0,Ee.Z)((0,Ee.Z)({},qo),{},{tableLayout:Mo})},nl),Po,da,ca,!Ai&&pi&&he.createElement(Yt,{stickyOffsets:To,flattenColumns:Ar},pi)));var Ra=(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({noData:!zn.length,maxContentScroll:fi&&ni==="max-content"},Aa),lo),{},{direction:Nt,stickyClassName:io,onScroll:$i});Pa=he.createElement(he.Fragment,null,on!==!1&&he.createElement(Jt,(0,de.Z)({},Ra,{stickyTopOffset:bi,className:"".concat(ht,"-header"),ref:Ji}),Wo),Ko,Ai&&Ai!=="top"&&he.createElement(Jt,(0,de.Z)({},Ra,{stickyBottomOffset:Di,className:"".concat(ht,"-summary"),ref:Jo}),ua),hi&&vi.current&&vi.current instanceof Element&&he.createElement(dn,{ref:Rr,offsetScroll:so,scrollBodyRef:vi,onScroll:$i,container:go,direction:Nt}))}else Pa=he.createElement("div",{style:(0,Ee.Z)((0,Ee.Z)({},Qi),uo),className:$e()("".concat(ht,"-content")),onScroll:$i,ref:vi},he.createElement(Ma,(0,de.Z)({style:(0,Ee.Z)((0,Ee.Z)({},qo),{},{tableLayout:Mo})},nl),Po,da,on!==!1&&he.createElement(Rn,(0,de.Z)({},Aa,lo)),ca,pi&&he.createElement(Yt,{stickyOffsets:To,flattenColumns:Ar},pi)));var Ao=he.createElement("div",(0,de.Z)({className:$e()(ht,Pt,(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},"".concat(ht,"-rtl"),Nt==="rtl"),"".concat(ht,"-ping-left"),ro),"".concat(ht,"-ping-right"),aa),"".concat(ht,"-layout-fixed"),Et==="fixed"),"".concat(ht,"-fixed-header"),Hi),"".concat(ht,"-fixed-column"),zr),"".concat(ht,"-fixed-column-gapped"),zr&&Vi),"".concat(ht,"-scroll-horizontal"),fi),"".concat(ht,"-has-fix-left"),Ar[0]&&Ar[0].fixed),"".concat(ht,"-has-fix-right"),Ar[Ar.length-1]&&Ar[Ar.length-1].fixed==="right")),style:fn,id:Rt,ref:Ui},ea),Tt&&he.createElement(_e,{className:"".concat(ht,"-title")},Tt(zn)),he.createElement("div",{ref:ra,className:"".concat(ht,"-container")},Pa),zt&&he.createElement(_e,{className:"".concat(ht,"-footer")},zt(zn)));fi&&(Ao=he.createElement(oe.Z,{onResize:$a},Ao));var Ba=mr(Ar,To,Nt),Ro=he.useMemo(function(){return{scrollX:ni,prefixCls:ht,getComponent:Xn,scrollbarSize:No,direction:Nt,fixedInfoList:Ba,isSticky:hi,supportSticky:La,componentWidth:Kr,fixHeader:Hi,fixColumn:zr,horizonScroll:fi,tableLayout:Mo,rowClassName:Zt,expandedRowClassName:ti.expandedRowClassName,expandIcon:si,expandableType:ki,expandRowByClick:ti.expandRowByClick,expandedRowRender:ti.expandedRowRender,onTriggerExpand:Jn,expandIconColumnIndex:ti.expandIconColumnIndex,indentSize:ti.indentSize,allColumnsFixedLeft:Ar.every(function(_r){return _r.fixed==="left"}),emptyNode:tl,columns:ci,flattenColumns:Ar,onColumnResize:Sa,hoverStartRow:wi,hoverEndRow:yi,onHover:Ni,rowExpandable:ti.rowExpandable,onRow:jn,getRowKey:Cr,expandedKeys:ii,childrenColumnName:ai,rowHoverable:ir}},[ni,ht,Xn,No,Nt,Ba,hi,La,Kr,Hi,zr,fi,Mo,Zt,ti.expandedRowClassName,si,ki,ti.expandRowByClick,ti.expandedRowRender,Jn,ti.expandIconColumnIndex,ti.indentSize,tl,ci,Ar,Sa,wi,yi,Ni,ti.rowExpandable,jn,Cr,ii,ai,ir]);return he.createElement(ge.Provider,{value:Ro},Ao)}var Un=he.forwardRef(Vn);function xr(Te){return vt(Un,Te)}var Nr=xr();Nr.EXPAND_COLUMN=ae.w,Nr.INTERNAL_HOOKS=ae.R,Nr.Column=En,Nr.ColumnGroup=kn,Nr.Summary=Vt;var Kn=Nr,wn=ue(48911),Gn=Qe(null),An=Qe(null);function Tr(Te,bt,it){var ht=bt||1;return it[Te+ht]-(it[Te]||0)}function jr(Te){var bt=Te.rowInfo,it=Te.column,ht=Te.colIndex,Pt=Te.indent,Zt=Te.index,fn=Te.component,en=Te.renderIndex,Ut=Te.record,rt=Te.style,Et=Te.className,Nt=Te.inverse,Tt=Te.getHeight,zt=it.render,xn=it.dataIndex,jt=it.className,Rt=it.width,on=we(An,["columnsOffset"]),sn=on.columnsOffset,Dn=Lt(bt,it,ht,Pt,Zt),jn=Dn.key,In=Dn.fixedInfo,lr=Dn.appendCellNode,er=Dn.additionalCellProps,ar=er.style,dr=er.colSpan,sr=dr===void 0?1:dr,Pr=er.rowSpan,hr=Pr===void 0?1:Pr,br=ht-1,ir=Tr(br,sr,sn),zn=sr>1?Rt-ir:0,Qn=(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},ar),rt),{},{flex:"0 0 ".concat(ir,"px"),width:"".concat(ir,"px"),marginRight:zn,pointerEvents:"auto"}),cr=he.useMemo(function(){return Nt?hr<=1:sr===0||hr===0||hr>1},[hr,sr,Nt]);cr?Qn.visibility="hidden":Nt&&(Qn.height=Tt==null?void 0:Tt(hr));var Xn=cr?function(){return null}:zt,Cr={};return(hr===0||sr===0)&&(Cr.rowSpan=1,Cr.colSpan=1),he.createElement(ke,(0,de.Z)({className:$e()(jt,Et),ellipsis:it.ellipsis,align:it.align,scope:it.rowScope,component:fn,prefixCls:bt.prefixCls,key:jn,record:Ut,index:Zt,renderIndex:en,dataIndex:xn,render:Xn,shouldCellUpdate:it.shouldCellUpdate},In,{appendNode:lr,additionalProps:(0,Ee.Z)((0,Ee.Z)({},er),{},{style:Qn},Cr)}))}var Fr=jr,Ur=["data","index","className","rowKey","style","extra","getHeight"],Jr=he.forwardRef(function(Te,bt){var it=Te.data,ht=Te.index,Pt=Te.className,Zt=Te.rowKey,fn=Te.style,en=Te.extra,Ut=Te.getHeight,rt=(0,et.Z)(Te,Ur),Et=it.record,Nt=it.indent,Tt=it.index,zt=we(ge,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),xn=zt.scrollX,jt=zt.flattenColumns,Rt=zt.prefixCls,on=zt.fixColumn,sn=zt.componentWidth,Dn=we(Gn,["getComponent"]),jn=Dn.getComponent,In=xe(Et,Zt,ht,Nt),lr=jn(["body","row"],"div"),er=jn(["body","cell"],"div"),ar=In.rowSupportExpand,dr=In.expanded,sr=In.rowProps,Pr=In.expandedRowRender,hr=In.expandedRowClassName,br;if(ar&&dr){var ir=Pr(Et,ht,Nt+1,dr),zn=Gt(hr,Et,ht,Nt),Qn={};on&&(Qn={style:(0,Ke.Z)({},"--virtual-width","".concat(sn,"px"))});var cr="".concat(Rt,"-expanded-row-cell");br=he.createElement(lr,{className:$e()("".concat(Rt,"-expanded-row"),"".concat(Rt,"-expanded-row-level-").concat(Nt+1),zn)},he.createElement(ke,{component:er,prefixCls:Rt,className:$e()(cr,(0,Ke.Z)({},"".concat(cr,"-fixed"),on)),additionalProps:Qn},ir))}var Xn=(0,Ee.Z)((0,Ee.Z)({},fn),{},{width:xn});en&&(Xn.position="absolute",Xn.pointerEvents="none");var Cr=he.createElement(lr,(0,de.Z)({},sr,rt,{"data-row-key":Zt,ref:ar?null:bt,className:$e()(Pt,"".concat(Rt,"-row"),sr==null?void 0:sr.className,(0,Ke.Z)({},"".concat(Rt,"-row-extra"),en)),style:(0,Ee.Z)((0,Ee.Z)({},Xn),sr==null?void 0:sr.style)}),jt.map(function(Lr,Qr){return he.createElement(Fr,{key:Qr,component:er,rowInfo:In,column:Lr,colIndex:Qr,indent:Nt,index:ht,renderIndex:Tt,record:Et,inverse:en,getHeight:Ut})}));return ar?he.createElement("div",{ref:bt},Cr,br):Cr}),Vr=mt(Jr),Ir=Vr,ei=he.forwardRef(function(Te,bt){var it=Te.data,ht=Te.onScroll,Pt=we(ge,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Zt=Pt.flattenColumns,fn=Pt.onColumnResize,en=Pt.getRowKey,Ut=Pt.expandedKeys,rt=Pt.prefixCls,Et=Pt.childrenColumnName,Nt=Pt.scrollX,Tt=Pt.direction,zt=we(Gn),xn=zt.sticky,jt=zt.scrollY,Rt=zt.listItemHeight,on=zt.getComponent,sn=zt.onScroll,Dn=he.useRef(),jn=ne(it,Et,Ut,en),In=he.useMemo(function(){var br=0;return Zt.map(function(ir){var zn=ir.width,Qn=ir.key;return br+=zn,[Qn,zn,br]})},[Zt]),lr=he.useMemo(function(){return In.map(function(br){return br[2]})},[In]);he.useEffect(function(){In.forEach(function(br){var ir=(0,je.Z)(br,2),zn=ir[0],Qn=ir[1];fn(zn,Qn)})},[In]),he.useImperativeHandle(bt,function(){var br,ir={scrollTo:function(Qn){var cr;(cr=Dn.current)===null||cr===void 0||cr.scrollTo(Qn)},nativeElement:(br=Dn.current)===null||br===void 0?void 0:br.nativeElement};return Object.defineProperty(ir,"scrollLeft",{get:function(){var Qn;return((Qn=Dn.current)===null||Qn===void 0?void 0:Qn.getScrollInfo().x)||0},set:function(Qn){var cr;(cr=Dn.current)===null||cr===void 0||cr.scrollTo({left:Qn})}}),ir});var er=function(ir,zn){var Qn,cr=(Qn=jn[zn])===null||Qn===void 0?void 0:Qn.record,Xn=ir.onCell;if(Xn){var Cr,Lr=Xn(cr,zn);return(Cr=Lr==null?void 0:Lr.rowSpan)!==null&&Cr!==void 0?Cr:1}return 1},ar=function(ir){var zn=ir.start,Qn=ir.end,cr=ir.getSize,Xn=ir.offsetY;if(Qn<0)return null;for(var Cr=Zt.filter(function(si){return er(si,zn)===0}),Lr=zn,Qr=function(ai){if(Cr=Cr.filter(function(Jn){return er(Jn,ai)===0}),!Cr.length)return Lr=ai,1},Li=zn;Li>=0&&!Qr(Li);Li-=1);for(var wi=Zt.filter(function(si){return er(si,Qn)!==1}),yi=Qn,Ni=function(ai){if(wi=wi.filter(function(Jn){return er(Jn,ai)!==1}),!wi.length)return yi=Math.max(ai-1,Qn),1},$r=Qn;$r<jn.length&&!Ni($r);$r+=1);for(var Xr=[],ti=function(ai){var Jn=jn[ai];if(!Jn)return 1;Zt.some(function(pr){return er(pr,ai)>1})&&Xr.push(ai)},ki=Lr;ki<=yi;ki+=1)ti(ki);var ii=Xr.map(function(si){var ai=jn[si],Jn=en(ai.record,si),pr=function(Kr){var qr=si+Kr-1,Ki=en(jn[qr].record,qr),di=cr(Jn,Ki);return di.bottom-di.top},vr=cr(Jn);return he.createElement(Ir,{key:si,data:ai,rowKey:Jn,index:si,style:{top:-Xn+vr.top},extra:!0,getHeight:pr})});return ii},dr=he.useMemo(function(){return{columnsOffset:lr}},[lr]),sr="".concat(rt,"-tbody"),Pr=on(["body","wrapper"]),hr={};return xn&&(hr.position="sticky",hr.bottom=0,(0,me.Z)(xn)==="object"&&xn.offsetScroll&&(hr.bottom=xn.offsetScroll)),he.createElement(An.Provider,{value:dr},he.createElement(wn.Z,{fullHeight:!1,ref:Dn,prefixCls:"".concat(sr,"-virtual"),styles:{horizontalScrollBar:hr},className:sr,height:jt,itemHeight:Rt||24,data:jn,itemKey:function(ir){return en(ir.record)},component:Pr,scrollWidth:Nt,direction:Tt,onVirtualScroll:function(ir){var zn,Qn=ir.x;ht({currentTarget:(zn=Dn.current)===null||zn===void 0?void 0:zn.nativeElement,scrollLeft:Qn})},onScroll:sn,extraRender:ar},function(br,ir,zn){var Qn=en(br.record,ir);return he.createElement(Ir,{data:br,rowKey:Qn,index:ir,style:zn.style})}))}),Yr=mt(ei),On=Yr,or=function(bt,it){var ht=it.ref,Pt=it.onScroll;return he.createElement(On,{ref:ht,data:bt,onScroll:Pt})};function Dr(Te,bt){var it=Te.data,ht=Te.columns,Pt=Te.scroll,Zt=Te.sticky,fn=Te.prefixCls,en=fn===void 0?$t:fn,Ut=Te.className,rt=Te.listItemHeight,Et=Te.components,Nt=Te.onScroll,Tt=Pt||{},zt=Tt.x,xn=Tt.y;typeof zt!="number"&&(zt=1),typeof xn!="number"&&(xn=500);var jt=(0,bn.zX)(function(sn,Dn){return(0,lt.Z)(Et,sn)||Dn}),Rt=(0,bn.zX)(Nt),on=he.useMemo(function(){return{sticky:Zt,scrollY:xn,listItemHeight:rt,getComponent:jt,onScroll:Rt}},[Zt,xn,rt,jt,Rt]);return he.createElement(Gn.Provider,{value:on},he.createElement(Kn,(0,de.Z)({},Te,{className:$e()(Ut,"".concat(en,"-virtual")),scroll:(0,Ee.Z)((0,Ee.Z)({},Pt),{},{x:zt}),components:(0,Ee.Z)((0,Ee.Z)({},Et),{},{body:it!=null&&it.length?or:void 0}),columns:ht,internalHooks:ae.R,tailor:!0,ref:bt})))}var Zr=he.forwardRef(Dr);function Br(Te){return vt(Zr,Te)}var Wr=Br(),oi=null},54451:function(cn,an,ue){"use strict";ue.d(an,{g:function(){return he},v:function(){return be}});var ae=ue(33885),je=ue(75931),Ie=ue(48736),at=["expandable"],be="RC_TABLE_INTERNAL_COL_DEFINE";function he(De){var Qe=De.expandable,we=(0,je.Z)(De,at),de;return"expandable"in De?de=(0,ae.Z)((0,ae.Z)({},we),Qe):de=we,de.showExpandColumn===!1&&(de.expandIconColumnIndex=-1),de}},22711:function(cn,an,ue){"use strict";ue.r(an),ue.d(an,{ResizableTextArea:function(){return Se},default:function(){return nn}});var ae=ue(54476),je=ue(20068),Ie=ue(33885),at=ue(94480),be=ue(42978),he=ue(75931),De=ue(92310),Qe=ue.n(De),we=ue(36901),de=ue(66003),Ne=ue(30292),Ce=ue(18929),yt=ue(59301),Je=ue(76190),Ye=ue(29301),Re=ue(34280),Pe=ue(16089),vt=`
|
|
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;
|
|
`,mt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],St={},Fe;function ge(Ot){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=Ot.getAttribute("id")||Ot.getAttribute("data-reactid")||Ot.getAttribute("name");if(Qt&&St[Ht])return St[Ht];var ye=window.getComputedStyle(Ot),fe=ye.getPropertyValue("box-sizing")||ye.getPropertyValue("-moz-box-sizing")||ye.getPropertyValue("-webkit-box-sizing"),wt=parseFloat(ye.getPropertyValue("padding-bottom"))+parseFloat(ye.getPropertyValue("padding-top")),qt=parseFloat(ye.getPropertyValue("border-bottom-width"))+parseFloat(ye.getPropertyValue("border-top-width")),Bt=mt.map(function(gt){return"".concat(gt,":").concat(ye.getPropertyValue(gt))}).join(";"),We={sizingStyle:Bt,paddingSize:wt,borderSize:qt,boxSizing:fe};return Qt&&Ht&&(St[Ht]=We),We}function He(Ot){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Fe||(Fe=document.createElement("textarea"),Fe.setAttribute("tab-index","-1"),Fe.setAttribute("aria-hidden","true"),Fe.setAttribute("name","hiddenTextarea"),document.body.appendChild(Fe)),Ot.getAttribute("wrap")?Fe.setAttribute("wrap",Ot.getAttribute("wrap")):Fe.removeAttribute("wrap");var fe=ge(Ot,Qt),wt=fe.paddingSize,qt=fe.borderSize,Bt=fe.boxSizing,We=fe.sizingStyle;Fe.setAttribute("style","".concat(We,";").concat(vt)),Fe.value=Ot.value||Ot.placeholder||"";var gt=void 0,xt=void 0,bn,Xe=Fe.scrollHeight;if(Bt==="border-box"?Xe+=qt:Bt==="content-box"&&(Xe-=wt),Ht!==null||ye!==null){Fe.value=" ";var Me=Fe.scrollHeight-wt;Ht!==null&&(gt=Me*Ht,Bt==="border-box"&&(gt=gt+wt+qt),Xe=Math.max(gt,Xe)),ye!==null&&(xt=Me*ye,Bt==="border-box"&&(xt=xt+wt+qt),bn=Xe>xt?"":"hidden",Xe=Math.min(xt,Xe))}var ke={height:Xe,overflowY:bn,resize:"none"};return gt&&(ke.minHeight=gt),xt&&(ke.maxHeight=xt),ke}var Ue=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Dt=0,me=1,Ee=2,Ke=yt.forwardRef(function(Ot,Qt){var Ht=Ot,ye=Ht.prefixCls,fe=Ht.defaultValue,wt=Ht.value,qt=Ht.autoSize,Bt=Ht.onResize,We=Ht.className,gt=Ht.style,xt=Ht.disabled,bn=Ht.onChange,Xe=Ht.onInternalAutoSize,Me=(0,he.Z)(Ht,Ue),ke=(0,Ce.Z)(fe,{value:wt,postState:function(hn){return hn!=null?hn:""}}),Ve=(0,be.Z)(ke,2),st=Ve[0],Be=Ve[1],tt=function(hn){Be(hn.target.value),bn==null||bn(hn)},et=yt.useRef();yt.useImperativeHandle(Qt,function(){return{textArea:et.current}});var Oe=yt.useMemo(function(){return qt&&(0,Je.Z)(qt)==="object"?[qt.minRows,qt.maxRows]:[]},[qt]),dt=(0,be.Z)(Oe,2),ut=dt[0],ve=dt[1],ct=!!qt,Yt=function(){try{if(document.activeElement===et.current){var hn=et.current,Nn=hn.selectionStart,Wt=hn.selectionEnd,Ln=hn.scrollTop;et.current.setSelectionRange(Nn,Wt),et.current.scrollTop=Ln}}catch(nr){}},Vt=yt.useState(Ee),oe=(0,be.Z)(Vt,2),ee=oe[0],z=oe[1],re=yt.useState(),le=(0,be.Z)(re,2),ne=le[0],xe=le[1],ot=function(){z(Dt)};(0,Re.Z)(function(){ct&&ot()},[wt,ut,ve,ct]),(0,Re.Z)(function(){if(ee===Dt)z(me);else if(ee===me){var _t=He(et.current,!1,ut,ve);z(Ee),xe(_t)}else Yt()},[ee]);var ft=yt.useRef(),nt=function(){Pe.Z.cancel(ft.current)},Le=function(hn){ee===Ee&&(Bt==null||Bt(hn),qt&&(nt(),ft.current=(0,Pe.Z)(function(){ot()})))};yt.useEffect(function(){return nt},[]);var Gt=ct?ne:null,Lt=(0,Ie.Z)((0,Ie.Z)({},gt),Gt);return(ee===Dt||ee===me)&&(Lt.overflowY="hidden",Lt.overflowX="hidden"),yt.createElement(Ye.Z,{onResize:Le,disabled:!(qt||Bt)},yt.createElement("textarea",(0,ae.Z)({},Me,{ref:et,style:Lt,className:Qe()(ye,We,(0,je.Z)({},"".concat(ye,"-disabled"),xt)),disabled:xt,value:st,onChange:tt})))}),Se=Ke,$e=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ze=yt.forwardRef(function(Ot,Qt){var Ht,ye=Ot.defaultValue,fe=Ot.value,wt=Ot.onFocus,qt=Ot.onBlur,Bt=Ot.onChange,We=Ot.allowClear,gt=Ot.maxLength,xt=Ot.onCompositionStart,bn=Ot.onCompositionEnd,Xe=Ot.suffix,Me=Ot.prefixCls,ke=Me===void 0?"rc-textarea":Me,Ve=Ot.showCount,st=Ot.count,Be=Ot.className,tt=Ot.style,et=Ot.disabled,Oe=Ot.hidden,dt=Ot.classNames,ut=Ot.styles,ve=Ot.onResize,ct=Ot.onClear,Yt=Ot.onPressEnter,Vt=Ot.readOnly,oe=Ot.autoSize,ee=Ot.onKeyDown,z=(0,he.Z)(Ot,$e),re=(0,Ce.Z)(ye,{value:fe,defaultValue:ye}),le=(0,be.Z)(re,2),ne=le[0],xe=le[1],ot=ne==null?"":String(ne),ft=yt.useState(!1),nt=(0,be.Z)(ft,2),Le=nt[0],Gt=nt[1],Lt=yt.useRef(!1),_t=yt.useState(null),hn=(0,be.Z)(_t,2),Nn=hn[0],Wt=hn[1],Ln=(0,yt.useRef)(null),nr=(0,yt.useRef)(null),$n=function(){var un;return(un=nr.current)===null||un===void 0?void 0:un.textArea},It=function(){$n().focus()};(0,yt.useImperativeHandle)(Qt,function(){var kt;return{resizableTextArea:nr.current,focus:It,blur:function(){$n().blur()},nativeElement:((kt=Ln.current)===null||kt===void 0?void 0:kt.nativeElement)||$n()}}),(0,yt.useEffect)(function(){Gt(function(kt){return!et&&kt})},[et]);var Mt=yt.useState(null),At=(0,be.Z)(Mt,2),Cn=At[0],Sn=At[1];yt.useEffect(function(){if(Cn){var kt;(kt=$n()).setSelectionRange.apply(kt,(0,at.Z)(Cn))}},[Cn]);var Wn=(0,de.Z)(st,Ve),rr=(Ht=Wn.max)!==null&&Ht!==void 0?Ht:gt,gn=Number(rr)>0,Jt=Wn.strategy(ot),Bn=!!rr&&Jt>rr,Sr=function(un,qn){var kr=qn;!Lt.current&&Wn.exceedFormatter&&Wn.max&&Wn.strategy(qn)>Wn.max&&(kr=Wn.exceedFormatter(qn,{max:Wn.max}),qn!==kr&&Sn([$n().selectionStart||0,$n().selectionEnd||0])),xe(kr),(0,Ne.rJ)(un.currentTarget,un,Bt,kr)},rn=function(un){Lt.current=!0,xt==null||xt(un)},Mn=function(un){Lt.current=!1,Sr(un,un.currentTarget.value),bn==null||bn(un)},Rn=function(un){Sr(un,un.target.value)},Hn=function(un){un.key==="Enter"&&Yt&&Yt(un),ee==null||ee(un)},Er=function(un){Gt(!0),wt==null||wt(un)},mr=function(un){Gt(!1),qt==null||qt(un)},Or=function(un){xe(""),It(),(0,Ne.rJ)($n(),un,Bt)},yr=Xe,ur;Wn.show&&(Wn.showFormatter?ur=Wn.showFormatter({value:ot,count:Jt,maxLength:rr}):ur="".concat(Jt).concat(gn?" / ".concat(rr):""),yr=yt.createElement(yt.Fragment,null,yr,yt.createElement("span",{className:Qe()("".concat(ke,"-data-count"),dt==null?void 0:dt.count),style:ut==null?void 0:ut.count},ur)));var Mr=function(un){var qn;ve==null||ve(un),(qn=$n())!==null&&qn!==void 0&&qn.style.height&&Wt(!0)},vn=!oe&&!Ve&&!We;return yt.createElement(we.BaseInput,{ref:Ln,value:ot,allowClear:We,handleReset:Or,suffix:yr,prefixCls:ke,classNames:(0,Ie.Z)((0,Ie.Z)({},dt),{},{affixWrapper:Qe()(dt==null?void 0:dt.affixWrapper,(0,je.Z)((0,je.Z)({},"".concat(ke,"-show-count"),Ve),"".concat(ke,"-textarea-allow-clear"),We))}),disabled:et,focused:Le,className:Qe()(Be,Bn&&"".concat(ke,"-out-of-range")),style:(0,Ie.Z)((0,Ie.Z)({},tt),Nn&&!vn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ur=="string"?ur:void 0}},hidden:Oe,readOnly:Vt,onClear:ct},yt.createElement(Se,(0,ae.Z)({},z,{autoSize:oe,maxLength:gt,onKeyDown:Hn,onChange:Rn,onFocus:Er,onBlur:mr,onCompositionStart:rn,onCompositionEnd:Mn,className:Qe()(dt==null?void 0:dt.textarea),style:(0,Ie.Z)((0,Ie.Z)({},ut==null?void 0:ut.textarea),{},{resize:tt==null?void 0:tt.resize}),disabled:et,prefixCls:ke,onResize:Mr,ref:nr,readOnly:Vt})))}),lt=Ze,nn=lt},639:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return St}});var ae=ue(54476),je=ue(20068),Ie=ue(33885),at=ue(42978),be=ue(75931),he=ue(59301),De=ue(92310),Qe=ue.n(De),we=ue(26112),de=ue(30699),Ne=function(ge){for(var He=ge.prefixCls,Ue=ge.level,Dt=ge.isStart,me=ge.isEnd,Ee="".concat(He,"-indent-unit"),Ke=[],Se=0;Se<Ue;Se+=1)Ke.push(he.createElement("span",{key:Se,className:Qe()(Ee,(0,je.Z)((0,je.Z)({},"".concat(Ee,"-start"),Dt[Se]),"".concat(Ee,"-end"),me[Se]))}));return he.createElement("span",{"aria-hidden":"true",className:"".concat(He,"-indent")},Ke)},Ce=he.memo(Ne),yt=ue(65065),Je=ue(34061),Ye=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Re="open",Pe="close",vt="---",mt=function(ge){var He,Ue,Dt,me=ge.eventKey,Ee=ge.className,Ke=ge.style,Se=ge.dragOver,$e=ge.dragOverGapTop,Ze=ge.dragOverGapBottom,lt=ge.isLeaf,nn=ge.isStart,Ot=ge.isEnd,Qt=ge.expanded,Ht=ge.selected,ye=ge.checked,fe=ge.halfChecked,wt=ge.loading,qt=ge.domRef,Bt=ge.active,We=ge.data,gt=ge.onMouseMove,xt=ge.selectable,bn=(0,be.Z)(ge,Ye),Xe=he.useContext(de.k),Me=he.useContext(de.y),ke=he.useRef(null),Ve=he.useState(!1),st=(0,at.Z)(Ve,2),Be=st[0],tt=st[1],et=!!(Xe.disabled||ge.disabled||(He=Me.nodeDisabled)!==null&&He!==void 0&&He.call(Me,We)),Oe=he.useMemo(function(){return!Xe.checkable||ge.checkable===!1?!1:Xe.checkable},[Xe.checkable,ge.checkable]),dt=function(Jt){et||Xe.onNodeSelect(Jt,(0,Je.F)(ge))},ut=function(Jt){et||!Oe||ge.disableCheckbox||Xe.onNodeCheck(Jt,(0,Je.F)(ge),!ye)},ve=he.useMemo(function(){return typeof xt=="boolean"?xt:Xe.selectable},[xt,Xe.selectable]),ct=function(Jt){Xe.onNodeClick(Jt,(0,Je.F)(ge)),ve?dt(Jt):ut(Jt)},Yt=function(Jt){Xe.onNodeDoubleClick(Jt,(0,Je.F)(ge))},Vt=function(Jt){Xe.onNodeMouseEnter(Jt,(0,Je.F)(ge))},oe=function(Jt){Xe.onNodeMouseLeave(Jt,(0,Je.F)(ge))},ee=function(Jt){Xe.onNodeContextMenu(Jt,(0,Je.F)(ge))},z=he.useMemo(function(){return!!(Xe.draggable&&(!Xe.draggable.nodeDraggable||Xe.draggable.nodeDraggable(We)))},[Xe.draggable,We]),re=function(Jt){Jt.stopPropagation(),tt(!0),Xe.onNodeDragStart(Jt,ge);try{Jt.dataTransfer.setData("text/plain","")}catch(Bn){}},le=function(Jt){Jt.preventDefault(),Jt.stopPropagation(),Xe.onNodeDragEnter(Jt,ge)},ne=function(Jt){Jt.preventDefault(),Jt.stopPropagation(),Xe.onNodeDragOver(Jt,ge)},xe=function(Jt){Jt.stopPropagation(),Xe.onNodeDragLeave(Jt,ge)},ot=function(Jt){Jt.stopPropagation(),tt(!1),Xe.onNodeDragEnd(Jt,ge)},ft=function(Jt){Jt.preventDefault(),Jt.stopPropagation(),tt(!1),Xe.onNodeDrop(Jt,ge)},nt=function(Jt){wt||Xe.onNodeExpand(Jt,(0,Je.F)(ge))},Le=he.useMemo(function(){var gn=(0,yt.Z)(Xe.keyEntities,me)||{},Jt=gn.children;return!!(Jt||[]).length},[Xe.keyEntities,me]),Gt=he.useMemo(function(){return lt===!1?!1:lt||!Xe.loadData&&!Le||Xe.loadData&&ge.loaded&&!Le},[lt,Xe.loadData,Le,ge.loaded]);he.useEffect(function(){wt||typeof Xe.loadData=="function"&&Qt&&!Gt&&!ge.loaded&&Xe.onNodeLoad((0,Je.F)(ge))},[wt,Xe.loadData,Xe.onNodeLoad,Qt,Gt,ge]);var Lt=he.useMemo(function(){var gn;return(gn=Xe.draggable)!==null&&gn!==void 0&&gn.icon?he.createElement("span",{className:"".concat(Xe.prefixCls,"-draggable-icon")},Xe.draggable.icon):null},[Xe.draggable]),_t=function(Jt){var Bn=ge.switcherIcon||Xe.switcherIcon;return typeof Bn=="function"?Bn((0,Ie.Z)((0,Ie.Z)({},ge),{},{isLeaf:Jt})):Bn},hn=function(){if(Gt){var Jt=_t(!0);return Jt!==!1?he.createElement("span",{className:Qe()("".concat(Xe.prefixCls,"-switcher"),"".concat(Xe.prefixCls,"-switcher-noop"))},Jt):null}var Bn=_t(!1);return Bn!==!1?he.createElement("span",{onClick:nt,className:Qe()("".concat(Xe.prefixCls,"-switcher"),"".concat(Xe.prefixCls,"-switcher_").concat(Qt?Re:Pe))},Bn):null},Nn=he.useMemo(function(){if(!Oe)return null;var gn=typeof Oe!="boolean"?Oe:null;return he.createElement("span",{className:Qe()("".concat(Xe.prefixCls,"-checkbox"),(0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Xe.prefixCls,"-checkbox-checked"),ye),"".concat(Xe.prefixCls,"-checkbox-indeterminate"),!ye&&fe),"".concat(Xe.prefixCls,"-checkbox-disabled"),et||ge.disableCheckbox)),onClick:ut,role:"checkbox","aria-checked":fe?"mixed":ye,"aria-disabled":et||ge.disableCheckbox,"aria-label":"Select ".concat(typeof ge.title=="string"?ge.title:"tree node")},gn)},[Oe,ye,fe,et,ge.disableCheckbox,ge.title]),Wt=he.useMemo(function(){return Gt?null:Qt?Re:Pe},[Gt,Qt]),Ln=he.useMemo(function(){return he.createElement("span",{className:Qe()("".concat(Xe.prefixCls,"-iconEle"),"".concat(Xe.prefixCls,"-icon__").concat(Wt||"docu"),(0,je.Z)({},"".concat(Xe.prefixCls,"-icon_loading"),wt))})},[Xe.prefixCls,Wt,wt]),nr=he.useMemo(function(){var gn=!!Xe.draggable,Jt=!ge.disabled&&gn&&Xe.dragOverNodeKey===me;return Jt?Xe.dropIndicatorRender({dropPosition:Xe.dropPosition,dropLevelOffset:Xe.dropLevelOffset,indent:Xe.indent,prefixCls:Xe.prefixCls,direction:Xe.direction}):null},[Xe.dropPosition,Xe.dropLevelOffset,Xe.indent,Xe.prefixCls,Xe.direction,Xe.draggable,Xe.dragOverNodeKey,Xe.dropIndicatorRender]),$n=he.useMemo(function(){var gn=ge.title,Jt=gn===void 0?vt:gn,Bn="".concat(Xe.prefixCls,"-node-content-wrapper"),Sr;if(Xe.showIcon){var rn=ge.icon||Xe.icon;Sr=rn?he.createElement("span",{className:Qe()("".concat(Xe.prefixCls,"-iconEle"),"".concat(Xe.prefixCls,"-icon__customize"))},typeof rn=="function"?rn(ge):rn):Ln}else Xe.loadData&&wt&&(Sr=Ln);var Mn;return typeof Jt=="function"?Mn=Jt(We):Xe.titleRender?Mn=Xe.titleRender(We):Mn=Jt,he.createElement("span",{ref:ke,title:typeof Jt=="string"?Jt:"",className:Qe()(Bn,"".concat(Bn,"-").concat(Wt||"normal"),(0,je.Z)({},"".concat(Xe.prefixCls,"-node-selected"),!et&&(Ht||Be))),onMouseEnter:Vt,onMouseLeave:oe,onContextMenu:ee,onClick:ct,onDoubleClick:Yt},Sr,he.createElement("span",{className:"".concat(Xe.prefixCls,"-title")},Mn),nr)},[Xe.prefixCls,Xe.showIcon,ge,Xe.icon,Ln,Xe.titleRender,We,Wt,Vt,oe,ee,ct,Yt]),It=(0,we.Z)(bn,{aria:!0,data:!0}),Mt=(0,yt.Z)(Xe.keyEntities,me)||{},At=Mt.level,Cn=Ot[Ot.length-1],Sn=!et&&z,Wn=Xe.draggingNodeKey===me,rr=xt!==void 0?{"aria-selected":!!xt}:void 0;return he.createElement("div",(0,ae.Z)({ref:qt,role:"treeitem","aria-expanded":lt?void 0:Qt,className:Qe()(Ee,"".concat(Xe.prefixCls,"-treenode"),(Dt={},(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)(Dt,"".concat(Xe.prefixCls,"-treenode-disabled"),et),"".concat(Xe.prefixCls,"-treenode-switcher-").concat(Qt?"open":"close"),!lt),"".concat(Xe.prefixCls,"-treenode-checkbox-checked"),ye),"".concat(Xe.prefixCls,"-treenode-checkbox-indeterminate"),fe),"".concat(Xe.prefixCls,"-treenode-selected"),Ht),"".concat(Xe.prefixCls,"-treenode-loading"),wt),"".concat(Xe.prefixCls,"-treenode-active"),Bt),"".concat(Xe.prefixCls,"-treenode-leaf-last"),Cn),"".concat(Xe.prefixCls,"-treenode-draggable"),z),"dragging",Wn),(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)(Dt,"drop-target",Xe.dropTargetKey===me),"drop-container",Xe.dropContainerKey===me),"drag-over",!et&&Se),"drag-over-gap-top",!et&&$e),"drag-over-gap-bottom",!et&&Ze),"filter-node",(Ue=Xe.filterTreeNode)===null||Ue===void 0?void 0:Ue.call(Xe,(0,Je.F)(ge))),"".concat(Xe.prefixCls,"-treenode-leaf"),Gt))),style:Ke,draggable:Sn,onDragStart:Sn?re:void 0,onDragEnter:z?le:void 0,onDragOver:z?ne:void 0,onDragLeave:z?xe:void 0,onDrop:z?ft:void 0,onDragEnd:z?ot:void 0,onMouseMove:gt},rr,It),he.createElement(Ce,{prefixCls:Xe.prefixCls,level:At,isStart:nn,isEnd:Ot}),Lt,hn(),Nn,$n)};mt.isTreeNode=1;var St=mt},30699:function(cn,an,ue){"use strict";ue.d(an,{k:function(){return je},y:function(){return Ie}});var ae=ue(59301),je=ae.createContext(null),Ie=ae.createContext({})},3741:function(cn,an,ue){"use strict";ue.d(an,{OF:function(){return me.Z},y6:function(){return Pe.y},ZP:function(){return et}});var ae=ue(54476),je=ue(76190),Ie=ue(33885),at=ue(94480),be=ue(67732),he=ue(83652),De=ue(31226),Qe=ue(42403),we=ue(158),de=ue(20068),Ne=ue(92310),Ce=ue.n(Ne),yt=ue(10228),Je=ue(26112),Ye=ue(48736),Re=ue(59301),Pe=ue(30699),vt=function(dt){var ut=dt.dropPosition,ve=dt.dropLevelOffset,ct=dt.indent,Yt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(ut){case-1:Yt.top=0,Yt.left=-ve*ct;break;case 1:Yt.bottom=0,Yt.left=-ve*ct;break;case 0:Yt.bottom=0,Yt.left=ct;break}return Re.createElement("div",{style:Yt})},mt=vt;function St(Oe){if(Oe==null)throw new TypeError("Cannot destructure "+Oe)}var Fe=ue(42978),ge=ue(75931),He=ue(34280),Ue=ue(48911),Dt=ue(77900),me=ue(639);function Ee(Oe,dt){var ut=Re.useState(!1),ve=(0,Fe.Z)(ut,2),ct=ve[0],Yt=ve[1];(0,He.Z)(function(){if(ct)return Oe(),function(){dt()}},[ct]),(0,He.Z)(function(){return Yt(!0),function(){Yt(!1)}},[])}var Ke=Ee,Se=ue(34061),$e=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ze=Re.forwardRef(function(Oe,dt){var ut=Oe.className,ve=Oe.style,ct=Oe.motion,Yt=Oe.motionNodes,Vt=Oe.motionType,oe=Oe.onMotionStart,ee=Oe.onMotionEnd,z=Oe.active,re=Oe.treeNodeRequiredProps,le=(0,ge.Z)(Oe,$e),ne=Re.useState(!0),xe=(0,Fe.Z)(ne,2),ot=xe[0],ft=xe[1],nt=Re.useContext(Pe.k),Le=nt.prefixCls,Gt=Yt&&Vt!=="hide";(0,He.Z)(function(){Yt&&Gt!==ot&&ft(Gt)},[Yt]);var Lt=function(){Yt&&oe()},_t=Re.useRef(!1),hn=function(){Yt&&!_t.current&&(_t.current=!0,ee())};Ke(Lt,hn);var Nn=function(Ln){Gt===Ln&&hn()};return Yt?Re.createElement(Dt.default,(0,ae.Z)({ref:dt,visible:ot},ct,{motionAppear:Vt==="show",onVisibleChanged:Nn}),function(Wt,Ln){var nr=Wt.className,$n=Wt.style;return Re.createElement("div",{ref:Ln,className:Ce()("".concat(Le,"-treenode-motion"),nr),style:$n},Yt.map(function(It){var Mt=Object.assign({},(St(It.data),It.data)),At=It.title,Cn=It.key,Sn=It.isStart,Wn=It.isEnd;delete Mt.children;var rr=(0,Se.H8)(Cn,re);return Re.createElement(me.Z,(0,ae.Z)({},Mt,rr,{title:At,active:z,data:It.data,key:Cn,isStart:Sn,isEnd:Wn}))}))}):Re.createElement(me.Z,(0,ae.Z)({domRef:dt,className:ut,style:ve},le,{active:z}))}),lt=Ze;function nn(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ut=Oe.length,ve=dt.length;if(Math.abs(ut-ve)!==1)return{add:!1,key:null};function ct(Yt,Vt){var oe=new Map;Yt.forEach(function(z){oe.set(z,!0)});var ee=Vt.filter(function(z){return!oe.has(z)});return ee.length===1?ee[0]:null}return ut<ve?{add:!0,key:ct(Oe,dt)}:{add:!1,key:ct(dt,Oe)}}function Ot(Oe,dt,ut){var ve=Oe.findIndex(function(oe){return oe.key===ut}),ct=Oe[ve+1],Yt=dt.findIndex(function(oe){return oe.key===ut});if(ct){var Vt=dt.findIndex(function(oe){return oe.key===ct.key});return dt.slice(Yt+1,Vt)}return dt.slice(Yt+1)}var Qt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Ht={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ye=function(){},fe="RC_TREE_MOTION_".concat(Math.random()),wt={key:fe},qt={key:fe,level:0,index:0,pos:"0",node:wt,nodes:[wt]},Bt={parent:null,children:[],pos:qt.pos,data:wt,title:null,key:fe,isStart:[],isEnd:[]};function We(Oe,dt,ut,ve){return dt===!1||!ut?Oe:Oe.slice(0,Math.ceil(ut/ve)+1)}function gt(Oe){var dt=Oe.key,ut=Oe.pos;return(0,Se.km)(dt,ut)}function xt(Oe){for(var dt=String(Oe.data.key),ut=Oe;ut.parent;)ut=ut.parent,dt="".concat(ut.data.key," > ").concat(dt);return dt}var bn=Re.forwardRef(function(Oe,dt){var ut=Oe.prefixCls,ve=Oe.data,ct=Oe.selectable,Yt=Oe.checkable,Vt=Oe.expandedKeys,oe=Oe.selectedKeys,ee=Oe.checkedKeys,z=Oe.loadedKeys,re=Oe.loadingKeys,le=Oe.halfCheckedKeys,ne=Oe.keyEntities,xe=Oe.disabled,ot=Oe.dragging,ft=Oe.dragOverNodeKey,nt=Oe.dropPosition,Le=Oe.motion,Gt=Oe.height,Lt=Oe.itemHeight,_t=Oe.virtual,hn=Oe.scrollWidth,Nn=Oe.focusable,Wt=Oe.activeItem,Ln=Oe.focused,nr=Oe.tabIndex,$n=Oe.onKeyDown,It=Oe.onFocus,Mt=Oe.onBlur,At=Oe.onActiveChange,Cn=Oe.onListChangeStart,Sn=Oe.onListChangeEnd,Wn=(0,ge.Z)(Oe,Qt),rr=Re.useRef(null),gn=Re.useRef(null);Re.useImperativeHandle(dt,function(){return{scrollTo:function(pn){rr.current.scrollTo(pn)},getIndentWidth:function(){return gn.current.offsetWidth}}});var Jt=Re.useState(Vt),Bn=(0,Fe.Z)(Jt,2),Sr=Bn[0],rn=Bn[1],Mn=Re.useState(ve),Rn=(0,Fe.Z)(Mn,2),Hn=Rn[0],Er=Rn[1],mr=Re.useState(ve),Or=(0,Fe.Z)(mr,2),yr=Or[0],ur=Or[1],Mr=Re.useState([]),vn=(0,Fe.Z)(Mr,2),kt=vn[0],un=vn[1],qn=Re.useState(null),kr=(0,Fe.Z)(qn,2),_e=kr[0],Ge=kr[1],ln=Re.useRef(ve);ln.current=ve;function Kt(){var dn=ln.current;Er(dn),ur(dn),un([]),Ge(null),Sn()}(0,He.Z)(function(){rn(Vt);var dn=nn(Sr,Vt);if(dn.key!==null)if(dn.add){var pn=Hn.findIndex(function(Tn){var Fn=Tn.key;return Fn===dn.key}),En=We(Ot(Hn,ve,dn.key),_t,Gt,Lt),mn=Hn.slice();mn.splice(pn+1,0,Bt),ur(mn),un(En),Ge("show")}else{var kn=ve.findIndex(function(Tn){var Fn=Tn.key;return Fn===dn.key}),$t=We(Ot(ve,Hn,dn.key),_t,Gt,Lt),Ft=ve.slice();Ft.splice(kn+1,0,Bt),ur(Ft),un($t),Ge("hide")}else Hn!==ve&&(Er(ve),ur(ve))},[Vt,ve]),Re.useEffect(function(){ot||Kt()},[ot]);var qe=Le?yr:ve,Xt={expandedKeys:Vt,selectedKeys:oe,loadedKeys:z,loadingKeys:re,checkedKeys:ee,halfCheckedKeys:le,dragOverNodeKey:ft,dropPosition:nt,keyEntities:ne};return Re.createElement(Re.Fragment,null,Ln&&Wt&&Re.createElement("span",{style:Ht,"aria-live":"assertive"},xt(Wt)),Re.createElement("div",null,Re.createElement("input",{style:Ht,disabled:Nn===!1||xe,tabIndex:Nn!==!1?nr:null,onKeyDown:$n,onFocus:It,onBlur:Mt,value:"",onChange:ye,"aria-label":"for screen reader"})),Re.createElement("div",{className:"".concat(ut,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},Re.createElement("div",{className:"".concat(ut,"-indent")},Re.createElement("div",{ref:gn,className:"".concat(ut,"-indent-unit")}))),Re.createElement(Ue.Z,(0,ae.Z)({},Wn,{data:qe,itemKey:gt,height:Gt,fullHeight:!1,virtual:_t,itemHeight:Lt,scrollWidth:hn,prefixCls:"".concat(ut,"-list"),ref:rr,role:"tree",onVisibleChange:function(pn){pn.every(function(En){return gt(En)!==fe})&&Kt()}}),function(dn){var pn=dn.pos,En=Object.assign({},(St(dn.data),dn.data)),mn=dn.title,kn=dn.key,$t=dn.isStart,Ft=dn.isEnd,Tn=(0,Se.km)(kn,pn);delete En.key,delete En.children;var Fn=(0,Se.H8)(Tn,Xt);return Re.createElement(lt,(0,ae.Z)({},En,Fn,{title:mn,active:!!Wt&&kn===Wt.key,pos:pn,data:dn.data,isStart:$t,isEnd:Ft,motion:Le,motionNodes:kn===fe?kt:null,motionType:_e,onMotionStart:Cn,onMotionEnd:Kt,treeNodeRequiredProps:Xt,onMouseMove:function(){At(null)}}))}))}),Xe=bn,Me=ue(82661),ke=ue(34643),Ve=ue(65065),st=10,Be=function(Oe){(0,Qe.Z)(ut,Oe);var dt=(0,we.Z)(ut);function ut(){var ve;(0,be.Z)(this,ut);for(var ct=arguments.length,Yt=new Array(ct),Vt=0;Vt<ct;Vt++)Yt[Vt]=arguments[Vt];return ve=dt.call.apply(dt,[this].concat(Yt)),(0,de.Z)((0,De.Z)(ve),"destroyed",!1),(0,de.Z)((0,De.Z)(ve),"delayedDragEnterLogic",void 0),(0,de.Z)((0,De.Z)(ve),"loadingRetryTimes",{}),(0,de.Z)((0,De.Z)(ve),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Se.w$)()}),(0,de.Z)((0,De.Z)(ve),"dragStartMousePosition",null),(0,de.Z)((0,De.Z)(ve),"dragNodeProps",null),(0,de.Z)((0,De.Z)(ve),"currentMouseOverDroppableNodeKey",null),(0,de.Z)((0,De.Z)(ve),"listRef",Re.createRef()),(0,de.Z)((0,De.Z)(ve),"onNodeDragStart",function(oe,ee){var z=ve.state,re=z.expandedKeys,le=z.keyEntities,ne=ve.props.onDragStart,xe=ee.eventKey;ve.dragNodeProps=ee,ve.dragStartMousePosition={x:oe.clientX,y:oe.clientY};var ot=(0,Me._5)(re,xe);ve.setState({draggingNodeKey:xe,dragChildrenKeys:(0,Me.wA)(xe,le),indent:ve.listRef.current.getIndentWidth()}),ve.setExpandedKeys(ot),window.addEventListener("dragend",ve.onWindowDragEnd),ne==null||ne({event:oe,node:(0,Se.F)(ee)})}),(0,de.Z)((0,De.Z)(ve),"onNodeDragEnter",function(oe,ee){var z=ve.state,re=z.expandedKeys,le=z.keyEntities,ne=z.dragChildrenKeys,xe=z.flattenNodes,ot=z.indent,ft=ve.props,nt=ft.onDragEnter,Le=ft.onExpand,Gt=ft.allowDrop,Lt=ft.direction,_t=ee.pos,hn=ee.eventKey;if(ve.currentMouseOverDroppableNodeKey!==hn&&(ve.currentMouseOverDroppableNodeKey=hn),!ve.dragNodeProps){ve.resetDragState();return}var Nn=(0,Me.OM)(oe,ve.dragNodeProps,ee,ot,ve.dragStartMousePosition,Gt,xe,le,re,Lt),Wt=Nn.dropPosition,Ln=Nn.dropLevelOffset,nr=Nn.dropTargetKey,$n=Nn.dropContainerKey,It=Nn.dropTargetPos,Mt=Nn.dropAllowed,At=Nn.dragOverNodeKey;if(ne.includes(nr)||!Mt){ve.resetDragState();return}if(ve.delayedDragEnterLogic||(ve.delayedDragEnterLogic={}),Object.keys(ve.delayedDragEnterLogic).forEach(function(Cn){clearTimeout(ve.delayedDragEnterLogic[Cn])}),ve.dragNodeProps.eventKey!==ee.eventKey&&(oe.persist(),ve.delayedDragEnterLogic[_t]=window.setTimeout(function(){if(ve.state.draggingNodeKey!==null){var Cn=(0,at.Z)(re),Sn=(0,Ve.Z)(le,ee.eventKey);Sn&&(Sn.children||[]).length&&(Cn=(0,Me.L0)(re,ee.eventKey)),ve.props.hasOwnProperty("expandedKeys")||ve.setExpandedKeys(Cn),Le==null||Le(Cn,{node:(0,Se.F)(ee),expanded:!0,nativeEvent:oe.nativeEvent})}},800)),ve.dragNodeProps.eventKey===nr&&Ln===0){ve.resetDragState();return}ve.setState({dragOverNodeKey:At,dropPosition:Wt,dropLevelOffset:Ln,dropTargetKey:nr,dropContainerKey:$n,dropTargetPos:It,dropAllowed:Mt}),nt==null||nt({event:oe,node:(0,Se.F)(ee),expandedKeys:re})}),(0,de.Z)((0,De.Z)(ve),"onNodeDragOver",function(oe,ee){var z=ve.state,re=z.dragChildrenKeys,le=z.flattenNodes,ne=z.keyEntities,xe=z.expandedKeys,ot=z.indent,ft=ve.props,nt=ft.onDragOver,Le=ft.allowDrop,Gt=ft.direction;if(ve.dragNodeProps){var Lt=(0,Me.OM)(oe,ve.dragNodeProps,ee,ot,ve.dragStartMousePosition,Le,le,ne,xe,Gt),_t=Lt.dropPosition,hn=Lt.dropLevelOffset,Nn=Lt.dropTargetKey,Wt=Lt.dropContainerKey,Ln=Lt.dropTargetPos,nr=Lt.dropAllowed,$n=Lt.dragOverNodeKey;re.includes(Nn)||!nr||(ve.dragNodeProps.eventKey===Nn&&hn===0?ve.state.dropPosition===null&&ve.state.dropLevelOffset===null&&ve.state.dropTargetKey===null&&ve.state.dropContainerKey===null&&ve.state.dropTargetPos===null&&ve.state.dropAllowed===!1&&ve.state.dragOverNodeKey===null||ve.resetDragState():_t===ve.state.dropPosition&&hn===ve.state.dropLevelOffset&&Nn===ve.state.dropTargetKey&&Wt===ve.state.dropContainerKey&&Ln===ve.state.dropTargetPos&&nr===ve.state.dropAllowed&&$n===ve.state.dragOverNodeKey||ve.setState({dropPosition:_t,dropLevelOffset:hn,dropTargetKey:Nn,dropContainerKey:Wt,dropTargetPos:Ln,dropAllowed:nr,dragOverNodeKey:$n}),nt==null||nt({event:oe,node:(0,Se.F)(ee)}))}}),(0,de.Z)((0,De.Z)(ve),"onNodeDragLeave",function(oe,ee){ve.currentMouseOverDroppableNodeKey===ee.eventKey&&!oe.currentTarget.contains(oe.relatedTarget)&&(ve.resetDragState(),ve.currentMouseOverDroppableNodeKey=null);var z=ve.props.onDragLeave;z==null||z({event:oe,node:(0,Se.F)(ee)})}),(0,de.Z)((0,De.Z)(ve),"onWindowDragEnd",function(oe){ve.onNodeDragEnd(oe,null,!0),window.removeEventListener("dragend",ve.onWindowDragEnd)}),(0,de.Z)((0,De.Z)(ve),"onNodeDragEnd",function(oe,ee){var z=ve.props.onDragEnd;ve.setState({dragOverNodeKey:null}),ve.cleanDragState(),z==null||z({event:oe,node:(0,Se.F)(ee)}),ve.dragNodeProps=null,window.removeEventListener("dragend",ve.onWindowDragEnd)}),(0,de.Z)((0,De.Z)(ve),"onNodeDrop",function(oe,ee){var z,re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,le=ve.state,ne=le.dragChildrenKeys,xe=le.dropPosition,ot=le.dropTargetKey,ft=le.dropTargetPos,nt=le.dropAllowed;if(nt){var Le=ve.props.onDrop;if(ve.setState({dragOverNodeKey:null}),ve.cleanDragState(),ot!==null){var Gt=(0,Ie.Z)((0,Ie.Z)({},(0,Se.H8)(ot,ve.getTreeNodeRequiredProps())),{},{active:((z=ve.getActiveItem())===null||z===void 0?void 0:z.key)===ot,data:(0,Ve.Z)(ve.state.keyEntities,ot).node}),Lt=ne.includes(ot);(0,Ye.ZP)(!Lt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var _t=(0,Me.yx)(ft),hn={event:oe,node:(0,Se.F)(Gt),dragNode:ve.dragNodeProps?(0,Se.F)(ve.dragNodeProps):null,dragNodesKeys:[ve.dragNodeProps.eventKey].concat(ne),dropToGap:xe!==0,dropPosition:xe+Number(_t[_t.length-1])};re||Le==null||Le(hn),ve.dragNodeProps=null}}}),(0,de.Z)((0,De.Z)(ve),"cleanDragState",function(){var oe=ve.state.draggingNodeKey;oe!==null&&ve.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ve.dragStartMousePosition=null,ve.currentMouseOverDroppableNodeKey=null}),(0,de.Z)((0,De.Z)(ve),"triggerExpandActionExpand",function(oe,ee){var z=ve.state,re=z.expandedKeys,le=z.flattenNodes,ne=ee.expanded,xe=ee.key,ot=ee.isLeaf;if(!(ot||oe.shiftKey||oe.metaKey||oe.ctrlKey)){var ft=le.filter(function(Le){return Le.key===xe})[0],nt=(0,Se.F)((0,Ie.Z)((0,Ie.Z)({},(0,Se.H8)(xe,ve.getTreeNodeRequiredProps())),{},{data:ft.data}));ve.setExpandedKeys(ne?(0,Me._5)(re,xe):(0,Me.L0)(re,xe)),ve.onNodeExpand(oe,nt)}}),(0,de.Z)((0,De.Z)(ve),"onNodeClick",function(oe,ee){var z=ve.props,re=z.onClick,le=z.expandAction;le==="click"&&ve.triggerExpandActionExpand(oe,ee),re==null||re(oe,ee)}),(0,de.Z)((0,De.Z)(ve),"onNodeDoubleClick",function(oe,ee){var z=ve.props,re=z.onDoubleClick,le=z.expandAction;le==="doubleClick"&&ve.triggerExpandActionExpand(oe,ee),re==null||re(oe,ee)}),(0,de.Z)((0,De.Z)(ve),"onNodeSelect",function(oe,ee){var z=ve.state.selectedKeys,re=ve.state,le=re.keyEntities,ne=re.fieldNames,xe=ve.props,ot=xe.onSelect,ft=xe.multiple,nt=ee.selected,Le=ee[ne.key],Gt=!nt;Gt?ft?z=(0,Me.L0)(z,Le):z=[Le]:z=(0,Me._5)(z,Le);var Lt=z.map(function(_t){var hn=(0,Ve.Z)(le,_t);return hn?hn.node:null}).filter(Boolean);ve.setUncontrolledState({selectedKeys:z}),ot==null||ot(z,{event:"select",selected:Gt,node:ee,selectedNodes:Lt,nativeEvent:oe.nativeEvent})}),(0,de.Z)((0,De.Z)(ve),"onNodeCheck",function(oe,ee,z){var re=ve.state,le=re.keyEntities,ne=re.checkedKeys,xe=re.halfCheckedKeys,ot=ve.props,ft=ot.checkStrictly,nt=ot.onCheck,Le=ee.key,Gt,Lt={event:"check",node:ee,checked:z,nativeEvent:oe.nativeEvent};if(ft){var _t=z?(0,Me.L0)(ne,Le):(0,Me._5)(ne,Le),hn=(0,Me._5)(xe,Le);Gt={checked:_t,halfChecked:hn},Lt.checkedNodes=_t.map(function(It){return(0,Ve.Z)(le,It)}).filter(Boolean).map(function(It){return It.node}),ve.setUncontrolledState({checkedKeys:_t})}else{var Nn=(0,ke.S)([].concat((0,at.Z)(ne),[Le]),!0,le),Wt=Nn.checkedKeys,Ln=Nn.halfCheckedKeys;if(!z){var nr=new Set(Wt);nr.delete(Le);var $n=(0,ke.S)(Array.from(nr),{checked:!1,halfCheckedKeys:Ln},le);Wt=$n.checkedKeys,Ln=$n.halfCheckedKeys}Gt=Wt,Lt.checkedNodes=[],Lt.checkedNodesPositions=[],Lt.halfCheckedKeys=Ln,Wt.forEach(function(It){var Mt=(0,Ve.Z)(le,It);if(Mt){var At=Mt.node,Cn=Mt.pos;Lt.checkedNodes.push(At),Lt.checkedNodesPositions.push({node:At,pos:Cn})}}),ve.setUncontrolledState({checkedKeys:Wt},!1,{halfCheckedKeys:Ln})}nt==null||nt(Gt,Lt)}),(0,de.Z)((0,De.Z)(ve),"onNodeLoad",function(oe){var ee,z=oe.key,re=ve.state.keyEntities,le=(0,Ve.Z)(re,z);if(!(le!=null&&(ee=le.children)!==null&&ee!==void 0&&ee.length)){var ne=new Promise(function(xe,ot){ve.setState(function(ft){var nt=ft.loadedKeys,Le=nt===void 0?[]:nt,Gt=ft.loadingKeys,Lt=Gt===void 0?[]:Gt,_t=ve.props,hn=_t.loadData,Nn=_t.onLoad;if(!hn||Le.includes(z)||Lt.includes(z))return null;var Wt=hn(oe);return Wt.then(function(){var Ln=ve.state.loadedKeys,nr=(0,Me.L0)(Ln,z);Nn==null||Nn(nr,{event:"load",node:oe}),ve.setUncontrolledState({loadedKeys:nr}),ve.setState(function($n){return{loadingKeys:(0,Me._5)($n.loadingKeys,z)}}),xe()}).catch(function(Ln){if(ve.setState(function($n){return{loadingKeys:(0,Me._5)($n.loadingKeys,z)}}),ve.loadingRetryTimes[z]=(ve.loadingRetryTimes[z]||0)+1,ve.loadingRetryTimes[z]>=st){var nr=ve.state.loadedKeys;(0,Ye.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ve.setUncontrolledState({loadedKeys:(0,Me.L0)(nr,z)}),xe()}ot(Ln)}),{loadingKeys:(0,Me.L0)(Lt,z)}})});return ne.catch(function(){}),ne}}),(0,de.Z)((0,De.Z)(ve),"onNodeMouseEnter",function(oe,ee){var z=ve.props.onMouseEnter;z==null||z({event:oe,node:ee})}),(0,de.Z)((0,De.Z)(ve),"onNodeMouseLeave",function(oe,ee){var z=ve.props.onMouseLeave;z==null||z({event:oe,node:ee})}),(0,de.Z)((0,De.Z)(ve),"onNodeContextMenu",function(oe,ee){var z=ve.props.onRightClick;z&&(oe.preventDefault(),z({event:oe,node:ee}))}),(0,de.Z)((0,De.Z)(ve),"onFocus",function(){var oe=ve.props.onFocus;ve.setState({focused:!0});for(var ee=arguments.length,z=new Array(ee),re=0;re<ee;re++)z[re]=arguments[re];oe==null||oe.apply(void 0,z)}),(0,de.Z)((0,De.Z)(ve),"onBlur",function(){var oe=ve.props.onBlur;ve.setState({focused:!1}),ve.onActiveChange(null);for(var ee=arguments.length,z=new Array(ee),re=0;re<ee;re++)z[re]=arguments[re];oe==null||oe.apply(void 0,z)}),(0,de.Z)((0,De.Z)(ve),"getTreeNodeRequiredProps",function(){var oe=ve.state,ee=oe.expandedKeys,z=oe.selectedKeys,re=oe.loadedKeys,le=oe.loadingKeys,ne=oe.checkedKeys,xe=oe.halfCheckedKeys,ot=oe.dragOverNodeKey,ft=oe.dropPosition,nt=oe.keyEntities;return{expandedKeys:ee||[],selectedKeys:z||[],loadedKeys:re||[],loadingKeys:le||[],checkedKeys:ne||[],halfCheckedKeys:xe||[],dragOverNodeKey:ot,dropPosition:ft,keyEntities:nt}}),(0,de.Z)((0,De.Z)(ve),"setExpandedKeys",function(oe){var ee=ve.state,z=ee.treeData,re=ee.fieldNames,le=(0,Se.oH)(z,oe,re);ve.setUncontrolledState({expandedKeys:oe,flattenNodes:le},!0)}),(0,de.Z)((0,De.Z)(ve),"onNodeExpand",function(oe,ee){var z=ve.state.expandedKeys,re=ve.state,le=re.listChanging,ne=re.fieldNames,xe=ve.props,ot=xe.onExpand,ft=xe.loadData,nt=ee.expanded,Le=ee[ne.key];if(!le){var Gt=z.includes(Le),Lt=!nt;if((0,Ye.ZP)(nt&&Gt||!nt&&!Gt,"Expand state not sync with index check"),z=Lt?(0,Me.L0)(z,Le):(0,Me._5)(z,Le),ve.setExpandedKeys(z),ot==null||ot(z,{node:ee,expanded:Lt,nativeEvent:oe.nativeEvent}),Lt&&ft){var _t=ve.onNodeLoad(ee);_t&&_t.then(function(){var hn=(0,Se.oH)(ve.state.treeData,z,ne);ve.setUncontrolledState({flattenNodes:hn})}).catch(function(){var hn=ve.state.expandedKeys,Nn=(0,Me._5)(hn,Le);ve.setExpandedKeys(Nn)})}}}),(0,de.Z)((0,De.Z)(ve),"onListChangeStart",function(){ve.setUncontrolledState({listChanging:!0})}),(0,de.Z)((0,De.Z)(ve),"onListChangeEnd",function(){setTimeout(function(){ve.setUncontrolledState({listChanging:!1})})}),(0,de.Z)((0,De.Z)(ve),"onActiveChange",function(oe){var ee=ve.state.activeKey,z=ve.props,re=z.onActiveChange,le=z.itemScrollOffset,ne=le===void 0?0:le;ee!==oe&&(ve.setState({activeKey:oe}),oe!==null&&ve.scrollTo({key:oe,offset:ne}),re==null||re(oe))}),(0,de.Z)((0,De.Z)(ve),"getActiveItem",function(){var oe=ve.state,ee=oe.activeKey,z=oe.flattenNodes;return ee===null?null:z.find(function(re){var le=re.key;return le===ee})||null}),(0,de.Z)((0,De.Z)(ve),"offsetActiveKey",function(oe){var ee=ve.state,z=ee.flattenNodes,re=ee.activeKey,le=z.findIndex(function(ot){var ft=ot.key;return ft===re});le===-1&&oe<0&&(le=z.length),le=(le+oe+z.length)%z.length;var ne=z[le];if(ne){var xe=ne.key;ve.onActiveChange(xe)}else ve.onActiveChange(null)}),(0,de.Z)((0,De.Z)(ve),"onKeyDown",function(oe){var ee=ve.state,z=ee.activeKey,re=ee.expandedKeys,le=ee.checkedKeys,ne=ee.fieldNames,xe=ve.props,ot=xe.onKeyDown,ft=xe.checkable,nt=xe.selectable;switch(oe.which){case yt.Z.UP:{ve.offsetActiveKey(-1),oe.preventDefault();break}case yt.Z.DOWN:{ve.offsetActiveKey(1),oe.preventDefault();break}}var Le=ve.getActiveItem();if(Le&&Le.data){var Gt=ve.getTreeNodeRequiredProps(),Lt=Le.data.isLeaf===!1||!!(Le.data[ne.children]||[]).length,_t=(0,Se.F)((0,Ie.Z)((0,Ie.Z)({},(0,Se.H8)(z,Gt)),{},{data:Le.data,active:!0}));switch(oe.which){case yt.Z.LEFT:{Lt&&re.includes(z)?ve.onNodeExpand({},_t):Le.parent&&ve.onActiveChange(Le.parent.key),oe.preventDefault();break}case yt.Z.RIGHT:{Lt&&!re.includes(z)?ve.onNodeExpand({},_t):Le.children&&Le.children.length&&ve.onActiveChange(Le.children[0].key),oe.preventDefault();break}case yt.Z.ENTER:case yt.Z.SPACE:{ft&&!_t.disabled&&_t.checkable!==!1&&!_t.disableCheckbox?ve.onNodeCheck({},_t,!le.includes(z)):!ft&&nt&&!_t.disabled&&_t.selectable!==!1&&ve.onNodeSelect({},_t);break}}}ot==null||ot(oe)}),(0,de.Z)((0,De.Z)(ve),"setUncontrolledState",function(oe){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ve.destroyed){var re=!1,le=!0,ne={};Object.keys(oe).forEach(function(xe){if(ve.props.hasOwnProperty(xe)){le=!1;return}re=!0,ne[xe]=oe[xe]}),re&&(!ee||le)&&ve.setState((0,Ie.Z)((0,Ie.Z)({},ne),z))}}),(0,de.Z)((0,De.Z)(ve),"scrollTo",function(oe){ve.listRef.current.scrollTo(oe)}),ve}return(0,he.Z)(ut,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ct=this.props,Yt=ct.activeKey,Vt=ct.itemScrollOffset,oe=Vt===void 0?0:Vt;Yt!==void 0&&Yt!==this.state.activeKey&&(this.setState({activeKey:Yt}),Yt!==null&&this.scrollTo({key:Yt,offset:oe}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var ct=this.state,Yt=ct.focused,Vt=ct.flattenNodes,oe=ct.keyEntities,ee=ct.draggingNodeKey,z=ct.activeKey,re=ct.dropLevelOffset,le=ct.dropContainerKey,ne=ct.dropTargetKey,xe=ct.dropPosition,ot=ct.dragOverNodeKey,ft=ct.indent,nt=this.props,Le=nt.prefixCls,Gt=nt.className,Lt=nt.style,_t=nt.showLine,hn=nt.focusable,Nn=nt.tabIndex,Wt=Nn===void 0?0:Nn,Ln=nt.selectable,nr=nt.showIcon,$n=nt.icon,It=nt.switcherIcon,Mt=nt.draggable,At=nt.checkable,Cn=nt.checkStrictly,Sn=nt.disabled,Wn=nt.motion,rr=nt.loadData,gn=nt.filterTreeNode,Jt=nt.height,Bn=nt.itemHeight,Sr=nt.scrollWidth,rn=nt.virtual,Mn=nt.titleRender,Rn=nt.dropIndicatorRender,Hn=nt.onContextMenu,Er=nt.onScroll,mr=nt.direction,Or=nt.rootClassName,yr=nt.rootStyle,ur=(0,Je.Z)(this.props,{aria:!0,data:!0}),Mr;Mt&&((0,je.Z)(Mt)==="object"?Mr=Mt:typeof Mt=="function"?Mr={nodeDraggable:Mt}:Mr={});var vn={prefixCls:Le,selectable:Ln,showIcon:nr,icon:$n,switcherIcon:It,draggable:Mr,draggingNodeKey:ee,checkable:At,checkStrictly:Cn,disabled:Sn,keyEntities:oe,dropLevelOffset:re,dropContainerKey:le,dropTargetKey:ne,dropPosition:xe,dragOverNodeKey:ot,indent:ft,direction:mr,dropIndicatorRender:Rn,loadData:rr,filterTreeNode:gn,titleRender:Mn,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return Re.createElement(Pe.k.Provider,{value:vn},Re.createElement("div",{className:Ce()(Le,Gt,Or,(0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(Le,"-show-line"),_t),"".concat(Le,"-focused"),Yt),"".concat(Le,"-active-focused"),z!==null)),style:yr},Re.createElement(Xe,(0,ae.Z)({ref:this.listRef,prefixCls:Le,style:Lt,data:Vt,disabled:Sn,selectable:Ln,checkable:!!At,motion:Wn,dragging:ee!==null,height:Jt,itemHeight:Bn,virtual:rn,focusable:hn,focused:Yt,tabIndex:Wt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Hn,onScroll:Er,scrollWidth:Sr},this.getTreeNodeRequiredProps(),ur))))}}],[{key:"getDerivedStateFromProps",value:function(ct,Yt){var Vt=Yt.prevProps,oe={prevProps:ct};function ee(Wt){return!Vt&&ct.hasOwnProperty(Wt)||Vt&&Vt[Wt]!==ct[Wt]}var z,re=Yt.fieldNames;if(ee("fieldNames")&&(re=(0,Se.w$)(ct.fieldNames),oe.fieldNames=re),ee("treeData")?z=ct.treeData:ee("children")&&((0,Ye.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),z=(0,Se.zn)(ct.children)),z){oe.treeData=z;var le=(0,Se.I8)(z,{fieldNames:re});oe.keyEntities=(0,Ie.Z)((0,de.Z)({},fe,qt),le.keyEntities)}var ne=oe.keyEntities||Yt.keyEntities;if(ee("expandedKeys")||Vt&&ee("autoExpandParent"))oe.expandedKeys=ct.autoExpandParent||!Vt&&ct.defaultExpandParent?(0,Me.r7)(ct.expandedKeys,ne):ct.expandedKeys;else if(!Vt&&ct.defaultExpandAll){var xe=(0,Ie.Z)({},ne);delete xe[fe];var ot=[];Object.keys(xe).forEach(function(Wt){var Ln=xe[Wt];Ln.children&&Ln.children.length&&ot.push(Ln.key)}),oe.expandedKeys=ot}else!Vt&&ct.defaultExpandedKeys&&(oe.expandedKeys=ct.autoExpandParent||ct.defaultExpandParent?(0,Me.r7)(ct.defaultExpandedKeys,ne):ct.defaultExpandedKeys);if(oe.expandedKeys||delete oe.expandedKeys,z||oe.expandedKeys){var ft=(0,Se.oH)(z||Yt.treeData,oe.expandedKeys||Yt.expandedKeys,re);oe.flattenNodes=ft}if(ct.selectable&&(ee("selectedKeys")?oe.selectedKeys=(0,Me.BT)(ct.selectedKeys,ct):!Vt&&ct.defaultSelectedKeys&&(oe.selectedKeys=(0,Me.BT)(ct.defaultSelectedKeys,ct))),ct.checkable){var nt;if(ee("checkedKeys")?nt=(0,Me.E6)(ct.checkedKeys)||{}:!Vt&&ct.defaultCheckedKeys?nt=(0,Me.E6)(ct.defaultCheckedKeys)||{}:z&&(nt=(0,Me.E6)(ct.checkedKeys)||{checkedKeys:Yt.checkedKeys,halfCheckedKeys:Yt.halfCheckedKeys}),nt){var Le=nt,Gt=Le.checkedKeys,Lt=Gt===void 0?[]:Gt,_t=Le.halfCheckedKeys,hn=_t===void 0?[]:_t;if(!ct.checkStrictly){var Nn=(0,ke.S)(Lt,!0,ne);Lt=Nn.checkedKeys,hn=Nn.halfCheckedKeys}oe.checkedKeys=Lt,oe.halfCheckedKeys=hn}}return ee("loadedKeys")&&(oe.loadedKeys=ct.loadedKeys),oe}}]),ut}(Re.Component);(0,de.Z)(Be,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:mt,allowDrop:function(){return!0},expandAction:!1}),(0,de.Z)(Be,"TreeNode",me.Z);var tt=Be,et=tt},82661:function(cn,an,ue){"use strict";ue.d(an,{BT:function(){return Re},E6:function(){return mt},L0:function(){return de},OM:function(){return Ye},_5:function(){return we},r7:function(){return St},wA:function(){return Ce},yx:function(){return Ne}});var ae=ue(94480),je=ue(76190),Ie=ue(48736),at=ue(59301),be=ue(639),he=ue(65065),De=ue(34061),Qe=null;function we(Fe,ge){if(!Fe)return[];var He=Fe.slice(),Ue=He.indexOf(ge);return Ue>=0&&He.splice(Ue,1),He}function de(Fe,ge){var He=(Fe||[]).slice();return He.indexOf(ge)===-1&&He.push(ge),He}function Ne(Fe){return Fe.split("-")}function Ce(Fe,ge){var He=[],Ue=(0,he.Z)(ge,Fe);function Dt(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];me.forEach(function(Ee){var Ke=Ee.key,Se=Ee.children;He.push(Ke),Dt(Se)})}return Dt(Ue.children),He}function yt(Fe){if(Fe.parent){var ge=Ne(Fe.pos);return Number(ge[ge.length-1])===Fe.parent.children.length-1}return!1}function Je(Fe){var ge=Ne(Fe.pos);return Number(ge[ge.length-1])===0}function Ye(Fe,ge,He,Ue,Dt,me,Ee,Ke,Se,$e){var Ze,lt=Fe.clientX,nn=Fe.clientY,Ot=Fe.target.getBoundingClientRect(),Qt=Ot.top,Ht=Ot.height,ye=($e==="rtl"?-1:1)*(((Dt==null?void 0:Dt.x)||0)-lt),fe=(ye-12)/Ue,wt=Se.filter(function(et){var Oe;return(Oe=Ke[et])===null||Oe===void 0||(Oe=Oe.children)===null||Oe===void 0?void 0:Oe.length}),qt=(0,he.Z)(Ke,He.eventKey);if(nn<Qt+Ht/2){var Bt=Ee.findIndex(function(et){return et.key===qt.key}),We=Bt<=0?0:Bt-1,gt=Ee[We].key;qt=(0,he.Z)(Ke,gt)}var xt=qt.key,bn=qt,Xe=qt.key,Me=0,ke=0;if(!wt.includes(xt))for(var Ve=0;Ve<fe&&yt(qt);Ve+=1)qt=qt.parent,ke+=1;var st=ge.data,Be=qt.node,tt=!0;return Je(qt)&&qt.level===0&&nn<Qt+Ht/2&&me({dragNode:st,dropNode:Be,dropPosition:-1})&&qt.key===He.eventKey?Me=-1:(bn.children||[]).length&&wt.includes(Xe)?me({dragNode:st,dropNode:Be,dropPosition:0})?Me=0:tt=!1:ke===0?fe>-1.5?me({dragNode:st,dropNode:Be,dropPosition:1})?Me=1:tt=!1:me({dragNode:st,dropNode:Be,dropPosition:0})?Me=0:me({dragNode:st,dropNode:Be,dropPosition:1})?Me=1:tt=!1:me({dragNode:st,dropNode:Be,dropPosition:1})?Me=1:tt=!1,{dropPosition:Me,dropLevelOffset:ke,dropTargetKey:qt.key,dropTargetPos:qt.pos,dragOverNodeKey:Xe,dropContainerKey:Me===0?null:((Ze=qt.parent)===null||Ze===void 0?void 0:Ze.key)||null,dropAllowed:tt}}function Re(Fe,ge){if(Fe){var He=ge.multiple;return He?Fe.slice():Fe.length?[Fe[0]]:Fe}}var Pe=function(ge){return ge};function vt(Fe,ge){if(!Fe)return[];var He=ge||{},Ue=He.processProps,Dt=Ue===void 0?Pe:Ue,me=Array.isArray(Fe)?Fe:[Fe];return me.map(function(Ee){var Ke=Ee.children,Se=_objectWithoutProperties(Ee,Qe),$e=vt(Ke,ge);return React.createElement(TreeNode,_extends({key:Se.key},Dt(Se)),$e)})}function mt(Fe){if(!Fe)return null;var ge;if(Array.isArray(Fe))ge={checkedKeys:Fe,halfCheckedKeys:void 0};else if((0,je.Z)(Fe)==="object")ge={checkedKeys:Fe.checked||void 0,halfCheckedKeys:Fe.halfChecked||void 0};else return(0,Ie.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ge}function St(Fe,ge){var He=new Set;function Ue(Dt){if(!He.has(Dt)){var me=(0,he.Z)(ge,Dt);if(me){He.add(Dt);var Ee=me.parent,Ke=me.node;Ke.disabled||Ee&&Ue(Ee.key)}}}return(Fe||[]).forEach(function(Dt){Ue(Dt)}),(0,ae.Z)(He)}},34643:function(cn,an,ue){"use strict";ue.d(an,{S:function(){return De}});var ae=ue(48736),je=ue(65065);function Ie(Qe,we){var de=new Set;return Qe.forEach(function(Ne){we.has(Ne)||de.add(Ne)}),de}function at(Qe){var we=Qe||{},de=we.disabled,Ne=we.disableCheckbox,Ce=we.checkable;return!!(de||Ne)||Ce===!1}function be(Qe,we,de,Ne){for(var Ce=new Set(Qe),yt=new Set,Je=0;Je<=de;Je+=1){var Ye=we.get(Je)||new Set;Ye.forEach(function(mt){var St=mt.key,Fe=mt.node,ge=mt.children,He=ge===void 0?[]:ge;Ce.has(St)&&!Ne(Fe)&&He.filter(function(Ue){return!Ne(Ue.node)}).forEach(function(Ue){Ce.add(Ue.key)})})}for(var Re=new Set,Pe=de;Pe>=0;Pe-=1){var vt=we.get(Pe)||new Set;vt.forEach(function(mt){var St=mt.parent,Fe=mt.node;if(!(Ne(Fe)||!mt.parent||Re.has(mt.parent.key))){if(Ne(mt.parent.node)){Re.add(St.key);return}var ge=!0,He=!1;(St.children||[]).filter(function(Ue){return!Ne(Ue.node)}).forEach(function(Ue){var Dt=Ue.key,me=Ce.has(Dt);ge&&!me&&(ge=!1),!He&&(me||yt.has(Dt))&&(He=!0)}),ge&&Ce.add(St.key),He&&yt.add(St.key),Re.add(St.key)}})}return{checkedKeys:Array.from(Ce),halfCheckedKeys:Array.from(Ie(yt,Ce))}}function he(Qe,we,de,Ne,Ce){for(var yt=new Set(Qe),Je=new Set(we),Ye=0;Ye<=Ne;Ye+=1){var Re=de.get(Ye)||new Set;Re.forEach(function(St){var Fe=St.key,ge=St.node,He=St.children,Ue=He===void 0?[]:He;!yt.has(Fe)&&!Je.has(Fe)&&!Ce(ge)&&Ue.filter(function(Dt){return!Ce(Dt.node)}).forEach(function(Dt){yt.delete(Dt.key)})})}Je=new Set;for(var Pe=new Set,vt=Ne;vt>=0;vt-=1){var mt=de.get(vt)||new Set;mt.forEach(function(St){var Fe=St.parent,ge=St.node;if(!(Ce(ge)||!St.parent||Pe.has(St.parent.key))){if(Ce(St.parent.node)){Pe.add(Fe.key);return}var He=!0,Ue=!1;(Fe.children||[]).filter(function(Dt){return!Ce(Dt.node)}).forEach(function(Dt){var me=Dt.key,Ee=yt.has(me);He&&!Ee&&(He=!1),!Ue&&(Ee||Je.has(me))&&(Ue=!0)}),He||yt.delete(Fe.key),Ue&&Je.add(Fe.key),Pe.add(Fe.key)}})}return{checkedKeys:Array.from(yt),halfCheckedKeys:Array.from(Ie(Je,yt))}}function De(Qe,we,de,Ne){var Ce=[],yt;Ne?yt=Ne:yt=at;var Je=new Set(Qe.filter(function(vt){var mt=!!(0,je.Z)(de,vt);return mt||Ce.push(vt),mt})),Ye=new Map,Re=0;Object.keys(de).forEach(function(vt){var mt=de[vt],St=mt.level,Fe=Ye.get(St);Fe||(Fe=new Set,Ye.set(St,Fe)),Fe.add(mt),Re=Math.max(Re,St)}),(0,ae.ZP)(!Ce.length,"Tree missing follow keys: ".concat(Ce.slice(0,100).map(function(vt){return"'".concat(vt,"'")}).join(", ")));var Pe;return we===!0?Pe=be(Je,Ye,Re,yt):Pe=he(Je,we.halfCheckedKeys,Ye,Re,yt),Pe}},65065:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return ae}});function ae(je,Ie){return je[Ie]}},34061:function(cn,an,ue){"use strict";ue.d(an,{F:function(){return St},H8:function(){return mt},I8:function(){return vt},km:function(){return Ce},oH:function(){return Re},w$:function(){return yt},zn:function(){return Ye}});var ae=ue(76190),je=ue(94480),Ie=ue(33885),at=ue(75931),be=ue(11592),he=ue(2738),De=ue(48736),Qe=ue(65065),we=["children"];function de(Fe,ge){return"".concat(Fe,"-").concat(ge)}function Ne(Fe){return Fe&&Fe.type&&Fe.type.isTreeNode}function Ce(Fe,ge){return Fe!=null?Fe:ge}function yt(Fe){var ge=Fe||{},He=ge.title,Ue=ge._title,Dt=ge.key,me=ge.children,Ee=He||"title";return{title:Ee,_title:Ue||[Ee],key:Dt||"key",children:me||"children"}}function Je(Fe,ge){var He=new Map;function Ue(Dt){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Dt||[]).forEach(function(Ee){var Ke=Ee[ge.key],Se=Ee[ge.children];warning(Ke!=null,"Tree node must have a certain key: [".concat(me).concat(Ke,"]"));var $e=String(Ke);warning(!He.has($e)||Ke===null||Ke===void 0,"Same 'key' exist in the Tree: ".concat($e)),He.set($e,!0),Ue(Se,"".concat(me).concat($e," > "))})}Ue(Fe)}function Ye(Fe){function ge(He){var Ue=(0,be.Z)(He);return Ue.map(function(Dt){if(!Ne(Dt))return(0,De.ZP)(!Dt,"Tree/TreeNode can only accept TreeNode as children."),null;var me=Dt.key,Ee=Dt.props,Ke=Ee.children,Se=(0,at.Z)(Ee,we),$e=(0,Ie.Z)({key:me},Se),Ze=ge(Ke);return Ze.length&&($e.children=Ze),$e}).filter(function(Dt){return Dt})}return ge(Fe)}function Re(Fe,ge,He){var Ue=yt(He),Dt=Ue._title,me=Ue.key,Ee=Ue.children,Ke=new Set(ge===!0?[]:ge),Se=[];function $e(Ze){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ze.map(function(nn,Ot){for(var Qt=de(lt?lt.pos:"0",Ot),Ht=Ce(nn[me],Qt),ye,fe=0;fe<Dt.length;fe+=1){var wt=Dt[fe];if(nn[wt]!==void 0){ye=nn[wt];break}}var qt=Object.assign((0,he.Z)(nn,[].concat((0,je.Z)(Dt),[me,Ee])),{title:ye,key:Ht,parent:lt,pos:Qt,children:null,data:nn,isStart:[].concat((0,je.Z)(lt?lt.isStart:[]),[Ot===0]),isEnd:[].concat((0,je.Z)(lt?lt.isEnd:[]),[Ot===Ze.length-1])});return Se.push(qt),ge===!0||Ke.has(Ht)?qt.children=$e(nn[Ee]||[],qt):qt.children=[],qt})}return $e(Fe),Se}function Pe(Fe,ge,He){var Ue={};(0,ae.Z)(He)==="object"?Ue=He:Ue={externalGetKey:He},Ue=Ue||{};var Dt=Ue,me=Dt.childrenPropName,Ee=Dt.externalGetKey,Ke=Dt.fieldNames,Se=yt(Ke),$e=Se.key,Ze=Se.children,lt=me||Ze,nn;Ee?typeof Ee=="string"?nn=function(Ht){return Ht[Ee]}:typeof Ee=="function"&&(nn=function(Ht){return Ee(Ht)}):nn=function(Ht,ye){return Ce(Ht[$e],ye)};function Ot(Qt,Ht,ye,fe){var wt=Qt?Qt[lt]:Fe,qt=Qt?de(ye.pos,Ht):"0",Bt=Qt?[].concat((0,je.Z)(fe),[Qt]):[];if(Qt){var We=nn(Qt,qt),gt={node:Qt,index:Ht,pos:qt,key:We,parentPos:ye.node?ye.pos:null,level:ye.level+1,nodes:Bt};ge(gt)}wt&&wt.forEach(function(xt,bn){Ot(xt,bn,{node:Qt,pos:qt,level:ye?ye.level+1:-1},Bt)})}Ot(null)}function vt(Fe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=ge.initWrapper,Ue=ge.processEntity,Dt=ge.onProcessFinished,me=ge.externalGetKey,Ee=ge.childrenPropName,Ke=ge.fieldNames,Se=arguments.length>2?arguments[2]:void 0,$e=me||Se,Ze={},lt={},nn={posEntities:Ze,keyEntities:lt};return He&&(nn=He(nn)||nn),Pe(Fe,function(Ot){var Qt=Ot.node,Ht=Ot.index,ye=Ot.pos,fe=Ot.key,wt=Ot.parentPos,qt=Ot.level,Bt=Ot.nodes,We={node:Qt,nodes:Bt,index:Ht,key:fe,pos:ye,level:qt},gt=Ce(fe,ye);Ze[ye]=We,lt[gt]=We,We.parent=Ze[wt],We.parent&&(We.parent.children=We.parent.children||[],We.parent.children.push(We)),Ue&&Ue(We,nn)},{externalGetKey:$e,childrenPropName:Ee,fieldNames:Ke}),Dt&&Dt(nn),nn}function mt(Fe,ge){var He=ge.expandedKeys,Ue=ge.selectedKeys,Dt=ge.loadedKeys,me=ge.loadingKeys,Ee=ge.checkedKeys,Ke=ge.halfCheckedKeys,Se=ge.dragOverNodeKey,$e=ge.dropPosition,Ze=ge.keyEntities,lt=(0,Qe.Z)(Ze,Fe),nn={eventKey:Fe,expanded:He.indexOf(Fe)!==-1,selected:Ue.indexOf(Fe)!==-1,loaded:Dt.indexOf(Fe)!==-1,loading:me.indexOf(Fe)!==-1,checked:Ee.indexOf(Fe)!==-1,halfChecked:Ke.indexOf(Fe)!==-1,pos:String(lt?lt.pos:""),dragOver:Se===Fe&&$e===0,dragOverGapTop:Se===Fe&&$e===-1,dragOverGapBottom:Se===Fe&&$e===1};return nn}function St(Fe){var ge=Fe.data,He=Fe.expanded,Ue=Fe.selected,Dt=Fe.checked,me=Fe.loaded,Ee=Fe.loading,Ke=Fe.halfChecked,Se=Fe.dragOver,$e=Fe.dragOverGapTop,Ze=Fe.dragOverGapBottom,lt=Fe.pos,nn=Fe.active,Ot=Fe.eventKey,Qt=(0,Ie.Z)((0,Ie.Z)({},ge),{},{expanded:He,selected:Ue,checked:Dt,loaded:me,loading:Ee,halfChecked:Ke,dragOver:Se,dragOverGapTop:$e,dragOverGapBottom:Ze,pos:lt,active:nn,key:Ot});return"props"in Qt||Object.defineProperty(Qt,"props",{get:function(){return(0,De.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Fe}}),Qt}},8224:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return je}});var ae=ue(4676);function je(Ie,at,be,he){var De=ae.unstable_batchedUpdates?function(we){ae.unstable_batchedUpdates(be,we)}:be;return Ie!=null&&Ie.addEventListener&&Ie.addEventListener(at,De,he),{remove:function(){Ie!=null&&Ie.removeEventListener&&Ie.removeEventListener(at,De,he)}}}},24514:function(cn,an,ue){"use strict";ue.d(an,{G:function(){return at}});var ae=ue(47273),je=function(he){if((0,ae.Z)()&&window.document.documentElement){var De=Array.isArray(he)?he:[he],Qe=window.document.documentElement;return De.some(function(we){return we in Qe.style})}return!1},Ie=function(he,De){if(!je(he))return!1;var Qe=document.createElement("div"),we=Qe.style[he];return Qe.style[he]=De,Qe.style[he]!==we};function at(be,he){return!Array.isArray(be)&&he!==void 0?Ie(be,he):je(be)}},48911:function(cn,an,ue){"use strict";ue.d(an,{Z:function(){return st}});var ae=ue(54476),je=ue(76190),Ie=ue(33885),at=ue(20068),be=ue(42978),he=ue(75931),De=ue(92310),Qe=ue.n(De),we=ue(29301),de=ue(70425),Ne=ue(34280),Ce=ue(59301),yt=ue(4676),Je=Ce.forwardRef(function(Be,tt){var et=Be.height,Oe=Be.offsetY,dt=Be.offsetX,ut=Be.children,ve=Be.prefixCls,ct=Be.onInnerResize,Yt=Be.innerProps,Vt=Be.rtl,oe=Be.extra,ee={},z={display:"flex",flexDirection:"column"};return Oe!==void 0&&(ee={height:et,position:"relative",overflow:"hidden"},z=(0,Ie.Z)((0,Ie.Z)({},z),{},(0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)((0,at.Z)({transform:"translateY(".concat(Oe,"px)")},Vt?"marginRight":"marginLeft",-dt),"position","absolute"),"left",0),"right",0),"top",0))),Ce.createElement("div",{style:ee},Ce.createElement(we.Z,{onResize:function(le){var ne=le.offsetHeight;ne&&ct&&ct()}},Ce.createElement("div",(0,ae.Z)({style:z,className:Qe()((0,at.Z)({},"".concat(ve,"-holder-inner"),ve)),ref:tt},Yt),ut,oe)))});Je.displayName="Filler";var Ye=Je;function Re(Be){var tt=Be.children,et=Be.setRef,Oe=Ce.useCallback(function(dt){et(dt)},[]);return Ce.cloneElement(tt,{ref:Oe})}function Pe(Be,tt,et,Oe,dt,ut,ve,ct){var Yt=ct.getKey;return Be.slice(tt,et+1).map(function(Vt,oe){var ee=tt+oe,z=ve(Vt,ee,{style:{width:Oe},offsetX:dt}),re=Yt(Vt);return Ce.createElement(Re,{key:re,setRef:function(ne){return ut(Vt,ne)}},z)})}function vt(Be,tt,et,Oe){var dt=et-Be,ut=tt-et,ve=Math.min(dt,ut)*2;if(Oe<=ve){var ct=Math.floor(Oe/2);return Oe%2?et+ct+1:et-ct}return dt>ut?et-(Oe-ut):et+(Oe-dt)}function mt(Be,tt,et){var Oe=Be.length,dt=tt.length,ut,ve;if(Oe===0&&dt===0)return null;Oe<dt?(ut=Be,ve=tt):(ut=tt,ve=Be);var ct={__EMPTY_ITEM__:!0};function Yt(le){return le!==void 0?et(le):ct}for(var Vt=null,oe=Math.abs(Oe-dt)!==1,ee=0;ee<ve.length;ee+=1){var z=Yt(ut[ee]),re=Yt(ve[ee]);if(z!==re){Vt=ee,oe=oe||z!==Yt(ve[ee+1]);break}}return Vt===null?null:{index:Vt,multiple:oe}}function St(Be,tt,et){var Oe=Ce.useState(Be),dt=(0,be.Z)(Oe,2),ut=dt[0],ve=dt[1],ct=Ce.useState(null),Yt=(0,be.Z)(ct,2),Vt=Yt[0],oe=Yt[1];return Ce.useEffect(function(){var ee=mt(ut||[],Be||[],tt);(ee==null?void 0:ee.index)!==void 0&&(et==null||et(ee.index),oe(Be[ee.index])),ve(Be)},[Be]),[Vt]}var Fe=ue(16089),ge=(typeof navigator=="undefined"?"undefined":(0,je.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),He=ge,Ue=function(Be,tt,et,Oe){var dt=(0,Ce.useRef)(!1),ut=(0,Ce.useRef)(null);function ve(){clearTimeout(ut.current),dt.current=!0,ut.current=setTimeout(function(){dt.current=!1},50)}var ct=(0,Ce.useRef)({top:Be,bottom:tt,left:et,right:Oe});return ct.current.top=Be,ct.current.bottom=tt,ct.current.left=et,ct.current.right=Oe,function(Yt,Vt){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ee=Yt?Vt<0&&ct.current.left||Vt>0&&ct.current.right:Vt<0&&ct.current.top||Vt>0&&ct.current.bottom;return oe&&ee?(clearTimeout(ut.current),dt.current=!1):(!ee||dt.current)&&ve(),!dt.current&&ee}};function Dt(Be,tt,et,Oe,dt,ut,ve){var ct=(0,Ce.useRef)(0),Yt=(0,Ce.useRef)(null),Vt=(0,Ce.useRef)(null),oe=(0,Ce.useRef)(!1),ee=Ue(tt,et,Oe,dt);function z(ft,nt){if(Fe.Z.cancel(Yt.current),!ee(!1,nt)){var Le=ft;if(!Le._virtualHandled)Le._virtualHandled=!0;else return;ct.current+=nt,Vt.current=nt,He||Le.preventDefault(),Yt.current=(0,Fe.Z)(function(){var Gt=oe.current?10:1;ve(ct.current*Gt,!1),ct.current=0})}}function re(ft,nt){ve(nt,!0),He||ft.preventDefault()}var le=(0,Ce.useRef)(null),ne=(0,Ce.useRef)(null);function xe(ft){if(Be){Fe.Z.cancel(ne.current),ne.current=(0,Fe.Z)(function(){le.current=null},2);var nt=ft.deltaX,Le=ft.deltaY,Gt=ft.shiftKey,Lt=nt,_t=Le;(le.current==="sx"||!le.current&&Gt&&Le&&!nt)&&(Lt=Le,_t=0,le.current="sx");var hn=Math.abs(Lt),Nn=Math.abs(_t);le.current===null&&(le.current=ut&&hn>Nn?"x":"y"),le.current==="y"?z(ft,_t):re(ft,Lt)}}function ot(ft){Be&&(oe.current=ft.detail===Vt.current)}return[xe,ot]}function me(Be,tt,et,Oe){var dt=Ce.useMemo(function(){return[new Map,[]]},[Be,et.id,Oe]),ut=(0,be.Z)(dt,2),ve=ut[0],ct=ut[1],Yt=function(oe){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe,z=ve.get(oe),re=ve.get(ee);if(z===void 0||re===void 0)for(var le=Be.length,ne=ct.length;ne<le;ne+=1){var xe,ot=Be[ne],ft=tt(ot);ve.set(ft,ne);var nt=(xe=et.get(ft))!==null&&xe!==void 0?xe:Oe;if(ct[ne]=(ct[ne-1]||0)+nt,ft===oe&&(z=ne),ft===ee&&(re=ne),z!==void 0&&re!==void 0)break}return{top:ct[z-1]||0,bottom:ct[re]}};return Yt}var Ee=ue(67732),Ke=ue(83652),Se=function(){function Be(){(0,Ee.Z)(this,Be),(0,at.Z)(this,"maps",void 0),(0,at.Z)(this,"id",0),(0,at.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ke.Z)(Be,[{key:"set",value:function(et,Oe){this.diffRecords.set(et,this.maps[et]),this.maps[et]=Oe,this.id+=1}},{key:"get",value:function(et){return this.maps[et]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Be}(),$e=Se;function Ze(Be){var tt=parseFloat(Be);return isNaN(tt)?0:tt}function lt(Be,tt,et){var Oe=Ce.useState(0),dt=(0,be.Z)(Oe,2),ut=dt[0],ve=dt[1],ct=(0,Ce.useRef)(new Map),Yt=(0,Ce.useRef)(new $e),Vt=(0,Ce.useRef)(0);function oe(){Vt.current+=1}function ee(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;oe();var le=function(){var ot=!1;ct.current.forEach(function(ft,nt){if(ft&&ft.offsetParent){var Le=ft.offsetHeight,Gt=getComputedStyle(ft),Lt=Gt.marginTop,_t=Gt.marginBottom,hn=Ze(Lt),Nn=Ze(_t),Wt=Le+hn+Nn;Yt.current.get(nt)!==Wt&&(Yt.current.set(nt,Wt),ot=!0)}}),ot&&ve(function(ft){return ft+1})};if(re)le();else{Vt.current+=1;var ne=Vt.current;Promise.resolve().then(function(){ne===Vt.current&&le()})}}function z(re,le){var ne=Be(re),xe=ct.current.get(ne);le?(ct.current.set(ne,le),ee()):ct.current.delete(ne),!xe!=!le&&(le?tt==null||tt(re):et==null||et(re))}return(0,Ce.useEffect)(function(){return oe},[]),[z,ee,Yt.current,ut]}var nn=14/15;function Ot(Be,tt,et){var Oe=(0,Ce.useRef)(!1),dt=(0,Ce.useRef)(0),ut=(0,Ce.useRef)(0),ve=(0,Ce.useRef)(null),ct=(0,Ce.useRef)(null),Yt,Vt=function(re){if(Oe.current){var le=Math.ceil(re.touches[0].pageX),ne=Math.ceil(re.touches[0].pageY),xe=dt.current-le,ot=ut.current-ne,ft=Math.abs(xe)>Math.abs(ot);ft?dt.current=le:ut.current=ne;var nt=et(ft,ft?xe:ot,!1,re);nt&&re.preventDefault(),clearInterval(ct.current),nt&&(ct.current=setInterval(function(){ft?xe*=nn:ot*=nn;var Le=Math.floor(ft?xe:ot);(!et(ft,Le,!0)||Math.abs(Le)<=.1)&&clearInterval(ct.current)},16))}},oe=function(){Oe.current=!1,Yt()},ee=function(re){Yt(),re.touches.length===1&&!Oe.current&&(Oe.current=!0,dt.current=Math.ceil(re.touches[0].pageX),ut.current=Math.ceil(re.touches[0].pageY),ve.current=re.target,ve.current.addEventListener("touchmove",Vt,{passive:!1}),ve.current.addEventListener("touchend",oe,{passive:!0}))};Yt=function(){ve.current&&(ve.current.removeEventListener("touchmove",Vt),ve.current.removeEventListener("touchend",oe))},(0,Ne.Z)(function(){return Be&&tt.current.addEventListener("touchstart",ee,{passive:!0}),function(){var z;(z=tt.current)===null||z===void 0||z.removeEventListener("touchstart",ee),Yt(),clearInterval(ct.current)}},[Be])}function Qt(Be){return Math.floor(Math.pow(Be,.5))}function Ht(Be,tt){var et="touches"in Be?Be.touches[0]:Be;return et[tt?"pageX":"pageY"]-window[tt?"scrollX":"scrollY"]}function ye(Be,tt,et){Ce.useEffect(function(){var Oe=tt.current;if(Be&&Oe){var dt=!1,ut,ve,ct=function(){Fe.Z.cancel(ut)},Yt=function z(){ct(),ut=(0,Fe.Z)(function(){et(ve),z()})},Vt=function(){dt=!1,ct()},oe=function(re){if(!(re.target.draggable||re.button!==0)){var le=re;le._virtualHandled||(le._virtualHandled=!0,dt=!0)}},ee=function(re){if(dt){var le=Ht(re,!1),ne=Oe.getBoundingClientRect(),xe=ne.top,ot=ne.bottom;if(le<=xe){var ft=xe-le;ve=-Qt(ft),Yt()}else if(le>=ot){var nt=le-ot;ve=Qt(nt),Yt()}else ct()}};return Oe.addEventListener("mousedown",oe),Oe.ownerDocument.addEventListener("mouseup",Vt),Oe.ownerDocument.addEventListener("mousemove",ee),Oe.ownerDocument.addEventListener("dragend",Vt),function(){Oe.removeEventListener("mousedown",oe),Oe.ownerDocument.removeEventListener("mouseup",Vt),Oe.ownerDocument.removeEventListener("mousemove",ee),Oe.ownerDocument.removeEventListener("dragend",Vt),ct()}}},[Be])}var fe=10;function wt(Be,tt,et,Oe,dt,ut,ve,ct){var Yt=Ce.useRef(),Vt=Ce.useState(null),oe=(0,be.Z)(Vt,2),ee=oe[0],z=oe[1];return(0,Ne.Z)(function(){if(ee&&ee.times<fe){if(!Be.current){z(function(Wn){return(0,Ie.Z)({},Wn)});return}ut();var re=ee.targetAlign,le=ee.originAlign,ne=ee.index,xe=ee.offset,ot=Be.current.clientHeight,ft=!1,nt=re,Le=null;if(ot){for(var Gt=re||le,Lt=0,_t=0,hn=0,Nn=Math.min(tt.length-1,ne),Wt=0;Wt<=Nn;Wt+=1){var Ln=dt(tt[Wt]);_t=Lt;var nr=et.get(Ln);hn=_t+(nr===void 0?Oe:nr),Lt=hn}for(var $n=Gt==="top"?xe:ot-xe,It=Nn;It>=0;It-=1){var Mt=dt(tt[It]),At=et.get(Mt);if(At===void 0){ft=!0;break}if($n-=At,$n<=0)break}switch(Gt){case"top":Le=_t-xe;break;case"bottom":Le=hn-ot+xe;break;default:{var Cn=Be.current.scrollTop,Sn=Cn+ot;_t<Cn?nt="top":hn>Sn&&(nt="bottom")}}Le!==null&&ve(Le),Le!==ee.lastTop&&(ft=!0)}ft&&z((0,Ie.Z)((0,Ie.Z)({},ee),{},{times:ee.times+1,targetAlign:nt,lastTop:Le}))}},[ee,Be.current]),function(re){if(re==null){ct();return}if(Fe.Z.cancel(Yt.current),typeof re=="number")ve(re);else if(re&&(0,je.Z)(re)==="object"){var le,ne=re.align;"index"in re?le=re.index:le=tt.findIndex(function(ft){return dt(ft)===re.key});var xe=re.offset,ot=xe===void 0?0:xe;z({times:0,index:le,offset:ot,originAlign:ne})}}}var qt=Ce.forwardRef(function(Be,tt){var et=Be.prefixCls,Oe=Be.rtl,dt=Be.scrollOffset,ut=Be.scrollRange,ve=Be.onStartMove,ct=Be.onStopMove,Yt=Be.onScroll,Vt=Be.horizontal,oe=Be.spinSize,ee=Be.containerSize,z=Be.style,re=Be.thumbStyle,le=Be.showScrollBar,ne=Ce.useState(!1),xe=(0,be.Z)(ne,2),ot=xe[0],ft=xe[1],nt=Ce.useState(null),Le=(0,be.Z)(nt,2),Gt=Le[0],Lt=Le[1],_t=Ce.useState(null),hn=(0,be.Z)(_t,2),Nn=hn[0],Wt=hn[1],Ln=!Oe,nr=Ce.useRef(),$n=Ce.useRef(),It=Ce.useState(le),Mt=(0,be.Z)(It,2),At=Mt[0],Cn=Mt[1],Sn=Ce.useRef(),Wn=function(){le===!0||le===!1||(clearTimeout(Sn.current),Cn(!0),Sn.current=setTimeout(function(){Cn(!1)},3e3))},rr=ut-ee||0,gn=ee-oe||0,Jt=Ce.useMemo(function(){if(dt===0||rr===0)return 0;var Or=dt/rr;return Or*gn},[dt,rr,gn]),Bn=function(yr){yr.stopPropagation(),yr.preventDefault()},Sr=Ce.useRef({top:Jt,dragging:ot,pageY:Gt,startTop:Nn});Sr.current={top:Jt,dragging:ot,pageY:Gt,startTop:Nn};var rn=function(yr){ft(!0),Lt(Ht(yr,Vt)),Wt(Sr.current.top),ve(),yr.stopPropagation(),yr.preventDefault()};Ce.useEffect(function(){var Or=function(vn){vn.preventDefault()},yr=nr.current,ur=$n.current;return yr.addEventListener("touchstart",Or,{passive:!1}),ur.addEventListener("touchstart",rn,{passive:!1}),function(){yr.removeEventListener("touchstart",Or),ur.removeEventListener("touchstart",rn)}},[]);var Mn=Ce.useRef();Mn.current=rr;var Rn=Ce.useRef();Rn.current=gn,Ce.useEffect(function(){if(ot){var Or,yr=function(vn){var kt=Sr.current,un=kt.dragging,qn=kt.pageY,kr=kt.startTop;Fe.Z.cancel(Or);var _e=nr.current.getBoundingClientRect(),Ge=ee/(Vt?_e.width:_e.height);if(un){var ln=(Ht(vn,Vt)-qn)*Ge,Kt=kr;!Ln&&Vt?Kt-=ln:Kt+=ln;var qe=Mn.current,Xt=Rn.current,dn=Xt?Kt/Xt:0,pn=Math.ceil(dn*qe);pn=Math.max(pn,0),pn=Math.min(pn,qe),Or=(0,Fe.Z)(function(){Yt(pn,Vt)})}},ur=function(){ft(!1),ct()};return window.addEventListener("mousemove",yr,{passive:!0}),window.addEventListener("touchmove",yr,{passive:!0}),window.addEventListener("mouseup",ur,{passive:!0}),window.addEventListener("touchend",ur,{passive:!0}),function(){window.removeEventListener("mousemove",yr),window.removeEventListener("touchmove",yr),window.removeEventListener("mouseup",ur),window.removeEventListener("touchend",ur),Fe.Z.cancel(Or)}}},[ot]),Ce.useEffect(function(){return Wn(),function(){clearTimeout(Sn.current)}},[dt]),Ce.useImperativeHandle(tt,function(){return{delayHidden:Wn}});var Hn="".concat(et,"-scrollbar"),Er={position:"absolute",visibility:At?null:"hidden"},mr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Vt?(Object.assign(Er,{height:8,left:0,right:0,bottom:0}),Object.assign(mr,(0,at.Z)({height:"100%",width:oe},Ln?"left":"right",Jt))):(Object.assign(Er,(0,at.Z)({width:8,top:0,bottom:0},Ln?"right":"left",0)),Object.assign(mr,{width:"100%",height:oe,top:Jt})),Ce.createElement("div",{ref:nr,className:Qe()(Hn,(0,at.Z)((0,at.Z)((0,at.Z)({},"".concat(Hn,"-horizontal"),Vt),"".concat(Hn,"-vertical"),!Vt),"".concat(Hn,"-visible"),At)),style:(0,Ie.Z)((0,Ie.Z)({},Er),z),onMouseDown:Bn,onMouseMove:Wn},Ce.createElement("div",{ref:$n,className:Qe()("".concat(Hn,"-thumb"),(0,at.Z)({},"".concat(Hn,"-thumb-moving"),ot)),style:(0,Ie.Z)((0,Ie.Z)({},mr),re),onMouseDown:rn}))}),Bt=qt,We=20;function gt(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,et=Be/tt*Be;return isNaN(et)&&(et=0),et=Math.max(et,We),Math.floor(et)}var xt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],bn=[],Xe={overflowY:"auto",overflowAnchor:"none"};function Me(Be,tt){var et=Be.prefixCls,Oe=et===void 0?"rc-virtual-list":et,dt=Be.className,ut=Be.height,ve=Be.itemHeight,ct=Be.fullHeight,Yt=ct===void 0?!0:ct,Vt=Be.style,oe=Be.data,ee=Be.children,z=Be.itemKey,re=Be.virtual,le=Be.direction,ne=Be.scrollWidth,xe=Be.component,ot=xe===void 0?"div":xe,ft=Be.onScroll,nt=Be.onVirtualScroll,Le=Be.onVisibleChange,Gt=Be.innerProps,Lt=Be.extraRender,_t=Be.styles,hn=Be.showScrollBar,Nn=hn===void 0?"optional":hn,Wt=(0,he.Z)(Be,xt),Ln=Ce.useCallback(function(rt){return typeof z=="function"?z(rt):rt==null?void 0:rt[z]},[z]),nr=lt(Ln,null,null),$n=(0,be.Z)(nr,4),It=$n[0],Mt=$n[1],At=$n[2],Cn=$n[3],Sn=!!(re!==!1&&ut&&ve),Wn=Ce.useMemo(function(){return Object.values(At.maps).reduce(function(rt,Et){return rt+Et},0)},[At.id,At.maps]),rr=Sn&&oe&&(Math.max(ve*oe.length,Wn)>ut||!!ne),gn=le==="rtl",Jt=Qe()(Oe,(0,at.Z)({},"".concat(Oe,"-rtl"),gn),dt),Bn=oe||bn,Sr=(0,Ce.useRef)(),rn=(0,Ce.useRef)(),Mn=(0,Ce.useRef)(),Rn=(0,Ce.useState)(0),Hn=(0,be.Z)(Rn,2),Er=Hn[0],mr=Hn[1],Or=(0,Ce.useState)(0),yr=(0,be.Z)(Or,2),ur=yr[0],Mr=yr[1],vn=(0,Ce.useState)(!1),kt=(0,be.Z)(vn,2),un=kt[0],qn=kt[1],kr=function(){qn(!0)},_e=function(){qn(!1)},Ge={getKey:Ln};function ln(rt){mr(function(Et){var Nt;typeof rt=="function"?Nt=rt(Et):Nt=rt;var Tt=jr(Nt);return Sr.current.scrollTop=Tt,Tt})}var Kt=(0,Ce.useRef)({start:0,end:Bn.length}),qe=(0,Ce.useRef)(),Xt=St(Bn,Ln),dn=(0,be.Z)(Xt,1),pn=dn[0];qe.current=pn;var En=Ce.useMemo(function(){if(!Sn)return{scrollHeight:void 0,start:0,end:Bn.length-1,offset:void 0};if(!rr){var rt;return{scrollHeight:((rt=rn.current)===null||rt===void 0?void 0:rt.offsetHeight)||0,start:0,end:Bn.length-1,offset:void 0}}for(var Et=0,Nt,Tt,zt,xn=Bn.length,jt=0;jt<xn;jt+=1){var Rt=Bn[jt],on=Ln(Rt),sn=At.get(on),Dn=Et+(sn===void 0?ve:sn);Dn>=Er&&Nt===void 0&&(Nt=jt,Tt=Et),Dn>Er+ut&&zt===void 0&&(zt=jt),Et=Dn}return Nt===void 0&&(Nt=0,Tt=0,zt=Math.ceil(ut/ve)),zt===void 0&&(zt=Bn.length-1),zt=Math.min(zt+1,Bn.length-1),{scrollHeight:Et,start:Nt,end:zt,offset:Tt}},[rr,Sn,Er,Bn,Cn,ut]),mn=En.scrollHeight,kn=En.start,$t=En.end,Ft=En.offset;Kt.current.start=kn,Kt.current.end=$t,Ce.useLayoutEffect(function(){var rt=At.getRecord();if(rt.size===1){var Et=Array.from(rt.keys())[0],Nt=rt.get(Et),Tt=Bn[kn];if(Tt&&Nt===void 0){var zt=Ln(Tt);if(zt===Et){var xn=At.get(Et),jt=xn-ve;ln(function(Rt){return Rt+jt})}}}At.resetRecord()},[mn]);var Tn=Ce.useState({width:0,height:ut}),Fn=(0,be.Z)(Tn,2),Vn=Fn[0],Un=Fn[1],xr=function(Et){Un({width:Et.offsetWidth,height:Et.offsetHeight})},Nr=(0,Ce.useRef)(),Kn=(0,Ce.useRef)(),wn=Ce.useMemo(function(){return gt(Vn.width,ne)},[Vn.width,ne]),Gn=Ce.useMemo(function(){return gt(Vn.height,mn)},[Vn.height,mn]),An=mn-ut,Tr=(0,Ce.useRef)(An);Tr.current=An;function jr(rt){var Et=rt;return Number.isNaN(Tr.current)||(Et=Math.min(Et,Tr.current)),Et=Math.max(Et,0),Et}var Fr=Er<=0,Ur=Er>=An,Jr=ur<=0,Vr=ur>=ne,Ir=Ue(Fr,Ur,Jr,Vr),ei=function(){return{x:gn?-ur:ur,y:Er}},Yr=(0,Ce.useRef)(ei()),On=(0,de.zX)(function(rt){if(nt){var Et=(0,Ie.Z)((0,Ie.Z)({},ei()),rt);(Yr.current.x!==Et.x||Yr.current.y!==Et.y)&&(nt(Et),Yr.current=Et)}});function or(rt,Et){var Nt=rt;Et?((0,yt.flushSync)(function(){Mr(Nt)}),On()):ln(Nt)}function Dr(rt){var Et=rt.currentTarget.scrollTop;Et!==Er&&ln(Et),ft==null||ft(rt),On()}var Zr=function(Et){var Nt=Et,Tt=ne?ne-Vn.width:0;return Nt=Math.max(Nt,0),Nt=Math.min(Nt,Tt),Nt},Br=(0,de.zX)(function(rt,Et){Et?((0,yt.flushSync)(function(){Mr(function(Nt){var Tt=Nt+(gn?-rt:rt);return Zr(Tt)})}),On()):ln(function(Nt){var Tt=Nt+rt;return Tt})}),Wr=Dt(Sn,Fr,Ur,Jr,Vr,!!ne,Br),oi=(0,be.Z)(Wr,2),Te=oi[0],bt=oi[1];Ot(Sn,Sr,function(rt,Et,Nt,Tt){var zt=Tt;return Ir(rt,Et,Nt)?!1:!zt||!zt._virtualHandled?(zt&&(zt._virtualHandled=!0),Te({preventDefault:function(){},deltaX:rt?Et:0,deltaY:rt?0:Et}),!0):!1}),ye(rr,Sr,function(rt){ln(function(Et){return Et+rt})}),(0,Ne.Z)(function(){function rt(Nt){var Tt=Fr&&Nt.detail<0,zt=Ur&&Nt.detail>0;Sn&&!Tt&&!zt&&Nt.preventDefault()}var Et=Sr.current;return Et.addEventListener("wheel",Te,{passive:!1}),Et.addEventListener("DOMMouseScroll",bt,{passive:!0}),Et.addEventListener("MozMousePixelScroll",rt,{passive:!1}),function(){Et.removeEventListener("wheel",Te),Et.removeEventListener("DOMMouseScroll",bt),Et.removeEventListener("MozMousePixelScroll",rt)}},[Sn,Fr,Ur]),(0,Ne.Z)(function(){if(ne){var rt=Zr(ur);Mr(rt),On({x:rt})}},[Vn.width,ne]);var it=function(){var Et,Nt;(Et=Nr.current)===null||Et===void 0||Et.delayHidden(),(Nt=Kn.current)===null||Nt===void 0||Nt.delayHidden()},ht=wt(Sr,Bn,At,ve,Ln,function(){return Mt(!0)},ln,it);Ce.useImperativeHandle(tt,function(){return{nativeElement:Mn.current,getScrollInfo:ei,scrollTo:function(Et){function Nt(Tt){return Tt&&(0,je.Z)(Tt)==="object"&&("left"in Tt||"top"in Tt)}Nt(Et)?(Et.left!==void 0&&Mr(Zr(Et.left)),ht(Et.top)):ht(Et)}}}),(0,Ne.Z)(function(){if(Le){var rt=Bn.slice(kn,$t+1);Le(rt,Bn)}},[kn,$t,Bn]);var Pt=me(Bn,Ln,At,ve),Zt=Lt==null?void 0:Lt({start:kn,end:$t,virtual:rr,offsetX:ur,offsetY:Ft,rtl:gn,getSize:Pt}),fn=Pe(Bn,kn,$t,ne,ur,It,ee,Ge),en=null;ut&&(en=(0,Ie.Z)((0,at.Z)({},Yt?"height":"maxHeight",ut),Xe),Sn&&(en.overflowY="hidden",ne&&(en.overflowX="hidden"),un&&(en.pointerEvents="none")));var Ut={};return gn&&(Ut.dir="rtl"),Ce.createElement("div",(0,ae.Z)({ref:Mn,style:(0,Ie.Z)((0,Ie.Z)({},Vt),{},{position:"relative"}),className:Jt},Ut,Wt),Ce.createElement(we.Z,{onResize:xr},Ce.createElement(ot,{className:"".concat(Oe,"-holder"),style:en,ref:Sr,onScroll:Dr,onMouseEnter:it},Ce.createElement(Ye,{prefixCls:Oe,height:mn,offsetX:ur,offsetY:Ft,scrollWidth:ne,onInnerResize:Mt,ref:rn,innerProps:Gt,rtl:gn,extra:Zt},fn))),rr&&mn>ut&&Ce.createElement(Bt,{ref:Nr,prefixCls:Oe,scrollOffset:Er,scrollRange:mn,rtl:gn,onScroll:or,onStartMove:kr,onStopMove:_e,spinSize:Gn,containerSize:Vn.height,style:_t==null?void 0:_t.verticalScrollBar,thumbStyle:_t==null?void 0:_t.verticalScrollBarThumb,showScrollBar:Nn}),rr&&ne>Vn.width&&Ce.createElement(Bt,{ref:Kn,prefixCls:Oe,scrollOffset:ur,scrollRange:ne,rtl:gn,onScroll:or,onStartMove:kr,onStopMove:_e,spinSize:wn,containerSize:Vn.width,horizontal:!0,style:_t==null?void 0:_t.horizontalScrollBar,thumbStyle:_t==null?void 0:_t.horizontalScrollBarThumb,showScrollBar:Nn}))}var ke=Ce.forwardRef(Me);ke.displayName="List";var Ve=ke,st=Ve},93314:function(cn){"use strict";cn.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(cn,an,ue){"use strict";ue.d(an,{Z:function(){return Qe}});const ae=we=>typeof we=="object"&&we!=null&&we.nodeType===1,je=(we,de)=>(!de||we!=="hidden")&&we!=="visible"&&we!=="clip",Ie=(we,de)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Ne=getComputedStyle(we,null);return je(Ne.overflowY,de)||je(Ne.overflowX,de)||(Ce=>{const yt=(Je=>{if(!Je.ownerDocument||!Je.ownerDocument.defaultView)return null;try{return Je.ownerDocument.defaultView.frameElement}catch(Ye){return null}})(Ce);return!!yt&&(yt.clientHeight<Ce.scrollHeight||yt.clientWidth<Ce.scrollWidth)})(we)}return!1},at=(we,de,Ne,Ce,yt,Je,Ye,Re)=>Je<we&&Ye>de||Je>we&&Ye<de?0:Je<=we&&Re<=Ne||Ye>=de&&Re>=Ne?Je-we-Ce:Ye>de&&Re<Ne||Je<we&&Re>Ne?Ye-de+yt:0,be=we=>{const de=we.parentElement;return de==null?we.getRootNode().host||null:de},he=(we,de)=>{var Ne,Ce,yt,Je;if(typeof document=="undefined")return[];const{scrollMode:Ye,block:Re,inline:Pe,boundary:vt,skipOverflowHiddenElements:mt}=de,St=typeof vt=="function"?vt:Bt=>Bt!==vt;if(!ae(we))throw new TypeError("Invalid target");const Fe=document.scrollingElement||document.documentElement,ge=[];let He=we;for(;ae(He)&&St(He);){if(He=be(He),He===Fe){ge.push(He);break}He!=null&&He===document.body&&Ie(He)&&!Ie(document.documentElement)||He!=null&&Ie(He,mt)&&ge.push(He)}const Ue=(Ce=(Ne=window.visualViewport)==null?void 0:Ne.width)!=null?Ce:innerWidth,Dt=(Je=(yt=window.visualViewport)==null?void 0:yt.height)!=null?Je:innerHeight,{scrollX:me,scrollY:Ee}=window,{height:Ke,width:Se,top:$e,right:Ze,bottom:lt,left:nn}=we.getBoundingClientRect(),{top:Ot,right:Qt,bottom:Ht,left:ye}=(Bt=>{const We=window.getComputedStyle(Bt);return{top:parseFloat(We.scrollMarginTop)||0,right:parseFloat(We.scrollMarginRight)||0,bottom:parseFloat(We.scrollMarginBottom)||0,left:parseFloat(We.scrollMarginLeft)||0}})(we);let fe=Re==="start"||Re==="nearest"?$e-Ot:Re==="end"?lt+Ht:$e+Ke/2-Ot+Ht,wt=Pe==="center"?nn+Se/2-ye+Qt:Pe==="end"?Ze+Qt:nn-ye;const qt=[];for(let Bt=0;Bt<ge.length;Bt++){const We=ge[Bt],{height:gt,width:xt,top:bn,right:Xe,bottom:Me,left:ke}=We.getBoundingClientRect();if(Ye==="if-needed"&&$e>=0&&nn>=0&<<=Dt&&Ze<=Ue&&(We===Fe&&!Ie(We)||$e>=bn&<<=Me&&nn>=ke&&Ze<=Xe))return qt;const Ve=getComputedStyle(We),st=parseInt(Ve.borderLeftWidth,10),Be=parseInt(Ve.borderTopWidth,10),tt=parseInt(Ve.borderRightWidth,10),et=parseInt(Ve.borderBottomWidth,10);let Oe=0,dt=0;const ut="offsetWidth"in We?We.offsetWidth-We.clientWidth-st-tt:0,ve="offsetHeight"in We?We.offsetHeight-We.clientHeight-Be-et:0,ct="offsetWidth"in We?We.offsetWidth===0?0:xt/We.offsetWidth:0,Yt="offsetHeight"in We?We.offsetHeight===0?0:gt/We.offsetHeight:0;if(Fe===We)Oe=Re==="start"?fe:Re==="end"?fe-Dt:Re==="nearest"?at(Ee,Ee+Dt,Dt,Be,et,Ee+fe,Ee+fe+Ke,Ke):fe-Dt/2,dt=Pe==="start"?wt:Pe==="center"?wt-Ue/2:Pe==="end"?wt-Ue:at(me,me+Ue,Ue,st,tt,me+wt,me+wt+Se,Se),Oe=Math.max(0,Oe+Ee),dt=Math.max(0,dt+me);else{Oe=Re==="start"?fe-bn-Be:Re==="end"?fe-Me+et+ve:Re==="nearest"?at(bn,Me,gt,Be,et+ve,fe,fe+Ke,Ke):fe-(bn+gt/2)+ve/2,dt=Pe==="start"?wt-ke-st:Pe==="center"?wt-(ke+xt/2)+ut/2:Pe==="end"?wt-Xe+tt+ut:at(ke,Xe,xt,st,tt+ut,wt,wt+Se,Se);const{scrollLeft:Vt,scrollTop:oe}=We;Oe=Yt===0?0:Math.max(0,Math.min(oe+Oe/Yt,We.scrollHeight-gt/Yt+ve)),dt=ct===0?0:Math.max(0,Math.min(Vt+dt/ct,We.scrollWidth-xt/ct+ut)),fe+=oe-Oe,wt+=Vt-dt}qt.push({el:We,top:Oe,left:dt})}return qt},De=we=>we===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(we)?we:{block:"start",inline:"nearest"};function Qe(we,de){if(!we.isConnected||!(yt=>{let Je=yt;for(;Je&&Je.parentNode;){if(Je.parentNode===document)return!0;Je=Je.parentNode instanceof ShadowRoot?Je.parentNode.host:Je.parentNode}return!1})(we))return;const Ne=(yt=>{const Je=window.getComputedStyle(yt);return{top:parseFloat(Je.scrollMarginTop)||0,right:parseFloat(Je.scrollMarginRight)||0,bottom:parseFloat(Je.scrollMarginBottom)||0,left:parseFloat(Je.scrollMarginLeft)||0}})(we);if((yt=>typeof yt=="object"&&typeof yt.behavior=="function")(de))return de.behavior(he(we,de));const Ce=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:yt,top:Je,left:Ye}of he(we,De(de))){const Re=Je-Ne.top+Ne.bottom,Pe=Ye-Ne.left+Ne.right;yt.scroll({top:Re,left:Pe,behavior:Ce})}}}}]);
|